.flush { margin-top: 0; }
.top-gap { margin-top: 12px; }
.card { margin-bottom: 20px; min-width: 0; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin-bottom: 12px; }
.filter-grid { margin-top: 12px; }
.field { min-width: 0; }
.field label, .block-lbl { display: block; margin-bottom: 4px; overflow-wrap: anywhere; }
.hint-line { margin: 4px 0 0; overflow-wrap: anywhere; }

input:not([type="file"]):not([type="hidden"]), select, textarea { min-height: 44px; min-width: 44px; max-width: 100%; }
input[type="date"] { min-width: 0; width: 100%; }
button, .btn, label.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; max-width: 100%; text-align: center; }

.timer-panel { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; min-width: 0; }
.timer-readout { min-width: 0; }
.timer-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 2px; }
.timer-clock { font-family: var(--mono); font-size: clamp(28px, 8vw, 40px); font-weight: 700; line-height: 1.1; letter-spacing: 0.02em; }

.chip-bar { gap: 8px; }
.chip-btn { font-weight: 600; padding: 8px 12px; }
.chip-btn.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.entry-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; min-width: 0; }
.entry-bar > .grow { flex: 1 1 220px; min-width: 0; }
.entry-submit { flex: 0 1 auto; }

.head-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.counts-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.stat-pill { font-weight: 600; font-size: 13px; padding: 4px 10px; margin: 0; }

.map-box { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; min-width: 0; }
.timeline-svg { display: block; width: 100%; max-width: 100%; height: auto; }
.tl-track { fill: var(--line); }
.tl-tick { stroke: var(--field-line); stroke-width: 1.5; }
.tl-axis-lbl { fill: var(--muted); font-family: var(--mono); font-size: 10px; }
.mk-note { fill: var(--muted); }
.mk-action { fill: var(--accent); stroke: var(--accent); stroke-width: 1.5; }
.mk-action.is-open { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.mk-question { fill: var(--warn); }
.mk-decision { fill: var(--ink); }
.mk-key { fill: var(--accent); }
.map-caption { margin: 6px 0 0; overflow-wrap: anywhere; }

.err-msg { color: var(--warn); font-weight: 600; margin: 10px 0 0; overflow-wrap: anywhere; }
.warn-box { background: var(--chip); border: 1px solid var(--warn); color: var(--warn); padding: 10px 12px; border-radius: 8px; overflow-wrap: anywhere; }

.list { list-style: none; padding: 0; margin: 12px 0 0; }
.list li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; min-width: 0; }
.entry-main { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; flex: 1 1 200px; min-width: 0; }
.stamp { font-family: var(--mono); font-weight: 700; font-size: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.tag-pill { font-family: var(--mono); font-weight: 600; margin: 0; }
.tag-pill.tag-action { background: var(--accent); color: var(--accent-ink); }
.tag-pill.tag-question { border: 1px solid var(--warn); color: var(--warn); }
.tag-pill.tag-decision { border: 1px solid var(--ink); font-weight: 700; }
.tag-pill.tag-key { border: 1px solid var(--accent); color: var(--accent); }
.entry-text { overflow-wrap: anywhere; flex: 1 1 160px; min-width: 0; }
.list li.is-done .entry-text { text-decoration: line-through; color: var(--muted); }
.entry-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }

.done-label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; cursor: pointer; font-size: 14px; font-weight: 600; user-select: none; }
input[type="checkbox"].done-cb { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; margin: 0; flex: 0 0 44px; cursor: pointer; accent-color: var(--accent); }

.arch-title { font-weight: 700; overflow-wrap: anywhere; flex: 1 1 160px; min-width: 0; }
.arch-meta { flex: 1 1 100%; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

code { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }

@media print {
  .no-print, header.top, footer, .entry-controls button { display: none !important; }
  body { background: #fff; color: #000; }
  .wrap { max-width: 100%; padding: 0; }
  .card { border: none; padding: 0; margin-bottom: 16px; }
  section[hidden] { display: none !important; }
}
