/**
 * @file Presentation layer for home surface theme.
 *
 * Mobile-first responsive styling only; preserve touch targets, fluid containment and the seven-breakpoint contract.
 */

/**
 * UFoundMe! shared application surface.
 * Mirrors the home page brand palette.
 * FUB artwork and public pet-card palettes are intentionally excluded.
 */
:root{--ufm-surface-ink:#171327;--ufm-surface-deep:#251a3d;--ufm-surface-purple:#4b3575;--ufm-surface-paper:#faf8fc;--ufm-surface-soft:#eee9f6;--ufm-surface-line:#ded7e9;--ufm-surface-muted:#696273;--ufm-surface-bg:linear-gradient(135deg,#faf8fc,#fff 56%,#eee9f6)}

body:not(:has(>.topbar)):not(.public-card-body){color:var(--ufm-surface-ink);background:var(--ufm-surface-bg)!important}
body:not(:has(>.topbar)):not(.public-card-body) :focus-visible{outline-color:#4b357552!important}
body:not(:has(>.topbar)):not(.public-card-body) :is(.primary,.auth-primary){background:var(--ufm-surface-deep)!important;box-shadow:0 12px 28px #251a3d20!important}
body:not(:has(>.topbar)):not(.public-card-body) :is(.primary,.auth-primary):hover{background:var(--ufm-surface-purple)!important;box-shadow:0 16px 34px #4b35752b!important}
body:not(:has(>.topbar)):not(.public-card-body) :is(.secondary,.auth-secondary):hover{border-color:#4b357580!important;background:var(--ufm-surface-soft)!important}

.dashboard.owner-office,.dashboard.studio-page,.auth-shell,.chat-page,.legal-page main{background:var(--ufm-surface-bg)!important}
.welcome{border-color:#4b357518!important;background:linear-gradient(135deg,#fff,#faf8fc 58%,#eee9f6)!important;box-shadow:0 24px 70px #251a3d12!important}
.welcome::before{background:var(--ufm-surface-purple)!important}
.welcome p,.studio-editor .eyebrow,.auth-page-ufoundme :is(.kicker,.step-label),.legal-page :is(aside>p,article>header p){color:var(--ufm-surface-purple)!important}
.owner-office>.tabs,.studio-steps,.auth-login-tabs{border-color:var(--ufm-surface-line)!important;background:#f3f0f7!important}
.owner-office>.tabs button.active,.studio-steps button.active b,.adoption-path li.current b{color:#fff!important;background:var(--ufm-surface-purple)!important;box-shadow:0 8px 20px #4b357528!important}
.owner-office>section[data-panel],.studio-shell,.studio-editor,.studio-actions,.auth-card,.legal-page article{border-color:#4b35751f!important;background:#fffffff2!important;box-shadow:0 24px 70px #251a3d12!important}
.owner-pet-card:hover,.thread:hover,.summary .lines article:hover{border-color:#4b357570!important}
.status,.service-pill.is-locked{color:#5f4d7d!important;background:var(--ufm-surface-soft)!important}
.empty,.badge-claim{border-color:var(--ufm-surface-line)!important;background:linear-gradient(135deg,#fff,#f7f4fa)!important}
.studio-preview{background:radial-gradient(circle at 50% 45%,#fff 0,#f5f1f8 48%,#e8e1ef 100%)!important}
.studio-editor :is(input,textarea,select):focus,.pet-form :is(input,textarea,select):focus{border-color:var(--ufm-surface-purple)!important;outline-color:#4b35752e!important;box-shadow:0 0 0 4px #4b357514!important}

.auth-page-ufoundme,.auth-shell{background:var(--ufm-surface-bg)!important}
.auth-page-ufoundme::before{background:linear-gradient(120deg,transparent 34%,#4b357508 34% 63%,#251a3d08 63%)!important}
.auth-page-ufoundme .auth-card::before{display:none!important}
.auth-page-ufoundme .ufm-auth-scene{background:linear-gradient(145deg,#c9bddc,#77609e 52%,#251a3d)!important}
.auth-page-ufoundme .auth-login-tab.is-active{color:#fff!important;border-color:var(--ufm-surface-purple)!important;background:var(--ufm-surface-purple)!important;box-shadow:0 8px 20px #4b35752a!important}

.legal-page main{background:radial-gradient(circle at 8% 10%,#8f76c219,transparent 29%),radial-gradient(circle at 92% 88%,#d9ceec42,transparent 32%),linear-gradient(145deg,#fbf9fd,#f4f0f9)!important}
.legal-page aside>nav a[aria-current],.legal-page .contact{background:var(--ufm-surface-deep)!important}
.legal-page aside>nav a:hover,.legal-page .legal-back:hover{border-color:var(--ufm-surface-line)!important;background:var(--ufm-surface-soft)!important}

.ufm-help-button{background:var(--ufm-surface-deep)!important}.ufm-help-button b{color:#fff!important;background:var(--ufm-surface-purple)!important}.ufm-help header small{color:var(--ufm-surface-purple)!important}.ufm-help-progress>span:after{background:linear-gradient(90deg,var(--ufm-surface-purple),#8f7aaf)!important}.ufm-help article{background:linear-gradient(145deg,#fff,#f7f4fa 68%,#eee9f6)!important}

/* Marketing readability: protect body copy without enlarging the phone/FUB artwork. */
body:has(>.topbar){font-size:16px}.view .kicker{font-size:.76rem!important;line-height:1.45!important;letter-spacing:.13em!important}.principle-copy>p:not(.kicker),.hero-copy>p:not(.kicker),.chat-principle-copy>p:not(.kicker){font-size:clamp(1rem,.35vw + .94rem,1.1rem)!important;line-height:1.62!important}.principle-steps strong{font-size:.94rem!important;line-height:1.3!important}.principle-steps small{font-size:.8rem!important;line-height:1.5!important}.demo-qr-card small{font-size:.77rem!important;line-height:1.45!important}.demo-qr-card code{font-size:.66rem!important}.purchase-actions :is(button,a),.actions :is(button,a){font-size:.8rem!important}.mobile-menu-sheet :is(a,button){font-size:.78rem!important}
.preview-intro{color:#6f234a!important}

/* Persistent utilities: language, owner profile and cart stay readable after collapse. */
@media(min-width:1280px) and (max-width:1999px){body:has(>.topbar)>.ufm-global-controls{right:clamp(28px,4vw,70px)!important}}
@media(min-width:768px) and (max-width:1279px){body:has(>.topbar)>.ufm-global-controls{top:7px!important;right:100px!important;left:auto!important;transform:none!important}.mobile-app-nav>button>span{font-size:.68rem!important;line-height:1.2!important}}
@media(max-width:767px){body:has(>.topbar)>.ufm-global-controls{top:5px!important;right:72px!important;left:auto!important;width:auto!important;max-width:calc(100vw - 192px)!important;transform:none!important;border-color:transparent!important;background:transparent!important;box-shadow:none!important}body:has(>.topbar)>.ufm-global-controls>.ufm-universal-languages a:not([aria-current="page"]){display:none!important}body:has(>.topbar)>.ufm-global-controls>.ufm-universal-languages a{min-width:38px!important;min-height:38px!important}body:has(>.topbar) .ufm-owner-summary{min-width:40px!important;padding:3px!important}body:has(>.topbar) .ufm-owner-summary>span,body:has(>.topbar) .ufm-owner-summary>i{display:none!important}.mobile-app-nav>button>span{font-size:.68rem!important;line-height:1.2!important}}

/* MEO Safety is deliberately presented as a complementary GPS layer. */
.nav-meo-safety{color:#287f94!important}.nav-meo-safety span{font-size:.82em}.mobile-sheet-routes>a.mobile-meo-safety{width:100%;min-height:52px;padding:8px 12px;display:grid;grid-template-columns:26px 1fr auto;align-items:center;gap:10px;border:1px solid #d7e8ed;border-radius:13px;color:#174f61;background:#f3fafb;text-decoration:none;font-weight:800}.mobile-meo-safety img{width:24px;height:24px;object-fit:contain}.meo-tracker-promo{max-width:620px;margin-top:12px;padding:10px 12px;display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:12px;border:1px solid #d8e5e9;border-radius:18px;background:linear-gradient(120deg,#fff,#f2f9fb);box-shadow:0 12px 30px #17384a12}.meo-tracker-promo>img{width:64px;height:64px;object-fit:contain}.meo-tracker-promo>span{min-width:0;display:grid}.meo-tracker-promo small{color:#347d8f;font-size:.58rem;font-weight:850;letter-spacing:.09em}.meo-tracker-promo strong{font-size:.92rem;line-height:1.25}.meo-tracker-promo p{margin:2px 0;color:#696273;font-size:.72rem!important;line-height:1.35!important}.meo-tracker-promo b{font-size:.69rem}.meo-tracker-promo>a{min-height:42px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:999px;color:#fff;background:#17384a;text-decoration:none;font-size:.7rem;font-weight:850;white-space:nowrap;transition:transform .18s ease,background .18s ease}.meo-tracker-promo>a:hover,.meo-tracker-promo>a:focus-visible{background:#287f94;transform:translateY(-1px)}.meo-tracker-promo>a i{font-style:normal}
@media(max-width:767px){.meo-tracker-promo{grid-template-columns:54px minmax(0,1fr);padding:10px}.meo-tracker-promo>img{width:54px;height:54px}.meo-tracker-promo>a{grid-column:1/-1;width:100%}.meo-tracker-promo p{font-size:.74rem!important}}
@media(max-width:767px){.hero .hero-product{height:auto!important;min-height:0!important;margin:0!important;padding-bottom:0!important;transform:none!important}.hero .hero-visual{min-height:430px!important}.hero .hero-meo-promo{margin-top:12px!important}}

/* Logout stays inside UFoundMe! and visually matches the surrounding menus. */
.ufm-logout-form,.dash-logout-form,.mobile-logout-form{margin:0}.ufm-logout-form button,.dash-logout-form button,.mobile-logout-form button{width:100%;border:0;display:flex;align-items:center;cursor:pointer;font:inherit}.ufm-logout-form button{min-height:42px;padding:8px 11px;border-radius:10px;gap:10px;color:#a22a38;background:transparent;text-align:left}.ufm-logout-form button:hover,.ufm-logout-form button:focus-visible{background:#f5f0fa}.ufm-logout-form button img{width:18px;height:18px;opacity:.72}.dash-logout-form button{min-height:42px;padding:8px 12px;gap:10px;color:#a22a38;background:transparent;text-align:left}.dash-logout-form button img{width:18px;height:18px}.dash-logout-form button:hover,.dash-logout-form button:focus-visible{background:#f5f0fa}.mobile-logout-form button{min-height:48px;padding:0 13px;border:1px solid var(--ufm-surface-line);border-radius:999px;justify-content:center;color:var(--ufm-surface-deep);background:#fff;font-weight:800}
