/* The tracker's look: Linear's layout and density in Audiokids' colours and
   type. The palette is the shared Audiokids web theme (Marker's remote,
   apps/BITS/Marker/Resources/web/static/theme.css), whose values mirror the
   plug-ins' audiokids_Palette.h. */

:root {
  --accent: #00fffc;
  --accent-dim: #366b6c;
  --urgent: #ff0004;
  --bg: #161616;
  --panel: #1b1b1b;
  --surface: #202020;
  --raised: #2d2d2e;
  --hover: #262627;
  --selected: #2a2f2f;
  --text: #ffffff;
  --text-2: #c9c9c9;
  --muted: #808080;
  --line: #2c2c2c;
  --line-strong: #4d4d4d;
  --late: #ff8a65;
  --radius: 6px;
  --font: 'Century Gothic', 'AK Century Gothic', 'Avenir Next', 'Avenir', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--surface); color: var(--text); font: 13px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; overscroll-behavior: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 8px; outline: none; caret-color: var(--accent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent-dim); }
textarea { width: 100%; resize: vertical; }
::selection { background: var(--accent); color: #000; }
* { scrollbar-color: var(--line-strong) transparent; scrollbar-width: thin; }
code { font-family: var(--mono); font-size: 12px; background: var(--raised); padding: 1px 4px; border-radius: 4px; }
kbd { font: 11px var(--mono); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; color: var(--muted); margin-left: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.late { color: var(--late); }
.error { color: var(--urgent); }
.icon { flex: none; display: block; }

button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: 0.45; cursor: default; }
button.primary { background: var(--accent); color: #000; border-radius: var(--radius); padding: 6px 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
button.primary kbd { color: #000; border-color: rgba(0, 0, 0, 0.35); }
button.ghost { color: var(--text-2); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 4px 10px; }
button.ghost:hover { border-color: var(--muted); color: var(--text); }
button.ghost.small { padding: 1px 6px; font-size: 12px; border-color: transparent; color: var(--muted); }
.icon-button { width: 24px; height: 24px; border-radius: var(--radius); color: var(--muted); font-size: 18px; line-height: 22px; text-align: center; }
.icon-button:hover { background: var(--hover); color: var(--text); }
.icon-button.small { width: 20px; height: 20px; font-size: 15px; line-height: 18px; }

/* ------------------------------------------------------------- layout */

.app { display: flex; min-height: 100dvh; }
.splash { min-height: 100dvh; background: var(--bg); }
/* The inset under the clock is a border, not padding: padding scrolls with the list, so the list would pass under the clock. */
.sidebar { width: 232px; flex: none; background: var(--bg); border-right: 1px solid var(--line); border-top: var(--safe-top) solid var(--bg); padding: 10px 8px 8px; display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.brand { display: flex; align-items: center; padding: 4px 6px 10px; }
.wordmark { font-weight: 700; letter-spacing: 0.18em; font-size: 12px; flex: 1; }
.wordmark span { color: var(--accent); font-weight: 400; }
.search-button { display: flex; align-items: center; justify-content: space-between; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius); padding: 5px 8px; margin: 0 2px 10px; font-size: 12px; }
.search-button:hover { border-color: var(--line-strong); color: var(--text-2); }
.copy-note { margin: 0 2px 10px; padding: 6px 8px; border: 1px solid var(--accent-dim); border-radius: var(--radius); font-size: 12px; color: var(--text-2); }
.sidebar a { display: flex; align-items: center; gap: 8px; color: var(--text-2); padding: 5px 8px; border-radius: var(--radius); text-decoration: none; }
.sidebar a:hover { background: var(--hover); }
.sidebar a.active { background: var(--raised); color: var(--text); }
.sidebar .count { color: var(--muted); font-size: 12px; }
.sidebar .section { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; padding: 14px 8px 4px; display: flex; align-items: center; justify-content: space-between; }
.sidebar .section a { padding: 0 4px; text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--muted); }
.team-key { font: 10px var(--mono); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 3px; }
.sidebar .spacer { flex: 1; }
.sidebar .footer { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; padding: 8px; border-top: 1px solid var(--line); margin-top: 6px; }
.sidebar .footer span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .footer a { padding: 0; color: var(--muted); }
.offline { color: var(--late); }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bar { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-top)) 20px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 5; min-height: 46px; }
.bar h1 { font-size: 14px; margin: 0; font-weight: 700; }
.menu-button { display: none; font-size: 18px; color: var(--muted); width: 28px; }
.toggle { color: var(--muted); padding: 3px 8px; border-radius: var(--radius); }
.toggle.on { background: var(--raised); color: var(--text); }
.empty { color: var(--muted); padding: 48px 20px; text-align: center; }

/* ------------------------------------------------------------ filters */

.filters { display: flex; align-items: center; gap: 8px; padding: 8px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; position: relative; }
.filter-search { width: 220px; padding: 4px 8px; }
.add-filter { padding: 3px 6px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 8px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; line-height: 19px; }
.chip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.chip.filter button { color: var(--muted); font-size: 13px; }
.chip.due.late { color: var(--late); border-color: var(--late); }
.archived { color: var(--muted); display: flex; align-items: center; gap: 4px; font-size: 12px; }
.archived input { margin: 0; }

/* -------------------------------------------------------------- list */

.list { padding-bottom: 80px; }
.group > header { display: flex; align-items: center; gap: 8px; padding: 6px 20px; background: var(--panel); border-bottom: 1px solid var(--line); cursor: pointer; position: sticky; top: 46px; z-index: 3; font-weight: 700; font-size: 12.5px; }
.caret { color: var(--muted); font-size: 10px; transition: transform 0.12s; width: 10px; }
.caret.open { transform: rotate(90deg); }
.row { display: flex; align-items: center; gap: 10px; padding: 0 20px; height: 38px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row.selected, .row:hover { background: var(--hover); }
.row.selected { box-shadow: inset 2px 0 0 var(--accent); }
.row.archived { opacity: 0.55; }
.row .cell { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 4px; flex: none; }
.row .cell:hover { background: var(--raised); }
.identifier { font: 11.5px var(--mono); color: var(--muted); flex: none; min-width: 58px; }
.row-text { flex: 1; min-width: 0; display: flex; }
.row .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub, .search-toggle, .sheet-bar, .picker-title { display: none; }
html.locked, html.locked body { overflow: hidden; }
.row .meta { display: flex; align-items: center; gap: 6px; flex: none; max-width: 50%; overflow: hidden; }
.row .when { color: var(--muted); font-size: 11.5px; min-width: 70px; text-align: right; }
.chip.project { border-style: dashed; }

.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-dim); color: var(--text); font-weight: 700; flex: none; letter-spacing: -0.02em; }
.avatar.bot { background: #4a3a6b; }
.avatar.nobody { border: 1.5px dashed var(--line-strong); background: none; }

/* ------------------------------------------------------------- board */

.board { display: flex; gap: 12px; padding: 14px 20px 80px; overflow-x: auto; align-items: flex-start; flex: 1; }
.column { width: 300px; flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px; min-height: 120px; }
.column.over { border-color: var(--accent-dim); }
.column > header { display: flex; align-items: center; gap: 8px; padding: 4px 6px 8px; font-weight: 700; font-size: 12.5px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin-bottom: 6px; cursor: pointer; }
.card:hover, .card.selected { border-color: var(--line-strong); }
.card.selected { box-shadow: inset 2px 0 0 var(--accent); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.card-title { margin-bottom: 6px; }
.card-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------- issue */

.crumb { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb strong { color: var(--text); font-family: var(--mono); font-weight: 400; }
.issue-body { display: flex; flex: 1; }
.issue .main { flex: 1; min-width: 0; padding: 24px 40px 120px; max-width: 900px; }
.issue .side { width: 260px; flex: none; border-left: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 46px; align-self: flex-start; }
.issue-title { font-size: 21px; margin: 0 0 14px; font-weight: 700; cursor: text; line-height: 1.3; }
.title-edit { font-size: 21px; font-weight: 700; margin-bottom: 14px; }
.prop { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius); text-align: left; width: 100%; }
.prop:hover { background: var(--hover); }
.prop-label { color: var(--muted); width: 72px; flex: none; font-size: 12px; }
.prop-value { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.prop-value .wrap { display: flex; gap: 4px; flex-wrap: wrap; }
.props-inline { display: none; }
.facts { color: var(--muted); font-size: 12px; padding: 14px 8px 0; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); margin-top: 10px; }
.description { min-height: 40px; padding: 6px 0; cursor: text; }
.description.placeholder { color: var(--muted); }
.editor textarea, .composer textarea, .create textarea { background: var(--bg); line-height: 1.5; }
.editor-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; }

.description, .markdown { overflow-wrap: anywhere; }
.description p, .markdown p { margin: 0 0 10px; }
.description h2, .description h3, .description h4, .description h5, .markdown h2, .markdown h3, .markdown h4, .markdown h5 { margin: 16px 0 8px; font-size: 14px; }
.description ul, .description ol, .markdown ul, .markdown ol { margin: 0 0 10px; padding-left: 22px; }
.description li.task, .markdown li.task { list-style: none; margin-left: -18px; }
.description pre, .markdown pre { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; overflow-x: auto; }
.description pre code, .markdown pre code { background: none; padding: 0; }
.description blockquote, .markdown blockquote { border-left: 2px solid var(--line-strong); margin: 0 0 10px; padding-left: 12px; color: var(--text-2); }
.description img, .markdown img { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.description hr, .markdown hr { border: 0; border-top: 1px solid var(--line); }

.subissues, .attachments, .thread { margin-top: 28px; }
.subissues > header, .attachments > header, .thread > header { display: flex; align-items: center; gap: 8px; font-weight: 700; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.subissue { display: flex; align-items: center; gap: 8px; padding: 6px 4px; color: var(--text); border-radius: var(--radius); }
.subissue:hover { background: var(--hover); text-decoration: none; }
.attachment { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.attachment img { height: 42px; width: 64px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.event { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 5px 4px; font-size: 12px; }
.event strong { color: var(--text-2); font-weight: 400; }
.event span:nth-child(2) { flex: 1; }
.comment { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0; background: var(--panel); }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.composer { margin-top: 12px; }
.issue.dragging .main { outline: 2px dashed var(--accent-dim); outline-offset: -8px; }
.drop-hint { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #000; padding: 8px 14px; border-radius: 999px; font-weight: 700; }

/* ----------------------------------------------------------- overlays */

.picker { position: fixed; z-index: 50; width: 260px; background: var(--raised); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55); overflow: hidden; }
.picker.centered { left: 50%; top: 22%; transform: translateX(-50%); width: 320px; }
.picker input { width: 100%; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: transparent; padding: 9px 12px; }
.picker input.date { color-scheme: dark; }
.picker ul, .palette ul { list-style: none; margin: 0; padding: 4px; max-height: 300px; overflow-y: auto; }
.picker li, .palette li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; cursor: pointer; }
.picker li.active, .palette li.active { background: var(--selected); }
.picker li.none, .palette li.none { color: var(--muted); cursor: default; }
.picker .hint { color: var(--muted); font-size: 11.5px; }
.picker .tick { color: var(--accent); }
.picker .check { width: 14px; height: 14px; border: 1.5px solid var(--line-strong); border-radius: 3px; flex: none; }
.picker .check.on { background: var(--accent); border-color: var(--accent); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 40; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.modal { width: min(560px, calc(100vw - 24px)); background: var(--raised); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); overflow: hidden; }
.modal.wide { width: min(720px, calc(100vw - 24px)); }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: transparent; padding: 14px 16px; font-size: 15px; }
.palette ul { max-height: 50vh; }
.create { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.create-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.create-title { border: 0; background: transparent; font-size: 18px; font-weight: 700; padding: 4px 0; width: 100%; }
.create-title:focus { border: 0; }
.create-description { border: 0; background: transparent !important; font-size: 14px; padding: 4px 0; min-height: 110px; }
.create-description:focus { border: 0; }
.create-notes { margin: -4px 0 0; padding: 0 0 0 16px; color: #f2c94c; font-size: 12px; }
.create-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line-strong); }
.chip-button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 3px 9px; color: var(--text); font-size: 12.5px; background: var(--surface); max-width: 260px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chip-button:hover, .chip-button:focus-visible { border-color: var(--muted); outline: none; }
.chip-button.empty { color: var(--muted); }
.chip-button.from-text { border-color: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent-dim); }
.chip-button.team { padding: 2px 6px; }
.chip-button .chip { line-height: 16px; }
.chip-icon { color: var(--muted); width: 14px; text-align: center; }
.create footer { display: flex; align-items: center; gap: 8px; }
.create footer label { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; }
.format-help { color: var(--muted); font-size: 12px; margin: 0; }
.reply { background: var(--bg); border-radius: var(--radius); padding: 8px 10px; margin: 0; white-space: pre-wrap; font: 12px var(--mono); color: var(--text-2); }
.help { padding: 18px 20px; }
.help h2 { margin: 0 0 12px; font-size: 15px; }
.help td { padding: 4px 12px 4px 0; }
.help kbd { margin-left: 0; }

.toasts { position: fixed; bottom: calc(18px + var(--safe-bottom)); right: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(440px, calc(100vw - 36px)); }
.toast { background: var(--raised); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); padding: 9px 12px; border-radius: var(--radius); white-space: pre-wrap; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); }
.toast.error { border-left-color: var(--urgent); }
.toast.warn { border-left-color: #f2c94c; }
.fab { display: none; }
.scrim { display: none; }

/* ----------------------------------------------------- sign in, settings */

.signin { min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 20px; }
.signin form { width: 340px; display: flex; flex-direction: column; gap: 10px; }
.signin .wordmark { font-size: 15px; margin-bottom: 10px; text-align: center; }
.signin input { padding: 10px 12px; font-size: 15px; }
.signin button.primary { padding: 10px; justify-content: center; font-size: 14px; }

.settings .tabs { display: flex; gap: 4px; padding: 10px 20px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.settings .tabs a { color: var(--muted); padding: 6px 10px; border-bottom: 2px solid transparent; white-space: nowrap; }
.settings .tabs a.active { color: var(--text); border-bottom-color: var(--accent); text-decoration: none; }
.settings .pane { padding: 18px 20px 80px; max-width: 980px; }
.settings h2 { font-size: 14px; margin: 18px 0 10px; }
.settings form { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin-bottom: 18px; }
.settings form.inline { flex-direction: row; max-width: 560px; }
.settings form.inline input { flex: 1; }
.settings form.grid { display: grid; grid-template-columns: repeat(2, 1fr); max-width: 640px; }
.settings label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
.settings label input, .settings label select { color: var(--text); font-size: 13px; }
.admin { border-collapse: collapse; width: 100%; }
.admin th { text-align: left; color: var(--muted); font-weight: 400; font-size: 12px; padding: 4px 8px; }
.admin td { padding: 4px 8px; border-top: 1px solid var(--line); }
.admin td input:not([type]), .admin td select { width: 100%; padding: 3px 6px; }
.fresh-key { background: var(--bg); border: 1px solid var(--accent-dim); border-radius: var(--radius); padding: 10px; margin-bottom: 14px; }
.fresh-key code { background: none; font-size: 13px; user-select: all; margin-right: 10px; }
.changelog h3 { color: var(--accent); }

/* ------------------------------------------------------------ phone */

@media (max-width: 760px) {
  /* Safari zooms into any field under 16 px when it is tapped, and the page stays zoomed. */
  input:not(.create-title), textarea:not(.title-edit), select { font-size: 16px !important; }

  .sidebar { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: transform 0.18s; width: 280px; padding-bottom: calc(12px + var(--safe-bottom)); }
  .sidebar.open { transform: none; box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6); }
  .sidebar a { padding: 9px 10px; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.5); }
  .menu-button { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: -8px; font-size: 22px; }
  .bar { padding-left: 12px; padding-right: 12px; gap: 6px; }
  .search-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--muted); border-radius: var(--radius); }
  .search-toggle.on { color: var(--accent); }
  .filters { padding: 8px 12px; display: none; }
  .filters.open { display: flex; }
  .filter-search { width: 100%; padding: 8px 10px; }

  /* Two-line rows: the whole row opens the issue, so its small buttons take no taps. */
  .row { padding: 10px 12px; height: auto; min-height: 60px; gap: 10px; align-items: flex-start; }
  .row .cell { pointer-events: none; margin-top: 1px; }
  .row > .identifier, .row > .meta { display: none; }
  .row-text { flex-direction: column; gap: 3px; }
  .row .title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 15px; line-height: 1.3; }
  .row-sub { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); font-size: 12px; }
  .row-sub .identifier { min-width: 0; font-size: 11.5px; }
  .group > header { padding: 10px 12px; }

  /* The issue: back button and properties sized for a finger, properties as a list. */
  .issue .side { display: none; }
  .props-inline { display: flex; flex-direction: column; margin: 0 -14px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .props-inline .prop { min-height: 48px; padding: 8px 14px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .props-inline .prop:last-child { border-bottom: 0; }
  .props-inline .prop-label { width: auto; flex: none; font-size: 14px; }
  .props-inline .prop-value { margin-left: auto; justify-content: flex-end; text-align: right; }
  .issue .main { padding: 16px 14px 140px; }
  .issue .bar .ghost { padding: 5px 8px; font-size: 13px; }
  .issue-title { font-size: 22px; }
  .description, .markdown { font-size: 15px; }

  .fab { display: flex; align-items: center; justify-content: center; position: fixed; right: 18px; bottom: calc(22px + var(--safe-bottom)); width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #000; font-size: 30px; z-index: 15; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }

  /* Boxes are full-screen sheets: their actions sit in the top bar, where the keyboard never covers them. */
  .backdrop { padding: 0; align-items: stretch; }
  .modal, .modal.wide { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
  .sheet-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 2; background: var(--raised); margin: -14px -16px 4px; padding: calc(10px + var(--safe-top)) 12px 10px; border-bottom: 1px solid var(--line-strong); }
  .sheet-bar .primary { padding: 7px 16px; }
  .create { padding: 14px 16px calc(24px + var(--safe-bottom)); }
  .create .footer-action { display: none; }
  .create-head { font-size: 13px; }
  .create-head .head-label { display: none; }
  .create-chips { gap: 8px; }
  .chip-button { padding: 7px 11px; font-size: 14px; }
  .palette input { padding-top: calc(14px + var(--safe-top)); }
  .palette ul { max-height: none; }
  .palette li { padding: 11px 10px; font-size: 15px; }

  /* Pickers are bottom sheets with rows sized for a finger. */
  .picker, .picker.centered { left: 0 !important; right: 0; width: auto; top: auto !important; bottom: 0 !important; transform: none; border-radius: 14px 14px 0 0; padding-bottom: var(--safe-bottom); max-height: 75dvh; display: flex; flex-direction: column; }
  .picker:focus { outline: none; }
  .picker-backdrop { position: fixed; inset: 0; z-index: 49; background: rgba(0, 0, 0, 0.45); }
  .picker-title { display: block; padding: 14px 16px 6px; color: var(--muted); font-size: 13px; }
  .picker ul { max-height: none; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
  .picker li { padding: 12px 14px; font-size: 16px; gap: 12px; }
  .picker input { padding: 10px 16px; }

  /* One column per swipe: a swipe always comes to rest on a column, never between two. */
  .board { padding: 10px 12px 80px; scroll-snap-type: x mandatory; scroll-padding: 0 12px; }
  .column { width: 82vw; scroll-snap-align: start; }
  .settings form.grid { grid-template-columns: 1fr; }
  .settings .pane { overflow-x: auto; }
  .toasts { left: 12px; right: 12px; bottom: calc(90px + var(--safe-bottom)); max-width: none; }
}

/* A touch screen with no mouse: keyboard hints mean nothing there. */
@media (hover: none) and (pointer: coarse) {
  kbd, .hint-keys { display: none !important; }
}
