/* The library page: website/index.html. Made by book/library/make_library.py. */

:root {
  --bg: #0b0b18;
  --bg-2: #12122a;
  --card: rgba(255, 255, 255, 0.045);
  --card-solid: #17172f;
  --line: rgba(255, 255, 255, 0.10);
  --text: #eef0ff;
  --muted: #a7aacb;
  --accent: #8b7bff;
  --accent-2: #2fe3ff;
  --accent-3: #ff5fd2;
  --good: #6cf2a0;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --pixel: "Pixelify Sans", "Courier New", monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f6fd;
  --bg-2: #ecebfb;
  --card: rgba(255, 255, 255, 0.78);
  --card-solid: #ffffff;
  --line: rgba(24, 24, 70, 0.12);
  --text: #16163a;
  --muted: #55587a;
  --accent: #5b47e6;
  --accent-2: #0098b8;
  --accent-3: #c2259c;
  --good: #11895a;
  --shadow: 0 20px 50px rgba(40, 40, 120, 0.14);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f6fd;
    --bg-2: #ecebfb;
    --card: rgba(255, 255, 255, 0.78);
    --card-solid: #ffffff;
    --line: rgba(24, 24, 70, 0.12);
    --text: #16163a;
    --muted: #55587a;
    --accent: #5b47e6;
    --accent-2: #0098b8;
    --accent-3: #c2259c;
    --good: #11895a;
    --shadow: 0 20px 50px rgba(40, 40, 120, 0.14);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16.5px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card-solid); padding: 8px 14px; border-radius: 10px; z-index: 99; }
.skip:focus { left: 16px; }

/* ---------- the background: a glow that follows the scroll, and a faint pixel grid ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 15% -10%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%),
    radial-gradient(50vmax 35vmax at 100% 10%, color-mix(in srgb, var(--accent-3) 22%, transparent), transparent 70%),
    radial-gradient(60vmax 40vmax at 50% 110%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 70%),
    var(--bg);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 65%);
  opacity: 0.55;
}
#stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; width: 100%; height: 100%; }

/* ---------- the header ---------- */
.top {
  position: sticky; top: 12px; z-index: 50;
  margin: 12px auto 0; width: min(1180px, 100% - 24px);
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  padding: 10px 12px 10px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--pixel); font-size: 1.15rem; letter-spacing: 0.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: white; font-size: 0.95rem;
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 55%, transparent);
}
.top nav { display: flex; gap: 4px; }
.top nav a { text-decoration: none; padding: 7px 13px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 0.95rem; white-space: nowrap; }
.btn.small-btn { white-space: nowrap; }
@media (max-width: 1440px) {          /* room for the account links: the page's own sections are a scroll away */
  .top nav a[href="#how"], .top nav a[href="#collection"] { display: none; }
}
@media (max-width: 960px) {
  .top nav a[href="#games"], .top nav a[href="#same"] { display: none; }
}
.top nav a:hover { color: var(--text); background: var(--card); }
.theme {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  width: 38px; height: 38px; border-radius: 999px; cursor: pointer; font-size: 1.05rem;
}
@media (max-width: 720px) {
  .top nav a { display: none; }
  .top nav a.nav-teachers { display: inline-block; }    /* the teachers' link stays on a phone */
}
@media (max-width: 480px) {
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }   /* still read out */
  .top nav a.nav-teachers { white-space: nowrap; }
}
/* so the sticky header doesn't cover a section's heading when a link jumps to it */
section[id], .game { scroll-margin-top: 96px; }

/* ---------- the hero ---------- */
.hero { padding: clamp(56px, 10vw, 120px) 0 40px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  font-size: 0.85rem; color: var(--muted); font-weight: 600; letter-spacing: 0.04em;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 12px var(--good); }
.hero h1 {
  margin: 22px auto 18px; max-width: 16ch;
  font-size: clamp(2.5rem, 7.2vw, 5.6rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800;
  text-wrap: balance;
}
.hero h1 .glow {
  font-family: var(--pixel); font-weight: 600; letter-spacing: 0;
  background: linear-gradient(100deg, var(--accent-2), var(--accent), var(--accent-3), var(--accent-2));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 9s linear infinite;
}
@keyframes shimmer { to { background-position: 300% 0; } }
.hero .lede { max-width: 62ch; margin: 0 auto 30px; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.22rem); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  padding: 13px 22px; border-radius: 14px; font-weight: 700; font-size: 1rem; border: 1px solid var(--line);
  background: var(--card); color: var(--text); transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary {
  border: 0; color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 0 10px 34px color-mix(in srgb, var(--accent) 45%, transparent);
}
.btn.primary:hover { box-shadow: 0 14px 44px color-mix(in srgb, var(--accent) 60%, transparent); }

/* the parade of sprites, marching across under the headline */
.parade { position: relative; height: 140px; margin: 46px 0 8px; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); }
.parade-track { position: absolute; bottom: 14px; left: 0; display: flex; gap: 64px; align-items: flex-end;
  width: max-content; animation: march 38s linear infinite; }
.parade:hover .parade-track { animation-play-state: paused; }
@keyframes march { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.parade-ground { position: absolute; left: 0; right: 0; bottom: 8px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 12px, transparent 12px 20px); opacity: 0.35; }

.sprite {
  width: var(--w); height: var(--h);
  background-repeat: no-repeat; background-size: calc(var(--w) * var(--n)) var(--h);
  image-rendering: pixelated; image-rendering: crisp-edges;
  animation: frames calc(var(--n) * 0.16s) steps(var(--n)) infinite;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
}
@keyframes frames { to { background-position: calc(var(--w) * var(--n) * -1) 0; } }
.parade .sprite { transform: scale(0.85); transform-origin: bottom center; }

/* the numbers */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 34px auto 0; max-width: 900px; }
.stat { padding: 18px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); backdrop-filter: blur(8px); }
.stat b { display: block; font-family: var(--pixel); font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.1;
  background: linear-gradient(135deg, var(--text), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- sections ---------- */
section.block { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { margin: 0; font-size: clamp(1.9rem, 4.2vw, 3rem); letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 58ch; }
.kicker { font-family: var(--pixel); color: var(--accent-2); font-size: 0.95rem; letter-spacing: 0.06em; }

/* ---------- the bento grid: how the book works ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(150px, auto); gap: 14px; }
.tile {
  position: relative; overflow: hidden; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card); backdrop-filter: blur(10px);
}
.tile h3 { margin: 4px 0 6px; font-size: 1.25rem; letter-spacing: -0.01em; }
.tile p { margin: 0; color: var(--muted); }
.tile .tag { font-family: var(--pixel); font-size: 0.85rem; color: var(--accent); }
.tile.wide { grid-column: span 4; }
.tile.half { grid-column: span 3; }
.tile.third { grid-column: span 2; }
.tile.tall { grid-row: span 2; }
.tile .shot { display: block; width: 100%; height: 170px; margin-top: 16px; object-fit: cover; object-position: center 70%;
  border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform 0.5s; }
.tile:hover .shot { transform: translateY(-4px) scale(1.02); }
.tile .term {
  margin-top: 16px; font: 0.78rem/1.25 ui-monospace, "Cascadia Mono", Menlo, monospace;
  color: #6cf2a0; background: #0e0f22; border: 1px solid var(--line); border-radius: 12px; padding: 12px; white-space: pre; overflow: hidden;
}
.tile .sprites { display: flex; gap: 10px; align-items: flex-end; margin-top: 18px; flex-wrap: wrap; }
.tile .sprites .sprite { transform: scale(0.6); transform-origin: bottom left; margin-right: -24px; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile.wide, .tile.half, .tile.third { grid-column: span 2; }
  .tile.tall { grid-row: auto; }
}

/* ---------- the games ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer;
  padding: 8px 15px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; transition: all 0.2s;
}
.chip-btn:hover { color: var(--text); }
.chip-btn[aria-pressed="true"] { color: white; background: linear-gradient(135deg, var(--accent), var(--accent-3)); border-color: transparent; }
.search {
  flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 0 14px;
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 10px 0; font: inherit; outline: none; }
.count { color: var(--muted); font-size: 0.92rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.game {
  --tilt-x: 0deg; --tilt-y: 0deg;
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--card-solid);
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
  view-transition-name: var(--vt);
}
.game:hover { box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); border-color: transparent; }
.game[hidden] { display: none; }
.game .media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.game .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease, filter 0.6s; }
.game:hover .media img { transform: scale(1.06); filter: saturate(1.15); }
.game .media::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--card-solid) 92%, transparent)); }
.game .media .sprite { position: absolute; left: 16px; bottom: 6px; z-index: 2; transform: scale(0.8); transform-origin: bottom left; }
.game .num { position: absolute; top: 12px; left: 12px; z-index: 2; font-family: var(--pixel); font-size: 0.85rem;
  padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: white; backdrop-filter: blur(6px); }
.game .term-art {
  width: 100%; height: 100%; display: grid; place-items: center; margin: 0;
  font: clamp(0.5rem, 1.15vw, 0.66rem)/1.2 ui-monospace, "Cascadia Mono", Menlo, monospace;
  color: #7dffb0; background: radial-gradient(circle at 50% 40%, #0f2a1d, #050b08 75%);
  text-shadow: 0 0 6px rgba(125, 255, 176, 0.55); white-space: pre;
}
.game .term-art::after { content: "> look_"; display: block; margin-top: 10px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.game .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game .genre { font-family: var(--pixel); color: var(--accent-2); font-size: 0.9rem; letter-spacing: 0.03em; }
.game h3 { margin: 0; font-size: 1.45rem; letter-spacing: -0.015em; }
.game .blurb { margin: 0; color: var(--muted); font-size: 0.97rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 0.78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: var(--card); }
.game .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.game .links a { text-decoration: none; font-weight: 700; font-size: 0.93rem; padding: 9px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); transition: background 0.2s, transform 0.2s; }
.game .links a:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--accent) 18%, var(--card)); }
.game .links a.read { color: white; border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent-3)); }
.game .links a.teacher-link { color: var(--muted); font-weight: 600; }
.game details { font-size: 0.9rem; color: var(--muted); }
.game summary { cursor: pointer; font-weight: 600; }
.game details a { margin-right: 10px; white-space: nowrap; color: var(--accent-2); }
.game.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px var(--accent-2), 0 0 60px var(--accent-2); } }
.empty { display: none; padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- the home page: choosing an exam board ---------- */
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.board-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 4vw, 34px);
  border-radius: 28px; border: 1px solid var(--line); background: var(--card); backdrop-filter: blur(12px);
  color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform 0.25s, border-color 0.25s;
}
.board-card:hover, .board-card:focus-visible { transform: translateY(-4px); border-color: var(--accent); }
.board-card .board-name { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; }
.board-card .board-quals { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-weight: 600; }
.board-card .board-quals span::before { content: "\25B8  "; color: var(--accent-2); }
.board-card .board-count { color: var(--muted); font-size: 0.95rem; }
.board-card .board-count b { color: var(--text); font-size: 1.1rem; }
.board-card .btn { align-self: flex-start; margin-top: auto; }
.board-card.last::after {
  content: "Your last choice"; position: absolute; top: 18px; right: 18px; font-family: var(--pixel); font-size: 0.85rem;
  padding: 4px 10px; border-radius: 999px; color: var(--bg); background: var(--accent-2);
}
.top nav a.nav-board { color: var(--accent-2); }

/* ---------- the teachers' area ---------- */
.teacher-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.teacher-list li { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--card); backdrop-filter: blur(10px); }
.teacher-list li > a:first-child { flex: 1; font-weight: 700; text-decoration: none; color: var(--text); }
.teacher-list li > a:first-child:hover { color: var(--accent-2); }
.teacher-list .lock { margin-right: 8px; }
.teacher-list a.pdf { font-size: 0.85rem; font-weight: 600; text-decoration: none; color: var(--accent-2);
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }

/* ---------- the collection ---------- */
.collection {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center;
  padding: clamp(24px, 5vw, 52px); border-radius: 32px; border: 1px solid var(--line);
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 55%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--accent-3) 22%, transparent), transparent 55%),
    var(--card);
  overflow: hidden;
}
.collection h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 6px 0 12px; letter-spacing: -0.025em; line-height: 1.08; }
.collection p { color: var(--muted); margin: 0 0 18px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.facts li { padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; }
.facts b { font-family: var(--pixel); color: var(--accent-2); font-weight: 600; margin-right: 4px; }
/* a shelf of book spines, one for each edition */
.shelf { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 300px; perspective: 900px; }
.spine {
  --h: 230px; width: 34px; height: var(--h); border-radius: 5px 5px 3px 3px; position: relative;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 28%, rgba(255, 255, 255, 0.16) 52%, transparent 75%, rgba(0, 0, 0, 0.3)), var(--c);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  transform-origin: bottom; transition: transform 0.35s cubic-bezier(.2, .9, .3, 1.4);
}
.spine:hover { transform: translateY(-16px) rotate(-2deg); }
.spine span { position: absolute; inset: 14px 0; writing-mode: vertical-rl; transform: rotate(180deg);
  display: grid; place-items: center; font-family: var(--pixel); color: rgba(255, 255, 255, 0.95); font-size: 0.82rem; letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); white-space: nowrap; }
@media (max-width: 860px) { .collection { grid-template-columns: 1fr; } .shelf { height: 240px; } .spine { width: 24px; --h: 190px; } .spine span { font-size: 0.68rem; } }

/* ---------- the footer ---------- */
footer { padding: 46px 0 60px; color: var(--muted); font-size: 0.92rem; border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; }

/* ---------- appearing as you scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.shown { opacity: 1; transform: none; }
@supports (animation-timeline: view()) {
  .reveal { opacity: 1; transform: none; transition: none;
    animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
  @keyframes rise { from { opacity: 0; transform: translateY(40px) scale(0.98); } to { opacity: 1; transform: none; } }
}

::view-transition-group(*) { animation-duration: 0.35s; }

/* ---------- less movement, for anyone who asks for it ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .game { transform: none !important; }
  #stars { display: none; }
}

/* ---------- the account links and the members' note ---------- */
.account-links { display: flex; gap: 8px; margin-left: auto; }
.btn.small-btn { padding: 8px 14px; font-size: 0.9rem; }
.members-note { color: var(--muted); max-width: 720px; margin: 14px auto 0; }
.members-note a { color: var(--accent-2); }
@media (max-width: 720px) {
  .account-links .btn.primary { display: none; }   /* on a phone, only "Log in"; the rest is in the page */
}

/* ---------- the code packs ---------- */
.game .links a.code-link { color: var(--accent-2); }
.code-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 18px; }
.code-grid .tile p { margin-bottom: 16px; }
.code-grid code { font-size: 0.85em; background: var(--card); padding: 0 3px; border-radius: 5px; }
.code-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.code-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.code-name { display: grid; font-weight: 700; }
.code-name small { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.code-list .btn { padding: 7px 12px; font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 900px) { .code-grid { grid-template-columns: 1fr; } }
