/* Web shop and gift-code redemption. Mobile-first, shared token set from
   _shared.css, no inline styles anywhere (CSP is style-src 'self'). Every
   pressable thing clears 2.75rem so a thumb hits it on a phone. */

[hidden] { display: none !important; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.shop-page { position: relative; min-height: 100vh; padding: 0 clamp(1.25rem, 4vw, 4rem) 4rem; overflow-x: hidden; }
.shop-page .site-header { z-index: 10; }

.shop-shell { position: relative; z-index: 1; max-width: var(--content-width); margin: 0 auto; }

.shop-intro { max-width: 44rem; padding: clamp(2.5rem, 7vw, 4.5rem) 0 1.75rem; }
.shop-intro h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.shop-lede { max-width: 40rem; color: var(--fg-dim); font-size: 1.02rem; }
.shop-redeem-link { margin: .75rem 0 0; font-size: .95rem; }
.shop-redeem-link a { font-weight: 700; }

.shop-status { margin: 0 0 .65rem; color: var(--fg-dim); font: 700 .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.shop-status:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shop-retry { min-height: 2.75rem; margin: 0 0 1rem; padding: .55rem 1rem; border: 1px solid var(--accent-hot); border-radius: 2px; background: #1b1720; color: var(--accent-hot); font: 800 .72rem/1 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.shop-retry:hover, .shop-retry:focus-visible { background: var(--accent-hot); color: #160d04; }

.shop-list { display: grid; grid-template-columns: 1fr; gap: .85rem; margin-top: .5rem; }

.shop-card { display: grid; gap: .6rem; padding: 1.15rem 1.2rem 1.25rem; border: 1px solid var(--border); border-left: 3px solid var(--accent); background: #0b1421d9; }
.shop-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem .9rem; }
.shop-card-head h2 { margin: 0; padding: 0; border: 0; color: var(--fg); font-size: 1.15rem; text-transform: uppercase; }
.shop-price { color: var(--accent); font: 800 1.35rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.shop-grant { margin: 0; color: var(--accent-hot); font: 800 .78rem/1.4 ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; }
.shop-desc { margin: 0; color: var(--fg-dim); font-size: .93rem; }

.shop-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .25rem; }
.shop-button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .6rem 1rem; border: 1px solid var(--border); border-radius: 2px; background: #111a29cc; color: var(--fg); font: 850 .74rem/1 ui-monospace, monospace; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; cursor: pointer; }
.shop-button:hover, .shop-button:focus-visible { border-color: var(--accent); color: var(--accent); }
.shop-button.is-primary { border-color: #66f4e37a; background: var(--accent); color: #061014; }
.shop-button.is-primary:hover, .shop-button.is-primary:focus-visible { color: #061014; filter: brightness(1.08); }
.shop-button:disabled { cursor: wait; opacity: .6; }

.shop-card-note { margin: 0; color: var(--fg-dim); font-size: .85rem; }
.shop-card-status { min-height: 1.1rem; margin: 0; color: var(--accent-hot); font-size: .85rem; }
.shop-card-status[data-tone="busy"] { color: var(--accent); }

.shop-empty { display: grid; justify-items: start; gap: .7rem; padding: clamp(1.5rem, 5vw, 2.5rem); border: 1px solid var(--border); border-left: 3px solid var(--accent-hot); background: #0b1421d9; }
.shop-empty h2 { margin: 0; padding: 0; border: 0; font-size: 1.3rem; text-transform: uppercase; }
.shop-empty p { margin: 0; max-width: 36rem; color: var(--fg-dim); }

/* ── Gift picker ──────────────────────────────────────────────────────── */

.gift-dialog { width: min(100%, 26rem); max-height: 85vh; padding: 0; border: 1px solid #3a5168; border-top: 3px solid var(--accent); border-radius: 2px; background: #0c1420; color: var(--fg); }
.gift-dialog::backdrop { background: #03060bcc; }
.gift-dialog-form { display: grid; gap: .7rem; padding: clamp(1.1rem, 4vw, 1.6rem); }
.gift-dialog h2 { margin: 0; padding: 0; border: 0; font-size: 1.15rem; text-transform: uppercase; }
.gift-dialog-product { margin: 0; color: var(--accent); font: 800 .82rem/1.4 ui-monospace, monospace; }
.gift-dialog-note { margin: 0; color: var(--fg-dim); font-size: .85rem; }

.gift-target-list { display: grid; gap: .4rem; max-height: 40vh; overflow-y: auto; padding: .15rem; }
.gift-target { display: flex; align-items: center; width: 100%; min-height: 2.75rem; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 2px; background: #08111d; color: var(--fg); font: 700 .88rem/1.2 inherit; text-align: left; cursor: pointer; }
.gift-target:hover, .gift-target:focus-visible { border-color: var(--accent); color: var(--accent); }
.gift-target.is-chosen { border-color: var(--accent); background: #142337; color: var(--accent); box-shadow: inset 3px 0 var(--accent); }

.gift-dialog-echo { min-height: 1.2rem; margin: 0; color: var(--accent-hot); font-size: .88rem; }
.gift-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.gift-dialog-cancel, .gift-dialog-confirm { min-height: 2.75rem; padding: .6rem 1rem; border: 1px solid var(--border); border-radius: 2px; font: 850 .74rem/1 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.gift-dialog-cancel { background: #111a29cc; color: var(--fg); }
.gift-dialog-cancel:hover, .gift-dialog-cancel:focus-visible { border-color: var(--accent); color: var(--accent); }
.gift-dialog-confirm { border-color: #66f4e37a; background: var(--accent); color: #061014; }
.gift-dialog-confirm:disabled { border-color: var(--border); background: #111a29cc; color: var(--fg-dim); cursor: not-allowed; }

/* ── Redeem ───────────────────────────────────────────────────────────── */

.redeem-page { position: relative; min-height: 100vh; padding: 0 clamp(1.25rem, 4vw, 4rem) 4rem; overflow-x: hidden; }
.redeem-page .site-header { z-index: 10; }
.redeem-shell { position: relative; z-index: 1; max-width: 44rem; margin: 0 auto; }
.redeem-intro { padding: clamp(2.5rem, 7vw, 4.5rem) 0 1.5rem; }
.redeem-intro h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); }
.redeem-lede { color: var(--fg-dim); font-size: 1.02rem; }

.redeem-form { display: grid; gap: .8rem; padding: clamp(1.1rem, 4vw, 1.75rem); border: 1px solid var(--border); border-top: 3px solid var(--accent); background: #0b1421d9; }
.redeem-form label { display: grid; gap: .4rem; color: var(--accent-hot); font-size: .68rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.redeem-form input { width: 100%; min-height: 3rem; padding: .7rem .85rem; border: 1px solid #354a60; border-radius: 2px; background: #070c14; color: var(--fg); font: 800 1.05rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; }
.redeem-form input::placeholder { color: #5f7386; letter-spacing: .12em; }
.redeem-form input:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.redeem-hint { margin: 0; color: var(--fg-dim); font-size: .85rem; }
.redeem-submit { min-height: 3rem; border: 1px solid #66f4e37a; border-radius: 2px; background: var(--accent); color: #061014; font: 850 .78rem/1 ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.redeem-submit:hover, .redeem-submit:focus-visible { filter: brightness(1.08); }
.redeem-submit:disabled { cursor: wait; opacity: .65; }

.redeem-status { min-height: 1.4rem; margin: 0; color: var(--accent-hot); font-size: .92rem; }
.redeem-status[data-tone="ok"] { color: var(--accent); }
.redeem-status[data-tone="busy"] { color: var(--fg-dim); }
.redeem-followup { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.redeem-followup a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .6rem 1rem; border: 1px solid var(--border); border-radius: 2px; background: #111a29cc; color: var(--fg); font: 850 .74rem/1 ui-monospace, monospace; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.redeem-followup a:hover, .redeem-followup a:focus-visible { border-color: var(--accent); color: var(--accent); }

.redeem-aside { margin: 1.5rem 0 0; padding: 1rem 1.15rem; border: 1px solid var(--border); border-left: 2px solid var(--accent-hot); background: #0b1421d9; }
.redeem-aside h2 { margin: 0 0 .4rem; padding: 0; border: 0; font-size: .95rem; text-transform: uppercase; }
.redeem-aside p { margin: 0; color: var(--fg-dim); font-size: .9rem; }

@media (min-width: 700px) {
  .shop-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1040px) {
  .shop-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .shop-page .site-header, .redeem-page .site-header { min-height: 4.5rem; }
  .header-link, .login-button { min-height: 2.6rem; padding-inline: .75rem; }
  .shop-actions .shop-button { flex: 1 1 100%; }
}
