:root {
  color-scheme: dark;
  --bg: #0b0f12;
  --surface: #11181d;
  --surface-raised: #151e25;
  --surface-deep: #0c1217;
  --line: #28343d;
  --line-soft: #ffffff10;
  --text: #edf0f2;
  --muted: #98a6b2;
  --faint: #71818e;
  --accent: #dfb57f;
  --accent-bright: #edc895;
  --accent-dark: #211a12;
  font: 14px/1.5 Inter, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 8%, #dfb57f09, transparent 28rem),
    var(--bg);
  color: var(--text);
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
h1, h2, h3, p { margin-top: 0; }
h2 { letter-spacing: -.6px; }
img { max-width: 100%; }
::selection { background: #dfb57f45; color: #fff; }

.portal-nav,
body > nav:not(.account-nav) {
  max-width: 1380px;
  min-height: 96px;
  margin: auto;
  padding: 24px 48px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  font-size: 13px;
}
.brand { display: flex; align-items: center; gap: 12px; letter-spacing: 2.4px; font-size: 13px; font-weight: 700; }
.brand img { object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 34px; color: #bdc6cd; }
.nav-links a, .discord-nav a { transition: color .18s ease; }
.nav-links a:hover, .discord-nav a:hover, .text-link:hover { color: var(--accent-bright); }
.nav-links span, .discord-nav span { color: var(--accent); }

main {
  max-width: 1280px;
  min-height: 75vh;
  margin: 0 auto;
  padding: 72px 48px 88px;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 88px;
}
main > *, .workspace, #member { min-width: 0; }
.intro { padding-top: 20px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 2.2px;
  font-weight: 700;
}
.intro h1 {
  margin: 26px 0;
  font-size: clamp(44px, 5vw, 70px);
  line-height: 1.06;
  letter-spacing: -3.2px;
  font-weight: 500;
}
.intro em { color: var(--accent); font-family: Georgia, serif; font-weight: 400; }
.intro > p:not(.eyebrow) { max-width: 400px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.ember-art { position: relative; margin: 34px 0 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 14px; }
.ember-art > img { display: block; width: 100%; height: 250px; object-fit: cover; }
.ember-art figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(transparent, #080c10f2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}
.ember-art small { margin: 4px 0 0; font-size: 11px; font-weight: 400; letter-spacing: 0; }
.ember-art figcaption > img { object-fit: contain; }
.intro-steps { margin: 34px 0 0; padding: 0; list-style: none; }
.intro-steps li { display: flex; align-items: center; gap: 20px; padding: 13px 0; color: #b1bdc6; border-bottom: 1px solid var(--line-soft); }
.intro-steps li > span { color: var(--accent); font-size: 10px; letter-spacing: 1px; }

.card {
  margin-bottom: 20px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #121a20, #10171c);
  box-shadow: 0 18px 55px #00000012;
}
.card h2 { margin: 8px 0 16px; font-size: 26px; line-height: 1.2; font-weight: 550; }
.card h3 { line-height: 1.35; }
.muted, small { color: var(--muted); line-height: 1.7; }
small { display: block; margin-top: 10px; font-size: 12px; }
.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; }

.tabs { display: flex; gap: 6px; margin: -4px -4px 30px; padding: 5px; border: 1px solid var(--line-soft); border-radius: 10px; background: #0b1116; }
.tabs button { flex: 1; padding: 11px 14px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.tabs .selected { background: #dfb57f18; color: var(--accent-bright); box-shadow: inset 0 0 0 1px #dfb57f24; }
.form-heading { margin-bottom: 26px; }
.form-heading h2 { margin-bottom: 10px; }
.form-heading .muted { margin-bottom: 0; }
label { display: block; margin: 19px 0 8px; color: #c8d1d8; font-size: 13px; }
input, textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid #34434e;
  border-radius: 8px;
  outline: none;
  background: #0b1217;
  color: var(--text);
  resize: vertical;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input::placeholder, textarea::placeholder { color: #657581; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #dfb57f14; }
input[readonly] { cursor: default; }
.optional { float: right; color: var(--faint); font-size: 11px; font-weight: 400; }

.primary, .secondary, .quiet {
  border-radius: 8px;
  padding: 12px 16px;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.primary {
  display: block;
  width: 100%;
  margin-top: 24px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #19150f;
  text-align: center;
  font-weight: 700;
}
.primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); transform: translateY(-1px); }
.secondary { border: 1px solid #3a4a56; background: #19242c; color: #dbe3e9; }
.secondary:hover { border-color: #60717e; background: #202e38; }
.quiet { border: 0; background: transparent; color: #aab8c3; }
.quiet:hover { color: var(--text); background: #ffffff08; }
.form-link { display: block; margin: 10px auto 0; font-size: 13px; }
.text-link { display: inline-flex; align-items: center; gap: 12px; color: var(--accent); font-size: 13px; font-weight: 600; }
.heading, .section-heading, .detail-heading, .actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.actions { justify-content: flex-start; flex-wrap: wrap; }
.section-heading { align-items: flex-start; }
.section-heading h2 { margin-bottom: 0; }
.section-mark { color: #596873; font-family: Georgia, serif; font-size: 24px; font-style: italic; }
.human-check { min-height: 65px; margin: 4px 0 2px; }
.loading, .empty-state { color: var(--muted); line-height: 1.7; }
.loading { display: flex; align-items: center; gap: 12px; }
.loading-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px #dfb57f12; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .4; } }

#notice {
  position: fixed;
  z-index: 20;
  top: 104px;
  right: 28px;
  max-width: 440px;
  margin: 0;
  padding: 16px 20px;
  border: 1px solid #9e8057;
  border-radius: 10px;
  background: #251e15f5;
  box-shadow: 0 16px 50px #00000055;
  color: #eddbc1;
  line-height: 1.6;
  backdrop-filter: blur(16px);
}

body[data-view="member"] main { display: block; max-width: 1380px; padding-top: 52px; }
body[data-view="member"] .intro { display: none; }
.member-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.member-heading h1 { margin: 12px 0 16px; font-size: clamp(36px, 4.3vw, 58px); line-height: 1.1; letter-spacing: -2.4px; font-weight: 450; overflow-wrap: anywhere; }
.member-heading h1 > span { color: var(--accent); font-family: Georgia, serif; font-style: italic; font-weight: 400; }
.member-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; color: var(--muted); }
#member-email { overflow-wrap: anywhere; }
.member-actions { display: flex; align-items: center; gap: 8px; padding-bottom: 3px; flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid #dfb57f2e; border-radius: 30px; background: #dfb57f12; color: var(--accent-bright); font-size: 11px; font-weight: 650; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge[data-state="approved"] { border-color: #7db89135; background: #77b88912; color: #a5d4ad; }
.badge[data-state="rejected"], .badge[data-state="revoked"] { border-color: #c37c7435; background: #c37c7412; color: #daa19a; }
.account-nav { display: flex; gap: 32px; margin: 38px 0 0; border-bottom: 1px solid var(--line); }
.account-nav a { position: relative; padding: 0 2px 15px; color: var(--muted); font-size: 13px; }
.account-nav a:hover, .account-nav .active { color: var(--text); }
.account-nav .active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--accent); }
.account-status-row { min-height: 74px; padding: 22px 2px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.account-status-row p { margin: 0; color: #b5c0c8; line-height: 1.7; }
.account-status-row .secondary { flex-shrink: 0; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .78fr); gap: 20px; align-items: start; }
.dashboard-primary, .dashboard-sidebar { min-width: 0; }
.access-card { position: relative; overflow: hidden; background: radial-gradient(circle at 100% 0, #dfb57f0c, transparent 22rem), linear-gradient(145deg, #131c22, #10171c); }
.download-card {
  margin: 26px 0 20px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px 24px;
  border: 1px solid #dfb57f30;
  border-radius: 12px;
  background: linear-gradient(105deg, #dfb57f0c, #0c1318);
}
.download-copy { display: flex; align-items: center; gap: 16px; }
.download-copy h3 { margin: 0 0 5px; font-size: 17px; }
.download-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.download-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid #dfb57f35; border-radius: 10px; background: #dfb57f12; color: var(--accent); font-size: 22px; }
.download { min-width: 210px; margin: 0; padding: 13px 20px; }
.download small { margin: 3px 0 0; color: #4a3a26; font-size: 10px; line-height: 1.4; }
.download-note { grid-column: 1 / -1; margin: 0; padding-top: 16px; border-top: 1px solid #dfb57f1c; color: var(--muted); font-size: 12px; line-height: 1.7; }
.download-note strong { color: #cbd4da; font-weight: 600; }
.access-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.key-card, .device-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #0b1217a8; }
.detail-heading { align-items: flex-start; }
.detail-heading h3 { margin: 4px 0 0; font-size: 16px; }
.detail-heading .eyebrow { font-size: 9px; letter-spacing: 1.6px; }
.detail-icon { color: var(--accent); font-size: 22px; }
.key-card > .muted, .device-card > .muted { min-height: 48px; margin: 14px 0 16px; font-size: 12px; }
.key-field input { margin: 0; font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; text-overflow: ellipsis; }
.key-card .actions { margin-top: 12px; }
.key-card .secondary { padding: 9px 12px; font-size: 12px; }
.key-card > small { font-size: 11px; }
.device-indicator { width: 9px; height: 9px; margin-top: 7px; border: 2px solid var(--accent); border-radius: 50%; box-shadow: 0 0 0 5px #dfb57f0d; }
.device-card details { margin-top: 6px; }
.device-card details p { font-size: 12px; }
.device-card .secondary { margin-top: 4px; font-size: 12px; }

.launch-card { background: linear-gradient(155deg, #171f25, #11181d); }
.launch-card h2 { max-width: 230px; }
.launch-steps { margin: 24px 0; padding: 0; list-style: none; }
.launch-steps li { position: relative; display: flex; gap: 14px; padding: 0 0 23px; }
.launch-steps li:last-child { padding-bottom: 0; }
.launch-steps li:not(:last-child)::after { content: ""; position: absolute; top: 28px; bottom: 4px; left: 12px; width: 1px; background: var(--line); }
.launch-steps li > span { z-index: 1; display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border: 1px solid #dfb57f42; border-radius: 50%; background: var(--surface); color: var(--accent); font-size: 10px; }
.launch-steps strong { display: block; margin: 2px 0 3px; font-size: 13px; font-weight: 600; }
.launch-steps small { margin: 0; color: var(--faint); font-size: 11px; }
.inbox .heading { align-items: flex-start; }
.inbox .heading h2 { margin-bottom: 0; }
.inbox article { padding: 18px 0; border-top: 1px solid var(--line); }
.inbox article:first-child { margin-top: 20px; }
.inbox h3 { margin: 0 0 8px; font-size: 14px; }
.inbox p { margin-bottom: 10px; color: #a9b6c0; font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox time { color: var(--faint); font-size: 10px; }
.inbox .empty-state { margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
#member:not(.can-download) .dashboard-grid { grid-template-columns: 1fr; }
#member:not(.can-download) .dashboard-primary { display: none; }

.support-card { margin-top: 0; scroll-margin-top: 24px; }
.support-heading { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.support-heading h2 { margin-bottom: 10px; }
.support-heading .muted { margin: 0; }
.support-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 38px; padding-top: 26px; }
.support-contact, .ticket-center { min-width: 0; }
.discord-support { padding: 22px; border: 1px solid #344550; border-radius: 12px; background: #172129; }
.discord-support h3 { margin: 6px 0 12px; font-size: 18px; }
.discord-support p:not(.eyebrow) { color: #acbac4; line-height: 1.75; }
.discord-support .secondary { display: inline-block; margin-top: 4px; }
#support-notice { margin: 12px 0 0; color: var(--accent-bright); line-height: 1.6; }
#support-notice:empty { display: none; }
details { margin-top: 14px; padding: 17px 0 0; border-top: 1px solid var(--line); }
summary { cursor: pointer; line-height: 1.6; font-weight: 600; }
details p { color: #aab8c3; line-height: 1.8; }
.new-ticket { margin-top: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #0c1318; }
.new-ticket summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.new-ticket summary > span { color: var(--accent); font-size: 20px; font-weight: 400; transition: transform .18s ease; }
.new-ticket[open] summary > span { transform: rotate(45deg); }
.new-ticket summary::marker { display: none; }
.new-ticket > p { margin: 18px 0 24px; font-size: 12px; }
.ticket-center > .heading { align-items: flex-start; min-height: 61px; }
.ticket-center h3 { margin: 4px 0 0; font-size: 18px; }
.ticket-center .quiet { padding: 5px 8px; font-size: 12px; }
#ticket-list { color: var(--muted); line-height: 1.7; }
.ticket-row { display: block; width: 100%; margin: 9px 0; padding: 16px 18px; border: 1px solid #33434e; border-radius: 9px; background: #121d24; color: #d7e1e8; text-align: left; overflow-wrap: anywhere; }
.ticket-row:hover { border-color: #5c6f7c; background: #17242c; }
#ticket-thread { margin-top: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #0c1318; }
.ticket-thread-heading { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ticket-thread-heading h3 { margin: 5px 0 8px; overflow-wrap: anywhere; }
.ticket-thread-heading .muted { margin: 0; }
#ticket-messages article { padding: 18px 0; border-bottom: 1px solid var(--line); }
#ticket-messages p { margin: 8px 0; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
#ticket-messages small { color: var(--faint); }

/* Account page: access per game, redeem, password */
.member-identity strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.games { margin-bottom: 20px; scroll-margin-top: 24px; }
.games > .section-heading { align-items: flex-end; margin-bottom: 18px; }
.games > .section-heading h2 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 550; }
.games-clock { font-size: 12px; }
.game-card { margin-bottom: 14px; padding: 24px 26px; }
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.game-head h3 { margin: 0; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.game-head .badge { flex-shrink: 0; }
.badge[data-state="none"] { border-color: #ffffff1c; background: #ffffff0a; color: var(--muted); }
.game-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 24px; margin: 22px 0 18px; }
.game-facts dt { margin-bottom: 4px; color: var(--faint); font-size: 12px; }
.game-facts dd { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.game-pc { margin: 0; font-size: 13px; }
.game-empty { margin: 14px 0 0; color: var(--muted); line-height: 1.7; }
.game-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.game-actions .secondary { font-size: 13px; }
.game-confirm { flex: 1 1 100%; margin: 0; color: #d6c3a6; line-height: 1.6; }
.redeem-card, .security-card { scroll-margin-top: 24px; }
.redeem-card h2 { margin-top: 0; }
.redeem-card input { font-family: "Cascadia Mono", Consolas, monospace; }
.redeem-card .primary, .security-card .primary { display: inline-block; width: auto; margin-top: 16px; }
.key-review { margin-top: 18px; padding: 18px 20px; border: 1px solid #dfb57f30; border-radius: 12px; background: #dfb57f0a; }
.key-review ul { margin: 0 0 4px; padding: 0; list-style: none; }
.key-review li { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.key-review li small { margin-top: 4px; }
.key-review .primary { margin-top: 0; }
.form-note { margin: 14px 0 0; color: var(--accent-bright); line-height: 1.6; }
.form-note:empty { display: none; }
.games > .form-note { margin: 0 0 14px; }
.security-card details { margin: 0; padding: 0; border: 0; }
/* The download card and the first-launch steps are for accounts that may download the Hub. */
#member:not(.can-download) .launch-card { display: none; }
#member:not(.can-download) .dashboard-sidebar { display: block; }
.download-unavailable { margin: 24px 0 0; padding: 16px 18px; border: 1px solid #e6b36a45; border-radius: 12px; background: #e6b36a0d; color: #e6c79a; line-height: 1.6; }
.download-existing { margin: 16px 0 0; font-size: 13px; }
#legacy-key { margin-top: 22px; }
.launch-existing { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.7; }
.launch-existing strong { display: block; margin-bottom: 4px; color: #c8d1d8; font-size: 11px; font-weight: 600; letter-spacing: .4px; }
@media (max-width: 820px) { .game-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .game-card { padding: 20px; } .games > .section-heading { align-items: flex-start; flex-direction: column; gap: 6px; } }

footer { max-width: 1380px; margin: auto; padding: 26px 48px 34px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 30px; color: var(--faint); font-size: 10px; letter-spacing: 1.4px; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.guide main { display: block; max-width: 1180px; }
.guide-heading { padding: 0 0 38px; }
.guide-heading h1 { margin: 24px 0; font-size: clamp(40px, 5vw, 64px); line-height: 1.1; letter-spacing: -2.5px; font-weight: 500; }
.guide-heading .muted { font-size: 15px; }
.guide-heading .actions { margin-top: 26px; }
.guide-heading .secondary { display: inline-block; }
.guide-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.guide .card p, .guide .card li { color: #afbdc9; line-height: 1.85; }
.guide .card li { margin: 10px 0; }
.guide .card strong { color: #e6edf3; }
.guide .card > .primary { max-width: 340px; }
.guide-screenshot { margin: 20px 0; }
.guide-screenshot img { display: block; width: 100%; height: auto; border-radius: 10px; }
.guide-screenshot figcaption { padding: 14px 0 0; color: var(--faint); font-size: 12px; }
.guide section { scroll-margin-top: 24px; }
.compat { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 18px 0 0; padding: 0; }
.compat > div { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-deep); }
.compat dt { margin: 0 0 8px; color: var(--faint); font-size: 10px; letter-spacing: 1.6px; }
.compat dd { margin: 0; color: #e6edf3; font-size: 15px; overflow-wrap: anywhere; }
.compat[data-state="ok"] dd.state { color: #9bd3a2; }
.compat[data-state="paused"] dd.state { color: #e6b36a; }
.compat-note { font-size: 13px; }
.requirements code { padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-deep); font-size: 12px; overflow-wrap: anywhere; }

@media (max-width: 1080px) {
  main { gap: 48px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  #member:not(.can-download) .dashboard-sidebar { display: block; }
  .support-grid { gap: 26px; }
  .launch-card h2 { max-width: none; }
}

@media (max-width: 820px) {
  .portal-nav, body > nav:not(.account-nav) { padding: 22px 28px; }
  main, body[data-view="member"] main { display: block; padding: 38px 24px 56px; }
  .intro { max-width: 580px; margin: 0 auto 34px; padding: 0; }
  .intro h1 { font-size: 50px; }
  .intro-steps { display: none; }
  .ember-art > img { height: 180px; }
  .workspace { max-width: 680px; margin: auto; }
  body[data-view="member"] .workspace { max-width: none; }
  .member-header { align-items: flex-start; flex-direction: column; gap: 18px; }
  .member-actions { width: 100%; justify-content: flex-end; }
  .access-details-grid, .support-grid { grid-template-columns: 1fr; }
  .key-card > .muted, .device-card > .muted { min-height: 0; }
  .support-grid { gap: 30px; }
  footer { padding: 24px; }
  .guide-steps { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  .portal-nav, body > nav:not(.account-nav) { min-height: 0; padding: 20px; flex-wrap: wrap; gap: 16px; }
  .portal-nav .brand, body > nav:not(.account-nav) .brand { width: 100%; }
  .nav-links { width: 100%; justify-content: space-between; gap: 18px; font-size: 12px; }
  main, body[data-view="member"] main { padding: 30px 16px 44px; }
  .intro h1 { font-size: 42px; letter-spacing: -2px; }
  .card { padding: 22px; border-radius: 13px; }
  .card h2 { font-size: 23px; }
  .member-heading h1 { font-size: 38px; letter-spacing: -1.8px; }
  .member-actions { justify-content: space-between; }
  .account-nav { gap: 24px; margin-top: 26px; }
  .account-status-row { align-items: flex-start; flex-direction: column; }
  .dashboard-sidebar { display: block; }
  .download-card { grid-template-columns: 1fr; padding: 18px; }
  .download { width: 100%; min-width: 0; }
  .download-note { grid-column: auto; }
  .new-ticket, #ticket-thread { padding: 18px; }
  #notice { top: 16px; right: 16px; left: 16px; max-width: none; }
  footer { padding: 22px 20px; }
}

@media (max-width: 380px) {
  .card { padding: 18px; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 10px; }
  .member-heading h1 { font-size: 34px; }
  .member-actions { align-items: stretch; flex-direction: column; }
  .download-copy { align-items: flex-start; }
  .account-nav { justify-content: space-between; gap: 12px; }
}

/* Phones and small tablets: 16 px side gutters, text of at least 14 px, controls at least 44 px high.
   Every rule is inside this width limit, after the blocks above so it wins over them. */
@media (max-width: 820px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .portal-nav, body > nav:not(.account-nav), main, body[data-view="member"] main, footer { padding-left: 16px; padding-right: 16px; }
  .intro, .workspace { max-width: none; }

  .portal-nav, body > nav:not(.account-nav), .brand, .nav-links, footer, small, label, .optional, .form-link, .text-link,
  .badge, .account-nav a, .ember-art figcaption, .ember-art small, .download-copy p, .download small, .download-note,
  .key-card > .muted, .device-card > .muted, .key-field input, .key-card .secondary, .key-card > small,
  .device-card details p, .device-card .secondary, .launch-steps li > span, .launch-steps strong, .launch-steps small,
  .inbox p, .inbox time, .inbox .empty-state, .new-ticket > p, .ticket-center .quiet, .games-clock, .game-facts dt,
  .game-pc, .game-actions .secondary, .download-existing, .launch-existing, .launch-existing strong,
  .guide-screenshot figcaption, .compat dt, .compat-note, .requirements code { font-size: 14px; }
  .eyebrow, .detail-heading .eyebrow, .inbox .eyebrow { font-size: 14px; letter-spacing: 1.2px; }
  footer { letter-spacing: .6px; }
  /* 16 px keeps iOS from zooming the page when a field takes focus; key fields stay at 14 px so a whole key fits. */
  input, textarea { font-size: 16px; }
  .redeem-card input, .key-field input { font-size: 14px; }

  button, .primary, .secondary, .quiet, .brand { min-height: 44px; }
  .nav-links a, body > nav:not(.account-nav) > a:not(.brand), .discord-nav a, footer a { display: inline-block; padding-top: 12px; padding-bottom: 12px; }
  .text-link { min-height: 44px; }
  .account-nav a { padding: 13px 2px; }
  .key-card .secondary, .ticket-center .quiet { padding: 11px 14px; }
  details { padding-top: 6px; }
  summary { padding: 11px 0; }
  .new-ticket summary { min-height: 44px; padding: 0; }
  .launch-steps li > span { flex-basis: 28px; width: 28px; height: 28px; }
  .launch-steps li:not(:last-child)::after { top: 31px; left: 13px; }
}

@media (max-width: 580px) {
  #redeem-form .primary, #password-form .primary { display: block; width: 100%; }
}

@media (max-width: 380px) {
  .nav-links { gap: 0; }
  .redeem-card input { padding-left: 10px; padding-right: 10px; }
  /* The human check is 300 px wide; the card leaves 290. */
  .human-check { margin-left: -5px; margin-right: -5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
