:root {
  color-scheme: light;
  --bg0: #ffd9ea;
  --bg1: #ffb8d6;
  --panel: rgba(255, 239, 247, 0.84);
  --panel-strong: rgba(255, 230, 240, 0.94);
  --panel-soft: rgba(255, 245, 250, 0.8);
  --surface: rgba(255, 248, 251, 0.74);
  --surface-hover: rgba(255, 234, 243, 0.92);
  --surface-inset: rgba(255, 227, 239, 0.84);
  --fg: #6d193c;
  --muted: rgba(109, 25, 60, 0.72);
  --border: rgba(160, 46, 93, 0.16);
  --border-strong: rgba(160, 46, 93, 0.26);
  --shadow: 0 24px 64px rgba(160, 67, 110, 0.18);
  --radius: 18px;
  --radius-sm: 14px;
  --max: 1040px;
  --accent: #ff5fa8;
  --accent-strong: #cb3d80;
  --accent-soft: #fff7fb;
  --accent-deep: #8c244f;
  --accent-glow: rgba(255, 95, 168, 0.18);
  --accent-glow-strong: rgba(255, 95, 168, 0.28);
  --good: #9bf0c8;
  --good-glow: rgba(155, 240, 200, 0.22);
  --bad: #df5f8b;
  --bad-glow: rgba(223, 95, 139, 0.18);
  --focus: rgba(255, 95, 168, 0.24);
  --font-sans: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-display: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro", "Arial Rounded MT Bold", "Hiragino Sans", Meiryo, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background:
    radial-gradient(1280px 780px at 12% 10%, rgba(255, 255, 255, 0.56), transparent 48%),
    radial-gradient(980px 720px at 86% 12%, rgba(255, 187, 220, 0.54), transparent 50%),
    radial-gradient(880px 660px at 54% 92%, rgba(255, 133, 190, 0.42), transparent 58%),
    linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 100%);
  color: var(--fg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.024) 0px,
      rgba(255, 255, 255, 0.024) 1px,
      rgba(0, 0, 0, 0) 4px,
      rgba(0, 0, 0, 0) 7px
    );
  mix-blend-mode: overlay;
  opacity: 0.08;
}

.container {
  width: min(var(--max), 92%);
  margin: 0 auto;
  padding: 28px 0;
}

.page {
  min-height: 100vh;
}

/* ====== Header ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(160, 46, 93, 0.12);
  background: rgba(255, 239, 247, 0.76);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 8px 24px rgba(160, 67, 110, 0.08);
}

.site-header .container {
  padding-top: 18px;
  padding-bottom: 14px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  user-select: none;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(160, 46, 93, 0.14);
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0) 40%),
    linear-gradient(145deg, #fffafb 0%, #ffd9ea 42%, #ff8fc0 100%);
  color: var(--accent-deep);
  font-weight: 950;
  font-family: var(--font-mono);
  letter-spacing: 0.6px;
  box-shadow:
    0 14px 30px rgba(255, 95, 168, 0.16),
    0 4px 10px rgba(255, 255, 255, 0.34) inset;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 950;
  letter-spacing: 0.03em;
  color: var(--accent-deep);
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.28);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(160, 46, 93, 0.14);
  background: rgba(255, 245, 250, 0.78);
  color: var(--accent-deep);
  font-weight: 950;
  font-size: 12px;
  letter-spacing: 0.16em;
  font-family: var(--font-mono);
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(160, 67, 110, 0.1);
  transition: border-color 140ms ease, background 140ms ease, transform 120ms ease, box-shadow 140ms ease;
}

.nav-link.is-active {
  border-color: rgba(160, 46, 93, 0.22);
  background: linear-gradient(180deg, rgba(255, 250, 252, 0.96), rgba(255, 217, 234, 0.92));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.36) inset,
    0 10px 24px rgba(255, 95, 168, 0.12);
}

.nav-link:hover {
  background: rgba(255, 229, 240, 0.96);
  border-color: rgba(160, 46, 93, 0.22);
  transform: translateY(-1px);
}

.nav-form {
  margin: 0;
  display: inline-flex;
}

.nav-link-button {
  appearance: none;
  font: inherit;
  cursor: pointer;
}

.nav-authenticated {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.nav-user {
  min-height: 34px;
  max-width: min(320px, 62vw);
}

.nav-user-link {
  color: inherit;
  overflow-wrap: anywhere;
  text-align: center;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, transform 120ms ease, box-shadow 140ms ease;
}

.nav-user-link:hover {
  border-color: rgba(160, 46, 93, 0.22);
  background: rgba(255, 229, 240, 0.96);
  transform: translateY(-1px);
}

.nav-user-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.nav-user-link.is-active {
  border-color: rgba(160, 46, 93, 0.22);
  background: linear-gradient(180deg, rgba(255, 250, 252, 0.96), rgba(255, 217, 234, 0.92));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.36) inset,
    0 10px 24px rgba(255, 95, 168, 0.12);
}

/* ====== Typography ====== */
.title {
  margin: 0 0 12px;
  font-size: 28px;
  font-family: var(--font-display);
  font-weight: 950;
  letter-spacing: -0.05em;
  line-height: 1.08;
  color: var(--accent-soft);
  -webkit-text-stroke: 1px rgba(203, 61, 128, 0.54);
  paint-order: stroke fill;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.title:focus,
.title:focus-visible {
  outline: none;
}

.title-xl {
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 60ch;
}

.hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* ====== Layout blocks ====== */
.hero {
  padding: 12px 0 4px;
}

.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-cta-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.home-cta-actions > :nth-child(3):last-child {
  grid-column: 1 / -1;
}

.home-cta-button {
  min-width: 0;
  width: 100%;
  min-height: 72px;
  padding: 18px 24px;
  border-radius: calc(var(--radius) + 2px);
  font-size: 18px;
  letter-spacing: 0.03em;
  box-shadow:
    0 16px 34px rgba(160, 67, 110, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.home-cta-button:hover {
  box-shadow:
    0 18px 38px rgba(160, 67, 110, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.24) inset;
}

.home-cta-note {
  margin-top: 10px;
}

.hero-actions {
  margin-top: 16px;
}

.hero-home {
  display: grid;
  gap: 18px;
  align-items: start;
}

.hero-copy {
  min-width: 0;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.home-hero-title {
  margin: 0;
  width: 100%;
  font-family: var(--font-display);
  font-size: clamp(42px, 14vw, 108px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.92;
  text-align: center;
  white-space: nowrap;
  text-wrap: nowrap;
  justify-self: stretch;
}

.home-hero-title-3 {
  color: var(--accent-soft);
  -webkit-text-stroke: 2px rgba(203, 61, 128, 0.94);
  paint-order: stroke fill;
  text-shadow:
    0 3px 0 rgba(203, 61, 128, 0.62),
    0 8px 20px rgba(255, 95, 168, 0.16),
    0 0 1px rgba(255, 255, 255, 0.88);
}

.home-hero-card {
  margin-top: 0;
  display: grid;
  width: 100%;
  gap: 0;
}

.home-hero-card > * {
  grid-area: 1 / 1;
}

.home-hero-card:not([data-state="loaded"]) {
  min-height: clamp(240px, 42vw, 520px);
  border-radius: calc(var(--radius) + 10px);
  background:
    linear-gradient(180deg, rgba(255, 251, 253, 0.72) 0%, rgba(255, 229, 239, 0.88) 100%);
}

.home-hero-card[data-state="error"] {
  background:
    linear-gradient(180deg, rgba(255, 246, 249, 0.8) 0%, rgba(255, 219, 230, 0.94) 100%);
}

.home-hero-card[data-state="loaded"] {
  min-height: 0;
  background: none;
  border-radius: 0;
}

.home-hero-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: calc(var(--radius) + 10px);
}

.home-hero-status {
  margin: 0;
  max-width: 28ch;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  align-self: center;
  justify-self: center;
  padding: 18px;
}

.card {
  margin-top: 18px;
  background: rgba(255, 239, 247, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: 0 10px 24px rgba(160, 67, 110, 0.1);
  backdrop-filter: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.card-title {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 950;
  font-family: var(--font-mono);
  color: rgba(140, 36, 79, 0.76);
  position: relative;
}

.list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
  position: relative;
}

.quiz-count {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-ranking-header {
  display: grid;
  gap: 6px;
}

.home-ranking-note,
.home-ranking-status {
  margin: 0;
}

.home-ranking-shell {
  margin-top: 12px;
  overflow-x: auto;
}

.home-quiz-mode-layer[hidden] {
  display: none;
}

.home-quiz-mode-panel {
  width: min(760px, 100%);
}

.home-ranking-status {
  color: var(--muted);
  line-height: 1.6;
}

.ranking-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
}

.ranking-table th,
.ranking-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(160, 46, 93, 0.1);
  text-align: left;
  vertical-align: middle;
}

.ranking-table thead th {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: rgba(140, 36, 79, 0.82);
}

.ranking-table tbody tr:last-child td {
  border-bottom: none;
}

.ranking-table tbody tr:nth-child(odd) td {
  background: rgba(255, 247, 251, 0.52);
}

.ranking-user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.ranking-user-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ranking-user-separator {
  color: rgba(140, 36, 79, 0.58);
}

.ranking-user-link {
  color: var(--accent-deep);
  text-decoration-color: rgba(160, 46, 93, 0.3);
  overflow-wrap: anywhere;
}

body[data-quiz-mode-overlay="open"],
body[data-home-quiz-overlay="open"] {
  overflow: hidden;
}

.quiz-mode-layer[hidden] {
  display: none;
}

.quiz-mode-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 16px;
}

.quiz-mode-head .card-title {
  margin-bottom: 0;
}

.quiz-mode-close {
  flex: 0 0 auto;
}

.quiz-mode-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.quiz-mode-option {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(160, 46, 93, 0.12);
  background:
    radial-gradient(circle at top right, rgba(255, 211, 230, 0.36), transparent 42%),
    rgba(255, 247, 251, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.quiz-mode-kicker,
.quiz-mode-copy {
  margin: 0;
}

.quiz-mode-kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: rgba(140, 36, 79, 0.76);
}

.quiz-mode-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.quiz-mode-copy {
  color: var(--muted);
  line-height: 1.7;
}

.quiz-mode-normal-form {
  display: grid;
  gap: 10px;
}

.quiz-mode-normal-controls {
  display: grid;
  grid-template-columns: minmax(0, 168px) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.quiz-mode-select-field {
  display: grid;
  gap: 6px;
}

.quiz-mode-select-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: rgba(140, 36, 79, 0.76);
}

.quiz-mode-select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(160, 46, 93, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 244, 249, 0.94);
  color: var(--fg);
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.2px;
  box-shadow:
    0 10px 22px rgba(160, 67, 110, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.quiz-mode-select:hover {
  border-color: rgba(160, 46, 93, 0.22);
}

.quiz-mode-select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.quiz-mode-button {
  width: 100%;
}

@keyframes quiz-mode-layer-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes quiz-mode-card-float-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.quiz-mode-layer[data-state="overlay"] {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(163, 50, 98, 0.2);
  backdrop-filter: blur(14px) saturate(1.1);
  animation: quiz-mode-layer-fade-in 240ms ease-out both;
}

.quiz-mode-layer[data-state="overlay"] .quiz-mode-card,
.quiz-mode-layer[data-state="overlay"] .home-quiz-mode-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  margin-top: 0;
  padding: 20px;
  border: 1px solid rgba(160, 46, 93, 0.14);
  border-radius: calc(var(--radius) + 2px);
  background: rgba(255, 238, 246, 0.96);
  box-shadow: 0 12px 28px rgba(160, 67, 110, 0.12);
  overflow: auto;
  animation: quiz-mode-card-float-in 240ms cubic-bezier(0.2, 0.9, 0.24, 1) both;
}

.quiz-mode-layer[data-state="overlay"] .quiz-mode-grid {
  margin-top: 16px;
}

.quiz-mode-layer[data-state="overlay"] .hint {
  margin-top: 14px;
}

/* ====== Controls ====== */
.btn {
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(160, 46, 93, 0.14);
  background: rgba(255, 240, 247, 0.88);
  color: var(--fg);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 950;
  letter-spacing: 0.2px;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  box-shadow:
    0 10px 22px rgba(160, 67, 110, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(8px);
  transform: translateY(0);
  transition: transform 120ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.btn:hover {
  border-color: rgba(160, 46, 93, 0.22);
  background: rgba(255, 229, 240, 0.96);
  box-shadow:
    0 12px 26px rgba(160, 67, 110, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.24) inset;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.btn-primary {
  border-color: rgba(160, 46, 93, 0.18);
  background: linear-gradient(180deg, rgba(255, 251, 253, 0.98), rgba(255, 222, 237, 0.98));
  color: var(--accent-deep);
  box-shadow:
    0 14px 32px rgba(255, 95, 168, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #fffdfd, #ffdbe9);
}

.favorite-toggle {
  border-color: rgba(160, 46, 93, 0.16);
  background: rgba(255, 247, 251, 0.9);
  color: var(--accent-deep);
}

.favorite-toggle.is-active {
  border-color: rgba(203, 61, 128, 0.26);
  background: linear-gradient(180deg, rgba(255, 251, 253, 0.98), rgba(255, 223, 236, 0.98));
  box-shadow:
    0 14px 28px rgba(255, 95, 168, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.favorite-toggle.is-disabled,
.favorite-toggle[disabled] {
  border-color: rgba(160, 46, 93, 0.08);
  background: rgba(255, 245, 249, 0.72);
  color: rgba(109, 25, 60, 0.42);
}

.favorite-toggle-compact {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
}

.favorite-toggle-icon {
  font-size: 18px;
  line-height: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid rgba(160, 46, 93, 0.14);
  background: rgba(255, 243, 248, 0.84);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: rgba(140, 36, 79, 0.9);
  backdrop-filter: blur(8px);
}

@media (max-width: 420px) {
  .title {
    font-size: 24px;
  }

  .home-hero-title {
    font-size: clamp(38px, 13vw, 56px);
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .home-hero-card:not([data-state="loaded"]) {
    min-height: clamp(200px, 58vw, 320px);
  }

  .home-hero-image {
    border-radius: calc(var(--radius) + 4px);
  }

  .home-hero-status {
    padding: 14px;
  }

  .home-cta-button {
    min-height: 64px;
    padding: 16px 20px;
    font-size: 17px;
  }
}

@media (max-width: 360px) {
  .home-hero-title {
    font-size: clamp(29px, 11.5vw, 40px);
  }

  .home-ranking-note,
  .quiz-mode-copy {
    font-size: 11px;
    line-height: 1.45;
  }

  .quiz-mode-option {
    padding: 14px;
    gap: 8px;
  }

  .quiz-mode-title {
    font-size: 20px;
  }
}

@media (max-width: 560px) {
  .quiz-mode-normal-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .quiz-mode-layer[data-state="overlay"] {
    padding: 12px;
  }

  .quiz-mode-layer[data-state="overlay"] .quiz-mode-card,
  .quiz-mode-layer[data-state="overlay"] .home-quiz-mode-panel {
    max-height: calc(100vh - 24px);
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quiz-mode-layer[data-state="overlay"] {
    animation: quiz-mode-layer-fade-in 120ms linear both;
  }

  .quiz-mode-layer[data-state="overlay"] .quiz-mode-card,
  .quiz-mode-layer[data-state="overlay"] .home-quiz-mode-panel {
    animation: none;
  }
}

@media (min-width: 920px) {
  .home-ranking-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

/* ====== Quiz ====== */
.quiz-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  margin-bottom: 12px;
}

.quiz-progress,
.quiz-timer {
  display: flex;
  width: fit-content;
}

.quiz-progress {
  color: rgba(140, 36, 79, 0.9);
}

.quiz-timer {
  margin-left: auto;
  color: rgba(140, 36, 79, 0.94);
}

.quiz-timer.is-expired {
  color: var(--bad);
  border-color: rgba(255, 140, 168, 0.35);
  background: rgba(255, 235, 241, 0.92);
}

.quiz-media {
  --quiz-stage-height: clamp(260px, 52svh, 480px);
  --quiz-image-width: 4;
  --quiz-image-height: 3;
  margin-top: 14px;
  position: relative;
  display: grid;
  place-items: center;
  width: min(
    100%,
    800px,
    calc(((var(--quiz-stage-height) - 28px) * var(--quiz-image-width) / var(--quiz-image-height)) + 28px)
  );
  height: var(--quiz-stage-height);
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(160, 46, 93, 0.14);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.22), transparent 54%),
    rgba(255, 244, 249, 0.94);
  box-shadow: 0 10px 22px rgba(160, 67, 110, 0.1);
  isolation: isolate;
}

.quiz-media img {
  display: block;
  max-width: none;
}

.quiz-image-backdrop {
  position: absolute;
  inset: -16px;
  width: calc(100% + 32px);
  height: calc(100% + 32px);
  object-fit: cover;
  object-position: center;
  filter: blur(18px) saturate(1.08) brightness(0.92);
  transform: scale(1.06);
  opacity: 0.92;
}

#quiz-image {
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  max-width: calc(100% - 28px);
  max-height: calc(100% - 28px);
  object-fit: contain;
  object-position: center;
}

.quiz-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 244, 249, 0.02)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0), rgba(255, 226, 239, 0.16));
  pointer-events: none;
}

.feedback {
  margin-top: 12px;
  min-height: 22px;
  font-weight: 950;
  letter-spacing: 0.1px;
}

.feedback-good {
  color: var(--good);
  text-shadow: 0 0 12px var(--good-glow);
}

.feedback-bad {
  color: var(--bad);
  text-shadow: 0 0 12px var(--bad-glow);
}

.choices {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice {
  min-width: 0;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.choice.is-correct {
  border-color: rgba(155, 240, 200, 0.42);
  box-shadow: 0 0 0 3px rgba(155, 240, 200, 0.12) inset;
}

.choice.is-wrong {
  border-color: rgba(255, 140, 168, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 140, 168, 0.14) inset;
}

.quiz-actions {
  align-items: center;
}

.quiz-work-link {
  flex: 0 0 auto;
}

.quiz-work-link.is-disabled,
.quiz-work-link[aria-disabled="true"] {
  border-color: rgba(160, 46, 93, 0.08);
  background: rgba(255, 245, 249, 0.6);
  color: rgba(109, 25, 60, 0.42);
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.quiz-work-link.is-disabled:hover,
.quiz-work-link[aria-disabled="true"]:hover {
  border-color: rgba(160, 46, 93, 0.08);
  background: rgba(255, 245, 249, 0.6);
  transform: none;
}

.quiz-next-btn {
  margin-left: auto;
}

.quiz-card.quiz-card-results {
  padding: 14px 14px 12px;
}

.quiz-card.quiz-card-results .quiz-media,
.quiz-card.quiz-card-results #quiz-shortcut-hint {
  display: none;
}

.quiz-card.quiz-card-results .feedback {
  margin-top: 8px;
  min-height: 0;
}

.quiz-card.quiz-card-results .quiz-work-link,
.quiz-card.quiz-card-results .quiz-next-btn {
  display: none;
}

.quiz-result-hint {
  margin-top: 8px;
  font-size: 11px;
}

.quiz-result-gallery {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quiz-result-card {
  min-width: 0;
  position: relative;
}

.quiz-result-card.is-incorrect .quiz-result-frame {
  border-color: rgba(220, 82, 120, 0.24);
}

.quiz-result-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 4px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(160, 46, 93, 0.14);
  background: rgba(255, 244, 249, 0.94);
  box-shadow: 0 6px 16px rgba(160, 67, 110, 0.08);
}

.quiz-result-card .favorite-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.quiz-result-card.is-favorite .quiz-result-frame {
  border-color: rgba(203, 61, 128, 0.24);
  box-shadow:
    0 0 0 2px rgba(255, 95, 168, 0.08) inset,
    0 6px 16px rgba(160, 67, 110, 0.08);
}

.quiz-result-meta {
  margin-top: 8px;
  display: grid;
  gap: 4px;
}

.quiz-result-name,
.quiz-result-answer,
.quiz-result-page {
  margin: 0;
}

.quiz-result-name {
  font-weight: 800;
  color: var(--accent-deep);
  overflow-wrap: anywhere;
}

.quiz-result-answer {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.quiz-result-sheet-gallery {
  margin-top: 8px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

.quiz-result-open {
  margin-left: auto;
}

.quiz-result-panel {
  width: min(1120px, 100%);
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
}

.quiz-result-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quiz-result-page {
  min-width: 72px;
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--accent-deep);
}

.quiz-result-save {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(160, 46, 93, 0.14);
  background: rgba(255, 247, 250, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 20px rgba(160, 67, 110, 0.06);
}

.quiz-result-save-copy {
  display: grid;
  gap: 4px;
}

.quiz-result-save-title,
.quiz-result-save-status {
  margin: 0;
}

.quiz-result-save-title {
  font-weight: 900;
  color: var(--accent-deep);
}

.quiz-result-save-status {
  line-height: 1.6;
  color: var(--muted);
}

.quiz-result-save-status.is-good {
  color: var(--good);
}

.quiz-result-save-status.is-bad {
  color: var(--bad);
}

.quiz-result-save-form {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.quiz-result-save-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.quiz-result-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.quiz-result-share {
  border-color: rgba(16, 16, 16, 0.9);
  background: linear-gradient(135deg, #121212 0%, #2c2c2c 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(16, 16, 16, 0.18);
}

.quiz-result-share:hover {
  border-color: rgba(16, 16, 16, 0.96);
  background: linear-gradient(135deg, #080808 0%, #202020 100%);
  color: #fff;
}

.quiz-result-share:focus-visible {
  outline: 3px solid rgba(37, 176, 255, 0.42);
  outline-offset: 2px;
}

.quiz-result-note {
  margin-top: 10px;
}

.quiz-result-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, border-color 140ms ease, background 140ms ease;
}

.quiz-result-link:hover {
  transform: translateY(-1px);
  border-color: rgba(160, 46, 93, 0.24);
  background: rgba(255, 232, 241, 0.9);
}

.quiz-result-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.quiz-result-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.quiz-result-badge {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(160, 46, 93, 0.12);
  background: rgba(255, 239, 247, 0.92);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  color: var(--accent-deep);
  backdrop-filter: blur(8px);
}

.quiz-result-badge-question {
  top: 6px;
  left: 6px;
  color: var(--fg);
}

.quiz-result-badge-mark {
  right: 6px;
  bottom: 6px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.quiz-result-badge-good {
  color: var(--good);
}

.quiz-result-badge-bad {
  color: var(--bad);
}

@media (min-width: 720px) {
  .quiz-mode-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quiz-result-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .quiz-result-gallery {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .quiz-result-save-actions {
    justify-content: stretch;
  }

  .quiz-result-save-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .quiz-result-actions {
    justify-content: stretch;
  }

  .quiz-result-share {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .ranking-table {
    min-width: 420px;
    font-size: 13px;
  }

  .ranking-table th,
  .ranking-table td {
    padding: 10px 8px;
  }
}

/* ====== Study ====== */
body[data-study-overlay="open"] {
  overflow: hidden;
}

.study-card + .study-card {
  margin-top: 14px;
}

.study-actress-list {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.study-actress-btn {
  padding: 0;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
}

.study-actress-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  background: rgba(255, 232, 241, 0.84);
}

.study-actress-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.study-actress-meta {
  display: grid;
  gap: 4px;
  padding: 10px 12px 12px;
}

.study-actress-name {
  font-weight: 950;
  line-height: 1.3;
}

.study-actress-count {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.study-actress-btn.is-active {
  border-color: rgba(160, 46, 93, 0.24);
  box-shadow:
    0 0 0 3px rgba(255, 95, 168, 0.1) inset,
    0 12px 26px rgba(255, 95, 168, 0.1);
}

.study-selection {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.study-overlay[hidden] {
  display: none;
}

.study-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(163, 50, 98, 0.2);
  backdrop-filter: blur(14px) saturate(1.1);
}

.study-overlay-panel {
  width: min(1120px, 100%);
  max-height: calc(100vh - 36px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(160, 46, 93, 0.14);
  border-radius: calc(var(--radius) + 2px);
  background: rgba(255, 238, 246, 0.96);
  box-shadow: 0 12px 28px rgba(160, 67, 110, 0.12);
  overflow: hidden;
  position: relative;
}

.study-overlay-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.study-overlay-heading {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.study-overlay-title {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-family: var(--font-display);
  font-weight: 950;
  letter-spacing: -0.05em;
  line-height: 1.1;
  color: var(--accent-soft);
  -webkit-text-stroke: 1px rgba(203, 61, 128, 0.46);
  paint-order: stroke fill;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.18);
}

.study-overlay-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.study-overlay-close {
  flex: 0 0 auto;
}

.study-overlay .study-selection {
  margin-bottom: 0;
}

.study-gallery {
  --study-gallery-columns: 1;
  --study-gallery-gap: 14px;
  display: grid;
  grid-template-columns: repeat(var(--study-gallery-columns), minmax(0, 1fr));
  gap: var(--study-gallery-gap);
  align-items: start;
}

.study-overlay-gallery {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.study-masonry-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: var(--study-gallery-gap);
}

.study-image-card {
  margin: 0;
  min-width: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(160, 46, 93, 0.14);
  background: rgba(255, 244, 249, 0.94);
  box-shadow: 0 8px 18px rgba(160, 67, 110, 0.08);
}

.study-image-card.is-favorite {
  border-color: rgba(203, 61, 128, 0.22);
  box-shadow:
    0 0 0 2px rgba(255, 95, 168, 0.08) inset,
    0 8px 18px rgba(160, 67, 110, 0.08);
}

.study-image-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.study-image-card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

.study-image-card .favorite-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.study-favorite-note {
  margin-top: 0;
}

.study-gallery-message {
  margin: 0;
  grid-column: 1 / -1;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(160, 46, 93, 0.18);
  color: var(--muted);
  background: rgba(255, 244, 249, 0.7);
}

@media (max-width: 720px) {
  .study-overlay {
    padding: 12px;
  }

  .study-overlay-panel {
    max-height: calc(100vh - 24px);
    padding: 16px;
  }

  .study-overlay-header {
    flex-direction: column;
  }

  .study-overlay-close {
    width: 100%;
  }
}

/* ====== My Room ====== */
.page-myroom {
  overflow-x: clip;
}

.myroom-shell {
  width: 100vw;
  width: 100dvw;
  max-width: 100vw;
  max-width: 100dvw;
  display: grid;
  gap: 2px;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50dvw);
  margin-right: calc(50% - 50dvw);
  padding: 6px 0 16px;
}

.myroom-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 10px;
}

.myroom-title-block {
  display: grid;
  gap: 6px;
}

.myroom-lead {
  margin: 0;
  max-width: 28ch;
}

.myroom-header,
.myroom-selection {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.myroom-status {
  margin: 0;
  min-height: 1.5em;
  font-size: 12px;
  padding: 0 10px;
}

.myroom-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 10px;
}

.myroom-stage {
  min-height: 0;
}

.myroom-grid {
  --myroom-grid-columns: 2;
  --myroom-grid-gap: 0px;
  display: grid;
  grid-template-columns: repeat(var(--myroom-grid-columns), minmax(0, 1fr));
  gap: var(--myroom-grid-gap);
  align-items: start;
}

.myroom-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: var(--myroom-grid-gap);
}

.myroom-item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  background: rgba(255, 245, 250, 0.92);
  box-shadow: none;
  isolation: isolate;
  transition:
    box-shadow 180ms ease,
    opacity 180ms ease,
    filter 180ms ease;
}

.myroom-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 40%, rgba(158, 41, 98, 0.18) 100%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16));
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.myroom-item.is-selected {
  box-shadow:
    0 0 0 3px rgba(255, 95, 168, 0.42) inset,
    0 0 0 1px rgba(255, 255, 255, 0.32) inset;
}

.myroom-item.is-selected::after {
  opacity: 1;
}

.myroom-item.is-removed {
  opacity: 0.62;
  filter: saturate(0.74);
}

.myroom-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: inherit;
  overflow: hidden;
}

.myroom-image-button:focus-visible {
  outline: 3px solid rgba(255, 95, 168, 0.42);
  outline-offset: -3px;
}

.myroom-image-button img {
  display: block;
  width: 100%;
  height: auto;
}

.myroom-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 24px;
  border-radius: 16px;
  border: 1px dashed rgba(160, 46, 93, 0.18);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), rgba(255, 240, 247, 0.84)),
    rgba(255, 244, 249, 0.72);
}

.myroom-empty-title {
  margin: 0;
  font-weight: 950;
}

.myroom-overlay-panel {
  width: min(1200px, 100%);
}

.myroom-viewer {
  margin-top: 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.myroom-viewer-frame {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(160, 46, 93, 0.14);
  background: rgba(255, 244, 249, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
  overflow: hidden;
}

.myroom-viewer-frame img {
  display: block;
  width: 100%;
  max-height: min(72vh, 840px);
  object-fit: contain;
}

.myroom-nav {
  min-width: 74px;
}

.myroom-actions {
  align-items: center;
  justify-content: flex-end;
}

.page-home .favorite-toggle {
  display: none !important;
}

.account-shell {
  display: grid;
  gap: 18px;
}

.account-hero {
  display: grid;
  gap: 18px;
}

.account-title-block {
  display: grid;
  gap: 10px;
}

.account-title-block .card-title,
.account-card .card-title {
  margin-bottom: 0;
}

.account-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.account-summary .pill {
  overflow-wrap: anywhere;
}

.account-grid {
  display: grid;
  gap: 18px;
}

.account-card {
  margin-top: 0;
}

.account-card .lead {
  max-width: none;
}

.account-details {
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.account-detail-row {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(160, 46, 93, 0.12);
  background: rgba(255, 247, 251, 0.74);
}

.account-detail-row dt {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: rgba(140, 36, 79, 0.72);
}

.account-detail-row dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.account-links {
  margin-top: 16px;
}

@media (max-width: 720px) {
  .myroom-shell {
    width: 100vw;
    width: 100dvw;
  }

  .myroom-hero {
    align-items: flex-start;
  }

  .myroom-viewer {
    grid-template-columns: 1fr;
  }

  .myroom-nav,
  .myroom-actions .btn {
    width: 100%;
  }

  .account-summary,
  .account-links {
    display: grid;
  }

  .account-summary .btn,
  .account-links .btn {
    width: 100%;
  }
}

/* ====== Auth ====== */
.auth-shell {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(560px, 100%);
}

.auth-form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.field-label {
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.18em;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: rgba(140, 36, 79, 0.76);
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(160, 46, 93, 0.14);
  background: rgba(255, 247, 250, 0.94);
  color: var(--fg);
  font: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 20px rgba(160, 67, 110, 0.08);
}

.input::placeholder {
  color: rgba(109, 25, 60, 0.34);
}

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

.form-message {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(160, 46, 93, 0.12);
  box-shadow: none;
  background: rgba(255, 245, 249, 0.82);
}

.form-message-error {
  border-color: rgba(223, 95, 139, 0.26);
  background: rgba(255, 224, 233, 0.84);
}

.form-message-info {
  border-color: rgba(160, 46, 93, 0.18);
  background: rgba(255, 241, 247, 0.88);
}

.message-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

.auth-switch {
  margin: 16px 0 0;
  color: var(--muted);
}

.auth-switch a {
  color: var(--accent-deep);
  text-decoration-color: rgba(160, 46, 93, 0.28);
}

/* ====== Gate states ====== */
body[data-gate="locked"] {
  overflow: hidden;
}

body[data-gate="locked"] #home,
body[data-gate="locked"] #denied {
  display: none;
}

body[data-gate="locked"] #age-gate {
  display: flex;
}

body[data-gate="verified"] #age-gate,
body[data-gate="verified"] #denied {
  display: none;
}

body[data-gate="verified"] #home {
  display: block;
}

body[data-gate="denied"] #home,
body[data-gate="denied"] #age-gate {
  display: none;
}

body[data-gate="denied"] #denied {
  display: block;
}

/* ====== Gate modal ====== */
.gate {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(163, 50, 98, 0.22);
  backdrop-filter: blur(12px) saturate(1.15);
  z-index: 100;
}

.gate-panel {
  width: min(560px, 100%);
  background: rgba(255, 239, 247, 0.96);
  border: 1px solid rgba(160, 46, 93, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(160, 67, 110, 0.12);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.gate-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-family: var(--font-display);
  font-weight: 950;
  letter-spacing: -0.05em;
  color: var(--accent-soft);
  -webkit-text-stroke: 1px rgba(203, 61, 128, 0.44);
  paint-order: stroke fill;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.18);
  position: relative;
}

.gate-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  position: relative;
}

.gate-actions {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  position: relative;
}

.gate-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  position: relative;
}

.noscript {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  position: relative;
}

.denied {
  padding-top: 42px;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .nav-link {
    transition: none;
  }
}
