/* Ported from the live Fencepost artifact (28 Nov 2026). Farm photos and logo come from settings. */
:root {
  --bg: #F6F4EF; --panel: #FFFFFF; --fg: #1F2420; --muted: #646B64; --line: #E3DFD5;
  --ok: #2F7D4A; --warn: #B7791F; --bad: #B23A2E;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  --accent: #B65C1D; --accent-2: #D9A441; --deep: #4A2E17;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #151816; --panel: #1E2320; --fg: #ECEEE9; --muted: #A2AAA2; --line: #313832; --shadow: none; color-scheme: dark; }
}
.season-winter { --accent: #3E6E8E; --accent-2: #A9CDE0; --deep: #1B2E3F; }
.season-spring { --accent: #4D8230; --accent-2: #E59AB5; --deep: #24401A; }
.season-summer { --accent: #2E7D4F; --accent-2: #E8B730; --deep: #173523; }
.season-fall   { --accent: #B65C1D; --accent-2: #D9A441; --deep: #4A2E17; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 Inter, system-ui, sans-serif; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 28px; }
h1, h2, h3 { margin: 0; }
.serif { font-family: Fraunces, Georgia, serif; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Hero */
/* --img-aerial, --img-sunset and --hero-* are set on :root by theme.js from farm settings. */
/* #top means the page top: without this the hero's gear and account buttons land under the sticky tab bar */
#top { scroll-margin-top: 400px; }
.hero { position: relative; overflow: hidden; border-radius: var(--radius); min-height: 260px; display: flex; align-items: flex-end; background-color: var(--deep); background-image: var(--img-aerial, none); background-position: center 60%; background-size: cover; background-repeat: no-repeat; }
/* Seasonal banner photos (fall uses the aerial above) */
.season-winter .hero { background-image: var(--hero-winter, var(--img-aerial, none)); background-position: center 45%; }
.season-spring .hero { background-image: var(--hero-spring, var(--img-aerial, none)); background-position: center 60%; }
.season-summer .hero { background-image: var(--hero-summer, var(--img-aerial, none)); background-position: center 52%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--deep) 88%, transparent) 0%, color-mix(in srgb, var(--deep) 45%, transparent) 38%, transparent 70%), linear-gradient(to bottom, rgba(0,0,0,.28), transparent 30%); }
.hero-text { position: relative; z-index: 1; padding: 28px 24px 22px; width: 100%; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hero .kicker { color: color-mix(in srgb, var(--accent-2) 70%, #fff); }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; margin: 0 0 6px; }
.kicker::before { content: ''; width: 20px; height: 3px; border-radius: 2px; background: var(--accent-2); }
.hero-text { text-shadow: 0 1px 3px rgba(0,0,0,.55), 0 0 18px rgba(0,0,0,.35); }
.hero h1 { color: #fff; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.05; }
.tagline { color: rgba(255,255,255,.95); margin: 4px 0 0; font-weight: 500; }
.lede { color: rgba(255,255,255,.82); margin: 4px 0 0; font-size: 14px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-top { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; align-items: center; gap: 8px; }
.today-chip { display: flex; flex-direction: column; align-items: flex-end; gap: 0; padding: 7px 14px; border-radius: 12px; background: rgba(0,0,0,.38); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.today-chip .dow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; }
.today-chip .full { font-family: Fraunces, Georgia, serif; font-size: 1.05rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .hero-top { top: 10px; right: 10px; } .today-chip { padding: 5px 10px; } .today-chip .full { font-size: .95rem; } .hero { min-height: 300px; } .hero-text { padding-top: 92px; } }
.bell { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(0,0,0,.38); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.bell svg { width: 22px; height: 22px; }
.bell .badge { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #E0453A; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--deep); }
.bell .badge[hidden] { display: none; }
.bell.ring svg { animation: ring .9s ease; }
@media (prefers-reduced-motion: reduce) { .bell.ring svg { animation: none; } }
@keyframes ring { 0%,100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.alert-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--bg); text-align: left; width: 100%; }
.alert-item.unread { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.alert-item .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.alert-item:not(.unread) .dot { background: var(--line); }
.alert-item .a-title { font-weight: 600; }
.alert-item .a-meta { font-size: 13px; color: var(--muted); }
.flash { animation: flash 2s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: var(--shadow); } }
.brand { display: flex; align-items: center; gap: 18px; }
.brand-logo { position: relative; width: 140px; aspect-ratio: 360 / 257; flex: none; filter: drop-shadow(0 4px 14px rgba(0,0,0,.45)); }
.brand-logo > span { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; transition: background-color .6s ease; }
.brand-logo .logo-light { background-color: color-mix(in srgb, var(--accent-2) 16%, #FFFAF0); -webkit-mask-image: var(--logo-mask-light, none); mask-image: var(--logo-mask-light, none); }
.brand-logo .logo-dark { background-color: color-mix(in srgb, var(--accent) 82%, #000); -webkit-mask-image: var(--logo-mask-dark, none); mask-image: var(--logo-mask-dark, none); }
@media (max-width: 700px) { .brand { gap: 12px; } .brand-logo { width: 92px; } }

/* Buttons */
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.hero .btn { background: rgba(255,255,255,.92); color: #1F2420; border-color: transparent; }
.hero .btn.primary { background: var(--accent); color: #fff; }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.icon-btn:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.kpi { border-top: 3px solid var(--accent); }
.kpi .label { font-size: 12px; color: var(--muted); }
.kpi .val { font-family: Fraunces, Georgia, serif; font-size: 2rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi .val.bad { color: var(--bad); }

/* Sections */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-title { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 600; }
.sec-title::before { content: ''; width: 4px; height: 1.1em; border-radius: 2px; background: var(--accent); }
.sec-note { color: var(--muted); font-size: 13px; }
.owner-group { margin-bottom: 22px; }
.owner-head { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; flex: none; letter-spacing: -.02em; }
.owner-name { font-weight: 600; }
.owner-count { color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.empty { color: var(--muted); font-size: 14px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Project card */
.proj { display: flex; flex-direction: column; gap: 10px; border-left: 4px solid var(--accent-2); }
.proj-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.proj-name { font-weight: 600; font-size: 1.05rem; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill { font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.pill.active { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.pill.hold { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.pill.done { color: var(--muted); }
.bar { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar.money > span { background: var(--accent-2); }
.bar.money.over > span { background: var(--bad); }
.metric-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.next { font-size: 14px; }
.next b { font-weight: 600; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 13px; margin: 0; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.detail { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 14px; }
.detail h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.notes { font-size: 13px; color: var(--muted); white-space: pre-wrap; margin: 0; }
.tasklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.tasklist li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tasklist li.done span { color: var(--muted); text-decoration: line-through; }
.tasklist li span { flex: 1; }
.tasklist input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.inline-add { display: flex; gap: 6px; margin-top: 6px; }
.inline-add input { flex: 1; min-width: 0; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 600; border-bottom: 0; }

/* Notes library */
.wrap[hidden], .mobile-bar[hidden] { display: none !important; }
.lib-teaser { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-left: 4px solid var(--accent); }
.lib-teaser .stats { font-size: 14px; color: var(--muted); }
.lib-teaser .recent { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.topic-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); text-decoration: none; }
.topic-chip:hover { border-color: var(--accent); }
.topic-chip .n { color: var(--muted); font-variant-numeric: tabular-nums; }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: #fff; }
.mini-hero { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--deep); padding: 18px 18px 16px; display: flex; align-items: center; gap: 14px; }
.mini-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%); pointer-events: none; }
.mini-hero > * { position: relative; z-index: 1; }
.mini-hero .brand-logo { width: 78px; }
.mini-hero h1 { color: #fff; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.1; }
.mini-hero .sub { color: rgba(255,255,255,.8); font-size: 14px; margin: 2px 0 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-2); text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 6px; min-height: 32px; }
.lib-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search { flex: 1; min-width: 200px; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; background: var(--panel); font-size: 16px; }
.search:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); border-color: var(--accent); }
.topic-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; border-left: 4px solid var(--accent-2); }
.topic-card:hover { border-color: var(--accent); }
.topic-card .t-title { font-weight: 600; font-size: 1.05rem; }
.topic-card .t-meta { font-size: 13px; color: var(--muted); }
.topic-card ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.src { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: var(--line); color: var(--fg); white-space: nowrap; }
.src.yt { background: #E62117; color: #fff; }
.src.vimeo { background: #1AB7EA; color: #fff; }
.src.fb { background: #1877F2; color: #fff; }
.link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.link-item { display: flex; gap: 12px; align-items: flex-start; }
.play { flex: none; width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--line); color: var(--fg); text-decoration: none; font-size: 20px; }
.play.yt { background: #E62117; color: #fff; }
.link-body { flex: 1; min-width: 0; }
.link-title { font-weight: 600; color: var(--fg); text-decoration: none; word-break: break-word; }
.link-title:hover { color: var(--accent); text-decoration: underline; }
.link-meta { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.link-note { font-size: 14px; margin: 4px 0 0; white-space: pre-wrap; }
.topic-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.topic-head h2 { font-family: Fraunces, Georgia, serif; font-size: 1.6rem; font-weight: 600; }
.topic-notes { white-space: pre-wrap; font-size: 15px; margin: 0; }
.add-link { display: grid; grid-template-columns: 1fr; gap: 8px; }
.add-link input, .add-link textarea { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--bg); font-size: 16px; min-height: 44px; }
.add-link textarea { min-height: 60px; resize: vertical; }
.add-link .row { display: flex; gap: 8px; justify-content: flex-end; }
.proj-topics { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Equipment <-> project links */
.eq-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.eq-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 5px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--panel)); cursor: pointer; }
.eq-badge.ok { color: var(--muted); border-color: var(--line); background: var(--bg); }
.proj-link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; cursor: pointer; text-align: left; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 6px 0; }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); }

/* Scaling: filters, collapsible groups, show more */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filter-bar .search { flex: 1 1 220px; min-width: 0; }
.filter-bar .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sort-sel { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: var(--panel); font-size: 14px; }
.owner-toggle { all: unset; display: flex; align-items: center; gap: 10px; cursor: pointer; width: 100%; padding: 4px 0; min-height: 40px; }
.owner-toggle:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
.chev { margin-left: auto; color: var(--muted); transition: transform .2s; font-size: 14px; }
.owner-group.collapsed .chev { transform: rotate(-90deg); }
.owner-group.collapsed .grid, .owner-group.collapsed .more-row { display: none; }
.owner-stats { color: var(--muted); font-size: 13px; }
.more-row { display: flex; justify-content: center; margin-top: 10px; }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 6px 0; font-size: 14px; }
.result-note { color: var(--muted); font-size: 13px; margin: -6px 0 10px; }
@media (max-width: 700px) { .sort-sel { font-size: 16px; min-height: 44px; } .filter-bar .chips { width: 100%; } }

/* Expenses */
.exp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.exp-kpis .kpi-all { grid-column: 1 / -1; background: linear-gradient(150deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000)); color: #fff; border-color: transparent; }
.exp-kpis .kpi-all .label, .exp-kpis .kpi-all .sub { color: rgba(255,255,255,.85); }
.exp-kpis .kpi-all .val { color: #fff; }
.exp-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; margin-bottom: 12px; }
@media (max-width: 860px) { .exp-grid { grid-template-columns: 1fr; } }
.exp-chart { position: relative; }
.exp-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.exp-chart .bar-rect { fill: var(--accent); }
.exp-chart text { fill: var(--muted); font-size: 11px; font-family: Inter, system-ui, sans-serif; }
.exp-chart text.v { fill: var(--fg); font-weight: 600; font-size: 10px; }
.cat-rows { display: flex; flex-direction: column; gap: 10px; }
.cat-row .top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-variant-numeric: tabular-nums; }
.cat-row .top span:last-child { color: var(--muted); }
.cat-row .bar { margin-top: 4px; }
.cat-row button { all: unset; cursor: pointer; display: block; width: 100%; }
.cat-row.on .top span:first-child { color: var(--accent); font-weight: 600; }
.card h4.ch, .card h3.ch { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.exp-table td.desc { word-break: break-word; }
.exp-table .cat-tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.exp-actions { white-space: nowrap; text-align: right; }
.cat-manage { display: flex; flex-direction: column; gap: 8px; }
.cat-manage .row { display: flex; gap: 8px; align-items: center; }
.cat-manage .row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: var(--bg); font-size: 16px; }
.cat-manage .used { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sheet-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sheet-list .btn { justify-content: center; min-height: 52px; }
@media (max-width: 700px) {
  .exp-table thead { display: none; }
  .exp-table, .exp-table tbody, .exp-table tr, .exp-table td { display: block; width: 100%; }
  .exp-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .exp-table td { border: 0; padding: 0; }
  .exp-table td.desc { grid-column: 1; font-weight: 600; }
  .exp-table td.num { grid-column: 2; grid-row: 1; font-weight: 600; font-size: 15px; }
  .exp-table td.when, .exp-table td.cat { grid-column: 1; font-size: 13px; color: var(--muted); }
  .exp-table td.hide-sm { display: none; }
  .exp-table td.exp-actions { grid-column: 1 / -1; text-align: left; display: flex; gap: 8px; margin-top: 6px; }
}

.exp-chart .bar-rect.proj { fill: var(--accent-2); }
.exp-chart text.now-lbl { fill: var(--accent); font-weight: 700; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.legend .sw.bill { background: var(--accent); }
.legend .sw.proj { background: var(--accent-2); }
.cat-group { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-top: 4px; }
.proj-tag { cursor: pointer; background: color-mix(in srgb, var(--accent-2) 14%, var(--panel)); color: var(--fg); font: inherit; font-size: 12px; }

/* Receipts */
.rcpt-picker { display: flex; flex-direction: column; gap: 8px; }
.rcpt-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.rcpt-thumb { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center; font-size: 12px; color: var(--muted); text-align: center; }
.rcpt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rcpt-thumb .x { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; cursor: pointer; display: grid; place-items: center; }
.rcpt-thumb.pending::after { content: 'New'; position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 4px; padding: 0 4px; }
.rcpt-add { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.rcpt-add input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rcpt-btn { border: 0; background: none; cursor: pointer; font-size: 17px; padding: 2px 6px; border-radius: 6px; line-height: 1; vertical-align: middle; }
.rcpt-btn:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.rcpt-view { display: flex; flex-direction: column; gap: 12px; }
.rcpt-view img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.rcpt-view .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rcpt-missing { padding: 18px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; color: var(--muted); font-size: 14px; }

.fullview { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.92); display: flex; flex-direction: column; }
.fv-close { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 10px; z-index: 2; background: rgba(255,255,255,.95); color: #111; }
.fv-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; align-items: flex-start; justify-content: center; padding: 56px 8px 16px; touch-action: pinch-zoom pan-x pan-y; }
.fv-scroll img { max-width: none; width: min(100%, 1600px); height: auto; border-radius: 6px; background: #fff; }

/* Project cost summary */
.cost-sum { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 12px; }
.cs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 10px; }
.cs-v { font-family: Fraunces, Georgia, serif; font-size: 1.25rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cs-v.over { color: var(--bad); }
.cs-l { font-size: 12px; color: var(--muted); }
.cs-cats { display: flex; flex-direction: column; gap: 8px; }
.cs-cat .top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.cs-cat .top span:last-child { color: var(--muted); }
.cs-cat .bar { margin-top: 3px; height: 6px; }
.cs-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.log-toggle { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--accent); font-weight: 600; font-size: 14px; min-height: 36px; }
.log-toggle:focus-visible { outline: 2px solid var(--accent); border-radius: 6px; }

.var-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.var-pill.under { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--panel)); }
.var-pill.over { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--panel)); }
.var-pill.on { color: var(--muted); background: var(--bg); border: 1px solid var(--line); }
.var-amt { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cs-v.under { color: var(--ok); }

/* Top row: summary numbers + Shopping list card (top right) */
.top-row { display: block; }
.pj-kpis { grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
.pj-kpis .kpi-imp { grid-column: 1 / -1; display: block; color: inherit; text-decoration: none; border-left: 4px solid var(--accent); }
.pj-kpis .kpi-imp:hover { border-color: var(--accent); }
.prop-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; }
.prop-kpis .kpi-all { grid-column: 1 / -1; background: linear-gradient(150deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000)); color: #fff; border-color: transparent; }
.prop-kpis .kpi-all .label, .prop-kpis .kpi-all .sub { color: rgba(255,255,255,.85); }
.prop-kpis .kpi-all .val { color: #fff; }
@media (max-width: 600px) { .prop-kpis { grid-template-columns: 1fr 1fr; } .prop-kpis .kpi:last-child { grid-column: 1 / -1; } }
.prop-link { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 14px 16px; min-height: 64px; color: inherit; text-decoration: none; border-left: 4px solid var(--accent); }
.prop-link-ic { font-size: 26px; }
.prop-link-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prop-link-t small { color: var(--muted); font-size: 12.5px; }
.prop-link-v { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.prop-link-go { font-size: 26px; color: var(--muted); }
.loc-chips { margin-top: 8px; gap: 6px; }
.loc-chips .chip { min-height: 36px; padding: 6px 12px; }
.list-jump { margin-top: 10px; gap: 8px; }
.list-jump .chip { min-height: 40px; text-decoration: none; display: inline-flex; align-items: center; }
.pack-card { margin-top: 16px; }
.pack-head { cursor: default; }
.pack-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pack-actions .btn { min-height: 44px; }
.pack-every-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow: auto; }
.jump-grid.jump-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 4px 0 0; }
@media (max-width: 700px) { .jump-grid.jump-4 { gap: 6px; } .jump-4 .jt { min-height: 76px; padding: 8px 2px; font-size: 12.5px; } }
.pot-season { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 0 0 10px; border: 1px solid var(--line); background: var(--panel); }
.pot-season.winter { border-color: color-mix(in srgb, #3b82c4 45%, transparent); background: color-mix(in srgb, #3b82c4 8%, var(--panel)); }
.pot-season.fall { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 9%, var(--panel)); }
.pot-season.summer { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 7%, var(--panel)); }
.pot-thumb { width: 72px; height: 72px; }
.pot-act { font-size: 13.5px; font-weight: 600; border-radius: 8px; padding: 7px 10px; }
.pot-act.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 9%, var(--panel)); }
.pot-act.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--panel)); }
.pot-act.good { color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.tm-photo-row { display: flex; gap: 12px; align-items: center; }
.pot-hist summary { cursor: pointer; font-weight: 600; min-height: 36px; }
.tl-share { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.gear-sends { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.gear-sends .btn { width: 100%; justify-content: center; min-height: 52px; font-size: 15px; }
.gl-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; }
.gl-row { min-height: 52px; border-bottom: 1px solid var(--line); }
.gl-row:last-child { border-bottom: 0; }
.fp-mark { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 14px 0 4px; font-size: 13px; color: var(--muted); }
.fp-mark svg { width: 22px; height: 22px; color: #3F2614; flex: none; }
@media (prefers-color-scheme: dark) { .fp-mark svg { color: #F6F1E7; } }
.fp-mark b { color: var(--fg); font-family: Fraunces, Georgia, 'Times New Roman', serif; font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.fp-mark span::before { content: '·'; margin-right: 7px; }
.approx-row { margin-top: -4px; padding: 0; font-size: 13px; color: var(--muted); }
.approx-row input { width: 18px; height: 18px; }
.imp-box { padding: 12px; border: 1px dashed var(--accent); border-radius: 10px; background: color-mix(in srgb, var(--accent) 6%, var(--panel)); display: flex; flex-direction: column; gap: 10px; }
.imp-box .imp-more { margin: 0; }
.imp-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--accent); font-weight: 600; text-decoration: none; }
.kpis.tl-down-kpi { grid-template-columns: 1fr !important; margin-bottom: 12px; }
.top-row .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .top-row { grid-template-columns: 1fr; } .top-row #shopping { order: -1; } }

/* Shopping list */
.shop-card { border-top: 3px solid var(--accent-2); display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.shop-head { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 40px; }
.shop-head:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
.shop-cart { font-size: 1.5rem; line-height: 1; }
.shop-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.shop-h { font-weight: 600; font-size: 1.05rem; }
.shop-count { font-size: 13px; color: var(--muted); }
.shop-count.has { color: var(--accent); font-weight: 600; }
.shop-card .chev { margin-left: auto; color: var(--muted); transition: transform .2s; }
.shop-card.collapsed .chev { transform: rotate(-90deg); }
.shop-preview { list-style: none; margin: 0; padding: 0 0 0 4px; display: flex; flex-direction: column; gap: 4px; }
.shop-preview li { font-size: 14px; display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.shop-preview li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); flex: none; transform: translateY(-1px); }
.shop-preview li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-preview li.more { color: var(--muted); font-size: 13px; }
.shop-preview li.more::before { background: transparent; }
.shop-preview[hidden], .shop-body[hidden] { display: none; }
.shop-body { display: flex; flex-direction: column; gap: 10px; }
.shop-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shop-add #shop-item { grid-column: 1 / -1; }
.shop-add #pack-item { grid-column: 1 / -1; }
.shop-add #pack-add-btn { justify-content: center; }
.shop-add #shop-add-btn { justify-content: center; }
.shop-scan { justify-content: center; gap: 6px; }
.shop-scan svg { width: 18px; height: 18px; flex: none; }
.shop-amz { font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; padding: 6px 4px; }
.upc-big { font-family: ui-monospace, Menlo, monospace; font-size: 18px; letter-spacing: .06em; }
.amz-go.disabled { pointer-events: none; opacity: .5; }
.amz-go { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; margin: 4px 0 12px; }
.shop-in { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); font-size: 16px; min-width: 0; min-height: 44px; }
.shop-in:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); border-color: var(--accent); }
.shop-filter:empty { display: none; }
.shop-filter .chip { font-size: 12px; padding: 4px 10px; }
.shop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.shop-row { display: flex; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px solid var(--line); min-height: 46px; }
.shop-row:last-child { border-bottom: 0; }
.shop-check { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 4px 0; }
.shop-box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--accent); flex: none; display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 700; }
.shop-row.got .shop-box { background: var(--accent); }
.shop-text { display: flex; flex-direction: column; min-width: 0; }
.shop-name { font-size: 15px; word-break: break-word; }
.shop-row.got .shop-name { text-decoration: line-through; color: var(--muted); }
.shop-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.shop-qtytag { font-weight: 600; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
.shop-storetag { color: var(--accent); font-weight: 600; }
.shop-empty { color: var(--muted); font-size: 14px; padding: 8px 2px; }
.shop-done summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 4px 0; }
.shop-done[hidden] { display: none; }
.shop-row .icon-btn { padding: 4px 6px; }

/* Weather: banner chip + section */
.hero-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
@media (min-width: 701px) { .hero-text { flex-wrap: nowrap; } .hero-text .brand { flex: 1 1 auto; min-width: 0; } .hero-right { flex: none; margin-left: auto; } }
.wx-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 12px; background: rgba(0,0,0,.38); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.18); color: #fff; text-decoration: none; text-shadow: none; }
.wx-chip[hidden] { display: none; }
.wx-chip-icon { font-size: 1.6rem; line-height: 1; }
.wx-chip-main { display: flex; flex-direction: column; line-height: 1.1; }
.wx-chip-temp { font-family: Fraunces, Georgia, serif; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.wx-chip-sub { font-size: 11px; opacity: .85; white-space: nowrap; }
.wx-chip.stale .wx-chip-temp { opacity: .7; }
@media (max-width: 700px) {
  .hero-right { position: absolute; right: 10px; bottom: 14px; z-index: 2; }
  .hero .tagline, .hero .lede { padding-right: 92px; }
  .wx-chip { padding: 5px 10px 5px 8px; }
  .wx-chip-temp { font-size: 1.35rem; }
  .wx-chip-icon { font-size: 1.3rem; }
}
.wx-now { border-left: 4px solid var(--accent); display: flex; flex-direction: column; gap: 14px; }
.wx-now[hidden] { display: none; }
.wx-now-top { display: flex; align-items: center; gap: 14px; }
.wx-now-icon { font-size: 2.6rem; line-height: 1; }
.wx-now-temp { font-family: Fraunces, Georgia, serif; font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.wx-now-cond { color: var(--muted); font-size: 14px; margin-top: 2px; }
.wx-now-hl { margin-left: auto; text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--muted); }
.wx-now-hl b { color: var(--fg); font-weight: 600; }
.wx-days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(74px, 1fr); gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.wx-day { border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; text-align: center; display: flex; flex-direction: column; gap: 3px; background: var(--bg); }
.wx-day.today { border-color: var(--accent); }
.wx-day .d { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.wx-day.today .d { color: var(--accent); }
.wx-day .hi { font-weight: 600; font-variant-numeric: tabular-nums; }
.wx-day .lo { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wx-day .pp { font-size: 12px; color: var(--muted); min-height: 1.2em; }
.wx-day .pp.wet { color: #2F6FA8; font-weight: 600; }
.wx-day .pp.snow { color: #4C7FA3; font-weight: 600; }
.wx-updated { font-size: 12px; color: var(--muted); }

/* Weather link */
.wx-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; border-left: 4px solid var(--accent); min-height: 72px; }
.wx-card:hover { border-color: var(--accent-2); }
.wx-card[hidden] { display: none; }
.wx-icon { font-size: 2rem; line-height: 1; flex: none; }
.wx-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.wx-title { font-weight: 600; }
.wx-sub { font-size: 13px; color: var(--muted); }
.wx-go { font-size: 1.3rem; color: var(--accent); flex: none; }

/* Project photos */
.ph-strip { display: flex; gap: 6px; }
.ph-thumb { all: unset; cursor: pointer; position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--line); flex: none; }
.ph-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ph-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-more { position: absolute; inset: 0; background: rgba(0,0,0,.5); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.ph-grid .ph-thumb { width: 100%; height: auto; aspect-ratio: 1; }
.fullview.pv { background: #0b0d0c; color: #fff; z-index: 70; }
.pv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 8px; }
.pv-title { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.pv-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-count { opacity: .7; font-size: 12px; }
.pv .fv-close { position: static; }
.pv-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; touch-action: pan-y pinch-zoom; }
.pv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: filter .2s; }
.pv-stage img.blur { filter: blur(6px); }
.pv-status { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); font-size: 13px; background: rgba(0,0,0,.6); padding: 4px 10px; border-radius: 999px; }
.pv-status[hidden] { display: none; }
.pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; font-size: 32px; cursor: pointer; }
.pv-nav.prev { left: 8px; } .pv-nav.next { right: 8px; }
.pv-nav[hidden] { display: none; }
.pv-bottom { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.pv-cap { width: 100%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; border-radius: 10px; padding: 10px 12px; font-size: 16px; }
.pv-cap[readonly] { border-color: transparent; background: transparent; padding-left: 0; }
.pv-cap::placeholder { color: rgba(255,255,255,.5); }
.pv-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; opacity: .85; }
.pv-del { color: #ff8a80; border-color: rgba(255,138,128,.4); background: transparent; }

/* Top-level navigation */
.topnav { position: sticky; top: 0; z-index: 35; background: color-mix(in srgb, var(--panel) 90%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topnav-in { max-width: 1180px; margin: 0 auto; padding: 6px 16px; display: flex; align-items: center; gap: 12px; }
.tn-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fg); flex: none; }
.tn-brand .tn-logo { width: 44px; filter: none; }
.tn-name { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1rem; white-space: nowrap; }
.tn-tabs { display: flex; gap: 4px; margin-left: auto; }
.tn-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; min-height: 40px; }
.tn-tab:hover { color: var(--fg); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.tn-tab.on { color: #fff; background: var(--accent); }
@media (max-width: 700px) {
  .topnav-in { padding: 6px 8px; gap: 6px; }
  .tn-name, .tn-long { display: none; }
  .tn-brand .tn-logo { width: 38px; }
  .tn-tabs { flex: 1; justify-content: space-between; margin-left: 0; }
  .tn-tab { flex: 1; flex-direction: column; justify-content: center; padding: 4px 2px; font-size: 11px; gap: 0; min-height: 44px; border-radius: 12px; line-height: 1.2; }
  .tn-ic { width: 21px; height: 21px; }
  .tn-tab { font-size: 10.5px; }
}
#expenses-view #expenses .sec-title { display: none; }
#expenses-view #expenses > .sec-head { justify-content: flex-end; }
.kpi-link { text-decoration: none; color: inherit; display: block; }
.kpi-link:hover { border-color: var(--accent); }
.kpi-go { color: var(--accent); font-weight: 700; }

/* Trail map */
.map-empty { text-align: left; border-top: 3px solid var(--accent); }
.map-empty[hidden], #map-wrap[hidden] { display: none; }
.map-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; position: sticky; top: 56px; z-index: 5; background: var(--bg); padding: 6px 0; }
.map-zoom { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.map-zoom-v { font-size: 13px; color: var(--muted); min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.map-hint { font-size: 14px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); margin-bottom: 8px; }
.map-hint[hidden] { display: none; }
.map-scroll { overflow: auto; display: block; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--line); background: #111; max-height: 78vh; }
.map-canvas { position: relative; width: 100%; user-select: none; -webkit-user-select: none; }
.map-canvas { touch-action: manipulation; }
.map-canvas.drawing { cursor: crosshair; }
.map-canvas.failed::after { content: 'The map picture couldn’t be loaded. Check your connection, or replace the picture.'; position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: #fff; min-height: 240px; }
.map-canvas:not([style*="aspect-ratio"]) { min-height: 240px; }
.map-canvas img { display: block; width: 100%; height: 100%; -webkit-user-drag: none; }
.map-canvas.loading::after { content: 'Loading map…'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; min-height: 240px; }
#map-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#map-svg polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
#map-svg .halo { stroke: rgba(0,0,0,.55); }
#map-svg .hit { stroke: transparent; cursor: pointer; pointer-events: stroke; }
#map-svg .trail.sel .halo { stroke: #fff; }
#map-svg .tlabel { fill: #fff; stroke: rgba(0,0,0,.75); paint-order: stroke; font-family: Inter, system-ui, sans-serif; font-weight: 700; text-anchor: middle; pointer-events: none; }
#map-svg .vtx { fill: #fff; stroke: #111; cursor: grab; touch-action: none; }
#map-svg .draft { stroke: #fff; fill: none; }
#map-svg .dvtx { fill: var(--accent); stroke: #fff; }
#map-svg .svtx { fill: #ffeb3b; stroke: #111; }
.map-canvas.drawing #map-svg .hit { pointer-events: none; }
.map-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--muted); }
.trail-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px; }
.trail-row { display: flex; align-items: center; gap: 6px; padding: 10px 12px; }
.trail-row.sel { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.trail-main { all: unset; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; flex: 1; min-width: 0; }
.trail-sw { width: 14px; height: 14px; border-radius: 4px; margin-top: 4px; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.trail-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.trail-name { font-weight: 600; }
.trail-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trail-notes { font-size: 13px; color: var(--muted); }
.trail-st.st-open { color: var(--ok); }
.trail-st.st-work { color: var(--warn); }
.trail-st.st-seeded { color: #2F6FA8; }
.trail-st.st-planned { color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--line); cursor: pointer; }
.swatch.on { border-color: var(--fg); box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--fg); }
@media (max-width: 700px) { .map-toolbar { top: 52px; } .map-scroll { max-height: 70vh; } }

/* Tools & equipment */
.tl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
button.kpi-ins { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; border-left: 4px solid var(--accent); display: block; }
@media (max-width: 700px) { .tl-kpis > .kpi-ins { grid-column: 1 / -1; } }
.fields .field.check-row { flex-direction: row; align-items: center; gap: 10px; }
.fields .field.check-row input { width: 20px; height: 20px; min-height: 0; padding: 0; flex: none; }
.fields .field.check-row span { font-size: 14px; color: var(--fg); }
.kpi-ins:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kpi-ins .kpi-go { color: var(--accent); }
.tl-ins { align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #2F6B3A; background: color-mix(in srgb, #2F6B3A 12%, var(--panel)); border-radius: 6px; padding: 1px 6px; }
.ins-sec { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 0 4px; }
.ins-list { list-style: none; margin: 0; padding: 0; }
.ins-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); min-height: 44px; }
.ins-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.ins-row .nm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ins-row .nm b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-row .nm span { font-size: 12px; color: var(--muted); }
.ins-row .amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.ins-row .amt.miss { color: var(--bad); font-weight: 500; font-size: 12px; }
.ins-total { display: flex; justify-content: space-between; font-weight: 700; padding: 10px 0 0; font-size: 16px; }
@media print {
  body.printing-ins > *:not(#overlay) { display: none !important; }
  body.printing-ins #overlay { position: static !important; background: none !important; display: block !important; }
  body.printing-ins .modal { max-height: none !important; overflow: visible !important; box-shadow: none !important; width: auto !important; transform: none !important; }
  body.printing-ins .modal-actions, body.printing-ins #modal-body .btn, body.printing-ins #modal-body p.sec-note { display: none !important; }
  body.printing-ins .ins-row input:not(:checked) ~ * { opacity: .45; }
}
.tl-gh { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 8px; }
.tl-group { margin-bottom: 14px; }
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 8px; }
.tl-card { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tl-card:hover, .tl-card:focus-visible { border-color: var(--accent); }
.tl-card.st-out { border-left: 4px solid var(--warn); }
.tl-card.st-broken { border-left: 4px solid var(--bad); }
.tl-card.st-gone { opacity: .6; }
.tl-thumb { width: 54px; height: 54px; border-radius: 10px; overflow: hidden; flex: none; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; font-size: 24px; }
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tl-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-name { font-weight: 600; }
.tl-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.tl-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.tl-st { font-weight: 600; }
.tl-st.out { color: var(--warn); }
.tl-st.broken { color: var(--bad); }
.tl-wish { display: flex; align-items: center; gap: 10px; padding: 12px; border-left: 4px dashed var(--accent-2); }
.tl-wish-main { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.tl-prio { font-weight: 600; }
.tl-prio.p-high { color: var(--bad); } .tl-prio.p-med { color: var(--warn); } .tl-prio.p-low { color: var(--muted); }
.tv { display: flex; flex-direction: column; gap: 12px; }
.tv-photo { display: flex; justify-content: center; }
.tv-photo img { max-width: 100%; max-height: 300px; border-radius: 10px; border: 1px solid var(--line); }
.tv-photo .tl-thumb { width: 84px; height: 84px; font-size: 36px; }
.tv-meta { grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.tv-hist { list-style: none; margin: 0; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.tv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-tools { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.ph-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; min-height: 32px; }
.fields .ph-chk input, .ph-chk input { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; flex: none; border: 0; background: none; appearance: auto; -webkit-appearance: checkbox; }
.ph-tools .sec-note { font-size: 12px; line-height: 1.35; }
.tm-ph-row { flex-direction: row !important; align-items: center; gap: 12px; }
.tm-photo { width: 72px; height: 72px; border-radius: 12px; border: 1px dashed var(--line); background: var(--bg); display: grid; place-items: center; overflow: hidden; font-size: 26px; flex: none; }
.tm-photo img { width: 100%; height: 100%; object-fit: cover; }
#tl-gone[hidden] { display: none; }

#modal-cancel[hidden] { display: none !important; }

.amz-box { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #FF9900 9%, var(--panel)); border: 1px dashed color-mix(in srgb, #FF9900 45%, transparent); gap: 6px !important; }
.amz-row { display: flex; gap: 6px; align-items: flex-start; }
.amz-row .btn { flex: none; align-self: flex-start; }
.amz-paste { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--bg); font-size: 16px; resize: vertical; min-height: 44px; }
.tl-wish-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }

.warn-note { color: var(--warn) !important; font-weight: 500; }

/* Keep every form field inside the dialog (Safari sizes some inputs wider than their column) */
.modal { overflow-x: hidden; box-sizing: border-box; }
.fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fields > * { min-width: 0; }
.field input:not([type=file]):not([type=checkbox]), .field select, .field textarea, .amz-paste { width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; }
.rcpt-add { position: relative; overflow: hidden; }
.rcpt-add input[type=file] { position: absolute; inset: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.field input[type=date] { -webkit-appearance: none; appearance: none; min-height: 44px; display: block; }
.amz-row { width: 100%; }
.amz-row .amz-paste { width: auto; flex: 1 1 0; }
@media (max-width: 520px) { .fields { grid-template-columns: minmax(0, 1fr); } }

.tl-kind { align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); border-radius: 6px; padding: 1px 6px; }

.tn-ic { width: 19px; height: 19px; flex: none; color: var(--accent); transition: color .15s; }
.tn-tab:hover .tn-ic { color: var(--fg); }
.tn-tab.on .tn-ic { color: #fff; }

/* Weather — compact */
.wx-now { gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.wx-now-icon { font-size: 2rem; }
.wx-now-temp { font-size: 1.9rem; }
.wx-now-cond { font-size: 13px; }
.wx-now-hl { font-size: 13px; }
.wx-days { grid-auto-columns: minmax(58px, 1fr); gap: 6px; }
.wx-day { padding: 5px 4px; gap: 1px; border-radius: 8px; }
.wx-day .d { font-size: 11px; }
.wx-day .hi { font-size: 14px; }
.wx-day .lo, .wx-day .pp { font-size: 11.5px; }
.wx-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wx-link { font-size: 12.5px; color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.wx-link:hover { text-decoration: underline; }
.wx-link[hidden] { display: none; }

@media (max-width: 700px) {
  .top-row .kpis { grid-template-columns: 1fr 1fr; }
  .top-row .kpis > :last-child { grid-column: 1 / -1; }
}
.kpi-spent { border-left: 4px solid var(--accent); }

/* Machinery */
#tl-mach { margin-bottom: 18px; }
.mc-card { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.mc-card.down { border-left-color: var(--bad); }
.mc-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mc-top { display: flex; align-items: center; gap: 10px; }
.mc-top .tl-thumb { width: 44px; height: 44px; }
.mc-name { font-weight: 600; flex: 1; min-width: 0; }
.mc-name small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.mc-st { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; white-space: nowrap; color: #2F6B3A; background: color-mix(in srgb, #2F6B3A 12%, var(--panel)); }
.mc-st.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--panel)); }
.mc-line { font-size: 13px; color: var(--muted); }
.mc-line b { color: var(--fg); font-weight: 600; }
.ml-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.ml-sum div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px; text-align: center; }
.ml-sum b { display: block; font-family: Fraunces, Georgia, serif; font-size: 1.1rem; }
.ml-sum span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.ml-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ml-list { list-style: none; margin: 0; padding: 0; }
.ml-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.ml-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 15px; background: var(--bg); border: 1px solid var(--line); }
.ml-ic.proj { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.ml-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ml-body .w { font-weight: 600; }
.ml-body .m { font-size: 12px; color: var(--muted); }
.ml-body .n { font-size: 13px; white-space: pre-wrap; }
.ml-body .lnk { all: unset; cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; }
.ml-amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.ml-ed { display: flex; gap: 2px; }
.pm-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; }

/* Branding / settings */
.hero-top { gap: 8px; }
.gear { margin-right: auto; }
.gear svg { width: 20px; height: 20px; }
body.readonly .gear { display: none; }
.setup-card { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; margin: 12px 0; border-left: 4px solid var(--accent); }
.setup-card[hidden] { display: none; }
.bs-imgs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
@media (max-width: 700px) { .bs-imgs { grid-template-columns: 1fr 1fr; } }
.bs-img { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.bs-img .pv { aspect-ratio: 16 / 9; border-radius: 8px; background: var(--deep) center / cover no-repeat; display: grid; place-items: center; color: rgba(255,255,255,.8); font-size: 12px; }
.bs-img.logo .pv { aspect-ratio: 360 / 257; background-size: contain; background-color: color-mix(in srgb, var(--accent) 12%, var(--panel)); color: var(--muted); }
.bs-img b { font-size: 13px; }
.bs-img .row { display: flex; gap: 6px; flex-wrap: wrap; }
.bs-sec { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 6px; grid-column: 1 / -1; }

/* Contacts */
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.ct-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-left: 4px solid var(--accent); }
.ct-top { display: flex; align-items: flex-start; gap: 8px; }
.ct-name { font-weight: 600; font-size: 15px; flex: 1; min-width: 0; }
.ct-name small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.ct-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.ct-fav { all: unset; cursor: pointer; font-size: 18px; line-height: 1; color: #C9A227; padding: 0 2px; }
.ct-fav.off { color: var(--line); }
.ct-fav:disabled { cursor: default; }
.ct-line { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
.ct-line .ic { width: 18px; text-align: center; flex: none; }
.ct-line a { color: var(--accent); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-line span.v { overflow: hidden; text-overflow: ellipsis; }
.ct-copy { all: unset; cursor: pointer; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-left: auto; flex: none; }
.ct-notes { font-size: 13px; color: var(--muted); white-space: pre-wrap; }
.ct-used { font-size: 12px; color: var(--muted); }
.ct-acts { display: flex; gap: 6px; margin-top: 2px; }

/* The Coffee Pot */
.cp-card { background: linear-gradient(150deg, #3B2414, #6B3A1C 65%, #8A4B23); color: #FFF7EC; border-radius: 16px; padding: 16px; margin: 14px 0 18px; box-shadow: var(--shadow); }
.cp-head { display: flex; gap: 12px; align-items: center; }
.cp-head svg { width: 46px; height: 46px; flex: none; }
.cp-head h2 { margin: 0; font: 700 21px/1.1 Fraunces, Georgia, serif; color: #FFF7EC; }
.cp-head p { margin: 3px 0 0; font-size: 13.5px; color: #F3DCC2; }
.cp-go { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.cp-go a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 74px; border-radius: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #FFF7EC; text-decoration: none; font-weight: 600; font-size: 13px; text-align: center; -webkit-tap-highlight-color: transparent; }
.cp-go a span { font-size: 22px; line-height: 1; }
.cp-go a:active { transform: scale(.97); }
.cp-go a:focus-visible, .cp-btns .btn:focus-visible { outline: 3px solid #F6D7B0; outline-offset: 2px; }
.cp-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.cp-btns .btn { min-height: 46px; }
.cp-btns .btn.cp-yes { background: #F6E3CC; color: #3B2414; border-color: #F6E3CC; }
.cp-btns .btn.cp-no { background: transparent; color: #FFF7EC; border-color: rgba(255,255,255,.35); }
.cp-open { color: #F6E3CC; font-size: 13.5px; font-weight: 600; }
.cp-note { font-size: 12.5px; color: #E8CBA9; margin: 10px 0 0; }
@media (max-width: 380px) { .cp-go a { font-size: 12px; min-height: 66px; } }
.cp-card.cp-slim { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 10px 0 14px; border-radius: 14px; flex-wrap: wrap; }
.cp-slim .cp-name { display: flex; align-items: center; gap: 8px; color: #FFF7EC; text-decoration: none; font: 700 16px/1.15 Fraunces, Georgia, serif; flex: 1 1 auto; min-width: 0; }
.cp-slim .cp-name svg { width: 30px; height: 30px; flex: none; }
.cp-slim .cp-name small { display: block; font: 500 12px/1.3 Inter, system-ui, sans-serif; color: #F3DCC2; }
.cp-slim .cp-chips { display: flex; gap: 6px; }
.cp-slim .cp-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 48px; border-radius: 10px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: #FFF7EC; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.cp-slim .cp-chip span { font-size: 18px; line-height: 1; }
.cp-slim .cp-chip small { font-size: 9.5px; font-weight: 600; margin-top: 2px; }
.cp-slim .cp-chip:active { transform: scale(.96); }
.cp-slim .cp-btns { margin: 0; gap: 6px; }
.cp-slim .cp-btns .btn { min-height: 40px; }
@media (max-width: 560px) { .cp-card.cp-slim.cp-ask { flex-wrap: wrap; padding: 10px 12px; } .cp-slim.cp-ask .cp-name { flex: 1 1 100%; } .cp-card.cp-slim:not(.cp-ask) { flex-wrap: nowrap; gap: 6px; padding: 6px 8px; } .cp-slim .cp-name { flex: none; } .cp-slim a.cp-name > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .cp-slim .cp-chips { flex: 1; justify-content: space-between; min-width: 0; gap: 4px; } .cp-slim .cp-chip { flex: 1; width: auto; min-width: 0; } .cp-slim .cp-chip small { font-size: 9px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; } }
/* Pantry */
.pan-count { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.pan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pan-cat-h { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 8px 2px 0; }
.pan-row { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 12px; min-height: 60px; }
.pan-row.low { border-left: 4px solid var(--warn); }
.pan-main { all: unset; cursor: pointer; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 4px 0; }
.pan-main:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.pan-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.pan-name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.pan-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.pan-qty { display: flex; align-items: center; gap: 2px; flex: none; }
.pan-qty button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 20px; color: var(--text); cursor: pointer; touch-action: manipulation; }
.pan-qty button:disabled { opacity: .4; cursor: default; }
.pan-qty .n { min-width: 40px; text-align: center; font-weight: 700; font-size: 16px; display: flex; flex-direction: column; line-height: 1.1; }
.pan-qty .n small { font-size: 10.5px; font-weight: 500; color: var(--muted); }
.pan-cart { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 18px; cursor: pointer; flex: none; touch-action: manipulation; }
.pan-cart.hot { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--panel)); }
.pan-cart.on { color: var(--ok); font-weight: 700; cursor: default; }
.shop-pan-chk { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); cursor: pointer; min-height: 36px; }
.shop-pan-chk input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.shop-pantag { color: var(--accent); font-weight: 600; }
@media (max-width: 700px) { .pan-qty button, .pan-cart { width: 48px; height: 48px; } }
/* phones: the count and cart drop below the name rather than squeezing it */
@media (max-width: 480px) { .pan-row { flex-wrap: wrap; } .pan-main { flex: 1 1 200px; } .pan-qty { margin-left: auto; } }
/* Project full page */
.proj-link { color: inherit; text-decoration: none; }
.proj-link:hover { color: var(--accent); text-decoration: underline; }
.pv-back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; color: var(--accent); margin: 6px 0 4px; }
.pv-head { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.pv-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.pv-title h1 { margin: 0; font: 700 28px/1.15 Fraunces, Georgia, serif; overflow-wrap: anywhere; }
.pv-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.pv-fact { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.pv-fact span { font-size: 12px; color: var(--muted); }
.pv-fact b { font-size: 15px; }
.pv-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pv-acts .btn { min-height: 46px; }
.pv-detail { padding: 18px; margin-top: 14px; }
.pv-detail .detail { border-top: 0; margin-top: 0; padding-top: 0; }
@media (max-width: 640px) { .pv-bars { grid-template-columns: 1fr; } .pv-title h1 { font-size: 24px; } .pv-facts { grid-template-columns: 1fr 1fr; } }
/* AI list reading */
.shop-photo-list { white-space: nowrap; }
.ai-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow: auto; }
.ai-row { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--panel); }
.ai-row.unsure { border-color: var(--warn); }
.ai-row > input[type=checkbox] { width: 22px; height: 22px; margin-top: 12px; flex: none; }
.ai-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ai-mid .shop-in { width: 100%; min-height: 44px; font-size: 16px; }
.ai-sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-sub .shop-qty { width: 90px; min-height: 40px; }
.ai-pan { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.ai-pan input { width: 18px; height: 18px; }
/* Calendar copy */
.cal-opts { display: flex; flex-direction: column; gap: 8px; }
.cal-opt { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.cal-opt:hover { border-color: var(--accent); }
.cal-opt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cal-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); font-weight: 700; color: var(--accent); flex: none; font-size: 17px; }
.cal-tx { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cal-tx small { color: var(--muted); font-size: 12.5px; }
.cal-go { color: var(--muted); font-size: 22px; }
/* Apiary */
.jump-grid.jump-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 4px 0 0; }
.ap-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 700px) { .ap-kpis { grid-template-columns: 1fr 1fr; } .jump-grid.jump-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hv-st { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 7px; border: 1px solid var(--line); white-space: nowrap; }
.hv-st.good { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.hv-st.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--panel)); }
.hv-st.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 8%, var(--panel)); }
.hv-st.gone { color: var(--muted); }
.hv-card.due { border-left: 4px solid var(--warn); }
.hv-card.bad { border-left: 4px solid var(--bad); }
.hv-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12.5px; color: var(--muted); }
.hv-facts b { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; }
.ap-h3 { font-size: 15px; margin: 18px 0 8px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ap-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ap-log li { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.ap-log li .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; min-width: 74px; }
.ap-log li .what { flex: 1; min-width: 0; }
.ap-log li .amt { font-weight: 700; white-space: nowrap; }
.ap-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-checks label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-size: 14px; cursor: pointer; background: var(--bg); min-height: 40px; }
.ap-checks input { width: 18px; height: 18px; }
/* Emergency supplies */
#em-sec { margin-bottom: 18px; }
.em-card.overdue { border-left: 4px solid var(--bad); }
.em-card.soon { border-left: 4px solid var(--warn); }
.pt-tag.overdue { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 8%, var(--panel)); }
.pt-tag.soon { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 10%, var(--panel)); }
.pt-tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.em-alert[hidden] { display: none !important; }
.em-alert { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 7%, var(--panel)); font-size: 14px; }
.em-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12.5px; color: var(--muted); }
.em-dates b { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; }
.em-hist { font-size: 12.5px; color: var(--muted); margin: 0; padding-left: 18px; }
/* Jump tiles & field-friendly controls */
.jump-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.jump-grid.jump-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.jt { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 78px; padding: 10px 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-align: center; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: border-color .15s, background .15s, transform .08s; }
@media (hover: hover) { .jt:hover { border-color: var(--accent); } }
.jt:active { transform: scale(.97); }
.jt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.jt[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.jt-ic { width: 26px; height: 26px; color: var(--accent); }
.jt[aria-current="true"] .jt-ic { color: #fff; }
.jt-l { font-weight: 600; font-size: 13.5px; line-height: 1.15; }
.jt-b:empty { display: none; }
.jt[hidden] { display: none; }
.home-kpis { margin-bottom: 14px; }
#main-jump { margin-bottom: 18px; }
.jt-b { font-size: 11.5px; font-weight: 700; line-height: 1; padding: 3px 7px; border-radius: 999px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.jt-b.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.jt-b.warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.jt[aria-current="true"] .jt-b:not(.bad):not(.warn) { background: rgba(255,255,255,.2); border-color: transparent; color: #fff; }
[data-pane][hidden] { display: none !important; }
.mb-set { display: contents; }
.mb-set[hidden] { display: none; }
section[data-fold] > .sec-head .sec-title { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; user-select: none; }
.fold-chev { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); font-size: 13px; color: var(--muted); transition: transform .15s; }
section.folded .fold-chev { transform: rotate(-90deg); }
section.folded > :not(.sec-head) { display: none !important; }
section.folded > .sec-head { margin-bottom: 0; }
section.folded > .sec-head > :not(.sec-title) { display: none; }
@media (max-width: 860px) { .jump-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .jump-grid.jump-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .jump-5 .jt { min-height: 72px; padding: 8px 2px; }
  .jump-5 .jt-l { font-size: 12px; }
  .jt { min-height: 80px; }
  .pt-qty button { width: 52px; height: 52px; font-size: 24px; }
  .pt-qty .n { min-width: 64px; font-size: 18px; }
  .pt-acts { flex: 1 1 170px; display: flex; gap: 8px; flex-wrap: wrap; }
  .pt-acts .btn { flex: 1 1 auto; justify-content: center; min-height: 52px; white-space: nowrap; }
  .pt-card, .tl-card { padding: 14px; }
  .filter-bar .search { flex: 1 1 100%; min-height: 48px; font-size: 16px; }
  .filter-bar .sort-sel { flex: 1 1 calc(50% - 8px); min-width: 0; width: calc(50% - 4px); min-height: 48px; text-overflow: ellipsis; }
  .mobile-bar .btn { min-height: 52px; font-size: 15px; font-weight: 600; }
  .sec-head .btn.small { min-height: 44px; }
}
@media (max-width: 380px) { .jump-5 .jt-l { font-size: 11px; } .jump-5 .jt-ic { width: 22px; height: 22px; } }
@media (pointer: coarse) { .btn.small { min-height: 44px; } .icon-btn { min-width: 44px; min-height: 44px; } }
/* Parts & supplies */
#pt-sec { margin-bottom: 18px; }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 8px; }
.pt-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.pt-card.low { border-left: 4px solid var(--bad); }
.pt-top { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 12px; align-items: center; min-width: 0; }
.pt-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
div.pt-top { cursor: default; }
.hv-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12.5px; color: var(--muted); }
.hv-facts b { display: block; color: var(--fg); font-size: 13.5px; font-weight: 600; }
.pt-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.pt-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.pt-tag { font-size: 11px; font-weight: 600; border-radius: 6px; padding: 1px 7px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pt-tag.low { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 8%, var(--panel)); }
.pt-tag.proj { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.pt-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pt-qty button { all: unset; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; font-weight: 600; color: var(--accent); }
.pt-qty button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pt-qty button:disabled { color: var(--line); cursor: default; }
.pt-qty .n { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; line-height: 1.1; }
.pt-qty .n small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.pt-acts { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
a.btn.pt-reorder { text-decoration: none; }
.pt-low { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 8%, var(--panel)); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); font-size: 14px; }
.pt-low[hidden] { display: none; }
.pt-loc-row { display: flex; gap: 6px; }
.pt-loc-row > * { min-width: 0; }
.pt-loc-row[hidden], .tl-down-kpi[hidden], .jump-grid[hidden] { display: none; }
.pt-loc-row input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--bg); color: inherit; font: inherit; }
.pt-locs { display: flex; flex-direction: column; gap: 6px; }
.pt-locs .row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pt-locs .row span { flex: 1; }
.pt-cost-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.pt-cost-box .check-row { grid-column: 1 / -1; }
.pt-photo-full { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: var(--bg); }

/* Recurring */
.rec-list { display: flex; flex-direction: column; }
.rec-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.rec-item:last-child { border-bottom: 0; }
.rec-item .r-title { font-weight: 600; }
.rec-item .r-meta { font-size: 13px; color: var(--muted); }
.rec-item .r-amt { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.rec-item .r-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.rec-item.paused { opacity: .6; }
.est-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--warn) 18%, var(--panel)); color: var(--warn); margin-left: 6px; white-space: nowrap; }
.rec-tag { font-size: 11px; color: var(--muted); margin-left: 6px; white-space: nowrap; }

/* Future */
.future-card { border-left: 4px dashed var(--accent-2); }
.pill.pt { font-weight: 600; background: var(--bg); }
.pill.pt-repair { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.pill.pt-new { color: #2F6B3A; border-color: color-mix(in srgb, #2F6B3A 40%, transparent); }
.pill.pt-addition { color: #2F6FA8; border-color: color-mix(in srgb, #2F6FA8 40%, transparent); }
.pill.pt-modification { color: #8A5A00; border-color: color-mix(in srgb, #B8860B 45%, transparent); }
.pill.pt-other { color: var(--muted); }
.pill.planned { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* Completed */
.done-card { border-left: 4px solid var(--line); }
.done-card .proj-head { align-items: baseline; }
.closeout { font-size: 14px; white-space: pre-wrap; margin: 0; }
.year-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 13px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.year-summary { color: var(--muted); font-size: 13px; margin: 8px 0 12px; }

/* Dates */
.dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.date-item { display: flex; gap: 12px; align-items: flex-start; }
.date-badge { flex: none; width: 56px; border-radius: 10px; overflow: hidden; text-align: center; border: 1px solid var(--line); background: var(--panel); }
.date-badge .m { background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 2px 0; }
.date-badge .d { font-family: Fraunces, Georgia, serif; font-size: 1.5rem; line-height: 1.4; }
.date-body { flex: 1; min-width: 0; }
.date-title { font-weight: 600; }
.date-when { font-size: 13px; color: var(--muted); }
.date-when .soon { color: var(--accent); font-weight: 600; }
.date-cat { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); margin-top: 4px; }
.date-notes { font-size: 13px; color: var(--muted); margin: 4px 0 0; white-space: pre-wrap; }
.date-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.date-body { min-width: 0; }
.date-actions .btn { white-space: nowrap; }
.date-item.today { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.date-badge.range { width: 64px; }
.date-badge.range .d { font-size: 1.05rem; line-height: 2.1; white-space: nowrap; letter-spacing: -.02em; }
.date-badge.range .m { font-size: 10px; letter-spacing: .04em; white-space: nowrap; }
.date-prog { height: 5px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 6px; max-width: 220px; }
.date-prog > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* Equipment */
.eq-table td:first-child { font-weight: 600; }
.down-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-right: 6px; vertical-align: middle; }
details.history { margin-top: 12px; }
details.history summary { cursor: pointer; color: var(--muted); font-size: 14px; }

/* Footer */
.app-foot { max-width: 1180px; margin: 0 auto; padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 6px; }
#foot-signout, #legal-signout { font-weight: 600; }
.footer { position: relative; overflow: hidden; border-radius: var(--radius); height: 180px; background-color: var(--deep); background-image: var(--img-sunset, none); background-position: center 62%; background-size: cover; background-repeat: no-repeat; }
.season-summer .footer { background-image: var(--img-aerial, none); background-position: center 55%; }
.footer::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--deep) 60%, transparent)); }
.footer-text { position: absolute; left: 22px; bottom: 16px; z-index: 1; color: rgba(255,255,255,.92); font-family: Fraunces, Georgia, serif; font-size: 1.2rem; }

/* Notices */
.notice { padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); font-size: 14px; }
.notice[hidden] { display: none; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-size: 14px; z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.show { opacity: 1; }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(10,14,11,.5); display: none; align-items: flex-start; justify-content: center; padding: 6vh 12px; z-index: 40; overflow-y: auto; }
.overlay.open { display: flex; }
.modal { background: var(--panel); border-radius: var(--radius); width: 100%; max-width: 520px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); border-top: 4px solid var(--accent); }
.modal h3 { font-family: Fraunces, Georgia, serif; font-size: 1.35rem; margin-bottom: 4px; }
.modal .sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field[hidden], .fields[hidden], .sort-sel[hidden] { display: none !important; }
.field.full { grid-column: 1 / -1; }
.field label, .field .lbl { font-size: 12px; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea, .inline-add input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--bg); }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .inline-add input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); border-color: var(--accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.err { color: var(--bad); font-size: 13px; min-height: 1em; margin-top: 8px; }
@media (max-width: 520px) { .fields { grid-template-columns: 1fr; } }
.readonly .needs-write { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
button, .chip, .btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.mobile-bar { display: none; }
@media (max-width: 700px) {
  body { font-size: 16px; }
  .wrap { padding: 10px 10px 10px; gap: 22px; }
  .app-foot { padding: 8px 10px calc(96px + env(safe-area-inset-bottom)); }
  .hero { min-height: 320px; }
  .hero-text { padding: 96px 16px 16px; }
  .hero-actions { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .val { font-size: 1.7rem; }
  .btn { min-height: 44px; padding: 10px 16px; font-size: 15px; }
  .btn.small { min-height: 40px; padding: 8px 14px; font-size: 14px; }
  .chip { min-height: 40px; padding: 8px 16px; font-size: 15px; }
  .icon-btn { min-width: 40px; min-height: 40px; font-size: 16px; }
  .actions { gap: 8px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
  .tasklist li { min-height: 44px; }
  .tasklist input[type=checkbox] { width: 22px; height: 22px; }
  .field input, .field select, .field textarea, .inline-add input { font-size: 16px; padding: 11px 12px; min-height: 44px; }
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 8px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--panel) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .mobile-bar { gap: 6px; }
  .mobile-bar .btn { flex: 1; justify-content: center; padding: 10px 4px; font-size: 14px; white-space: nowrap; }
  /* four or more quick-add buttons: let labels wrap instead of running off the screen */
  .mobile-bar:has(> .btn:nth-child(4)) .btn { flex: 1 1 auto; min-width: 0; white-space: normal; line-height: 1.15; font-size: 13px; text-align: center; padding: 8px 6px; }
  .overlay { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .modal-actions { position: sticky; bottom: 0; background: var(--panel); padding: 12px 0 4px; margin-top: 12px; }
  .modal-actions .btn { flex: 1; justify-content: center; }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
  /* Equipment table becomes stacked cards */
  .eq-table thead { display: none; }
  .eq-table, .eq-table tbody, .eq-table tr, .eq-table td { display: block; width: 100%; }
  .eq-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .eq-table td { border: 0; padding: 3px 0; }
  .eq-table td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13px; }
  .eq-table td:first-child { font-size: 17px; padding-bottom: 6px; }
  .eq-table td.eq-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; white-space: normal !important; }
  .eq-table td.eq-actions .btn { flex: 1 1 auto; justify-content: center; white-space: nowrap; }
  /* Cost log: keep it to date, item, amount */
  .cost-tbl .hide-sm { display: none; }
  .footer { height: 140px; }
}
@media (max-width: 440px) { .tn-brand { display: none; } .topnav-in { padding: 6px 4px; } }
.tn-words { display: flex; flex-direction: column; line-height: 1.15; }
.tn-pow, .tn-pow-strip { display: inline-flex; align-items: center; gap: 3px; font-family: Inter, system-ui, sans-serif; font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: .01em; white-space: nowrap; }
.tn-pow b, .tn-pow-strip b { font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 11.5px; color: var(--fg); }
.fp-mini { width: 12px; height: 12px; color: #3F2614; flex: none; margin-left: 1px; }
@media (prefers-color-scheme: dark) { .fp-mini { color: #F6F1E7; } }
.tn-pow-strip { display: none; }
/* Self-fitting top nav: never scrolls sideways. fitNav() adds c1 → c2 → c3 only as needed. */
.topnav-in, .tn-tabs { min-width: 0; }
.topnav.c1 .tn-long { display: none; }
.topnav.c1 .tn-tab { flex-direction: column; justify-content: center; gap: 1px; padding: 4px 10px; font-size: 11.5px; min-height: 46px; border-radius: 12px; line-height: 1.2; }
.topnav.c1 .tn-ic { width: 20px; height: 20px; }
.topnav.c2 .tn-pow { display: none; }
.topnav.c2 .tn-name { display: none; }
.topnav.c2 .tn-pow-strip { display: flex; justify-content: center; margin: 0; padding: 0 0 3px; font-size: 10px; }
.topnav.c2 .tn-tabs { flex: 1; justify-content: space-between; margin-left: 0; }
.topnav.c2 .tn-tab { flex: 1; padding: 4px 2px; }
.topnav.c3 .tn-tabs { flex-wrap: wrap; row-gap: 2px; justify-content: flex-start; }
.topnav.c3 .tn-tab { flex: 1 0 18%; font-size: 10.5px; }
@media (max-width: 700px) {
  .tn-pow { display: none; }
  .tn-pow-strip { display: flex; justify-content: center; margin: 0; padding: 0 0 3px; font-size: 10px; }
}
.hs-link { text-align: center; margin: -8px 0 18px; }
.hs-link .linkbtn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; }
.hs-top { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.hs-icon { width: 96px; height: 96px; border-radius: 22px; flex: none; box-shadow: 0 2px 8px rgba(63,38,20,.25); -webkit-touch-callout: default; }
.hs-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 8px; }
.hs-tabs .btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.hs-steps { margin: 0; padding-left: 20px; line-height: 1.5; }
.hs-steps li { margin-bottom: 7px; }
.hs-url { display: flex; gap: 6px; margin-top: 6px; }
.hs-url input { flex: 1; font-size: 13px; }
.real-list { display: flex; flex-direction: column; }
.real-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.real-row:last-child { border-bottom: 0; }
.real-desc { font-weight: 600; font-size: 14px; }
.real-meta { font-size: 12px; color: var(--muted); font-style: italic; }
.real-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--good, #2f7d3a); }
.real-fine { text-align: center; font-size: 11px; color: var(--muted); margin: 18px 0 4px; }
.tn-tab[hidden] { display: none !important; }
.hero { background-position: 68% 86%; }
@media (max-width: 700px) { .season-fall .hero { background-size: 185% auto; background-position: 74% 96%; } }

/* The Coffee Pot board (#coffee) */
.cp-board-head { margin: 4px 0 12px; }
.cp-cup svg { width: 46px; height: 46px; display: block; }
.cp-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 0 10px; }
.cp-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; min-height: 66px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); text-align: center; text-decoration: none; color: var(--fg); }
.cp-tab .ic { font-size: 21px; line-height: 1; }
.cp-tab .l { font-weight: 600; font-size: 12.5px; }
.cp-tab .n { font-size: 11px; color: var(--muted); min-height: 1em; }
.cp-tab[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.cp-tab[aria-current] .n { color: rgba(255,255,255,.85); }
@media (max-width: 640px) {
  .cp-tabs { display: flex; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .cp-tabs::-webkit-scrollbar { display: none; }
  .cp-tab { flex: 0 0 76px; scroll-snap-align: start; }
}
.cp-sec-head { align-items: flex-start; gap: 10px; }
.cp-sec-head .sec-note { margin: 0; flex: 1; }
.cp-sec-head .btn { flex: none; }
.cp-list { display: flex; flex-direction: column; gap: 10px; }
.cp-post { padding: 14px 16px; }
.cp-post.pinned { border-left: 4px solid var(--accent-2); }
.cp-post.resolved { opacity: .82; }
.cp-post.hidden-post { border-style: dashed; opacity: .75; }
.cp-post h3 { margin: 0 0 4px; font: 600 18px/1.25 Fraunces, Georgia, serif; overflow-wrap: anywhere; }
.cp-meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-bottom: 6px; }
.cp-farm { font-weight: 600; color: var(--accent); }
.tag { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 1px 7px; border: 1px solid var(--line); white-space: nowrap; color: var(--muted); }
.tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.tag.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.tag.pin { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tag.sold { background: #8E2B1C; color: #fff; border-color: #8E2B1C; }
.cp-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 0; font-size: 15px; }
.cp-link { margin-top: 8px; }
.cp-ct { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; font-size: 15px; }
.cp-ct a { overflow-wrap: anywhere; }
.cp-ct .ln { display: flex; gap: 8px; align-items: baseline; }
.cp-ct .ln > span:first-child { width: 20px; flex: none; text-align: center; }
.cp-price { font: 600 22px/1.2 Fraunces, Georgia, serif; color: var(--accent); margin: 2px 0 2px; }
.cp-post.resolved .cp-price { text-decoration: line-through; color: var(--muted); }
.cp-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.cp-acts .btn { min-height: 38px; }
.cp-vote.on { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); border-color: var(--accent); color: var(--accent); }
.cp-status { min-height: 38px; }
.cp-replies-list { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.cp-reply { font-size: 14px; background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.cp-reply .cp-meta { margin: 0 0 2px; }
.cp-reply .cp-body { margin: 0; font-size: 14px; }
.cp-del-reply { margin-left: auto; }
.cp-reply-form { display: flex; gap: 8px; align-items: flex-end; }
.cp-reply-form textarea { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--panel); color: var(--fg); font: inherit; font-size: 16px; resize: vertical; }
.cp-reports { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--muted); }
#coffee-card[hidden] { display: none; }
.cp-slim small#cp-home-sub { white-space: nowrap; }
/* sharing controls on farm items */
.share-tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); white-space: nowrap; }
.share-box .check-row { align-items: flex-start; }
.share-box .fields { margin-top: 6px !important; }
.bulk-share { display: flex; flex-direction: column; gap: 12px; }
.bulk-kind { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 0; min-width: 0; }
.bulk-kind legend { font-weight: 700; padding: 0 4px; }
.bulk-kind .gl-list { margin: 4px 0 6px; }
.bulk-kind .sec-note { margin: 4px 0 0; }
.gl-row[hidden], .gl-list[hidden] { display: none; }
@media (max-width: 700px) { .cp-sec-head #cp-new { display: none; } }

/* Home "More…" sheet */
.more-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.more-sheet .btn { justify-content: flex-start; min-height: 48px; text-align: left; white-space: normal; }

/* Tap targets of at least 32px for small icon buttons (M7 acceptance) */
.rcpt-btn { min-width: 32px; min-height: 32px; }
.ct-fav { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; }
.ct-copy { display: inline-flex; align-items: center; min-height: 32px; box-sizing: border-box; padding: 0 10px; }
@media (max-width: 560px) { .cp-slim .cp-name svg { width: 34px; height: 34px; } }

/* Small accent-colored text needs 4.5:1 (M7 acceptance): a deeper ink, lighter in dark mode */
:root { --accent-ink: color-mix(in srgb, var(--accent) 78%, #000); }
@media (prefers-color-scheme: dark) { :root { --accent-ink: color-mix(in srgb, var(--accent) 55%, #fff); } }
.link-btn, .tl-kind, .ct-tag, .legal-links a, .ob-terms a, .terms-note a, .acct-legal a { color: var(--accent-ink); }
.jt[aria-current="true"] .jt-b:not(.bad):not(.warn) { background: rgba(0,0,0,.28); }

/* Coffee Pot: for-sale photos and town */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cp-photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.cp-ph { position: relative; width: 72px; height: 72px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cp-ph img { width: 100%; height: 100%; object-fit: cover; }
.cp-ph-x { position: absolute; top: 2px; right: 2px; width: 32px; height: 32px; border-radius: 999px; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; cursor: pointer; }
.cp-ph-view { display: grid; gap: 10px; }
.cp-full { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; background: var(--bg); }
.cp-ph-nav { display: flex; justify-content: space-between; gap: 8px; }
.cp-place { color: var(--muted); }
