/* Dark theme: the same layout with a darker palette. theme.js sets data-theme on <html>
   from the phone's setting or the footer choice. Light is the default in style.css. */

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161915;
  --panel: #1f231e;
  --ink: #ebe5d5;
  --line: #3f463b;
  --muted: #b3ad9c;
  --accent: #e48a6d;
  --accent-contrast: #1b1712; /* text on accent buttons */
  --masthead: #1c2620;
}
[data-theme="dark"] .top { color: #f6efdc; }
[data-theme="dark"] .account:hover { background: #2a362c; }
[data-theme="dark"] :is(.button, .mini).primary-btn:hover { background: #f0a084; border-color: #f0a084; }
[data-theme="dark"] :is(.button, .mini).secondary { border-color: #5b6155; }
[data-theme="dark"] :is(.button.secondary, .mini.secondary, .mini, .tab):hover { background: #2a2f28; }
[data-theme="dark"] .poster { background: #2b2620; }
[data-theme="dark"] .hero-art { border-color: var(--line); }
[data-theme="dark"] .scoreboard .my-score { background: #2b3127; }
[data-theme="dark"] .wallet { background: #262b23; }
[data-theme="dark"] .group-weekender { --group-color: #e39a72; }
[data-theme="dark"] .group-honorary { --group-color: #cfa3c6; }
[data-theme="dark"] .group-member { --group-color: #8fc6a3; }
[data-theme="dark"] :is(input:not([type="radio"]):not([type="checkbox"]), textarea, .stack select) { border-color: #6b7064; }
[data-theme="dark"] .form-error { color: #ff9b8c; }
[data-theme="dark"] :is(.post-card img, .post-card video) { background: #0e100d; }
[data-theme="dark"] dialog { box-shadow: 0 12px 48px #000a; }
[data-theme="dark"] dialog::backdrop { background: #000000b3; }
[data-theme="dark"] .toast { box-shadow: 0 5px 25px #000a; }
/* Google's own dark sign-in button style. */
[data-theme="dark"] .google-button { background: #131314; color: #e3e3e3; border-color: #8e918f; }

/* Footer choice: Automatic (follow the phone), Light or Dark. */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.theme-switch select {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: .85rem;
}
