/* Gunkie: a technical spec sheet, like Tickmark and Rackweight. Monospace,
   1px rules, one accent used only as a fill. No radius, shadow or gradient. */

@font-face { font-family: 'Berkeley Mono'; font-weight: 400; font-display: swap; src: url('../assets/fonts/BerkeleyMono-Regular.otf') format('opentype'); }
@font-face { font-family: 'Berkeley Mono'; font-weight: 700; font-display: swap; src: url('../assets/fonts/BerkeleyMono-Bold.otf') format('opentype'); }
@font-face { font-family: 'Berkeley Mono Condensed'; font-weight: 700; font-display: swap; src: url('../assets/fonts/BerkeleyMono-Bold-Condensed.otf') format('opentype'); }

:root {
  --bg: #ededE9;
  --paper: #f7f7f4;
  --ink: #121212;
  --mute: #5d5d58;
  --rule-faint: #cbcbc4;
  --rule-row: #dcdcd6;
  --track: #a9a9a2;
  --accent: #e5461a;
  --on-accent: #121212;
  --press: #e4e4df;
  --panel: var(--paper);
  --panel-rule: var(--ink);
  /* Frosted: with these, all text keeps at least 4.5:1 over anything behind it. */
  --frost: rgb(247 247 244 / 0.63);
  --frost-mute: #33332f;
  --scrim: rgb(18 18 18 / 0.32);
  --mono: 'Berkeley Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --cond: 'Berkeley Mono Condensed', 'Arial Narrow', sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --pop: cubic-bezier(0.3, 1.4, 0.5, 1);
  --row-btn: 44px;
  color-scheme: light;
}

/* Dark: Tickmark's night palette. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f0f0e; --paper: #151513; --ink: #ecebe4; --mute: #9c9b92;
    --rule-faint: #3a3a36; --rule-row: #262623; --track: #5c5b55; --press: #232320;
    --panel: #151513; --panel-rule: #3a3a36; --scrim: rgb(10 10 9 / 0.55);
    --frost: rgb(21 21 19 / 0.72);
    --frost-mute: #d0cfc6;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0f0f0e; --paper: #151513; --ink: #ecebe4; --mute: #9c9b92;
  --rule-faint: #3a3a36; --rule-row: #262623; --track: #5c5b55; --press: #232320;
  --panel: #151513; --panel-rule: #3a3a36; --scrim: rgb(10 10 9 / 0.55);
  --frost: rgb(21 21 19 / 0.72);
  --frost-mute: #d0cfc6;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

/* Scrollbars in the same square, flat terms as everything else. A phone keeps
   its own, which only show while scrolling. */
@media (pointer: fine) {
  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--track); }
  ::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background: var(--ink); }
  ::-webkit-scrollbar-button { display: none; }
  @supports not selector(::-webkit-scrollbar) {
    * { scrollbar-width: thin; scrollbar-color: var(--track) transparent; }
  }
}
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--ink);
  font: 12px/1.35 var(--mono);
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
#app { position: fixed; inset: 0; }
button, input, select, textarea { font: inherit; color: inherit; border-radius: 0; }
button { margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.4; }
a { color: inherit; }
code { font: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
mark { background: var(--accent); color: var(--on-accent); }

.label { font-size: 10px; color: var(--mute); letter-spacing: 0.08em; text-transform: uppercase; }
.section-label { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; }

/* Frame */
.root { height: 100%; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
/* What Safari 26 tints its bars from: see applyTheme. */
.edge { position: fixed; left: 0; right: 0; z-index: 10; height: 1px; background: var(--bg); pointer-events: none; }
.edge-top { top: 0; }
.edge-bottom { bottom: 0; }

.head {
  flex: none; display: flex; align-items: stretch; height: 40px;
  border-bottom: 1px solid var(--ink); padding-left: 14px; gap: 12px;
}
.head > * { align-self: center; }
.head-mark { font-weight: 600; letter-spacing: 0.08em; }
.head-count { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-status { white-space: nowrap; }
.head-theme { align-self: stretch; width: 64px; border-left: 1px solid var(--ink); font-size: 10px; letter-spacing: 0.08em; }
.head-theme:hover { background: var(--press); }
/* Against AUTO with no gap, so hovering fills the whole cell. */
.head-frost { margin-right: -12px; }
.panes { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.pane { min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.pane-list { flex: 1; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.tabbar { display: none; }

/* Search box */
.pane-search { container-type: inline-size; background: var(--paper); }
.query { flex: none; background: var(--bg); padding: 8px 14px 10px; border-bottom: 1px solid var(--ink); display: flex; flex-direction: column; gap: 8px; }
.query-head { display: flex; justify-content: space-between; align-items: baseline; }
.search-row { display: flex; align-items: stretch; height: 44px; }
.search-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding-left: 12px; background: var(--paper); border: 1px solid var(--ink); }
.search-box:focus-within { outline: 1px solid var(--ink); outline-offset: 2px; }
/* 16px, so iOS does not zoom the page on focus. */
.search-input { flex: 1; min-width: 0; height: 100%; font-size: 16px; background: transparent; border: 0; outline: 0; appearance: none; -webkit-appearance: none; }
.search-input::placeholder { color: var(--mute); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-x, .search-help { flex: none; width: 44px; height: 100%; display: grid; place-items: center; border-left: 1px solid var(--rule-faint); font-weight: 600; }
.search-x:hover, .search-help:hover, .search-filter:hover { background: var(--press); }
.search-filter { flex: none; width: 56px; margin-left: 6px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--ink); font-weight: 600; }
.search-filter[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.filter-n:empty { display: none; }

/* What the query was understood to mean */
.understood { display: flex; flex-wrap: wrap; gap: 4px; }
.token {
  display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 7px;
  background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 500;
  animation: pop-in 180ms var(--pop);
}
.token-k { font-size: 9px; letter-spacing: 0.08em; opacity: 0.65; }
.notice-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.notice s { color: var(--mute); }

/* The chart and the example searches */
.explore { background: var(--bg); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--ink); }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.bars { display: flex; align-items: stretch; height: 84px; border-bottom: 1px solid var(--ink); }
.bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; position: relative; }
.bar-track { flex: 1; min-height: 0; display: flex; align-items: flex-end; margin-top: 12px; padding: 0 1px; position: relative; }
.bar-fill { display: block; width: 100%; height: 100%; background: var(--ink); transform-origin: center bottom; transition: transform 240ms var(--ease), background-color 160ms var(--ease); }
.bar-label { flex: none; height: 16px; text-align: center; font-size: 10px; color: var(--mute); order: 2; line-height: 16px; transform: translateY(17px); position: absolute; left: 0; right: 0; bottom: 0; }
.bar-n { position: absolute; top: -1px; left: 0; right: 0; text-align: center; font-size: 9px; color: var(--mute); opacity: 0; transition: opacity 120ms var(--ease); z-index: 1; pointer-events: none; }
.bar:hover .bar-n, .bar:focus-visible .bar-n, .bar[data-state='on'] .bar-n { opacity: 1; }
.bar:hover .bar-track { background: var(--press); }
.bar[data-state='off'] .bar-fill { background: var(--track); }
.bar[data-state='on'] .bar-fill { background: var(--accent); }
.chart { padding-bottom: 16px; }
.strip { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
.strip::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 8px;
  border: 1px solid var(--rule-faint); background: var(--paper); font-size: 11px; white-space: nowrap;
}
.chip span { color: var(--mute); font-size: 10px; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); animation: pop-in 180ms var(--pop); }
.chip[aria-pressed='true'] span { color: inherit; opacity: 0.7; }
.try { align-items: stretch; gap: 6px; }
/* Stays put while the examples scroll under it. */
.try .label { position: sticky; left: 0; z-index: 1; flex: none; display: flex; align-items: center; padding: 0 10px; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; box-shadow: -14px 0 0 var(--bg), 6px 0 0 var(--bg); }
.try-q { flex: none; min-height: 30px; padding: 0 10px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; white-space: nowrap; }
.try-q:hover { background: var(--ink); color: var(--paper); }

.seg { display: inline-flex; border: 1px solid var(--ink); }
.seg button { min-height: 24px; padding: 0 10px; font-size: 10px; letter-spacing: 0.04em; }
.seg button + button { border-left: 1px solid var(--ink); }
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--paper); animation: pop-in 180ms var(--pop); }

.picker-wrap { position: relative; display: inline-flex; align-items: center; }
.picker { appearance: none; -webkit-appearance: none; background: transparent; border: 1px solid var(--rule-faint); min-height: 26px; padding: 0 20px 0 7px; font-size: 10px; letter-spacing: 0.04em; color: var(--ink); cursor: pointer; max-width: 170px; }
.picker-wrap span { position: absolute; right: 6px; pointer-events: none; font-size: 9px; }
.picker option { background: var(--paper); color: var(--ink); }

/* Results */
.sortbar {
  position: sticky; top: 0; z-index: 3; background: var(--bg); border-bottom: 1px solid var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 14px; min-height: 37px;
}
.colhead { display: none; }

.sr {
  position: relative; display: grid; align-items: center;
  grid-template-columns: minmax(0, 1fr) auto auto var(--row-btn);
  grid-template-areas: 'name name grade add' 'meta meta meta add' 'place gps gps add';
  column-gap: 8px; padding-left: 14px; border-bottom: 1px solid var(--rule-row); background: var(--paper);
}
.sr.enter { animation: drop-in 160ms var(--ease) backwards; }
.sr:hover { background: var(--bg); }
.sr-open { position: absolute; inset: 0; z-index: 1; }
.sr-open:active { background: rgb(128 128 128 / 0.12); }
.sr-n, .sr-stars, .sr-prot, .sr-size { display: none; }
.sr-name { grid-area: name; padding-top: 8px; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-name b { font-weight: 500; }
.sr-place-w { display: none; }
.sr-grade { grid-area: grade; justify-self: end; padding-top: 8px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.sr-meta { grid-area: meta; font-size: 10px; letter-spacing: 0.04em; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-place { grid-area: place; font-size: 11px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-bottom: 8px; }
.sr-gps {
  grid-area: gps; position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px;
  min-height: 30px; margin-top: -6px; padding-bottom: 4px; font-size: 10.5px; white-space: nowrap; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 2px;
}
.sr-gps:hover { text-decoration-color: var(--ink); background: var(--press); }
.sr-video, .ch-video { display: none; }
.sr-add { grid-area: add; position: relative; z-index: 2; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; align-self: stretch; display: grid; place-items: center; min-height: 44px; border-left: 1px solid var(--rule-row); }
.sr-add:hover { background: var(--press); }
.sr-add[data-state='todo'] { background: var(--accent); color: var(--on-accent); border-left-color: var(--accent); }
.sr-add[data-state='sent'] { background: var(--ink); color: var(--paper); border-left-color: var(--ink); }

/* A full table once the pane is wide enough. */
@container (min-width: 720px) {
  .ch-video { display: block; }
  .colhead, .sr {
    display: grid; align-items: center; gap: 0;
    grid-template-columns: 44px minmax(0, 1fr) 72px 50px 44px 84px 84px 150px 44px;
    grid-template-areas: none; padding: 0 0 0 14px;
  }
  .sortbar { position: static; }
  .colhead { position: sticky; top: 0; z-index: 3; background: var(--bg); border-bottom: 1px solid var(--ink); min-height: 30px; font-size: 10px; letter-spacing: 0.08em; color: var(--mute); }
  .ch-grade, .ch-stars, .ch-prot, .ch-size, .ch-video { text-align: right; padding-right: 10px; white-space: nowrap; }
  .ch-gps { text-align: right; padding-right: 10px; }
  .sr { min-height: 38px; }
  .sr > * { grid-area: auto; }
  .sr-n { display: block; color: var(--mute); font-size: 10px; }
  .sr-name, .sr-grade { padding: 0; }
  .sr-name { padding-right: 10px; }
  .sr-place-w { display: inline; margin-left: 10px; color: var(--mute); font-size: 11px; }
  .sr-grade { justify-self: stretch; text-align: right; padding-right: 10px; }
  .sr-stars, .sr-prot, .sr-size { display: block; text-align: right; padding-right: 10px; font-size: 11px; color: var(--mute); white-space: nowrap; }
  .sr-stars { color: var(--ink); }
  .sr-video { display: flex; justify-content: flex-end; align-items: center; gap: 3px; align-self: stretch; padding-right: 10px; font-size: 11px; color: var(--mute); }
  button.sr-video { position: relative; z-index: 2; color: var(--ink); }
  button.sr-video:hover { color: var(--accent); }
  .sr-meta, .sr-place { display: none; }
  .sr-gps { margin: 0; padding: 0 10px 0 0; min-height: 37px; }
  .sr-add { min-height: 37px; }
}

.more { padding: 14px; text-align: center; color: var(--mute); }
.more-btn { min-height: 40px; padding: 0 14px; border: 1px solid var(--ink); color: var(--ink); font-size: 11px; }
.more-btn:hover { background: var(--press); }
.end { font-size: 10px; letter-spacing: 0.08em; }
.empty { padding: 28px 14px; color: var(--mute); font-size: 11px; letter-spacing: 0.04em; line-height: 1.6; }
.empty p { margin: 8px 0 0; }
.relax { margin-top: 16px; max-width: 420px; }
.relax-row { display: flex; width: 100%; justify-content: space-between; min-height: 44px; align-items: center; border-bottom: 1px solid var(--rule-row); color: var(--ink); font-size: 11px; text-align: left; }
.relax-row:hover { background: var(--press); }
.relax-row b { font-weight: 600; }
.relax .label { padding-bottom: 6px; border-bottom: 1px solid var(--ink); }

/* Lists */
.tl-head { flex: none; display: flex; align-items: center; justify-content: space-between; height: 44px; padding-left: 14px; border-bottom: 1px solid var(--ink); }
.tl-menu { flex: none; align-self: stretch; width: 64px; font-size: 10px; letter-spacing: 0.08em; border-left: 1px solid var(--ink); }
.tl-menu:hover { background: var(--press); }
.tl-head .section-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-back { align-self: stretch; margin: 0 10px 0 -14px; padding: 0 12px 0 14px; font-size: 10px; letter-spacing: 0.08em; white-space: nowrap; }
.tl-back:hover { background: var(--press); }
.ll-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; width: 100%; min-height: 54px; padding: 8px 14px; text-align: left; border-bottom: 1px solid var(--rule-row); }
.ll-row:hover { background: var(--press); }
.ll-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ll-sub { grid-column: 1; font-size: 10px; letter-spacing: 0.04em; color: var(--mute); }
.ll-count { grid-column: 2; grid-row: 1 / 3; font-weight: 600; font-size: 13px; }
.ll-bar { grid-column: 1 / -1; height: 3px; margin-top: 3px; background: var(--rule-faint); }
.ll-bar span { display: block; height: 100%; background: var(--accent); }
.ll-row.ll-logbook, .ll-row.ll-logbook:hover { background: var(--accent); color: var(--on-accent); border-bottom-color: var(--ink); }
.ll-row.ll-logbook:hover { filter: brightness(1.08); }
.ll-logbook .ll-sub { color: inherit; }
.add-of { font-size: 13px; }
.add-of strong { font-weight: 600; }
.add-list { border-top: 1px solid var(--rule-row); }
.add-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; width: 100%; min-height: 40px; text-align: left; border-bottom: 1px solid var(--rule-row); }
.add-row:hover { background: var(--press); }
.add-box { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--ink); color: var(--on-accent); transition: background-color 160ms var(--ease); }
.add-row[aria-pressed='true'] .add-box { background: var(--accent); border-color: var(--accent); }
.add-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-n { padding: 0 2px 0 8px; font-size: 10px; color: var(--mute); }
.add-new { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; }
.add-new .field { padding: 4px 8px; }
.add-new button { padding: 0 12px; border: 1px solid var(--ink); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; }
.add-new button:disabled { opacity: 0.4; }
.menu-note { margin: 0; font-size: 10px; letter-spacing: 0.04em; color: var(--mute); }
.climb-lists { font-size: 11px; color: var(--mute); }
.tl-summary:not(:empty) { padding: 12px 14px; border-bottom: 1px solid var(--ink); display: flex; flex-direction: column; gap: 12px; }
.tl-total { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.tl-big { font-size: 44px; font-weight: 500; line-height: 1.05; letter-spacing: -0.02em; }
.tl-big span { font-size: 18px; letter-spacing: 0; color: var(--mute); }
.tl-progress { height: 6px; background: var(--rule-faint); margin-top: 6px; }
.tl-progress span { display: block; height: 100%; background: var(--accent); transition: width 240ms var(--ease); }
.tl-stats { margin: 0; display: grid; gap: 3px; min-width: 150px; }
.tl-stats div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.tl-stats dd { margin: 0; font-weight: 600; }
.pyr-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.legend { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--mute); }
.sw { display: inline-block; width: 8px; height: 8px; margin-left: 8px; }
.sw-sent { background: var(--accent); }
.sw-todo { background: var(--track); }
.pyr-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 24px; align-items: center; gap: 6px; height: 16px; font-size: 10px; }
.pyr-label { color: var(--mute); }
.pyr-track { display: flex; height: 10px; gap: 2px; }
.pyr-track i { display: block; height: 100%; transition: width 240ms var(--ease); }
.pyr-sent { background: var(--accent); }
.pyr-todo { background: var(--track); }
.pyr-n { text-align: right; }
.tl-controls { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 14px; background: var(--bg); border-bottom: 1px solid var(--ink); }
.tl-group { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 2px 0 2px 14px; background: var(--bg); border-bottom: 1px solid var(--rule-faint); font-size: 10px; letter-spacing: 0.04em; }
.tl-group-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mute); }
.tl-group-gps { flex: none; display: inline-flex; align-items: center; gap: 3px; min-height: 30px; padding: 0 12px; text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 2px; }
.tl-group-gps:hover { background: var(--press); text-decoration-color: var(--ink); }
.swipe-row { position: relative; overflow: hidden; }
.swipe-action { position: absolute; top: 0; right: 0; bottom: 0; width: 88px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }
.swipe-content { position: relative; background: var(--paper); touch-action: pan-y; }
.tl-video { display: grid; place-items: center; }
.tl-video:hover { color: var(--accent); }
.tl-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) 28px auto; align-items: stretch; min-height: 50px; border-bottom: 1px solid var(--rule-row); }
.tl-tick { display: grid; align-items: center; justify-items: center; padding-left: 4px; }
.tl-tick::before { content: ''; grid-area: 1 / 1; width: 20px; height: 20px; border: 1px solid var(--ink); transition: background-color 160ms var(--ease); }
.tl-tick svg { grid-area: 1 / 1; z-index: 1; color: var(--on-accent); }
.tl-tick:hover::before { background: var(--press); }
.tl-tick[aria-pressed='true']::before { background: var(--accent); border-color: var(--accent); }
.tl-main { display: flex; flex-direction: column; justify-content: center; gap: 0; min-width: 0; padding: 6px 8px 6px 0; text-align: left; }
.tl-main:hover .tl-name { text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 2px; }
.tl-name { font-size: 13px; line-height: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-row.sent .tl-name { color: var(--mute); }
.tl-sub { font-size: 10px; letter-spacing: 0.04em; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 13px; }
.tl-line { display: block; font-size: 10px; line-height: 15px; letter-spacing: 0.04em; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 13px; }
.tl-line[data-depth='1'] { margin-left: 3px; padding-left: 9px; border-left: 1px solid var(--track); }
.tl-line[data-depth='2'] { margin-left: 3px; padding-left: 21px; border-left: 1px solid var(--track); }
.tl-line[data-role]::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border: 1px solid var(--mute); }
.tl-line[data-role='lead'] { color: var(--ink); font-weight: 500; }
.tl-line[data-role='lead']::before { background: var(--accent); border-color: var(--accent); }
.tl-line[data-role='skip'] { opacity: 0.6; }
.tl-grade { align-self: center; font-weight: 600; font-size: 13px; padding-right: 12px; white-space: nowrap; }
.tl-x { display: none; width: 34px; place-items: center; border-left: 1px solid var(--rule-row); color: var(--mute); }
.tl-x:hover { background: var(--press); color: var(--ink); }
.tl-missing { padding: 12px 14px; }
@media (pointer: fine) {
  .tl-row { grid-template-columns: 46px minmax(0, 1fr) 28px auto 34px; }
  .tl-x { display: grid; }
}

/* Sheets */
.sheet {
  position: fixed; inset: 0; z-index: 20; display: flex; justify-content: center; align-items: flex-start;
  padding: calc(env(safe-area-inset-top) + 40px) 12px calc(env(safe-area-inset-bottom) + 12px);
  background: rgb(10 10 9 / 0);
  -webkit-backdrop-filter: blur(0px) saturate(100%);
  backdrop-filter: blur(0px) saturate(100%);
  transition: background-color 320ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-backdrop-filter 320ms cubic-bezier(0.4, 0, 0.2, 1), backdrop-filter 320ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sheet.open { background: var(--scrim); -webkit-backdrop-filter: blur(14px) saturate(110%); backdrop-filter: blur(14px) saturate(110%); }
.sheet-panel { width: 100%; max-width: 480px; max-height: 100%; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--panel-rule); outline: none; }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 44px; padding-left: 14px; border-bottom: 1px solid var(--panel-rule); }
.sheet-back { min-height: 44px; padding-right: 10px; margin-right: 4px; font-size: 10px; letter-spacing: 0.08em; }
.sheet-head .section-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-x { flex: none; width: 44px; height: 100%; display: grid; place-items: center; border-left: 1px solid var(--panel-rule); }
.sheet-x:hover, .sheet-back:hover { background: var(--press); }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.sheet.full { padding: 0; align-items: stretch; }
.sheet.full.open { background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; }
.sheet.full .sheet-panel { max-width: none; max-height: none; border: 0; padding-top: env(safe-area-inset-top); }
/* The scrollbar stays at the screen's edge; the page keeps a readable width. */
.sheet.full .sheet-body { padding: 14px max(14px, calc((100% - 560px) / 2)) calc(env(safe-area-inset-bottom) + 14px); }

/* Windows, on a wide screen */
.windows { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.win { position: absolute; pointer-events: auto; background: var(--panel); border: 1px solid var(--rule-faint); box-shadow: 0 10px 34px rgb(0 0 0 / 0.22); }
.win.active { border-color: var(--ink); }
[data-frost='on'] .win, [data-frost='on'] .popover { --mute: var(--frost-mute); }
[data-frost='on'] .win { background: transparent; }
[data-frost='on'] .win-clip, [data-frost='on'] .popover { background: var(--frost); -webkit-backdrop-filter: blur(30px) saturate(140%); backdrop-filter: blur(30px) saturate(140%); }
[data-frost='on'] .win .sheet-panel, [data-frost='on'] .popover .sheet-panel { background: transparent; }
.win .sheet-panel { width: 100%; max-width: none; max-height: none; height: 100%; border: 0; }
.win .sheet-head { cursor: move; touch-action: none; user-select: none; -webkit-user-select: none; }
.win .sheet-head button { cursor: pointer; }
.win.active .sheet-head { background: var(--ink); color: var(--paper); }
.win.active .sheet-head .section-label { color: var(--paper); }
.win.active .sheet-x { border-left-color: var(--paper); }
.win.active .sheet-x:hover, .win.active .sheet-back:hover { background: none; opacity: 0.7; }
.win-dragging { will-change: transform; }
.win-clip { position: relative; z-index: 1; display: flex; width: 100%; height: 100%; overflow: hidden; }
/* Sized from any edge: mostly outside the window, clear of the scrollbar. */
.win-edge { position: absolute; z-index: 2; touch-action: none; }
.win-edge[data-edge='n'] { top: -6px; left: 8px; right: 8px; height: 8px; cursor: ns-resize; }
.win-edge[data-edge='s'] { bottom: -6px; left: 8px; right: 8px; height: 8px; cursor: ns-resize; }
.win-edge[data-edge='e'] { right: -6px; top: 8px; bottom: 8px; width: 8px; cursor: ew-resize; }
.win-edge[data-edge='w'] { left: -6px; top: 8px; bottom: 8px; width: 8px; cursor: ew-resize; }
.win-edge[data-edge='nw'] { top: -6px; left: -6px; width: 14px; height: 14px; cursor: nwse-resize; }
.win-edge[data-edge='ne'] { top: -6px; right: -6px; width: 14px; height: 14px; cursor: nesw-resize; }
.win-edge[data-edge='sw'] { bottom: -6px; left: -6px; width: 14px; height: 14px; cursor: nesw-resize; }
/* The corner you are likely to reach for, marked like a crop mark. */
.win-edge[data-edge='se'] { bottom: -6px; right: -6px; width: 20px; height: 20px; cursor: nwse-resize; }
.win-edge[data-edge='se']::after { content: ''; position: absolute; right: 6px; bottom: 6px; width: 9px; height: 9px; border-right: 2px solid var(--track); border-bottom: 2px solid var(--track); }
.win.active .win-edge[data-edge='se']::after, .win-edge[data-edge='se']:hover::after { border-color: var(--ink); }
/* Vertical tabs: a rail of grades that opens over the page under the pointer. */
:root { --rail: 44px; }
:root.tabs-kept { --rail: 240px; }
/* In step with the tabs, so one never slides over the other. */
@media (min-width: 860px) { .root { margin-left: var(--rail); transition: margin-left 140ms var(--ease); } }
.win-tabs { position: fixed; left: 0; top: 0; bottom: 0; z-index: 16; width: var(--rail); overflow: hidden; background: var(--ink); color: var(--paper); transition: width 140ms var(--ease); --tab-hover: color-mix(in srgb, var(--paper) 16%, var(--ink)); --tab-line: color-mix(in srgb, var(--paper) 28%, var(--ink)); }
.win-tabs:hover, .win-tabs:has(:focus-visible) { width: 240px; transition-delay: 120ms; }
:root:not(.tabs-kept) .win-tabs:hover, :root:not(.tabs-kept) .win-tabs:has(:focus-visible) { box-shadow: 8px 0 30px rgb(0 0 0 / 0.22); }
:root .win-tabs.win-tabs-closing { width: var(--rail); box-shadow: none; transition-delay: 0ms; }
.win-tabs.win-tabs-menu { width: 240px; }
.win-tabs-inner { display: flex; flex-direction: column; width: 240px; height: 100%; }
.win-tabs-head { flex: none; display: flex; align-items: center; height: 40px; border-bottom: 1px solid var(--tab-line); }
.win-keep { margin-left: auto; align-self: stretch; padding: 0 12px; font-size: 10px; letter-spacing: 0.08em; }
.win-keep:hover { background: var(--tab-hover); }
.win-tab-short { flex: none; width: 43px; overflow: hidden; text-align: center; font-size: 9px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.win-tab-label { flex: 1; min-width: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-launch, .win-tab { display: flex; align-items: center; width: 100%; min-height: 34px; padding-right: 8px; text-align: left; }
.win-launch { flex: none; border-bottom: 1px solid var(--tab-line); background: var(--accent); color: var(--on-accent); }
.win-launch .win-tab-label { font-weight: 600; letter-spacing: 0.08em; font-size: 10px; }
.win-launch:hover { background: var(--accent); filter: brightness(1.08); }
.win-tabrow:hover { background: var(--tab-hover); }
.win-tabs [aria-pressed='true'].win-tab { background: var(--paper); color: var(--ink); }
/* Stays orange in front; heavier type says so. */
.win-tabs [aria-pressed='true'].win-launch .win-tab-label { font-weight: 800; }
.win-launch.min, .win-tab.min { opacity: 0.6; }
.win-tab.min .win-tab-label::before, .win-launch.min .win-tab-label::before { content: '− '; }
/* Tab groups: colour is fixed in both themes, so its text is too. */
.win-group { display: flex; align-items: center; width: 100%; min-height: 30px; padding-right: 10px; color: #121212; text-align: left; }
.win-group .win-tab-short { font-size: 11px; }
.win-group .win-tab-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; }
.win-group:hover { filter: brightness(1.1); }
.win-group-n { flex: none; font-size: 10px; font-weight: 700; }
.win-tabs-list { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
.win-tabs-list::-webkit-scrollbar { display: none; }
.win-tabrow { position: relative; border-bottom: 1px solid var(--tab-line); }
.win-tabrow:hover .win-tab, .win-tabrow:has(:focus-visible) .win-tab { padding-right: 34px; }
.win-tab-x { display: none; position: absolute; top: 0; right: 0; bottom: 0; width: 30px; place-items: center; }
.win-tabrow:hover .win-tab-x, .win-tabrow:has(:focus-visible) .win-tab-x { display: grid; }
.win-tab[aria-pressed='true'] + .win-tab-x { color: var(--ink); }
.win-tab-x:hover { opacity: 0.6; }
.win-lists .sheet-body { padding: 0; gap: 0; overflow: hidden; }
/* Against the × with no gap, so they are all equal cells. */
.win-min, .win-max { margin-right: -8px; }
.win-max::before, .win-max::after { content: ''; grid-area: 1 / 1; box-sizing: border-box; }
.win-max::before { width: 9px; height: 9px; border: 1.5px solid currentColor; }
.win-max::after { display: none; }
.win.max .win-max::before { width: 8px; height: 8px; transform: translate(-1.5px, 1.5px); }
.win.max .win-max::after { display: block; width: 8px; height: 8px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: translate(1.5px, -1.5px); }
.win.max { border-width: 0 0 1px; box-shadow: none; }
.win.max .win-edge { display: none; }
/* A right-click menu */
.menu { position: fixed; z-index: 19; display: flex; flex-direction: column; width: 220px; padding: 6px; gap: 2px; background: var(--panel); color: var(--ink); border: 1px solid var(--ink); box-shadow: 0 10px 34px rgb(0 0 0 / 0.32); outline: none; }
.menu .field { font-size: 12px; padding: 5px 8px; margin-bottom: 4px; }
.menu-item { min-height: 30px; padding: 0 8px; text-align: left; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item:hover, .menu-item:focus-visible { background: var(--ink); color: var(--paper); }
.menu-swatches { display: flex; gap: 4px; padding: 2px 0 6px; }
.menu-swatch { flex: 1; height: 24px; }
.menu-swatch[aria-pressed='true'] { outline: 2px solid var(--ink); outline-offset: 1px; }

/* Mission control */
.mission-btn { position: fixed; right: 20px; bottom: 20px; z-index: 17; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 22px rgb(0 0 0 / 0.35); transition: transform 140ms var(--ease), background-color 140ms var(--ease); }
.mission-btn:hover { transform: scale(1.08); }
.mission-btn[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.mission-scrim { position: fixed; inset: 0; pointer-events: auto; background: var(--scrim); -webkit-backdrop-filter: blur(14px) saturate(110%); backdrop-filter: blur(14px) saturate(110%); }
.windows.mission .win, .windows.mission-leaving .win { transition: transform 240ms var(--ease); }
.windows.mission .win { cursor: pointer; }
.windows.mission .win > * { pointer-events: none; }
.windows.mission .win:hover { outline: 3px solid var(--accent); outline-offset: 3px; }
/* Reads straight down, the video above the writing. Full screen, or a window wide
   enough for it, puts the video beside the rest, which is as wide as a window opens
   (SIZE in windows.js) when it can be. No element moves, so a video never reloads. */
.climb-col { display: contents; }
/* Nothing is cut off while it moves between columns, and the video travels on top. */
.climb-gliding > .climb-col { overflow: visible !important; }
.climb-gliding .video { position: relative; z-index: 1; }
.video { order: 1; }
.about, .near { order: 2; }
.win:not(.win-lists) .sheet-panel { container: climb / inline-size; }
.win.max:not(.win-lists) .sheet-body:not(:has(.climb-media)) { padding-right: max(14px, calc(100% - 654px)); }
.win.max .sheet-body:has(.climb-media) { flex-direction: row; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.win.max .sheet-body:has(.climb-media) > .climb-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; overflow-y: auto; }
.win.max .climb-main { flex: 0 0 58%; padding: 14px; }
.win.max .climb-media { flex: 1 1 0; border-left: 1px solid var(--rule-faint); }
.win.max .climb-media .video { border: 0; }
@container climb (min-width: 1280px) {
  .win .sheet-body:has(.climb-media) { flex-direction: row; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
  .win .sheet-body:has(.climb-media) > .climb-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; overflow-y: auto; }
  .win .sheet-body:has(.climb-media) > .climb-main, .win.max .sheet-body:has(.climb-media) > .climb-main { flex: 0 0 640px; padding: 14px; }
  .win .climb-media { flex: 1 1 0; border-left: 1px solid var(--rule-faint); }
  .win .climb-media .video { border: 0; }
}
}
.win-moving-size { transition: left 180ms var(--ease), top 180ms var(--ease), width 180ms var(--ease), height 180ms var(--ease); }
.win-min::before { content: ''; width: 8px; height: 1.5px; background: currentColor; }
.win-all { flex: none; min-height: 34px; font-size: 10px; letter-spacing: 0.08em; border-top: 1px solid var(--tab-line); }
.win-all:hover { background: var(--tab-hover); }
.win-moving { user-select: none; -webkit-user-select: none; }

/* A popover, out of the button that opened it */
.popover { position: fixed; z-index: 18; transform-origin: left top; width: 400px; max-width: calc(100vw - 24px); background: var(--panel); border: 1px solid var(--ink); box-shadow: 0 10px 34px rgb(0 0 0 / 0.28); }
.popover .sheet-panel { max-width: none; border: 0; }

/* A climb */
.climb-name { margin: 0; font: 700 30px/1.05 var(--cond); letter-spacing: 0; }
.climb-wall { color: var(--mute); margin-top: -6px; }
.specs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--rule-faint); }
.spec { grid-column: span 2; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; border-right: 1px solid var(--rule-faint); }
.spec-big { grid-column: span 3; border-bottom: 1px solid var(--rule-faint); }
.spec:nth-child(2), .spec:nth-child(5) { border-right: 0; }
.spec-v { font-weight: 500; }
.spec-big .spec-v { font-size: 34px; font-weight: 500; line-height: 1.05; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec-long .spec-v { font-size: 22px; line-height: 38px; }
.maplink { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 12px; border: 1px solid var(--ink); text-decoration: none; }
.maplink:hover { background: var(--press); }
.maplink-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.maplink-gps { font-size: 15px; font-weight: 500; white-space: nowrap; }
.climb-actions { display: flex; flex-direction: column; gap: 10px; }
.video { border: 1px solid var(--ink); }
.video-screen { aspect-ratio: 16 / 9; background: #000; }
.video-screen iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-play { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; }
.video-play img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-badge { position: absolute; top: 50%; left: 50%; width: 64px; height: 44px; margin: -22px 0 0 -32px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.video-play:hover .video-badge { background: var(--ink); color: var(--paper); }
.video-foot { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-top: 1px solid var(--ink); }
.video-caption { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.video-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-out { flex: none; min-height: 30px; display: inline-flex; align-items: center; font-size: 10px; letter-spacing: 0.06em; }
.video-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: center; width: 100%; min-height: 36px; padding: 0 10px; border-top: 1px solid var(--rule-row); text-align: left; font-size: 11px; }
.video-row:hover { background: var(--press); }
.video-row[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.maplink-go { font-size: 10px; letter-spacing: 0.06em; white-space: nowrap; }
.outlink { align-self: flex-start; min-height: 30px; display: inline-flex; align-items: center; font-size: 10px; letter-spacing: 0.06em; text-underline-offset: 2px; text-decoration-color: var(--track); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.act { min-height: 48px; padding: 0 12px; border: 1px solid var(--ink); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; }
.act:hover { background: var(--press); }
.act-go { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.act-go:hover { background: var(--accent); }
.act-wide { width: 100%; }
a.act { display: grid; place-items: center; text-align: center; text-decoration: none; }
.sent-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--rule-faint); }
.sent-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sent-body .tl-line { font-size: 11px; line-height: 16px; white-space: normal; }
.sent-acts { display: flex; gap: 12px; margin-top: 4px; }
.sent-acts button { min-height: 32px; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-decoration: underline; text-decoration-color: var(--track); text-underline-offset: 2px; }
.sent-mark { flex: none; width: 22px; height: 22px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.sent-mark.part { background: none; border: 1px solid var(--ink); }
.about p { margin: 0; padding-top: 8px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.near-head { padding: 6px 0; border-bottom: 1px solid var(--ink); }
.near-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; gap: 10px; width: 100%; min-height: 40px; align-items: center; border-bottom: 1px solid var(--rule-row); text-align: left; }
.near-row:hover { background: var(--press); }
.near-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.near-grade { font-weight: 600; }
.near-stars { color: var(--mute); font-size: 11px; text-align: right; }
.send-of { font-size: 13px; }
.send-of strong { font-weight: 600; }
.style-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 1px solid var(--ink); }
.style-grid button { min-height: 30px; padding: 0 2px; font-size: 10px; letter-spacing: 0.04em; }
.style-grid button + button { border-left: 1px solid var(--ink); }
.style-grid button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.log-form { display: flex; flex-direction: column; gap: 4px; }
.log-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; }
.log-row .field { padding: 2px 6px; }
.log-row .act { min-height: 36px; margin-top: 6px; }
.log-row textarea.field { padding: 6px; }
.log-row:has(textarea) { align-items: start; }
.log-row:has(textarea) .label { padding-top: 7px; }
.log-branch { display: flex; flex-direction: column; margin-top: -2px; }
.log-line { position: relative; margin-left: 3px; padding: 2px 0 2px 9px; border-left: 1px solid var(--track); }
.log-line .style-grid button { min-height: 26px; }
.pitch-head { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; }
.pitch-n { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
.pitch-n::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 4px; border: 1px solid var(--mute); transition: background-color 160ms var(--ease); }
.pitch-n[data-role='lead']::before { background: var(--accent); border-color: var(--accent); }
.pitch-n[data-role='skip'] { opacity: 0.6; }
.log-deep { padding-left: 43px; }
.log-deep::before { content: ''; position: absolute; top: 0; bottom: 0; left: 12px; border-left: 1px solid var(--track); }
.pitch-count { display: flex; align-items: center; gap: 4px; min-height: 28px; }
.pitch-count .label { flex: 1; }
.pitch-count button { width: 30px; height: 24px; border: 1px solid var(--ink); }
.pitch-count button:disabled { opacity: 0.3; }
.sheet-body > .act { min-height: 36px; }
.act:disabled { opacity: 0.6; cursor: default; }
.act:disabled:hover { background: none; }
.field { width: 100%; padding: 8px 10px; font-size: 16px; background: var(--bg); border: 1px solid var(--ink); }
/* iOS gives date inputs a wide minimum and centres the value. */
input[type='date'].field { display: block; min-width: 0; max-width: 100%; min-height: 30px; -webkit-appearance: none; appearance: none; text-align: left; }
input[type='date'].field::-webkit-date-and-time-value { text-align: left; }
/* Grows with what is typed, rather than being dragged. */
textarea.field { resize: none; field-sizing: content; min-height: 112px; max-height: 45vh; font-size: 14px; }
.filters-body { display: flex; flex-direction: column; gap: 14px; }
.filter-sec { display: flex; flex-direction: column; gap: 6px; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.filters-done { margin-top: 4px; }
.help-lead { margin: 0; color: var(--mute); }
.help-lead code { color: var(--ink); }
.help-sec .label { padding: 4px 0; border-bottom: 1px solid var(--ink); }
.help-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; width: 100%; min-height: 36px; padding: 4px 0; align-items: center; text-align: left; border-bottom: 1px solid var(--rule-row); }
.help-row:hover { background: var(--press); }
.help-row code { font-weight: 600; }
.help-row span { color: var(--mute); font-size: 11px; }

/* Toast */
.toast {
  position: fixed; z-index: 30; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 72px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px); min-height: 38px; padding: 6px 12px;
  background: var(--ink); color: var(--paper); font-size: 11px; letter-spacing: 0.04em;
}
.toast span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast button { flex: none; min-height: 32px; padding: 0 8px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.fatal { padding: 24px; }

/* Phones: one pane at a time. */
@media (max-width: 859.98px) {
  .win-tabs, .windows, .head-frost, .mission-btn { display: none; }
  .panes { display: block; }
  .pane { height: 100%; }
  .pane-list { border-left: 0; background: var(--paper); }
  .root[data-tab='search'] .pane-list, .root[data-tab='list'] .pane-search { display: none; }
  .root .pane { animation: fade-in 120ms var(--ease) backwards; }
  .head-status { display: none; }
  .tabbar {
    flex: none; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 52px; font-size: 10px; letter-spacing: 0.04em; color: var(--mute); }
  .tab b { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink); }
  .tab[aria-current='page'] { background: var(--ink); color: var(--paper); }
  .tab[aria-current='page'] b { color: var(--paper); }
  .tab span { display: inline-block; }
  .sheet { padding-top: calc(env(safe-area-inset-top) + 12px); }
}

@keyframes pop-in { from { transform: scale(0.82); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes fade-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
