:root {
  color-scheme: dark;
  --kodo-bg: #0b1412;
  --kodo-panel: #17201d;
  --kodo-surface: #22302b;
  --kodo-line: rgba(223, 232, 226, 0.2);
  --kodo-ink: #f8faf7;
  --kodo-muted: #a9bbb4;
  --kodo-accent: #18a999;
  --kodo-signal: #f2b84b;
  --kodo-heat: #e86f51;
}

html:not(.kodo-ready) body {
  visibility: hidden;
}

html.kodo-daily,
html.kodo-daily body {
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 8%, rgba(24, 169, 153, 0.2), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(242, 184, 75, 0.14), transparent 24%),
    var(--kodo-bg);
  color: var(--kodo-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html.kodo-daily body {
  min-height: 100dvh;
  overflow: auto;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-right: max(14px, env(safe-area-inset-right));
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  padding-left: max(14px, env(safe-area-inset-left));
}

html.kodo-daily h1,
html.kodo-daily h2,
html.kodo-daily h3,
html.kodo-daily .big {
  font-family: "Arial Narrow", "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: 0.025em;
}

html.kodo-daily .game,
html.kodo-daily .shell,
html.kodo-daily .card,
html.kodo-daily .panel,
html.kodo-daily .stage {
  border-color: var(--kodo-line);
}

html.kodo-daily .game,
html.kodo-daily .shell {
  margin: auto;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

html.kodo-daily .hud,
html.kodo-daily .stats,
html.kodo-daily .top {
  position: relative;
  z-index: 1;
}

html.kodo-daily .stat,
html.kodo-daily .pill {
  border: 1px solid var(--kodo-line);
  background: rgba(11, 20, 18, 0.64);
  color: var(--kodo-muted);
}

html.kodo-daily .stat b,
html.kodo-daily .pill b {
  color: var(--kodo-ink);
}

html.kodo-daily button {
  min-height: 44px;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  -webkit-tap-highlight-color: transparent;
}

html.kodo-daily button:focus-visible {
  outline: 3px solid var(--kodo-accent);
  outline-offset: 3px;
}

html.kodo-daily .start,
html.kodo-daily .main,
html.kodo-daily button.action,
html.kodo-daily .actions .start,
html.kodo-daily .actions .launch {
  background: linear-gradient(135deg, var(--kodo-accent), #54d4c5);
  color: #071411;
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.3);
}

html.kodo-daily .sub,
html.kodo-daily .intro,
html.kodo-daily .hint,
html.kodo-daily .note,
html.kodo-daily .msg,
html.kodo-daily .message {
  color: var(--kodo-muted);
}

html.kodo-daily .overlay,
html.kodo-daily .over {
  background: rgba(5, 11, 9, 0.9);
  backdrop-filter: blur(9px);
}

.kodo-fullscreen {
  position: fixed;
  z-index: 1000;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  min-height: 38px !important;
  padding: 8px 11px;
  border: 1px solid var(--kodo-line);
  border-radius: 999px !important;
  background: rgba(11, 20, 18, 0.82);
  color: var(--kodo-ink);
  font-size: 12px !important;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

html:fullscreen body {
  padding-top: max(10px, env(safe-area-inset-top));
  padding-right: max(10px, env(safe-area-inset-right));
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  padding-left: max(10px, env(safe-area-inset-left));
}

@media (max-width: 720px) {
  html.kodo-daily body {
    display: block;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    padding-left: max(8px, env(safe-area-inset-left));
  }

  html.kodo-daily .game {
    width: 100%;
  }

  .kodo-fullscreen {
    width: 40px;
    gap: 0;
  }

  .kodo-fullscreen-label {
    display: none;
  }
}

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