/* Layout for the one-page Library site. Colours, fonts and radii come from themes.css
   (custom properties set by <html data-style data-mode>). Breakpoints: phone < 640 px,
   tablet 640–1023 px, laptop >= 1024 px. */

/* --- Base ------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  transition: background-color 300ms, color 300ms;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-text); }
img, video { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd { margin: 0; }

:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.container { max-width: 1280px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* --- Buttons -------------------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  font-weight: 600; font-size: 14px; white-space: nowrap;
  background: transparent;
  transition: background-color 200ms, border-color 200ms, color 200ms;
}
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover { color: var(--on-accent); filter: brightness(1.08); }
.button-outline { border-color: var(--line); color: var(--text); }
.button-outline:hover { border-color: var(--accent); color: var(--text); }
.button-inverse { background: var(--text); color: var(--bg); }
.button-inverse:hover { color: var(--bg); opacity: 0.9; }
.button-large { min-height: 48px; padding: 0 20px; font-size: 16px; }
.button.is-disabled, .button.is-disabled:hover { opacity: 0.45; filter: grayscale(1); cursor: not-allowed; }

.icon-button {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-button);
  border: 1px solid var(--line); background: transparent; color: var(--text);
}
.icon-button:hover { border-color: var(--accent); }

/* --- Header ---------------------------------------------------------------------------- */
.site-notice { background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 500; text-align: center; padding: 8px 0; }
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 14px; }

.brand { display: flex; align-items: center; gap: 12px; flex-grow: 1; min-width: 0; }
.brand:hover { color: var(--text); }
.monogram {
  width: 40px; height: 40px; flex: 0 0 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-avatar);
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-head); font-weight: 800; font-size: 15px;
}
.brand-name { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 20px; letter-spacing: -0.02em; }
.brand-short { display: none; }

.header-menu { display: flex; align-items: center; gap: 20px; }
.main-nav { display: flex; gap: 24px; font-size: 15px; color: var(--muted); }
.main-nav a { padding: 10px 0; }

.style-controls { display: flex; align-items: center; gap: 12px; }
.style-label { display: none; }
.swatches { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.swatch {
  width: 32px; height: 32px; padding: 0; border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  background: linear-gradient(135deg, var(--sw-bg) 50%, var(--sw-accent) 50%);
}
.swatch[aria-checked="true"] { border-color: var(--text); }
/* Swatch colours show each style in the current mode (values from tokens.json). */
[data-mode="dark"] .swatch-blue { --sw-bg: #111317; --sw-accent: #3563E9; }
[data-mode="dark"] .swatch-green { --sw-bg: #11150F; --sw-accent: #47801B; }
[data-mode="dark"] .swatch-purple { --sw-bg: #15111A; --sw-accent: #6B2FA8; }
[data-mode="light"] .swatch-blue { --sw-bg: #F4F6FA; --sw-accent: #3563E9; }
[data-mode="light"] .swatch-green { --sw-bg: #F4F7F1; --sw-accent: #47801B; }
[data-mode="light"] .swatch-purple { --sw-bg: #F7F4FA; --sw-accent: #6B2FA8; }

.mode-toggle {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.mode-text { display: none; }
[data-mode="dark"] .icon-moon, [data-mode="light"] .icon-sun { display: none; }

.email-link { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--accent-text); }
.email-link svg { display: none; }
.cv-short { display: none; }
.menu-toggle { display: none; }

/* --- Intro ----------------------------------------------------------------------------- */
.intro {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 40px;
  padding-top: 56px; padding-bottom: 36px;
}
.intro-text { flex: 1 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
/* Wide screens: two fixed columns, so the style's heading font (each style has its own) can't make
   the stats wrap below the headline and shift the whole page. */
@media (min-width: 1024px) {
  .intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
}
.role-line { font-size: 15px; font-weight: 600; color: var(--accent-text); }
.headline {
  font-family: var(--font-head); font-weight: var(--head-weight);
  font-size: 50px; line-height: 1.04; letter-spacing: -0.02em;
}
.intro-lead { font-size: 18px; color: var(--muted); max-width: 640px; }

.stats { display: flex; flex-wrap: wrap; gap: 12px; }
.stat {
  display: flex; flex-direction: column;
  padding: 16px 20px; border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--line);
}
.stat-value { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 36px; line-height: 1.5; }
.stat-highlight .stat-value { color: var(--accent-text); }
.stat-label { font-size: 13px; color: var(--muted); }

/* --- Games toolbar -------------------------------------------------------------------- */
.games { display: flex; flex-direction: column; gap: 16px; padding-bottom: 72px; scroll-margin-top: 16px; }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 8px; border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--line);
}
.tabs { display: flex; flex-wrap: wrap; gap: 4px; flex-grow: 1; }
.tab {
  min-height: 44px; padding: 0 16px; border: 0;
  border-radius: var(--radius-button);
  background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background-color 200ms, color 200ms;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.tab-count { opacity: 0.7; font-weight: 500; }

.search {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
  border-radius: var(--radius-button); background: var(--bg); border: 1px solid var(--line); color: var(--muted);
}
.search input {
  width: 130px; min-width: 0; border: 0; background: transparent; color: var(--text);
  font-size: 14px; outline: none;
}
.search:focus-within { border-color: var(--accent); }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.selects { display: flex; gap: 12px; }
.select-label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.select-label select {
  height: 44px; padding: 0 10px; border-radius: var(--radius-button);
  background: var(--bg); border: 1px solid var(--line); color: var(--text); font-size: 14px;
}

.count-line { font-size: 14px; color: var(--muted); }
.count-short { display: none; }

/* --- Game grid ---------------------------------------------------------------------- */
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.game-item[hidden] { display: none; }

.card {
  height: 100%;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-card);
  transition: transform 200ms, box-shadow 200ms, border-color 200ms, background-color 300ms;
}
.card:hover, .card:focus-visible {
  color: var(--text);
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}
.card-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.card-media img, .card-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-clip { opacity: 0; transition: opacity 200ms; }
.card-clip.is-playing { opacity: 1; }
.badge {
  position: absolute; top: 10px; z-index: 1;
  font-size: 12px; padding: 3px 8px; line-height: 1.4;
  border-radius: var(--radius-chip);
}
.badge-featured { left: 10px; font-weight: 700; background: var(--accent); color: var(--on-accent); }
.badge-liveops { font-weight: 600; background: var(--bg); color: var(--text); }
/* Clone: amber, a hue far from all three style accents (blue, green, purple), so it never looks
   like "Featured"; dark text keeps it readable on any cover. Same on every style and mode. */
:root { --clone: #F2B33D; --on-clone: #2B1D04; --clone-soft: #FBEBC4; --clone-soft-text: #7A4D00; }
:root[data-mode="dark"] { --clone-soft: #3A2D12; --clone-soft-text: #F4C568; }
.badge-clone { font-weight: 600; background: var(--clone); color: var(--on-clone); }
/* Right-hand badges (Live-ops, Clone) sit side by side in one group. */
.badge-group { position: absolute; top: 10px; right: 10px; z-index: 1; display: flex; gap: 6px; }
.badge-group .badge { position: static; }
/* "Featured" shows only while sorted by Featured first. */
.games:not([data-sort-mode="featured"]) .badge-featured { display: none; }

.card-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
.card-title {
  font-family: var(--font-head); font-weight: var(--head-weight);
  font-size: 16px; line-height: 1.25; letter-spacing: -0.02em;
}
.card-meta { font-size: 13px; color: var(--muted); }

.games-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px 0; color: var(--muted); }
.games-empty[hidden] { display: none; }

/* --- Experience and About ------------------------------------------------------------- */
.band { border-top: 1px solid var(--line); background: var(--band); transition: background-color 300ms; }
.band-inner { display: flex; flex-wrap: wrap; gap: 56px; padding-top: 72px; padding-bottom: 72px; }
.section-title {
  font-family: var(--font-head); font-weight: var(--head-weight);
  font-size: 34px; line-height: 1.2; letter-spacing: -0.02em;
}
.experience { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 16px; }
.experience .section-title { margin-bottom: 8px; }
.job { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.job-years { flex: 0 0 150px; font-size: 14px; color: var(--muted); }
.job-location { display: block; font-size: 13px; }
.job-detail { flex: 1 1 300px; display: flex; flex-direction: column; }
.job-role { font-weight: 600; }
.job-titles { font-size: 14px; color: var(--muted); }

.about { flex: 2 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 16px; }
.about-text { font-size: 17px; }
.skills { display: flex; flex-direction: column; gap: 12px; }
.skill-group { display: flex; flex-direction: column; gap: 6px; }
.skill-group dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.skill-group dd { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 5px 11px; border-radius: var(--radius-chip); background: var(--surface-2); }
.hobbies { font-size: 14px; color: var(--muted); }

/* --- Footer --------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding-top: 48px; padding-bottom: 48px;
}
.footer-cta { display: flex; flex-direction: column; gap: 6px; }
.footer-title { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 30px; letter-spacing: -0.02em; line-height: 1.3; }
.footer-email { font-size: 18px; color: var(--accent-text); }
.footer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-email-button { display: none; }

/* --- Quick look ------------------------------------------------------------------------ */
.quicklook {
  width: 1120px; max-width: calc(100% - 64px); max-height: 86vh;
  padding: 0; overflow-y: auto; overscroll-behavior: contain;
  border-radius: var(--radius-card); border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
}
.quicklook::backdrop { background: var(--scrim); }
.quicklook:not([open]) { display: none; }
.ql-handle { display: none; }

.ql-topbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px 12px 24px;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.ql-position { flex-grow: 1; font-size: 13px; color: var(--muted); }
.ql-close-form { display: contents; }
.icon-button-close { border: 0; background: var(--surface-2); }

.ql-body { display: flex; flex-wrap: wrap; gap: 32px; padding: 24px; }
.ql-media { flex: 1.45 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ql-trailer, .ql-cover {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 12px; background: var(--surface-2);
}
.ql-trailer img, .ql-trailer video, .ql-trailer iframe, .ql-cover img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0;
}
.ql-trailer video { object-fit: contain; background: #000; }
.play-button {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(233, 236, 241, 0.95); color: #111317;
  transition: transform 200ms;
}
.play-button:hover { transform: translate(-50%, -50%) scale(1.06); }
.ql-trailer-caption {
  position: absolute; bottom: 10px; left: 12px;
  font-size: 12px; color: #E9ECF1; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.ql-screenshots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ql-screenshots img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; background: var(--surface-2); }

.ql-info { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.ql-heading { display: flex; flex-direction: column; gap: 6px; }
.ql-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ql-category { font-size: 13px; font-weight: 600; color: var(--accent-text); }
.chip-liveops { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.chip-clone { background: var(--clone-soft); color: var(--clone-soft-text); }
.ql-title {
  font-family: var(--font-head); font-weight: var(--head-weight);
  font-size: 32px; line-height: 1.15; letter-spacing: -0.02em;
}
.ql-one-liner { color: var(--muted); }
.ql-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ql-links .button { padding: 0 16px; }

.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.facts:empty { display: none; }
.facts div { padding: 10px 14px; background: var(--surface); }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { font-weight: 600; }
/* An odd number of facts: the last one spans both columns, so no empty cell shows. */
.facts div:last-child:nth-child(odd) { grid-column: span 2; }

.ql-worked-on { display: flex; flex-direction: column; gap: 8px; }
.ql-worked-on h3 { font-family: var(--font-head); font-weight: 700; font-size: 17px; }
.ql-worked-on ul { padding-left: 20px; list-style: disc; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }

/* --- Tablet (640–1023 px) ---------------------------------------------------------------- */
@media (max-width: 1023px) {
  .container { padding-left: 24px; padding-right: 24px; }
  .header-inner { row-gap: 10px; }
  .header-menu { order: 10; width: 100%; justify-content: space-between; }
  .headline { font-size: 40px; }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quicklook { max-width: calc(100% - 48px); }
}

/* --- Phone (< 640 px) ------------------------------------------------------------------- */
@media (max-width: 639px) {
  body { font-size: 15px; }
  .container { padding-left: 16px; padding-right: 16px; }

  .header-inner { gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .brand { gap: 10px; }
  .monogram { width: 36px; height: 36px; flex-basis: 36px; font-size: 13px; }
  .brand-full { display: none; }
  .brand-short { display: inline; font-size: 16px; }
  .email-link {
    width: 44px; height: 44px; justify-content: center;
    border: 1px solid var(--line); border-radius: var(--radius-button); color: var(--text);
  }
  .email-link svg { display: block; }
  .email-text { display: none; }
  .cv-button { padding: 0 14px; }
  .cv-long { display: none; }
  .cv-short { display: inline; }
  .menu-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: var(--radius-button);
    border: 1px solid var(--line); background: transparent; color: var(--text);
  }

  /* The menu becomes a panel under the header bar. */
  .header-menu {
    display: none; order: 10; flex-direction: column; align-items: stretch; gap: 14px;
    width: calc(100% + 32px); margin: 2px -16px -10px; padding: 12px 16px 16px;
    border-top: 1px solid var(--line); background: var(--surface);
  }
  .header-menu.is-open { display: flex; }
  .main-nav { flex-direction: column; gap: 0; color: var(--text); font-weight: 600; }
  .style-controls { gap: 10px; }
  .style-label { display: block; flex-grow: 1; font-size: 13px; color: var(--muted); }
  .swatches { padding: 0; border: 0; gap: 10px; }
  .mode-toggle {
    width: auto; height: 44px; padding: 0 14px; border-radius: var(--radius-button);
    background: var(--bg); font-size: 13px; font-weight: 600;
  }
  .mode-toggle svg { display: none; }
  .mode-text { display: inline; }

  .intro { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 28px; padding-bottom: 20px; }
  .intro-text { flex-basis: auto; gap: 12px; }
  .role-line { font-size: 13px; }
  .headline { font-size: 30px; line-height: 1.12; letter-spacing: -0.01em; }
  .intro-lead { font-size: 15px; }
  .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 6px; }
  .stat { padding: 12px 14px; }
  .stat-value { font-size: 26px; }
  .stat-label { font-size: 12px; }
  /* From the third tile on, stats become a plain text line (e.g. "PC · Mobile"). */
  .stat:nth-child(n+3) { grid-column: 1 / -1; padding: 0; border: 0; background: none; }
  .stat:nth-child(n+3) .stat-value { font-family: var(--font-body); font-weight: 400; font-size: 13px; color: var(--muted); }
  .stat:nth-child(n+3) .stat-label { display: none; }

  .games { gap: 12px; padding-bottom: 40px; }
  .toolbar { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; padding: 0; border: 0; background: none; }
  .tabs {
    flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none;
    margin: 0 -16px; padding: 0 16px;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: 0 0 auto; padding: 0 14px;
    border: 1px solid var(--line); border-radius: var(--radius-chip);
    background: var(--surface); color: var(--muted); font-size: 13px;
  }
  .tab[aria-selected="true"] { border-color: var(--accent); }
  .search { background: var(--surface); }
  .search input { flex: 1; width: auto; font-size: 15px; }
  .selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .select-label { flex-direction: column; align-items: stretch; gap: 4px; font-size: 12px; }
  .select-label select { width: 100%; background: var(--surface); }
  .count-line { font-size: 13px; }
  .count-long { display: none; }
  .count-short { display: inline; }

  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-media { aspect-ratio: 16 / 10; }
  .card-body { gap: 2px; padding: 8px 10px 10px; }
  .card-title { font-size: 14px; line-height: 1.3; font-weight: 700; letter-spacing: 0; }
  .card-meta { font-size: 12px; }
  .badge { top: 8px; font-size: 11px; }
  .badge-featured { left: 8px; }
  .badge-group { top: 8px; right: 8px; }

  .band-inner { flex-direction: column; gap: 0; padding: 0; }
  .experience { padding: 32px 16px; gap: 4px; }
  .section-title { font-size: 24px; }
  .job { flex-direction: column; gap: 0; padding: 12px 0; }
  .job-years { flex-basis: auto; font-size: 12px; }
  .job-location { display: inline; font-size: 12px; }
  .job-location::before { content: " · "; }
  .job-detail { flex-basis: auto; }
  .job-titles { font-size: 13px; }
  .about {
    padding: 32px 16px; gap: 14px;
    background: var(--bg); border-top: 1px solid var(--line);
  }
  .about-text { font-size: 15px; color: var(--muted); }
  .skills { gap: 10px; }
  .skill-group dt { font-size: 12px; }
  .chip { font-size: 12px; padding: 4px 10px; }
  .hobbies { font-size: 13px; }

  .footer-inner { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 32px; padding-bottom: 40px; }
  .footer-title { font-size: 22px; }
  .footer-email { display: none; }
  .footer-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .footer-email-button { display: flex; grid-column: 1 / -1; }
  .footer-cv { background: transparent; color: var(--text); border-color: var(--line); }

  /* Quick look becomes a bottom sheet. */
  .quicklook {
    width: 100%; max-width: 100%; max-height: 92vh;
    margin: auto 0 0; border-radius: 18px 18px 0 0; border-bottom: 0;
  }
  .quicklook[open] { animation: sheet-up 250ms ease-out; }
  .ql-handle { display: block; width: 36px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--line); }
  .ql-topbar { padding: 8px 16px; }
  .ql-keys-hint { display: none; }
  .ql-body { display: block; padding: 0; }
  .ql-media { display: block; flex: none; }
  .ql-trailer, .ql-cover { border-radius: 0; }
  .ql-screenshots { padding: 10px 16px 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ql-info { flex: none; padding: 20px 16px 32px; }
  .ql-title { font-size: 28px; }
}

@keyframes sheet-up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }

/* --- Reduced motion: no transitions, transforms or animations --------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .card:focus-visible { transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* --- Error page ------------------------------------------------------------------------- */
.error-page { display: flex; flex-direction: column; gap: 24px; padding-top: 96px; padding-bottom: 96px; }
