:root {
  --acid: #39FF14;
  --violet: #DF00FF;
  --acid-dim: #0c3a06;
  --violet-dim: #4a0b57;
  --black: #000000;
  --yellow: #FFE81A;
  --cyan: #00F0FF;
  --pink: #FF00E6;
  --white: #f4f6ff;
  --chrome1: #eef0fb;
  --chrome2: #c6c9e0;
  --chrome3: #8b8ea8;
  --chrome4: #55586f;
  --win-bg: #d4d0c8;
  --win-title: #000080;
  --font-display: 'Arial Black','Arial',-apple-system,'Segoe UI','Microsoft YaHei','Microsoft JhengHei','PingFang TC','Heiti TC','Noto Sans TC',sans-serif;
  --font-mono: 'Courier New','Lucida Console','Consolas','Segoe UI Mono','Microsoft YaHei','Microsoft JhengHei','PingFang TC',monospace;
  --font-win: 'MS Sans Serif','Microsoft Sans Serif','Tahoma','Segoe UI','Microsoft YaHei','Microsoft JhengHei',sans-serif;
}

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

:root { cursor: url("data:image/svg+xml;utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%3E%3Cdefs%3E%3CradialGradient%20id='g'%20cx='35%25'%20cy='30%25'%20r='80%25'%3E%3Cstop%20offset='0%25'%20stop-color='%23ffffff'/%3E%3Cstop%20offset='30%25'%20stop-color='%23d8e0f0'/%3E%3Cstop%20offset='55%25'%20stop-color='%236a7480'/%3E%3Cstop%20offset='78%25'%20stop-color='%23df00ff'/%3E%3Cstop%20offset='100%25'%20stop-color='%2339ff14'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle%20cx='20'%20cy='20'%20r='18'%20fill='url(%23g)'%20stroke='%2339ff14'%20stroke-width='2.5'/%3E%3Ccircle%20cx='20'%20cy='20'%20r='7'%20fill='%23000000'/%3E%3Ccircle%20cx='20'%20cy='20'%20r='3'%20fill='%2339ff14'/%3E%3Cpath%20d='M20%206v6M34%2020h-6M20%2034v-6M6%2020h6'%20stroke='%23ffffff'%20stroke-width='3'%20stroke-linecap='round'%20opacity='0.9'/%3E%3C/svg%3E") 20 20, auto; }

* { cursor: inherit; }

html { scrollbar-color: var(--acid) var(--black); }

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-display);
  min-height: 100vh;
  overflow-x: hidden;
}

button, a, .letter-bubble, .slot, .monster, .start-btn, .win98-x, .btn98, .tray, .tray-icon {
  cursor: url("data:image/svg+xml;utf8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%3E%3Cdefs%3E%3CradialGradient%20id='g'%20cx='35%25'%20cy='30%25'%20r='80%25'%3E%3Cstop%20offset='0%25'%20stop-color='%23ffffff'/%3E%3Cstop%20offset='30%25'%20stop-color='%23d8e0f0'/%3E%3Cstop%20offset='55%25'%20stop-color='%236a7480'/%3E%3Cstop%20offset='78%25'%20stop-color='%23df00ff'/%3E%3Cstop%20offset='100%25'%20stop-color='%2339ff14'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle%20cx='20'%20cy='20'%20r='18'%20fill='url(%23g)'%20stroke='%2339ff14'%20stroke-width='2.5'/%3E%3Ccircle%20cx='20'%20cy='20'%20r='7'%20fill='%23000000'/%3E%3Ccircle%20cx='20'%20cy='20'%20r='3'%20fill='%2339ff14'/%3E%3Cpath%20d='M20%206v6M34%2020h-6M20%2034v-6M6%2020h6'%20stroke='%23ffffff'%20stroke-width='3'%20stroke-linecap='round'%20opacity='0.9'/%3E%3C/svg%3E") 20 20, pointer;
}

button:disabled { cursor: inherit; }

.hidden { display: none !important; }

#world { position: relative; min-height: 100vh; z-index: 1; }

/* ===== 背景星空 ===== */
.stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.stars i {
  position: absolute;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--acid);
  animation: twinkle 3s ease-in-out infinite;
}

/* ===== 透視線格地板 ===== */
.grid-floor {
  position: fixed; left: -10%; right: -10%; bottom: -8%;
  height: 46vh; z-index: 0; pointer-events: none;
  background:
    linear-gradient(transparent 0%, rgba(57,255,20,0.06) 100%),
    repeating-linear-gradient(0deg, rgba(223,0,255,0.35) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(90deg, rgba(57,255,20,0.35) 0 1px, transparent 1px 46px);
  transform: perspective(420px) rotateX(62deg);
  transform-origin: center top;
  animation: gridmove 2.6s linear infinite;
  mask-image: linear-gradient(to top, rgba(0,0,0,1) 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 40%, transparent 100%);
}

/* ===== 迷幻太陽 ===== */
.sun-glow {
  position: fixed; top: -12vh; left: 50%; transform: translateX(-50%);
  width: 120vw; height: 60vh; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side,
    rgba(255,0,230,0.5),
    rgba(223,0,255,0.28) 35%,
    rgba(0,240,255,0.12) 60%,
    transparent 75%);
  filter: blur(2px);
  animation: sunpulse 7s ease-in-out infinite;
}

/* ===== 掃描線 / CRT ===== */
.scanlines {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.55;
  background: repeating-linear-gradient(0deg,
    rgba(0,0,0,0.22) 0 1px, transparent 1px 3px);
  animation: flicker 0.12s steps(2) infinite;
}
.scanlines::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(transparent 0%, rgba(57,255,20,0.05) 50%, transparent 100%);
  animation: scan 5s linear infinite;
}
.noise-overlay {
  position: fixed; inset: 0; z-index: 61; pointer-events: none; opacity: 0.05;
  background: repeating-radial-gradient(circle at 30% 40%, rgba(255,255,255,0.5) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* ===== 酸性液體層（Gooey） ===== */
.acid-layer {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  filter: url(#goo);
  overflow: hidden;
}
.acid-layer .ball {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: ballfly 1.5s ease-out forwards;
  box-shadow: 0 0 14px rgba(57,255,20,0.8), 0 0 30px rgba(223,0,255,0.5);
}
.acid-flash {
  position: fixed; inset: 0; z-index: 62; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(223,0,255,0.9), rgba(57,255,20,0.85));
}
.acid-flash.on { animation: acidflash 0.55s ease-out; }
body.strobe { animation: strobe 0.8s steps(8) infinite; }

#world.acid-on main { filter: url(#acid); transition: filter 0.2s; }

/* ===== 跑馬燈 ===== */
.ticker-wrap {
  position: relative; z-index: 5;
  border-top: 2px solid var(--acid);
  border-bottom: 2px solid var(--violet);
  background: rgba(0,0,0,0.85);
  overflow: hidden;
  height: 30px;
  display: flex; align-items: center;
  box-shadow: 0 0 18px rgba(57,255,20,0.35);
}
.ticker {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13px; font-weight: bold;
  letter-spacing: 2px;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan), 0 0 16px var(--violet);
  animation: marquee 26s linear infinite;
}

/* ===== HUD ===== */
.hud {
  position: relative; z-index: 5;
  display: flex; justify-content: space-between; align-items: stretch;
  gap: 10px; padding: 10px 16px;
  background: linear-gradient(180deg, rgba(10,10,14,0.9), rgba(0,0,0,0.6));
  border-bottom: 2px solid var(--violet);
}
.gadget {
  background: linear-gradient(180deg, var(--chrome1), var(--chrome2) 45%, var(--chrome4));
  border: 2px solid var(--black);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #333, 0 0 12px rgba(223,0,255,0.5);
  border-radius: 6px;
  padding: 4px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 96px;
}
.gadget-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: bold;
  letter-spacing: 2px; color: #2a2a3a; text-shadow: 0 1px 0 #fff;
}
.gadget b { font-size: 20px; color: var(--black); letter-spacing: 1px; text-shadow: 0 0 8px var(--acid); }
.hud-center { display: flex; gap: 10px; }
.hud-right, .hud-left { display: flex; align-items: center; }
.combo-gadget b, .sync-gadget b { color: var(--violet-dim); }
.score-gadget b { color: #0a2f02; }

/* ===== 主舞台 ===== */
main { position: relative; z-index: 5; }

.screen {
  height: calc(100vh - 118px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 14px 16px 46px;
  text-align: center;
  overflow: hidden;
}

/* ===== 標題畫面 ===== */
.cd-case {
  position: relative;
  width: 148px; height: 148px;
  margin-bottom: 2px;
}
.cd {
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 26%, rgba(0,0,0,0.9) 26% 27%, rgba(255,255,255,0.9) 27% 28%, transparent 28% 46%, rgba(0,0,0,0.25) 46% 49%, transparent 49%),
    conic-gradient(from 0deg, #39FF14, #DF00FF, #00F0FF, #FFE81A, #39FF14);
  box-shadow: 0 0 26px rgba(57,255,20,0.6), 0 0 60px rgba(223,0,255,0.45);
  animation: cdspin 9s linear infinite;
}
.cd::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  background: repeating-conic-gradient(from 10deg, rgba(255,255,255,0.16) 0 1deg, transparent 1deg 8deg);
}
.cd-hole {
  position: absolute; inset: 0; margin: auto;
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff, #889 60%, #223);
  border: 3px solid #000;
  z-index: 2;
}

.title-main {
  font-size: clamp(28px, 5.5vw, 62px);
  letter-spacing: 2px;
  color: var(--white);
  -webkit-text-stroke: 1.5px var(--acid);
  text-shadow: 0 0 12px var(--acid), 0 0 40px var(--acid), 4px 4px 0 var(--violet);
  animation: glowpulse 2.4s ease-in-out infinite;
}
.title-main .accent-v { color: var(--violet); -webkit-text-stroke: 1.5px var(--white); text-shadow: 0 0 12px var(--violet), 0 0 40px var(--violet), -4px 4px 0 var(--acid); }
.title-main .accent-g { color: var(--acid); -webkit-text-stroke: 1.5px var(--white); }
.title-main .accent-r { color: #ff2b2b; -webkit-text-stroke: 1.5px var(--white); text-shadow: 0 0 12px #ff2b2b, 0 0 40px #ff2b2b; }

.title-sub {
  font-family: var(--font-mono); font-size: clamp(12px, 2.4vw, 18px);
  letter-spacing: 4px; color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan), 0 0 22px var(--violet);
}
.title-desc {
  font-family: var(--font-mono); font-size: clamp(12px, 2vw, 15px);
  line-height: 1.8; color: #c9c9de;
  max-width: 640px;
}
.word-count-badge {
  font-family: var(--font-mono); font-size: 13px; font-weight: bold;
  color: var(--yellow);
  border: 2px dashed var(--yellow);
  padding: 5px 14px;
  border-radius: 20px;
  text-shadow: 0 0 8px var(--yellow);
}
.title-credit {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px;
  color: #666; margin-top: 6px;
}

/* ===== 霓虹泡泡按鈕 ===== */
.btn-neon {
  font-family: var(--font-display);
  font-size: clamp(14px, 2.4vw, 19px);
  letter-spacing: 2px;
  color: var(--black);
  background: radial-gradient(circle at 32% 26%, #ffffff 0%, var(--chrome2) 34%, var(--chrome3) 66%, var(--chrome4) 100%);
  border: 3px solid var(--acid);
  border-radius: 999px;
  padding: 14px 34px;
  box-shadow: 0 0 20px var(--acid), 0 0 45px rgba(57,255,20,0.5), inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 4px 8px #fff;
  transition: transform 0.12s, box-shadow 0.12s;
  user-select: none;
}
.btn-neon:hover:not(:disabled) {
  transform: translateY(-3px) rotate(-1.2deg) scale(1.04);
  box-shadow: 0 0 30px var(--acid), 0 0 70px rgba(57,255,20,0.7), inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 4px 8px #fff;
}
.btn-neon:active:not(:disabled) { animation: bounceclick 0.35s ease; }
.btn-neon.btn-violet { border-color: var(--violet); box-shadow: 0 0 20px var(--violet), 0 0 45px rgba(223,0,255,0.5), inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 4px 8px #fff; }
.btn-neon.btn-violet:hover { box-shadow: 0 0 30px var(--violet), 0 0 70px rgba(223,0,255,0.7), inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 4px 8px #fff; }

.btn-transmit { min-width: 210px; margin-top: 4px; }
.btn-transmit:disabled {
  border-color: #444; color: #555;
  box-shadow: none;
  filter: grayscale(0.9) brightness(0.7);
}
.btn-transmit.enabled { animation: glowpulse 1.6s ease-in-out infinite; }

/* ===== 面板 ===== */
.stage {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 16px;
  width: min(1080px, 96vw);
  align-items: stretch;
}
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(8,10,16,0.92), rgba(0,0,0,0.95));
  border: 3px solid var(--violet);
  border-radius: 14px;
  box-shadow: 0 0 0 2px var(--acid), 0 0 26px rgba(223,0,255,0.4), inset 0 0 40px rgba(223,0,255,0.08);
  padding: 16px 14px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.panel-label {
  font-family: var(--font-mono); font-size: 12px; font-weight: bold;
  letter-spacing: 3px; color: var(--acid);
  text-shadow: 0 0 8px var(--acid);
  border-bottom: 1px dashed var(--violet);
  padding-bottom: 6px; width: 100%; text-align: center;
}
.rivet {
  position: absolute; width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #9a9ab0 55%, #333);
  box-shadow: 0 1px 2px #000, 0 0 6px var(--acid);
}
.rivet.r1 { top: 6px; left: 6px; } .rivet.r2 { top: 6px; right: 6px; }
.rivet.r3 { bottom: 6px; left: 6px; } .rivet.r4 { bottom: 6px; right: 6px; }

/* ===== 怪物艙 ===== */
.monster-wrap {
  position: relative;
  width: 188px; height: 188px;
  display: flex; align-items: center; justify-content: center;
}
.liquid-orb {
  position: absolute; width: 170px; height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(57,255,20,0.55), rgba(223,0,255,0.35) 55%, transparent 78%);
  filter: blur(1px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: orbpulse 2.4s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(57,255,20,0.45), inset 0 0 30px rgba(223,0,255,0.35);
}
.monster {
  position: relative; z-index: 2;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: bob 3s ease-in-out infinite;
}
.monster-emoji { display: block; font-size: clamp(76px, 12vw, 116px); filter: drop-shadow(0 0 14px var(--acid)); }
.monster:hover { transform: scale(1.06) rotate(-4deg); }
.monster.level-1 .monster-emoji { filter: drop-shadow(0 0 14px var(--acid)); }
.monster.level-2 .monster-emoji { filter: drop-shadow(0 0 16px var(--cyan)); }
.monster.level-3 .monster-emoji { filter: drop-shadow(0 0 18px var(--violet)) hue-rotate(30deg); }
.monster.level-4 .monster-emoji { filter: drop-shadow(0 0 20px var(--pink)) saturate(1.6); }
.monster.level-5 .monster-emoji {
  filter: drop-shadow(0 0 22px var(--yellow)) saturate(1.8);
  animation: rainbow 2s linear infinite;
}
.monster.absorb { animation: absorb 0.5s ease; }
.monster.mutate { animation: mutate 1.2s ease; }

.evo-bar {
  width: 100%; height: 18px;
  background: #0a0a12;
  border: 3px solid var(--chrome3);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px #000, 0 0 12px rgba(57,255,20,0.4);
}
.evo-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--acid), var(--violet), var(--cyan));
  background-size: 200% 100%;
  box-shadow: 0 0 14px var(--acid), 0 0 30px var(--violet);
  transition: width 0.6s cubic-bezier(0.34, 1.3, 0.64, 1);
  animation: barstrip 2s linear infinite;
}
.evo-label { font-family: var(--font-mono); font-size: 13px; font-weight: bold; color: var(--yellow); text-shadow: 0 0 8px var(--yellow); letter-spacing: 2px; }
.evo-text { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); text-shadow: 0 0 6px var(--cyan); }
.evo-dots { display: flex; gap: 8px; }
.evo-dots span {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--chrome3);
  background: transparent;
}
.evo-dots span.on { background: var(--acid); box-shadow: 0 0 10px var(--acid); border-color: var(--acid); animation: twinkle 1.2s infinite; }

/* ===== 挑戰面板 ===== */
.meaning-box {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; justify-content: center;
  width: 100%;
}
.pos-chip {
  font-family: var(--font-mono); font-size: 13px; font-weight: bold;
  color: var(--black);
  background: linear-gradient(180deg, #fff, var(--yellow));
  border: 2px solid var(--yellow);
  padding: 4px 10px; border-radius: 8px;
  box-shadow: 0 0 10px rgba(255,232,26,0.6);
}
.word-mean { font-size: clamp(24px, 4.5vw, 40px); letter-spacing: 2px; color: var(--white); text-shadow: 0 0 12px var(--violet), 0 0 30px rgba(223,0,255,0.5); }
.hint-box {
  font-family: var(--font-mono); font-size: clamp(11px, 1.8vw, 13.5px);
  line-height: 1.7; color: #b9b9d4;
  background: rgba(223,0,255,0.08);
  border: 2px dashed rgba(223,0,255,0.55);
  border-radius: 10px;
  padding: 10px 14px; width: 100%;
  text-align: left;
}
.hint-star { color: var(--pink); margin-right: 6px; text-shadow: 0 0 8px var(--pink); }

.slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 54px; padding: 4px 0; }
.slot {
  width: clamp(38px, 7vw, 52px); height: clamp(44px, 8vw, 56px);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: clamp(20px, 3.6vw, 30px); font-weight: bold;
  color: var(--acid);
  background: linear-gradient(180deg, #14141c, #05050a);
  border: 3px solid var(--chrome3);
  border-radius: 10px;
  box-shadow: inset 0 3px 8px #000, 0 0 8px rgba(57,255,20,0.25);
  text-transform: lowercase;
}
.slot.filled { border-color: var(--acid); color: var(--white); box-shadow: inset 0 3px 8px #000, 0 0 14px var(--acid); animation: wordpop 0.25s ease; text-shadow: 0 0 10px var(--acid); }
.slot.used-empty { opacity: 0.45; }

.letters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 58px; max-width: 560px; }
.letter-bubble {
  width: clamp(44px, 8vw, 56px); height: clamp(44px, 8vw, 56px);
  border-radius: 50%;
  border: 3px solid var(--violet);
  font-family: var(--font-mono); font-size: clamp(20px, 3.8vw, 30px); font-weight: bold;
  color: var(--white);
  background: radial-gradient(circle at 32% 26%, #fff 0%, var(--chrome2) 36%, var(--chrome3) 68%, var(--chrome4) 100%);
  color: #111;
  box-shadow: 0 0 14px var(--violet), 0 0 30px rgba(223,0,255,0.4), inset 0 3px 6px #fff, inset 0 -4px 8px rgba(0,0,0,0.35);
  transition: transform 0.12s;
  text-transform: lowercase;
}
.letter-bubble:hover:not(.used) { transform: translateY(-4px) scale(1.12) rotate(-6deg); box-shadow: 0 0 22px var(--violet), 0 0 50px rgba(223,0,255,0.7), inset 0 3px 6px #fff, inset 0 -4px 8px rgba(0,0,0,0.35); }
.letter-bubble:active:not(.used) { animation: bounceclick 0.3s ease; }
.letter-bubble.used {
  filter: grayscale(1) brightness(0.55);
  border-color: #555;
  box-shadow: none;
  transform: scale(0.82) rotate(14deg);
  pointer-events: none;
}
.letter-bubble.gone { display: none; }

/* ===== Toast ===== */
.toasts {
  position: fixed; top: 100px; left: 50%; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  font-family: var(--font-mono); font-weight: bold; font-size: 15px; letter-spacing: 1px;
  padding: 8px 18px;
  background: rgba(0,0,0,0.9);
  border: 2px solid currentColor;
  border-radius: 999px;
  box-shadow: 0 0 16px currentColor;
  animation: floatup 3s ease forwards;
  white-space: nowrap;
}
.toast.out { opacity: 0; transform: translateY(-18px); transition: all 0.4s; }

/* ===== 結束畫面 ===== */
.end-emoji { font-size: clamp(70px, 14vw, 130px); animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 0 26px var(--acid)); }
.final-score { font-family: var(--font-mono); font-size: clamp(18px, 3vw, 26px); color: var(--yellow); text-shadow: 0 0 12px var(--yellow); letter-spacing: 3px; }

/* ===== 工作列（Win98 風格） ===== */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 34px;
  z-index: 100;
  background: linear-gradient(180deg, var(--chrome1), var(--chrome2) 50%, var(--chrome3) 95%, var(--chrome4));
  border-top: 2px solid #fff;
  display: flex; align-items: center; gap: 8px; padding: 0 6px;
  box-shadow: inset 0 -1px 0 #404040;
}
.start-btn {
  display: flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 12px;
  font-family: var(--font-mono); font-weight: bold; font-size: 13px; color: #111;
  background: var(--chrome2);
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #444; border-bottom: 2px solid #444;
}
.start-btn:active { border-top: 2px solid #444; border-left: 2px solid #444; border-right: 2px solid #fff; border-bottom: 2px solid #fff; }
.start-emoji { font-size: 15px; }
.task-item {
  height: 26px; padding: 0 12px;
  display: flex; align-items: center;
  font-family: var(--font-mono); font-size: 12px; color: #222;
  background: linear-gradient(180deg, #fdfdfd, #b8b8cc);
  border: 2px solid; border-color: #fff #444 #444 #fff;
  box-shadow: inset 0 0 0 1px #d0d0e0;
}
.tray { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tray-icon {
  font-size: 13px; line-height: 1;
  background: transparent; border: none;
  padding: 2px 4px;
}
.tray-icon:active { transform: scale(0.8); }
.tray-time { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--font-mono); font-size: 11px; line-height: 1.1; color: #111; }

/* ===== Win98 警告視窗 ===== */
.win98-mask {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,0.45);
  display: flex;
  padding: 14px;
  overflow: auto;
}
.win98 {
  margin: auto;
  width: min(420px, 92vw);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 28px);
  background: var(--win-bg);
  color: #000;
  font-family: var(--font-win);
  border-top: 3px solid #fff; border-left: 3px solid #fff;
  border-right: 3px solid #444; border-bottom: 3px solid #444;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #888, 0 14px 50px rgba(0,0,0,0.8);
  animation: w98in 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.win98-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  height: 28px; padding: 0 4px 0 8px;
  background: linear-gradient(90deg, var(--win-title) 0%, #1084d0 70%, #1c96e8 100%);
  color: #fff;
  font-weight: bold; font-size: 13px;
}
.win98-x {
  width: 24px; height: 22px;
  font-size: 12px; line-height: 1;
  background: var(--win-bg);
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #444; border-bottom: 2px solid #444;
  color: #000;
}
.win98-body {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 16px 14px;
}
.win98-icon {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 26px; color: #fff;
  background: radial-gradient(circle at 40% 35%, #ff6b6b, #c80000 60%, #700);
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255,0,0,0.7);
}
.win98-msg { font-size: 14px; line-height: 1.7; white-space: pre-line; }
.win98-buttons { display: flex; justify-content: center; padding: 0 16px 16px; }
.btn98 {
  min-width: 90px; height: 28px;
  font-family: var(--font-win); font-size: 13px;
  background: var(--win-bg);
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #444; border-bottom: 2px solid #444;
}
.btn98:active { border-top: 2px solid #444; border-left: 2px solid #444; border-right: 2px solid #fff; border-bottom: 2px solid #fff; }

/* ===== 開機畫面 ===== */
.boot-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.boot-box {
  width: min(680px, 96vw);
  background: #000;
  border: 2px solid var(--acid);
  box-shadow: 0 0 20px rgba(57,255,20,0.4), inset 0 0 40px rgba(57,255,20,0.06);
  padding: 18px;
  font-family: var(--font-mono);
}
.boot-title { color: var(--yellow); font-weight: bold; letter-spacing: 2px; margin-bottom: 12px; font-size: 13px; }
.boot-line { color: var(--acid); font-size: 13px; line-height: 1.8; text-shadow: 0 0 6px var(--acid); white-space: pre; overflow: hidden; }
.boot-caret { color: var(--acid); font-size: 13px; animation: blink 0.7s steps(1) infinite; }

/* ===== 動畫 ===== */
@keyframes twinkle { 0%,100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes gridmove { 0% { background-position: 0 0, 0 0, 0 0; } 100% { background-position: 0 0, 0 46px, 46px 0; } }
@keyframes sunpulse { 0%,100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.12); } }
@keyframes flicker { 0% { opacity: 0.5; } 50% { opacity: 0.6; } 100% { opacity: 0.5; } }
@keyframes scan { 0% { top: -20%; } 100% { top: 120%; } }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes cdspin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes glowpulse { 0%,100% { opacity: 1; } 50% { opacity: 0.72; } }
@keyframes bounceclick { 0% { transform: scale(1); } 40% { transform: scale(1.32) rotate(-5deg); } 70% { transform: scale(0.9) rotate(3deg); } 100% { transform: scale(1.05); } }
@keyframes ballfly {
  0% { transform: translate(0,0) scale(0); opacity: 0; }
  15% { opacity: 1; }
  60% { transform: translate(calc(var(--dx) * 0.55), calc(var(--dy) * 0.55)) scale(1.1); opacity: 0.95; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.7); opacity: 0; }
}
@keyframes acidflash {
  0% { opacity: 0.85; }
  100% { opacity: 0; }
}
@keyframes strobe { 0%,100% { background-color: #000; } 25% { background-color: #062b00; } 50% { background-color: #220026; } 75% { background-color: #001a1e; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes orbpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes absorb { 0% { transform: scale(1); } 35% { transform: scale(1.4) rotate(6deg); } 70% { transform: scale(0.9) rotate(-4deg); } 100% { transform: scale(1.06); } }
@keyframes mutate {
  0% { transform: scale(1) rotate(0); }
  20% { transform: scale(1.5) rotate(8deg); }
  40% { transform: scale(0.7) rotate(-10deg); }
  60% { transform: scale(1.8) rotate(5deg); }
  80% { transform: scale(0.9) rotate(-3deg); }
  100% { transform: scale(1.2); }
}
@keyframes rainbow { 0%,100% { filter: drop-shadow(0 0 22px var(--yellow)) hue-rotate(0); } 25% { filter: drop-shadow(0 0 22px var(--acid)) hue-rotate(90deg); } 50% { filter: drop-shadow(0 0 22px var(--cyan)) hue-rotate(180deg); } 75% { filter: drop-shadow(0 0 22px var(--violet)) hue-rotate(270deg); } }
@keyframes barstrip { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }
@keyframes wordpop { 0% { transform: scale(0.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes floatup { 0% { opacity: 0; transform: translateY(16px) scale(0.7); } 12% { opacity: 1; transform: translateY(0) scale(1.1); } 22% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-26px) scale(0.9); } }
@keyframes w98in { 0% { transform: scale(0.5) rotate(-4deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  10%,30%,50%,70%,90% { transform: translateX(-10px) rotate(-1deg); }
  20%,40%,60%,80% { transform: translateX(10px) rotate(1deg); }
}
main.shake { animation: shake 0.55s ease; }

/* ===== 響應式 ===== */
@media (max-width: 820px) {
  .stage { grid-template-columns: 1fr; }
  .hud-center { order: 3; width: 100%; justify-content: center; }
  .hud { flex-wrap: wrap; }
  .monster-wrap { width: 140px; height: 140px; }
  .liquid-orb { width: 122px; height: 122px; }
  .task-item { display: none; }
}
@media (max-width: 480px) {
  .gadget { min-width: 74px; padding: 3px 8px; }
  .gadget b { font-size: 16px; }
  .letter-bubble { width: 42px; height: 42px; font-size: 18px; }
  .btn-transmit { min-width: 180px; }
}

/* ===== 標題列按鈕列 / 手冊快捷按鈕 ===== */
.title-btns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn-sm { padding: 10px 22px; font-size: clamp(12px, 2vw, 15px); }

.btn-neon.btn-cyan {
  border-color: var(--cyan);
  box-shadow: 0 0 18px var(--cyan), 0 0 40px rgba(0,240,255,0.5), inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 4px 8px #fff;
}
.btn-neon.btn-cyan:hover { box-shadow: 0 0 28px var(--cyan), 0 0 60px rgba(0,240,255,0.7), inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 4px 8px #fff; }
.btn-neon.btn-amber {
  border-color: var(--yellow);
  box-shadow: 0 0 18px var(--yellow), 0 0 40px rgba(255,232,26,0.5), inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 4px 8px #fff;
}
.btn-neon.btn-amber:hover { box-shadow: 0 0 28px var(--yellow), 0 0 60px rgba(255,232,26,0.7), inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 4px 8px #fff; }
.btn-neon.btn-red {
  border-color: #ff2b2b;
  box-shadow: 0 0 18px #ff2b2b, 0 0 40px rgba(255,43,43,0.5), inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 4px 8px #fff;
}
.btn-neon.btn-red:hover { box-shadow: 0 0 28px #ff2b2b, 0 0 60px rgba(255,43,43,0.7), inset 0 -6px 12px rgba(0,0,0,0.35), inset 0 4px 8px #fff; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 2px; }

/* ===== 提示發光 ===== */
.letter-bubble.hint-glow {
  animation: hintglow 0.9s ease-in-out infinite;
  border-color: var(--yellow);
  box-shadow: 0 0 26px var(--yellow), 0 0 54px rgba(255,232,26,0.85), inset 0 3px 6px #fff, inset 0 -4px 8px rgba(0,0,0,0.35);
}
@keyframes hintglow { 0%,100% { transform: translateY(0) scale(1.12); } 50% { transform: translateY(-6px) scale(1.26); } }

.monster.egg-rainbow .monster-emoji { animation: rainbow 1s linear infinite; }

/* ===== 開始選單（彩蛋載體） ===== */
.start-menu {
  position: fixed; left: 8px; bottom: 38px; z-index: 155;
  width: 200px;
  background: var(--win-bg);
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #444; border-bottom: 2px solid #444;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #888, 0 12px 34px rgba(0,0,0,0.65);
  padding: 2px;
  animation: w98in 0.18s ease-out;
}
.start-menu-title {
  font-family: var(--font-mono); font-size: 11px; font-weight: bold;
  color: #111; padding: 5px 10px; margin-bottom: 2px;
  background: linear-gradient(180deg, var(--chrome1), var(--chrome3));
  border-bottom: 1px solid #888;
  text-shadow: 0 1px 0 #fff;
}
.start-menu-item {
  display: block; width: 100%; text-align: left;
  padding: 6px 14px;
  background: transparent; border: none;
  font-family: var(--font-win); font-size: 13px; color: #000;
}
.start-menu-item:hover { background: linear-gradient(90deg, #000080, #1084d0); color: #fff; }
.start-menu-sep { height: 2px; margin: 3px 2px; background: #999; border-top: 1px solid #fff; }

/* ===== 操作手冊視窗 ===== */
.manual { width: min(600px, 94vw); min-height: 0; }
.win98-tabs { display: flex; gap: 3px; padding: 8px 8px 0; flex: 0 0 auto; }
.win98-tab {
  padding: 5px 16px;
  font-family: var(--font-win); font-size: 13px; color: #000;
  background: var(--win-bg);
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #444; border-bottom: 2px solid #444;
}
.win98-tab.active { background: #fff; border-bottom-color: #fff; font-weight: bold; }
.manual-body {
  margin: 0 8px 12px;
  background: #fff;
  border: 2px inset #999;
  padding: 12px 14px;
  flex: 1 1 auto; min-height: 0;
  overflow-y: scroll;
  overscroll-behavior: contain;
}
.howto-list { font-family: var(--font-mono); font-size: 13.5px; line-height: 2.1; color: #222; }
.howto-list b { font-weight: bold; letter-spacing: 1px; }
.word-book .book-group { margin-bottom: 12px; }
.word-book .book-title {
  font-family: var(--font-mono); font-weight: bold; font-size: 13px;
  color: #fff; background: var(--win-title);
  padding: 3px 8px; margin-bottom: 4px;
}
.word-book .book-item {
  font-family: var(--font-mono); font-size: 13px; color: #111;
  padding: 2px 8px;
}
.word-book .book-item b { color: #00008b; text-transform: lowercase; }
.word-book .book-item i { color: #888; font-style: normal; margin: 0 6px 0 2px; }
.word-book .book-item:nth-child(odd) { background: #f0f0fa; }

@media (max-width: 820px) {
  .start-menu { width: 170px; }
}
