:root {
  --paper: #F4F0E8;
  --raised: #FFFDF9;
  --line: #D6D3CB;
  --ink: #101820;
  --muted: #47525B;
  --faint: #5D6871;
  --harbor: #006778;
  --on-harbor: #FFFFFF;
  --harbor-soft: #D6EBEE;
  --brass: #7D5F17;
  --brass-soft: #F6EACB;
  --gold: #D7A22A;
  --black: #101820;
  --alert: #A1281E;
  --alert-soft: #F6E0DB;
  --caution: #7A5200;
  --caution-soft: #F5E9CF;
  --good: #2E6A3E;
  --serif: "Iowan Old Style", "Charter", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-sm: 4px;
  --r-md: 8px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0B1117; --raised: #101820; --line: #26313B;
    --ink: #EEF1F2; --muted: #B4BCC2; --faint: #949EA6;
    --harbor: #3FB6C8; --on-harbor: #06191C; --harbor-soft: #0E2A30;
    --brass: #D7A22A; --brass-soft: #2E2512; --gold: #D7A22A; --black: #05090D;
    --alert: #F0897D; --alert-soft: #3A1F1C;
    --caution: #E8C374; --caution-soft: #33291A;
    --good: #8BCB97;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { font: 16px/1.5 var(--sans); }
main { max-width: 640px; margin: 0 auto; padding: 0 20px 112px; }

.masthead { display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 0 12px; background: var(--black); box-shadow: 0 0 0 100vmax var(--black); clip-path: inset(0 -100vmax); border-bottom: 3px solid var(--gold); }
.masthead .brand { display: flex; align-items: center; gap: 10px; color: #FFFFFF; font: 600 19px/1 var(--serif); letter-spacing: -.01em; }
.masthead .mark { width: 30px; height: 19px; color: #3FB6C8; }
.masthead .mark .bar { stroke: var(--gold); }
.masthead .by { font-size: 12px; color: var(--gold); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }

h1 { font: 600 34px/1.1 var(--serif); letter-spacing: -.015em; margin: 24px 0 6px; }
h2 { font: 600 22px/1.2 var(--serif); margin: 0 0 10px; letter-spacing: -.01em; }
h3 { font: 600 16px/1.3 var(--sans); margin: 18px 0 6px; }
p { margin: 8px 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--harbor); margin: 0 0 6px; }
.lede { font-size: 17px; color: var(--muted); margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.fine { font-size: 13px; color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }

.block { border-top: 1px solid var(--line); padding: 22px 0 18px; }
.block:first-of-type { border-top: 0; }
.block.tight { padding-top: 16px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.head h2 { margin-bottom: 8px; }
.panel { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; margin: 12px 0; }

.figure { font: 600 44px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.02em; }
.figure small { font: 400 15px/1.3 var(--sans); color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
.figures .figure { font-size: 30px; }
.figures .fine { margin-top: 4px; }

button { font: inherit; font-size: 15px; font-weight: 600; min-height: 44px; padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
button.primary { background: var(--harbor); border-color: var(--harbor); color: var(--on-harbor); }
button.quiet { border-color: var(--line); font-weight: 500; }
button.text { border: 0; padding: 4px 0; min-height: 0; color: var(--harbor); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
button.sm { min-height: 34px; padding: 6px 12px; font-size: 14px; }
button.full { width: 100%; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--harbor); outline-offset: 2px; }
.actions { display: flex; gap: 10px; margin-top: 14px; }
.actions > * { flex: 1; }

label { display: block; margin: 12px 0 0; font-size: 14px; font-weight: 600; }
label .hint { display: block; font-weight: 400; color: var(--faint); font-size: 13px; margin-top: 4px; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; font-size: 16px; color: var(--ink); background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-sm); }
textarea { min-height: 72px; resize: vertical; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.check { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; font-weight: 400; font-size: 16px; cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check input { width: 20px; height: 20px; flex: 0 0 20px; margin: 2px 0 0; accent-color: var(--harbor); }
.check .sub { display: block; font-size: 13px; color: var(--faint); margin-top: 2px; }
.check.done > span:first-of-type { color: var(--muted); }

.options { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.opt { position: relative; display: inline-flex; align-items: center; margin: 0; padding: 9px 13px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--raised); font-size: 15px; font-weight: 500; cursor: pointer; user-select: none; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt.on { border-color: var(--harbor); background: var(--harbor-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--harbor); }
.opt .eg { color: var(--faint); font-weight: 400; margin-left: 6px; font-size: 13px; }

.notice { border-radius: var(--r-sm); padding: 12px 14px; margin: 10px 0; background: var(--raised); border: 1px solid var(--line); }
.notice.caution { background: var(--caution-soft); border-color: transparent; }
.notice.caution strong { color: var(--caution); }
.notice.alert { background: var(--alert-soft); border-color: transparent; }
.notice.alert strong { color: var(--alert); }
.notice strong { display: block; font-size: 15px; margin-bottom: 2px; }
.notice .why { display: block; font-size: 13px; color: var(--faint); margin-top: 6px; }

.emergency { background: #A1281E; color: #fff; border-radius: var(--r-md); padding: 18px; margin: 18px 0 6px; }
.emergency h2 { color: #fff; margin: 0 0 6px; }
.emergency a { display: block; margin-top: 12px; padding: 14px; border-radius: var(--r-sm); background: #fff; color: #A1281E; text-align: center; font-weight: 700; font-size: 18px; text-decoration: none; }

.tag { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tag.good { color: var(--good); }
.tag.caution { color: var(--caution); }
.tag.alert { color: var(--alert); }

.meter { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 8px 0 4px; }
.meter > i { display: block; height: 100%; background: var(--harbor); }
.meter.over > i { background: var(--alert); }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 14px 0 6px; }
.phases div { border-top: 3px solid var(--line); padding-top: 6px; font-size: 12px; color: var(--faint); }
.phases div.past { border-color: var(--harbor); }
.phases div.now { border-color: var(--brass); color: var(--ink); font-weight: 600; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 12px 0; text-align: center; }
.week div { font-size: 12px; color: var(--faint); }
.week b { display: block; height: 34px; margin-bottom: 4px; border-radius: var(--r-sm); border: 1px solid var(--line); font: 600 13px/32px var(--sans); color: var(--ink); }
.week b.on { background: var(--harbor); border-color: var(--harbor); color: var(--on-harbor); }
.week b.today { border-color: var(--ink); }

.steps { list-style: none; padding: 0; margin: 8px 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 10px 0 10px 34px; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 10px; font: 600 20px/1 var(--serif); color: var(--brass); }

.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: var(--r-sm); margin: 16px 0 4px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; min-height: 40px; padding: 8px 4px; font-size: 14px; font-weight: 500; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--ink); color: var(--paper); font-weight: 600; }

.goal { padding: 14px 0; border-bottom: 1px solid var(--line); }
.goal:last-child { border-bottom: 0; }
.goal .top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.goal .name { font-weight: 600; }

.history { list-style: none; margin: 8px 0; padding: 0; }
.history li { position: relative; padding: 0 0 16px 22px; }
.history li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); }
.history li::after { content: ""; position: absolute; left: 7px; top: 18px; bottom: 2px; width: 1px; background: var(--line); }
.history li:last-child::after { display: none; }
.history .when { font-size: 13px; color: var(--faint); }

details { border-bottom: 1px solid var(--line); }
details:last-child { border-bottom: 0; }
summary { padding: 13px 0; cursor: pointer; font-weight: 600; list-style-position: inside; }
.meal { padding: 12px 0; border-bottom: 1px solid var(--line); }
.meal:last-child { border-bottom: 0; }
.meal .what { font: 500 18px/1.35 var(--serif); }
.flags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 14px 0 4px; }
.days button { min-height: 52px; padding: 6px 0; font-size: 12px; font-weight: 500; border-color: var(--line); line-height: 1.25; }
.days button b { display: block; font: 600 17px/1.1 var(--serif); }
.days button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.chart { display: block; width: 100%; height: auto; margin: 8px 0; }
.chart .grid { stroke: var(--line); }
.chart .axis { fill: var(--faint); font: 11px var(--sans); }
.chart .ref { stroke: var(--brass); stroke-dasharray: 4 4; }
.chart .reflabel { fill: var(--brass); font: 11px var(--sans); }
.chart .s1 { stroke: var(--harbor); fill: none; stroke-width: 2; }
.chart .s2 { stroke: var(--brass); fill: none; stroke-width: 2; }
.chart .d1 { fill: var(--harbor); stroke: var(--paper); stroke-width: 2; }
.chart .d2 { fill: var(--brass); stroke: var(--paper); stroke-width: 2; }
.chart .bar { fill: var(--harbor); }
.chart .val { fill: var(--ink); font: 600 11px var(--sans); }
.key { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.key i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; background: var(--black); border-top: 3px solid var(--harbor); padding: 6px 4px max(10px, env(safe-area-inset-bottom)); }
.nav button { flex: 1; max-width: 120px; border: 0; border-radius: 0; min-height: 52px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: #A9B4BC; background: transparent; border-top: 2px solid transparent; }
.nav button.on { color: var(--gold); font-weight: 700; border-top-color: var(--gold); }
.nav svg { width: 22px; height: 22px; }

.toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-sm); font-size: 15px; font-weight: 600; z-index: 20; }
.dots { display: flex; gap: 6px; margin: 18px 0 0; }
.dots i { flex: 1; height: 3px; background: var(--line); }
.dots i.on { background: var(--brass); }
.hidden { display: none !important; }
a { color: var(--harbor); text-underline-offset: 3px; }
.colophon { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }

@media print {
  :root { --paper: #fff; --raised: #fff; --ink: #000; --muted: #333; --faint: #555; --line: #bbb; }
  .nav, .no-print, .toast, .masthead .by { display: none !important; }
  main { padding-bottom: 0; }
}
.alt { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.booktag { margin-left: 8px; color: var(--brass); letter-spacing: .06em; }
.meal.sub { padding-left: 16px; }
ul.adj { margin: 2px 0 6px; padding-left: 18px; }
ul.adj li { margin: 3px 0; }
.art { margin: 16px 0 8px; padding: 10px 12px 8px; background: #F4F0E8; border: 1px solid var(--line); border-radius: var(--r-md); text-align: center; }
.art svg, .art img { display: block; width: 100%; height: auto; max-height: 210px; margin: 0 auto; object-fit: contain; border-radius: 6px; }
.art figcaption { margin-top: 4px; font-size: 14px; color: #47525B; }
.rec { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rec .t { display: block; }
.rec .sub { display: block; font-size: 13px; color: var(--faint); margin-top: 2px; }
.rec.done .t { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.rbtns { display: flex; gap: 6px; flex: 0 0 auto; }
.rbtn { min-height: 38px; padding: 6px 10px; font-size: 14px; font-weight: 600; border-color: var(--line); }
.rbtn.on { background: var(--harbor); border-color: var(--harbor); color: var(--on-harbor); }
.rbtn.off { background: var(--caution-soft); border-color: transparent; color: var(--caution); }
.reasons { padding: 4px 0 10px; border-bottom: 1px solid var(--line); }
.reasons .options { margin: 4px 0 0; }
.rate { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ft { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 10px 0 4px; }
.bars { display: grid; grid-template-columns: repeat(7, 18px); gap: 6px; font-size: 11px; color: var(--faint); text-align: center; }
.bars .col { display: flex; align-items: flex-end; height: 44px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 3px; }
.bars .col i { display: block; width: 100%; background: var(--harbor); }
.bars .today { color: var(--ink); font-weight: 700; }
.sched { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 8px 0 10px; text-align: center; }
.sched div { position: relative; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 0 5px; font-size: 11px; color: var(--faint); }
.sched b { display: block; font: 600 15px/1.2 var(--serif); color: var(--ink); }
.sched .gym { background: var(--harbor-soft); }
.sched .yoga { background: var(--brass-soft); }
.sched .today { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sched i { position: absolute; top: 3px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--harbor); }
.pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 6px 0 10px; }
.pick button { padding: 6px 0; font-size: 12px; min-height: 38px; }
.lift { padding: 12px 0; border-bottom: 1px solid var(--line); }
.lift .top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.liftrow { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
label.mini { margin: 0; font-size: 13px; font-weight: 600; }
label.mini input[type=number] { width: 110px; margin-top: 4px; padding: 8px 10px; }
.check.mini { border: 0; padding: 0; font-size: 14px; align-items: center; }
.linkish { display: block; border: 0; padding: 0; min-height: 0; background: none; text-align: left; color: var(--ink); font: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; cursor: pointer; }
.what.linkish { font: 500 18px/1.35 var(--serif); }
.rrow .linkish { padding: 4px 0; font-size: 16px; }
.intro { padding-top: 18px; }
.polaroid { width: 236px; margin: 12px auto 18px; padding: 12px 12px 10px; background: #FFFFFF; border: 1px solid #D9D2C5; transform: rotate(-2.5deg); }
.polaroid img { display: block; width: 210px; height: 210px; object-fit: cover; }
.polaroid figcaption { margin-top: 8px; text-align: center; font: italic 17px var(--serif); color: #101820; }
.verse .vline { margin: 4px 0 8px; font: italic 500 20px/1.4 var(--serif); color: var(--ink); }

/* Supplements */
details.supp { border-top: 1px solid var(--line); padding: 10px 0; }
details.supp > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; list-style: none; }
details.supp > summary::-webkit-details-marker { display: none; }
details.supp > summary::after { content: '+'; color: var(--muted); font-weight: 400; }
details.supp[open] > summary::after { content: '\2212'; }
details.supp p { margin: 8px 0 0; }
.booktag.warn { color: var(--caution, #8a5a00); border-color: currentColor; }
ul.cautions { margin: 8px 0 0; padding-left: 18px; font-size: .9rem; color: var(--ink); }
ul.cautions li { margin: 4px 0; }
.suppline { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.suppline select { width: 100%; }

/* Trackers and report */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin: 12px 0; }
.stats > div { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; background: var(--raised); }
.stats .fine { display: block; margin: 0; }
.stats strong { display: block; font-size: 1.45rem; line-height: 1.2; margin: 2px 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 10px 0; }
.tbl th, .tbl td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tbl th { font-weight: 600; color: var(--muted); font-size: .8rem; }
.tag.good { color: var(--good); }
.trio label { font-size: .85rem; }
@media print {
  .report .block { break-inside: auto; border: 0; padding: 6px 0; box-shadow: none; }
  .report h2 { break-after: avoid; }
  .report svg.chart, .report .key { break-inside: avoid; }
  .report .tbl { break-inside: auto; font-size: 10pt; }
  .report .tbl tr { break-inside: avoid; }
  .report h1 { font-size: 20pt; }
  .masthead { display: none !important; }
  details:not([open]) { display: none; }
}
a.btn { display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; min-height: 44px; padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid var(--ink); color: var(--ink); text-decoration: none; }
a.btn.primary { background: var(--harbor); border-color: var(--harbor); color: var(--on-harbor); }

/* Welcome-back sheet */
.away { position: fixed; inset: 0; background: rgba(21, 33, 44, .45); z-index: 30; display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.away .sheet { background: var(--paper); border-radius: 14px; padding: 18px 18px 10px; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.away .sheet h2 { margin: 2px 0 6px; }
.away .sheet ul { padding-left: 18px; margin: 8px 0; }
.away .art { margin-top: 0; }
@media (min-width: 600px) { .away { align-items: center; } }
@media print { .away { display: none !important; } }

.seg.five button { font-size: 12.5px; padding: 8px 2px; }

/* Star ratings */
.stars { display: flex; align-items: center; gap: 2px; margin: 8px 0 4px; flex-wrap: wrap; }
.stars .star { border: 0; background: none; min-height: 40px; min-width: 36px; padding: 0 4px; font-size: 26px; line-height: 1; color: var(--line); }
.stars .star.on { color: #E0A526; }
.stars.sm .star { font-size: 22px; min-width: 32px; min-height: 36px; }
.stars .fine { margin-left: 8px; }
.ministars { color: #E0A526; font-size: 12px; letter-spacing: 1px; margin: 0 8px; white-space: nowrap; }

/* Fridge */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.chip { min-height: 34px; padding: 4px 10px; font-size: 13px; font-weight: 500; border-color: var(--line); border-radius: 999px; }
.chip.on { background: var(--harbor); border-color: var(--harbor); color: var(--on-harbor); }
.fr { border-top: 1px solid var(--line); padding: 10px 0; }
.fr:first-of-type { border-top: 0; }

.mark { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: var(--faint); flex: none; margin-top: 2px; }
.mark.ok { background: var(--good); border-color: var(--good); color: #fff; }

.tree { border-left: 3px solid var(--brass); padding-left: 10px; color: var(--muted); }

.walkmap { width: 100%; height: auto; display: block; margin: 10px 0 4px; border-radius: 10px; }
.walkmap text { font-family: var(--sans, system-ui); }
.key { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; color: #fff; font-size: 9px; font-weight: 700; margin: 0 2px 0 6px; vertical-align: -3px; }
.key.s { background: #006778; } .key.t { background: #A1342B; }
table.spec { width: 100%; border-collapse: collapse; }
table.spec td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec td:first-child { color: var(--muted); width: 38%; padding-right: 10px; }
.walkcard .head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.walkcard h3 { margin: 0; }

figure.pic { margin: 12px 0 6px; }
figure.pic img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; background: var(--line); }
figure.pic figcaption { margin-top: 6px; }
figure.pic a { color: inherit; }
.picadd { cursor: pointer; }
.walkcard img.thumb { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 10px; margin-bottom: 10px; background: var(--line); }
label.picadd { display: inline-flex; align-items: center; justify-content: center; margin: 0; font-size: 14px; font-weight: 500; min-height: 40px; padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--ink); background: transparent; cursor: pointer; }
label.picadd input[type=file] { display: none !important; }
figure.pic + .actions, .actions:has(> label.picadd) { margin-bottom: 14px; }

.stop { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.stop:first-of-type { border-top: 0; }
.stop .num { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #7D5F17; color: #fff; font-size: 13px; font-weight: 700; }
.stop h3 { margin: 0 0 2px; font-size: 16px; }

.ladder { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; align-items: end; margin: 12px 0 6px; }
.ladder .rung { height: 0; padding-bottom: 0; display: flex; align-items: flex-end; justify-content: center; border-radius: 6px 6px 3px 3px; background: var(--line); color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.ladder .rung span { padding: 3px 0; }
.ladder .rung.past { background: #CFE3E1; color: var(--ink); }
.ladder .rung.now { background: #006778; color: #fff; font-weight: 700; }

.appt { padding: 12px 0; border-top: 1px solid var(--line); }
.appt:first-of-type { border-top: 0; }
.appt .head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.appt.done { opacity: .85; }
.outcome { margin-top: 10px; padding: 12px; border-radius: 10px; background: var(--bg-soft, #F6F2EA); }

.ladder .rung.ruck { background: #EAD9B5; } .ladder .rung.ruck.past { background: #D9C08A; } .ladder .rung.ruck.now { background: #7D5F17; color: #fff; }
.ladder .rung span { font-size: 10px; }
/* Calorie tracker */
.calnav { align-items: center; }
.calnav button { min-width: 44px; font-size: 20px; line-height: 1; }
.calbars { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 150px; margin: 14px 0 26px; }
.calbars .bar { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; min-height: 0; padding: 0; border: 0; background: none; }
.calbars .bar b { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--harbor); opacity: .55; }
.calbars .bar.on b { opacity: 1; }
.calbars .bar.over b { background: var(--caution); }
.calbars .bar span { position: absolute; bottom: -20px; font-size: 11px; color: var(--muted); }
.calbars .target { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--ink); opacity: .5; z-index: 1; pointer-events: none; }
.calbars .target span { position: absolute; right: 0; top: -18px; font-size: 11px; font-style: normal; font-variant-numeric: tabular-nums; }
/* Voice update */
.mic { margin-top: 8px; }
.vtext { margin-top: 10px; }
.vrow { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.vrow .check { flex: 1; border: 0; }
.vrow .vin { width: 104px; flex: none; }
.vrow.alert .check span { color: var(--alert, #9B1C1C); font-weight: 600; }
/* Heat without salt */
.heatbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 14px 16px; background: #FBEDE6; border-color: #E8B9A3; }
.heatbtn strong { color: #9B2C10; font-size: 17px; }
.notice.heat { border-left-color: #C2410C; }
.notice.heat strong { color: #9B2C10; }
.sauce { padding: 8px 0; border-top: 1px solid var(--line); }
.sauce .row { border: 0; padding: 0; gap: 8px; }
/* Soundtrack */
.soundtrack .showdate { font-family: var(--serif, Georgia, serif); font-size: 22px; font-weight: 700; margin: 4px 0 0; }
.soundtrack .actions { flex-wrap: wrap; }
/* Something else */
.else { margin: 8px 0 4px; padding: 10px 12px; background: var(--raised); border: 1px solid var(--line); border-left: 3px solid var(--harbor); border-radius: var(--r-sm); }
.else .row { border: 0; padding: 0; }
.else .sr { display: block; font-size: 0; }
.else .sr input { font-size: 16px; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.flag { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--caution-soft); color: var(--caution); }
.flag.good { background: var(--harbor-soft); color: var(--harbor); }
.flag.off { background: var(--alert-soft); color: var(--alert); }
.stoppic { margin: 0 0 8px; }
.stoppic img { width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--r-sm); }
/* Day calorie strip and snacks */
.daycal { margin: 12px 0 4px; padding: 12px 14px; background: var(--raised); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--r-md); cursor: pointer; }
.daycal .row { border: 0; padding: 0 0 6px; align-items: flex-end; }
.daycal .big { font-size: 28px; font-family: var(--serif); }
.daycal .over strong { color: var(--caution); }
.snacks .snackin { margin-top: 6px; }
.snacks .sr { font-size: 0; }
.snacks .sr input { font-size: 16px; }
.rate { flex-wrap: wrap; }
.addons { margin: 6px 0 2px; }
.addons .row { border: 0; padding: 2px 0; }
.addons.form { padding: 10px 12px; background: var(--raised); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--r-sm); }
.addons .snackin { margin-top: 6px; }
.addons .sr { font-size: 0; }
.addons .sr input { font-size: 16px; }
