/* A-1: Warm Stone & Espresso Editorial + Tactile Physical Photocard */

:root {
  --bg-paper: #faf9f6;
  --bg-surface: #ffffff;
  --bg-subtle: #f2ece4;
  --bg-chat: #f4efe8;
  --bg-light-tint: #eef2ee;
  --bg-shadow-tint: #f5ecee;

  --ink-primary: #26211d;
  --ink-secondary: #635b53;
  --ink-muted: #8a7f74;
  --ink-on-accent: #faf9f6;

  --accent-main: #3b2f2a;
  --accent-main-hover: #7f2936;
  --accent-soft: #f2ece4;
  --accent-pine: #2d5a47;
  --accent-rose: #8b2f3c;

  --foil-edge: #b49a76;
  --foil-light: #e5d6be;
  --album-slot: #ebe6de;
  --album-slot-ink: #635b53;

  --border-hairline: #e5e0d8;
  --border-strong: #d4cdc2;
  --focus-ring: #8b2f3c;

  --shadow-print: none;
  --shadow-hero-3d: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 22px 44px -18px rgba(38, 33, 29, 0.24), 0 6px 14px -6px rgba(38, 33, 29, 0.10);
  --shadow-stack: none;
  --shadow-card: none;
  --shadow-float: 0 8px 20px -10px rgba(38, 33, 29, 0.22);
  --shadow-bubble: none;
  --shadow-toast: 0 10px 24px -8px rgba(38, 33, 29, 0.28);
  --backdrop-modal: rgba(38, 33, 29, 0.48);
  --thumb-scroll: rgba(38, 33, 29, 0.16);

  --dev-sheen-edge: rgba(255, 255, 255, 0);
  --dev-sheen-core: rgba(255, 255, 255, 0.42);
  --postcard-bg: #faf8f4;
  --stamp-tint: rgba(139, 47, 60, 0.07);

  --char-hosu: #234d6e;
  --char-taeseo: #7c5228;
  --char-taewoong: #7c2838;
  --char-babi: #8b2f3c;
  --char-dongjin: #33437a;
  --char-youngchun: #6a2c6b;
  --char-real: #2d5a47;
  --char-idol: #166534;

  --font-display: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-num: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --radius-xs: 0px;
  --radius-sm: 2px;
  --radius-tile: 2px;
  --radius-md: 2px;
  --radius-lg: 2px;
  --radius-pill: 2px;
  --radius-photocard: 8px;
}

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

html,
body {
  overflow-x: clip;
  background-color: var(--bg-paper);
  color: var(--ink-primary);
  font-family: var(--font-body);
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}


::selection {
  background-color: var(--accent-soft);
  color: var(--ink-primary);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

button:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

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

/* ---------- Shell & Masthead ---------- */

.shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 872px;
  flex: 1;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}

.site-footer {
  width: 100%;
  max-width: 872px;
  padding: 16px max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.site-footer a {
  color: var(--ink-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.view-enter {
  animation: viewReveal 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes viewReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.start-screen {
  padding-block: clamp(12px, 4vw, 52px) 20px;
}

.home-cover {
  display: grid;
  gap: clamp(20px, 5vw, 64px);
  align-items: center;
}

.cover-print {
  position: relative;
  padding: 0;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
}

.home-cover-photo.photo-window {
  aspect-ratio: 5 / 4;
  border-radius: 0;
  background: var(--bg-subtle);
}

.home-cover-photo .photo-img {
  position: absolute;
  inset: 0;
  object-position: center 34%;
}

.home-cover-photo .cover-slide-in {
  animation: coverCrossfade 0.72s ease-out both;
}

@keyframes coverCrossfade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.masthead {
  display: grid;
  justify-items: start;
  gap: 12px;
  min-inline-size: 0;
  padding-inline: 4px;
}

.display-title {
  color: var(--ink-primary);
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.display-title strong {
  display: block;
  margin-block-start: 3px;
  color: var(--accent-rose);
  font-size: clamp(3rem, 7.7vw, 5rem);
  font-weight: inherit;
}

.display-lead {
  max-inline-size: 32ch;
  color: var(--ink-secondary);
  font-size: .9375rem;
  line-height: 1.65;
}

.home-start-actions {
  margin-block-start: 8px;
}

.cover-rotation {
  position: absolute;
  inset-inline-end: 12px;
  inset-block-end: 12px;
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: var(--radius-sm);
  background: rgba(38, 33, 29, 0.84);
  color: var(--ink-on-accent);
  transition: background-color .18s ease, color .18s ease;
}

.cover-rotation:hover {
  background: var(--bg-surface);
  color: var(--ink-primary);
}

.cover-rotation:focus-visible {
  outline-color: var(--bg-surface);
}

.cover-pause-icon {
  inline-size: 10px;
  block-size: 12px;
  border-inline: 2px solid currentColor;
}

.cover-rotation[data-paused="true"] .cover-pause-icon,
.cover-rotation[data-paused="false"] svg {
  display: none;
}

@media (min-width: 600px), (min-width: 480px) and (max-height: 480px) {
  .home-cover {
    grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
  }

  .home-cover-photo.photo-window {
    aspect-ratio: 5 / 6;
  }

  .masthead {
    padding-inline: 0;
  }
}

@media (min-width: 480px) and (max-height: 480px) {
  .start-screen { padding-block-start: 4px; }
  .home-cover-photo.photo-window { aspect-ratio: 5 / 4; max-block-size: 58dvh; }
  .masthead { gap: 8px; }
  .display-title { font-size: 1.55rem; }
  .display-title strong { font-size: 2.5rem; }
}

.photo-window {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-subtle);
}

.photo-window--square {
  aspect-ratio: 1 / 1;
}

.photo-window--tall {
  aspect-ratio: 4 / 5;
}

.photo-window--tall .photo-img {
  object-position: center 20%;
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.photo-fallback {
  display: none;
  width: 100%;
  height: 100%;
  padding: 16px;
  background-color: var(--bg-subtle);
  color: var(--ink-secondary);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.photo-fallback-no {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-primary);
}

.photo-fallback-label {
  font-size: 12px;
  color: var(--ink-muted);
}

.shuffle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background-color: var(--bg-paper);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
  flex-shrink: 0;
}

.shuffle-btn:hover {
  border-color: var(--accent-rose);
  background-color: var(--accent-soft);
  color: var(--accent-rose);
}

/* ---------- Buttons ---------- */

.btn-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-block-size: 48px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--accent-main);
  color: var(--ink-on-accent);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: start;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.btn-cta svg {
  flex-shrink: 0;
  transform: rotate(180deg);
}

.btn-cta:hover {
  background: var(--accent-main-hover);
  transform: translateY(-1px);
}

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

.btn-primary {
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-main);
  color: var(--ink-on-accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.18s ease, transform 0.15s ease;
}

.btn-primary:hover {
  background-color: var(--accent-main-hover);
}

.btn-primary:active {
  transform: scale(0.985);
}

.btn-secondary {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-subtle);
  color: var(--accent-rose);
}

.btn-secondary:active {
  transform: scale(0.985);
}

.btn-ink {
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background-color: var(--ink-primary);
  color: var(--ink-on-accent);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.18s ease, transform 0.15s ease;
}

.btn-ink:hover {
  background-color: var(--accent-main-hover);
}

.btn-ink:active {
  transform: scale(0.985);
}

/* ---------- Quiz ---------- */

.quiz-screen {
  min-inline-size: 0;
}

.quiz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 5px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-block-size: 44px;
  padding-inline-end: 12px;
  color: var(--ink-secondary);
  font-size: .8125rem;
  font-weight: 500;
}

.back-btn:hover {
  color: var(--accent-rose);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.step-counter {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--ink-muted);
  font-family: var(--font-num);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}

.step-counter strong {
  color: var(--accent-rose);
  font-weight: 500;
}

.progress-track {
  display: flex;
  gap: 3px;
  block-size: 2px;
  margin-block-end: clamp(26px, 5vw, 48px);
}

.progress-segment {
  flex: 1;
  background: var(--border-hairline);
}

.progress-segment--reached {
  background: var(--accent-rose);
}

.quiz-scene {
  display: grid;
  gap: 20px;
}

.question-title {
  max-inline-size: 33ch;
  color: var(--ink-primary);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.36;
  letter-spacing: -0.025em;
  text-wrap: pretty;
}

.story-still {
  margin-block-start: 16px;
}

.story-still .photo-window {
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-sm);
}

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

.visual-card {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--ink-primary);
  text-align: start;
  transition: background-color .18s ease, border-color .18s ease;
}

.visual-card .photo-window {
  aspect-ratio: 1 / 1;
  border-radius: 0;
}

.visual-grid--versus .photo-window {
  aspect-ratio: 4 / 5;
}

.visual-card .photo-img {
  object-position: center 27%;
}

.visual-meta {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px;
  padding: 10px;
}

.visual-label,
.visual-sub {
  display: block;
}

.visual-label {
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.4;
}

.visual-sub {
  margin-block-start: 3px;
  color: var(--ink-secondary);
  font-size: .75rem;
  line-height: 1.5;
}

.visual-meta svg,
.option-row > svg {
  color: var(--accent-rose);
  transform: rotate(180deg);
}

.option-list {
  display: grid;
  border-block-end: 1px solid var(--border-hairline);
}

.option-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-block-size: 56px;
  padding: 12px 10px;
  border-block-start: 1px solid var(--border-hairline);
  color: var(--ink-primary);
  text-align: start;
  transition: background-color .18s ease, border-color .18s ease;
}

.quiz-scene [aria-pressed="true"] {
  border-color: var(--accent-rose);
  background: var(--bg-subtle);
}

.quiz-scene [aria-pressed="true"] svg { transform: none; }

@media (hover: hover) {
  .option-row:hover,
  .visual-card:hover {
    border-color: var(--border-strong);
    background: var(--bg-subtle);
  }
}

.option-letter {
  color: var(--accent-rose);
  font-family: var(--font-num);
  font-size: 0.875rem;
  font-weight: 500;
}

.option-text {
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.option-row > svg {
  inline-size: 12px;
}

@media (min-width: 500px) and (max-width: 699px) {
  .quiz-screen { width: min(100%, 520px); align-self: center; }
}

@media (min-width: 700px) {
  .quiz-scene {
    gap: 24px;
  }

  .visual-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

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

  .visual-grid .photo-window {
    aspect-ratio: 5 / 6;
  }

  .visual-grid--versus .photo-window {
    aspect-ratio: 6 / 5;
  }

  .visual-meta {
    padding: 14px;
  }

  .visual-label,
  .option-text {
    font-size: .9375rem;
  }

  .quiz-scene--story {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    align-items: end;
    gap: 32px;
  }

  .story-still .photo-window {
    aspect-ratio: 5 / 4;
  }
}

/* ---------- Developing the result ---------- */

.loading-screen {
  flex: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
  padding: 24px 16px;
}

.printer-stage {
  inline-size: min(100%, 254px);
}

.dev-ticket {
  padding: 9px 9px 23px;
  background: var(--bg-surface);
  border: 1px solid rgba(38, 33, 29, 0.14);
  border-radius: var(--radius-photocard);
  box-shadow: var(--shadow-hero-3d);
  rotate: -3deg;
  animation: ticketDevelop .9s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes ticketDevelop {
  from { opacity: .3; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dev-photo-window {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-subtle);
}

.dev-photo-img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center 22%;
  animation: filmDevelop 1.3s ease-out both;
}

@keyframes filmDevelop {
  from { opacity: .25; }
  to { opacity: 1; }
}

@keyframes sheenGlide {
  0% { transform: translateX(-140%) skewX(-18deg); opacity: 0; }
  20%, 80% { opacity: 1; }
  100% { transform: translateX(260%) skewX(-18deg); opacity: 0; }
}

.dev-telemetry {
  inline-size: min(100%, 254px);
  display: grid;
  gap: 13px;
}

.dev-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.loading-title {
  color: var(--ink-primary);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 5vw, 1.625rem);
  font-weight: 700;
  line-height: 1.3;
}

.dev-pct {
  color: var(--accent-rose);
  font-family: var(--font-num);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}

.dev-track {
  block-size: 2px;
  background: var(--border-hairline);
  overflow: hidden;
}

.dev-fill {
  block-size: 100%;
  background: var(--accent-rose);
  transform-origin: left center;
  transform: scaleX(0);
}

@media (min-width: 480px) and (max-height: 440px) {
  .loading-screen {
    grid-template-columns: minmax(0, clamp(130px, 70dvh - 40px, 210px)) minmax(0, 254px);
    justify-content: center;
    align-items: center;
    padding-block: 8px;
  }
}

/* ---------- Result Screen: Collectible Photo Ticket ---------- */

.result-screen {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 24px;
}

@media (max-width: 699px) {
  .result-screen {
    inline-size: min(100%, 428px);
    align-self: center;
  }
}

.result-intro {
  padding: 2px 4px 0;
  text-align: center;
}

.result-kicker {
  display: inline-block;
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent-rose);
  outline: none;
}

.result-kicker:focus {
  outline: none;
}

.result-back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 48px;
}

.result-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.result-back-link:hover {
  color: var(--ink-primary);
}

.result-back-bar .album-controls {
  margin: 0;
}

.result-layout,
.result-actions {
  display: grid;
  gap: 18px;
}

.result-actions[hidden],
.result-story-drawer[hidden] {
  display: none;
}

.result-layout > *,
.result-actions > * {
  min-inline-size: 0;
}

.result-book {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.collection-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 8px 0;
  border-block: 1px solid var(--border-hairline);
  color: var(--ink-primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.collection-next span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.collection-next small {
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 400;
}

.collection-next:hover span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.result-next-links {
  text-align: center;
}

.result-next-links a,
.result-next-links button {
  padding: 8px 12px;
  color: var(--ink-secondary);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.result-disclosure {
  border-top: 1px solid var(--border-hairline);
}

.result-disclosure summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.result-disclosure summary::-webkit-details-marker {
  display: none;
}

.result-disclosure summary::after {
  content: "+";
  color: var(--ink-secondary);
  font-size: 22px;
  font-weight: 400;
}

.result-disclosure[open] summary::after {
  content: "−";
}

.result-disclosure summary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.result-story-drawer {
  border-top: 1px solid var(--border-hairline);
  padding-top: 14px;
}

.result-story-drawer--open {
  animation: viewReveal 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.result-more-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 12px 0 24px;
}

.ticket-stage {
  perspective: 1200px;
  padding: clamp(20px, 4.5vw, 34px) clamp(16px, 4vw, 28px);
  background-color: #f2ede5;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
}

.ticket-flipper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 328px;
  margin-inline: auto;
  display: grid;
  grid-template-areas: "face";
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.ticket-flipper--flipped {
  transform: rotateY(180deg);
}

.ticket-face {
  position: relative;
  grid-area: face;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ticket-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    128deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.06) 24%,
    rgba(255, 255, 255, 0) 46%,
    rgba(255, 255, 255, 0) 78%,
    rgba(255, 255, 255, 0.08) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.ticket-face--front {
  pointer-events: auto;
}

.ticket-face--back {
  transform: rotateY(180deg);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  background-color: var(--postcard-bg);
}

.ticket-flipper--flipped .ticket-face--front {
  pointer-events: none;
}

.ticket-flipper--flipped .ticket-face--back {
  pointer-events: auto;
}

.ticket {
  --ticket-plum: #26211d;
  --ticket-paper: #1c1715;
  --ticket-gold: #f3dfb8;
  background-color: var(--ticket-paper);
  border: 1px solid rgba(243, 223, 184, 0.42);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 26px 52px -18px rgba(24, 18, 15, 0.36),
    0 8px 18px -6px rgba(24, 18, 15, 0.16);
  overflow: hidden;
  --ticket-accent: var(--accent-rose);
}

.ticket-face--back {
  background-color: var(--postcard-bg);
  border-color: rgba(38, 33, 29, 0.14);
}

.poca-bleed {
  position: relative;
  width: 100%;
  aspect-ratio: 55 / 85;
  overflow: hidden;
  background: #1c1715;
}

.poca-bleed .ticket-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  transition: filter 0.25s ease;
}

.poca-holo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    132deg,
    rgba(255, 255, 255, 0.24) 0%,
    rgba(243, 223, 184, 0.1) 18%,
    rgba(255, 255, 255, 0) 38%,
    rgba(210, 232, 255, 0.11) 58%,
    rgba(255, 220, 235, 0.09) 70%,
    rgba(255, 255, 255, 0) 84%,
    rgba(243, 223, 184, 0.16) 100%
  );
}

.poca-frame {
  position: absolute;
  inset: 10px;
  border-radius: 10px;
  border: 1px solid rgba(243, 223, 184, 0.34);
  pointer-events: none;
}

.poca-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(18, 14, 12, 0.56) 0%, rgba(18, 14, 12, 0) 22%),
    linear-gradient(180deg, rgba(18, 14, 12, 0) 44%, rgba(18, 14, 12, 0.58) 68%, rgba(16, 12, 10, 0.94) 100%);
}

.poca-top {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}

.poca-edition {
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255, 250, 242, 0.92);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poca-rarity {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(20, 16, 14, 0.58);
  border: 1px solid rgba(255, 250, 242, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fffdf9;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.poca-rarity--rare {
  background: rgba(168, 51, 68, 0.9);
  border-color: rgba(243, 223, 184, 0.65);
  color: #fffdf9;
}

.poca-stamp-pill {
  position: absolute;
  top: 52px;
  right: 18px;
  z-index: 2;
  padding: 3px 8px;
  border: 1px solid rgba(243, 223, 184, 0.72);
  border-radius: 4px;
  background: rgba(22, 18, 16, 0.56);
  color: #f3dfb8;
  font-size: 10px;
  font-weight: 700;
  transform: rotate(-5deg);
}

.poca-bottom {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poca-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.poca-name {
  font-family: var(--font-display);
  font-size: clamp(24px, 6vw, 28px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.poca-hidden {
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 500;
  color: #f3dfb8;
  letter-spacing: 0.08em;
}

.poca-sub {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 248, 240, 0.85);
}

.poca-specs {
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: rgba(255, 250, 242, 0.11);
  border: 1px solid rgba(243, 223, 184, 0.28);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 4px;
}

.poca-spec {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  text-align: center;
}

.poca-spec + .poca-spec {
  border-left: 1px solid rgba(243, 223, 184, 0.2);
}

.poca-spec span {
  font-size: 9.5px;
  font-weight: 500;
  color: rgba(243, 223, 184, 0.78);
}

.poca-spec strong {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.poca-imprint {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-num);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(243, 223, 184, 0.88);
}

.poca-imprint span:last-child {
  font-family: var(--font-body);
  color: rgba(255, 248, 240, 0.66);
}

.postcard-domain {
  font-family: var(--font-num);
  font-size: 11px;
  color: var(--accent-rose);
}

:is(.ticket, .archive-card, .dev-ticket)[data-char="hosu"] { --ticket-accent: var(--char-hosu); }
:is(.ticket, .archive-card, .dev-ticket)[data-char="taeseo"] { --ticket-accent: var(--char-taeseo); }
:is(.ticket, .archive-card, .dev-ticket)[data-char="taewoong"] { --ticket-accent: var(--char-taewoong); }
:is(.ticket, .archive-card, .dev-ticket)[data-char="babi"] { --ticket-accent: var(--char-babi); }
:is(.ticket, .archive-card, .dev-ticket)[data-char="dongjin"] { --ticket-accent: var(--char-dongjin); }
:is(.ticket, .archive-card, .dev-ticket)[data-char="youngchun"] { --ticket-accent: var(--char-youngchun); }
:is(.ticket, .archive-card, .dev-ticket)[data-char="real"] { --ticket-accent: var(--char-real); }
:is(.ticket, .archive-card, .dev-ticket)[data-char="idol"] { --ticket-accent: var(--char-idol); }

.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--ticket-plum);
  font-size: 12px;
  color: var(--ticket-paper);
  font-variant-numeric: tabular-nums;
}

.ticket-top-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ticket-edition {
  padding-right: 9px;
  border-right: 1px solid rgba(229, 214, 190, 0.35);
  color: var(--ticket-gold);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
}

.ticket-work {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.flip-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(229, 214, 190, 0.45);
  background-color: transparent;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ticket-paper);
  flex-shrink: 0;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.flip-btn:hover {
  border-color: var(--ticket-gold);
  background-color: var(--ticket-gold);
  color: var(--ticket-plum);
}

.flip-btn:focus-visible {
  outline-color: var(--ticket-gold);
}

.ticket-photo-wrap {
  padding: 10px 10px 0;
}

.ticket-photo-wrap .photo-window {
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  overflow: hidden;
}

.ticket-photo-img {
  object-position: center 18%;
  transition: filter 0.25s ease;
}

.ticket-photo-img--film {
  filter: contrast(1.06) saturate(0.88) sepia(0.16) brightness(1.02);
}

.ticket-photo-img--mono {
  filter: grayscale(1) contrast(1.12) brightness(1.02);
}

.ticket-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--ink-muted);
}

.ticket-meta-line .ticket-edition {
  padding-right: 0;
  border-right: 0;
  color: var(--accent-rose);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.ticket-meta-line .ticket-work {
  font-weight: 500;
  color: var(--ink-muted);
}

.ticket-owned-dot {
  margin-left: auto;
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 500;
  color: var(--accent-rose);
  letter-spacing: 0.03em;
}

.ticket-back-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 6px;
  font-family: var(--font-num);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
}

.ticket-back-head .ticket-edition {
  padding-right: 0;
  border-right: 0;
  color: var(--accent-rose);
  font-size: 11px;
}

.ticket-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 12.5px;
  font-weight: 600;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.toolbar-btn:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-subtle);
  color: var(--accent-rose);
}

.toolbar-btn em {
  font-style: normal;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 2px;
}

.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
}

.filter-chip {
  min-width: 38px;
  min-height: 32px;
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.filter-chip:hover {
  color: var(--ink-primary);
}

.filter-chip--active {
  background-color: var(--bg-surface);
  color: var(--accent-rose);
  border: 1px solid var(--border-hairline);
}

.ticket-cut-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.ticket-cut-counter {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.ticket-cut-wrap .shuffle-btn {
  min-height: 44px;
  padding-inline: 9px;
}

/* Secret Postcard Back Face */
.postcard-body {
  position: relative;
  isolation: isolate;
  flex: 1;
  margin: 12px;
  padding: 38px 14px 22px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

.postcard-quote {
  font-family: var(--font-display);
  font-size: clamp(20px, 5.6vw, 28px);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--ticket-accent);
  text-wrap: balance;
}

.postcard-note {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.65;
  max-width: 300px;
}

.postcard-divider {
  width: 48px;
  height: 1px;
  background-color: var(--foil-edge);
}

.stamp-zone {
  min-height: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.stamp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent-rose);
  background-color: var(--bg-surface);
  color: var(--accent-rose);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.stamp-btn:hover {
  background-color: var(--accent-rose);
  color: var(--ink-on-accent);
}

.stamp-btn:active {
  transform: scale(0.97);
}

.stamp-seal {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: 2px solid var(--accent-rose);
  border-radius: var(--radius-sm);
  background-color: var(--stamp-tint);
  color: var(--accent-rose);
  transform: rotate(-5deg);
  font-variant-numeric: tabular-nums;
}

.stamp-seal--pop {
  animation: stampPop 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes stampPop {
  0% {
    opacity: 0;
    transform: scale(1.38) rotate(-11deg);
  }
  70% {
    opacity: 1;
    transform: scale(0.95) rotate(-4deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-5deg);
  }
}

.stamp-seal-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.stamp-seal-sub {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.postcard-foot {
  padding: 6px 16px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-muted);
}

.ticket-body {
  padding: 14px 14px 16px;
}

.ticket-special {
  margin-left: auto;
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-rose);
  background-color: var(--accent-soft);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}

.ticket-name {
  font-family: var(--font-display);
  font-size: clamp(22px, 5.5vw, 26px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--ticket-plum);
  margin-bottom: 5px;
}

.ticket-subtitle {
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.tag-chip {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 0;
}

.share-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.share-primary-pill {
  width: 100%;
  min-height: 52px;
  padding: 13px 20px;
  border-radius: 999px;
  background-color: var(--accent-main);
  color: var(--ink-on-accent);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.18s ease, transform 0.14s ease;
}

.share-primary-pill:hover {
  background-color: var(--accent-main-hover);
}

.share-primary-pill:active {
  transform: scale(0.98);
}

.share-dock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  justify-items: center;
}

.share-orb-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 56px;
  padding: 2px 4px;
  color: var(--ink-primary);
  transition: transform 0.14s ease, color 0.16s ease;
}

.share-orb {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background-color: #f0eae1;
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.14s ease;
}

.share-orb svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.share-orb-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  line-height: 1.2;
}

.share-orb-btn:hover .share-orb {
  background-color: #e6ddd0;
  color: var(--accent-rose);
}

.share-orb-btn:hover .share-orb-label {
  color: var(--ink-primary);
}

.share-orb-btn:active .share-orb {
  transform: scale(0.93);
}

@media (min-width: 700px) {
  .result-intro {
    padding-inline: 0;
    text-align: start;
  }

  .result-intro h1 {
    font-size: clamp(2rem, 4.2vw, 2.75rem);
  }

  .result-layout {
    grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(22px, 4vw, 48px);
  }

  .result-layout--flipped {
    grid-template-columns: minmax(0, 460px);
    justify-content: center;
  }

  .result-actions {
    padding-block-start: 4px;
  }

  .result-layout:has(.album-controls) .result-actions {
    padding-block-start: 56px;
  }

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

  .share-platform-row .share-chip {
    display: grid;
    justify-items: center;
    align-content: center;
  }

}

@media (max-width: 350px) {
  .share-platform-row {
    gap: 4px;
  }

  .share-primary-row button,
  .share-chip {
    font-size: 11px;
  }
}

/* 8-person horizontal filmstrip navigator */
.filmstrip-wrap {
  padding-top: 16px;
  border-top: 1px solid var(--border-hairline);
}

.filmstrip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.filmstrip-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-primary);
}

.filmstrip-count {
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.filmstrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.filmstrip-item {
  flex: 0 0 64px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  opacity: 0.72;
  transition: opacity 0.18s ease, transform 0.15s ease;
}

.filmstrip-item--unlocked,
.filmstrip-item--active,
.filmstrip-item:hover {
  opacity: 1;
}

.filmstrip-item:active {
  transform: scale(0.96);
}

.filmstrip-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  padding: 2px;
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  background-color: var(--bg-surface);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.filmstrip-thumb .photo-img {
  border-radius: 0;
}

.filmstrip-item--active .filmstrip-thumb {
  border-color: var(--accent-rose);
}

.filmstrip-thumb .photo-fallback {
  padding: 0;
  gap: 0;
}

.filmstrip-thumb .photo-fallback-no {
  font-size: 13px;
}

.filmstrip-thumb .photo-fallback-label {
  display: none;
}

.filmstrip-no {
  font-family: var(--font-num);
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.filmstrip-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
  max-width: 64px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filmstrip-item--active .filmstrip-name {
  color: var(--accent-rose);
}

/* Editorial sections */
.editorial-section {
  padding-top: 20px;
  border-top: 1px solid var(--border-hairline);
}

.section-heading {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 12px;
}

.summary-prose {
  font-size: 14.5px;
  color: var(--ink-primary);
  line-height: 1.75;
}

.stat-radar-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px 18px;
  background: linear-gradient(180deg, #fffdf9 0%, #f6f2ea 100%);
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
}

.stat-radar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-hairline);
}

.stat-radar-kicker {
  display: block;
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 3px;
}

.stat-radar-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.stat-radar-peak {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background-color: rgba(139, 47, 60, 0.09);
  color: var(--accent-rose);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.stat-radar-stage {
  display: flex;
  justify-content: center;
  padding: 6px 0 2px;
}

.stat-radar-svg {
  width: 100%;
  max-width: 316px;
  height: auto;
  overflow: visible;
}

.radar-ring {
  fill: none;
  stroke: #e4ddd3;
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.radar-ring--outer {
  stroke: #d6cdc0;
  stroke-dasharray: none;
}

.radar-spoke {
  stroke: #e6dfd5;
  stroke-width: 1;
}

.radar-area {
  stroke: var(--accent-rose);
  stroke-width: 2;
  stroke-linejoin: round;
}

.radar-user-area {
  fill: rgba(59, 47, 42, 0.08);
  stroke: var(--accent-main);
  stroke-width: 1.75;
  stroke-dasharray: 4 3;
  stroke-linejoin: round;
}

.radar-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.radar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.radar-swatch {
  display: inline-block;
  width: 14px;
  height: 2px;
}

.radar-swatch--char {
  background-color: var(--accent-rose);
}

.radar-swatch--user {
  border-top: 2px dashed var(--accent-main);
}

.stat-radar-diagnosis {
  margin-top: 2px;
  padding: 9px 12px;
  border-radius: 8px;
  background-color: rgba(139, 47, 60, 0.06);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-primary);
  text-align: center;
}

.stat-radar-diagnosis strong {
  color: var(--accent-rose);
  font-weight: 700;
}

.radar-dot {
  fill: #fffdf9;
  stroke: var(--accent-rose);
  stroke-width: 2;
}

.radar-dot--peak {
  fill: var(--accent-rose);
  stroke: #fffdf9;
  stroke-width: 1.8;
}

.radar-dot-halo {
  fill: rgba(139, 47, 60, 0.16);
}

.radar-axis-name {
  fill: var(--ink-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
}

.radar-axis-name--peak {
  fill: var(--ink-primary);
  font-weight: 700;
}

.radar-axis-val {
  fill: var(--ink-muted);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 500;
}

.radar-axis-val--peak {
  fill: var(--accent-rose);
  font-weight: 600;
}

.stat-radar-note {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
  text-align: center;
}

.duality-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.tone-panel {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.tone-panel--light {
  background-color: var(--bg-light-tint);
}

.tone-panel--shadow {
  background-color: var(--bg-shadow-tint);
}

.tone-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tone-title--light { color: var(--accent-pine); }
.tone-title--shadow { color: var(--accent-rose); }

.tone-body {
  font-size: 13.5px;
  color: var(--ink-primary);
  line-height: 1.65;
}

/* Messenger preview */
.chat-box {
  background-color: var(--bg-chat);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-hairline);
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
  flex-shrink: 0;
}

.chat-avatar .photo-fallback,
.match-thumb .photo-fallback {
  padding: 0;
  gap: 0;
}

.chat-avatar .photo-fallback-no,
.match-thumb .photo-fallback-no {
  font-size: 13px;
}

.chat-avatar .photo-fallback-label,
.match-thumb .photo-fallback-label {
  display: none;
}

.chat-sender {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.chat-time {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.chat-bubbles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.chat-bubble {
  max-width: 90%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  color: var(--ink-primary);
  font-size: 13.5px;
  line-height: 1.5;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

.chat-bubble--me {
  align-self: flex-end;
  background-color: var(--ink-primary);
  border-color: var(--ink-primary);
  color: var(--ink-on-accent);
  border-radius: var(--radius-sm);
  animation: bubbleIn 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chat-bubble--reply {
  animation: bubbleIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--ink-muted);
  font-size: 12px;
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
}

.chat-replies-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.chat-reply-btn {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.chat-reply-btn:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-subtle);
  color: var(--accent-rose);
}

.chat-reply-btn--picked {
  border-color: var(--accent-rose);
  background-color: var(--bg-subtle);
  color: var(--accent-rose);
  font-weight: 700;
}

/* Sync TOP 3 & Live Distribution */
.bar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}

.bar-row-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}

.bar-row-name {
  font-weight: 500;
  color: var(--ink-secondary);
}

.bar-row-name--top {
  font-weight: 700;
  color: var(--ink-primary);
}

.bar-row-pct {
  font-weight: 700;
  color: var(--ink-primary);
}

.bar-track {
  width: 100%;
  height: 6px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.bar-fill {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xs);
  background-color: var(--border-strong);
  transform-origin: left center;
}

.bar-fill--top {
  background-color: var(--accent-rose);
}

/* Chemistry pair (1-col rich relation cards) */
.match-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-btn {
  width: 100%;
  color: inherit;
  text-decoration: none;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.15s ease;
}

a.match-btn:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-subtle);
  transform: translateY(-1px);
}

.match-teaser {
  --match-ink: var(--accent-pine);
  background-color: var(--bg-light-tint);
}

.match-teaser--worst {
  --match-ink: var(--accent-rose);
  background-color: var(--bg-shadow-tint);
}

.match-card-back {
  display: grid;
  flex: 0 0 42px;
  aspect-ratio: 3 / 4;
  place-items: center;
  border: 3px double var(--foil-light);
  border-radius: var(--radius-sm);
  background: var(--match-ink);
  color: var(--ink-on-accent);
  font-family: var(--font-num);
  font-size: 14px;
}

.match-teaser-note {
  margin-top: 4px;
  color: var(--ink-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.match-discover {
  margin-top: 12px;
}

.match-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-subtle);
  flex-shrink: 0;
}

.match-info {
  min-width: 0;
  flex: 1;
}

.match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.match-tag {
  font-size: 11px;
  font-weight: 700;
}

.match-tag--best { color: var(--accent-pine); }
.match-tag--worst { color: var(--accent-rose); }

.match-work {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.match-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.3;
  margin-bottom: 4px;
}

.match-note {
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.recommend-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recommend-note {
  background-color: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
}

.recommend-note strong {
  color: var(--ink-primary);
}

.watch-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  text-decoration: none;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.15s ease;
}

.watch-link:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-subtle);
  transform: translateY(-1px);
}

.watch-link:active {
  transform: scale(0.99);
}

.watch-play {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  color: var(--accent-rose);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.watch-play--stream {
  background-color: var(--bg-subtle);
  color: var(--ink-primary);
}

.watch-link:hover .watch-play {
  background-color: var(--accent-rose);
  color: var(--ink-on-accent);
}

.watch-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.watch-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-channel {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.2;
}

.watch-arrow {
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.watch-link:hover .watch-arrow {
  color: var(--accent-rose);
}

/* ---------- Video guide ---------- */

.hub-screen.guide-screen {
  container-type: inline-size;
  display: block;
  color: var(--ink-primary);
}

.guide-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-block: 0 20px;
  background-color: #f0eae1;
  border-radius: 999px;
}

.guide-tab {
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 600;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.guide-tab:hover {
  color: var(--ink-primary);
}

.guide-tab[aria-selected="true"] {
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  font-weight: 700;
  box-shadow: 0 2px 8px -3px rgba(38, 33, 29, 0.16);
}

.clip-spread { display: grid; gap: 26px; }
.clip-feature, .clip-next, .clip-caption { min-width: 0; }
.clip-link {
  display: grid;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.clip-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--accent-main);
  border-radius: var(--radius-sm);
}
.clip-image img { width: 100%; height: 100%; object-fit: cover; }
.clip-image img[hidden] { display: none; }
.clip-play {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--ink-primary);
  background: var(--bg-surface);
}
.clip-play svg { width: 12px; height: 12px; fill: currentColor; stroke-width: 1; }
.clip-caption { display: grid; gap: 4px; }
.clip-caption strong { font-size: 1rem; line-height: 1.44; }
.clip-caption > span, .clip-resources small { color: var(--ink-secondary); font-size: .8rem; }
.clip-feature .clip-caption strong {
  font: 700 clamp(1.45rem, 1.04rem + 1.4vw, 2rem)/1.32 var(--font-display);
  letter-spacing: -.032em;
}
.clip-link:is(:hover, :focus-visible) strong { text-decoration: underline; text-underline-offset: .18em; }
.clip-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.clip-next h2 { margin-block: 0 12px; font: 700 1.05rem/1.4 var(--font-display); }
.clip-next ul, .clip-resources ul { list-style: none; }
.clip-next ul { display: grid; gap: 15px; }
.clip-next .clip-link { grid-template-columns: minmax(80px, 32%) 1fr; gap: 14px; }
.clip-next .clip-play { left: 5px; bottom: 5px; width: 20px; height: 20px; }
.clip-next .clip-play svg { width: 8px; height: 8px; }

.clip-notes {
  margin-block-start: clamp(28px, 4vw, 52px);
  border-block: 1px solid var(--border-hairline);
}
.clip-notes summary { padding-block: 15px; color: var(--ink-secondary); font-size: .88rem; cursor: pointer; }
.clip-notes summary::marker { color: var(--accent-rose); }
.clip-resources { display: grid; gap: 20px; padding: 4px 0 22px; }
.clip-resources h2 { margin-bottom: 8px; font-size: .95rem; }
.clip-resources li { color: var(--ink-secondary); font-size: .88rem; line-height: 1.7; }
.clip-resources a { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; color: inherit; text-underline-offset: 3px; }
.clip-resources small { margin-left: 4px; }

@container (min-width: 41rem) {
  .clip-spread { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: 30px; }
  .clip-next { border-top: 1px solid var(--border-strong); padding-top: 10px; }
  .clip-next ul { gap: 18px; }
  .clip-resources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Ranking ---------- */

.ranking-method { grid-column: 1; font-size: .78rem; color: var(--ink-secondary); }
.ranking-method summary { width: fit-content; padding-block: 6px; cursor: pointer; }
.ranking-method p { margin-top: 4px; max-width: 34ch; }


.ranking-screen .hub-heading h1 {
  font-family: var(--font-body);
  font-size: clamp(1.875rem, 4.6vw, 2.625rem);
  letter-spacing: -0.035em;
}

.ranking-list {
  list-style: none;
  border-block: 1px solid var(--border-hairline);
}

.explore-rank-row {
  display: grid;
  grid-template-columns: 1.5rem 2.5rem minmax(0, 1fr) auto 0.625rem;
  align-items: center;
  gap: clamp(6px, 2vw, 12px);
  min-block-size: 66px;
  padding: 8px clamp(8px, 3vw, 16px);
  font-size: 14px;
  transition: background-color 0.16s ease;
}

.ranking-list > li + li .explore-rank-row {
  border-block-start: 1px solid var(--border-hairline);
}

a.explore-rank-row:is(:hover, :focus-visible) {
  outline-offset: -3px;
  background: var(--accent-soft);
}

.ranking-num {
  color: var(--ink-muted);
  font-family: var(--font-num);
  font-size: 14px;
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 500;
  text-align: center;
}

.ranking-list > :first-child .ranking-num {
  color: var(--accent-rose);
}

.ranking-thumb {
  display: block;
  inline-size: 40px;
  block-size: 46px;
  overflow: clip;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}

.ranking-thumb .photo-fallback {
  padding: 0;
  gap: 0;
}

.ranking-thumb .photo-fallback-no {
  font-size: 10px;
}

.ranking-thumb .photo-fallback-label {
  display: none;
}

.ranking-name {
  min-inline-size: 0;
  color: var(--ink-primary);
}

.ranking-name small {
  display: block;
  color: var(--ink-secondary);
  font-size: 11px;
}

.ranking-share {
  display: grid;
  justify-items: end;
  gap: 5px;
  inline-size: clamp(3rem, 13vw, 4.25rem);
  color: var(--ink-primary);
}

.ranking-pct {
  color: inherit;
  font-family: var(--font-num);
  font-size: 15px;
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.ranking-pct span {
  font-family: var(--font-body);
  font-size: 11px;
}

.rank-open-icon {
  justify-self: end;
  color: var(--accent-rose);
}

.rank-open-icon svg,
.ranking-start svg {
  display: block;
  transform: rotate(180deg);
}

.ranking-start { gap: 6px; }

@media (min-width: 700px) {
  .hub-screen.ranking-screen {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr);
    grid-template-rows: auto auto 1fr;
    gap: 18px clamp(24px, 4vw, 44px);
    align-items: start;
  }
  .ranking-list { grid-column: 2; grid-row: 1 / 4; }
  .ranking-start { grid-column: 1; grid-row: 2; justify-self: start; padding-inline: 18px; }
}

/* ---------- Collection and exploration ---------- */

.app-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 8;
  margin-bottom: clamp(16px, 3vw, 24px);
  border-bottom: 1px solid var(--border-hairline);
  background: var(--bg-paper);
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(2px, .9vw, 12px);
}

.app-nav a,
.explore-rank-row,
.archive-card {
  color: inherit;
  text-decoration: none;
}

.app-nav a {
  display: grid;
  min-inline-size: 44px;
  min-block-size: 48px;
  place-items: center;
  padding-inline: clamp(5px, 1.5vw, 10px);
  color: var(--ink-secondary);
  font-size: .8125rem;
  white-space: nowrap;
}

.app-nav .nav-wordmark {
  margin-inline-end: auto;
  padding-inline-start: 0;
  color: var(--ink-primary);
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -.035em;
}

.app-nav a[aria-current] {
  color: var(--accent-rose);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.hub-screen {
  display: grid;
  gap: 20px;
  padding-bottom: 16px;
}

.hub-heading h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.24;
}

.hub-heading p {
  margin-top: 8px;
  color: var(--ink-secondary);
  font-size: 13px;
}

.album-screen {
  padding-block-end: 12px;
}

.album-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px 12px;
  margin-block: 4px 20px;
}

.album-heading h1 {
  color: var(--ink-primary);
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  line-height: 1.16;
}

.album-progress-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-block-start: 8px;
}

.album-count {
  color: var(--ink-secondary);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.album-count strong {
  color: var(--accent-rose);
  font-family: var(--font-num);
  font-size: 14px;
}

.album-progress {
  display: flex;
  gap: 3px;
  inline-size: clamp(56px, 13vw, 92px);
}

.album-progress span {
  flex: 1;
  block-size: 3px;
  border-radius: 0;
  background: var(--border-hairline);
}

.album-progress .album-progress-fill {
  background: var(--accent-rose);
}

.album-find {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 44px;
  padding-inline: 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--accent-main);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.album-find:hover {
  border-color: var(--accent-rose);
  background: var(--accent-soft);
  color: var(--accent-rose);
}

.album-find svg,
.archive-open-icon svg {
  rotate: 180deg;
}

.album-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -12px 4px;
  color: var(--ink-secondary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.album-controls button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 4px;
  color: var(--accent-rose);
  font-weight: 600;
}

.album-controls button:last-child svg {
  transform: rotate(180deg);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  list-style: none;
}

.archive-grid li {
  min-inline-size: 0;
}

.archive-card {
  position: relative;
  display: block;
  text-align: start;
}

.archive-art {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-photocard);
}

.archive-card--owned {
  overflow: clip;
  border: 1px solid rgba(38, 33, 29, 0.14);
  background: var(--ticket-accent);
  color: var(--ink-on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 16px 32px -16px rgba(38, 33, 29, 0.24), 0 4px 10px -4px rgba(38, 33, 29, 0.10);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.archive-card--owned::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    130deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.05) 26%,
    rgba(255, 255, 255, 0) 48%,
    rgba(255, 255, 255, 0) 80%,
    rgba(255, 255, 255, 0.08) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.archive-card--owned:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 22px 40px -16px rgba(38, 33, 29, 0.28), 0 6px 14px -6px rgba(38, 33, 29, 0.12);
}

.archive-art .photo-window {
  position: absolute;
  inset: 0;
  block-size: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

.archive-art .photo-img {
  object-position: center 26%;
  transition: transform 0.25s ease;
}

.archive-card--owned:hover .photo-img {
  transform: scale(1.025);
}

.archive-edition {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  background: rgba(250, 249, 246, 0.94);
  color: var(--accent-rose);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.archive-caption {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: grid;
  gap: 2px;
  padding: 34px 30px 12px 12px;
  background: linear-gradient(180deg, transparent, rgba(38, 33, 29, 0.88) 76%);
  color: var(--ink-on-accent);
}

.archive-card-name {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  font-weight: 700;
  line-height: 1.3;
}

.archive-stamp {
  color: var(--foil-light);
  font-size: 10px;
}

.archive-open-icon {
  position: absolute;
  inset-block-end: 12px;
  inset-inline-end: 9px;
  display: flex;
  color: var(--foil-light);
}

@media (min-width: 500px) {
  .archive-grid { gap: 16px; }
}

@media (min-width: 700px) {
  .archive-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 18px;
  }
}

.archive-clue {
  container-type: inline-size;
  color: var(--ink-primary);
}

.archive-placeholder {
  position: relative;
  display: block;
  block-size: 100%;
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-photocard);
  background: var(--album-slot);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.archive-placeholder::-webkit-details-marker { display: none; }

.archive-print {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: opacity 180ms ease-out;
}

.archive-plate-number {
  position: absolute;
  inset: 6% auto auto 8%;
  font: 500 clamp(0.95rem, 8cqi, 1.25rem)/1 var(--font-num);
  font-variant-numeric: lining-nums tabular-nums;
}

.archive-plate-number i { font-size: 0.75em; }

.archive-lock {
  position: absolute;
  inset: 6% 8% auto auto;
  width: 12px;
  height: 12px;
  color: var(--ink-secondary);
}

.archive-clue-action {
  position: absolute;
  inset-block-end: 5.5%;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 4px;
  color: var(--ink-primary);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
  white-space: nowrap;
}

.archive-clue:not([open]) .archive-clue-action span:last-child,
.archive-clue[open] .archive-clue-action span:first-of-type { display: none; }

@media (hover: hover) {
  .archive-placeholder:hover .archive-clue-action {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

.archive-clue[open] .archive-print { opacity: 0.08; }

.archive-clue[open] .archive-placeholder::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--border-strong);
  border-radius: max(2px, calc(var(--radius-photocard) - 5px));
  pointer-events: none;
}

.archive-clue-copy {
  position: absolute;
  inset: 20% 11% 21%;
  display: grid;
  place-content: center;
  margin: 0;
  color: var(--accent-rose);
  font-family: var(--font-display);
  font-size: 1rem;
  font-size: clamp(.875rem, 8.6cqi, 1.25rem);
  font-weight: 700;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-align: center;
  pointer-events: none;
}

.archive-clue[open] .archive-clue-copy { animation: archiveClueReveal 200ms ease-out; }

@keyframes archiveClueReveal {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

.locked-screen {
  width: min(100%, 460px);
  align-self: center;
}

.archive-single {
  width: min(57%, 200px);
  justify-self: center;
}

.export-modal {
  margin: auto;
  width: min(calc(100vw - 24px), 400px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  background-color: var(--bg-paper);
  color: var(--ink-primary);
  box-shadow: 0 28px 60px -16px rgba(24, 18, 15, 0.36);
  overflow: auto;
}

.export-modal::backdrop {
  background-color: var(--backdrop-modal);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.export-sheet {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.export-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.export-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background-color: #f0eae1;
  color: var(--ink-primary);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.export-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 12px;
  background-color: #f0eae1;
  border-radius: 12px;
}

.export-preview-img {
  width: auto;
  max-width: 100%;
  max-height: 46dvh;
  border-radius: 10px;
  box-shadow: 0 12px 28px -10px rgba(24, 18, 15, 0.28);
  -webkit-touch-callout: default;
}

.export-hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
  text-align: center;
}

.export-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.export-copy-btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 999px;
  background-color: #f0eae1;
  color: var(--ink-primary);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.export-copy-btn:hover {
  background-color: #e6ddd0;
  color: var(--accent-rose);
}

/* ---------- Toast ---------- */

.toast {
  width: max-content;
  max-width: calc(100% - 32px);
  text-align: center;
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 12px);
  background-color: var(--ink-primary);
  color: var(--ink-on-accent);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-toast);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast--show {
  opacity: 1;
  transform: translate(-50%, 0);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background-color: var(--thumb-scroll); border-radius: var(--radius-xs); }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .dev-ticket,
  .dev-photo-img {
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
  }

}
