:root {
  --night: #080b17;
  --night-2: #0c1121;
  --panel: #11182b;
  --panel-2: #171f36;
  --text: #f5f7ff;
  --muted: #929db8;
  --line: rgba(161, 177, 219, .16);
  --violet: #7c5cff;
  --violet-2: #a58cff;
  --cyan: #38d9ff;
  --amber: #ffb84d;
  --danger: #ff6b7a;
  --radius: 18px;
  --display: "DIN Alternate", "Avenir Next Condensed", "PingFang SC", sans-serif;
  --body: "Avenir Next", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; background: var(--night); }
body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 80% -10%, rgba(124, 92, 255, .14), transparent 35%),
    var(--night);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
:focus-visible { outline: 3px solid rgba(56, 217, 255, .7); outline-offset: 3px; }
.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;
}

/* Header */
.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4.5vw, 76px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 23, .82);
  backdrop-filter: blur(18px);
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-emblem {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(124, 92, 255, .5);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(124, 92, 255, .32), rgba(56, 217, 255, .08));
  box-shadow: inset 0 0 18px rgba(124, 92, 255, .15), 0 0 22px rgba(124, 92, 255, .12);
}
.brand-emblem i:first-child {
  position: absolute;
  top: 9px;
  left: 13px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid white;
  filter: drop-shadow(0 0 5px var(--cyan));
}
.brand-emblem i:last-child {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  background: var(--night);
}
.brand-word {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .08em;
}
.brand-word small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-family: var(--body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions form { margin: 0; }
.access-state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #aeb8d0;
  font-size: 12px;
}
.access-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ce29c;
  box-shadow: 0 0 10px rgba(76, 226, 156, .8);
}
.header-button {
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid rgba(124, 92, 255, .65);
  border-radius: 10px;
  color: white;
  background: linear-gradient(135deg, #7153f2, #8d6cff);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 9px 24px rgba(75, 49, 180, .22);
}
.header-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.header-button-quiet {
  border-color: var(--line);
  color: #b1bbd2;
  background: rgba(255,255,255,.04);
  box-shadow: none;
}

/* Hero */
.catalog-hero {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  align-items: center;
  gap: clamp(40px, 7vw, 120px);
  padding: 80px clamp(22px, 7vw, 120px) 90px;
  isolation: isolate;
}
.catalog-hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  width: 680px;
  height: 680px;
  right: 3%;
  top: -110px;
  border: 1px solid rgba(124, 92, 255, .17);
  border-radius: 50%;
  box-shadow:
    0 0 0 85px rgba(124, 92, 255, .025),
    0 0 0 170px rgba(56, 217, 255, .018);
}
.catalog-hero::after {
  content: "PLAY / LEARN";
  position: absolute;
  z-index: -3;
  left: -20px;
  bottom: -15px;
  color: rgba(255,255,255,.018);
  font-family: var(--display);
  font-size: clamp(90px, 16vw, 260px);
  font-weight: 950;
  letter-spacing: -.06em;
  white-space: nowrap;
}
.hero-grid {
  position: absolute;
  z-index: -3;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to right, black, transparent 72%);
}
.hero-copy { max-width: 770px; }
.hero-kicker, .section-kicker, .dialog-kicker {
  margin: 0 0 18px;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .17em;
}
.hero-kicker span {
  display: inline-block;
  width: 28px;
  height: 1px;
  margin: 0 9px 3px 0;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.hero-copy h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(54px, 7vw, 104px);
  font-weight: 950;
  line-height: .94;
  letter-spacing: -.055em;
}
.hero-copy h1 span {
  display: inline-block;
  font-size: .82em;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(90deg, var(--violet-2), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-intro {
  max-width: 590px;
  margin: 30px 0 0;
  color: #a7b2cc;
  font-size: 17px;
  line-height: 1.8;
}
.hero-action {
  width: fit-content;
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}
.hero-action span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(255,255,255,.04);
}
.hero-console {
  position: relative;
  width: min(100%, 410px);
  aspect-ratio: .94;
  justify-self: center;
  transform: rotate(4deg);
  border: 1px solid rgba(166, 143, 255, .35);
  border-radius: 42px;
  padding: 34px;
  background:
    linear-gradient(145deg, rgba(124,92,255,.26), rgba(20,28,51,.82) 44%),
    var(--panel);
  box-shadow:
    inset 0 1px rgba(255,255,255,.15),
    inset 0 -20px 50px rgba(0,0,0,.26),
    0 50px 100px rgba(0,0,0,.4),
    0 0 70px rgba(124,92,255,.14);
}
.console-screen {
  position: relative;
  height: 68%;
  overflow: hidden;
  padding: 28px;
  border: 8px solid #090d19;
  border-radius: 24px;
  background:
    linear-gradient(rgba(56,217,255,.06) 1px, transparent 1px),
    #0d1422;
  background-size: 100% 5px;
  box-shadow: inset 0 0 45px rgba(56,217,255,.08);
}
.console-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.05), transparent 45%);
}
.console-label {
  color: var(--amber);
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .2em;
}
.console-screen strong {
  display: block;
  margin-top: 20px;
  color: white;
  font-family: var(--display);
  font-size: clamp(42px, 5.5vw, 73px);
  line-height: .78;
  letter-spacing: -.04em;
  text-shadow: 3px 3px 0 rgba(124,92,255,.75), -2px -1px 0 rgba(56,217,255,.4);
}
.console-screen i {
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}
.console-controls { position: relative; height: 32%; }
.console-controls b {
  position: absolute;
  top: 36px;
  width: 27px;
  height: 27px;
  border: 6px solid #080b14;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 34px 14px 0 -6px var(--cyan);
}
.console-controls b:first-child { right: 45px; }
.console-controls b:nth-child(2) { right: 85px; top: 67px; }
.console-controls span {
  position: absolute;
  left: 33px;
  top: 44px;
  color: #080b14;
  font-size: 63px;
  font-weight: 900;
  line-height: .5;
  text-shadow: 0 2px rgba(255,255,255,.08);
}

/* Library */
.library-shell {
  position: relative;
  padding: 76px clamp(22px, 5vw, 80px) 110px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(17,24,43,.82), rgba(8,11,23,.96)),
    var(--night-2);
}
.library-toolbar {
  max-width: 1500px;
  margin: 0 auto 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
}
.section-kicker { margin-bottom: 9px; color: var(--violet-2); }
.library-toolbar h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 56px);
  letter-spacing: -.045em;
}
.search-box {
  flex: 0 1 440px;
  display: flex;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(8,11,23,.55);
}
.search-box > span {
  position: relative;
  width: 41px;
  height: 41px;
  flex: 0 0 auto;
}
.search-box > span::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 11px;
  top: 9px;
  border: 2px solid #76829e;
  border-radius: 50%;
}
.search-box > span::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  left: 23px;
  top: 24px;
  transform: rotate(45deg);
  background: #76829e;
}
.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
}
.search-box input::placeholder { color: #6f7a94; }
.search-box button {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--panel-2);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.category-strip {
  max-width: 1500px;
  margin: 0 auto 34px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-strip a {
  flex: 0 0 auto;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #8e99b3;
  background: rgba(255,255,255,.035);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.category-strip a:hover { color: white; background: rgba(255,255,255,.07); }
.category-strip a.active {
  border-color: rgba(124,92,255,.55);
  color: white;
  background: rgba(124,92,255,.17);
  box-shadow: inset 0 0 16px rgba(124,92,255,.08);
}
.category-strip b { margin-left: 5px; color: var(--cyan); font-size: 10px; }
.game-grid {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.game-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(24,32,56,.98), rgba(13,18,34,.98));
  box-shadow: 0 16px 36px rgba(0,0,0,.18);
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.game-card:hover {
  transform: translateY(-7px);
  border-color: rgba(124,92,255,.48);
  box-shadow: 0 28px 58px rgba(0,0,0,.34), 0 0 35px rgba(124,92,255,.08);
}
.game-launch {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}
.game-cover {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 16 / 9;
  background: #0e1424;
}
.game-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .55s cubic-bezier(.2,.8,.2,1), filter .35s ease;
}
.game-card:hover .game-cover img { transform: scale(1.055); filter: saturate(1.08); }
.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4,6,14,.82), transparent 55%);
  opacity: .7;
  transition: opacity .3s;
}
.game-card:hover .cover-shade { opacity: 1; }
.game-cover-placeholder {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(124,92,255,.85), rgba(35,25,98,.72) 54%, rgba(9,17,34,.96));
}
.game-cover-placeholder b {
  z-index: 2;
  color: white;
  font-family: var(--display);
  font-size: clamp(60px, 7vw, 100px);
  text-shadow: 6px 7px 0 rgba(0,0,0,.17);
}
.game-cover-placeholder i {
  position: absolute;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(255,255,255,.13);
  transform: rotate(45deg);
}
.game-cover-placeholder i:nth-of-type(1) { left: -100px; bottom: -100px; box-shadow: 0 0 0 45px rgba(56,217,255,.05); }
.game-cover-placeholder i:nth-of-type(2) { right: -80px; top: -110px; box-shadow: 0 0 0 55px rgba(255,184,77,.045); }
.game-cover-placeholder i:nth-of-type(3) { width: 11px; height: 11px; right: 32px; bottom: 28px; border: 0; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 18px var(--cyan); }
.play-control {
  position: absolute;
  left: 18px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transform: translateY(9px);
  font-size: 13px;
  font-weight: 900;
  transition: opacity .28s ease, transform .28s ease;
}
.game-card:hover .play-control, .game-launch:focus-visible .play-control { opacity: 1; transform: none; }
.play-control i {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: white;
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
}
.play-control i::after {
  content: "";
  margin-left: 2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--night);
}
.unlock-badge, .lock-badge {
  position: absolute;
  right: 13px;
  top: 13px;
  border: 1px solid rgba(255,255,255,.16);
  color: white;
  background: rgba(8,11,23,.75);
  backdrop-filter: blur(10px);
}
.unlock-badge {
  padding: 6px 9px;
  border-color: rgba(76,226,156,.35);
  border-radius: 7px;
  color: #7af0b5;
  font-size: 10px;
  font-weight: 900;
}
.lock-badge {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ccd4e6;
  font-size: 17px;
}
.game-info { padding: 20px 20px 18px; }
.game-meta { min-height: 21px; display: flex; gap: 7px; }
.game-meta span {
  padding: 4px 7px;
  border-radius: 5px;
  color: #b8aaff;
  background: rgba(124,92,255,.12);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}
.game-info h3 {
  margin: 11px 0 8px;
  font-family: var(--display);
  font-size: 23px;
  letter-spacing: -.025em;
}
.game-info > p {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.game-footer {
  min-height: 34px;
  margin-top: 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; color: #737e98; font-size: 10px; }
.card-arrow {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #c4cce0;
  background: rgba(255,255,255,.035);
  text-align: center;
  transition: color .2s, background .2s, border-color .2s;
}
.card-arrow:hover { border-color: var(--violet); color: white; background: var(--violet); }
.empty-state {
  max-width: 1500px;
  margin: 0 auto;
  padding: 90px 24px;
  border: 1px dashed rgba(161,177,219,.25);
  border-radius: 20px;
  text-align: center;
  background: rgba(255,255,255,.02);
}
.empty-state > span { color: var(--violet-2); font: 800 10px ui-monospace, monospace; letter-spacing: .22em; }
.empty-state h3 { margin: 14px 0 8px; font: 800 28px var(--display); }
.empty-state p { color: var(--muted); }
.empty-state a { display: inline-block; margin-top: 10px; color: var(--cyan); font-weight: 800; }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(22px, 5vw, 80px);
  border-top: 1px solid var(--line);
  color: #626d87;
  background: #070a14;
  font-size: 10px;
  letter-spacing: .1em;
}

/* Unlock dialog */
.unlock-dialog {
  width: min(calc(100% - 32px), 470px);
  overflow: hidden;
  padding: 38px;
  border: 1px solid rgba(151,128,255,.45);
  border-radius: 24px;
  color: var(--text);
  background: linear-gradient(160deg, #171f36, #0c1120 72%);
  box-shadow: 0 40px 100px rgba(0,0,0,.65), 0 0 50px rgba(124,92,255,.12);
}
.unlock-dialog::backdrop { background: rgba(3,5,12,.78); backdrop-filter: blur(8px); }
.dialog-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  right: -150px;
  top: -150px;
  border-radius: 50%;
  background: rgba(124,92,255,.16);
  filter: blur(3px);
}
.dialog-close {
  position: absolute;
  z-index: 2;
  right: 17px;
  top: 15px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #96a1b8;
  background: rgba(255,255,255,.055);
  font-size: 22px;
  cursor: pointer;
}
.dialog-close:hover { color: white; background: rgba(255,255,255,.1); }
.dialog-icon {
  position: relative;
  width: 54px;
  height: 54px;
  margin-bottom: 25px;
  border: 1px solid rgba(56,217,255,.4);
  border-radius: 16px;
  background: rgba(56,217,255,.08);
  box-shadow: inset 0 0 20px rgba(56,217,255,.06);
}
.dialog-icon i {
  position: absolute;
  width: 16px;
  height: 14px;
  left: 18px;
  top: 23px;
  border: 2px solid var(--cyan);
  border-radius: 4px;
}
.dialog-icon i::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 9px;
  left: 1px;
  top: -10px;
  border: 2px solid var(--cyan);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.dialog-kicker { margin-bottom: 8px; color: var(--violet-2); }
.unlock-dialog h2 { margin: 0; font: 900 34px var(--display); letter-spacing: -.035em; }
.dialog-note { margin: 12px 0 26px; color: #929db7; font-size: 14px; line-height: 1.7; }
.dialog-note strong { color: white; }
.unlock-form label { display: block; margin-bottom: 9px; color: #cbd3e5; font-size: 12px; font-weight: 800; }
.unlock-form input[name="access_code"] {
  width: 100%;
  height: 64px;
  padding: 0 18px;
  border: 1px solid rgba(161,177,219,.28);
  border-radius: 12px;
  outline: 0;
  color: white;
  background: rgba(5,8,17,.62);
  font: 900 26px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .2em;
  text-align: center;
  text-transform: uppercase;
  transition: border-color .2s, box-shadow .2s;
}
.unlock-form input[name="access_code"]::placeholder { color: #505a72; font: 600 14px var(--body); letter-spacing: 0; }
.unlock-form input[name="access_code"]:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(124,92,255,.13);
}
.unlock-error { min-height: 21px; margin: 9px 0 0; color: var(--danger); font-size: 12px; }
.unlock-submit {
  width: 100%;
  height: 56px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 19px;
  border: 0;
  border-radius: 11px;
  color: white;
  background: linear-gradient(135deg, #6d4fed, #8d70ff);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(72,48,174,.3);
}
.unlock-submit:hover { filter: brightness(1.08); }
.unlock-submit:disabled { cursor: wait; opacity: .7; }
.unlock-submit.is-loading span::after { content: "…"; }
.unlock-submit b { font-size: 20px; }
.dialog-footnote { margin: 18px 0 0; color: #626d86; text-align: center; font-size: 10px; }

/* Legacy full-page login and error */
.login-page { min-height: 100vh; background: var(--night); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr minmax(430px, .9fr); }
.login-story {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 8vw, 120px);
  background: radial-gradient(circle at 20% 70%, rgba(124,92,255,.24), transparent 40%);
}
.login-story .eyebrow { color: var(--cyan); font: 800 11px ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; }
.login-story h1 { margin: 0; font: 950 clamp(54px, 7vw, 96px)/.95 var(--display); letter-spacing: -.055em; }
.login-intro { max-width: 510px; margin: 27px 0 0; color: #9da8c0; font-size: 17px; line-height: 1.8; }
.brand-mark { position: absolute; left: clamp(48px,8vw,120px); top: 48px; display: flex; gap: 5px; align-items: end; }
.brand-mark span { width: 8px; border-radius: 9px; background: var(--violet); }
.brand-mark span:nth-child(1) { height: 20px; background: var(--cyan); }
.brand-mark span:nth-child(2) { height: 31px; }
.brand-mark span:nth-child(3) { height: 15px; background: var(--amber); }
.lesson-orbit { display: none; }
.login-panel { display: grid; place-items: center; padding: 42px; border-left: 1px solid var(--line); background: var(--night-2); }
.login-card { width: min(100%, 460px); padding: 44px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: 0 30px 70px rgba(0,0,0,.3); }
.panel-kicker { margin: 0 0 8px; color: var(--violet-2); font-size: 11px; font-weight: 900; }
.login-card h2 { margin: 0; font: 900 34px var(--display); }
.panel-note { margin: 11px 0 26px; color: var(--muted); font-size: 14px; }
.alert { margin-bottom: 18px; padding: 12px; border-radius: 9px; color: #c5cde0; background: rgba(255,255,255,.05); font-size: 12px; }
.alert-error { color: #ff9aa5; background: rgba(255,107,122,.09); }
.code-form label { display: block; margin-bottom: 8px; color: #cbd3e5; font-size: 12px; font-weight: 800; }
.code-form input {
  width: 100%;
  height: 60px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  color: white;
  background: #090d19;
  font: 900 22px ui-monospace, monospace;
  letter-spacing: .15em;
  text-align: center;
}
.code-form input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(124,92,255,.12); }
.code-form button {
  width: 100%;
  height: 54px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--violet);
  font-weight: 900;
  cursor: pointer;
}
.device-note { margin: 18px 0 0; color: #65708a; text-align: center; font-size: 10px; }
.simple-error { max-width: 640px; margin: 14vh auto; padding: 50px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.simple-error a { color: var(--cyan); }

@media (max-width: 1100px) {
  .catalog-hero { min-height: 520px; grid-template-columns: minmax(0,1.2fr) minmax(300px,.8fr); padding-top: 60px; }
  .hero-console { width: 330px; padding: 28px; }
  .console-screen strong { font-size: 54px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-header { height: 66px; padding-inline: 17px; }
  .brand-word { font-size: 16px; }
  .brand-word small { display: none; }
  .access-state { display: none; }
  .header-button { min-height: 36px; padding-inline: 12px; }
  .catalog-hero { min-height: auto; display: block; padding: 76px 22px 90px; }
  .catalog-hero::before { width: 420px; height: 420px; right: -240px; top: 50px; }
  .catalog-hero::after { bottom: 8px; font-size: 92px; }
  .hero-copy h1 { font-size: clamp(50px, 15vw, 70px); }
  .hero-intro { font-size: 15px; }
  .hero-console { display: none; }
  .library-shell { padding: 57px 17px 80px; }
  .library-toolbar { display: block; }
  .library-toolbar h2 { font-size: 38px; }
  .search-box { margin-top: 24px; }
  .category-strip { margin-bottom: 24px; }
  .game-grid { grid-template-columns: 1fr; gap: 20px; }
  .game-info { padding: 17px; }
  .play-control { opacity: 1; transform: none; }
  .site-footer { display: block; line-height: 2; text-align: center; }
  .unlock-dialog { padding: 32px 24px 26px; border-radius: 20px; }
  .login-shell { display: block; }
  .login-story { min-height: 42vh; padding: 95px 28px 48px; }
  .login-story h1 { font-size: 50px; }
  .brand-mark { left: 28px; top: 28px; }
  .login-panel { padding: 0 18px 34px; border: 0; }
  .login-card { padding: 30px 24px; }
}

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