:root {
  color-scheme: light;
  --pine: #071b0e;
  --ink: #14251a;
  --green: #117c37;
  --green-dark: #0c612a;
  --lime: #63e089;
  --line: #cfddd0;
  --paper: #f5f8f4;
  --muted: #4e6354;
  --white: #fff;
  --radius: 10px;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid #c69221; outline-offset: 3px; }
[hidden] { display: none !important; }
.icons { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.masthead { padding: 17px 16px 14px; text-align: center; background: #06160c; color: #f2faf1; border-bottom: 3px solid #28bb55; }
.brand { display: inline-flex; gap: 8px; align-items: center; color: var(--lime); text-decoration: none; font-size: clamp(1.1rem, 5vw, 1.59rem); font-weight: 900; line-height: 1.1; letter-spacing: -.025em; }
.masthead p { margin-top: 4px; font-size: .86rem; }
.hero { padding: 20px 16px 23px; text-align: center; background: radial-gradient(ellipse at 50% 25%, #173c23, var(--pine) 71%); color: var(--white); }
.edition { display: inline-block; padding: 5px 13px; border-radius: 30px; background: #142f1d; border: 1px solid #386443; color: #c7f8d4; font-size: .83rem; font-weight: 850; letter-spacing: .17em; }
.poster { position: relative; isolation: isolate; max-width: 700px; overflow: hidden; margin: 12px auto; padding: 25px 15px 27px; border: 2px solid #3ac663; border-radius: 15px; background: linear-gradient(120deg, #1b4b2a, #092015 70%); box-shadow: inset 0 0 0 5px #0c2b18, 0 12px 28px #0003; }
.poster::before { content: ''; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(135deg, transparent 0 19px, #abf9b80c 19px 20px); mask-image: linear-gradient(90deg, black, transparent 38%, transparent 62%, black); }
.poster-brand { color: #a6f7bc; font-size: clamp(1.1rem, 3.6vw, 1.75rem); font-weight: 850; letter-spacing: .02em; }
.poster h1 { margin: 2px 0 5px; font-size: clamp(2.5rem, 9vw, 4.25rem); line-height: 1.08; font-weight: 950; letter-spacing: -.065em; overflow-wrap: anywhere; }
.poster p { color: #e2f1e5; }
.announcement { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 700px; margin: auto; padding: 12px 15px; border: 1px solid #9ef1b2; border-radius: var(--radius); background: #45d374; color: #072714; font-size: clamp(.87rem, 2.5vw, 1.1rem); line-height: 1.4; font-weight: 850; white-space: pre-line; overflow-wrap: anywhere; }
.announcement .icon { font-size: 1.25rem; }
.packages { padding: 17px 16px 23px; background: #0b2314; color: var(--white); text-align: center; border-top: 1px solid #204b2d; border-bottom: 3px solid #38be60; }
.packages h2 { margin-bottom: 11px; font-size: .9rem; text-transform: uppercase; letter-spacing: .11em; }
.price-list { display: grid; grid-template-columns: repeat(3, minmax(0, 155px)); justify-content: center; gap: 9px; }
.price { display: grid; gap: 1px; padding: 9px 5px; border: 1px solid #397b4c; border-radius: var(--radius); background: #13341f; color: #d4f2de; font-size: .83rem; }
.price strong { font-size: clamp(.85rem, 3.5vw, 1.15rem); color: var(--white); font-variant-numeric: tabular-nums; }

.content { width: min(900px, calc(100% - 32px)); margin-inline: auto; }
.ticket-section { padding: 24px 0 0; }
.ticket-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.ticket-heading h2, .reserve-form h2 { font-size: 1.22rem; letter-spacing: -.025em; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0; padding: 0; color: var(--muted); list-style: none; font-size: .76rem; font-weight: 650; }
.legend li { display: flex; gap: 5px; align-items: center; }
.dot { width: 10px; height: 10px; border: 1px solid #538162; border-radius: 3px; }
.dot.available { background: white; }
.dot.selected { background: #5ee789; }
.dot.reserved { background: #ffe6a3; border-color: #ac7819; }
.dot.paid { background: #143d22; }
.search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 8px; }
input, textarea { width: 100%; min-width: 0; border: 1px solid #aabdaf; border-radius: 8px; padding: 10px 12px; background: var(--white); color: var(--ink); font-size: 1rem; }
input:focus, textarea:focus { border-color: var(--green); }
input[aria-invalid="true"] { border-color: #a12a18; }
textarea { resize: vertical; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 43px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; color: var(--white); background: var(--green); font-size: .83rem; font-weight: 820; letter-spacing: .035em; text-transform: uppercase; transition: background .15s, transform .15s; }
.button:not(:disabled):hover { background: var(--green-dark); }
.button:not(:disabled):active { transform: translateY(1px); }
.button:disabled { opacity: .6; cursor: not-allowed; }
.button-dark { background: #122a19; border-color: #3e9958; color: #d9fce2; }
.button-dark .icon { color: var(--lime); }
.ticket-actions { display: grid; gap: 8px; }
.message { color: #225936; font-size: .89rem; font-weight: 700; margin-top: 8px; }
.message:empty { display: none; }
.message.error { color: #a12a18; }
.ticket-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
.ticket { min-height: 43px; padding: 6px 3px; background: var(--white); border: 1px solid #779b80; border-radius: 7px; color: var(--ink); font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ticket:not(:disabled):hover { background: #ddf5e3; border-color: var(--green); }
.ticket.selected, .ticket.selected:not(:disabled):hover { background: #5ee789; border-color: #128c3c; color: #102c19; }
.ticket.reserved { background: #ffe6a3; border-color: #b28735; color: #5e3c05; }
.ticket.paid { background: #143d22; border-color: #143d22; color: #fff; }
.ticket.located { outline: 2px solid #b47814; outline-offset: 1px; }
.ticket:disabled { cursor: not-allowed; }
.ticket.skeleton { background: linear-gradient(130deg, #e4eee5, #f3f8f3); border-color: #d7e5d8; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.pager button { background: white; color: #155b2b; border: 1px solid #7b9d83; border-radius: 7px; min-width: 40px; min-height: 41px; padding: 4px 10px; font-size: .86rem; font-weight: 750; }
.pager button[aria-current="page"] { background: #143d22; color: white; border-color: #143d22; }
.pager button:disabled { opacity: .49; cursor: not-allowed; }
.pager button:not(:disabled):not([aria-current]):hover { background: #e1f2e5; }

.reserve-form { display: grid; gap: 10px; margin-top: 23px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.selection-summary { padding: 10px; border: 1px solid #a8c8b0; border-radius: 8px; background: #edf7ef; color: #234a2e; font-size: .9rem; font-weight: 750; }
.buyer-fields, .admin-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.buyer-fields label, .admin-body label { display: grid; gap: 5px; font-size: .85rem; font-weight: 700; }
.fine-print { color: var(--muted); font-size: .82rem; line-height: 1.5; }
.admin { margin-block: 18px 23px; }
.admin details { border: 1px solid #90ab95; border-radius: 12px; background: #ebf2eb; }
.admin summary { display: flex; align-items: center; gap: 8px; padding: 14px; cursor: pointer; font-size: .83rem; text-transform: uppercase; font-weight: 850; letter-spacing: .04em; }
.admin summary::after { margin-left: auto; content: '+'; font-size: 1.2em; }
.admin details[open] summary::after { content: '−'; }
.admin-body { display: grid; gap: 12px; padding: 0 14px 14px; }
.admin-body form { display: grid; gap: 10px; }
.admin-body .wide { grid-column: 1 / -1; }
.admin-body .utility { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.link-button { padding: 0; border: 0; background: none; color: var(--green-dark); font-size: .88rem; font-weight: 700; text-decoration: underline; }
.footer { padding: 27px 60px 34px; text-align: center; background: var(--pine); color: #ecf7ee; }
.footer h2 { margin-bottom: 7px; font-size: .98rem; letter-spacing: .09em; text-transform: uppercase; }
.footer p { margin-top: 5px; font-size: .92rem; }
.footer a { color: var(--lime); }
.footer small { display: block; margin-top: 11px; color: #a9c1af; }
.floating { position: fixed; z-index: 2; bottom: max(16px, env(safe-area-inset-bottom)); right: 16px; display: grid; width: 53px; height: 53px; place-items: center; border: 1px solid #62e88c; border-radius: 50%; background: #126b33; color: white; box-shadow: 0 5px 22px #08251240; font-size: 1.52rem; }
.floating:hover { background: #0b5526; }

@media (max-width: 600px) {
  .buyer-fields, .admin-fields { grid-template-columns: 1fr; }
  .reserve-form { padding: 14px; }
}
@media (max-width: 480px) {
  .ticket-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ticket-heading { margin-bottom: 10px; }
  .announcement { gap: 8px; }
  .pager button { min-width: 32px; min-height: 38px; padding-inline: 6px; font-size: .77rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
