/* ------------------------------------------------------------------
   Optimized Brain Sweep — design tokens from biz.thyme-is-honey.com
   ------------------------------------------------------------------ */
:root {
  --cream: #F2F1EC;
  --paper: #FFFFFF;
  --ink: #343434;
  --ink-soft: rgba(52, 52, 52, 0.62);
  --ink-faint: rgba(52, 52, 52, 0.14);
  --navy: #1A262D;
  --sage: #C6D8D2;
  --honey: #C1912F;
  --rust: #9A5729;
  --rust-dark: #7E4520;
  --slate: #94AFBB;

  /* The Four Ds (from the printed worksheet) */
  --do: var(--sage);        --do-tint: #E7EFEC;      --do-ink: #2F4A42;
  --delay: var(--honey);    --delay-tint: #EEDDBE;   --delay-ink: #5E430E;
  --delegate: var(--slate); --delegate-tint: #DFE7EB; --delegate-ink: #2B4350;
  --delete: var(--rust);    --delete-tint: #EBD9CC;  --delete-ink: #6A3815;

  --font-display: "Fjalla One", "Oswald", Impact, sans-serif;
  --font-body: "Montserrat", -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 3px;
  --radius: 5px;
  --radius-frame: 20px;
  --shadow-card:
    0 1px 1px rgba(0,0,0,.04), 0 2px 2px rgba(0,0,0,.04), 0 4.5px 4.5px rgba(0,0,0,.04),
    0 9px 9px rgba(0,0,0,.04), 0 13.5px 13.5px rgba(0,0,0,.04);
  --shadow-float: 0 8px 16px rgba(26, 38, 45, 0.1);

  --gutter: 16px;
  --max: 720px;
  --dock-h: 148px;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin: 0;
  text-transform: uppercase;
}

p { margin: 0; }

button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }

#screen:focus { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px var(--gutter);
  padding-top: max(12px, env(safe-area-inset-top));
  background: var(--paper);
  box-shadow: 0 1px 0 var(--ink-faint);
}

.brand {
  display: inline-flex; align-items: baseline; gap: 5px;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-size: 22px; letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand i {
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: 15px; letter-spacing: 0; color: var(--ink);
}

.steps { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.step {
  appearance: none; border: 0; background: none; cursor: default;
  padding: 4px 6px; border-radius: var(--radius-sm);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); white-space: nowrap;
}
.step.reachable { cursor: pointer; color: var(--ink); }
.step.reachable:hover { background: var(--cream); }
.step.current { color: var(--paper); background: var(--navy); }
.step-num { display: none; }

@media (max-width: 520px) {
  .brand { font-size: 18px; }
  .brand i { font-size: 13px; }
  .step-label { display: none; }
  .step-num { display: inline; }
  .step { min-width: 26px; text-align: center; }
  .step.current .step-label { display: inline; }
  .step.current .step-num { display: none; }
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 32px var(--gutter) 48px;
}

.eyebrow {
  font-family: var(--font-display); text-transform: uppercase;
  color: var(--honey); font-size: 18px; letter-spacing: 0.02em; margin-bottom: 6px;
}

.screen-head { margin-bottom: 24px; }
.screen-head h1 { font-size: clamp(30px, 7vw, 44px); }
.lede { margin-top: 10px; font-size: 16px; color: var(--ink-soft); max-width: 52ch; }

.card {
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 20px;
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 22px; border-radius: var(--radius-sm);
  background: var(--rust); color: #fff;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  transition: background .15s ease, transform .1s ease;
}
.btn:hover { background: var(--rust-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #C9C2B8; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }
.btn.ghost {
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink);
}
.btn.ghost:hover { background: var(--paper); }
.btn.small { min-height: 38px; padding: 8px 14px; font-size: 12px; }

.link {
  appearance: none; border: 0; background: none; cursor: pointer; padding: 6px 4px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px;
}
.link:hover { color: var(--ink); }

/* Signature "offset block" frame from the site */
.frame { box-shadow: -8px 8px 0 var(--frame-color, var(--rust)); }

/* ---------- Intro ---------- */
.intro h1 { font-size: clamp(40px, 11vw, 64px); line-height: 1.02; }
.intro .lede { font-size: 17px; color: var(--ink); margin-top: 14px; }

.how { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 22px; }
.how li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.how-num {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--navy); border-radius: 12px;
  font-family: var(--font-display); font-size: 22px; margin-left: 6px;
}
.how-num.frame { box-shadow: -6px 6px 0 var(--frame-color); }
.how h3 { font-size: 20px; }
.how p { font-size: 14.5px; color: var(--ink-soft); margin-top: 2px; }

.setup { margin-top: 36px; display: grid; gap: 18px; }
.setup-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 8px; display: block;
}
.seg { display: inline-flex; border: 2px solid var(--navy); border-radius: var(--radius-sm); overflow: hidden; }
.seg button {
  appearance: none; border: 0; background: var(--paper); cursor: pointer;
  padding: 8px 16px; font-weight: 600; font-size: 14px;
}
.seg button + button { border-left: 2px solid var(--navy); }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }

.fine { font-size: 13px; color: var(--ink-soft); }

.resume {
  margin-top: 28px; border-left: 6px solid var(--honey);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.resume strong { font-family: var(--font-display); font-weight: 400; font-size: 20px; text-transform: uppercase; display: block; }

.signature {
  margin-top: 48px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  color: var(--ink-soft); text-align: center;
}
.signature a { color: inherit; text-decoration: none; }
.signature span { margin: 0 10px; opacity: .5; }

/* ---------- Dump ---------- */
.dump .wrap { padding-bottom: calc(var(--dock-h) + 40px + env(safe-area-inset-bottom)); }

.dump-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dump-head h1 { font-size: clamp(26px, 6vw, 36px); }

.timer {
  appearance: none; border: 2px solid var(--navy); background: var(--paper);
  border-radius: 12px; padding: 6px 12px 4px; cursor: pointer; flex-shrink: 0;
  display: grid; justify-items: center; line-height: 1.1; min-width: 96px;
}
.timer-time { font-family: var(--font-display); font-size: 30px; font-variant-numeric: tabular-nums; }
.timer-label { font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.timer.paused { background: var(--honey); }
.timer.paused .timer-label { color: var(--ink); }
.timer.over .timer-time { font-size: 18px; padding: 6px 0; }

.timer-bar { height: 4px; background: var(--ink-faint); border-radius: 2px; margin: 18px 0 20px; overflow: hidden; }
.timer-bar span { display: block; height: 100%; width: 100%; background: var(--honey); transform-origin: left; transition: transform .25s linear; }

.sheet {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 8px 0; min-height: 220px;
}
.sheet-empty {
  padding: 40px 24px; text-align: center; color: var(--ink-soft); font-size: 15px;
}
.sheet-empty strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--ink); text-transform: uppercase; margin-bottom: 6px; }
.sheet-empty kbd { font-family: var(--font-body); font-size: 12px; border: 1px solid var(--ink-faint); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; background: var(--cream); }

.dump-list { list-style: none; margin: 0; padding: 0; }
.item {
  display: grid; grid-template-columns: 34px 1fr 44px; align-items: center;
  min-height: 52px; padding: 0 4px 0 12px;
  border-bottom: 1px solid var(--ink-faint);
  animation: drop-in .22s ease-out;
}
.item:last-child { border-bottom: 0; }
.item-num {
  font-family: var(--font-display); font-size: 14px; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.item-text {
  padding: 12px 6px; border-radius: var(--radius-sm); outline: none;
  overflow-wrap: anywhere; cursor: text;
}
.item-text:focus { background: var(--cream); box-shadow: inset 0 -2px 0 var(--honey); }
.item.pending .item-text { color: var(--ink-soft); font-style: italic; cursor: default; }
.item.pending .item-text:empty::before { content: "Listening"; }
.item.pending .item-text::after { content: "…"; animation: blink 1s steps(2) infinite; }
.item.processing .item-text { color: var(--ink); }
.item.processing .item-num { animation: blink 1s steps(2) infinite; }
.item.leaving { animation: fade-out .18s ease-in forwards; }

.x {
  appearance: none; border: 0; background: none; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-soft);
}
.x:hover { background: var(--delete-tint); color: var(--rust); }
.x svg { width: 18px; height: 18px; }
.item.pending .x { visibility: hidden; }

.dump-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 14px; font-size: 13px; color: var(--ink-soft);
}
.dump-meta strong { color: var(--ink); }

.type-row { display: flex; gap: 8px; margin-top: 14px; }
.type-row input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px;
  border: 2px solid var(--navy); border-radius: var(--radius-sm); background: var(--paper);
  font: inherit; color: var(--ink);
}
.type-row input:focus { outline: none; box-shadow: 0 0 0 3px var(--honey); }
.type-row[hidden] { display: none; }

/* The dock: scratch · HOLD TO TALK · type */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  background: linear-gradient(to top, var(--cream) 78%, rgba(242,241,236,0));
  padding: 26px var(--gutter) max(18px, env(safe-area-inset-bottom));
}
.dock-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 72px minmax(0, 360px) 72px; gap: 14px; align-items: center;
  justify-content: center;
}
.dock-side {
  appearance: none; border: 0; background: none; cursor: pointer;
  display: grid; justify-items: center; gap: 4px; padding: 6px 0;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink);
}
.dock-side .ico {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); box-shadow: var(--shadow-float), inset 0 0 0 2px var(--navy);
  transition: transform .1s ease, background .15s;
}
.dock-side:active .ico { transform: scale(.94); }
.dock-side:disabled { opacity: .35; cursor: default; }
.dock-side svg { width: 22px; height: 22px; }
#scratch:not(:disabled):hover .ico { background: var(--delete-tint); }

.talk-wrap { position: relative; padding-left: 8px; }
.talk-wrap::before {
  content: ""; position: absolute; left: 0; right: 8px; top: 8px; bottom: -8px;
  border-radius: var(--radius-frame); background: var(--rust);
}
.talk {
  position: relative; width: 100%; height: 96px;
  appearance: none; cursor: pointer;
  border: 2px solid var(--navy); border-radius: var(--radius-frame);
  background: var(--sage); color: var(--navy);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--font-display); font-size: 22px; letter-spacing: 0.04em; text-transform: uppercase;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, background .15s ease;
}
.talk svg { width: 26px; height: 26px; }
.talk .talk-sub {
  font-family: var(--font-body); font-size: 10px; font-weight: 600; letter-spacing: 0.14em; color: rgba(26,38,45,.6);
}
.talk.active {
  transform: translate(-6px, 6px);
  background: var(--honey);
}
.talk.active .talk-sub { color: var(--navy); }
.talk.active::after {
  content: ""; position: absolute; inset: -2px; border-radius: var(--radius-frame);
  box-shadow: 0 0 0 0 rgba(193,145,47,.55);
  animation: pulse 1.2s ease-out infinite;
}
.talk.starting { background: #E3CB97; }
.talk.starting::after { animation: none; }
.talk:disabled { background: #DDD8CF; color: var(--ink-soft); cursor: not-allowed; }

/* ---------- Overlay (time's up) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(26, 38, 45, 0.55);
  display: grid; place-items: center; padding: var(--gutter);
  animation: fade-in .2s ease;
}
.overlay .card { max-width: 420px; width: 100%; text-align: center; padding: 32px 24px; }
.overlay h2 { font-size: 40px; }
.overlay p { color: var(--ink-soft); margin: 10px 0 24px; }
.overlay p.eyebrow { color: var(--honey); margin: 0 0 4px; }
.overlay .actions { display: grid; gap: 10px; }

/* ---------- Breathe ---------- */
.breathe .wrap { text-align: center; min-height: calc(100dvh - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.breathe h1 { font-size: clamp(38px, 10vw, 56px); }
.breath {
  position: relative; width: 240px; height: 240px; margin: 36px auto 20px;
  display: grid; place-items: center;
}
.breath-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--sage); border: 2px solid var(--navy);
  transform: scale(.45);
  transition-property: transform, background-color; transition-timing-function: ease-in-out;
}
.breath-ring.in { transform: scale(1); }
.breath::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px dashed var(--ink-faint);
}
.breath-word { position: relative; font-family: var(--font-display); font-size: 26px; text-transform: uppercase; }
.breath-dots { display: flex; gap: 10px; justify-content: center; margin-bottom: 28px; }
.breath-dots span { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--navy); }
.breath-dots span.done { background: var(--navy); }
.breathe .actions { display: grid; gap: 8px; justify-items: center; min-height: 100px; }

/* ---------- Four Ds legend (nod to the worksheet) ---------- */
.legend {
  display: grid; grid-template-columns: 34px 1fr; background: var(--paper);
  border: 1.5px solid var(--navy); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px;
}
.legend-title {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--font-display); font-size: 17px; text-align: center;
  border-left: 1.5px solid var(--navy); padding: 8px 0;
}
.legend ul { list-style: none; margin: 0; padding: 10px 14px; display: grid; gap: 6px; }
.legend li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: center; font-size: 13.5px; }
.swatch { width: 16px; height: 16px; border: 1.5px solid var(--navy); border-radius: 2px; background: var(--c); }

/* ---------- Sort ---------- */
.sort .wrap { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }

.sort-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.stackbar { flex: 1; height: 8px; border-radius: 4px; background: var(--ink-faint); display: flex; overflow: hidden; }
.stackbar span { height: 100%; transition: width .25s ease; }

.sort-list { list-style: none; margin: 0; padding: 8px 0; }
.sort-item {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 4px;
  padding: 12px 14px 12px 12px; cursor: pointer;
  border-bottom: 1px solid var(--ink-faint);
  position: relative;
}
.sort-item:last-child { border-bottom: 0; }
.sort-item:hover { background: #FAFAF7; }
.sort-item.current { background: var(--cream); box-shadow: inset 4px 0 0 var(--navy); }
.sort-item.current .item-num { color: var(--ink); }

/* Highlighter-marker effect */
.hl {
  padding: 1px 4px; margin: 0 -4px; border-radius: 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-color .2s ease;
}
[data-d="do"] .hl { background: linear-gradient(100deg, transparent 0.6%, var(--do) 1.4%, var(--do) 98.6%, transparent 99.4%); }
[data-d="delay"] .hl { background: linear-gradient(100deg, transparent 0.6%, #E2C27F 1.4%, #E2C27F 98.6%, transparent 99.4%); }
[data-d="delegate"] .hl { background: linear-gradient(100deg, transparent 0.6%, #BCD0D9 1.4%, #BCD0D9 98.6%, transparent 99.4%); }
[data-d="delete"] .hl { background: linear-gradient(100deg, transparent 0.6%, #D9AE8F 1.4%, #D9AE8F 98.6%, transparent 99.4%); }

.d-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 3px; white-space: nowrap;
}
[data-d="do"] .d-tag { background: var(--do-tint); color: var(--do-ink); }
[data-d="delay"] .d-tag { background: var(--delay-tint); color: var(--delay-ink); }
[data-d="delegate"] .d-tag { background: var(--delegate-tint); color: var(--delegate-ink); }
[data-d="delete"] .d-tag { background: var(--delete-tint); color: var(--delete-ink); }

.tray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  background: var(--paper); box-shadow: 0 -8px 20px rgba(26,38,45,.08);
  padding: 12px var(--gutter) max(14px, env(safe-area-inset-bottom));
}
.tray-inner { max-width: var(--max); margin: 0 auto; }
.tray-label {
  font-size: 12px; color: var(--ink-soft); margin-bottom: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tray-label b { color: var(--ink); font-weight: 600; }
.d-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.d-btn {
  appearance: none; cursor: pointer; border: 2px solid var(--navy); border-radius: 10px;
  min-height: 64px; padding: 6px 4px; display: grid; justify-items: center; align-content: center; gap: 2px;
  background: var(--c); color: var(--navy);
  font-family: var(--font-display); font-size: 17px; text-transform: uppercase; letter-spacing: 0.03em;
  transition: transform .08s ease, box-shadow .08s ease;
  box-shadow: -4px 4px 0 var(--navy);
}
.d-btn:active { transform: translate(-3px, 3px); box-shadow: -1px 1px 0 var(--navy); }
.d-btn .em { font-size: 20px; line-height: 1; }
.d-btn kbd { font-family: var(--font-body); font-size: 9px; font-weight: 700; opacity: .6; display: none; }
@media (hover: hover) and (pointer: fine) { .d-btn kbd { display: inline; } }
.d-btn[data-d="delete"] { color: #fff; }
.d-btn[data-d="delete"] kbd { opacity: .8; }

.tray-done { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tray-done p { font-family: var(--font-display); font-size: 20px; text-transform: uppercase; }

/* ---------- Act ---------- */
.act .wrap { padding-bottom: 120px; }
.act-pills { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.act-pill {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; border: 2px solid transparent; color: var(--ink-soft);
  background: rgba(255,255,255,.6);
}
.act-pill.on { border-color: var(--navy); color: var(--navy); background: var(--c); }
.act-pill[data-d="delete"].on { color: #fff; }
.act-pill.done { color: var(--ink); }
.act-pill.done::before { content: "✓ "; }
.act-pill.empty { opacity: .45; text-decoration: line-through; }

.band {
  background: var(--c); color: var(--navy); padding: 14px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.band h2 { font-size: 24px; }
.band[data-d="delete"] { color: #fff; }
.band p { font-size: 13.5px; margin-top: 4px; opacity: .9; }

.rows { background: var(--tint); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-card); }
.row { padding: 14px 16px; border-bottom: 1px solid rgba(26,38,45,.12); }
.row:last-child { border-bottom: 0; }
.row-text { font-weight: 600; overflow-wrap: anywhere; }
.fields { display: grid; gap: 8px; margin-top: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .fields.two { grid-template-columns: 180px 1fr; } }
.field label {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 3px; color: rgba(26,38,45,.7);
}
.field input {
  width: 100%; height: 42px; padding: 0 12px; background: var(--paper);
  border: 1.5px solid rgba(26,38,45,.35); border-radius: var(--radius-sm);
  font: inherit; font-size: 15px; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(193,145,47,.45); }

.check-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.check-row input { appearance: none; flex-shrink: 0; width: 26px; height: 26px; border: 2px solid var(--navy); border-radius: 5px; background: var(--paper); display: grid; place-items: center; cursor: pointer; margin: 0; }
.check-row input:checked { background: var(--navy); }
.check-row input:checked::after { content: ""; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.check-row input:checked + .row-text { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .6; }

.do-row-head { display: flex; align-items: center; gap: 10px; }
.do-row-head .row-text { flex: 1; }
.star {
  appearance: none; border: 2px solid var(--navy); background: var(--paper); cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  transition: transform .1s;
}
.star svg { width: 20px; height: 20px; fill: none; stroke: var(--navy); stroke-width: 2; }
.star[aria-pressed="true"] { background: var(--honey); }
.star[aria-pressed="true"] svg { fill: var(--navy); }
.star:disabled { opacity: .3; cursor: not-allowed; }
.star:not(:disabled):active { transform: scale(.9); }
.top3-note { font-size: 13px; font-weight: 600; margin: 12px 0 0; display: flex; align-items: center; gap: 6px; }

.act-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  background: var(--paper); box-shadow: 0 -8px 20px rgba(26,38,45,.08);
  padding: 12px var(--gutter) max(14px, env(safe-area-inset-bottom));
}
.act-nav-inner { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 12px; }

/* ---------- Plan ---------- */
.plan-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }

.top3 {
  margin: 0 0 32px 8px; padding: 22px 20px 18px;
  background: var(--paper); border: 2px solid var(--navy); border-radius: var(--radius-frame);
  --frame-color: var(--honey);
}
.top3 h2 { font-size: 22px; margin-bottom: 10px; }
.top3 ol { margin: 0; padding: 0; list-style: none; counter-reset: t; display: grid; gap: 12px; }
.top3 li { counter-increment: t; display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
.top3 li::before {
  content: counter(t); font-family: var(--font-display); font-size: 22px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--sage); border: 2px solid var(--navy); display: grid; place-items: center; line-height: 1;
}
.top3 .t { font-weight: 600; }
.top3 .n { font-size: 13.5px; color: var(--ink-soft); }

.table { margin-bottom: 28px; break-inside: avoid; }
.table .band { border-radius: var(--radius) var(--radius) 0 0; padding: 10px 14px; }
.table .band h2 { font-size: 20px; }
.table table { width: 100%; border-collapse: collapse; background: var(--tint); box-shadow: var(--shadow-card); font-size: 14.5px; }
.table th {
  text-align: left; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 13px;
  letter-spacing: 0.04em; padding: 8px 14px; border-bottom: 1.5px solid rgba(26,38,45,.35);
  background: rgba(255,255,255,.45);
}
.table td { padding: 10px 14px; border-bottom: 1px solid rgba(26,38,45,.12); vertical-align: top; overflow-wrap: anywhere; }
.table tr:last-child td { border-bottom: 0; }
.table td.muted { color: var(--ink-soft); font-style: italic; }
.table .star-mark { color: var(--honey); margin-right: 4px; }
.table .gone td { text-decoration: line-through; color: var(--ink-soft); }
.plan-empty { padding: 14px; background: var(--tint); font-size: 14px; color: var(--ink-soft); border-radius: 0 0 var(--radius) var(--radius); }

.closing { text-align: center; margin-top: 12px; }
.closing p { color: var(--ink-soft); font-size: 14px; margin-bottom: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; z-index: 50;
  bottom: calc(var(--toast-offset, 24px) + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  max-width: calc(100vw - 32px); width: max-content;
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: 10px 10px 10px 16px; box-shadow: var(--shadow-float);
  font-size: 14px; animation: rise .2s ease-out;
}
.toast[hidden] { display: none; }
.toast-msg { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; max-width: min(420px, 64vw); }
.toast-action {
  appearance: none; border: 0; cursor: pointer; background: var(--honey); color: var(--navy);
  font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 8px 12px; border-radius: var(--radius-sm);
}
.toast-action[hidden] { display: none; }
body.has-dock .toast { --toast-offset: calc(var(--dock-h) + 8px); }
body.has-tray .toast { --toast-offset: 168px; }
body.has-actnav .toast { --toast-offset: 86px; }

/* ---------- Motion ---------- */
@keyframes drop-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade-out { to { opacity: 0; transform: translateX(16px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(193,145,47,.55); }
  100% { box-shadow: 0 0 0 18px rgba(193,145,47,0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Print: a clean worksheet ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  .topbar, .plan-actions, .closing, .toast, .act-nav, .tray, .dock { display: none !important; }
  .wrap { padding: 0; max-width: none; }
  .table table, .rows, .card { box-shadow: none; }
  .table table { border: 1px solid #999; }
  .band, .table table, .top3 li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .frame { box-shadow: none; }
  .top3 { margin-left: 0; }
  .signature { display: block; }
}
