/* Shared quiet surfaces: account, market, builder, collection and navigation. */
:root{--quiet-panel:#1d2e4bd9;--quiet-edge:#d9e4ff20;--quiet-muted:#bbc9dd;--quiet-accent:#f2d89d;--quiet-active:#f2d89d18}
body:has(#screen-account:not(.hidden)){background:radial-gradient(ellipse at 80% 0%,#38486845,transparent 55%),#111e35}
body:has(:is(#screen-account,#screen-shop,#screen-collection):not(.hidden))>main{padding-top:1.5rem}
:is(.account-screen,.shop-screen,.builder-screen,.collection-screen)>.page-heading{margin-bottom:1rem;gap:.75rem}
:is(.account-screen,.shop-screen,.builder-screen,.collection-screen)>.page-heading h1{font:650 clamp(1.4rem,2.2vw,1.85rem)/1.35 var(--sans);letter-spacing:-.02em}
:is(.account-screen,.shop-screen,.builder-screen,.collection-screen)>.page-heading .eyebrow{font-size:.68rem;font-weight:550;letter-spacing:.03em}
:is(.account-screen,.shop-screen,.builder-screen,.collection-screen) .button{min-height:44px;border-radius:12px;font-family:var(--sans);font-weight:600;box-shadow:none}
:is(.account-screen,.shop-screen,.builder-screen,.collection-screen) .button.secondary{border-color:var(--quiet-edge);background:#ffffff07;color:#e7edf7}
:is(.account-screen,.shop-screen,.builder-screen,.collection-screen) .button.secondary:hover:not(:disabled){border-color:#d9e4ff45;background:#ffffff0e}
:is(.account-screen,.shop-screen,.builder-screen,.collection-screen)>.page-heading>.button{min-height:44px;padding:.4rem .8rem;font-size:.82rem}

.account-screen .account-layout-simple{gap:1rem;align-items:start}
.account-screen .account-layout-simple .account-card{min-width:0;padding:1.1rem!important;border:1px solid var(--quiet-edge);border-radius:18px;background:var(--quiet-panel);box-shadow:none}
.account-screen .account-status-heading,.account-screen .account-card-heading{gap:.7rem}
.account-screen .account-status-heading>div,.account-screen .account-card-heading>div{min-width:0}
.account-screen .account-card-icon{flex-basis:36px;width:36px;height:36px;border:0;border-radius:11px;background:#f2d89d0e;color:var(--quiet-accent);box-shadow:none}
.account-screen .account-card-icon svg{width:22px;height:22px;stroke-width:1.8}
.account-screen .account-card .eyebrow{color:#b0d9d0;font:550 .68rem/1.5 var(--sans);letter-spacing:.025em}
.account-screen .account-status-card h2,.account-screen .account-protect-card h2,.account-screen .account-return-card h2{margin:.15rem 0 0;font:600 1.1rem/1.5 var(--sans);letter-spacing:0;overflow-wrap:anywhere}
.account-screen .account-status-meta{border-top-color:var(--quiet-edge);margin-top:.8rem;padding-top:.7rem;gap:.6rem}
.account-screen #account-email-status,.account-screen .guest-id-details,.account-screen .guest-id-details summary{color:var(--quiet-muted);font-size:.78rem}
.account-screen .account-state-chip{min-height:28px;padding:.2rem .5rem;border:0;background:#a6edda0e;color:#b2e3d1;font-size:.7rem;font-weight:500;white-space:normal}
.account-screen .account-token-card{align-items:center;justify-content:space-between;gap:.75rem}
.account-screen .account-token-card h2{margin:.25rem 0 0;color:#f1e5ff;font:600 1.45rem/1.4 var(--sans)}
.account-screen .account-token-card .token-balance-icon{width:24px;height:24px;filter:none}
.account-screen .account-token-card .button.primary{border-color:#f2d89d33;background:var(--quiet-active);color:var(--quiet-accent);box-shadow:none;font:600 .82rem var(--sans)}
.account-screen .account-form input{min-height:44px;padding:.6rem .75rem;border:1px solid #d9e4ff2e;border-radius:11px;background:#101e35aa;font-size:.85rem}
.account-screen .account-form input::placeholder{color:#b7c4d8}
.account-screen .account-form label{font-size:.8rem;font-weight:550}
.account-screen .account-card .helper-note,.account-screen .account-google-return small,.account-screen .account-protect-card>#account-protect-copy{color:var(--quiet-muted);font-size:.8rem;line-height:1.65}
.account-screen .account-sign-out{margin-top:.65rem}
.account-screen .account-google-return{border-top-color:var(--quiet-edge);background:transparent;padding:.65rem 0 0}
.account-screen :is(.account-connect-details,.account-return-card .account-alternative,.account-play-rewards)>summary{min-height:44px;border:1px solid var(--quiet-edge);border-radius:11px;background:#ffffff06;color:#e6edf6;box-shadow:none;font:550 .8rem var(--sans)}

.shop-screen .shop-section-nav{display:flex;gap:.35rem;width:fit-content;max-width:100%;padding:.25rem;margin-bottom:.9rem;border:1px solid var(--quiet-edge);border-radius:13px;background:#172640b3}
.shop-screen .shop-section-nav button{flex:none;min-height:44px;padding:.45rem 1.1rem;border:1px solid transparent;border-radius:9px;background:transparent;color:#c7d2e4;box-shadow:none;font:550 .88rem var(--sans);backdrop-filter:none}
.shop-screen .shop-section-nav button.active{border-color:#f2d89d28;background:var(--quiet-active);color:var(--quiet-accent);box-shadow:none}
.shop-screen .shop-section-nav button:first-child>span{color:inherit}
.shop-screen .shop-notice{padding:.45rem .15rem;margin-bottom:.8rem;border:0;border-radius:0;background:transparent;color:var(--quiet-muted)}
.shop-screen .shop-notice .notice-icon{width:22px;color:var(--quiet-accent);font-size:1rem}
.shop-screen .shop-notice p{color:var(--quiet-muted);font-size:.78rem}
.shop-screen .shop-category-filters button,.shop-screen .shop-tier-filters button{min-height:40px;border:1px solid var(--quiet-edge);border-radius:10px;background:#182944a8;box-shadow:none;color:#ced9e9;font:500 .77rem var(--sans)}
.shop-screen .shop-category-filters button.active,.shop-screen .shop-tier-filters button.active{border-color:#f2d89d55;background:var(--quiet-active);color:var(--quiet-accent)}
.shop-screen #shop-grid .shop-item,.shop-screen #shop-grid .shop-item.tier-3,.shop-screen #shop-grid .shop-item.tier-4{border:1px solid var(--quiet-edge);border-radius:15px;background:#213450c9;box-shadow:none}
.shop-screen #shop-grid .shop-item:after{display:none}
.shop-screen #shop-grid .shop-item .item-art{border:0;background:radial-gradient(ellipse at 50% 65%,#9dc5d51c,transparent 72%)}
.shop-screen #shop-grid .shop-item h3{font-family:var(--sans);font-weight:550;color:#eff1f8}
.shop-screen #shop-grid .shop-item .tier-tag{border:1px solid color-mix(in srgb,var(--shop-tier-border,#d9e4ff) 35%,transparent);background:#101e3566;box-shadow:none}
.shop-screen #shop-grid .shop-item:hover{border-color:#f2d89d60;background:#2a3d59d9;box-shadow:none}

.builder-screen .preview-panel,.builder-screen .private-room-panel,.collection-screen .collection-info,.collection-screen .collection-preview{border:1px solid var(--quiet-edge);border-radius:18px;background:var(--quiet-panel);box-shadow:none}
.builder-screen .preview-panel:before,.builder-screen .private-room-panel:before{display:none}
.builder-screen .preview-stage{border:1px solid #d9e4ff12;background:radial-gradient(ellipse at 50% 75%,#a6edda14,transparent 65%),#18294299;box-shadow:none}
.builder-screen .private-room-panel .inventory-grid{border-color:transparent;background:#111f354d;box-shadow:none}
.builder-screen .inventory-filter,.builder-mobile-views button{font-family:var(--sans);font-weight:550;box-shadow:none}
.builder-screen .inventory-filter{min-height:40px;border-color:var(--quiet-edge);background:#ffffff05;color:#ced9e9}
.builder-screen .inventory-filter.active,.builder-mobile-views button.active{border-color:#f2d89d55;background:var(--quiet-active);color:var(--quiet-accent);box-shadow:none}
.builder-screen .private-room-panel .inventory-item{border-color:var(--quiet-edge);background:#263954;box-shadow:none}
.builder-screen .private-room-panel .inventory-item-art{border:0;background:radial-gradient(ellipse at 50% 65%,#9dc5d51c,transparent 72%);box-shadow:none}
.builder-screen .private-room-panel .inventory-item h3{font-family:var(--sans);font-weight:550}
.builder-screen .private-room-panel .inventory-item.is-equipped{border-color:#a6edda80;background:#25444e;box-shadow:inset 0 0 0 1px #a6edda20}
.builder-screen .preview-caption,.builder-screen .inventory-footer{color:var(--quiet-muted)}
.collection-screen .collection-info{padding:1rem}
.collection-screen .owned-chip{border-color:var(--quiet-edge);background:#ffffff06}
.collection-screen .collection-stat{border-color:var(--quiet-edge)}

.bottom-nav,body.home-fullscreen .bottom-nav{width:min(480px,calc(100% - 1.25rem));gap:.2rem;padding:.3rem;border:1px solid #d9e4ff24;border-radius:18px;background:#1c2c48d9;box-shadow:0 6px 22px #08152a33;backdrop-filter:blur(16px)}
.bottom-nav button{flex:1;min-width:0;min-height:52px;border-radius:12px;color:#bfccdf}
.bottom-nav button svg{width:21px;height:21px;stroke-width:1.8}
.bottom-nav button span{font-family:var(--sans);font-size:.65rem;font-weight:500}
.bottom-nav button.active,body.home-fullscreen .bottom-nav button.active{border:0;background:var(--quiet-active);color:var(--quiet-accent);box-shadow:none}
.bottom-nav button.active svg,body.home-fullscreen .bottom-nav button.active svg{color:var(--quiet-accent)}
.bottom-nav button:hover{background:#ffffff08;color:#f2dfb5}
.bottom-nav button:focus-visible{outline:2px solid var(--quiet-accent);outline-offset:1px}
.game-modal:not(#province-dialog){border:1px solid #d9e4ff28;background:#21324eeb;box-shadow:0 20px 70px #050e2066}
.game-modal:not(#province-dialog) .modal-emblem{border:0;background:#f2d89d0e;color:var(--quiet-accent);box-shadow:none}
@media(min-width:601px){.shop-screen .shop-category-row{flex-wrap:wrap;row-gap:.6rem}}
@media(max-width:700px){
  .account-screen .account-status-heading{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center}
  .account-screen .account-state-chip{grid-column:2;justify-self:start;margin-left:0}
  .account-screen .guest-id-details{margin-left:0}
}
@media(max-width:600px){
  body:has(:is(#screen-account,#screen-shop,#screen-collection):not(.hidden))>main{padding-top:.9rem}
  :is(.account-screen,.shop-screen,.builder-screen,.collection-screen)>.page-heading h1{font-size:1.35rem}
  .account-screen .account-layout-simple{gap:.7rem}
  .account-screen .account-layout-simple .account-card{padding:.9rem!important;border-radius:15px}
  .account-screen .account-status-card h2,.account-screen .account-protect-card h2{font-size:1rem}
  .account-screen .account-token-card h2{font-size:1.3rem}
  .account-screen .account-token-card{align-items:center}
  .account-screen .redeem-token-code-row{gap:.4rem}
  .account-screen .redeem-token-code-row .button{padding:.5rem .65rem}
  .shop-screen .shop-section-nav{display:grid;width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}
  .shop-screen .shop-section-nav button{min-width:0;padding:.4rem .35rem;font-size:.79rem}
  .shop-screen .shop-mobile-tier-toggle{min-height:40px;border-color:var(--quiet-edge);border-radius:10px;background:#182944a8;color:#ced9e9;font-family:var(--sans);font-weight:500}
  .shop-screen #shop-grid .shop-item h3{font-size:.78rem;line-height:1.4}
  .builder-mobile-views{border-color:var(--quiet-edge);background:#17264099}
  .collection-layout{grid-template-columns:1fr}
  .bottom-nav button{min-height:50px}
}
/* Utility pages share the same quiet backdrop; illustration pages keep their scenes. */
body:has(#screen-builder:not(.hidden)),
body:has(#screen-account:not(.hidden)),
body:has(#screen-collection:not(.hidden)){background:radial-gradient(ellipse at 80% 0%,#54678216,transparent 48%),#131f33}
.builder-screen .equipment-stage .equipment-slot{border:1px solid #d9e4ff30;background:#1b2b45db;box-shadow:none}
.builder-screen .equipment-stage .equipment-slot-icon{border:0;background:transparent;box-shadow:none}
.item-dialog,.shop-item-dialog{border-color:#d9e4ff30;background:#21324ef5;box-shadow:0 20px 70px #050e2066;color:#eff1f8}
.item-dialog .item-dialog-close{border-color:#d9e4ff28;background:#ffffff06;color:#e6edf6;border-radius:11px}
.item-dialog .item-dialog-actions{border-top-color:#d9e4ff24}
.item-dialog .item-dialog-action{min-height:44px;box-shadow:none;font-family:var(--sans)}
/* One background family per Tier, shared by market and owned items. */
.shop-screen #shop-grid .shop-item.tier-1,.builder-screen .private-room-panel .inventory-item[data-tier="1"]{--tier-card-top:#39424e;--tier-card-base:#272f3b;--tier-card-glow:#c3cbd31a}
.shop-screen #shop-grid .shop-item.tier-2,.builder-screen .private-room-panel .inventory-item[data-tier="2"]{--tier-card-top:#254b69;--tier-card-base:#1b344d;--tier-card-glow:#83cfff24}
.shop-screen #shop-grid .shop-item.tier-3,.builder-screen .private-room-panel .inventory-item[data-tier="3"]{--tier-card-top:#4b3965;--tier-card-base:#322843;--tier-card-glow:#c7a0ff24}
.shop-screen #shop-grid .shop-item.tier-4,.builder-screen .private-room-panel .inventory-item[data-tier="4"]{--tier-card-top:#66522f;--tier-card-base:#403622;--tier-card-glow:#ffdc8524}
.shop-screen #shop-grid .shop-item[class*="tier-"],
.shop-screen #shop-grid .shop-item[class*="tier-"]:hover,
.builder-screen .private-room-panel .inventory-item[data-tier],
.builder-screen .private-room-panel .inventory-item[data-tier].is-equipped{background:linear-gradient(155deg,var(--tier-card-top),var(--tier-card-base))}
.shop-screen #shop-grid .shop-item[class*="tier-"] .item-art,
.builder-screen .private-room-panel .inventory-item[data-tier] .inventory-item-art{background:radial-gradient(ellipse at 50% 65%,var(--tier-card-glow),transparent 72%)}
@media(max-width:700px){
  .account-screen .account-status-meta{flex-direction:column;align-items:flex-start}
  .account-screen #account-email-status{text-align:left}
}
