/* component display rules must not resurrect [hidden] elements */
[hidden] { display: none !important; }

:root {
  --bg: #0b0c10;
  --bg-elev: #101218;
  --surface: #14161d;
  --surface-2: #1a1d25;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f5f8;
  --muted: #9aa0ae;
  --muted-2: #737985;
  --accent: #e23a52;
  --accent-light: #f4627a;
  --accent-deep: #8e1526;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.5);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --page: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1150px 620px at 10% -10%, rgba(226, 58, 82, 0.18), transparent 62%),
    radial-gradient(900px 520px at 92% -4%, rgba(94, 118, 255, 0.08), transparent 58%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

html.is-locked { overflow: hidden; }

img { max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; letter-spacing: 0; }
button { color: inherit; cursor: pointer; }
::selection { background: rgba(226, 58, 82, 0.35); }

:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* The panel is focused on open purely to move the screen-reader cursor; the
   ring belongs on controls, not on the whole dialog. */
.sheet__panel:focus,
.sheet__panel:focus-visible { outline: none; }

.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;
}

.skip-link {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 18px; height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 14px; height: 14px; stroke-width: 1.9; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease, color 160ms ease;
}
.btn:active:not(:disabled) { transform: translateY(2px); }
.btn:disabled { opacity: 0.55; cursor: wait; }

.btn-primary {
  color: #fff;
  border-color: #ef5a70;
  background: linear-gradient(180deg, #ec4a61 0%, #c02a41 55%, #a51f34 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 3px 0 #5f0f1d, 0 10px 22px rgba(0, 0, 0, 0.45);
}
.btn-primary:hover { background: linear-gradient(180deg, #f75d74 0%, #ce3449 55%, #b3263a 100%); border-color: #ff8b9c; }

.btn-surface {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #23262f 0%, #171a21 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 0 #05060a, 0 6px 14px rgba(0, 0, 0, 0.3);
}
.btn-surface:hover { background: linear-gradient(180deg, #2c303a 0%, #1d2129 100%); border-color: var(--line-strong); }

.btn-ghost {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.14);
  background: transparent;
}
.btn-ghost:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }

.btn-outline {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.26);
  background: transparent;
}
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }

.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-sm .icon { width: 15px; height: 15px; }

/* ---------- header ---------- */
.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: 20px 20px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}
.brand-mark { display: block; border-radius: 8px; }
.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.brand--sm .brand-name { font-size: 13px; letter-spacing: 0.16em; color: var(--muted); }

.top-actions { display: flex; gap: 8px; }
.action-feedback {
  position: absolute;
  right: 20px;
  bottom: -22px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.action-feedback:empty { display: none; }

/* ---------- layout ---------- */
.page {
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: 34px 20px 72px;
}

/* ---------- hero ---------- */
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
}
.hero__main { max-width: 700px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  padding: 5px 11px 5px 9px;
  border: 1px solid rgba(226, 58, 82, 0.32);
  border-radius: 999px;
  background: rgba(226, 58, 82, 0.09);
  color: #ff9aa9;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.05rem, 5.6vw, 3.7rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
h1 em {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #ffffff 10%, #ff8f9f 58%, #e23a52 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 54ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
}

/* ---------- search ---------- */
.search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  max-width: 700px;
  margin-top: 26px;
}
.search__wrap { position: relative; min-width: 0; }

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 10px 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: #0d0f14;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field:focus-within {
  border-color: rgba(244, 98, 122, 0.85);
  box-shadow: 0 0 0 3px rgba(226, 58, 82, 0.16), inset 0 2px 6px rgba(0, 0, 0, 0.45);
}
.field__icon { color: var(--muted-2); }
.field:focus-within .field__icon { color: var(--accent-light); }
.field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  appearance: none;
}
.field input::-webkit-search-cancel-button,
.field input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.field input::placeholder { color: #6d737f; }
.field__clear {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}
.field__clear:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.field__clear[hidden] { display: none; }

.search__hint {
  max-width: 700px;
  margin: 12px 0 0;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.55;
}
.search__hint strong { color: #d6d9e0; font-weight: 600; }

.search__feedback {
  max-width: 700px;
  min-height: 0;
  margin: 8px 0 0;
  color: #b7bfcc;
  font-size: 12.5px;
  line-height: 1.5;
}
.search__feedback:empty { display: none; }

.field-error {
  max-width: 700px;
  min-height: 0;
  margin: 8px 0 0;
  color: #ff8b99;
  font-size: 13px;
  font-weight: 500;
}
.field-error:empty { display: none; }

/* search history dropdown */
.history {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0; right: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: #171a21;
  box-shadow: var(--shadow-soft);
  animation: drop 140ms ease;
}
.history[hidden] { display: none; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.history__clear {
  border: 0;
  background: transparent;
  color: var(--accent-light);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}
.history__clear:hover { color: #fff; }
.history__list { max-height: 300px; overflow-y: auto; }
.history__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  text-align: left;
}
.history__item:last-child { border-bottom: 0; }
.history__item:hover, .history__item.is-active { background: rgba(255, 255, 255, 0.06); }
.history__code {
  flex: 0 0 auto;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.history__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-2);
  font-size: 12.5px;
}

/* ---------- platform strip ---------- */
.platform-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 30px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  list-style: none;
}
.hero__note {
  margin: 12px 0 0;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 0.01em;
}
.platform-strip li {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
}
.platform-strip img {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  opacity: 0.85;
}

/* ---------- how it works ---------- */
.steps {
  display: none;
  padding: 20px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.steps__art {
  position: relative;
  display: grid;
  place-items: center;
  height: 96px;
  margin-bottom: 2px;
}
.steps__poster {
  position: absolute;
  width: 64px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.55);
}
.steps__poster--a { transform: translate(-56px, 10px) rotate(-12deg) scale(0.86); opacity: 0.85; }
.steps__poster--b { width: 80px; transform: translate(0, -5px); z-index: 3; }
.steps__poster--c { transform: translate(56px, 10px) rotate(12deg) scale(0.86); opacity: 0.85; }
.steps__chip {
  position: absolute;
  z-index: 4;
  bottom: 2px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(10, 11, 15, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #fff;
}
.steps__title {
  margin: 11px 0 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.steps__list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}
.steps__list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 11px; }
.steps__num {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(226, 58, 82, 0.12);
  color: #ff9aa9;
  font-size: 11px;
  font-weight: 700;
}
.steps__list strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.steps__list p {
  margin: 3px 0 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}
/* ---------- catalog ---------- */
.catalog { margin-top: 46px; }
.catalog__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.catalog__titles h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.catalog__status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 12.5px;
}
.catalog__status:empty { display: none; }
.catalog__clear {
  padding: 0;
  border: 0;
  background: transparent;
  color: #ff9aa9;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.catalog__clear[hidden] { display: none; }
.catalog__clear:hover { color: #fff; }

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: #0e1015;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}
.seg {
  min-width: 78px;
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-2);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease;
}
.seg:hover { color: var(--text); }
.seg.is-active {
  color: #fff;
  background: linear-gradient(180deg, #343844, #23262e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 5px rgba(0, 0, 0, 0.45);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
  transition: opacity 160ms ease;
}
.grid.is-refreshing { opacity: 0.55; }

/* ---------- poster card ---------- */
.card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #15171e;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.3, 1), border-color 220ms ease, box-shadow 220ms ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.24); box-shadow: 0 18px 34px rgba(0, 0, 0, 0.55); }
.card:active { transform: translateY(-1px); }

.card__img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.card:hover .card__img { transform: scale(1.04); }

.card__top {
  position: absolute;
  top: 8px; left: 8px; right: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}
.card__code {
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: rgba(9, 10, 14, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  font-variant-numeric: tabular-nums;
}
.card__views {
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(9, 10, 14, 0.66);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #c8ccd6;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.card__title {
  position: absolute;
  right: 0; bottom: 33px; left: 0;
  display: -webkit-box;
  padding: 28px 10px 9px;
  overflow: hidden;
  background: linear-gradient(transparent, rgba(6, 7, 10, 0.94) 42%);
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.32;
  letter-spacing: -0.005em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.card__platform {
  position: absolute;
  right: 0; bottom: 0; left: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 8px;
  background: rgba(6, 7, 10, 0.95);
  color: #c3c8d2;
  font-size: 10.5px;
  font-weight: 500;
}
.card__platform img { width: 16px; height: 16px; border-radius: 4px; }
.card__platform-mark {
  width: 16px; height: 16px; flex: none;
  display: grid; place-items: center;
  border-radius: 4px;
  font-size: 8.5px; font-weight: 700; line-height: 1;
  color: #eef0f5;
  background: linear-gradient(150deg, #454b5c, #23252e);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.card__platform span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* skeleton */
.skeleton {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: #14161c;
}
.skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.055) 45%, transparent 70%);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- empty state ---------- */
.empty {
  margin: 22px 0 0;
  padding: 30px 22px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
}
.empty[hidden] { display: none; }
.empty__title { margin: 0; font-size: 16px; font-weight: 650; }
.empty__body { margin: 8px auto 0; max-width: 44ch; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.empty__picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 20px; }
.empty__pick {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #d7dae1;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.empty__pick:hover { border-color: var(--accent-light); color: #fff; }

/* ---------- faq ---------- */
.faq {
  width: min(100%, var(--page));
  margin: 54px auto 0;
  padding: 0 20px;
}
.faq__head { margin-bottom: 16px; }
.faq__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.faq__head p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.faq__list { display: grid; gap: 8px; }
.faq__item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
  transition: border-color 140ms ease, background 140ms ease;
}
.faq__item[open] { border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.045); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  color: #eef1f6;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  flex: none;
  color: var(--muted-2);
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}
.faq__item[open] summary::after { content: "\2013"; }
.faq__item p {
  margin: 0;
  padding: 0 16px 15px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.66;
  /* The block is full-width at 1280, which pushes the measure past 100
     characters. Cap it at a readable line and let the row keep its border. */
  max-width: 72ch;
}
.faq__item p strong { color: #e6e9ee; font-weight: 650; letter-spacing: 0.02em; }
/* Inline tokens (?src=, A1361) — the UA monospace is a size down from the
   body copy and reads as a mistake, so keep the family and only mark the box. */
.faq__item code {
  padding: 1px 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: #e6e9ee;
  font: inherit;
  font-size: 0.95em;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- footer ---------- */
.catalog__foot { display: flex; justify-content: center; padding: 30px 0 0; }
.catalog__foot[hidden] { display: none; }

.site-footer {
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: 26px 20px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-footer__links { display: flex; gap: 18px; }
.site-footer__links a {
  color: var(--muted-2);
  font-size: 12.5px;
  text-decoration: none;
}
.site-footer__links a:hover { color: var(--text); }
.site-footer__note {
  max-width: 72ch;
  margin: 14px 0 0;
  color: #5f646e;
  font-size: 11.5px;
  line-height: 1.6;
}

/* ---------- sheet ---------- */
.sheet {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  align-items: end;
}
.sheet[hidden] { display: none; }
.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade 180ms ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet__panel {
  position: relative;
  width: 100%;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 24px 20px calc(22px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #1b1e26 0%, #14161c 60%);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
  animation: rise 240ms cubic-bezier(0.2, 0.8, 0.25, 1);
}
@keyframes rise { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }

.sheet__close {
  position: absolute;
  top: 14px; right: 14px;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}
.sheet__close:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

.sheet__kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 46px 14px 0;
  color: #ff9aa9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sheet__summary {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.sheet__poster {
  width: 76px;
  height: 101px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.sheet__summary-text { min-width: 0; }
.sheet__summary h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.sheet__code {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 9px 0 0;
  color: var(--muted-2);
  font-size: 11.5px;
}
.sheet__code span { letter-spacing: 0.08em; text-transform: uppercase; font-size: 10.5px; }
.sheet__code strong {
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.sheet__desc {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* Long synopses are clamped so the CTA stays above the fold; the expander is
   only rendered when there is actually more text to reveal. */
.sheet__desc.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.sheet__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 13px 0 0;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.sheet__meta .is-rating { color: #ffc66b; font-weight: 700; }
.sheet__meta .is-genre { color: #d3d7e0; }
.sheet__meta-dot { opacity: 0.4; }

.sheet__hook {
  margin: 11px 0 0;
  color: #f2f4f8;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.36;
  letter-spacing: -0.01em;
}
.sheet__hook[hidden] { display: none; }

.sheet__expand {
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: #ff9aa9;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.sheet__expand:hover { text-decoration: underline; }
.sheet__expand[hidden] { display: none; }

.sheet__cast {
  margin: 11px 0 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}
.sheet__cast[hidden] { display: none; }

.sheet__related {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sheet__related[hidden] { display: none; }
.sheet__related-title {
  margin: 0 0 10px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.related-row { display: grid; gap: 8px; }
.related-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
.related-card:hover { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); }
.related-card img {
  width: 44px; height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  object-fit: cover;
}
.related-card__copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.related-card__copy strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.related-card__copy small { color: var(--muted-2); font-size: 11px; letter-spacing: 0.02em; }

.sheet__actions { margin-top: 18px; display: grid; gap: 9px; }
.sheet__actions .btn { min-height: 52px; }

/* Utility sheets (browser / share fallbacks) share the drama sheet chrome
   but carry prose instead of a poster summary, so they need their own rhythm. */
.sheet--utility .sheet__kicker { margin-bottom: 10px; }
.sheet--utility h2 {
  margin: 0;
  color: #f2f4f8;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.sheet--utility .sheet__desc { margin-top: 10px; }
.sheet--utility .manual-link { margin-top: 10px; }

/* ---------- catalogue recovery ---------- */
.recovery { min-height: 0; }
.recovery:not(:empty) { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.recovery-btn {
  height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #e6e9ef;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.recovery-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.28); }
.recovery-text { align-self: center; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* ---------- store button marks ---------- */
.store__marks { display: inline-flex; align-items: center; gap: 5px; flex: none; color: #e8ebf1; }
.sheet__actions .btn-block + .btn-block { margin-top: 0; }

.store { justify-content: flex-start; gap: 12px; padding: 0 16px; }
.store[hidden] { display: none; }
.store__copy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; gap: 3px; }
.store__copy strong { font-size: 14px; font-weight: 600; }
.store__copy small { color: var(--muted-2); font-size: 11.5px; font-weight: 400; }

.sheet__hint {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.55;
}
.sheet__hint strong { color: #d7dae1; font-weight: 600; letter-spacing: 0.04em; }

.sheet__return {
  margin: 6px 0 0;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}
.sheet__return[hidden] { display: none; }

.manual-link {
  width: 100%;
  height: 34px;
  margin-top: 8px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #0c0e13;
  color: #dfe3ea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
}
.manual-link:focus { outline: none; border-color: rgba(255, 255, 255, 0.34); }

.sheet__tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
.tool:hover { color: #fff; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); }

.sheet__advisory {
  margin: 2px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(226, 58, 82, 0.24);
  border-radius: 8px;
  background: rgba(226, 58, 82, 0.08);
  color: #ffb8c2;
  font-size: 12px;
  line-height: 1.5;
}
.sheet__advisory[hidden] { display: none; }
.sheet__advisory strong { color: #fff; font-weight: 600; }

.sheet__feedback {
  min-height: 0;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}
.sheet__feedback:empty { display: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 26px;
  max-width: min(420px, calc(100% - 32px));
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #23262f;
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  h1 { line-height: 0.96; }
}

@media (max-width: 599px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search__wrap { grid-column: 1 / -1; }
  .search__submit, .search__paste { width: 100%; }
  .top-actions__label { display: none; }
  .site-header { padding-top: 16px; }
  .page { padding-top: 26px; }
  .lede { font-size: 14.5px; }
  .catalog { margin-top: 34px; }
  .catalog__head { flex-direction: column; align-items: stretch; gap: 12px; }
  .segmented { align-self: flex-start; }
  .platform-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
  }
  .platform-strip::-webkit-scrollbar { display: none; }
  .platform-strip li { white-space: nowrap; }
}

@media (min-width: 700px) {
  .sheet { place-items: center; padding: 24px; }
  .sheet__panel {
    width: min(500px, 100%);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 18px;
    padding: 26px 24px 22px;
    max-height: calc(100dvh - 48px);
  }
}

@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .site-header { padding: 22px 24px 0; }
  .page { padding: 44px 24px 84px; }
  .site-footer { padding-inline: 24px; }
}

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: start; }
  .steps { display: block; margin-top: 4px; }
  .steps__art { display: none; }
}

@media (min-width: 1200px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) 336px; gap: 56px; }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .steps__art { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
