/* Gait Check – demo app styles */
:root {
  --bg: #F3F0E8; --paper: #FBFAF6; --ink: #151515; --muted: #5F5B53; --muted2: #6B665C;
  --line: #ECE7DC; --line2: #DDD7CA; --band: #E8DFD0; --green: #4F5E33; --green-d: #3F4A2A;
  --green-l: #E3E8D8; --olive: #9DAF7A; --red: #B83A2E; --red-l: #F6E3DF; --amber: #C57A2A; --amber-d: #8E5416;
  --stage: #141414; --r: 20px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--stage); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; font-size: inherit; color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, label:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
img { display: block; }

/* ================= stage + presenter ================= */
.stage { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; gap: 56px; padding: 24px; }
.side { scrollbar-width: thin; scrollbar-color: #333 transparent; color: #F3F0E8; width: 330px; max-height: calc(100vh - 48px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.side h1 { font-family: "Playfair Display", Georgia, serif; font-size: 50px; line-height: 1; margin: 0; color: var(--olive); }
.side h1 span { color: #FFF; display: block; font-size: 30px; margin-top: 6px; }
.side p { margin: 0; color: #CFCAC0; font-size: 14px; line-height: 1.5; }
.side-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #8F8A80; margin-top: 10px; font-weight: 600; }
.scenes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.scenes button { width: 100%; background: none; border: none; color: #CFCAC0; text-align: left; font-size: 14px; padding: 7px 10px; border-radius: 9px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.scenes button:hover { background: #242424; color: #FFF; }
.scenes button.on { background: #2B3120; color: #FFF; font-weight: 600; }
.sn { width: 20px; height: 20px; border-radius: 10px; background: #2A2A2A; color: #AFA99D; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.on .sn { background: var(--olive); color: #1C2210; }
.side .note { background: #1E1E1E; border-left: 3px solid var(--olive); padding: 10px 12px; border-radius: 6px; font-size: 13px; color: #E6E1D6; min-height: 42px; }
.side-seg { display: grid; grid-template-columns: 1fr 1fr; background: #222; border-radius: 10px; padding: 3px; }
.side-seg button { background: none; border: none; color: #CFCAC0; padding: 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.side-seg button.on { background: #F3F0E8; color: var(--ink); font-weight: 600; }
.side-tgl { font-size: 13px; color: #CFCAC0; display: flex; gap: 8px; align-items: center; cursor: pointer; }
.side-tgl input { accent-color: var(--olive); width: 16px; height: 16px; }
.side-btn { background: #242424; border: 1px solid #333; color: #E6E1D6; border-radius: 10px; padding: 9px; cursor: pointer; font-size: 13px; }
.side-btn:hover { background: #2E2E2E; }
.side .hint { font-size: 12px; color: #8F8A80; }
.side-close { display: none; }

.phonewrap { position: relative; flex-shrink: 0; }
.phone { width: 390px; height: 844px; border-radius: 50px; overflow: hidden; position: relative; background: var(--bg); box-shadow: 0 0 0 10px #050505, 0 0 0 12px #3A3A3A, 0 30px 80px rgba(0, 0, 0, .55); transform-origin: top left; isolation: isolate; }
#view { position: absolute; inset: 0; }

.statusbar { position: absolute; top: 0; left: 0; right: 0; height: 46px; z-index: 30; display: flex; justify-content: space-between; align-items: center; padding: 6px 30px 0 38px; font-size: 15px; font-weight: 600; pointer-events: none; color: var(--ink); }
.statusbar::after { content: ""; position: absolute; left: 50%; top: 10px; width: 120px; height: 32px; transform: translateX(-50%); background: #000; border-radius: 20px; }
.sb-ic { display: flex; gap: 3px; align-items: flex-end; }
.sb-ic i { width: 3px; background: currentColor; border-radius: 1px; } .sb-ic i:nth-child(1) { height: 5px } .sb-ic i:nth-child(2) { height: 8px } .sb-ic i:nth-child(3) { height: 11px }
.sb-ic b { width: 22px; height: 11px; border: 1.5px solid currentColor; border-radius: 3px; margin-left: 6px; position: relative; } .sb-ic b::after { content: ""; position: absolute; inset: 1.5px 5px 1.5px 1.5px; background: currentColor; border-radius: 1px; }
body[data-screen="record"] .statusbar, body[data-screen="today"] .statusbar, body[data-screen="baseline"] .statusbar { color: #FFF; }

/* mobile: the app is the page */
body.mobile { background: var(--bg); }
body.mobile .stage { display: block; padding: 0; }
body.mobile .side { display: none; }
body.mobile .phonewrap { width: 100% !important; height: 100% !important; }
body.mobile .phone { width: 100%; height: 100%; border-radius: 0; box-shadow: none; transform: none; }
body.mobile .statusbar { display: none; }
body.mobile.show-side .side { display: flex; position: fixed; inset: 0; z-index: 100; width: auto; max-height: none; background: var(--stage); padding: 24px 20px; }
body.mobile.show-side .side-close { display: block; position: absolute; top: 14px; right: 16px; background: none; border: none; color: #FFF; font-size: 30px; cursor: pointer; }

/* ================= app primitives ================= */
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.scr.enter { animation: enter .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
.pad { flex: 1; overflow-y: auto; padding: calc(56px + var(--safe-t)) 20px 18px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: none; }
.pad::-webkit-scrollbar { display: none; }
body.mobile .pad { padding-top: calc(28px + var(--safe-t)); }
.pad.nobar { padding-bottom: calc(26px + var(--safe-b)); }
.pad-full { padding: calc(60px + var(--safe-t)) 20px calc(28px + var(--safe-b)); gap: 14px; overflow-y: auto; }
body.mobile .pad-full { padding-top: calc(30px + var(--safe-t)); }
.center { align-items: center; text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.mt-auto { margin-top: auto !important; }
.w100 { width: 100%; }
.m0 { margin: 0; }
.muted { color: var(--muted); }
.sm { font-size: 13px; }
.b { font-weight: 600; }
.red { color: var(--red); } .green { color: var(--green); } .amber { color: var(--amber-d); }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
h2.t { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.15; }
h2.t.xl { font-size: 32px; letter-spacing: -.8px; }
p { line-height: 1.5; font-size: 15px; }
.lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.sec { font-size: 13px; font-weight: 600; color: var(--muted); margin: 4px 0 -6px; }
.card { background: var(--paper); border-radius: var(--r); border: none; }
.pad-c { padding: 16px 18px; }
.tap { cursor: pointer; text-align: left; transition: transform .12s, background .2s; width: 100%; }
.tap:active { transform: scale(.985); }
.list { padding: 2px 16px; display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; min-height: 48px; border: none; background: none; border-bottom: 1px solid var(--line); font-size: 15px; padding: 0; width: 100%; text-align: left; }
.li:last-child { border-bottom: none; }
.li b { font-weight: 700; min-width: 26px; text-align: right; }
.delta { font-size: 12px; color: var(--muted2); background: var(--bg); border-radius: 8px; padding: 2px 7px; }
.delta.red { background: var(--red-l); color: var(--red); }

.btn { min-height: 52px; border-radius: 16px; border: none; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; transition: transform .12s, opacity .2s; flex-shrink: 0; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.green { background: var(--green); color: #FFF; }
.btn.black { background: var(--ink); color: #FFF; }
.btn.white { background: #FFF; color: var(--ink); min-height: 44px; }
.btn.outline { background: transparent; border: 2px solid var(--ink); color: var(--ink); }
.btn.auto { width: auto; padding: 0 22px; min-height: 46px; }
.lnk { background: none; border: none; color: var(--green); font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-size: 15px; }
.round { width: 44px; height: 44px; border-radius: 22px; border: none; background: rgba(30, 30, 30, .6); display: flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(6px); }
.back { width: 44px; height: 44px; margin-left: -10px; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; flex-shrink: 0; }
.hdr { display: flex; align-items: center; gap: 4px; }
.ck { width: 26px; height: 26px; border-radius: 13px; background: var(--green); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ck.big { width: 38px; height: 38px; border-radius: 19px; }
.ring { width: 22px; height: 22px; border-radius: 12px; border: 2px solid #C8C1B2; flex-shrink: 0; }
.okc { width: 22px; display: inline-flex; justify-content: center; }
.av { border-radius: 50%; object-fit: cover; object-position: center 25%; flex-shrink: 0; background: var(--band); }
.ini { width: 52px; height: 52px; border-radius: 50%; background: var(--band); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.dot { width: 8px; height: 8px; border-radius: 4px; display: inline-block; flex-shrink: 0; background: var(--green); margin-right: 6px; vertical-align: middle; }
.dot.ok, .dot.back { background: var(--green); } .dot.flag, .dot.out { background: var(--red); } .dot.amber { background: var(--amber); }
.dot.improving { background: transparent; border: 2px solid #8F8A80; width: 10px; height: 10px; border-radius: 5px; }
.dot.learning { background: #C8C1B2; }
.bars { display: flex; gap: 6px; }
.bar { flex: 1; height: 8px; border-radius: 4px; background: var(--line2); }
.bar.on { background: var(--green); }
.bars.sm { margin-top: 6px; width: 120px; } .bars.sm .bar { height: 5px; }
.num { font-size: 46px; font-weight: 700; letter-spacing: -1.5px; line-height: 1; }
.num.s { font-size: 30px; letter-spacing: -1px; }
.score { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 4px; }
.score .muted { font-size: 14px; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; font-size: 15px; line-height: 1.4; border: none; }
.note svg { flex-shrink: 0; margin-top: 1px; }
.note.good { background: var(--green-l); color: var(--green-d); }
.note.bad { background: var(--red-l); color: #7E2219; }
.note.info { background: var(--band); color: #4A463F; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line2); border-top-color: var(--green); animation: spin .8s linear infinite; display: inline-block; }
.spin.w { border-color: rgba(255, 255, 255, .3); border-top-color: #FFF; }
@keyframes spin { to { transform: rotate(360deg); } }

/* tabs */
.tabs { flex-shrink: 0; background: var(--paper); border-top: 1px solid var(--line2); display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 8px calc(22px + var(--safe-b)); }
body.mobile .tabs { padding-bottom: calc(10px + var(--safe-b)); }
.tabs button { background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted2); font-size: 11px; font-weight: 500; cursor: pointer; padding: 4px 0; }
.tabs button.on { color: var(--green); font-weight: 700; }

/* charts */
.chart { position: relative; margin-top: 8px; touch-action: pan-y; cursor: crosshair; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .seg { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw .5s ease-out forwards; animation-delay: var(--d); }
.chart .pt { opacity: 0; animation: pop .25s ease-out forwards; animation-delay: calc(var(--d) + 120ms); transform-box: fill-box; transform-origin: center; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
.chart .tip { position: absolute; top: -6px; background: var(--ink); color: #FFF; font-size: 12px; padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none; }
.chart .tip .red { color: #FF9C8F; }
.legend { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.legend .sw { width: 20px; height: 12px; border-radius: 3px; background: var(--band); }

/* ================= TODAY ================= */
.hero { position: absolute; top: 0; left: 0; right: 0; width: 100%; object-fit: cover; }
.today-hero { height: 52%; object-position: center 40%; filter: grayscale(1) contrast(1.05); }
.hero-blank { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #6F7D52, #3A4526); }
.hero-blank span { font-family: "Playfair Display", serif; font-size: 140px; color: rgba(255, 255, 255, .22); }
.brand { position: absolute; top: calc(56px + var(--safe-t)); left: 20px; padding: 12px 16px; border-radius: 16px; background: rgba(20, 20, 20, .58); backdrop-filter: blur(6px); color: #FFF; user-select: none; }
body.mobile .brand { top: calc(20px + var(--safe-t)); }
.brand-t { font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.brand-s { font-size: 14px; color: #F1EEE6; }
.sheet-card { position: absolute; left: 0; right: 0; bottom: 0; top: 46%; background: var(--bg); border-radius: 28px 28px 0 0; padding: 22px 20px 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; scrollbar-width: none; }
.today .sheet-card { bottom: calc(84px + var(--safe-b)); border-radius: 28px 28px 0 0; }
body.mobile .today .sheet-card { bottom: calc(64px + var(--safe-b)); }
.today .tabs { position: absolute; left: 0; right: 0; bottom: 0; }
.horse-switch { background: none; border: none; text-align: left; cursor: pointer; padding: 0; width: 100%; }
.h-name { font-size: 19px; font-weight: 700; }
.h-name.l { font-size: 26px; letter-spacing: -.4px; }
.switch { border: 1px solid var(--line2); border-radius: 12px; padding: 4px 10px; }
.sym { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ready { background: var(--green-l); padding: 12px 16px; display: flex; align-items: center; gap: 12px; color: var(--green-d); }
.ready b, .alert b { display: block; font-size: 15px; color: var(--ink); }
.ready span span, .ready .grow span, .alert .grow span { display: block; font-size: 13px; }
.alert { background: var(--red-l); padding: 12px 16px; display: flex; align-items: center; gap: 12px; color: #7E2219; }
.alert-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--red); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.learn { padding: 16px 18px; display: flex; align-items: center; gap: 12px; }
.learn > div { flex: 1; }
.learn .big-sub { font-size: 22px; font-weight: 700; margin: 2px 0 10px; }
.duepill { align-self: flex-start; font-size: 13px; color: var(--amber-d); background: #F6E9D6; border-radius: 12px; padding: 6px 12px; }

/* ================= RECORD ================= */
.record { background: #111; color: #FFF; }
.vf { position: absolute; inset: 0 0 154px; overflow: hidden; background: #000; }
.vf-media { width: 100%; height: 100%; object-fit: cover; }
.is-rec #vfImg { animation: drift 6s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.06) translateY(-1.5%); } }
.kp { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.kp .kpt { fill: rgba(255, 255, 255, 0); stroke: #FFF; stroke-width: 2; opacity: 0; }
.kp .bbox { fill: none; stroke: #9DAF7A; stroke-width: 2.5; stroke-dasharray: 10 8; opacity: 0; }
.kp .scan { stroke: rgba(157, 175, 122, .9); stroke-width: 3; opacity: 0; }
.is-rec .kp .kpt, .kp.an .kpt { animation: kp 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * 90ms); }
.is-rec .kp .bbox, .kp.an .bbox { opacity: .9; animation: dash 1s linear infinite; }
.kp.an .scan, .is-rec .kp .scan { animation: scan 2.2s ease-in-out infinite; }
@keyframes kp { 0%, 100% { opacity: .2; r: 9; } 50% { opacity: 1; r: 15; } }
@keyframes dash { to { stroke-dashoffset: -36; } }
@keyframes scan { 0% { transform: translateY(440px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(780px); opacity: 0; } }
.vf-guide { position: absolute; inset: 22% 20% 12%; border: 2px dashed rgba(255, 255, 255, .6); border-radius: 22px; }
.vf-guide span::after { content: "Fit all four hooves in here"; position: absolute; bottom: -30px; left: 0; right: 0; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .85); }
.rec-top { position: absolute; top: calc(52px + var(--safe-t)); left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
body.mobile .rec-top { top: calc(16px + var(--safe-t)); }
.chip { background: rgba(30, 30, 30, .6); backdrop-filter: blur(6px); padding: 10px 16px; border-radius: 20px; font-weight: 600; font-size: 15px; }
.howto { position: absolute; top: calc(108px + var(--safe-t)); left: 16px; right: 16px; background: rgba(30, 30, 30, .66); backdrop-filter: blur(8px); border-radius: 20px; padding: 16px 18px; transition: opacity .35s, transform .35s; }
body.mobile .howto { top: calc(72px + var(--safe-t)); }
.howto.away { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.howto b { font-size: 17px; }
.howto ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #E9E5DC; }
.howto li { display: flex; gap: 10px; align-items: center; }
.rec-live { position: absolute; top: calc(112px + var(--safe-t)); left: 50%; transform: translateX(-50%); background: rgba(20, 20, 20, .7); padding: 8px 14px; border-radius: 16px; font-size: 14px; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
body.mobile .rec-live { top: calc(76px + var(--safe-t)); }
.rdot { width: 10px; height: 10px; border-radius: 5px; background: #E5484D; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.rec-bar { position: absolute; left: 0; right: 0; bottom: 0; height: calc(154px + var(--safe-b)); background: #1A1A1A; padding: 14px 24px var(--safe-b); display: flex; flex-direction: column; }
.prog { height: 4px; border-radius: 2px; background: #444; overflow: hidden; }
.prog span { display: block; height: 100%; width: 0; background: #E5484D; transition: width .1s linear; }
.rec-ctrl { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; border: 2px solid #FFF; cursor: pointer; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ic { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); display: flex; align-items: center; justify-content: center; }
.shutter { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #FFF; background: none; padding: 5px; cursor: pointer; }
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #E5484D; transition: all .25s; }
.shutter.on span { border-radius: 10px; transform: scale(.5); }
.timer { font-size: 18px; font-weight: 600; width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.src { text-align: center; font-size: 12px; color: #9C978C; margin-top: 12px; }

/* ================= ANALYSING ================= */
.an-frame { position: relative; border-radius: 22px; overflow: hidden; height: 300px; background: #DDD7CA; flex-shrink: 0; }
.an-frame img { width: 100%; height: 100%; object-fit: cover; }
.an-frame .kp { inset: 0; }
.scanonly { position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(157, 175, 122, .5) 50%, transparent 55%); background-size: 100% 200%; animation: scan2 1.6s linear infinite; }
@keyframes scan2 { from { background-position: 0 100%; } to { background-position: 0 -100%; } }
.an-badge { position: absolute; left: 14px; bottom: 14px; background: rgba(20, 20, 20, .75); color: #FFF; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 16px; }
.an-badge.done { background: var(--green); }
.steps .li { min-height: 52px; color: var(--muted); transition: color .3s; }
.stp { width: 26px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--line); }
.stp svg, .stp .spin { display: none; }
.step.doing { color: var(--ink); } .step.doing .stp { background: none; } .step.doing .spin { display: inline-block; }
.step.done { color: var(--ink); } .step.done .stp { background: var(--green); animation: pop .3s; } .step.done svg { display: block; }

/* ================= CHANGE / HISTORY / VET ================= */
.spacer-toast { height: 86px; flex-shrink: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: none; background: none; padding: 8px 4px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.hist .st { font-size: 14px; color: var(--muted); white-space: nowrap; }
.hist .st.flag, .hist .st.out { color: var(--red); } .hist .st.back { color: var(--green); font-weight: 600; }
.hist svg { color: #B5AFA3; }
.cb { cursor: pointer; min-height: 62px; }
.cb input { position: absolute; opacity: 0; pointer-events: none; }
.cb .box { width: 26px; height: 26px; border-radius: 6px; border: 2px solid #8F8A80; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .15s; }
.cb .box svg { opacity: 0; }
.cb input:checked + .box { background: var(--green); border-color: var(--green); }
.cb input:checked + .box svg { opacity: 1; }
.cb .n { display: block; font-weight: 500; text-align: left; }
.cb .d { display: block; }
textarea, .fld input { width: 100%; border: 1px solid var(--line2); background: var(--paper); border-radius: 16px; padding: 14px 16px; font: inherit; font-size: 15px; resize: none; color: var(--ink); }
.okbig { width: 96px; height: 96px; border-radius: 48px; background: var(--green); display: flex; align-items: center; justify-content: center; margin-top: 60px; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.linkbox { display: flex; align-items: center; gap: 10px; padding: 12px 16px; width: 100%; text-align: left; }

/* vet report */
.report { background: #FFF; }
.browser { flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: calc(50px + var(--safe-t)) 12px 8px 22px; background: #EFEDE7; border-bottom: 1px solid var(--line2); }
body.mobile .browser { padding-top: calc(10px + var(--safe-t)); }
.url { flex: 1; background: #FFF; border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--muted); text-align: center; }
.rp { flex: 1; overflow-y: auto; padding: 20px; font-size: 14px; }
.rp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rp-brand { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--green); font-weight: 700; }
.rp h2 { margin: 4px 0 2px; font-size: 28px; letter-spacing: -.5px; }
.rp h4 { margin: 22px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rp-flag, .rp-ok { margin-top: 16px; padding: 12px 14px; border-radius: 12px; display: flex; flex-direction: column; gap: 2px; }
.rp-flag { background: var(--red-l); color: #7E2219; } .rp-ok { background: var(--green-l); color: var(--green-d); }
.rp-note { margin-top: 12px; border-left: 3px solid var(--line2); padding-left: 12px; }
.rp-note p { margin: 2px 0 0; }
.rp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rp-leg { border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.rp-leg.flag { border-color: #E9B9B1; background: #FFF8F6; }
.rp-lh { display: flex; flex-direction: column; font-size: 13px; } .rp-lh small { color: var(--muted); }
.rp-leg .chart { margin-top: 4px; cursor: default; }
.rp-tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.rp-tbl th, .rp-tbl td { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.rp-tbl th:first-child, .rp-tbl td:first-child { text-align: left; }
.rp-tbl th { color: var(--muted); font-weight: 600; }
.rp-tbl tr.flag td:first-child { color: var(--red); font-weight: 600; }
.rp-vids { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rp-vid { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 3/4; }
.rp-vid img { width: 100%; height: 100%; object-fit: cover; }
.rp-vid span { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, .6); color: #FFF; font-size: 10px; padding: 2px 5px; border-radius: 5px; }
.rp-ul { margin: 0; padding-left: 18px; line-height: 1.7; }
.rp-disc { margin-top: 22px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

/* ================= BASELINE ================= */
.bl-hero { height: 38%; object-position: center 20%; }
.sheet-card.bl { top: 33%; padding-bottom: calc(28px + var(--safe-b)); }
.sheet-card.bl .card.list { flex-shrink: 0; }
.abs-tl { position: absolute; top: calc(54px + var(--safe-t)); left: 16px; z-index: 2; }
body.mobile .abs-tl { top: calc(16px + var(--safe-t)); }

/* ================= TRAINING ================= */
.hero-card { background: var(--green); color: #FFF; border-radius: 24px; padding: 20px 22px; }
.hero-card.bad { background: var(--red); }
.hero-card h3 { margin: 6px 0 4px; font-size: 26px; letter-spacing: -.4px; }
.hero-card p { margin: 0 0 12px; color: rgba(255, 255, 255, .88); font-size: 15px; }
.op { opacity: .85; }
.cks { display: flex; gap: 8px; }
.cks span { width: 34px; height: 34px; border-radius: 17px; background: #E3E8D8; color: var(--green-d); display: inline-flex; align-items: center; justify-content: center; animation: pop .35s backwards; }
.cks span:nth-child(2) { animation-delay: .08s } .cks span:nth-child(3) { animation-delay: .16s } .cks span:nth-child(4) { animation-delay: .24s }
.wks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.wk { background: var(--bg); border-radius: 14px; padding: 8px 4px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.wk.cur { background: var(--green-l); color: var(--green-d); }
.dots { display: flex; gap: 4px; }
.dots i { width: 11px; height: 11px; border-radius: 6px; border: 2px solid currentColor; }
.dots i.f { background: currentColor; }
.loads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.load { min-height: 50px; border-radius: 16px; border: 1px solid var(--line2); background: var(--paper); font-size: 14px; font-weight: 600; cursor: pointer; }
.load.on { border: 2px solid var(--green); background: var(--green-l); color: #2F3A1C; }

/* ================= HORSES ================= */
.horse { padding: 14px 16px; display: flex; align-items: center; gap: 14px; cursor: pointer; width: 100%; text-align: left; border: 2px solid transparent; transition: transform .12s; }
.horse:active { transform: scale(.985); }
.horse.act { border-color: var(--line2); }
.horse .h-name { display: block; font-size: 18px; }
.horse .hl { display: block; font-size: 14px; margin-top: 2px; }
.okl { color: var(--green-d); }
.pill { background: var(--ink); color: #FFF; border-radius: 18px; padding: 9px 16px; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.addh { border: 2px dashed #C8C1B2; background: none; border-radius: var(--r); min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; font-weight: 600; cursor: pointer; color: #3A3732; flex-shrink: 0; }
.share-card { background: var(--band); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* ================= overlays ================= */
.toast { position: absolute; left: 12px; right: 12px; top: 0; z-index: 40; transform: translateY(-140%); transition: transform .5s cubic-bezier(.2, .9, .3, 1.15); cursor: pointer; }
.toast.show { transform: translateY(calc(50px + var(--safe-t))); }
body.mobile .toast.show { transform: translateY(calc(10px + var(--safe-t))); }
.toast-in { background: rgba(251, 250, 246, .97); border-radius: 22px; padding: 12px 14px; display: flex; gap: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); backdrop-filter: blur(10px); }
.toast-ic { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--green); }
.toast-tx { display: flex; flex-direction: column; font-size: 14px; flex: 1; }
.toast-app { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }
.toast-app em { font-style: normal; }
.snack { position: absolute; left: 50%; bottom: 104px; transform: translate(-50%, 20px); background: var(--ink); color: #FFF; padding: 11px 18px; border-radius: 14px; font-size: 14px; opacity: 0; transition: all .3s; z-index: 45; pointer-events: none; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
.snack.show { opacity: 1; transform: translate(-50%, 0); }
.sheet { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.sheet.show { pointer-events: auto; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .3s; }
.sheet.show .sheet-bg { opacity: 1; }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--bg); border-radius: 26px 26px 0 0; padding: 10px 20px calc(30px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; transform: translateY(105%); transition: transform .35s cubic-bezier(.2, .9, .3, 1); max-height: 85%; overflow-y: auto; }
.sheet.show .sheet-panel { transform: none; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: #C8C1B2; align-self: center; }
.sheet-panel h3 { margin: 4px 0 0; font-size: 22px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.seg.two { grid-template-columns: 1fr 1fr; } .seg.three { grid-template-columns: repeat(3, 1fr); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* print: only the vet report */
@media print {
  body { background: #FFF; }
  .side, .statusbar, .browser, .tabs, .toast, .snack, .sheet { display: none !important; }
  .stage, .phonewrap, .phone, #view, .scr { position: static !important; transform: none !important; width: auto !important; height: auto !important; box-shadow: none !important; border-radius: 0 !important; overflow: visible !important; display: block !important; }
  .rp { overflow: visible; padding: 0; font-size: 12pt; }
  .rp-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
