.skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }.skip-link:focus-visible { position: fixed; top: 8px; left: 8px; z-index: 10; width: auto; height: auto; padding: 10px 12px; border-radius: 6px; background: var(--navy, #16233f); color: #fff; font-weight: 750; text-decoration: none; clip-path: none; outline: 3px solid var(--coral, #ff6b4a); outline-offset: 2px; }
/* Day planner. Token fallbacks mirror public/tokens.css so this page also
   works on branches where tokens.css has not landed yet. */
:root {
  color: var(--navy, #16233f);
  background: var(--bg, #faf7f2);
  font-family: var(--font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}
* { box-sizing: border-box; }
body { margin: 0; padding: 16px; }
main { max-width: 640px; margin: 0 auto; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0 24px; }
.brand { color: var(--coral, #ff6b4a); font-size: 14px; font-weight: 850; letter-spacing: .05em; text-decoration: none; }
.brand span { padding: 2px 6px; border-radius: 5px; color: #fff; background: var(--coral-cta, #c93a1d); font-size: 10px; }
.back { color: var(--navy, #16233f); font-size: 13px; font-weight: 750; text-underline-offset: 3px; }
.kicker { margin: 0 0 6px; color: var(--coral-cta, #c93a1d); font-size: 10px; font-weight: 850; letter-spacing: .1em; }
h1 { margin: 0; font-size: clamp(30px, 7vw, 47px); letter-spacing: -.045em; }
h2 { font-size: 20px; letter-spacing: -.025em; margin: 26px 0 10px; }
.lead, .note { color: var(--muted, #5a6a86); line-height: 1.5; }
.note { font-size: 13px; }
.controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 6px; padding: 18px; border: 1px solid var(--line, #e5e0d5); border-radius: 14px; background: #fff; }
.controls label { display: grid; gap: 5px; color: var(--body, #43516a); font-size: 12px; font-weight: 700; }
.controls .mode-field { display: grid; gap: 5px; color: var(--body, #43516a); font-size: 12px; font-weight: 700; grid-column: span 2; }
.segmented { display: flex; gap: 6px; }
.segmented button { flex: 1; background: #fff; color: var(--navy, #16233f); border: 1px solid var(--line-cool, #d8dee9); white-space: nowrap; }
.segmented button[aria-pressed="true"] { background: var(--navy, #16233f); color: #fff; border-color: var(--navy, #16233f); }
.controls select, .controls input { min-height: 44px; width: 100%; border: 1px solid var(--line-cool, #d8dee9); border-radius: 8px; padding: 8px; color: var(--navy, #16233f); background: #fff; font: inherit; }
button { min-height: 44px; border: 0; border-radius: 8px; padding: 9px 16px; background: var(--coral-cta, #c93a1d); color: #fff; font-weight: 700; cursor: pointer; }
button.secondary { background: #fff; color: var(--navy, #16233f); border: 1px solid var(--line-cool, #d8dee9); }
.summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.summary .stat { padding: 8px 10px; border-radius: 8px; background: var(--panel, #edf3f6); font-size: 13px; font-weight: 700; }
.summary .stat.warn { background: var(--alert-bg, #fff4f0); color: var(--alert-ink, #703528); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stop { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 12px; border: 1px solid var(--line, #e5e0d5); border-radius: 12px; background: #fff; }
.stop.done { opacity: .55; }
.stop .when { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 800; }
.stop .when small { display: block; color: var(--muted, #5a6a86); font-weight: 600; }
.stop h3 { margin: 0; font-size: 15px; }
.stop .meta { margin: 4px 0 0; color: var(--muted, #5a6a86); font-size: 12px; line-height: 1.5; }
.stop .flags { margin: 6px 0 0; font-size: 12px; font-weight: 700; color: var(--alert-ink, #703528); }
.stop .actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.stop .actions button { min-height: 44px; min-width: 44px; padding: 6px 10px; }
.stop { transition: transform .15s ease; }
.stop .actions .drag-handle { touch-action: none; cursor: grab; color: var(--muted, #5a6a86); font-size: 15px; line-height: 1; }
.stop.dragging { position: relative; z-index: 3; transition: none; border-color: var(--coral, #ff6b4a); box-shadow: 0 10px 28px rgb(22 35 63 / .18); cursor: grabbing; }
.chip { display: inline-block; padding: 1px 7px; border: 1px solid var(--line-cool, #d8dee9); border-radius: 999px; font-size: 11px; font-weight: 700; }
.chip.low { color: var(--ok, #177a41); } .chip.mid { color: var(--warn, #96690a); } .chip.high { color: var(--bad, #d43a2a); }
.chip.show { color: var(--coral-cta, #c93a1d); border-color: var(--coral, #ff6b4a); }
.catalog { display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px; border: 1px solid var(--line, #e5e0d5); border-radius: 12px; background: #fff; }
.item h3 { margin: 0; font-size: 14px; }
.item .meta { grid-column: 1; color: var(--muted, #5a6a86); font-size: 12px; line-height: 1.45; }
.item button { grid-row: 1 / span 2; }
#suggestions .item { border-color: var(--coral, #ff6b4a); }
footer { margin: 34px 0 8px; color: var(--muted, #5a6a86); font-size: 12px; line-height: 1.55; }
@media (max-width: 520px) { .controls { grid-template-columns: 1fr; } .controls .mode-field { grid-column: auto; } .stop { grid-template-columns: 74px 1fr; } }
#share-result { overflow-wrap: anywhere; }
/* Calculated timeline (docs/planner-playbook.md, layout spec). */
main { max-width: 720px; }
.controls .mode-hint { grid-column: 1 / -1; margin: 0; }
.notices { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.notices li { padding: 8px 12px; border: 1px solid var(--line, #e5e0d5); border-radius: 12px; background: var(--panel, #edf3f6); font-size: 13px; line-height: 1.45; }
.notices li.warn { border-color: var(--alert-line, #f3c1bb); background: var(--alert-bg, #fff4f0); color: var(--alert-ink, #703528); }
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 10px; }
.day-head h2 { margin: 0; }
.timeline { gap: 6px; }
.segment { margin-left: 92px; padding: 6px 12px; border-left: 2px dashed var(--line-cool, #d8dee9); color: var(--muted, #5a6a86); font-size: 12px; font-weight: 700; }
.segment.entry { margin-left: 0; border: 1px solid var(--line, #e5e0d5); border-radius: 12px; background: var(--surface, #fff); color: var(--text, #16233f); }
.segment.buffer { border-left-style: solid; }
.segment.free { border: 1px dashed var(--line-cool, #d8dee9); border-radius: 12px; }
.segment .flag { color: var(--alert-ink, #703528); }
.stop { grid-template-columns: 92px minmax(0, 1fr); }
.stop .body { min-width: 0; }
.stop h3 { overflow-wrap: anywhere; }
.stop.conflict { border-color: var(--alert-line, #f3c1bb); box-shadow: inset 4px 0 0 var(--alert-ink, #703528); }
.stop.closed h3 { text-decoration: line-through; color: var(--muted, #5a6a86); }
.stop.show { background: var(--panel, #edf3f6); }
.stop .lock { font-size: 12px; color: var(--muted, #5a6a86); }
.stop .session { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 8px; font-size: 12px; font-weight: 700; }
.stop .session select { min-height: 44px; border: 1px solid var(--line-cool, #d8dee9); border-radius: 8px; padding: 6px 8px; font: inherit; background: var(--surface, #fff); color: inherit; min-width: 0; max-width: 100%; flex: 1 1 140px; }
.day-summary { position: sticky; bottom: 0; z-index: 2; margin: 18px -16px 0; padding: 10px 16px; border-top: 1px solid var(--line, #e5e0d5); background: var(--bg, #faf7f2); box-shadow: var(--shadow-float, none); }
.day-summary .stats { display: flex; flex-wrap: wrap; gap: 6px; }
.day-summary .stat { padding: 6px 10px; border-radius: 8px; background: var(--panel, #edf3f6); font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
.day-summary .stat.warn { background: var(--alert-bg, #fff4f0); color: var(--alert-ink, #703528); }
.save-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 10px 0; }
.save-form label { display: grid; gap: 5px; flex: 1 1 200px; font-size: 12px; font-weight: 700; }
.save-form input { min-height: 44px; width: 100%; border: 1px solid var(--line-cool, #d8dee9); border-radius: 8px; padding: 8px; font: inherit; background: var(--surface, #fff); color: inherit; }
.saved-days { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.saved-days .saved { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px; border: 1px solid var(--line, #e5e0d5); border-radius: 12px; background: var(--surface, #fff); }
.saved-days .meta { margin: 4px 0 0; color: var(--muted, #5a6a86); font-size: 12px; }
.saved-days .actions { display: flex; gap: 6px; }
.library { width: min(640px, calc(100vw - 24px)); max-height: min(80vh, 760px); padding: 16px; border: 1px solid var(--line, #e5e0d5); border-radius: 20px; background: var(--bg, #faf7f2); color: var(--text, #16233f); }
.library::backdrop { background: rgb(20 30 28 / .35); }
.library-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.library-head h2 { margin: 0; }
.library-search { display: grid; gap: 5px; margin: 12px 0 8px; font-size: 12px; font-weight: 700; }
.library-search input { min-height: 44px; border: 1px solid var(--line-cool, #d8dee9); border-radius: 8px; padding: 8px; font: inherit; background: var(--surface, #fff); color: inherit; }
.library .item h3 { overflow-wrap: anywhere; }
.library .item { grid-template-columns: minmax(0, 1fr) auto; }
/* Library items mirror the approved prototype: name + meta grouped in
   one .grow block (first column), the add/remove toggle as a compact
   button in the second. The toggle opts out of the shared .item row
   span — with a definite grid row the browser places the button
   BEFORE the text block and stretches it across the wide column. */
.library .item .grow { min-width: 0; }
.library .item button { grid-row: auto; white-space: nowrap; }
.library .item.added { border-color: var(--coral, #ff6b4a); }
.library .meta .chip { margin-right: 6px; }
@media (max-width: 520px) {
  .segment { margin-left: 74px; }
  .stop { grid-template-columns: 74px minmax(0, 1fr); }
  .library { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 85vh; }
}
/* One mint action per view: "＋ Add". Everything else is a quiet white button
   (the shared tool palette would otherwise fill every button with mint). */
body:not([data-page]) main button.secondary { background: var(--surface, #fff); color: var(--text, #16233f); border: 1px solid var(--line, #e5e0d5); border-radius: 12px; }
body:not([data-page]) main button.secondary:disabled { color: var(--muted, #5a6a86); cursor: not-allowed; }
body:not([data-page]) main #add-open { border-radius: 12px; }
