/* murlocs.com homepage: a practice stream. The player shows the real overlay over a stand-in game;
   around it sit the viewer's tools (support bar, chat, quests, bag) dressed in the game's own UI:
   gold dialog frames, tooltip borders, action buttons, red panel buttons, Friz and Morpheus.
   Layout: two columns ≥1100px (stream | chat), one column below. */

@font-face { font-family: 'Friz'; src: url('/assets/fonts/FRIZQT__.TTF') format('truetype'); font-display: swap; }
@font-face { font-family: 'Morpheus'; src: url('/assets/fonts/MORPHEUS.TTF') format('truetype'); font-display: swap; }

[hidden] { display: none !important; }
body.play {
  --font-display: 'Morpheus', 'Pirata One', Georgia, serif;
  --font-body: 'Friz', 'Alegreya Sans', Georgia, serif;
  --wow-gold: #ffd100;
  --wow-text: #f0e6d2;
  font-family: var(--font-body);
  font-size: .98rem;
  background: #050403 url('/assets/textures/marble.png') 0 0 / 320px;
  background-blend-mode: multiply;
}
body.play::before { content: ''; position: fixed; inset: 0; z-index: -1; background: radial-gradient(1100px 620px at 35% -10%, rgba(40, 70, 40, .35), transparent 60%), rgba(4, 6, 8, .78); }

/* ── game frames ───────────────────────────────────────────── */
/* gold dialog frame (the overlay's webcam window uses the same texture) */
.wow-frame, .support, .card, .bag-panel, dialog.codex, .lesson {
  border: 14px solid transparent; border-image: url('/assets/textures/nine_gold.png') 32 / 14px stretch;
  background: linear-gradient(rgba(10, 9, 7, .62), rgba(6, 6, 5, .82)), url('/assets/textures/marble.png') 0 0 / 256px;
  background-clip: padding-box; border-radius: 0;
}
/* silver tooltip frame */
.chatcol, body.play .item-tip, .poster p {
  border: 8px solid transparent; border-image: url('/assets/textures/nine_tooltip.png') 16 / 8px stretch;
  background: rgba(2, 4, 8, .9); background-clip: padding-box; border-radius: 0;
}
body.play .item-tip { box-shadow: 0 10px 26px rgba(0, 0, 0, .6); font-family: var(--font-body); }
body.play .item-name { font-family: var(--font-body); font-weight: 400; }
body.play .item-stats li, body.play .item-stats .stat-val { color: #fff; font-weight: 400; }
body.play .item-flavor { color: var(--wow-gold); }

/* red panel buttons */
body.play .btn-primary {
  min-height: 40px; padding: 0 22px; border: 7px solid transparent; border-radius: 0;
  border-image: url('/assets/textures/panel_button_up_crop.png') 7 fill / 7px stretch;
  background: none; box-shadow: none; color: var(--wow-gold); font: 400 1rem var(--font-body); text-shadow: 0 1px 1px #000, 0 0 3px #000;
}
body.play .btn-primary:hover { border-image-source: url('/assets/textures/panel_button_highlight_crop.png'); color: #fff; }
body.play .btn-primary:active { border-image-source: url('/assets/textures/panel_button_down_crop.png'); transform: translateY(1px); }
body.play .btn-lg { min-height: 50px; font-size: 1.15rem; }
body.play .btn-ghost { font-family: var(--font-body); font-weight: 400; }

/* ── top bar ───────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50; height: 58px; display: flex; align-items: center; gap: 18px; padding: 0 16px;
  background: linear-gradient(180deg, rgba(4, 4, 3, .97), rgba(10, 8, 5, .93));
  border-bottom: 2px solid #6b5420; box-shadow: 0 1px 0 #000, 0 6px 20px rgba(0, 0, 0, .5);
}
.topbar .brand img { width: 34px; height: 34px; }
.topbar .brand-word { font: 400 1.75rem/1 var(--font-display); color: var(--wow-gold); text-shadow: 0 2px 0 #000; }
.topnav { display: flex; gap: 2px; }
.topnav button, .playfoot-links button, .playfoot-links a, .linkish {
  background: none; border: 0; color: #cfc3a6; font: 400 .95rem var(--font-body); padding: 8px 10px; min-height: 40px;
  border-radius: 6px; cursor: pointer; text-decoration: none; text-shadow: 0 1px 1px #000;
}
.topnav button:hover, .topnav button:focus-visible { color: var(--wow-gold); background: rgba(255, 209, 0, .07); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ── page grid ─────────────────────────────────────────── */
.watch {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start;
  width: min(1560px, 100%); margin: 0 auto; padding: 16px;
}
.stage { min-width: 0; display: grid; gap: 14px; }

/* ── the player ────────────────────────────────────────── */
.player {
  position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; container-type: inline-size;
  background: #0c1208; border: 2px solid #3d3216; box-shadow: 0 24px 60px rgba(0, 0, 0, .65), 0 0 0 1px #000;
}
.player:fullscreen { border: 0; }
/* color-scheme must match the overlay document or the browser paints the iframe opaque */
#overlay { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border: 0; opacity: 0; transition: opacity .6s; background: transparent; color-scheme: normal; pointer-events: none; }
#overlay.is-on { opacity: 1; }

/* the stand-in game: a real loading screen, slowly drifting, with a baked murloc walking the road */
.scene { position: absolute; inset: 0; overflow: hidden; }
.scene-bg {
  position: absolute; inset: -5%; background: #24301a url('/assets/web/scene_1600.webp') 50% 55% / cover no-repeat;
  animation: drift 70s ease-in-out infinite alternate; will-change: transform;
}
@keyframes drift { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.09) translate(-2.5%, 1.2%); } }
/* easter egg: hidden until main.js sends one sprinting across (every 10-20 min). Clicking it catches it */
.walker { position: absolute; left: 0; bottom: 4%; width: 10.5cqw; aspect-ratio: 254 / 250; visibility: hidden; pointer-events: none; cursor: pointer; }
.walker.run-right, .walker.run-left { visibility: visible; pointer-events: auto; }
.walker.run-right { animation: dash-right 6.5s linear 1 forwards; }
.walker.run-left { animation: dash-left 6.5s linear 1 forwards; }
@keyframes dash-right { from { translate: -14cqw 0; } to { translate: 104cqw 0; } }
@keyframes dash-left { from { translate: 104cqw 0; } to { translate: -14cqw 0; } }
.walker.is-caught .walker-body, .walker.is-caught .walker-name { animation: caught .6s ease-in forwards; }
@keyframes caught { to { transform: translateY(-40%) scale(.2) rotate(40deg); opacity: 0; } }
.walker::before { content: ''; position: absolute; left: 10%; right: 10%; bottom: -3%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); }
.walker-name {
  position: absolute; left: 50%; bottom: 100%; translate: -50% 0; white-space: nowrap;
  font: 400 clamp(8px, 1.05cqw, 15px) var(--font-body); color: #ff3b30; text-shadow: 0 0 2px #000, 0 1px 1px #000;
}
.walker-body { position: absolute; inset: 0; }
/* the sprite faces left: mirror it on the way right */
.walker.run-right .walker-body { scale: -1 1; }
.walker:not(.run-right):not(.run-left) .walker-sprite i { animation-play-state: paused; }
.walker-sprite, .cam-sprite { position: absolute; inset: 0; overflow: hidden; }
.walker-sprite i, .cam-sprite i { position: absolute; top: 0; bottom: 0; left: 0; background: 0 0 / 100% 100% no-repeat; }
/* the baked run cycle: 23 frames at 30 fps */
.walker-sprite i { width: 2300%; background-image: url('/assets/web/murloc_run.webp'); animation: strip-23 .77s steps(23) infinite; }
@keyframes strip-23 { to { transform: translateX(-100%); } }

/* the streamer's webcam: a baked murloc in a dim room, under the overlay's gold cam frame */
.cam-feed { position: absolute; overflow: hidden; background: radial-gradient(120% 90% at 50% 20%, #3a2a52, #120b1d 70%); }
.cam-glow { position: absolute; inset: 14% 0 auto; height: 6%; background: linear-gradient(90deg, #3ee6c8, #c94bff, #ff7a3c); filter: blur(4px); opacity: .55; animation: led 8s linear infinite; }
@keyframes led { 50% { filter: blur(4px) hue-rotate(160deg); } }
.cam-sprite { left: 50%; right: auto; top: auto; bottom: -6%; height: 104%; aspect-ratio: 112 / 128; translate: -50% 0; transition: translate .2s; }
.cam-sprite i { width: 3600%; background-image: url('/assets/web/murloc_cam.webp'); animation: strip-36 2.4s steps(36) infinite; }
@keyframes strip-36 { to { transform: translateX(-100%); } }
.cam-feed.is-hype .cam-sprite { animation: hop .45s ease-in-out 5; }
/* guests: faction leaders rendered talking, cross-fading every ~30 s */
.cam-feed[data-faction="alliance"] { background: radial-gradient(120% 100% at 50% 12%, #2f5a9e, #0a1430 72%); }
.cam-feed[data-faction="horde"] { background: radial-gradient(120% 100% at 50% 12%, #8a231c, #1c0706 72%); }
.cam-feed[data-faction="neutral"] { background: radial-gradient(120% 100% at 50% 12%, #4a3a6e, #120b1d 72%); }
.cam-feed.has-guest .cam-glow { opacity: .25; }
.cam-feed.has-guest .cam-sprite { opacity: 0; transition: opacity 1s; }
.cam-guest { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 1.2s ease; }
.cam-guest.is-on { opacity: 1; }
.cam-guest i { position: absolute; top: 0; bottom: 0; left: 0; width: 4800%; background: 0 0 / 100% 100% no-repeat; animation: strip-48 4s steps(48) infinite; }
@keyframes strip-48 { to { transform: translateX(-100%); } }
.cam-feed.is-hype .cam-guest.is-on i { filter: brightness(1.15); }
.cam-tag {
  position: absolute; left: 7%; bottom: 9%; max-width: 86%; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font: 400 clamp(7px, .85cqw, 13px) var(--font-body); color: #fff; background: rgba(0, 0, 0, .66); border-left: 2px solid var(--wow-gold);
}
.cam-tag:empty { display: none; }
.cam-tag span { color: var(--wow-gold); text-transform: uppercase; font-size: .8em; letter-spacing: .06em; margin-right: 3px; }
.cam-feed[data-faction="alliance"] .cam-tag { border-left-color: #3f8cff; }
.cam-feed[data-faction="horde"] .cam-tag { border-left-color: #e0263c; }
@keyframes hop { 50% { translate: -50% -9%; } }

.poster { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; background: rgba(3, 4, 2, .45); color: var(--wow-text); text-align: center; padding: 16px; }
.poster p { padding: 8px 14px; }
.player-top { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; pointer-events: none; white-space: nowrap; }
.live { padding: 2px 8px; border-radius: 4px; background: #e0263c; color: #fff; font: 700 .72rem/1.4 'Alegreya Sans', sans-serif; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 0 12px rgba(224, 38, 60, .6); }
.pt-note { padding: 2px 8px; border-radius: 4px; background: rgba(0, 0, 0, .65); color: var(--wow-text); font-size: .76rem; }
.player-ctrl { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; opacity: .55; transition: opacity .2s; }
.player:hover .player-ctrl, .player-ctrl:focus-within { opacity: 1; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; background: rgba(0, 0, 0, .72); border: 1px solid #6b5420; color: var(--wow-text); }
.icon-btn:hover { border-color: var(--wow-gold); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .spk { fill: currentColor; }
.icon-btn .mute { display: none; }
.icon-btn[aria-pressed="false"] .wave { display: none; }
.icon-btn[aria-pressed="false"] .mute { display: inline; stroke: #ff5a4a; }

/* ── stream info ───────────────────────────────────────── */
.stream-info { display: flex; align-items: center; gap: 14px; padding: 2px 4px; }
.si-avatar { flex: none; width: 58px; height: 58px; padding: 3px; border-radius: 50%; background: radial-gradient(circle, #6b5420, #2a200a); box-shadow: 0 0 0 2px #000, 0 0 0 3px #e0263c; }
.si-avatar img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.si-text { flex: 1; min-width: 0; }
.si-text h1 { font: 400 1.75rem/1.05 var(--font-display); color: var(--wow-gold); text-shadow: 0 2px 0 #000; }
.si-title { font: 400 1rem var(--font-body); color: var(--wow-text); margin-left: 6px; text-shadow: none; }
.si-sub { margin-top: 4px; color: #b8ac90; font-size: .92rem; line-height: 1.45; }
.si-actions { flex: none; display: flex; align-items: center; gap: 10px; }

/* ── support bar: real action buttons with real icons ─────────── */
.support { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 30px; padding: 8px 12px 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.sup-label { margin-bottom: 9px; font: 400 .9rem var(--font-body); color: var(--wow-gold); text-shadow: 0 1px 1px #000; }
.sup-label small { font-size: .8rem; color: #ff7f50; margin-left: 4px; }
.sup-row { display: flex; gap: 13px; }
.sup-free { flex-basis: 100%; font-size: .78rem; color: #a99d82; }
.sup-btn, .bag-btn {
  position: relative; width: 56px; height: 56px; flex: none; padding: 0; margin: 6px; cursor: pointer; display: block;
  background: #000; border: 0; border-radius: 2px; box-shadow: 0 3px 8px rgba(0, 0, 0, .6);
}
.ab-icon { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 2px; }
/* the frame and hover highlight from the game's action bar */
.sup-btn::before, .bag-btn::before { content: ''; position: absolute; inset: -6px; z-index: 2; pointer-events: none; background: url('/assets/atlas/actionbutton_frame_2x.png') center / 100% 100% no-repeat; }
.sup-btn::after, .bag-btn::after { content: ''; position: absolute; inset: -6px; z-index: 3; pointer-events: none; background: url('/assets/atlas/actionbutton_border_2x.png') center / 100% 100% no-repeat; opacity: 0; transition: opacity .12s; }
.sup-btn:hover::after, .bag-btn:hover::after, .sup-btn:focus-visible::after, .bag-btn:focus-visible::after { opacity: .9; }
.sup-btn:focus-visible, .bag-btn:focus-visible { outline: 2px solid #40c7eb; outline-offset: 8px; }
.sup-btn:active .ab-icon, .bag-btn:active .ab-icon { transform: scale(.94); filter: brightness(.8); }
.sup-btn b { position: absolute; right: 3px; bottom: 1px; z-index: 4; font: 400 .9rem/1 var(--font-body); color: #fff; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }
.sup-btn .cd { position: absolute; inset: 0; z-index: 1; border-radius: 2px; pointer-events: none; background: conic-gradient(rgba(0, 0, 0, .74) calc(var(--cd, 0) * 360deg), transparent 0); }
.sup-btn.is-cooling .ab-icon { filter: saturate(.4); }
.sup-btn.is-fired::after { background-image: url('/assets/atlas/actionbutton_flash_2x.png'); animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ── cards ─────────────────────────────────────────────── */
.below { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.card { position: relative; padding: 4px 6px 6px; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font: 400 1.35rem/1 var(--font-display); color: var(--wow-gold); text-shadow: 0 2px 0 #000; }
.card-title span { font: 400 .8rem var(--font-body); color: #a99d82; }
/* objective tracker, like the game's */
.quest-list { list-style: none; margin: 0; padding: 0; }
.quest { padding: 6px 0 8px; border-top: 1px solid rgba(255, 209, 0, .12); animation: q-in .35s var(--ease); }
.quest:first-child { border-top: 0; }
.q-title { font: 400 .98rem/1.2 var(--font-body); color: var(--wow-gold); text-shadow: 0 1px 1px #000; }
.q-goal { font-size: .88rem; color: #e6e6e6; line-height: 1.35; }
.q-goal::before { content: '- '; }
.q-goal b { font-weight: 400; color: #fff; }
.q-bar { position: relative; display: block; width: min(100%, 230px); height: 12px; margin-top: 6px; background: url('/assets/atlas/xp_background_2x.png') 0 0 / 100% 100%; box-shadow: 0 0 0 1px #000; overflow: hidden; }
.q-bar i { display: block; height: 100%; background: linear-gradient(180deg, #ffe066, #d49b14 55%, #8a5a06); transform-origin: 0 50%; transition: transform .35s; }
.q-cta { display: inline-block; margin-top: 6px; color: #40c7eb; font-size: .9rem; }
.quest.is-final { display: grid; gap: 8px; }
.quest.is-final .btn { justify-self: start; }
@keyframes q-in { from { opacity: 0; transform: translateX(10px); } }

.me-head { display: flex; align-items: center; gap: 12px; }
.pp-crest { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-size: 40px; background: #000; border: 2px solid #a8842c; box-shadow: 0 0 0 2px #000; }
.pp-crest img { width: 100%; height: 100%; object-fit: cover; }
.pp-crest .class-icon { border-radius: 50%; box-shadow: none; width: 100%; height: 100%; font-size: inherit; }
.pp-main { flex: 1; min-width: 0; line-height: 1.3; }
.pp-name { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-lv { color: var(--wow-gold); font-size: .88rem; }
.pp-ding { color: #cfa4ff; font-size: .85rem; opacity: 0; }
.me.is-ding .pp-ding { animation: ding 2.4s ease-out; }
.me.is-ding .pp-crest { animation: crest-ding 1.2s ease-out; }
@keyframes ding { 10%, 70% { opacity: 1; } }
@keyframes crest-ding { 30% { box-shadow: 0 0 0 6px rgba(185, 138, 255, .4), 0 0 30px rgba(185, 138, 255, .8); } }
.pp-sub { font-size: .84rem; color: #b8ac90; }
.pp-sub b { color: var(--wow-gold); font-weight: 400; }
/* the game's XP bar */
.pp-xp { position: relative; height: 10px; margin-top: 8px; background: url('/assets/atlas/xp_background_2x.png') 0 0 / 100% 100%; }
.pp-xp i { position: absolute; inset: 0; background: url('/assets/atlas/xp_fill_2x.png') 0 0 / 100% 100%; transform-origin: 0 50%; transform: scaleX(0); transition: transform .45s; }
.pp-xp::after { content: ''; position: absolute; inset: -4px -3px; background: url('/assets/atlas/xp_frame_2x.png') 0 0 / 100% 100%; pointer-events: none; }
.pp-xp span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pp-gear { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pp-gear .bag-slot .slot-icon { font-size: 24px; }
.me-note { margin-top: 10px; font-size: .82rem; color: #a99d82; line-height: 1.45; }
.xp-pop { position: absolute; right: 96px; top: 34px; color: #cfa4ff; font: 400 1rem var(--font-body); text-shadow: 0 1px 2px #000; white-space: nowrap; pointer-events: none; animation: xp-pop 1.3s ease-out forwards; }
@keyframes xp-pop { from { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-22px); } }
.bag-btn { margin: 6px 8px 6px 6px; }
.bag-count { position: absolute; right: -9px; top: -10px; z-index: 5; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; background: #8a1810; color: #fff; font: 400 .78rem/1 var(--font-body); border: 2px solid var(--wow-gold); }
.bag-btn.is-bump { animation: bag-bump .45s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bag-bump { 35% { transform: scale(1.18) rotate(-6deg); } 70% { transform: scale(.96) rotate(3deg); } }
.flying { position: fixed; z-index: 100; margin: 0; pointer-events: none; }

/* bag slots: real icons in a quality-colored border */
body.play .bag-slot { border-radius: 3px; }
body.play .bag-slot.has-icon { border-width: 2px; box-shadow: 0 0 0 1px #000, 0 0 8px color-mix(in srgb, var(--q) 45%, transparent); }
body.play .bag-slot.q-common.has-icon, body.play .bag-slot.q-poor.has-icon { box-shadow: 0 0 0 1px #000; }

/* ── chat column ───────────────────────────────────────── */
.chatcol { position: sticky; top: 74px; display: flex; flex-direction: column; height: calc(100svh - 90px); min-height: 420px; max-height: 900px; overflow: hidden; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px 8px; border-bottom: 1px solid rgba(255, 255, 255, .12); font: 400 1.15rem/1 var(--font-display); color: var(--wow-gold); }
.chat-hint { font: 400 .76rem var(--font-body); color: #a99d82; }
.chat-hint button { background: rgba(64, 199, 235, .1); border: 1px solid rgba(64, 199, 235, .35); color: #40c7eb; border-radius: 4px; font: 400 .76rem var(--font-body); padding: 3px 6px; cursor: pointer; }
.chatlog { flex: 1; list-style: none; margin: 0; padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; font-size: .9rem; line-height: 1.4; overscroll-behavior: contain; color: #fff; text-shadow: 0 1px 1px #000; }
.cm { overflow-wrap: anywhere; animation: cl-in .2s ease-out; }
.cm-sep { color: #ccc; }
.cm.is-me { background: rgba(64, 199, 235, .08); padding: 1px 5px; margin: 0 -5px; }
.cm.is-event { padding: 5px 8px; margin: 2px -2px; background: linear-gradient(90deg, rgba(163, 53, 238, .22), rgba(163, 53, 238, .04)); border-left: 3px solid #a335ee; }
.cm.is-event .bits { color: #d9a8ff; font-weight: 400; }
.cm.is-event .tip { color: var(--wow-gold); font-weight: 400; }
.cm.is-note { color: #ffff00; }
.q-text { color: var(--q-text); }
body.play .q-text { font-weight: 400; }
.chatform { display: flex; gap: 8px; padding: 8px 0 2px; border-top: 1px solid rgba(255, 255, 255, .12); }
.chatform .input { flex: 1; min-width: 0; min-height: 38px; font-family: var(--font-body); background: rgba(0, 0, 0, .6); border-color: #4a4a4a; border-radius: 2px; }
@keyframes cl-in { from { opacity: 0; transform: translateY(4px); } }

/* ── quest-complete lessons ────────────────────────────── */
.lessons { position: fixed; left: 16px; bottom: 16px; z-index: 60; width: min(380px, calc(100vw - 32px)); display: grid; gap: 8px; pointer-events: none; }
.lesson { pointer-events: auto; position: relative; display: flex; gap: 12px; padding: 4px 28px 6px 4px; box-shadow: 0 14px 34px rgba(0, 0, 0, .6); animation: lesson-in .45s cubic-bezier(.3, 1.4, .5, 1); transition: opacity .5s, transform .5s; }
.lesson.is-out { opacity: 0; transform: translateX(-20px); }
.lesson-seal { flex: none; width: 34px; height: 34px; margin-top: 2px; filter: drop-shadow(0 0 8px rgba(80, 255, 80, .5)); }
.lesson-kicker { font-size: .74rem; color: #3dff3d; text-shadow: 0 1px 1px #000; }
.lesson-title { font: 400 1.35rem/1.1 var(--font-display); color: var(--wow-gold); text-shadow: 0 2px 0 #000; }
.lesson-body { margin-top: 3px; font-size: .9rem; line-height: 1.45; color: var(--wow-text); }
.lesson-x { position: absolute; top: -4px; right: -6px; width: 30px; height: 30px; border: 0; background: none; color: #b8ac90; font-size: 1.3rem; cursor: pointer; }
.lesson-x:hover { color: #fff; }
@keyframes lesson-in { from { opacity: 0; transform: translateY(20px) scale(.95); } }

/* ── bag drawer ────────────────────────────────────────── */
.bag-panel { position: fixed; top: 70px; right: 16px; bottom: 16px; z-index: 70; width: min(410px, calc(100vw - 32px)); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0, 0, 0, .7); animation: bp-in .3s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes bp-in { from { opacity: 0; transform: translateX(30px); } }
.bp-head { display: flex; align-items: center; justify-content: space-between; padding: 0 0 0 6px; border-bottom: 1px solid rgba(255, 209, 0, .2); }
.bp-tabs { display: flex; gap: 4px; }
.bp-tab { background: none; border: 0; border-bottom: 3px solid transparent; color: #a99d82; font: 400 1rem var(--font-body); padding: 10px 10px 9px; cursor: pointer; min-height: 44px; }
.bp-tab[aria-selected="true"] { color: var(--wow-gold); border-bottom-color: var(--wow-gold); }
.bp-tab small { color: #a99d82; }
.bp-close { width: 40px; height: 40px; border: 0; border-radius: 6px; background: none; color: #b8ac90; font-size: 1.6rem; cursor: pointer; }
.bp-close:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.bp-body { flex: 1; overflow-y: auto; padding: 10px 4px; overscroll-behavior: contain; }
.bp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 8px; background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 1px rgba(255, 209, 0, .15); }
.bp-cell { position: relative; }
.bp-cell .bag-slot { --size: 56px; display: grid; width: 100%; height: auto; aspect-ratio: 1; }
.bp-cell .bag-slot .slot-icon { font-size: 30px; }
.bp-cell.is-selected .bag-slot { outline: 2px solid #40c7eb; outline-offset: 2px; }
.eq-dot { position: absolute; top: 3px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: #3dff3d; border: 2px solid #000; pointer-events: none; }
.bp-empty { grid-column: 1 / -1; padding: 18px 8px; text-align: center; color: #a99d82; }
.bp-inspect { margin-top: 12px; display: grid; gap: 10px; }
.bp-inspect .item-tip { width: 100%; }
.bp-cmp { font-size: .86rem; color: #b8ac90; }
.bp-cmp b { margin-right: 6px; font-weight: 400; }
.bp-cmp .up { color: #3dff3d; }
.bp-cmp .down { color: #ff4a3d; }
.bp-label { margin: 6px 0 8px; font: 400 .85rem var(--font-body); color: var(--wow-gold); }
.bp-classes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bp-class { display: grid; justify-items: center; gap: 3px; padding: 10px 6px; cursor: pointer; color: #fff; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 209, 0, .18); font: 400 .95rem var(--font-body); }
.bp-class .class-icon { font-size: 40px; }
.bp-class small { color: #a99d82; font-size: .76rem; }
.bp-class:hover { border-color: rgba(255, 209, 0, .5); }
.bp-class.is-on { border-color: var(--wow-gold); background: rgba(255, 209, 0, .08); box-shadow: inset 0 0 18px rgba(255, 209, 0, .15); }
.bp-doll { display: grid; gap: 6px; }
.bp-doll-slot { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: .9rem; }
.bp-doll-slot > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-doll-slot .bag-slot .slot-icon { font-size: 26px; }
.bp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 14px 0 0; }
.bp-stats > div { padding: 6px 8px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .08); }
.bp-stats dt { font-size: .74rem; color: #a99d82; }
.bp-stats dd { margin: 0; color: #fff; font-variant-numeric: tabular-nums; }
.bp-stats .bp-power { grid-column: span 2; border-color: rgba(255, 209, 0, .35); }
.bp-stats .bp-power dd { font: 400 1.5rem/1 var(--font-display); color: var(--wow-gold); }
.bp-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 4px 0; border-top: 1px solid rgba(255, 209, 0, .2); font-size: .8rem; color: #a99d82; }
.bp-foot p { flex: 1 1 160px; }
.linkish { padding: 6px 8px; min-height: 36px; font-size: .8rem; color: #a99d82; text-decoration: underline; }

/* ── codex dialogs ─────────────────────────────────────── */
dialog.codex { width: min(780px, calc(100% - 24px)); max-height: min(88vh, 940px); padding: 18px 20px 22px; overflow: auto; color: var(--wow-text); box-shadow: 0 30px 90px rgba(0, 0, 0, .8); }
dialog.codex[open] { animation: cx-in .35s cubic-bezier(.3, 1.3, .5, 1); }
dialog.codex::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); }
@keyframes cx-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.codex-x { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; border: 0; border-radius: 6px; background: none; color: #b8ac90; font-size: 1.6rem; cursor: pointer; }
.codex-x:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.cx-kicker { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #40c7eb; }
dialog.codex h2 { margin: 4px 0 10px; font: 400 clamp(2rem, 5vw, 2.6rem)/1.05 var(--font-display); color: var(--wow-gold); text-shadow: 0 2px 0 #000; }
dialog.codex h3 { margin: 22px 0 8px; font: 400 1.1rem var(--font-body); color: var(--wow-gold); }
dialog.codex p { color: var(--wow-text); }
.cx-lead { color: #cfc3a6 !important; font-size: 1.05rem; }
.cx-steps, .cx-loop { counter-reset: s; list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.cx-steps li, .cx-loop li { counter-increment: s; position: relative; padding: 10px 14px 10px 58px; background: rgba(0, 0, 0, .4); border: 1px solid rgba(255, 209, 0, .15); }
.cx-steps li::before, .cx-loop li::before { content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 400 1.25rem/1 var(--font-display); color: #1b1405; background: radial-gradient(circle at 40% 35%, #fff1b8, #c9932e); box-shadow: 0 0 0 2px #000; }
.cx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cx-grid > div { padding: 10px 12px; background: rgba(0, 0, 0, .4); border: 1px solid rgba(255, 209, 0, .15); }
.cx-grid h3 { margin: 0 0 4px; font-size: 1rem; }
.cx-grid p { font-size: .92rem; color: #cfc3a6 !important; }
.cx-stats { margin-top: 14px; color: #40c7eb !important; }
.cx-actions { margin-top: 20px; }
.cx-quality { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cx-quality li { padding: 4px 10px; border: 1px solid var(--q); color: var(--q-text); font-size: .9rem; background: color-mix(in srgb, var(--q) 10%, transparent); }
.cx-odds { margin-top: 12px; font-family: var(--font-body); }
.cx-classes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cx-classes li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(0, 0, 0, .4); border: 1px solid rgba(255, 209, 0, .15); color: #cfc3a6; }
.cx-classes .class-icon { font-size: 36px; }
.cx-classes b { color: #fff; font-weight: 400; }
.cx-road { list-style: none; padding: 0 0 0 22px; margin: 18px 0 0; border-left: 2px solid #6b5420; display: grid; gap: 18px; }
.cx-road li { position: relative; }
.cx-road li::before { content: ''; position: absolute; left: -30px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #000; border: 3px solid #6b5420; }
.cx-road .road-now::before { border-color: #3dff3d; background: #3dff3d; }
.cx-road .road-next::before { border-color: var(--wow-gold); }
.cx-road h3 { margin: 6px 0 2px; }
dialog.codex details { border-top: 1px solid rgba(255, 209, 0, .15); padding: 4px 0; }
dialog.codex summary { cursor: pointer; padding: 10px 0; min-height: 44px; display: flex; align-items: center; color: var(--wow-gold); }
dialog.codex details p { padding: 0 0 12px; color: #cfc3a6 !important; }

/* ── footer ────────────────────────────────────────────── */
.playfoot { padding: 22px 16px 30px; text-align: center; color: #a99d82; border-top: 2px solid #3d3216; background: rgba(0, 0, 0, .6); }
.playfoot b { color: var(--wow-gold); font-weight: 400; }
.playfoot-links { margin: 8px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.playfoot-links button, .playfoot-links a { color: #40c7eb; }

/* ── smaller screens ───────────────────────────────────── */
@media (max-width: 1099px) {
  .watch { grid-template-columns: minmax(0, 1fr); }
  .chatcol { position: static; height: 360px; min-height: 0; }
}
@media (max-width: 980px) { .topnav { display: none; } }
@media (max-width: 760px) {
  .topbar { height: 54px; gap: 8px; padding: 0 10px; }
  .topbar .brand-word { font-size: 1.45rem; }
  .watch { padding: 0 0 16px; gap: 10px; }
  .stage { gap: 10px; }
  .player { border-left: 0; border-right: 0; }
  .scene-bg { background-image: url('/assets/web/scene_960.webp'); }
  .player-ctrl { opacity: 1; }
  .pt-note { display: none; }
  .stream-info { padding: 0 12px; gap: 10px; flex-wrap: wrap; }
  .si-avatar { width: 46px; height: 46px; }
  .si-text h1 { font-size: 1.4rem; }
  .si-title { display: block; margin: 2px 0 0; font-size: .9rem; }
  .si-sub { display: none; }
  .si-actions { width: 100%; }
  .si-actions .si-cta { flex: 1; }
  .support { margin: 0 6px; gap: 6px 14px; justify-content: center; }
  .sup-group { display: grid; justify-items: center; }
  .sup-btn { width: clamp(42px, 12vw, 52px); height: clamp(42px, 12vw, 52px); margin: 5px; }
  .sup-row { gap: 8px; }
  .sup-free { text-align: center; }
  .below { grid-template-columns: minmax(0, 1fr); padding: 0 6px; gap: 10px; }
  .chatcol { margin: 0 6px; height: 300px; }
  .lessons { left: 8px; right: 8px; bottom: 8px; width: auto; }
  .bag-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: min(80vh, 640px); animation-name: bp-up; }
  @keyframes bp-up { from { transform: translateY(40px); opacity: 0; } }
  dialog.codex { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 90vh; padding: 16px 12px 24px; }
  .cx-grid, .cx-classes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) { .topbar .brand-word, .topbar .brand-tld { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .scene-bg, .cam-glow, .tour-spot, .me.is-ding .pp-crest, .bag-btn.is-bump, .cam-feed.is-hype .cam-sprite { animation: none; }
}

/* ── first-visit tour: a spotlight and a game tooltip, one step at a time ── */
.tour-spot {
  position: fixed; z-index: 80; border-radius: 6px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .58), 0 0 0 2px var(--wow-gold), 0 0 24px 4px rgba(255, 209, 0, .45);
  transition: left .35s var(--ease), top .35s var(--ease), width .35s var(--ease), height .35s var(--ease);
  animation: spot-pulse 1.8s ease-in-out infinite;
}
@keyframes spot-pulse { 50% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, .58), 0 0 0 2px #fff1a8, 0 0 34px 8px rgba(255, 209, 0, .6); } }
.tour, .wowtip {
  position: fixed; border: 8px solid transparent; border-image: url('/assets/textures/nine_tooltip.png') 16 / 8px stretch;
  background: rgba(4, 6, 12, .96); background-clip: padding-box; box-shadow: 0 14px 40px rgba(0, 0, 0, .7);
}
.tour { z-index: 81; width: min(350px, calc(100vw - 20px)); padding: 8px 12px 10px; transition: left .35s var(--ease), top .35s var(--ease); }
.tour.is-in { animation: tour-in .32s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes tour-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.tour::after { content: ''; position: absolute; left: var(--arrow, 50%); width: 14px; height: 14px; background: #04060c; border: 2px solid #8d8d8d; transform: translateX(-50%) rotate(45deg); }
.tour[data-side="below"]::after { top: -17px; border-right: 0; border-bottom: 0; }
.tour[data-side="above"]::after { bottom: -17px; border-left: 0; border-top: 0; }
.tour-kicker { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #40c7eb; }
.tour-kicker span { color: #8a8a8a; letter-spacing: .04em; text-transform: none; }
.tour-title { margin: 2px 0 4px; font: 400 1.5rem/1.1 var(--font-display); color: var(--wow-gold); text-shadow: 0 2px 0 #000; }
.tour-body { color: var(--wow-text); font-size: .92rem; line-height: 1.45; }
.tour-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 10px; }
.tour-skip { margin-right: auto; padding: 6px 2px; background: none; border: 0; color: #a99d82; font: 400 .82rem var(--font-body); text-decoration: underline; cursor: pointer; }
/* hover tooltips on the support buttons, written like ability tooltips */
.wowtip { z-index: 90; max-width: 270px; padding: 4px 8px 6px; pointer-events: none; }
.wt-title { display: flex; justify-content: space-between; gap: 16px; font-size: 1rem; color: #fff; }
.wt-title span { color: #9a9a9a; font-size: .8rem; }
.wt-body { margin-top: 3px; font-size: .86rem; line-height: 1.4; color: var(--wow-gold); }
