
:root {
  color-scheme: light;
  /* Palette v2: greens and creams only (no brown, tan or orange). */
  --lime: #9AD63A;       /* brand, highlights, count pills: always --forest text, never white */
  --leaf: #3F7D1C;       /* primary buttons (white text) */
  --forest: #1F3A0E;     /* top menu bg, headings, main text */
  --sage: #C9DDB0;       /* borders, chips, dividers */
  --pale-lime: #E4F4C8;  /* hover, selected, highlights */
  --cream: #FBF7EA;      /* cards */
  --page: #F4FAEA;       /* page background */
  --moss: #4E6B3A;       /* secondary text, links */
  --success: #2F7A2A;
  --needs-you: #F3E7A8;  /* with --forest text */
  --danger: #B23A2E;     /* rejected / errors only */
  --info: #2E6B5A;
  /* Older names used across the desk, mapped onto v2. */
  --ink: var(--forest);
  --muted: var(--moss);
  --line: var(--sage);
  --paper: var(--page);
  --card: var(--cream);
  --accent: var(--leaf);
  --accent-soft: var(--pale-lime);
  --shadow: 0 18px 50px rgba(31, 58, 14, 0.08);
}
* { box-sizing: border-box; }
:focus-visible { outline-color: var(--leaf); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.45 ui-sans-serif, system-ui, sans-serif; }
a { color: inherit; }
button, input { font: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 18px 16px 48px; }
.nav {
  display: flex; align-items: center; gap: 18px; background: var(--forest); color: white; border-radius: 18px;
  padding: 10px 14px; box-shadow: var(--shadow); position: sticky; top: 10px; z-index: 5;
  transition: transform 0.22s ease, box-shadow 0.22s ease; will-change: transform;
}
.nav.nav-hidden { transform: translateY(calc(-100% - 16px)); box-shadow: none; }
.brand { display: flex; align-items: center; gap: 10px; color: white; font-weight: 720; letter-spacing: -0.04em; font-size: 1.15rem; text-decoration: none; }
.brand .mark { display: block; width: 32px; height: 32px; border-radius: 8px; }
.tabs { display: flex; gap: 6px; align-items: center; }
.tab, .tab-disabled {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 999px;
  text-decoration: none; color: var(--pale-lime); border-bottom: 2px solid transparent;
}
.tab:hover { background: rgba(228, 244, 200, 0.12); }
.tab.active { color: white; border-bottom-color: var(--lime); font-weight: 650; }
.tab-disabled { color: #A9C38F; cursor: not-allowed; }
.badge, .badge-muted {
  min-width: 1.3rem; height: 1.3rem; border-radius: 999px; display: inline-grid; place-items: center;
  padding: 0 6px; font-size: 12px; font-weight: 700;
}
.badge { background: var(--lime); color: var(--forest); }
.badge-muted { background: rgba(228, 244, 200, 0.16); color: var(--pale-lime); }
.search { margin-left: auto; flex: 1; max-width: 280px; }
.search input, .who { background: var(--page); border: 0; border-radius: 999px; padding: 8px 12px; color: var(--forest); width: 100%; }
.who { width: auto; color: white; background: transparent; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin: 18px 4px 12px; }
.toggle a, .pager a, .pager span {
  text-decoration: none; padding: 6px 10px; border-radius: 999px; color: var(--muted);
}
.toggle a.on { background: white; color: var(--ink); box-shadow: var(--shadow); }
.pager span[aria-disabled="true"] { color: #8FA67C; }
.pager { display: flex; align-items: center; gap: 4px; }
.pager .pager-pos { color: var(--muted); font-size: 13px; padding: 0 6px; white-space: nowrap; }
.card {
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 22px 22px 16px;
  border: 1px solid transparent;
}
.card.urgent { border: 2px solid var(--lime); }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.kicker { margin: 0; font-size: 1.35rem; letter-spacing: -0.03em; }
.sub { color: var(--muted); margin: 6px 0 0; }
.sub a { color: var(--moss); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.summary p { margin: 0 0 8px; font-size: 1.02rem; }
.section-label { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; color: var(--muted); font-size: 13px; }
.spots { margin-top: 8px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--page); }
.spots header, .docs li, .activity li, .resource { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.spots header { padding: 12px 14px; flex-wrap: wrap; }
.spots .count { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink); white-space: nowrap; }
.gallery { position: relative; padding: 0 14px 10px; }
.track {
  display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: 12px; outline: none;
  touch-action: pan-x pan-y;
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); }
.spot-slide { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.spot-slide img {
  display: block; width: 100%; max-width: 100%; height: clamp(170px, 52vw, 300px); object-fit: contain;
  background: white; border-radius: 12px; border: 1px solid var(--line); user-select: none; -webkit-user-drag: none;
}
.spot-slide figcaption { padding: 10px 2px 0; color: var(--muted); }
.gal-btn {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center;
  background: white; color: var(--accent); border: 1px solid var(--line);
  text-decoration: none; cursor: pointer; padding: 0;
}
.gal-btn svg { width: 22px; height: 22px; }
.gal-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 14px 12px; }
.gal-btn:hover { background: var(--accent); color: white; }
.gal-btn[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }
.dots { display: flex; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; gap: 4px; justify-content: center; }
.dots a { width: 44px; height: 44px; display: inline-grid; place-items: center; text-decoration: none; }
.dots a::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--sage); }
.dots a.on::before { background: var(--accent); width: 10px; height: 10px; }
.caption { padding: 0 14px 14px; color: var(--muted); }
.context-head, .activity-head { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.full-context > summary { list-style: none; cursor: default; }
details.resource-item, details.activity-toggle { border-bottom: 1px solid var(--line); }
.toggle-head { list-style: none; cursor: pointer; min-height: 44px; border-radius: 10px; -webkit-tap-highlight-color: transparent; }
.toggle-head::-webkit-details-marker { display: none; }
.toggle-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle-head:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.toggle-head .chev, .full-context .chev { flex: 0 0 auto; width: 44px; height: 44px; align-items: center; justify-content: center; }
.toggle-head .chev { display: inline-flex; }
.toggle-head .chev::before, .full-context .chev::before { content: ""; width: 9px; height: 9px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); margin-top: -5px; transition: transform .18s ease; }
details[open] > .toggle-head .chev::before, .full-context[open] > summary .chev::before { transform: rotate(-135deg); margin-top: 5px; }
.toggle-body:empty { display: none; }
.toggle-body .slide { margin: 0 0 10px; }
.activity-toggle .activity-list { margin: 0 0 8px; }
.full-context > summary::-webkit-details-marker { display: none; }
.full-context > summary .chev { display: none; }
.context-actions { display: flex; justify-content: flex-end; margin-top: -22px; pointer-events: none; }
.context-actions > * { pointer-events: auto; }
.docs { list-style: none; padding: 0; margin: 8px 0 0; }
.docs li, .resource { padding: 10px 0; }
.thumb { width: 42px; height: 54px; border-radius: 6px; background: var(--accent-soft); display: grid; place-items: center; color: var(--forest); font-size: 11px; }
.doc-main { display: flex; gap: 10px; align-items: center; }
.ghost, .primary, .danger, .owner {
  border-radius: 999px; padding: 10px 14px; text-decoration: none; border: 1.5px solid var(--leaf); background: white; color: var(--leaf); cursor: pointer;
}
.ghost:hover, .owner:hover { background: var(--pale-lime); color: var(--forest); }
.primary { background: var(--leaf); color: white; border-color: var(--leaf); }
.primary:hover { background: #356A17; }
.danger { color: var(--danger); border-color: var(--danger); }
.urgent-on { background: var(--needs-you); color: var(--forest); border: 1.5px solid var(--forest); border-radius: 999px; padding: 10px 14px; cursor: pointer; }
.actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.actions .left, .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.owner { display: inline-flex; gap: 8px; align-items: center; }
.avatar { width: 26px; height: 26px; border-radius: 99px; background: var(--accent); color: white; display: grid; place-items: center; font-size: 12px; }
.assign { margin-top: 10px; border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: white; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 16px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.chat { margin-top: 22px; background: white; border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.chat form { display: flex; gap: 8px; }
.chat .reply-error { color: var(--danger); }
.chat input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.reply { white-space: pre-wrap; }
.slide { border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-top: 8px; background: #fff; }
.error { background: #FBE9E7; color: #8E2A21; padding: 8px 10px; border-radius: 10px; }
.banner { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.who-initial { display: none; }
.pill-urgent { display: inline-block; background: var(--needs-you); color: var(--forest); border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 650; }
.assign-pop { box-shadow: var(--shadow); }
/* Long addresses / file keys in expanded resources must wrap, never widen the page on phones. */
.resource-item [data-body], .slide { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.resource-item { min-width: 0; }
.people-pick { border: 0; padding: 0; margin: 0 0 10px; }
.people-pick legend { font-weight: 600; margin-bottom: 6px; }
.assign .person-opt { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 4px 6px; border-radius: 12px; cursor: pointer; }
.assign .person-opt input { width: auto; min-height: 0; margin: 0; }
.assign .person-opt:has(input:checked) { background: var(--pale-lime); }
.assign-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.assign-actions .ghost, .assign-actions .primary { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.assign label, .form-stack label { display: block; margin: 0 0 10px; }
.assign select, .assign input, .assign textarea, .login-card input {
  display: block; width: 100%; min-height: 44px; margin-top: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: white; font-size: 16px;
}
.assign textarea { resize: none; }
/* Auto-growing comment/note boxes: ~2 lines to start, grow to ~8 lines, then scroll inside. */
textarea.autogrow {
  field-sizing: content; box-sizing: border-box; font: inherit; font-size: 16px; line-height: 1.4;
  min-height: calc(2 * 1.4em + 20px); max-height: calc(8 * 1.4em + 20px); overflow-y: auto; resize: none; padding: 10px 12px;
}
.chat form { align-items: flex-end; }
.chat textarea.autogrow { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: white; }
.login-card .primary { width: 100%; min-height: 44px; font-size: 16px; }
.install-hint { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 8px 8px 8px 14px; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 14px; font-size: 14px; }
.install-hint span { flex: 1 1 auto; }
.install-btn { min-height: 44px; flex: 0 0 auto; white-space: nowrap; padding: 0 16px; }
.install-x { min-width: 44px; min-height: 44px; border: 0; background: transparent; font-size: 22px; color: var(--muted); cursor: pointer; }
@media (max-width: 768px) {
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 16px; }
  .wrap {
    padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }
  .nav { gap: 6px; padding: 4px 6px; top: max(6px, env(safe-area-inset-top)); border-radius: 14px; flex-wrap: nowrap; }
  .nav .brand { font-size: 0; gap: 0; flex: 0 0 auto; width: 44px; height: 44px; justify-content: center; }
  .nav .brand .mark { width: 32px; height: 32px; }
  .tabs { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; gap: 0; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs .tab-disabled { display: none; }
  .full-context > summary { cursor: pointer; min-height: 48px; margin-top: 14px; padding: 0 4px; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
  .full-context > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .full-context > summary .chev { display: inline-flex; }
  .context-actions { margin-top: 0; justify-content: flex-start; }
  .tab, .tab-disabled { padding: 0 8px; min-height: 44px; font-size: 14px; gap: 4px; white-space: nowrap; }
  .badge, .badge-muted { min-width: 1.15rem; height: 1.15rem; font-size: 11px; padding: 0 4px; }
  .search { display: none; }
  .who { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
  .who-name { display: none; }
  .who-initial { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 99px; background: var(--lime); color: var(--forest); font-size: 13px; font-weight: 700; }
  .toolbar { margin: 10px 0 8px; }
  .toggle a, .pager a, .pager span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; }
  .card { padding: 16px 14px 14px; border-radius: 18px; }
  .login-card { margin: 6vh auto !important; }
  .card-head { flex-wrap: wrap; }
  .card-head button { min-height: 44px; }
  .kicker { font-size: 1.25rem; }
  .sub, .section-label { overflow-wrap: anywhere; }
  .card-head .sub a { display: inline-block; min-height: 44px; line-height: 44px; }
  .banner a { display: block; min-height: 44px; padding: 10px 0; }
  .summary p { font-size: 1rem; overflow-wrap: anywhere; }
  .banner { overflow-wrap: anywhere; font-size: 14px; }
  .spots header { gap: 4px 12px; }
  .gallery { padding: 0 10px 8px; }
  .gal-controls { padding: 2px 10px 10px; gap: 4px; }
  .dots a { width: 44px; height: 44px; }
  .docs li, .resource { align-items: center; }
  .docs li > a, .resource > a, .activity-head a, .context-head a {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: 999px; background: white; text-decoration: none; color: var(--accent); flex: 0 0 auto;
  }
  .doc-main { min-width: 0; overflow-wrap: anywhere; }
  .activity-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .ghost, .primary, .danger, .owner { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
  /* Sticky decision bar: approve / edit / reject stay reachable while reading the card. */
  .actions { display: contents; }
  .actions .left {
    position: sticky; bottom: 0; z-index: 4; margin: 12px -14px 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(251, 247, 234, 0.97); border-top: 1px solid var(--line); box-shadow: 0 -8px 20px rgba(31, 58, 14, 0.08);
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-radius: 14px 14px 0 0;
  }
  .actions .left form { grid-column: 1 / -1; }
  .actions .left form button { width: 100%; }
  .actions .left > a { width: 100%; }
  .actions .left > .sub { grid-column: 1 / -1; }
  .actions > div:last-child { padding: 12px 0 16px; }
  #edit-slot:not(:empty) { padding-bottom: 16px; }
  .assign .primary, .assign .danger { width: 100%; }
  .queue-table, .queue-table tbody, .queue-table tr, .queue-table td { display: block; width: 100%; }
  .queue-table thead { display: none; }
  .queue-table { background: transparent; }
  .queue-table tr { background: var(--cream); border-radius: 14px; margin-bottom: 10px; padding: 10px 14px; box-shadow: var(--shadow); }
  .queue-table tr.row-urgent { border-left: 4px solid var(--lime); }
  .queue-table td { border: 0; padding: 2px 0; overflow-wrap: anywhere; }
  .queue-table td[data-label]:not([data-label=""])::before { content: attr(data-label) " · "; color: var(--muted); font-size: 13px; }
  .queue-table td:first-child { font-size: 1.05rem; font-weight: 650; }
  .queue-table td:first-child::before { display: none; }
  .queue-table td:first-child a { display: inline-flex; align-items: center; min-height: 44px; }
  .queue-table td[data-label=""]:empty { display: none; }
  .chat { padding: 10px; }
  .chat form { gap: 6px; }
  .chat textarea { font-size: 16px; min-height: 44px; min-width: 0; }
  .chat .reply { overflow-wrap: anywhere; }
  pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
}

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 18px 4px 12px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 1.35rem; letter-spacing: -0.03em; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list li { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.list a.row-link { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; text-decoration: none; min-height: 44px; }
.list .meta { color: var(--muted); font-size: 14px; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 650; background: var(--sage); color: var(--forest); white-space: nowrap; }
.pill.ok { background: var(--pale-lime); color: var(--success); }
.pill.hold { background: var(--needs-you); color: var(--forest); }
.pill.bad { background: #FBE9E7; color: #8E2A21; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.hash { font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-row form { margin: 0; }
.checks { list-style: none; padding: 0; margin: 10px 0 0; }
.checks li { display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks .pill { align-self: start; justify-self: start; }
.hold-form { display: grid; gap: 8px; margin-top: 12px; }
.hold-form label { font-weight: 600; font-size: 14px; }
.hold-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; resize: vertical; }
.hold-form button { justify-self: start; }
.hold-history { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.hold-history li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.checks .label { font-weight: 600; }
.checks .detail { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.result-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 18px; margin-top: 14px; }
.panel h2 { margin: 0 0 4px; font-size: 1.05rem; }
.muted { color: var(--muted); }
@media (max-width: 768px) {
  .page-head { margin: 10px 2px 8px; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { margin-top: 8px; font-size: 13px; }
  .btn-row > a, .btn-row > form, .btn-row > form button { width: 100%; }
  .panel { padding: 14px; }
}


.acct-search { display: flex; gap: 8px; margin: 0 4px 12px; }
.acct-search input { flex: 1; min-width: 0; min-height: 44px; font-size: 16px; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; background: #fff; }
.acct-list { list-style: none; margin: 0; padding: 0; }
.acct-list li { border-bottom: 1px solid var(--line); }
.acct-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 10px 4px; color: inherit; text-decoration: none; }
.acct-list .pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; background: var(--pale-lime); color: var(--forest); font-size: 13px; white-space: nowrap; }
.pill.warn { background: var(--needs-you); color: var(--forest); }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.acct-grid section { min-width: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--moss); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.acct-table { width: 100%; border-collapse: collapse; }
.acct-table th, .acct-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; }
.acct-table .num, .acct-table .nw { white-space: nowrap; }
.acct-table .num { text-align: right; }
.acct-grid, #desk > section.card { margin-bottom: 14px; }
.acct-table th { font-weight: 600; color: var(--moss); font-size: 13px; }
.readonly-note { font-size: 13px; color: var(--moss); }
@media (max-width: 768px) {
  .acct-table thead { display: none; }
  .acct-table tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .acct-table td { display: block; border: 0; padding: 2px 4px; }
  .acct-table .num { text-align: left; }
}


.search { position: relative; }
.search input { color: var(--ink); }
.search input::placeholder { color: var(--moss); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: white; }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 11px ui-monospace, monospace; color: var(--moss); border: 1px solid var(--sage); border-radius: 6px; padding: 1px 5px; pointer-events: none; }
.search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { display: none; }
.cmdk-pop { color: var(--forest); position: absolute; top: calc(100% + 8px); right: 0; width: min(440px, 92vw); max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain; background: white; border-radius: 14px; box-shadow: 0 12px 40px rgba(31,58,14,.18); z-index: 20; padding: 6px; }
.cmdk-pop:empty { display: none; }
.cmdk-list { list-style: none; margin: 0; padding: 0; }
.cmdk-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px 4px; }
.cmdk-list [role=option] a { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 10px; text-decoration: none; min-height: 44px; justify-content: center; }
.cmdk-list [role=option][aria-selected=true] a, .cmdk-list [role=option] a:hover { background: var(--pale-lime); }
.cmdk-label { font-weight: 600; }
.cmdk-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-empty { padding: 12px; color: var(--muted); font-size: 14px; }
.search-btn { display: none; }
.search-page form { display: flex; gap: 8px; margin: 18px 0 10px; }
.search-page input { flex: 1; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--sage); background: white; }
.search-page input:focus { outline: 2px solid var(--leaf); outline-offset: 1px; border-color: var(--leaf); }
.search-page .cmdk-list { background: white; border-radius: 16px; padding: 6px; box-shadow: var(--shadow); }
@media (max-width: 768px) {
  .search-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; color: white; border-radius: 12px; }
  .search-page input { font-size: 16px; }
}


/* Pull-to-refresh, error toast, live-update note */
html.ptr-on, html.ptr-on body { overscroll-behavior-y: contain; }
.ptr { position: fixed; left: 50%; top: calc(max(6px, env(safe-area-inset-top)) + 56px); z-index: 40; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.18);
  transform: translate(-50%, -60px); opacity: 0; pointer-events: none; transition: transform .2s ease, opacity .2s ease; }
.ptr.pulling { transition: none; }
.ptr.ready { color: #fff; background: var(--accent); }
.ptr.spin svg { animation: ptr-spin .8s linear infinite; }
.ptr .ptr-ring, .ptr.spin .ptr-arrow { display: none; }
.ptr.spin .ptr-ring { display: inline; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; top: calc(max(6px, env(safe-area-inset-top)) + 62px); transform: translate(-50%, -12px); z-index: 60; width: max-content; max-width: min(92vw, 420px); box-shadow: 0 4px 16px rgba(0,0,0,.2);
  padding: 12px 16px; border-radius: 12px; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-error { background: var(--danger); color: #fff; }
.live-note { position: fixed; left: 50%; top: calc(max(6px, env(safe-area-inset-top)) + 60px); z-index: 35; transform: translate(-50%, -8px);
  padding: 4px 12px; border-radius: 999px; background: rgba(31,58,14,.92); color: #fff; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.live-note.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .ptr, .toast, .live-note { transition: none; } .ptr.spin svg { animation-duration: 2s; } }
