/* SeaFury shop — ember/gold theme built around the SF medallion.
   No external assets, no inline styles, strict-CSP friendly. */
:root {
  --bg: #080605;
  --bg-2: #120d09;
  --panel: #17110c;
  --panel-2: #221709;
  --line: #3b2a1b;
  --line-soft: #2a1e14;
  --ink: #f7efe2;
  --muted: #b9a184;
  --gold: #f4c76b;
  --gold-2: #d9a53c;
  --ember: #ff8a3d;
  --ember-deep: #c2410c;
  --ok: #7ee0a8;
  --danger: #ff8f8f;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(255, 138, 61, .20) 0%, transparent 62%),
    radial-gradient(760px 460px at 100% 0%, rgba(194, 65, 12, .18) 0%, transparent 58%),
    radial-gradient(1000px 700px at 50% 120%, rgba(244, 199, 107, .07) 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }

/* ---------- header ---------- */
header.site {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 6, 5, .72);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}
header.site .wrap { display: flex; align-items: center; gap: 18px; min-height: 70px; }

.brand {
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 15px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 32px; height: 32px; flex: none;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--gold), var(--gold-2));
  box-shadow: 0 0 20px rgba(244, 199, 107, .28);
}

nav.main { margin-left: auto; display: flex; align-items: center; gap: 4px; }
nav.main a, nav.main button.linklike {
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
}
nav.main a:hover, nav.main button.linklike:hover {
  color: var(--ink);
  background: var(--panel);
  text-decoration: none;
}
nav.main a.active {
  color: #1a1206;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  font-weight: 650;
}
.who {
  color: var(--muted);
  font-size: 13px;
  border-left: 1px solid var(--line);
  padding-left: 14px;
  margin-left: 8px;
}
.who b { color: var(--ink); font-weight: 600; }

/* ---------- layout ---------- */
main { flex: 1 0 auto; padding: 34px 0 70px; }
footer.site {
  border-top: 1px solid var(--line-soft);
  color: #7d6a56;
  font-size: 12px;
  padding: 18px 0;
}

h1 { font-size: 30px; margin: 0 0 6px; letter-spacing: -.015em; }
h2 { font-size: 19px; margin: 0 0 14px; }
.lede { color: var(--muted); margin: 0 0 26px; }

.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.panel + .panel { margin-top: 22px; }

/* ---------- login ---------- */
.auth { max-width: 430px; margin: 7vh auto 0; }
.auth .panel { padding: 32px; }
.auth .brand { justify-content: center; margin-bottom: 20px; font-size: 17px; }
.auth .brand .mark { width: 44px; height: 44px; border-radius: 13px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #0c0806;
  color: var(--ink);
  font: inherit;
  outline: none;
}
.field input:focus {
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(255, 138, 61, .16);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 12px;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: #1a1206;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  box-shadow: 0 10px 24px rgba(217, 165, 60, .18);
  cursor: pointer;
  transition: filter .15s ease, transform .05s ease;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--ember); }

.alert {
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert.error { background: rgba(255, 143, 143, .09); border-color: rgba(255, 143, 143, .35); color: #ffc9c9; }
.alert.ok    { background: rgba(126, 224, 168, .09); border-color: rgba(126, 224, 168, .32); color: #c7f4da; }
.alert.info  { background: rgba(255, 138, 61, .09); border-color: rgba(255, 138, 61, .32); color: #ffd9bf; }

.hint { color: var(--muted); font-size: 13px; margin-top: 16px; text-align: center; }

/* ---------- shop hero ---------- */
.shop-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  padding: 22px 24px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(600px 220px at 0% 0%, rgba(255, 138, 61, .16), transparent 70%),
    linear-gradient(180deg, #1d1409, #120d09);
}
.shop-hero .eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 4px;
}
.shop-hero h1 { font-size: 28px; margin: 0 0 2px; }
.shop-hero .sub { color: var(--muted); font-size: 14px; }
.shop-hero .wallet {
  margin-left: auto;
  text-align: right;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .25);
}
.shop-hero .wallet .k {
  display: block;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.shop-hero .wallet b {
  font-size: 26px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* ---------- profile ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 26px; }
.avatar {
  width: 66px; height: 66px; flex: none;
  border-radius: 20px;
  display: grid; place-items: center;
  font-size: 27px; font-weight: 800;
  color: #1a1206;
  background: linear-gradient(140deg, #ffe3a3, var(--gold-2));
  box-shadow: 0 10px 30px rgba(244, 199, 107, .22);
}
.hero .meta { min-width: 0; }
.hero .meta h1 { margin-bottom: 2px; overflow-wrap: anywhere; }
.hero .meta .sub { color: var(--muted); font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 14px; }
.stat {
  background: linear-gradient(180deg, rgba(255, 138, 61, .05), rgba(0, 0, 0, .12));
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px 18px;
}
.stat .k {
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.stat .v {
  font-size: 24px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.15;
}
.stat .v.gold { color: var(--gold); }
.stat .v.teal { color: var(--ember); }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 4px; }

.bar { height: 7px; border-radius: 99px; background: #0b0705; border: 1px solid var(--line); overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember), var(--gold)); }

/* ---------- shop grid ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head .balance { margin-left: auto; color: var(--muted); font-size: 14px; }
.section-head .balance b { color: var(--gold); font-size: 17px; }

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid-4 { grid-template-columns: 1fr; } }

.pack {
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(340px 180px at 50% -30%, rgba(255, 138, 61, .16), transparent 70%),
    linear-gradient(180deg, var(--panel-2), #100b07);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 20px 20px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.pack:hover {
  transform: translateY(-3px);
  border-color: var(--gold-2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(244, 199, 107, .25);
}
.pack .tag {
  position: absolute;
  top: -1px; right: 14px;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #1a1206;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  border-radius: 0 0 8px 8px;
  padding: 3px 9px;
  font-weight: 800;
}
.pack-icon {
  width: 78px; height: 78px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  box-shadow: 0 0 0 1px rgba(244, 199, 107, .45), 0 0 30px rgba(255, 138, 61, .32);
}
.pack .amount {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-align: center;
}
.pack .amount small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 5px; }
.pack .bonus { color: var(--ok); font-size: 12px; font-weight: 600; margin-top: 4px; min-height: 18px; text-align: center; }
.pack .price {
  color: var(--gold);
  font-size: 22px;
  font-weight: 750;
  margin: 14px 0 16px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.pack .btn { margin-top: auto; }
.pack form { margin: 0; }

.note { color: var(--muted); font-size: 12px; margin-top: 20px; }
.center { text-align: center; }

/* ---------- error ---------- */
.err-page { max-width: 560px; margin: 10vh auto 0; text-align: center; }
.err-page .code { font-size: 64px; font-weight: 800; color: var(--gold); line-height: 1; margin-bottom: 10px; }

/* ---------- utility classes (CSP forbids inline styles) ---------- */
.btn.btn-auto { width: auto; }
.btn-wide { padding-inline: 26px; }
.auth-title { text-align: center; font-size: 22px; }
.mb-lg { margin-bottom: 22px; }
.v-muted { font-size: 18px; color: var(--muted); }
.gold-text { color: var(--gold); }
.v-sub { font-size: 13px; color: var(--muted); }
.cta-row {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
h2.tight { margin-bottom: 4px; }
.lede.flush { margin: 0; }
.shop-hero .wallet .walletsub { color: var(--muted); font-size: 13px; }