:root {
  color-scheme: dark;
  --bg: #09090b;
  --panel: #121216;
  --subtle: #1a1a21;
  --edge: #2a2933;
  --text: #f7f5fb;
  --muted: #aaa7b5;
  --accent: #c5b5ff;
  --good: #b7efce;
  --error: #ffb4be;
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .46; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.frame { max-width: 1160px; width: calc(100% - 72px); margin-inline: auto; }
.masthead { border-bottom: 1px solid var(--edge); }
.bar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 13px; font-size: .88rem; font-weight: 650; }
.brand img { width: 108px; height: auto; }
.brand span { padding-left: 13px; border-left: 1px solid var(--edge); color: var(--muted); }
.quiet-link, .footer { color: var(--muted); font-size: .875rem; }
.quiet-link:hover, .footer a:hover { color: var(--text); }
main.frame { flex: 1; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(345px, 430px); gap: clamp(36px, 8vw, 115px); padding: 85px 0 90px; align-items: center; }
.eyebrow { color: var(--accent); font-size: .875rem; font-weight: 700; margin-bottom: 13px; }
h1 { font-size: clamp(3rem, 6vw, 5.2rem); line-height: 1.01; letter-spacing: -.075em; font-weight: 790; }
.lede { color: var(--muted); margin-top: 21px; max-width: 40ch; line-height: 1.65; }
.rates { margin: 36px 0 0; border-top: 1px solid var(--edge); max-width: 435px; }
.rates div { display: flex; justify-content: space-between; column-gap: 22px; border-bottom: 1px solid var(--edge); padding: 13px 0; }
.rates dt { color: var(--muted); }
.rates dd { color: var(--accent); margin: 0; white-space: nowrap; font-weight: 650; font-variant-numeric: tabular-nums; }
.match-note { font-size: .875rem; }
.panel { background: var(--panel); border: 1px solid var(--edge); border-radius: 17px; padding: 26px; }
.auth { box-shadow: 0 28px 95px #0006; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg); border: 1px solid var(--edge); padding: 4px; border-radius: 10px; margin-bottom: 24px; }
.tab { border: 0; border-radius: 6px; background: transparent; color: var(--muted); min-height: 40px; font-size: .875rem; }
.tab.selected { background: var(--subtle); color: var(--text); font-weight: 650; }
h2 { font-size: 1.28rem; line-height: 1.25; letter-spacing: -.025em; }
#auth-help, .muted { color: var(--muted); margin-top: 8px; }
form { display: grid; gap: 13px; margin-top: 22px; }
label { display: grid; gap: 6px; font-size: .875rem; font-weight: 600; }
.select-field { display: grid; gap: 6px; }
input, select { padding: .68rem .75rem; min-width: 0; width: 100%; color: var(--text); background: var(--bg); border: 1px solid var(--edge); border-radius: 8px; font-size: 1rem; }
input::placeholder { color: #777383; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #aaa7b5 50%), linear-gradient(135deg, #aaa7b5 50%, transparent 50%); background-repeat: no-repeat; background-size: 5px 5px; background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; padding-right: 28px; }
.split { display: grid; grid-template-columns: 1fr 1.04fr; gap: 10px; }
.split.single { grid-template-columns: 1fr; }
.primary, .outline { padding: .67rem 1rem; min-height: 44px; border-radius: 8px; font-weight: 720; border: 1px solid transparent; }
.primary { background: var(--accent); color: #140c25; }
.primary:hover:not(:disabled) { background: #ddceff; }
form > .primary { margin-top: 6px; }
.outline { color: var(--text); background: transparent; border-color: var(--edge); }
.outline:hover:not(:disabled) { background: var(--subtle); border-color: #60577a; }
.text-button { border: 0; background: transparent; color: var(--accent); width: fit-content; padding: 7px 0; }
#referral-row summary { color: var(--muted); font-size: .875rem; cursor: pointer; }
#referral-row label { margin-top: 9px; }
.status { margin-top: 13px; font-size: .9rem; color: var(--good); }
.status:empty { display: none; }
.status.error { color: var(--error); }
#dashboard { padding: 56px 0 74px; }
.dashboard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 32px; }
.dashboard-head h1 { font-size: clamp(2.4rem, 5vw, 4.25rem); }
.dashboard-head .lede { max-width: none; margin-top: 12px; }
.wallet-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 15px; }
.wallet h2, .checkin h2 { font-size: 1.07rem; }
.balance { margin-top: 15px; display: flex; align-items: baseline; gap: 7px; color: var(--accent); }
.balance strong { font-size: 3rem; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
progress { appearance: none; accent-color: var(--accent); width: 100%; height: 8px; margin-top: 20px; border: 0; border-radius: 10px; background: var(--edge); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--edge); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.checkin .outline { margin-top: 17px; }
.shop { margin-top: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.filter { border: 1px solid var(--edge); border-radius: 999px; padding: .44rem .87rem; background: var(--bg); color: var(--muted); font-size: .875rem; }
.filter.selected { color: var(--text); background: var(--subtle); border-color: #625683; }
.offers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-top: 18px; }
.offer { display: grid; gap: 8px; }
.offer h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .48rem; font-size: 1rem; }
.offer h3 strong { font-size: 2rem; line-height: 1.1; color: var(--reward-color); letter-spacing: -.05em; }
.offer[data-category="diamonds"] { --reward-color: #c5b5ff; }
.offer[data-category="emblems"] { --reward-color: #9bddcd; }
.offer[data-category="battle-points"] { --reward-color: #e7c58d; }
.offer .outline { margin-top: 8px; }
.invite { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: center; margin-top: 31px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; background: var(--bg); color: var(--muted); }
.copy-row button { white-space: nowrap; }
#invite-count { font-size: .875rem; }
.activity { margin-top: 31px; }
.activity ul { list-style: none; padding: 0; margin: 13px 0 0; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--edge); }
.activity time { display: block; font-size: .875rem; color: var(--muted); }
.activity .credit { color: var(--good); white-space: nowrap; }
.activity .debit { color: var(--muted); white-space: nowrap; }
.footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--edge); padding: 18px 0 22px; }
.footer nav { display: flex; gap: 18px; }
.policy { max-width: 680px; padding-block: 60px; }
.policy p { margin-top: 16px; color: var(--muted); }
.policy h2 { margin-top: 30px; }
.policy h1 { font-size: 3rem; }
@media (max-width: 830px) {
  .entry { grid-template-columns: 1fr; padding: 45px 0 56px; gap: 30px; }
  .rates { max-width: none; }
  .auth { width: 100%; }
  .invite { grid-template-columns: 1fr; gap: 15px; }
  .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .frame { width: calc(100% - 32px); }
  .bar { height: 60px; }
  .panel { padding: 18px; border-radius: 12px; }
  .split { grid-template-columns: 1fr; }
  .wallet-grid, .offers { grid-template-columns: 1fr; }
  .dashboard-head { flex-wrap: wrap; }
}

.site-nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: flex-end; }
.creator { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px 40px; margin-bottom: 42px; scroll-margin-top: 20px; }
.creator form { margin-top: 0; }
.creator .status + form { margin-top: 14px; }
.creator .status:empty + form { margin-top: 0; }
.creator #creator-access a { color: var(--accent); text-decoration: underline; }
textarea { font: inherit; padding: .68rem .75rem; width: 100%; color: var(--text); background: var(--bg); border: 1px solid var(--edge); border-radius: 8px; resize: vertical; }
.field-help { font-size: .875rem; color: var(--muted); }
.review { padding-block: 48px; }
.review h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.review-access { max-width: 430px; }
.review-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 20px; }
.review-card { margin-block: 14px; overflow-wrap: anywhere; }
.review-card p { margin-bottom: 6px; white-space: pre-wrap; }
.review-card a { color: var(--accent); text-decoration: underline; }
#review-list > p { margin: 18px 0; color: var(--muted); }
@media (max-width: 830px) {
  .creator { grid-template-columns: 1fr; }
}
