:root {
  --bg: #c90000;
  --panel: rgba(255, 247, 226, 0.92);
  --ink: #5b1208;
  --muted: #9b6a4b;
  --line: rgba(192, 80, 30, 0.22);
  --primary: #b9150f;
  --primary-dark: #8f0e0a;
  --gold: #f6d68a;
  --gold-deep: #b87824;
  --ok: #b9150f;
  --warn: #9a3412;
  --danger: #8f0e0a;
  --shadow: 0 24px 72px rgba(77, 0, 0, 0.34);
  --poster-width: 100vw;
  --poster-scale: calc(var(--poster-width) / 1126);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(88, 0, 0, 0.12), rgba(88, 0, 0, 0.24)),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url("/bg-clean.png");
  background-repeat: no-repeat;
  background-position: top center;
  background-size: var(--poster-width) auto;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(80, 0, 0, 0.02) 0%, rgba(80, 0, 0, 0.1) 48%, rgba(80, 0, 0, 0.18) 100%),
    radial-gradient(circle at 50% 55%, rgba(255, 224, 150, 0.08), transparent 34%);
  pointer-events: none;
  animation: ambientGlow 9s ease-in-out infinite alternate;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.home-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: #c40000;
}

.home-stage {
  position: relative;
  width: min(100vw, 762px);
  aspect-ratio: 762 / 1626;
  overflow: hidden;
  background: #c40000;
  box-shadow: 0 0 48px rgba(80, 0, 0, 0.28);
}

.home-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.home-nav {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.home-nav-item {
  position: absolute;
  display: block;
  border-radius: 6.5%;
  touch-action: manipulation;
  transition: background 160ms ease, transform 160ms ease;
}

.home-nav-item:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.985);
}

.item-guide {
  left: 12.99%;
  top: 31.06%;
  width: 36.22%;
  height: 18.08%;
}

.item-agenda,
.item-dining,
.item-checkin,
.item-seating,
.item-honor,
.item-showcase {
  width: 35.96%;
  height: 8.49%;
}

.item-agenda {
  left: 51.44%;
  top: 31.06%;
}

.item-dining {
  left: 51.44%;
  top: 40.71%;
}

.item-checkin {
  left: 12.99%;
  top: 50.43%;
}

.item-seating {
  left: 51.44%;
  top: 50.43%;
}

.item-honor {
  left: 12.99%;
  top: 60.21%;
}

.item-showcase {
  left: 51.44%;
  top: 60.21%;
}

.shell {
  width: var(--poster-width);
  margin: 0 auto;
  padding: 22px 16px 48px;
  container-type: inline-size;
  position: relative;
  min-height: calc(var(--poster-width) * 2.164);
}

.hero-title-art,
.date-place-art {
  position: absolute;
  left: 50%;
  z-index: 0;
  display: block;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

.hero-title-art {
  top: calc(var(--poster-scale) * 250);
  width: calc(var(--poster-scale) * 1003);
  animation: heroRise 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both, heroFloat 4.8s ease-in-out 900ms infinite;
}

.date-place-art {
  top: calc(var(--poster-scale) * 2050);
  width: calc(var(--poster-scale) * 327);
  animation: dateReveal 900ms ease 500ms both;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.brand {
  display: grid;
  gap: 2px;
  width: min(250px, 58vw);
  padding: 10px 14px;
  border: 1px solid rgba(246, 214, 138, 0.38);
  border-radius: 8px;
  color: #fff8dc;
  background: rgba(107, 0, 0, 0.18);
  box-shadow: 0 12px 36px rgba(80, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  animation: softReveal 650ms ease both;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0;
  line-height: 1.22;
}

.muted,
.brand span {
  color: rgba(255, 240, 194, 0.76);
  font-size: 13px;
  line-height: 1.35;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a,
.link-button {
  position: relative;
  overflow: hidden;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(246, 214, 138, 0.38);
  border-radius: 8px;
  color: #6b1008;
  background: linear-gradient(180deg, rgba(255, 249, 226, 0.96), rgba(247, 218, 150, 0.9));
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 10px 26px rgba(80, 0, 0, 0.16);
}

.nav a::after,
.link-button::after,
.primary::after,
.secondary::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -60%;
  width: 45%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  pointer-events: none;
}

.nav a:hover::after,
.link-button:hover::after,
.primary:hover::after,
.secondary:hover::after {
  animation: shineSweep 850ms ease;
}

.panel {
  position: relative;
  z-index: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(10px);
  animation: cardIn 680ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ticket {
  max-width: 430px;
  margin: 0 auto;
  margin-top: calc(var(--poster-scale) * 610);
}

.shell > .panel:not(.ticket) {
  margin-top: calc(var(--poster-scale) * 610);
}

.shell.compact .hero-title-art {
  display: none;
}

.shell.compact .ticket {
  margin-top: calc(var(--poster-scale) * 350);
}

.shell.lookup-page .ticket,
.shell.admin-page .ticket {
  margin-top: calc(var(--poster-scale) * 900);
}

.shell.admin-page .stats {
  margin-top: calc(var(--poster-scale) * 900);
}

.shell.service-page .hero-title-art,
.shell.seat-query-page .hero-title-art {
  display: none;
}

.shell.honor {
  width: min(100vw, 520px);
  min-height: auto;
  padding: 0;
  overflow: hidden;
  background: #bd0000;
}

.shell.honor .hero-title-art,
.shell.honor .date-place-art,
.shell.honor .topbar {
  display: none;
}

.ticket-head {
  position: relative;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(122, 0, 0, 0.96), rgba(200, 20, 12, 0.94) 62%, rgba(246, 214, 138, 0.72));
  color: white;
  border-bottom: 1px solid rgba(246, 214, 138, 0.36);
}

.page-title-block {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(92%, 430px);
  margin: calc(var(--poster-scale) * 210) auto 0;
}

.page-module {
  position: relative;
  z-index: 1;
  width: min(92%, 430px);
  margin: calc(var(--poster-scale) * 150) auto 0;
}

.page-module .page-title-block {
  width: 100%;
  margin: 0 auto 14px !important;
}

.page-module .ticket {
  width: 100%;
  max-width: none;
}

.page-title-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(80, 0, 0, 0.28));
  animation: heroRise 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ticket-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 238, 178, 0.2), transparent 78%);
  transform: translateX(-100%);
  animation: headerSweep 3.4s ease-in-out 900ms infinite;
  pointer-events: none;
}

.ticket-name {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  color: #fff7d6;
  text-shadow: 0 2px 12px rgba(88, 0, 0, 0.35);
}

.ticket-head p {
  margin: 6px 0 0;
  color: rgba(255, 244, 207, 0.86);
}

.lookup-panel .ticket-head,
.service-panel .ticket-head,
.seat-query-panel .ticket-head {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 126px;
}

.lookup-panel .ticket-head p,
.service-panel .ticket-head p,
.seat-query-panel .ticket-head p {
  max-width: 100%;
  line-height: 1.35;
}

.section,
.ticket-body,
.verify-result {
  padding: 18px;
}

.qr-box {
  display: grid;
  place-items: center;
  padding: 18px;
  margin-bottom: 16px;
  border: 1px dashed rgba(184, 120, 36, 0.5);
  border-radius: 8px;
  background: rgba(255, 252, 242, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
  animation: qrBreathe 3.2s ease-in-out infinite;
}

.qr-box img {
  width: 210px;
  height: 210px;
}

.qr-box canvas,
.qr-box svg {
  width: 210px;
  height: 210px;
}

.admin-qr-actions {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.admin-qr-actions .qr-box {
  margin-bottom: 0;
}

.qr-download-btn {
  width: min(220px, 100%);
}

.return-home-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 4px;
  width: min(92%, 520px);
  margin: 18px auto 0;
  padding: 14px 18px;
  border: 1px solid rgba(246, 214, 138, 0.58);
  border-radius: 8px;
  color: #fff7d6;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(145, 7, 0, 0.94), rgba(226, 54, 22, 0.92) 56%, rgba(232, 155, 48, 0.9));
  box-shadow: 0 16px 42px rgba(83, 0, 0, 0.28);
  overflow: hidden;
  animation: softReveal 520ms ease both;
}

.return-home-card::after {
  content: "›";
  position: absolute;
  right: 18px;
  top: 50%;
  color: rgba(255, 248, 216, 0.9);
  font-size: 34px;
  font-weight: 300;
  transform: translateY(-50%);
}

.return-home-card span {
  font-size: 20px;
  font-weight: 850;
  line-height: 1.2;
}

.return-home-card strong {
  max-width: calc(100% - 42px);
  color: rgba(255, 241, 196, 0.84);
  font-size: 13px;
  line-height: 1.35;
}

.scan-panel {
  display: grid;
  gap: 14px;
}

.scan-button {
  min-height: 58px;
  font-size: 20px;
  font-weight: 750;
}

.scanner-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(246, 214, 138, 0.55);
  background: rgba(80, 0, 0, 0.34);
  box-shadow: 0 16px 36px rgba(80, 0, 0, 0.22);
}

.scanner-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scan-frame {
  position: absolute;
  inset: 16%;
  border: 2px solid rgba(246, 214, 138, 0.96);
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(60, 0, 0, 0.28), 0 0 26px rgba(246, 214, 138, 0.3);
  animation: scanFramePulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

.file-scan {
  width: 100%;
}

.seat-highlight {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(184, 120, 36, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 248, 220, 0.96), rgba(246, 214, 138, 0.76)),
    rgba(255, 247, 226, 0.9);
  text-align: center;
  box-shadow: 0 12px 28px rgba(132, 20, 8, 0.12);
  animation: seatGlow 3s ease-in-out infinite;
}

.seat-highlight span {
  color: var(--muted);
  font-size: 13px;
}

.seat-highlight strong {
  color: #8f0e0a;
  font-size: 28px;
  line-height: 1.2;
}

.info-grid {
  display: grid;
  gap: 10px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  animation: rowIn 420ms ease both;
}

.info-row:nth-child(2) {
  animation-delay: 60ms;
}

.info-row:nth-child(3) {
  animation-delay: 120ms;
}

.info-row:nth-child(4) {
  animation-delay: 180ms;
}

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

.info-row span:first-child {
  flex: 0 0 78px;
  color: var(--muted);
}

.info-row span:last-child {
  text-align: right;
  font-weight: 650;
}

.notice {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(184, 120, 36, 0.28);
  background: linear-gradient(180deg, rgba(255, 246, 218, 0.9), rgba(255, 236, 180, 0.82));
  color: #6b3a05;
  line-height: 1.55;
  animation: softReveal 520ms ease 180ms both;
}

.notice strong {
  color: #8f0e0a;
}

.service-panel {
  max-width: 460px;
}

.service-body {
  display: grid;
  gap: 14px;
}

.service-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(184, 120, 36, 0.3);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 250, 232, 0.94), rgba(255, 235, 190, 0.82));
  animation: softReveal 520ms ease both;
}

.service-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(184, 120, 36, 0.28);
}

.service-title span {
  color: #8f0e0a;
  font-size: 22px;
  font-weight: 800;
}

.service-title strong {
  color: rgba(143, 14, 10, 0.46);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.service-list {
  display: grid;
  gap: 8px;
}

.service-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(184, 120, 36, 0.18);
}

.service-item:last-child {
  border-bottom: 0;
}

.service-item span {
  color: var(--muted);
  font-size: 13px;
}

.service-item strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.service-note {
  margin-top: 0;
}

.service-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.service-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 10px;
  text-decoration: none;
  font-weight: 750;
  text-align: center;
  line-height: 1.2;
  color: inherit;
}

.service-action.primary {
  color: #fff7d6;
}

.service-action.link-button {
  color: #6b1008;
}

.service-test {
  color: #8f0e0a;
}

.honor-page {
  min-height: calc(min(100vw, 520px) * 5.706);
  padding: 46px 20px calc(min(100vw, 520px) * 1.08);
  background:
    linear-gradient(180deg, rgba(80, 0, 0, 0.02), rgba(80, 0, 0, 0.08)),
    url("/assets/honor-bottom.png?v=20260630-honor") bottom center / 100% auto no-repeat,
    url("/assets/honor-bg.png?v=20260630-honor") top center / 100% auto no-repeat;
  color: #fff6d5;
}

.honor-main-title {
  display: block;
  width: min(76.5%, 398px);
  height: auto;
  margin: 0 auto 28px;
}

.honor-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 10px;
  width: min(92%, 430px);
  margin: 0 auto 28px;
  padding: 0;
  overflow: visible;
}

.honor-tab {
  position: relative;
  grid-column: span 2;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  line-height: 0;
  appearance: none;
  -webkit-appearance: none;
}

.honor-tab:nth-child(4) {
  grid-column: 2 / span 2;
}

.honor-tab:nth-child(5) {
  grid-column: 4 / span 2;
}

.honor-tab img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.honor-tab.active {
  filter: none;
  transform: none;
}

.honor-content {
  position: relative;
  margin: 0 auto;
  padding: 4px 2px 0;
}

.honor-content-item {
  display: none;
}

.honor-content-item.active {
  display: block;
  animation: cardIn 420ms ease both;
}

.honor-content-panel {
  display: grid;
  gap: 14px;
}

.honor-long-panel {
  gap: 0;
}

.honor-image-wrap {
  position: relative;
}

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

.honor-like-button {
  position: absolute;
  right: 7.2%;
  z-index: 2;
  width: clamp(112px, 26%, 154px);
  aspect-ratio: 288 / 120;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: translate3d(0, -50%, 0);
  transform-origin: 32% 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  will-change: auto;
}

.honor-like-button img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.honor-like-button.liked {
  animation: none;
}

.honor-like-button.is-liked {
  cursor: default;
  opacity: 0.78;
  filter: grayscale(0.18);
}

.honor-like-button:active {
  transform: translate3d(0, -50%, 0);
}

.honor-like-count {
  position: absolute;
  left: 49%;
  right: 7%;
  top: 50%;
  color: #8c0900;
  font-size: clamp(13px, 3.6vw, 19px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  transform: translateY(-50%);
  pointer-events: none;
}

.thumb-rain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

.thumb-rain span {
  position: absolute;
  top: -72px;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(90, 0, 0, 0.28));
  animation: thumbFall 1.7s linear forwards;
}

@keyframes likePop {
  0% { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes thumbFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -16px, 0) rotate(-18deg);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 20px), 110vh, 0) rotate(28deg);
  }
}

.honor-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 229, 152, 0.42);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(176, 20, 11, 0.88), rgba(222, 85, 21, 0.86));
  box-shadow: 0 16px 36px rgba(82, 0, 0, 0.24);
}

.honor-section-title span {
  font-size: 22px;
  font-weight: 900;
}

.honor-section-title strong {
  color: rgba(255, 240, 196, 0.65);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.honor-card {
  min-height: 220px;
  padding: 18px;
  border: 1px solid rgba(255, 229, 152, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(214, 65, 21, 0.88), rgba(188, 18, 11, 0.88)),
    radial-gradient(circle at 50% 0%, rgba(255, 236, 164, 0.2), transparent 36%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 40px rgba(78, 0, 0, 0.26);
}

.honor-medal {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  height: 28px;
  margin-bottom: 12px;
  padding: 0 12px;
  border-radius: 999px;
  color: #7a1607;
  background: linear-gradient(180deg, #fff3bd, #e9aa42);
  font-weight: 900;
}

.honor-card h2 {
  margin: 0 0 10px;
  color: #fff6d5;
  font-size: 21px;
}

.honor-card p {
  margin: 0 0 10px;
  color: rgba(255, 248, 222, 0.92);
  font-size: 14px;
  line-height: 1.75;
}

.seat-query-panel {
  max-width: 520px;
}

.seat-query-body {
  display: grid;
  gap: 14px;
}

.seat-map-mini {
  position: relative;
  overflow: hidden;
  padding: 14px 12px 16px;
  border: 1px solid rgba(246, 214, 138, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 228, 150, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(142, 8, 5, 0.94), rgba(210, 19, 12, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 14px 32px rgba(80, 0, 0, 0.18);
  animation: softReveal 520ms ease both;
}

.pdf-seat-map {
  padding: 0;
  background: transparent;
}

.pdf-seat-map img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.seat-map-marker {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 56px;
  height: 26px;
  padding: 0 8px;
  border: 2px solid #fff7a8;
  border-radius: 999px;
  color: #8f0e0a;
  background: #ffe35f;
  box-shadow: 0 0 0 5px rgba(255, 240, 120, 0.38), 0 0 26px rgba(255, 236, 90, 0.95);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  animation: markerPulse 1.1s ease-in-out infinite;
}

.stage-mini {
  width: min(58%, 260px);
  min-height: 42px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border: 1px solid rgba(255, 240, 194, 0.7);
  border-radius: 8px;
  color: #fff6d8;
  background: linear-gradient(135deg, rgba(198, 62, 30, 0.98), rgba(239, 150, 90, 0.88));
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 8px;
}

.seat-rows-mini {
  display: grid;
  gap: 6px;
}

.seat-row-mini {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.seat-row-label {
  color: rgba(255, 247, 220, 0.86);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.seat-row-groups {
  display: grid;
  grid-template-columns: 0.9fr 2.1fr 0.9fr;
  gap: 7px;
  align-items: center;
}

.seat-group-mini {
  display: flex;
  gap: 3px;
  justify-content: center;
}

.seat-group-mini.wide {
  grid-column: auto;
}

.seat-row-mini:nth-child(n + 5) .seat-row-groups {
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.seat-dot {
  width: clamp(6px, 1.45vw, 11px);
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 -1px 0 rgba(120, 0, 0, 0.14);
}

.seat-dot.active {
  position: relative;
  z-index: 2;
  background: #ffe35f;
  box-shadow: 0 0 0 3px rgba(255, 247, 176, 0.72), 0 0 18px rgba(255, 236, 90, 0.95);
  animation: seatBlink 1.05s ease-in-out infinite;
}

.seat-result-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(184, 120, 36, 0.34);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 248, 220, 0.96), rgba(246, 214, 138, 0.76));
  color: #6b3a05;
  text-align: center;
  box-shadow: 0 14px 32px rgba(80, 0, 0, 0.16);
  animation: cardIn 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.seat-result-card strong {
  color: #d8120b;
  font-size: 30px;
  line-height: 1.15;
}

.seat-result-card em {
  color: #8f0e0a;
  font-style: normal;
  font-size: 13px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
  margin-top: calc(var(--poster-scale) * 610);
  position: relative;
  z-index: 1;
  animation: cardIn 680ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.stats + .panel {
  margin-top: 0;
}

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

.site-code-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(184, 120, 36, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 248, 220, 0.94), rgba(255, 231, 170, 0.76));
  animation: softReveal 520ms ease both;
}

.site-code-copy {
  display: grid;
  gap: 8px;
  color: #6b3a05;
}

.site-code-copy strong {
  color: #8f0e0a;
  font-size: 20px;
}

.admin-settings {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(184, 120, 36, 0.28);
  border-radius: 8px;
  background: rgba(255, 247, 226, 0.92);
  box-shadow: 0 12px 28px rgba(80, 0, 0, 0.12);
  animation: softReveal 520ms ease both;
}

.settings-head {
  display: grid;
  gap: 5px;
  color: #6b3a05;
}

.settings-head strong {
  color: #8f0e0a;
  font-size: 20px;
}

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

.settings-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.settings-grid label.wide {
  grid-column: 1 / -1;
}

.settings-grid input,
.settings-grid textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 252, 242, 0.96);
}

.settings-grid textarea {
  min-height: 88px;
  resize: vertical;
}

.settings-grid input:focus,
.settings-grid textarea:focus {
  outline: none;
  border-color: rgba(185, 21, 15, 0.54);
  box-shadow: 0 0 0 4px rgba(185, 21, 15, 0.1);
}

.settings-actions {
  margin-bottom: 0;
}

.likes-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding: 2px;
}

.likes-admin-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.likes-admin-grid input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 252, 242, 0.96);
}

.field-hint {
  display: block;
  color: #8f6b54;
  font-size: 12px;
  font-weight: 500;
}

.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.secondary.mini {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12px;
}

.secondary.danger {
  color: #9f160e;
  border-color: rgba(190, 41, 28, 0.28);
  background: rgba(255, 236, 228, 0.88);
}

.import-mode {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(184, 120, 36, 0.22);
  border-radius: 8px;
  background: rgba(255, 247, 226, 0.78);
}

.import-mode label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.import-mode input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
}

.site-qr {
  width: 156px;
  min-height: 156px;
  margin: 0;
  padding: 10px;
}

.site-qr canvas,
.site-qr img,
.site-qr svg {
  width: 132px;
  height: 132px;
}

.stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 247, 226, 0.92);
  box-shadow: 0 14px 34px rgba(80, 0, 0, 0.16);
  animation: statPop 560ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.stat:nth-child(2) {
  animation-delay: 80ms;
}

.stat:nth-child(3) {
  animation-delay: 160ms;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid rgba(184, 120, 36, 0.24);
  border-radius: 8px;
  background: rgba(255, 249, 226, 0.58);
}

.segmented button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  color: #7a1309;
  background: transparent;
}

.segmented button.active {
  color: #fff7d6;
  background: linear-gradient(135deg, #a90d08, #d8321c);
  box-shadow: 0 8px 18px rgba(155, 15, 9, 0.18);
}

.search {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 252, 242, 0.96);
  color: var(--ink);
}

.primary,
.secondary,
.danger {
  position: relative;
  overflow: hidden;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  color: white;
  white-space: nowrap;
}

.primary {
  background: linear-gradient(135deg, #a90d08, #e13820 62%, #d49b3f);
  box-shadow: 0 12px 28px rgba(155, 15, 9, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.primary:not(:disabled):active,
.secondary:not(:disabled):active,
.link-button:active,
.nav a:active {
  transform: translateY(1px) scale(0.99);
}

.secondary {
  color: #7a1309;
  border: 1px solid rgba(184, 120, 36, 0.34);
  background: rgba(255, 249, 226, 0.9);
}

.danger {
  background: var(--danger);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(255, 238, 196, 0.72);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  color: white;
  background: #7c6f35;
  animation: softReveal 420ms ease both;
}

.badge.ok {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(185, 21, 15, 0.1);
}

.empty {
  padding: 32px 18px;
  text-align: center;
  color: var(--muted);
}

.verify-result {
  display: grid;
  gap: 14px;
}

.big-status {
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(184, 120, 36, 0.28);
  background: rgba(255, 246, 218, 0.88);
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 750;
  animation: statusPulse 2.6s ease-in-out infinite;
}

.big-status.warn {
  background: rgba(255, 233, 198, 0.9);
  color: var(--warn);
}

.invalid-status {
  text-align: center;
  font-size: 22px;
}

.form {
  display: grid;
  gap: 12px;
}

.form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.form input,
.form textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 252, 242, 0.96);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.form input:focus,
.form textarea:focus,
.search:focus {
  outline: none;
  border-color: rgba(185, 21, 15, 0.54);
  box-shadow: 0 0 0 4px rgba(185, 21, 15, 0.1);
}

.form input[type="file"] {
  padding: 8px;
}

.form textarea {
  min-height: 180px;
  resize: vertical;
}

@keyframes ambientGlow {
  from {
    opacity: 0.78;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes heroFloat {
  0%, 100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(-5px) scale(1.006);
  }
}

@keyframes dateReveal {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

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

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shineSweep {
  from {
    left: -60%;
  }
  to {
    left: 120%;
  }
}

@keyframes headerSweep {
  0%, 45% {
    transform: translateX(-100%);
  }
  72%, 100% {
    transform: translateX(100%);
  }
}

@keyframes qrBreathe {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52), 0 0 0 rgba(246, 214, 138, 0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.68), 0 0 24px rgba(246, 214, 138, 0.28);
  }
}

@keyframes seatGlow {
  0%, 100% {
    box-shadow: 0 12px 28px rgba(132, 20, 8, 0.12);
  }
  50% {
    box-shadow: 0 14px 34px rgba(214, 142, 42, 0.28);
  }
}

@keyframes seatBlink {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.55);
  }
}

@keyframes markerPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.12);
  }
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes statPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes statusPulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(185, 21, 15, 0);
  }
  50% {
    box-shadow: 0 0 24px rgba(185, 21, 15, 0.12);
  }
}

@keyframes scanFramePulse {
  0%, 100% {
    opacity: 0.78;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.025);
  }
}

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

@media (min-width: 721px) {
  :root {
    --poster-width: 520px;
  }
}

@media (max-width: 720px) {
  body::before {
    background-size: var(--poster-width) auto;
  }

  .shell {
    padding: 18px 14px 36px;
  }

  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar > * {
    width: 100%;
  }

  .topbar {
    flex-direction: row;
    align-items: flex-start;
  }

  .brand {
    width: min(250px, calc(100% - 92px));
  }

  .nav a {
    flex: 1;
  }

  .ticket {
    margin-top: calc(var(--poster-scale) * 610);
  }

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

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

  .admin-qr-grid {
    grid-template-columns: 1fr;
  }

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

  .likes-admin-grid {
    grid-template-columns: 1fr;
  }

  .seat-row-mini {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 5px;
  }

  .seat-row-groups {
    gap: 4px;
  }

  .seat-row-mini:nth-child(n + 5) .seat-row-groups {
    gap: 12px;
  }

  .seat-group-mini {
    gap: 2px;
  }

  .site-qr {
    justify-self: center;
  }

  .table {
    display: block;
    overflow-x: auto;
  }
}

.shell.service-page,
.shell.seat-query-page {
  padding-top: 18px;
}

.shell.service-page .page-module,
.shell.seat-query-page .page-module {
  width: min(92%, 430px);
  margin-top: calc(var(--poster-scale) * 740);
  margin-left: auto !important;
  margin-right: auto !important;
}

.shell.service-page .topbar,
.shell.seat-query-page .topbar {
  display: none !important;
}

.shell.service-page .hero-title-art,
.shell.seat-query-page .hero-title-art {
  display: block !important;
}

.shell.service-page .page-title-block,
.shell.seat-query-page .page-title-block {
  width: 100%;
  margin: 0 auto 14px !important;
}

.shell.service-page .ticket,
.shell.seat-query-page .ticket {
  margin-top: 0 !important;
}
