:root {
  color-scheme: light;
  --ink: #10172d;
  --muted: #68708a;
  --forest: #354374;
  --forest-2: #26345f;
  --cream: #f7f2cc;
  --paper: #fffdf0;
  --gold: #f7bd2d;
  --gold-soft: #fff0b8;
  --teal: #31b9b3;
  --navy-deep: #08172e;
  --red: #a33b35;
  --red-soft: #fae8e5;
  --line: #ded9ce;
  --shadow: 0 18px 55px rgba(22, 41, 35, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--forest); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.shell { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center;
  justify-content: space-between; padding: 14px clamp(18px, 4vw, 52px);
  gap: 24px; background: rgba(8, 23, 46, 0.97); color: white; backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.1); box-shadow: 0 8px 24px rgba(3,12,27,.2);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 850; letter-spacing: -0.03em; font-size: 22px; }
.brand-logo { width: 38px; height: 38px; border: 2px solid var(--teal); border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(247,189,45,.42); }
.nav-actions { display: grid; grid-template-columns: repeat(5, auto); gap: 4px; padding: 4px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.06); }
.topbar button { min-height: 38px; border: 0; border-radius: 10px; padding: 8px 14px; background: transparent; color: rgba(255,255,255,.72); white-space: nowrap; font-size: 13px; font-weight: 700; transition: background .18s ease, color .18s ease, transform .18s ease; }
.topbar button:hover { background: rgba(255,255,255,.08); color: white; }
.topbar button.active { background: var(--gold); color: var(--navy-deep); font-weight: 850; box-shadow: 0 3px 10px rgba(0,0,0,.2); }

.page { width: min(1160px, calc(100% - 32px)); margin: 28px auto 72px; }
.account-access { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 22px; padding: 22px 24px; border: 1px solid rgba(255,255,255,.16); border-radius: 20px; background: var(--navy-deep); color: white; box-shadow: var(--shadow); }
.account-access h2 { margin-bottom: 6px; }
.account-access p { margin-bottom: 0; color: #dfe7f3; }
.account-access.signed-in { border-left: 6px solid var(--teal); }
.login-form { width: min(520px, 100%); }
.login-form > label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 800; }
.login-form > div { display: flex; gap: 8px; }
.login-form input { min-width: 0; flex: 1; border: 1px solid rgba(255,255,255,.24); border-radius: 12px; padding: 12px 13px; background: white; color: var(--ink); }
.login-form small { display: block; margin-top: 8px; color: #bfcbe0; line-height: 1.4; }
.auth-forms { width: min(520px, 100%); }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: #9dabc2; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .09em; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: rgba(255,255,255,.16); }
.otp-form input { max-width: 190px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; font-weight: 800; letter-spacing: .18em; text-align: center; }
.otp-form .secondary { border-color: rgba(255,255,255,.25); }
.hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 22px; margin-bottom: 22px; }
.hero-copy, .tag-card, .panel, .public-card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.hero-copy { padding: clamp(26px, 5vw, 52px); background: radial-gradient(circle at 88% 8%, rgba(49,185,179,.35), transparent 32%), linear-gradient(135deg, var(--forest), var(--navy-deep)); color: white; border-bottom: 5px solid var(--teal); }
.eyebrow { margin: 0 0 10px; color: var(--gold); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 850; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 14px; font-size: clamp(36px, 6vw, 67px); line-height: .98; letter-spacing: -.055em; }
.hero-copy p { max-width: 650px; color: #dfe9e5; font-size: 17px; line-height: 1.6; }
.tag-card { padding: 26px; display: flex; flex-direction: column; justify-content: space-between; }
.tag-visual { min-height: 230px; border-radius: 21px; padding: 24px; background: linear-gradient(135deg, var(--gold), #ffcf57); color: var(--forest); position: relative; overflow: hidden; display: flex; gap: 18px; align-items: flex-start; }
.tag-visual img { width: 70px; height: 70px; border-radius: 18px; object-fit: cover; box-shadow: 0 8px 20px rgba(8,23,46,.28); }
.tag-visual::after { content: "NFC"; position: absolute; right: -14px; bottom: -37px; font-size: 110px; font-weight: 950; opacity: .09; }
.tag-visual strong { display: block; font-size: 32px; letter-spacing: -.04em; }
.tag-code { margin-top: 64px; font-family: ui-monospace, monospace; font-weight: 800; letter-spacing: .11em; }
.status { display: flex; align-items: center; gap: 9px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px #ddf5f3; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.panel { padding: 26px; }
.panel.wide { grid-column: 1 / -1; }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 22px; }
.panel h2 { margin-bottom: 4px; font-size: 25px; letter-spacing: -.035em; }
.panel h3 { margin: 28px 0 14px; color: var(--forest); font-size: 16px; text-transform: uppercase; letter-spacing: .08em; }
.carer-editor { border-top: 6px solid var(--teal); }
.carer-editor .eyebrow { color: #187f7b; }
.person-panel { border-top: 6px solid var(--gold); }
.profile-privacy-note { color: var(--red); font-weight: 700; }
.person-panel .eyebrow { color: #8b6424; }
.premium-link { border: 0; padding: 7px 0; background: transparent; color: var(--forest); font-weight: 850; text-decoration: underline; text-underline-offset: 4px; }
.member-preferences { margin-top: 24px; padding: 18px; border-radius: 15px; background: #f5f4e9; }
.member-preferences h3 { margin-top: 0; }
.member-preferences label { display: flex; align-items: center; gap: 11px; margin-top: 12px; }
.subtle { color: var(--muted); font-size: 14px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 800; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; background: white; color: var(--ink); outline: none; }
.field textarea { min-height: 94px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(32,82,70,.12); }
.visibility { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; color: var(--muted); font-size: 12px; }
.switch { appearance: none; width: 41px; height: 23px; padding: 0; border: 0; border-radius: 999px; background: #bbb; position: relative; transition: .2s; }
.switch::after { content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%; background: white; top: 3px; left: 3px; transition: .2s; }
.switch:checked { background: var(--teal); }
.switch:checked::after { transform: translateX(18px); }
.savebar { position: sticky; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding: 14px 16px; border-radius: 18px; background: var(--forest); color: white; box-shadow: var(--shadow); }
.primary { border: 0; border-radius: 12px; padding: 12px 18px; background: var(--gold); color: var(--forest); font-weight: 850; }
.secondary { border: 1px solid var(--line); border-radius: 12px; padding: 11px 16px; background: white; color: var(--forest); font-weight: 750; }

.public-wrap { width: min(680px, calc(100% - 28px)); margin: 22px auto 70px; }
.public-cover { position: relative; min-height: 280px; display: flex; align-items: end; padding: 24px; overflow: hidden; border-radius: 28px 28px 0 0; color: white; background: linear-gradient(130deg, var(--forest), var(--navy-deep)); border-bottom: 5px solid var(--teal); }
.public-cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(49,185,179,.48), transparent 37%), radial-gradient(circle at 20% 0%, rgba(247,189,45,.26), transparent 30%); }
.public-brand-logo { position: absolute; z-index: 1; right: 22px; top: 22px; width: 78px; height: 78px; border: 2px solid var(--gold); border-radius: 22px; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.horse-avatar { position: relative; display: grid; place-items: center; width: 112px; height: 112px; margin-right: 18px; border: 4px solid rgba(255,255,255,.8); border-radius: 30px; background: var(--gold-soft); color: var(--forest); font-size: 48px; font-weight: 900; }
.public-title { position: relative; }
.public-title h1 { margin: 0 0 4px; font-size: 47px; }
.public-title p { margin: 0; color: #dce9e5; }
.public-card { border-radius: 0 0 28px 28px; overflow: hidden; }
.alert { margin: 20px; padding: 18px; border: 1px solid #edc1bc; border-radius: 16px; background: var(--red-soft); color: #6e2824; }
.alert strong { display: block; margin-bottom: 7px; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.section { padding: 22px; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section h2 { margin-bottom: 15px; font-size: 19px; }
.fact-list { display: grid; gap: 13px; }
.fact { display: grid; grid-template-columns: 125px 1fr; gap: 12px; }
.fact span:first-child { color: var(--muted); font-size: 13px; font-weight: 750; }
.fact span:last-child { line-height: 1.5; white-space: pre-wrap; }
.contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-actions a { display: block; padding: 14px 18px; border-radius: 999px; text-align: center; text-decoration: none; font-weight: 850; }
.call { background: var(--forest); color: white; }
.vet { background: var(--gold-soft); color: var(--forest); }
.disclaimer { padding: 18px 22px; background: #efede7; color: var(--muted); font-size: 12px; line-height: 1.55; }
.journey-section { background: linear-gradient(145deg, #fffbed, #eefaf8); border-left: 5px solid var(--teal); }
.journey-section .eyebrow { color: #187f7b; margin-bottom: 6px; }
.journey-timeline { margin-top: 22px; padding-top: 18px; border-top: 1px solid #d8d6c8; }
.journey-timeline h3 { margin-bottom: 13px; color: var(--forest); }
.journey-timeline article { display: grid; grid-template-columns: 100px 1fr; gap: 3px 14px; margin-bottom: 10px; padding: 12px; border-left: 4px solid var(--teal); border-radius: 8px; background: rgba(255,255,255,.62); }
.journey-timeline time { grid-row: 1 / 3; color: var(--muted); font-size: 12px; font-weight: 800; }
.journey-timeline p { margin: 3px 0 0; line-height: 1.5; }
.empty { color: var(--muted); font-style: italic; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 20; padding: 13px 16px; border-radius: 12px; background: #102e27; color: white; box-shadow: var(--shadow); }

.carer-wrap { width: min(820px, calc(100% - 28px)); margin: 22px auto 72px; display: grid; gap: 15px; }
.carer-hero { position: relative; display: flex; justify-content: space-between; gap: 20px; min-height: 220px; padding: 30px; overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 26px; background: radial-gradient(circle at 78% 15%, rgba(49,185,179,.38), transparent 35%), var(--navy-deep); color: white; box-shadow: var(--shadow); }
.carer-hero h1 { max-width: 580px; margin-bottom: 10px; font-size: clamp(38px, 7vw, 62px); }
.carer-hero > div { align-self: end; position: relative; z-index: 1; }
.carer-hero img { width: 96px; height: 96px; border: 3px solid var(--gold); border-radius: 25px; object-fit: cover; }
.private-banner { display: flex; gap: 12px; align-items: center; padding: 15px 18px; border-radius: 15px; background: var(--gold); color: var(--forest); }
.private-banner span { font-size: 13px; }
.carer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.carer-actions a { padding: 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 14px; background: var(--teal); color: var(--navy-deep); text-align: center; text-decoration: none; font-weight: 850; }
.carer-actions a:last-child { background: var(--gold); }
.carer-card { padding: 23px; border: 1px solid var(--line); border-radius: 21px; background: var(--paper); box-shadow: var(--shadow); }
.carer-card h2 { margin-bottom: 17px; color: var(--forest); font-size: 23px; }
.care-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.care-item { padding: 15px; border-left: 4px solid var(--teal); border-radius: 10px; background: #f5f4e9; }
.care-item.urgent { border-left-color: var(--red); background: var(--red-soft); }
.care-item span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.care-item p { margin: 0; line-height: 1.55; white-space: pre-wrap; }
.checklist-card { display: grid; gap: 11px; border-top: 6px solid var(--gold); }
.checklist-card .eyebrow { color: #8b6424; margin-bottom: -3px; }
.checklist-card label { display: flex; gap: 11px; align-items: center; padding: 12px; border-radius: 11px; background: #f5f4e9; }
.checklist-card input { width: 21px; height: 21px; accent-color: var(--teal); }
.carer-disclaimer { margin: 3px 10px; color: rgba(255,255,255,.74); font-size: 12px; line-height: 1.55; }

.notes-wrap { width: min(980px, calc(100% - 28px)); margin: 22px auto 72px; display: grid; gap: 16px; }
.notes-hero { min-height: 230px; display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 30px; border: 1px solid rgba(255,255,255,.15); border-radius: 26px; background: radial-gradient(circle at 80% 12%, rgba(247,189,45,.28), transparent 30%), radial-gradient(circle at 65% 35%, rgba(49,185,179,.3), transparent 35%), var(--navy-deep); color: white; box-shadow: var(--shadow); }
.notes-hero h1 { margin-bottom: 10px; font-size: clamp(38px, 7vw, 62px); }
.notes-hero > div { max-width: 720px; }
.notes-hero img { align-self: flex-start; width: 96px; height: 96px; border: 3px solid var(--teal); border-radius: 25px; object-fit: cover; }
.notes-form-card, .session-history { padding: 25px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.notes-form-card .eyebrow, .session-history .eyebrow { color: #187f7b; }
.share-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #f5f4e9; }
.share-option input { width: 21px; height: 21px; accent-color: var(--teal); }
.share-option span { display: grid; gap: 3px; }
.share-option small { color: var(--muted); line-height: 1.4; }
.history-heading { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 16px; }
.history-heading h2 { margin: 0; color: var(--forest); }
.history-heading > span { padding: 7px 11px; border-radius: 999px; background: var(--gold-soft); color: var(--forest); font-size: 12px; font-weight: 850; }
.session-history { display: grid; gap: 14px; }
.session-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.session-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.session-head time { color: var(--muted); font-size: 12px; font-weight: 800; }
.session-head h3 { margin: 4px 0 0; color: var(--forest); font-size: 21px; }
.session-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.session-badges span { height: fit-content; padding: 6px 8px; border-radius: 999px; background: #e9e7e0; color: var(--muted); font-size: 11px; font-weight: 800; }
.session-badges span.on { background: #d9f4f1; color: #146e69; }
.session-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.private-note { margin-top: 12px; padding: 14px; border: 1px dashed #a5a1b5; border-radius: 12px; background: #efedf4; }
.private-note strong { color: var(--forest); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.private-note p { margin: 7px 0 0; line-height: 1.5; }
.delete-session { margin-top: 13px; padding: 7px 0; border: 0; background: transparent; color: var(--red); font-size: 12px; font-weight: 800; }
.empty-history { padding: 30px; border: 1px dashed var(--line); border-radius: 15px; color: var(--muted); text-align: center; }

.premium-wrap { width: min(1040px, calc(100% - 28px)); margin: 22px auto 72px; display: grid; gap: 16px; }
.premium-hero { min-height: 330px; display: flex; align-items: end; justify-content: space-between; gap: 25px; padding: 36px; overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 28px; background: radial-gradient(circle at 77% 15%, rgba(247,189,45,.38), transparent 31%), radial-gradient(circle at 58% 40%, rgba(49,185,179,.3), transparent 36%), var(--navy-deep); color: white; box-shadow: var(--shadow); }
.premium-hero > div { max-width: 760px; }
.premium-hero h1 { margin-bottom: 13px; font-size: clamp(43px, 8vw, 77px); }
.premium-hero > div > p:not(.eyebrow) { max-width: 650px; color: #dfe7f3; font-size: 17px; line-height: 1.55; }
.premium-hero img { align-self: flex-start; width: 108px; height: 108px; border: 3px solid var(--gold); border-radius: 28px; object-fit: cover; }
.premium-status { display: inline-flex; align-items: center; gap: 9px; margin-top: 10px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: #dfe7f3; font-size: 12px; }
.premium-status span { padding: 4px 7px; border-radius: 999px; background: var(--gold); color: var(--forest); font-weight: 900; }
.welcome-strip { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 22px; border-radius: 17px; background: var(--teal); color: var(--navy-deep); }
.welcome-strip div { display: flex; gap: 7px; font-size: 20px; }
.welcome-strip a { color: var(--navy-deep); font-weight: 850; }
.premium-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.premium-card { position: relative; min-height: 270px; padding: 25px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.premium-card.feature-card { background: linear-gradient(145deg, #fff8dd, #fffdf0); border-top: 6px solid var(--gold); }
.premium-card .eyebrow { color: #187f7b; }
.premium-card h2 { margin-bottom: 11px; color: var(--forest); font-size: 28px; }
.premium-card > p:not(.eyebrow) { max-width: 480px; color: var(--muted); line-height: 1.6; }
.premium-card a, .premium-card button { display: inline-block; margin-top: 18px; padding: 10px 13px; border: 0; border-radius: 11px; background: var(--forest); color: white; text-decoration: none; font-weight: 800; }
.premium-card button:disabled { opacity: .68; cursor: default; }
.premium-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 23px; border-radius: 14px; background: var(--gold); color: var(--forest); font-family: Georgia, serif; font-size: 22px; font-weight: 900; }
.preference-state { display: flex; align-items: center; gap: 9px; margin-top: 24px; color: var(--forest); font-size: 13px; font-weight: 800; }
.website-links { display: flex; justify-content: space-between; gap: 30px; align-items: center; padding: 27px; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.website-links .eyebrow { color: #8b6424; }
.website-links h2 { color: var(--forest); }
.website-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.website-actions a { padding: 11px 13px; border-radius: 11px; background: var(--forest); color: white; text-decoration: none; font-weight: 800; }
.premium-disclaimer { margin: 4px 10px; color: rgba(255,255,255,.75); font-size: 12px; line-height: 1.55; }

.tag-manager { margin: 28px 0 72px; padding: 32px; border: 1px solid rgba(255,255,255,.28); border-radius: 28px; background: rgba(6,24,48,.86); color: white; box-shadow: 0 22px 48px rgba(3,13,31,.25); }
.tags-page { min-height: 75vh; }
.tag-manager.locked { text-align: center; }
.tag-count, .tag-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 12px; background: rgba(57,194,185,.16); color: #8ff0e7; font-weight: 800; }
.tag-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap: 18px; margin: 24px 0; }
.tag-item { padding: 20px; border-radius: 22px; background: #f9f5db; color: #101c34; }
.tag-item.disabled { opacity: .65; filter: grayscale(.35); }
.tag-item-head { display: flex; justify-content: space-between; gap: 16px; }
.tag-item h3 { margin: 10px 0 2px; font-size: 1.3rem; }
.tag-item p { margin: 0; }
.tag-item label { display: block; margin-top: 16px; font-weight: 800; }
.tag-qr { width: 142px; min-width: 142px; min-height: 142px; padding: 5px; background: #fff; border-radius: 10px; }
.tag-qr img, .tag-qr canvas { width: 132px !important; height: 132px !important; }
.tag-link { display: flex; gap: 8px; margin-top: 7px; }
.tag-link input { min-width: 0; background: #fff; color: #17233d; }
.tag-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tag-actions a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.danger { border: 0; border-radius: 15px; padding: 12px 16px; background: #9f2638; color: white; font-weight: 800; }
.empty-tags { display: flex; flex-direction: column; gap: 5px; padding: 22px; border: 1px dashed rgba(255,255,255,.28); border-radius: 18px; }
.new-tag-form { display: grid; grid-template-columns: minmax(220px,2fr) minmax(150px,1fr) auto; align-items: end; gap: 14px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18); }
.new-tag-form .field { margin: 0; }
.new-tag-form select { width: 100%; padding: 15px; border: 0; border-radius: 14px; background: white; color: #17233d; font: inherit; }
.new-tag-form small { grid-column: 1/-1; color: #cad5e7; }
.nav-actions.public-tag-nav { display: flex; width: auto; }
.nav-actions.public-tag-nav button { min-width: 180px; }
.horse-switcher { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.22); border-radius: 20px; background: rgba(6,24,48,.9); color: white; box-shadow: var(--shadow); }
.horse-switcher .eyebrow { margin-bottom: 7px; }
.horse-switcher select { min-width: min(360px,70vw); padding: 13px 42px 13px 14px; border: 2px solid rgba(49,185,179,.45); border-radius: 13px; background: white; color: var(--forest); font: inherit; font-weight: 850; }
.horse-switcher-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.account-role { display: inline-flex; margin: 8px 0; padding: 6px 10px; border-radius: 999px; background: rgba(49,185,179,.18); color: #8ff0e7; font-size: 12px; font-weight: 900; letter-spacing: .03em; }
.notes-access-message { border-left: 6px solid var(--teal); }
.carer-access { margin-bottom: 18px; padding: 24px; border: 1px solid rgba(255,255,255,.22); border-radius: 22px; background: rgba(6,24,48,.9); color: white; box-shadow: var(--shadow); }
.carer-access.review { border-left: 6px solid var(--gold); }
.carer-access.active-access { border-left: 6px solid var(--teal); }
.carer-access-list { display: grid; gap: 10px; margin: 18px 0; }
.carer-access-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; border-radius: 15px; background: var(--paper); color: var(--forest); }
.carer-access-row > div { display: grid; gap: 4px; }
.carer-access-row span { color: var(--muted); font-size: 12px; }
.carer-access-row.expired { opacity: .65; }
.carer-access .new-tag-form { grid-template-columns: minmax(210px,2fr) minmax(145px,1fr) minmax(145px,1fr) auto; }

@media (max-width: 780px) {
  .hero, .grid { grid-template-columns: 1fr; }
  .panel.wide { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .hero-copy { padding: 30px 24px; }
  .topbar { align-items: stretch; flex-direction: column; gap: 9px; padding: 9px 10px 10px; }
  .brand { justify-content: center; gap: 8px; font-size: 17px; }
  .brand-logo { width: 31px; height: 31px; }
  .nav-actions { width: 100%; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; padding: 3px; border-radius: 12px; }
  .topbar button { min-width: 0; min-height: 36px; padding: 7px 2px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; letter-spacing: -.01em; }
  .nav-actions.public-tag-nav { width: 100%; }
  .nav-actions.public-tag-nav button { width: 100%; }
  .page { width: min(100% - 22px, 1160px); margin-top: 14px; }
  .account-access { align-items: stretch; flex-direction: column; gap: 17px; padding: 19px 17px; }
  .login-form > div { flex-direction: column; }
  .otp-form input { max-width: none; }
  .panel { padding: 20px 16px; }
  .public-cover { min-height: 240px; padding: 20px; }
  .horse-avatar { width: 86px; height: 86px; border-radius: 23px; font-size: 38px; }
  .public-title h1 { font-size: 39px; }
  .public-brand-logo { width: 62px; height: 62px; right: 16px; top: 16px; border-radius: 17px; }
  .tag-visual img { width: 58px; height: 58px; border-radius: 15px; }
  .carer-hero { min-height: 210px; padding: 22px; }
  .carer-hero img { width: 68px; height: 68px; border-radius: 18px; }
  .care-grid { grid-template-columns: 1fr; }
  .session-grid { grid-template-columns: 1fr; }
  .session-head { flex-direction: column; }
  .session-badges { justify-content: flex-start; }
  .notes-hero { min-height: 220px; padding: 22px; }
  .notes-hero img { width: 66px; height: 66px; border-radius: 18px; }
  .notes-form-card, .session-history { padding: 18px 14px; }
  .journey-timeline article { grid-template-columns: 1fr; }
  .journey-timeline time { grid-row: auto; }
  .premium-hero { min-height: 330px; padding: 24px; }
  .premium-hero img { width: 70px; height: 70px; border-radius: 19px; }
  .premium-grid { grid-template-columns: 1fr; }
  .welcome-strip, .website-links { align-items: flex-start; flex-direction: column; }
  .website-actions { justify-content: flex-start; }
  .private-banner { align-items: flex-start; flex-direction: column; gap: 4px; }
  .fact { grid-template-columns: 105px 1fr; }
  .savebar { bottom: 8px; }
  .tag-manager { padding: 22px 16px; }
  .tag-list { grid-template-columns: 1fr; }
  .tag-item-head { flex-direction: column; }
  .tag-qr { align-self: center; }
  .tag-link { flex-direction: column; }
  .new-tag-form { grid-template-columns: 1fr; }
  .carer-access .new-tag-form { grid-template-columns: 1fr; }
  .carer-access-row { align-items: stretch; flex-direction: column; }
  .horse-switcher { align-items: stretch; flex-direction: column; }
  .horse-switcher select { width: 100%; min-width: 0; }
  .horse-switcher-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
