/* Harbor board. Quiet palette: ocean blue only for links, the activity chart and the keyboard ring; orange only for Adrift; everything else gray. */

:root {
  color-scheme: light;
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --surface-2: #F6F7F9;
  --line: #E3E5EA;
  --line-strong: #D4D7DE;
  --text: #14161B;
  --text-2: #2A2E37;
  --muted: #5B6170;
  --gray-bg: #E8ECF2;
  --gray-fg: #3B4656;
  --bar: #475569;
  --bar-empty: #D4D7DE;
  --link: #075985;
  --bar-on: #0369A1;
  --adrift-bg: #FFF8EE;
  --adrift-line: #F2C894;
  --adrift-pill: #FFEBD2;
  --adrift-fg: #8A3D07;
  --docked-bg: #F8F9FA;
  --docked-line: #B9BEC8;
  --docked-fg: #4B5160;
  --primary-bg: #14161B;
  --primary-fg: #FFFFFF;
  --banner-bg: #14161B;
  --banner-line: #14161B;
  --banner-fg: #FFFFFF;
  --banner-muted: #C9CCD4;
  --banner-btn-line: #5B6170;
  --ring: #0369A1;
  --mark: #1E3A5F;
  --shadow: 0 1px 2px rgba(20, 22, 27, .04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Dark: chosen in the footer (data-theme="dark", set by theme.js before first paint), or System on a dark
   device. The two blocks must hold the same declarations; src/web/logic.test.ts checks that they do. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1115;
  --surface: #171A20;
  --surface-2: #1F232B;
  --line: #2A2F38;
  --line-strong: #3A404B;
  --text: #ECEEF2;
  --text-2: #D5D8DF;
  --muted: #A0A6B3;
  --gray-bg: #272C35;
  --gray-fg: #CDD2DB;
  --bar: #8B94A3;
  --bar-empty: #343A45;
  --link: #BAE6FD;
  --bar-on: #38BDF8;
  --adrift-bg: #221911;
  --adrift-line: #7A4B1E;
  --adrift-pill: #4A2C10;
  --adrift-fg: #FDBA74;
  --docked-bg: #13161B;
  --docked-line: #3F4550;
  --docked-fg: #B4BAC5;
  --primary-bg: #ECEEF2;
  --primary-fg: #14161B;
  --banner-bg: #1E232C;
  --banner-line: #343A46;
  --banner-fg: #F3F4F6;
  --banner-muted: #B9BEC8;
  --banner-btn-line: #6B7280;
  --ring: #7DD3FC;
  --mark: #EBD9B0;
  --shadow: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F1115;
    --surface: #171A20;
    --surface-2: #1F232B;
    --line: #2A2F38;
    --line-strong: #3A404B;
    --text: #ECEEF2;
    --text-2: #D5D8DF;
    --muted: #A0A6B3;
    --gray-bg: #272C35;
    --gray-fg: #CDD2DB;
    --bar: #8B94A3;
    --bar-empty: #343A45;
    --link: #BAE6FD;
    --bar-on: #38BDF8;
    --adrift-bg: #221911;
    --adrift-line: #7A4B1E;
    --adrift-pill: #4A2C10;
    --adrift-fg: #FDBA74;
    --docked-bg: #13161B;
    --docked-line: #3F4550;
    --docked-fg: #B4BAC5;
    --primary-bg: #ECEEF2;
    --primary-fg: #14161B;
    --banner-bg: #1E232C;
    --banner-line: #343A46;
    --banner-fg: #F3F4F6;
    --banner-muted: #B9BEC8;
    --banner-btn-line: #6B7280;
    --ring: #7DD3FC;
    --mark: #EBD9B0;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
[hidden] { display: none !important; }

.page {
  max-width: 1360px;
  margin: 0 auto;
  min-height: 100vh;
  padding: calc(28px + env(safe-area-inset-top)) calc(24px + env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom)) calc(24px + env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.loading { color: var(--muted); margin: 40px 0; text-align: center; }

/* Type */
.label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.txt { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.txt-strong { font-weight: 600; color: var(--text); }
.sub { margin: 0; font-size: 12px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.head-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.head h1 { margin: 0; font-family: var(--font-display); font-size: 34px; font-weight: 650; letter-spacing: -.02em; }
.head-stats { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.head-stat { display: flex; flex-direction: column; gap: 2px; }
.head-stat b { font-size: 15px; font-weight: 600; }
.head-stat .is-adrift { color: var(--adrift-fg); }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; color: var(--text-2);
}
.notice svg { flex: none; margin-top: 2px; color: var(--muted); }
.notice-error { border-color: var(--line-strong); }

/* GitLab token notice: gray on purpose (orange is Adrift only), and lighter than Bring it in. */
.token-notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: transparent; border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 10px 6px 10px 14px; color: var(--text-2);
}
.token-notice > svg { flex: none; margin-top: 3px; color: var(--muted); }
.token-notice-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.token-notice-text { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.token-notice-how { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.token-notice code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px;
  background: var(--gray-bg); color: var(--gray-fg); border-radius: 4px; padding: 1px 4px;
}
.token-notice .btn-text { flex: none; min-height: 36px; margin: -4px 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 600; line-height: 1.2;
  border-radius: 9px; padding: 0 14px; min-height: 44px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg); }
.btn-primary:hover { border-color: var(--primary-bg); opacity: .92; }
.btn-text { background: transparent; border-color: transparent; color: var(--muted); padding: 0 10px; }
.btn-text:hover { color: var(--text); border-color: transparent; text-decoration: underline; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Bring it in */
.banner {
  background: var(--banner-bg); color: var(--banner-fg); border: 1px solid var(--banner-line);
  border-radius: 16px; padding: 20px 22px;
  display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.banner-body { display: flex; flex-direction: column; gap: 6px; flex: 1 1 420px; min-width: 0; }
.banner .label { color: var(--banner-muted); }
.banner-step { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; }
.banner-sub { font-size: 13px; color: var(--banner-muted); margin: 0; }
.banner .btn { background: transparent; color: var(--banner-fg); border-color: var(--banner-btn-line); }
.banner .btn:hover { border-color: var(--banner-muted); }
.banner .btn-primary { background: var(--banner-fg); color: var(--banner-bg); border-color: var(--banner-fg); }
.banner .btn-text { border-color: transparent; color: var(--banner-muted); }
.banner .btn-text:hover { color: var(--banner-fg); }
.banner-done {
  background: var(--surface); color: var(--text-2); border-color: var(--line);
  padding: 6px 8px 6px 18px; gap: 8px; flex-wrap: nowrap;
}
.banner-done .note { font-size: 14px; color: var(--text-2); }
.banner-done .btn-text { color: var(--muted); }
.banner-done .btn-text:hover { color: var(--text); }
.banner-done :focus-visible { outline-color: var(--ring); }
.banner .msg { color: var(--banner-fg); }
.banner :focus-visible { outline-color: var(--banner-fg); }

.dock-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.dock-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; }
.date-input {
  min-height: 44px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); min-width: 160px;
}
.banner .date-input { background: var(--banner-bg); color: var(--banner-fg); border-color: var(--banner-btn-line); color-scheme: dark; }
.msg { margin: 0; font-size: 13px; }
.msg-error { font-weight: 600; }
.saved { display: inline-flex; align-items: center; gap: 6px; }

/* Filters */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 13px; font-weight: 500; border-radius: 999px; padding: 0 14px; min-height: 44px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg); }
.chip[aria-pressed="true"] .count { color: inherit; opacity: .75; }

/* Grid */
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(200px, auto);
  grid-auto-flow: row dense;
  gap: 16px;
}
.w2 { grid-column: span 2; }
.card-small { align-self: start; min-height: 200px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0; box-shadow: var(--shadow);
}
.card-adrift { background: var(--adrift-bg); border-color: var(--adrift-line); }
.card-docked { background: var(--docked-bg); border-style: dashed; border-color: var(--docked-line); }
.card-docked .name { color: var(--gray-fg); }
.card-docked .txt { color: var(--docked-fg); }

.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.top > div { min-width: 0; }
.name { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.kind { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.pill {
  flex: none; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 4px 0; border-radius: 999px;
  width: 64px; text-align: center; background: var(--gray-bg); color: var(--gray-fg);
}
.pill-docked { background: var(--gray-bg); color: var(--docked-fg); }
.pill-adrift { background: var(--adrift-pill); color: var(--adrift-fg); }

.block { display: flex; flex-direction: column; gap: 4px; }
.next { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.card-adrift .next { background: var(--surface); }
.stats { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.num { font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.num-word { font-size: 17px; line-height: 28px; }
.card-small .num { font-size: 19px; line-height: 24px; }
.card-small .num-word { font-size: 15px; line-height: 24px; }

.spark { width: 100%; height: 64px; display: block; }
.spark .on { fill: var(--bar-on); }
.spark .gray { fill: var(--bar); }
.spark .off { fill: var(--bar-empty); }

.card-foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.card-actions { display: flex; flex-direction: column; gap: 8px; }
.note { margin: 0; display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--text-2); text-align: left; }
.note svg { flex: none; margin-top: 2px; color: var(--muted); }
.gitlab-problem { margin-top: -4px; overflow-wrap: anywhere; }

/* Shore and empty states */
.section-quiet { background: var(--docked-bg); border-style: dashed; border-color: var(--docked-line); gap: 14px; }
.shore-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.shore-head > div { min-width: 0; }
.idea-form { display: flex; gap: 8px; flex: 1 1 320px; justify-content: flex-end; }
.text-input {
  font-size: 15px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface); color: var(--text); flex: 1 1 200px; max-width: 320px; min-width: 0;
}
.text-input::placeholder { color: var(--muted); }
.shore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.shore-item { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.shore-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.shore-item-top b { font-size: 14px; overflow-wrap: anywhere; }
.shore-item-top .age { flex: none; min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }
.shore-item-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.tag { flex: none; width: 84px; text-align: center; font-size: 11px; font-weight: 600; color: var(--gray-fg); background: var(--gray-bg); border-radius: 6px; padding: 3px 0; }

.empty { align-items: flex-start; justify-content: center; gap: 8px; padding: 28px; grid-column: 1 / -1; min-height: 0; }
.empty .name { font-size: 20px; }
.empty-icon { color: var(--muted); }

.page-foot { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.page-foot-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.page-foot .btn-text { padding: 0; min-width: 44px; justify-content: flex-end; flex: none; }

/* Appearance: a quiet gray segmented control. The chosen segment is filled gray, never blue. */
.theme-pick {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; flex: none;
  padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: transparent;
}
.theme-pick button {
  min-width: 64px; min-height: 28px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer;
}
.theme-pick button:hover { color: var(--text); }
.theme-pick button[aria-checked="true"] { background: var(--gray-bg); color: var(--text); }
.theme-pick button:focus-visible { outline-offset: 1px; }
@media (pointer: coarse) { .theme-pick button { min-height: 36px; } }

/* Sign in */
.signin { max-width: 420px; margin: 12vh auto 0; width: 100%; padding: 28px; gap: 16px; }
.signin h1 { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 650; letter-spacing: -.02em; }
.signin-mark { width: 48px; height: 48px; color: var(--mark); display: block; }
.signin form { display: flex; flex-direction: column; gap: 10px; }
.signin .text-input { max-width: none; width: 100%; flex: none; }
.signin label { font-size: 13px; font-weight: 600; }

/* Wide windows (often the Mac app maximized): the page follows the window up to 2400px and the board adds
   columns, so cards keep roughly the width they have at 4 columns (about 300-380px each). Below 1600px
   nothing here applies, so laptop and phone layouts stay as they were. */
@media (min-width: 1600px) {
  .page { max-width: 2400px; }
  .board { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  /* Long one-line texts keep a readable measure instead of running across the whole window. */
  .banner { justify-content: flex-start; gap: 20px 40px; }
  .banner-body { flex: 0 1 900px; }
  .banner-sub, .token-notice-how, .notice > span { max-width: 80ch; }
}
@media (min-width: 2000px) {
  .board { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .page {
    padding: calc(16px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
    gap: 16px;
  }
  .head { align-items: flex-start; }
  .head h1 { font-size: 30px; }
  .head-stats { gap: 18px; }
  .board { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 12px; }
  .w2 { grid-column: auto; }
  .banner { padding: 16px; gap: 12px; }
  .banner-body { flex-basis: 100%; gap: 4px; }
  .banner-step { font-size: 18px; }
  .banner-sub { font-size: 12px; }
  .banner .actions-row { flex-wrap: nowrap; gap: 6px; width: 100%; }
  .banner .actions-row .btn { padding: 0 12px; }
  .banner .actions-row .btn-text { padding: 0 6px; margin-left: auto; }
  .banner-done { padding: 4px 4px 4px 14px; }
  .token-notice { padding: 10px 2px 10px 12px; gap: 8px; }
  .token-notice-how { font-size: 12px; }
  .token-notice .btn-text { margin: -10px 0 0; min-height: 44px; padding: 0 10px; }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
  .card-small { min-height: 0; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .shore-head > div, .idea-form { flex-basis: 100%; }
  .idea-form { justify-content: stretch; }
  .text-input { max-width: none; }
  .signin { margin-top: 6vh; }
}

/* ---------- New project form and ideas (issue #7) ---------- */

.head-new { gap: 6px; }

/* A dialog on wider screens, a full-screen sheet on phones. */
.sheet {
  width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; margin: auto;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text);
  box-shadow: 0 24px 60px rgba(20, 22, 27, .28); overflow: hidden;
}
.sheet[open] { display: flex; }
.sheet::backdrop { background: rgba(20, 22, 27, .45); }
.sheet-form { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.sheet-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 24px 28px 12px;
  border-bottom: 1px solid transparent; transition: border-color .15s;
}
.sheet-head-scrolled { border-bottom-color: var(--line); }
.sheet-head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sheet-title { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 650; letter-spacing: -.02em; }
.sheet-close { flex: none; width: 44px; padding: 0; }
.sheet-body { display: flex; flex-direction: column; gap: 20px; padding: 8px 28px 24px; overflow-y: auto; min-height: 0; }
.sheet-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px 12px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding: 16px 28px calc(18px + env(safe-area-inset-bottom));
}
.sheet-path { overflow-wrap: anywhere; min-width: 0; flex: 1 1 260px; }
.sheet-path strong { color: var(--text-2); }
.sheet-foot .msg-error { flex-basis: 100%; order: -1; }
.sheet-buttons { flex: none; margin-left: auto; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fieldset { border: none; margin: 0; padding: 0; }
.field-label { display: block; margin: 0; font-size: 13px; font-weight: 600; color: var(--text); padding: 0; }
.field-optional { font-weight: 400; color: var(--muted); }
.field-hint { margin: 0; }
.field-error { margin: 0; font-size: 13px; font-weight: 600; color: var(--text); }
.field .text-input { max-width: none; width: 100%; flex: none; }
.text-input[aria-invalid="true"] { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.chip-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.picks { gap: 6px; }

/* Choices: the picked one gets a dark ring. */
.places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice-grid { display: grid; gap: 8px; }
.choice-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choice-grid .chip { width: 100%; justify-content: center; padding: 0 6px; }
.text-grow { resize: none; display: block; padding: 10px 12px; line-height: 22px; min-height: 44px; overflow-y: auto; font: inherit; font-size: 15px; }
.opt {
  font: inherit; text-align: left; cursor: pointer; color: var(--text);
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 12px;
  padding: 10px 14px; min-height: 60px; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0;
}
.opt:hover { border-color: var(--muted); }
.opt-on, .opt-on:hover { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); background: var(--surface-2); }
.opt-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.opt-sub { font-size: 12px; color: var(--muted); }

.banner .field-label { color: var(--banner-fg); }

.more summary { cursor: pointer; font-size: 14px; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 6px; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary svg { color: var(--muted); transition: transform .15s; }
.more[open] summary svg { transform: rotate(180deg); }
.more-body { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }

/* Ideas on shore */
.btn-sm { min-height: 36px; padding: 0 12px; min-width: 88px; }
.btn-link { min-height: 36px; padding: 0 4px; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--text); }
.done-line .note { flex: 1 1 auto; }
.idea-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.idea-ask { display: flex; flex-direction: column; gap: 6px; }
.shore-item-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.shore-item-bottom .shore-item-foot { margin-top: 0; }
.shore-item-gone { justify-content: center; }
.shore-item .note { flex: 1 1 auto; }

@media (max-width: 620px) {
  .sheet {
    width: 100vw; max-width: none; height: 100dvh; max-height: none; border-radius: 0; border: none;
  }
  .sheet-head { padding: calc(16px + env(safe-area-inset-top)) 16px 12px; }
  .sheet-title { font-size: 24px; }
  .sheet-body { padding: 8px 16px 20px; flex: 1 1 auto; }
  .sheet-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .sheet-buttons { width: 100%; }
  .sheet-buttons .btn { flex: 1 1 0; }
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt { min-height: 52px; padding: 8px 12px; }
  /* 16px, so iPhone Safari doesn't zoom into the field. */
  .sheet .text-input, .date-input { font-size: 16px; }
  .head-new { width: 100%; }
}
