/* ===================================================================
   机票定制页（对应 gamestarvi.com/ticket.html 的视觉）
   =================================================================== */

.ticket-page {
  margin: 0;
  color-scheme: dark;
  color: #fff5fc;
  background: radial-gradient(ellipse at 30% 0, #33213f 0, #171021 48%, #110d17 100%);
  font: 16px/1.55 system-ui, "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}
.ticket-page *, .ticket-page *::before, .ticket-page *::after { box-sizing: border-box; }
.ticket-page a { color: inherit; }

.ticket-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid #efd2f124;
}
.ticket-site-header a { text-decoration: none; }
.ticket-site-header a:first-child { font-weight: 850; letter-spacing: .12em; }
.ticket-site-header a:last-child { color: #e4ccdf; font-size: .875rem; }
.ticket-site-header a:hover { text-decoration: underline; }

.ticket-shell { width: min(1200px, calc(100% - 32px)); margin: auto; padding: clamp(26px, 4vw, 48px) 0 24px; }

.ticket-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.ticket-heading p { margin: 0; color: #dcc5db; }
.ticket-heading .ticket-kicker { color: #f5aacf; font-size: .69rem; letter-spacing: .17em; font-weight: 800; }
.ticket-heading h1 { font-size: clamp(32px, 5vw, 58px); line-height: 1.15; margin: 5px 0 8px; font-weight: 800; }

.ticket-destination { display: grid; gap: 3px; text-align: right; color: #ddc6dd; font-size: .75rem; padding-bottom: 2px; }
.ticket-destination strong { color: #ffdaed; font-size: clamp(23px, 4vw, 39px); line-height: 1; font-weight: 900; }

.ticket-preview {
  margin: 0;
  padding: clamp(8px, 1.4vw, 15px);
  border: 1px solid #dda7e13b;
  border-radius: 16px;
  background: #1d1426;
}
.ticket-preview-label { display: flex; justify-content: space-between; gap: 10px; padding: 1px 3px 10px; color: #d6b9d1; font-size: .75rem; }
.ticket-preview-label strong { color: #f9deef; }
.ticket-preview-label span { font-variant-numeric: tabular-nums; letter-spacing: .1em; }

#ticket-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2400 / 976;
  border-radius: 6px;
  background: #30253f;
}

.ticket-form {
  margin: 16px 0 0;
  padding: clamp(12px, 2vw, 20px);
  border: 1px solid #dda7e132;
  border-radius: 15px;
  background: #1e1527;
}
.ticket-fields { display: grid; grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr)); gap: 12px; }
.ticket-fields label { display: grid; min-width: 0; gap: 6px; font-size: .85rem; font-weight: 650; color: #f6dcef; }
.ticket-fields input {
  width: 100%;
  min-width: 0;
  height: 44px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: #fff6fd;
  background: #130e1b;
  border: 1px solid #dba9dc48;
  border-radius: 7px;
  padding: 8px 10px;
}
.ticket-fields .ticket-identifier { text-transform: uppercase; }
.ticket-fields input::-webkit-date-and-time-value { text-align: left; }
.ticket-fields input:focus { outline: 2px solid #ffc4e6; outline-offset: 1px; }

.ticket-actions { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 9px; margin-top: 14px; }
.ticket-actions p { flex: 1 1 230px; margin: 0; color: #dbc4d9; font-size: .8rem; }
.ticket-actions button { min-height: 44px; padding: 0 14px; border-radius: 8px; font: inherit; font-weight: 750; cursor: pointer; }
.ticket-reset { color: #f7dfef; background: transparent; border: 1px solid #dba9dc57; }
.ticket-download {
  display: inline-flex; align-items: center; gap: 8px;
  color: #241020; border: 0;
  background: linear-gradient(105deg, #ed83cb, #f2a28f);
}
.ticket-download svg { width: 19px; height: 19px; }
.ticket-actions button:hover:not(:disabled) { filter: brightness(1.12); }
.ticket-actions button:disabled { cursor: wait; opacity: .55; }

.ticket-page :focus-visible { outline: 2px solid #ffc4e6; outline-offset: 3px; }
.ticket-footnote { margin: 14px 0 0; color: #d1b7cd; font-size: .75rem; }

/* 后台内嵌预览 */
.ticket-page.is-embed { background: #171021; min-height: 0; }
.ticket-page.is-embed .ticket-shell { width: 100%; padding: 0; }
.ticket-page.is-embed .ticket-heading,
.ticket-page.is-embed .ticket-footnote { display: none; }
.ticket-page.is-embed .ticket-preview { border-radius: 0; border: 0; background: transparent; padding: 0; }
.ticket-page.is-embed .ticket-form { border-radius: 0; margin-top: 8px; }

@media (max-width: 820px) {
  .ticket-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 450px) {
  .ticket-actions p { flex-basis: 100%; }
  .ticket-heading { flex-direction: column; align-items: flex-start; }
  .ticket-destination { text-align: left; }
}
