/* ========================================
   粤剧咖啡 · 你是哪个角色
   Demo Visual Design
   ======================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Warm Cantonese vintage cafe palette
     — inspired by Guangzhou street scene reference */
  --bg-deep: #f5e8c8;          /* warm cream — page base */
  --bg-card: #fdf2d0;          /* lighter cream — cards */
  --bg-elevated: #fff9e0;      /* near-white cream — highlights */

  --gold: #c4243a;             /* PRIMARY accent — bold Cantonese red */
  --gold-soft: #a01a2e;        /* deeper red */

  --maroon: #3a6a4a;           /* secondary — Cantonese balcony green */
  --rouge: #d83040;            /* vivid red for signage */

  --yellow: #f0b830;           /* sunlit yellow accent */
  --yellow-soft: #f8dc88;      /* pale yellow */

  --cream: #2a1a0a;            /* PRIMARY text — dark warm brown */
  --cream-soft: #5a3a2a;       /* secondary text */
  --text-mute: rgba(42, 26, 10, 0.55);
  --text-faint: rgba(42, 26, 10, 0.35);
  --border-faint: rgba(196, 36, 58, 0.30);
  --border-warm: #d0a868;

  /* Dark stage palette — used by portraits, monologue, ticket
     so they feel like windows into the stage */
  --stage-deep: #1a0a14;
  --stage-card: #2a1a2a;
  --stage-text: #f5e6c8;
  --stage-gold: #d4a017;

  --serif-cn: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --serif-en: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-deep);
  color: var(--cream);
  font-family: var(--serif-cn);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(ellipse at top, #fcf2d0 0%, #f5e8c8 60%, #ebd9a8 100%);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* Subtle warm grain / paper texture overlay
   gives the vintage poster feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg,
      rgba(196, 36, 58, 0.0) 0,
      rgba(196, 36, 58, 0.0) 18px,
      rgba(208, 168, 104, 0.025) 18px,
      rgba(208, 168, 104, 0.025) 19px);
  z-index: 0;
}
#app { position: relative; z-index: 1; }

#app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ============= screen base ============= */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
  animation: fadeIn 0.6s ease-out;
}

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

@keyframes slowReveal {
  0% { opacity: 0; transform: translateY(20px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============= typography ============= */
.label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  opacity: 0.75;
  text-transform: uppercase;
  font-weight: 400;
}

.subtitle {
  color: var(--text-mute);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-top: 12px;
  font-style: italic;
  font-family: var(--serif-en);
}

h1, h2, h3 {
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--cream);
}

h1 { font-size: 1.8rem; line-height: 1.4; }
h2 { font-size: 1.4rem; line-height: 1.5; }
p  { line-height: 1.75; }

/* ============= buttons ============= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border: 1.5px solid var(--gold);
  background: var(--bg-elevated);
  color: var(--gold);
  font-family: var(--serif-cn);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: var(--gold);
  color: var(--bg-elevated);
  letter-spacing: 0.12em;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gold);
  color: var(--bg-elevated);
  font-weight: 600;
  box-shadow: 0 3px 0 var(--gold-soft);
}

.btn-primary:hover {
  background: var(--gold-soft);
  color: var(--bg-elevated);
  box-shadow: 0 2px 0 var(--gold-soft);
  transform: translateY(1px);
}

.btn-ghost {
  border: none;
  background: transparent;
  color: var(--cream-soft);
  font-size: 0.85rem;
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: transparent;
  color: var(--gold);
  letter-spacing: 0.08em;
}

/* ============= top bar ============= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px 0;
  height: 50px;
  flex-shrink: 0;
}

.brand {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  opacity: 0.7;
}

.lang-switch {
  display: flex;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-mute);
}

.lang-switch button {
  background: none;
  border: none;
  color: var(--text-mute);
  cursor: pointer;
  padding: 4px 8px;
  font-family: var(--serif-en);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.lang-switch button.active {
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
}

/* ============= welcome screen ============= */
.welcome {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding-top: 18px;
  padding-bottom: 24px;
  padding-left: 22px;
  padding-right: 22px;
}

/* Brand logo — uses logo.jpg saved at E:/粤剧/demo/logo.jpg */
.welcome-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 4px;
}

.welcome-logo img {
  width: auto;
  max-width: 230px;
  max-height: 200px;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow:
    0 4px 18px rgba(196, 36, 58, 0.15),
    0 1px 4px rgba(0, 0, 0, 0.08);
}

@media (max-width: 380px) {
  .welcome-logo img { max-width: 190px; max-height: 170px; }
}

.welcome h1 {
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: 600;
}

.welcome .en-title {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--cream-soft);
  letter-spacing: 0.08em;
  font-size: 0.92rem;
}

.welcome .question-mark {
  margin-top: 6px;
  font-family: var(--serif-cn);
  color: var(--cream);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-align: center;
}

.welcome .invite-text {
  margin-top: 6px;
  font-family: var(--serif-en);
  color: var(--text-mute);
  font-style: italic;
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: center;
}

.welcome .welcome-title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: var(--gold);
}

.welcome-divider {
  width: 36px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
  margin: 4px 0;
}


/* ============= intro screen ============= */
.intro {
  justify-content: center;
  text-align: center;
  gap: 28px;
}

.intro-coffee {
  font-size: 3rem;
  opacity: 0.6;
  margin-bottom: 12px;
}

.intro p {
  font-size: 1.05rem;
  color: var(--cream-soft);
  letter-spacing: 0.05em;
  line-height: 2;
}

/* ============= question screen ============= */
.question {
  gap: 20px;
  padding-top: 24px;
}

.q-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.q-progress span {
  flex: 1;
  height: 2px;
  background: rgba(196, 36, 58, 0.18);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}

.q-progress span.done { background: var(--gold); }

.q-progress span.current::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  width: 50%;
  animation: fillProgress 0.8s ease-out forwards;
}

@keyframes fillProgress {
  from { width: 0%; }
  to { width: 100%; }
}

.q-num {
  font-family: var(--serif-en);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  opacity: 0.75;
}

.q-title {
  font-family: var(--serif-cn);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--cream);
  margin-bottom: 4px;
}

.q-title-en {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--text-mute);
  font-size: 0.9rem;
  line-height: 1.5;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.option {
  background: var(--bg-card);
  border: 1px solid rgba(196, 36, 58, 0.30);
  border-radius: 4px;
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  font-family: var(--serif-cn);
  color: var(--cream);
  transition: all 0.25s ease;
  display: block;
  width: 100%;
}

.option:hover {
  border-color: var(--gold);
  background: var(--bg-elevated);
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(196, 36, 58, 0.12);
}

.option-text {
  font-size: 1rem;
  line-height: 1.5;
}

.option-text-en {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--text-mute);
  font-size: 0.85rem;
  margin-top: 4px;
  line-height: 1.4;
}

/* ============= gender selection screen ============= */
.gender {
  justify-content: center;
  text-align: center;
  gap: 18px;
}

.gender-main {
  font-family: var(--serif-cn);
  font-size: 1.35rem;
  color: var(--cream);
  margin-top: 18px;
  letter-spacing: 0.05em;
}

.gender-main-en {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--text-mute);
  font-size: 0.95rem;
  margin-top: 6px;
  letter-spacing: 0.05em;
}

.gender-options {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 28px 0 16px;
}

.gender-option {
  flex: 1;
  max-width: 150px;
  background: var(--bg-card);
  border: 1px solid var(--border-faint);
  border-radius: 6px;
  padding: 28px 16px;
  cursor: pointer;
  font-family: var(--serif-cn);
  color: var(--cream);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.gender-option:hover {
  border-color: var(--gold);
  background: var(--bg-elevated);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 36, 58, 0.18);
}

.gender-option:active {
  transform: translateY(0);
}

.gender-icon {
  font-size: 2.4rem;
  background: linear-gradient(135deg, var(--cream), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gender-text {
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

.gender-text-en {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--text-mute);
  font-size: 0.85rem;
}

.gender-note {
  margin-top: 16px;
  color: var(--text-mute);
  font-size: 0.85rem;
  line-height: 1.7;
}

.gender-note-en {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--text-faint);
  font-size: 0.78rem;
  margin-top: 2px;
}

/* ============= camera intro screen ============= */
.camera-intro {
  justify-content: center;
  text-align: center;
  gap: 14px;
}

.camera-icon {
  font-size: 3.5rem;
  opacity: 0.5;
  margin: 16px 0 24px;
}

.camera-intro-main {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--cream);
}

.camera-intro-main-en {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--text-mute);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 4px;
}

.camera-intro-sub {
  margin-top: 30px;
  color: var(--text-mute);
  font-size: 0.85rem;
  line-height: 1.7;
}

.camera-intro-sub-en {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--text-faint);
  font-size: 0.78rem;
  margin-top: 4px;
}

.camera-intro .center-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 32px;
}

/* ============= camera live screen ============= */
.camera-live {
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.camera-frame {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--gold);
  box-shadow: 0 0 40px rgba(196, 36, 58, 0.18);
}

.camera-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror for natural selfie */
}

.camera-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-frame-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.camera-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--gold);
}

.camera-corner.tl { top: 22px; left: 22px; border-top: 2px solid; border-left: 2px solid; }
.camera-corner.tr { top: 22px; right: 22px; border-top: 2px solid; border-right: 2px solid; }
.camera-corner.bl { bottom: 22px; left: 22px; border-bottom: 2px solid; border-left: 2px solid; }
.camera-corner.br { bottom: 22px; right: 22px; border-bottom: 2px solid; border-right: 2px solid; }

.camera-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 360px;
  padding: 0 8px;
}

.shutter {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold);
  border: 4px solid var(--cream);
  box-shadow: 0 0 0 2px var(--gold), 0 4px 16px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.shutter:active {
  transform: scale(0.92);
}

/* ============= camera review screen ============= */
.camera-review {
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.camera-review .ticket-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 360px;
}

.camera-review .ticket-actions .btn {
  flex: 1;
}

/* ============= loading screen ============= */
.loading {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.loading-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  opacity: 0.6;
  animation: pulseOrb 2s ease-in-out infinite;
  margin-bottom: 16px;
}

@keyframes pulseOrb {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

.loading p {
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--cream-soft);
  font-style: italic;
}

.loading p.en {
  font-family: var(--serif-en);
  color: var(--text-mute);
  font-size: 0.92rem;
  margin-top: 4px;
}

/* ============= portrait frames ============= */
.portrait-frame {
  width: 200px;
  height: 250px;
  margin: 16px auto 8px;
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 24px rgba(212, 160, 23, 0.08);
  animation: portraitReveal 1s ease-out;
}

@keyframes portraitReveal {
  0% { opacity: 0; transform: scale(0.9) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============= result reveal screen ============= */
.result {
  justify-content: flex-start;
  text-align: center;
  gap: 12px;
  animation: slowReveal 1.2s ease-out;
}

.result-prelude {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--text-mute);
  font-size: 0.88rem;
  letter-spacing: 0.15em;
  margin-top: 12px;
}

.result-name-cn {
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: 0.1em;
  margin: 8px 0 4px;
  background: linear-gradient(135deg, var(--cream), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-name-en {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--text-mute);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.result-from {
  font-size: 0.85rem;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  font-style: italic;
}

.result-quote {
  font-family: var(--serif-cn);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--cream-soft);
  margin: 20px 0;
  padding: 0 16px;
  font-style: italic;
}

.result-letter {
  text-align: left;
  background: var(--bg-elevated);
  border-left: 3px solid var(--gold);
  padding: 18px 18px;
  margin: 12px 0;
  font-size: 0.96rem;
  line-height: 1.85;
  color: var(--cream-soft);
  box-shadow: 0 2px 10px rgba(196, 36, 58, 0.08);
  border-radius: 0 4px 4px 0;
}

.result-letter-en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-mute);
  margin-top: 12px;
  line-height: 1.7;
}

/* ============= monologue screen ============= */
.monologue {
  justify-content: center;
  text-align: center;
  gap: 20px;
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 60vh;
  background: linear-gradient(135deg, #2a1a2e 0%, #1a0a14 100%);
  border: 1px solid var(--border-faint);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.video-portrait-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.42;
  filter: blur(0.5px);
}

.video-portrait-bg svg {
  width: 100% !important;
  height: 100% !important;
}

.video-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(212, 160, 23, 0.1), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(184, 51, 106, 0.08), transparent 50%);
  animation: lightShift 8s ease-in-out infinite alternate;
  z-index: 1;
}

@keyframes lightShift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, -10px); }
}

.video-placeholder-content {
  position: relative;
  z-index: 2;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 16, 0.55) 30%, rgba(10, 10, 16, 0.85) 100%);
  width: 100%;
  align-self: flex-end;
  margin-top: auto;
}

.video-placeholder-meta {
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  margin-bottom: 12px;
  opacity: 0.85;
}

.video-placeholder-spoken {
  color: var(--cream);
  font-size: 1.05rem;
  line-height: 1.85;
  font-style: italic;
  margin: 14px 0;
  font-weight: 300;
}

.video-placeholder-spoken-en {
  font-family: var(--serif-en);
  color: var(--text-mute);
  font-style: italic;
  font-size: 0.85rem;
  margin-top: 6px;
  line-height: 1.6;
}

.video-placeholder-note {
  margin-top: 18px;
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  border-top: 1px dashed rgba(212, 160, 23, 0.2);
  padding-top: 10px;
}

/* ============= virtual ticket screen ============= */
.ticket-screen {
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding-top: 24px;
}

.ticket {
  width: 100%;
  max-width: 380px;
  background:
    linear-gradient(135deg, #fdf2cc 0%, #f8e4a0 100%);
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 22px 22px;
  position: relative;
  box-shadow:
    0 10px 30px rgba(196, 36, 58, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(196, 36, 58, 0.2);
  color: var(--cream);
  font-family: var(--serif-cn);
}

/* Vintage paper edge — subtle striped detail like the logo background */
.ticket::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(196, 36, 58, 0.3);
  border-radius: 3px;
  pointer-events: none;
}

.ticket-notch-l,
.ticket-notch-r {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  background: var(--bg-deep);
  border-radius: 50%;
  transform: translateY(-50%);
}

.ticket-notch-l { left: -12px; border-right: 1px dashed var(--gold); }
.ticket-notch-r { right: -12px; border-left: 1px dashed var(--gold); }

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px dashed rgba(196, 36, 58, 0.45);
  padding-bottom: 14px;
  margin-bottom: 14px;
  position: relative;
}

.ticket-brand { text-align: left; }

.ticket-brand-cn {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  opacity: 1;
  font-weight: 600;
}

.ticket-brand-en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  opacity: 0.65;
  margin-top: 2px;
}

.ticket-meta {
  text-align: right;
  font-size: 0.62rem;
  font-family: var(--serif-en);
  color: var(--cream-soft);
  opacity: 0.7;
  line-height: 1.6;
}

.ticket-portrait {
  width: 90px;
  height: 112px;
  margin: 4px auto 8px;
  background: var(--stage-deep);
  border: 2px solid var(--gold);
  border-radius: 3px;
  overflow: hidden;
  box-shadow:
    0 2px 10px rgba(196, 36, 58, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.ticket-bearer-label {
  font-size: 0.66rem;
  letter-spacing: 0.25em;
  color: var(--cream-soft);
  opacity: 0.65;
  margin-bottom: 6px;
}

.ticket-bearer-cn {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.ticket-bearer-en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--cream);
  opacity: 0.7;
  letter-spacing: 0.05em;
}

.ticket-source {
  font-size: 0.7rem;
  font-style: italic;
  color: var(--cream);
  opacity: 0.55;
  margin-top: 4px;
}

.ticket-quote {
  background: rgba(196, 36, 58, 0.08);
  border-radius: 3px;
  padding: 12px;
  margin: 14px 0;
  text-align: center;
  border: 1px solid rgba(196, 36, 58, 0.2);
}

.ticket-quote-cn {
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--cream);
  opacity: 1;
}

.ticket-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed rgba(196, 36, 58, 0.45);
  padding-top: 14px;
}

.ticket-event {
  text-align: left;
  font-size: 0.7rem;
  line-height: 1.5;
  flex: 1;
  padding-right: 12px;
}

.ticket-event-label { color: var(--cream-soft); opacity: 0.7; margin-bottom: 2px; }
.ticket-event-detail { color: var(--cream); opacity: 1; font-weight: 500; }

.ticket-qr {
  width: 50px;
  height: 50px;
  background: var(--cream);
  border-radius: 4px;
  display: grid;
  grid-template: repeat(8, 1fr) / repeat(8, 1fr);
  padding: 4px;
  border: 1px solid var(--gold);
}

.ticket-qr div { background: var(--bg-elevated); }

.ticket-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  width: 100%;
  max-width: 380px;
}

.ticket-actions .btn {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.92rem;
}

.ticket-hint {
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  font-family: var(--serif-en);
  font-style: italic;
}

/* ============= bottom bar ============= */
.bottom-bar {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.center-action {
  text-align: center;
  margin-top: 24px;
}

/* ============= utilities ============= */
.hidden { display: none !important; }

.fade-out { animation: fadeOut 0.4s ease-out forwards; }
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-12px); }
}

@media (max-width: 380px) {
  .screen { padding: 24px 18px; }
  .result-name-cn { font-size: 1.9rem; }
  .ticket { padding: 18px; }
  .portrait-frame { width: 170px; height: 212px; }
  .camera-frame { max-width: 320px; }
}
