/* Approved screenshot compositions. Loaded LAST; ymv trees do not inherit the old profile composition. */
html[data-view="luxury"] { --ymv-paper:#f8f4e9; --ymv-ink:#302015; --ymv-muted:#71634f; --ymv-rule:#ded2b9; --ymv-accent:#896927; --ymv-nav:#302015; --ymv-nav-ink:#f4deb0; }
html[data-view="command"] { --ymv-paper:#111719; --ymv-ink:#eef1e9; --ymv-muted:#bdc8c0; --ymv-rule:#3e4a44; --ymv-accent:#d9bc78; --ymv-nav:#1b2820; --ymv-nav-ink:#e1eddd; }
html[data-view="passport"] { --ymv-paper:#f8f4ea; --ymv-ink:#143f2c; --ymv-muted:#5b6857; --ymv-rule:#dcd3b9; --ymv-accent:#856621; --ymv-nav:#143f2c; --ymv-nav-ink:#f2d48d; }
html[data-view="modern"] { --ymv-paper:#fcfcf8; --ymv-ink:#244b34; --ymv-muted:#5e6e61; --ymv-rule:#e1e7dd; --ymv-accent:#806020; --ymv-nav:#244b34; --ymv-nav-ink:#fffef3; }
html[data-view="qatar"] { --ymv-paper:#fbf6ec; --ymv-ink:#42311f; --ymv-muted:#696044; --ymv-rule:#ded3bd; --ymv-accent:#586444; --ymv-nav:#42311f; --ymv-nav-ink:#f7e7bf; }
/* App chrome is selected by active view even when a legacy inner page is behind the profile. */
html[data-view] #app { background:var(--ymv-paper); color:var(--ymv-ink); min-height:100dvh; }
html[data-view] #app .header { background:var(--ymv-paper); color:var(--ymv-ink); border-color:var(--ymv-rule); }
html[data-view] #app .view-context,html[data-view] #app .stable-switch { color:var(--ymv-muted); }
html[data-view] #app .stable-switch { min-height:44px; }
html[data-view] #app>.nav,html[data-view] .ymv-nav { background:var(--ymv-nav); color:var(--ymv-nav-ink); border-color:var(--ymv-accent); }
html[data-view] #app>.nav .nav-btn,html[data-view] #app>.nav .nav-btn.active { color:var(--ymv-nav-ink); font-size:12px; }
html[data-view] #app>.nav .nav-action-ring { color:var(--ymv-nav-ink); background:var(--ymv-nav); border-color:var(--ymv-accent); }
html[data-view="command"] #app .header { background:#1b2820; }
html[data-view="command"] #app .header-icon-btn { background:#303e34; color:#eef1e9; }
html[data-view] .modal-overlay.profile-open,html[data-view] .modal-overlay.profile-open #modal-content { background:var(--ymv-paper); }
html[data-view] .ymv-profile.profile-core { --ui-paper:var(--ymv-paper); --ui-card:var(--ymv-paper); --ui-ink:var(--ymv-ink); --ui-muted:var(--ymv-muted); --ui-rule:var(--ymv-rule); --ink:var(--ymv-ink); --muted:var(--ymv-muted); color:var(--ymv-ink); background:var(--ymv-paper); padding:0 0 calc(88px + env(safe-area-inset-bottom)); max-width:none; min-height:100dvh; }
.ymv-profile *, .ymv-home-luxury *, .ymv-home-passport * { box-sizing:border-box; min-width:0; }
.ymv-profile svg,.ymv-button svg,.ymv-alert svg { width:22px; height:22px; flex-shrink:0; stroke:currentColor; fill:none; stroke-width:1.6; }
.ymv-profile h2,.ymv-profile h3,.ymv-profile h4,.ymv-profile p,.ymv-profile dl { margin:0; }
.ymv-profile h2 { font:500 32px/1.2 Georgia,serif; overflow-wrap:anywhere; }
.ymv-profile h3 { font-size:17px; line-height:1.4; margin-bottom:12px; }
.ymv-profile p,.ymv-profile dd,.ymv-profile strong { overflow-wrap:anywhere; }
.ymv-profile p { font-size:14px; line-height:1.6; }
.ymv-profile button,.ymv-home-luxury button,.ymv-home-passport button { font:inherit; color:inherit; cursor:pointer; min-height:44px; }
.ymv-profile button:disabled { opacity:.55; cursor:wait; }
.ymv-profile button:focus-visible,.ymv-profile a:focus-visible,.ymv-profile [tabindex]:focus-visible { outline:3px solid var(--ymv-accent); outline-offset:2px; }
.ymv-profile ::selection, #app ::selection { background:var(--ymv-accent); color:var(--ymv-paper); }
.ymv-profile { scrollbar-color:var(--ymv-muted) var(--ymv-paper); }
.ymv-profile input,.ymv-profile textarea { caret-color:var(--ymv-accent); }
.ymv-cap { display:flex; align-items:center; gap:12px; min-height:66px; padding:8px 14px; border-bottom:1px solid var(--ymv-rule); }
.ymv-cap>div { flex:1; }
.ymv-cap strong { font-size:17px; }
.ymv-cap>button { display:grid; place-items:center; width:44px; flex:0 0 44px; padding:8px; background:none; border:0; }
.ymv-care-caption { display:none; font-size:12px; color:var(--ymv-muted); }
.ymv-profile[data-tab="health"] .ymv-care-caption { display:block; }
.ymv-photo { position:relative; width:100%; height:100%; overflow:hidden; background:#e1e1d5; }
.ymv-photo img,.ymv-command-photo img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:50% 40%; z-index:1; }
.ymv-photo .horse-photo-empty { position:absolute; inset:0; display:grid; place-content:center; justify-items:center; gap:10px; color:#59634f; padding:24px; font-size:13px; }
.ymv-photo .horse-photo-empty svg { width:40px; height:40px; }
.ymv-profile .without-photo { background:transparent; }
.ymv-tabs { display:flex; overflow-x:auto; scrollbar-width:thin; background:var(--ymv-paper); border-bottom:1px solid var(--ymv-rule); padding:0 8px; }
.ymv-tabs button { flex:1 0 56px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:6px; padding:12px 6px; border:0; border-bottom:2px solid transparent; background:none; font-size:12px; line-height:1.45; }
.ymv-tabs button[aria-selected="true"] { color:var(--ymv-accent); border-bottom-color:var(--ymv-accent); font-weight:650; }
.ymv-tabs small,.ymv-button small,.ymv-cap small { display:block; font-size:12px; line-height:1.5; }
.ymv-panel { padding:18px 16px 28px; outline-offset:-3px; }
.ymv-nav { position:fixed; z-index:12; bottom:0; inset-inline:0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); min-height:76px; padding:8px 8px max(8px,env(safe-area-inset-bottom)); border-top:1px solid; }
.ymv-nav .ymv-button { padding:4px 2px; min-height:52px; display:flex; flex-direction:column; justify-content:center; gap:4px; border:0; background:none; color:inherit; font-size:12px; }
.ymv-nav .ymv-nav-add { align-self:center; justify-self:center; border:1px solid currentColor; border-radius:50%; width:48px; height:48px; min-height:48px; }
.ymv-nav-add>span { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; }
.ymv-button { display:flex; align-items:center; justify-content:center; gap:10px; padding:10px; background:none; border:1px solid var(--ymv-rule); text-align:start; }
.ymv-button:hover,.ymv-journal-links button:hover { background:color-mix(in srgb,var(--ymv-accent) 8%,transparent); }
.ymv-facts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; border-block:1px solid var(--ymv-rule); padding:16px 0; margin:16px 0; }
.ymv-facts>div { padding:0 8px; border-inline-end:1px solid var(--ymv-rule); }
.ymv-facts>div:last-child { border:0; }
.ymv-facts dt,.ymv-ledger dt,.ymv-vaccine dt { font-size:12px; line-height:1.5; color:var(--ymv-muted); }
.ymv-facts dd { margin:6px 0 0; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.ymv-facts-six { grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px 0; }
.ymv-ledger { padding:8px 0; }
.ymv-ledger>div { display:grid; grid-template-columns:minmax(90px,1fr) minmax(0,1.5fr); align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--ymv-rule); }
.ymv-ledger dd { font-size:13px; margin:0; text-align:end; overflow-wrap:anywhere; }
.ymv-alert { display:flex; width:100%; align-items:center; text-align:start; gap:12px; margin:16px 0; padding:14px 12px; color:#853e29; background:#f6e7cc; border:1px solid #dfc49e; }
.ymv-alert>span,.ymv-alert>div { flex:1; }
.ymv-alert strong,.ymv-alert small { display:block; font-size:13px; line-height:1.5; }
.ymv-alert small { margin-top:4px; }
.ymv-journal-links { display:grid; }
.ymv-journal-links button { display:flex; align-items:center; justify-content:flex-start; gap:12px; min-height:60px; padding:14px 0; border:0; border-bottom:1px solid var(--ymv-rule); background:none; text-align:start; font-size:14px; }
.ymv-journal-links button>span { flex:1; }
.ymv-journal-links svg { width:23px; height:23px; }
.ymv-crest { position:relative; display:inline-grid; place-items:center; width:42px; height:52px; color:var(--ymv-accent); }
.ymv-crest svg { position:absolute; inset:0; width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:.8; }
.ymv-crest b { font:500 20px Georgia,serif; }
/* Luxury: portrait, centred paper identity and fine ruled journal. */
.ymv-lux-portrait { height:340px; }
.ymv-lux-paper { background:var(--ymv-paper); }
.ymv-lux-identity { text-align:center; padding:20px 16px 4px; }
.ymv-lux-identity h2 { margin:10px 0 6px; font-size:36px; }
.ymv-lux-identity>p { color:var(--ymv-muted); font-size:13px; }
.ymv-lux-identity .ymv-ledger { text-align:start; }
.ymv-luxury .ymv-tabs button { flex-basis:auto; white-space:nowrap; font-size:13px; }
.ymv-luxury .ymv-tabs svg { display:none; }
.ymv-luxury .ymv-vaccine h4,.ymv-luxury .record-heading h3 { font-family:Georgia,serif; font-size:22px; font-weight:500; }
.ymv-luxury .ymv-journal-links button { font-family:Georgia,serif; font-size:18px; }
/* Command: compact identification, queues and activity. */
.ymv-command .ymv-cap { background:#1b2820; }
.ymv-command-id { display:grid; grid-template-columns:96px minmax(0,1fr); gap:16px; padding:16px; }
.ymv-command-photo { position:relative; width:96px; height:112px; overflow:hidden; border-radius:4px; background:#303c33; }
.ymv-command-photo .horse-photo-empty { display:grid; place-content:center; height:100%; font-size:12px; text-align:center; padding:5px; color:var(--ymv-muted); }
.ymv-command-id h2 { font:650 25px/1.2 var(--ff-body); margin:8px 0; }
.ymv-command-id p { font-size:12px; color:var(--ymv-muted); }
.ymv-command-stats { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto; align-items:center; background:#252b2c; padding:6px 12px; margin:0 16px 14px; gap:8px; }
.ymv-command-stats .ymv-button { border:0; padding:4px 0; font-size:12px; }
.ymv-command-stats strong { color:#e7c281; font-size:20px; }
.ymv-command-block { background:#252b2c; margin-bottom:18px; padding:14px; }
.ymv-command-block h3 { font-size:13px; text-transform:uppercase; letter-spacing:.04em; }
.ymv-command .ymv-panel { padding-top:16px; }
.ymv-command .ymv-alert { color:#ffd6b3; background:#423327; border-color:#74563e; }
.ymv-quick { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
.ymv-quick .ymv-button { flex-direction:column; font-size:12px; padding:10px 3px; }
/* Passport: a photographic identity overlay and eight-action record index. */
.ymv-passport-portrait { height:360px; position:relative; }
.ymv-passport-name { position:absolute; z-index:2; inset-inline:0; bottom:0; display:flex; align-items:center; gap:18px; padding:18px; color:#fff9e9; background:linear-gradient(transparent,rgba(13,37,25,.92)); padding-top:55px; }
.ymv-passport-name .ymv-crest { color:#e2c77d; flex-shrink:0; }
.ymv-passport-name p { font-size:13px; margin-top:5px; }
.ymv-passport-paper>.ymv-overview-art { padding:0 16px; }
.ymv-passport .ymv-tabs { padding-top:4px; }
.ymv-index { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-block:1px solid var(--ymv-rule); padding:10px 0; gap:8px 0; }
.ymv-index .ymv-button { flex-direction:column; gap:8px; text-align:center; font-size:12px; padding:10px 4px; min-height:80px; border:0; }
.ymv-notes { margin-top:22px; }
.ymv-notes p { font-size:14px; line-height:1.7; margin:10px 0; white-space:pre-wrap; }
.ymv-notes>.ymv-button { margin-inline-start:auto; width:fit-content; }
/* Modern: a rounded photo record sheet, never a large ledger above health. */
.ymv-modern-portrait { height:290px; margin:12px 16px 0; border-radius:18px; overflow:hidden; }
.ymv-modern-sheet { position:relative; border-radius:20px 20px 0 0; background:var(--ymv-paper); margin-top:-18px; padding-top:6px; }
.ymv-modern-name { padding:16px 20px; }
.ymv-modern-name p { margin-top:4px; color:var(--ymv-muted); font-size:13px; }
.ymv-overview-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-bottom:20px; }
.ymv-overview-actions .ymv-button { flex-direction:column; font-size:13px; text-align:center; border-radius:12px; }
/* Qatar: compact warm identity, bilingual controls and a full-height care sheet. */
.ymv-qatar-identity { padding:14px 16px; }
.ymv-qatar-photo { height:270px; overflow:hidden; border-radius:12px; }
.ymv-qatar-identity h2 { font-size:29px; margin-top:14px; }
.ymv-qatar-identity p { color:var(--ymv-muted); font-size:13px; }
.ymv-qatar-sheet { border-top:1px solid var(--ymv-rule); }
.ymv-qatar .ymv-tabs button { flex-basis:64px; }
.ymv-qatar .ymv-health-sheet { min-height:65dvh; }
/* Task-focused health screens replace the photo while preserving the six tabs. */
.ymv-profile[data-tab="health"] .ymv-overview-art { display:none; }
.ymv-profile[data-tab="health"] .ymv-modern-sheet { margin-top:0; }
.ymv-profile[data-tab="health"] .ymv-cap { min-height:78px; }
.ymv-categories { display:flex; overflow:auto; gap:4px; border-bottom:1px solid var(--ymv-rule); margin:0 -4px 22px; }
.ymv-categories button { flex:1 0 62px; display:flex; flex-direction:column; gap:8px; align-items:center; justify-content:center; border:0; border-bottom:2px solid transparent; padding:8px 5px 12px; font-size:12px; background:none; }
.ymv-categories button[aria-pressed="true"] { border-bottom-color:var(--ymv-accent); color:var(--ymv-accent); }
.ymv-vaccine { padding:18px 0; border-bottom:1px solid var(--ymv-rule); }
.ymv-vaccine:first-child { padding-top:4px; }
.ymv-vaccine>header { display:flex; align-items:flex-start; gap:12px; }
.ymv-vaccine>header>div { flex:1; }
.ymv-vaccine>header>svg { width:28px; height:28px; color:var(--ymv-accent); margin-top:2px; }
.ymv-vaccine>header button { align-self:center; border:0; background:none; width:44px; }
.ymv-vaccine h4 { font-size:17px; font-weight:600; line-height:1.4; }
.ymv-vaccine dl { padding:14px 0 0 40px; display:grid; gap:9px; }
.ymv-vaccine dl>div { display:grid; grid-template-columns:minmax(75px,1fr) minmax(0,1.5fr); gap:14px; }
.ymv-vaccine dd { margin:0; font-size:14px; }
.ymv-vaccine>p { margin-top:12px; }
.ymv-modern .ymv-vaccine { padding:16px; border:1px solid var(--ymv-rule); border-radius:14px; margin-bottom:12px; }
.ymv-modern .ymv-vaccine dl { padding-inline-start:0; }
.ymv-status { display:inline-flex; align-items:center; gap:5px; font-size:12px; line-height:1.5; color:var(--ymv-muted); margin-top:6px; }
.ymv-status svg { width:15px; height:15px; }
.ymv-status.overdue { color:#a23d29; }
.ymv-status.soon { color:#815a13; }
.ymv-status.ok,.ymv-status.recorded { color:#286246; }
.ymv-command .ymv-status.overdue { color:#ffb7a0; }
.ymv-command .ymv-status.soon { color:#f1cd7e; }
.ymv-command .ymv-status.ok,.ymv-command .ymv-status.recorded { color:#b3d5aa; }
.ymv-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); background:#e9e8da; border-radius:24px; padding:4px; margin-bottom:16px; }
.ymv-filters button { border:0; background:none; border-radius:20px; font-size:13px; }
.ymv-filters button[aria-pressed="true"] { background:#143f2c; color:#fffbea; }
.ymv-timeline h3 { margin-top:20px; font-size:14px; text-transform:uppercase; letter-spacing:.03em; }
.ymv-timeline-list { padding:0; margin:0; list-style:none; }
.ymv-event { display:flex; gap:12px; align-items:flex-start; padding:14px 0; border-bottom:1px solid var(--ymv-rule); }
.ymv-event>div { flex:1; }
.ymv-event strong { display:block; font-size:14px; line-height:1.5; }
.ymv-event time,.ymv-event small { display:block; font-size:12px; color:var(--ymv-muted); line-height:1.6; }
.ymv-event>.ymv-status { max-width:90px; margin:0; text-align:end; }
.ymv-history { border-inline-start:1px solid var(--ymv-rule); padding-inline-start:12px; }
.ymv-event p { font-size:13px; }
.ymv-empty { padding:14px 0; color:var(--ymv-muted); font-size:14px; }
.ymv-timeline-add { background:var(--ymv-nav); color:var(--ymv-nav-ink) !important; width:100%; margin-top:20px; border-radius:8px; }
.ymv-profile .record-heading h3 { margin:0; color:var(--ymv-ink); }
.ymv-profile .record-add { font-size:12px; background:var(--ymv-accent); color:var(--ymv-paper); }
.ymv-profile .record-disclaimer { color:var(--ymv-muted); font-size:12px; line-height:1.7; padding-top:20px; }
.ymv-profile .record-facts,.ymv-profile .record-row,.ymv-profile .record-prose { color:var(--ymv-ink); background:var(--ymv-paper); border-color:var(--ymv-rule); }
.ymv-profile .record-facts dt,.ymv-profile .record-row p { color:var(--ymv-muted); }
/* Home compositions and roster follow the same selected materials. */
html[data-view="luxury"] #app #section-today,html[data-view="passport"] #app #section-today { padding-top:0; padding-inline:0; }
.ymv-home-luxury,.ymv-home-passport { display:block; color:var(--ymv-ink); background:var(--ymv-paper); }
.ymv-home-portrait,.ymv-home-passport-photo { display:block; width:100%; height:340px; position:relative; padding:0; border:0; overflow:hidden; }
.ymv-home-paper { padding:20px 16px; text-align:center; }
.ymv-home-paper>h2 { font:500 36px/1.2 Georgia,serif; margin:10px 0; }
.ymv-home-paper>p { font-size:13px; color:var(--ymv-muted); }
.ymv-home-paper .ymv-ledger { text-align:start; }
.ymv-home-paper>.ymv-button { width:100%; margin-top:16px; }
.ymv-home-passport-name { position:absolute; z-index:2; inset-inline:0; bottom:0; display:flex; align-items:center; gap:16px; text-align:start; padding:50px 18px 22px; background:linear-gradient(transparent,rgba(13,37,25,.92)); color:#fffbea; }
.ymv-home-passport-name strong { font:500 34px/1.2 Georgia,serif; display:block; overflow-wrap:anywhere; }
.ymv-home-passport-name small { display:block; margin-top:8px; font-size:13px; }
.ymv-home-passport-name .ymv-crest { color:#e2c77d; flex-shrink:0; }
.ymv-home-passport-paper { padding:0 16px 24px; }
html[data-view] .home-command { color:var(--ymv-ink); }
html[data-view="command"] .home-command .command-metrics { gap:8px; }
html[data-view="command"] .home-command .command-metrics button { background:#252b2c; min-height:112px; border-color:#3e4a44; padding:12px 6px; }
html[data-view="command"] .home-command .command-metrics svg { width:22px; height:22px; }
html[data-view="command"] .home-command .command-metrics span { font-size:12px; }
html[data-view="command"] .home-command .command-panel { background:#252b2c; }
html[data-view="command"] .home-command .command-queue button { min-height:64px; font-size:14px; }
html[data-view="command"] .home-command .command-queue svg { color:#b8cca7; }
html[data-view="command"] .home-command .command-queue button:has(.urgent) svg { color:#ffb7a0; }
html[data-view="command"] .home-command .command-queue button:has(.due) svg { color:#f1cd7e; }
html[data-view="modern"] .home-modern .home-horse-rail,html[data-view="qatar"] .home-qatar .home-horse-rail { display:grid; grid-auto-flow:column; grid-auto-columns:min(65vw,255px); grid-template-columns:none; overflow-x:auto; gap:12px; scroll-snap-type:x proximity; }
html[data-view="modern"] .home-modern .home-horse-card,html[data-view="qatar"] .home-qatar .home-horse-card { grid-column:auto; height:240px; border-radius:12px; scroll-snap-align:start; }
html[data-view="modern"] .home-modern .home-horse-photo,html[data-view="qatar"] .home-qatar .home-horse-photo { height:100%; }
html[data-view="modern"] .home-modern .home-quick-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
html[data-view="qatar"] .home-qatar .home-quick-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
html[data-view] .home-quick-actions span { font-size:12px; line-height:1.5; }
html[data-view] .home-quick-actions small { display:block; font-size:12px; }
html[data-view] .home-horse-copy small,html[data-view] .home-section-heading>button { font-size:12px; }
.ymv-qatar-greeting { margin-bottom:18px; color:var(--ymv-ink); }
.ymv-qatar-greeting h2 { font-size:18px; display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; }
.ymv-qatar-greeting h2 small { font-size:14px; margin-inline-start:8px; font-weight:500; }
.ymv-qatar-greeting p { color:var(--ymv-muted); font-size:12px; margin-top:5px; }
html[data-view] #app #horses-content { color:var(--ymv-ink); }
html[data-view] #app .roster-horse { background:var(--ymv-paper); color:var(--ymv-ink); border-color:var(--ymv-rule); }
html[data-view="command"] #app .roster-horse { background:#252b2c; }
html[data-view="luxury"] #app .roster-horse { border-radius:0; }
html[data-view="luxury"] #app .roster-identity strong { font-family:Georgia,serif; }
html[data-view="passport"] #app .roster-horse { border-radius:3px; border-color:#c7b98c; }
html[data-view="qatar"] #app .roster-horse { background:#f6efdf; }
html[dir="rtl"] .ymv-profile,html[dir="rtl"] .ymv-profile h2,html[dir="rtl"] .ymv-home-paper>h2 { font-family:Tahoma,Arial,sans-serif; letter-spacing:normal; }
html[dir="rtl"] .ymv-profile { line-height:1.7; }
html[dir="rtl"] .ymv-cap>button:first-child svg { transform:scaleX(-1); }
html[dir="rtl"] .ymv-vaccine dl { padding-inline-start:40px; padding-inline-end:0; }
/* Desktop compositions remain distinct, with natural reading widths and no phone hardware. */
@media(min-width:760px) {
  .ymv-profile { max-width:1280px !important; margin-inline:auto; }
  .ymv-nav { padding-inline:max(24px,calc((100vw - 1000px)/2)); }
  .ymv-luxury:not([data-tab="health"]) { display:grid !important; grid-template-columns:minmax(280px,.9fr) minmax(0,1.1fr); align-content:start; }
  .ymv-luxury>.ymv-cap { grid-column:1/-1; }
  .ymv-luxury .ymv-lux-portrait { height:calc(100dvh - 155px); min-height:540px; position:sticky; top:0; }
  .ymv-luxury .ymv-lux-paper { padding:12px 18px; }
  .ymv-luxury[data-tab="health"] .ymv-panel { max-width:800px; margin:auto; }
  .ymv-passport-portrait { height:460px; }
  .ymv-passport:not([data-tab="health"]) .ymv-passport-paper { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.5fr); }
  .ymv-passport-paper>.ymv-tabs { grid-column:1/-1; grid-row:1; }
  .ymv-passport:not([data-tab="health"]) .ymv-passport-paper>.ymv-overview-art { padding:24px; }
  .ymv-passport .ymv-panel { max-width:1000px; margin:auto; width:100%; }
  .ymv-command[data-tab="overview"] .ymv-panel { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
  .ymv-command .ymv-panel>.ymv-health-sheet { grid-column:1/-1; }
  .ymv-command .ymv-command-id { grid-template-columns:128px minmax(0,1fr); padding-inline:28px; }
  .ymv-command .ymv-command-photo { width:128px; height:140px; }
  .ymv-modern:not([data-tab="health"]) { display:grid !important; grid-template-columns:minmax(260px,.85fr) minmax(0,1.15fr); align-content:start; }
  .ymv-modern>.ymv-cap { grid-column:1/-1; }
  .ymv-modern .ymv-modern-portrait { height:540px; }
  .ymv-modern .ymv-modern-sheet { margin-top:12px; }
  .ymv-modern[data-tab="health"] .ymv-panel { max-width:900px; margin:auto; }
  .ymv-modern .ymv-vaccines { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .ymv-qatar .ymv-qatar-identity { display:grid; grid-template-columns:1.5fr 1fr; gap:28px; align-items:center; }
  .ymv-qatar .ymv-qatar-photo { height:360px; }
  .ymv-qatar .ymv-panel { max-width:900px; margin:auto; }
  .ymv-home-luxury { display:grid; grid-template-columns:1fr 1fr; }
  .ymv-home-luxury .ymv-home-portrait { height:100%; min-height:660px; }
  .ymv-home-passport { display:grid; grid-template-columns:1.1fr 1fr; }
  .ymv-home-passport-photo { height:100%; min-height:660px; }
  .home-qatar>.ymv-qatar-greeting { grid-column:1/-1; }
}
@media(prefers-reduced-motion:reduce) { .ymv-profile *, .home-experience * { scroll-behavior:auto; } }
/* Roster is the real application's searchable roster, including its empty-photo state. */
html[data-view] #app #rosterGrid .roster-horse { background:var(--ymv-paper); color:var(--ymv-ink); border-color:var(--ymv-rule); }
html[data-view] #app .roster-id,html[data-view] #app .roster-count { color:var(--ymv-muted); font-size:12px; }
html[data-view] #app .roster-card-foot .chip,html[data-view] #app .roster-identity small { font-size:12px; }
html[data-view="command"] #app #rosterGrid { grid-template-columns:1fr; }
html[data-view="command"] #app #rosterGrid .roster-horse { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); background:#252b2c; border-radius:3px; }
html[data-view="command"] #app .roster-photo { height:104px; display:grid; grid-template-columns:84px minmax(0,1fr); gap:12px; padding:10px; }
html[data-view="command"] #app .roster-photo::after { display:none; }
html[data-view="command"] #app .roster-identity { position:static; align-self:center; color:var(--ymv-ink); }
html[data-view="command"] #app .roster-identity strong { font:600 15px/1.3 var(--ff-body); }
html[data-view="command"] #app .roster-card-foot { align-content:center; }
html[data-view="luxury"] #app #rosterGrid .roster-horse { border-radius:0; }
html[data-view="passport"] #app #rosterGrid .roster-horse { border-radius:3px; }
html[data-view="qatar"] #app #rosterGrid .roster-horse { background:#f6efdf; }
html[data-view] #app>.nav .nav-btn span,.ymv-nav .ymv-button>span { overflow-wrap:anywhere; }
html[data-view] #app .view-context { min-height:44px; }
.ymv-button>span,.ymv-tabs button>span,.ymv-categories button>span { overflow-wrap:anywhere; }
.ymv-profile .record-facts dd,.ymv-profile .record-heading h3 { color:var(--ymv-ink); }
@media(min-width:1000px) {
  html[data-view="command"] #app #rosterGrid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Match the approved navigation materials; Modern/Qatar are not dark reskins. */
html[data-view="modern"]{--ymv-nav:#fffefa;--ymv-nav-ink:#244b34}
html[data-view="qatar"]{--ymv-nav:#fcf6e8;--ymv-nav-ink:#42311f}
html[data-view="modern"] #app>.nav .nav-action-ring,html[data-view="modern"] .ymv-nav .ymv-nav-add{background:#244b34;color:#fffefa;border-color:#244b34}
html[data-view="qatar"] #app>.nav .nav-action-ring,html[data-view="qatar"] .ymv-nav .ymv-nav-add{background:#42311f;color:#fff5df;border-color:#42311f}
html[data-view="luxury"] #app>.nav .nav-action-ring,html[data-view="luxury"] .ymv-nav .ymv-nav-add{background:#d1aa61;color:#302015;border-color:#b58d44}
html[data-view="command"] #app>.nav .nav-action-ring,html[data-view="command"] .ymv-nav .ymv-nav-add{background:#527247;color:#eef1e9;border-color:#6a925b;border-radius:10px}
html[data-view="modern"] #app>.nav,html[data-view="qatar"] #app>.nav{border-top-color:var(--ymv-rule)}
html[data-view] .ymv-command-id{grid-template-columns:112px minmax(0,1fr)}
html[data-view] .ymv-command-photo{width:112px;height:140px}
/* Profile tab labels never break mid-word ("Overvi/ew", Arabic too): tabs grow
   to their label, as Luxury already does, and the row scrolls if needed. */
.ymv-tabs button { flex:1 0 auto; }
.ymv-tabs button>span,.ymv-tabs small { overflow-wrap:normal; white-space:nowrap; }
/* Qatar bilingual care categories: English and Arabic on separate lines, never
   broken mid-word ("Vaccinesالتطعيمات"). */
.ymv-categories button>span small { display:block; font-size:12px; line-height:1.5; }
.ymv-categories button>span,.ymv-categories button>span small { overflow-wrap:normal; white-space:nowrap; }
/* Qatar bilingual home headings: separate the Arabic from the English
   ("Horsesالخيول" ran together). */
.home-section-heading h3 small[lang="ar"] { display:inline-block; margin-left:.6em; font-weight:500; } /* dir=rtl element inside an LTR heading */
/* Profile buttons inherit the profile ink (".ymv-profile button { color:inherit }"),
   which made filled buttons (e.g. vaccine Save) dark-on-dark at ~1.1:1. Command's
   primary is gold with dark text and keeps it. */
html:not([data-view="command"]) .ymv-profile :is(.btn-primary,.btn-green,.btn-red) { color:#F4ECDD; }
/* Command's profile is dark: native controls (date-picker icon, select arrow)
   must use the dark scheme or they render black-on-black. */
html[data-view="command"] .ymv-profile { color-scheme:dark; }
