/* Vendored from daily-games/shared/base.css on 2026-10-17. Keep in sync by hand if the shared copy changes. */
/* Daily Games shared base styles. Each game may override --accent. */
:root {
  --bg: #0f1115;
  --surface: #181b22;
  --surface-2: #222631;
  --border: #2e3340;
  --text: #eef0f4;
  --muted: #9aa1b1;
  --accent: #5b8cff;
  --accent-ink: #ffffff;
  --good: #3ecf8e;
  --ok: #f5c451;
  --bad: #ff6b6b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #eef0f5;
    --border: #dde1ea;
    --text: #151821;
    --muted: #5d6475;
    --shadow: 0 10px 30px rgba(20, 24, 40, .12);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; }

.dg-main { max-width: 560px; margin: 0 auto; padding: 12px 16px 48px; }
.dg-muted { color: var(--muted); font-size: 14px; }

/* header */
.dg-header {
  display: flex; align-items: center; gap: 8px;
  max-width: 560px; margin: 0 auto; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.dg-title { flex: 1; text-align: center; min-width: 0; }
.dg-title h1 { margin: 0; font-size: 22px; letter-spacing: .5px; font-weight: 800; }
.dg-sub { font-size: 12px; color: var(--muted); }
.dg-actions { display: flex; gap: 6px; }
.dg-icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.dg-icon-btn:hover { background: var(--surface-2); }
.dg-banner {
  max-width: 560px; margin: 8px auto 0; padding: 8px 12px; border-radius: 10px;
  background: var(--surface-2); color: var(--muted); font-size: 13px; text-align: center;
}

/* buttons */
.dg-btn {
  appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 12px 18px; border-radius: 12px; font-weight: 700; cursor: pointer; font-size: 16px;
  transition: transform .06s ease, background .15s ease, opacity .15s;
}
.dg-btn:hover { background: var(--surface-2); }
.dg-btn:active { transform: scale(.97); }
.dg-btn:disabled { opacity: .45; cursor: default; transform: none; }
.dg-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dg-btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.dg-wide { width: 100%; margin-top: 14px; }

.dg-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }

/* modal */
.dg-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 50; opacity: 0; transition: opacity .15s;
}
.dg-backdrop.show { opacity: 1; }
.dg-modal {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  width: 100%; max-width: 440px; max-height: 90vh; overflow: auto; padding: 22px 20px 20px; box-shadow: var(--shadow);
}
.dg-modal h2 { margin: 0 0 12px; font-size: 20px; text-align: center; }
.dg-modal h3 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.dg-modal-x {
  position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--muted);
}
.dg-modal-body p { margin: 8px 0; }
.dg-modal-body ul { padding-left: 20px; margin: 8px 0; }
.dg-modal-body li { margin: 4px 0; }

.dg-result { text-align: center; }
.dg-result-head { font-size: 28px; font-weight: 800; margin: 4px 0; }
.dg-result-detail { color: var(--muted); margin-bottom: 8px; }
.dg-share-preview {
  text-align: left; background: var(--surface-2); padding: 10px 12px; border-radius: 10px; white-space: pre-wrap;
  font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 10px 0 0;
}

.dg-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; text-align: center; }
.dg-stat-n { font-size: 26px; font-weight: 800; }
.dg-stat-l { font-size: 11px; color: var(--muted); }

.dg-dist-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; }
.dg-dist-k { width: 64px; text-align: right; color: var(--muted); flex: none; }
.dg-dist-bar {
  background: var(--surface-2); color: var(--text); padding: 2px 6px; border-radius: 4px; text-align: right; font-weight: 700; min-width: 22px;
}
.dg-dist-bar.hit { background: var(--accent); color: var(--accent-ink); }

.dg-next { text-align: center; margin-top: 16px; color: var(--muted); }
.dg-next strong { color: var(--text); font-variant-numeric: tabular-nums; }

.dg-archive-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.dg-archive-day {
  display: block; text-align: center; padding: 8px 0; border-radius: 8px; background: var(--surface-2);
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px;
}
.dg-archive-day.done { background: color-mix(in srgb, var(--good) 30%, var(--surface-2)); }
.dg-archive-day.current { outline: 2px solid var(--accent); }

/* toast */
.dg-toast {
  position: fixed; left: 50%; top: 18px; transform: translate(-50%, -20px); background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 60; max-width: 90vw; text-align: center;
}
.dg-toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes dg-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.dg-shake { animation: dg-shake .35s; }
@keyframes dg-pop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.dg-pop { animation: dg-pop .25s ease-out; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Accent colours (e.g. yellow) can be unreadable as text in light mode; keep banner links neutral. */
.dg-banner a { color: var(--text); font-weight: 700; }

.dg-icon-spacer { width: 38px; height: 38px; flex: none; }
.dg-more-game {
  display: flex; gap: 12px; align-items: center; padding: 10px; margin: 6px 0; border-radius: 12px;
  background: var(--surface-2); color: var(--text); text-decoration: none;
}
.dg-more-game:hover { filter: brightness(1.05); }
.dg-more-icon { font-size: 26px; flex: none; }
.dg-more-body { display: flex; flex-direction: column; min-width: 0; }
.dg-more-body .dg-muted { font-size: 13px; }
