:root {
  color-scheme: dark;
  --ink: #071b2c;
  --ice: #86f2e3;
  --paper: #f0fbff;
  --muted: #a6c5d3;
  --orange: #ffbd73;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: var(--ink);
  color: var(--paper);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior: none;
}
body {
  background: radial-gradient(ellipse at 50% 20%, #163d52 0, #071b2c 65%);
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
canvas:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
button {
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
}
.arcade {
  width: min(1120px, 100%);
  margin: auto;
  padding: 0 22px;
}
.topbar {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 3px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.brand span {
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--ice);
  border-left: 1px solid #427284;
  padding-left: 16px;
}
.tools {
  display: flex;
  gap: 8px;
}
.tools button {
  height: 38px;
  min-width: 40px;
  background: #123447;
  border: 1px solid #31566a;
  border-radius: 11px;
  font-weight: 700;
}
.tools button[aria-pressed="true"] {
  color: var(--ice);
  border-color: var(--ice);
}
.tools button:disabled {
  opacity: 0.35;
}
.arena {
  position: relative;
  height: min(790px, calc(100svh - 125px));
  min-height: 510px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #426b80;
  box-shadow: 0 30px 85px #0006;
  background: #143c58;
  isolation: isolate;
}
.arena canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}
.hud {
  position: absolute;
  top: 25px;
  left: 30px;
  right: 30px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  filter: drop-shadow(0 2px 7px #001e36);
  z-index: 2;
}
.stat span,
.wave-stat span {
  display: block;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1.6px;
  color: #c9f2fa;
}
.stat strong {
  display: block;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  letter-spacing: -1px;
}
.best-stat {
  text-align: right;
}
.best-stat strong {
  color: var(--ice);
}
.wave-stat {
  text-align: center;
}
.wave-stat strong {
  font-size: 27px;
  font-weight: 800;
}
.life-row {
  position: absolute;
  top: 90px;
  left: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}
.life-row #lives {
  color: #ffb798;
  font-size: 22px;
  letter-spacing: 5px;
  text-shadow: 0 2px 10px #07283d;
}
.life-row #combo {
  color: #fff1a8;
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 2px 8px #17324c;
}
.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #04192799, #071b2ce3);
  z-index: 4;
  padding: 24px;
  backdrop-filter: blur(4px);
  overflow: auto;
}
.overlay[hidden],
[hidden] {
  display: none !important;
}
.menu {
  max-width: 500px;
  width: 100%;
  text-align: center;
  padding: 15px 0;
}
.eyebrow {
  color: var(--ice);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 20px;
}
h1 {
  font-family: Impact, "Arial Black", system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(56px, 8vw, 92px);
  line-height: 0.92;
  letter-spacing: 1px;
  margin: 0;
  text-shadow:
    0 6px 0 #153b52,
    0 14px 25px #03182780;
  transform: rotate(-3deg);
}
h1 span {
  color: var(--ice);
}
.tagline {
  font-size: 20px;
  font-weight: 800;
  margin: 26px 0 18px;
  color: var(--orange);
}
.menu-summary p {
  font-size: 16px;
  line-height: 1.6;
  margin: 8px auto;
  max-width: 400px;
}
.menu-summary .instructions {
  color: var(--muted);
  font-size: 14px;
  max-width: 360px;
}
.primary {
  display: block;
  width: min(330px, 100%);
  margin: 24px auto 0;
  border: 0;
  border-radius: 15px;
  background: var(--ice);
  color: #072b36;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.4px;
  padding: 18px 20px;
  box-shadow:
    0 5px 0 #399992,
    0 10px 30px #67edd322;
  transition:
    transform 0.15s,
    filter 0.15s;
}
.primary:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}
.primary:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #399992;
}
.primary:disabled {
  filter: grayscale(0.6);
  opacity: 0.6;
}
.secondary {
  border: 1px solid #496b7e;
  border-radius: 12px;
  padding: 11px 22px;
  background: #173b50;
  margin: 15px auto 0;
}
.menu-hint {
  color: #adc4cf;
  font-size: 12px;
  line-height: 1.6;
  margin: 20px auto;
  max-width: 360px;
}
.scores {
  font-size: 13px;
  color: #b7cdd7;
}
.scores summary {
  cursor: pointer;
  display: list-item;
  list-style-position: inside;
  padding: 8px;
}
.scores ol {
  margin: 4px auto 10px;
  padding: 0;
  list-style: none;
  max-width: 275px;
}
.scores li {
  padding: 7px 4px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #345367;
}
.storage-note {
  font-size: 12px;
  line-height: 1.5;
  margin: 7px auto;
  max-width: 330px;
}
.results > span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 2px;
}
.results > strong {
  display: block;
  font-size: 60px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.2;
}
.results p {
  margin: 7px auto;
  font-size: 14px;
  color: var(--muted);
}
.results .record {
  color: var(--ice);
  font-weight: 900;
  letter-spacing: 2px;
}
.power-controls {
  position: absolute;
  bottom: 20px;
  left: 25px;
  right: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
  pointer-events: none;
}
.power {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  min-width: 205px;
  text-align: left;
  border: 1px solid #b6f6ff66;
  background: #082941e8;
  box-shadow: 0 8px 20px #06253b33;
  border-radius: 14px;
  padding: 12px 15px;
  font-weight: 800;
  font-size: 12px;
}
.power:not(:disabled) {
  background: #b0fff1;
  color: #06383f;
  border-color: #fff;
  box-shadow: 0 0 25px #70e8d380;
}
.power-track {
  grid-column: 1;
  grid-row: 2;
  display: block;
  background: #496d8077;
  border-radius: 6px;
  height: 5px;
  overflow: hidden;
  align-self: center;
}
.power-track span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ice);
  transition: width 0.12s;
}
.power:not(:disabled) .power-track span {
  background: #147b76;
}
#power-value {
  grid-column: 2;
  grid-row: 2;
  font-size: 11px;
}
.aim-help {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 8px #132e41;
  background: #0a2c4280;
  border-radius: 20px;
  padding: 8px 12px;
}
.wave-notice {
  position: absolute;
  left: 0;
  right: 0;
  top: 40%;
  text-align: center;
  pointer-events: none;
  color: #fff;
  font-size: clamp(24px, 5vw, 48px);
  font-weight: 900;
  text-shadow:
    0 4px 0 #194255,
    0 0 25px #062637;
  opacity: 0;
  transition: opacity 0.18s;
  z-index: 3;
}
.wave-notice.show {
  opacity: 1;
}
footer {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 3px;
  color: #a2bac8;
  font-size: 11px;
  line-height: 1.5;
}
footer a {
  white-space: nowrap;
  color: #cde8ef;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.error {
  color: #ffc7ab;
  font-size: 14px;
  line-height: 1.5;
}
@media (max-width: 600px) {
  .arcade {
    padding: 0 9px;
  }
  .topbar {
    height: 57px;
    padding: 0 5px;
  }
  .brand {
    font-size: 18px;
    gap: 10px;
  }
  .brand span {
    font-size: 10px;
    padding-left: 10px;
    letter-spacing: 2px;
  }
  .tools button {
    height: 34px;
    min-width: 35px;
  }
  .arena {
    height: calc(100svh - 104px - env(safe-area-inset-bottom));
    min-height: 490px;
    border-radius: 18px;
  }
  .hud {
    top: 18px;
    left: 18px;
    right: 18px;
  }
  .stat span,
  .wave-stat span {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .stat strong {
    font-size: 29px;
  }
  .wave-stat strong {
    font-size: 24px;
  }
  .life-row {
    top: 76px;
    left: 18px;
    right: 18px;
  }
  .overlay {
    padding: 20px 18px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.4px;
    margin-bottom: 18px;
  }
  h1 {
    font-size: 66px;
  }
  .tagline {
    font-size: 18px;
    margin: 22px 0 12px;
  }
  .menu-summary p {
    font-size: 14px;
  }
  .menu-summary .instructions {
    font-size: 13px;
  }
  .primary {
    margin-top: 20px;
    padding: 15px;
  }
  .menu-hint {
    font-size: 11px;
    margin: 17px auto 10px;
  }
  .scores {
    font-size: 12px;
  }
  .power-controls {
    bottom: 16px;
    left: 15px;
    right: 15px;
  }
  .power {
    min-width: 178px;
    font-size: 11px;
    padding: 10px 12px;
  }
  .aim-help {
    display: none;
  }
  footer {
    font-size: 9px;
    min-height: 42px;
    padding: 9px 3px;
  }
  .results > strong {
    font-size: 48px;
  }
}
@media (max-height: 650px) and (min-width: 650px) {
  .arena {
    min-height: 390px;
  }
  .menu {
    max-width: 650px;
  }
  .eyebrow,
  .menu-hint,
  .scores {
    display: none;
  }
  h1 {
    font-size: 46px;
  }
  h1 br {
    display: none;
  }
  h1 span {
    margin-left: 10px;
  }
  .tagline {
    margin: 14px 0 8px;
  }
  .menu-summary p {
    max-width: 560px;
    font-size: 14px;
  }
  .primary {
    padding: 13px;
    margin-top: 15px;
  }
  .results > strong {
    font-size: 38px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.hud .stat span,
.hud .wave-stat span {
  font-size: 12px;
  letter-spacing: 0.6px;
}
.brand span,
.eyebrow,
.power,
#power-value,
.scores,
.menu-hint,
.storage-note,
footer {
  font-size: 12px;
}
.overlay {
  align-items: safe center;
}
@media (max-width: 600px) {
  .brand span {
    font-size: 12px;
  }
  .eyebrow {
    font-size: 12px;
    letter-spacing: 0.6px;
  }
  h1 {
    font-size: 60px;
  }
  .menu-summary p {
    font-size: 16px;
  }
  .menu-summary .instructions {
    font-size: 14px;
  }
  .menu-hint,
  .scores,
  .power,
  #power-value,
  footer {
    font-size: 12px;
  }
  .menu-hint {
    margin: 12px auto 8px;
  }
  footer {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 3px;
    padding: 10px 2px;
  }
  .primary {
    margin-top: 16px;
  }
  .tagline {
    margin-top: 18px;
  }
}

.power-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 560px;
  margin: auto;
}
.power {
  min-width: 0;
  min-height: 64px;
}
.aim-help {
  display: none;
}
.snowman-power {
  border-color: #e8d9a5;
  background: #3a4350;
}
.snowman-power:not(:disabled) {
  background: #ffe0a1;
  border-color: #fff0c9;
  color: #333d46;
  box-shadow: 0 0 20px #efba5725;
}
#snowman-label {
  grid-column: 1 / -1;
}
#snowman-count {
  font-size: 12px;
  grid-column: 1 / -1;
}
.power:disabled {
  opacity: 0.72;
}
.snowman-power:disabled {
  color: #dce8ed;
}
.arena {
  box-shadow:
    0 25px 80px #0008,
    0 0 50px #5effd90d;
}
@media (max-width: 600px) {
  .power-controls {
    gap: 8px;
    left: 10px;
    right: 10px;
  }
  .power {
    padding: 10px 8px;
    font-size: 12px;
    min-height: 65px;
  }
  .brand span {
    font-size: 10px;
    letter-spacing: 1px;
  }
  .brand {
    gap: 7px;
  }
  .brand span {
    padding-left: 7px;
  }
}

.game-guide {
  max-width: 900px;
  margin: 28px auto;
  padding: 24px;
  color: #c5dfeb;
  font-size: 16px;
  line-height: 1.75;
}
.game-guide h2,
.game-guide h3 {
  color: #fff;
  margin: 18px 0 8px;
}
.game-guide a {
  color: #82dbed;
  text-decoration: underline;
}
.arcade {
  max-width: 1120px;
}
.topbar {
  gap: 12px;
}
.arena {
  border-color: #6592a7;
}
.menu {
  width: min(100%, 560px);
}
.menu-summary .instructions {
  color: #c8e1ec;
}
.primary {
  min-height: 50px;
  border-radius: 14px;
  box-shadow: 0 8px 28px #73f7d724;
}
.game-guide {
  background: #102e40;
  border: 1px solid #31566a;
  border-radius: 18px;
  margin-block: 24px;
}
.game-guide h2 {
  font-size: clamp(24px, 3vw, 32px);
}
.game-guide p {
  max-width: 74ch;
}
.game-guide a:hover {
  text-decoration-thickness: 2px;
}
#combo {
  position: relative;
  padding: 7px 10px;
  border-radius: 8px;
  background: #123447cc;
  font-size: 14px;
  color: #b2ffe7;
}
#combo:empty {
  display: none;
}
#combo::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: var(--combo-life, 0%);
  background: #86f2e3;
  border-radius: 3px;
}
.power:not(:disabled) {
  outline: 1px solid #c1fff0;
  outline-offset: 2px;
}
.power:disabled {
  opacity: 0.6;
}
.wave-notice {
  max-width: 85%;
  text-wrap: balance;
}
.scores {
  max-height: 180px;
  overflow: auto;
}
.tools button {
  min-width: 44px;
  min-height: 44px;
}
@media (max-width: 600px) {
  .brand span {
    display: none;
  }
  .arcade {
    padding: 0 8px;
  }
  .arena {
    min-height: 430px;
    height: calc(100svh - 110px - env(safe-area-inset-bottom));
    border-radius: 16px;
  }
  .overlay {
    padding: 18px 16px;
  }
  .menu h1 {
    font-size: clamp(42px, 12vw, 60px);
  }
  .menu .eyebrow {
    margin-bottom: 10px;
  }
  .tagline {
    margin: 12px 0;
  }
  .menu-summary p {
    font-size: 15px;
    line-height: 1.45;
  }
  .menu-summary .instructions {
    font-size: 14px;
  }
  .game-guide {
    padding: 18px;
  }
  .power {
    min-height: 58px;
  }
  .hud .stat span,
  .hud .wave-stat span {
    font-size: 12px;
  }
  .life-row {
    top: 72px;
  }
  .primary {
    margin-top: 12px;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  .arena {
    height: 430px;
    min-height: 430px;
  }
  .menu h1 {
    font-size: 42px;
  }
  .overlay {
    align-items: flex-start;
  }
}

html:lang(el) .game-guide,
html:lang(el) .instructions,
html:lang(el) .tagline {
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
.game-guide h2,
.game-guide h3 {
  line-height: 1.45;
  letter-spacing: normal;
  padding-block: 0.12em;
  overflow: visible;
  overflow-wrap: break-word;
  text-transform: none;
}
.game-guide p {
  overflow-wrap: break-word;
}

.dash-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 10px 12px;
}
.dash-button {
  min-height: 44px;
  min-width: 118px;
  border: 1px solid #86f2e3;
  border-radius: 10px;
  padding: 10px 14px;
  background: #143d50;
  color: #e5fbff;
  font-size: 14px;
  font-weight: 700;
}
.dash-button:disabled { opacity: .55; }
.dash-button:focus-visible { outline: 3px solid #ffbd73; outline-offset: 3px; }
body.light .game-guide { background: #f2f6fa; color: #122c40; }
body.light .game-guide h2, body.light .game-guide h3 { color: #122c40; }
body.light .game-guide a { color: #096783; }
.dash-controls {
  position: absolute;
  bottom: 100px;
  left: 12px;
  right: 12px;
  z-index: 3;
  pointer-events: none;
}
.dash-button { pointer-events: auto; }
