:root {
  color-scheme: dark;
  --daily-bg: #020c17;
  --daily-bg-deep: #010811;
  --daily-surface: #081a2c;
  --daily-surface-2: #0d2238;
  --daily-border: #294866;
  --daily-border-soft: #18344f;
  --daily-text: #f7fbff;
  --daily-muted: #9fb4c9;
  --daily-blue: #128cff;
  --daily-cyan: #25c9f3;
  --daily-green: #42dc82;
  --daily-amber: #ffc928;
  --daily-red: #ff646e;
  --daily-radius: 14px;
  --daily-shadow: 0 24px 70px rgba(0, 0, 0, .34);
  --pixel-font: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--daily-bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--daily-text);
  background:
    linear-gradient(rgba(18, 140, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 140, 255, .028) 1px, transparent 1px),
    radial-gradient(circle at 50% -15%, #0a2e50 0, transparent 40%),
    var(--daily-bg);
  background-size: 32px 32px, 32px 32px, auto, auto;
}
body.menu-open, body.info-open, body.deep-dive-open { overflow: hidden; }

button, input, select { font: inherit; }
button, select { color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(37, 201, 243, .75); outline-offset: 3px; }
[hidden] { display: none !important; }

.daily-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid rgba(99, 151, 194, .2);
  background: rgba(2, 12, 23, .9);
  backdrop-filter: blur(18px);
}

.daily-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--daily-text);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.02em;
  text-decoration: none;
}
.daily-brand strong { color: var(--daily-blue); }
.daily-brand svg { width: 27px; color: var(--daily-blue); fill: currentColor; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-link, .section-title button, .menu-section-title button {
  padding: 8px 0;
  border: 0;
  color: var(--daily-cyan);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}
.game-menu-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 2px solid rgba(37, 201, 243, .58);
  border-radius: 0;
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
  background: linear-gradient(180deg, rgba(18, 140, 255, .2), rgba(7, 54, 94, .45));
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 0 22px rgba(18, 140, 255, .08);
  color: var(--daily-cyan);
  font-family: var(--pixel-font);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.game-menu-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.game-menu-button:hover { border-color: var(--daily-cyan); color: white; transform: translateY(-1px); }
.info-button { border-color: rgba(255, 201, 40, .52); background: linear-gradient(180deg, rgba(255, 201, 40, .13), rgba(91, 66, 7, .28)); color: var(--daily-amber); }
.info-button:hover { border-color: var(--daily-amber); }
.audio-toggle {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--daily-border-soft);
  border-radius: 8px;
  background: rgba(8, 26, 44, .86);
  color: #70879d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.audio-toggle svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.audio-toggle span { flex: 1; text-align: left; }
.audio-toggle strong { color: inherit; font-size: 10px; }
.audio-toggle.active { border-color: rgba(37, 201, 243, .48); background: rgba(18, 140, 255, .13); color: var(--daily-cyan); box-shadow: inset 0 0 12px rgba(37, 201, 243, .05); }
.audio-toggle:hover { border-color: var(--daily-cyan); color: white; }

.daily-app { width: min(100%, 980px); margin: 0 auto; }
.app-view { min-height: calc(100vh - 67px); padding: 28px 18px 60px; }
.home-view { display: grid; width: min(100%, 680px); align-content: start; margin: 0 auto; padding-top: 16px; }
.home-hero { position: relative; padding: 0; text-align: center; }
.home-hero h1, .result-view h1, .history-heading h1 {
  position: relative;
  margin: 0;
  font-size: clamp(2rem, 9vw, 3.6rem);
  line-height: .99;
  letter-spacing: -.055em;
}
.hero-copy { position: relative; max-width: 430px; margin: 10px auto 20px; color: var(--daily-muted); font-size: 14px; line-height: 1.5; }

.lobby-hud {
  display: grid;
  min-height: 48px;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  margin-bottom: 7px;
  border: 2px solid #1d5b91;
  background: #030d19;
  box-shadow: inset 0 0 0 2px rgba(3, 23, 42, .9);
  color: white;
  font-family: var(--pixel-font);
  font-size: 10px;
  font-weight: 900;
}
.lobby-hud span { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 5px; padding: 6px 8px; border-right: 1px solid #32516e; }
.lobby-hud span:last-child { border-right: 0; }
.lobby-hud strong { color: var(--daily-cyan); font-size: 13px; }
.lobby-hud .lobby-lives { color: var(--daily-red); font-size: 13px; letter-spacing: .04em; }
.lobby-hud span:nth-child(3) strong { color: var(--daily-amber); }
.lobby-hud span:last-child strong { color: var(--daily-amber); }

.world-map {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 2px solid #1d5b91;
  background: #030d19;
  box-shadow: inset 0 0 24px rgba(18, 140, 255, .12), 0 12px 35px rgba(0, 0, 0, .24);
}
.world-map > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.zone-node {
  position: absolute;
  display: grid;
  width: 43%;
  height: 27%;
  place-items: start center;
  padding: 8px 4px;
  border: 2px solid transparent;
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
  background: transparent;
  color: #8aa0b4;
  font-family: var(--pixel-font);
  text-transform: uppercase;
}
.zone-node span { padding: 5px 8px; background: rgba(2, 10, 19, .84); box-shadow: 2px 2px #01060c; font-size: clamp(8px, 2.3vw, 12px); font-weight: 900; letter-spacing: .035em; }
.zone-node i { position: absolute; bottom: 12%; color: #63788c; font-size: 18px; font-style: normal; text-shadow: 0 0 10px currentColor; }
.zone-node:hover:not(:disabled), .zone-node.selected { border-color: transparent; background: transparent; color: white; }
.zone-node.selected span, .zone-node.selected i { color: var(--daily-cyan); }
.zone-node.cleared span, .zone-node.cleared i { color: var(--daily-green); }
.zone-node.locked { cursor: not-allowed; filter: grayscale(.75) brightness(.55); }
.zone-node.locked i { display: none; }
.zone-node.locked::after { position: absolute; top: 46%; padding: 6px 9px; border: 2px solid #8794a0; content: "LOCKED"; background: rgba(2, 8, 14, .9); box-shadow: 3px 3px #000; color: #d7dee5; font-size: clamp(8px, 2.2vw, 11px); font-weight: 900; letter-spacing: .06em; text-shadow: 2px 2px #000; }
.zone-images { top: 1.5%; left: 2%; }
.zone-storage { top: 1.5%; right: 2%; }
.zone-networking { top: 34%; left: 2%; }
.zone-orchestration { top: 34%; right: 2%; }
.zone-security { bottom: 1.5%; left: 2%; }
.zone-installation { right: 2%; bottom: 1.5%; }

.zone-command-panel {
  position: relative;
  margin-top: 8px;
  padding: 18px;
  border: 2px solid #1d5b91;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  background: linear-gradient(180deg, rgba(8, 29, 49, .98), rgba(3, 14, 26, .98));
  box-shadow: inset 0 0 0 2px rgba(3, 17, 31, .86);
}
.zone-command-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.zone-command-heading h1 { margin: 0; color: var(--daily-cyan); font-family: var(--pixel-font); font-size: clamp(20px, 6vw, 31px); letter-spacing: -.04em; text-transform: uppercase; }
.zone-command-heading span { flex: 0 0 auto; padding: 8px 10px; border: 2px solid #28527d; color: white; font-family: var(--pixel-font); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.rank-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.rank-track button { position: relative; display: grid; min-height: 84px; place-items: center; gap: 2px; padding: 8px 4px; border: 2px solid #324d67; clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); background: #071627; color: #73869a; font-family: var(--pixel-font); text-transform: uppercase; }
.rank-track button span { font-size: clamp(7px, 2vw, 10px); font-weight: 900; }
.rank-track button strong { font-size: 21px; }
.rank-track button i { color: #516a82; font-size: 11px; font-style: normal; }
.rank-track button.active { border-color: var(--daily-cyan); background: rgba(18, 140, 255, .16); color: white; box-shadow: inset 0 0 18px rgba(37, 201, 243, .11); }
.rank-track button.active i { color: var(--daily-cyan); }
.rank-track button.cleared:not(.active) { border-color: rgba(66, 220, 130, .5); color: var(--daily-green); }
.rank-track button.locked { cursor: not-allowed; opacity: .46; }
.rank-track button.locked i { font-size: 0; }
.rank-track button.locked i::before { content: "LOCKED"; font-size: 7px; letter-spacing: .04em; }
.zone-command-panel .eligibility-note { min-height: 34px; margin: 10px 0; text-align: center; }
.training-button { display: flex; width: min(100%, 360px); min-height: 48px; align-items: center; justify-content: space-between; margin: 10px auto 0; padding: 0 18px; border: 2px solid #28527d; clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px); background: #071a2d; color: var(--daily-cyan); font-family: var(--pixel-font); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.training-button strong { color: var(--daily-amber); font-size: 10px; }
.blitz-button {
  display: flex; width: min(100%, 360px); min-height: 48px; align-items: center; justify-content: space-between;
  margin: 8px auto 0; padding: 0 18px; border: 2px solid #3a6f4a; clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
  background: #071f16; color: var(--daily-green); font-family: var(--pixel-font); font-size: 12px; font-weight: 900; text-transform: uppercase;
}
.blitz-button strong { color: #8ce6a8; font-size: 10px; }
.blitz-button:disabled { cursor: not-allowed; filter: grayscale(.75); opacity: .46; }
.calm-seas-note { margin: 10px auto 0; max-width: 360px; color: var(--daily-cyan); font-size: 11px; line-height: 1.45; text-align: center; }
.mastery-charge { width: min(100%, 360px); margin: 10px auto 0; padding: 10px 12px; border: 1px solid #28527d; background: rgba(7, 26, 45, .92); }
.mastery-charge-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; color: var(--daily-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.mastery-charge-heading strong { color: var(--daily-amber); font-size: 12px; }
.mastery-charge-track { overflow: hidden; height: 8px; border: 1px solid #1f4468; background: #04101c; }
.mastery-charge-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #128cff, #25c9f3); transition: width .24s ease; }
.training-button:disabled, .start-button:disabled, .blitz-button:disabled { cursor: not-allowed; filter: grayscale(.75); opacity: .46; }

.lobby-battle-stage {
  position: relative;
  overflow: hidden;
  height: 238px;
  border: 2px solid #1d5b91;
  background: #07172a;
  box-shadow: inset 0 0 22px rgba(18, 140, 255, .12), 0 12px 35px rgba(0, 0, 0, .22);
}
.lobby-battle-stage::after { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg, transparent 58%, rgba(1, 8, 17, .72)); pointer-events: none; }
.lobby-battle-stage .battle-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.lobby-combatant { position: absolute; z-index: 2; bottom: 23px; width: 49%; height: 78%; }
.lobby-combatant img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 7px rgba(0, 0, 0, .48)); image-rendering: pixelated; }
.lobby-hero { left: -2%; }
.lobby-enemy { right: 0; }
.lobby-enemy strong { position: absolute; z-index: 3; top: 0; left: 50%; width: max-content; transform: translateX(-50%); color: white; font-family: var(--pixel-font); font-size: 11px; letter-spacing: .04em; text-shadow: 2px 2px #020812; text-transform: uppercase; }
.lobby-ready-banner { position: absolute; z-index: 4; bottom: 9px; left: 50%; display: grid; min-width: 178px; transform: translateX(-50%); color: white; font-family: var(--pixel-font); text-align: center; text-shadow: 2px 2px #020812; text-transform: uppercase; }
.lobby-ready-banner span { color: var(--daily-cyan); font-size: 8px; letter-spacing: .12em; }
.lobby-ready-banner strong { font-size: 13px; letter-spacing: .04em; }

.lobby-command-panel {
  position: relative;
  margin-top: 8px;
  padding: 20px 18px 18px;
  border: 2px solid #1d5b91;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  background: linear-gradient(180deg, rgba(8, 29, 49, .98), rgba(3, 14, 26, .98));
  box-shadow: inset 0 0 0 2px rgba(3, 17, 31, .86);
}
.lobby-command-panel h1 { font-family: var(--pixel-font); font-size: clamp(1.45rem, 6.4vw, 2.25rem); line-height: 1.1; letter-spacing: -.045em; text-transform: uppercase; }

.loadout-button {
  position: relative;
  display: grid;
  width: min(100%, 360px);
  grid-template-columns: 1fr 20px;
  align-items: center;
  gap: 12px;
  margin: 0 auto 10px;
  padding: 11px 14px;
  border: 2px solid #28527d;
  border-radius: 0;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  background: #091a2e;
  color: white;
  text-align: left;
}
.loadout-button span { display: grid; gap: 2px; }
.loadout-button small { color: var(--daily-cyan); font-size: 9px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.loadout-button strong { overflow: hidden; font-family: var(--pixel-font); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.loadout-button svg { width: 19px; fill: none; stroke: var(--daily-muted); stroke-width: 2; }
.loadout-button:hover { border-color: var(--daily-cyan); background: rgba(10, 42, 69, .9); }

.start-button, .lock-button {
  position: relative;
  display: flex;
  width: min(100%, 360px);
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  padding: 0 22px;
  border: 2px solid #62c4ff;
  border-radius: 0;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  background: linear-gradient(180deg, #1b93ef 0%, #065dcb 100%);
  box-shadow: 0 12px 30px rgba(5, 111, 235, .26), inset 0 1px rgba(255, 255, 255, .25);
  color: white;
  font-family: var(--pixel-font);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.start-button:hover, .lock-button:not(:disabled):hover { filter: brightness(1.08); transform: translateY(-1px); }
.start-button svg { width: 19px; fill: currentColor; }
.resume-button, .secondary-action {
  display: block;
  margin: 12px auto 0;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid #28527d;
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
  color: var(--daily-cyan);
  background: #061625;
  font-family: var(--pixel-font);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.eligibility-note { min-height: 19px; margin: -4px 0 0; color: var(--daily-muted); font-size: 11px; line-height: 1.45; }
.eligibility-note.error { color: #ffb1b7; }

.launch-controls { display: grid; gap: 21px; }
.mode-switch, .count-options, .history-tabs { display: grid; padding: 3px; border: 2px solid var(--daily-border); border-radius: 0; background: rgba(4, 19, 33, .78); }
.mode-switch { grid-template-columns: 1fr 1fr; }
.mode-switch button, .count-options button, .history-tabs button {
  min-height: 41px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c2d1df;
  font-family: var(--pixel-font);
  font-size: 11px;
  font-weight: 700;
}
.mode-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.mode-switch svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.mode-switch button.active, .count-options button.active {
  border: 1px solid #168fff;
  background: linear-gradient(180deg, rgba(20, 143, 255, .35), rgba(7, 90, 180, .45));
  color: white;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}
.count-control { margin: 0; padding: 0; border: 0; }
.count-control legend { width: 100%; margin-bottom: 10px; text-align: center; color: white; font-size: 14px; font-weight: 800; }
.count-options { grid-template-columns: repeat(4, 1fr); }
.count-options button:disabled { cursor: not-allowed; opacity: .35; }

.game-panel { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 8px; border: 2px solid #1d5b91; border-radius: 0; clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px); background: #061729; box-shadow: var(--daily-shadow); font-family: var(--pixel-font); }
.game-stat { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 14px 11px; }
.game-stat + .game-stat { border-left: 1px solid var(--daily-border-soft); }
.game-stat svg { width: 27px; flex: 0 0 auto; fill: none; stroke: var(--daily-blue); stroke-width: 1.8; }
.game-stat svg.amber { fill: none; stroke: var(--daily-amber); }
.game-stat svg.green { fill: none; stroke: var(--daily-green); }
.game-stat span { display: grid; color: var(--daily-muted); font-size: 9px; }
.game-stat strong { margin-top: 3px; color: white; font-size: 17px; }
.level-row { display: grid; grid-column: 1 / -1; grid-template-columns: 44px 1fr auto; align-items: center; gap: 11px; padding: 13px 15px; border-top: 1px solid var(--daily-border-soft); }
.level-shield { display: grid; width: 40px; height: 44px; place-items: center; border: 0; clip-path: polygon(50% 0, 94% 18%, 83% 80%, 50% 100%, 17% 80%, 6% 18%); background: #17446d; color: white; font-size: 20px; font-weight: 850; }
.level-row > div > span { display: block; overflow: hidden; margin-bottom: 7px; color: #c8d7e5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.level-row > strong { color: var(--daily-amber); font-size: 11px; }
.level-track { overflow: hidden; height: 7px; border: 1px solid #345575; border-radius: 99px; background: #061424; }
.level-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--daily-blue), var(--daily-cyan)); transition: width .5s ease; }

.recent-section { margin-top: 24px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.section-title h2 { margin: 0; font-size: 13px; letter-spacing: .01em; }
.recent-runs, .history-list { display: grid; gap: 6px; }
.run-row {
  display: grid;
  grid-template-columns: 1fr auto 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid var(--daily-border-soft);
  border-radius: 9px;
  background: rgba(12, 34, 56, .76);
  color: inherit;
  text-align: left;
}
.run-row:hover { border-color: var(--daily-blue); background: rgba(14, 47, 77, .9); }
.run-row span { display: grid; gap: 2px; color: white; font-size: 12px; }
.run-row small { color: var(--daily-muted); font-size: 10px; }
.run-row strong { color: var(--daily-green); font-size: 15px; }
.run-row strong.mid { color: var(--daily-amber); }
.run-row svg { width: 16px; fill: none; stroke: var(--daily-muted); stroke-width: 2; }
.empty-copy { margin: 0; padding: 22px; border: 1px dashed var(--daily-border); border-radius: 10px; color: var(--daily-muted); text-align: center; font-size: 13px; }

.game-menu-layer { position: fixed; z-index: 50; inset: 0; display: grid; justify-items: end; }
.game-menu-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0, 6, 12, .76); backdrop-filter: blur(8px); }
.game-menu {
  position: relative;
  overflow: auto;
  width: min(100%, 440px);
  height: 100%;
  padding: 22px 18px 42px;
  border-left: 1px solid rgba(37, 201, 243, .28);
  background:
    linear-gradient(rgba(18, 140, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 140, 255, .035) 1px, transparent 1px),
    radial-gradient(circle at 85% 0, rgba(18, 140, 255, .22), transparent 31%),
    #03111f;
  background-size: 28px 28px, 28px 28px, auto, auto;
  box-shadow: -28px 0 80px rgba(0, 0, 0, .45);
  animation: menu-enter .24s cubic-bezier(.2, .75, .25, 1);
}
.game-menu-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; padding: 2px 2px 18px; border-bottom: 2px solid var(--daily-border-soft); }
.game-menu-heading span { display: block; margin-bottom: 4px; color: var(--daily-cyan); font-size: 9px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.game-menu-heading h2 { margin: 0; font-family: var(--pixel-font); font-size: 23px; letter-spacing: -.045em; text-transform: uppercase; }
.menu-close { border: 1px solid var(--daily-border-soft); background: rgba(8, 26, 44, .85); }
.game-menu-section { margin-top: 13px; padding: 15px; border: 2px solid var(--daily-border-soft); border-radius: 0; clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px); background: linear-gradient(145deg, rgba(13, 36, 59, .94), rgba(5, 20, 34, .94)); box-shadow: 0 14px 34px rgba(0, 0, 0, .18); }
.menu-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.menu-section-title h3 { margin: 0; font-family: var(--pixel-font); font-size: 11px; letter-spacing: .065em; text-transform: uppercase; }
.menu-section-title span { color: var(--daily-muted); font-size: 10px; font-weight: 750; }
.boss-roster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.boss-roster { grid-template-columns: repeat(2, 1fr); }
.boss-roster-item { padding-inline: 6px; }
.boss-roster-item strong { font-size: 9px; }
.menu-rule-copy { margin: 0; color: var(--daily-muted); font-size: 11px; line-height: 1.5; }
.boss-roster-item { display: grid; min-height: 52px; place-content: center; gap: 3px; border: 1px solid #294967; background: #061728; clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px); text-align: center; }
.boss-roster-item strong { color: #58758f; font-family: var(--pixel-font); font-size: 13px; }
.boss-roster-item span { color: #70879d; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.boss-roster-item.prep { border-color: #6b4977; }
.boss-roster-item.prep strong { color: #c36de3; }
.boss-roster-item.ready { border-color: var(--daily-red); box-shadow: inset 0 0 12px rgba(255, 65, 73, .12); }
.boss-roster-item.ready strong, .boss-roster-item.ready span { color: #ff777d; }
.boss-roster-item.defeated { border-color: #9a7a25; background: rgba(255, 201, 40, .08); }
.boss-roster-item.defeated strong, .boss-roster-item.defeated span { color: var(--daily-amber); }
.badge-shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.badge-shelf-item {
  display: grid; min-height: 58px; place-content: center; gap: 4px; border: 1px solid #294967; background: #061728;
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
  text-align: center;
}
.badge-shelf-item i { color: var(--daily-amber); font-style: normal; font-size: 16px; }
.badge-shelf-item strong { color: #58758f; font-family: var(--pixel-font); font-size: 9px; letter-spacing: .04em; }
.badge-shelf-item span { color: #70879d; font-size: 7px; font-weight: 850; text-transform: uppercase; }
.badge-shelf-item.earned { border-color: #9a7a25; background: rgba(255, 201, 40, .08); }
.badge-shelf-item.earned strong, .badge-shelf-item.earned span { color: var(--daily-amber); }
.menu-audio-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.run-log .recent-runs { grid-template-columns: 1fr; }
.run-log .empty-copy { padding: 16px; font-size: 11px; }
.history-menu-button { display: grid; width: 100%; min-height: 58px; grid-template-columns: 1fr 18px; align-items: center; gap: 10px; margin-top: 9px; padding: 10px 12px; border: 2px solid rgba(37, 201, 243, .35); border-radius: 0; clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); background: rgba(18, 140, 255, .09); color: white; text-align: left; }
.history-menu-button span { display: grid; gap: 3px; font-size: 12px; font-weight: 800; }
.history-menu-button small { color: var(--daily-muted); font-size: 9px; font-weight: 500; }
.history-menu-button svg { width: 17px; fill: none; stroke: var(--daily-cyan); stroke-width: 2; }
.history-menu-button:hover { border-color: var(--daily-cyan); background: rgba(18, 140, 255, .16); }
@keyframes menu-enter { from { opacity: .5; transform: translateX(34px); } }

.info-layer { position: fixed; z-index: 75; inset: 0; display: grid; place-items: center; padding: 20px; }
.info-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0, 6, 12, .88); backdrop-filter: blur(10px); }
.info-dialog { position: relative; display: flex; overflow: hidden; width: min(100%, 760px); max-height: min(92dvh, 900px); flex-direction: column; padding: 24px; border: 2px solid rgba(255, 201, 40, .5); clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px); background: radial-gradient(circle at 92% 0, rgba(255, 201, 40, .13), transparent 30%), #061727; box-shadow: 0 28px 90px rgba(0, 0, 0, .62); animation: deep-dive-enter .24s cubic-bezier(.2, .75, .25, 1); }
.info-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 17px; border-bottom: 1px solid var(--daily-border-soft); }
.info-heading span { display: block; margin-bottom: 4px; color: var(--daily-amber); font-family: var(--pixel-font); font-size: 9px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.info-heading h2 { margin: 0; font-size: clamp(1.5rem, 5vw, 2.15rem); letter-spacing: -.04em; }
.info-close { flex: 0 0 auto; border: 2px solid rgba(255, 201, 40, .42); background: rgba(8, 26, 44, .9); color: var(--daily-amber); }
.info-content { display: grid; min-height: 0; gap: 12px; padding: 18px 4px 0 0; overflow: auto; }
.info-content section { padding: 15px; border: 1px solid var(--daily-border-soft); background: rgba(7, 26, 44, .78); }
.info-content h3 { margin: 0 0 9px; color: white; font-family: var(--pixel-font); font-size: 12px; letter-spacing: .045em; text-transform: uppercase; }
.info-content p { margin: 0; color: var(--daily-muted); font-size: 13px; line-height: 1.55; }
.info-intro { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; border-color: rgba(255, 201, 40, .34) !important; background: rgba(255, 201, 40, .055) !important; }
.info-mark { display: grid; width: 48px; height: 48px; place-items: center; border: 2px solid var(--daily-amber); background: #161107; color: var(--daily-amber); font-family: var(--pixel-font); font-size: 25px; font-weight: 900; }
.info-disclaimer { margin-top: 9px !important; color: #d3e0eb !important; font-size: 11px !important; }
.info-rules, .quick-start-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.info-rules li { display: grid; grid-template-columns: minmax(145px, .48fr) 1fr; gap: 12px; padding: 9px 10px; border-left: 3px solid var(--daily-cyan); background: rgba(3, 15, 27, .58); }
.info-rules strong { color: #eff9ff; font-size: 12px; }
.info-rules span { color: var(--daily-muted); font-size: 11px; line-height: 1.45; }
.quick-start-list { counter-reset: steps; }
.quick-start-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; color: var(--daily-muted); font-size: 12px; line-height: 1.45; }
.quick-start-list b { display: grid; width: 30px; height: 30px; place-items: center; border: 2px solid var(--daily-blue); background: #071c31; color: var(--daily-cyan); font-family: var(--pixel-font); font-size: 12px; }
.quick-start-list strong { color: white; }
.info-resource-section { border-color: rgba(37, 201, 243, .3) !important; }
.info-resource-links { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
.info-resource-links a { display: flex; min-height: 42px; align-items: center; padding: 8px 10px; border: 1px solid rgba(37, 201, 243, .35); background: rgba(18, 140, 255, .08); color: var(--daily-cyan); font-size: 11px; font-weight: 800; line-height: 1.3; text-decoration: none; }
.info-resource-links a:hover { border-color: var(--daily-cyan); background: rgba(18, 140, 255, .16); color: white; }

.quiz-view { width: min(100%, 680px); margin: 0 auto; padding: 10px 10px 24px; }
.combat-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 50px;
  align-items: center;
  border: 2px solid #2d6aa8;
  background: #061426;
  box-shadow: inset 0 0 0 2px #020a13, 0 4px 0 #01060c;
  color: #f8fbff;
  font-family: var(--pixel-font);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .035em;
}
.combat-hud span { display: flex; min-width: 0; align-items: baseline; justify-content: center; gap: 5px; padding: 5px 7px; white-space: nowrap; }
.combat-hud span + span { border-left: 1px solid #496078; }
.combat-hud strong { color: var(--daily-cyan); font-size: 15px; }
.combat-hud span:nth-child(3) strong, .combat-hud span:nth-child(4) strong { color: var(--daily-amber); }
.combat-hud .combat-lives { color: var(--daily-red); font-size: 15px; letter-spacing: .02em; }

.combo-banner {
  margin-top: 6px; padding: 8px 14px; border: 2px solid var(--daily-amber); background: rgba(255, 201, 40, .12);
  color: var(--daily-amber); font-family: var(--pixel-font); font-size: clamp(14px, 4vw, 20px); font-weight: 900;
  letter-spacing: .08em; text-align: center; text-transform: uppercase; animation: combo-pop .34s cubic-bezier(.2, .75, .25, 1);
}
.combo-banner.hot { border-color: #ff777d; background: rgba(255, 65, 73, .14); color: #ff9a9f; }
@keyframes combo-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }

.boss-banner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  margin-top: 8px;
  padding: 10px 18px;
  border: 3px solid #ff424b;
  background: #120912;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  color: #ff4e55;
  font-family: var(--pixel-font);
  text-transform: uppercase;
}
.boss-banner span { font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.boss-banner strong { grid-column: 1 / -1; font-size: clamp(18px, 6vw, 30px); letter-spacing: .035em; }
.boss-banner em { grid-column: 2; grid-row: 1; color: white; font-size: 10px; font-style: normal; font-weight: 900; }
.boss-banner.guardian { border-color: var(--daily-amber); background: #151106; color: var(--daily-amber); }

.battle-stage {
  position: relative;
  overflow: hidden;
  height: clamp(220px, 34vh, 306px);
  min-height: 220px;
  margin-top: 8px;
  border: 2px solid #2468a6;
  border-bottom-color: #07111d;
  background: #07182c;
  box-shadow: inset 0 0 0 2px rgba(0, 7, 15, .7), 0 5px 0 #01060c;
  isolation: isolate;
}
.battle-background { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; image-rendering: pixelated; transition: opacity .28s ease; }
.battle-overlay { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; mix-blend-mode: screen; opacity: .72; }
.battle-stage::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(1, 8, 17, .02), rgba(1, 8, 17, .05) 68%, rgba(1, 8, 17, .3)); pointer-events: none; }
.battle-stage[data-zone="images"]:not(.boss-battle):not(.guardian-battle)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18, 140, 255, .12), transparent 55%); pointer-events: none; }
.battle-stage[data-zone="storage"]:not(.boss-battle):not(.guardian-battle)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 201, 40, .14), transparent 55%); pointer-events: none; }
.battle-stage[data-zone="networking"]:not(.boss-battle):not(.guardian-battle)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(66, 220, 130, .12), transparent 55%); pointer-events: none; }
.battle-stage[data-zone="orchestration"]:not(.boss-battle):not(.guardian-battle)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(195, 109, 227, .14), transparent 55%); pointer-events: none; }
.battle-stage[data-zone="security"]:not(.boss-battle):not(.guardian-battle)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 65, 73, .16), transparent 55%); pointer-events: none; }
.battle-stage[data-zone="installation"]:not(.boss-battle):not(.guardian-battle)::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(130, 223, 250, .12), transparent 55%); pointer-events: none; }
.battle-stage[data-intensity="rising"]::after { background: linear-gradient(180deg, rgba(255, 201, 40, .08), rgba(1, 8, 17, .22) 72%, rgba(1, 8, 17, .36)); }
.battle-stage[data-intensity="guardian"]::after, .battle-stage[data-intensity="boss"]::after { background: linear-gradient(180deg, rgba(255, 65, 73, .12), rgba(1, 8, 17, .18) 60%, rgba(1, 8, 17, .42)); }
.battle-stage.shake { animation: stage-shake .2s linear; }
.battle-stage.shake-hard { animation: stage-shake-hard .26s linear; }
@keyframes stage-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes stage-shake-hard { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
.combatant { position: absolute; bottom: 19px; display: grid; place-items: end center; width: 48%; height: 88%; transition: filter .16s ease; }
.combatant img, .combatant .sprite-actor { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; image-rendering: pixelated; filter: drop-shadow(0 7px 0 rgba(0, 7, 15, .72)); }
.sprite-actor { position: relative; background-repeat: no-repeat; background-position: 0 0; image-rendering: pixelated; }
.sprite-actor.static-fallback { width: 100%; height: 100%; background: none; }
.sprite-actor.sheet-idle, .sprite-actor.sheet-play { background-size: auto 100%; max-height: 100%; width: auto; margin-inline: auto; }
.sprite-actor.sheet-idle { animation: sprite-idle var(--sprite-duration, .9s) steps(var(--sprite-frame-count, 4)) infinite; }
.sprite-actor.sheet-play { animation: sprite-play var(--sprite-duration, .48s) steps(var(--sprite-frame-count, 4)) 1 forwards; }
@keyframes sprite-idle { from { background-position: 0 0; } to { background-position: calc(-1 * var(--sprite-frame-width, 64px) * var(--sprite-frame-count, 4)) 0; } }
@keyframes sprite-play { from { background-position: calc(-1 * var(--sprite-frame-width, 64px) * var(--sprite-start-index, 0)) 0; } to { background-position: calc(-1 * var(--sprite-frame-width, 64px) * (var(--sprite-start-index, 0) + var(--sprite-frame-count, 4))) 0; } }
.enemy-combatant .sprite-actor.sheet-idle:not(.sheet-play) { animation: sprite-idle var(--sprite-duration, .9s) steps(var(--sprite-frame-count, 4)) infinite, enemy-idle-bob 1.2s ease-in-out infinite; }
@keyframes enemy-idle-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.hero-combatant { z-index: 3; left: -4%; transform-origin: 50% 85%; }
.enemy-combatant { z-index: 2; right: -1%; width: 43%; transform-origin: 50% 85%; }
.enemy-combatant strong { position: absolute; z-index: 2; top: 7px; left: 50%; width: max-content; max-width: 95%; transform: translateX(-50%); color: white; font-family: var(--pixel-font); font-size: clamp(10px, 3.2vw, 14px); font-weight: 900; letter-spacing: .05em; text-align: center; text-shadow: 2px 2px #020812, -1px -1px #020812; text-transform: uppercase; }
.battle-stage.boss-battle .enemy-combatant { right: -7%; width: 59%; height: 96%; }
.battle-stage.boss-battle .enemy-combatant strong { display: none; }
.battle-stage.boss-battle::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(255, 55, 65, .15), transparent 48%); pointer-events: none; }
.battle-stage.rank-2 .enemy-combatant { filter: drop-shadow(0 0 10px rgba(37, 201, 243, .22)); transform: scale(1.04); }
.battle-stage.rank-3 .enemy-combatant { filter: drop-shadow(0 0 14px rgba(196, 96, 232, .3)); transform: scale(1.09); }
.battle-stage.rank-4 .enemy-combatant { filter: drop-shadow(0 0 18px rgba(255, 201, 40, .34)); transform: scale(1.14); }
.battle-stage.rank-5 .enemy-combatant { filter: drop-shadow(0 0 24px rgba(255, 65, 73, .45)); }
.battle-stage.guardian-battle::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(255, 201, 40, .13), transparent 52%); pointer-events: none; }

.health-row { position: absolute; z-index: 5; bottom: 8px; display: grid; grid-template-columns: auto minmax(64px, 1fr); align-items: center; gap: 4px; width: 39%; color: var(--daily-cyan); font-family: var(--pixel-font); font-size: 10px; font-weight: 900; text-shadow: 1px 1px #020812; }
.health-row span { min-width: 22px; text-align: right; }
.health-row i { overflow: hidden; height: 11px; border: 2px solid #04101e; background: #06111d; box-shadow: 0 0 0 1px #79dff7; }
.health-row b { display: block; width: 100%; height: 100%; background: var(--daily-cyan); transition: width .34s steps(4, end), background .2s ease; }
.hero-health { left: 3%; }
.enemy-health { right: 3%; color: #ff5d63; }
.enemy-health i { box-shadow: 0 0 0 1px #ff7278; }
.enemy-health b { background: #ff4149; }
.boss-battle .enemy-health { width: 50%; }

.battle-message { position: absolute; z-index: 10; top: 45%; left: 50%; opacity: 0; transform: translate(-50%, -50%) scale(.75); color: white; font-family: var(--pixel-font); font-size: clamp(20px, 8vw, 40px); font-weight: 1000; letter-spacing: .04em; text-align: center; text-shadow: 4px 4px #06101d, -2px -2px #06101d; pointer-events: none; }
.battle-stage.resolving .battle-message { animation: battle-message .86s steps(4, end) both; }
.battle-stage.attack-correct .battle-message { color: #fff1a5; }
.battle-stage.attack-wrong .battle-message { color: #ff8a91; }
.battle-stage.attack-correct .hero-combatant { animation: hero-attack .84s steps(6, end); }
.battle-stage.attack-correct .enemy-combatant { animation: enemy-defeat .84s steps(6, end); }
.battle-stage.attack-correct.boss-survives .enemy-combatant { animation: enemy-stagger .84s steps(6, end); }
.battle-stage.attack-wrong .enemy-combatant { animation: enemy-attack .84s steps(6, end); }
.battle-stage.attack-wrong .hero-combatant { animation: hero-hurt .84s steps(6, end); }
@keyframes hero-attack { 0%, 100% { transform: none; } 35% { transform: translate(52%, -7%) rotate(-5deg) scale(1.05); } 48% { filter: brightness(1.7); } }
@keyframes enemy-defeat { 0% { opacity: 1; transform: none; } 35% { transform: translateX(8px); filter: brightness(3); } 48% { transform: translateX(-9px) scale(1.05); } 100% { opacity: 0; transform: translateY(-18px) scale(.2); filter: brightness(3); } }
@keyframes enemy-stagger { 0%, 100% { opacity: 1; transform: none; } 28% { transform: translateX(10px); filter: brightness(2.4); } 46% { transform: translateX(-8px) scale(1.03); } 64% { transform: translateX(5px); filter: brightness(1.3); } }
@keyframes enemy-attack { 0%, 100% { transform: none; } 36% { transform: translate(-48%, -5%) scale(1.04); } }
@keyframes hero-hurt { 0%, 100% { transform: none; } 35% { transform: translateX(-13px); filter: brightness(2) saturate(.2); } 48% { transform: translateX(9px); } 63% { transform: translateX(-7px); } }
@keyframes battle-message { 0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.72); } 18%, 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

.encounter-progress { display: grid; grid-template-columns: 1fr 1fr; min-height: 45px; align-items: center; margin: 7px 0 8px; border: 2px solid #173c62; background: #030d19; color: white; font-family: var(--pixel-font); font-size: 11px; font-weight: 900; letter-spacing: .035em; }
.encounter-progress span { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 6px; }
.encounter-progress span + span { border-left: 1px solid #385069; }
.encounter-progress i { color: var(--daily-cyan); font-style: normal; }
.encounter-progress span:last-child i { color: #c460e8; }
.encounter-progress strong { color: var(--daily-cyan); }
.encounter-progress span:last-child strong { color: #d67af1; }
.boss-reward { display: grid; grid-template-columns: auto 1fr auto; min-height: 48px; align-items: center; gap: 10px; margin: 7px 0 8px; padding: 7px 15px; border: 2px solid #9c7921; clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); background: rgba(255, 201, 40, .07); color: var(--daily-amber); font-family: var(--pixel-font); text-align: center; }
.boss-reward strong { font-size: clamp(11px, 3.5vw, 16px); letter-spacing: .035em; }
.boss-reward span { font-size: 17px; }

.icon-button { display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: white; }
.icon-button:hover { background: var(--daily-surface-2); }
.icon-button svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.question-panel { padding: 19px 17px 17px; border: 2px solid #2b6baa; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); background: linear-gradient(145deg, rgba(9, 29, 51, .99), rgba(3, 14, 27, .99)); box-shadow: inset 0 0 0 2px #020914, var(--daily-shadow); }
.question-context { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid #265273; color: var(--daily-cyan); font-family: var(--pixel-font); font-size: 10px; font-weight: 900; letter-spacing: .045em; text-transform: uppercase; }
.question-context span:last-child { overflow: hidden; color: var(--daily-muted); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.question-context .enemy-rank { display: grid; min-width: 0; gap: 2px; text-align: left; }
.question-context .enemy-rank i { color: var(--daily-amber); font-size: 11px; font-style: normal; letter-spacing: .08em; }
.question-context .enemy-rank strong { overflow: hidden; color: var(--daily-cyan); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.question-panel h1 { margin: 13px 0 16px; font-size: clamp(1.04rem, 4.7vw, 1.55rem); line-height: 1.34; letter-spacing: -.018em; }
code { padding: 1px 5px; border: 1px solid rgba(37, 201, 243, .28); border-radius: 4px; background: rgba(3, 20, 36, .85); color: #8fe6ff; font-family: var(--pixel-font); font-size: .92em; font-weight: 600; letter-spacing: 0; overflow-wrap: anywhere; }
.question-panel h1 code { font-size: .88em; }
.answer-choice.correct code, .result-answer.correct code { border-color: rgba(66, 220, 130, .4); color: #a9f5c9; }
.answer-choice.wrong code { border-color: rgba(255, 100, 110, .4); color: #ffc2c7; }
.answer-controls { display: grid; gap: 10px; }
.answer-choice { display: grid; min-height: 54px; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 11px; padding: 8px 12px; border: 2px solid #34669a; clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); background: #081b30; color: #e0eaf4; font-size: clamp(14px, 4vw, 17px); font-weight: 750; line-height: 1.3; text-align: left; touch-action: manipulation; }
.answer-choice b { display: grid; width: 34px; height: 34px; margin: 0; place-items: center; border: 2px solid #28527d; border-radius: 0; background: #09192b; color: #82dffa; font-family: var(--pixel-font); font-size: 15px; }
.answer-choice span { min-width: 0; }
.answer-choice.selected { border-color: var(--daily-cyan); background: #0b3152; color: white; box-shadow: inset 0 0 0 2px rgba(37, 201, 243, .16), 0 0 22px rgba(18, 140, 255, .16); }
.answer-choice.selected b { border-color: var(--daily-cyan); color: white; }
.answer-choice.locked { animation: lock-in .26s ease; }
.answer-choice.correct { border-color: var(--daily-green); background: rgba(66, 220, 130, .14); color: #dfffea; box-shadow: inset 0 0 0 1px rgba(66, 220, 130, .45); }
.answer-choice.wrong { border-color: var(--daily-red); background: rgba(255, 100, 110, .13); color: #ffe3e6; }
.answer-choice:disabled { cursor: default; }
.lock-button { width: 100%; margin-top: 14px; border-width: 2px; border-radius: 0; clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px); font-family: var(--pixel-font); font-size: 13px; letter-spacing: .035em; text-transform: uppercase; }
.lock-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lock-button:disabled { cursor: not-allowed; border-color: #28455f; background: #13283b; box-shadow: none; color: #6f879d; }
.lock-note { margin: 9px 0 0; color: var(--daily-muted); font-size: 10px; text-align: center; }
.combat-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 48px; margin-top: 7px; border-top: 2px solid #184874; border-bottom: 2px solid #184874; background: #020c17; color: var(--daily-cyan); font-family: var(--pixel-font); }
.combat-footer button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; color: inherit; font-family: inherit; font-size: 11px; font-weight: 900; }
.combat-footer button:last-child { justify-self: end; }
.combat-footer button:first-child { justify-self: start; }
.combat-footer svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; }
.combat-footer time { padding: 0 12px; border-inline: 1px solid #314b65; color: #8da5bb; font-size: 10px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes lock-in { 50% { transform: scale(.975); filter: brightness(1.2); } }

.result-view { display: grid; width: min(100%, 620px); align-content: start; justify-items: center; margin: 0 auto; padding-top: 34px; text-align: center; }
.result-mark { display: grid; width: 130px; height: 112px; margin-bottom: 22px; place-items: center; border: 3px solid var(--daily-cyan); border-radius: 0; clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px); background: #071b30; box-shadow: inset 0 0 24px rgba(18, 140, 255, .18), 0 0 42px rgba(18, 140, 255, .14); color: white; font-family: var(--pixel-font); font-size: 30px; font-weight: 900; }
.result-view h1 { font-family: var(--pixel-font); letter-spacing: -.04em; text-transform: uppercase; }
.result-view p { max-width: 420px; color: var(--daily-muted); line-height: 1.5; }
.result-stats { display: flex; gap: 24px; margin: 16px 0 30px; }
.result-stats span { display: grid; color: var(--daily-muted); font-size: 11px; }
.result-stats strong { color: var(--daily-amber); font-size: 22px; }
.result-subtitle { margin: -8px 0 12px; color: var(--daily-cyan); font-family: var(--pixel-font); font-size: 13px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.result-ghost {
  margin: 0 0 14px; padding: 12px 14px; border: 1px solid #28527d; background: rgba(7, 26, 45, .92);
  color: var(--daily-muted); font-size: 12px; line-height: 1.5;
}
.result-ghost strong { color: var(--daily-cyan); }
.game-stat em { display: block; margin-top: 2px; color: var(--daily-green); font-size: 9px; font-style: normal; font-weight: 850; text-transform: uppercase; }
.game-toast {
  position: fixed; z-index: 60; left: 50%; bottom: 24px; max-width: min(92vw, 420px); padding: 12px 16px;
  border: 2px solid var(--daily-cyan); background: rgba(3, 17, 31, .96); color: white; font-size: 13px; font-weight: 700;
  transform: translateX(-50%); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); animation: toast-rise .28s ease;
}
@keyframes toast-rise { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.result-streak-meter { display: inline-flex; min-width: 116px; align-items: baseline; justify-content: center; gap: 7px; margin: -8px 0 26px; padding: 11px 18px; border: 2px solid var(--daily-border); clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); background: #071a2c; color: var(--daily-muted); font-family: var(--pixel-font); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.result-streak-meter strong { color: var(--daily-cyan); font-size: 24px; }
.result-streak-meter span { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.result-streak-meter.hot { border-color: var(--daily-amber); box-shadow: 0 0 25px rgba(255, 201, 40, .14); transform: scale(1.05); }
.result-streak-meter.hot strong { color: var(--daily-amber); }
.result-recap { width: 100%; margin: 0 0 28px; text-align: left; }
.result-recap .section-title { margin-bottom: 11px; }
.result-recap .section-title h2 { font-size: 16px; }
.result-recap .section-title span { color: var(--daily-muted); font-size: 11px; }
.result-answers { display: grid; gap: 8px; }
.result-answer {
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--daily-border-soft);
  border-left: 3px solid var(--daily-border);
  border-radius: 10px;
  background: rgba(8, 26, 44, .9);
  opacity: 0;
  transform: translateY(10px) scale(.99);
  transition: opacity .24s ease, transform .24s ease, border-color .24s ease;
}
.result-answer.revealed { opacity: 1; transform: none; }
.result-answer.correct { border-left-color: var(--daily-green); }
.result-answer.wrong { border-left-color: var(--daily-red); }
.result-answer-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-answer-heading span { color: var(--daily-muted); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.result-answer-heading strong { color: var(--daily-green); font-size: 11px; }
.result-answer.wrong .result-answer-heading strong { color: var(--daily-red); }
.result-answer-reward { display: inline-block; margin-top: 8px; color: var(--daily-amber); font-size: 10px; font-weight: 800; }
.result-answer .result-answer-stem { max-width: none; margin: 8px 0 10px; color: #edf7ff; font-size: 14px; font-weight: 750; line-height: 1.4; }
.result-answer .result-answer-choice, .result-answer .result-answer-explanation { max-width: none; margin: 4px 0 0; color: var(--daily-muted); font-size: 11px; line-height: 1.45; }
.result-answer .correct-choice { color: #bcefd1; }
.result-answer .result-answer-explanation { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--daily-border-soft); color: #8fa9c0; }
.more-info-button { display: inline-flex; min-height: 36px; align-items: center; gap: 7px; margin-top: 10px; padding: 0 11px; border: 1px solid rgba(37, 201, 243, .42); border-radius: 8px; background: rgba(18, 140, 255, .1); color: var(--daily-cyan); font-size: 10px; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.more-info-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.more-info-button:hover { border-color: var(--daily-cyan); background: rgba(18, 140, 255, .18); color: white; }
.more-info-button.compact { min-height: 32px; margin-top: 1px; }

.deep-dive-layer { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; padding: 20px; }
.deep-dive-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0, 6, 12, .86); backdrop-filter: blur(10px); }
.deep-dive-dialog { position: relative; overflow: auto; width: min(100%, 660px); max-height: min(90vh, 820px); padding: 22px; border: 1px solid rgba(37, 201, 243, .38); border-radius: 16px; background: radial-gradient(circle at 92% 0, rgba(18, 140, 255, .2), transparent 28%), #061727; box-shadow: 0 28px 90px rgba(0, 0, 0, .55); animation: deep-dive-enter .24s cubic-bezier(.2, .75, .25, 1); }
.deep-dive-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 17px; border-bottom: 1px solid var(--daily-border-soft); }
.deep-dive-heading span { display: block; margin-bottom: 4px; color: var(--daily-cyan); font-size: 9px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.deep-dive-heading h2 { margin: 0; font-size: clamp(1.35rem, 5vw, 1.9rem); letter-spacing: -.035em; }
.deep-dive-close { flex: 0 0 auto; border: 1px solid var(--daily-border); background: rgba(8, 26, 44, .86); }
.deep-dive-content { display: grid; gap: 15px; padding-top: 18px; }
.deep-dive-content section { padding: 14px; border: 1px solid var(--daily-border-soft); border-radius: 10px; background: rgba(7, 26, 44, .78); }
.deep-dive-content h3 { margin: 0 0 7px; color: white; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.deep-dive-content p { margin: 0; color: var(--daily-muted); font-size: 13px; line-height: 1.55; }
.deep-dive-verdict { padding: 14px 15px; border-left: 3px solid var(--daily-green); border-radius: 7px; background: rgba(66, 220, 130, .09); color: #dbffea !important; font-weight: 750; }
.deep-option-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.deep-option-list li { padding: 11px 12px; border: 1px solid var(--daily-border-soft); border-radius: 8px; background: rgba(3, 15, 27, .66); }
.deep-option-list li.correct { border-color: rgba(66, 220, 130, .52); }
.deep-option-list li.selected:not(.correct) { border-color: rgba(255, 100, 110, .55); }
.deep-option-list li > div { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.deep-option-list strong { color: #edf7ff; font-size: 12px; line-height: 1.35; }
.deep-option-list span { flex: 0 0 auto; color: var(--daily-amber); font-size: 8px; font-weight: 850; letter-spacing: .05em; text-align: right; text-transform: uppercase; }
.deep-option-list p { margin-top: 6px; font-size: 11px; }
.deep-dive-study { border-color: rgba(37, 201, 243, .3) !important; background: rgba(18, 140, 255, .055) !important; }
.deep-study-lessons { display: grid; gap: 9px; }
.deep-study-card { padding: 11px 12px; border-left: 3px solid var(--daily-cyan); background: rgba(3, 15, 27, .55); }
.deep-study-card > a { color: #eaf8ff; font-size: 13px; font-weight: 850; text-decoration: none; }
.deep-study-card > a:hover { color: var(--daily-cyan); text-decoration: underline; }
.deep-study-card p { margin-top: 6px; }
.deep-study-card > strong { display: block; margin-top: 9px; color: var(--daily-amber); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.deep-study-card ul { display: grid; gap: 4px; margin: 6px 0 0; padding-left: 18px; color: var(--daily-muted); font-size: 11px; line-height: 1.45; }
.deep-resource-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.deep-resource-list a { padding: 7px 9px; border: 1px solid rgba(37, 201, 243, .28); background: rgba(3, 15, 27, .62); color: var(--daily-cyan); font-size: 10px; font-weight: 750; text-decoration: none; }
.deep-resource-list a:hover { border-color: var(--daily-cyan); color: white; }
.deep-dive-sources { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 17px; }
.deep-dive-sources a { color: var(--daily-cyan); font-size: 11px; font-weight: 800; text-decoration: none; }
.deep-dive-sources a:hover { color: white; text-decoration: underline; }
@keyframes deep-dive-enter { from { opacity: .5; transform: translateY(18px) scale(.985); } }

.particle-field { position: fixed; z-index: 60; inset: 0; overflow: hidden; pointer-events: none; }
.particle { position: absolute; display: block; width: 9px; height: 9px; border-radius: 50%; animation: particle-pop .78s cubic-bezier(.12, .72, .2, 1) forwards; box-shadow: 0 0 15px currentColor; }
.particle.shard { width: 7px; height: 14px; border-radius: 2px; }
.particle.celebrate, .particle.spark, .particle.trail, .particle.ember { width: 12px; height: 20px; border-radius: 3px; animation-duration: 1.45s; box-shadow: 0 0 18px currentColor; }
.particle.smoke { width: 14px; height: 14px; border-radius: 50%; animation-duration: 1.1s; filter: blur(.4px); }
.particle.ember { animation-duration: 1.6s; }
@keyframes particle-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--particle-x)), calc(-50% + var(--particle-y))) rotate(var(--particle-rotate)) scale(.7); }
}

.history-view { width: min(100%, 900px); margin: 0 auto; }
.history-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.history-heading h1 { font-size: clamp(2rem, 7vw, 3.3rem); }
.history-heading p { margin: 9px 0 0; color: var(--daily-muted); }
.history-tabs { grid-template-columns: 1fr 1fr; margin: 25px 0 12px; border-width: 0 0 1px; border-radius: 0; background: transparent; }
.history-tabs button { border-radius: 0; }
.history-tabs button.active { border-bottom: 2px solid var(--daily-blue); color: var(--daily-blue); }
.history-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-bottom: 16px; }
.search-field { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--daily-border); border-radius: 8px; background: var(--daily-surface); }
.search-field svg { width: 18px; fill: none; stroke: var(--daily-muted); stroke-width: 1.8; }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: white; font-size: 12px; }
.search-field input::placeholder { color: #7890a6; }
.history-tools select, .export-button { min-height: 42px; padding: 0 12px; border: 1px solid var(--daily-border); border-radius: 8px; background: var(--daily-surface); font-size: 12px; font-weight: 700; }
.history-run { overflow: hidden; border: 1px solid var(--daily-border-soft); border-radius: 10px; background: rgba(8, 26, 44, .9); }
.history-run > .run-row { border: 0; border-radius: 0; background: transparent; }
.run-detail { padding: 0 12px 12px; border-top: 1px solid var(--daily-border-soft); }
.answer-row { display: grid; grid-template-columns: 28px minmax(0, 1.4fr) minmax(0, .8fr) 52px; gap: 9px; padding: 11px 3px; border-bottom: 1px solid rgba(41, 72, 102, .55); align-items: start; font-size: 11px; }
.answer-row:last-child { border-bottom: 0; }
.answer-row > span:first-child { color: var(--daily-muted); }
.answer-row .answer-stem { color: #deebf6; line-height: 1.35; }
.answer-row .answer-value { color: var(--daily-muted); line-height: 1.35; }
.answer-row strong { color: var(--daily-green); text-align: right; }
.answer-row strong.wrong { color: var(--daily-red); }
.answer-explanation { grid-column: 2 / -1; margin: 0; color: #8da5bb; line-height: 1.45; }
.answer-row .more-info-button { grid-column: 2 / -1; justify-self: start; }

@media (min-width: 760px) {
  .daily-header { padding-inline: 34px; }
  .home-view { width: min(100%, 940px); grid-template-columns: 1fr; padding-top: 18px; }
  .home-hero { display: grid; grid-template-columns: minmax(420px, 1fr) 340px; align-items: start; gap: 8px; text-align: left; }
  .lobby-hud { grid-column: 1 / -1; }
  .world-map { height: 720px; aspect-ratio: auto; }
  .zone-command-panel { position: sticky; top: 84px; margin-top: 0; }
  .zone-command-heading { display: grid; }
  .zone-command-heading h1 { font-size: 29px; }
  .rank-track { grid-template-columns: 1fr 1fr; }
  .game-panel { margin-top: 10px; }
  .lobby-battle-stage { height: 310px; }
  .lobby-command-panel { padding: 24px 28px 22px; }
  .quiz-view { padding-top: 18px; }
  .question-panel { padding: 24px; }
  .battle-stage { height: 310px; }
}

@media (min-width: 900px) {
  body.in-battle { height: 100dvh; overflow: hidden; }
  body.in-battle .daily-header { position: relative; height: 54px; min-height: 54px; }
  body.in-battle .daily-app { width: min(100%, 1240px); height: calc(100dvh - 54px); }
  body.in-battle .quiz-view {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(320px, .78fr) minmax(520px, 1.22fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    gap: 7px 10px;
    padding: 7px 10px 8px;
    overflow: hidden;
  }
  body.in-battle .combat-hud { grid-column: 1 / -1; min-height: 40px; }
  body.in-battle .boss-banner { grid-column: 1; grid-row: 2; margin: 0; }
  body.in-battle .battle-stage { height: auto; min-height: 0; grid-column: 1; grid-row: 3; margin: 0; }
  body.in-battle .boss-reward,
  body.in-battle .encounter-progress { grid-column: 1; grid-row: 4; min-height: 40px; margin: 0; }
  body.in-battle .question-panel {
    display: grid;
    min-height: 0;
    grid-column: 2;
    grid-row: 2 / 6;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    align-content: stretch;
    padding: 15px 16px 12px;
    overflow: hidden;
  }
  body.in-battle .question-panel h1 { margin: 10px 0 12px; font-size: clamp(17px, 1.65vw, 22px); line-height: 1.25; }
  body.in-battle .answer-controls { align-content: center; gap: 7px; }
  body.in-battle .answer-choice { min-height: 46px; padding: 6px 9px; font-size: clamp(13px, 1.2vw, 16px); line-height: 1.22; }
  body.in-battle .lock-button { min-height: 42px; margin-top: 8px; }
  body.in-battle .lock-note { margin-top: 5px; }
  body.in-battle .combat-footer { display: grid; min-height: 38px; grid-column: 1; grid-row: 5; margin: 0; }
  body.in-battle .combat-footer button { min-height: 36px; }
  body.in-battle .question-panel.compact-fit { padding-block: 11px 8px; }
  body.in-battle .question-panel.compact-fit h1 { margin-block: 7px 8px; font-size: 16px; line-height: 1.18; }
  body.in-battle .question-panel.compact-fit .answer-controls { gap: 5px; }
  body.in-battle .question-panel.compact-fit .answer-choice { min-height: 40px; padding-block: 4px; font-size: 13px; line-height: 1.15; }
  body.in-battle .question-panel.compact-fit .lock-button { min-height: 38px; margin-top: 5px; }
  body.in-battle .question-panel.dense-fit { padding: 8px 10px 6px; }
  body.in-battle .question-panel.dense-fit .question-context { padding-bottom: 5px; font-size: 8px; }
  body.in-battle .question-panel.dense-fit h1 { margin-block: 5px 6px; font-size: 14px; line-height: 1.12; }
  body.in-battle .question-panel.dense-fit .answer-controls { gap: 3px; }
  body.in-battle .question-panel.dense-fit .answer-choice { min-height: 34px; grid-template-columns: 27px minmax(0, 1fr); gap: 6px; padding: 3px 6px; font-size: 11px; line-height: 1.08; }
  body.in-battle .question-panel.dense-fit .answer-choice b { width: 25px; height: 25px; font-size: 10px; }
  body.in-battle .question-panel.dense-fit .lock-button { min-height: 34px; margin-top: 4px; font-size: 10px; }
  body.in-battle .question-panel.dense-fit .lock-note { margin-top: 2px; font-size: 8px; }
}

@media (hover: hover) and (pointer: fine) {
  .answer-choice:not(:disabled):hover { border-color: var(--daily-blue); background: rgba(14, 79, 137, .33); color: white; }
  .answer-choice.correct:hover { border-color: var(--daily-green); background: rgba(66, 220, 130, .14); color: #dfffea; }
  .answer-choice.wrong:hover { border-color: var(--daily-red); background: rgba(255, 100, 110, .13); color: #ffe3e6; }
}

@media (max-width: 560px) {
  .daily-header { padding-inline: 12px; }
  .home-view { padding: 10px 10px 48px; }
  .lobby-hud { font-size: 8px; }
  .lobby-hud span { display: grid; gap: 2px; padding-inline: 3px; }
  .lobby-hud strong, .lobby-hud .lobby-lives { font-size: 11px; }
  .world-map { min-height: 520px; }
  .zone-node { padding-top: 5px; }
  .zone-node span { font-size: clamp(7px, 2.25vw, 9px); }
  .zone-command-panel { padding: 15px 11px; }
  .zone-command-heading h1 { font-size: 21px; }
  .zone-command-heading span { padding: 6px 7px; font-size: 8px; }
  .rank-track { gap: 4px; }
  .rank-track button { min-height: 72px; padding-inline: 2px; }
  .rank-track button span { font-size: 7px; }
  .rank-track button strong { font-size: 18px; }
  .lobby-battle-stage { height: 214px; }
  .lobby-command-panel { padding: 17px 12px 15px; }
  .lobby-command-panel h1 { font-size: 22px; }
  .lobby-ready-banner { bottom: 7px; }
  .game-panel { margin-top: 7px; }
  .game-stat { gap: 5px; padding: 11px 7px; }
  .game-stat svg { width: 21px; }
  .game-stat strong { font-size: 14px; }
  .level-row { padding: 10px 12px; }
  body.in-battle { height: 100dvh; overflow: hidden; }
  body.in-battle .daily-header { position: relative; min-height: 48px; height: 48px; }
  body.in-battle .daily-app { height: calc(100dvh - 48px); }
  body.in-battle .quiz-view { display: flex; height: 100%; min-height: 0; flex-direction: column; padding: 4px 8px 5px; overflow: hidden; }
  body.in-battle .daily-brand { font-family: var(--pixel-font); font-size: 15px; font-weight: 900; }
  body.in-battle .daily-brand svg { display: none; }
  body.in-battle .game-menu-button { min-height: 34px; padding-inline: 10px; font-size: 10px; }
  .combat-hud { min-height: 36px; font-size: 8px; }
  .combat-hud strong { font-size: 11px; }
  .combat-hud .combat-lives { font-size: 11px; letter-spacing: 0; }
  .combat-hud span { gap: 3px; padding-inline: 3px; }
  .boss-banner { min-height: 32px; margin-top: 4px; padding: 4px 10px; gap: 2px 8px; }
  .boss-banner span, .boss-banner em { font-size: 8px; }
  .boss-banner strong { font-size: 12px; }
  .battle-stage { height: clamp(142px, 22dvh, 178px); min-height: clamp(142px, 22dvh, 178px); margin-top: 4px; }
  .combatant { bottom: 14px; width: 50%; height: 88%; }
  .enemy-combatant { right: -3%; width: 47%; }
  .battle-stage.boss-battle .enemy-combatant { right: -9%; width: 64%; }
  .enemy-combatant strong { top: 3px; font-size: 9px; }
  .health-row { bottom: 5px; width: 42%; font-size: 8px; }
  .health-row i { height: 8px; }
  .boss-battle .enemy-health { width: 53%; }
  .encounter-progress, .boss-reward { min-height: 32px; margin: 3px 0 4px; font-size: 8px; }
  .encounter-progress span, .boss-reward { padding-block: 3px; }
  .question-panel { min-height: 0; flex: 1; padding: 9px 10px 8px; overflow: hidden; }
  .question-context { gap: 6px; padding-bottom: 5px; font-size: 8px; }
  .question-context .enemy-rank { gap: 0; }
  .question-context .enemy-rank i { font-size: 9px; }
  .question-context .enemy-rank strong { font-size: 8px; }
  .question-panel h1 { margin: 6px 0 7px; font-size: clamp(14px, 2.25vh, 17px); line-height: 1.2; }
  .answer-controls { gap: 4px; }
  .answer-choice { min-height: 39px; grid-template-columns: 28px minmax(0, 1fr); gap: 7px; padding: 4px 7px; font-size: clamp(12px, 1.85vh, 14px); line-height: 1.18; }
  .answer-choice b { width: 27px; height: 27px; font-size: 11px; }
  .lock-button { min-height: 42px; margin-top: 7px; font-size: 10px; }
  .lock-note { margin-top: 4px; font-size: 8px; }
  body.in-battle .combat-footer { display: none; }
  .game-menu { width: 100%; border-left: 0; }
  .header-actions { gap: 5px; }
  .game-menu-button { min-height: 36px; gap: 5px; padding-inline: 9px; font-size: 10px; }
  .game-menu-button svg { width: 18px; }
  .info-layer { align-items: end; padding: 0; }
  .info-dialog { width: 100%; max-height: 94dvh; padding: 19px 14px 24px; border-width: 1px 0 0; clip-path: none; border-radius: 18px 18px 0 0; }
  .info-intro { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .info-mark { width: 38px; height: 38px; font-size: 20px; }
  .info-rules li { grid-template-columns: 1fr; gap: 3px; }
  .info-resource-links { grid-template-columns: 1fr; }
  .menu-audio-controls { grid-template-columns: 1fr; }
  .deep-dive-layer { align-items: end; padding: 0; }
  .deep-dive-dialog { width: 100%; max-height: 92vh; padding: 20px 16px 28px; border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
  .deep-option-list li > div { display: grid; }
  .deep-option-list span { text-align: left; }
  .history-tools { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .answer-row { grid-template-columns: 22px minmax(0, 1fr) 44px; }
  .answer-row .answer-value { grid-column: 2; }
  .answer-row strong { grid-column: 3; grid-row: 1 / span 2; }
  .answer-explanation { grid-column: 2 / -1; }
}

@media (max-width: 560px) and (max-height: 700px) {
  body.in-battle .daily-header { min-height: 42px; height: 42px; }
  body.in-battle .daily-app { height: calc(100dvh - 42px); }
  body.in-battle .quiz-view { padding-top: 3px; }
  .combat-hud { min-height: 32px; }
  .boss-banner { min-height: 27px; padding-block: 2px; }
  .boss-banner strong { font-size: 10px; }
  .battle-stage { height: clamp(110px, 18dvh, 126px); min-height: clamp(110px, 18dvh, 126px); }
  .combatant { bottom: 11px; }
  .boss-reward, .encounter-progress { min-height: 27px; margin-block: 2px 3px; }
  .question-panel { padding: 7px 8px 6px; }
  .question-panel h1 { margin: 4px 0 5px; font-size: clamp(12px, 2.05vh, 14px); line-height: 1.12; }
  .answer-controls { gap: 3px; }
  .answer-choice { min-height: 34px; grid-template-columns: 25px minmax(0, 1fr); gap: 5px; padding: 3px 5px; font-size: clamp(10px, 1.7vh, 12px); line-height: 1.1; }
  .answer-choice b { width: 24px; height: 24px; font-size: 10px; }
  .lock-button { min-height: 37px; margin-top: 5px; }
  .lock-note { margin-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .battle-stage.shake, .battle-stage.shake-hard { animation: none !important; }
  .sprite-actor.sheet-idle, .sprite-actor.sheet-play, .enemy-combatant .sprite-actor.sheet-idle { animation: none !important; }
}
