/* =================================================================
   onlyterp // CHILLVERSE ARCADE — single cohesive stylesheet
   ================================================================= */

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%; width: 100%;
  overflow: hidden;
  background: #050a14;
  font-family: 'Silkscreen', monospace;
  color: #e8f6ff;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

:root {
  --ice-0: #050a14;
  --ice-1: #0a1526;
  --ice-2: #132544;
  --ice-3: #1f3a6a;
  --ice-4: #3f88d1;
  --ice-5: #7cc3ff;
  --ice-6: #b6e3ff;
  --ice-7: #e8f6ff;
  --gold-1: #ffe8a8;
  --gold-2: #ffd86b;
  --gold-3: #d9a93a;
  --gold-4: #8c5e10;
  --orange: #ff7a18;
  --orange-lt: #ffa968;
  --coral: #ff9982;
  --pink: #ffcfd7;
  --mint: #b6f3d6;
  --violet: #c9a0ff;
  --red: #ff4a4a;
  --green: #7ef2a1;
  --night: #0c1a2e;
  --display: 'Fraunces', serif;
  --pixel: 'Silkscreen', monospace;
  --term: 'VT323', monospace;
}

/* ================= STAGE: scales to viewport ================= */
.stage {
  position: fixed;
  left: 50%; top: 50%;
  width: 1600px; height: 1000px;
  transform-origin: center center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(126,188,255,0.25), transparent 70%),
    radial-gradient(ellipse 90% 80% at 50% 100%, rgba(255,216,107,0.06), transparent 70%),
    linear-gradient(180deg, #0a1526 0%, #132544 40%, #1f3a6a 100%);
  overflow: hidden;
}

/* ================= SKY LAYER ================= */
.sky { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.aurora {
  position: absolute; width: 150%; height: 60%; top: 0; left: -25%;
  filter: blur(24px); opacity: 0.45;
  mix-blend-mode: screen;
  will-change: transform;
}
.aurora.a1 { background: radial-gradient(ellipse at 30% 50%, #7cc3ff, transparent 60%); animation: aur-1 18s ease-in-out infinite; }
.aurora.a2 { background: radial-gradient(ellipse at 70% 40%, #b6f3d6, transparent 60%); animation: aur-2 22s ease-in-out infinite; }
.aurora.a3 { background: radial-gradient(ellipse at 50% 60%, #c9a0ff, transparent 60%); animation: aur-3 26s ease-in-out infinite; opacity: 0.35; }
@keyframes aur-1 { 0%,100% { transform: translate3d(-5%, 0, 0); } 50% { transform: translate3d(8%, 4%, 0); } }
@keyframes aur-2 { 0%,100% { transform: translate3d(5%, 2%, 0); } 50% { transform: translate3d(-6%, -4%, 0); } }
@keyframes aur-3 { 0%,100% { transform: translate3d(-8%, 3%, 0); } 50% { transform: translate3d(6%, -2%, 0); } }

.stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff 40%, transparent),
    radial-gradient(1px 1px at 25% 45%, #fff 40%, transparent),
    radial-gradient(1px 1px at 70% 15%, #fff 40%, transparent),
    radial-gradient(2px 2px at 85% 30%, #fff 40%, transparent),
    radial-gradient(1px 1px at 45% 55%, #fff 40%, transparent),
    radial-gradient(1px 1px at 90% 65%, #fff 40%, transparent),
    radial-gradient(1px 1px at 15% 70%, #fff 40%, transparent),
    radial-gradient(2px 2px at 60% 5%, #fff 40%, transparent);
  animation: twinkle 3s ease-in-out infinite alternate;
  opacity: 0.6;
}
@keyframes twinkle { to { opacity: 0.9; } }

#snow { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

/* cave silhouette */
.cave { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cave .ic  { fill: #9ed4ff; opacity: 0.35; }
.cave .cr  { fill: #5a9ad6; opacity: 0.3; }
.cave .cr2 { fill: #8ec5f5; opacity: 0.45; }
.cave .ground { fill: #dde8f2; opacity: 0.95; }
.cave .ground2 { fill: #b6ccd9; }

/* ================= HUD ================= */
.hud {
  position: absolute; top: 20px; left: 24px; right: 24px; z-index: 50;
  display: flex; align-items: flex-start; justify-content: space-between;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }

.hud-left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; max-width: 600px; }
.hud-right { display: flex; gap: 10px; align-items: center; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(10, 20, 38, 0.85);
  border: 2px solid var(--ice-4);
  box-shadow: 0 3px 0 var(--ice-1);
  font-size: 11px; letter-spacing: 2px;
  color: var(--ice-7);
}
.pill.gold { border-color: var(--gold-3); box-shadow: 0 3px 0 var(--gold-4); }
.pill.gold .pill-label { color: var(--gold-2); }
.pill.gem   { border-color: #7eb8ff; }
.pill.gem   .pill-label { color: var(--ice-6); }
.pill .pi { font-size: 16px; }
.pill .coin-svg { width: 18px; height: 18px; }
.pill .bar { width: 60px; height: 8px; background: rgba(0,0,0,0.6); border: 1px solid var(--ice-4); }
.pill .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ice-5), var(--ice-7)); transition: width .6s; }

.title-box {
  background: rgba(10, 20, 38, 0.9);
  border: 3px solid var(--gold-3);
  box-shadow: 0 4px 0 var(--gold-4), 0 0 30px rgba(255,216,107,0.2);
  padding: 8px 22px;
  text-align: center;
}
.tb-tag { font-size: 9px; letter-spacing: 3px; color: var(--gold-2); }
.tb-title { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 22px; color: var(--ice-7); letter-spacing: -0.5px; line-height: 1; margin: 2px 0; }
.tb-sub { font-size: 8px; letter-spacing: 2px; color: var(--ice-5); }

.icon-btn {
  width: 38px; height: 38px;
  background: rgba(10, 20, 38, 0.85);
  border: 2px solid var(--ice-4);
  color: var(--ice-7);
  font-family: var(--pixel);
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ice-1);
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s, border-color .15s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--gold-2); }
.icon-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--ice-1); }
.icon-btn.on { border-color: var(--gold-2); color: var(--gold-2); }

/* ================= ROOM NAV (left rail) ================= */
.room-nav {
  position: absolute; left: 24px; top: 50%; transform: translateY(-50%);
  z-index: 40;
  display: flex; flex-direction: column; gap: 8px;
}
.rn-btn {
  width: 64px; padding: 10px 4px;
  background: rgba(10, 20, 38, 0.85);
  border: 2px solid var(--ice-4);
  color: var(--ice-7);
  font-family: var(--pixel);
  font-size: 8px; letter-spacing: 1px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 3px 0 var(--ice-1);
  transition: transform .1s, border-color .15s;
}
.rn-btn:hover { transform: translateX(4px); border-color: var(--gold-2); }
.rn-btn.active {
  background: var(--gold-2); color: var(--night);
  border-color: var(--gold-4); box-shadow: 0 3px 0 var(--gold-4);
}
.rn-btn .ic { font-size: 18px; line-height: 1; }
.rn-btn.locked { opacity: 0.6; filter: grayscale(0.5); }

/* ================= WORLD / ROOMS ================= */
.world {
  position: absolute; inset: 80px 0 0 0; z-index: 10;
  display: flex;
  transition: transform .7s cubic-bezier(.7, .2, .2, 1);
  will-change: transform;
}
.room {
  flex: 0 0 1600px; height: 100%;
  position: relative;
  padding: 40px 80px 60px 120px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
}

/* ============== HUB ROOM ============== */
.hub-room {
  grid-template-areas:
    "wordmark wordmark"
    "penguin case"
    "nodes nodes";
}
.wordmark-block { grid-area: wordmark; text-align: center; margin-top: 6px; }
.wordmark {
  font-family: var(--display); font-weight: 900; font-style: italic;
  font-size: 78px; margin: 0;
  color: transparent;
  background: linear-gradient(180deg, #fff 0%, var(--ice-6) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 2px var(--night);
  letter-spacing: -2px; line-height: 0.9;
  text-shadow: 0 4px 0 var(--ice-3), 0 8px 20px rgba(0, 0, 0, 0.3);
}
.wm-sub {
  font-family: var(--pixel); font-size: 10px; letter-spacing: 5px;
  color: var(--gold-2); margin-top: 4px;
}

/* Penguin block */
.penguin-block {
  grid-area: penguin;
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.penguin-stage {
  position: relative;
  width: 420px; height: 440px;
  display: flex; align-items: flex-end; justify-content: center;
}
.pengu-shadow {
  position: absolute; bottom: 10px; left: 50%;
  transform: translateX(-50%);
  width: 240px; height: 24px;
  background: radial-gradient(ellipse, rgba(10, 18, 34, 0.6), transparent 70%);
  animation: shadow-bob 2.4s ease-in-out infinite;
}
@keyframes shadow-bob { 50% { transform: translateX(-50%) scale(0.88); opacity: 0.7; } }

.pengu {
  position: relative;
  width: 360px; height: 360px;
  cursor: pointer;
  animation: pengu-bob 2.4s ease-in-out infinite;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.4));
  transform-origin: center bottom;
  will-change: transform;
  touch-action: manipulation;
  background: transparent;
}
@keyframes pengu-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-10px) rotate(1deg); }
}
.pengu img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.pengu.squish { animation: pengu-squish 0.3s ease-out; }
.pengu.spin   { animation: pengu-spin 0.6s ease-out; }
@keyframes pengu-squish {
  0%   { transform: translateY(-10px) scale(1); }
  40%  { transform: translateY(6px) scale(1.12, 0.88); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes pengu-spin {
  0%   { transform: rotate(0); }
  100% { transform: rotate(360deg) scale(1.1); }
}
.pengu.happy { animation: pengu-happy 0.5s ease; }
@keyframes pengu-happy {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(8deg) translateY(-8px); }
  75% { transform: rotate(-8deg) translateY(-8px); }
}

.pengu-prompt {
  position: absolute; top: -10px; left: 50%;
  transform: translateX(-50%);
  background: var(--gold-2); color: var(--night);
  font-family: var(--pixel); font-size: 10px; letter-spacing: 2px;
  padding: 6px 14px; border: 2px solid var(--gold-4);
  box-shadow: 0 3px 0 var(--gold-4);
  z-index: 5; white-space: nowrap;
  animation: bounce 1s ease-in-out infinite;
}
.pengu-prompt.gone { opacity: 0; pointer-events: none; transition: opacity .4s; }
.pengu-prompt::after {
  content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-top: 8px solid var(--gold-4);
}
@keyframes bounce { 50% { transform: translate(-50%, -4px); } }

.reactions { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: visible; }
.reaction {
  position: absolute;
  font-family: var(--display); font-style: italic; font-weight: 900;
  font-size: 22px;
  color: var(--gold-2);
  text-shadow: 2px 2px 0 var(--night), 0 0 10px rgba(255,216,107,0.5);
  white-space: nowrap;
  animation: reaction-pop 1.2s cubic-bezier(.5, 1.6, .5, 1) forwards;
  transform: translate(-50%, -50%);
}
@keyframes reaction-pop {
  0%   { transform: translate(-50%, -50%) scale(0.3) rotate(-15deg); opacity: 0; }
  20%  { transform: translate(-50%, -50%) scale(1.2) rotate(5deg);  opacity: 1; }
  60%  { transform: translate(-50%, -120%) scale(1) rotate(-3deg);  opacity: 1; }
  100% { transform: translate(-50%, -200%) scale(0.85) rotate(0deg); opacity: 0; }
}

/* Platform */
.platform {
  display: flex; gap: 2px;
  background: transparent;
  margin-top: -6px;
}
.platform span {
  width: 50px; height: 14px;
  background: linear-gradient(180deg, #dde8f2 0%, #6b93b5 100%);
  border: 2px solid var(--night);
  box-shadow: 0 4px 0 var(--ice-3), inset 0 2px 0 rgba(255,255,255,0.4);
}

/* ============== AP CASE ============== */
.case-block {
  grid-area: case;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
}
.case-label {
  text-align: center; width: 100%;
}
.cl-top {
  display: block; font-size: 10px; letter-spacing: 4px; color: var(--gold-2);
}
.cl-bottom {
  display: block;
  font-family: var(--display); font-style: italic; font-weight: 900;
  font-size: 26px; color: var(--ice-7);
  text-shadow: 0 2px 0 var(--ice-3);
  letter-spacing: -0.5px; margin-top: 2px;
}

.display-case {
  position: relative;
  width: 440px; height: 440px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 216, 107, 0.18), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.6), transparent 60%),
    linear-gradient(180deg, rgba(30, 50, 90, 0.9) 0%, rgba(10, 20, 38, 0.95) 100%);
  border: 4px solid var(--gold-3);
  box-shadow:
    0 0 40px rgba(255, 216, 107, 0.2),
    0 12px 0 var(--gold-4),
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 0 40px rgba(0,0,0,0.4);
  overflow: hidden;
}
.case-glass {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.08) 45%, transparent 55%, rgba(255,255,255,0.04) 70%, transparent 80%);
  z-index: 5;
}
.case-light {
  position: absolute; width: 200%; height: 4px;
  background: radial-gradient(ellipse, rgba(255,255,255,0.2), transparent 60%);
  left: -50%; pointer-events: none; z-index: 4;
}
.case-light.l1 { top: 8%; animation: light-move 8s linear infinite; }
.case-light.l2 { top: 20%; animation: light-move 11s linear infinite reverse; opacity: 0.5; }
@keyframes light-move { 0% { transform: translateX(-20%); } 100% { transform: translateX(20%); } }

.pedestal {
  position: absolute; left: 50%; bottom: 30px;
  transform: translateX(-50%);
  width: 280px; z-index: 1;
}
.ped-top {
  height: 8px;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-3));
  border: 2px solid var(--gold-4);
}
.ped-mid {
  height: 26px; width: 92%; margin: 0 auto;
  background: linear-gradient(180deg, var(--gold-3), var(--gold-4));
  border-left: 2px solid var(--gold-4); border-right: 2px solid var(--gold-4);
}
.ped-base {
  height: 10px;
  background: linear-gradient(180deg, var(--gold-4), #4a3208);
  border: 2px solid #4a3208;
}

.watch-stage {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -58%);
  width: 260px; height: 260px;
  z-index: 2;
}
.watch {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  opacity: 0; transform: scale(0.6) rotateY(180deg);
  transition: opacity .5s, transform .6s cubic-bezier(.5, 1.4, .5, 1);
  pointer-events: none;
}
.watch.active { opacity: 1; transform: scale(1) rotateY(0deg); pointer-events: auto; }

.bracelet {
  display: flex; justify-content: center; gap: 3px;
  width: 170px;
}
.bracelet span {
  width: 28px; height: 12px;
  background: linear-gradient(180deg, #e8eef5, #8a98ab);
  border: 1px solid #4a5868;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.bracelet.bottom span { background: linear-gradient(0deg, #e8eef5, #8a98ab); }
.bracelet.iced span    { background: linear-gradient(180deg, #fff, #c9d9f0); box-shadow: inset 0 1px 2px rgba(255,255,255,0.7), 0 0 4px #8ac5f0; }
.bracelet.rubber span  { background: linear-gradient(180deg, #2a2e36, #0c0f14); border-color: #000; }
.bracelet.skeleton span{ background: linear-gradient(180deg, #d9a93a, #4a3208); border-color: #2a1a04; }

.watch-body {
  position: relative;
  width: 210px; height: 210px;
  margin: -4px 0;
  filter: drop-shadow(0 12px 16px rgba(0,0,0,0.5));
}
.bezel { position: absolute; inset: 0; }
.dial {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 132px; height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #2a3040, #0f1218);
  box-shadow: inset 0 0 14px rgba(0,0,0,0.8);
  overflow: hidden;
}
.tapisserie {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 2px);
  background-size: 6px 6px;
  opacity: 0.7;
}
.brand {
  position: absolute; left: 50%; top: 22%;
  transform: translateX(-50%);
  font-family: var(--display); font-weight: 900; font-size: 8px;
  color: var(--ice-6); text-align: center; line-height: 1;
  letter-spacing: 0.5px;
}
.subtext {
  position: absolute; left: 50%; top: 68%;
  transform: translateX(-50%);
  font-family: var(--pixel); font-size: 5px;
  color: var(--ice-6); letter-spacing: 1px; text-align: center;
}
.hand {
  position: absolute; left: 50%; top: 50%;
  transform-origin: 50% 100%;
  background: var(--ice-6);
  border-radius: 2px;
}
.hand.hour { width: 3px; height: 30px; margin-left: -1.5px; margin-top: -30px; }
.hand.min  { width: 2px; height: 44px; margin-left: -1px; margin-top: -44px; }
.hand.sec  { width: 1.5px; height: 50px; margin-left: -0.75px; margin-top: -50px; background: var(--gold-2); box-shadow: 0 0 4px var(--gold-2); }
.pivot {
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px;
  margin-left: -3px; margin-top: -3px;
  background: var(--gold-2); border-radius: 50%;
  box-shadow: 0 0 4px rgba(0,0,0,0.8);
}
.date-window {
  position: absolute; right: 8%; top: 50%;
  transform: translateY(-50%);
  background: #fff; color: #000;
  font-family: var(--pixel); font-size: 7px;
  padding: 1px 3px;
  border: 0.5px solid #333;
}

/* Index markers */
.idx {
  position: absolute; left: 50%; top: 50%;
  width: 2px; height: 8px;
  margin-left: -1px; margin-top: -4px;
  background: var(--ice-6);
  transform-origin: 50% 50%;
}
.idx::before {
  content: ''; position: absolute; left: 0; right: 0;
  height: 8px; top: -42px; background: inherit;
}

/* Iced variant */
.dial.iced {
  background: radial-gradient(circle at 30% 30%, #eef4fc 0%, #b6c8de 60%, #6a85ab 100%);
  box-shadow: inset 0 0 20px rgba(255,255,255,0.4), 0 0 20px rgba(220, 235, 255, 0.4);
}
.dial.iced .tapisserie {
  background-image: radial-gradient(circle, rgba(60,90,130,0.15) 1px, transparent 2px);
  background-size: 5px 5px;
}
.dial.iced .brand, .dial.iced .subtext { color: #3a5878; }
.ice-sparkle {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.9) 1px, transparent 2px),
    radial-gradient(circle at 70% 20%, rgba(255,255,255,0.9) 1px, transparent 2px),
    radial-gradient(circle at 50% 70%, rgba(255,255,255,0.9) 1px, transparent 2px),
    radial-gradient(circle at 85% 60%, rgba(255,255,255,0.9) 1px, transparent 2px),
    radial-gradient(circle at 30% 80%, rgba(255,255,255,0.9) 1px, transparent 2px),
    radial-gradient(circle at 15% 55%, rgba(255,255,255,0.9) 1px, transparent 2px);
  animation: ice-twinkle 2s ease-in-out infinite alternate;
}
@keyframes ice-twinkle { to { opacity: 0.5; } }

/* Offshore variant */
.dial.offshore {
  background: radial-gradient(circle at 30% 30%, #2a2e36 0%, #0a0c12 100%);
}
.dial.offshore .brand { color: var(--orange-lt); top: 18%; }
.dial.offshore .subtext { color: var(--orange-lt); }
.mega-tap {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.1) 2px, transparent 3px);
  background-size: 10px 10px;
}
.sub-dial {
  position: absolute;
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1a1e24, #050608);
  border: 1px solid rgba(255,255,255,0.15);
}
.sub-dial.sd1 { left: 14%; top: 40%; }
.sub-dial.sd2 { right: 14%; top: 40%; }
.sub-dial.sd3 { left: 50%; top: 74%; transform: translateX(-50%); }
.hand.sec.orange { background: var(--orange); box-shadow: 0 0 6px var(--orange); }

/* Concept variant */
.dial.concept {
  background: radial-gradient(circle at 50% 50%, #0a0c12, #000);
}
.gear {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,216,107,0.3), rgba(217,169,58,0.1));
  border: 1px solid rgba(217,169,58,0.5);
}
.gear::before {
  content: ''; position: absolute; inset: 2px;
  border-radius: 50%; border: 1px dashed rgba(255,216,107,0.4);
}
.gear.g1 { width: 36px; height: 36px; left: 18%; top: 22%; animation: spin-gear 8s linear infinite; }
.gear.g2 { width: 42px; height: 42px; right: 14%; top: 52%; animation: spin-gear 10s linear infinite reverse; }
.gear.g3 { width: 30px; height: 30px; left: 28%; bottom: 16%; animation: spin-gear 6s linear infinite; }
@keyframes spin-gear { to { transform: rotate(360deg); } }
.bridge {
  position: absolute; left: 10%; top: 50%;
  width: 80%; height: 8px;
  background: linear-gradient(90deg, transparent, rgba(217,169,58,0.4), transparent);
  transform: translateY(-50%) rotate(-20deg);
}
.dial.concept .brand { color: var(--gold-2); }

/* Case nav */
.watch-nav {
  display: flex; align-items: center; gap: 14px;
}
.wn-btn {
  width: 40px; height: 40px;
  background: var(--ice-4); color: var(--ice-7);
  border: 2px solid var(--night); cursor: pointer;
  font-size: 14px;
  box-shadow: 0 3px 0 var(--night);
}
.wn-btn:hover { background: var(--gold-2); color: var(--night); }
.wn-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--night); }
.watch-dots { display: flex; gap: 6px; }
.wd {
  width: 10px; height: 10px; background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
}
.wd.active { background: var(--gold-2); border-color: var(--gold-4); box-shadow: 0 0 8px var(--gold-2); }

.price-tag {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 18px;
  background: rgba(0,0,0,0.5);
  border: 2px dashed var(--gold-3);
  font-family: var(--pixel);
}
.pt-label { font-size: 9px; letter-spacing: 3px; color: var(--ice-5); }
.pt-value { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 24px; color: var(--gold-2); }

/* Nodes */
.nodes-block {
  grid-area: nodes;
  display: flex; justify-content: center;
  padding: 0 20px 40px;
}
.node-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 1100px;
}
.gnode {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(10,20,38,0.85);
  border: 2px solid var(--ice-4);
  padding: 10px 6px;
  text-decoration: none; color: var(--ice-7);
  box-shadow: 0 3px 0 var(--ice-1);
  transition: transform .12s, border-color .15s, background .15s;
  cursor: pointer;
  position: relative;
}
.gnode:hover {
  transform: translateY(-4px);
  border-color: var(--gold-2);
  background: rgba(20, 38, 70, 0.95);
}
.gnode:hover .gn-reward { opacity: 1; transform: translateY(0); }
.gn-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.gn-name { font-size: 9px; letter-spacing: 1px; color: var(--ice-7); }
.gn-sub  { font-size: 7px; letter-spacing: 1px; color: var(--ice-5); margin-top: 2px; }
.gn-reward {
  position: absolute; top: -10px; right: -10px;
  font-size: 8px; letter-spacing: 1px;
  background: var(--gold-2); color: var(--night);
  padding: 2px 6px; border: 2px solid var(--gold-4);
  opacity: 0; transform: translateY(6px);
  transition: opacity .15s, transform .15s;
}

/* ============== VAULT ROOM ============== */
.vault-room {
  grid-template-areas:
    "title title"
    "grid grid"
    "foot foot";
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
}
.vault-title-block { grid-area: title; text-align: center; }
.vault-title {
  font-family: var(--display); font-style: italic; font-weight: 900;
  font-size: 72px; margin: 0;
  color: var(--gold-1);
  text-shadow: 0 6px 0 var(--gold-4), 0 10px 30px rgba(255,216,107,0.3);
  letter-spacing: -2px; line-height: 0.9;
}
.vault-sub {
  font-size: 10px; letter-spacing: 5px; color: var(--ice-5); margin-top: 6px;
}
.vault-grid {
  grid-area: grid;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  overflow-y: auto;
  padding-right: 6px;
}
.vcard {
  background: linear-gradient(180deg, rgba(20, 38, 70, 0.95), rgba(10,20,38, 0.95));
  border: 3px solid var(--ice-4);
  box-shadow: 0 6px 0 var(--ice-1);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .15s, border-color .15s;
  cursor: pointer;
}
.vcard:hover { transform: translateY(-4px); border-color: var(--gold-2); }
.vc-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px;
  background: rgba(0,0,0, 0.4);
  border-bottom: 2px solid var(--ice-4);
  font-size: 9px; letter-spacing: 2px;
}
.vc-num { color: var(--gold-2); }
.vc-disp {
  height: 180px;
  background:
    radial-gradient(ellipse at center, rgba(126,188,255,0.15), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.vc-disp::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
  pointer-events: none;
}
.vc-disp .watch { transform: scale(0.55); opacity: 1; position: relative; pointer-events: auto; }
.vc-disp .watch.active { transform: scale(0.55); }
.vc-body { padding: 10px 12px; flex: 1; }
.vc-ref {
  font-family: var(--term); font-size: 12px; color: var(--ice-5);
  margin-bottom: 4px;
}
.vc-story {
  font-family: var(--display); font-size: 11px; line-height: 1.35; font-style: italic;
  color: var(--ice-7); margin-bottom: 8px; text-wrap: pretty;
}
.vc-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 6px; border-top: 1px dashed rgba(182, 227, 255, 0.3);
}
.vc-price {
  font-family: var(--display); font-weight: 900; font-style: italic;
  font-size: 18px; color: var(--gold-2);
}

/* ============== STUDIO ROOM ============== */
.studio-room {
  grid-template-areas:
    "title title"
    "wall wall"
    "foot foot";
  grid-template-columns: 1fr;
}
.studio-title { grid-area: title; text-align: center; }
.tv-wall {
  grid-area: wall;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  gap: 18px;
  overflow-y: auto;
  padding-right: 6px;
}
.tv {
  position: relative;
  cursor: pointer; text-decoration: none; color: inherit;
  transition: transform .12s;
}
.tv:hover { transform: translateY(-6px) rotate(-1deg); }
.tv-bezel {
  background: linear-gradient(180deg, #2a3040, #0c1220);
  border: 3px solid var(--ice-4);
  padding: 10px;
  box-shadow: 0 6px 0 var(--ice-1), inset 0 2px 0 rgba(255,255,255,0.1);
  border-radius: 6px;
}
.tv-screen {
  aspect-ratio: 4/3;
  background: #000;
  border: 2px solid #050811;
  border-radius: 4px;
  position: relative; overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.9);
}
.tv-static {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, var(--ch) 0%, transparent 60%);
  opacity: 0.25; animation: flick 4s infinite;
}
@keyframes flick {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 0.35; }
  72%      { opacity: 0.15; }
}
.tv-scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.3) 2px, rgba(0,0,0,0.3) 3px);
  pointer-events: none;
}
.tv-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px; text-align: center; gap: 6px;
}
.tv-logo {
  font-family: var(--display); font-weight: 900; font-style: italic;
  font-size: 26px;
  color: var(--ch);
  text-shadow: 0 0 16px var(--ch), 2px 2px 0 rgba(0,0,0,0.8);
  letter-spacing: -1px;
}
.tv-show {
  font-family: var(--term); font-size: 12px;
  color: var(--ice-5); letter-spacing: 1px;
}
.tv-plat-icon {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--ch) 22%, #000 60%);
  border-radius: 50%;
  border: 2px solid var(--ch);
  box-shadow: 0 0 20px var(--ch), inset 0 0 12px rgba(0,0,0,0.5);
  margin-bottom: 4px;
}
.tv-plat-icon svg { filter: drop-shadow(0 0 6px var(--ch)); }
.tv-corner {
  position: absolute; top: 8px; left: 8px; right: 8px;
  display: flex; justify-content: space-between;
  font-size: 7px; letter-spacing: 1px;
}
.tv-rec { color: #ff4a4a; animation: blink 1s infinite; }
.tv-ch  { color: var(--ice-5); }
@keyframes blink { 50% { opacity: 0.3; } }

.tv-label {
  margin-top: 8px; padding: 6px 10px;
  display: flex; justify-content: space-between;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--ice-4);
  font-size: 9px; letter-spacing: 1px;
}
.tv-handle { color: var(--ice-5); }

/* ============== BEACH ROOM ============== */
.beach-room {
  grid-template-areas:
    "title title"
    "body body"
    "foot foot";
  grid-template-columns: 1fr;
  background:
    linear-gradient(180deg, #ff7a9e 0%, #ffb088 50%, #ffe7a8 70%, #3a9dc4 70%, #1c4d78 100%);
  overflow: hidden;
  position: relative;
}
.beach-sun {
  position: absolute; top: 12%; right: 20%;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, #fff2a8 0%, #ffd86b 60%, transparent 75%);
  box-shadow: 0 0 80px rgba(255,216,107,0.7);
  animation: sun-pulse 4s infinite alternate;
}
@keyframes sun-pulse { to { transform: scale(1.1); } }
.palm {
  position: absolute; bottom: 18%;
  font-size: 140px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
  transform-origin: bottom center;
  animation: palm-sway 4s infinite alternate ease-in-out;
}
.palm.p1 { left: 8%; }
.palm.p2 { right: 10%; font-size: 110px; }
@keyframes palm-sway { to { transform: rotate(-6deg); } }

.beach-title-block { grid-area: title; text-align: center; position: relative; z-index: 2; }
.beach-title {
  font-family: var(--display); font-style: italic; font-weight: 900;
  font-size: 92px; margin: 0; color: #fff;
  text-shadow: 0 6px 0 #c54d68, 0 0 30px rgba(255,255,255,0.5);
  letter-spacing: -2px; line-height: 0.9;
}
.beach-sub {
  display: inline-block; margin-top: 6px;
  padding: 4px 16px;
  background: rgba(197,77,104,0.6);
  border: 2px dashed #fff;
  font-size: 10px; letter-spacing: 4px; color: #fff;
}
.beach-body {
  grid-area: body;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; position: relative; z-index: 2;
}
.beach-msg {
  font-family: var(--display); font-style: italic; font-size: 22px;
  color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,0.3);
  max-width: 600px; text-align: center; line-height: 1.4;
  text-wrap: pretty;
}
.beach-drink {
  font-size: 120px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
  animation: drink-bob 2s ease-in-out infinite;
  cursor: pointer;
}
@keyframes drink-bob { 50% { transform: translateY(-10px) rotate(5deg); } }

/* ============== GAME ROOM (ice fishing) ============== */
.game-room {
  grid-template-areas:
    "title title"
    "arena side"
    "foot foot";
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto 1fr auto;
}
.game-title-block { grid-area: title; text-align: center; }
.game-arena-wrap {
  grid-area: arena;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.arena {
  width: 100%; max-width: 780px; aspect-ratio: 5/4;
  background: #0a1525;
  border: 4px solid var(--ice-4);
  box-shadow: 0 8px 0 var(--ice-1), inset 0 0 60px rgba(126,188,255,0.15);
  position: relative; overflow: hidden;
}
#game-canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.game-overlay {
  position: absolute; inset: 0;
  background: rgba(10,20,38,0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; text-align: center;
  transition: opacity .3s;
}
.game-overlay.hide { opacity: 0 !important; pointer-events: none; visibility: hidden; }
.go-big {
  font-family: var(--display); font-style: italic; font-weight: 900;
  font-size: 64px; color: var(--gold-2);
  text-shadow: 0 6px 0 var(--gold-4); letter-spacing: -2px;
}
.go-msg { font-size: 10px; letter-spacing: 3px; color: var(--ice-6); }
.btn-primary {
  font-family: var(--pixel); font-size: 12px; letter-spacing: 2px;
  padding: 14px 28px;
  background: var(--gold-2); color: var(--night);
  border: 3px solid var(--gold-4); cursor: pointer;
  box-shadow: 0 4px 0 var(--gold-4);
  transition: transform .1s;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 0 0 var(--gold-4); }

.game-side {
  grid-area: side;
  display: flex; flex-direction: column; gap: 10px;
  padding-top: 30px;
}
.game-stat {
  padding: 12px 16px;
  background: rgba(10,20,38,0.85);
  border: 2px solid var(--ice-4);
  box-shadow: 0 3px 0 var(--ice-1);
  display: flex; flex-direction: column; gap: 2px;
}
.gs-label { font-size: 9px; letter-spacing: 3px; color: var(--ice-5); }
.gs-value { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 34px; color: var(--gold-2); }
.game-hint {
  padding: 14px;
  background: rgba(10,20,38,0.85);
  border: 2px dashed var(--ice-4);
  font-size: 9px; letter-spacing: 2px; color: var(--ice-5);
  line-height: 1.8;
}
.game-hint kbd {
  display: inline-block; padding: 2px 6px;
  background: var(--ice-1); border: 1px solid var(--ice-4);
  margin: 0 2px; color: var(--ice-6);
}

/* ============== DRESS-UP INVENTORY ============== */
.inv-drawer {
  position: absolute;
  right: -208px;                          /* panel hidden past right edge */
  top: 180px;
  z-index: 45;
  display: flex; align-items: flex-start;
  transition: right .35s cubic-bezier(.7,.2,.2,1);
  pointer-events: none;
  opacity: 0;
}
.inv-drawer.hub-on { pointer-events: auto; opacity: 1; }
.inv-drawer.open   { right: 0; }

.inv-tab {
  /* vertical tab on left of drawer, click to toggle */
  writing-mode: vertical-rl; transform: rotate(180deg);
  background: rgba(10,20,38,0.92);
  border: 2px solid var(--ice-4);
  border-right: 0;
  color: var(--gold-2);
  font-family: var(--term);
  font-size: 10px; letter-spacing: 3px;
  padding: 14px 7px;
  cursor: pointer;
  margin-top: 10px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: -4px 4px 0 var(--ice-1);
  transition: color .15s, border-color .15s;
}
.inv-tab:hover { color: #fff; border-color: var(--gold-2); }
.inv-tab-icon { font-size: 18px; transform: rotate(-180deg); }  /* re-upright */
.inv-drawer.open .inv-tab-label::after { content: ' ▸'; color: var(--gold-2); }

.inv-panel {
  width: 208px;
  background: rgba(10,20,38,0.96);
  border: 2px solid var(--ice-4);
  padding: 12px;
  box-shadow: 0 6px 0 var(--ice-1), 0 0 24px rgba(126,188,255,0.15);
}
.inv-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; letter-spacing: 2px; color: var(--gold-2);
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--ice-4);
  margin-bottom: 10px;
}
.inv-reset {
  font-size: 8px; letter-spacing: 1px;
  padding: 3px 8px;
  background: transparent; color: var(--ice-5);
  border: 1px solid var(--ice-4); cursor: pointer;
}
.inv-reset:hover { color: var(--coral); border-color: var(--coral); }
.inv-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.inv-item {
  aspect-ratio: 1;
  background: rgba(255,255,255,0.04);
  border: 2px solid transparent;
  cursor: grab;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  transition: background .1s, border-color .1s, transform .1s;
  position: relative;
}
.inv-item:hover { background: rgba(182,227,255,0.15); border-color: var(--ice-5); transform: scale(1.1); }
.inv-item.on { border-color: var(--gold-2); background: rgba(255,216,107,0.12); }
.inv-item::after {
  content: attr(data-label);
  position: absolute; bottom: -18px; left: 50%;
  transform: translateX(-50%);
  font-size: 7px; letter-spacing: 1px;
  background: var(--night); color: var(--ice-6);
  padding: 2px 6px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .15s;
  z-index: 10;
}
.inv-item:hover::after { opacity: 1; }

.dress-layer {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
}
.dress-item {
  position: absolute;
  font-size: 90px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  pointer-events: auto;
  cursor: pointer;
  transition: transform .15s;
  transform-origin: center center;
}
.dress-item:hover { filter: drop-shadow(0 6px 12px rgba(255,80,80,0.6)) drop-shadow(0 4px 8px rgba(0,0,0,0.5)); }
.pengu.drop-target { filter: drop-shadow(0 0 28px var(--gold-2)) brightness(1.2); }

/* ============== WATCH DETAIL MODAL ============== */
.modal {
  position: absolute; inset: 0; z-index: 500;
  display: none; align-items: center; justify-content: center;
}
.modal.on { display: flex; animation: modal-in .3s; }
@keyframes modal-in { from { opacity: 0; } to { opacity: 1; } }
.modal-bg {
  position: absolute; inset: 0;
  background: rgba(5,10,22,0.88);
  backdrop-filter: blur(6px);
}
.modal-panel {
  position: relative; z-index: 1;
  width: 1100px; max-width: 94%;
  max-height: 88%;
  background: linear-gradient(180deg, #152a4e, #0a1526);
  border: 4px solid var(--gold-2);
  box-shadow: 0 0 60px rgba(255,216,107,0.3), 0 12px 0 var(--ice-1);
  display: grid; grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
.m-close {
  position: absolute; top: 12px; right: 12px; z-index: 10;
  width: 36px; height: 36px;
  background: var(--ice-1); color: var(--ice-7);
  border: 2px solid var(--ice-4);
  cursor: pointer; font-family: var(--pixel);
}
.m-close:hover { background: var(--coral); border-color: #fff; }
.m-left {
  background:
    radial-gradient(ellipse at center, rgba(255,216,107,0.15), transparent 65%),
    linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
  display: flex; align-items: center; justify-content: center;
  padding: 40px; position: relative;
  border-right: 2px solid var(--ice-4);
  min-height: 420px;
}
.m-left .watch.active { transform: scale(1.2); }
.m-right { padding: 30px 40px; overflow-y: auto; }
.m-right h2 {
  font-family: var(--display); font-style: italic; font-weight: 900;
  font-size: 36px; margin: 0; color: var(--gold-1); letter-spacing: -1px;
}
.m-ref { font-family: var(--term); font-size: 14px; color: var(--ice-5); margin: 4px 0 18px; }
.m-story {
  font-family: var(--display); font-style: italic; font-size: 14px;
  line-height: 1.5; color: var(--ice-7); margin-bottom: 18px;
  text-wrap: pretty;
}
.m-specs { display: grid; gap: 5px; margin-bottom: 18px; }
.m-spec {
  display: flex; justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255,255,255,0.04);
  border-left: 3px solid var(--gold-2);
  font-size: 9px; letter-spacing: 1px;
}
.m-spec span { color: var(--ice-5); }
.m-spec b { color: var(--ice-7); font-weight: 400; }
.m-pbox {
  padding: 14px 18px;
  background: rgba(255,216,107,0.08);
  border: 2px dashed var(--gold-3);
  display: flex; justify-content: space-between; align-items: center;
}
.m-plabel { font-size: 10px; letter-spacing: 3px; color: var(--ice-5); }
.m-pvalue { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 28px; color: var(--gold-1); }

/* ============== HELP DIALOG ============== */
.help-modal {
  position: absolute; inset: 0; z-index: 500;
  display: none; align-items: center; justify-content: center;
}
.help-modal.on { display: flex; }
.help-panel {
  position: relative; z-index: 1;
  width: 520px; max-width: 90%;
  background: linear-gradient(180deg, #152a4e, #0a1526);
  border: 3px solid var(--gold-2);
  box-shadow: 0 0 40px rgba(255,216,107,0.3), 0 8px 0 var(--ice-1);
}
.help-head {
  padding: 12px 20px;
  border-bottom: 2px solid var(--ice-4);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; letter-spacing: 3px; color: var(--gold-2);
}
.help-body { padding: 16px 22px; }
.help-row {
  padding: 10px 0;
  font-size: 10px; letter-spacing: 1px; color: var(--ice-6);
  border-bottom: 1px dashed rgba(126,188,255,0.1);
}
.help-row:last-child { border: none; }
.help-row kbd {
  display: inline-block; padding: 3px 8px;
  background: var(--ice-1); border: 1px solid var(--ice-4);
  margin-right: 10px; color: var(--gold-2); min-width: 34px;
  text-align: center; font-size: 9px;
}

/* ============== TOASTS ============== */
.toasts {
  position: absolute; top: 100px; right: 24px; z-index: 400;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none; max-width: 340px;
}
.toast {
  background: linear-gradient(180deg, rgba(20, 38, 70, 0.98), rgba(10,20,38,0.98));
  border: 2px solid var(--gold-2);
  padding: 10px 14px;
  display: flex; gap: 10px; align-items: center;
  box-shadow: 0 4px 0 var(--ice-1), 0 0 20px rgba(255,216,107,0.3);
  transform: translateX(120%);
  opacity: 0; transition: transform .45s cubic-bezier(.3,1.5,.5,1), opacity .3s;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-icon {
  width: 32px; height: 32px;
  background: var(--gold-2); color: var(--night);
  border: 2px solid var(--gold-4);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.toast-body { flex: 1; }
.toast-title { font-size: 10px; letter-spacing: 2px; color: var(--gold-1); }
.toast-desc { font-family: var(--term); font-size: 13px; color: var(--ice-6); letter-spacing: 1px; margin-top: 2px; }

/* ============== FX ============== */
.sparkle {
  position: absolute; pointer-events: none;
  font-size: 16px;
  animation: sparkle-up 1s ease-out forwards;
  z-index: 100;
}
@keyframes sparkle-up {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(0); }
  30%  { opacity: 1; transform: translate(-50%, -20px) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -80px) scale(0.6); }
}
.flycoin {
  position: absolute; width: 20px; height: 20px;
  pointer-events: none; z-index: 200;
  will-change: transform;
}

/* ============== TWEAKS ============== */
.tweaks {
  position: absolute; right: 24px; top: 96px;
  width: 240px; z-index: 90;
  background: rgba(10,20,38,0.97);
  border: 2px solid var(--gold-2);
  padding: 14px;
  box-shadow: 0 8px 0 var(--ice-1), 0 0 40px rgba(255,216,107,0.25);
  display: none;
  animation: tw-pop .22s cubic-bezier(.6,0,.2,1.3);
}
.tweaks.on { display: block; }
@keyframes tw-pop {
  from { opacity: 0; transform: translateY(-8px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.tweaks::before {
  content: '';
  position: absolute; top: -8px; right: 38px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--gold-2);
}
.tw-head {
  font-size: 10px; letter-spacing: 3px; color: var(--gold-2);
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--ice-4);
  margin-bottom: 10px;
}
.tweaks label {
  display: block;
  font-size: 8px; letter-spacing: 2px; color: var(--ice-5);
  margin: 12px 0 6px;
}
.tw-opts { display: flex; gap: 4px; flex-wrap: wrap; }
.tw-opt {
  flex: 1; padding: 6px 8px;
  font-size: 8px; letter-spacing: 1px;
  background: transparent; color: var(--ice-6);
  border: 1px solid var(--ice-4); cursor: pointer;
}
.tw-opt.active { background: var(--gold-2); color: var(--night); border-color: var(--gold-4); }
#tw-particles { width: 100%; accent-color: var(--gold-2); }

/* ============== FOOT HINT ============== */
.foothint {
  position: absolute; bottom: 6px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 14px; align-items: center;
  font-size: 9px; letter-spacing: 2px; color: var(--ice-5);
  padding: 6px 16px;
  background: rgba(10,20,38,0.6);
  border: 1px solid rgba(126,188,255,0.2);
  z-index: 30;
}
.foothint kbd {
  display: inline-block; padding: 2px 6px;
  background: var(--ice-1); border: 1px solid var(--ice-4);
  color: var(--gold-2); font-size: 8px; margin: 0 2px;
}
.fh-sep { color: var(--ice-3); }

/* ============== WORLD VARIANTS ============== */
.stage.world-sunset {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 180, 120, 0.3), transparent 70%),
    linear-gradient(180deg, #2a1340 0%, #c54d68 45%, #ff9a7a 100%);
}
.stage.world-vip {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(200, 140, 255, 0.25), transparent 70%),
    linear-gradient(180deg, #1a0830 0%, #2a1040 50%, #4a1a60 100%);
}

/* ============== RAVE MODE ============== */
.stage.rave { animation: rave 0.6s linear infinite; }
@keyframes rave {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

body.noanim *, body.noanim *::before, body.noanim *::after {
  animation: none !important;
  transition: none !important;
}

/* ============== CLAW MACHINE ============== */
.claw-machine {
  position: relative;
  width: 440px;
  background:
    linear-gradient(180deg, #c62a3f 0%, #a3172b 100%);
  border: 4px solid #3a0a12;
  box-shadow:
    0 0 0 4px var(--gold-3),
    0 12px 0 #3a0a12,
    0 14px 0 var(--gold-4),
    inset 0 3px 0 rgba(255,255,255,0.18),
    inset 0 -8px 0 rgba(0,0,0,0.35);
  padding: 10px 14px 14px;
  image-rendering: pixelated;
  font-family: var(--mono);
}
/* Marquee */
.cm-marquee {
  position: relative;
  height: 38px;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  background:
    repeating-linear-gradient(90deg, #ffd86b 0 10px, #ff8a3d 10px 20px);
  border: 3px solid #3a0a12;
  color: #3a0a12;
  font-weight: 900;
  letter-spacing: 3px;
  font-size: 16px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.35), inset 0 -3px 0 rgba(0,0,0,0.2);
}
.cm-marquee .cm-star {
  animation: cm-blink 0.8s steps(2) infinite;
  color: #c62a3f;
}
.cm-marquee .cm-star:nth-child(3) { animation-delay: 0.4s; }
@keyframes cm-blink { 0%,50%{opacity:1;}50.01%,100%{opacity:0.3;} }

/* Glass box */
.cm-box {
  position: relative;
  margin-top: 10px;
  background: #0a1220;
  border: 3px solid #3a0a12;
  box-shadow: inset 0 0 0 3px #6a0e1e, inset 0 0 20px rgba(0,0,0,0.6);
  padding: 14px 10px 10px;
}
.cm-bulbs {
  position: absolute; top: -3px; left: 0; right: 0;
  display: flex; justify-content: space-around;
  padding: 0 8px; pointer-events: none; z-index: 6;
}
.cm-bulbs span {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff4b0, #ffd86b 60%, #8c5e10);
  box-shadow: 0 0 8px #ffd86b, 0 0 14px rgba(255,216,107,0.6);
  animation: cm-bulb 1.2s steps(2) infinite;
}
.cm-bulbs span:nth-child(odd) { animation-delay: 0.6s; }
@keyframes cm-bulb { 0%,50%{opacity:1;}50.01%,100%{opacity:0.25; box-shadow: 0 0 2px #8c5e10;} }

.cm-glass {
  position: relative;
  width: 100%; height: 280px;
  background:
    /* subtle grid */
    linear-gradient(rgba(122, 200, 255, 0.06) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(122, 200, 255, 0.06) 1px, transparent 1px) 0 0 / 20px 20px,
    /* glass glare */
    linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.08) 45%, transparent 55%, rgba(255,255,255,0.04) 70%, transparent 80%),
    /* night sky inside */
    radial-gradient(ellipse at 50% 30%, rgba(70, 110, 170, 0.5), transparent 60%),
    linear-gradient(180deg, #0a1628 0%, #050a14 100%);
  overflow: hidden;
  border: 2px solid #2a3a58;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.08),
    inset 0 -20px 30px rgba(0,0,0,0.5);
}
/* Top rail the claw slides on */
.cm-rail {
  position: absolute; top: 8px; left: 6px; right: 6px; height: 10px;
  background:
    linear-gradient(180deg, #3a3f4a 0%, #1a1e25 100%);
  border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 2px 0 rgba(0,0,0,0.4);
}
.cm-rail::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 4px;
  height: 2px;
  background: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 12px);
}

/* Claw */
.cm-claw {
  position: absolute; top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 60px;
  transition: left 0.18s linear;
  z-index: 3;
  pointer-events: none;
}
.cm-cord {
  position: absolute; left: 50%; top: 0;
  transform: translateX(-50%);
  width: 4px; height: 10px;
  background: linear-gradient(180deg, #888, #444);
  border-left: 1px solid #222; border-right: 1px solid #222;
  transition: height 0.5s cubic-bezier(0.5, 0, 0.7, 1);
}
.cm-claw[data-drop="1"] .cm-cord { height: 180px; }
.cm-head {
  position: absolute; left: 50%; top: 10px;
  transform: translateX(-50%);
  width: 60px; height: 40px;
  transition: top 0.5s cubic-bezier(0.5, 0, 0.7, 1);
}
.cm-claw[data-drop="1"] .cm-head { top: 190px; }
.cm-head::before {
  /* top cap */
  content: ''; position: absolute; left: 50%; top: 0;
  transform: translateX(-50%);
  width: 34px; height: 14px;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-3));
  border: 2px solid #3a0a12;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.3), inset 0 -2px 0 var(--gold-4);
}
.cm-head::after {
  /* pivot block */
  content: ''; position: absolute; left: 50%; top: 12px;
  transform: translateX(-50%);
  width: 18px; height: 10px;
  background: #2a2e36;
  border: 1px solid #000;
}
.cm-arm {
  position: absolute; top: 18px;
  width: 6px; height: 24px;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-3));
  border: 2px solid #3a0a12;
  transform-origin: 50% 0;
  transition: transform 0.3s ease;
}
.cm-arm.left { left: 22px; transform: rotate(25deg); }
.cm-arm.right { right: 22px; transform: rotate(-25deg); }
.cm-arm::after {
  content: ''; position: absolute; left: -2px; bottom: -6px;
  width: 10px; height: 8px;
  background: linear-gradient(180deg, var(--gold-3), #4a3208);
  border: 2px solid #3a0a12; border-top: 0;
  clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
}
.cm-claw[data-grab="1"] .cm-arm.left  { transform: rotate(5deg); }
.cm-claw[data-grab="1"] .cm-arm.right { transform: rotate(-5deg); }
.cm-grip {
  position: absolute; left: 50%; top: 30px;
  transform: translateX(-50%);
  width: 10px; height: 4px;
  background: #2a2e36; border: 1px solid #000;
}

/* Prizes (watches lying in a pile) */
.cm-prizes {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 110px;
  pointer-events: none;
}
.cm-prize {
  position: absolute;
  width: 70px; height: 70px;
  display: flex; align-items: center; justify-content: center;
  transform-origin: 50% 50%;
  transition: transform 0.4s cubic-bezier(0.3, 1.4, 0.5, 1), left 0.4s, top 0.4s, opacity 0.3s;
}
.cm-prize .mini-watch {
  width: 60px; height: 60px; position: relative;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,0.6));
}
.cm-prize .mini-bezel { position: absolute; inset: 0; }
.cm-prize .mini-dial {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--display); font-weight: 900;
  font-size: 9px; text-align: center; line-height: 1;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.6);
}
.cm-prize.grabbed {
  z-index: 10;
}
.cm-prize.target {
  animation: cm-target-pulse 1s ease-in-out infinite;
}
@keyframes cm-target-pulse {
  0%,100% { filter: drop-shadow(0 3px 0 rgba(0,0,0,0.6)) drop-shadow(0 0 0 transparent); }
  50%     { filter: drop-shadow(0 3px 0 rgba(0,0,0,0.6)) drop-shadow(0 0 8px #6fe0a8); }
}
.cm-prize.won {
  animation: cm-flash 0.3s 6;
}
@keyframes cm-flash {
  0%,100% { filter: drop-shadow(0 0 0 transparent) drop-shadow(0 3px 0 rgba(0,0,0,0.6)); }
  50%     { filter: drop-shadow(0 0 10px #ffd86b) drop-shadow(0 0 18px #fff4b0); }
}

/* Floor slats */
.cm-glass::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 10px;
  background:
    repeating-linear-gradient(90deg, #3a2208 0 10px, #4a3208 10px 20px);
  border-top: 2px solid #2a1a04;
  box-shadow: inset 0 2px 0 rgba(0,0,0,0.4);
  z-index: 4;
}

/* Chute */
.cm-chute {
  position: absolute; left: 6px; bottom: 10px;
  width: 72px; height: 58px;
  background: linear-gradient(180deg, #050a14 0%, #1a0810 100%);
  border: 2px solid #3a0a12;
  border-bottom: 0;
  z-index: 5;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 4px;
}
.cm-chute-label {
  font-size: 8px; letter-spacing: 2px;
  color: #ffd86b;
  background: #3a0a12;
  padding: 2px 4px;
  border: 1px solid #ffd86b;
}

/* Control panel */
.cm-panel {
  margin-top: 10px;
  background:
    linear-gradient(180deg, #8c5e10 0%, #4a3208 100%);
  border: 3px solid #3a0a12;
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.15),
    inset 0 -4px 0 rgba(0,0,0,0.3);
  padding: 12px;
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  gap: 12px;
  align-items: center;
}
.cm-joystick {
  position: relative;
  width: 80px; height: 54px;
  background: #1a1e25;
  border: 2px solid #000;
  border-radius: 6px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
  cursor: pointer;
  user-select: none;
  touch-action: none;
}
.cm-stick {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #e8324a, #a3172b);
  border: 2px solid #3a0a12;
  box-shadow: 0 3px 0 #3a0a12, inset 0 2px 0 rgba(255,255,255,0.25);
  transition: left 0.12s ease;
}
.cm-joystick[data-dir="L"] .cm-stick { left: 24%; }
.cm-joystick[data-dir="R"] .cm-stick { left: 76%; }
.cm-hint {
  position: absolute; bottom: -14px; left: 0; right: 0;
  text-align: center; font-size: 9px; letter-spacing: 2px;
  color: #ffd86b;
}

.cm-drop {
  position: relative;
  width: 80px; height: 54px;
  border: 3px solid #3a0a12;
  background: linear-gradient(180deg, #ffd86b 0%, #d9a93a 50%, #8c5e10 100%);
  color: #3a0a12;
  font-family: var(--mono);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow:
    0 6px 0 #3a0a12,
    inset 0 2px 0 rgba(255,255,255,0.4),
    inset 0 -3px 0 rgba(0,0,0,0.2);
  transition: transform 0.08s, box-shadow 0.08s;
  justify-self: center;
}
.cm-drop:hover { filter: brightness(1.1); }
.cm-drop:active, .cm-drop[disabled] {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 #3a0a12,
    inset 0 2px 0 rgba(255,255,255,0.4),
    inset 0 -3px 0 rgba(0,0,0,0.2);
}
.cm-drop[disabled] { opacity: 0.6; cursor: not-allowed; }
.cm-drop-light {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #ff3a4a);
  box-shadow: 0 0 6px #ff3a4a;
  animation: cm-bulb 0.6s steps(2) infinite;
}
.cm-drop[disabled] .cm-drop-light { animation: none; background: #555; box-shadow:none; }
.cm-cost {
  text-align: center;
  color: #fff4b0;
  font-size: 10px;
  letter-spacing: 1.5px;
  line-height: 1.4;
}
.cm-cost b {
  display: block;
  font-size: 18px;
  color: #fff;
  text-shadow: 0 2px 0 #3a0a12;
}

/* Status flash overlay */
.cm-status {
  position: absolute; left: 50%; top: 40%;
  transform: translate(-50%, -50%);
  padding: 8px 16px;
  background: rgba(0,0,0,0.85);
  border: 2px solid var(--gold-3);
  color: #ffd86b;
  font-family: var(--mono);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 3px;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.4s;
}
.cm-status.show { opacity: 1; transform: translate(-50%, -60%); }
.cm-status.win  { color: #6fe0a8; border-color: #6fe0a8; text-shadow: 0 0 10px #6fe0a8; }
.cm-status.miss { color: #ff8a8a; border-color: #ff8a8a; }

/* ==========================================================
   MOBILE SPLASH — hidden by default; shown on narrow viewports
   The arcade UI is a fixed 1600x1000 stage that becomes
   unusable when scaled to phone widths, so on mobile we swap
   it out for a clean link hub that keeps the brand voice.
   ========================================================== */
.mobile-splash { display: none; }

@media (max-width: 760px) {
  /* Hide the arcade stage + foothint on mobile */
  .stage,
  .foothint { display: none !important; }
  body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse at top, #1a2748 0%, #0a1020 60%, #06090f 100%);
    color: #e8f4ff;
    font-family: 'Silkscreen', monospace;
    overflow-x: hidden;
  }

  .mobile-splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px 60px;
    min-height: 100vh;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
  }
  .ms-sky {
    position: absolute; inset: 0; z-index: -1;
    background:
      radial-gradient(1px 1px at 20% 20%, #fff8 50%, transparent 51%),
      radial-gradient(1px 1px at 70% 30%, #fffa 50%, transparent 51%),
      radial-gradient(1px 1px at 40% 60%, #fff8 50%, transparent 51%),
      radial-gradient(1px 1px at 85% 75%, #fffa 50%, transparent 51%),
      radial-gradient(1px 1px at 15% 85%, #fff8 50%, transparent 51%);
    background-size: 180px 180px;
    opacity: 0.6;
    pointer-events: none;
  }
  .ms-penguin {
    width: 180px; height: auto;
    margin-top: 6px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
    animation: ms-bob 3.2s ease-in-out infinite;
  }
  @keyframes ms-bob {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-6px); }
  }
  .ms-title {
    font-family: 'Fraunces', serif;
    font-weight: 900;
    font-style: italic;
    font-size: 56px;
    line-height: 1;
    margin: 10px 0 2px;
    color: #e8f4ff;
    letter-spacing: -1px;
    text-shadow: 0 2px 0 #1a2748, 0 0 20px rgba(182,227,255,0.25);
  }
  .ms-sub {
    font-family: 'Silkscreen', monospace;
    font-size: 11px;
    letter-spacing: 4px;
    color: #ffd86b;
    margin-bottom: 18px;
  }
  .ms-msg {
    font-family: 'VT323', monospace;
    font-size: 19px;
    line-height: 1.35;
    color: #b6e3ff;
    max-width: 320px;
    text-align: center;
    margin: 0 0 22px;
  }
  .ms-links {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .ms-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    background: linear-gradient(180deg, rgba(26,40,72,0.9), rgba(18,28,52,0.9));
    border: 1.5px solid rgba(182,227,255,0.25);
    border-radius: 10px;
    color: #e8f4ff;
    text-decoration: none;
    font-family: 'Silkscreen', monospace;
    transition: transform 0.15s, border-color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .ms-link:active { transform: scale(0.98); }
  .ms-link:hover { border-color: #ffd86b; }
  .ms-link .ms-tag {
    flex: 0 0 36px;
    height: 32px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    background: rgba(255,216,107,0.12);
    border: 1px solid rgba(255,216,107,0.4);
    color: #ffd86b;
    border-radius: 6px;
  }
  .ms-link.yt .ms-tag { background: rgba(255,59,59,0.15); border-color: rgba(255,120,120,0.5); color: #ff7a7a; }
  .ms-link.x  .ms-tag { background: rgba(232,244,255,0.1); border-color: rgba(232,244,255,0.4); color: #e8f4ff; }
  .ms-link.ig .ms-tag { background: rgba(255,207,215,0.15); border-color: rgba(255,207,215,0.5); color: #ffcfd7; }
  .ms-link.gh .ms-tag { background: rgba(201,160,255,0.15); border-color: rgba(201,160,255,0.4); color: #c9a0ff; }
  .ms-link .ms-name {
    flex: 1;
    font-size: 14px;
    letter-spacing: 0.5px;
  }
  .ms-link .ms-meta {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #7a93b8;
    text-transform: lowercase;
  }
  .ms-foot {
    margin-top: 28px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #5e7398;
    text-align: center;
  }
}

/* ==========================================================
   A11Y — honor prefers-reduced-motion
   Keeps the visual personality but stops background motion
   for users who've asked the OS to tone it down.
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  .aurora,
  .stars,
  .pengu,
  .pengu.squish,
  .pengu.spin,
  .pengu.happy,
  .pengu-shadow,
  .pengu-prompt,
  .case-light,
  .ice-sparkle,
  .gear,
  .beach-sun,
  .palm,
  .beach-drink,
  .cm-marquee .cm-star,
  .cm-bulbs span,
  .cm-drop-light,
  .tv-static,
  .tv-rec,
  .ms-penguin {
    animation: none !important;
  }
  .stage { transition: none !important; }
  * { scroll-behavior: auto !important; }
}

/* Focus ring — keyboard users see a clear outline on interactive elements.
   No visual change for mouse users (browsers no longer show :focus on click
   for buttons). */
:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 2px;
}

/* Konami hint — subtle "try ↑↑↓↓←→←→BA" teaser that only shows after
   the player has been poking around for a bit and hasn't triggered it.
   Controlled via JS adding .show. */
.konami-hint {
  position: fixed;
  right: 18px; bottom: 18px;
  padding: 8px 14px;
  background: rgba(10, 18, 36, 0.85);
  border: 2px solid var(--gold-3);
  color: var(--gold-2);
  font-family: var(--pixel);
  font-size: 11px;
  letter-spacing: 2px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s, transform 0.5s;
  z-index: 40;
}
.konami-hint.show {
  opacity: 1;
  transform: translateY(0);
}

/* Loading curtain — shown until the JS has finished first paint so people
   don't see a blank dark screen while fonts/JS load. Hidden via JS adding
   .ready to <html> or <body>. */
.loading-curtain {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, #1a2748 0%, #0a1020 70%, #06090f 100%);
  display: flex;
  align-items: center; justify-content: center;
  z-index: 9999;
  color: #e8f4ff;
  font-family: 'Silkscreen', monospace;
  font-size: 14px;
  letter-spacing: 4px;
  transition: opacity 0.4s;
}
.loading-curtain.gone { opacity: 0; pointer-events: none; }
.loading-curtain span {
  animation: load-pulse 1.2s ease-in-out infinite;
}
@keyframes load-pulse {
  0%,100% { opacity: 0.4; }
  50%     { opacity: 1; }
}
