/* Colors come from variables so each preset only has to change a few values. */
:root {
  --bg: #f3f5ef; --acc: #3c6b2f; --on: #ffffff;
  --card: #ffffff; --line: #d9dee0; --txt: #171a1c; --mut: #535c62;
  color-scheme: light;
}
:root[data-theme='teal'] { --bg: #f4f7f7; --acc: #0f6e66; }
:root[data-theme='plum'] { --bg: #f6f4fa; --acc: #6b46a8; }
:root[data-theme='graphite'] { --bg: #f4f4f4; --acc: #2b2b2b; }
:root[data-mode='dark'] {
  --bg: #131813; --acc: #9fd08a; --on: #10200b;
  --card: #21272a; --line: #363e42; --txt: #f2f4f4; --mut: #aab2b6;
  color-scheme: dark;
}
:root[data-mode='dark'][data-theme='teal'] { --bg: #11181a; --acc: #5fd0c5; --on: #06211e; }
:root[data-mode='dark'][data-theme='plum'] { --bg: #17141d; --acc: #c4a7f5; --on: #1d1030; }
:root[data-mode='dark'][data-theme='graphite'] { --bg: #141414; --acc: #e6e6e6; --on: #111111; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--txt); font: 16px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }

main { max-width: 640px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 16px calc(160px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
h1 { margin: 0; font-size: 28px; }
h2 { margin: 0; font-size: 16px; }
p { margin: 0; }
.muted { color: var(--mut); font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { flex: 1; min-width: 120px; min-height: 48px; border-radius: 10px; background: var(--bg); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 8px; }
.choice[aria-pressed='true'] { border-color: var(--acc); font-weight: 600; }
.dot { width: 16px; height: 16px; border-radius: 50%; }
.dot-forest { background: #4d8a3c; } .dot-teal { background: #12877d; } .dot-plum { background: #8059c2; } .dot-graphite { background: #777777; }
.primary { min-height: 48px; border: 0; border-radius: 10px; padding: 0 16px; background: var(--acc); color: var(--on); font-weight: 600; }

nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 3; }
nav a { flex: 1; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 600; text-decoration: none; color: var(--mut); }
nav a[aria-current='page'] { color: var(--acc); }
.fab { position: fixed; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--acc); color: var(--on); font-size: 30px; z-index: 2; }

dialog { width: 100%; max-width: 640px; margin: auto auto 0; border: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--card); color: var(--txt); }
dialog::backdrop { background: rgb(0 0 0 / 0.45); }
.sheet { display: flex; flex-direction: column; gap: 8px; }
.banner { position: fixed; left: 12px; right: 12px; bottom: calc(146px + env(safe-area-inset-bottom)); z-index: 2; }
