:root {
  --og-blue: #1769ff;
  --og-ink: #15233d;
  --og-muted: #63718a;
  --og-line: #d7e0ed;
  --og-surface: #ffffff;
  --og-soft: #f3f7fc;
  --og-accent: #7c3aed;
  --og-accent-2: #06b6d4;
  --og-stage-ink: #f8fbff;
}

.og-game,
.og-game * { box-sizing: border-box; }

.og-game {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--og-line);
  border-radius: 26px;
  background: var(--og-soft);
  color: var(--og-ink);
  box-shadow: 0 22px 54px rgba(18, 38, 72, .14);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.og-game.theme-focus {
  --og-ink: #16324a;
  --og-muted: #64788a;
  --og-line: #d5e1e7;
  --og-soft: #f5f9fa;
  --og-accent: #087f6b;
  --og-accent-2: #2563a8;
  --og-stage-ink: #16324a;
}

.og-game-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 17px 19px;
  border-bottom: 1px solid var(--og-line);
  background: #fff;
}

.theme-neon .og-game-head {
  background:
    radial-gradient(circle at 85% 20%, rgba(6, 182, 212, .15), transparent 22%),
    linear-gradient(135deg, #fcfdff, #f5f1ff);
}

.theme-focus .og-game-head {
  background:
    radial-gradient(circle at 88% 25%, rgba(8, 127, 107, .10), transparent 22%),
    linear-gradient(135deg, #ffffff, #f4faf9);
}

.og-game-title { display: flex; gap: 13px; align-items: center; min-width: 0; }
.og-game-logo {
  flex: 0 0 60px;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(124, 58, 237, .24);
  border-radius: 18px;
  background: linear-gradient(145deg, #f4eaff, #dcfaff);
  font-size: 32px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .62);
}
.theme-focus .og-game-logo { border-color: #bcdcd6; background: linear-gradient(145deg, #eaf9f4, #eaf3fb); }
.og-game-eyebrow { margin: 0; color: var(--og-accent); font-size: 11px; font-weight: 900; letter-spacing: .13em; }
.og-game-title h2 { margin: 3px 0 2px; color: var(--og-ink); font: 900 clamp(24px, 3vw, 34px)/1.05 Poppins, Inter, sans-serif; letter-spacing: -.025em; }
.og-game-best { display: block; overflow: hidden; color: var(--og-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.og-mode-field {
  display: grid;
  grid-template-columns: 38px minmax(164px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 240px;
  padding: 9px 11px;
  border: 1px solid var(--og-line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .88);
}
.og-mode-field > span { grid-row: 1 / 3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #f1eaff; font-size: 19px; }
.theme-focus .og-mode-field > span { background: #e7f6f2; }
.og-mode-field label { color: var(--og-muted); font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.og-mode-field select { width: 100%; min-height: 34px; padding: 5px 28px 5px 8px; border: 1px solid var(--og-line); border-radius: 9px; background: #fff; color: var(--og-ink); font: 800 13px Inter, sans-serif; }

.og-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  background: var(--og-soft);
}
.og-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 1px 7px;
  align-items: center;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--og-line);
  border-radius: 13px;
  background: #fff;
}
.og-stat > span { grid-row: 1 / 3; font-size: 21px; }
.og-stat small { overflow: hidden; color: var(--og-muted); font-size: 9px; font-weight: 900; letter-spacing: .05em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.og-stat strong { overflow: hidden; color: var(--og-ink); font: 900 16px/1.1 Poppins, Inter, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.og-stat:nth-child(1) { background: #eff6ff; }
.og-stat:nth-child(2) { background: #f0fdf4; }
.og-stat:nth-child(3) { background: #f5f3ff; }
.og-stat:nth-child(4) { background: #fff7ed; }
.og-stat:nth-child(5) { background: #fdf2f8; }
.og-stat:nth-child(6) { background: #ecfeff; }
.og-stat [data-og-lives] { color: var(--og-accent); font-size: 13px; letter-spacing: 1px; }

.og-stage {
  position: relative;
  min-height: 490px;
  overflow: hidden;
  outline: none;
  color: var(--og-stage-ink);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .12);
}
.theme-neon .og-stage {
  background:
    radial-gradient(circle at 16% 24%, rgba(124, 58, 237, .42), transparent 23%),
    radial-gradient(circle at 84% 34%, rgba(6, 182, 212, .30), transparent 25%),
    linear-gradient(rgba(102, 122, 255, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 122, 255, .10) 1px, transparent 1px),
    linear-gradient(155deg, #101538, #111d45 52%, #0b263b);
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
}
.theme-focus .og-stage {
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 255, 255, .92), transparent 20%),
    radial-gradient(circle at 88% 22%, rgba(151, 220, 207, .40), transparent 25%),
    linear-gradient(180deg, #eaf4f5 0 62%, #dbe9e5 62% 100%);
}
.og-stage:focus-visible { box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .9), inset 0 0 0 8px rgba(23, 105, 255, .55); }

.og-stage-decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.theme-neon .og-stage-decor::before,
.theme-neon .og-stage-decor::after { content: ""; position: absolute; border: 1px solid rgba(103, 232, 249, .28); border-radius: 50%; }
.theme-neon .og-stage-decor::before { top: 80px; left: -80px; width: 260px; height: 260px; box-shadow: 0 0 65px rgba(124, 58, 237, .22); }
.theme-neon .og-stage-decor::after { right: -70px; bottom: 25px; width: 210px; height: 210px; box-shadow: 0 0 55px rgba(6, 182, 212, .18); }
.theme-focus .og-stage-decor::before { content: ""; position: absolute; right: 8%; bottom: 56px; width: 210px; height: 118px; border: 10px solid rgba(50, 92, 81, .13); border-top-width: 18px; border-radius: 10px; background: rgba(255,255,255,.25); box-shadow: 0 22px 0 -6px rgba(50, 92, 81, .12); }
.theme-focus .og-stage-decor::after { content: ""; position: absolute; left: 7%; bottom: 58px; width: 86px; height: 110px; border-radius: 44px 44px 15px 15px; background: linear-gradient(90deg, #82c9a6 0 28%, #a6dbbc 28% 56%, #70b796 56%); opacity: .46; }

.og-stage-progress {
  position: absolute;
  top: 13px;
  right: 13px;
  left: 13px;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(100px, 250px);
  gap: 10px;
  justify-content: end;
  align-items: center;
  pointer-events: none;
}
.og-stage-progress strong { padding: 7px 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(8, 17, 46, .79); color: #fff; font-size: 11px; letter-spacing: .04em; }
.theme-focus .og-stage-progress strong { border-color: #bcd4cf; background: rgba(255,255,255,.90); color: #285849; }
.og-progress-track { height: 10px; overflow: hidden; border: 2px solid rgba(255, 255, 255, .48); border-radius: 999px; background: rgba(9, 16, 47, .42); }
.theme-focus .og-progress-track { border-color: rgba(255,255,255,.78); background: rgba(39, 88, 74, .18); }
.og-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--og-accent), var(--og-accent-2)); transition: width .25s ease; }

.og-target-card {
  --og-target-x: 50%;
  --og-target-y: 38%;
  position: absolute;
  top: var(--og-target-y);
  left: var(--og-target-x);
  z-index: 10;
  width: min(680px, calc(100% - 170px));
  padding: 15px 18px 14px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .54);
  border-radius: 21px;
  background: rgba(10, 18, 50, .88);
  color: #fff;
  box-shadow: 0 20px 45px rgba(2, 8, 28, .36), inset 0 0 0 1px rgba(103, 232, 249, .18);
  text-align: center;
  transform: translate(-50%, -25%);
  transition: top .25s ease, left .25s ease;
  backdrop-filter: blur(8px);
}
.theme-focus .og-target-card { border-color: rgba(255,255,255,.90); background: rgba(255,255,255,.95); color: var(--og-ink); box-shadow: 0 20px 42px rgba(48, 81, 74, .19), inset 0 0 0 1px #c8ddd8; }
.og-target-card[hidden] { display: none; }
.og-target-icon { display: block; margin-bottom: 2px; font-size: 34px; }
.og-target-hint { display: block; margin-bottom: 8px; color: #bfc9e7; font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.theme-focus .og-target-hint { color: #617d75; }
.og-target-text { display: flex; justify-content: center; flex-wrap: wrap; gap: 1px; min-height: 49px; }
.og-target-text span { display: inline-grid; place-items: center; min-width: .66em; border-radius: 7px; color: #b9c3df; font: 900 clamp(24px, 4.3vw, 43px)/1.14 Poppins, Inter, sans-serif; }
.theme-focus .og-target-text span { color: #73858c; }
.og-target-text .done { color: #5eead4; }
.theme-focus .og-target-text .done { color: #087f6b; }
.og-target-text .current { padding: 0 4px; background: var(--og-accent); color: #fff; box-shadow: 0 0 0 4px rgba(124, 58, 237, .20); }
.theme-focus .og-target-text .current { box-shadow: 0 0 0 4px rgba(8, 127, 107, .15); }
.og-target-text .space { min-width: .48em; border-bottom: 2px dotted currentColor; border-radius: 0; }
.og-target-text .idle { color: #67e8f9; font-size: clamp(23px, 4vw, 35px); letter-spacing: .04em; }
.theme-focus .og-target-text .idle { color: #087f6b; }
.og-countdown-track { height: 8px; margin-top: 11px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.13); }
.theme-focus .og-countdown-track { background: #dfe9e7; }
.og-countdown-track i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f43f5e 0 18%, #f59e0b 42%, var(--og-accent-2) 76%); }
.og-target-card.is-wrong { animation: ogShake .23s ease; }
.og-target-card.is-correct { animation: ogSuccess .25s ease; }
.og-target-card.is-missed { animation: ogFade .2s ease; }

.og-runway { position: absolute; z-index: 5; right: 4%; bottom: 48px; left: 4%; height: 32px; border: 1px solid rgba(255,255,255,.20); border-radius: 999px; background: rgba(7, 14, 42, .58); box-shadow: inset 0 4px 0 rgba(255,255,255,.07); }
.theme-focus .og-runway { border-color: rgba(59, 100, 88, .13); background: rgba(255,255,255,.66); box-shadow: inset 0 4px 0 rgba(255,255,255,.55); }
.og-runway::after { content: ""; position: absolute; top: 14px; right: 12px; left: 12px; border-top: 2px dashed rgba(255,255,255,.34); }
.theme-focus .og-runway::after { border-color: rgba(30, 92, 73, .25); }
.og-runner { position: absolute; z-index: 7; bottom: 66px; left: 5%; font-size: 42px; filter: drop-shadow(0 7px 6px rgba(4, 11, 29, .28)); transform: translateX(-50%); transition: left .28s ease; }

.og-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--og-line);
  background: #fff;
}
.og-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid var(--og-line);
  border-radius: 11px;
  background: #edf3f9;
  color: var(--og-ink);
  box-shadow: none;
  font: 800 12px/1.15 Inter, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.og-button:hover { border-color: #9bb3ca; background: #e3edf6; }
.og-button:focus-visible { outline: 3px solid rgba(23, 105, 255, .28); outline-offset: 2px; }
.og-button.primary { border-color: var(--og-blue); background: var(--og-blue); color: #fff; box-shadow: 0 7px 16px rgba(23, 105, 255, .22); }
.og-button.primary:hover { background: #0f58dc; }
.og-button.accent { border-color: var(--og-accent); background: var(--og-accent); color: #fff; box-shadow: 0 7px 16px rgba(73, 49, 160, .19); }
.og-button.accent:hover { filter: brightness(.91); }
.og-button.light { background: #fff; color: var(--og-blue); }
.og-button:disabled { opacity: .50; cursor: not-allowed; }
.og-button[hidden] { display: none; }
.og-start { min-width: 132px; }
.og-mobile-keyboard { display: none; }
.og-mobile-input { position: fixed; left: 50%; bottom: 0; width: 1px; height: 1px; opacity: .01; pointer-events: none; }
.og-message { min-height: 44px; margin: 0; padding: 12px 14px; border-top: 1px solid var(--og-line); background: #edf4ff; color: #245382; font-size: 12px; font-weight: 800; text-align: center; }
.theme-focus .og-message { background: #edf8f5; color: #276756; }

.og-game.is-paused .og-stage::after {
  content: "Game paused\A Press Resume when you are ready";
  position: absolute;
  inset: 0;
  z-index: 18;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 17, 42, .68);
  color: #fff;
  font: 900 clamp(22px, 4vw, 34px)/1.5 Poppins, Inter, sans-serif;
  text-align: center;
  white-space: pre-line;
  backdrop-filter: blur(3px);
}

.og-results {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 13, 36, .67);
  backdrop-filter: blur(4px);
}
.theme-focus .og-results { background: rgba(224, 239, 235, .78); }
.og-results[hidden] { display: none; }
.og-result-card {
  width: min(760px, calc(100% - 12px));
  padding: 20px;
  border: 1px solid rgba(196, 207, 230, .95);
  border-radius: 22px;
  background: rgba(255, 255, 255, .98);
  color: var(--og-ink);
  box-shadow: 0 24px 55px rgba(3, 10, 30, .30), inset 0 0 0 1px #fff;
  text-align: center;
  animation: ogResultIn .3s ease-out both;
}
.theme-focus .og-result-card { border-color: #bdd6cf; box-shadow: 0 24px 55px rgba(38, 78, 66, .20), inset 0 0 0 1px #fff; }
.og-result-card:focus { outline: none; }
.og-result-stars { color: #f59e0b; font-size: 31px; letter-spacing: 4px; }
.og-result-kicker { margin: 3px 0 0 !important; color: var(--og-accent) !important; font-size: 10px !important; font-weight: 900 !important; letter-spacing: .14em; }
.og-result-card h2 { margin: 4px 0; color: var(--og-ink); font: 900 clamp(25px, 4vw, 35px)/1.08 Poppins, Inter, sans-serif; }
.og-result-card > p { margin: 0; color: var(--og-muted); font-size: 13px; font-weight: 700; line-height: 1.45; }
.og-result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 13px 0 10px; }
.og-result-grid > div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 1px 7px; align-items: center; min-width: 0; padding: 9px; border: 1px solid #dae3ed; border-radius: 13px; background: #f1f6ff; text-align: left; }
.og-result-grid > div:nth-child(2) { background: #f0fdf4; }
.og-result-grid > div:nth-child(3) { background: #ecfeff; }
.og-result-grid > div:nth-child(4) { background: #fff7ed; }
.og-result-grid span { grid-row: 1 / 3; font-size: 21px; }
.og-result-grid small { overflow: hidden; color: var(--og-muted); font-size: 9px; font-weight: 900; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.og-result-grid strong { color: var(--og-ink); font: 900 16px/1.1 Poppins, Inter, sans-serif; }
.og-result-best { display: inline-block; margin-bottom: 11px !important; padding: 6px 12px; border-radius: 999px; background: #fff2bd; color: #85500c !important; font-size: 11px !important; }
.og-result-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.og-result-actions .og-button { min-width: 0; }
.og-game.is-finished .og-controls,
.og-game.is-finished .og-message { display: none; }

.og-game:fullscreen { overflow: auto; width: 100%; height: 100%; padding: 12px; border: 0; border-radius: 0; background: var(--og-soft); }
.og-game:fullscreen .og-stage { min-height: min(68vh, 720px); }
.og-config-error { margin: 0; padding: 24px; color: #991b1b; font-weight: 800; }

.og-offline-page {
  min-height: 100vh;
  margin: 0;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, .13), transparent 27%),
    radial-gradient(circle at top right, rgba(6, 182, 212, .14), transparent 26%),
    #f3f6fb;
  color: var(--og-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
.og-offline-page.focus-page { background: radial-gradient(circle at top right, rgba(8, 127, 107, .13), transparent 28%), #f0f6f5; }
.og-offline-shell { width: min(1180px, 100%); margin: 0 auto; }
.og-offline-brand { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 12px; }
.og-offline-brand-main { display: flex; gap: 18px; align-items: center; min-width: 0; }
.og-offline-logo { flex: 0 0 auto; display: inline-flex; padding: 5px 8px; border: 1px solid var(--og-line); border-radius: 13px; background: #fff; box-shadow: 0 7px 18px rgba(23, 105, 255, .10); }
.og-offline-logo img { display: block; width: 210px; height: auto; }
.og-offline-logo:focus-visible { outline: 3px solid rgba(23, 105, 255, .30); outline-offset: 2px; }
.og-offline-brand h1 { margin: 0; color: var(--og-ink); font: 900 clamp(25px, 4vw, 38px)/1.1 Poppins, Inter, sans-serif; }
.og-offline-brand p { margin: 4px 0 0; color: var(--og-muted); font-size: 15px; }
.og-offline-badge { flex: 0 0 auto; padding: 8px 11px; border: 1px solid #c7d6e7; border-radius: 999px; background: #fff; color: #315b89; font-size: 11px; font-weight: 900; }
.focus-page .og-offline-badge { border-color: #bad8d0; color: #176f5f; }
.og-offline-footer { padding: 13px 6px 0; color: var(--og-muted); font-size: 12px; text-align: center; }
.og-offline-footer a { color: #1769ff; font-weight: 800; }

@keyframes ogShake { 25% { transform: translate(calc(-50% - 7px), -25%); } 70% { transform: translate(calc(-50% + 7px), -25%); } }
@keyframes ogSuccess { 50% { transform: translate(-50%, -25%) scale(1.035); filter: brightness(1.08); } }
@keyframes ogFade { 60% { opacity: .46; transform: translate(-50%, -18%); } }
@keyframes ogResultIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 900px) {
  .og-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .og-target-card { width: min(650px, calc(100% - 90px)); }
}

@media (max-width: 680px) {
  .og-game-head { grid-template-columns: 1fr; padding: 14px; }
  .og-mode-field { width: 100%; min-width: 0; }
  .og-game-logo { flex-basis: 52px; width: 52px; height: 52px; border-radius: 15px; font-size: 28px; }
  .og-stage { min-height: 480px; }
  .og-target-card { left: 50% !important; width: calc(100% - 30px); transform: translate(-50%, -22%); }
  .og-result-actions { grid-template-columns: 1fr 1fr; }
  .og-result-actions .light { grid-column: 1 / -1; }
  .og-offline-page { padding: 8px; }
  .og-offline-brand { display: block; padding: 6px 4px; }
  .og-offline-brand-main { display: grid; gap: 10px; }
  .og-offline-logo { width: fit-content; }
  .og-offline-logo img { width: min(230px, 70vw); }
  .og-offline-badge { display: inline-block; margin-top: 8px; }
}

@media (max-width: 440px) {
  .og-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; }
  .og-stage { min-height: 460px; }
  .og-target-text span { font-size: clamp(21px, 8vw, 34px); }
  .og-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .og-controls .og-start { grid-column: 1 / -1; }
  .og-results { align-items: start; overflow: auto; padding: 8px; }
  .og-result-card { width: 100%; padding: 14px 11px; }
  .og-result-grid { grid-template-columns: 1fr 1fr; }
  .og-result-actions { grid-template-columns: 1fr; }
  .og-result-actions .light { grid-column: auto; }
}

@media (pointer: coarse) {
  .og-mobile-keyboard { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  .og-target-card,
  .og-runner,
  .og-progress-track i,
  .og-result-card { animation: none !important; transition: none !important; }
}

@media (prefers-color-scheme: dark) {
  .og-offline-page { background: #0d1425; color: #eef3ff; }
  .og-offline-page.focus-page { background: #0e1b19; }
  .og-offline-brand h1 { color: #f6f8ff; }
  .og-offline-brand p,
  .og-offline-footer { color: #bdc8dc; }
  .og-offline-badge { border-color: #344463; background: #151f34; color: #b9d7ff; }
  .focus-page .og-offline-badge { border-color: #345e55; background: #142b26; color: #a9e9db; }
}
