:root {
  color-scheme: light;
  --wine: #781421;
  --wine-dark: #4b0a13;
  --paper: #fffaf1;
  --gold: #cda85d;
  --gold-light: #ecd7a7;
  --ink: #2c1818;
  --muted: #7d6660;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--wine-dark);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 15% 6%, rgb(205 168 93 / 20%), transparent 28%),
    linear-gradient(155deg, #8c1c2c 0%, var(--wine) 48%, var(--wine-dark) 100%);
  color: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
a {
  font: inherit;
}

.page {
  width: min(100%, 560px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 14px max(28px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 4px 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(24px, 7vw, 34px);
  line-height: 1.15;
}

.status,
.ticket-number {
  border: 1px solid rgb(236 215 167 / 76%);
  border-radius: 999px;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status {
  padding: 7px 10px;
}

.ticket-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(236 215 167 / 72%);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 24px 64px rgb(38 2 8 / 42%);
}

.ticket-number {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 7px 11px;
  border-color: rgb(255 255 255 / 76%);
  background: rgb(75 10 19 / 86%);
  color: white;
  backdrop-filter: blur(8px);
}

.ticket-image {
  display: block;
  width: 100%;
  height: auto;
}

.note {
  margin: 16px 2px 12px;
  padding: 16px 18px;
  border: 1px solid rgb(236 215 167 / 32%);
  border-radius: 16px;
  background: rgb(75 10 19 / 34%);
}

.note h2 {
  margin: 0 0 7px;
  color: var(--gold-light);
  font-size: 17px;
}

.note p {
  margin: 0;
  color: rgb(255 250 241 / 88%);
  font-size: 14px;
  line-height: 1.65;
}

.actions {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 9px;
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 5;
  padding: 10px;
  border: 1px solid rgb(236 215 167 / 38%);
  border-radius: 18px;
  background: rgb(75 10 19 / 84%);
  box-shadow: 0 10px 34px rgb(25 0 4 / 38%);
  backdrop-filter: blur(14px);
}

.actions button,
.actions a {
  min-height: 46px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.primary {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--wine-dark);
  font-weight: 850;
}

.secondary {
  display: grid;
  place-items: center;
  border: 1px solid rgb(236 215 167 / 58%);
  background: rgb(255 255 255 / 7%);
  color: white;
  font-weight: 700;
}

.footer {
  margin: 22px 0 4px;
  color: var(--gold-light);
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.12em;
}

.toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 90px;
  transform: translate(-50%, 18px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgb(34 12 14 / 92%);
  color: white;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

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

@media (max-width: 390px) {
  .actions {
    grid-template-columns: 1fr 1fr;
  }

  .actions a {
    grid-column: 1 / -1;
  }
}

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

  .toast {
    transition: none;
  }
}
