/* ============================================================
   ENGLISH QUEST — GAME PLATFORM UI (v3)
   Loaded after app.css / quest3d.css. Turns the dashboard into
   a game client: rail navigation, hero key art, game shelf.
   ============================================================ */
@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-900.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "QuestDisplay";
  src: url("/fonts/baloo2-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "QuestRound";
  src: url("/fonts/dohyeon.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "QuestBody";
  src: url("/fonts/pretendard.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
}

:root {
  --ink: #05070d;
  --panel: #0d1322;
  --panel-2: #121a2e;
  --panel-3: #18223c;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .18);
  --txt: #f2f6ff;
  --muted: #93a1c8;
  --lime: #c9ff4a;
  --lime-2: #8ef000;
  --cyan: #2ee6ff;
  --pink: #ff4f87;
  --gold: #ffc83d;
  --purple: #9b7bff;
  --danger: #ff5470;
  --font-display: "QuestDisplay", "QuestRound", "Malgun Gothic", sans-serif;
  --font-kr: "QuestRound", "QuestDisplay", "Malgun Gothic", sans-serif;
  --font-round: "QuestRound", "Malgun Gothic", sans-serif;
  --font-body: "Nunito", "QuestBody", "Pretendard", "Malgun Gothic", system-ui, sans-serif;
  --radius-lg: 26px;
  --radius-md: 18px;
  --rail: 88px;
  --top: 68px;
}
html { background: var(--ink); }
body {
  font-family: var(--font-body);
  color: var(--txt);
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(46, 230, 255, .12), transparent 60%),
    radial-gradient(900px 600px at 5% 0%, rgba(201, 255, 74, .07), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(155, 123, 255, .12), transparent 60%),
    var(--ink);
  letter-spacing: -0.01em;
}
body.platform { padding-left: var(--rail); }
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 3px 3px; mix-blend-mode: overlay;
}
h1, h2, h3, h4 { font-family: var(--font-round); font-weight: 400; letter-spacing: -0.02em; }
.big, .huge, .xp-text { font-family: var(--font-display); }

/* ---------- rail ---------- */
.rail {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail); z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px;
  background: linear-gradient(180deg, #0b101d, #080c15 60%, #060911);
  border-right: 1px solid var(--line);
}
.rail-logo {
  width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; flex: none;
  font-family: var(--font-display); font-size: 27px; color: #071007;
  background: linear-gradient(145deg, var(--lime), #6bd400);
  box-shadow: 0 0 26px rgba(201, 255, 74, .45), inset 0 2px 0 rgba(255, 255, 255, .55), inset 0 -6px 0 rgba(0, 0, 0, .2);
  margin-bottom: 18px;
}
.rail-nav { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.rail-nav button, .rail-bottom button {
  width: 100%; border-radius: 14px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #8895ba; font-size: 10px; font-weight: 800; font-family: var(--font-body); letter-spacing: -0.02em;
  transition: .16s ease;
}
.rail-nav button .ic { font-size: 23px; line-height: 1; filter: saturate(.8); }
.rail-nav button:hover, .rail-bottom button:hover { background: rgba(255, 255, 255, .06); color: #dbe6ff; }
.rail-nav button.on {
  color: #0a1200; background: linear-gradient(180deg, var(--lime), #a7e333);
  box-shadow: 0 6px 18px rgba(201, 255, 74, .25), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.rail-nav button.on .ic { filter: none; }
.rail-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 4px; width: 100%; }
.rail-bottom button { padding: 8px 4px; font-size: 9.5px; }
.rail-bottom .ic { font-size: 19px; }
.rail .badge-n { position: absolute; transform: translate(14px, -10px); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 70; height: var(--top); display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(16px, 2.4vw, 30px);
  background: linear-gradient(180deg, rgba(6, 9, 16, .96), rgba(6, 9, 16, .78));
  backdrop-filter: blur(18px); border-bottom: 1px solid var(--line);
}
.topbar .tb-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 17px; letter-spacing: .01em; flex: none; padding-right: 16px; border-right: 1px solid var(--line); margin-right: 2px; }
.topbar .tb-brand small { font-family: var(--font-body); font-size: 9px; letter-spacing: .18em; color: var(--muted); display: block; font-weight: 800; }
.topbar .tb-brand .mark { width: 34px; height: 34px; border-radius: 11px; display: none; place-items: center; background: linear-gradient(145deg, var(--lime), #6bd400); color: #071007; font-size: 19px; }
.tb-crumb { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding-left: 4px; }
.tb-crumb .k { font-size: 9.5px; letter-spacing: .2em; color: var(--lime); font-weight: 900; }
.tb-crumb h1 { font-size: 19px; font-family: var(--font-round); letter-spacing: -0.02em; white-space: nowrap; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.wallet {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 11px;
  background: rgba(255, 255, 255, .055); border: 1px solid var(--line); font-weight: 900; font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.wallet .plus { color: var(--lime); font-size: 16px; font-weight: 400; margin-left: 2px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 15px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--txt); font-weight: 900;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.profile-chip {
  display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 12px 0 6px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
  border: 1px solid var(--line-2);
}
.profile-chip .who { text-align: left; line-height: 1.1; }
.profile-chip .who b { display: block; font-size: 12.5px; font-weight: 900; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-chip .who small { display: block; font-size: 9.5px; color: var(--muted); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-chip .lv {
  font-family: var(--font-display); font-size: 13px; min-width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; background: var(--lime); color: #0a1200; margin-left: 4px;
}
.profile-chip .avatar { width: 32px; height: 32px; border-radius: 9px; font-size: 19px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px;
  font-size: 11px; font-weight: 900; color: #ffd8e3; background: rgba(255, 79, 135, .14); border: 1px solid rgba(255, 79, 135, .45);
}
.live-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px var(--pink); animation: ping 1.6s infinite; }
.topbar .xp-mini { display: none; }

/* ---------- main ---------- */
main.wrap {
  width: min(1420px, 100%); margin: 0 auto; padding: 20px clamp(16px, 2.4vw, 30px) 90px;
  position: relative; z-index: 1;
}
.section-head h2, .sec-head h2 { font-family: var(--font-round); font-size: 24px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 0 2px 12px; }
.sec-head .sec-kicker { display: block; font-family: var(--font-display); font-size: 10px; letter-spacing: .22em; color: var(--lime); margin-bottom: 2px; }
.sec-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.section { margin-top: 26px; }

/* cards become game panels */
.card {
  background: linear-gradient(180deg, rgba(24, 33, 56, .92), rgba(12, 18, 32, .96));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.card::before { display: none; }
.card.hero { background: none; border: 0; padding: 0; }

/* ---------- hero key art ---------- */
.hero-banner {
  position: relative; min-height: 390px; border-radius: 30px; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr) 46%;
  background:
    radial-gradient(900px 420px at 82% 38%, rgba(46, 230, 255, .18), transparent 62%),
    radial-gradient(700px 420px at 12% 110%, rgba(255, 79, 135, .14), transparent 60%),
    linear-gradient(120deg, #0c1322 0%, #0a101d 46%, #0c1a2b 100%);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.hero-banner::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: .5;
  background-image: linear-gradient(rgba(46, 230, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 230, 255, .07) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse at 70% 60%, #000, transparent 72%);
}
.hero-banner::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 110px; z-index: 0;
  background: linear-gradient(transparent, rgba(5, 7, 13, .85));
}
.hero-art { position: absolute; right: -2%; top: -4%; width: 64%; height: 108%; z-index: 0; opacity: .95; pointer-events: none; }
.hero-art img { width: 100%; height: 100%; object-fit: contain; object-position: right center; }
.hero-copy { position: relative; z-index: 3; padding: 34px 26px 30px clamp(24px, 3.4vw, 46px); display: flex; flex-direction: column; justify-content: center; }
.hero-eyebrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.season-tag {
  font-family: var(--font-display); font-size: 10px; letter-spacing: .18em; padding: 5px 10px 4px; border-radius: 7px;
  color: #0a1200; background: linear-gradient(180deg, var(--lime), #a6e22e); box-shadow: 0 0 18px rgba(201, 255, 74, .35);
}
.hero-eyebrow .date { font-size: 11px; color: #b9c6e8; font-weight: 800; letter-spacing: .02em; }
.hero-eyebrow .live-2 { font-size: 10px; font-weight: 900; color: #ffd8e3; padding: 3px 8px; border-radius: 999px; background: rgba(255, 79, 135, .18); border: 1px solid rgba(255, 79, 135, .5); }
.hero-h { font-family: var(--font-display); font-size: clamp(44px, 5.6vw, 74px); line-height: .96; letter-spacing: -0.03em; margin: 2px 0 6px; text-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.hero-h span { color: var(--lime); text-shadow: 0 0 34px rgba(201, 255, 74, .35); }
.hero-en { font-family: var(--font-display); font-size: 11px; letter-spacing: .34em; color: #7f8db4; margin-bottom: 12px; }
.hero-sub { color: #c3cfeb; font-size: 13.5px; max-width: 420px; line-height: 1.6; }
.hero-sub b { color: #fff; }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.play-btn {
  height: 52px; padding: 0 26px; border-radius: 14px; font-family: var(--font-round); font-size: 17px;
  background: linear-gradient(180deg, #d7ff70, var(--lime) 55%, #9fdf1f); color: #0a1200;
  box-shadow: 0 6px 0 #6d9c12, 0 18px 34px rgba(201, 255, 74, .22), inset 0 2px 0 rgba(255, 255, 255, .6);
  display: inline-flex; align-items: center; gap: 10px; border: 0;
}
.play-btn .tri { width: 26px; height: 26px; border-radius: 50%; background: #0b1400; color: var(--lime); display: grid; place-items: center; font-size: 10px; padding-left: 2px; }
.play-btn:hover { filter: brightness(1.04); }
.play-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 #6d9c12; }
.hero-actions .btn.ghost { height: 52px; border-radius: 14px; font-size: 13.5px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); }
.hero-progress { margin-top: 24px; max-width: 380px; }
.hero-progress .hp-top { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 900; color: #a9b7d8; letter-spacing: .02em; margin-bottom: 7px; }
.hero-progress .hp-top b { color: var(--lime); }
.hero-segs { display: flex; gap: 5px; }
.hero-segs i { height: 7px; flex: 1; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.hero-segs i.on { background: linear-gradient(90deg, var(--lime), #7ee000); box-shadow: 0 0 12px rgba(201, 255, 74, .5); }
.hero-char { position: relative; z-index: 2; display: grid; place-items: center; }
.char-glow { position: absolute; width: 330px; height: 330px; border-radius: 50%; background: radial-gradient(circle, rgba(46, 230, 255, .32), rgba(155, 123, 255, .12) 45%, transparent 68%); filter: blur(8px); animation: breathe 5s ease-in-out infinite; }
.char-ring { position: absolute; width: 300px; height: 84px; border-radius: 50%; border: 2px solid rgba(46, 230, 255, .35); transform: rotateX(68deg) translateY(110px); box-shadow: 0 0 40px rgba(46, 230, 255, .2); }
.char-avatar {
  position: relative; z-index: 3; font-size: clamp(120px, 15vw, 176px); line-height: 1;
  filter: drop-shadow(0 34px 34px rgba(0, 0, 0, .6)) drop-shadow(0 0 30px rgba(46, 230, 255, .35));
  animation: bob 3.6s ease-in-out infinite;
}
.char-plat {
  position: absolute; bottom: 62px; width: 300px; height: 84px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 45%, rgba(46, 230, 255, .38), rgba(46, 230, 255, .06) 55%, transparent 72%);
  transform: rotateX(66deg); filter: blur(2px);
}
.char-badge {
  position: absolute; right: clamp(14px, 5vw, 54px); bottom: 26px; z-index: 4; text-align: right;
  padding: 10px 14px; border-radius: 14px; background: rgba(7, 11, 21, .72); border: 1px solid var(--line-2); backdrop-filter: blur(10px);
}
.char-badge b { display: block; font-size: 14px; color: #ffd7a1; }
.char-badge span { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }

/* ---------- game shelf ---------- */
.shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.game-card {
  position: relative; text-align: left; border-radius: 20px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(180deg, #141d32, #0b111f); padding: 0; color: var(--txt);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .35); transition: transform .18s ease, border-color .18s ease;
  display: flex; flex-direction: column;
}
.game-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c1, var(--cyan)) 55%, transparent); }
.game-cover {
  position: relative; height: 152px; overflow: hidden; display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 20% 0%, color-mix(in srgb, var(--c1) 55%, transparent), transparent 60%),
    radial-gradient(120% 120% at 100% 100%, color-mix(in srgb, var(--c2) 45%, transparent), transparent 65%),
    linear-gradient(160deg, #16203a, #090e1a);
}
.game-cover::before {
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .13) 0 2px, transparent 2px 22px);
  mask-image: linear-gradient(120deg, transparent 20%, #000 70%);
}
.game-cover::after {
  content: ""; position: absolute; left: -30%; top: -40%; width: 90%; height: 180%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .2), transparent 65%); transform: rotate(-18deg);
}
.game-cover .ge { position: relative; z-index: 2; font-size: 72px; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .5)); transition: transform .25s ease; }
.game-card:hover .ge { transform: scale(1.1) rotate(-4deg); }
.game-cover .gname-en {
  position: absolute; left: 12px; bottom: 9px; z-index: 3; font-family: var(--font-display); font-size: 10px;
  letter-spacing: .16em; color: rgba(255, 255, 255, .6);
}
.game-cover .tag { position: absolute; top: 10px; left: 10px; z-index: 3; font-size: 9px; font-weight: 900; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .2); }
.game-info { padding: 11px 13px 13px; display: flex; align-items: center; gap: 8px; }
.game-info .gi { flex: 1; min-width: 0; }
.game-info b { display: block; font-size: 13px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-info span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.game-play { width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: #0a1200; display: grid; place-items: center; font-size: 10px; flex: none; box-shadow: 0 0 16px rgba(201, 255, 74, .4); padding-left: 2px; }
.shelf-more { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }

/* ---------- quests ---------- */
.quest-strip { gap: 12px; }
.quest {
  background: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .02));
  border: 1px solid var(--line); border-radius: 18px; padding: 18px 15px 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.quest:hover { border-color: rgba(201, 255, 74, .45); }
.quest .num { background: var(--lime); color: #0a1200; box-shadow: 0 0 14px rgba(201, 255, 74, .4); }
.quest .qi { font-size: 32px; }
.quest .ql { font-family: var(--font-round); font-size: 17px; font-weight: 400; }
.quest .qs { font-size: 11px; color: var(--muted); }
.quest .qbtn { color: var(--lime); font-family: var(--font-round); font-size: 12px; letter-spacing: .02em; }
.quest.done { background: linear-gradient(180deg, rgba(201, 255, 74, .1), rgba(201, 255, 74, .02)); border-color: rgba(201, 255, 74, .3); }
.quest.done .qcheck { background: var(--lime); color: #0a1200; box-shadow: 0 0 16px rgba(201, 255, 74, .6); }

/* ---------- buttons / pills ---------- */
.btn { border-radius: 13px; font-family: var(--font-body); font-weight: 900; }
.btn.green { --b: var(--lime); --btxt: #0a1200; }
.btn.big { border-radius: 16px; }
.pill { border-radius: 8px; font-size: 11px; background: rgba(255, 255, 255, .055); }
.pill.green { background: rgba(201, 255, 74, .1); border-color: rgba(201, 255, 74, .35); color: var(--lime); }
.pill.cyan { color: var(--cyan); }
.pill.yellow { color: var(--gold); }

/* ---------- right column / world ---------- */
.map-side { top: calc(var(--top) + 14px); }
.map-layout { grid-template-columns: 1.15fr .85fr; gap: 18px; }
.map-card { background: linear-gradient(180deg, #0f1728, #0a0f1c); }
.map-card .card-title { font-family: var(--font-round); font-size: 19px; }
.map-node .node-bubble { border-radius: 22px; transform: rotate(0); }
.node-label b { font-family: var(--font-round); font-weight: 400; font-size: 14px; }
.map-spine { background: repeating-linear-gradient(180deg, rgba(201, 255, 74, .3) 0 7px, transparent 7px 16px); filter: drop-shadow(0 0 6px rgba(201, 255, 74, .25)); }
.map-node.current .node-bubble { box-shadow: 0 0 0 4px rgba(201, 255, 74, .18), 0 18px 30px rgba(0, 0, 0, .5), 0 0 40px rgba(201, 255, 74, .35); }

/* misc panel headers */
.card-title { font-family: var(--font-round); font-weight: 400; font-size: 17px; }
.card-title .ico { font-size: 18px; }
.mission b { font-size: 12.5px; }
.mission .mi { font-size: 18px; }
.sday { border-radius: 9px; }
.hud { background: linear-gradient(180deg, rgba(6,9,16,.98), rgba(6,9,16,.86)); border-bottom: 1px solid var(--line); }

/* bottom nav on tablet/mobile */
@media (max-width: 1180px) {
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-banner { grid-template-columns: minmax(0, 1fr) 42%; }
}
@media (max-width: 980px) {
  body.platform { padding-left: 0; padding-bottom: 76px; }
  .rail {
    top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 66px; flex-direction: row; padding: 6px 8px;
    border-right: 0; border-top: 1px solid var(--line); justify-content: space-around;
    background: rgba(7, 10, 18, .96); backdrop-filter: blur(18px);
  }
  .rail-logo { display: none; }
  .rail-nav { flex-direction: row; gap: 2px; }
  .rail-nav button { padding: 6px 8px; font-size: 9.5px; }
  .rail-nav button .ic { font-size: 20px; }
  .rail-bottom { display: none; }
  .topbar .tb-brand .mark { display: grid; }
  .topbar { height: 60px; gap: 10px; }
  .topbar .tb-brand .txt { display: none; }
  .tb-crumb .k { display: none; }
  .tb-crumb h1 { font-size: 16px; }
  .profile-chip .who { display: none; }
  .profile-chip { padding: 0 8px; height: 38px; }
  .hero-banner { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { width: 100%; right: -20%; top: 0; opacity: .45; }
  .hero-char { position: absolute; right: 4%; top: 24px; width: 38%; min-height: 200px; }
  .char-avatar { font-size: 96px; }
  .char-plat { width: 150px; height: 44px; bottom: 34px; }
  .char-ring { width: 160px; height: 46px; transform: rotateX(68deg) translateY(76px); }
  .char-glow { width: 190px; height: 190px; }
  .char-badge { right: 8px; bottom: 8px; padding: 6px 9px; }
  .hero-copy { padding: 22px 18px 24px; }
  .hero-h { font-size: 44px; }
  .hero-sub { max-width: 62%; font-size: 12.5px; }
  .hero-progress { max-width: 62%; }
  .sec-head h2 { font-size: 21px; }
  .map-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .game-cover { height: 118px; }
  .game-cover .ge { font-size: 52px; }
  .game-info b { font-size: 12px; }
  .hero-h { font-size: 36px; }
  .hero-actions .play-btn { flex: 1; justify-content: center; }
  .hero-actions .btn.ghost { display: none; }
  .hero-sub, .hero-progress { max-width: 66%; }
  .topbar { padding: 0 12px; }
  .wallet { padding: 0 8px; font-size: 12px; height: 32px; }
  .wallet.c { display: none; }
  .tb-right { gap: 5px; }
  .icon-btn { width: 32px; height: 32px; }
  .profile-chip .lv { display: none; }
  main.wrap { padding: 14px 12px 86px; }
  .quest-strip { gap: 9px; }
  .quest { padding: 15px 12px 11px; }
  .quest .qi { font-size: 27px; }
  .quest .ql { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .char-avatar, .char-glow { animation: none !important; }
}

/* ---------- platform extras ---------- */
.xp-strip {
  position: sticky; top: var(--top); z-index: 66; display: flex; align-items: center; gap: 10px;
  padding: 0 clamp(16px, 2.4vw, 30px); height: 26px;
  background: rgba(6, 9, 16, .92); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.xp-strip span { font-size: 9.5px; font-weight: 800; color: var(--muted); white-space: nowrap; letter-spacing: .02em; }
.xp-strip .xpbar { flex: 1; height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.xp-strip .xpbar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--lime), #6fe000); box-shadow: 0 0 12px rgba(201,255,74,.5); transition: width .6s cubic-bezier(.2,.9,.2,1); }
.rail-nav .ic { display: grid; place-items: center; height: 22px; }
.rail-nav .ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-greet { font-family: var(--font-round); font-size: 15px; color: #d7e2ff; margin-bottom: 3px; }
.hero-greet b { color: var(--lime); }
.hero-copy .cta-sub { min-height: 16px; }
.lobby-stats { margin-top: 16px; max-width: 440px; }
.lobby-pills { margin-top: 12px; }
.lobby-stat { background: rgba(255,255,255,.045); border-color: var(--line); }
.lobby-stat .v { font-family: var(--font-display); color: #fff; }
.week-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.week-stats > div { padding: 11px 6px; border-radius: 13px; background: rgba(255,255,255,.04); border: 1px solid var(--line); text-align: center; }
.week-stats b { display: block; font-family: var(--font-display); font-size: 18px; color: var(--lime); line-height: 1.1; }
.week-stats span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 4px; font-weight: 700; }
.wk-goal { margin-top: 13px; }
@media (max-width: 680px) {
  .hero-greet { font-size: 13px; }
  .hero-banner { border-radius: 22px; }
  .week-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-eyebrow .live-2 { display: none; }
}


/* ---------- mobile lobby fixes ---------- */
@media (max-width: 680px) {
  .live-pill, #helpBtn, #soundBtn, #logoutBtn { display: none !important; }
  .topbar { gap: 8px; }
  .topbar .tb-brand { padding-right: 8px; border-right: 0; gap: 7px; }
  .tb-crumb h1 { font-size: 15px; }
  .tb-right { gap: 6px; }
  .wallet { padding: 0 7px; }
  .profile-chip { padding: 0 6px; height: 36px; gap: 5px; }
  .profile-chip .avatar { width: 28px; height: 28px; font-size: 17px; }
  .hero-copy { padding: 18px 14px 20px; }
  .hero-h { font-size: 34px; line-height: 1; max-width: 76%; }
  .hero-greet { font-size: 12.5px; max-width: 76%; }
  .hero-en { font-size: 8.5px; letter-spacing: .2em; max-width: 76%; }
  .hero-sub { font-size: 11.5px; max-width: 72%; line-height: 1.5; }
  .hero-actions { margin-top: 14px; }
  .play-btn { height: 46px; font-size: 15px; }
  .hero-progress { max-width: 72%; margin-top: 18px; }
  .hero-char { width: 30%; top: 12px; right: 2%; min-height: 150px; }
  .char-avatar { font-size: 62px; }
  .char-badge { display: none; }
  .char-plat { width: 104px; height: 32px; bottom: 10px; }
  .char-ring, .char-glow { display: none; }
  .lobby-stats { grid-template-columns: repeat(3, 1fr); max-width: 100%; margin-top: 12px; }
  .lobby-stat { padding: 8px 8px; }
  .lobby-stat .k { font-size: 9px; }
  .lobby-stat .v { font-size: 15px; }
  .lobby-pills { margin-top: 10px; }
  .lobby-pills .pill { font-size: 9.5px; padding: 4px 8px; }
  .hero-eyebrow { margin-bottom: 6px; }
  .hero-banner::before { background-size: 38px 38px; }
}

/* chat FAB placement */
.chat-fab { right: 16px; bottom: 20px; width: 50px; height: 50px; font-size: 23px; }
@media (max-width: 980px) {
  .chat-fab { right: 12px; bottom: 84px; width: 46px; height: 46px; font-size: 21px; }
}
