/* ============================================================
   WASTELAND LIVE — dark pixel / retro-future theme
   ============================================================ */

:root {
  /* palette */
  --bg-void:    #0a0814;
  --bg-deep:    #0f0c1e;
  --bg-panel:   #151229;
  --bg-panel-2: #1c1838;
  --bg-raised:  #241f44;
  --line:       #2c2750;
  --line-glow:  rgba(53, 224, 208, 0.25);

  --txt:        #e9e6fb;
  --txt-dim:    #9a95c4;
  --txt-faint:  #6c6794;

  --cyan:   #35e0d0;
  --magenta:#ff4d8d;
  --purple: #8b5cf6;
  --gold:   #ffcf3f;
  --gold-deep: #c79a14;
  --red:    #ff3b5c;
  --green:  #57e08a;
  --orange: #ffa83d;
  --blue:   #4dd2ff;

  /* stat colors */
  --hp:      #ff4d6d;
  --hunger:  #ffa83d;
  --sanity:  #4dd2ff;
  --supply:  #57e08a;

  /* type scale */
  --t-hero: 54px;
  --t-xl:   38px;
  --t-lg:   29px;
  --t-md:   23px;
  --t-sm:   19px;
  --t-xs:   16px;
  --t-micro:14px;

  --pixel: "Press Start 2P", monospace;
  --body:  "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: var(--bg-void);
  overflow: hidden;
  font-family: var(--body);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.char-sprite .body, .pack-slot, .dc-thumb, .r-thumb, .t-icon { image-rendering: pixelated; }

/* ---------- Stage / scaling ---------- */
#stage {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 700px at 30% 0%, #16122e 0%, var(--bg-void) 70%);
}
#frame {
  position: relative;
  flex: 0 0 1920px;
  width: 1920px; height: 1080px;
  transform-origin: center center;
  background: var(--bg-deep);
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--line), 0 30px 90px rgba(0,0,0,.7);
}

/* scanline overlay across whole app */
#frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 200;
  background: repeating-linear-gradient(
    to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.12) 3px, rgba(0,0,0,0) 4px);
  mix-blend-mode: multiply;
}

/* ---------- App layout ---------- */
#app { position: absolute; inset: 0; display: flex; flex-direction: column; }

.topbar { height: 110px; flex: 0 0 110px; z-index: 60; }
.main-row { flex: 1; display: flex; min-height: 0; }
.stage-col { flex: 0 0 70%; position: relative; min-width: 0; }
.chat-col  { flex: 0 0 30%; min-width: 0; border-left: 2px solid var(--line);
             background: var(--bg-panel); display: flex; flex-direction: column; }

/* pixel chunky border helper */
.pixel-box {
  background: var(--bg-panel-2);
  border: 2px solid var(--line);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.02), 0 6px 0 rgba(0,0,0,.35);
}

/* utility */
.pixel { font-family: var(--pixel); }
.glow-cyan { text-shadow: 0 0 10px rgba(53,224,208,.6); }
.glow-gold { text-shadow: 0 0 12px rgba(255,207,63,.7); }

/* ============================================================
   STATUS BAR
   ============================================================ */
.topbar {
  display: flex; align-items: center; gap: 26px;
  padding: 0 28px;
  background: linear-gradient(180deg, #181433, #110e25);
  border-bottom: 2px solid var(--line);
}
.day-block { display: flex; flex-direction: column; gap: 7px; min-width: 188px; }
.day-block .day-label {
  font-family: var(--pixel); font-size: var(--t-sm); color: var(--cyan);
  letter-spacing: 1px;
}
.day-dots { display: flex; gap: 5px; }
.day-dot { width: 20px; height: 12px; background: var(--bg-raised);
  border: 2px solid var(--line); }
.day-dot.done { background: var(--cyan); border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(53,224,208,.6); }
.day-dot.cur { background: var(--gold); border-color: var(--gold);
  box-shadow: 0 0 10px rgba(255,207,63,.7); animation: dotPulse 1.1s steps(2) infinite; }
@keyframes dotPulse { 50% { opacity: .45; } }

.stats-block { display: flex; gap: 18px; flex: 1; }
.stat { position: relative; flex: 1; max-width: 260px; }
.stat .stat-top { display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 5px; }
.stat .stat-name { font-size: var(--t-sm); color: var(--txt-dim); }
.stat .stat-val  { font-family: var(--pixel); font-size: var(--t-xs); color: var(--txt); }
.stat .bar { height: 14px; background: #0c0a1c; border: 2px solid var(--line);
  position: relative; overflow: hidden; }
.stat .bar .fill { position: absolute; inset: 0 auto 0 0; height: 100%;
  transition: width .55s steps(8); }
.stat .bar .fill::after { content:""; position:absolute; inset:0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 3px, transparent 3px 8px); }
.stat.hp .fill     { background: var(--hp); }
.stat.hunger .fill { background: var(--hunger); }
.stat.sanity .fill { background: var(--sanity); }
.stat.supply .fill { background: var(--supply); }
.stat.low .bar { animation: lowFlash .7s steps(2) infinite; }
@keyframes lowFlash { 50% { border-color: var(--red); box-shadow: 0 0 10px var(--red); } }

/* floating stat change number */
.float-num {
  position: absolute; left: 50%; top: 6px; transform: translateX(-50%);
  font-family: var(--pixel); font-size: var(--t-sm); font-weight: bold;
  pointer-events: none; z-index: 80; white-space: nowrap;
}
.float-num.up   { color: var(--green); animation: floatUp 1.5s ease-out forwards;
  text-shadow: 0 0 8px rgba(87,224,138,.8); }
.float-num.down { color: var(--red); animation: floatDown 1.5s ease-out forwards;
  text-shadow: 0 0 8px rgba(255,59,92,.8); }
@keyframes floatUp { 0%{opacity:0;transform:translate(-50%,6px);} 15%{opacity:1;}
  100%{opacity:0;transform:translate(-50%,-30px);} }
@keyframes floatDown { 0%{opacity:0;transform:translate(-50%,-4px);} 15%{opacity:1;}
  100%{opacity:0;transform:translate(-50%,34px);} }

/* backpack */
.pack-block { display: flex; flex-direction: column; gap: 6px; }
.pack-label { font-size: var(--t-xs); color: var(--txt-dim); letter-spacing: .5px; }
.pack-grid { display: grid; grid-template-columns: repeat(6, 40px); gap: 5px; }
.pack-slot { width: 40px; height: 40px; background: #0c0a1c;
  border: 2px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 20px; position: relative; }
.pack-slot.filled { background: var(--bg-raised); border-color: var(--purple); }
.pack-slot.flash { animation: slotFlash .9s steps(2) 3; }
@keyframes slotFlash { 50% { border-color: var(--gold); box-shadow: 0 0 12px var(--gold); } }
.pack-slot .qty { position: absolute; right: 1px; bottom: 0; font-family: var(--pixel);
  font-size: 11px; color: var(--gold); }

/* ============================================================
   COMMENT FEED
   ============================================================ */
.chat-head { padding: 16px 18px; border-bottom: 2px solid var(--line);
  display: flex; align-items: center; gap: 12px; background: var(--bg-panel-2); }
.streamer-av { width: 52px; height: 52px; background: linear-gradient(135deg,#ff4d8d,#8b5cf6);
  border: 2px solid var(--magenta); display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: 0 0 12px rgba(255,77,141,.5); flex: 0 0 52px; }
.streamer-meta { flex: 1; min-width: 0; }
.streamer-name { font-size: var(--t-md); color: var(--txt); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.live-tag { font-family: var(--pixel); font-size: 12px; background: var(--red); color: #fff;
  padding: 3px 6px; letter-spacing: 1px; animation: livePulse 1.4s steps(2) infinite; }
@keyframes livePulse { 50% { opacity: .55; } }
.viewers { font-size: var(--t-xs); color: var(--txt-dim); margin-top: 5px;
  display: flex; align-items: center; gap: 6px; }
.viewers b { color: var(--cyan); font-family: var(--pixel); font-size: 14px; }

.chat-list { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; padding: 12px 14px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 9px; }
.chat-list::before { content:""; position: absolute; top:0; left:0; right:0; height: 40px;
  background: linear-gradient(var(--bg-panel), transparent); z-index: 4; pointer-events:none; }

.cmt { display: flex; gap: 9px; align-items: flex-start; animation: cmtIn .35s ease-out;
  padding: 7px 9px; border: 2px solid transparent; }
@keyframes cmtIn { from { opacity:0; transform: translateY(10px);} to{opacity:1;} }
.cmt .c-av { width: 30px; height: 30px; flex: 0 0 30px; border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: var(--bg-raised); }
.cmt .c-body { flex: 1; min-width: 0; }
.cmt .c-name { font-size: var(--t-xs); color: var(--txt-faint); margin-bottom: 2px; }
.cmt .c-text { font-size: var(--t-sm); color: var(--txt); line-height: 1.45; word-break: break-word; }
.cmt.mod .c-name { color: var(--cyan); }
.cmt.gift .c-text { color: var(--magenta); }

/* adopted comment — gold highlight + flashing */
.cmt.adopted { background: linear-gradient(90deg, rgba(255,207,63,.16), rgba(255,207,63,.04));
  border: 2px solid var(--gold); box-shadow: 0 0 16px rgba(255,207,63,.3); }
.cmt.adopted.flash { animation: adoptFlash 1.6s steps(2) 3; }
@keyframes adoptFlash { 50% { box-shadow: 0 0 26px rgba(255,207,63,.7); border-color: #fff7d6; } }
.cmt.adopted .c-name::before { content: "✨ "; }
.cmt .adopt-tag { font-size: var(--t-xs); color: var(--gold); margin-top: 4px;
  display: flex; align-items: center; gap: 4px; }

/* AI system / guardian notice */
.cmt.system { background: rgba(53,224,208,.07); border: 2px solid rgba(53,224,208,.4); }
.cmt.system .c-av { background: #10243a; border-color: var(--cyan); }
.cmt.system .c-name { color: var(--cyan); }
.cmt.system .c-text { color: #c4eee9; font-size: var(--t-xs); line-height: 1.55; }

/* merged / deduped spam — de-emphasised, NOT amplified */
.cmt.merged { opacity: .62; }
.cmt.merged .c-text { color: var(--txt-dim); text-decoration: line-through; text-decoration-color: rgba(154,149,196,.5); }
.dup-badge { margin-left: 7px; font-family: var(--pixel); font-size: 11px;
  color: #1a1730; background: var(--txt-faint); padding: 2px 6px; vertical-align: middle; }
.merge-tag { font-size: var(--t-xs); color: var(--txt-faint); margin-top: 4px;
  display: flex; align-items: center; gap: 4px; }

.chat-input { padding: 12px 14px; border-top: 2px solid var(--line); background: var(--bg-panel-2);
  display: flex; flex-direction: column; gap: 9px; }
.chat-guide { font-size: var(--t-xs); color: var(--cyan); text-align: center; opacity: .9; }
.input-row { display: flex; gap: 8px; }
.input-fake { flex: 1; background: #0c0a1c; border: 2px solid var(--line); padding: 11px 12px;
  font-size: var(--t-sm); color: var(--txt-faint); transition: all .25s; }
.chat-input.hot .input-fake { border-color: var(--gold); color: var(--gold);
  box-shadow: 0 0 14px rgba(255,207,63,.4); animation: hotPulse 1s steps(2) infinite; }
@keyframes hotPulse { 50% { box-shadow: 0 0 22px rgba(255,207,63,.65); } }
.input-send { width: 50px; background: var(--magenta); border: 2px solid var(--magenta);
  color: #fff; font-size: 18px; cursor: pointer; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { font-family: var(--body); font-size: var(--t-md); color: var(--txt);
  background: var(--bg-raised); border: 2px solid var(--line);
  padding: 13px 20px; cursor: pointer; position: relative; white-space: nowrap;
  box-shadow: 0 4px 0 rgba(0,0,0,.4); transition: transform .08s, box-shadow .08s; }
.btn:hover { border-color: var(--cyan); color: #fff; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.4); }
.btn.primary { background: var(--cyan); color: #062b27; border-color: var(--cyan);
  box-shadow: 0 4px 0 #16776e; font-weight: bold; }
.btn.primary:hover { background: #54f0e0; }
.btn.gold { background: var(--gold); color: #3a2c00; border-color: var(--gold);
  box-shadow: 0 4px 0 var(--gold-deep); font-weight: bold; }
.btn.magenta { background: var(--magenta); color: #fff; border-color: var(--magenta);
  box-shadow: 0 4px 0 #a82658; }
.btn.ghost { background: transparent; }
.btn.sm { font-size: var(--t-sm); padding: 8px 13px; box-shadow: 0 3px 0 rgba(0,0,0,.4); }

/* ============================================================
   SCENE STAGE (left)
   ============================================================ */
.scene { position: absolute; inset: 0; overflow: hidden; }
.scene-title-chip { position: absolute; top: 18px; left: 22px; z-index: 30;
  font-family: var(--pixel); font-size: var(--t-xs); color: var(--cyan);
  background: rgba(10,8,20,.8); border: 2px solid var(--line); padding: 8px 12px;
  letter-spacing: 1px; }

/* dev scene nav */
.dev-nav { position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 150; display: flex; gap: 5px; background: rgba(10,8,20,.92);
  border: 2px solid var(--line); padding: 6px; flex-wrap: nowrap; white-space: nowrap; justify-content: center; }
.dev-nav button { font-family: var(--body); font-size: 13px; color: var(--txt-dim);
  background: var(--bg-raised); border: 2px solid var(--line); padding: 5px 8px; cursor: pointer; white-space: nowrap; }
.dev-nav button.on { color: #062b27; background: var(--cyan); border-color: var(--cyan); }
.dev-nav .dev-label { font-family: var(--pixel); font-size: 11px; color: var(--txt-faint);
  align-self: center; padding: 0 4px; }

/* ---------- pixel interior shelter ---------- */
.shelter {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, #1a1530 0%, #1a1530 58%, #120e22 58%, #0e0a1c 100%);
}
.shelter .wall-grid { position: absolute; inset: 0 0 42% 0;
  background-image: linear-gradient(rgba(53,224,208,.05) 2px, transparent 2px),
    linear-gradient(90deg, rgba(53,224,208,.05) 2px, transparent 2px);
  background-size: 64px 64px; }
.shelter .floor-grid { position: absolute; inset: 58% 0 0 0;
  background-image: linear-gradient(90deg, rgba(139,92,246,.08) 2px, transparent 2px);
  background-size: 96px 100%; }
.shelter .lamp { position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 360px; height: 70%;
  background: radial-gradient(60% 80% at 50% 0%, rgba(255,207,63,.22), transparent 70%); }

/* generic pixel-prop */
.prop { position: absolute; image-rendering: pixelated; }
.prop .em { font-size: 0; }
.char-sprite { position: absolute; display: flex; flex-direction: column; align-items: center;
  gap: 6px; z-index: 10; }
.char-sprite .body { width: 92px; height: 92px; background: var(--bg-raised);
  border: 3px solid var(--purple); display: flex; align-items: center; justify-content: center;
  font-size: 50px; box-shadow: 0 0 18px rgba(139,92,246,.4); position: relative; }
.char-sprite.hero .body { border-color: var(--cyan); box-shadow: 0 0 18px rgba(53,224,208,.45); }
.char-sprite .name-tag { font-size: var(--t-xs); color: var(--txt); background: rgba(10,8,20,.8);
  border: 2px solid var(--line); padding: 3px 7px; }
.char-sprite .shadow { width: 70px; height: 12px; background: rgba(0,0,0,.5); border-radius: 50%;
  filter: blur(3px); margin-top: -4px; }
.char-sprite.bob { animation: bob 2.4s steps(4) infinite; }
@keyframes bob { 50% { transform: translateY(-7px); } }

/* ---------- interactive hotspots ---------- */
.hotspot { position: absolute; cursor: pointer; z-index: 12; }
.hotspot .hot-ring { position: absolute; inset: -10px; border: 3px solid var(--cyan);
  box-shadow: 0 0 16px rgba(53,224,208,.5), inset 0 0 12px rgba(53,224,208,.25);
  opacity: .55; transition: opacity .15s, transform .12s; pointer-events: none;
  animation: hotBreathe 1.8s ease-in-out infinite; }
@keyframes hotBreathe { 50% { opacity: .85; } }
.hotspot:hover { transform: translateY(-4px); }
.hotspot:hover .hot-ring { opacity: 1; transform: scale(1.04);
  box-shadow: 0 0 26px rgba(53,224,208,.8), inset 0 0 16px rgba(53,224,208,.35); }
.hotspot.gold .hot-ring { border-color: var(--gold);
  box-shadow: 0 0 16px rgba(255,207,63,.5), inset 0 0 12px rgba(255,207,63,.25); }
.hotspot.magenta .hot-ring { border-color: var(--magenta);
  box-shadow: 0 0 16px rgba(255,77,141,.5), inset 0 0 12px rgba(255,77,141,.25); }
.hot-label { position: absolute; left: 50%; bottom: -38px; transform: translateX(-50%);
  white-space: nowrap; font-size: var(--t-xs); color: var(--txt); background: rgba(10,8,20,.92);
  border: 2px solid var(--cyan); padding: 5px 10px; pointer-events: none; }
.hotspot.gold .hot-label { border-color: var(--gold); color: var(--gold); }
.hotspot.magenta .hot-label { border-color: var(--magenta); }
.hot-badge { position: absolute; top: -18px; right: -18px; width: 34px; height: 34px;
  background: var(--gold); color: #3a2c00; border: 3px solid #fff; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--pixel); font-size: 16px; animation: badgeBounce .9s steps(2) infinite; }
@keyframes badgeBounce { 50% { transform: translateY(-6px); } }

/* room action hint */
.room-hint { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%);
  z-index: 40; font-size: var(--t-sm); color: var(--cyan); background: rgba(10,8,20,.85);
  border: 2px solid var(--line); padding: 9px 16px; animation: hintFade 4s ease-out forwards; }
@keyframes hintFade { 0%{opacity:0;} 14%{opacity:1;} 78%{opacity:1;} 100%{opacity:0;} }

/* primary in-world action button (go out) */
.go-out-btn { position: absolute; right: 40px; bottom: 28px; z-index: 50; }

/* by @user floating label */
.by-tag { position: absolute; z-index: 40; font-size: var(--t-xs); color: var(--gold);
  background: rgba(10,8,20,.85); border: 2px solid var(--gold); padding: 5px 9px;
  animation: byTag 3s ease-out forwards; pointer-events: none; white-space: nowrap; }
@keyframes byTag { 0%{opacity:0; transform: translateY(8px) scale(.9);} 12%{opacity:1; transform:none;}
  80%{opacity:1;} 100%{opacity:0;} }

/* ripple / light convergence where new content spawns */
.spawn-fx { position: absolute; z-index: 35; width: 160px; height: 160px;
  transform: translate(-50%,-50%); pointer-events: none; }
.spawn-fx .ring { position: absolute; inset: 0; border: 3px solid var(--gold); border-radius: 50%;
  animation: ripple 1.4s ease-out forwards; }
.spawn-fx .ring:nth-child(2) { animation-delay: .25s; }
.spawn-fx .ring:nth-child(3) { animation-delay: .5s; }
@keyframes ripple { 0%{transform:scale(1.4);opacity:0;} 30%{opacity:.9;}
  100%{transform:scale(.1);opacity:0; box-shadow:0 0 30px var(--gold);} }
.spawn-fx .core { position: absolute; inset: 40%; background: var(--gold); border-radius: 50%;
  box-shadow: 0 0 30px 12px rgba(255,207,63,.7); animation: corePop 1.4s ease-out forwards; }
@keyframes corePop { 0%,60%{opacity:0; transform: scale(0);} 80%{opacity:1; transform: scale(1.3);}
  100%{opacity:0; transform: scale(2.2);} }

/* ============================================================
   EVENT / DECISION CARD (bottom, unified style)
   ============================================================ */
.decision { position: absolute; left: 0; right: 0; bottom: 0; z-index: 70;
  background: linear-gradient(180deg, rgba(10,8,20,0), rgba(10,8,20,.96) 30%);
  padding: 60px 48px 34px; animation: decisionIn .4s ease-out;
  max-height: 70%; overflow-y: auto; }
@keyframes decisionIn { from { transform: translateY(40px); opacity: 0; } }
.decision .d-card { background: rgba(16,13,32,.94); border: 3px solid var(--cyan);
  box-shadow: 0 0 30px rgba(53,224,208,.25), inset 0 0 0 2px rgba(255,255,255,.03);
  padding: 24px 28px; }
.decision .d-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.decision .d-icon { font-size: 38px; }
.decision .d-title { font-size: var(--t-lg); color: #fff; word-break: break-word; line-height: 1.3; }
.decision .d-desc { font-size: var(--t-sm); color: var(--txt-dim); line-height: 1.6;
  margin-bottom: 16px; max-width: 1000px; word-break: break-word; }
.decision .d-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.opt { flex: 1 1 45%; min-width: 200px; }
.decision .d-opts:has(.opt:nth-child(3)) .opt { flex: 1 1 100%; }
.opt .opt-btn { width: 100%; text-align: left; white-space: normal; word-break: break-word;
  padding: 10px 14px; min-height: auto; display: flex; flex-direction: column; }
.opt .opt-btn .opt-main { display: flex; align-items: flex-start; gap: 8px; font-size: var(--t-sm);
  line-height: 1.4; white-space: normal; word-break: break-word; }
.opt .opt-btn .opt-sub { font-size: var(--t-micro); color: var(--txt-faint); margin-top: 6px;
  line-height: 1.5; word-break: break-word; white-space: normal; }
.opt .vote-bar { margin-top: 8px; height: 22px; background: #0c0a1c; border: 2px solid var(--line);
  position: relative; overflow: hidden; display: flex; align-items: center; }
.opt .vote-bar .vfill { position: absolute; inset: 0 auto 0 0; height: 100%;
  background: linear-gradient(90deg, rgba(139,92,246,.7), rgba(53,224,208,.6));
  transition: width .5s steps(6); }
.opt .vote-bar .vtxt { position: relative; font-family: var(--pixel); font-size: 12px;
  color: #fff; padding-left: 8px; z-index: 2; }
.opt.leading .vote-bar { border-color: var(--gold); }
.opt.leading .vote-bar .vfill { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }

/* result text after choosing */
.result-line { font-size: var(--t-lg); color: var(--cyan); margin-top: 6px;
  animation: cmtIn .4s ease-out; }

/* ============================================================
   BROADCAST BANNER (公屏全场通知)
   ============================================================ */
.banner-layer { position: absolute; top: 110px; left: 0; right: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-left: 0; }
.banner { display: flex; align-items: center; gap: 14px; padding: 14px 26px 14px 20px;
  background: linear-gradient(90deg, rgba(255,207,63,.95), rgba(255,77,141,.9));
  color: #2a1500; border: 3px solid #fff3c4; max-width: 84%;
  box-shadow: 0 0 30px rgba(255,207,63,.5); animation: bannerSlide 8s ease-out forwards; }
.banner.big { padding: 20px 34px 20px 26px; border-width: 4px;
  box-shadow: 0 0 50px rgba(255,207,63,.7); animation: bannerSlideBig 8s ease-out forwards; }
.banner .b-icon { font-size: 30px; }
.banner.big .b-icon { font-size: 44px; }
.banner .b-text { font-size: var(--t-md); line-height: 1.4; }
.banner .b-text b { color: #6e1638; }
.banner.big .b-text { font-size: var(--t-lg); }
@keyframes bannerSlide { 0%{transform: translateX(-110%); opacity:0;} 12%{transform:none; opacity:1;}
  82%{transform:none; opacity:1;} 100%{transform: translateX(-20px); opacity:0;} }
@keyframes bannerSlideBig { 0%{transform: translateX(-110%) scale(.9); opacity:0;}
  10%{transform: scale(1.04); opacity:1;} 16%{transform: scale(1);} 82%{opacity:1;}
  100%{transform: scale(1.02); opacity:0;} }

/* ============================================================
   ITEM TOAST (bottom)
   ============================================================ */
.toast-layer { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 95; display: flex; flex-direction: column; gap: 9px; align-items: center; }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  background: rgba(16,13,32,.96); border: 3px solid var(--purple);
  box-shadow: 0 0 22px rgba(139,92,246,.4); animation: toastIn 3s ease-out forwards; }
.toast.lose { border-color: var(--red); box-shadow: 0 0 22px rgba(255,59,92,.4); }
.toast .t-icon { width: 44px; height: 44px; background: var(--bg-raised); border: 2px solid var(--purple);
  display: flex; align-items: center; justify-content: center; font-size: 24px; }
.toast.lose .t-icon { border-color: var(--red); }
.toast .t-text { font-size: var(--t-md); color: var(--txt); }
.toast .t-text b { color: var(--gold); }
@keyframes toastIn { 0%{transform: translateY(30px); opacity:0;} 12%{transform:none; opacity:1;}
  85%{opacity:1;} 100%{transform: translateY(-10px); opacity:0;} }

/* ============================================================
   PHASE TRANSITION
   ============================================================ */
.phase-wipe { position: absolute; inset: 0; z-index: 180; background: var(--bg-void);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px;
  animation: phaseFade 2.2s ease-in-out forwards; }
.phase-wipe .pw-big { font-family: var(--pixel); font-size: 40px; color: var(--gold);
  text-shadow: 0 0 20px rgba(255,207,63,.6); letter-spacing: 2px; text-align:center; }
.phase-wipe .pw-sub { font-size: var(--t-lg); color: var(--txt-dim); }
@keyframes phaseFade { 0%{opacity:0;} 18%{opacity:1;} 78%{opacity:1;} 100%{opacity:0;} }

/* ============================================================
   STORY CARD (fullscreen narrative)
   ============================================================ */
.story { position: absolute; inset: 0; z-index: 170; background: rgba(7,5,15,.97);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 50px 70px; animation: cmtIn .5s ease-out; }
.story .s-illus { width: 560px; height: 260px; border: 3px solid var(--purple);
  background: linear-gradient(135deg, #241a44, #14102a); display: flex; align-items: center;
  justify-content: center; font-size: 120px; box-shadow: 0 0 40px rgba(139,92,246,.4);
  position: relative; overflow: hidden; margin-bottom: 32px; }
.story .s-illus .glowbg { position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(139,92,246,.35), transparent 70%); }
.story .s-text { font-size: var(--t-xl); color: var(--txt); line-height: 1.7; text-align: center;
  max-width: 1100px; min-height: 120px; }
.story .s-text .caret { color: var(--cyan); animation: caret .6s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.story .s-source { font-size: var(--t-md); color: var(--gold); margin-top: 26px; }
.story .s-cont { margin-top: 30px; }

/* ============================================================
   DESTINATION MAP (选择目的地)
   ============================================================ */
.region-map { position: absolute; inset: 0;
  background: linear-gradient(160deg, #14112a 0%, #0e0a1f 100%); padding: 70px 56px 40px;
  overflow-y: auto; }
.region-map .rm-head { font-size: var(--t-lg); color: var(--txt-dim); margin-bottom: 22px; }
.region-map .rm-head b { color: var(--cyan); }
.dest-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.dest-card { position: relative; padding: 22px 22px 20px; background: var(--bg-panel-2);
  border: 3px solid var(--line); cursor: pointer; transition: transform .12s, border-color .12s;
  overflow: hidden; }
.dest-card:hover { transform: translateY(-4px); border-color: var(--cyan); }
.dest-card .dc-thumb { width: 100%; height: 130px; border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 64px; margin-bottom: 14px;
  background: linear-gradient(135deg,#1c1838,#120e26); }
.dest-card .dc-name { font-size: var(--t-lg); color: #fff; margin-bottom: 10px; }
.dest-card .dc-row { display: flex; justify-content: space-between; font-size: var(--t-sm);
  color: var(--txt-dim); margin-bottom: 6px; }
.dest-card .dc-row .danger { color: var(--orange); }
.dest-card .dc-row .reward { color: var(--green); }
.dest-card.generated { border-color: var(--gold); box-shadow: 0 0 24px rgba(255,207,63,.3); }
.dest-card.generated .gen-tag { position: absolute; top: 0; right: 0;
  background: var(--gold); color: #3a2c00; font-size: var(--t-xs); padding: 5px 10px;
  font-family: var(--body); }

/* confirm modal */
.confirm { position: absolute; inset: 0; z-index: 110; background: rgba(7,5,15,.8);
  display: flex; align-items: center; justify-content: center; animation: cmtIn .25s; }
.confirm .cf-box { width: 560px; background: var(--bg-panel-2); border: 3px solid var(--cyan);
  padding: 30px 32px; box-shadow: 0 0 36px rgba(53,224,208,.3); }
.confirm .cf-title { font-size: var(--t-xl); color: #fff; margin-bottom: 14px; }
.confirm .cf-desc { font-size: var(--t-md); color: var(--txt-dim); line-height: 1.6; margin-bottom: 26px; }
.confirm .cf-cost { color: var(--orange); }
.confirm .cf-btns { display: flex; gap: 14px; }
.confirm .cf-btns .btn { flex: 1; }

/* ============================================================
   HEX EXPLORE MAP (探索地图)
   ============================================================ */
.explore { position: absolute; inset: 0; background:
  radial-gradient(900px 600px at 50% 40%, #161130, #0c0820 80%); }
.explore .ap-bar { position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 30; display: flex; align-items: center; gap: 12px;
  background: rgba(10,8,20,.85); border: 2px solid var(--line); padding: 10px 18px; }
.explore .ap-bar .ap-label { font-family: var(--pixel); font-size: var(--t-xs); color: var(--cyan); }
.explore .ap-pips { display: flex; gap: 5px; }
.explore .ap-pip { width: 16px; height: 16px; background: var(--cyan); border: 2px solid var(--cyan);
  box-shadow: 0 0 8px rgba(53,224,208,.6); }
.explore .ap-pip.used { background: transparent; border-color: var(--line); box-shadow: none; }

.hexwrap { position: absolute; inset: 70px 0 70px 0; display: flex; align-items: center; justify-content: center; }
.hexgrid { position: relative; }
.hex { position: absolute; width: 116px; height: 130px; cursor: default;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  display: flex; align-items: center; justify-content: center; font-size: 40px;
  transition: filter .2s, transform .12s; }
.hex .hx-inner { width: 108px; height: 122px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  display: flex; align-items: center; justify-content: center; font-size: 40px; }
.hex.fog .hx-inner { background: #161130; color: rgba(255,255,255,.12); }
.hex.fog { filter: brightness(.6); }
/* 观众端: fog格子的❔要可见 */
body.viewer-mode .hex.fog .hx-inner { color: rgba(255,255,255,.5); font-size: 32px; }
body.viewer-mode .hex.fog { filter: brightness(.8); }
.hex.revealed .hx-inner { background: #221c40; }
.hex.empty .hx-inner { background: #1d1838; }
.hex.adjacent { cursor: pointer; }
.hex.adjacent .hx-inner { background: #2a2350; outline: 2px solid var(--cyan);
  outline-offset: -4px; animation: hexBeckon 1.3s steps(2) infinite; }
@keyframes hexBeckon { 50% { filter: brightness(1.4); } }
.hex.adjacent:hover { transform: scale(1.06); }
.hex.hero .hx-inner { background: #2c2658; outline: 3px solid var(--purple); outline-offset: -5px;
  box-shadow: 0 0 0 2px var(--purple); }
.hex .htype { position: absolute; bottom: 14px; font-size: 11px; font-family: var(--pixel);
  color: var(--gold); }
.hex.generated .hx-inner { outline: 2px solid var(--gold); animation: none; }

/* battle vote display reuse decision component */
.battle-foe { display: flex; align-items: center; justify-content: space-between; padding: 0 60px;
  position: absolute; top: 24%; left: 0; right: 0; z-index: 12; }

/* npc dialog bubble */
.npc-bubble { position: absolute; z-index: 30; max-width: 460px;
  background: rgba(16,13,32,.95); border: 3px solid var(--cyan); padding: 16px 20px;
  font-size: var(--t-md); color: var(--txt); line-height: 1.5; }
.npc-bubble::after { content:""; position: absolute; bottom: -14px; left: 40px;
  border: 8px solid transparent; border-top-color: var(--cyan); }

/* ============================================================
   ENDINGS
   ============================================================ */
.ending { position: absolute; inset: 0; z-index: 160; display: flex; align-items: center;
  justify-content: center; }
.ending.fail { background: radial-gradient(800px 600px at 50% 40%, #2a0a12, #0a0306 85%); }
.ending.win  { background: radial-gradient(900px 700px at 50% 40%, #2e2208, #0a0712 85%); }
.ending .noise { position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noiseShift .25s steps(3) infinite; }
@keyframes noiseShift { 0%{transform:translate(0,0);} 33%{transform:translate(-6px,4px);}
  66%{transform:translate(5px,-5px);} }
.end-card { position: relative; width: 920px; max-width: 88%; padding: 48px 54px; text-align: center;
  animation: endIn .6s ease-out; }
@keyframes endIn { from { transform: scale(.92); opacity: 0; } }
.ending.fail .end-card { background: linear-gradient(180deg, rgba(60,10,20,.92), rgba(24,6,12,.96));
  border: 4px solid var(--red); box-shadow: 0 0 60px rgba(255,59,92,.35); }
.ending.win .end-card { background: linear-gradient(180deg, rgba(60,46,8,.92), rgba(28,22,8,.96));
  border: 4px solid var(--gold); box-shadow: 0 0 70px rgba(255,207,63,.45); }
.end-card .e-title { font-family: var(--pixel); font-size: 30px; line-height: 1.5; margin-bottom: 22px; }
.ending.fail .e-title { color: #ff8a9c; text-shadow: 0 0 18px rgba(255,59,92,.6); }
.ending.win .e-title { color: var(--gold); text-shadow: 0 0 22px rgba(255,207,63,.7); }
.end-card .e-days { font-family: var(--pixel); font-size: var(--t-xl); color: #fff; margin-bottom: 18px; }
.end-card .e-death { font-size: var(--t-lg); color: var(--txt-dim); line-height: 1.6; min-height: 60px;
  margin-bottom: 26px; }
.end-card .e-stats { display: flex; justify-content: center; gap: 40px; margin-bottom: 30px; }
.end-card .e-stat { display: flex; flex-direction: column; gap: 6px; }
.end-card .e-stat .v { font-family: var(--pixel); font-size: var(--t-xl); color: var(--gold); }
.end-card .e-stat .k { font-size: var(--t-sm); color: var(--txt-dim); }
.end-card .e-replay { display: flex; gap: 16px; justify-content: center; }

/* win recap thumbnails */
.recap-row { display: flex; gap: 14px; justify-content: center; margin-bottom: 30px; flex-wrap: wrap; }
.recap { width: 150px; }
.recap .r-thumb { width: 150px; height: 100px; border: 2px solid var(--gold);
  background: linear-gradient(135deg,#2a2208,#161208); display: flex; align-items: center;
  justify-content: center; font-size: 46px; margin-bottom: 6px; }
.recap .r-cap { font-size: var(--t-xs); color: var(--txt-dim); line-height: 1.35; }
.recap .r-src { font-size: var(--t-micro); color: var(--gold); margin-top: 3px; }

/* golden particle convergence */
.particles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.particles i { position: absolute; width: 8px; height: 8px; background: var(--gold);
  box-shadow: 0 0 10px var(--gold); animation: converge 2.4s ease-in infinite; }
@keyframes converge { 0%{opacity:0; transform: translate(0,0) scale(1);}
  20%{opacity:1;} 100%{opacity:0; transform: translate(var(--tx), var(--ty)) scale(.2);} }

/* chat banner row (game over / win in chat) */
.chat-banner { padding: 14px 16px; text-align: center; font-size: var(--t-md);
  border-top: 2px solid; border-bottom: 2px solid; animation: cmtIn .4s; }
.chat-banner.fail { background: rgba(60,10,20,.6); color: #ff8a9c; border-color: var(--red); }
.chat-banner.win { background: rgba(60,46,8,.6); color: var(--gold); border-color: var(--gold); }

/* ============================================================
   SETTLEMENT
   ============================================================ */
.settle { position: absolute; inset: 0; z-index: 165; background: var(--bg-void);
  overflow-y: auto; padding: 0; }
.settle-inner { max-width: 1280px; margin: 0 auto; padding: 50px 60px 90px; }
.settle h1 { font-family: var(--pixel); font-size: 30px; color: var(--gold); text-align: center;
  margin-bottom: 8px; text-shadow: 0 0 20px rgba(255,207,63,.5); }
.settle .sub { text-align: center; color: var(--txt-dim); font-size: var(--t-md); margin-bottom: 44px; }
.settle h2 { font-family: var(--pixel); font-size: var(--t-md); color: var(--cyan); margin: 0 0 22px;
  letter-spacing: 1px; display: flex; align-items: center; gap: 10px; }
.settle h2::before { content:""; width: 16px; height: 16px; background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan); }
.settle section { margin-bottom: 54px; }

/* timeline */
.timeline { position: relative; padding-left: 40px; }
.timeline::before { content:""; position: absolute; left: 13px; top: 6px; bottom: 6px;
  width: 3px; background: var(--line); }
.tl-item { position: relative; margin-bottom: 24px; }
.tl-item::before { content:""; position: absolute; left: -33px; top: 4px; width: 18px; height: 18px;
  background: var(--purple); border: 2px solid var(--bg-void); box-shadow: 0 0 0 2px var(--purple); }
.tl-item .tl-day { font-family: var(--pixel); font-size: var(--t-xs); color: var(--cyan); margin-bottom: 6px; }
.tl-item .tl-evt { font-size: var(--t-md); color: var(--txt); margin-bottom: 5px; }
.tl-item .tl-src { font-size: var(--t-sm); color: var(--gold); }

/* leaderboard */
.lb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.lb-card { background: var(--bg-panel-2); border: 2px solid var(--line); padding: 20px 22px;
  display: flex; gap: 16px; align-items: flex-start; }
.lb-card .lb-medal { font-size: 38px; flex: 0 0 auto; }
.lb-card .lb-body { flex: 1; min-width: 0; }
.lb-card .lb-title { font-size: var(--t-sm); color: var(--cyan); margin-bottom: 8px; }
.lb-card .lb-user { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lb-card .lb-av { width: 38px; height: 38px; background: var(--bg-raised); border: 2px solid var(--purple);
  display: flex; align-items: center; justify-content: center; font-size: 20px; }
.lb-card .lb-name { font-size: var(--t-md); color: #fff; }
.lb-card .lb-count { font-family: var(--pixel); font-size: var(--t-xs); color: var(--gold); }
.lb-card .lb-detail { font-size: var(--t-sm); color: var(--txt-dim); line-height: 1.5; }
.lb-card .lb-shot { margin-top: 10px; padding: 10px 12px; background: #0c0a1c; border: 2px solid var(--gold);
  font-size: var(--t-sm); color: var(--gold); }

/* stats grid */
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat-card { background: var(--bg-panel-2); border: 2px solid var(--line); padding: 22px; text-align: center; }
.stat-card .sc-v { font-family: var(--pixel); font-size: var(--t-xl); color: var(--gold); margin-bottom: 10px; }
.stat-card .sc-k { font-size: var(--t-sm); color: var(--txt-dim); line-height: 1.5; }

.settle-foot { text-align: center; margin-top: 20px; }

/* personal share card */
.share-card { position: absolute; inset: 0; z-index: 200; background: rgba(7,5,15,.92);
  display: flex; align-items: center; justify-content: center; animation: cmtIn .3s; }
.share-inner { width: 460px; background: linear-gradient(180deg,#241a44,#120e26);
  border: 4px solid var(--gold); box-shadow: 0 0 50px rgba(255,207,63,.4); padding: 34px 30px;
  text-align: center; }
.share-inner .sh-head { font-family: var(--pixel); font-size: var(--t-md); color: var(--gold); margin-bottom: 18px; }
.share-inner .sh-av { width: 90px; height: 90px; margin: 0 auto 14px; background: linear-gradient(135deg,#ff4d8d,#8b5cf6);
  border: 3px solid var(--magenta); display: flex; align-items: center; justify-content: center; font-size: 46px; }
.share-inner .sh-name { font-size: var(--t-xl); color: #fff; margin-bottom: 18px; }
.share-inner .sh-stats { display: flex; justify-content: center; gap: 30px; margin-bottom: 18px; }
.share-inner .sh-stat .v { font-family: var(--pixel); font-size: var(--t-lg); color: var(--gold); }
.share-inner .sh-stat .k { font-size: var(--t-xs); color: var(--txt-dim); margin-top: 5px; }
.share-inner .sh-quote { padding: 12px; background: #0c0a1c; border: 2px solid var(--gold);
  font-size: var(--t-sm); color: var(--gold); margin-bottom: 20px; line-height: 1.5; }
.share-inner .sh-close { margin-top: 4px; }

/* countdown bar */
.countdown { height: 10px; background: #0c0a1c; border: 2px solid var(--gold); overflow: hidden;
  margin-top: 12px; }
.countdown .cd-fill { height: 100%; background: var(--gold); width: 100%;
  animation: cd 15s linear forwards; }
@keyframes cd { to { width: 0%; } }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--line); border: 2px solid var(--bg-deep); }
