:root {
  --paper: #f7f4ee;
  --white: #fffdf8;
  --ink: #211c19;
  --earth: #625851;
  --clay: #ab3a22;
  --clay-dark: #832c1a;
  --sand: #e0d7cb;
  --edge: #8b7d73;
  --green: #1a573d;
  --green-tint: #e1efe5;
  --red-tint: #fae6df;
  --amber: #654418;
  --amber-tint: #f5ebd5;
  --background: var(--paper);
  --surface: var(--white);
  --text: var(--ink);
  --muted: var(--earth);
  --accent: var(--clay);
  --accent-hover: var(--clay-dark);
  --line: var(--sand);
  --control-line: var(--edge);
  --focus: #1c5d98;
  --font-body: "Atkinson Hyperlegible Next", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, sans-serif;
  --font-display: "Archivo Black", "Arial Black", var(--font-body);
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --radius-control: .45rem;
  --radius-panel: .85rem;
  --shadow-panel: 0 4px 16px rgb(46 34 26 / 5%);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); font: 1rem/1.55 var(--font-body); word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
img, video { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 4.7vw, 3rem); line-height: 1.1; letter-spacing: -.05em; }
h2 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.025em; }
.shell { width: min(100% - clamp(2rem, 8vw, 6rem), 73rem); margin-inline: auto; }
.header { border-bottom: 1px solid var(--line); }
.header-inner, .footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.header-inner { min-height: 4.25rem; }
.brand, .staff-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.brand { font-size: 1.3rem; font-weight: 850; letter-spacing: -.045em; white-space: nowrap; }
.brand span { margin-left: var(--space-1); font-weight: 500; }
.staff-link { gap: var(--space-2); font-size: .9rem; font-weight: 750; }
.staff-link span { color: var(--accent); }
.staff-link:hover, .back:hover { text-decoration: underline; }
main { min-height: calc(100svh - 10rem); padding-block: clamp(1.5rem, 4vw, 3.25rem); }
.footer { border-top: 1px solid var(--line); color: var(--muted); padding-block: var(--space-5) max(var(--space-5), env(safe-area-inset-bottom)); font-size: .85rem; }
[data-live-ticket] [data-ticket-demo-nav] { display: none; }
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem); align-items: start; gap: clamp(1.5rem, 4vw, 3.5rem); }
.event-info { display: grid; gap: var(--space-5); }
.event-cover { width: 100%; height: auto; aspect-ratio: 2.1; object-fit: cover; object-position: center 60%; border-radius: var(--radius-panel); background: #3d201b; }
.event-title { font: 900 clamp(3.2rem, 7.5vw, 6.6rem)/.94 var(--font-display); letter-spacing: -.075em; }
.event-intro { display: grid; gap: var(--space-2); }
.event-kicker { color: var(--accent); font-weight: 800; font-size: .82rem; letter-spacing: .13em; }
.event-description { font-size: clamp(1.03rem, 2vw, 1.25rem); color: var(--muted); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin: 0; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .8rem; }
.facts dd { margin: var(--space-1) 0 0; font-weight: 750; }
.panel { display: grid; gap: var(--space-5); padding: clamp(1rem, 3vw, 1.75rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); box-shadow: var(--shadow-panel); }
.narrow { max-width: 35rem; margin-inline: auto; }
.flow { display: grid; gap: var(--space-5); }
.flow-header { display: grid; gap: var(--space-2); }
.back { width: fit-content; min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); font-weight: 700; text-decoration: none; }
.mode { display: inline-block; width: fit-content; color: var(--accent-hover); background: var(--red-tint); font-size: .8rem; font-weight: 800; padding: var(--space-1) var(--space-2); border-radius: var(--radius-control); }
.muted, .support { color: var(--muted); }
.support { font-size: .9rem; }
.price { font-size: 1.6rem; font-weight: 850; letter-spacing: -.05em; }
.stack { display: grid; gap: var(--space-3); }
.row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.total { border-top: 1px solid var(--line); padding-top: var(--space-4); }
.stepper { display: flex; align-items: center; gap: var(--space-2); }
.stepper output { display: inline-block; min-width: 2ch; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 46px; padding: var(--space-2) var(--space-4); font: inherit; font-weight: 750;
  border: 1px solid var(--control-line); border-radius: var(--radius-control);
  background: var(--surface); color: var(--text); text-decoration: none; text-align: center; cursor: pointer;
}
.button:hover { background: var(--background); }
.button:active { box-shadow: inset 0 0 0 1px currentColor; }
.button:disabled { opacity: .55; cursor: default; box-shadow: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.square { min-width: 46px; padding-inline: 0; font-size: 1.2rem; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.status { border-radius: var(--radius-control); padding: var(--space-3) var(--space-4); background: var(--background); color: var(--text); }
.status[data-kind="admitted"], .status[data-kind="success"] { background: var(--green-tint); color: var(--green); }
.status[data-kind="already_used"] { background: var(--amber-tint); color: var(--amber); }
.status[data-kind="invalid"], .status[data-kind="error"], .status[data-kind="wrong_event"] { background: var(--red-tint); color: var(--accent-hover); }
.scan-ticket-event { margin-block: var(--space-2); font-weight: 750; }
:is(.check-in-history, .order-refund, .cash-sales, .sale-settings, .event-cancellation) { display: block; }
:is(.check-in-history, .order-refund, .cash-sales, .sale-settings, .event-cancellation) summary { min-height: 44px; padding-block: var(--space-2); font-weight: 750; cursor: pointer; }
:is(.check-in-history, .order-refund, .cash-sales, .sale-settings, .event-cancellation)[open] summary { margin-bottom: var(--space-3); }
.event-cancellation > :is(p, form) + * { margin-top: var(--space-3); }
.event-cancellation fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.event-cancellation legend { margin-bottom: var(--space-2); }
:is(.sale-settings, .event-cancellation) input[type="checkbox"] { width: auto; min-height: 0; margin: 0 var(--space-1) 0 0; accent-color: var(--accent); }
:is(.sale-settings, .event-cancellation) label:has(input[type="checkbox"]) { display: flex; align-items: center; min-height: 44px; }
.sale-settings > :is(p, button) { margin-bottom: var(--space-3); }
.sale-settings fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.sale-settings fieldset fieldset { border-top: 1px solid var(--line); padding-top: var(--space-2); }
.sale-settings legend { font-weight: 750; padding-right: var(--space-2); }
.check-in-entries { list-style: none; margin: 0; padding: 0; }
.check-in-entries:empty { display: none; }
.check-in-entries li { padding-block: var(--space-3); border-top: 1px solid var(--line); }
.status[data-kind="wrong_event"] .facts dt { color: inherit; }
.ticket { justify-items: center; text-align: center; gap: var(--space-3); }
.ticket h2 { width: 100%; padding-bottom: var(--space-4); border-bottom: 1px dashed var(--control-line); }
.ticket img { width: 13rem; height: auto; background: white; }
.ticket-code { display: grid; gap: var(--space-2); width: min(100%, 14rem); }
.ticket-code input { text-align: center; font-size: 1.25rem; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.ticket .button { width: 100%; }
.ticket:focus { outline: 3px solid var(--focus); outline-offset: 3px; }
@media print {
  body:has([data-order-pass]) {
    background: white;
  }
  body:has([data-order-pass]) :is(.header, .footer),
  [data-order-pass] :is(button, .button, .back, [data-print-hide], #buyer-cancellation, .order-refund) {
    display: none !important;
  }
  [data-order-pass] .ticket {
    break-inside: avoid;
    box-shadow: none;
  }
  [data-order-pass] .ticket-code input {
    padding-inline: 0;
    border: 0;
    background: white;
  }
}
#local-inbox pre { white-space: pre-wrap; overflow-wrap: anywhere; }
input, textarea, select { width: 100%; min-width: 0; min-height: 46px; border: 1px solid var(--control-line); border-radius: var(--radius-control); padding: var(--space-2) var(--space-3); background: var(--surface); color: var(--text); font: inherit; }
input[type="file"]::file-selector-button { margin-inline-end: var(--space-2); padding: var(--space-2); border: 0; border-radius: var(--radius-control); background: var(--background); color: var(--text); font: inherit; }
.field-label { font-weight: 750; }
video { width: 100%; max-height: 25rem; background: var(--ink); border-radius: var(--radius-control); }
@media (max-width: 780px) {
  .event-layout { grid-template-columns: minmax(0, 1fr); }
  .event-cover { aspect-ratio: 1.9; }
  .event-info { gap: var(--space-4); }
}

.organizer-rounds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6, 1.5rem); align-items: start; }
.organizer-rounds .panel { min-width: 0; }
.organizer-rounds .mode { justify-self: start; }
.cancellation-record { border-top: 1px solid var(--line, #d8d0c6); padding-top: 1rem; }
@media (max-width: 800px) { .organizer-rounds { grid-template-columns: 1fr; } }
