@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: oklch(0.97 0.008 95);
  --surface: oklch(0.99 0.005 95);
  --panel: oklch(0.953 0.009 100);
  --ink: oklch(0.28 0.025 155);
  --muted: oklch(0.49 0.018 150);
  --faint: oklch(0.52 0.018 145);
  --line: oklch(0.88 0.013 105);
  --line-strong: oklch(0.77 0.018 130);
  --green: oklch(0.37 0.047 154);
  --green-hover: oklch(0.43 0.049 154);
  --selected: oklch(0.91 0.026 145);
  --clay: oklch(0.51 0.09 44);
  --clay-soft: oklch(0.94 0.025 55);
  --focus: oklch(0.43 0.075 152);
  --radius: 6px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; }
body { height: 100vh; height: 100dvh; overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button, select { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
button { min-height: 32px; padding: 6px 10px; line-height: 1.3; transition: background-color 160ms var(--ease), color 160ms var(--ease), opacity 160ms var(--ease); }
button:hover { background: var(--panel); }
button:active { background: var(--selected); }
button:disabled { cursor: not-allowed; color: var(--faint); opacity: 0.52; }
button[aria-busy="true"] { cursor: progress; opacity: 0.7; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button[aria-pressed="true"], button.is-active, button[aria-selected="true"] { color: var(--green); background: var(--selected); }
button svg, a svg { flex: 0 0 auto; width: 18px; height: 18px; }
button svg { vertical-align: middle; }
button > svg + span { margin-left: 5px; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
svg { display: inline-block; }
input[type="checkbox"] { accent-color: var(--green); }
select { min-height: 32px; padding: 5px 26px 5px 9px; color: var(--ink); }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, h1, h2, h3, p, dd, code { overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 12px; transform: translateY(-150%); padding: 10px 14px; border-radius: var(--radius); background: var(--green); color: var(--surface); font-size: 12px; }
.skip-link:focus { transform: translateY(0); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.app-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; height: 100%; max-width: 2048px; margin: 0 auto; }
.masthead { display: flex; align-items: center; min-height: 58px; gap: 20px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 650; letter-spacing: -0.65px; }
.brand svg { width: 24px; height: 24px; }
.masthead-caption { margin-left: 5px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0.02em; }
.prototype-badge { margin-right: 4px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 12px; letter-spacing: 0.02em; }
.header-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.header-actions button { background: transparent; border-color: transparent; font-size: 12px; }
.header-actions button:hover { background: var(--panel); border-color: var(--line); }
.header-actions button[aria-expanded="true"] { color: var(--green); background: var(--selected); }
.prototype-versions { display:flex; align-items:center; gap:4px; font-size:12px; white-space:nowrap; }
.prototype-versions a,.prototype-versions>span { display:inline-flex; align-items:center; min-height:44px; padding:8px; text-decoration:none; border-radius:5px; }
.prototype-versions>span { color:var(--muted); }
.prototype-versions a:hover { background:var(--selected); }
@media(max-width:1100px) {
  .masthead { flex-wrap:wrap; gap:0 12px; }
  .prototype-versions { order:3; flex-basis:100%; border-top:1px solid var(--line); justify-content:center; }
}

.story-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 20px 28px 21px; }
.story-heading { min-width: 0; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: 0.04em; }
.story-heading h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.7px; line-height: 1.3; }
.story-heading p { max-width: 72ch; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.story-meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding-bottom: 2px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.story-meta span + span { padding-left: 12px; border-left: 1px solid var(--line); }
.story-meta strong { color: var(--ink); font-weight: 550; }

.main-grid { display: grid; grid-template-columns: 228px minmax(0, 1fr) 320px; min-height: 0; margin: 0 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.inputs-panel, .workspace, .inspector { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.inputs-panel { background: var(--panel); border-right: 1px solid var(--line); }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 18px 17px 13px; }
.panel-heading h2, .panel-heading h3 { font-size: 13px; font-weight: 600; }
.panel-heading span, .panel-heading small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.input-tabs { display: flex; gap: 3px; margin: 0 13px 12px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.input-tabs button { flex: 1; min-width: 0; min-height: 28px; padding: 5px 4px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.input-tabs button[aria-selected="true"], .input-tabs button.is-active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px oklch(0.28 0.025 155 / 0.05); }
.event-list { padding: 0 17px 14px; }
.event-item { padding: 13px 0 15px; border-top: 1px solid var(--line); }
.event-item:first-child { border-top: 0; padding-top: 6px; }
.event-meta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.event-meta .event-from { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-meta strong { color: var(--ink); font-weight: 550; }
.event-meta time { font-family: var(--mono); font-size: 12px; }
.event-text { font-size: 12px; line-height: 1.8; }
.event-text + .event-text { margin-top: 7px; }
.event-verdict { display: flex; align-items: baseline; gap: 5px; margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.event-verdict strong { font-weight: 550; color: var(--green); }
.event-verdict[data-result="ignored"], .event-item.is-muted { color: var(--muted); }
.event-item.is-muted .event-text { color: var(--muted); }
.event-item.is-current { color: var(--ink); }
.event-open { display: block; width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 2px; background: transparent; text-align: left; }
.event-open:hover, .event-open:active { background: transparent; }
.event-open:hover .event-text, .event-item.is-selected .event-text { color: var(--green); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.event-open .event-text { display: block; }
.channel-tag { padding: 2px 4px; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; }
.verdict-tag { flex-shrink: 0; color: var(--ink); font-size: 12px; font-weight: 600; }
.event-item[data-verdict="noise"] .verdict-tag, .event-item[data-verdict="duplicate"] .verdict-tag, .event-item[data-verdict="deferred"] .verdict-tag { color: var(--muted); font-weight: 500; }
.event-item[data-verdict="noise"] .event-text, .event-item[data-verdict="duplicate"] .event-text { color: var(--muted); }
/* Feedback answers and due reminders: the loop is the point, so it reads as one line. */
.event-loop { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; padding: 8px 9px; border-radius: 5px; background: var(--surface); font-size: 12px; line-height: 1.6; }
.loop-tag { color: var(--ink); font-weight: 600; white-space: nowrap; }
.loop-body { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.loop-target { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--green); font-size: 12px; font-weight: 550; text-align: left; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.loop-target:hover { background: transparent; text-decoration-color: currentColor; }
span.loop-target { color: var(--ink); text-decoration: none; }
.loop-action { color: var(--ink); }
.loop-prompt { color: var(--muted); }
.event-links { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.event-links button { min-height: 23px; padding: 3px 5px; border: 0; background: oklch(0.99 0.005 95 / 0.7); color: var(--muted); font-size: 12px; text-align: left; }
.event-links button:hover { color: var(--green); background: var(--surface); }
.input-footnote { margin: 5px 17px 19px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.8; }
.event-empty { padding: 16px 0; color: var(--muted); font-size: 12px; line-height: 1.8; }

.workspace { padding: 15px 24px 24px; }
.workspace-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; min-height: 30px; margin-bottom: 18px; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; font-size: 12px; color: var(--muted); }
.breadcrumbs button { min-height: 26px; padding: 4px 5px; background: transparent; border: 0; color: var(--muted); font-size: 12px; }
.breadcrumbs button:hover { color: var(--green); background: var(--panel); }
.breadcrumbs [aria-current="page"], .breadcrumbs > span:last-child { color: var(--ink); }
.breadcrumbs .separator { color: var(--faint); }
.view-actions { display: flex; align-items: center; flex-shrink: 0; gap: 5px; }
.view-actions button { min-height: 28px; padding: 5px 8px; font-size: 12px; }
.view-actions button[aria-pressed="true"] { border-color: oklch(0.78 0.045 150); }
.view-actions #slow-motion[aria-pressed="true"] { color: var(--green); background: oklch(0.9 0.026 145); }
.breadcrumbs .rise-button { color: var(--green); font-size: 16px; min-width: 28px; }
.frame-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 10px; margin-bottom: 13px; }
.frame-date { flex: 0 0 100%; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.frame-heading h2 { min-width: 0; font-size: 20px; line-height: 1.4; font-weight: 600; letter-spacing: -0.45px; }
.frame-heading > div { flex: 1; min-width: 0; }
.frame-heading .frame-date { margin-bottom: 5px; }
.revision-tag { margin-left: auto; padding: 3px 0 3px 7px; color: var(--faint); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.signal-note { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); font-size: 12px; line-height: 1.6; }
.signal-kind { color: var(--ink); font-weight: 600; }
.signal-facts { min-width: 0; }
.signal-result { margin-left: auto; color: var(--ink); font-weight: 550; }
.signal-result.is-adjusted { color: var(--clay); }
.agent-note { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 10px; padding: 11px 0 14px; margin-bottom: 15px; border-bottom: 1px solid var(--line); }
.note-label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
.agent-note p { max-width: 72ch; color: var(--muted); font-size: 12px; line-height: 1.7; }
.compare-controls { display: flex; align-items: center; gap: 8px; margin: 2px 0 17px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.picker-field { display: flex; flex: 1; align-items: center; gap: 6px; min-width: 0; }
.picker-caption { flex-shrink: 0; }
.picker-arrow { flex-shrink: 0; color: var(--faint); }
.picker { position: relative; flex: 1; min-width: 0; }
.picker-button { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; min-height: 32px; padding: 5px 9px; text-align: left; font-size: 12px; }
.picker-button[aria-expanded="true"] { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.picker-meta { flex-shrink: 0; color: var(--muted); font-family: var(--mono); }
.picker-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.picker-caret { flex-shrink: 0; width: 7px; height: 7px; margin: -3px 2px 0; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.picker-button[aria-expanded="true"] .picker-caret { margin-top: 3px; transform: rotate(-135deg); }
.picker-list { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: max(100%, 340px); max-width: calc(100vw - 32px); max-height: min(360px, 52vh); padding: 4px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); box-shadow: 0 10px 28px oklch(0.28 0.025 155 / 0.14); }
.picker-list:focus { outline: none; }
.picker-list:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#target-picker .picker-list { right: 0; left: auto; }
.picker-list [role="option"] { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 7px 8px; border-radius: 4px; color: var(--ink); font-size: 12px; line-height: 1.5; cursor: pointer; }
.picker-list [role="option"].is-active { background: var(--panel); }
.picker-list [role="option"][aria-selected="true"] { color: var(--green); background: var(--selected); font-weight: 550; }
.option-meta { color: var(--muted); font-family: var(--mono); }
.compare-controls > button { flex-shrink: 0; min-height: 25px; padding: 3px 6px; border: 0; background: transparent; font-size: 17px; }
.board-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.board-heading h3, .board-heading strong { color: var(--ink); font-size: 12px; font-weight: 550; }
.board-heading .budget, .board-heading .budget-readout { font-family: var(--mono); font-size: 12px; }
.boards-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.boards-wrap.is-comparing { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.board-column { min-width: 0; }
.board-label { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; min-height: 24px; padding: 0 1px 8px; color: var(--muted); font-size: 12px; }
.board-label strong { color: var(--ink); font-weight: 550; }
.board-label time { font-family: var(--mono); font-size: 12px; }

/* Tile geometry comes exclusively from the state renderer. No gap or minimum area. */
.pinboard { position: relative; width: 100%; height: clamp(260px, calc(100dvh - 590px), 540px); padding: 0; background: var(--panel); outline: 1px solid var(--line); overflow: hidden; isolation: isolate; }
/* A tile is a colour shape plus a text body (variants/spatial-kit.mjs): the shape moves and scales,
   the body keeps its final layout and is only translated and clipped, so glyphs never stretch. */
.pin-tile { --tile-bg: oklch(0.89 0.028 145); --tile-edge: oklch(0.62 0.024 135 / 0.25); position: absolute; min-width: 0; min-height: 0; margin: 0; padding: 0; }
.pin-tile > .flip-shape { position: absolute; inset: 0; overflow: hidden; transform-origin: 0 0; background: var(--tile-bg); box-shadow: inset 0 0 0 0.5px var(--tile-edge); transition: background-color 180ms var(--ease), box-shadow 180ms var(--ease); }
.pin-tile .flip-body, .pin-tile .flip-ghost { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; transform-origin: 0 0; }
.pin-tile .flip-ghost { pointer-events: none; }
.pinboard.is-moving .pin-tile > .flip-shape, .pinboard.is-moving .pin-tile .flip-body, .pinboard.is-moving .pin-tile .flip-ghost { will-change: transform; }
.pin-tile.is-leaving { z-index: -1; pointer-events: none; }
.pin-tile[data-color="sage"] { --tile-bg: oklch(0.85 0.040 145); }
.pin-tile[data-color="blue"] { --tile-bg: oklch(0.88 0.026 230); }
.pin-tile[data-color="sand"] { --tile-bg: oklch(0.91 0.043 84); }
.pin-tile[data-color="clay"] { --tile-bg: oklch(0.88 0.044 49); }
.pin-tile[data-color="lilac"] { --tile-bg: oklch(0.89 0.029 310); }
.pin-tile[data-color="mint"] { --tile-bg: oklch(0.90 0.031 175); }
.pin-tile.is-selected { z-index: 2; }
.pin-tile.is-selected > .flip-shape { box-shadow: inset 0 0 0 2px var(--green); }
.pin-tile.is-changed > .flip-shape { box-shadow: inset 0 0 0 1.5px oklch(0.51 0.09 44 / 0.72); }
.pin-tile.is-selected.is-changed > .flip-shape { box-shadow: inset 0 0 0 2px var(--green); }
.pin-tile.is-selected.is-changed { outline-color: var(--green); }
.tile-button { display: flex; flex-direction: column; align-items: stretch; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 13px 14px 11px; border: 0; border-radius: 0; background: transparent; text-align: left; overflow: hidden; }
.tile-button > * { flex-shrink: 0; }
.pin-tile [data-fit~="no-dive"] .dive-button { display: none; }
.pin-tile .is-tiny .tile-button > h3 { flex-shrink: 1; }
.pin-tile [data-fit~="compact-label"] .tile-ask { font-size: 0; }
.pin-tile [data-fit~="compact-label"] .tile-kind-after, .pin-tile [data-fit~="compact-label"] .tile-share small { display: none; }
.pin-tile [data-fit~="sliver"] .tile-button > * { visibility: hidden; }
.pin-tile [data-fit~="sliver"] .dive-button { display: none; }
.tile-button:hover { background: oklch(0.99 0.005 95 / 0.14); }
.tile-button:active { background: oklch(0.28 0.025 155 / 0.05); }
.tile-button:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
.tile-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-width: 0; margin-bottom: 11px; color: oklch(0.37 0.03 150); font-size: 12px; }
.tile-label { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; }
.tile-kind, .tile-kind-after { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-kind-after { opacity: 0.8; }
/* One meaning only: a dark dot marks an output that registered a way to answer. */
.tile-ask { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; color: var(--ink); font-weight: 600; white-space: nowrap; }
.tile-ask::before, .legend-ask { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); content: ""; }
.tile-prompt { margin-top: 7px; color: var(--ink); font-size: 13px; font-weight: 500; line-height: 1.55; }
.tile-share { flex-shrink: 0; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.tile-share small { font-size: 12px; opacity: 0.6; }
.pin-tile h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.45; letter-spacing: -0.2px; }
.tile-summary { margin-top: 7px; font-size: 12px; line-height: 1.7; color: oklch(0.37 0.025 155); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.tile-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; min-height: 20px; padding-top: 10px; margin-top: auto; color: oklch(0.43 0.025 155); font-size: 12px; }
.tile-id { min-width: 0; font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dive-button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; min-height: 23px; padding: 3px 5px; border: 1px solid oklch(0.45 0.025 155 / 0.22); border-radius: 4px; background: oklch(0.99 0.005 95 / 0.20); color: var(--ink); font-size: 12px; white-space: nowrap; }
.dive-button:hover { background: oklch(0.99 0.005 95 / 0.40); }
.pin-tile .dive-button { position: absolute; z-index: 3; right: 10px; bottom: 8px; }
.change-label { color: var(--clay); font-weight: 550; }
.pin-tile .is-small .dive-button { right: 6px; bottom: 5px; min-height: 20px; padding: 2px 4px; }
.pin-tile .is-small .tile-button { padding: 8px 10px; }
.pin-tile .is-small .tile-top { margin-bottom: 5px; font-size: 12px; }
.pin-tile .is-small h3 { font-size: 12px; line-height: 1.5; }
.pin-tile .is-small .tile-summary { display: none; }
.pin-tile .is-small .tile-prompt { margin-top: 4px; font-size: 12px; }
.pin-tile .is-narrow .tile-button { padding: 7px 7px 6px; }
.pin-tile .is-narrow .tile-top { margin-bottom: 4px; }
.pin-tile .is-narrow .tile-kind, .pin-tile .is-narrow .tile-kind-after, .pin-tile .is-narrow .tile-summary, .pin-tile .is-narrow .tile-prompt, .pin-tile .is-narrow .tile-share small { display: none; }
.pin-tile .is-narrow .tile-ask { font-size: 0; }
.pin-tile .is-narrow h3 { font-size: 12px; line-height: 1.45; }
.pin-tile .is-narrow .dive-button { right: 4px; bottom: 4px; }
.pin-tile .is-small .tile-footer { padding-top: 5px; }
.pin-tile .is-tiny .tile-button { flex-direction: row; align-items: center; gap: 5px; padding: 3px 5px; }
.pin-tile .is-tiny .tile-top { order: 2; flex-shrink: 0; margin: 0 0 0 auto; }
.pin-tile .is-tiny h3 { min-width: 0; font-size: 12px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-tile .is-tiny .tile-top { gap: 4px; }
.pin-tile .is-tiny .tile-kind, .pin-tile .is-tiny .tile-kind-after, .pin-tile .is-tiny .tile-summary, .pin-tile .is-tiny .tile-prompt, .pin-tile .is-tiny .tile-footer { display: none; }
.pin-tile .is-tiny .tile-ask { font-size: 0; }

.pin-tile .is-tiny .tile-share { font-size: 12px; }
.pin-tile .is-tiny .dive-button, .pin-tile .is-tiny .tile-share small { display: none; }
.pin-tile.is-blank { --tile-bg: oklch(0.955 0.007 110); --tile-edge: oklch(0.62 0.024 135 / 0.12); }
.pin-tile.is-blank .blank-body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 100%; padding: 8px; color: var(--muted); text-align: center; }
.pin-tile.is-blank .blank-label, .pin-tile.is-blank strong { font-size: 12px; font-weight: 450; }
.pin-tile.is-blank .blank-share, .pin-tile.is-blank span { font-size: 12px; font-family: var(--mono); }
.pin-tile.is-blank p { font-size: 12px; line-height: 1.6; }
.pin-tile.is-blank .blank-body > strong { font-family: var(--mono); font-size: 17px; font-weight: 400; }
.pin-tile.is-blank small { margin-top: 1px; font-size: 12px; }
.board-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.board-legend span { display: inline-flex; align-items: center; gap: 5px; }
.board-legend i, .legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--line-strong); }
.board-legend .legend-ask { display: inline-block; border-radius: 50%; background: var(--ink); }
.board-legend .legend-changed { width: 9px; height: 9px; border-radius: 2px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--clay); }
.board-legend .legend-area { background: oklch(0.76 0.04 145); }
.board-legend .legend-blank { border: 1px solid var(--line-strong); background: var(--panel); }
.diff-summary { padding: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.diff-list { border-top: 1px solid var(--line); }
.diff-entry { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.7; }
.diff-type { flex: 0 0 auto; color: var(--clay); font-size: 12px; }
.diff-values { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.diff-summary .panel-heading { padding: 5px 0 10px; }
.diff-summary .panel-heading button { min-height: 24px; padding: 3px 6px; font-size: 12px; }
.diff-entry { width: 100%; border-top: 0; border-right: 0; border-left: 0; border-radius: 0; background: transparent; text-align: left; }
.diff-entry strong { font-weight: 550; }
.diff-entry .mono { flex-shrink: 0; font-size: 12px; }
.diff-caption { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.inspector { border-left: 1px solid var(--line); background: var(--surface); }
.inspector-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 17px 20px 10px; color: var(--muted); font-size: 12px; }
.inspector-top button { min-height: 26px; padding: 4px 6px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.inspector > h2, .inspector-top + h2 { padding: 0 20px 15px; font-size: 16px; line-height: 1.5; font-weight: 600; }
.detail-tabs { display: flex; gap: 13px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.detail-tabs button { position: relative; min-height: 34px; padding: 6px 0 9px; border: 0; border-radius: 0; color: var(--muted); background: transparent; font-size: 12px; white-space: nowrap; }
.detail-tabs button:hover { color: var(--ink); }
.detail-tabs button.is-active, .detail-tabs button[aria-selected="true"] { color: var(--ink); background: transparent; box-shadow: inset 0 -2px var(--green); }
.inspector-body { padding: 18px 20px 24px; }
.inspector-top .eyebrow { margin: 0; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0.035em; }
.detail-status { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; margin-bottom: 13px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.kind-badge { padding: 3px 5px; border-radius: 3px; background: var(--selected); color: var(--green); }
.detail-summary { margin-bottom: 18px; font-size: 12px; line-height: 1.9; }
.detail-note { margin-top: 20px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.text-button { min-height: 27px; padding: 4px 0; border: 0; background: transparent; color: var(--green); font-size: 12px; }
.text-button:hover { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.message-quote { margin: 0 0 21px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); font-size: 13px; line-height: 1.85; }
.detail-section + .detail-section { margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--line); }
.detail-section h3 { margin-bottom: 9px; color: var(--muted); font-size: 12px; font-weight: 550; letter-spacing: 0.03em; }
.detail-section p { max-width: 72ch; font-size: 12px; line-height: 1.85; }
.detail-section p + p { margin-top: 9px; }
.detail-section dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px 18px; margin: 0; font-size: 12px; line-height: 1.6; }
.detail-section dt { color: var(--muted); }
.detail-section dd { margin: 0; text-align: right; }
.detail-section code, .inspector .mono { font-family: var(--mono); font-size: 12px; }
.stat-pair { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin-top: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 12px; }
.stat-pair span { color: var(--muted); }
.stat-pair strong { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.stat-pair { justify-content: flex-start; gap: 22px; margin: 0 0 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stat-pair > div { display: flex; flex: 1; flex-direction: column; gap: 6px; }
.stat-pair strong { font-size: 19px; line-height: 1.3; }
.stat-pair strong small { margin-left: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.stat-pair .weight-value { font-family: inherit; font-size: 14px; }
.detail-section .detail-times { display: block; }
.detail-times > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.source-list li { padding: 8px 0; font-size: 12px; line-height: 1.75; }
.source-list li + li { border-top: 1px solid var(--line); }
.source-list small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.source-item { padding: 10px 0; }
.source-item + .source-item { border-top: 1px solid var(--line); }
.source-item p { font-size: 12px; }
.source-item a { display: inline-block; margin-top: 5px; font-size: 12px; }
.annotation-item { padding: 11px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); }
.annotation-item + .annotation-item { margin-top: 8px; }
.annotation-item p { font-size: 12px; }
.annotation-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; margin-top: 7px; color: var(--muted); font-size: 12px; }
.annotation-item small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.annotation-item > div { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.annotation-item > div strong { color: var(--ink); font-weight: 550; }
.history-row { padding: 10px 0; font-size: 12px; line-height: 1.8; }
.history-row + .history-row { border-top: 1px solid var(--line); }
.history-row time, .history-row small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.history-row button { margin-top: 5px; min-height: 25px; font-size: 12px; }
.history-row { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.history-row + .history-row { border-top: 0; }
.child-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; font-size: 12px; }
.child-row:hover { background: var(--paper); }
.child-row span:last-child { flex-shrink: 0; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.child-row { padding: 0; }
.child-row > button { display: flex; flex: 1; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; padding: 11px 0; border: 0; border-radius: 0; background: transparent; text-align: left; font-size: 12px; }
.child-row > button span { font-family: inherit; font-size: 12px; color: var(--ink); }
.child-row > button small { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.child-row > button + button { flex: 0 0 24px; justify-content: center; }
.detail-section details > summary { cursor: pointer; color: var(--muted); font-size: 12px; line-height: 1.8; }
.detail-section details > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.field-change { font-size: 12px; line-height: 1.7; }
.field-change + .field-change { margin-top: 13px; }
.field-change > strong { margin-right: 9px; color: var(--clay); font-size: 12px; font-weight: 500; }
.field-change > span { color: var(--muted); font-size: 12px; }
.empty-detail { padding: 15px 0; color: var(--muted); font-size: 12px; line-height: 1.85; }
.empty-detail h3 { margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 550; }
.before-after { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.before-after > div { min-width: 0; }
.before-after h3, .before-after h4 { margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 550; }
.before-after p { font-size: 12px; line-height: 1.75; }
.before-after small { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.json-view { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--ink); font-family: var(--mono); font-size: 12px; line-height: 1.8; overflow-x: auto; tab-size: 2; white-space: pre; }
.json-view code { font: inherit; overflow-wrap: normal; }
.json-actions { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 10px; }
.json-actions button { min-height: 26px; font-size: 12px; }
.json-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.json-heading button { min-height: 24px; padding: 3px 5px; font-size: 12px; }
.json-key { color: oklch(0.42 0.05 230); }
.json-string { color: oklch(0.40 0.055 145); }
.json-number, .json-literal { color: oklch(0.45 0.07 300); }

.transport { padding: 17px 28px 0; background: var(--paper); }
.transport-main { display: flex; align-items: center; gap: 18px; }
.playback-controls { display: flex; align-items: center; gap: 7px; }
.playback-controls button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 6px; border-color: transparent; background: transparent; }
.playback-controls button:hover { border-color: var(--line); background: var(--surface); }
.playback-controls .play-button, .playback-controls button[data-action="play"], .playback-controls #play-toggle { width: auto; min-width: 72px; height: 34px; padding-right: 11px; padding-left: 11px; border-color: var(--green); background: var(--green); color: var(--surface); font-size: 12px; }
.playback-controls .play-button:hover, .playback-controls button[data-action="play"]:hover, .playback-controls #play-toggle:hover { background: var(--green-hover); }
.time-readout { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; min-width: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.time-readout strong { font-weight: 550; white-space: nowrap; }
.time-readout span { white-space: nowrap; }
.time-readout span, .time-readout small { color: var(--muted); font-size: 12px; }
.playback-options { display: flex; align-items: center; gap: 12px; margin-left: auto; color: var(--muted); font-size: 12px; }
.playback-options label { display: inline-flex; align-items: center; gap: 5px; }
.speed-control { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.speed-control button { min-width: 38px; min-height: 26px; padding: 3px 7px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.speed-control button:hover { color: var(--ink); background: var(--panel); }
.speed-control button[aria-checked="true"] { color: var(--surface); background: var(--ink); }
.playback-options button { min-height: 28px; background: transparent; font-size: 12px; }
.timeline-track { position: relative; margin: 10px 4px 0; }
/* Drawn scrubber: frame ticks sit on the rail, the thumb marks now, past is ink. */
.time-slider { position: relative; height: 28px; cursor: pointer; touch-action: none; border-radius: 4px; --progress: 0%; }
.time-slider:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.slider-rail { position: absolute; top: 13px; right: 0; left: 0; height: 2px; border-radius: 1px; background: var(--line-strong); }
.slider-fill { position: absolute; top: 0; bottom: 0; left: 0; width: var(--progress); border-radius: 1px; background: var(--ink); opacity: 0.55; }
.timeline-markers { position: absolute; inset: 0; pointer-events: none; }
.timeline-marker { position: absolute; top: 1px; width: 6px; height: 6px; transform: translate(-50%, -50%); border: 1px solid var(--paper); border-radius: 50%; background: var(--line-strong); box-sizing: content-box; }
.timeline-marker.is-past { background: var(--muted); }
.timeline-marker.is-review { width: 4px; height: 4px; border: 1.5px solid var(--muted); background: var(--paper); }
.timeline-marker.is-current { opacity: 0; }
.slider-thumb { position: absolute; top: 6px; left: var(--progress); width: 12px; height: 16px; transform: translateX(-50%); border: 2px solid var(--paper); border-radius: 4px; background: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 1px 3px oklch(0.28 0.025 155 / 0.18); pointer-events: none; }
.time-slider:hover .slider-thumb, .time-slider:focus-visible .slider-thumb { box-shadow: 0 0 0 1px var(--ink), 0 0 0 5px oklch(0.28 0.025 155 / 0.10); }
.slider-hover { position: absolute; z-index: 6; bottom: 30px; left: 0; width: max-content; max-width: min(320px, 80vw); transform: translateX(-50%); padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: 12px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 4px 12px oklch(0.28 0.025 155 / 0.10); pointer-events: none; }
.day-labels { position: relative; display: flex; align-items: center; justify-content: space-between; height: 23px; margin: 1px 4px 0; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.day-labels > span[style] { position: absolute; transform: translateX(-50%); }
.day-labels > span:first-child { transform: none; }
.day-labels > span:last-child { transform: translateX(-100%); }
.chapter-list { display: flex; gap: 5px 13px; padding: 7px 0 10px; overflow-x: auto; }
.chapter-button { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; min-height: 28px; padding: 5px 7px; border-color: transparent; background: transparent; color: var(--muted); font-size: 12px; white-space: nowrap; }
.chapter-button:hover { background: var(--panel); }
.chapter-button.is-active, .chapter-button[aria-current="true"] { background: var(--selected); color: var(--green); }
.chapter-button span:first-child { font-family: var(--mono); font-size: 12px; opacity: 0.8; }
.prototype-note { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3px 15px; padding: 4px 28px 9px; color: var(--faint); font-size: 12px; line-height: 1.6; }

.story-drawer { position: absolute; z-index: 20; top: 55px; right: 28px; width: min(500px, calc(100vw - 40px)); max-height: calc(100dvh - 100px); padding: 24px 26px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: 0 14px 40px oklch(0.28 0.025 155 / 0.12); }
.story-drawer h2 { margin-bottom: 14px; font-size: 19px; font-weight: 600; letter-spacing: -0.3px; }
.story-drawer h3 { margin: 22px 0 9px; font-size: 13px; font-weight: 600; }
.story-drawer p, .story-drawer li { max-width: 72ch; color: var(--muted); font-size: 12px; line-height: 1.9; }
.story-drawer p + p { margin-top: 10px; }
.story-drawer ul { margin-top: 10px; padding-left: 17px; list-style: disc; }
.story-drawer button { margin-top: 17px; font-size: 12px; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 170px; transform: translateX(-50%); max-width: min(440px, calc(100vw - 32px)); padding: 10px 15px; border: 1px solid var(--green); border-radius: 6px; background: var(--green); color: var(--surface); font-size: 12px; line-height: 1.65; box-shadow: 0 5px 16px oklch(0.28 0.025 155 / 0.12); }

@media (min-width: 1680px) {
  .main-grid { grid-template-columns: 248px minmax(0, 1fr) 340px; }
  .workspace { padding-right: 32px; padding-left: 32px; }
  .tile-button { padding: 17px 19px 15px; }
}

@media (max-width: 1200px) {
  .masthead { padding-right: 20px; padding-left: 20px; }
  .story-header { padding: 16px 20px 18px; }
  .main-grid { grid-template-columns: 192px minmax(0, 1fr) 276px; margin: 0 20px; }
  .workspace { padding: 13px 17px 20px; }
  .workspace-toolbar { gap: 6px; margin-bottom: 15px; }
  .inspector-top, .inspector > h2, .inspector-top + h2, .detail-tabs, .inspector-body { padding-right: 16px; padding-left: 16px; }
  .detail-tabs { gap: 11px; }
  .tile-button { padding: 10px 11px; }
  .tile-summary { font-size: 12px; -webkit-line-clamp: 3; }
  .pin-tile h3 { font-size: 14px; }
  .transport { padding-right: 20px; padding-left: 20px; }
  .prototype-note { padding-right: 20px; padding-left: 20px; }
  .story-meta { gap: 8px; }
  .story-meta span + span { padding-left: 8px; }
}

@media (max-width: 999px) and (min-width: 760px) {
  .main-grid { grid-template-columns: minmax(0, 1fr) 276px; grid-template-rows: minmax(0, 1fr) 146px; }
  .inputs-panel { display: grid; grid-template-columns: 134px minmax(0, 1fr); grid-template-rows: 40px minmax(0, 1fr); grid-column: 1 / -1; grid-row: 2; border-top: 1px solid var(--line); border-right: 0; overflow: hidden; }
  .inputs-panel .panel-heading { grid-column: 1; grid-row: 1; padding: 14px 12px 6px; }
  .inputs-panel .input-tabs { grid-column: 1; grid-row: 2; flex-direction: column; align-self: start; gap: 1px; margin: 3px 10px 7px; padding: 8px; }
  .inputs-panel .input-tabs button { min-height: 22px; padding: 3px; font-size: 12px; }
  .inputs-panel .event-list { display: flex; grid-column: 2; grid-row: 1 / -1; gap: 18px; padding: 11px 16px 10px 12px; overflow-x: auto; }
  .inputs-panel .event-item { flex: 0 0 260px; overflow-y: auto; padding: 0 12px 0 0; border-top: 0; border-right: 1px solid var(--line); }
  .inputs-panel .event-item:last-child { border-right: 0; }
  .inputs-panel .event-text { font-size: 12px; }
  .inputs-panel .input-footnote { display: none; }
  .workspace { grid-column: 1; grid-row: 1; padding-right: 20px; padding-left: 20px; }
  .inspector { grid-column: 2; grid-row: 1; }
  .story-meta { display: none; }
}

@media (max-width: 759px) {
  html, body { min-width: 320px; }
  body { height: auto; min-height: 100dvh; overflow-y: auto; overflow-x: hidden; }
  .app-shell { display: flex; flex-direction: column; min-height: 100dvh; height: auto; }
  .masthead { min-height: 54px; gap: 12px; padding: 0 16px; }
  .brand { font-size: 19px; }
  .masthead-caption { font-size: 12px; }
  .header-actions { gap: 3px; }
  .header-actions button { min-height: 32px; padding: 6px; font-size: 12px; }
  .story-header { padding: 20px 16px 19px; }
  .story-heading h1 { font-size: 21px; letter-spacing: -0.5px; }
  .story-heading p { font-size: 12px; line-height: 1.75; }
  .story-meta { display: none; }
  .main-grid { display: flex; flex-direction: column; min-height: 0; margin: 0 12px; overflow: visible; border-radius: 6px; }
  .workspace, .inspector, .inputs-panel { min-height: auto; overflow: visible; overscroll-behavior: auto; }
  .workspace { order: 1; padding: 14px 15px 23px; }
  .workspace-toolbar { gap: 7px; margin-bottom: 18px; }
  .view-actions { gap: 4px; }
  .view-actions button { min-height: 30px; padding: 5px 7px; font-size: 12px; }
  .breadcrumbs { font-size: 12px; }
  .frame-heading h2 { font-size: 19px; }
  .revision-tag { font-size: 12px; }
  .agent-note { column-gap: 8px; padding-top: 5px; }
  .agent-note p { font-size: 12px; }
  .pinboard { height: clamp(300px, 48vh, 430px); }
  .boards-wrap.is-comparing { gap: 8px; }
  .boards-wrap.is-comparing .tile-button { padding: 7px; }
  .boards-wrap.is-comparing .tile-top { margin-bottom: 5px; }
  .boards-wrap.is-comparing .pin-tile h3 { font-size: 12px; }
  .boards-wrap.is-comparing .tile-summary { font-size: 12px; -webkit-line-clamp: 3; }
  .boards-wrap.is-comparing .tile-id { display: none; }
  .boards-wrap.is-comparing .tile-kind { font-size: 12px; }
  .boards-wrap.is-comparing .tile-share { font-size: 12px; }
  .boards-wrap.is-comparing .is-small .tile-kind { display: none; }
  .board-label { align-items: flex-start; flex-direction: column; gap: 3px; min-height: 36px; padding-bottom: 6px; }
  .tile-button { padding: 10px 11px; }
  .pin-tile h3 { font-size: 14px; }
  .tile-summary { font-size: 12px; }
  .tile-footer { padding-top: 8px; }
  .inspector { order: 2; border-top: 1px solid var(--line); border-left: 0; }
  .inspector-top { padding-top: 16px; }
  .inspector-body { padding: 18px 18px 25px; }
  .detail-section dl { max-width: 500px; }
  .detail-tabs { gap: 23px; }
  .detail-tabs button { min-height: 39px; font-size: 12px; }
  .inputs-panel { order: 3; border-top: 1px solid var(--line); border-right: 0; border-radius: 0 0 5px 5px; }
  .panel-heading { padding: 17px 18px 12px; }
  .input-tabs { margin-right: 18px; margin-left: 18px; }
  .input-tabs button { min-height: 31px; }
  .event-list { padding-right: 18px; padding-left: 18px; }
  .event-meta { font-size: 12px; }
  .event-text { max-width: 72ch; }
  .transport { position: sticky; z-index: 10; bottom: 0; margin-top: 16px; padding: 10px 16px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line-strong); box-shadow: 0 -5px 18px oklch(0.28 0.025 155 / 0.035); }
  .transport-main { flex-wrap: wrap; gap: 5px 12px; }
  .playback-controls { gap: 3px; }
  .playback-controls button { width: 30px; height: 32px; }
  .playback-controls .play-button, .playback-controls button[data-action="play"], .playback-controls #play-toggle { width: auto; min-width: 61px; height: 32px; padding-right: 8px; padding-left: 8px; font-size: 12px; }
  .time-readout { flex: 1; gap: 2px 5px; font-size: 12px; }
  .time-readout span { font-size: 12px; }
  .playback-options { gap: 7px; font-size: 12px; }
  .playback-options label { gap: 3px; }
  .playback-options button { min-height: 28px; padding-right: 6px; padding-left: 6px; font-size: 12px; }
  .timeline-track { margin-top: 9px; }
  .day-labels { font-size: 12px; height: 19px; }
  .day-labels > span:nth-child(even):not(:last-child) { visibility: hidden; }
  .chapter-list { gap: 4px; padding: 4px 0 0; }
  .chapter-button { min-height: 27px; padding: 5px 6px; font-size: 12px; }
  .prototype-note { order: 5; padding: 9px 16px 12px; font-size: 12px; }
  .story-drawer { top: 50px; right: 12px; width: calc(100vw - 24px); padding: 22px; }
  .toast { bottom: 175px; }
  .prototype-badge { display: none; }
  .compare-controls { flex-wrap: wrap; gap: 7px; }
  .diff-entry { flex-wrap: wrap; gap: 5px 9px; }
  .diff-values { margin-left: 0; }
}

@media (max-width: 400px) {
  .masthead-caption { display: none; }
  .header-actions button { font-size: 12px; }
  .workspace { padding-right: 12px; padding-left: 12px; }
  .workspace-toolbar { flex-wrap: wrap; }
  .view-actions { margin-left: auto; }
  .agent-note { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .playback-options { flex-basis: 100%; justify-content: flex-end; }
  .transport-main { row-gap: 3px; }
  .transport { padding-right: 12px; padding-left: 12px; }
  .time-readout { font-size: 12px; }
}

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

/* Reading text stays comfortable at native scale; compact labels remain 12px. */
.event-text, .detail-summary, .detail-section p, .message-quote,
.story-drawer p, .story-drawer li, .empty-detail { font-size: 14px; line-height: 1.8; }
.agent-note p, .tile-summary, .story-heading p, .source-item p { font-size: 13px; }
.pin-tile .is-small h3 { font-size: 14px; }
.pin-tile .is-tiny h3, .pin-tile .is-tiny .tile-share { font-size: 12px; }
.detail-times, .detail-section dl { font-size: 13px; }
@media (max-width: 759px) {
  .boards-wrap.is-comparing { grid-template-columns: minmax(0, 1fr); }
  .boards-wrap.is-comparing .pin-tile h3 { font-size: 14px; }
  .boards-wrap.is-comparing .tile-summary, .agent-note p { font-size: 13px; }
  .day-labels > span { visibility: hidden; }
  .event-text, .detail-summary, .detail-section p { font-size: 14px; }
}

.pin-tile.is-blank .is-small small { display: none; }
.pin-tile.is-blank .is-small .blank-body { flex-direction: row; gap: 5px; flex-wrap: wrap; }
.story-meta small { font-size: 12px; }
@media (max-width: 759px) {
  .header-actions button, .view-actions button, .detail-tabs button,
  .input-tabs button, .item-key, .child-row > button, .text-button,
  .chapter-button { min-height: 44px; }
  .playback-controls button { min-width: 44px; min-height: 44px; }
  .playback-controls .play-button { min-width: 68px; min-height: 44px; }
  .playback-options { flex-basis: auto; margin-left: auto; }
  .playback-options #frame-count, .playback-options #restart-button { display: none; }
  .day-labels > span { visibility: hidden; }
  .day-labels > span:nth-child(4n + 1):not(:nth-last-child(2)), .day-labels > span:last-child { visibility: visible; }
}
@media (min-width: 1000px) and (max-height: 1000px) {
  .story-header { padding-top: 12px; padding-bottom: 12px; align-items: center; }
  .story-heading { display: flex; align-items: baseline; gap: 16px; }
  .story-heading > .eyebrow { display: none; }
  .story-heading h1 { font-size: 22px; }
  .story-heading p { margin: 0; font-size: 12px; }
}

.change-facts { display:block !important; margin-top:10px !important; }
.change-facts > div { display:flex; justify-content:space-between; gap:12px; padding:5px 0; }
.change-facts dt { font-size:12px; }
.change-facts dd { font-size:12px; }
.change-facts dd > span:first-child { color:var(--muted); }
.change-facts strong { color:var(--ink); font-weight:550; }

@media (min-width: 1000px) and (max-height: 900px) {
  .workspace-toolbar { margin-bottom: 10px; }
  .frame-heading { margin-bottom: 6px; }
  .agent-note { padding: 8px 0; margin-bottom: 10px; }
  .compare-controls { padding: 6px 0; margin-bottom: 10px; }
}

/* A real empty state before any authored commit; geometry still represents 64 shares. */
.cold-start-progress { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:0 0 14px; color:var(--muted); }
.cold-start-progress button { min-height:30px; padding:6px 8px; border:0; background:transparent; font-size:12px; }
.cold-start-progress button[aria-current="step"] { background:var(--selected); color:var(--green); }
.cold-start-progress > span { font-size:12px; }
.initial-input { padding:22px 0; }
.empty-input-mark { display:block; margin-bottom:16px; color:var(--muted); font-size:22px; }
.initial-input h3 { margin-bottom:10px; font-size:14px; font-weight:550; }
.initial-input p { color:var(--muted); font-size:14px; line-height:1.8; }
.pin-tile.is-initial .blank-body { padding:24px; }
.pin-tile.is-initial .blank-body > * { max-width:360px; }
.pin-tile.is-initial .empty-board-label { display:block; margin-bottom:14px; font-family:inherit; font-size:16px; color:var(--ink); }
.pin-tile.is-initial strong { display:block; font-family:var(--mono); font-size:28px; font-weight:450; }
.pin-tile.is-initial strong small { font-family:inherit; font-size:14px; }
.pin-tile.is-initial p { margin:12px 0 0; font-size:13px; line-height:1.8; }
.pin-tile.is-initial .cold-start-button { margin-top:20px; padding:9px 14px; min-height:38px; color:var(--surface); background:var(--green); border-color:var(--green); font-size:13px; }
.pin-tile.is-initial .cold-start-button:hover { background:var(--green-hover); }
@media (max-width:759px) { .cold-start-progress button { min-height:44px; } }

/* Feedback loop in the inspector: what this version asks, and the answers so far. */
.detail-status .tile-ask { font-size: 12px; }
.ask-card { padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); }
.ask-expects { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 12px; font-weight: 600; }
.ask-expects::before { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); content: ""; }
.ask-prompt { margin-top: 6px; font-size: 15px !important; font-weight: 600; line-height: 1.55 !important; }
.ask-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 6px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.ask-actions > span:first-child { margin-right: 2px; }
.ask-action { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 7px; border: 1px dashed var(--line-strong); border-radius: 4px; color: var(--ink); }
.ask-action small { color: var(--muted); font-size: 11px; }
.ask-meta { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.ask-missing { color: var(--muted); font-size: 13px !important; }
.loop-trail { margin-top: 12px; }
.loop-trail li { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; }
.loop-trail time { color: var(--muted); font-family: var(--mono); }
.loop-trail strong { display: block; font-weight: 550; }
.loop-trail span { color: var(--muted); }
.loop-trail .text-button { min-height: 0; padding: 0; white-space: nowrap; }
.loop-note { margin-top: 10px; color: var(--muted); font-size: 12px !important; line-height: 1.6 !important; }
.ask-list { display: flex; flex-direction: column; }
.ask-row { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.ask-row:first-child { padding-top: 2px; }
.ask-row:hover { background: transparent; }
.ask-row:hover strong { color: var(--green); }
.ask-row strong { font-size: 14px; font-weight: 600; line-height: 1.5; }
.ask-row small { color: var(--muted); font-size: 12px; }
@media (max-width: 759px) {
  .speed-control button { min-width: 40px; min-height: 40px; }
  .time-slider { height: 36px; }
  .slider-rail { top: 17px; }
  .slider-thumb { top: 9px; width: 14px; height: 18px; }
  .compare-controls { position: relative; padding-right: 48px; }
  .compare-controls > #close-compare { position: absolute; top: 10px; right: 0; min-width: 44px; min-height: 44px; }
  .picker-field { flex-basis: 100%; }
  .picker-arrow { display: none; }
  .picker-button { min-height: 44px; }
  .picker-list { width: 100%; }
  .signal-result { margin-left: 0; }
}

/* ===================================================================================
   2026-10 polish for real data (prototype/forms/polish/spatial.md).
   Desk scene: grasp the whole picture, read why each thing is here, approve work reviews.
   =================================================================================== */

/* Header: one line carries the brand, the versions and the story; the board gets the height. */
.masthead { min-height: 52px; gap: 16px; }
.masthead .story-heading { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex: 1; padding-left: 14px; border-left: 1px solid var(--line); }
.masthead .story-heading h1 { flex-shrink: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.3; }
.masthead .story-meta { display: block; min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.masthead .story-meta strong { color: var(--ink); font-weight: 550; }
.masthead .story-meta span { padding-left: 8px; }
.masthead .story-meta span::before { content: "·"; padding-right: 8px; color: var(--faint); }
.main-grid { grid-template-columns: 256px minmax(0, 1fr) 344px; margin-top: 12px; }
@media (max-width: 1200px) { .main-grid { grid-template-columns: 220px minmax(0, 1fr) 300px; } .masthead .story-meta { display: none; } }

/* Inputs: the person's own moves first, then one group per stream; only adopted inputs unfolded. */
.inputs-panel .panel-heading { padding: 16px 16px 4px; }
.input-window { margin: 0 16px 10px; color: var(--muted); font-size: 11.5px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.event-list { padding: 0 10px 18px; }
.event-group { margin-top: 4px; }
.group-head { position: sticky; z-index: 2; top: 0; display: flex; align-items: baseline; gap: 8px; width: 100%; min-height: 34px; padding: 8px 6px; border: 0; border-radius: 5px; background: var(--panel); text-align: left; }
.group-head:hover { background: oklch(0.93 0.012 110); }
.group-title { color: var(--ink); font-size: 12.5px; font-weight: 650; }
.group-meta { flex: 1; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.group-caret { width: 6px; height: 6px; margin: 0 2px 2px 0; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform 180ms var(--ease); }
.group-head[aria-expanded="false"] .group-caret { transform: rotate(-45deg); }
.group-body { padding: 0 2px; }
.group-more { display: block; width: 100%; min-height: 30px; margin: 4px 0 2px; padding: 6px 8px; border: 1px dashed var(--line-strong); border-radius: 5px; background: transparent; color: var(--muted); font-size: 12px; text-align: left; }
.group-more:hover { border-style: solid; color: var(--ink); background: var(--surface); }
.group-rest .event-item { opacity: 0.86; }
.group-empty { padding: 6px 8px; color: var(--muted); font-size: 12px; }
.event-item { padding: 0; border-top: 1px solid var(--line); }
.event-item:first-child { border-top: 0; padding-top: 0; }
.event-open { display: flex; flex-direction: column; gap: 3px; padding: 9px 6px 8px; border-radius: 5px; }
.event-open:hover, .event-item.is-selected .event-open { background: var(--surface); }
.event-open:hover .event-text, .event-item.is-selected .event-text { color: var(--ink); text-decoration: none; }
.event-meta { display: flex; align-items: baseline; gap: 6px; margin: 0; font-size: 11.5px; }
.event-meta time, .event-action time { margin-left: auto; color: var(--faint); font-family: var(--mono); font-size: 11px; }
.event-from { color: var(--ink); font-weight: 550; }
.event-tag { flex-shrink: 0; padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.event-object { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.5; }
.event-object b { color: var(--ink); font-weight: 600; font-family: var(--mono); font-size: 11.5px; }
.inputs-panel .event-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: oklch(0.36 0.02 155); font-size: 12.5px; line-height: 1.6; }
.event-verdict { margin-top: 1px; font-size: 11.5px; line-height: 1.55; }
.event-verdict .verdict-tag { margin-right: 2px; font-size: 11.5px; }
.event-item.is-self .event-open { padding-left: 9px; box-shadow: inset 2px 0 0 var(--green); border-radius: 0 5px 5px 0; }
.event-action { display: flex; align-items: baseline; gap: 6px; color: var(--ink); font-size: 12.5px; line-height: 1.5; }
.event-action b { font-weight: 600; }
.event-loop { display: flex; align-items: baseline; gap: 6px; width: calc(100% - 9px); min-height: 0; margin: -2px 0 8px 9px; padding: 4px 7px; border: 0; border-radius: 4px; background: oklch(0.99 0.005 95 / 0.7); color: var(--muted); font-size: 11.5px; line-height: 1.5; text-align: left; flex-direction: row; }
.event-loop:hover { background: var(--surface); color: var(--ink); }
.event-loop.is-answer { color: var(--ink); background: oklch(0.93 0.03 145 / 0.55); }
.event-loop > span:first-child { flex-shrink: 0; color: var(--green); }
.event-loops .event-loop { width: 100%; margin: 0 0 6px; }
.inputs-panel .initial-input, .inputs-panel .empty-detail { padding: 14px 8px; }

/* Workspace heading: date, title and motion tools on one row; the note never pushes the board. */
.workspace { display: flex; flex-direction: column; padding: 14px 22px 14px; }
.frame-heading { display: flex; align-items: flex-end; flex-wrap: nowrap; gap: 12px; margin-bottom: 8px; }
.frame-heading-main { flex: 1; min-width: 0; }
.frame-heading .frame-date { display: flex; align-items: baseline; gap: 10px; margin-bottom: 3px; color: var(--muted); font-size: 12px; }
.frame-heading .revision-tag { margin-left: 0; padding: 0; }
.frame-heading h2 { overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.view-actions button { min-height: 28px; padding: 4px 8px; border-color: transparent; background: transparent; color: var(--muted); font-size: 12px; }
.view-actions button:hover:not(:disabled) { border-color: var(--line); background: var(--surface); color: var(--ink); }
.view-actions button[aria-pressed="true"] { border-color: oklch(0.78 0.045 150); color: var(--green); background: var(--selected); }
.frame-note { position: relative; display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; padding: 8px 0 9px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.frame-note-text { flex: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 3.3em; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.frame-note.is-open .frame-note-text { display: block; }
.frame-note .note-label { margin-right: 8px; color: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.frame-note .signal-note { display: inline; margin: 0 10px 0 0; padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--muted); font-size: 11.5px; }
.frame-note .signal-note b { margin-right: 6px; color: var(--ink); font-weight: 600; }
.note-toggle { flex-shrink: 0; min-height: 22px; padding: 1px 6px; border: 0; background: transparent; color: var(--green); font-size: 12px; }
.frame-note.is-open { z-index: 8; }
.board-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.board-heading .breadcrumbs:empty { display: none; }
.board-heading .layer-title { color: var(--ink); font-size: 12.5px; font-weight: 550; }
.board-heading .budget-label { margin-left: auto; font-family: var(--mono); font-size: 12px; }
.board-heading .budget-label span { font-family: inherit; color: var(--muted); }
.board-legend { margin-top: 9px; gap: 4px 14px; font-size: 11.5px; }
.board-legend .legend-keys { margin-left: auto; color: var(--faint); }
.pinboard { border-radius: 3px; }

/* Tiles: hover says “this opens”, the link highlight says “this is where that input went”. */
.pin-tile .tile-button { position: relative; transition: background-color 140ms var(--ease); }
.pin-tile .tile-button:hover { background: oklch(0.99 0.005 95 / 0.22); }
.pin-tile:hover > .flip-shape { box-shadow: inset 0 0 0 1.5px oklch(0.30 0.03 150 / 0.45); }
.pin-tile.is-linked > .flip-shape { box-shadow: inset 0 0 0 2px var(--clay); }
.pin-tile.is-linked { z-index: 3; }
.pin-tile .tile-button::after { content: "详情 ›"; position: absolute; right: 10px; bottom: 8px; color: var(--green); font-size: 11.5px; opacity: 0; transform: translateX(-3px); transition: opacity 140ms var(--ease), transform 140ms var(--ease); pointer-events: none; }
.pin-tile .tile-button:hover::after, .pin-tile .tile-button:focus-visible::after { opacity: 1; transform: none; }
.pin-tile .is-small .tile-button::after, .pin-tile .is-narrow .tile-button::after, .pin-tile .is-tiny .tile-button::after, .pin-tile .has-children .tile-button::after, .pin-tile .has-actions .tile-button::after { display: none; }
.pin-tile .tile-ask { color: oklch(0.46 0.13 36); }
.pin-tile .tile-ask::before { background: oklch(0.52 0.15 36); }
.board-legend .legend-ask { background: oklch(0.52 0.15 36); }
.tile-answered { color: var(--green); font-weight: 650; white-space: nowrap; }
.tile-subject { margin-top: 6px; color: var(--ink); font-size: 12.5px; line-height: 1.5; }
.tile-subject b { font-family: var(--mono); font-size: 12px; }
.pin-tile .has-actions .tile-button { padding-bottom: 50px; }
.pin-tile .has-actions .tile-prompt { color: oklch(0.36 0.02 155); font-weight: 450; font-size: 12.5px; }
.tile-actions { position: absolute; z-index: 3; right: 10px; bottom: 10px; left: 12px; display: flex; align-items: center; gap: 6px; }
.tile-approve { min-height: 30px; padding: 4px 11px; border: 1px solid oklch(0.45 0.03 150 / 0.35); border-radius: 5px; background: oklch(0.99 0.005 95 / 0.72); color: var(--ink); font-size: 12.5px; font-weight: 600; }
.tile-approve:hover { background: var(--surface); border-color: var(--ink); }
.tile-approve.is-primary { border-color: var(--green); background: var(--green); color: var(--surface); }
.tile-approve.is-primary:hover { background: var(--green-hover); }
.tile-actions.is-answered { justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 5px; background: oklch(0.99 0.005 95 / 0.78); }
.tile-receipt { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; color: var(--muted); font-size: 11.5px; line-height: 1.4; white-space: nowrap; }
.tile-receipt > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tile-receipt > b { display: flex; align-items: center; gap: 5px; color: var(--green); font-size: 12.5px; }
.tile-undo { flex-shrink: 0; min-height: 26px; padding: 2px 8px; border-color: transparent; background: transparent; color: var(--muted); font-size: 12px; }
.tile-undo:hover { color: var(--ink); border-color: var(--line); }
.pin-tile.is-answered > .flip-shape { background: color-mix(in oklch, var(--tile-bg) 78%, white); }
@keyframes og-settle { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* The tail: every one-share item that asks nothing, as one block of exactly their summed area. */
.pin-tile.is-tail { --tile-bg: oklch(0.935 0.012 105); --tile-edge: oklch(0.62 0.024 135 / 0.3); }
.pin-tile.is-tail .tail-button { display: flex; flex-direction: column; gap: 4px; padding: 12px 13px 10px; }
.pin-tile.is-tail .tile-kind b { color: var(--ink); font-family: var(--mono); font-size: 13px; }
.pin-tile.is-tail .tile-top { margin-bottom: 0; color: var(--ink); font-weight: 550; }
.tail-note { color: var(--muted); font-size: 11.5px; }
.tail-note i { font-style: normal; color: var(--clay); }
.tail-list { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 21px; align-content: start; gap: 0 12px; min-height: 0; margin: 4px 0 0; overflow: hidden; }
.tail-list li { position: relative; min-width: 0; padding-left: 11px; overflow: hidden; color: oklch(0.36 0.02 155); font-size: 12px; line-height: 21px; text-overflow: ellipsis; white-space: nowrap; }
.tail-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 1px; background: oklch(0.72 0.04 145); }
.tail-list li[data-color="blue"]::before { background: oklch(0.70 0.05 230); }
.tail-list li[data-color="sand"]::before { background: oklch(0.76 0.08 84); }
.tail-list li[data-color="clay"]::before { background: oklch(0.70 0.08 49); }
.tail-list li[data-color="lilac"]::before { background: oklch(0.70 0.05 310); }
.tail-list li[data-color="mint"]::before { background: oklch(0.72 0.05 175); }
.tail-list li.is-new { color: var(--ink); }
.tail-list li.is-new::after { content: "新"; margin-left: 5px; color: var(--clay); font-size: 10.5px; }
.tail-list li.is-selected { color: var(--green); font-weight: 600; }
.tail-list li:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.tail-more { color: var(--muted); font-size: 11.5px; }
.tail-more:empty { display: none; }
.tail-open { position: absolute; right: 12px; bottom: 9px; color: var(--green); font-size: 12px; font-weight: 600; }
.pin-tile.is-tail .tile-button::after { display: none; }
.pin-tile.is-tail.has-selected > .flip-shape { box-shadow: inset 0 0 0 2px oklch(0.37 0.047 154 / 0.5); }
.pin-tile.is-tail .is-small .tail-list, .pin-tile.is-tail .is-narrow .tail-list, .pin-tile.is-tail .is-tiny .tail-list { display: none; }

/* Hover card for tiles too small to carry their whole title. */
.hover-card { position: fixed; z-index: 60; top: 0; left: 0; width: 280px; padding: 11px 13px 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); box-shadow: 0 10px 30px oklch(0.28 0.025 155 / 0.14); pointer-events: none; animation: og-pop 140ms var(--ease) both; }
.hover-card .hc-kicker { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11.5px; }
.hover-card strong { display: block; font-size: 14px; line-height: 1.45; }
.hover-card p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin-top: 5px; color: oklch(0.36 0.02 155); font-size: 12.5px; line-height: 1.6; }
.hover-card small { display: block; margin-top: 7px; color: var(--green); font-size: 11.5px; }
@keyframes og-pop { from { opacity: 0; } to { opacity: 1; } }

/* Reader: the ask, its controls and what happened to the answer. */
.inspector-top button#close-detail { color: var(--green); }
.detail-status { gap: 6px 10px; }
.ask-card { margin: 0 0 4px; padding: 13px 14px 12px; border: 1px solid oklch(0.80 0.05 40); border-radius: 7px; background: oklch(0.975 0.012 60); }
.detail-section.ask-card + .detail-section { border-top: 0; }
.ask-card h3 { margin-bottom: 5px; }
.ask-card .ask-expects { color: oklch(0.46 0.13 36); }
.ask-card .ask-expects::before { background: oklch(0.52 0.15 36); }
.ask-card.is-answered { border-color: oklch(0.78 0.04 150); background: oklch(0.975 0.012 145); }
.ask-subject { margin-top: 6px; color: var(--ink); font-size: 12.5px !important; line-height: 1.55 !important; }
.ask-subject b { font-family: var(--mono); }
.ask-due { margin-top: 4px; color: var(--muted); font-size: 12px !important; }
.ask-due.is-late { color: oklch(0.5 0.15 30); font-weight: 600; }
.ask-keys, .ask-card .ask-meta { margin-top: 8px; color: var(--muted); font-size: 11.5px !important; }
kbd { display: inline-block; min-width: 16px; padding: 0 4px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 3px; background: var(--surface); color: var(--ink); font: 600 10.5px/1.5 var(--mono); text-align: center; }
.og-respond { margin-top: 10px; }
.og-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.og-btn { min-height: 32px; padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; }
.og-btn:hover { border-color: var(--ink); background: var(--surface); }
.og-btn.is-primary { border-color: var(--green); background: var(--green); color: var(--surface); }
.og-btn.is-primary:hover { background: var(--green-hover); }
.og-btn small { margin-left: 5px; font-size: 10.5px; font-weight: 500; opacity: 0.8; }
.og-btn.is-line { background: transparent; }
.og-snooze { min-height: 30px; padding: 4px 6px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.og-snooze:hover { color: var(--ink); background: transparent; }
.og-panel { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); animation: og-settle 200ms var(--ease) both; }
.og-panel .text-button { margin-top: 6px; }
.og-options { display: flex; flex-direction: column; gap: 5px; }
.og-options button { display: flex; justify-content: space-between; align-items: baseline; min-height: 32px; font-size: 12.5px; text-align: left; }
.og-options small { color: var(--muted); font-size: 11.5px; }
.og-composer { display: flex; gap: 6px; align-items: flex-end; }
.og-composer textarea { flex: 1; min-height: 52px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; font-size: 13px; resize: vertical; }
.og-send { width: 32px; height: 32px; padding: 0; border-color: var(--green); background: var(--green); color: var(--surface); font-weight: 700; }
.og-suggest { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.og-suggest button { min-height: 26px; padding: 2px 8px; border-radius: 99px; font-size: 12px; }
.og-receipt { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 9px 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); animation: og-settle 260ms var(--ease) both; }
.og-receipt > span:nth-child(2) { flex: 1; min-width: 0; }
.og-receipt b { display: block; color: var(--green); font-size: 13.5px; }
.og-receipt small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.og-receipt.is-received { border-color: oklch(0.78 0.05 150); background: oklch(0.96 0.02 145); }
.og-receipt .text-button { flex-shrink: 0; padding: 0; color: var(--muted); }
.og-check { display: inline-grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: var(--surface); font-size: 12px; font-weight: 700; }
.og-receipt.is-compact { margin-top: 6px; padding: 6px 8px; }

/* Overview lists. */
.review-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.review-row:first-child { padding-top: 2px; }
.review-open { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; min-height: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.review-open:hover { background: transparent; }
.review-open:hover .review-pr { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.review-pr { font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.review-pr b { font-family: var(--mono); font-size: 12.5px; }
.review-prompt { color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.review-actions { display: flex; gap: 6px; margin-top: 8px; }
.review-actions .og-btn { min-height: 30px; font-size: 12.5px; }
.ask-row .ask-expects { color: oklch(0.46 0.13 36); font-size: 11.5px; }
.ask-row .ask-expects::before { background: oklch(0.52 0.15 36); }
.ask-row small em { font-style: normal; }
.ask-row small em.is-late, em.is-late { color: oklch(0.5 0.15 30); font-weight: 600; }
.own-list { display: flex; flex-direction: column; }
.own-row { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 0; padding: 7px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.own-row b { font-size: 13px; font-weight: 600; }
.own-row span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; color: var(--muted); font-size: 12px; }
.own-row:hover { background: transparent; }
.own-row:hover b { color: var(--green); }
.own-more { margin-top: 6px; color: var(--muted); font-size: 12px !important; }
.detail-section details > summary { padding: 4px 0; }

/* Sources: a plain preview, the original rendered on demand. */
.source-list { display: flex; flex-direction: column; }
.source-item { padding: 9px 0; border-top: 1px solid var(--line); }
.source-item:first-child { border-top: 0; padding-top: 2px; }
details.source-item > summary { display: flex; flex-direction: column; gap: 3px; list-style: none; cursor: pointer; }
details.source-item > summary::-webkit-details-marker { display: none; }
.source-meta { color: var(--muted); font-size: 11.5px; }
.source-action { font-size: 12.5px; font-weight: 600; }
.source-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12.5px; line-height: 1.6; }
details[open].source-item .source-preview { display: none; }
.source-toggle { color: var(--green); font-size: 11.5px; }
.source-toggle::after { content: " ▾"; }
details[open].source-item .source-toggle::after { content: " ▴"; }
.md-body { font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.md-body > * + * { margin-top: 7px; }
.md-body .md-h { font-weight: 650; }
.md-body ul, .md-body ol { padding-left: 18px; list-style: disc; }
.md-body ol { list-style: decimal; }
.md-body li + li { margin-top: 3px; }
.md-body blockquote { margin: 0; padding: 2px 0 2px 10px; border-left: 2px solid var(--line-strong); color: var(--muted); }
.md-body code { padding: 0 3px; border-radius: 3px; background: oklch(0.94 0.01 100); font: 12px var(--mono); }
.md-body pre { padding: 8px 10px; overflow-x: auto; border-radius: 5px; background: oklch(0.94 0.01 100); }
.md-body pre code { padding: 0; background: none; }
.md-body .md-file code { color: var(--muted); }
.md-body .md-cut { color: var(--faint); font-size: 11.5px; }
.md-body a { overflow-wrap: anywhere; }
details.source-item .md-body { margin-top: 6px; padding: 8px 10px; border-radius: 5px; background: var(--paper); }
.message-quote.md-body { font-size: 13.5px; }
.event-subject { margin: -4px 0 12px; color: var(--muted); font-size: 12.5px !important; line-height: 1.55; }
.event-subject b { color: var(--ink); font-family: var(--mono); }
.related-list { display: flex; flex-wrap: wrap; gap: 6px; }
.related-chip { min-height: 26px; padding: 3px 8px; font-size: 12px; text-align: left; }

/* Versions of one item: share as a bar, newest first; a row jumps to its frame. */
.version-list { display: flex; flex-direction: column; }
.version-list li { border-bottom: 1px solid var(--line); }
.version-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 2px 10px; width: 100%; min-height: 0; padding: 8px 0; border: 0; border-radius: 0; background: transparent; text-align: left; }
.version-row:hover { background: var(--paper); }
.version-when { display: flex; gap: 8px; align-items: baseline; color: var(--muted); font-size: 11.5px; }
.version-when time { font-family: var(--mono); }
.version-type { color: var(--clay); }
.version-bar { position: relative; grid-row: 1 / span 3; grid-column: 2; align-self: start; height: 16px; margin-top: 2px; border-radius: 2px; background: var(--panel); }
.version-bar i { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 2px; background: oklch(0.80 0.04 145); }
.version-bar b { position: absolute; right: 4px; top: 0; font: 500 11px/16px var(--mono); }
.version-title { font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.version-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.55; }
.version-list li.is-now .version-row { box-shadow: inset 2px 0 0 var(--green); padding-left: 8px; }

/* Transport: one row; chapters sit on the timeline as spans. */
.transport { padding: 8px 28px 0; }
.transport-main { gap: 16px; align-items: center; }
.time-readout { flex-direction: column; align-items: flex-start; gap: 0; min-width: 92px; }
.time-readout strong { font-size: 12.5px; }
.timeline-track { flex: 1; min-width: 0; margin: 0; padding-top: 22px; }
.chapter-list { position: absolute; top: 0; left: 0; right: 0; height: 22px; padding: 0; overflow: visible; }
.chapter-list .chapter-button { position: absolute; top: 0; display: flex; align-items: center; gap: 5px; min-height: 20px; height: 20px; padding: 0 6px; overflow: hidden; border: 0; border-left: 1px solid var(--line-strong); border-radius: 0; background: transparent; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.chapter-list .chapter-button span:first-child { font-size: 10.5px; }
.chapter-list .chapter-button:hover { background: var(--panel); color: var(--ink); }
.chapter-list .chapter-button.is-active { background: var(--selected); color: var(--green); }
.day-labels { height: 18px; font-size: 11px; }
.prototype-note { padding: 2px 28px 8px; font-size: 11.5px; }
.toast { bottom: 96px; display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 15px; border-color: var(--ink); background: var(--ink); animation: og-toast 200ms var(--ease) both; }
.toast.is-leaving { animation: og-toast-out 180ms var(--ease) both; }
.toast button { min-height: 26px; padding: 3px 8px; border-color: oklch(0.99 0.005 95 / 0.35); background: transparent; color: var(--surface); font-size: 12px; }
.toast button:hover { background: oklch(0.99 0.005 95 / 0.12); }
.toast kbd { border-color: oklch(0.99 0.005 95 / 0.4); background: transparent; color: var(--surface); }
@keyframes og-toast { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes og-toast-out { to { opacity: 0; transform: translate(-50%, 4px); } }

@media (max-width: 999px) {
  .masthead .story-heading { display: none; }
  .time-readout { min-width: 0; }
}
@media (max-width: 759px) {
  .main-grid { margin-top: 8px; }
  .transport-main { flex-wrap: wrap; }
  .timeline-track { order: 5; flex-basis: 100%; }
  .chapter-list .chapter-button { font-size: 0; padding: 0 4px; }
  .chapter-list .chapter-button span:first-child { font-size: 10.5px; }
  .frame-heading { flex-wrap: wrap; }
  .frame-heading h2 { white-space: normal; }
  .board-legend .legend-keys { display: none; }
  .hover-card { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tile-actions.is-answered, .og-receipt, .og-panel, .toast, .hover-card { animation: none; }
}
.frame-heading > .view-actions { flex: 0 0 auto; }
.event-meta .event-from { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-meta time, .event-action time { flex-shrink: 0; }
.pin-tile.is-blank [data-fit~="sliver"] .blank-body { visibility: hidden; }
.inspector-top { align-items: flex-start; }
.inspector-top .eyebrow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inspector-top button#close-detail { flex-shrink: 0; white-space: nowrap; }
.ask-card.is-answered .ask-expects { color: var(--green); }
.ask-card.is-answered .ask-expects::before { background: var(--green); }
.tile-actions.is-answered { padding: 4px 6px 4px 9px; }
.tile-actions.is-received .tile-receipt { color: var(--green); }

/* ---------- 原版树图的动画与交互（motion.mjs 与 forms/motion/ix.mjs；forms/polish/tree-motion.md） ---------- */
/* The stage of ix: cards, leaders and keyboard proxies are placed in it; ix.css only takes these variables. */
.main-grid { position: relative; --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ix-bg: var(--surface); --ix-fg: var(--ink); --ix-fg-2: var(--muted); --ix-fg-3: var(--faint); --ix-frame: var(--line-strong);
  --ix-rule: var(--line); --ix-leader: var(--ink); --ix-ask: oklch(0.52 0.15 36); --ix-ask-urgent: oklch(0.52 0.15 36);
  --ix-font: 13px/1.55 var(--sans); --ix-k-font: 11.5px/1.5 var(--sans); --ix-q-font: 600 14px/1.45 var(--sans); --ix-d-font: 12px/1.55 var(--mono);
  --ix-ask-font: 550 12.5px/1.45 var(--sans); --ix-ask-small-font: 400 11.5px var(--mono); --ix-z-leader: 4; --ix-z-peek: 6; --ix-z-detail: 7; }
.main-grid > .ix-peek { width: 252px; border-radius: 6px; box-shadow: 0 10px 30px oklch(0.28 0.025 155 / 0.14); }
.main-grid > .ix-peek .ix-ask i { border-radius: 50%; width: 7px; height: 7px; }
.main-grid > .ix-peek .tc-rc { color: var(--green); }
.main-grid > .ix-peek .tc-rc i { box-sizing: border-box; border: 1.5px solid var(--green); background: transparent; }
.main-grid > .ix-peek .tc-rc.is-received i { background: var(--green); }
/* The card is the reader's own detail, laid over the reader column (the overview stays beneath). */
.main-grid > .ix-detail.tree-card { padding: 0; border: 0; border-left: 1px solid var(--line-strong); border-radius: 0; background: var(--surface); color: var(--ink); font: 14px/1.6 var(--sans);
  box-shadow: -12px 0 28px oklch(0.28 0.025 155 / 0.07); scrollbar-width: thin; }
.tc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 17px 20px 10px; font-size: 12px; }
.tc-kicker { min-width: 0; overflow: hidden; color: var(--green); font-weight: 600; letter-spacing: 0.035em; text-overflow: ellipsis; white-space: nowrap; }
.tc-close { flex-shrink: 0; min-height: 26px; padding: 4px 6px; border: 0; background: transparent; color: var(--green); font-size: 12px; white-space: nowrap; }
.tc-title { margin: 0; padding: 0 20px 6px; font-size: 16px; font-weight: 600; line-height: 1.5; }
.tree-card .tc-body { padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 1200px) { .tc-head, .tc-title, .tree-card .tc-body { padding-right: 16px; padding-left: 16px; } }
/* The headline count: the board's one large figure (22 px, never moves); it turns over on its beat. */
.board-heading .layer-title { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
.hero { display: inline-flex; align-items: baseline; gap: 6px; color: var(--ink); }
.hero-n { display: inline-grid; min-width: 1.3ch; overflow: hidden; font: 600 22px/1 var(--mono); font-variant-numeric: tabular-nums; }
.hero-n > span { grid-area: 1 / 1; }
.hero-unit { font-size: 13px; font-weight: 600; }
.layer-meta { color: var(--muted); font-size: 12px; font-weight: 450; }
.budget-label:has(> .ft-new) { display: inline-grid; }
.budget-label > .ft-new, .budget-label > .ft-old { grid-area: 1 / 1; }
/* The receipt under a tile's title: the hollow tick is “saved”, the filled one “the Agent has read it”. */
.tile-rc { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--green); font-size: 12px; font-weight: 550; line-height: 1.45; }
.tile-rc > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-tick { position: relative; flex: none; box-sizing: border-box; width: 11px; height: 11px; border: 1.5px solid currentColor; border-radius: 50%; }
.rc-tick > b { position: absolute; inset: 1.5px; border-radius: 50%; background: currentColor; opacity: 0; }
.is-received .rc-tick > b { opacity: 1; }
.pin-tile .is-tiny .tile-rc, .pin-tile .is-narrow .tile-rc > span { display: none; }
/* A question registered this round is outlined once; the tile ix opens steps out 4 px each side; the keyboard's is ringed. */
.tile-ring { position: absolute; z-index: 2; inset: 0; box-shadow: inset 0 0 0 2px oklch(0.52 0.15 36); opacity: 0; pointer-events: none; }
.pin-tile.is-popped { z-index: 5; }
.pin-tile.is-popped::before { content: ""; position: absolute; inset: 0; background: var(--tile-bg); box-shadow: 0 0 0 1px oklch(0.28 0.025 155 / 0.55), 0 8px 22px oklch(0.28 0.025 155 / 0.18);
  opacity: min(1, calc(var(--pop, 0) * 3)); transform: scale(var(--psx, 1), var(--psy, 1)); pointer-events: none; }
.pinboard.has-pop { overflow: visible; }
.pin-tile.is-keyfocus > .flip-shape { box-shadow: inset 0 0 0 2px var(--focus); }
.pin-tile.is-keyfocus { z-index: 4; }
.tree-grains { position: absolute; z-index: 3; left: 0; top: 0; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.view-actions #tell-again[hidden], .is-embedded .view-actions #tell-again { display: none; }
.board-keys { display: contents; }
@media (prefers-reduced-motion: reduce) { .pin-tile > .flip-shape, .pin-tile .tile-button { transition: none; } }
