/* The browser merchant's illustrated ledger. Buying, eligibility and prices are supplied by the game. */
:is(#shop-overlay, #shop-detail-overlay, #pass-overlay) {
  --shop-ink: #352b20;
  --shop-paper: #f4e8ce;
  --shop-edge: #a58c61;
  --shop-binding: #253d37;
  --shop-engraving: url("assets/campaign/black-road-outskirts.webp");
}
#shop-overlay:has(.shop-tabs [data-id="supplies"][aria-selected="true"]) { --shop-binding: #334639; --shop-engraving: url("assets/onboarding-road.webp"); }
#shop-overlay:has(.shop-tabs [data-id="cosmetics"][aria-selected="true"]) { --shop-binding: #513b3d; --shop-engraving: url("assets/campaign/crimson-rift-outskirts.webp"); }
#shop-overlay:has(.shop-tabs [data-id="rewards"][aria-selected="true"]) { --shop-binding: #384732; --shop-engraving: url("assets/encounters/0.webp"); }
#shop-overlay:has(.shop-tabs [data-id="ashes"][aria-selected="true"]), #pass-overlay { --shop-binding: #44394d; --shop-engraving: url("assets/campaign/mirror-bastion-middle.webp"); }

:is(#shop-overlay .shop-window, #shop-detail-overlay .shop-detail-dialog, #pass-overlay .pass-window) {
  color: var(--shop-ink);
  background: var(--shop-paper);
  border: 1px solid #9c8358;
  border-radius: 9px;
  box-shadow: 0 22px 92px #080e0ab5, 0 0 0 3px #3d322a, 0 0 0 4px #ae916744;
}
:is(#shop-overlay .shop-header, #shop-detail-overlay .shop-detail-header, #pass-overlay .pass-header) {
  position: relative;
  padding: 12px clamp(14px, 2.3vw, 30px);
  color: #fff0cf;
  border-bottom: 3px double #c6a471;
  background-color: var(--shop-binding);
  background-image: linear-gradient(90deg,var(--shop-binding) 7%,color-mix(in srgb,var(--shop-binding) 75%,transparent) 40%,var(--shop-binding) 90%),
    var(--shop-engraving);
  background-size: cover, 74% auto;
  background-position: center, 50% 37%;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px #ffebbc55;
}
:is(#shop-overlay .shop-header h2, #shop-detail-overlay .shop-detail-header h3, #pass-overlay .pass-header h2) {
  color: #fff2d5;
  font: 500 clamp(24px, 2.7vw, 35px)/1.1 var(--serif);
  letter-spacing: -.02em;
  text-shadow: 0 1px 3px #17241c;
}
#shop-overlay .shop-wallet { padding: 3px 12px 3px 5px; border: 1px solid #c9ab7473; border-radius: 5px; background: #182621cc; color: #fff0d0; }
#shop-overlay .shop-wallet .shop-currency-icon { width: 30px; height: 30px; }
:is(#shop-overlay .shop-close, #shop-detail-overlay .shop-detail-close, #pass-overlay .pass-close) { width:48px; height:48px; background:transparent; color:#ffe6b3; border:1px solid #c7b18a70; border-radius:50%; }
#shop-overlay .shop-tabs { gap: 2px; padding: 5px clamp(8px,2vw,24px) 0; background: #ddcbab; border-bottom: 1px solid #a28c65; }
#shop-overlay .shop-tabs button { min-height:44px; margin:0 0 -1px; padding:8px clamp(8px,1.4vw,19px); color:#423829; border:1px solid transparent; border-bottom:3px solid transparent; border-radius:5px 5px 0 0; }
#shop-overlay .shop-tabs button[aria-selected="true"] { color:var(--shop-binding); background:#f5ead2; border-color:#baaa87; border-bottom:3px solid var(--shop-binding); box-shadow:0 -2px 5px #72522912; font-weight:700; }
#shop-overlay .shop-content, #pass-overlay .pass-intro, #shop-detail-overlay .shop-detail-body {
  background: radial-gradient(ellipse at 49% 16%,#fff6e5 0,#f1e5c9 59%,#dfceab 100%);
}
#shop-overlay .shop-content { padding:clamp(14px,2.2vw,28px); box-shadow:inset 0 1px 8px #835d2c11; }
:is(#shop-overlay, #shop-detail-overlay, #pass-overlay) :is(button, summary):focus-visible { outline:3px solid #197067; outline-offset:2px; box-shadow:0 0 0 2px #fff1cd; }
:is(#shop-overlay, #shop-detail-overlay, #pass-overlay) .locked-control[data-locked="true"]>[data-lock-content] { filter:saturate(.85); opacity:1; }
:is(#shop-overlay, #shop-detail-overlay, #pass-overlay) .locked-control[data-locked="true"]::after { border:1px dashed #807352; }
:is(#shop-overlay, #shop-detail-overlay, #pass-overlay) .locked-control[data-locked="true"]>.locked-cover { place-items:center end; padding:5px 7px; background:transparent; }
:is(#shop-overlay, #shop-detail-overlay, #pass-overlay) .locked-cover>.locked-icon { width:25px; height:25px; padding:4px; color:#473e2d; background:#f9eed7; border:1px solid #847658; border-radius:50%; box-shadow:0 1px 4px #36271633; }
:is(#shop-overlay, #shop-detail-overlay) [data-lock-content]>:is(.shop-buy,.meta-contribute-cta) { padding-inline:38px; }
:is(#shop-overlay, #shop-detail-overlay) :is(.shop-buy, .meta-contribute-cta, .shop-text-action) { min-height:48px; }
:is(#shop-overlay, #shop-detail-overlay) .shop-buy:not(:disabled) { background:#59422b; color:#fff2d5; border-color:#574029; }
:is(#shop-overlay, #shop-detail-overlay) .shop-buy:hover:not(:disabled) { background:#735638; }

/* Catalogue plates use a real item illustration. Text always sits on a separate surface. */
#shop-overlay { --merchant-plum:#423241; --merchant-forest:#30483e; --merchant-gold:#ebcf91; }
#shop-overlay .memory-details {background:#35483e;color:#fff1d1;border-color:#ac8b50;}
#shop-overlay .memory-details :is(h4,.memory-effect,.memory-gains dd,.memory-preview) {color:#fff0cc;}
#shop-overlay .memory-details :is(.memory-capacity,.memory-saving,.memory-gains dt,.memory-progress,.memory-part-heading span) {color:#e7d9bd;}
#shop-overlay .memory-part-heading>svg {color:#f4dc9b;border-color:#b8a473;}
#shop-overlay .memory-gains {border-color:#baac874f;}
#shop-overlay .memory-gains>div+div {border-color:#b8a47880;}
#shop-overlay .memory-gains>div+div dd {color:#e7de9a;}
#shop-overlay .memory-pay:not(:disabled) {background:var(--merchant-gold);color:#332b24;border-color:#ebd3a2;}
#shop-overlay .shop-supply-stack {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch;}
#shop-overlay .shop-item:is([data-shop-item="energy"],[data-shop-item="supply"],[data-shop-item="faction-chest"],[data-shop-item="collection-card"]) {
  --plate:url("assets/shop/atlas/supplies.webp");--counter:var(--merchant-plum);position:relative;display:flex;flex-direction:column;align-items:stretch;gap:0;min-width:0;min-height:0;margin:0;padding:0;overflow:hidden;
  background:var(--counter);border:1px solid #96794d;border-radius:6px;box-shadow:0 3px 9px #46352225;color:#fff1d0;
}
#shop-overlay .shop-item[data-shop-item="energy"] {--plate:url("assets/shop/atlas/energy.webp");--counter:var(--merchant-forest);}
#shop-overlay .shop-item[data-shop-item="faction-chest"] {--plate:url("assets/shop/atlas/chest.webp");--counter:#4b3a31;grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);}
#shop-overlay .shop-item:is([data-shop-item="energy"],[data-shop-item="supply"],[data-shop-item="faction-chest"])::before {
  content:"";display:block;position:static;flex:none;width:100%;height:clamp(144px,19vw,201px);margin:0;border:0;border-bottom:2px solid #ab8b54;background:#dbc191 var(--plate) center 48% / cover no-repeat;
}
#shop-overlay .shop-item[data-shop-item="faction-chest"]::before {height:100%;min-height:196px;border:0;border-right:2px solid #997b52;}
#shop-overlay .shop-item:is([data-shop-item="energy"],[data-shop-item="supply"],[data-shop-item="faction-chest"])>.shop-art {display:none;}
#shop-overlay .shop-item:is([data-shop-item="energy"],[data-shop-item="supply"],[data-shop-item="faction-chest"],[data-shop-item="collection-card"])>div {display:flex;align-content:start;flex-direction:column;align-items:stretch;gap:6px;padding:12px clamp(13px,2vw,23px) 16px;min-width:0;color:inherit;background:transparent;}
#shop-overlay .shop-supply-stack .shop-item :is(h3,.shop-supply-heading h3),#shop-overlay .shop-item[data-shop-item="collection-card"] h3 {min-height:0;margin:0;padding:0;color:#ffedbd;font:600 clamp(19px,1.8vw,26px)/1.13 var(--serif);}
#shop-overlay .shop-supply-heading {min-height:0;padding:0;grid-template-columns:minmax(0,1fr) 48px;}
#shop-overlay .shop-supply-stack .shop-item :is(.shop-detail,.shop-note,.shop-price-condition,.shop-price-saving,.crystal-energy-state,.crystal-energy-after) {margin:0;color:#eddec0;}
#shop-overlay .shop-supply-stack .shop-item .crystal-energy-current {font-weight:700;color:#fff1cd;}
#shop-overlay .shop-supply-stack .shop-price-current,#shop-overlay .shop-supply-stack .shop-price-values {color:#ffebac;}
#shop-overlay .shop-supply-stack .shop-price-base {color:#e1cfc4;}
#shop-overlay .shop-supply-stack .shop-discount-badge {color:#392b20;background:#eac884;}
#shop-overlay .shop-supply-stack .shop-chest-details {color:#f5e9cd;}
#shop-overlay .shop-chest-details>summary {min-height:42px;padding:9px 0;cursor:pointer;}
#shop-overlay .shop-supply-stack .shop-buy:not(:disabled),#shop-overlay .shop-contract-actions>.shop-buy:not(:disabled) {background:var(--merchant-gold);color:#392d23;border:1px solid #e6c48e;box-shadow:none;}
#shop-overlay .shop-supply-stack .shop-buy:disabled {color:#4b423a;background:#dbd0b7;opacity:1;}
#shop-overlay .shop-supply-stack .shop-text-action {color:#f2dfb6;border-color:#b0a284;background:transparent;}
#shop-overlay .shop-supply-stack .shop-text-action:hover {background:#514737;}
#shop-overlay .shop-item[data-shop-item="collection-card"] {display:grid;grid-template-columns:minmax(100px,.66fr) minmax(170px,1fr);}
#shop-overlay [data-shop-item="collection-card"]>.shop-art {display:block;width:100%;height:100%;min-height:175px;max-height:320px;object-fit:contain;align-self:center;background:#deca9e url("assets/themes/thanksgiving-table.webp") center/100% 100%;}
#shop-overlay [data-shop-item="collection-card"] p {color:#eddfc7;}

:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-grid {gap:12px;align-items:stretch;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-choice {display:flex;flex-direction:column;gap:0;border:1px solid #a88c62;border-radius:6px;overflow:hidden;background:#453644;box-shadow:0 3px 9px #513c241c;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-choice>.locked-control {flex:1;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile[data-id] {--tile-paper:#e3cda1;position:relative;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;justify-items:stretch;align-content:start;align-items:stretch;gap:0;min-height:0;min-width:0;width:100%;margin:0;padding:0 0 7px;overflow:hidden;color:#fff2d2;background:#453644;border:1px solid #9d8257;border-radius:5px;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-choice .cosmetic-tile {border:0;border-radius:0;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile:is(:disabled,[data-owned="false"]) {opacity:1;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile[aria-pressed="true"] {outline:2px solid #bb994c;outline-offset:-3px;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile .cosmetic-tile-symbol {display:none;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile>.cosmetic-tile-art,:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile>.cosmetic-tile-corner {grid-area:1/1;position:relative;inset:auto;display:block;width:100%;height:clamp(120px,14vw,158px);padding:4px;overflow:hidden;object-fit:contain;object-position:center;border-radius:0;background:var(--tile-paper);filter:none;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile>.cosmetic-tile-art {background:radial-gradient(ellipse at 50% 20%,#f5e8c9,#ceb888);}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile .cosmetic-tile-corner>.cosmetic-tile-art {position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center;filter:none;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile[data-id="christmas"] .cosmetic-tile-corner {background:url("assets/themes/christmas-table.webp") center/cover;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile[data-id="easter"] .cosmetic-tile-corner {background:url("assets/themes/easter-table.webp") center/cover;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile[data-id="thanksgiving"] .cosmetic-tile-corner {background:url("assets/themes/thanksgiving-table.webp") center/cover;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile[data-id="halloween"] .cosmetic-tile-corner {background:url("assets/themes/halloween-table.webp") center/cover;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile :is(.cosmetic-tile-name,.cosmetic-tile-type,.cosmetic-tile-state) {position:static;grid-column:1;grid-row:auto;margin:0;padding:3px 10px 0;color:#e6d8bd;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile .cosmetic-tile-name {padding-top:9px;color:#fff1cb;font:600 var(--type-body)/1.2 var(--serif);}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-choice .locked-control[data-locked="true"]::after {inset:2px;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-choice .locked-control[data-locked="true"]>.locked-cover {place-items:start end;padding:5px;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-source {margin:0;padding:6px 11px;border:0;border-top:1px solid #a28d6a;border-radius:0;color:#43362a;background:#e7d6b3;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-source:hover {background:#f4e7c6;}
#shop-detail-overlay .shop-detail-body>.shop-detail-preview,#shop-detail-overlay .shop-detail-body>.locked-control,#shop-detail-overlay .shop-detail-theme-preview {border:1px solid #b29b6b;border-radius:5px;background:radial-gradient(ellipse,#efdfb8,#d3bd91);}
#shop-detail-overlay .shop-detail-theme-preview {width:100%;min-height:120px;}
#shop-detail-overlay .shop-detail-footer {background:#483848;color:#f8e9c7;border-top:2px solid #a88a55;}
#shop-detail-overlay .shop-detail-footer :is(.shop-price-current,.shop-price-saving,.shop-price-condition) {color:#f7e4b8;}
#shop-detail-overlay .shop-detail-footer .shop-price-base {color:#e2cfc1;}
#shop-detail-overlay .shop-detail-footer .shop-buy:not(:disabled) {color:#382d24;background:#ecd199;}
#shop-detail-overlay .shop-detail-body .locked-control[data-locked="true"]>.locked-cover {place-items:end end;padding:9px;}

/* The three sample rewards keep the actual granted quantity over a solid checkout strip. */
#shop-overlay .rewarded-availability {margin:8px 0 14px;border:1px solid #68765b;border-radius:5px;background:#34483d;color:#fff1cf;}
#shop-overlay .rewarded-cards {gap:12px;align-items:stretch;}
#shop-overlay .rewarded-card {--plate:url("assets/shop/atlas/ashes.webp");--counter:#503d33;display:flex;flex-direction:column;gap:0;align-items:stretch;height:100%;padding:0;overflow:hidden;border:1px solid #9b8057;border-radius:6px;background:#f3e5c7;color:#382c21;box-shadow:0 3px 9px #503b2021;}
#shop-overlay .rewarded-card[data-rewarded-type="stamina"] {--counter:#354e3f;--plate:url("assets/shop/atlas/energy.webp");}
#shop-overlay .rewarded-card[data-rewarded-type="supply"] {--counter:#443746;--plate:url("assets/shop/atlas/supplies.webp");}
#shop-overlay .rewarded-card::before {display:none;}
#shop-overlay .rewarded-card-art {flex:none;display:block;align-self:stretch;height:clamp(110px,15vw,160px);min-height:0;margin:0;padding:0;border:0;border-bottom:1px solid #a98b5d;border-radius:0;background:#d0bd8e var(--plate) center 49%/cover no-repeat;}
#shop-overlay .rewarded-card-art img {display:none;}
#shop-overlay .rewarded-card-title {margin:0;padding:10px 13px 0;color:#473725;font:600 clamp(17px,1.45vw,22px)/1.15 var(--serif);}
#shop-overlay .rewarded-card-value {margin:0;padding:5px 13px;color:#463a2c;font-weight:700;}
#shop-overlay .rewarded-card-description,#shop-overlay .rewarded-card-reason {margin:0;padding:0 13px 7px;color:#594c38;}
#shop-overlay .rewarded-card-cta {min-height:46px;align-items:center;margin:4px 0 0;padding:8px 13px;border:0;background:var(--counter);color:#faeac5;}
#shop-overlay .rewarded-card:disabled .rewarded-card-cta {background:#d7ccb2;color:#524c40;}
#shop-overlay .rewarded-cards .locked-cover {place-items:start end;padding:6px;}

/* Current crystal offers and existing daily contracts use different plates and controls. */
#shop-overlay .crystal-bank {gap:10px;}
#shop-overlay .crystal-bank-wallet {position:relative;display:grid;align-content:center;justify-content:start;min-height:96px;padding:12px 50% 12px 18px;isolation:isolate;overflow:hidden;border:1px solid #a58c61;border-radius:6px;color:#f5e7c6;background:#483649;}
#shop-overlay .crystal-bank-wallet::after {content:"";position:absolute;z-index:-1;inset:0 0 0 53%;border-left:3px double #a68c62;background:#d4be9e url("assets/shop/atlas/crystals.webp") center 57%/cover no-repeat;}
#shop-overlay .crystal-bank-wallet h2 {color:#ffe6b2;}
#shop-overlay .crystal-bank-wallet p {color:#ede0c8;}
#shop-overlay .crystal-bank-products {grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
#shop-overlay .crystal-bank-product {--plate:url("assets/shop/atlas/bank-handful.webp");display:flex;flex-direction:column;gap:0;isolation:isolate;padding:0;overflow:hidden;border:1px solid #9d8460;border-radius:6px;color:#f8e9c5;background:#443445;box-shadow:0 3px 8px #47372222;}
#shop-overlay .crystal-bank-product[data-crystal-sku="crystal-pouch"] {--plate:url("assets/shop/atlas/bank-pouch.webp");}
#shop-overlay .crystal-bank-product[data-crystal-sku="crystal-casket"] {--plate:url("assets/shop/atlas/bank-casket.webp");}
#shop-overlay .crystal-bank-product[data-crystal-sku="crystal-chest"] {--plate:url("assets/shop/atlas/bank-chest.webp");}
#shop-overlay .crystal-bank-product::before {content:"";flex:none;display:block;aspect-ratio:1.32;max-height:175px;width:100%;order:-1;border-bottom:2px solid #aa8c5e;background:#d3bd95 var(--plate) center 49%/cover no-repeat;}
#shop-overlay .crystal-bank-product>.crystal-bank-art {display:none;}
#shop-overlay .crystal-bank-product :is(h3,.amount,.bonus,.shop-price) {margin:0;padding:0 11px;}
#shop-overlay .crystal-bank-product h3 {order:0;padding-top:10px;color:#ffe9b8;font:600 var(--type-body)/1.22 var(--serif);}
#shop-overlay .crystal-bank-product .amount {padding-top:4px;color:#f6e8c8;font:600 var(--type-body)/1.3 var(--sans);}
#shop-overlay .crystal-bank-product .bonus {border:0;color:#e8cc93;background:transparent;font:400 var(--type-caption)/1.25 var(--sans);}
#shop-overlay .crystal-bank-product .shop-price {margin-top:auto;padding-top:10px;}
#shop-overlay .crystal-bank-product .shop-price-current {color:#f7dfaa;}
#shop-overlay .crystal-bank-product>:is([data-crystal-action="buy"],.locked-control) {width:calc(100% - 18px);margin:6px 9px 9px;}
#shop-overlay .crystal-bank-product [data-crystal-action="buy"] {padding-inline:5px;color:#392c23;background:#ead099;border-color:#d4b77e;}
#shop-overlay .crystal-bank-product [data-crystal-action="buy"]:disabled {background:#d8cdb3;color:#58513e;}
#shop-overlay .shop-ash-contract {overflow:hidden;background:#f4e8d1;border:1px solid #99835a;}
#shop-overlay .shop-contract-header {display:grid;grid-template-columns:minmax(130px,.72fr) minmax(0,1.28fr);gap:0;padding:0;border-bottom:2px solid #b3915b;background:#4a3745;color:#fff0cf;}
#shop-overlay .shop-contract-header::before {content:"";display:block;align-self:stretch;min-height:140px;background:#d3be97 url("assets/shop/atlas/contract.webp") center 47%/cover no-repeat;}
#shop-overlay .shop-contract-emblem {display:none;}
#shop-overlay .shop-contract-intro {align-self:center;min-width:0;padding:14px;}
#shop-overlay .shop-contract-heading h3,#shop-overlay .shop-contract-description {color:#ffedc5;}
#shop-overlay .shop-contract-state {color:#35543e;}
#shop-overlay .shop-contract-body .shop-ash-demo {background:#ede1c8;border-color:#a79672;}
#shop-overlay .shop-contract-actions {color:#fff2cf;background:#463849;padding:7px 9px;border-radius:4px;}
#shop-overlay .shop-contract-actions:empty {display:none;}
#shop-overlay .shop-ash-pack {--legacy-plate:url("assets/shop/atlas/ash-handful.webp");border:1px solid #a38e64;border-radius:5px;padding:10px;background:#f2e5c8;}
#shop-overlay .shop-ash-pack[data-sku="ash-pouch-v1"] {--legacy-plate:url("assets/shop/atlas/ash-pouch.webp");}
#shop-overlay .shop-ash-pack[data-sku="ash-casket-v1"] {--legacy-plate:url("assets/shop/atlas/ash-casket.webp");}
#shop-overlay .shop-ash-pack[data-sku="ash-coffer-v1"] {--legacy-plate:url("assets/shop/atlas/ash-coffer.webp");}
#shop-overlay .shop-ash-pack::before {content:"";width:100%;aspect-ratio:1.45;display:block;background:#d1bc92 var(--legacy-plate) center 52%/cover no-repeat;}
#shop-overlay .shop-ash-pack>.shop-ash-art {display:none;}

/* Level rewards remain legible at a glance alongside the illustrated Premium edition. */
#pass-overlay .pass-tier-marker {align-self:start;}
#pass-overlay .pass-track .pass-track-heading {padding:5px 8px;color:#fff1cd;border-radius:3px;background:#3b5041;}
#pass-overlay .pass-track-premium .pass-track-heading {background:#4a384a;}
#pass-overlay .pass-track .pass-track-heading .pass-reward-state {color:#f7e1b2;}
#pass-overlay .pass-hero-preview {overflow:hidden;}
#pass-overlay .pass-hero-thumb {width:77px;height:60px;object-fit:contain;object-view-box:inset(12% 0 0);background:#e6d4ad;}
@media(max-width:850px){#shop-overlay .crystal-bank-products{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:560px){
  #shop-overlay .shop-supply-stack {grid-template-columns:minmax(0,1fr);gap:11px;}
  #shop-overlay .shop-item:is([data-shop-item="energy"],[data-shop-item="supply"],[data-shop-item="faction-chest"],[data-shop-item="collection-card"]) {display:flex;}
  #shop-overlay .shop-item:is([data-shop-item="energy"],[data-shop-item="supply"],[data-shop-item="faction-chest"])::before {height:clamp(105px,35vw,155px);min-height:0;border:0;border-bottom:2px solid #a88d59;}
  #shop-overlay .shop-item[data-shop-item="collection-card"]>.shop-art {height:130px;min-height:0;}
  #shop-overlay .rewarded-cards {grid-template-columns:minmax(0,1fr);gap:8px;}
  #shop-overlay .rewarded-card {display:grid;grid-template-columns:minmax(68px,.85fr) minmax(0,1.4fr);grid-template-rows:auto auto auto auto 1fr;}
  #shop-overlay .rewarded-card-art {grid-area:1/1/span 5;align-self:stretch;height:100%;min-height:116px;border:0;border-right:1px solid #ad9269;}
  #shop-overlay .rewarded-card :is(.rewarded-card-title,.rewarded-card-value,.rewarded-card-description,.rewarded-card-reason,.rewarded-card-cta) {grid-column:2;}
  #shop-overlay .rewarded-card-cta {align-self:end;}
  #shop-overlay .crystal-bank-wallet {min-height:76px;}
  #shop-overlay .crystal-bank-product h3 {font-size:var(--type-body);}
  #shop-overlay .crystal-bank-products {gap:7px;}
  #shop-overlay .shop-contract-header {grid-template-columns:minmax(0,1fr);}
  #shop-overlay .shop-contract-header::before {min-height:112px;}
}
@media(max-width:425px){
  #shop-overlay .crystal-bank-products {grid-template-columns:minmax(0,1fr);}
  #shop-overlay .crystal-bank-product {display:grid;grid-template-columns:minmax(82px,.85fr) minmax(0,1.3fr);grid-template-rows:auto auto auto 1fr auto;align-items:start;}
  #shop-overlay .crystal-bank-product::before {grid-column:1;grid-row:1/6;align-self:stretch;height:100%;max-height:none;aspect-ratio:auto;border:0;border-right:1px solid #b6a071;}
  #shop-overlay .crystal-bank-product>:not(.crystal-bank-art) {grid-column:2;}
}

#pass-overlay .pass-window { background:radial-gradient(ellipse at 45% 18%,#f8edd4,#e4d2af); }
#pass-overlay .pass-offer {
  position:relative; isolation:isolate; overflow:hidden; display:grid; grid-template-columns:minmax(234px,.75fr) minmax(0,1.25fr);
  grid-template-rows:auto 1fr; gap:2px 0; min-height:220px; padding:0; border:1px solid #957346; border-radius:6px;
  color:#fcf0d0; background:linear-gradient(135deg,#432f3b,#342735 68%,#2d2730); box-shadow:0 3px 10px #4c382523;
}
#pass-overlay .pass-offer>.pass-cover-plate {grid-column:2;grid-row:1 / 3;min-height:220px;border-left:3px double #967b4c;}
#pass-overlay .pass-offer-copy {grid-area:1/1;align-self:end;min-width:0;padding:10px 20px 0;}
#pass-overlay .pass-offer-action {grid-area:2/1;align-self:start;align-content:start;align-items:stretch;gap:5px;min-width:0;padding:0 20px 16px;border:0;}
#pass-overlay .pass-offer-title {display:flex;justify-content:space-between;align-items:center;gap:8px;}
#pass-overlay .pass-offer-title>strong {color:#ffdf9d;}
#pass-overlay .pass-offer-action .shop-price {color:#fff0d3;}
#pass-overlay .pass-offer-action .shop-price-current {color:#fff4d6;}
#pass-overlay .pass-offer-action .shop-price-base {color:#dbc7be;}
#pass-overlay .pass-offer-action :is(.shop-price-condition,.shop-price-saving) {color:#e9d7ba;}
#pass-overlay .pass-offer-action .shop-discount-badge {color:#462e22;background:#e7bf73;}
#pass-overlay .pass-offer-action .pass-button {min-height:48px;background:#efd292;color:#382c21;border:1px solid #f3dfad;box-shadow:none;}
#pass-overlay .pass-offer-action .pass-opened {align-self:start;justify-self:start;padding:8px 12px;color:#f1e8bc;background:#344c40;border:1px solid #b3a977;border-radius:4px;}
@media (max-width:650px) {
  #pass-overlay .pass-offer {grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;}
  #pass-overlay .pass-offer>.pass-cover-plate {grid-area:1/1;min-height:clamp(124px,38vw,182px);border:0;border-bottom:3px double #967b4c;--giant-x:15%;--selene-x:78%;}
  #pass-overlay .pass-offer-copy {grid-area:2/1;padding:0 14px;}
  #pass-overlay .pass-offer-action {grid-area:3/1;padding:0 14px 12px;}
}
#pass-overlay .pass-offer-title>strong, #pass-overlay [data-pass-action="unlock"] { animation:none; }
#pass-overlay .pass-tier-marker>span { border:1px solid #a58a5a; background:#e2cda0; }
#pass-overlay .pass-track { border-left:3px solid #718066; background:#f6ecd6; box-shadow:0 2px 5px #56412717; }
#pass-overlay .pass-track-premium { border-left-color:#a17c43; background:#f4e4bc; }
#pass-overlay .pass-track.is-locked { border-left-color:#8d7c70; background:#e7decb; }
#pass-overlay .pass-track.is-claimable { border-color:#647047; box-shadow:inset 0 0 0 1px #647047; }
#pass-overlay .pass-offer .info-trigger { color:#47371f; }
#pass-overlay .pass-track.locked-control[data-locked="true"]>.locked-cover { place-items:start end; padding:4px 6px; }
#pass-overlay .pass-track.locked-control[data-locked="true"] .pass-track-heading { padding-right:30px; min-height:26px; }
#pass-overlay .pass-track.is-earned { border-left-style:double; border-left-width:5px; }
#pass-overlay .pass-track.is-locked :is(.pass-item-icon,.pass-ashes img) { filter:saturate(.75); opacity:.95; }

@media(max-width:720px) {
  #shop-overlay .shop-tabs button { flex:1 1 28%; padding-inline:5px; }
}
@media(max-width:520px) {
  #shop-overlay .shop-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; padding-inline:3px; }
  #shop-overlay .shop-tabs button { width:100%; padding:5px 2px; font-size:.86rem; }
  #shop-overlay .shop-header {
    display:grid; grid-template-columns:minmax(0,1fr) 48px;
    grid-template-areas:"title close" "wallet wallet";
    gap:4px 8px; padding-block:6px;
  }
  #shop-overlay .shop-header h2 { grid-area:title; margin:0; }
  #shop-overlay .shop-header .shop-close { grid-area:close; justify-self:end; }
  #shop-overlay .shop-header .shop-wallet {
    grid-area:wallet; justify-self:start; max-width:100%; flex-wrap:wrap;
  }
  #shop-overlay .shop-wallet .shop-currency-icon { width:23px;height:23px; }
  #shop-overlay .shop-wallet { padding:3px 6px; gap:3px; }

}
@media(prefers-reduced-motion:reduce) {
  :is(#shop-overlay, #shop-detail-overlay, #pass-overlay) :is(button,.shop-detail-dialog,.pass-window) { transition:none; animation:none; }
}
/* The original giant sprite has three disconnected atlas scraps at its left margin. Clip only that transparent gutter. */
#pass-overlay .pass-cover-plate {position:relative;display:block;isolation:isolate;overflow:hidden;pointer-events:none;background:#d8bf8e url("assets/themes/halloween-table.webp") center/100% 100%;}
#pass-overlay .pass-cover-plate::before,#pass-overlay .pass-cover-plate::after {content:"";display:block;position:absolute;background-position:center;background-repeat:no-repeat;background-size:contain;}
#pass-overlay .pass-cover-plate::before {height:119%;aspect-ratio:432/406;left:var(--giant-x,21%);top:-2%;transform:translateX(calc(-1 * var(--giant-x,21%)));background-image:url("assets/hero-skins/thorn-giant-harvest/figure-r3.webp");clip-path:polygon(0 0,100% 0,100% 100%,0 100%,0 48%,4.5% 48%,4.5% 24%,0 24%);}
#pass-overlay .pass-cover-plate::after {height:135%;aspect-ratio:432/438;left:var(--selene-x,74%);top:-3%;transform:translateX(calc(-1 * var(--selene-x,74%)));background-image:url("assets/hero-skins/selene-night/figure-r3.webp");}
/* Each chapter of the catalogue has its own illuminated header margin. */
#shop-overlay .shop-window[data-shop-section="progress"] {--chapter-art:url("assets/shop/workshop-wagon.webp");--chapter-tone:#35473e;}
#shop-overlay .shop-window[data-shop-section="supplies"] {--chapter-art:url("assets/shop/atlas/supplies.webp");--chapter-tone:#3c4737;}
#shop-overlay .shop-window[data-shop-section="cosmetics"] {--chapter-art:url("assets/shop/cardback-moon.webp");--chapter-tone:#493a47;}
#shop-overlay .shop-window[data-shop-section="rewards"] {--chapter-art:url("assets/shop/atlas/ashes.webp");--chapter-tone:#484330;}
#shop-overlay .shop-window[data-shop-section="ashes"] {--chapter-art:url("assets/shop/atlas/crystals.webp");--chapter-tone:#433448;}
#shop-overlay .shop-window[data-shop-section="collection"] {--chapter-art:url("assets/collection/chest.webp");--chapter-tone:#4d3736;}
#shop-overlay .shop-window[data-shop-section]>.shop-header {isolation:isolate;background:var(--chapter-tone,#34463c);}
#shop-overlay .shop-window[data-shop-section]>.shop-header::before {content:"";position:absolute;z-index:-1;inset:0 42% 0 19%;pointer-events:none;background:var(--chapter-art) center 49%/cover no-repeat;mask-image:linear-gradient(90deg,transparent,#000 17%,#000 78%,transparent);}
#shop-overlay .shop-window[data-shop-section] .shop-wallet {background:#29312a;}
#shop-overlay .shop-supply-stack .shop-item:is([data-shop-item="supply"],[data-shop-item="energy"])::before {height:auto;min-height:0;max-height:260px;aspect-ratio:1.6;background-position:center 39%;}
#shop-overlay [data-shop-item="collection-card"]>.shop-art {mix-blend-mode:normal;filter:none;opacity:1;}
#shop-overlay [data-shop-item="collection-card"] .shop-collection-targets {display:flex;flex-wrap:wrap;gap:6px;}
#shop-overlay [data-shop-item="collection-card"] .shop-buy {flex:1 1 138px;}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile[data-id="christmas"],#shop-detail-overlay [data-shop-detail-id="christmas"] {--sample-engraving:url("assets/themes/christmas-vignette.webp");}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile[data-id="easter"],#shop-detail-overlay [data-shop-detail-id="easter"] {--sample-engraving:url("assets/themes/easter-vignette.webp");}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile[data-id="thanksgiving"],#shop-detail-overlay [data-shop-detail-id="thanksgiving"] {--sample-engraving:url("assets/themes/thanksgiving-vignette.webp");}
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile[data-id="halloween"],#shop-detail-overlay [data-shop-detail-id="halloween"] {--sample-engraving:url("assets/themes/halloween-vignette.webp");}
/* A magnified imprint samples the ornament of the same table, independent of the player's cards. */
:is(#shop-overlay, [data-collection-panel="appearance"]) .cosmetic-tile-corner::after,#shop-detail-overlay [data-shop-detail="theme"] .shop-detail-theme-preview::after {content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);height:74%;aspect-ratio:1;border:3px double #9c8056;border-radius:50%;background:#e4cfa4 var(--sample-engraving) -5% -8% / 620% auto no-repeat;box-shadow:1px 3px 5px #59401e55;pointer-events:none;}
#shop-detail-overlay [data-shop-detail="theme"] .shop-detail-theme-preview {position:relative;overflow:hidden;}
#shop-detail-overlay [data-shop-detail="theme"] .shop-detail-theme-preview::after {height:51%;}
@media(max-width:560px){
  #shop-overlay .shop-window[data-shop-section]>.shop-header::before {inset:0 17% 0 53%;mask-image:linear-gradient(90deg,transparent,#000 27%,#000 74%,transparent);}
  #shop-overlay .shop-supply-stack .shop-item:is([data-shop-item="supply"],[data-shop-item="energy"])::before {max-height:214px;aspect-ratio:1.65;}
}

#shop-overlay .shop-supply-description {margin:0;color:#f0e3c8;line-height:1.42;}
#shop-overlay .shop-item[data-shop-item="supply"]>div {flex:1;}
#shop-overlay .shop-item[data-shop-item="supply"]>div>.shop-price {margin-top:auto;padding-top:9px;}
#shop-overlay .shop-item[data-shop-item="supply"] .shop-supply-heading:has(>h3:only-child) {display:block;}

/* The hand is shown as a complete plate in both the tall and the horizontal product card. */
#shop-overlay .crystal-bank-product[data-crystal-sku="crystal-handful"]::before {
  box-sizing: border-box;
  padding: 5px;
  background-origin: content-box;
  background-color: #ddbd80;
  background-size: contain;
  background-position: center;
}

#shop-overlay .shop-window[data-shop-section="pass"] {
  --shop-binding: #413342;
  --shop-engraving: url("assets/themes/halloween-table.webp");
}
#shop-overlay .shop-window[data-shop-section="pass"] > .shop-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  scrollbar-gutter: auto;
}
#shop-overlay .shop-content > [data-shop-pass-slot] {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
#shop-overlay #pass-overlay.pass-embedded-host {
  position: relative;
  z-index: auto;
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
#pass-overlay.pass-embedded-host .pass-window.pass-embedded {
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: auto;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
#pass-overlay.pass-embedded-host .pass-header {
  padding: 8px clamp(12px,2vw,24px);
  color: #443342;
  background: #eadcbd;
  border-bottom: 1px solid #bca37d;
  box-shadow: none;
}
#pass-overlay.pass-embedded-host .pass-header h2 {
  color: inherit;
  font-size: clamp(19px,2vw,25px);
  text-shadow: none;
}
#pass-overlay.pass-embedded-host .pass-hero-header h2 {
  font-size: clamp(17px,2.4vw,25px);
}
#pass-overlay.pass-embedded-host .pass-intro {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 2px 18px;
  align-items: center;
  padding: 8px clamp(12px,2vw,24px) 14px;
}
#pass-overlay.pass-embedded-host .pass-progress-copy {
  grid-column: 1;
  margin: 0;
}
#pass-overlay.pass-embedded-host .pass-progress-heading {
  display: flex;
  align-items: center;
}
#pass-overlay.pass-embedded-host .pass-progress {
  grid-column: 1;
  height: 10px;
  border: 1px solid #837458;
}
#pass-overlay.pass-embedded-host .pass-priority-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  grid-area: 1 / 2 / span 2;
  min-height: 48px;
  padding: 6px 14px;
  border: 1px solid #9f8050;
  border-radius: 4px;
  color: #47351e;
  background: #f1dbac;
  font: 600 var(--type-body)/1.2 var(--sans);
}
#pass-overlay.pass-embedded-host .pass-priority-jump::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
}
#pass-overlay.pass-embedded-host .pass-tier[data-pass-priority="true"] {
  padding: 5px;
  border: 2px solid #987139;
  border-radius: 6px;
  background: #e8d3a6;
  scroll-margin-block: 10px;
}
#pass-overlay.pass-embedded-host .pass-tier[data-pass-priority="true"] .pass-tier-marker > span {
  border-color: #776132;
  color: #fff0c5;
  background: #54412f;
}
[data-collection-panel="appearance"] .collection-appearance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(145px,100%),1fr));
  gap: 12px;
}
[data-collection-panel="appearance"] .locked-control[data-locked="true"] > [data-lock-content] {
  filter: saturate(.85);
  opacity: 1;
}
[data-collection-panel="appearance"] .cosmetic-source {
  min-height: 48px;
}
@media (max-width: 520px) {
  #shop-overlay .shop-tabs:has(> :nth-child(5):last-child) {
    display: grid;
    grid-template-columns: repeat(6,minmax(0,1fr));
  }
  #shop-overlay .shop-tabs:has(> :nth-child(5):last-child) > button {
    grid-column: span 2;
    padding-inline: 3px;
  }
  #shop-overlay .shop-tabs:has(> :nth-child(5):last-child) > button:nth-last-child(-n+2) {
    grid-column: span 3;
  }
  #pass-overlay.pass-embedded-host .pass-intro {
    grid-template-columns: minmax(0,1fr);
    gap: 6px;
    padding: 6px 12px 10px;
  }
  #pass-overlay.pass-embedded-host .pass-priority-jump {
    grid-area: auto;
    justify-content: space-between;
    width: 100%;
  }
  #pass-overlay.pass-embedded-host .pass-progress-heading .info-control {
    margin: 0;
  }
  #pass-overlay.pass-embedded-host .pass-hero-body .hero-skin-preview {
    min-height: 132px;
    height: clamp(132px,26dvh,198px);
  }
  [data-collection-panel="appearance"] .collection-appearance-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
  }
}
