:root {
  color-scheme: dark;
  --canvas: #131615;
  --panel: #1c211e;
  --edge: #373f38;
  --muted: #aab6ac;
  --ink: #f5f7ee;
  --lime: #c7fa88;
  font-family: system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem max(1.25rem, calc((100% - 70rem) / 2));
  border-bottom: 1px solid var(--edge);
}
.brand { display: flex; align-items: center; gap: .6rem; font-size: 1.35rem; font-weight: 750; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: .55rem;
  background: var(--lime);
  color: var(--canvas);
}
main { width: min(100% - 2rem, 45rem); margin: clamp(1.65rem, 6vw, 4.5rem) auto; }
nav ol { list-style: none; padding: 0; margin: 0 0 1.75rem; display: flex; gap: .5rem; }
nav li { border: 1px solid var(--edge); border-radius: 999px; padding: .35rem .8rem; color: var(--muted); font-size: .875rem; }
nav [aria-current] { border-color: var(--lime); color: var(--lime); }
h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); line-height: 1.03; letter-spacing: -.055em; margin: 0; overflow-wrap: anywhere; }
.intro { color: var(--muted); line-height: 1.55; margin: .8rem 0 1.55rem; }
form, .deck { background: var(--panel); border: 1px solid var(--edge); border-radius: 1rem; }
form { padding: clamp(1rem, 4vw, 1.65rem); display: grid; gap: .6rem; }
label { display: flex; justify-content: space-between; gap: .5rem; font-weight: 650; }
label span { color: var(--muted); font-size: .875rem; font-weight: 400; }
input, textarea {
  font: inherit;
  color: inherit;
  background: var(--canvas);
  border: 1px solid var(--edge);
  border-radius: .55rem;
  padding: .75rem;
  width: 100%;
}
textarea { resize: vertical; min-height: 8rem; }
form label:not(:first-child), form .primary { margin-top: .55rem; }
button { font: inherit; cursor: pointer; border-radius: .6rem; min-height: 44px; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.primary { border: 0; color: var(--canvas); background: var(--lime); font-weight: 750; padding: .7rem 1rem; }
.primary:hover:enabled { background: #dcffb0; }
.quiet { border: 0; color: var(--lime); background: transparent; padding: .45rem .65rem; }
.quiet:hover:enabled { background: #c7fa8814; }
.session-note { color: var(--muted); font-size: .875rem; margin: .85rem .25rem; }
.deck { overflow: hidden; }
.deck-top, .secondary { display: flex; justify-content: space-between; align-items: center; gap: .4rem; flex-wrap: wrap; }
.deck-top { padding: 1rem 1.15rem; border-bottom: 1px solid var(--edge); }
#elapsed { color: var(--lime); font: 650 1.65rem ui-monospace, monospace; }
#progress { color: var(--muted); font-size: .875rem; }
#roll { margin: 0; list-style: none; height: clamp(12rem, 42svh, 25rem); overflow: auto; padding: 4rem .9rem; scrollbar-color: var(--edge) transparent; }
#roll li { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; padding: .65rem .8rem; border-radius: .55rem; color: var(--muted); }
.line { font-size: clamp(1.15rem, 4vw, 1.7rem); line-height: 1.25; font-weight: 720; overflow-wrap: anywhere; min-width: 0; }
#roll li[aria-current] { color: var(--lime); background: #c7fa881a; }
.mark { font: .8rem ui-monospace, monospace; }
.deck-controls { display: grid; gap: .4rem; padding: .8rem 1rem; border-top: 1px solid var(--edge); }
.secondary { justify-content: center; }
