@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Hahmlet:wght@400;500;600;700&family=Noto+Serif+KR:wght@500;600;700&display=swap");
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css");

:root {
  --ink: #090807;
  --panel: #12100e;
  --panel2: #181411;
  --oxblood: #72141c;
  --red: #a52b32;
  --parchment: #e8ddca;
  --ivory: #fff8ec;
  --muted: #a89d8c;
  --brass: #a9874f;
  --line: rgba(169, 135, 79, 0.34);
  --black: var(--ink);
  --bone: var(--parchment);
  --display: "Cormorant Garamond", "Noto Serif KR", "Nanum Myeongjo", "Batang", Georgia, serif;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "Batang", serif;
  --sans: Pretendard, "Noto Sans KR", system-ui, sans-serif;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

@media (min-width: 761px) {
  :root {
    --display: "Cormorant Garamond", "Hahmlet", "Nanum Myeongjo", "Batang", Georgia, serif;
    --serif: "Hahmlet", "Nanum Myeongjo", "Batang", serif;
  }
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 80% 0, rgba(114, 20, 28, 0.09), transparent 32rem),
    var(--ink);
  color: var(--parchment);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  content: "";
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

::selection {
  background: var(--oxblood);
  color: var(--ivory);
}

img,
picture {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  margin: 0;
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.skip {
  position: fixed;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  border: 1px solid var(--brass);
  background: var(--parchment);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus {
  transform: translateY(0);
}

.wrap {
  width: min(1400px, 92vw);
  margin-inline: auto;
}

.kicker,
.eyebrow {
  margin: 0;
  color: var(--brass);
  font-family: var(--display);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  font-size: 0.76rem;
}

.text-link,
.more {
  color: #d5b477;
  text-decoration-color: rgba(213, 180, 119, 0.52);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.text-link {
  overflow-wrap: anywhere;
}

.more {
  font-size: 0.78rem;
  text-decoration: none;
}

.more:hover,
.text-link:hover {
  color: var(--ivory);
}

/* Shared header */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 0 4vw;
  gap: clamp(1.2rem, 3vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 8, 7, 0.9);
  backdrop-filter: blur(18px);
}

.brand,
.wordmark,
.footer-brand {
  flex: 0 0 auto;
  color: #d7b57a;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand b {
  color: var(--red);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.2vw, 2.2rem);
  margin-inline: auto;
}

.nav-links > a:not(.cta) {
  position: relative;
  padding: 0.75rem 0.05rem;
  color: #c9bead;
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links > a:not(.cta)::after {
  position: absolute;
  right: 0;
  bottom: 0.45rem;
  left: 0;
  height: 1px;
  content: "";
  background: var(--brass);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.nav-links > a:hover,
.nav-links > a.active {
  color: var(--ivory);
}

.nav-links > a.active::after,
.nav-links > a:hover::after {
  transform: scaleX(1);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  width: clamp(140px, 15vw, 190px);
  border-bottom: 1px solid rgba(169, 135, 79, 0.55);
}

.header-search::before {
  content: "⌕";
  color: #d3bb91;
  font-family: var(--display);
  font-size: 1.25rem;
}

.header-search input {
  min-width: 0;
  width: 100%;
  padding: 0.55rem 0.35rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--parchment);
  font-size: 0.8rem;
}

.header-search input::placeholder {
  color: #7d7366;
}

.login {
  min-height: 40px;
  padding: 0.45rem 0;
  border: 0;
  background: none;
  color: #c9bead;
  font-size: 0.83rem;
}

.menu-btn {
  display: none;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--parchment);
}

/* Buttons */
.primary,
.cta,
.secondary,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.82rem 1.45rem;
  border: 1px solid var(--brass);
  border-radius: 2px;
  color: #fff4e6;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.primary,
.cta {
  background: linear-gradient(135deg, #571014, #7e161f);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 160, 0.08);
}

.primary:hover,
.cta:hover {
  border-color: #c29a59;
  background: #941d29;
  color: var(--ivory);
  transform: translateY(-2px);
}

.secondary,
.ghost-btn {
  background: rgba(9, 8, 7, 0.68);
  color: #d7cab7;
}

.secondary:hover,
.ghost-btn:hover {
  background: #221c17;
  color: var(--ivory);
  transform: translateY(-2px);
}

.nav-links .cta {
  min-height: 40px;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
}

.full {
  width: 100%;
}

/* Flagship hero */
.hero,
.catalog-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 630px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #241311, #090807 62%);
}

.hero-image,
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-image img,
.hero-media img,
.catalog-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background: radial-gradient(circle at 72% 52%, transparent 0, rgba(4, 3, 2, 0.22) 43%, rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
}

.hero::after,
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, #070605 4%, rgba(7, 6, 5, 0.97) 24%, rgba(7, 6, 5, 0.68) 50%, rgba(7, 6, 5, 0.15) 78%),
    linear-gradient(0deg, #090807 0, transparent 28%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1400px, 86vw);
  max-width: none;
  margin-inline: auto;
  padding-block: 4.8rem;
}

.hero-copy > * {
  max-width: 640px;
}

.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #d9c198;
  font-family: var(--sans);
  font-size: 0.73rem;
  letter-spacing: 0.13em;
}

.hero .eyebrow::after {
  width: 52px;
  height: 1px;
  content: "";
  background: var(--brass);
}

.hero-en {
  margin: 2rem 0 0.55rem;
  color: var(--brass);
  font-family: var(--display);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.24em;
}

.hero h1 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(4rem, 6vw, 6rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.075em;
  text-shadow: 0 4px 26px #000;
  word-break: keep-all;
}

.hero h1 em {
  display: block;
  margin-top: 0.55rem;
  color: #d3b179;
  font-family: var(--display);
  font-size: 0.23em;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.hero-logline,
.hero-tagline {
  margin: 1.25rem 0 0.65rem;
  color: #f0e2ca;
  font-family: var(--serif);
  font-size: 1.34rem;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.035em;
  word-break: keep-all;
}

.hero-world,
.hero-desc {
  margin: 0;
  color: #b8ad9d;
  font-family: var(--sans);
  font-size: 0.94rem;
  line-height: 1.8;
  word-break: keep-all;
}

.hero-meta,
.hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 1.35rem 0;
}

.hero-meta > span,
.hero .meta > span {
  padding: 0 0.8rem;
  border: 0;
  border-right: 1px solid #5c4d38;
  color: #d5c4ab;
  font-size: 0.77rem;
}

.hero-meta > span:first-child,
.hero .meta > span:first-child {
  padding-left: 0;
  color: #dfb977;
}

.hero-actions,
.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.2rem;
}

.hero-index {
  position: absolute;
  right: 4vw;
  bottom: 2.2rem;
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.hero-index strong,
.hero-index b {
  color: #e7cf9e;
  font-family: var(--display);
  font-size: 2.3rem;
  font-weight: 600;
  line-height: 1;
}

.hero-index span {
  color: #8b806f;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

/* Shared section headings */
.section {
  padding-block: 5rem;
  border-top: 1px solid rgba(232, 221, 202, 0.09);
}

.catalog-section {
  padding-top: 5.4rem;
  padding-bottom: 6.8rem;
}

.section-head,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.1rem;
}

.section-head h2,
.section-heading h2,
.ai-banner h2,
.play-modal h2 {
  margin: 0.35rem 0 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(2.1rem, 3vw, 3.2rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.055em;
  word-break: keep-all;
}

.section-heading > div > p:last-child,
.section-head > div > p:last-child {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.count {
  margin: 0;
  color: #8e8375;
  white-space: nowrap;
}

.count strong {
  color: #d9bb84;
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 600;
}

/* Home catalog filters */
.filters,
.case-filters {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
  margin-bottom: 2.15rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.filter-group > span {
  flex: 0 0 auto;
  color: #82786b;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-chips button,
.case-filters button {
  min-height: 36px;
  padding: 0.42rem 0.78rem;
  border: 1px solid transparent;
  border-radius: 2rem;
  background: transparent;
  color: #a99f91;
  font-size: 0.79rem;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.filter-chips button:hover,
.case-filters button:hover {
  border-color: rgba(169, 135, 79, 0.45);
  color: var(--ivory);
}

.filter-chips button.active,
.filter-chips button[aria-pressed="true"],
.case-filters button.active,
.case-filters button[aria-pressed="true"] {
  border-color: #d7bc8d;
  background: #d7bc8d;
  color: #16110b;
}

/* Catalog cards */
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 1.1rem;
}

.game-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(169, 135, 79, 0.25);
  border-radius: 2px;
  background: #100e0c;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.game-card:hover,
.game-card:focus-within {
  border-color: #b89458;
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.card-art {
  position: relative;
  height: 260px;
  overflow: hidden;
  background-color: var(--panel2);
  background-position: center;
  background-size: cover;
}

.card-art::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.035);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent 48%);
  pointer-events: none;
}

.card-art-media,
.card-art-media img,
.card-art > picture,
.card-art > picture img,
.card-art > img {
  width: 100%;
  height: 100%;
}

.card-art-media img,
.card-art > picture img,
.card-art > img {
  object-fit: cover;
  object-position: center;
  transition: transform 320ms ease;
}

.game-card:hover .card-art-media img,
.game-card:focus-within .card-art-media img,
.game-card:hover .card-art > picture img,
.game-card:focus-within .card-art > picture img,
.game-card:hover .card-art > img,
.game-card:focus-within .card-art > img {
  transform: scale(1.06);
}

.card-art-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.case-number,
.card-art .badge {
  position: absolute;
  top: 0.85rem;
  z-index: 3;
  font-family: var(--display);
  font-size: 0.67rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.15em;
}

.case-number {
  left: 0.85rem;
  color: #e2d2b6;
}

.card-art .badge {
  right: 0.75rem;
  padding: 0.48rem 0.6rem;
  border-color: rgba(217, 193, 152, 0.42);
  background: #7e1620;
  color: #fff0dc;
  letter-spacing: 0.04em;
}

.quick-play {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #cfad73;
  border-radius: 50%;
  background: rgba(10, 8, 6, 0.8);
  color: #f3d7a4;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.game-card:hover .quick-play,
.game-card:focus-within .quick-play {
  opacity: 1;
  transform: translateY(0);
}

.quick-play:hover {
  background: var(--oxblood);
  color: var(--ivory);
}

.card-body {
  padding: 1.15rem 1.1rem 1rem;
}

.card-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: #b38b55;
  font-size: 0.69rem;
  font-weight: 600;
}

.card-labels i {
  color: #5b5145;
  font-style: normal;
}

.card-body h3 {
  margin: 0.52rem 0 0.16rem;
  color: #f4e8d4;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.045em;
}

.card-body h3 a {
  text-decoration: none;
}

.title-en {
  margin: 0;
  color: #817465;
  font-family: var(--display);
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.17em;
}

.tagline {
  min-height: 2.5em;
  margin: 0.8rem 0 1rem;
  color: #a99e90;
  font-size: 0.78rem;
  line-height: 1.58;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-top: 0.78rem;
  border-top: 1px solid #2f2922;
  color: #8c8174;
  font-size: 0.68rem;
}

.card-meta > :last-child,
.card-meta b {
  margin-left: auto;
  color: #d2ad70;
  font-weight: 500;
}

.empty,
.catalog-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 5rem 1rem;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.empty strong,
.empty b {
  color: #d8cbb8;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.empty button {
  margin-top: 0.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--brass);
  border-radius: 2px;
  background: transparent;
  color: var(--parchment);
}

/* AI director */
.section.ai-banner,
.ai-case-director {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 2.5rem;
  width: min(1320px, 92vw);
  padding: 3.3rem 3.7rem;
  margin: 0 auto 6.8rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 80% 20%, rgba(125, 24, 31, 0.2), transparent 32%),
    #100e0c;
}

.ai-director-glow,
.ai-banner::before {
  position: absolute;
  top: 1.8rem;
  left: 1.8rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a4262c;
  box-shadow: 0 0 20px 8px #71171c;
  content: "";
}

.ai-banner h2 {
  font-size: clamp(1.75rem, 2.5vw, 2.3rem);
}

.ai-banner > p {
  margin: 0;
  color: #a99e8e;
  font-size: 0.9rem;
  line-height: 1.8;
}

.text-cta {
  padding: 0.7rem 0;
  border: 0;
  border-bottom: 1px solid var(--brass);
  background: none;
  color: #e3c997;
  font-size: 0.82rem;
  white-space: nowrap;
}

.text-cta span {
  margin-left: 1rem;
}

.text-cta:hover {
  color: var(--ivory);
}

/* Jubensha genre collection */
.jubensha-section {
  position: relative;
  isolation: isolate;
}

.jubensha-section::before {
  position: absolute;
  top: 2.4rem;
  right: 0;
  z-index: -1;
  color: rgba(169, 135, 79, 0.055);
  content: "劇本殺";
  font-family: var(--serif);
  font-size: clamp(5rem, 13vw, 11rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.09em;
  pointer-events: none;
}

.jubensha-heading > div {
  max-width: 830px;
}

.jubensha-heading > div > p:last-child {
  max-width: 760px;
  line-height: 1.75;
  word-break: keep-all;
}

.jubensha-primer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  margin: 0 0 1.25rem;
  list-style: none;
  border: 1px solid rgba(169, 135, 79, 0.27);
  background: linear-gradient(105deg, rgba(114, 20, 28, 0.1), transparent 58%), #0e0c0a;
}

.jubensha-primer li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  min-width: 0;
  padding: 1.15rem 1.25rem;
}

.jubensha-primer li + li {
  border-left: 1px solid rgba(169, 135, 79, 0.2);
}

.jubensha-primer li > span {
  color: #b69057;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.jubensha-primer strong {
  display: block;
  margin-bottom: 0.32rem;
  color: #e9dbc4;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
}

.jubensha-primer p {
  margin: 0;
  color: #8f8578;
  font-size: 0.72rem;
  line-height: 1.55;
  word-break: keep-all;
}

.jubensha-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.jubensha-card {
  display: grid;
  grid-template-columns: minmax(155px, 37%) minmax(0, 1fr);
  min-height: 292px;
  overflow: hidden;
  border: 1px solid rgba(169, 135, 79, 0.25);
  border-radius: 2px;
  background:
    linear-gradient(145deg, rgba(114, 20, 28, 0.08), transparent 54%),
    #100e0c;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.jubensha-card:hover,
.jubensha-card:focus-within {
  border-color: #a9874f;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
  transform: translateY(-3px);
}

.jubensha-art {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: #181411;
}

.jubensha-art::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(0deg, rgba(4, 3, 3, 0.65), transparent 58%);
  pointer-events: none;
}

.jubensha-art-media,
.jubensha-art-media img {
  width: 100%;
  height: 100%;
}

.jubensha-art-media img {
  object-fit: cover;
  object-position: center;
  transition: transform 280ms ease;
}

.jubensha-card:hover .jubensha-art-media img,
.jubensha-card:focus-within .jubensha-art-media img {
  transform: scale(1.045);
}

.jubensha-art-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.jubensha-art .case-number {
  z-index: 3;
}

.script-seal {
  position: absolute;
  right: 0.8rem;
  bottom: 0.75rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(238, 210, 163, 0.75);
  color: #eed2a3;
  font-family: var(--serif);
  font-size: 1.05rem;
  box-shadow: inset 0 0 0 3px rgba(9, 8, 7, 0.62);
}

.jubensha-copy {
  display: flex;
  min-width: 0;
  padding: 1.25rem 1.3rem 1.1rem;
  flex-direction: column;
}

.jubensha-label {
  margin: 0;
  color: #b88f56;
  font-family: var(--display);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.jubensha-copy h3 {
  margin: 0.48rem 0 0.16rem;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.045em;
}

.jubensha-copy h3 a {
  text-decoration: none;
}

.jubensha-tagline {
  margin: 0.75rem 0;
  color: #a99e90;
  font-family: var(--serif);
  font-size: 0.78rem;
  line-height: 1.55;
}

.script-spec {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0.7rem 0;
  margin: auto 0 0;
  border-top: 1px solid rgba(169, 135, 79, 0.2);
  border-bottom: 1px solid rgba(169, 135, 79, 0.2);
}

.script-spec div + div {
  padding-left: 0.65rem;
  border-left: 1px solid rgba(169, 135, 79, 0.17);
}

.script-spec dt {
  color: #776e62;
  font-size: 0.6rem;
}

.script-spec dd {
  margin: 0.22rem 0 0;
  color: #c7b69c;
  font-size: 0.7rem;
  white-space: nowrap;
}

.jubensha-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding-top: 0.9rem;
}

.jubensha-actions a,
.jubensha-actions button {
  border: 0;
  background: none;
  color: #c7b69c;
  font-size: 0.72rem;
  text-decoration: none;
}

.jubensha-actions button {
  padding: 0 0 0.2rem;
  border-bottom: 1px solid #a9874f;
  color: #e1c58f;
}

.jubensha-actions button span {
  margin-left: 0.55rem;
}

.jubensha-actions a:hover,
.jubensha-actions button:hover {
  color: var(--ivory);
}

/* Play dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(9px);
  animation: veil-in 180ms ease both;
}

.play-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 2.5rem);
  padding: 2.6rem;
  overflow-y: auto;
  border: 1px solid #876d42;
  border-radius: 2px;
  background: linear-gradient(150deg, #1a1613, #0d0b0a);
  box-shadow: 0 30px 100px #000;
  animation: modal-in 220ms ease both;
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #a69a89;
  font-family: var(--display);
  font-size: 1.8rem;
}

.play-modal h2 {
  padding-right: 2rem;
  margin-bottom: 0.65rem;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.play-modal p:not(.kicker):not(.eyebrow) {
  color: #b6aa99;
}

.modal-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.5rem 0;
}

.modal-spec span,
.modal-spec .chip {
  padding: 0.45rem 0.6rem;
  border: 1px solid #4c4030;
  color: #d4be98;
  font-size: 0.72rem;
}

.play-modal form,
.create-room-state {
  display: grid;
  gap: 0.85rem;
}

.play-modal form > label,
.create-room-state > label {
  padding-top: 1rem;
  border-top: 1px solid #342c25;
  color: #a99d8e;
  font-size: 0.8rem;
  font-weight: 600;
}

.play-modal select,
.invite-link-row input {
  width: 100%;
  min-width: 0;
  padding: 0.72rem 0.8rem;
  border: 1px solid #6d5837;
  border-radius: 2px;
  background: #0b0908;
  color: #eadcc5;
}

.play-modal small {
  display: block;
  margin-top: 0.8rem;
  color: #746b5f;
  font-size: 0.72rem;
  text-align: center;
}

.create-room-state h2 {
  margin-bottom: 0;
}

.invite-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.invite-link-row button {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--brass);
  border-radius: 2px;
  background: var(--panel2);
  color: var(--parchment);
  white-space: nowrap;
}

@keyframes veil-in {
  from { opacity: 0; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
}

/* Lower home data blocks */
.tv-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.tv,
.puzzle,
.panel,
.stat,
.row-card,
.event-card,
.review-card {
  background: var(--panel);
}

.tv {
  padding: 1.25rem;
}

.live {
  color: #d75a60;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.tv strong {
  display: block;
  margin: 0.55rem 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1rem;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.5rem;
}

.puzzle,
.panel,
.stat {
  padding: 1.5rem;
  border: 1px solid var(--line);
}

.puzzle {
  background:
    linear-gradient(135deg, rgba(114, 20, 28, 0.12), transparent 48%),
    var(--panel);
}

.puzzle h3 {
  margin: 0.55rem 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.puzzle button {
  min-height: 42px;
  margin-top: 0.8rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--brass);
  border-radius: 2px;
  background: transparent;
  color: var(--parchment);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.stat b {
  display: block;
  color: #d7b57a;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
}

.list {
  display: grid;
  gap: 0.75rem;
}

.row-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.15rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  transition: border-color 180ms ease, transform 180ms ease;
}

.row-card:hover {
  border-color: #8e7042;
  transform: translateY(-2px);
}

.row-card h3 {
  margin: 0 0 0.35rem;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
}

.rank {
  color: #d6b475;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 600;
}

.ranking-summary {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-bottom: 0;
  background:
    linear-gradient(100deg, rgba(114, 20, 28, 0.16), transparent 42%),
    #0f0d0b;
}

.ranking-leader {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.ranking-leader .rank {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid #9c7b47;
  border-radius: 50%;
  background: rgba(169, 135, 79, 0.08);
  font-size: 1.55rem;
}

.ranking-leader small,
.ranking-leader strong,
.ranking-leader p {
  display: block;
}

.ranking-leader small {
  margin-bottom: 0.12rem;
  color: #9b8f7e;
  font-size: 0.65rem;
}

.ranking-leader strong {
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.25rem;
}

.ranking-leader p {
  margin: 0.15rem 0 0;
  color: #8f8578;
  font-size: 0.7rem;
}

.ranking-season-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  margin: 0;
}

.ranking-season-stats div {
  display: grid;
  align-content: center;
  min-width: 100px;
  padding: 0.3rem 1rem;
  border-left: 1px solid rgba(169, 135, 79, 0.2);
}

.ranking-season-stats dt {
  color: #7f7569;
  font-size: 0.62rem;
}

.ranking-season-stats dd {
  margin: 0.15rem 0 0;
  color: #d6b475;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
}

.home-ranking-board {
  border-top-color: rgba(169, 135, 79, 0.18);
}

.home-ranking-board table {
  min-width: 780px;
}

.home-ranking-board .ranking-row-1 {
  background: rgba(169, 135, 79, 0.055);
}

.ranking-row.me {
  background: linear-gradient(90deg, rgba(169, 135, 79, 0.14), rgba(114, 20, 28, 0.11));
}

.ranking-row.me:hover {
  background: linear-gradient(90deg, rgba(169, 135, 79, 0.2), rgba(114, 20, 28, 0.16));
}

.ranking-row.me > td:first-child {
  box-shadow: inset 3px 0 0 #d6b475;
}

.ranking-row.me strong,
.ranking-row.me .score {
  color: #f0d49b;
}

.ranking-row.my-rank-pin td {
  border-top: 1px solid rgba(214, 180, 117, 0.58);
}

.my-rank-label {
  display: block;
  margin-top: 0.15rem;
  color: #c5a66f;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.home-ranking-board tbody tr:last-child td {
  border-bottom: 0;
}

.event-grid,
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.event-card,
.review-card {
  padding: 1.4rem;
  border: 1px solid var(--line);
  transition: border-color 180ms ease, transform 180ms ease;
}

.event-card:hover,
.review-card:hover {
  border-color: #8e7042;
  transform: translateY(-3px);
}

.event-card h3,
.review-card h3 {
  margin: 0.75rem 0 0.55rem;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.event-card p,
.review-card p {
  color: #b8ad9d;
  font-size: 0.86rem;
  line-height: 1.75;
}

.stars {
  color: #d7b57a;
  letter-spacing: 0.1em;
}

.badge,
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.48rem;
  border: 1px solid var(--line);
  color: #c9b89c;
  font-size: 0.63rem;
  line-height: 1.2;
}

.badge {
  color: #d2ad70;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

/* Legacy poster cards used by related cases and as a static fallback */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.25rem;
}

.poster-grid.game-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 1.1rem;
}

.case-card {
  display: block;
  min-width: 0;
  color: inherit;
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(169, 135, 79, 0.26);
  background: var(--art, var(--panel2));
  background-position: center;
  background-size: cover;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.poster picture,
.poster picture img,
.poster > img {
  width: 100%;
  height: 100%;
}

.poster picture img,
.poster > img {
  object-fit: cover;
}

.poster::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.96), transparent 66%);
  pointer-events: none;
}

.case-card:hover .poster,
.case-card:focus-within .poster {
  border-color: #b89458;
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.case-card-detail {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.poster-copy {
  position: absolute;
  right: 7%;
  bottom: 7%;
  left: 7%;
  z-index: 3;
  pointer-events: none;
}

.poster-copy small {
  color: #d4b374;
  font-family: var(--display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.poster h3 {
  margin: 0.5rem 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.055em;
}

.poster p {
  margin: 0;
  color: #c4bcae;
  font-family: var(--serif);
  font-size: 0.78rem;
  line-height: 1.55;
}

.case-card .poster-copy {
  pointer-events: none;
}

.case-card-title,
.case-card .text-link {
  position: relative;
  z-index: 4;
  pointer-events: auto;
}

.case-card-title,
.case-card-meta {
  text-decoration: none;
}

.case-card-meta {
  color: inherit;
}

/* Secondary page shells and filters */
.page-main {
  min-height: calc(100vh - 76px);
}

.page-head {
  padding-top: clamp(4rem, 8vw, 7rem);
  padding-bottom: 2.6rem;
}

.page-head::before {
  display: block;
  width: 52px;
  height: 1px;
  margin-bottom: 1rem;
  content: "";
  background: var(--brass);
}

.page-head h1 {
  margin: 0.55rem 0 0.8rem;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(3.2rem, 6vw, 6rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.075em;
}

.page-lede,
.page-head > p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  word-break: keep-all;
}

.page-main > .section {
  padding-top: 3rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.8rem;
  padding: 1rem;
  margin-bottom: 2rem;
  border: 1px solid var(--line);
  background: var(--panel);
}

.archive-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1.6fr) repeat(5, minmax(112px, 1fr));
}

.ranking-filters,
.review-filters,
.community-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 0.35fr) auto;
}

.review-filters {
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.4fr);
}

.filter-field {
  display: grid;
  min-width: 0;
  gap: 0.4rem;
}

.filter-field > span,
.link-composer > label {
  color: #b89a67;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.filter-field input,
.filter-field select,
.toolbar > input,
.toolbar > select,
.link-input-row input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.68rem 0.78rem;
  border: 1px solid rgba(169, 135, 79, 0.34);
  border-radius: 2px;
  background: #0d0b09;
  color: var(--parchment);
}

input::placeholder {
  color: #746b5f;
}

select {
  accent-color: var(--oxblood);
}

.status-filters button,
.pagination button,
.toolbar > button:not(.primary) {
  min-height: 42px;
  padding: 0.62rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: #b7aa98;
}

.status-filters button:hover,
.status-filters button.active,
.pagination button:hover,
.pagination button.active,
.toolbar > button:not(.primary):hover,
.toolbar > button:not(.primary).active {
  border-color: #d7bc8d;
  background: #d7bc8d;
  color: var(--ink);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  padding: 2.5rem 0 0;
}

.pagination button {
  min-width: 42px;
}

/* Leaderboard */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--panel);
  scrollbar-color: var(--brass) var(--panel2);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

th,
td {
  padding: 1rem;
  border-bottom: 1px solid rgba(169, 135, 79, 0.18);
  text-align: left;
  font-size: 0.78rem;
}

th {
  color: #c9a96e;
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

tbody tr:hover {
  background: rgba(169, 135, 79, 0.06);
}

.score {
  color: var(--ivory);
  font-weight: 700;
}

/* Community link composer */
.link-composer {
  padding: 1.5rem;
  margin-bottom: 4rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(114, 20, 28, 0.1), transparent 45%),
    var(--panel);
}

.link-composer h2 {
  margin: 0.35rem 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.link-composer > label {
  display: block;
  margin: 1.3rem 0 0.4rem;
}

.link-input-row {
  display: flex;
  gap: 0.55rem;
}

.link-input-row button {
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--parchment);
}

.field-help {
  margin: 0.5rem 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.link-preview {
  margin-top: 1rem;
}

.link-status {
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 1rem;
  gap: 0.7rem;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}

.link-status.error {
  border-color: rgba(201, 66, 74, 0.55);
  color: #e38e91;
}

.spinner {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border: 2px solid var(--line);
  border-top-color: var(--brass);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.link-card {
  display: grid;
  grid-template-columns: minmax(100px, 180px) minmax(0, 1fr) auto;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d0b09;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.link-card:hover {
  border-color: var(--brass);
  transform: translateY(-2px);
}

.link-card img {
  width: 100%;
  height: 100%;
  max-height: 180px;
  object-fit: cover;
}

.link-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.1rem;
}

.link-card small {
  color: var(--brass);
  font-size: 0.65rem;
}

.link-card strong {
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.2rem;
}

.link-card-copy > span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.link-card b {
  overflow: hidden;
  color: #777066;
  font-size: 0.65rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card-arrow,
.link-card-mark {
  align-self: center;
  padding: 1rem;
  color: var(--brass);
  font-size: 1.4rem;
}

.link-card.fallback {
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 100px;
}

.link-card.fallback > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Case detail */
.case-detail {
  padding-bottom: 2rem;
}

.case-loading,
.case-missing {
  padding: 7rem 1rem;
  color: var(--muted);
  text-align: center;
}

.case-missing h1 {
  margin: 0.8rem 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.065em;
}

.case-missing .cta {
  margin-top: 1.4rem;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 2.5rem 0 1.2rem;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.crumbs a {
  color: var(--brass);
  text-decoration: none;
}

.crumbs b {
  color: var(--parchment);
}

.case-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 460px;
  padding: clamp(1.6rem, 4vw, 3rem);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--art, var(--panel2));
  background-position: center;
  background-size: cover;
}

.case-hero.has-keyvisual {
  min-height: 610px;
  background-image: var(--key-visual);
}

.case-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(7, 6, 5, 0.97), rgba(7, 6, 5, 0.6) 54%, rgba(7, 6, 5, 0.12)),
    linear-gradient(0deg, rgba(7, 6, 5, 0.9), transparent 56%);
}

.case-hero-copy {
  max-width: 760px;
}

.case-hero h1 {
  margin: 0.7rem 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7vw, 6.3rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.075em;
}

.case-hero h1 em {
  display: block;
  margin-top: 0.5rem;
  color: #d3b179;
  font-family: var(--display);
  font-size: 0.24em;
  font-style: normal;
  letter-spacing: 0.18em;
}

.case-hero-copy > p:not(.muted) {
  max-width: 590px;
  color: #d2c4b1;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.7;
}

.chip.status {
  border-color: var(--brass);
  color: #d8bb86;
}

.chip.status.new {
  border-color: rgba(201, 66, 74, 0.65);
  color: #db6b70;
}

.case-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 1.5rem;
}

.case-brief {
  max-width: 72ch;
  color: #c9bdae;
  font-size: 0.9rem;
  line-height: 1.9;
  word-break: keep-all;
}

.subhead {
  margin: 2rem 0 0.5rem;
  color: #d3b179;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.case-stats {
  margin: 1.6rem 0;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.case-dossier {
  display: grid;
  gap: 0.9rem;
}

.dossier-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(169, 135, 79, 0.18);
  font-size: 0.8rem;
}

.dossier-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.relationship-panel {
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(114, 20, 28, 0.2), transparent),
    var(--panel);
}

.relationship-panel b {
  color: #d4b477;
  font-family: var(--serif);
  font-size: 1.2rem;
}

.relationship-panel p {
  font-size: 0.8rem;
  line-height: 1.75;
}

.relationship-panel span {
  color: var(--muted);
  font-size: 0.72rem;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.character-card {
  display: grid;
  grid-template-columns: minmax(180px, 42%) minmax(0, 1fr);
  min-height: 350px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(114, 20, 28, 0.1), transparent 50%),
    var(--panel);
}

.character-portrait {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 25%, #4b2023, #100e0c 72%);
}

.character-portrait::after {
  position: absolute;
  inset: 0;
  content: "";
  box-shadow: inset -28px 0 50px rgba(9, 8, 7, 0.45);
  pointer-events: none;
}

.character-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.character-copy {
  align-self: end;
  padding: clamp(1.2rem, 2.5vw, 2rem);
}

.character-copy h3 {
  margin: 0.65rem 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.055em;
}

.character-copy h3 em {
  display: block;
  margin-top: 0.4rem;
  color: #d0ad72;
  font-family: var(--display);
  font-size: 0.36em;
  font-style: normal;
  letter-spacing: 0.13em;
}

.character-copy p {
  color: #c8bbab;
  font-family: var(--serif);
  font-size: 0.9rem;
  line-height: 1.65;
}

.character-card.image-missing {
  grid-template-columns: 1fr;
}

.character-card.image-missing .character-portrait {
  display: none;
}

.featured-cast {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.character-card.compact {
  display: block;
  min-height: 0;
}

.character-card.compact .character-portrait {
  min-height: 0;
  aspect-ratio: 2 / 3;
}

.character-card.compact .character-portrait::after {
  box-shadow: inset 0 -45px 45px rgba(9, 8, 7, 0.65);
}

.character-card.compact .character-copy {
  padding: 1rem;
}

.character-card.compact .character-copy h3 {
  font-size: 1.35rem;
}

.character-card.compact .character-copy p {
  color: var(--muted);
  font-size: 0.72rem;
}

/* Scenario booklet */
.scenario-section {
  position: relative;
}

.scenario-section-note {
  max-width: 72ch;
  margin: -0.4rem 0 1.6rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.scenario-incident-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1.55fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 12% 50%, rgba(126, 28, 35, 0.28), transparent 31%),
    linear-gradient(135deg, rgba(169, 135, 79, 0.06), transparent 55%),
    var(--panel);
}

.scenario-incident-card > p {
  margin: 0;
  color: #d0c3b3;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.95;
  word-break: keep-all;
}

.scenario-timecode {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  color: #d3b179;
  font-family: var(--display);
  font-size: clamp(2.1rem, 5vw, 4rem);
  letter-spacing: 0.05em;
  line-height: 0.9;
}

.scenario-timecode i {
  position: relative;
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--brass), transparent);
}

.scenario-timecode i::before {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
  content: "";
}

.scenario-floorplan {
  padding-top: 1.4rem;
}

.scenario-location-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 0.7rem;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.scenario-location {
  display: flex;
  min-height: 86px;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(169, 135, 79, 0.035);
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 1rem;
}

.scenario-location b {
  color: #8b7760;
  font-family: var(--display);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.scenario-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.scenario-role {
  display: grid;
  gap: 1.2rem;
  background:
    linear-gradient(145deg, rgba(114, 20, 28, 0.12), transparent 45%),
    var(--panel);
}

.scenario-role:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.scenario-role > header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(169, 135, 79, 0.2);
}

.scenario-index {
  color: rgba(211, 177, 121, 0.4);
  font-family: var(--display);
  font-size: 2.3rem;
  line-height: 1;
}

.scenario-role h3,
.scenario-clue-group h3,
.scenario-flow h3,
.scenario-culprit h3 {
  margin: 0.3rem 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.scenario-role h3 {
  font-size: 1.55rem;
}

.scenario-role header p {
  margin: 0;
  color: #b7a994;
  font-size: 0.76rem;
}

.scenario-field b {
  color: #caaa73;
  font-family: var(--display);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
}

.scenario-field p {
  margin: 0.5rem 0 0;
  color: #c9bdae;
  font-size: 0.82rem;
  line-height: 1.75;
}

.scenario-clue-groups {
  display: grid;
  gap: 1.25rem;
}

.scenario-clue-group {
  border: 1px solid var(--line);
  background: var(--panel);
}

.scenario-clue-group > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(169, 135, 79, 0.08), transparent);
}

.scenario-clue-group h3 {
  font-size: 1.5rem;
}

.scenario-clue-group > header > span {
  color: #887b6b;
  font-family: var(--display);
  font-size: 0.64rem;
  letter-spacing: 0.11em;
}

.scenario-clue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scenario-clue {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 1rem;
  min-height: 120px;
  padding: 1.25rem 1.4rem;
  border-right: 1px solid rgba(169, 135, 79, 0.18);
  border-bottom: 1px solid rgba(169, 135, 79, 0.18);
}

.scenario-clue:nth-child(even),
.scenario-clue:last-child {
  border-right: 0;
}

.scenario-clue:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.scenario-clue > b {
  align-self: start;
  padding: 0.45rem 0.25rem;
  border: 1px solid rgba(201, 66, 74, 0.5);
  color: #db777c;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.scenario-clue-group[data-clue-group="forensic"] .scenario-clue > b {
  border-color: rgba(169, 135, 79, 0.55);
  color: #d3b179;
}

.scenario-clue-group[data-clue-group="secret"] .scenario-clue > b {
  border-color: rgba(117, 112, 148, 0.65);
  color: #aaa4cb;
}

.scenario-clue p {
  margin: 0;
  color: #c7baaa;
  font-size: 0.8rem;
  line-height: 1.75;
}

.scenario-flow-list {
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  list-style: none;
}

.scenario-flow-list li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 64px;
  gap: 1.25rem;
  align-items: center;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid rgba(169, 135, 79, 0.18);
}

.scenario-flow-list li:last-child {
  border-bottom: 0;
}

.scenario-flow-list li:hover {
  background: rgba(169, 135, 79, 0.05);
}

.scenario-flow-step {
  color: #caaa73;
  font-family: var(--display);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
}

.scenario-flow h3 {
  font-size: 1.1rem;
}

.scenario-flow-list p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.65;
}

.scenario-flow-list time {
  color: #b8aa97;
  font-family: var(--display);
  font-size: 0.72rem;
  text-align: right;
}

.scenario-spoiler {
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 50%, rgba(126, 28, 35, 0.2), transparent 30%),
    var(--panel);
}

.scenario-spoiler > summary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 132px;
  padding: 1.4rem 1.6rem;
  cursor: pointer;
  list-style: none;
}

.scenario-spoiler > summary::-webkit-details-marker {
  display: none;
}

.scenario-spoiler > summary:hover {
  background: rgba(169, 135, 79, 0.05);
}

.scenario-spoiler > summary:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: -4px;
}

.scenario-lock {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(201, 66, 74, 0.55);
  border-radius: 50%;
  color: #db777c;
}

.scenario-spoiler summary b,
.scenario-spoiler summary strong,
.scenario-spoiler summary small {
  display: block;
}

.scenario-spoiler summary b {
  color: #d17479;
  font-family: var(--display);
  font-size: 0.63rem;
  letter-spacing: 0.12em;
}

.scenario-spoiler summary strong {
  margin: 0.35rem 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
}

.scenario-spoiler summary small {
  color: var(--muted);
  font-size: 0.74rem;
}

.scenario-spoiler summary > i {
  color: #caaa73;
  font-size: 1.8rem;
  font-style: normal;
  transition: transform 180ms ease;
}

.scenario-spoiler[open] summary > i {
  transform: rotate(45deg);
}

.scenario-spoiler-content {
  padding: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.scenario-culprit {
  padding-bottom: 1.6rem;
  border-bottom: 1px solid rgba(169, 135, 79, 0.2);
}

.scenario-culprit h3 {
  margin-top: 0.5rem;
  color: #dc777c;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.scenario-logic {
  max-width: 78ch;
  padding: 1.7rem 0;
}

.scenario-logic h4,
.scenario-endings > h4 {
  margin: 0 0 0.7rem;
  color: #d3b179;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.scenario-logic p,
.scenario-endings p {
  margin: 0;
  color: #c7baaa;
  font-size: 0.82rem;
  line-height: 1.8;
}

.scenario-endings > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.scenario-endings article {
  padding: 1.2rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.scenario-endings article:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.scenario-endings article > b {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1rem;
}

/* Footer */
.site-footer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2.5rem 4vw;
  margin-top: 5rem;
  border-top: 1px solid var(--line);
  color: #786f63;
  font-size: 0.72rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-inline: auto;
}

.site-footer nav a {
  color: #9f9588;
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--parchment);
}

.footer-brand {
  font-size: 1.25rem;
}

/* 4 → 3 columns */
@media (max-width: 1050px) {
  .site-nav {
    min-height: 70px;
  }

  .menu-btn {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    padding: 1rem 4vw 1.25rem;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 8, 7, 0.98);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
    flex-direction: column;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links > a:not(.cta) {
    padding: 0.65rem 0;
  }

  .nav-links .cta {
    width: 100%;
  }

  .header-tools {
    margin-left: auto;
  }

  .game-grid,
  .poster-grid.game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .poster-grid,
  .event-grid,
  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters,
  .case-filters {
    flex-direction: column;
    align-items: flex-start;
  }

  .section.ai-banner,
  .ai-case-director {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-inline: auto;
  }

  .ai-banner .text-cta {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .featured-cast {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .case-cols,
  .character-grid {
    grid-template-columns: 1fr;
  }

  .archive-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 3 → 2 columns */
@media (max-width: 760px) {
  .site-nav {
    min-height: 66px;
    padding-inline: 1.25rem;
  }

  .brand,
  .wordmark {
    font-size: 1.45rem;
  }

  .nav-links {
    top: 66px;
    padding-inline: 1.25rem;
  }

  .header-search {
    width: 40px;
    border: 0;
  }

  .header-search input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .hero,
  .catalog-hero {
    align-items: flex-end;
    min-height: 650px;
  }

  .hero-image img,
  .hero-media img {
    object-position: 63% center;
  }

  .hero::after,
  .hero-shade {
    background: linear-gradient(0deg, #080706 8%, rgba(8, 7, 6, 0.93) 45%, rgba(8, 7, 6, 0.13) 100%);
  }

  .hero-copy {
    width: 100%;
    padding: 9rem 1.5rem 2.7rem;
  }

  .hero h1 {
    font-size: 3.35rem;
  }

  .hero-logline,
  .hero-tagline {
    font-size: 1.08rem;
  }

  .hero-world,
  .hero-desc {
    font-size: 0.82rem;
    line-height: 1.65;
  }

  .hero-index {
    display: none;
  }

  .section {
    padding-block: 4rem;
  }

  .catalog-section {
    padding: 4rem 0 5rem;
  }

  .section-head,
  .section-heading {
    align-items: flex-start;
  }

  .section-head h2,
  .section-heading h2 {
    font-size: 2rem;
  }

  .game-grid,
  .poster-grid.game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .poster-grid,
  .event-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .card-art {
    height: 220px;
  }

  .card-body {
    padding: 0.9rem 0.8rem;
  }

  .tagline {
    display: none;
  }

  .card-meta {
    flex-wrap: wrap;
  }

  .filter-group {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .section.ai-banner,
  .ai-case-director {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 2.5rem 1.8rem;
    margin-bottom: 5rem;
  }

  .jubensha-grid {
    grid-template-columns: 1fr;
  }

  .jubensha-primer {
    grid-template-columns: 1fr;
  }

  .jubensha-primer li + li {
    border-top: 1px solid rgba(169, 135, 79, 0.2);
    border-left: 0;
  }

  .ranking-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .ranking-season-stats {
    border-top: 1px solid rgba(169, 135, 79, 0.2);
  }

  .ranking-season-stats div:first-child {
    border-left: 0;
  }

  .ai-banner .text-cta {
    grid-column: auto;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .tv-strip {
    grid-template-columns: 1fr;
  }

  .page-head {
    padding-top: 3.8rem;
  }

  .page-head h1 {
    font-size: 3.5rem;
  }

  .archive-filters,
  .ranking-filters,
  .review-filters,
  .community-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-filters .primary {
    align-self: end;
  }

  .row-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .row-card > :last-child {
    grid-column: 2;
  }

  .character-card {
    grid-template-columns: 1fr;
  }

  .character-portrait {
    min-height: 440px;
    aspect-ratio: 4 / 5;
  }

  .character-portrait::after {
    box-shadow: inset 0 -30px 50px rgba(9, 8, 7, 0.48);
  }

  .featured-cast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .character-card.compact .character-portrait {
    min-height: 0;
    aspect-ratio: 2 / 3;
  }

  .case-hero.has-keyvisual {
    min-height: 560px;
    background-position: 62% center;
  }

  .case-hero::before {
    background: linear-gradient(0deg, rgba(7, 6, 5, 0.97), rgba(7, 6, 5, 0.55) 70%, rgba(7, 6, 5, 0.16));
  }

  .case-hero h1 {
    font-size: 3.5rem;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer nav {
    margin: 0;
  }

  .play-modal {
    padding: 2.2rem 1.6rem;
  }

  .link-card {
    grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  }

  .link-card-arrow {
    display: none;
  }
}

/* 2 → 1 columns */
@media (max-width: 480px) {
  .login {
    display: none;
  }

  .site-nav {
    gap: 0.65rem;
  }

  .brand,
  .wordmark {
    font-size: 1.27rem;
  }

  .header-tools {
    gap: 0.35rem;
  }

  .hero,
  .catalog-hero {
    min-height: 660px;
  }

  .hero-copy {
    padding-inline: 1.1rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-meta > span,
  .hero .meta > span {
    padding-inline: 0.45rem;
    font-size: 0.68rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions > * {
    width: 100%;
  }

  .section-head,
  .section-heading {
    flex-direction: column;
    gap: 0.8rem;
  }

  .count {
    white-space: normal;
  }

  .game-grid,
  .poster-grid.game-grid,
  .poster-grid {
    grid-template-columns: 1fr;
  }

  .card-art {
    height: 260px;
  }

  .tagline {
    display: block;
  }

  .quick-play {
    opacity: 1;
    transform: translateY(0);
  }

  .jubensha-section::before {
    top: 4.5rem;
    font-size: 5.5rem;
  }

  .jubensha-card {
    grid-template-columns: 1fr;
  }

  .jubensha-art {
    min-height: 240px;
  }

  .jubensha-copy {
    padding: 1.15rem;
  }

  .ranking-leader .rank {
    width: 54px;
    height: 54px;
    font-size: 1.25rem;
  }

  .ranking-season-stats div {
    min-width: 0;
    padding-inline: 0.55rem;
  }

  .ranking-season-stats dt {
    font-size: 0.56rem;
  }

  .ranking-season-stats dd {
    font-size: 1.15rem;
  }

  .archive-filters,
  .ranking-filters,
  .review-filters,
  .community-filters {
    grid-template-columns: 1fr;
  }

  .status-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row-card {
    grid-template-columns: 1fr;
  }

  .row-card > :last-child {
    grid-column: auto;
  }

  .featured-cast {
    grid-template-columns: 1fr;
  }

  .character-portrait {
    min-height: 390px;
  }

  .character-card.compact .character-portrait {
    min-height: 0;
  }

  .page-head h1,
  .case-hero h1 {
    font-size: 2.85rem;
  }

  .case-hero,
  .case-hero.has-keyvisual {
    min-height: 520px;
    padding: 1.25rem;
  }

  .case-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-backdrop {
    padding: 0.75rem;
  }

  .play-modal {
    max-height: calc(100vh - 1.5rem);
    padding: 2rem 1.15rem 1.25rem;
  }

  .invite-link-row,
  .link-input-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .invite-link-row button {
    min-height: 44px;
  }

  .link-card,
  .link-card.fallback {
    grid-template-columns: 1fr;
  }

  .link-card img {
    height: 150px;
  }

  .site-footer {
    padding-inline: 1.25rem;
  }
}

@media (max-width: 760px) {
  .scenario-incident-card {
    grid-template-columns: 1fr;
  }

  .scenario-timecode {
    grid-template-columns: auto minmax(40px, 1fr) auto;
    align-items: center;
  }

  .scenario-location-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scenario-role-grid,
  .scenario-clue-grid,
  .scenario-endings > div {
    grid-template-columns: 1fr;
  }

  .scenario-role:last-child:nth-child(odd),
  .scenario-clue:last-child:nth-child(odd),
  .scenario-endings article:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .scenario-clue {
    border-right: 0;
  }

  .scenario-flow-list li {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .scenario-flow-list time {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .scenario-location {
    min-height: 74px;
  }

  .scenario-role > header {
    gap: 0.7rem;
  }

  .scenario-index {
    font-size: 1.7rem;
  }

  .scenario-clue {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 0.75rem;
    padding-inline: 1rem;
  }

  .scenario-flow-list li {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding-inline: 1rem;
  }

  .scenario-flow-list time {
    grid-column: auto;
  }

  .scenario-spoiler > summary {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding-inline: 1rem;
  }

  .scenario-lock {
    width: 36px;
    height: 36px;
  }

  .scenario-spoiler summary strong {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Live multiplayer rooms and email identity gate */
.open-rooms-section {
  padding-top: 4.6rem;
  padding-bottom: 4.8rem;
  border-top: 0;
  border-bottom: 1px solid rgba(232, 221, 202, 0.09);
}

.open-rooms-heading .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.open-rooms-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d3444e;
  box-shadow: 0 0 0 5px rgba(211, 68, 78, 0.12), 0 0 16px rgba(211, 68, 78, 0.62);
}

.open-room-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  min-height: 110px;
}

.open-room-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 312px;
  padding: 1.35rem;
  overflow: hidden;
  border: 1px solid #3f352b;
  border-radius: 3px;
  background:
    radial-gradient(circle at 100% 0, rgba(126, 22, 31, 0.2), transparent 42%),
    linear-gradient(145deg, #191512, #0d0b0a 72%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  flex-direction: column;
}

.open-room-card.is-playing {
  border-color: #514234;
  background:
    radial-gradient(circle at 100% 0, rgba(62, 82, 66, 0.22), transparent 42%),
    linear-gradient(145deg, #161713, #0d0b0a 72%);
}

.open-room-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, #8b2830, transparent);
}

.open-room-card.is-playing::before {
  background: linear-gradient(90deg, transparent, #607a63, transparent);
}

.open-room-card-top,
.open-room-facts,
.open-room-host,
.open-room-actions {
  display: flex;
  align-items: center;
}

.open-room-card-top {
  justify-content: space-between;
  gap: 0.75rem;
}

.open-room-card-top > strong {
  color: #d3b77f;
  font-size: 0.68rem;
  font-weight: 600;
}

.open-room-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #d7c6a9;
  font-family: var(--display);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.open-room-status-chip::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: #56b874;
  box-shadow: 0 0 10px rgba(86, 184, 116, 0.65);
}

.is-playing .open-room-status-chip::before {
  background: #d3444e;
  box-shadow: 0 0 10px rgba(211, 68, 78, 0.65);
}

.open-room-case {
  margin: 1.65rem 0 0.3rem;
  color: #a88958;
  font-family: var(--display);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.open-room-card h3 {
  margin: 0;
  overflow: hidden;
  color: #f0e2cd;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.open-room-facts {
  gap: 0;
  margin-top: 0.75rem;
  color: #8f8374;
  font-size: 0.72rem;
}

.open-room-facts span {
  padding-right: 0.75rem;
}

.open-room-facts span + span {
  padding-left: 0.75rem;
  border-left: 1px solid #3c332a;
}

.open-room-host {
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 1.35rem;
}

.open-room-host > i {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #fff5e8;
  font-family: var(--serif);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
}

.open-room-host > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.open-room-host small {
  color: #756c62;
  font-size: 0.6rem;
}

.open-room-host b {
  max-width: 190px;
  overflow: hidden;
  color: #cfc1ae;
  font-size: 0.75rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.open-room-actions {
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.open-room-actions > button {
  min-height: 43px;
  padding: 0.65rem 0.9rem;
  font-size: 0.75rem;
  flex: 1;
}

.open-room-actions > button:disabled {
  cursor: progress;
  opacity: 0.55;
  transform: none;
}

.open-room-unavailable {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #322b25;
  color: #746b60;
  font-size: 0.7rem;
  text-align: center;
}

.open-room-empty {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 2rem;
  border: 1px dashed #43382d;
  background: rgba(17, 14, 12, 0.62);
  text-align: center;
}

.open-room-empty > span {
  color: #856d4d;
  font-family: var(--display);
  font-size: 2rem;
}

.open-room-empty > strong {
  margin-top: 0.45rem;
  color: #ded0bc;
  font-family: var(--serif);
  font-size: 1.2rem;
}

.open-room-empty > p {
  margin: 0.35rem 0 1rem;
  color: #81776b;
  font-size: 0.8rem;
}

.open-room-empty > a {
  min-height: 42px;
}

.home-auth-dialog {
  width: min(500px, 100%);
}

.home-auth-dialog > [data-auth-step] > p:not(.kicker) {
  line-height: 1.65;
}

.home-auth-dialog > [data-auth-step] > p strong {
  color: #e0c18a;
  font-weight: 600;
  word-break: break-all;
}

.home-auth-form {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.home-auth-form > label,
.home-auth-persona-row label {
  color: #a99d8e;
  font-size: 0.76rem;
  font-weight: 600;
}

.home-auth-form input:not([type="color"]) {
  width: 100%;
  min-height: 47px;
  padding: 0.75rem 0.85rem;
  border: 1px solid #5a4934;
  border-radius: 2px;
  outline: 0;
  background: #0b0908;
  color: #eadcc5;
}

.home-auth-form input:focus {
  border-color: #b18d55;
  box-shadow: 0 0 0 2px rgba(177, 141, 85, 0.15);
}

.home-auth-form small {
  margin: -0.15rem 0 0;
  color: #746b5f;
  font-size: 0.66rem;
  text-align: left;
}

.home-auth-persona-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.home-auth-persona-row label {
  display: grid;
  gap: 0.45rem;
}

.home-auth-persona-row input[type="color"] {
  width: 100%;
  height: 47px;
  padding: 4px;
  border: 1px solid #5a4934;
  background: #0b0908;
}

.home-auth-secondary-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.home-auth-secondary-actions button {
  padding: 0.45rem 0;
  border: 0;
  border-bottom: 1px solid #655238;
  background: none;
  color: #a99575;
  font-size: 0.7rem;
}

.home-auth-dev-code {
  padding: 0.75rem 0.85rem;
  border: 1px solid #6b5432;
  background: #21180f;
  color: #e9c98d !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.home-auth-status {
  min-height: 1.35em;
  margin: 1rem 0 0 !important;
  color: #8fb89a !important;
  font-size: 0.72rem;
}

.home-auth-status.error {
  color: #dc858b !important;
}

.home-auth-account-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.3rem 0;
  padding: 1rem;
  border: 1px solid #4c4030;
  background: #100d0b;
}

.home-auth-account-card > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff5e8;
  font-family: var(--serif);
  font-weight: 700;
}

.home-auth-account-card > div {
  display: flex;
  flex-direction: column;
}

.home-auth-account-card small {
  color: #786f64;
  font-size: 0.65rem;
}

.home-auth-account-card strong {
  color: #e6d6bf;
  font-family: var(--serif);
  font-size: 1.05rem;
}

@media (max-width: 1050px) {
  .open-room-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .open-rooms-section {
    padding-block: 3.6rem;
  }

  .open-room-grid {
    grid-template-columns: 1fr;
  }

  .open-room-card {
    min-height: 285px;
  }

  .home-auth-persona-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .login.home-auth-bound {
    display: inline-flex;
    max-width: 86px;
    overflow: hidden;
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .open-room-card {
    padding: 1.15rem;
  }

  .home-auth-dialog {
    padding-top: 2.1rem;
  }
}
