* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); }
html { overflow: hidden; }
body {
  font: 400 12px/1.4 var(--font-ui);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--plate); outline-offset: 2px; }
.mono { font-family: var(--font-mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── app frame ───────────────────────────── */
.app { display: grid; grid-template-rows: var(--bar) minmax(0, 1fr) var(--strip); height: 100svh; }
.bar {
  display: flex; align-items: center; gap: 14px; padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--rule); background: var(--sheet); min-width: 0;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex-shrink: 1; }
.brand canvas { width: 34px; height: 34px; display: block; cursor: pointer; }
.brand-text { display: grid; min-width: 0; }
.wordmark { margin: 0; font: 700 15px/1 var(--font-ui); font-variation-settings: "wdth" 125; letter-spacing: 0.14em; }
.status { font: 400 10px/1.3 var(--font-mono); color: var(--graphite); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.bar-mid { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.bar-end { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: nowrap; }
.sep { width: 1px; height: 22px; background: var(--rule); margin: 0 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 11px; border-radius: var(--r); border: 1px solid var(--rule-2);
  background: var(--sheet); cursor: pointer; white-space: nowrap; user-select: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  font-weight: 500;
}
.btn:hover { background: var(--paper); border-color: var(--graphite); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.btn.icon { width: 32px; padding: 0; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn.primary:hover { background: var(--ink-2); }
.btn.plate { background: var(--plate); color: #fff; border-color: var(--plate); }
.btn.rec { border-color: var(--signal); color: var(--signal); }
.btn.rec .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.btn.rec.live { background: var(--signal); color: #fff; }
.btn.rec.live .dot { background: #fff; animation: blink 1s steps(2) infinite; }
.btn.on { background: var(--plate); color: #fff; border-color: var(--plate); }
.btn.small { height: 26px; padding: 0 8px; font-size: 11px; }
.btn.wide { width: 100%; }
@keyframes blink { 50% { opacity: 0.2; } }

.kbd { font: 500 9px/1 var(--font-mono); padding: 3px 4px; border: 1px solid currentColor; border-radius: 3px; opacity: 0.55; }

.select-bare { height: 32px; border-radius: var(--r); border: 1px solid var(--rule-2); background-color: var(--sheet); padding: 0 8px; font-weight: 500; max-width: 180px; }

/* ── main ───────────────────────────────── */
.main { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail); min-height: 0; }
.main > .stage-wrap { grid-column: 1; grid-row: 1; }
.main > .rail { grid-column: 2; grid-row: 1; }
.rail {
  position: relative; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
  border-left: 1px solid var(--rule); background: var(--sheet);
}
.rail::-webkit-scrollbar { width: 8px; }
.rail::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 8px; border: 2px solid var(--sheet); }

.group-head {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: baseline; gap: 10px;
  padding: 14px 16px 10px; background: var(--sheet); border-bottom: 1px solid var(--rule);
}
.group-head .num { font: 700 22px/1 var(--font-ui); font-variation-settings: "wdth" 125; color: var(--plate); }
.group-head .verb { font: 700 12px/1 var(--font-ui); font-variation-settings: "wdth" 125; letter-spacing: 0.18em; }
.group-head .sub { margin-left: auto; font: 400 9px/1 var(--font-mono); color: var(--graphite); }

details.sec { border-bottom: 1px solid var(--rule); }
details.sec > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; font-weight: 500; font-size: 12.5px; user-select: none;
}
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary .idx { font: 400 9px/1 var(--font-mono); color: var(--graphite); width: 26px; }
details.sec > summary .badge { font: 500 9px/1 var(--font-mono); color: var(--plate); margin-left: 4px; }
details.sec > summary .badge:empty { display: none; }
details.sec > summary::after { content: "+"; margin-left: auto; font: 400 15px/1 var(--font-mono); color: var(--graphite); }
details.sec[open] > summary::after { content: "−"; }
details.sec > summary:hover { background: var(--paper); }
.sec-body { display: grid; gap: 12px; padding: 4px 16px 18px; }

/* fields */
.field { display: grid; gap: 6px; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.field-label { color: var(--ink-2); font-size: 11.5px; font-weight: 500; cursor: ew-resize; user-select: none; touch-action: none; }
.field-label.static { cursor: default; }
.field-label:hover { color: var(--plate); }
input.value-box[class] {
  flex: none;
  width: 74px; height: 22px; text-align: right; border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: var(--paper); font: 400 10.5px/1 var(--font-mono); padding: 0 6px; font-variant-numeric: tabular-nums;
}
input.value-box[class]:focus { border-color: var(--plate); outline: none; }
.hint { color: var(--graphite); font-size: 11px; line-height: 1.45; margin: -2px 0 0; }

input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; margin: 0; cursor: pointer;
  --pct: 50%;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 3px; border-radius: 3px;
  background: linear-gradient(to right, var(--plate) var(--pct), var(--rule-2) var(--pct));
}
input[type=range]::-moz-range-track { height: 3px; border-radius: 3px; background: var(--rule-2); }
input[type=range]::-moz-range-progress { height: 3px; background: var(--plate); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; margin-top: -5px; border-radius: 50%;
  background: var(--sheet); border: 1.5px solid var(--ink); transition: transform var(--t-fast);
}
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--sheet); border: 1.5px solid var(--ink); }
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.15); border-color: var(--plate); }
.field.animated input[type=range]::-webkit-slider-thumb { border-color: var(--plate); background: var(--plate); }
.field.animated .field-label::after { content: " ●"; color: var(--plate); font-size: 8px; vertical-align: middle; }

select, input[type=text], input[type=number], textarea {
  height: 32px; border-radius: var(--r); border: 1px solid var(--rule-2); background: var(--paper); padding: 0 8px; width: 100%; min-width: 0;
}
textarea { height: auto; min-height: 64px; padding: 8px; resize: vertical; font: 500 13px/1.3 var(--font-mono); }
select:focus, input:focus, textarea:focus { border-color: var(--plate); outline: none; }
/* Custom chevron so the arrow sits inside the field with breathing room (native arrow hugs the edge). */
select {
  --chev-x: 12px;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  padding-right: calc(var(--chev-x) + 18px) !important; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--graphite) 50%), linear-gradient(135deg, var(--graphite) 50%, transparent 50%);
  background-position: calc(100% - var(--chev-x) - 5px) 52%, calc(100% - var(--chev-x)) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
select:hover, select:focus { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); }
select::-ms-expand { display: none; }
input[type=color] { -webkit-appearance: none; appearance: none; width: 32px; height: 28px; border: 1px solid var(--rule-2); border-radius: var(--r-sm); padding: 2px; background: var(--paper); cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: none; border-radius: 2px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; border: 1px solid var(--rule-2); border-radius: var(--r); overflow: hidden; }
.seg.cols-3 { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
.seg label { display: grid; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; min-height: 28px; font-size: 11.5px; color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 0 -1px -1px 0; user-select: none; }
.seg span:hover { background: var(--paper); }
.seg input:checked + span { background: var(--ink); color: var(--on-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--plate); outline-offset: -2px; }

.toggle { position: relative; display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 11.5px; color: var(--ink-2); user-select: none; }
.toggle input { position: absolute; opacity: 0; }
.toggle .sw { width: 26px; height: 15px; border-radius: 15px; background: var(--rule-2); position: relative; flex: none; transition: background var(--t-fast); }
.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--sheet); transition: transform var(--t-fast); }
.toggle input:checked + .sw { background: var(--plate); }
.toggle input:checked + .sw::after { transform: translateX(11px); }
.toggle input:focus-visible + .sw { outline: 2px solid var(--plate); outline-offset: 2px; }

.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row > .btn { flex: 1 1 auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sub-h { font: 600 10px/1 var(--font-mono); letter-spacing: 0.12em; color: var(--graphite); text-transform: uppercase; padding-top: 10px; border-top: 1px dashed var(--rule-2); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { height: 26px; padding: 0 9px; border-radius: 13px; border: 1px solid var(--rule-2); background: var(--paper); cursor: pointer; font-size: 11px; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip .sw { display: inline-flex; }
.chip .sw i { width: 9px; height: 14px; display: block; }

/* midtone rows */
.tones { display: grid; gap: 6px; }
.tone {
  display: grid; grid-template-columns: 22px 32px minmax(0, 1fr) 96px 26px; gap: 6px; align-items: center;
  padding: 4px; border-radius: var(--r); border: 1px solid transparent; transition: background var(--t-fast);
}
.tone:hover { background: var(--paper); }
.tone.drag { outline: 1px dashed var(--plate); outline-offset: 2px; background: var(--plate-soft); }
.tone .n { font: 500 9.5px/1 var(--font-mono); color: var(--graphite); text-align: center; }
.tone canvas { width: 32px; height: 28px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--rule); }
.tone .file { display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 7px; border: 1px solid var(--rule-2); border-radius: var(--r-sm); cursor: pointer; min-width: 0; font-size: 10.5px; color: var(--graphite); }
.tone .file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tone .file:hover { border-color: var(--ink); color: var(--ink); }
.tone select { height: 28px; font-size: 11px; padding: 0 4px; --chev-x: 7px; }
.x { width: 26px; height: 26px; border-radius: var(--r-sm); border: 1px solid transparent; background: none; cursor: pointer; color: var(--graphite); font: 400 14px/1 var(--font-mono); }
.x:hover { border-color: var(--rule-2); color: var(--signal); }
.x[disabled] { opacity: 0.3; pointer-events: none; }
.tone-colors { display: flex; gap: 6px; align-items: center; }

.stop { display: grid; grid-template-columns: 36px 1fr 60px; gap: 8px; align-items: center; }
.charrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) 26px; gap: 6px; align-items: center; }
.charrow .c { width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--rule); font-weight: 600; }
.charrow .file { display: flex; align-items: center; height: 28px; padding: 0 8px; border: 1px solid var(--rule-2); border-radius: var(--r-sm); cursor: pointer; font-size: 10.5px; color: var(--graphite); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.charrow.drag { outline: 1px dashed var(--plate); outline-offset: 2px; }

.plate-card { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); }
.plate-card .top { display: flex; gap: 8px; align-items: center; }
.plate-card .top b { font: 600 10px/1 var(--font-mono); letter-spacing: 0.1em; }
.plate-card.off { opacity: 0.55; }
.plate-card .g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.plate-card label.mini { display: grid; gap: 3px; font: 400 9px/1 var(--font-mono); color: var(--graphite); }
.plate-card label.mini input, .plate-card label.mini select { height: 26px; font-size: 11px; color: var(--ink); font-family: var(--font-ui); }
.plate-card label.mini select, .lane-editor label.mini select { --chev-x: 7px; }
.lane-editor label.mini input, .lane-editor label.mini select { color: var(--ink); font-family: var(--font-ui); }

.lane { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); }
.lane .nm { font-weight: 500; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane .dt { font: 400 9.5px/1.4 var(--font-mono); color: var(--graphite); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-editor { display: grid; gap: 8px; padding: 10px; border: 1px dashed var(--rule-2); border-radius: var(--r); }
.lane-editor .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lane-editor label.mini { display: grid; gap: 3px; font: 400 9px/1 var(--font-mono); color: var(--graphite); }

.histo { width: 100%; height: 54px; display: block; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--rule); }

/* ── stage ───────────────────────────────── */
.stage-wrap { position: relative; min-width: 0; min-height: 0; background: var(--board); overflow: hidden; }
.stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; }
.stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 16%, transparent) 0.8px, transparent 1.2px);
  background-size: 16px 16px;
}
.art { position: relative; transform-origin: 0 0; will-change: transform; }
.art canvas#view {
  display: block; box-shadow: var(--shadow);
  background-color: #fff;
  background-image: linear-gradient(45deg, #e4e4e0 25%, transparent 25%), linear-gradient(-45deg, #e4e4e0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e4e4e0 75%), linear-gradient(-45deg, transparent 75%, #e4e4e0 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.crop { position: absolute; width: 16px; height: 16px; border-color: var(--ink); border-style: solid; border-width: 0; opacity: 0.55; pointer-events: none; }
.crop.tl { left: -24px; top: -24px; border-right-width: 1px; border-bottom-width: 1px; }
.crop.tr { right: -24px; top: -24px; border-left-width: 1px; border-bottom-width: 1px; }
.crop.bl { left: -24px; bottom: -24px; border-right-width: 1px; border-top-width: 1px; }
.crop.br { right: -24px; bottom: -24px; border-left-width: 1px; border-top-width: 1px; }
.reg { position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px; opacity: 0.5; pointer-events: none; }
.reg.l { left: -34px; } .reg.r { right: -34px; }
.reg::before, .reg::after { content: ""; position: absolute; background: var(--ink); }
.reg::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.reg::after { top: 50%; left: 0; right: 0; height: 1px; }
.reg i { position: absolute; inset: 4px; border: 1px solid var(--ink); border-radius: 50%; }
.dims { position: absolute; right: 0; top: -22px; font: 400 9.5px/1 var(--font-mono); color: color-mix(in srgb, var(--ink) 65%, transparent); white-space: nowrap; pointer-events: none; }

.tools {
  position: absolute; left: 14px; top: 14px; z-index: 5; display: grid; gap: 6px;
  padding: 6px; background: color-mix(in srgb, var(--sheet) 92%, transparent); border: 1px solid var(--rule); border-radius: var(--r-lg);
  backdrop-filter: blur(6px);
}
.tools .btn { width: 36px; height: 36px; padding: 0; position: relative; }
.tools .btn[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: 44px; top: 50%; transform: translateY(-50%);
  background: var(--ink); color: var(--on-ink); font: 400 10px/1 var(--font-mono); padding: 6px 8px; border-radius: 4px; white-space: nowrap; pointer-events: none;
}
/* video transport (only while a video file is the source) */
.transport {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6;
  display: none; align-items: center; gap: 10px; width: min(520px, calc(100% - 120px));
  padding: 6px 10px 6px 6px; border: 1px solid var(--rule); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--sheet) 92%, transparent); backdrop-filter: blur(6px);
}
.stage-wrap.has-video .transport { display: flex; }
.transport .btn.icon { width: 32px; height: 32px; flex: none; }
.transport svg { width: 16px; height: 16px; }
.transport .i-play { fill: currentColor; stroke: none; }
.transport .i-pause { stroke-width: 2.4; }
.transport .i-play, .transport.paused .i-pause, .transport .i-muted, .transport.muted .i-vol { display: none; }
.transport.paused .i-play, .transport.muted .i-muted { display: block; }
.transport.paused #vt-play { background: var(--plate); border-color: var(--plate); color: #fff; }
.transport input[type=range] { flex: 1 1 auto; min-width: 60px; }
.vt-time { flex: none; font: 400 10px/1 var(--font-mono); color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 30px; text-align: center; }
.zoom-ind { position: absolute; right: 14px; bottom: 12px; z-index: 5; font: 400 10px/1 var(--font-mono); color: color-mix(in srgb, var(--ink) 70%, transparent); }

.drop {
  position: absolute; inset: 14px; z-index: 6; display: none; place-items: center; border: 1.5px dashed var(--plate); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--sheet) 88%, transparent); font: 700 14px/1 var(--font-ui); font-variation-settings: "wdth" 125; letter-spacing: 0.12em; color: var(--plate);
}
.stage-wrap.dragover .drop { display: grid; }
.cursor { position: absolute; z-index: 4; border: 1.5px solid var(--plate); border-radius: 50%; pointer-events: none; display: none; transform: translate(-50%, -50%); box-shadow: 0 0 0 1px rgba(255,255,255,.6); }
.cursor::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; background: var(--plate); border-radius: 50%; }
.stage-wrap.brushing .stage { cursor: none; }
.stage-wrap.brushing .cursor { display: block; }
.stage-wrap.panning .stage { cursor: grab; }
.stage-wrap.panning.grabbing .stage { cursor: grabbing; }
.compare-tag { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 6; display: none; background: var(--ink); color: var(--on-ink); font: 500 10px/1 var(--font-mono); padding: 7px 10px; border-radius: 20px; letter-spacing: .1em; }
.stage-wrap.comparing .compare-tag { display: block; }

/* ── status strip ───────────────────────── */
.strip {
  display: flex; align-items: center; gap: 14px; padding: 0 14px; border-top: 1px solid var(--rule); background: var(--sheet);
  font: 400 9.5px/1 var(--font-mono); color: var(--graphite); white-space: nowrap; overflow: hidden; letter-spacing: 0.04em;
}
.strip b { color: var(--ink); font-weight: 500; }
.strip .toast { margin-left: auto; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.strip .toast.err { color: var(--signal); }
.strip .toast.ok:not(:empty)::before { content: "● "; color: var(--plate); }

/* ── modals ─────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: color-mix(in srgb, var(--paper) 70%, transparent); backdrop-filter: blur(4px); }
.modal.open { display: grid; }
.sheet {
  width: min(1100px, calc(100vw - 32px)); max-height: calc(100svh - 32px); overflow: auto; background: var(--sheet); border: 1px solid var(--rule-2); border-radius: 14px; box-shadow: var(--shadow); padding: 18px;
}
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; font: 700 18px/1 var(--font-ui); font-variation-settings: "wdth" 125; letter-spacing: 0.06em; }
.sheet-head p { margin: 0; color: var(--graphite); font-size: 11.5px; }
.sheet-head .row { margin-left: auto; }
.mut-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mut { position: relative; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; cursor: pointer; background: var(--paper); padding: 0; }
.mut canvas { display: block; width: 100%; height: auto; }
.mut span { position: absolute; left: 6px; bottom: 6px; font: 500 9px/1 var(--font-mono); background: var(--ink); color: var(--on-ink); padding: 4px 5px; border-radius: 3px; }
.mut:hover { outline: 2px solid var(--plate); outline-offset: -2px; }
.mut.current { outline: 2px dashed var(--graphite); outline-offset: -2px; }
.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; }
.keys div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 12px; }
.keys kbd { font: 500 10px/1 var(--font-mono); border: 1px solid var(--rule-2); border-radius: 4px; padding: 4px 6px; background: var(--paper); }
.progress { height: 3px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--plate); transition: width 80ms linear; }

/* ── responsive ─────────────────────────── */
@media (max-width: 1100px) {
  .bar-mid .label-hide, .bar-end .label-hide { display: none; }
}
@media (max-width: 860px) {
  /* the document itself scrolls (not body), so phone address bars collapse and momentum scroll works */
  html, body { height: auto; overflow: visible; }
  .app { height: auto; min-height: 100svh; grid-template-rows: auto auto var(--strip); }
  /* top bar: [brand · help · theme] / [presets · history] / [upload · camera · proof · record] */
  .bar { flex-wrap: wrap; align-items: center; padding: 10px 12px 12px; gap: 10px 6px; }
  .brand { order: 0; flex: 1 1 auto; }
  .bar-end { display: contents; }
  .bar-end .sep { display: none; }
  .bar #help, .bar #theme { order: 1; width: 40px; height: 40px; }
  .bar-mid { order: 2; width: 100%; margin-left: 0; gap: 6px; }
  .bar-mid .select-bare { flex: 1 1 auto; max-width: none; height: 40px; }
  .bar-mid .btn { flex: none; width: 40px; height: 40px; padding: 0; }
  .bar-end > label.btn, .bar #camera, .bar #png, .bar #record { order: 3; flex: 1 1 0; min-width: 0; height: 40px; padding: 0 8px; }
  .bar-end #camera .label-hide { display: inline; }
  .main { grid-template-columns: 1fr; }
  .main > .stage-wrap, .main > .rail { grid-column: 1; grid-row: auto; }
  .stage-wrap { order: -1; height: 46svh; min-height: 260px; }
  .rail { border-left: none; border-top: 1px solid var(--rule); overflow: visible; }
  .strip .hide-sm { display: none; }
  .mut-grid { grid-template-columns: repeat(2, 1fr); }
  .keys { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .grid2 { grid-template-columns: 1fr; }
  .bar-end > label.btn, .bar #camera, .bar #png, .bar #record { flex-basis: calc(50% - 3px); }
  .transport { width: calc(100% - 24px); bottom: 10px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Type · layout readout (see "type fit (agent)" at the end) */
.fit-hint:empty { display: none; }
.fit-hint.warn { color: var(--signal); }

/* ── stage tools: reset ─────────────────── */
.tools-sep { display: block; height: 1px; margin: 1px 4px; background: var(--rule-2); }
#tool-reset:hover { color: var(--signal); border-color: var(--signal); }

/* ── transport: record the whole video ──── */
.transport .btn.rec.small { height: 32px; padding: 0 10px; flex: none; font-size: 11px; background: var(--sheet); }
.transport .btn.rec.live { background: var(--signal); color: #fff; }
.transport.recording #vt-seek, .transport.recording #vt-play { pointer-events: none; opacity: 0.45; }

/* ── status strip: site links ───────────── */
.strip-links { display: flex; align-items: center; gap: 2px; margin-left: 10px; flex: none; }
.strip-links a, .strip-links button {
  position: relative; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 0; border-radius: 4px; background: none;
  font: 400 10.5px/1 var(--font-mono); letter-spacing: 0.02em; color: var(--graphite); text-decoration: none; cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
}
.strip-links a:hover, .strip-links button:hover { color: var(--ink); background: var(--paper); }
.strip-links .new-dot { position: absolute; right: 2px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--plate); }
.strip-links .new-dot[hidden] { display: none; }

/* ── changelog ──────────────────────────── */
.cl-list { display: grid; gap: 14px; }
.cl-entry { border-top: 1px solid var(--rule); padding-top: 12px; }
.cl-entry header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cl-entry header b { font: 600 12px/1 var(--font-mono); }
.cl-entry header span { font: 700 13px/1.2 var(--font-ui); font-variation-settings: "wdth" 112; letter-spacing: 0.02em; }
.cl-entry header time { font: 400 10px/1 var(--font-mono); color: var(--graphite); margin-left: auto; }
.cl-entry header em { font: 500 9px/1 var(--font-mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--plate); padding: 4px 6px; border-radius: 3px; }
.cl-entry ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 5px; font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.cl-entry.new { border-top-color: var(--plate); }
.cl-entry:not(.latest) ul { color: var(--graphite); }

/* ── hint card ──────────────────────────── */
.hint-card {
  position: absolute; left: 14px; bottom: 14px; z-index: 7; width: min(340px, calc(100% - 28px));
  padding: 11px 12px 10px; border-radius: var(--r-lg); background: var(--sheet); border: 1px solid var(--rule-2);
  box-shadow: 0 10px 34px rgba(0,0,0,.16); font-size: 12px; line-height: 1.45;
  animation: hint-in 220ms cubic-bezier(.2,.8,.2,1);
}
.hint-card[hidden] { display: none; }
.stage-wrap.has-video .hint-card { bottom: 64px; }
.hint-card .hc-head { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; font: 500 9.5px/1 var(--font-mono); letter-spacing: .1em; color: var(--plate); text-transform: uppercase; }
.hint-card .hc-head::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--plate); }
.hint-card .hc-head .hc-n { margin-left: auto; color: var(--graphite); letter-spacing: .04em; }
.hint-card .hc-text { color: var(--ink); }
.hint-card .hc-text b { font-weight: 600; }
.hint-card .hc-row { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.hint-card .hc-row .btn { height: 26px; padding: 0 9px; font-size: 11px; }
.hint-card .hc-off { margin-left: auto; border: 0; background: none; padding: 0 2px; font: 400 10px/1 var(--font-mono); color: var(--graphite); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.hint-card .hc-off:hover { color: var(--ink); }
@keyframes hint-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .transport .btn.rec.small #vt-rec-label { display: none; }
  .hint-card { left: 10px; bottom: 10px; width: calc(100% - 20px); }
}

/* ── liked the tool? ────────────────────── */
.strip-links .support-btn {
  width: 24px; height: 22px; padding: 0; margin-left: 4px; justify-content: center;
  border: 1px solid var(--rule-2); border-radius: 5px; color: var(--graphite);
}
.strip-links .support-btn .hm { display: block; width: 18px; height: 16px; pointer-events: none; }
.strip-links .support-btn:hover, .strip-links .support-btn:focus-visible, .strip-links .support-btn[aria-expanded="true"], .strip-links .support-btn.nudge {
  color: var(--signal); border-color: var(--signal); background: color-mix(in srgb, var(--signal) 10%, transparent);
}
/* the one nudge: three soft beats and a hello, after the third export */
.strip-links .support-btn.nudge { animation: heart-beat 1.1s ease-in-out 3; }
.strip-links .support-btn.nudge::after {
  content: "Liked it?"; position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  background: var(--ink); color: var(--on-ink); font: 500 9.5px/1 var(--font-mono); padding: 5px 7px; border-radius: 4px; white-space: nowrap; pointer-events: none;
  animation: hint-in 260ms ease-out;
}
@keyframes heart-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }

.support-card {
  position: fixed; z-index: 60; width: min(340px, calc(100vw - 20px)); padding: 18px 18px 14px; text-align: center;
  background: var(--sheet); border: 1px solid var(--rule-2); border-radius: 14px; box-shadow: var(--shadow);
  animation: hint-in 200ms cubic-bezier(.2,.8,.2,1);
}
.support-card[hidden] { display: none; }
.support-card .sc-x { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--graphite); font-size: 18px; line-height: 1; cursor: pointer; }
.support-card .sc-x:hover { background: var(--paper); color: var(--ink); }
.support-card .sc-heart { display: block; width: 72px; height: 62px; margin: 0 auto 8px; color: var(--signal); cursor: pointer; }
.support-card h3 { margin: 0; font: 750 18px/1.1 var(--font-ui); font-variation-settings: "wdth" 118; letter-spacing: .01em; }
.support-card p { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.support-card .sc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 14px; }
.support-card .sc-actions .btn { text-decoration: none; }
.support-card .sc-coffee { grid-column: 1 / -1; height: 36px; font-size: 13px; }
.support-card .sc-foot { font-size: 11px; color: var(--graphite); margin-top: 10px; }
.support-card .sc-actions a.btn:not(.primary) { color: var(--ink); }

/* ── phones & small tablets: the strip becomes a row of real touch targets ── */
@media (max-width: 860px) {
  :root { --strip: 56px; }
  /* the readouts are desktop instruments; on a phone they only truncate */
  .strip > span:not(.toast) { display: none; }
  .strip { padding: 0 8px 0 10px; gap: 0; }
  .strip .strip-links { margin-left: 0; width: 100%; gap: 2px; }
  .strip-links a, .strip-links button { height: 40px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
  .strip-links .new-dot { right: 4px; top: 9px; width: 6px; height: 6px; }
  .strip-links .support-btn { width: 44px; height: 40px; margin-left: auto; border-radius: 9px; }
  .strip-links .support-btn .hm { width: 26px; height: 23px; }
  .strip-links .support-btn.nudge::after { font-size: 10.5px; padding: 6px 8px; }
  /* toasts float over the page, so they're seen while working on the stage */
  .strip .toast {
    position: fixed; z-index: 70; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    width: max-content; max-width: calc(100vw - 24px); margin: 0; padding: 10px 14px; border-radius: 22px;
    background: var(--ink); color: var(--on-ink); font-size: 11px; line-height: 1.35; white-space: normal; text-align: center;
    box-shadow: 0 8px 28px rgba(0,0,0,.28); pointer-events: none; animation: toast-in 200ms ease-out;
  }
  .strip .toast:empty { display: none; }
  .strip .toast.err { background: var(--signal); color: #fff; }
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* file pickers stay focusable (keyboard / screen readers) but invisible; the label shows focus */
label.btn input[type=file], .tone .file input, .charrow .file input {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); pointer-events: none;
}
label.btn, .tone .file, .charrow .file { position: relative; }
label.btn:focus-within, .tone .file:focus-within, .charrow .file:focus-within { outline: 2px solid var(--plate); outline-offset: 2px; }
/* Safari < 18 needs the prefix */
.tools, .transport, .modal, .hint-card { -webkit-backdrop-filter: blur(6px); }

/* ── mobile & touch pass (2026-11-11) ─────────────────────────── */
/* hover tooltips only where hovering exists (a tap leaves :hover stuck on phones) */
@media (hover: none) { .tools .btn[data-tip]:hover::after { display: none; } }
/* keyboard hints mean nothing without a keyboard-first pointer */
@media (pointer: coarse) { .sheet-head .kbd { display: none; } }

@media (max-width: 860px) {
  /* brand never pushes the theme button onto its own row */
  .brand { flex: 1 1 0; min-width: 0; }
  /* stage tools: a row along the top of the stage, with room reserved so they never cover the art */
  .stage { padding-top: 52px; }
  .tools { top: 8px; left: 8px; grid-auto-flow: column; padding: 4px; gap: 4px; }
  .tools .btn { width: 40px; height: 38px; }
  .tools-sep { width: 1px; height: auto; margin: 4px 2px; }
  /* the page scrolls with a swipe on the stage unless the brush is on */
  .stage-wrap:not(.brushing) .stage { touch-action: pan-y pinch-zoom; }
  /* hints float at the bottom of the screen instead of covering the stage */
  .hint-card, .stage-wrap.has-video .hint-card { position: fixed; z-index: 65; left: 10px; right: 10px; width: auto; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .hint-card .hc-row .btn { height: 34px; padding: 0 12px; }
  .hint-card .hc-off { height: 34px; padding: 0 6px; }
  /* iOS zooms into any field under 16 px */
  input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea { font-size: 16px; }
  input.value-box[class] { width: 96px; height: 32px; font-size: 16px; }
  /* touch-sized small controls */
  .chip { height: 34px; padding: 0 12px; border-radius: 17px; }
  .btn.small { height: 34px; padding: 0 12px; }
  .x { width: 34px; height: 34px; }
  .support-card .sc-x { width: 36px; height: 36px; }
  /* dialogs: the header (and its Close) stays in view while the sheet scrolls */
  .sheet { padding-top: 0; }
  .sheet-head { position: sticky; top: 0; z-index: 2; margin: 0 -18px 12px; padding: 14px 18px 10px; background: var(--sheet); border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
}
@media (min-width: 381px) and (max-width: 860px) { .transport .btn.rec.small #vt-rec-label { display: inline; } }
@media (max-width: 420px) {
  .tone .file span { display: none; }
  .tone .file { justify-content: center; padding: 0; }
}
/* phones held sideways: one scrolling row of controls, the stage gets the rest of the height */
@media (max-width: 960px) and (max-height: 500px) and (orientation: landscape) {
  .bar { flex-wrap: nowrap; overflow-x: auto; padding: 8px 10px; gap: 6px; scrollbar-width: none; }
  .brand { flex: none; } .brand-text, .bar #help { display: none; }
  .bar-mid { width: auto; order: 0; flex: none; }
  .bar-mid .select-bare { width: 124px; flex: none; }
  /* icon-only source / record buttons so the whole row fits a phone held sideways */
  .bar-end > label.btn, .bar #camera, .bar #record { width: 40px; padding: 0; font-size: 0; gap: 0; }
  .bar #camera .label-hide, .bar #record-label { display: none; }
  .bar #help, .bar #theme, .bar-end > label.btn, .bar #camera, .bar #png, .bar #record { order: 0; flex: none; }
  .stage-wrap { height: calc(100svh - 58px); min-height: 220px; }
}
/* tablets in landscape (touch, but wider than 860): touch-sized strip */
@media (pointer: coarse) and (min-width: 861px) {
  :root { --strip: 36px; }
  .strip-links a, .strip-links button { height: 30px; padding: 0 10px; font-size: 11.5px; }
  .strip-links .support-btn { width: 36px; height: 30px; }
  .strip-links .support-btn .hm { width: 22px; height: 19px; }
  .tools .btn { width: 44px; height: 44px; }
}

/* ── rough edges (agent) ── */
.lane-editor .lane-unit { color: var(--plate); }
.lane-editor .lane-range { margin: -3px 0 0; font: 400 10px/1.4 var(--font-mono); }
.lane-editor .lane-range.warn { color: var(--signal); }
.lane-editor input.lane-out { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal); }

/* ── tour (agent) ── first-visit cards pinned next to the real controls (js/ui/tour.js) */
.tour-spot {
  position: fixed; z-index: 57; pointer-events: none; border-radius: 9px;
  box-shadow: 0 0 0 2px var(--plate), 0 0 0 6px color-mix(in srgb, var(--plate) 22%, transparent), 0 0 0 200vmax color-mix(in srgb, var(--paper) 42%, transparent);
  transition: top 220ms cubic-bezier(.2,.8,.2,1), left 220ms cubic-bezier(.2,.8,.2,1), width 220ms cubic-bezier(.2,.8,.2,1), height 220ms cubic-bezier(.2,.8,.2,1);
}
.tour-card {
  position: fixed; z-index: 58; width: min(320px, calc(100vw - 20px)); padding: 12px 13px 11px;
  border-radius: var(--r-lg); background: var(--sheet); border: 1px solid var(--rule-2); box-shadow: var(--shadow);
  font-size: 12.5px; line-height: 1.45; color: var(--ink);
  transition: top 220ms cubic-bezier(.2,.8,.2,1), left 220ms cubic-bezier(.2,.8,.2,1);
}
.tour-spot[hidden], .tour-card[hidden] { display: none; }
.tour-card.tc-in { animation: hint-in 220ms cubic-bezier(.2,.8,.2,1); }
.tour-card:focus { outline: none; }
.tour-card:focus-visible { outline: 2px solid var(--plate); outline-offset: 2px; }
.tour-card.tc-float { left: 10px; right: 10px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; max-width: 480px; margin: 0 auto; }
.tour-card .tc-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font: 500 9.5px/1 var(--font-mono); letter-spacing: .1em; color: var(--plate); text-transform: uppercase; }
.tour-card .tc-head::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--plate); }
.tour-card .tc-n { margin-left: auto; color: var(--graphite); letter-spacing: .04em; }
.tour-card .tc-text { margin: 0; }
.tour-card .tc-text b { font-weight: 600; }
.tour-card kbd { font: 500 9.5px/1 var(--font-mono); border: 1px solid var(--rule-2); border-radius: 3px; padding: 2px 4px; white-space: nowrap; }
.tour-card .tc-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.tour-card .tc-row .btn { height: 28px; padding: 0 11px; font-size: 11.5px; }
.tour-card .tc-skip { margin-left: auto; border: 0; background: none; padding: 0 2px; height: 28px; font: 400 10px/1 var(--font-mono); color: var(--graphite); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.tour-card .tc-skip:hover { color: var(--ink); }
html.touring .hint-card { display: none; }
.keys-tour { border: 0; background: none; padding: 0; font: inherit; color: var(--plate); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 860px) {
  .tour-card .tc-row .btn { height: 36px; padding: 0 14px; }
  .tour-card .tc-skip { height: 36px; padding: 0 6px; }
}
@media (pointer: coarse) { .tour-card .k { display: none; } }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } .tour-card.tc-in { animation: none; } }

/* ── my looks (agent) ── */
.looks { display: grid; gap: 8px; }
.looks-head { display: flex; align-items: baseline; justify-content: space-between; }
.looks-count { font-weight: 400; letter-spacing: 0.04em; }
.looks-name { display: flex; gap: 6px; align-items: center; }
.looks-name input { flex: 1 1 auto; }
.looks-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.looks-list[hidden], .looks-empty[hidden], .look-more[hidden] { display: none; }
.look { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 4px 8px; align-items: center; padding: 4px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); }
.look-thumb { width: 64px; height: 48px; padding: 0; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--board); cursor: pointer; overflow: hidden; }
.look-thumb:hover, .look-thumb:focus-visible { border-color: var(--plate); outline: none; }
.look-thumb canvas { display: block; max-width: 100%; max-height: 100%; }
.look-text { min-width: 0; display: grid; gap: 3px; }
.look-text input { height: 28px; }
.look-name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look-meta { font: 400 9.5px/1.2 var(--font-mono); color: var(--graphite); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look .btn.icon.small { width: 26px; padding: 0; font-size: 14px; letter-spacing: 0; }
.look-more { grid-column: 1 / -1; display: flex; gap: 6px; }
.look-more .btn { flex: 1 1 0; }
.look-more .btn.armed { border-color: var(--signal); background: var(--signal); color: #fff; }
.looks .row > label.btn { flex: 1 1 auto; }
@media (max-width: 860px), (pointer: coarse) {
  .looks .btn.small, .looks-name .btn, .looks .btn.wide { height: 36px; font-size: 12px; }
  .look .btn.icon.small { width: 36px; }
  .looks-name input, .look-text input { height: 36px; }
}

/* ── export progress (agent) ── */
.xp { z-index: 60; }
.xp .xp-sheet { width: min(420px, calc(100vw - 32px)); padding: 18px; }
.xp .sheet-head { margin-bottom: 14px; position: static; margin-left: 0; margin-right: 0; padding: 0; border: 0; background: none; }
.xp .xp-status { margin-top: 8px; font: 500 12px/1.3 var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.xp .xp-bar { height: 6px; }
.xp .xp-bar i { transition: width 120ms linear; }
.xp .xp-note { margin: 10px 0 0; color: var(--graphite); font-size: 11.5px; }
.xp .xp-msg { margin: 6px 0 0; font-size: 12px; min-height: 1.3em; overflow-wrap: anywhere; }
.xp .xp-msg:empty { display: none; }
.xp.err .xp-msg { color: var(--signal); }
.xp.err .xp-bar i { background: var(--signal); }
.xp .xp-row { display: flex; justify-content: flex-end; margin-top: 14px; }
.xp .xp-row .btn { min-width: 96px; }
@media (max-width: 480px) { .xp .xp-row .btn { width: 100%; height: 40px; } }
@media (prefers-reduced-motion: reduce) { .xp .xp-bar i { transition: none; } }
.xp.ok .xp-note, .xp.err .xp-note { display: none; }

/* ── type fit (agent) ── */
/* Frame · Lines · Fill the frame in 1.4 Type, and the line that says what the layout is doing */
.field-note { font: 400 9.5px/1 var(--font-mono); color: var(--graphite); letter-spacing: .02em; white-space: nowrap; }
.seg input:disabled + span, .seg span.off { color: var(--graphite); opacity: .5; cursor: default; }
.seg span.off:hover { background: none; }
.seg span.auto-pick { text-decoration: underline; text-decoration-color: var(--plate); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.seg input:checked + span.auto-pick { text-decoration-color: var(--on-ink); }
.fit-hint { font-variant-numeric: tabular-nums; }
.fit-hint .linkish { margin-left: 6px; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--plate); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.fit-hint .linkish:hover { color: var(--ink); }
.fit-hint.warn .linkish { color: var(--signal); }
@media (max-width: 860px), (pointer: coarse) {
  [data-key="typeLines"] .seg span { min-height: 36px; }
  .fit-hint .linkish { display: inline-block; min-height: 32px; padding: 0 4px; line-height: 32px; }
}
