/* Final presentation layer: consistent controls without changing the brand or catalogue. */
[hidden]{display:none!important}
.context-back{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex-shrink:0;min-height:44px;padding:8px 12px;border:1px solid #574365;border-radius:10px;color:#eee4fa;background:#21172e;cursor:pointer}
.context-current{display:none}
.context-more .feature-menu{position:absolute;right:0;top:calc(100% + 8px);width:min(610px,85vw);max-height:72dvh;overflow:auto;overscroll-behavior:contain;padding:18px;border:1px solid #705183;border-radius:16px;background:#191222;box-shadow:0 20px 60px #000b;z-index:60}
.context-more:not([open]) .feature-menu{display:none}
.context-more .feature-menu nav{position:static;display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;max-height:none;padding:0;border:0;background:transparent;box-shadow:none;overflow:visible}
.feature-menu-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.feature-menu-head strong{font-size:18px;color:#faf6ff}
.feature-menu-head [data-menu-close]{font-size:25px;line-height:1;min-width:44px;min-height:44px;padding:8px;text-align:center}
.feature-search{display:grid;gap:8px;margin:8px 0 16px;color:#d8c9e4;font-size:13px}
.feature-search input{width:100%;min-height:46px;box-sizing:border-box;font-size:16px}
.context-more nav h2{color:#caa5ed;font-size:12px;letter-spacing:.03em}
.context-more nav button{min-height:44px;line-height:1.4}
.page-heading .section-index{display:none}
.page-heading h1{line-height:1.22;text-wrap:balance}
.page-heading p{max-width:68ch;line-height:1.65}
.first-plate-guide{flex-basis:100%;margin:18px 0 0!important;line-height:1.6}
.first-plate-guide a{display:inline-block}
main .panel form:not(.toolbar){min-width:0}
main .panel label:not(.checkbox){line-height:1.55}
form .checkbox{display:flex;align-items:flex-start;gap:10px;line-height:1.6}
form .checkbox input{flex:0 0 auto;margin-top:5px}

form>button,form>.button{margin-right:6px;margin-top:10px}
button[aria-busy=true]{cursor:wait;opacity:.78}
button[aria-busy=true]::after{content:'';display:inline-block;width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;margin-left:9px;vertical-align:middle;animation:clarity-spin .8s linear infinite}
@keyframes clarity-spin{to{transform:rotate(360deg)}}
[aria-invalid=true]{border-color:#f18cac!important;box-shadow:0 0 0 1px #f18cac}
.form-feedback{display:block!important;padding:12px 14px;margin:14px 0 0;border:1px solid #88425f;border-radius:10px;background:#3a1c2b;color:#ffdbe7;line-height:1.6;font-size:14px;overflow-wrap:anywhere}
[data-next-status]:empty,.funded-notice:empty{display:none}
[data-next-status]:not(:empty){padding:12px 16px;border:1px solid #705183;border-radius:12px;background:#241832;line-height:1.6}
body dialog.classic-detail{width:min(680px,calc(100% - 32px));max-width:680px;max-height:calc(100dvh - 40px);padding:0;overflow:auto;overscroll-behavior:contain}
body dialog.classic-detail .modal-body{padding:0 24px 24px}
body dialog.classic-detail .modal-head,body dialog.classic-detail:has(.classic-managed-plate) .modal-head{position:sticky;top:0;z-index:8;margin:0 -24px 20px;padding:14px 24px;box-shadow:0 8px 14px #0002;border-bottom:1px solid #493552;background:#1b1426;gap:12px}
body dialog.classic-detail .modal-head h2{font-size:21px;line-height:1.3;overflow-wrap:anywhere}
body dialog.classic-detail .close{min-width:44px;min-height:44px;flex:0 0 44px}
body dialog.classic-detail .plate-details-art{max-width:470px;margin-inline:auto}
.classic-owner-actions{display:flex;flex-wrap:wrap;gap:8px}
.classic-owner-actions .button{min-height:44px}
#toast{max-width:min(480px,calc(100vw - 32px));overflow-wrap:anywhere;line-height:1.6;z-index:100}
:is(button,a,input,textarea,select,summary):focus-visible{outline:2px solid #ffc095;outline-offset:3px}
@media(max-width:780px){
 body[data-phase=Devnet] .context-scroll-wrap{display:none}
 body[data-phase=Devnet] .context-current{display:block;min-width:0;flex:1;font-size:14px;font-weight:650;color:#e8dff2;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
 .context-shell{display:flex;align-items:center;gap:9px;min-height:48px}
 .context-back{padding:8px 10px;font-size:14px}
 .context-back span{display:none}
 .context-more>summary{min-height:44px;display:flex;align-items:center;gap:6px;padding:8px 12px!important;box-sizing:border-box;font-size:13px}
 .context-more .feature-menu{position:fixed;top:76px;left:12px;right:12px;width:auto;max-height:calc(100dvh - 164px - env(safe-area-inset-bottom));padding:14px}
 .context-more .feature-menu nav{grid-template-columns:1fr 1fr;gap:6px}
 .context-more nav button{font-size:13px;padding:12px 8px}
 .page-heading{gap:16px;margin-bottom:22px}
 .page-heading h1{font-size:clamp(25px,6.4vw,34px);letter-spacing:-.025em}
 .page-heading p{font-size:14px;margin-top:12px}
 input,textarea,select{font-size:16px!important}
 .panel{overflow-wrap:anywhere}
 .first-plate-guide a{font-size:14px}
 body dialog.classic-detail{width:calc(100% - 20px);max-height:calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));border-radius:18px}
 body dialog.classic-detail .modal-body{padding:0 18px 22px}
 body dialog.classic-detail .modal-head,body dialog.classic-detail:has(.classic-managed-plate) .modal-head{margin:0 -18px 16px;padding:10px 18px}
 body dialog.classic-detail .modal-head h2{font-size:19px}
 #toast{bottom:calc(82px + env(safe-area-inset-bottom))!important;font-size:14px}
}
@media(prefers-reduced-motion:reduce){button[aria-busy=true]::after{animation:none}}

/* Repair structural conflicts left by earlier theme layers. */
body dialog{position:fixed;inset:0;margin:auto;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));border-bottom:1px solid #6e4b85;border-radius:20px}
body dialog .modal-head{top:0;isolation:isolate}
body dialog.highlights-dialog .modal-head{top:-20px;padding:12px 0;box-shadow:0 -20px 0 var(--panel,#171022)}
#action-confirmation .confirmation-heading{position:sticky;top:-28px;z-index:4;padding:12px 0;background:#181227;box-shadow:0 -28px 0 #181227}
.context-more .feature-menu-head{position:sticky;top:-18px;z-index:2;padding:6px 0;background:#191222;box-shadow:0 -18px 0 #191222}
body[data-phase=Devnet] .context-shell{display:flex;align-items:center;isolation:isolate;z-index:10}
body[data-phase=Devnet] .context-tabs{display:flex;flex-wrap:wrap;overflow:visible;white-space:normal;gap:5px}
body[data-phase=Devnet] .context-scroll-wrap{display:block}
body[data-phase=Devnet] .context-scroll-wrap .section-scroll{display:none}
.context-tabs button{min-height:44px;max-width:100%;overflow-wrap:anywhere}
.funded-space small,.experience-steps small{font-size:12px;line-height:1.6}
.release-examples small,.bidder-rankings li small{font-size:12px;line-height:1.5}
.funded-space [data-wallet-balance]{font-size:clamp(22px,4.8vw,34px);font-variant-numeric:tabular-nums;line-height:1.4;letter-spacing:-.025em;overflow-wrap:anywhere}
.funded-space .catalog-heading{align-items:center;gap:12px;flex-wrap:wrap}
.funded-space [data-signout]{flex-shrink:0;white-space:nowrap;min-height:44px}
.funded-payment>div:first-child>strong{min-width:0;overflow-wrap:anywhere}
.funded-payment .status{flex-shrink:0;white-space:normal}
.funded-space .funded-stats small{min-height:2.5em}
.funded-space label{font-size:13px}
.top-actions{min-width:0}
body #account-button{min-width:0;text-overflow:ellipsis}
.collection-welcome h1,.page-heading h1,.club-card h2{overflow-wrap:anywhere}
@media(max-width:1100px){
 body[data-phase=Devnet] .context-scroll-wrap{display:none}
 body[data-phase=Devnet] .context-current{display:block;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:650;color:#e8dff2}
 body[data-phase=Devnet] .context-help{display:none}
 .context-more .feature-menu{position:fixed;top:84px;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));width:auto;max-width:650px;margin-inline:auto;max-height:calc(100dvh - 180px - env(safe-area-inset-bottom));padding:14px}
 .context-more .feature-menu-head{top:-14px;box-shadow:0 -14px 0 #191222}
}
@media(max-width:780px){
 .funded-space .funded-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .funded-space .classic-account-summary>div:first-child{grid-column:1/-1}
 .funded-space .funded-stats>div{padding:15px;gap:6px}
 .funded-space .funded-stats strong{font-size:18px;line-height:1.5}
 body .footer{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 18px;padding:24px 16px calc(100px + env(safe-area-inset-bottom));margin-top:32px;text-align:center}
 body .footer>span{flex-basis:100%;font-size:11px;line-height:1.6}
 body .footer>button{min-height:44px;padding:8px 0;font-size:12px}
 .top-actions{gap:7px}
 body #account-button{max-width:min(150px,38vw)}
}
@media(max-width:480px){#action-confirmation .confirmation-heading{top:-20px;box-shadow:0 -20px 0 #181227}}
@media(max-height:540px){
 body dialog,body dialog.classic-detail,#action-confirmation{max-height:calc(100dvh - 16px);margin:auto}
 .context-more .feature-menu{position:fixed;top:calc(var(--app-header-height) + 8px);max-height:calc(100dvh - var(--app-header-height) - var(--app-bottom-nav) - 24px);z-index:60}
 .context-more .feature-menu nav{grid-template-columns:1fr 1fr}
}

#account-button .account-label{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#account-button .icon{flex:0 0 auto}

/* Shared field layout also applies to editors outside the funded-page wrapper. */
:root{--app-header-height:82px;--app-bottom-nav:0px}
main form label:has(> :is(input:not([type=checkbox]):not([type=radio]),select,textarea)){display:grid;gap:8px;min-width:0;line-height:1.5;font-size:13px;color:#d9cee5}
main form label>:is(input:not([type=checkbox]):not([type=radio]),select,textarea){display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:48px;font:inherit;font-size:14px;line-height:1.5}
main form label>textarea{min-height:120px;resize:vertical}
main form .funded-two>label,main .collector-next-page .funded-two>label{margin:0}
main .form-stack{display:grid;gap:20px;max-width:880px;box-sizing:border-box;align-items:start}
main .form-stack :is(h2,p),main .form-stack label{margin:0}
main .form-stack .funded-two{margin:0;gap:20px;align-items:start}
main .form-stack .checkbox{align-items:flex-start;min-height:24px;font-size:13px;line-height:1.65}
main .form-stack .checkbox input{width:18px;height:18px;margin:2px 0 0;accent-color:#c998f9}
main .form-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:4px}
main .form-actions>.button{margin:0;min-height:48px}
main form.toolbar{align-items:flex-end;flex-wrap:wrap;gap:12px;margin-bottom:24px}
main form.toolbar>label{flex:0 1 320px;margin:0;min-width:0}
main form.toolbar>.button,main form.toolbar>button{margin:0;min-height:48px}
.garage-photo-controls{display:grid;grid-template-columns:minmax(180px,240px) auto auto;align-items:end;justify-content:start;gap:14px}
.garage-photo-controls label{min-width:0;margin:0}
.garage-photo-controls :is(select,button){box-sizing:border-box;min-height:48px;margin:0}
.garage-photo-controls select{width:100%;height:48px}
.garage-photo-controls p{grid-column:1/-1;margin:6px 0 0;line-height:1.6}
@media(max-width:780px){:root{--app-header-height:72px;--app-bottom-nav:72px}}
@media(max-width:700px){
 main .form-stack{padding:22px 18px;gap:18px}
 main .form-actions>.button{flex:1 1 130px}
 main form.toolbar>label{flex:1 1 180px}
 .garage-photo-controls{grid-template-columns:minmax(0,1fr);justify-content:stretch;gap:12px}
 .garage-photo-controls :is(label,button){width:100%}
}

/* Scrolling content must not show through or cover the persistent account controls. */
body .topbar{background:#0e0b17}

.wallet-next{display:flex;align-items:center;gap:24px;justify-content:space-between;border-color:#a677c5;background:linear-gradient(115deg,#30203e,#191126)}
.wallet-next>div{min-width:0;max-width:64ch}.wallet-next h2{font-size:23px;margin:8px 0;line-height:1.35}.wallet-next p{font-size:14px;line-height:1.6;margin:0}.wallet-next>.button{flex:0 0 auto;max-width:100%;min-height:48px}
.wallet-explainer{padding:18px 24px}.wallet-explainer summary{cursor:pointer;min-height:28px;font-size:14px}.wallet-explainer .experience-wallet-bridge{margin:18px 0 0}
.live-recovery{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:14px 18px;background:#33251b;border:1px solid #9a7956;border-radius:12px;color:#f5dfbb;font-size:13px;line-height:1.6}.live-recovery .button{flex-shrink:0;min-height:44px}
@media(max-width:780px){.wallet-next{flex-direction:column;align-items:stretch;gap:18px}.wallet-next h2{font-size:21px}.live-recovery{flex-direction:column;align-items:stretch}.wallet-explainer{padding:18px}}

/* Directory controls and empty-state actions need real layout gaps, not inline whitespace. */
.directory-tools{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:18px 24px;margin:0 0 24px}
.directory-tools>.button{min-height:48px;margin:0}
main .directory-tools form.toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;flex:1 1 320px;max-width:520px;gap:12px;margin:0}
.directory-tools input{width:100%;min-width:0;min-height:48px;box-sizing:border-box}
.collector-card{display:flex;flex-direction:column;min-width:0}
.collector-card>.eyebrow{margin:0}
.collector-card h2{margin:16px 0 8px;font-size:24px;line-height:1.35;overflow-wrap:anywhere}
.collector-card p{margin:0 0 8px;line-height:1.65;overflow-wrap:anywhere}
.collector-card .collector-card-count{margin:4px 0 0;font-size:13px;color:var(--muted)}
.collector-card .collector-card-actions{gap:12px;margin:auto 0 0;padding-top:20px;align-items:stretch}
.collector-card-actions>.button{min-height:48px;margin:0}
.empty-state .empty-state-actions{justify-content:center;gap:12px;max-width:400px;margin:24px auto 0}
.empty-state-actions>.button{min-height:48px;margin:0}
@media(max-width:600px){
 .directory-tools{align-items:stretch;gap:18px}
 .directory-tools>.button{align-self:flex-start}
 main .directory-tools form.toolbar{flex-basis:100%;max-width:none}
 .collector-card-actions>.button,.empty-state-actions>.button{flex:1 1 130px}
}
