/* The store's own parts (deals, packs, cart, vault…), drawn in THRONED's castle theme: its tokens (theme-castle.css),
   its castle-block buttons, carved slots and stone panels. Loaded after Throned's stylesheets. No new raw colours
   except the rarity ladder, which is taken from the site's own palette. */
html[data-site-theme="castle"] {
  --r-common: #a9b3c7; --r-uncommon: #3fd68a; --r-rare: #4d93ff; --r-legendary: var(--gold); --r-won: #ff9aa0;
  --tb-panel-shadow: inset 0 0 0 2px var(--castle-ink), inset 0 2px 0 rgba(255, 255, 255, 0.05), 3px 3px 0 rgba(0, 0, 0, 0.42);
  --tb-slot-shadow: inset 0 0 0 2px var(--castle-ink), inset 4px 4px 0 rgba(0, 0, 0, 0.45), inset -2px -2px 0 rgba(255, 255, 255, 0.07);
}
.hidden { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.r-common { --r: var(--r-common); } .r-uncommon { --r: var(--r-uncommon); } .r-rare { --r: var(--r-rare); }
.r-legendary { --r: var(--r-legendary); } .r-won { --r: var(--r-won); }

/* ── Buttons: every .pbtn is a castle block (gold = the screen's main action, stone = the rest) ── */
html[data-site-theme="castle"] .pbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 2px; cursor: pointer;
  padding: 0 18px; height: 44px; font-size: 18px; line-height: 1; white-space: nowrap; text-decoration: none;
  background: var(--bg-elevated); color: var(--text-primary); text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.55);
  box-shadow: var(--castle-block); font-weight: 700; letter-spacing: 0.02em; transition: filter 0.12s, transform 0.06s;
}
html[data-site-theme="castle"] .pbtn.gold { background: var(--accent); color: var(--accent-text); text-shadow: 0 1px 0 rgba(255, 246, 214, 0.45); }
html[data-site-theme="castle"] .pbtn.green { background: #23a065; color: #fff; }
html[data-site-theme="castle"] .pbtn.dark { background: var(--bg-chip); }
html[data-site-theme="castle"] .pbtn.ghost { background: transparent; box-shadow: none; color: var(--text-muted); height: auto; padding: 4px 8px; }
html[data-site-theme="castle"] .pbtn.sm { height: 36px; padding: 0 12px; font-size: 16px; }
html[data-site-theme="castle"] .pbtn.lg { height: 52px; padding: 0 26px; font-size: 22px; }
html[data-site-theme="castle"] .pbtn.sq { width: 40px; padding: 0; }
html[data-site-theme="castle"] .pbtn.full { width: 100%; }
@media (hover: hover) { html[data-site-theme="castle"] .pbtn:not(:disabled):hover { filter: brightness(1.1); } }
html[data-site-theme="castle"] .pbtn:not(:disabled):active { transform: translateY(2px); box-shadow: var(--castle-block-down); }
html[data-site-theme="castle"] .pbtn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
html[data-site-theme="castle"] .pbtn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.35); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--gold-light); text-decoration: underline; cursor: pointer; font-size: 14px; }

/* ── Panels and carved slots ── */
.panel { background: var(--bg-secondary); border-radius: 2px; box-shadow: var(--tb-panel-shadow); }
.empty { grid-column: 1 / -1; padding: 40px 20px; text-align: center; color: var(--text-muted); background: var(--bg-secondary); box-shadow: var(--tb-panel-shadow); border-radius: 2px; }
.empty b { display: block; color: var(--text-primary); font-size: 24px; margin-bottom: 6px; }
.skeleton { height: 220px; background: var(--bg-secondary); box-shadow: var(--tb-panel-shadow); opacity: 0.6; }
.note { color: var(--text-muted); font-size: 15px; }
.note b { color: var(--gold-light); }

/* ── Header extras: the cart button's count, the account letter, the membership tag ── */
.tb-cart-btn { position: relative; display: inline-grid; place-items: center; }
.tb-cart-btn .fas { font-size: 18px; color: var(--gold-light); }
.tb-count { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center;
  font-size: 13px; line-height: 1; background: var(--danger, #f0464d); color: #fff; border-radius: 2px; box-shadow: 0 0 0 2px var(--castle-ink); }
.header-right-section--guest .tb-cart-btn { width: 40px; height: 40px; margin-right: 4px; }
.tb-avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; background: var(--accent); color: var(--accent-text); border-radius: 2px; box-shadow: inset 0 0 0 2px var(--castle-ink); font-size: 18px; }
.tb-plus-tag { margin-left: 6px; font-size: 13px; padding: 2px 6px; background: var(--accent); color: var(--accent-text); border-radius: 2px; }
a.header-icon-btn { display: inline-grid; place-items: center; text-decoration: none; }

/* ── Category bar: our search box inside Throned's carved search slot ── */
.search-tab { cursor: text; }
.search-tab input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text-primary); font-size: 16px; padding: 0; }
.search-tab input::placeholder { color: var(--text-dim); }
.search-tab input::-webkit-search-cancel-button { filter: invert(0.7); }
a.lobby-tab { text-decoration: none; }

/* ── Layout: content column + live feed ── */
.store-page { gap: 18px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.cols.single { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1240px) { .cols { grid-template-columns: minmax(0, 1fr); } .sidefeed { display: none; } }
#main { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.section { margin: 0; }
.pagehead { margin: 4px 0 0; }
.pagehead h1 { margin: 0; font-size: clamp(34px, 4.6vw, 48px); line-height: 1; color: var(--text-primary); text-shadow: 3px 3px 0 var(--castle-ink); }
.pagehead p { margin: 6px 0 0; color: var(--text-muted); font-size: 16px; }
.tb-head { margin-bottom: 12px; }
.tb-sub { color: var(--text-muted); font-size: 15px; }
html .section-icon:is(.icon-gift, .icon-dice, .icon-all, .icon-castle, .icon-crown, .icon-diamond) {
  display: inline-block; flex-shrink: 0; width: 24px !important; height: 24px !important; background-size: 24px 24px !important;
  background-position: center !important; background-repeat: no-repeat !important; image-rendering: pixelated;
}
html .section-icon.icon-gift { background-image: var(--pxc-gift); }
html .section-icon.icon-dice { background-image: var(--pxc-dice); }
html .section-icon.icon-all { background-image: var(--pxc-grid); }
html .section-icon.icon-castle { background-image: var(--pxc-castle); }
html .section-icon.icon-crown { background-image: var(--pxc-crown); }
html .section-icon.icon-diamond { background-image: var(--pxc-diamond); }

/* ── Product cards: Throned's slot cover with the store's extras ── */
.tb-tile { display: block; }
.tb-emoji { position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 28%; font-size: 46cqw; line-height: 1;
  background: radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.3), transparent 58%), var(--tbg, var(--bg-card)); }
.tb-tag { position: absolute; z-index: 2; top: 6px; left: 6px; font-size: 12px; line-height: 1; padding: 4px 6px; color: var(--text-primary); background: rgba(var(--castle-ink-rgb), 0.78); border-radius: 2px; }
.tb-price { position: absolute; z-index: 2; top: 6px; right: 6px; font-size: 15px; line-height: 1; padding: 4px 6px; background: var(--accent); color: var(--accent-text); border-radius: 2px; box-shadow: inset 0 0 0 2px var(--castle-ink); }
.tb-cred { position: absolute; z-index: 2; top: 32px; right: 6px; font-size: 12px; line-height: 1; padding: 3px 6px; background: var(--r-won); color: var(--castle-ink); border-radius: 2px; }
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.tb-grid > .game-card { width: auto; }
.tb-grid--deals { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* ── Pack art (inside Throned's game card) ── */
.packcard { display: flex; flex-direction: column; text-decoration: none; color: var(--text-primary); position: relative; }
.packcard.game-card { display: block; }
.packart { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 4px; overflow: hidden; }
.packart.composed { container-type: inline-size;
  background: radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--pk) 42%, #fff) 0%, var(--pk) 36%, color-mix(in srgb, var(--pk) 36%, var(--castle-ink)) 100%); }
.packart.composed::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% 62%, rgba(255, 255, 255, 0.15) 0deg 6deg, transparent 6deg 16deg);
  -webkit-mask: radial-gradient(circle at 50% 62%, #000 25%, transparent 72%); mask: radial-gradient(circle at 50% 62%, #000 25%, transparent 72%); }
.packart.composed::after { content: ""; position: absolute; inset: 5px; border-radius: 2px; pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(255, 241, 206, 0.6), inset 0 0 0 5px rgba(var(--castle-ink-rgb), 0.35), inset 0 -56px 44px -18px rgba(var(--castle-ink-rgb), 0.6); }
.packart .pn { position: absolute; top: 6%; left: 3%; right: 3%; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 1.5cqw;
  color: #fff; font-size: 19cqw; line-height: 0.82; text-transform: uppercase; letter-spacing: 0.02em; -webkit-text-stroke: 0.7cqw #fff;
  text-shadow: 1.6cqw 0 0 var(--castle-ink), -1.6cqw 0 0 var(--castle-ink), 0 1.6cqw 0 var(--castle-ink), 0 -1.6cqw 0 var(--castle-ink),
    1.6cqw 1.6cqw 0 var(--castle-ink), -1.6cqw 1.6cqw 0 var(--castle-ink), 1.6cqw -1.6cqw 0 var(--castle-ink), -1.6cqw -1.6cqw 0 var(--castle-ink), 2.6cqw 2.8cqw 0 var(--castle-ink); }
/* the logo's curve: each letter scaled from the line's middle, bigger toward the ends */
.packart .pn .arc-line { display: flex; align-items: center; white-space: nowrap; }
.packart .pn .arc-line > span { display: inline-block; transform: scaleY(var(--s, 1)); transform-origin: 50% 55%; }
.packart .pf { position: absolute; left: 6px; bottom: 6px; z-index: 3; white-space: nowrap; font-size: 12px; line-height: 1; padding: 3px 6px; background: rgba(var(--castle-ink-rgb), 0.7); color: var(--text-primary); border-radius: 2px; }
.pa { position: absolute; z-index: 2; display: grid; place-items: center; line-height: 1; filter: drop-shadow(0 5px 0 rgba(9, 19, 44, 0.5)); }
.pa img { width: 100%; height: auto; object-fit: contain; }
.pa-hero { left: 50%; bottom: 13%; width: 64%; transform: translateX(-50%); font-size: 40cqw; }
.pa-l { left: 3%; top: 27%; width: 44%; transform: rotate(-12deg); font-size: 24cqw; }
.pa-r { right: 3%; top: 27%; width: 44%; transform: rotate(12deg); font-size: 24cqw; }
.packart.has-img img { width: 100%; height: 100%; object-fit: cover; }
.packcard .pp { position: absolute; z-index: 4; bottom: 6px; right: 6px; font-size: 15px; line-height: 1; padding: 4px 6px; background: var(--accent); color: var(--accent-text); border-radius: 2px; box-shadow: inset 0 0 0 2px var(--castle-ink); }
div.packcard .packart { box-shadow: var(--tb-panel-shadow); }

/* ── Stats strip + how it works ── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px; }
.stats > div { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.stats .si { width: 42px; height: 42px; display: grid; place-items: center; font-size: 20px; background: var(--bg-input); box-shadow: var(--tb-slot-shadow); flex: none; }
.stats b { display: block; font-size: 26px; line-height: 1; color: var(--gold-light); }
.stats span { color: var(--text-muted); font-size: 14px; }
.stats .live { color: var(--r-uncommon); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.how .panel { padding: 16px 18px; }
.how b { display: block; font-size: 22px; margin-bottom: 4px; }
.how b em { font-style: normal; color: var(--gold-light); margin-right: 6px; }
.how span { color: var(--text-muted); font-size: 15px; }
@media (max-width: 800px) { .how { grid-template-columns: 1fr; } }

/* ── Filters: carved slots ── */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.field-inline { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 42px; background: var(--bg-input); box-shadow: var(--tb-slot-shadow); border-radius: 2px; }
.field-inline .lbl { color: var(--text-dim); font-size: 14px; }
.field-inline input, .field-inline select { border: 0; outline: none; background: transparent; color: var(--text-primary); font-size: 16px; min-width: 0; }
.field-inline select option { background: var(--bg-popup); }
.field-inline input[type=number] { width: 84px; }
html[data-site-theme="castle"] .chip { border: 0; height: 40px; padding: 0 14px; font-size: 16px; color: var(--text-muted); background: var(--bg-chip); border-radius: 2px; box-shadow: var(--castle-block); cursor: pointer; }
html[data-site-theme="castle"] .chip[aria-pressed="true"] { background: var(--bg-elevated); color: #fff1ce; box-shadow: inset 0 0 0 2px var(--accent), inset 0 4px 0 rgba(255, 255, 255, 0.12), inset 0 -4px 0 rgba(0, 0, 0, 0.25), 3px 3px 0 rgba(0, 0, 0, 0.42); }

/* ── Live feed ── */
.sidefeed { position: sticky; top: calc(var(--header-h, 64px) + 16px); display: flex; flex-direction: column; gap: 10px; }
.sidefeed h3 { margin: 6px 0 2px; font-size: 20px; display: flex; align-items: center; gap: 8px; color: var(--text-primary); }
.sidefeed h3 .dotlive { width: 10px; height: 10px; background: var(--danger, #f0464d); border-radius: 1px; }
.feeditem { display: flex; align-items: center; gap: 10px; padding: 10px; position: relative; }
.feeditem .fe { width: 52px; height: 52px; display: grid; place-items: center; font-size: 30px; background: var(--bg-input); box-shadow: inset 0 0 0 2px var(--r, var(--border-color)); flex: none; border-radius: 2px; }
.feeditem .fn { font-size: 14px; color: var(--text-muted); line-height: 1.1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.feeditem .fv { font-size: 18px; color: var(--gold-light); }
.feeditem .fa { position: absolute; top: 6px; right: 8px; font-size: 16px; }
.feedempty { color: var(--text-dim); font-size: 14px; padding: 12px; }

/* ── Product page ── */
.crumb { display: inline-flex; color: var(--text-muted); text-decoration: none; font-size: 17px; }
.crumb:hover { color: var(--text-primary); }
.pd { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 22px; align-items: start; }
.pd .bigart { position: relative; aspect-ratio: 1; border-radius: 2px; overflow: hidden; display: grid; place-items: center; font-size: clamp(120px, 16vw, 200px);
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.32), transparent 60%), var(--tbg, var(--bg-card)); box-shadow: var(--tb-panel-shadow); }
.pd .bigart img { width: 100%; height: 100%; object-fit: cover; }
.pd .bigart .tag { position: absolute; top: 10px; left: 10px; font-size: 14px; padding: 4px 8px; background: rgba(var(--castle-ink-rgb), 0.78); border-radius: 2px; }
.pd .info { padding: 22px; }
.pd .meta { color: var(--text-dim); font-size: 15px; }
.pd h1 { margin: 6px 0 10px; font-size: clamp(34px, 4.4vw, 50px); line-height: 0.95; color: var(--text-primary); text-shadow: 3px 3px 0 var(--castle-ink); }
.pd .bigprice { font-size: 42px; line-height: 1; color: var(--gold-light); text-shadow: 3px 3px 0 var(--castle-ink); }
.pd .bigprice s { font-size: 20px; color: var(--text-dim); text-shadow: none; margin-left: 8px; }
.pd .buy { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
@media (max-width: 900px) { .pd { grid-template-columns: 1fr; } .pd .bigart { aspect-ratio: auto; height: 280px; } }

/* ── Deal widget: built like a house game (originals-ui: panel + stage) ── */
.deal { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 14px; align-items: stretch; }
.deal > .panel { padding: 18px; display: flex; flex-direction: column; }
.deal label.lbl { display: flex; justify-content: space-between; align-items: baseline; font-size: 19px; margin-bottom: 8px; color: var(--text-primary); }
.deal label.lbl .note, .deal label.lbl span { font-size: 16px; color: var(--text-muted); }
.deal .pricein { display: flex; align-items: center; background: var(--bg-input); box-shadow: var(--tb-slot-shadow); border-radius: 2px; margin-bottom: 18px; }
.deal .pricein > span { padding: 0 12px; color: var(--gold-light); font-size: 18px; }
.deal .pricein input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text-primary); padding: 12px 0; font-size: 18px; }
.deal .pricein .pbtn { margin: 4px; }
input[type=range].pslider { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 4px 0 14px; background: var(--bg-input); box-shadow: var(--tb-slot-shadow); border-radius: 2px; outline: none; }
input[type=range].pslider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 32px; border-radius: 2px; background: var(--accent); box-shadow: var(--castle-block); cursor: pointer; }
input[type=range].pslider::-moz-range-thumb { width: 22px; height: 32px; border: 0; border-radius: 2px; background: var(--accent); box-shadow: var(--castle-block); cursor: pointer; }
.presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
html[data-site-theme="castle"] .presets .pbtn { padding: 0; height: 36px; font-size: 15px; }
.deal .fine { margin: auto 0 0; padding-top: 12px; font-size: 14px; color: var(--text-muted); }
.deal .center { align-items: center; text-align: center; justify-content: space-between; gap: 12px;
  background: var(--castle-stone) 0 0 / var(--castle-stone-size) repeat, var(--bg-secondary); }
.ring { position: relative; width: min(240px, 70vw); aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ring .pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(40px, 5vw, 50px); color: var(--text-primary); text-shadow: 3px 3px 0 var(--castle-ink); }
.ring .pct small { display: block; font-size: 15px; color: var(--text-muted); text-shadow: none; margin-top: -4px; }
.ring .ptr { transform-origin: 120px 120px; }
.deal .acts { display: grid; grid-template-columns: 1fr auto; gap: 10px; width: 100%; }
.deal .result { font-size: 24px; min-height: 28px; color: var(--text-primary); text-shadow: 2px 2px 0 var(--castle-ink); }
.deal .result.win { color: var(--gold-light); }
.deal .pick { align-items: center; text-align: center; justify-content: space-between; gap: 10px; }
.deal .pick .art { width: 100%; flex: 1; min-height: 150px; display: grid; place-items: center; font-size: 96px; text-decoration: none; background: var(--bg-input); box-shadow: var(--tb-slot-shadow); border-radius: 2px; }
.deal .pick .art img { max-height: 180px; object-fit: contain; }
.deal .pick .nm { font-size: 19px; color: var(--text-primary); }
.deal .pick .row2 { display: flex; justify-content: space-between; width: 100%; font-size: 19px; }
.deal .pick .row2 .x { color: var(--gold-light); }
.deal .credit { width: 100%; background: var(--accent); color: var(--accent-text); padding: 8px 10px; font-size: 15px; border-radius: 2px; box-shadow: inset 0 0 0 2px var(--castle-ink); }
@media (max-width: 1000px) { .deal { grid-template-columns: 1fr; } .deal .center { order: -1; } }
.dealcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px; text-align: center; cursor: pointer; color: var(--text-primary); }
@media (hover: hover) { .dealcard:hover { filter: brightness(1.08); } }
.dealcard[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent), 3px 3px 0 rgba(0, 0, 0, 0.42); }
.dealcard .art { width: 100%; aspect-ratio: 1.25; display: grid; place-items: center; font-size: 56px; background: var(--bg-input); box-shadow: var(--tb-slot-shadow); border-radius: 2px; }
.dealcard .art img { max-height: 100%; object-fit: contain; }
.dealcard .nm { width: 100%; font-size: 15px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dealcard .pr { font-size: 20px; color: var(--gold-light); }
.dealcard .eye { position: absolute; top: 8px; right: 8px; font-size: 14px; text-decoration: none; padding: 2px 5px; }

/* ── Pack page + reel ── */
.packpage { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.packpage .left { display: flex; flex-direction: column; gap: 12px; }
.reel { position: relative; height: 200px; overflow: hidden; margin-bottom: 14px; background: var(--castle-stone) 0 0 / var(--castle-stone-size) repeat, var(--bg-input); box-shadow: var(--tb-slot-shadow); border-radius: 2px; }
.reel .strip { position: absolute; top: 20px; left: 0; display: flex; gap: 10px; will-change: transform; }
.reel .cell { width: 140px; height: 160px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  background: var(--bg-card); border-radius: 2px; box-shadow: inset 0 0 0 2px var(--castle-ink), inset 0 -6px 0 var(--r, var(--border-color)); }
.reel .cell .ce { width: 84px; height: 84px; display: grid; place-items: center; font-size: 52px; }
.reel .cell .ce img { max-width: 100%; max-height: 100%; object-fit: contain; }
.reel .cell span { font-size: 14px; color: var(--text-muted); padding: 0 6px; line-height: 1; }
.reel .cell b { font-size: 16px; color: var(--gold-light); font-weight: 400; }
.reel .marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--accent); z-index: 2; box-shadow: 0 0 0 2px var(--castle-ink); }
.reel .idle { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-muted); font-size: 18px; }
.reelresult { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px; margin-bottom: 14px; box-shadow: inset 0 0 0 2px var(--r), 3px 3px 0 rgba(0, 0, 0, 0.42); }
.reelresult .won { font-size: 24px; color: var(--text-primary); }
.reelresult .spacer { flex: 1; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.item { position: relative; padding: 12px 10px; text-align: center; box-shadow: inset 0 0 0 2px var(--castle-ink), inset 0 -5px 0 var(--r), 3px 3px 0 rgba(0, 0, 0, 0.42); }
.item .ie { height: 64px; display: grid; place-items: center; font-size: 48px; }
.item .ie img { max-height: 64px; object-fit: contain; }
.item .in { font-size: 14px; color: var(--text-muted); min-height: 30px; line-height: 1.05; }
.item .iv { font-size: 18px; color: var(--gold-light); }
.item .io { position: absolute; top: 6px; right: 6px; font-size: 13px; color: var(--r); background: var(--bg-input); padding: 2px 5px; border-radius: 2px; }
.oddsline { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.oddsline span { font-size: 14px; padding: 3px 7px; color: var(--r); background: var(--bg-input); box-shadow: inset 0 0 0 2px var(--r); border-radius: 2px; }
@media (max-width: 860px) { .packpage { grid-template-columns: 1fr; } .packpage .left .packcard { max-width: 200px; } }

/* ── Vault ── */
.vaultsum { display: flex; gap: 12px; flex-wrap: wrap; }
.vaultsum > div { padding: 12px 16px; min-width: 140px; }
.vaultsum b { display: block; font-size: 30px; line-height: 1; color: var(--gold-light); }
.vaultsum span { color: var(--text-muted); font-size: 14px; }
.vitem { padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: inset 0 0 0 2px var(--r), 3px 3px 0 rgba(0, 0, 0, 0.42); }
.vitem .art { height: 110px; display: grid; place-items: center; font-size: 58px; background: var(--bg-input); box-shadow: var(--tb-slot-shadow); border-radius: 2px; }
.rchip { align-self: flex-start; font-size: 13px; line-height: 1; padding: 3px 7px; background: var(--r); color: var(--castle-ink); border-radius: 2px; }
.vitem h3 { margin: 0; font-size: 19px; color: var(--text-primary); font-weight: 400; }
.vitem .val { color: var(--text-muted); font-size: 14px; }
.vitem .btns { display: flex; gap: 8px; margin-top: auto; }
.vitem .btns .pbtn { flex: 1; }
.status { display: inline-block; font-size: 13px; line-height: 1; padding: 4px 8px; background: var(--bg-elevated); border-radius: 2px; }
.status.paid, .status.fulfilling { background: var(--accent); color: var(--accent-text); }
.status.shipped { background: #23a065; color: #fff; }

/* ── Membership ── */
.plus { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; }
.pluscard { padding: 26px; border-radius: 2px; background: linear-gradient(rgba(var(--bg-primary-rgb), 0.82), rgba(var(--bg-primary-rgb), 0.9)), var(--castle-stone) 0 0 / var(--castle-stone-size) repeat;
  box-shadow: inset 0 0 0 2px var(--castle-ink), inset 0 0 0 5px var(--accent), 3px 3px 0 rgba(0, 0, 0, 0.42); }
.pluscard h2 { margin: 0 0 8px; font-size: clamp(36px, 4.6vw, 50px); line-height: 0.95; color: var(--text-primary); text-shadow: 3px 3px 0 var(--castle-ink); font-weight: 400; }
.pluscard .p { font-size: 36px; color: var(--gold-light); margin: 12px 0; }
.pluscard .p small { font-size: 16px; color: var(--text-muted); }
.pluscard ul { list-style: none; padding: 0; margin: 0 0 20px; }
.pluscard li { position: relative; padding: 8px 0 8px 26px; border-bottom: 2px solid rgba(var(--castle-ink-rgb), 0.6); color: var(--text-primary); font-size: 17px; }
.pluscard li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 12px; height: 12px; background: var(--accent); box-shadow: inset -3px -3px 0 var(--progress-dark, #b47b22); }
table.compare { width: 100%; border-collapse: collapse; }
table.compare th, table.compare td { padding: 12px 14px; text-align: left; border-bottom: 2px solid var(--castle-ink); font-size: 16px; color: var(--text-primary); font-weight: 400; }
table.compare th { color: var(--text-dim); font-size: 14px; }
table.compare td:nth-child(3) { color: var(--gold-light); }
@media (max-width: 860px) { .plus { grid-template-columns: 1fr; } }

/* ── Account ── */
.acct { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.acct .panel { padding: 18px; }
.acct h3 { margin: 0 0 10px; font-size: 22px; color: var(--text-primary); font-weight: 400; }
.acct .big { font-size: 36px; line-height: 1; color: var(--gold-light); }
.rows { width: 100%; border-collapse: collapse; font-size: 15px; }
.rows td { padding: 8px 0; border-bottom: 2px solid rgba(var(--castle-ink-rgb), 0.7); vertical-align: top; color: var(--text-primary); }
.rows td:last-child { text-align: right; }
.rows .s { color: var(--text-dim); font-size: 13px; }
html[data-site-theme="castle"] body .mono { font-family: var(--castle-read-font) !important; font-size-adjust: none !important; font-size: 12px; word-break: break-all; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 860px) { .acct { grid-template-columns: 1fr; } }

/* ── Cart drawer, dialogs, toast (Throned's pop-up surface) ── */
.scrim { position: fixed; inset: 0; z-index: 1190; display: none; background: rgba(var(--castle-ink-rgb), 0.6); }
.scrim.on { display: block; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1200; width: min(420px, 100%); display: flex; flex-direction: column;
  background: var(--bg-popup); box-shadow: inset 2px 0 0 var(--castle-ink), -6px 0 0 rgba(0, 0, 0, 0.3); transform: translateX(105%); transition: transform 0.22s;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.drawer.on { transform: none; }
.dhead { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 2px solid var(--castle-ink); }
.dhead h2 { margin: 0; font-size: 28px; font-weight: 400; color: var(--text-primary); }
.tb-close { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 2px; background: var(--bg-chip); color: var(--text-primary); box-shadow: var(--castle-block); cursor: pointer; }
.tb-close svg { width: 16px; height: 16px; }
.dbody { flex: 1; overflow: auto; padding: 6px 18px; }
.line { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 2px solid rgba(var(--castle-ink-rgb), 0.7); }
.line .art { width: 54px; height: 54px; display: grid; place-items: center; font-size: 28px; background: var(--bg-input); box-shadow: inset 0 0 0 2px var(--r, var(--castle-ink)); border-radius: 2px; }
.line .t { font-size: 17px; line-height: 1.05; color: var(--text-primary); }
.line .s { font-size: 13px; color: var(--text-dim); }
.qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty button { width: 28px; height: 28px; border: 0; border-radius: 2px; background: var(--bg-chip); color: var(--text-primary); box-shadow: var(--castle-block); cursor: pointer; }
.line .amt { text-align: right; font-size: 17px; color: var(--gold-light); }
.dfoot { padding: 14px 18px; border-top: 2px solid var(--castle-ink); }
.sum { display: flex; justify-content: space-between; padding: 3px 0; color: var(--text-muted); font-size: 16px; }
.sum.total { color: var(--text-primary); font-size: 26px; margin: 6px 0 12px; }
.nudge { font-size: 14px; padding: 8px 10px; margin-bottom: 10px; color: var(--text-muted); background: var(--bg-input); box-shadow: var(--tb-slot-shadow); border-radius: 2px; }
.nudge a { color: var(--gold-light); }
.modal { position: fixed; inset: 0; z-index: 1300; display: none; place-items: safe center; padding: 16px; background: rgba(var(--castle-ink-rgb), 0.72); }
.modal.on { display: grid; }
.sheet { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; border-radius: 2px; background: var(--bg-popup); box-shadow: inset 0 0 0 2px var(--castle-ink), inset 0 0 0 4px var(--border-strong), 6px 6px 0 rgba(0, 0, 0, 0.45); }
.sheet h2 { margin: 0 0 4px; font-size: 32px; font-weight: 400; color: var(--text-primary); }
.sheet .sub { margin: 0 0 16px; color: var(--text-muted); font-size: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 16px; color: var(--text-muted); }
.field input, .field select { border: 0; outline: none; background: var(--bg-input); color: var(--text-primary); box-shadow: var(--tb-slot-shadow); border-radius: 2px; padding: 12px; font-size: 16px; }
.field input:focus { box-shadow: var(--tb-slot-shadow), 0 0 0 2px var(--focus-ring); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text-muted); margin: 6px 0 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.err { color: #ff7a74; font-size: 15px; min-height: 20px; margin: 4px 0 8px; }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
#payEl { margin: 8px 0 16px; min-height: 60px; }
.mocknote { padding: 12px; margin-bottom: 14px; font-size: 15px; color: var(--text-muted); background: var(--bg-input); box-shadow: var(--tb-slot-shadow); border-radius: 2px; }
@media (max-width: 460px) { .amounts { grid-template-columns: repeat(2, 1fr); } .two { grid-template-columns: 1fr; } }
.toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); z-index: 1400; transform: translateX(-50%) translateY(14px); opacity: 0; pointer-events: none;
  max-width: 90vw; text-align: center; padding: 12px 18px; font-size: 17px; border-radius: 2px; background: var(--bg-popup); color: var(--text-primary);
  box-shadow: inset 0 0 0 2px var(--castle-ink), inset 0 0 0 4px var(--accent), 4px 4px 0 rgba(0, 0, 0, 0.42); transition: opacity 0.15s, transform 0.15s; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.installbar { position: fixed; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 1150; display: flex; gap: 12px; align-items: center; padding: 12px 14px;
  font-size: 15px; color: var(--text-primary); background: var(--bg-popup); box-shadow: inset 0 0 0 2px var(--castle-ink), 4px 4px 0 rgba(0, 0, 0, 0.42); border-radius: 2px; }
.installbar span { flex: 1; }
@media (prefers-reduced-motion: reduce) { .drawer, .toast { transition: none; } }

/* product photos (pixel covers) in small frames */
.line .art, .vitem .art, .feeditem .fe { overflow: hidden; }
.line .art img, .feeditem .fe img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.vitem .art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.dealcard .art img, .deal .pick .art img { width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: 50% 26%; }
.dealcard .art, .deal .pick .art { overflow: hidden; }
.pd .bigart img { object-position: 50% 30%; }

/* Headings and pack titles in Compacz Display Bold, the brand typeface drawn from the COMPACZ logo lettering
   (Compacz logo pack, 08-fonts). Off-white letters with the logo's ink outline and its navy shadow down-right. */
@font-face { font-family: "Compacz Display"; src: url("/fonts/compacz-display/CompaczDisplay-Bold.woff2") format("woff2"), url("/fonts/compacz-display/CompaczDisplay-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap; }
html[data-site-theme="castle"] body :is(.pagehead h1, .section-title h2, .pd h1, .pluscard h2, .sheet h2, .dhead h2, .packart .pn, .packart .pn *):not(#gz-read-font) {
  font-family: "Compacz Display", var(--castle-font) !important; font-size-adjust: none !important; font-weight: 700 !important; font-synthesis: none !important;
  font-kerning: normal; letter-spacing: 0.01em !important; text-transform: uppercase; color: #eef2f8; }
html[data-site-theme="castle"] body :is(.pagehead h1, .section-title h2, .pd h1, .pluscard h2, .sheet h2, .dhead h2):not(#gz-read-font) {
  text-shadow: 0.05em 0 0 #0a0f1c, -0.05em 0 0 #0a0f1c, 0 0.05em 0 #0a0f1c, 0 -0.05em 0 #0a0f1c, 0.09em 0.1em 0 #0a0f1c; }
html[data-site-theme="castle"] body .pagehead h1:not(#gz-read-font) { font-size: clamp(34px, 4.2vw, 50px); line-height: 1; }
html[data-site-theme="castle"] body .section-title h2:not(#gz-read-font) { font-size: 26px !important; line-height: 1 !important; }
html[data-site-theme="castle"] body .pd h1:not(#gz-read-font) { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.05; }
html[data-site-theme="castle"] body .pluscard h2:not(#gz-read-font) { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.08; }
html[data-site-theme="castle"] body :is(.sheet h2, .dhead h2):not(#gz-read-font) { font-size: 26px; line-height: 1.05; }
html[data-site-theme="castle"] body .packart .pn:not(#gz-read-font) { font-size: 15cqw; line-height: 1; gap: 1.5cqw; -webkit-text-stroke: 0;
  text-shadow: 0.9cqw 0 0 #0a0f1c, -0.9cqw 0 0 #0a0f1c, 0 0.9cqw 0 #0a0f1c, 0 -0.9cqw 0 #0a0f1c, 1.6cqw 1.8cqw 0 #0a0f1c; }
.packart .pn .arc-line > span { transform: none; }

/* Prices under the cards: big and centred */
.tb-foot .tb-amt { display: block; width: 100%; text-align: center; font-size: 30px; line-height: 1; color: var(--text-primary); text-shadow: 2px 2px 0 var(--castle-ink); }
.dealcard .pr { font-size: 26px; text-align: center; }

/* Header: the COMPACZ wordmark alone (no "by THRONED"), at its own shape */
html .header-logo-img, html .mobile-header__logo { aspect-ratio: 2001 / 489 !important; translate: 0 0 !important; }
html .header-logo-img { height: 36px !important; max-width: 26vw !important; }
html .mobile-header__logo, html .mobile-header--logged-out .mobile-header__logo { height: 28px !important; max-width: min(42vw, 100%) !important; }
/* Banner: the full "Compacz by THRONED" logo where the headline was, and a green Join */
.tb-hero-logo { margin: 0 0 10px; line-height: 0; }
.tb-hero-logo__img { display: block; width: min(460px, 78vw); height: auto; margin: 0 auto; filter: drop-shadow(0 6px 0 rgba(var(--castle-ink-rgb), 0.6)); }
html[data-site-theme="castle"] .home-hero__register.tb-go { background: #23a065; color: #fff; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45); text-decoration: none; }
@media (max-width: 480px) { html[data-site-theme="castle"] body .section-title h2:not(#gz-read-font) { font-size: 20px !important; white-space: nowrap; } }

/* ── Consistency pass: every card title the same size on the same lines, every price the same smaller size ── */
:root { --tb-title-size: 15.5cqw; }
.tb-tile .slot-colour-cover__title { white-space: nowrap; }
.tb-tile .slot-colour-cover__title > span { overflow: hidden; text-overflow: clip; }
html[data-site-theme="castle"] body .packart .pn:not(#gz-read-font) { font-size: 11.5cqw !important; top: 7%; white-space: nowrap; }
.packart .pn .arc-line { justify-content: center; }
.tb-foot .tb-amt { font-size: 22px; }
.dealcard .pr { font-size: 20px; }
