/* Camp Alert look and feel. Design changes go here (see DESIGN-HANDOFF.md). */
:root {
  --bg: #f5f3ee; --card: #ffffff; --ink: #1f2a24; --muted: #66706a; --line: #e2ded5;
  --accent: #2f6b4f; --accent-ink: #ffffff; --soft: #e7f0ea; --warn: #9a5b00; --warn-bg: #fff4e0;
  --danger: #a33a2c;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #151a17; --card: #1e2520; --ink: #e8ece9; --muted: #9aa49e; --line: #2f3833;
    --accent: #6fbf95; --accent-ink: #0f1a14; --soft: #24342b; --warn: #f0b860; --warn-bg: #3a2e18; --danger: #ef8a7a; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; }
body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
header { padding: 20px 16px 8px; max-width: 860px; margin: 0 auto; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
header h1 { margin: 0; font-size: 26px; letter-spacing: -0.02em; }
header .sub { color: var(--muted); font-size: 14px; flex: 1; }
header .who { font-size: 14px; color: var(--muted); }
header .who button { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0 0 0 6px; }
nav { max-width: 860px; margin: 0 auto; padding: 0 16px; display: flex; gap: 6px; overflow-x: auto; }
nav button { background: none; border: 0; padding: 10px 14px; border-radius: 999px; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
nav button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
main { max-width: 860px; margin: 0 auto; padding: 12px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.auth { max-width: 420px; margin: 40px auto; }
h2 { font-size: 18px; margin: 4px 0 12px; }
h3 { font-size: 16px; margin: 0 0 4px; }
.muted { color: var(--muted); font-size: 14px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .row, .row3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 10px 0; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.danger { background: none; color: var(--danger); }
.btn.wide { width: 100%; justify-content: center; margin-top: 14px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.searchbar { display: flex; gap: 8px; }
.seg { display: flex; gap: 6px; margin: 10px 0 2px; flex-wrap: wrap; }
.seg button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.seg button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.result { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.result:first-child { border-top: 0; }
.result img, .result .ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: var(--soft); }
.result .info { flex: 1; min-width: 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.note { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.ok { background: var(--soft); color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.err { color: var(--danger); font-size: 14px; min-height: 1.2em; margin-top: 8px; }
.events { margin: 10px 0 0; padding: 0; list-style: none; }
.events li { padding: 8px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.events li.past { color: var(--muted); text-decoration: none; }
.events b { display: block; font-size: 15px; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.log div { font-size: 13px; padding: 6px 0; border-top: 1px solid var(--line); }
.person { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.person:first-child { border-top: 0; }
.person .info { flex: 1; min-width: 160px; }
.linkbox { display: flex; gap: 8px; margin-top: 8px; }
.linkbox input { font-size: 13px; }
.hidden { display: none !important; }
.steps { padding-left: 20px; } .steps li { margin: 6px 0; }
code { background: var(--soft); padding: 2px 6px; border-radius: 6px; font-size: 14px; word-break: break-all; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 14px; padding: 11px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: #1f1f1f; font: inherit; font-weight: 600; cursor: pointer; }
.gbtn svg { width: 18px; height: 18px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0 4px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.linkish { background: none; border: 0; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; padding: 0; margin-top: 12px; }
.crunch { background: #fff2cc; color: #6b4a00; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (prefers-color-scheme: dark) { .crunch { background: #3d3214; color: #f3d27a; } }
.crunch .grow { flex: 1; min-width: 180px; }
.tag.bolt { background: #fff2cc; color: #6b4a00; }
.banner { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); background: var(--card); border: 2px solid var(--accent); border-radius: 14px; padding: 14px 16px; box-shadow: 0 8px 30px rgba(0,0,0,.25); z-index: 10; font-size: 15px; }
.chatfab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20; border: 0; border-radius: 999px; padding: 12px 18px; font: inherit; font-weight: 700; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 20px rgba(0,0,0,.25); cursor: pointer; }
.chatpanel { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 21; width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.3); display: flex; flex-direction: column; overflow: hidden; }
.chathead { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.chathead b { flex: 1; }
.chathead button { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; }
.chatmsgs { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 9px 12px; border-radius: 12px; font-size: 15px; max-width: 90%; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.msg.bot { align-self: flex-start; background: var(--soft); }
.msg ul { margin: 4px 0; padding-left: 18px; }
.msg .src { font-size: 12px; margin-top: 6px; }
.msg .src a { color: inherit; }
.proposal { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); font-size: 14px; }
.chatin { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chatin textarea { resize: none; height: 44px; }
.airesult { border-top: 1px solid var(--line); padding: 12px 0; }
.airesult:first-child { border-top: 0; }
.airesult .dates { margin: 6px 0; padding-left: 18px; font-size: 14px; }
.premiumrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; flex-basis: 100%; font-size: 14px; }
.premiumrow input[type=number] { width: 80px; padding: 6px 8px; }
.premiumrow label { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: 600; }
.premiumrow label input { width: 18px; height: 18px; accent-color: var(--accent); }
.toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; }

/* DRK Magik — a fixed alpine world beneath forest and sage glass. */
:root {
  color-scheme: light;
  --bg: #2b4939; --card: rgba(210, 225, 203, .82); --ink: #183d2e; --muted: #2e4a37;
  --line: rgba(48, 78, 50, .25); --accent: #28543d; --accent-ink: #f2f8e9;
  --soft: rgba(180, 205, 166, .76); --warn: #663d16; --warn-bg: rgba(232, 209, 155, .96);
  --danger: #8b2924; --sunrise: #f6ba79; --shadow: 0 12px 36px rgba(12, 34, 25, .14);
  --field: rgba(228, 238, 219, .88); --forest: rgba(24, 51, 38, .89); --on-forest: #eff7e8;
}
body { isolation: isolate; min-height: 100svh; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
/* A fixed element avoids the mobile Safari issues with background-attachment. */
.alpine-backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: #609b83 url("drk-magik-dawn.png") center center / cover no-repeat; }
.alpine-backdrop::after { content: ""; position: absolute; inset: 0; background: rgba(15, 40, 29, .05); }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, textarea { min-height: 48px; border-radius: 12px; background: var(--field); font-size: 16px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type=checkbox] { min-height: 0; }
input[type=date], input[type=time] { min-width: 0; }
label { margin: 18px 0 7px; }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 21px; letter-spacing: -.035em; margin-bottom: 16px; }
h3 { font-size: 17px; }
p { margin: 10px 0 18px; }
.muted { line-height: 1.6; }
.eyebrow { display: block; font-size: 10px; line-height: 1.5; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.card, .section-heading, nav, .chatpanel, .banner, .empty {
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
header { max-width: 944px; padding: 16px 22px; margin: 22px auto 12px; gap: 8px 16px; align-items: center;
  border: 1px solid rgba(225, 245, 209, .23); border-radius: 20px; background: var(--forest); color: var(--on-forest); box-shadow: var(--shadow); }
header h1 { display: flex; gap: 12px; align-items: center; font-size: 25px; letter-spacing: -.045em; }
.brand-icon { border-radius: 14px; object-fit: cover; border: 1px solid rgba(225, 245, 209, .3); }
header .sub { font-size: 12px; color: #d0dfc7; }
header .who { font-size: 12px; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; color: #d0dfc7; }
header .who button { min-height: 44px; padding: 8px; color: #f4d39d; text-decoration: underline; text-underline-offset: 4px; }
nav { max-width: 944px; padding: 7px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); gap: 4px; scrollbar-width: thin; }
nav button { min-height: 46px; border-radius: 12px; font-size: 13px; padding: 10px 18px; flex: 1 0 auto; color: var(--ink); }
nav button.on { color: var(--accent-ink); background: var(--accent); box-shadow: 0 3px 8px rgba(28, 50, 36, .12); }
main { max-width: 1000px; padding: 22px 28px calc(110px + env(safe-area-inset-bottom)); }
.card { border-radius: 20px; padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.section-heading { padding: 20px 24px; border: 1px solid var(--line); border-radius: 20px; margin: 0 0 18px; background: var(--card); box-shadow: var(--shadow); }
.section-heading h2 { font-size: 27px; margin: 6px 0 0; }
.btn { min-height: 48px; justify-content: center; text-align: center; border-radius: 12px; padding: 12px 18px; font-size: 14px; line-height: 1.4; }
.btn.small { min-height: 44px; padding: 10px 13px; font-size: 13px; }
.btn.ghost { border: 1px solid var(--line); }
.btn.danger { border: 1px solid var(--line); background: var(--field); }
.btns { gap: 10px; margin-top: 18px; }
.btn.wide { margin-top: 22px; }
#tab-settings > .btns { padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; width: fit-content; max-width: 100%; }
.row, .row3 { gap: 16px; }
.row > div, .row3 > div { min-width: 0; }
.searchbar { gap: 10px; align-items: stretch; }
.searchbar > input { min-width: 0; flex: 1; }
.searchbar > button { flex: 0 0 auto; }
.seg { margin-top: 18px; gap: 8px; }
.seg button { min-height: 44px; font-size: 12px; padding: 8px 14px; }
.seg button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.result { gap: 14px; padding: 18px 0; flex-wrap: wrap; }
.result .info { min-width: 110px; overflow-wrap: anywhere; }
.result img, .result .ph { width: 70px; height: 70px; border-radius: 16px; }
.tag { padding: 4px 10px; font-size: 10px; letter-spacing: .08em; }
.note, .ok, .crunch { padding: 16px; border-radius: 14px; line-height: 1.6; }
.events li { padding: 12px 0; }
.events b { font-weight: 650; }
.empty { padding: 40px 20px; background: var(--card); border: 1px dashed var(--line); border-radius: 20px; }
.log div { padding: 12px 0; overflow-wrap: anywhere; }
.person { padding: 18px 0; }
.linkbox { align-items: stretch; }
.linkbox input { min-width: 0; flex: 1; }
.check { align-items: flex-start; gap: 12px; line-height: 1.6; }
.check input { margin-top: 3px; }
.steps { line-height: 1.7; }
.steps li { margin: 12px 0; }
summary { padding: 12px 0; min-height: 44px; }
.gbtn { min-height: 52px; border-radius: 12px; }
.linkish { min-height: 44px; padding: 8px 0; text-align: left; }
#authView { max-width: 440px; min-height: calc(100svh - env(safe-area-inset-top) - env(safe-area-inset-bottom)); margin: 0 auto; padding: 56px 0 140px; }
.auth-heading { padding: 0 24px 26px; color: #153a2b; }
.auth-heading .eyebrow { color: #153a2b; }
.auth-heading p { font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 6vw, 56px); font-weight: 500; line-height: 1.02; letter-spacing: -.045em; margin: 14px 0; }
.auth-heading > span:last-child { font-size: 13px; }
.auth { max-width: 440px; width: 100%; margin: 0; padding: 28px; }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.auth-brand img { border-radius: 18px; object-fit: cover; flex: none; }
.auth-brand h1 { font-size: 30px; letter-spacing: -.05em; margin: 4px 0 0; }
.auth-brand .eyebrow { font-size: 8px; letter-spacing: .1em; }
.auth #authIntro { margin-bottom: 22px; }
.auth #authErr:empty, .auth #authFoot:empty { display: none; }
.chatfab { padding: 14px 20px; font-size: 14px; right: max(18px, env(safe-area-inset-right)); box-shadow: 0 6px 20px rgba(28, 50, 36, .24); }
.chatpanel { border-radius: 22px; height: min(600px, calc(100dvh - 100px)); }
.chathead { flex-wrap: wrap; }
.chathead button { min-width: 44px; min-height: 44px; color: var(--ink); }
.chatmsgs { min-height: 0; padding: 18px; }
.chatin { padding: 12px; }
.chatin textarea { height: 48px; min-width: 0; }
.toast { z-index: 30; bottom: calc(84px + env(safe-area-inset-bottom)); border-radius: 14px; font-size: 14px; background: var(--forest); color: var(--on-forest); }
.banner { border-radius: 18px; }
@media (hover: hover) {
  .btn:hover, .chatfab:hover { filter: brightness(.94); }
  nav button:not(.on):hover { background: var(--field); }
}
@media (max-width: 760px) {
  .alpine-backdrop { background-image: url("drk-magik-dawn-mobile.png"); background-position: right bottom; }
  header { margin: 16px 16px 10px; padding: 12px 14px; }
  header h1 { font-size: 22px; flex: 1; white-space: nowrap; }
  header .sub { flex: 0 0 100%; order: 3; }
  header .sub:empty { display: none; }
  header .who { gap: 2px 4px; font-size: 10px; } /* Claude: let real (longer) names fit on one line as in the mockup */
  header .who button { font-size: 11px; padding: 5px; }
  nav { margin: 0 16px; padding: 5px; border-radius: 16px; }
  nav button { font-size: 12px; padding: 10px 14px; }
  main { padding: 16px 16px calc(110px + env(safe-area-inset-bottom)); }
  .card { padding: 20px; border-radius: 18px; }
  .section-heading { padding: 20px; }
  #authView { max-width: 440px; padding: 40px 18px 180px; }
  .auth-heading { padding: 0 8px 26px; }
  .auth { padding: 24px; }
  .auth-brand { gap: 12px; }
  .auth-brand h1 { font-size: 28px; }
}
@media (max-width: 400px) {
  .seg { gap: 5px; }
  .seg button { padding: 8px 11px; }
  .linkbox { flex-wrap: wrap; }
  .linkbox input { flex-basis: 100%; }
}
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --bg: #14291f; --card: rgba(24, 49, 35, .82); --ink: #eef6e6; --muted: #c1d2b4;
    --line: rgba(189, 211, 172, .28); --accent: #c3d9ab; --accent-ink: #1b3526; --soft: rgba(58, 85, 44, .85);
    --warn: #f2ce9c; --warn-bg: rgba(68, 49, 27, .97); --danger: #ffb9a5; --field: rgba(36, 64, 45, .94);
    --forest: rgba(17, 39, 27, .94); --shadow: 0 12px 36px rgba(0, 0, 0, .24); }
  .alpine-backdrop::after { background: rgba(8, 26, 22, .3); }
  .auth-heading { color: #f0f9e7; text-shadow: 0 2px 12px rgba(0, 20, 12, .8); }
  .auth-heading .eyebrow { color: #f0f9e7; }
  .tag { color: var(--accent); }
  .tag.warn { color: var(--warn); }
  .tag.bolt { background: #433323; color: #efc390; }
}
@supports (padding: max(0px)) {
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* v2 screens and Claude's component contract (DESIGN-BRIEF-V2, section 3). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.app-header { max-width: 1240px; position: relative; }
.app-header h1 { flex: 0 0 auto; }
.account-menu { margin-left: auto; position: relative; }
.account-menu > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; cursor: pointer; border-radius: 12px; background: rgba(255,255,255,.07); font-size: 13px; list-style: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu b { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; z-index: 40; padding: 10px; background: #203e2d; color: #eff7e8; border: 1px solid #667e56; border-radius: 16px; box-shadow: var(--shadow); }
.secondary-nav { display: flex; flex-direction: column; margin: 0; padding: 0; max-width: none; gap: 4px; overflow: visible; background: none; border: 0; backdrop-filter: none; }
.secondary-nav button, .logout-button { min-height: 46px; width: 100%; text-align: left; background: none; border: 0; color: #eff7e8; padding: 10px 14px; border-radius: 10px; font: inherit; font-size: 14px; cursor: pointer; }
.secondary-nav button.on { background: #456444; color: white; }
.logout-button { border-top: 1px solid #667e56; margin-top: 8px; color: #f4d39d; }
.primary-nav { max-width: 1240px; display: grid; grid-template-columns: 1fr 1fr 1fr; position: sticky; top: calc(8px + env(safe-area-inset-top)); z-index: 5; }
.primary-nav button { white-space: normal; font-size: 14px; }
main { max-width: 1296px; padding-top: 24px; }
.screen-heading { margin-bottom: 24px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.screen-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 4vw, 42px); font-weight: 500; letter-spacing: -.04em; margin: 8px 0 10px; }
.screen-heading p { font-size: 14px; max-width: 700px; margin: 0; color: var(--muted); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.workspace-grid > *, .workspace-list, .builder { min-width: 0; }
.workspace-list { position: sticky; top: calc(100px + env(safe-area-inset-top)); }
.builder > h3 { font-size: 22px; margin: 0 0 20px; }
.builder fieldset { border: 0; border-top: 1px solid var(--line); padding: 20px 0 24px; margin: 0; min-width: 0; }
.builder legend { font-weight: 700; font-size: 15px; padding: 0 10px 0 0; }
.step-number { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); border-radius: 50%; margin-right: 8px; font-size: 11px; }
.builder fieldset > label:first-of-type { margin-top: 6px; }
.field-hint, .optional { color: var(--muted); font-weight: 400; font-size: 12px; }
.field-hint { line-height: 1.6; margin: 12px 0; }
.picked { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.picked:empty { margin: 0; }
.choice-row, .site-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.choice { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 44px; margin: 0; font-size: 12px; font-weight: 600; background: var(--field); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input { width: 17px; height: 17px; min-height: 0; margin: 0; padding: 0; flex: none; accent-color: var(--accent); }
#tab-hunts:has(input[name=huntMode][value=exact]:checked) .flex-fields { display: none; }
#huntNights { max-width: 140px; }
#tab-reminders:has(input[name=remDays]:checked:not([value=custom])) .custom-days { display: none; }
.pills, .trip-filters, .season-picks { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.pill { min-height: 44px; min-width: 44px; padding: 9px 13px; font: inherit; font-size: 12px; font-weight: 650; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.pill[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.season-picks .btn { font-size: 11px; min-height: 36px; padding: 7px 11px; }
.form-disclosure { border-top: 1px solid var(--line); margin: 18px 0 0; }
.form-disclosure summary { font-size: 13px; font-weight: 650; cursor: pointer; }
.form-disclosure .btn { margin-top: 12px; }
.save-strip { padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.save-strip p { margin: 0; font-size: 12px; color: var(--muted); max-width: 320px; }
.save-strip .btn { flex: none; }
.form-message:empty { display: none; }
.form-message { margin-top: 12px; font-size: 13px; }
.list-heading { margin: 0 0 14px; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(8px); }
.list-heading h3 { margin: 5px 0 0; font-size: 20px; }
.companion-note { display: flex; gap: 10px; margin-top: 14px; padding: 14px 18px; background: var(--card); border-radius: 14px; font-size: 12px; }
.companion-note p { margin: 0; }
.preview-card h3 { font-size: 22px; margin: 8px 0; }
#huntList:empty::after, #remList:empty::after, #tripList:empty::after, #remPreview:empty::after { display: block; padding: 26px 20px; color: var(--muted); font-size: 13px; background: var(--card); border: 1px dashed var(--line); border-radius: 16px; }
#huntList:empty::after { content: "Your active hunts will appear here. Start with a campground and your dates."; }
#remList:empty::after { content: "Your saved reminder plans will appear here."; }
#tripList:empty::after { content: "Your next adventure starts here. Add a reservation, hunt or reminder plan."; }
#remPreview:empty::after { content: "Choose a campground and camping months to preview your next booking dates."; background: var(--soft); padding: 18px; }
.trip-filters { margin: 0 0 16px; padding: 10px; border-radius: 16px; background: var(--card); }
.trips-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
/* 3a — summary contains exactly the name and dates; body holds all details. */
.trip-item { border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; background: var(--card); backdrop-filter: blur(8px); overflow: visible; }
.trip-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 20px 22px; min-height: 78px; list-style: none; cursor: pointer; border-left: 3px solid transparent; border-radius: 16px; }
.trip-summary::-webkit-details-marker { display: none; }
.trip-item[data-kind=reservation] > .trip-summary { border-left-color: #b67a45; }
.trip-item[data-kind=hunt] > .trip-summary { border-left-color: #547756; }
.trip-item[data-kind=reminder] > .trip-summary { border-left-color: #5e8c98; }
.trip-name { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.trip-dates { font-size: 12px; color: var(--muted); text-align: right; max-width: 110px; }
.trip-dates::after { content: "⌄"; display: inline-block; margin-left: 10px; font-size: 18px; }
.trip-item[open] > .trip-summary { border-radius: 16px 16px 0 0; border-bottom: 1px solid var(--line); }
.trip-item[open] .trip-dates::after { content: "⌃"; }
.trip-item.paused { border-style: dashed; }
.trip-body { padding: 20px 22px; }
.trip-section { margin-bottom: 18px; }
.trip-section h4 { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.kv { display: grid; grid-template-columns: minmax(75px, .7fr) minmax(0, 1.3fr); gap: 8px 14px; font-size: 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.trip-body .btns { margin-top: 20px; }
.trip-body .btn.small { font-size: 11px; padding: 9px 11px; }
.rules-link { text-decoration: underline; text-underline-offset: 3px; }
/* 3b — observed moments are labeled quietly, never crossed out. */
.op-list { padding: 0; margin: 0; list-style: none; }
.op { display: grid; gap: 5px; border-top: 1px solid var(--line); padding: 15px 0; }
.op:first-child { border-top: 0; }
.op-when { font-size: 12px; font-weight: 750; color: var(--ink); }
.op-what { font-size: 13px; }
.op-note { font-size: 11px; color: var(--muted); line-height: 1.5; }
.op[data-status=observed] .op-when::after { content: "Expected"; margin-left: 8px; font-weight: 500; font-size: 10px; color: var(--muted); }
/* 3c — fixed side panel on web, bottom sheet on phones. */
.rules-panel { position: fixed; top: 16px; bottom: 16px; right: 16px; width: min(440px, calc(100vw - 32px)); z-index: 35; border: 1px solid var(--line); background: var(--card); border-radius: 24px; box-shadow: -12px 0 50px rgba(9, 30, 20, .28); backdrop-filter: blur(20px); display: flex; flex-direction: column; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 6px 0 0; font-size: 24px; }
.panel-close { border: 1px solid var(--line); background: var(--field); color: var(--ink); width: 44px; height: 44px; flex: none; border-radius: 50%; font-size: 26px; cursor: pointer; }
.rules-body { padding: 24px; overflow-y: auto; min-height: 0; }
.rules-summary { font-size: 18px; line-height: 1.5; font-weight: 600; margin: 0 0 10px; }
.rules-head .muted { font-size: 12px; margin-bottom: 24px; }
.rule { margin: 16px 0; padding: 18px; background: var(--field); border: 1px solid var(--line); border-radius: 14px; }
.rule-text { font-size: 14px; line-height: 1.65; }
.rule-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; font-size: 11px; color: var(--muted); }
.rule-meta a { color: var(--ink); text-underline-offset: 3px; overflow-wrap: anywhere; }
.badge { padding: 3px 8px; border-radius: 6px; background: var(--soft); font-size: 10px; font-weight: 650; color: var(--ink); }
.rule[data-status=observed] .badge { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.rules-caps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.cap { display: inline-flex; gap: 5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; }
.cap.on { background: var(--soft); color: var(--ink); }
.cap.on::before { content: "✓"; }
.cap.off { color: var(--muted); background: transparent; border-style: dashed; }
.cap.off::before { content: "—"; }
/* 3d — locked stays focusable so its explanation works by touch or keyboard. */
.crunch-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; position: relative; margin: 18px 0; }
.crunch-btn { min-height: 44px; border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; background: var(--soft); color: var(--ink); }
.crunch-btn[data-state=locked] { color: var(--muted); background: transparent; border-style: dashed; cursor: not-allowed; }
.crunch-btn[data-state=ready] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.crunch-btn[data-state=on] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.crunch-pop { position: absolute; left: 0; bottom: calc(100% + 8px); padding: 9px 12px; border-radius: 10px; color: var(--on-forest); background: var(--forest); font-size: 11px; width: max-content; max-width: 100%; z-index: 4; opacity: 0; visibility: hidden; pointer-events: none; }
.crunch-btn[data-state=locked]:is(:hover,:focus) + .crunch-pop, .crunch-pop.show { opacity: 1; visibility: visible; }
/* 3e + 3f — exact results, groups, selected chips, pressed pills. */
.result { align-items: center; border: 1px solid var(--line); background: var(--field); border-radius: 12px; padding: 14px; margin: 10px 0; gap: 10px; flex-wrap: nowrap; }
.result:first-child { border-top: 1px solid var(--line); }
.result.exact { border-color: var(--accent); }
.result-group { border-style: dashed; background: var(--soft); }
.result .info { min-width: 0; }
.result h3 { font-size: 13px; margin: 0 0 5px; line-height: 1.4; }
.result .muted { font-size: 11px; }
.result > .btn { flex: none; font-size: 11px; padding: 9px 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding-left: 12px; background: var(--soft); color: var(--ink); font-size: 12px; }
.chip-x { min-width: 36px; min-height: 44px; background: none; color: var(--ink); border: 0; border-left: 1px solid var(--line); border-radius: 0 9px 9px 0; font-size: 20px; cursor: pointer; }
/* 3g — each field can shrink within its grid cell, including native date inputs. */
.dt-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.9fr) minmax(0,1.2fr) auto; gap: 12px; align-items: end; margin: 12px 0; }
.dt-row > label { min-width: 0; margin: 0; font-size: 12px; }
.dt-row input, .dt-row select { display: block; margin-top: 6px; min-width: 0; max-width: 100%; }
.dt-row > button { min-height: 48px; }
/* Face-only DRK trigger; the small speech bubble is separate from the artwork. */
.chatfab { width: 94px; height: 94px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; filter: drop-shadow(0 3px 6px rgba(0,20,12,.45)); }
.chatfab:hover { filter: drop-shadow(0 3px 6px rgba(0,20,12,.45)); }
.chatfab img { width: 100%; height: 100%; object-fit: contain; }
.chat-bubble { position: absolute; right: calc(100% + 4px); top: 14px; bottom: auto; width: auto; height: auto; white-space: nowrap; border-radius: 12px 12px 2px 12px; border: 1px solid #80946a; background: #e6efd9; color: #24432e; font-size: 15px; line-height: 1; font-weight: 800; padding: 8px 11px; text-align: center; box-shadow: 0 2px 6px rgba(0,20,12,.25); }
.chat-bubble::after { content: ""; position: absolute; right: -7px; bottom: 6px; border: 6px solid transparent; border-left: 7px solid #e6efd9; border-right: 0; }
.chathead b { font-size: 14px; line-height: 1.4; }
/* Static component gallery; not part of the production page. */
.gallery-intro, .gallery-section { padding: 24px; margin-bottom: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; backdrop-filter: blur(8px); }
.gallery-intro h2 { font-family: Georgia,serif; font-size: 36px; font-weight: 500; }
.gallery-intro p { font-size: 14px; max-width: 700px; }
.gallery-nav { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.gallery-nav a { color: var(--ink); font-size: 12px; padding: 8px 12px; min-height: 40px; background: var(--field); border-radius: 8px; }
.gallery-section > h3 { margin-bottom: 18px; font-size: 22px; }
.gallery-section > p { color: var(--muted); font-size: 12px; }
.gallery-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; align-items: start; }
.gallery-grid > * { min-width: 0; }
.gallery-section .trip-item { background: var(--field); backdrop-filter: none; }
.gallery-section { scroll-margin-top: 24px; }
.gallery-avatar { position: relative; display: block; right: auto; bottom: auto; margin: 20px; }
@media (max-width: 1020px) {
  .workspace-grid, .trips-grid { grid-template-columns: minmax(0,1fr); }
  .workspace-list { position: static; }
  .app-header, .primary-nav { margin-left: 24px; margin-right: 24px; }
}
@media (max-width: 760px) {
  .app-header, .primary-nav { margin-left: 14px; margin-right: 14px; }
  .app-header { padding: 12px 14px; }
  .app-header h1 { font-size: 20px; }
  .app-header .brand-icon { width: 36px; height: 36px; border-radius: 10px; }
  .app-header .sub { order: 3; }
  .account-menu { margin-left: auto; }
  .account-menu > summary { font-size: 11px; padding: 8px; gap: 6px; }
  .account-menu b { max-width: 84px; }
  .primary-nav { gap: 3px; padding: 5px; }
  .primary-nav button { font-size: 12px; padding: 8px 6px; min-height: 54px; line-height: 1.3; }
  main { padding: 18px 14px calc(110px + env(safe-area-inset-bottom)); }
  .screen-heading { padding: 20px; margin-bottom: 18px; }
  .screen-heading h2 { font-size: 30px; }
  .screen-heading p { font-size: 12px; }
  .workspace-grid { gap: 18px; }
  .builder { padding: 20px; }
  .builder legend { font-size: 14px; }
  .save-strip { display: block; }
  .save-strip p { margin-bottom: 14px; }
  .save-strip > .btn { width: 100%; }
  .trip-summary { padding: 18px 16px; gap: 10px; grid-template-columns: minmax(0,1fr) minmax(65px,.45fr); }
  .trip-name { font-size: 14px; }
  .trip-dates { font-size: 11px; }
  .trip-dates::after { margin-left: 5px; }
  .trip-body { padding: 18px 16px; }
  .rules-panel { top: auto; right: 0; bottom: 0; width: 100%; max-height: 85dvh; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .panel-heading { padding: 20px; }
  .rules-body { padding: 20px; }
  .gallery-grid { grid-template-columns: minmax(0,1fr); }
  .gallery-section, .gallery-intro { padding: 18px; }
  .chatfab { width: 70px; height: 70px; right: max(14px,env(safe-area-inset-right)); }
  .gallery-avatar { right: auto; }
  .chat-bubble { top: 8px; font-size: 13px; padding: 7px 9px; }
}
@media (max-width: 600px) {
  .dt-row { grid-template-columns: minmax(0,1fr); padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
  .dt-row > button { justify-self: start; }
}
