@charset "UTF-8";

:root {
  --sky: #95cae8;
  --sky-light: #b8dcf0;
  --blue: #367ea8;
  --blue-dark: #244b61;
  --ink: #183442;
  --cream: #f5f0d9;
  --yellow: #ffc21c;
  --orange: #e88911;
  --red: #ef4d31;
  color-scheme: light;
  font-family: "Courier New", ui-monospace, monospace;
  font-synthesis: none;
  text-rendering: optimizeSpeed;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: #17384a;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--cream);
  background:
    linear-gradient(90deg, rgba(8, 30, 43, .62), transparent 24%, transparent 76%, rgba(8, 30, 43, .62)),
    #2d6685;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

button:focus-visible,
a:focus-visible,
#gameCanvas:focus-visible {
  outline: 3px solid #fff6b3;
  outline-offset: 3px;
}

.page-shell {
  width: min(100% - 24px, 980px);
  margin: 0 auto;
  padding: 10px 0 18px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 3px;
  width: min(100%, 410px);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--cream);
  text-decoration: none;
}

.brand-mark {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 34px;
  height: 34px;
  padding: 6px 5px 5px;
  border: 2px solid var(--cream);
  background: var(--blue-dark);
  box-shadow: 3px 3px 0 var(--yellow);
}

.brand-mark i {
  display: block;
  width: 5px;
  border: 1px solid var(--ink);
  background: var(--yellow);
}

.brand-mark i:nth-child(1) { height: 10px; }
.brand-mark i:nth-child(2) { height: 20px; background: var(--red); }
.brand-mark i:nth-child(3) { height: 15px; }

.brand-copy { display: grid; line-height: 1; }

.eyebrow,
.kicker,
.button-label,
.start-hint,
.result-score span,
.result-grid span {
  font-family: "Courier New", monospace;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 3px;
  color: #c5e5f0;
  font-size: .42rem;
}

.logo-type {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.06em;
}

.logo-type b { color: var(--yellow); }
.header-actions { display: flex; gap: 6px; }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 31px;
  padding: 0 8px;
  color: var(--cream);
  border: 2px solid rgba(241, 245, 220, .7);
  border-radius: 0;
  background: #294f63;
  box-shadow: 2px 2px 0 rgba(16, 46, 62, .8);
  cursor: pointer;
}

.icon-button:hover { color: var(--ink); background: var(--yellow); }
.icon-button:disabled { opacity: .42; cursor: not-allowed; }
.button-label { font-size: .48rem; }
.support-button { border-color: var(--yellow); }
.support-icon {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  color: var(--ink);
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--yellow);
  font-size: .56rem;
  font-weight: 900;
  line-height: 1;
}
.support-button:hover .support-icon { color: var(--cream); background: var(--red); }
.pause-icon { display: flex; gap: 2px; }
.pause-icon i { width: 2px; height: 10px; background: currentColor; }

.sound-icon {
  position: relative;
  width: 12px;
  height: 12px;
  border: 4px solid transparent;
  border-right-color: currentColor;
}

.sound-icon::before,
.sound-icon::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 4px;
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  border-bottom-color: transparent;
  border-left: 0;
  transform: rotate(45deg);
}

.sound-icon::after { top: -5px; left: 6px; width: 9px; height: 9px; opacity: .65; }
#soundButton[aria-pressed="true"] .sound-icon::before,
#soundButton[aria-pressed="true"] .sound-icon::after { display: none; }

.checkout-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: min(calc(100% - 6px), 404px);
  margin: 0 auto 8px;
  padding: 8px 9px;
  color: var(--ink);
  border: 2px solid var(--ink);
  background: var(--cream);
  box-shadow: 3px 3px 0 rgba(16, 46, 62, .8);
  font-size: .64rem;
  font-weight: 700;
  line-height: 1.3;
}

.checkout-notice[hidden] { display: none; }
.checkout-notice.is-error { color: #701f19; background: #ffd8cf; }
.checkout-notice button {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  color: currentColor;
  border: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
}

.game-layout { display: block; }

.ad-market-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 410px) 190px;
  grid-template-areas: "left game right";
  align-items: start;
  justify-content: center;
  gap: 30px;
}

.game-core { grid-area: game; min-width: 0; }
.ad-rail-left { grid-area: left; }
.ad-rail-right { grid-area: right; }

.ad-rail {
  position: sticky;
  top: 12px;
  padding-top: 52px;
  color: var(--cream);
}

.ad-rail-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: #c5dfe4;
  font-size: .54rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ad-rail-heading span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--ink);
  background: var(--yellow);
}

.ad-slot {
  min-height: 310px;
  border: 2px solid rgba(245, 240, 217, .45);
  background: rgba(20, 55, 73, .42);
  box-shadow: 6px 7px 0 rgba(11, 42, 58, .42);
}

.ad-slot-empty,
.ad-card {
  width: 100%;
  min-height: 306px;
  padding: 18px 14px;
  border: 0;
  color: var(--cream);
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.ad-slot-empty {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  background:
    linear-gradient(135deg, transparent 0 46%, rgba(255,255,255,.06) 46% 54%, transparent 54% 100%),
    #244b61;
}

.ad-slot-empty::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: auto;
  color: var(--ink);
  border: 2px solid var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 #102e3e;
  font-size: 1.5rem;
  font-weight: 900;
}

.ad-slot-empty:hover { background-color: #2f6884; }
.ad-slot-empty small,
.ad-card small { font-size: .48rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.ad-slot-empty b,
.ad-card b { display: block; font-size: 1.05rem; line-height: 1.05; text-transform: uppercase; }
.ad-slot-empty span { color: var(--yellow); font-size: .62rem; font-weight: 700; }

.ad-card {
  --ad-primary: #ffc21c;
  --ad-accent: #183442;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  gap: 10px;
  color: var(--ad-accent);
  background: var(--ad-primary);
}

.ad-card::before {
  content: "AD";
  position: absolute;
  top: 14px;
  right: 12px;
  padding: 3px 5px;
  color: var(--ad-primary);
  border: 1px solid currentColor;
  background: var(--ad-accent);
  font-size: .46rem;
  font-weight: 900;
}

.ad-card::after {
  content: "";
  position: absolute;
  top: 45px;
  left: -18px;
  width: 135px;
  height: 135px;
  border: 18px solid color-mix(in srgb, var(--ad-accent) 18%, transparent);
  transform: rotate(25deg);
}

.ad-card > * { position: relative; z-index: 1; }
.ad-card span { font-family: Arial, sans-serif; font-size: .72rem; line-height: 1.35; }
.ad-card i { font-size: .54rem; font-style: normal; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.ad-card:hover { filter: brightness(1.05); }

.game-card {
  position: relative;
  overflow: hidden;
  border: 3px solid #173b50;
  border-radius: 0;
  background: var(--sky);
  box-shadow: 8px 10px 0 rgba(11, 42, 58, .48), 0 0 0 2px rgba(224, 242, 236, .3);
}

.hud {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.playfield-wrap {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--sky);
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: var(--sky);
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(39, 85, 110, .34);
  transition: opacity 130ms linear, visibility 130ms linear;
}

.overlay.hidden,
.overlay[hidden] { visibility: hidden; opacity: 0; pointer-events: none; }

.overlay-panel {
  width: min(100%, 300px);
  padding: 24px 22px;
  color: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 0;
  background: rgba(30, 67, 86, .96);
  box-shadow: 7px 7px 0 var(--yellow);
}

.start-panel { position: relative; }

.mini-sun {
  position: absolute;
  top: -14px;
  right: 18px;
  width: 26px;
  height: 26px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
}

.mini-sun::before,
.mini-sun::after,
.mini-sun i {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  height: 2px;
  background: rgba(33, 61, 72, .7);
}

.mini-sun::before { top: 7px; }
.mini-sun i { top: 12px; }
.mini-sun::after { top: 17px; }

.kicker { margin: 0 0 10px; color: var(--yellow); font-size: .54rem; }

.overlay h1,
.overlay h2 {
  margin: 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-weight: 900;
  letter-spacing: .01em;
  line-height: .92;
  text-transform: uppercase;
}

.overlay h1 { font-size: clamp(2.65rem, 14vw, 3.5rem); }
.overlay h1 span { color: var(--yellow); }
.overlay h2 { font-size: 2.6rem; }

.intro,
.pause-panel p {
  margin: 17px 0;
  font-family: Arial, sans-serif;
  font-size: .77rem;
  line-height: 1.45;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 0 5px 0 15px;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--red);
  cursor: pointer;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.primary-button i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 32px;
  color: var(--cream);
  background: var(--ink);
  font-style: normal;
}

.primary-button:hover { filter: brightness(1.08); transform: translate(-1px, -1px); }

.start-hint {
  margin: 15px 0 0;
  color: #d2e7e7;
  font-size: .5rem;
  text-align: center;
}

kbd {
  padding: 2px 5px;
  color: var(--ink);
  border: 1px solid var(--ink);
  background: var(--cream);
  box-shadow: 1px 1px 0 var(--ink);
  font: inherit;
}

.game-over-overlay,
.pause-overlay { background: rgba(27, 62, 81, .64); }
.result-panel,
.pause-panel { text-align: center; }
.result-score { display: grid; gap: 2px; margin: 18px 0 11px; }
.result-score span,
.result-grid span { color: #b9d9df; font-size: .5rem; }
.result-score strong { color: var(--yellow); font-size: 2.1rem; }

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 17px;
}

.result-grid div {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 2px solid #6e9bac;
  background: #214b60;
}

.result-grid b { color: var(--cream); font-size: .86rem; }
.pause-symbol { display: inline-flex; gap: 5px; margin-bottom: 12px; }
.pause-symbol i { width: 7px; height: 28px; background: var(--yellow); }

.control-deck {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 72px;
  border-top: 3px solid var(--ink);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 10px),
    #285873;
}

.instruction { display: none; }

.drop-button {
  position: relative;
  width: 92px;
  height: 48px;
  padding: 0;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--yellow);
  box-shadow: 5px 5px 0 #142f3d;
  cursor: pointer;
}

.drop-button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.drop-button:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #142f3d; }
.drop-button:disabled { opacity: .46; cursor: not-allowed; }

.drop-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 100%;
}

.drop-ring b { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }

.drop-arrow {
  position: relative;
  width: 3px;
  height: 17px;
  background: var(--ink);
}

.drop-arrow::before,
.drop-arrow::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 3px;
  background: var(--ink);
}

.drop-arrow::before { right: -1px; transform: rotate(-45deg); transform-origin: right; }
.drop-arrow::after { left: -1px; transform: rotate(45deg); transform-origin: left; }

.quick-guide {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 4px 0;
  color: #c5dfe4;
  font-family: Arial, sans-serif;
  font-size: .66rem;
  line-height: 1.35;
}

.guide-rule { flex: 0 0 22px; height: 3px; background: var(--yellow); }
.quick-guide p { min-width: 0; margin: 0; }
.quick-guide p b {
  color: var(--yellow);
  font-family: "Courier New", monospace;
  font-size: .56rem;
  text-transform: uppercase;
}

.block-sponsor-link {
  flex: 0 0 auto;
  display: grid;
  max-width: 128px;
  padding: 5px 7px;
  color: var(--ink);
  border: 1px solid var(--ink);
  background: var(--yellow);
  text-decoration: none;
  box-shadow: 2px 2px 0 #122f3d;
}

.block-sponsor-link[hidden] { display: none; }
.block-sponsor-link span { font-size: .4rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.block-sponsor-link b { overflow: hidden; font: 900 .55rem "Courier New", monospace; text-overflow: ellipsis; white-space: nowrap; }

.ad-dialog {
  width: min(calc(100% - 24px), 590px);
  max-height: min(92vh, 780px);
  max-height: min(92dvh, 780px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  border: 3px solid #173b50;
  border-radius: 0;
  background: var(--cream);
  box-shadow: 12px 14px 0 rgba(10, 31, 43, .6);
}

.ad-dialog::backdrop { background: rgba(8, 26, 37, .78); backdrop-filter: blur(3px); }
.ad-dialog-topline { height: 9px; background: repeating-linear-gradient(90deg, var(--yellow) 0 28px, var(--red) 28px 42px, var(--blue-dark) 42px 70px); }
.ad-form { position: relative; padding: 28px; }
.ad-form > .kicker { margin: 0 0 5px; color: var(--blue); font-size: .58rem; }
.ad-form h2 { margin: 0; font-size: clamp(1.8rem, 7vw, 2.8rem); line-height: .88; letter-spacing: -.08em; text-transform: uppercase; }
.ad-form h2 span { color: var(--red); }
.ad-dialog-intro { max-width: 480px; margin: 14px 0 20px; font-family: Arial, sans-serif; font-size: .78rem; line-height: 1.45; }

.ad-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--ink);
  border: 2px solid currentColor;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.placement-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.placement-picker legend,
.ad-field > span,
.color-field > span {
  display: block;
  margin-bottom: 7px;
  font-size: .56rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.placement-picker legend { grid-column: 1 / -1; }
.placement-picker label { position: relative; cursor: pointer; }
.placement-picker input { position: absolute; opacity: 0; pointer-events: none; }
.placement-picker label > span {
  display: grid;
  min-height: 60px;
  padding: 10px;
  border: 2px solid #6f8587;
  background: #ebe8d4;
}
.placement-picker b { font-size: .72rem; text-transform: uppercase; }
.placement-picker small { align-self: end; color: #52666a; font-family: Arial, sans-serif; font-size: .6rem; }
.placement-picker input:checked + span { border-color: var(--ink); background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }
.placement-picker input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.ad-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.ad-field-wide { grid-column: 1 / -1; }
.ad-field small { color: #6b7773; font-family: Arial, sans-serif; font-size: .5rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.ad-field input {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  color: var(--ink);
  border: 2px solid #597077;
  border-radius: 0;
  background: #fffdf0;
  font: 700 .72rem "Courier New", monospace;
}
.ad-field input:focus { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 1px; }

.color-field { display: grid; grid-template-columns: 1fr 50px; align-items: center; gap: 8px; }
.color-field > span { margin: 0; }
.color-field input { width: 50px; height: 35px; padding: 3px; border: 2px solid var(--ink); background: #fffdf0; cursor: pointer; }
.ad-honeypot { position: absolute; left: -10000px; }

.ad-terms { display: flex; align-items: flex-start; gap: 9px; margin: 17px 0; font-family: Arial, sans-serif; font-size: .68rem; line-height: 1.35; }
.ad-terms input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--red); }

.ad-preview {
  --ad-primary: #ffc21c;
  --ad-accent: #183442;
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 14px 16px;
  color: var(--ad-accent);
  border: 2px solid var(--ad-accent);
  background: var(--ad-primary);
  box-shadow: 5px 5px 0 var(--ad-accent);
}
.ad-preview small { font-size: .48rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.ad-preview b { align-self: end; overflow-wrap: anywhere; font-size: 1.1rem; text-transform: uppercase; }
.ad-preview span { font-family: Arial, sans-serif; font-size: .7rem; }

.ad-form-error { margin: 14px 0 0; padding: 8px 10px; color: #701f19; border: 2px solid #701f19; background: #ffd8cf; font-size: .66rem; font-weight: 700; }
.ad-form-error[hidden] { display: none; }
.ad-checkout-button { width: 100%; margin-top: 18px; }
.ad-price-note { margin: 8px 0 0; color: #607171; font-family: Arial, sans-serif; font-size: .6rem; text-align: center; }

.key-guide, footer { display: none; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 440px) {
  .page-shell { width: calc(100% - 12px); padding-top: 5px; }
  .masthead { min-height: 43px; }
  .brand-mark { width: 30px; height: 30px; padding: 5px 4px 4px; }
  .brand-mark i:nth-child(1) { height: 8px; }
  .brand-mark i:nth-child(2) { height: 17px; }
  .brand-mark i:nth-child(3) { height: 12px; }
  .eyebrow { display: none; }
  .logo-type { font-size: .88rem; }
  .button-label { display: none; }
  .icon-button { width: 31px; padding: 0; }
  .overlay { padding: 20px; }
  .overlay-panel { padding: 21px 18px; }
  .quick-guide { padding-inline: 3px; }
}

@media (max-width: 860px) {
  .page-shell { width: min(100% - 24px, 410px); }
  .ad-market-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "game game"
      "left right";
    gap: 20px 10px;
  }
  .ad-rail { position: static; padding-top: 0; }
  .ad-slot { min-height: 174px; }
  .ad-slot-empty,
  .ad-card { min-height: 170px; padding: 12px 10px; }
  .ad-slot-empty::before { width: 30px; height: 30px; margin-bottom: 18px; font-size: 1rem; box-shadow: 3px 3px 0 #102e3e; }
  .ad-card::after { top: 30px; left: -40px; }
}

@media (max-width: 560px) {
  .ad-form { padding: 23px 17px; }
  .ad-dialog-close { top: 12px; right: 12px; }
  .ad-dialog-intro { padding-right: 18px; }
  .ad-form-grid { grid-template-columns: 1fr; }
  .ad-field-wide { grid-column: auto; }
  .placement-picker label > span { padding: 8px 6px; }
  .placement-picker small { font-size: .52rem; }
}

@media (max-height: 760px) and (min-width: 861px) {
  .page-shell { width: min(100% - 20px, 840px); padding-top: 4px; }
  .ad-market-layout { grid-template-columns: 150px minmax(0, 350px) 150px; gap: 20px; }
  .masthead { min-height: 40px; }
  .control-deck { min-height: 58px; }
  .quick-guide { display: none; }
  .ad-slot { min-height: 245px; }
  .ad-slot-empty,
  .ad-card { min-height: 241px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .game-card,
  .overlay-panel,
  .primary-button,
  .drop-button,
  .icon-button { border: 2px solid ButtonText; }
}
