:root {
    --lacquer: #7a1619;
    --lacquer-deep: #4c0c10;
    --ink: #2a1814;
    --ink-soft: #5e493f;
    --gold: #a67c3d;
    --gold-deep: #7a5924;
    --gold-soft: #f4e7cb;
    --paper: #f6f0e6;
    --card: #fffdf9;
    --line: rgba(42, 24, 20, 0.12);
    --ok: #1d5c38;
    --danger: #8d2a24;
    --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Noto Serif SC", serif;
    --zh: "Noto Serif SC", "Songti SC", SimSun, "Microsoft YaHei", serif;
    --sans: Outfit, "Segoe UI", sans-serif;
    --shadow: 0 22px 60px rgba(76, 12, 16, 0.12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 0 0, rgba(166, 124, 61, 0.09), transparent 28%),
        linear-gradient(180deg, #f3eadc 0%, var(--paper) 240px);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
}
body.no-scroll { overflow: hidden; }
body.has-dock { padding-bottom: 104px; }
body.has-dock .stepper,
body.has-dock .btn-pay,
body.has-dock .outlet,
body.has-dock .upload,
body.has-dock .poster,
body.has-dock .cal-day {
    scroll-margin-bottom: 140px;
}
img { max-width: 100%; }
button, input, select, textarea { font: inherit; font-size: 16px; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
a { color: var(--lacquer); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.skip {
    position: absolute;
    left: 12px;
    top: -40px;
    background: #fff;
    padding: 8px 12px;
    z-index: 80;
}
.skip:focus { top: 12px; }

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.hero {
    background:
        radial-gradient(circle at 12% 120%, rgba(244, 231, 203, 0.18), transparent 42%),
        radial-gradient(circle at 100% 0%, rgba(244, 231, 203, 0.14), transparent 34%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 9px),
        linear-gradient(180deg, #8d1d22 0%, #5c1014 100%);
    color: #f8efd9;
    padding: 28px 18px 56px;
}
.hero-inner {
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    gap: 22px;
    align-items: center;
}
.seal {
    width: 84px;
    height: 84px;
    flex: 0 0 auto;
    border: 2px solid rgba(248, 239, 217, 0.85);
    border-radius: 50%;
    display: grid;
    place-items: center;
    transform: rotate(-8deg);
    font-family: var(--zh);
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.15;
    text-align: center;
    font-size: 15px;
}
.eyebrow {
    margin: 0 0 4px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
}
.eyebrow.dark { color: var(--gold-deep); }
.hero h1, .confirm-title {
    margin: 0;
    font-family: var(--zh);
    font-weight: 700;
    font-size: clamp(68px, 14vw, 112px);
    line-height: 0.9;
    letter-spacing: 0.08em;
}
.confirm-title {
    font-family: var(--serif);
    letter-spacing: 0.02em;
    font-size: clamp(32px, 4.6vw, 56px);
    white-space: nowrap;
}
.year {
    margin: 6px 0 0;
    color: #f0d48a;
    font-family: var(--serif);
    font-size: 28px;
    letter-spacing: 0.28em;
}
.tagline {
    margin: 4px 0 0;
    font-family: var(--zh);
    font-size: 22px;
}
.sub { margin: 6px 0 0; color: rgba(248, 239, 217, 0.82); }
.facts {
    max-width: 920px;
    margin: 26px auto 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.facts li {
    border: 1px solid rgba(240, 212, 138, 0.35);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.12);
}
.facts span {
    display: block;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(248, 239, 217, 0.75);
}
.facts strong {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 600;
}

.sheet {
    max-width: 920px;
    margin: -32px auto 28px;
    background: var(--card);
    border-radius: 22px;
    border: 1px solid #e6d7bc;
    box-shadow: var(--shadow);
    padding: 8px 8px 28px;
    position: relative;
}
.banner {
    margin: 12px 12px 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--gold-soft);
    color: var(--gold-deep);
    font-weight: 600;
}
.banner-on { background: #e7f3ea; color: var(--ok); }
.section { padding: 8px 16px 4px; }
.section-kicker {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 22px 0 8px;
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
}
.section-kicker span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--lacquer);
    color: #f8efd9;
    font-family: var(--sans);
    font-size: 15px;
}
.section-kicker em {
    font-family: var(--zh);
    font-style: normal;
    font-size: 16px;
    color: var(--gold-deep);
    font-weight: 600;
}
.lead { margin: 0 0 14px; color: var(--ink-soft); }
.hint { color: var(--ink-soft); font-size: 14px; }
.center { text-align: center; }
.fine { margin: 10px 0 18px; padding-left: 18px; color: var(--ink-soft); font-size: 14px; }
.fine li + li { margin-top: 4px; }

.fields, .grid-2 { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.field .hint, .field .field-error {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}
.field input, .field select, .field textarea {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    color: var(--ink);
    background: #fff;
    border: 1px solid #e4d8c6;
    border-radius: 12px;
    padding: 12px 14px;
    min-height: 48px;
    width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 2px solid var(--gold);
    border-color: transparent;
}
.is-bad { border-color: #c4534a !important; }
.field-error {
    color: var(--danger);
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}
.date-field { margin-top: 14px; max-width: 280px; }
.field .is-bad { color: var(--danger); }
.cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.cal {
    background: #fff;
    border: 1px solid #e4d8c6;
    border-radius: 16px;
    padding: 12px;
}
.cal h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: 28px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow, .cal-day {
    display: grid;
    place-items: center;
    min-height: 36px;
    text-align: center;
}
.cal-dow { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-soft); }
.cal-day {
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #b3a394;
    font: inherit;
    padding: 0;
}
.cal-day[data-date] {
    background: var(--gold-soft);
    color: var(--ink);
    cursor: pointer;
}
.cal-day[data-date]:hover { background: #ead7ae; }
.cal-day.is-on, .cal-day.is-on:hover { background: var(--lacquer); color: #f8efd9; }
.cal-day.is-closed { text-decoration: line-through; }
.cal-day.is-locked, .cal-day[data-date]:disabled {
    background: transparent;
    color: #b3a394;
    cursor: not-allowed;
}

.group { margin-top: 8px; }
.group-head, .poster-row { display: flex; }
.group-head {
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 8px 4px;
}
.group-head h2, .section h2, .order-desk h2, .panel h1, .auth-card h1, .order-head h1 {
    font-family: var(--serif);
    font-weight: 600;
    margin: 0;
}
.group-head h2 { font-size: 28px; }
.group-head span { font-family: var(--zh); color: var(--gold-deep); }
.poster-row { gap: 10px; margin-bottom: 16px; }
.poster-row .poster { flex: 1; }
.poster {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #1c100e;
    border-radius: 16px;
    overflow: hidden;
    cursor: zoom-in;
}
.poster img {
    width: 100%;
    height: 460px;
    object-fit: contain;
    object-position: center top;
    display: block;
    background: #1c100e;
}
.poster-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(248, 239, 217, 0.94);
    color: var(--lacquer-deep);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "info stepper" "info line";
    gap: 2px 16px;
    align-items: center;
    padding: 16px 8px;
    border-top: 1px solid var(--line);
}
.item.is-on {
    background: linear-gradient(90deg, rgba(244, 231, 203, 0.7), transparent 85%);
    border-radius: 14px;
    border-top-color: transparent;
}
.item-info { grid-area: info; }
.item h3 { margin: 0; font-size: 16px; letter-spacing: 0.01em; }
.zh-name { margin: 2px 0 0; font-family: var(--zh); color: var(--gold-deep); }
.detail, .price { margin: 2px 0 0; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.price span, .detail { color: var(--ink-soft); font-weight: 500; font-size: 14px; }
.stepper {
    grid-area: stepper;
    display: flex;
    align-items: center;
    border: 1px solid #e0d2bc;
    border-radius: 999px;
    background: #fff;
}
.stepper button {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--lacquer);
    font-size: 22px;
    line-height: 1;
}
.stepper input {
    width: 48px;
    border: 0;
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: transparent;
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.line-total {
    grid-area: line;
    justify-self: end;
    margin: 0;
    color: var(--gold-deep);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.outlets { display: grid; gap: 10px; }
.outlet { position: relative; display: block; cursor: pointer; }
.outlet input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0.02;
    cursor: pointer;
}
.outlet-body {
    display: grid;
    gap: 2px;
    border: 1px solid #e4d8c6;
    border-radius: 16px;
    padding: 14px 16px;
    background: #fff;
}
.outlet input:checked + .outlet-body {
    border-color: var(--lacquer);
    box-shadow: inset 0 0 0 1px var(--lacquer);
    background: #fff7f3;
}
.outlet input:focus-visible + .outlet-body { outline: 2px solid var(--gold); }
.outlet-zh { font-family: var(--zh); color: var(--gold-deep); }
.outlet-name { font-weight: 700; }
.outlet-wa, .outlet-note { color: var(--ink-soft); font-size: 14px; }
.outlet-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.outlet-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.outlet-list span { display: block; color: var(--ink-soft); }

.bill {
    background: #fff;
    border: 1px solid #eadfcd;
    border-radius: 16px;
    padding: 4px 16px;
}
.bill-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px dashed #eadfcd;
    font-variant-numeric: tabular-nums;
}
.bill-total {
    border-bottom: 0;
    align-items: baseline;
    font-family: var(--serif);
    font-size: 28px;
    padding-top: 12px;
}
.bill-total strong { color: var(--lacquer); font-size: 34px; }
.lines { list-style: none; padding: 0; margin: 0 0 8px; }
.lines li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
}
.lines em { font-style: normal; color: var(--ink-soft); }

.pay-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 18px;
    align-items: start;
    margin-top: 8px;
}
.qr-frame {
    margin: 0;
    background: #fff;
    border: 1px solid #eadfcd;
    border-radius: 18px;
    padding: 12px;
    text-align: center;
}
.qr-frame img, .qr-admin { width: 100%; height: auto; display: block; border-radius: 8px; }
.qr-admin { max-width: 240px; border: 1px solid #eadfcd; margin-bottom: 12px; }
.qr-frame figcaption {
    margin-top: 8px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--gold-deep);
    font-weight: 700;
}
.qr-missing {
    min-height: 210px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 1px dashed var(--gold);
    border-radius: 12px;
    padding: 16px;
    background:
        linear-gradient(#f8f1e4, #f8f1e4) padding-box;
}
.qr-missing p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.pay-amount { margin: 0 0 8px; font-size: 18px; }
.pay-amount strong {
    display: block;
    font-family: var(--serif);
    font-size: 42px;
    color: var(--lacquer);
    line-height: 1;
}
.steps { margin: 0 0 14px; padding-left: 18px; color: var(--ink-soft); }
.upload {
    display: block;
    border: 1.5px dashed #c4a36a;
    border-radius: 16px;
    padding: 16px;
    background: #fffdf8;
    text-align: center;
    cursor: pointer;
}
.upload.is-hot { background: var(--gold-soft); }
.upload-title { display: block; font-weight: 700; }
.upload-hint { display: block; color: var(--ink-soft); font-size: 14px; margin-top: 4px; }
.upload input { margin-top: 10px; max-width: 100%; }
.receipt-preview img {
    margin-top: 12px;
    max-height: 180px;
    border-radius: 10px;
}
.receipt-shot {
    display: block;
    max-width: 360px;
    border-radius: 12px;
    border: 1px solid #eadfcd;
}
.receipt-heading { margin: 22px 0 8px; font-family: var(--serif); font-size: 28px; }

.btn-pay, .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    padding: 12px 18px;
    text-decoration: none;
    font-weight: 700;
}
.btn-pay {
    width: 100%;
    margin-top: 16px;
    border: 0;
    background: linear-gradient(180deg, #8f1d22, #6d1418);
    color: #f8efd9;
    font-size: 17px;
}
.btn-pay:hover { background: #5c1014; }
.btn-ghost {
    width: auto;
    border: 1px solid #e0d2bc;
    background: #fff;
    color: var(--ink);
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.actions .btn-pay, .actions .btn-ghost { width: auto; margin-top: 0; }
.wa-box {
    margin-top: 18px;
    padding: 16px;
    border-radius: 16px;
    background: #f8f3ea;
}
.wa-box .btn-pay { background: #1f6b45; }
.wa-box .btn-pay:hover { background: #174f33; }

.alert, .flash {
    margin: 12px 12px 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff1ee;
    border: 1px solid #e7b2a8;
    color: #6e1518;
}
.flash-ok { background: #eef6f0; border-color: #b7d7c3; color: var(--ok); }
.alert ul { margin: 8px 0 0; padding-left: 18px; }

.dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: #3f0d10;
    color: #f8efd9;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
}
.dock-inner {
    max-width: 920px;
    margin: 0 auto;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.dock-inner span { display: block; color: rgba(248, 239, 217, 0.72); font-size: 13px; }
.dock-total { text-align: right; }
.dock-total strong {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(18, 8, 8, 0.92);
    overflow: auto;
    padding: 64px 12px 32px;
}
.lightbox img {
    display: block;
    max-width: min(920px, 100%);
    height: auto;
    margin: 0 auto;
}
.lightbox-close {
    position: fixed;
    top: 14px;
    right: 14px;
    border: 0;
    border-radius: 999px;
    background: #f8efd9;
    color: var(--lacquer-deep);
    padding: 8px 14px;
    font-weight: 700;
}

.colophon {
    max-width: 920px;
    margin: 0 auto 28px;
    padding: 0 18px;
    color: var(--ink-soft);
    font-size: 14px;
    text-align: center;
}
.colophon p { margin: 4px 0; }

.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }

body.desk { background: #f3eee6; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--lacquer-deep);
    color: #f8efd9;
}
.brand { color: inherit; text-decoration: none; font-weight: 700; }
.brand span { font-family: var(--zh); margin-right: 8px; color: #f0d48a; }
.topnav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.topnav a.scan-btn {
    background: #f0d48a;
    color: #4c0c10;
    border-radius: 999px;
    padding: 8px 14px;
}
.topnav a, .linkish {
    color: #f8efd9;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    font-weight: 600;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 22px 16px 64px; }
.wrap .alert, .wrap .flash { margin: 0 0 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat, .panel, .ticket, .auth-card, .order-desk {
    background: #fff;
    border: 1px solid #eadfcd;
    border-radius: 16px;
}
.stat { padding: 14px; }
.stat span { color: var(--ink-soft); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.stat strong { display: block; font-family: var(--serif); font-size: 36px; line-height: 1; }
.filters {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
    margin: 16px 0;
}
.filters .btn-ghost { margin-bottom: 1px; }
.tickets { display: grid; gap: 10px; }
.ticket {
    display: block;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
}
.ticket header, .order-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.ticket p { margin: 4px 0; color: var(--ink-soft); }
.ticket-total { color: var(--lacquer) !important; font-family: var(--serif); font-size: 28px; }
.pill {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.pill-pending { background: #f8e7c3; color: #6d4c12; }
.pill-confirmed { background: #d9eadf; color: #1d5c38; }
.pill-ready { background: #d7e6f5; color: #1a456e; }
.pill-collected { background: #ece7e1; color: #4d433c; }
.pill-cancelled { background: #f8d6d2; color: #7a1e1e; }
.empty { padding: 20px; color: var(--ink-soft); }
.order-desk, .panel { padding: 18px; margin-bottom: 16px; }
.order-head h1, .panel h1, .auth-card h1 { font-size: 40px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 12px 0 18px; }
.desk-form { display: grid; gap: 12px; margin-top: 12px; }
.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
}
.auth-card { width: min(440px, 100%); padding: 22px; }
.auth-card .btn-pay { margin-top: 4px; }

@media (max-width: 800px) {
    .grid-2, .pay-grid, .split, .stats, .filters, .cal-months { grid-template-columns: 1fr; }
    .hero-inner { align-items: flex-start; }
    .poster img { height: 340px; }
    .facts strong { font-size: 22px; }
    .section-kicker { font-size: 28px; }
    .filters .btn-ghost { width: 100%; }
}
@media (max-width: 560px) {
    .seal { width: 64px; height: 64px; font-size: 13px; }
    .facts span { letter-spacing: 0.02em; font-size: 10px; }
    .facts strong { font-size: 20px; }
    .facts li { padding: 8px; }
    .poster-row { flex-direction: column; }
    .bill-total, .bill-total strong { font-size: 28px; }
    .pay-amount strong { font-size: 36px; }
}

.slip {
    margin-top: 18px;
    padding: 18px 16px 8px;
    border: 1px dashed #8a5a2b;
    background: #fffdf6;
    text-align: center;
}
.slip h2 { margin: 4px 0 8px; font-size: clamp(28px, 4vw, 42px); }
.slip-kicker { letter-spacing: 0.12em; text-transform: uppercase; font-size: 12px; color: #8a5a2b; }
.slip-qr {
    display: flex;
    justify-content: center;
    width: fit-content;
    margin: 8px auto 10px;
    padding: 8px;
    background: #fff;
}
.slip-qr svg, .slip-qr table { display: block; height: auto; }
.slip-note { margin: 0 0 8px; }
.slip-name { margin: 8px 0 0; font-size: 22px; font-weight: 700; }
.slip .lines, .slip .bill, .slip .hint { text-align: left; }
.btn-collect { font-size: 20px; padding: 16px 18px; }
.scan-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow, 0 10px 30px rgba(40, 8, 8, 0.08));
}
.scan-video {
    width: 100%;
    max-height: 62vh;
    margin: 8px 0 12px;
    background: #111;
    border-radius: 14px;
    object-fit: cover;
}

@media print {
    .print-hide, .dock, .topbar, .lightbox { display: none !important; }
    body { background: #fff; padding: 0; }
    .sheet, .order-desk, .panel { box-shadow: none; border: 0; margin: 0; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
