/* Purudu. A planner page: cool paper, ink text, one saffron accent; area colours are the only other hues. */
:root {
  --bg: #f3f5f7; --paper: #ffffff; --ink: #18222d; --muted: #5b6876; --line: #dbe1e7;
  --accent: #d9822b; --accent-ink: #8a4a0c; --accent-soft: #fbecd9; --on-accent: #1b1206;
  --ok: #2f8a57; --ok-soft: #dcf0e3; --bad: #c2423b; --bad-soft: #f8e0de;
  --c-violet: #7a5ab0; --c-blue: #3a6fb0; --c-emerald: #0f9d6b; --c-slate: #5f6b78;
  --c-rust: #b0593a; --c-gold: #b08a1a; --c-rose: #c24d79; --c-teal: #1f8a95;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --display: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c; --paper: #19212a; --ink: #e6ebf0; --muted: #9aa7b4; --line: #2a3541;
    --accent: #f0a04b; --accent-ink: #f6c48d; --accent-soft: #3a2a17; --on-accent: #1b1206;
    --ok: #5cc28a; --ok-soft: #1d3527; --bad: #ef7b73; --bad-soft: #3b2120;
    --c-violet: #a98ae0; --c-blue: #6fa0e0; --c-emerald: #3cc893; --c-slate: #9aa7b4;
    --c-rust: #e08a68; --c-gold: #d9b44a; --c-rose: #ec7fa6; --c-teal: #4cc0cb;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--font); -webkit-text-size-adjust: 100%;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top {
  position: sticky; top: 0; z-index: 2; background: var(--bg);
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px;
  max-width: 640px; margin: 0 auto;
}
.top h1 { margin: 0; font: 700 1.75rem/1.1 var(--display); }
.today { font: 600 .8rem var(--mono); color: var(--muted); }

main { max-width: 640px; margin: 0 auto; padding: 4px 16px 96px; display: flex; flex-direction: column; gap: 14px; }

.hint { color: var(--muted); font-size: .92rem; margin: 0; }

/* Area list */
.list { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.area-row { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); }
.area-row:last-child { border-bottom: 0; }
.area-row.is-hidden .area-name { color: var(--muted); text-decoration: line-through; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.area-name { flex: 1; min-width: 0; font-weight: 600; background: none; border: 0; text-align: left; padding: 6px 0; cursor: pointer; overflow-wrap: anywhere; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg);
  display: grid; place-items: center; cursor: pointer; font-size: .95rem; flex: none;
}
.text-btn {
  height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg);
  font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer; flex: none;
}
.text-btn:disabled { opacity: .35; cursor: default; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.pill { font: 600 .68rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 4px 6px; border-radius: 5px; background: var(--line); color: var(--muted); }

.primary, .ghost {
  border-radius: 12px; padding: 12px 18px; font-weight: 700; cursor: pointer; border: 1px solid transparent;
}
.primary { background: var(--accent); color: var(--on-accent); }
.ghost { background: transparent; border-color: var(--line); }
.add { align-self: flex-start; }

/* Placeholder screens */
.soon { background: var(--paper); border: 1px dashed var(--line); border-radius: 14px; padding: 22px 18px; display: flex; flex-direction: column; gap: 6px; }
.soon b { font: 700 1.1rem var(--display); }

/* Tabs */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--paper); border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
}
.tabs button {
  background: none; border: 0; padding: 6px 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .72rem; font-weight: 600; color: var(--muted); cursor: pointer;
}
.tabs .ti { font-size: 1.15rem; line-height: 1; }
.tabs button[aria-current="page"] { color: var(--accent-ink); }

/* Bottom sheet */
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 4; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; margin: 0 auto; max-width: 640px;
  background: var(--paper); border-radius: 18px 18px 0 0; border: 1px solid var(--line);
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
}
.sheet form { display: flex; flex-direction: column; gap: 10px; }
.sheet h2 { margin: 0 0 4px; font: 700 1.3rem var(--display); }
.sheet label, .sheet legend { font-size: .85rem; font-weight: 700; color: var(--muted); padding: 0; }
.sheet fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sheet input[type="text"] {
  font: inherit; font-size: 1.05rem; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); width: 100%;
}
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches label { position: relative; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatches span { display: block; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--line); }
.swatches input:checked + span { box-shadow: 0 0 0 3px var(--ink); }
.swatches input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.row-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.err { margin: 0; color: var(--bad); background: var(--bad-soft); padding: 8px 10px; border-radius: 8px; font-size: .92rem; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 6;
  bottom: calc(148px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: .92rem;
  width: max-content; max-width: min(480px, calc(100% - 32px));
}

/* Area colours */
.c-violet { background: var(--c-violet); } .c-blue { background: var(--c-blue); }
.c-emerald { background: var(--c-emerald); } .c-slate { background: var(--c-slate); }
.c-rust { background: var(--c-rust); } .c-gold { background: var(--c-gold); }
.c-rose { background: var(--c-rose); } .c-teal { background: var(--c-teal); }

@media (prefers-reduced-motion: no-preference) {
  .sheet:not([hidden]) { animation: up .18s ease-out; }
  @keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}

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

/* Area filter */
.filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filter::-webkit-scrollbar { display: none; }
.filter button {
  flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); font-size: .85rem; font-weight: 600; cursor: pointer;
}
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter .dot { width: 9px; height: 9px; }

.progress { display: flex; align-items: center; gap: 10px; font: 600 .85rem var(--mono); color: var(--muted); }
.bar-track { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar-fill { height: 100%; background: var(--ok); border-radius: 3px; }

/* Task sections */
.group { display: flex; flex-direction: column; gap: 6px; }
.group h2 { margin: 6px 0 0; font: 600 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.group.overdue h2 { color: var(--bad); }
.task { display: flex; align-items: flex-start; gap: 12px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.check {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--muted); background: transparent;
  flex: none; display: grid; place-items: center; cursor: pointer; color: #fff; font-size: .9rem; font-weight: 700; padding: 0; margin-top: 1px;
}
.check[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.t-body { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.t-title { font-weight: 600; overflow-wrap: anywhere; }
.task.done .t-title { text-decoration: line-through; color: var(--muted); }
.t-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .8rem; color: var(--muted); }
.t-meta .dot { width: 8px; height: 8px; }
.late { font: 600 .68rem/1 var(--mono); padding: 3px 6px; border-radius: 4px; background: var(--bad-soft); color: var(--bad); }
.moved { font: 600 .68rem/1 var(--mono); padding: 3px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); }
.empty { background: var(--paper); border: 1px dashed var(--line); border-radius: 14px; padding: 22px 18px; color: var(--muted); }
.empty b { color: var(--ink); display: block; font: 700 1.05rem var(--display); margin-bottom: 4px; }

.fab {
  position: fixed; z-index: 3; right: max(16px, calc(50% - 304px));
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--accent); color: var(--on-accent);
  font-size: 2rem; line-height: 1; cursor: pointer; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .45);
}

/* Task sheet */
.sheet.tall { max-height: calc(100% - 40px - env(safe-area-inset-top, 0px)); overflow-y: auto; }
.sheet textarea, .sheet select, .sheet input[type="date"], .sheet input[type="time"] {
  font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); width: 100%; min-height: 44px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip > span {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); font-size: .9rem; font-weight: 600; color: var(--ink);
}
.chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip .dot { width: 9px; height: 9px; flex: none; }
.when { display: grid; grid-template-columns: 64px 1fr; gap: 8px 10px; align-items: center; }
.when-k { font: 600 .7rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pick { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }

/* Action sheet */
.act-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.act-head h2 { margin: 0; font: 700 1.25rem/1.25 var(--display); overflow-wrap: anywhere; }
.act-meta { margin: 0; color: var(--muted); font-size: .88rem; }
.acts { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.acts > button {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line);
  background: var(--paper); text-align: left; cursor: pointer; font-weight: 600;
}
.acts > button:last-child { border-bottom: 0; }
.acts > button:hover { background: var(--bg); }
.acts .ai { width: 22px; text-align: center; color: var(--accent-ink); flex: none; }
.acts .sub { margin-left: auto; font-weight: 400; font-size: .85rem; color: var(--muted); }
.acts > button.danger { color: var(--bad); }
.acts > button.danger .ai { color: var(--bad); }
.acts > button.good .ai { color: var(--ok); }
.act-pick { display: flex; gap: 8px; padding: 10px 16px 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.act-pick input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.act-pick .primary { padding: 10px 16px; }
.nudge { background: var(--accent-soft); color: var(--accent-ink); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: .95rem; }
.nudge b { display: block; font: 700 1.05rem var(--display); margin-bottom: 2px; }
.split { display: flex; flex-direction: column; gap: 8px; }
.split textarea { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); width: 100%; }
.split label { font-size: .85rem; font-weight: 700; color: var(--muted); }
.toast { display: flex; align-items: center; gap: 14px; }
.toast button { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }

/* Habits */
.sheet-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--accent-ink); font-weight: 600; font-size: .88rem; cursor: pointer; }
.sub-label { font-size: .85rem; font-weight: 700; color: var(--muted); }
.pair { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.sheet input[type="number"] {
  font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); width: 100%; min-height: 44px;
}
.grow { flex: 1; }
.danger-text { color: var(--bad); }
.check.round { border-radius: 50%; }
.check[data-state="skipped"] { background: var(--line); border-color: var(--line); color: var(--muted); }
.check[data-state="partial"] { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.task.skipped .t-title { text-decoration: line-through; color: var(--muted); }
.rep { color: var(--accent-ink); font-weight: 700; }
.streak { font: 600 .7rem/1 var(--mono); padding: 3px 6px; border-radius: 4px; background: var(--ok-soft); color: var(--ok); }
.wk { font: 600 .7rem/1 var(--mono); padding: 3px 6px; border-radius: 4px; background: var(--line); color: var(--ink); }
.pause-card { display: flex; align-items: center; gap: 12px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 12px; padding: 12px 14px; }
.pause-card span { flex: 1; min-width: 0; }
.pause-card button { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; font-weight: 700; cursor: pointer; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.amount-row { display: flex; align-items: center; gap: 10px; }
.amount-row input { flex: 1; min-width: 0; font: inherit; font-size: 1.3rem; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.amount-row span { font-weight: 700; color: var(--muted); }

/* Tracking (step 5) */
.sheet.wide { max-height: calc(100% - 24px - env(safe-area-inset-top, 0px)); overflow-y: auto; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.tile { background: var(--bg); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile b { font: 700 1.45rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.tile span { font-size: .72rem; color: var(--muted); font-weight: 600; }
@media (max-width: 380px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.hist-h { margin: 14px 0 6px; font: 600 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.grid-wrap { overflow-x: auto; padding-bottom: 4px; }
.hgrid { display: grid; grid-template-columns: 28px repeat(12, minmax(18px, 1fr)); grid-template-rows: 16px repeat(7, auto); gap: 4px; min-width: 300px; }
.hgrid .ml { font: 600 .62rem var(--mono); color: var(--muted); white-space: nowrap; overflow: visible; }
.hgrid .dl { font: 600 .62rem var(--mono); color: var(--muted); align-self: center; }
.cell { aspect-ratio: 1; border-radius: 4px; border: 0; padding: 0; background: var(--line); cursor: pointer; position: relative; max-width: 100%; }
.cell:disabled { cursor: default; }
.cell[data-s="done"] { background: var(--ok); }
.cell[data-s="partial"] { background: linear-gradient(to top, var(--ok) 50%, var(--ok-soft) 50%); }
.cell[data-s="skipped"] { background: var(--line); }
.cell[data-s="skipped"]::after { content: ""; position: absolute; left: 25%; right: 25%; top: calc(50% - 1px); height: 2px; border-radius: 1px; background: var(--muted); }
.cell[data-s="missed"] { background: var(--bad-soft); box-shadow: inset 0 0 0 2px var(--bad); }
.cell[data-s="paused"] { background: var(--accent-soft); }
.cell[data-s="rest"] { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.cell[data-s="today"] { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.cell[data-s="future"], .cell[data-s="before"] { background: transparent; opacity: .35; box-shadow: inset 0 0 0 1px var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .75rem; color: var(--muted); margin-top: 8px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend .cell { width: 12px; height: 12px; cursor: default; }
.strip { display: flex; gap: 3px; margin-top: 2px; }
.strip .cell { width: 11px; height: 11px; border-radius: 3px; cursor: default; }
.weeks { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }
.weeks div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--bg); font-variant-numeric: tabular-nums; }
.weeks .ok { color: var(--ok); font-weight: 700; }
.weeks .no { color: var(--bad); font-weight: 700; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; position: relative; border-bottom: 1px solid var(--line); padding-top: 14px; }
.bars .bar { flex: 1; min-width: 0; background: var(--c-blue); border-radius: 4px 4px 0 0; position: relative; }
.bars .bar.under { background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok); }
.bars .bar.met { background: var(--ok); }
.bars .goal { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--muted); }
.bars .goal span { position: absolute; right: 0; top: -16px; font: 600 .65rem var(--mono); color: var(--muted); background: var(--paper); padding: 0 3px; }
.bar-x { display: flex; justify-content: space-between; font: 600 .62rem var(--mono); color: var(--muted); margin-top: 4px; }
.fix { display: flex; flex-direction: column; gap: 8px; background: var(--bg); border-radius: 12px; padding: 12px; margin-top: 10px; }
.fix b { font-weight: 700; }
/* Week summary */
.sum-grid { display: flex; flex-direction: column; }
.sum-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sum-row:last-child { border-bottom: 0; }
.sum-row .nm { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.sum-row .nums { font: 600 .78rem var(--mono); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.sum-row .nums .bad { color: var(--bad); }
.sum-row .hb { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.sum-row .moved-line { grid-column: 1 / -1; font-size: .8rem; color: var(--accent-ink); }
.export { color: var(--accent-ink); font-weight: 700; text-decoration: none; }

/* Sign-in */
body.signed-out .top, body.signed-out .tabs, body.signed-out .fab, body.signed-out main { display: none; }
.signin { min-height: 100%; display: grid; place-items: center; padding: 32px 16px; }
.signin form { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; }
.signin img { align-self: center; border-radius: 18px; }
.signin h1 { margin: 0; font: 700 2rem var(--display); }
.signin input {
  font: inherit; font-size: 1.05rem; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); width: 100%;
}

/* Less and Stop (step 9) */
.limit-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .95rem; }
.limit-line input[type="number"] { width: 72px !important; min-height: 40px; }
.limit-line select { width: auto !important; min-height: 40px; }
.check-line { display: flex !important; align-items: center; gap: 10px; font-size: .95rem !important; color: var(--ink) !important; font-weight: 600 !important; cursor: pointer; }
.check-line input { width: 20px; height: 20px; accent-color: var(--accent); }
.less-card { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.less-card:last-child { border-bottom: 0; }
.less-top { display: flex; align-items: flex-start; gap: 10px; }
.less-top .t-body { flex: 1; }
.less-btns { display: flex; gap: 8px; }
.less-btns button { flex: 1; border-radius: 10px; padding: 10px 8px; font-weight: 700; cursor: pointer; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.less-btns .plus { background: var(--paper); }
.less-btns .win { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.meter { display: flex; align-items: center; gap: 8px; font: 600 .78rem var(--mono); color: var(--muted); }
.meter .bar-track { flex: 1; height: 6px; }
.meter .bar-fill.over { background: var(--bad); }
.lock { font-size: .8rem; }
.priv-chip[aria-pressed="true"] { background: var(--accent-soft) !important; color: var(--accent-ink) !important; border-color: var(--accent) !important; }
.cell[data-s="good"] { background: var(--ok); }
.cell[data-s="over"], .cell[data-s="slip"] { background: var(--bad-soft); box-shadow: inset 0 0 0 2px var(--bad); }
.tag-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.stepper output { font: 700 1.4rem var(--display); min-width: 2ch; text-align: center; }
.hbars { display: flex; flex-direction: column; gap: 6px; }
.hbar { display: grid; grid-template-columns: minmax(70px, 30%) 1fr auto; gap: 8px; align-items: center; font-size: .88rem; }
.hbar .bar-track { height: 8px; }
.hbar .bar-fill { background: var(--accent); }
.hbar b { font: 600 .78rem var(--mono); color: var(--muted); }
.ev-list { display: flex; flex-direction: column; }
.ev { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.ev:last-child { border-bottom: 0; }
.ev span { flex: 1; min-width: 0; }
.ev button { background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); padding: 4px 8px; cursor: pointer; }
.bars .bar.over { background: var(--bad); }
