@tailwind base;
@tailwind components;
@tailwind utilities;

/* true-black page backdrop — kill default body white showing as borders (merakizzz 06-22) */
html, body { margin: 0; padding: 0; min-height: 100%; background: #000; }
body { background: #000; }

/* ============================================================
   suchwow.fun design system — ported verbatim from prototype
   ============================================================ */
.sw { --ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --wow: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace;
  --bg: #000000; --bg2: #14100A;
  --card: linear-gradient(180deg, #1C1509 0%, #14100A 100%);
  --card-flat: #1A1408; --well: #221A0C;
  --tx1: rgba(246,235,201,.96); --tx2: rgba(246,235,201,.62); --tx3: rgba(246,235,201,.40); --tx4: rgba(246,235,201,.22);
  --gold: #FFC93C; --gold-deep: #C2A633; --gold-hot: #FFE082; --gold-ink: #2A1D00;
  --gold-bg: rgba(255,201,60,.12); --gold-bg-h: rgba(255,201,60,.22);
  --sell: #E8643A; --sell-hot: #FFA177; --sell-bg: rgba(232,100,58,.13); --sell-bg-h: rgba(232,100,58,.24);
  --line: rgba(255,201,60,.16); --line-soft: rgba(246,235,201,.09);
  --glow: 0 0 22px rgba(255,201,60,.22), 0 0 64px rgba(255,201,60,.07);
  --glow-big: 0 0 34px rgba(255,201,60,.28), 0 0 110px rgba(255,201,60,.11);
  --glow-sell: 0 0 22px rgba(232,100,58,.22), 0 0 60px rgba(232,100,58,.07);
  --sh: 0 10px 30px rgba(0,0,0,.5); --sh-lg: 0 22px 60px rgba(0,0,0,.65);
  --r: 18px; --r-sm: 12px; --r-xs: 9px;
  --eo: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: linear(0, 0.42 7%, 0.83 15%, 1.05 24%, 1.12 32%, 1.03 47%, 0.99 62%, 1);
  font-family: var(--ui); background: var(--bg); color: var(--tx1); min-height: 100vh;
  position: relative; overflow-x: clip; -webkit-font-smoothing: antialiased;
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.wow { font-family: var(--wow); }
.up { color: var(--gold); } .dn { color: var(--sell); }
.t3 { color: var(--tx3); } .t2 { color: var(--tx2); }

/* ---- ambience: warm orbs + dot grid + giant Ð ---- */
.amb { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: clip; }
.orb { position: absolute; border-radius: 50%; filter: blur(100px); }
.oa { width: 60vw; height: 60vw; background: rgba(255,201,60,.10); top: -24vw; left: -16vw; animation: drift 80s ease-in-out infinite alternate; }
.ob { width: 44vw; height: 44vw; background: rgba(232,100,58,.06); bottom: -16vw; right: -10vw; animation: drift 95s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(7vw, -5vh) scale(1.08); } }
.dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,201,60,.5) 1px, transparent 1px);
  background-size: 28px 28px; opacity: .04; }
.bigD { position: absolute; top: -6vw; right: -2vw; font-size: 34vw; font-weight: 900; color: var(--gold);
  opacity: .035; transform: rotate(12deg); line-height: 1; user-select: none; }

/* ---- live event chips ---- */
.livebar { position: relative; z-index: 2; display: flex; gap: 10px; max-width: 1240px; margin: 14px auto 0;
  padding: 0 22px; overflow: clip; }
.chip { display: flex; gap: 8px; align-items: center; padding: 7px 13px; border-radius: var(--r-xs);
  font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid var(--line-soft);
  background: var(--card-flat); animation: shake .5s var(--eo); }
.chip.buy  { background: var(--gold-bg); border-color: rgba(255,201,60,.4); color: var(--gold-hot); }
.chip.sell { background: var(--sell-bg); border-color: rgba(232,100,58,.4); color: var(--sell-hot); }
.chip.mint { color: var(--tx1); border-color: var(--line); }
.chip .who { font-family: var(--mono); font-weight: 500; color: var(--tx2); }
@keyframes shake { 0%,100% { transform: translateX(0) } 20% { transform: translateX(-3px) rotate(-.6deg) }
  40% { transform: translateX(3px) rotate(.6deg) } 60% { transform: translateX(-2px) } 80% { transform: translateX(2px) } }

/* ---- nav ---- */
.nav { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 14px;
  padding: 14px 22px; max-width: 1240px; margin: 0 auto; background: linear-gradient(180deg, rgba(13,10,5,.96), rgba(13,10,5,.86));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-soft); }
.logo { display: flex; flex-direction: column; line-height: 1; cursor: pointer; flex: none; }
.logo .l1 { font-size: 19px; font-weight: 900; letter-spacing: -.02em; color: var(--gold);
  text-shadow: 0 0 18px rgba(255,201,60,.28); }
.logo .l2 { font-size: 10.5px; color: var(--tx3); margin-top: 3px; }
.srch { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px;
  border-radius: var(--r-sm); background: var(--well); border: 1px solid var(--line-soft);
  transition: all .2s var(--eo); }
.srch:focus-within { border-color: var(--gold); box-shadow: var(--glow); }
.srch input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font: inherit; font-size: 13.5px; color: var(--tx1); }
.srch input::placeholder { color: var(--tx3); }
.sp { flex: 1; }

/* ---- buttons ---- */
.b { font: inherit; border: 0; cursor: pointer; border-radius: var(--r-sm); font-weight: 800; font-size: 13.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; position: relative;
  transition: transform .12s var(--eo), box-shadow .2s, background .2s, opacity .2s; color: var(--tx1); }
.b:active { transform: scale(.96); }
.b:focus-visible, .tab:focus-visible, .qc:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.b-sm { height: 34px; padding: 0 15px; } .b-md { height: 42px; padding: 0 20px; } .b-lg { height: 52px; width: 100%; font-size: 15px; }
.b-gold { background: linear-gradient(180deg, var(--gold-hot), var(--gold)); color: var(--gold-ink); }
.b-gold:hover { box-shadow: var(--glow-big); }
.b-sell { background: linear-gradient(180deg, var(--sell-hot), var(--sell)); color: #2A0E00; }
.b-sell:hover { box-shadow: var(--glow-sell); }
.b-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--gold); }
.b-ghost:hover { background: var(--gold-bg); box-shadow: var(--glow); }
.b[disabled] { opacity: .4; cursor: not-allowed; box-shadow: none; }

/* ---- king of the hill ---- */
.wrap { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 22px 90px; }
.koth { position: relative; margin-top: 26px; border-radius: 22px; border: 2px solid var(--gold-deep);
  background: var(--card); padding: 20px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px;
  align-items: center; box-shadow: var(--sh); }
.koth::after { content: ""; position: absolute; inset: -2px; border-radius: 22px; pointer-events: none;
  box-shadow: var(--glow-big); animation: aura 3s ease-in-out infinite; }
@keyframes aura { 0%,100% { opacity: .55 } 50% { opacity: 1 } }
.crown { position: absolute; top: -17px; left: 26px; font-size: 26px; filter: drop-shadow(0 0 10px rgba(255,201,60,.4));
  animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-8deg) } 50% { transform: translateY(-4px) rotate(-3deg) } }
.kothtag { position: absolute; top: -12px; left: 64px; font-size: 12px; color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-hot), var(--gold)); padding: 3px 12px; border-radius: 8px;
  box-shadow: var(--glow); }
.ava { width: 84px; height: 84px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-size: 42px; flex: none; border: 1px solid var(--line); }
.ava.sm { width: 52px; height: 52px; font-size: 26px; border-radius: 13px; }
.kmid { min-width: 0; }
.kname { font-size: 21px; font-weight: 900; letter-spacing: -.01em; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tick { font-family: var(--mono); font-weight: 800; color: var(--gold); font-size: .82em; }
.kdesc { font-size: 13px; color: var(--tx2); margin-top: 3px; max-width: 60ch; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.kstats { display: flex; gap: 18px; margin-top: 10px; font-size: 12.5px; color: var(--tx3); flex-wrap: wrap; }
.kstats b { color: var(--tx1); font-family: var(--mono); font-weight: 800; }
.kstats .mc b { color: var(--gold); text-shadow: 0 0 14px rgba(255,201,60,.5); }
.kright { display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-width: 180px; }

/* ---- moon meter ---- */
.meter { position: relative; height: 14px; border-radius: 999px; background: #2A2110; overflow: visible;
  border: 1px solid var(--line-soft); }
.meter .fill { position: absolute; inset: 1px auto 1px 1px; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 60%, var(--gold-hot));
  box-shadow: 0 0 14px rgba(255,201,60,.28); transition: width .6s var(--spring); }
.meter .tip { position: absolute; top: 50%; font-size: 15px; transform: translate(-55%, -54%);
  filter: drop-shadow(0 0 6px rgba(255,201,60,.4)); transition: left .6s var(--spring); }
.mlab { display: flex; justify-content: space-between; font-size: 11px; color: var(--tx3); margin-top: 6px; }
.mlab b { color: var(--gold); font-family: var(--mono); }

/* ---- tabs / toggle ---- */
.toolrow { display: flex; align-items: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line-soft); background: var(--card-flat); color: var(--tx2); font: inherit;
  font-size: 13px; font-weight: 700; padding: 8px 15px; border-radius: var(--r-sm); cursor: pointer;
  transition: all .2s var(--eo); }
.tab:hover { color: var(--tx1); border-color: var(--line); }
.tab.on { background: linear-gradient(180deg, var(--gold-hot), var(--gold)); color: var(--gold-ink);
  border-color: transparent; box-shadow: var(--glow); }
.anim { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--tx3);
  border: 1px solid var(--line-soft); background: var(--card-flat); padding: 8px 13px; border-radius: var(--r-sm); cursor: pointer; }
.anim .sw2 { width: 30px; height: 16px; border-radius: 999px; background: #2A2110; position: relative; transition: background .2s; }
.anim .sw2::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--tx3); transition: all .2s var(--eo); }
.anim.on .sw2 { background: var(--gold); box-shadow: var(--glow); }
.anim.on .sw2::after { left: 16px; background: var(--gold-ink); }
.anim.on { color: var(--gold); }

/* ---- token grid ---- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.tcard { position: relative; border-radius: var(--r); border: 1px solid var(--line-soft); background: var(--card);
  padding: 16px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; box-shadow: var(--sh);
  transition: transform .2s var(--eo), border-color .2s, box-shadow .25s; }
.tcard:hover { transform: translateY(-3px); border-color: var(--line); box-shadow: var(--sh-lg); }
.tcard.flash { animation: cardflash 1s var(--eo); }
@keyframes cardflash { 0% { border-color: var(--gold); box-shadow: var(--glow-big); transform: scale(1.015); }
  100% { border-color: var(--line-soft); box-shadow: var(--sh); transform: scale(1); } }
.trow1 { display: flex; gap: 12px; align-items: center; min-width: 0; }
.tmeta { min-width: 0; flex: 1; }
.tname { font-size: 15.5px; font-weight: 800; display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.tname span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tby { font-size: 11.5px; color: var(--tx3); margin-top: 2px; }
.tby b { color: var(--tx2); font-family: var(--mono); font-weight: 600; }
.tdesc { font-size: 12.5px; color: var(--tx2); line-height: 17px; height: 34px; overflow: hidden; }
.tfoot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--tx3); }
.tfoot .mc { font-family: var(--mono); font-weight: 800; color: var(--gold); }
.badge { font-size: 10.5px; padding: 3px 9px; border-radius: 7px; font-weight: 700; }
.badge.grad { background: var(--gold-bg); color: var(--gold); border: 1px solid rgba(255,201,60,.35); }
.badge.soon { background: var(--sell-bg); color: var(--sell-hot); border: 1px solid rgba(232,100,58,.3); }

/* ---- detail ---- */
.dhead { display: flex; gap: 16px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.dmc { margin-left: auto; text-align: right; }
.dmc .v { font-family: var(--mono); font-size: 34px; font-weight: 900; color: var(--gold);
  text-shadow: 0 0 22px rgba(255,201,60,.25); letter-spacing: -.02em; }
.dgrid { display: grid; grid-template-columns: 1.65fr .95fr; gap: 16px; margin-top: 18px; align-items: start; }
.panel { border-radius: var(--r); border: 1px solid var(--line-soft); background: var(--card-flat); }
.chartbox { padding: 14px 12px 8px; }
.axlab { font-family: var(--mono); font-size: 10px; fill: var(--tx3); }
.subtabs { display: flex; gap: 4px; padding: 10px 12px 0; }
.stab { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--tx3);
  padding: 7px 12px; border-radius: var(--r-xs); cursor: pointer; }
.stab.on { color: var(--gold); background: var(--gold-bg); }
.thread { padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.cm { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--well);
  border: 1px solid var(--line-soft); font-size: 13px; line-height: 18px; }
.cm .h { font-family: var(--mono); font-size: 11px; color: var(--gold-deep); flex: none; padding-top: 1px; }
.cmin { display: flex; gap: 8px; padding: 0 12px 12px; }
.cmin input { flex: 1; height: 38px; border-radius: var(--r-xs); border: 1px solid var(--line-soft);
  background: var(--well); color: var(--tx1); padding: 0 12px; font: inherit; font-size: 13px; outline: 0; }
.cmin input:focus { border-color: var(--gold); box-shadow: var(--glow); }
.ttable { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
.ttable th { text-align: left; font-size: 10px; letter-spacing: .08em; color: var(--tx4); font-weight: 700;
  padding: 8px 12px; border-bottom: 1px solid var(--line-soft); text-transform: uppercase; }
.ttable td { padding: 7px 12px; border-bottom: 1px solid rgba(246,235,201,.04); color: var(--tx2); }
.ttable tr.new td { animation: rowin .5s var(--eo); }
@keyframes rowin { from { background: var(--gold-bg); } }

/* ---- trade card ---- */
.trade { padding: 16px; display: flex; flex-direction: column; gap: 13px; }
.bs { display: flex; gap: 8px; }
.bsb { flex: 1; height: 42px; border-radius: var(--r-sm); border: 1px solid var(--line-soft); background: none;
  font: inherit; font-weight: 800; font-size: 14px; color: var(--tx3); cursor: pointer; transition: all .2s var(--eo); }
.bsb.buy.on { background: linear-gradient(180deg, var(--gold-hot), var(--gold)); color: var(--gold-ink); border-color: transparent; box-shadow: var(--glow); }
.bsb.sell.on { background: linear-gradient(180deg, var(--sell-hot), var(--sell)); color: #2A0E00; border-color: transparent; box-shadow: var(--glow-sell); }
.amt { background: var(--well); border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 11px 14px;
  display: flex; align-items: baseline; gap: 8px; }
.amt input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-family: var(--mono);
  font-size: 24px; font-weight: 800; color: var(--tx1); caret-color: var(--gold); }
.qcs { display: flex; gap: 7px; }
.qc { flex: 1; border: 1px solid var(--line-soft); background: var(--card-flat); color: var(--tx2); font: inherit;
  font-size: 12px; font-weight: 700; padding: 7px 0; border-radius: var(--r-xs); cursor: pointer; transition: all .15s; }
.qc:hover { color: var(--gold); border-color: var(--line); }
.srow2 { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--tx2); line-height: 20px; }
.srow2 b { font-family: var(--mono); color: var(--tx1); }
.holders { padding: 14px 16px; }
.hrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 5px 0; font-size: 12px; }
.hrow .hb { position: relative; height: 6px; border-radius: 4px; background: #2A2110; grid-column: 1 / -1; overflow: clip; }
.hrow .hb i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); border-radius: 4px; }
.hrow .ha { font-family: var(--mono); color: var(--tx2); }
.hrow .hp { font-family: var(--mono); color: var(--gold); font-weight: 700; }

/* ---- modal / toasts / confetti ---- */
.scrim { position: fixed; inset: 0; background: rgba(8,6,2,.7); z-index: 1000; display: flex; align-items: center;
  justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.scrim.show { opacity: 1; pointer-events: auto; }
.modal { width: 100%; max-width: 460px; border-radius: 22px; border: 1.5px solid var(--line);
  background: var(--card); box-shadow: var(--sh-lg), var(--glow); padding: 22px;
  transform: scale(.96) translateY(8px); opacity: 0; transition: all .3s var(--eo); }
.scrim.show .modal { transform: none; opacity: 1; }
.fld { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.fld label { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--tx3); }
.fld input, .fld textarea { background: var(--well); border: 1px solid var(--line-soft); border-radius: var(--r-xs);
  color: var(--tx1); padding: 10px 12px; font: inherit; font-size: 13.5px; outline: 0; resize: none; }
.fld input:focus, .fld textarea:focus { border-color: var(--gold); box-shadow: var(--glow); }
.emos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.emo { font-size: 22px; padding: 8px 0; border-radius: var(--r-xs); border: 1px solid var(--line-soft);
  background: var(--card-flat); cursor: pointer; transition: all .15s; text-align: center; }
.emo:hover { border-color: var(--line); transform: scale(1.06); }
.emo.on { border-color: var(--gold); background: var(--gold-bg); box-shadow: var(--glow); }
.emos.dim { opacity: .4; }
.drop { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1.5px dashed var(--line); background: var(--well); cursor: pointer; transition: all .2s var(--eo); }
.drop:hover { border-color: var(--gold); }
.drop.over { border-color: var(--gold); border-style: solid; background: var(--gold-bg); box-shadow: var(--glow); }
.drop.has { border-style: solid; }
.droppv { width: 56px; height: 56px; border-radius: var(--r-xs); object-fit: cover; display: block;
  border: 1px solid var(--line); flex: none; }
.avaimg { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 1100; display: flex;
  flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { border-radius: var(--r-sm); padding: 11px 18px; font-size: 13px; font-weight: 700; display: flex; gap: 9px;
  align-items: center; background: var(--card-flat); border: 1px solid var(--line); box-shadow: var(--sh), var(--glow);
  animation: tin .3s var(--spring); color: var(--tx1); }
@keyframes tin { from { opacity: 0; transform: translateY(-10px) scale(.95); } }
.confetti { position: fixed; z-index: 1200; font-size: 22px; pointer-events: none; animation: fall 1.3s ease-in forwards; }
@keyframes fall { 0% { transform: translateY(0) rotate(0); opacity: 1 } 100% { transform: translateY(46vh) rotate(280deg); opacity: 0 } }
.empty { text-align: center; padding: 60px 20px; color: var(--tx3); border: 1px dashed var(--line-soft);
  border-radius: var(--r); margin-top: 16px; }

/* ---- profile ---- */
.mehead { display: flex; gap: 16px; align-items: center; margin-top: 26px; flex-wrap: wrap; }
.meava { width: 76px; height: 76px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
  font-size: 38px; background: linear-gradient(135deg, #3A2C0C, #241B33); border: 1.5px solid var(--line); box-shadow: var(--glow); }
.mehandle { font-size: 22px; font-weight: 900; }
.meaddr { display: flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--tx2); margin-top: 4px; }
.copy { background: var(--card-flat); border: 1px solid var(--line-soft); color: var(--tx2); font: inherit;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 7px; cursor: pointer; transition: all .15s; }
.copy:hover { color: var(--gold); border-color: var(--line); }
.ptiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.ptile { border-radius: var(--r); border: 1px solid var(--line-soft); background: var(--card); padding: 14px 16px; box-shadow: var(--sh); }
.ptile .k { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tx3); }
.ptile .v { font-family: var(--mono); font-size: 22px; font-weight: 900; margin-top: 5px; letter-spacing: -.02em; }
.ptile .s2 { font-size: 11px; color: var(--tx3); margin-top: 2px; font-family: var(--mono); }
.ptile.gold .v { color: var(--gold); text-shadow: 0 0 16px rgba(255,201,60,.25); }
.merow { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid rgba(246,235,201,.05); }
.merow:last-child { border-bottom: 0; }
.merow .grow { flex: 1; min-width: 0; }
.mr-pnl { font-family: var(--mono); font-weight: 800; font-size: 13px; white-space: nowrap; }
@media (max-width: 900px) { .ptiles { grid-template-columns: 1fr 1fr; } }

@media (max-width: 1020px) { .grid { grid-template-columns: 1fr 1fr; } .dgrid { grid-template-columns: 1fr; }
  .koth { grid-template-columns: auto 1fr; } .kright { grid-column: 1 / -1; flex-direction: row; } }
@media (max-width: 640px) {
  .wrap { padding: 0 14px 70px; }
  .nav { flex-wrap: wrap; row-gap: 10px; padding: 10px 14px; }
  .srch { order: 9; flex-basis: 100%; max-width: none; }
  .logo .l2 { display: none; }
  .nav .b-md { height: 38px; padding: 0 14px; }
  .livebar { padding: 0 14px; } .livebar .chip:nth-child(n+3) { display: none; }
  .grid { grid-template-columns: 1fr; }
  .koth { padding: 16px 14px; gap: 12px; }
  .ava { width: 64px; height: 64px; font-size: 32px; border-radius: 15px; }
  .kname { font-size: 18px; } .kdesc { white-space: normal; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
  .tabs::-webkit-scrollbar { display: none; }
  .toolrow { flex-wrap: nowrap; }
  .dhead .dmc { margin-left: 0; text-align: left; flex-basis: 100%; }
  .dmc .v { font-size: 28px; }
  .ttable th, .ttable td { padding: 7px 8px; font-size: 11px; }
  .qcs { flex-wrap: wrap; } .qc { min-height: 34px; }
  .merow { flex-wrap: wrap; row-gap: 8px; }
  .meava { width: 60px; height: 60px; font-size: 30px; }
  .modal { padding: 16px; border-radius: 18px; }
  .toasts { width: calc(100vw - 24px); } .toast { max-width: 100%; }
  .srch input, .cmin input, .fld input, .fld textarea { font-size: 16px; }
}
@media (max-width: 380px) { .emos { grid-template-columns: repeat(4, 1fr); } .ptiles { gap: 10px; } .ptile .v { font-size: 18px; } }
@media (prefers-reduced-motion: reduce) {
  .sw .orb, .sw .crown, .sw .koth::after { animation: none; }
  .sw *, .sw *::before, .sw *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
