/* vaultra.gg/store (D-083). Loaded after site.css, whose tokens it uses. Solid panels, no glass or blur (D-002). */

[hidden] { display: none !important; } /* the script toggles hidden on elements this sheet lays out with flex or grid */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 30; padding: 10px 16px; border-radius: 8px; background: var(--gold); color: var(--steel); font-weight: 700; }
.skip:focus { top: 12px; color: var(--steel); }

/* ---- Store bar: the account and the cart, pinned under the site header ---- */
.store-bar { position: sticky; top: 68px; z-index: 9; background: var(--steel); border-bottom: 1px solid var(--line); }
.store-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 8px 0; }
.account { display: flex; align-items: center; min-width: 0; }

.btn-steam {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 8px;
  background: #171A21; color: #FFFFFF; border: 1px solid #2E3A4A;
  font: 600 14px/1 var(--body); letter-spacing: 0.01em; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.btn-steam:hover { color: #FFFFFF; background: #1B2838; border-color: #66C0F4; }
.btn-steam svg { flex: none; color: #C7D5E0; }
.btn-steam.wide { width: 100%; justify-content: center; padding: 14px 16px; }

.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-avatar { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); object-fit: cover; flex: none; }
.who-text { display: grid; min-width: 0; line-height: 1.2; }
.who-label { font: 600 11px/1.2 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.who-name { font: 600 15px/1.25 var(--body); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34ch; }
.link-btn { background: none; border: 0; padding: 6px 8px; border-radius: 6px; color: var(--muted); font: 500 13px/1 var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }

.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px 10px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer;
  font: 700 13px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; flex: none;
  transition: border-color 0.2s, background 0.2s;
}
.cart-btn:hover { border-color: var(--gold); background: var(--surface-2); }
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px;
  background: var(--line); color: var(--text); font: 700 12px/1 var(--body); letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.cart-count.has { background: var(--gold); color: var(--steel); }
.cart-count.bump { animation: bump 0.45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.3); } }

/* ---- Status banner (sign-in, checkout return) ---- */
.banner {
  display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 0; padding: 14px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--teal); color: var(--text); font-size: 15px;
}
.banner.ok { border-left-color: var(--teal); }
.banner.warn { border-left-color: var(--gold); }
.banner.err { border-left-color: #FF8A66; }
.banner strong { font-family: var(--display); letter-spacing: 0.02em; }
.banner .banner-close { margin-left: auto; flex: none; }

/* ---- Hero ---- */
.store-hero { padding: 28px 0 8px; }
.hero-panel {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 20px; border: 1px solid var(--line);
  background:
    radial-gradient(520px 360px at 78% 50%, rgba(232, 181, 74, 0.16), transparent 70%),
    linear-gradient(180deg, #0E131B, var(--steel));
  min-height: clamp(380px, 37.5vw, 440px); display: flex; align-items: center;
}
.hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 50%; }
.hero-panel::after { /* keeps the copy side calm whatever the art does */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(10, 13, 19, 0.92) 0%, rgba(10, 13, 19, 0.7) 38%, rgba(10, 13, 19, 0) 62%);
}
.hero-copy-store { max-width: 520px; padding: 44px 48px; animation: rise 0.9s var(--ease) 0.05s both; }
.hero-copy-store h1 { margin: 14px 0 14px; font: 700 clamp(38px, 5.2vw, 62px)/1.0 var(--display); letter-spacing: 0.01em; }
.hero-copy-store h1 .gold { color: var(--gold); }
.hero-copy-store .lede { font-size: 18px; margin-bottom: 26px; color: #B7C2D0; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 24px 0 0; color: var(--muted); font-size: 13.5px; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

/* ---- Sections ---- */
.store-section { padding: 64px 0 8px; scroll-margin-top: 128px; } /* clears the sticky site header and store bar */
.store-section .section-head { margin-bottom: 28px; }
.store-section h2 { font-size: clamp(28px, 3.4vw, 38px); }
.section-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-bottom: 28px; }
.section-row .section-head { margin-bottom: 0; }

/* Billing switch: two radios drawn as a segmented control. */
.billing { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: min(100%, 380px); }
.billing legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.billing label { position: relative; cursor: pointer; }
.billing input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.billing span {
  display: grid; gap: 3px; padding: 10px 14px; border-radius: 9px; text-align: center;
  font: 700 14px/1.1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.billing small { font: 500 12px/1.2 var(--body); letter-spacing: 0; text-transform: none; color: inherit; opacity: 0.85; }
.billing input:checked + span { background: var(--steel); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(232, 181, 74, 0.45); }
.billing input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.billing label:hover input:not(:checked) + span { color: var(--text); }

/* Prices and button labels follow the billing switch; monthly is the default (and the no-JS view). */
[data-billing="pass"] { display: none; }
html[data-billing-mode="pass"] [data-billing="monthly"] { display: none; }
html[data-billing-mode="pass"] [data-billing="pass"] { display: inline; }

/* ---- VIP tier cards ---- */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.tier-card {
  position: relative; display: flex; flex-direction: column; padding: 24px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--tier);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.tier-card:hover { transform: translateY(-3px); border-color: #3A485C; border-top-color: var(--tier); }
.tier-card.is-featured { background: var(--surface-2); border-color: rgba(232, 181, 74, 0.55); border-top-color: var(--tier); box-shadow: 0 24px 60px -36px rgba(232, 181, 74, 0.55); }
.tier-flag {
  position: absolute; top: -13px; right: 20px; padding: 6px 12px; border-radius: 999px;
  background: var(--gold); color: var(--steel); font: 700 12px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase;
}
.tier-top { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.tier-top .art { width: 92px; height: 92px; flex: none; border-radius: 22px; }
.tier-rank { font: 700 12px/1 var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.tier-card h3 { margin: 6px 0 6px; font: 700 26px/1.05 var(--display); color: var(--tier); letter-spacing: 0.02em; }
.tier-cost { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.tier-cost .amount { font: 700 34px/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.tier-cost .per { font-size: 13.5px; color: var(--muted); }
.tier-lead { margin: 0 0 8px; font: 700 12.5px/1.2 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.perks { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 9px; flex: 1; }
.perks li { position: relative; padding-left: 26px; font-size: 14.5px; line-height: 1.45; color: #C9D3DF; }
.perks li::before {
  content: ""; position: absolute; left: 2px; top: 4px; width: 14px; height: 14px; border-radius: 4px;
  background: color-mix(in srgb, var(--tier) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tier) 55%, transparent);
}
.perks li::after { content: ""; position: absolute; left: 6.5px; top: 6.5px; width: 4px; height: 7px; border: solid var(--tier); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.add { justify-content: center; width: 100%; }
.add .add-kind { font-weight: 500; opacity: 0.8; }
.add[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.add.added { background: var(--teal); color: var(--steel); border-color: var(--teal); }

/* Compare table */
.compare { margin-top: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.compare > summary {
  list-style: none; cursor: pointer; padding: 16px 20px; border-radius: 14px;
  font: 700 14px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
}
.compare > summary::-webkit-details-marker { display: none; }
.compare > summary::after { content: "+"; font: 400 22px/1 var(--body); color: var(--gold); }
.compare[open] > summary::after { content: "\2212"; }
.compare .table-wrap { margin: 0 16px 8px; background: var(--steel); }
.compare .swatches, .compare .fine { margin-left: 20px; margin-right: 20px; }
.compare .fine { padding-bottom: 14px; }
.perk-table th[scope="row"] { color: var(--text); font: 600 14px/1.3 var(--body); letter-spacing: 0; text-transform: none; background: transparent; white-space: nowrap; }
.perk-table thead th { background: var(--surface); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; }
.swatches span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); }
.fine { font-size: 14px; color: var(--muted); }

/* ---- Token packs ---- */
.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pack-card {
  display: grid; justify-items: center; text-align: center; gap: 4px; padding: 26px 22px 22px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.pack-card:hover { transform: translateY(-3px); border-color: rgba(232, 181, 74, 0.45); }
.pack-card .art { width: 128px; height: 128px; border-radius: 28px; margin-bottom: 10px; }
.pack-card h3 { margin: 0; font: 700 30px/1 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.pack-card h3 span { font-size: 16px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.pack-bonus { margin: 6px 0 0; font: 600 13px/1.2 var(--body); color: var(--teal); }
.pack-price { margin: 10px 0 16px; font: 700 24px/1 var(--display); color: var(--text); }
.pack-price span { font: 500 13px/1 var(--body); color: var(--muted); }

/* ---- Subscriptions ---- */
.subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.subs li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.subs .sub-name { font: 700 17px/1.2 var(--display); }
.subs .sub-meta { color: var(--muted); font-size: 14px; }
.subs .btn { margin-left: auto; padding: 10px 16px; font-size: 13px; }
.subs .empty { color: var(--muted); }

/* ---- FAQ and rules ---- */
.faq-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; padding-bottom: 56px; }
.faq { display: grid; gap: 8px; }
.faq details { border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 48px 16px 18px; position: relative;
  font: 600 16px/1.35 var(--body); color: var(--text); border-radius: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font: 400 22px/1 var(--body); color: var(--gold); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0; padding: 0 18px 18px; color: #C9D3DF; font-size: 15px; }
.rules-card { position: sticky; top: 148px; padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.rules-card h2 { margin: 0 0 14px; font-size: 22px; }
.checks { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 22px; font-size: 14.5px; color: #C9D3DF; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 8px; height: 8px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }
.rules-card .note { margin: 0 0 12px; font-size: 14px; }

/* ---- Cart drawer: a modal dialog sliding in from the right ---- */
.drawer {
  margin: 0 0 0 auto; padding: 0; height: 100dvh; max-height: 100dvh; width: min(440px, 100vw); max-width: 100vw;
  border: 0; border-left: 1px solid var(--line); background: var(--steel); color: var(--text);
}
.drawer::backdrop { background: rgba(5, 7, 10, 0.72); }
.drawer[open] { animation: slide-in 0.35s var(--ease); }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-inner { display: flex; flex-direction: column; height: 100%; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 22px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--teal); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.cart-empty { color: var(--muted); margin: 8px 0; }
.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cart-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.cart-line img { width: 56px; height: 56px; border-radius: 12px; }
.cart-line .name { font: 700 16px/1.2 var(--display); }
.cart-line .kind { font-size: 13px; color: var(--muted); }
.cart-line .price { font: 700 17px/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.line-tools { grid-column: 2 / 4; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { width: 32px; height: 30px; background: var(--steel); border: 0; color: var(--text); cursor: pointer; font: 600 16px/1 var(--body); }
.qty button:hover:not([disabled]) { background: var(--surface-2); }
.qty button[disabled] { opacity: 0.4; cursor: not-allowed; }
.qty output { min-width: 30px; text-align: center; font: 600 14px/1 var(--body); font-variant-numeric: tabular-nums; }
.seg-mini { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-mini button { padding: 7px 10px; background: var(--steel); border: 0; color: var(--muted); font: 600 12.5px/1 var(--body); cursor: pointer; }
.seg-mini button[aria-pressed="true"] { background: var(--surface-2); color: var(--gold); }
.remove { margin-left: auto; }
.drawer-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); display: grid; gap: 10px; background: var(--surface); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total span { font: 700 13px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cart-total strong { font: 700 30px/1 var(--display); font-variant-numeric: tabular-nums; }
.cart-note { margin: 0; font-size: 13px; color: var(--muted); }
.cart-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: rgba(255, 138, 102, 0.12); border: 1px solid rgba(255, 138, 102, 0.45); color: #FFD2C4; font-size: 14px; }
.checkout { justify-content: center; width: 100%; }
.checkout[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.drawer-foot .fine { margin: 0; font-size: 12.5px; text-align: center; }

.store-page .site-footer { margin-top: 24px; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .tier-grid, .pack-grid { grid-template-columns: 1fr; max-width: 560px; }
  .tier-card.is-featured { order: -1; }
  .faq-grid { grid-template-columns: 1fr; }
  .rules-card { position: static; }
  .hero-panel { min-height: 0; align-items: flex-end; }
  .hero-art img { object-position: 85% 50%; }
  .hero-panel::after { background: linear-gradient(180deg, rgba(10, 13, 19, 0.25) 0%, rgba(10, 13, 19, 0.82) 45%, rgba(10, 13, 19, 0.96) 100%); }
  .hero-copy-store { padding: 180px 28px 28px; max-width: none; }
  .pack-card { grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 18px; align-items: center; }
  .pack-card .art { grid-row: 1 / 5; width: 96px; height: 96px; margin: 0; border-radius: 22px; }
  .pack-card .add { grid-column: 1 / 3; margin-top: 8px; }
  .pack-price { margin: 6px 0 0; }
}
@media (max-width: 560px) {
  .store-bar { top: 68px; }
  .store-bar-inner { min-height: 56px; }
  .btn-steam { padding: 9px 12px; font-size: 13px; }
  .who-label { display: none; }
  .who-name { max-width: 16ch; font-size: 14px; }
  .cart-btn > span:not(.cart-count) { display: none; }
  .hero-copy-store { padding: 140px 20px 22px; }
  .hero-copy-store .lede { font-size: 16px; }
  .trust { gap: 6px 14px; font-size: 13px; }
  .tier-card { padding: 20px 18px; }
  .tier-top .art { width: 76px; height: 76px; border-radius: 18px; }
  .tier-card h3 { font-size: 23px; }
  .tier-cost .amount { font-size: 30px; }
  .billing { width: 100%; }
  .billing span { padding: 10px 8px; font-size: 13px; }
  .store-section { padding-top: 48px; }
  .cart-line { grid-template-columns: 48px 1fr auto; gap: 10px; }
  .cart-line img { width: 48px; height: 48px; }
  .compare .table-wrap { margin: 0 10px 8px; }
}
@media (max-width: 380px) {
  .btn-steam span { font-size: 12.5px; }
  .pack-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .pack-card .art { grid-row: auto; }
  .pack-card .add { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer[open], .cart-count.bump, .hero-copy-store { animation: none !important; }
}
