/* Layout: a tour poster up top, then the dates set like ticket stubs; one wine-and-brass palette, dark first. */
:root {
  --bg: #131012; --bg-2: #1a1517; --surface: #211a1d; --line: #3a2f32;
  --fg: #eee6dc; --muted: #a39389; --wine: #8c2f3f; --wine-deep: #5a1c27;
  --brass: #c7a064; --brass-ink: #1b1410; --ok: #8fb08a; --warn: #d8a657; --off: #93857f; --danger: #e08a8a;
  --shadow: 0 30px 80px -30px rgba(0,0,0,.7);
  --f-display: "Cormorant", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 4px; --wrap: 1180px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f1ebe6; --bg-2: #e9e1da; --surface: #faf6f2; --line: #d4c7bd;
    --fg: #241a1c; --muted: #6e5f58; --wine: #7d2434; --wine-deep: #5a1c27;
    --brass: #80571c; --brass-ink: #fbf6ef; --ok: #3d6838; --warn: #80520c; --off: #6f625c; --danger: #b03a3a;
    --shadow: 0 30px 70px -35px rgba(60,30,30,.35);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f1ebe6; --bg-2: #e9e1da; --surface: #faf6f2; --line: #d4c7bd;
  --fg: #241a1c; --muted: #6e5f58; --wine: #7d2434; --wine-deep: #5a1c27;
  --brass: #80571c; --brass-ink: #fbf6ef; --ok: #3d6838; --warn: #80520c; --off: #6f625c; --danger: #b03a3a;
  --shadow: 0 30px 70px -35px rgba(60,30,30,.35);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 84px); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; top: 0; right: 0; left: 0; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; line-height: 1.02; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.lede { color: var(--muted); max-width: 58ch; margin: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid transparent; border-radius: var(--radius); padding: .8rem 1.35rem; font-weight: 600; font-size: .92rem; letter-spacing: .02em; text-decoration: none; transition: background .2s, border-color .2s, color .2s; }
.btn-primary { background: var(--brass); color: var(--brass-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.btn.sm { padding: .45rem .85rem; font-size: .8rem; }
.btn.danger { color: var(--danger); border-color: var(--line); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }

.preview-bar { background: var(--wine-deep); color: #f3e7dc; font-size: .78rem; text-align: center; padding-block: .45rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

header.site { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; }
.logo { font-family: var(--f-display); font-size: 1.6rem; font-weight: 600; letter-spacing: .02em; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.logo em { color: var(--brass); font-style: italic; }
.nav-links { display: flex; gap: 1.8rem; align-items: center; }
.nav-links a { text-decoration: none; font-size: .88rem; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
.nav-actions { display: flex; gap: .6rem; align-items: center; flex: none; }
.my-tix { position: relative; padding: .6rem .9rem; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--wine); color: #fff; font-size: .7rem; display: grid; place-items: center; padding: 0 5px; }
@media (max-width: 900px) { .nav-links { display: none; } }
@media (max-width: 480px) { .nav-actions .btn-primary { display: none; } }

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero canvas { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; }
.hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: min(58%, 760px); height: 100%; max-width: 100%; object-fit: cover; opacity: .9; -webkit-mask-image: linear-gradient(to right, transparent, #000 45%); mask-image: linear-gradient(to right, transparent, #000 45%); }
.hero-inner { position: relative; padding-block: clamp(4rem, 10vw, 8rem) clamp(3rem, 7vw, 5.5rem); display: grid; gap: 2.5rem; }
.hero h1 { font-size: clamp(4rem, 14vw, 12.5rem); font-weight: 500; letter-spacing: -.02em; line-height: .86; overflow-wrap: anywhere; }
.hero h1 span { display: block; }
.hero h1 .it { font-style: italic; color: var(--brass); padding-left: clamp(1.5rem, 9vw, 9rem); }
.hero-meta { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2.5rem; align-items: end; }
.hero-meta p { font-size: 1.08rem; }
.hero-copy { display: grid; gap: 1.6rem; }
.next-show { border: 1px solid var(--line); background: var(--bg); background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 1.25rem 1.4rem; border-radius: var(--radius); display: grid; gap: .9rem; }
.next-show .where { font-family: var(--f-display); font-size: 1.7rem; line-height: 1.1; }
.countdown { display: flex; gap: 1.2rem; font-family: var(--f-mono); }
.countdown div { display: grid; }
.countdown b { font-size: 1.6rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.countdown small { font-size: .65rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.hero-ctas { display: flex; gap: .7rem; flex-wrap: wrap; }
@media (max-width: 760px) { .hero-meta { grid-template-columns: 1fr; } .hero-photo { width: 100%; opacity: .32; -webkit-mask-image: none; mask-image: none; } }

section.block { padding-block: clamp(4rem, 9vw, 7rem); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.section-head > div:first-child { display: grid; gap: .8rem; min-width: 0; }

.filters { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: .45rem 1rem; font-size: .82rem; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.dates { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.date-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 150px 170px; gap: 1.5rem; align-items: center; padding-block: 1.4rem; border-bottom: 1px solid var(--line); transition: background .25s; }
.date-row:hover { background: var(--bg); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--wine) 10%, transparent), transparent); }
.date-block { font-family: var(--f-mono); line-height: 1.15; }
.date-block .d { font-size: 2rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.date-block .m { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.place .city { font-family: var(--f-display); font-size: 1.9rem; line-height: 1.05; }
.place .venue { color: var(--muted); font-size: .9rem; }
.status { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: .5rem; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status.on { color: var(--ok); } .status.few { color: var(--warn); } .status.sold { color: var(--off); }
.from { font-size: .82rem; color: var(--muted); margin-top: .2rem; font-variant-numeric: tabular-nums; }
.date-row .btn { width: 100%; }
.date-row.is-sold .city { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.empty-list { padding: 2.5rem 0; color: var(--muted); border-bottom: 1px solid var(--line); }
@media (max-width: 760px) {
  .date-row { grid-template-columns: 74px minmax(0, 1fr); gap: .4rem 1rem; }
  .date-row .info { grid-column: 2; }
  .date-row .act { grid-column: 1 / -1; margin-top: .6rem; }
  .place .city { font-size: 1.55rem; }
}

.music { background: var(--bg-2); border-block: 1px solid var(--line); }
.records { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.record { display: grid; gap: 1rem; align-content: start; }
.cover { aspect-ratio: 1; max-width: 100%; border-radius: 2px; position: relative; overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.cover canvas, .cover img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.cover .t { position: absolute; left: 1rem; bottom: .9rem; right: 1rem; font-family: var(--f-display); font-style: italic; font-size: 1.6rem; color: #f3e9de; line-height: 1; }
.cover.has-img .t { display: none; }
.record h3 { font-size: 1.6rem; }
.record .meta { font-family: var(--f-mono); font-size: .75rem; color: var(--muted); letter-spacing: .08em; }
.tracks { margin: 0; padding: 0; list-style: none; font-size: .9rem; color: var(--muted); counter-reset: t; }
.tracks li { display: flex; justify-content: space-between; gap: 1rem; padding-block: .3rem; border-bottom: 1px dashed var(--line); counter-increment: t; }
.tracks li::before { content: counter(t, decimal-leading-zero); font-family: var(--f-mono); font-size: .72rem; width: 2.2em; flex: none; padding-top: .15rem; }
.tracks li span:first-of-type { flex: 1; color: var(--fg); min-width: 0; }
.tracks li span:last-child { font-family: var(--f-mono); font-size: .78rem; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .records { grid-template-columns: 1fr; max-width: 460px; } }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about-side { display: grid; gap: 1.6rem; }
.portrait { width: 100%; max-width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; box-shadow: var(--shadow); display: block; }
.pull { font-family: var(--f-display); font-style: italic; font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.15; margin: 0; }
.pull cite { display: block; margin-top: 1rem; font-family: var(--f-mono); font-style: normal; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.bio { display: grid; gap: 1.1rem; color: var(--muted); max-width: 62ch; }
.bio p { margin: 0; }
.about-main { display: grid; gap: 1.6rem; min-width: 0; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.4rem; margin-top: .6rem; }
.facts b { display: block; font-family: var(--f-display); font-size: 2.2rem; font-weight: 500; color: var(--fg); line-height: 1; }
.facts span { font-size: .8rem; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .portrait { max-width: 420px; } }

.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(2rem, 6vw, 6rem); }
details { border-bottom: 1px solid var(--line); }
details:first-child { border-top: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding-block: 1.15rem; display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--f-mono); color: var(--brass); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 1.2rem; color: var(--muted); max-width: 62ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

footer.site { border-top: 1px solid var(--line); padding-block: 3rem 2.5rem; color: var(--muted); font-size: .88rem; }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 2rem; }
.foot h4 { margin: 0 0 .7rem; font-family: var(--f-mono); font-weight: 500; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fg); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--brass); }
.foot .copy { user-select: all; color: var(--fg); overflow-wrap: anywhere; }
.legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .78rem; }
.legal button { background: none; border: 0; padding: 0; color: var(--brass); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; } }

/* Ticket drawer */
.scrim { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(8,5,6,.62); z-index: 40; opacity: 0; transition: opacity .25s; }
.scrim.show { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(520px, 100%); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.7,.2,1); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); }
.drawer.show { transform: none; }
.drawer-head { padding: 1.4rem 1.6rem 1.1rem; border-bottom: 1px solid var(--line); display: grid; gap: .3rem; position: relative; }
.drawer-head h3 { font-size: 2rem; padding-right: 2.5rem; }
.drawer-head .sub { color: var(--muted); font-size: .88rem; }
.x { position: absolute; top: 1.1rem; right: 1.1rem; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: transparent; font-size: 1.1rem; }
.x:hover { border-color: var(--brass); color: var(--brass); }
.steps { display: flex; gap: .4rem; margin-top: .8rem; }
.steps i { height: 3px; flex: 1; background: var(--line); border-radius: 2px; }
.steps i.on { background: var(--brass); }
.drawer-body { flex: 1; overflow-y: auto; padding: 1.4rem 1.6rem; display: grid; gap: 1rem; align-content: start; grid-auto-rows: max-content; }
.drawer-foot { border-top: 1px solid var(--line); padding: 1.1rem 1.6rem 1.3rem; display: grid; gap: .8rem; }
.total { display: flex; justify-content: space-between; align-items: baseline; }
.total b { font-family: var(--f-display); font-size: 1.9rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.note { font-size: .78rem; color: var(--muted); margin: 0; }
.tier { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem 1rem; align-items: center; transition: border-color .2s; }
.tier.picked { border-color: var(--brass); }
.tier h4 { margin: 0; font-size: 1rem; }
.tier .price { font-family: var(--f-mono); font-variant-numeric: tabular-nums; color: var(--brass); }
.tier p { margin: 0; grid-column: 1 / -1; font-size: .83rem; color: var(--muted); }
.tier .left { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--warn); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); }
.stepper button { width: 34px; height: 34px; background: transparent; border: 0; font-size: 1.1rem; }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper output { min-width: 28px; text-align: center; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.tier-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: .5rem; gap: 1rem; }

.field { display: grid; gap: .35rem; min-width: 0; }
.field label, .flabel { font-size: .8rem; font-weight: 600; }
.field input, .field textarea, .field select { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .85rem; color: var(--fg); font: inherit; width: 100%; min-width: 0; }
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brass); }
.field .err { color: var(--danger); font-size: .76rem; min-height: 1em; }
.hint { font-size: .74rem; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 440px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .84rem; color: var(--muted); }
.check input { margin-top: .25rem; accent-color: var(--brass); }
.summary { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; font-size: .88rem; display: grid; gap: .35rem; }
.summary div { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.summary .muted { color: var(--muted); }

.stub { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; display: grid; grid-template-columns: minmax(0, 1fr) 116px; overflow: hidden; }
.stub-main { padding: 1.1rem 1.2rem; display: grid; gap: .5rem; border-right: 2px dashed var(--line); min-width: 0; }
.stub-main::before, .stub-main::after { content: ""; position: absolute; right: 107px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); }
.stub-main::before { top: -10px; } .stub-main::after { bottom: -10px; }
.stub .artist { font-family: var(--f-display); font-size: 1.5rem; line-height: 1; }
.stub .artist em { color: var(--brass); }
.stub dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .8rem; margin: 0; }
.stub dt { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stub dd { margin: 0; font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.stub-side { padding: .9rem; display: grid; gap: .5rem; justify-items: center; align-content: center; background: var(--bg-2); }
.stub-side canvas { width: 86px; height: 86px; image-rendering: pixelated; border-radius: 2px; }
.stub-side code { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; text-align: center; overflow-wrap: anywhere; }
.done-mark { display: flex; gap: .8rem; align-items: center; }
.done-mark > span { width: 40px; height: 40px; border-radius: 50%; background: var(--ok); color: var(--bg); display: grid; place-items: center; font-weight: 700; flex: none; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; display: grid; gap: 1rem; justify-items: center; }

.toast { position: fixed; left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--fg); color: var(--bg); padding: .7rem 1.2rem; border-radius: var(--radius); font-size: .88rem; opacity: 0; transition: opacity .25s, transform .25s; z-index: 90; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Site editor (admin) */
.admin { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: 1rem; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.admin-bar h2 { font-size: 1.9rem; }
.admin-title { display: grid; gap: .15rem; min-width: 0; }
.admin-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.dirty { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: .45rem; }
.dirty::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.dirty.on { color: var(--warn); }
.dirty.on::before { background: var(--warn); }
.admin-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.admin-tabs { border-right: 1px solid var(--line); padding: 1.2rem; display: grid; gap: .25rem; align-content: start; padding-left: max(1.2rem, env(safe-area-inset-left, 0px)); }
.admin-tabs button { text-align: left; background: transparent; border: 0; padding: .7rem .9rem; border-radius: var(--radius); color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.admin-tabs button:hover { color: var(--fg); }
.admin-tabs button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: inset 2px 0 0 var(--brass); }
.admin-panel { overflow-y: auto; padding-block: 2rem 5rem; padding-left: clamp(20px, 4vw, 3rem); padding-right: max(clamp(20px, 4vw, 3rem), env(safe-area-inset-right, 0px)); }
.admin-inner { max-width: 860px; display: grid; gap: 1.4rem; }
.admin-inner > header { display: grid; gap: .4rem; }
.admin-inner > header h3 { font-size: 2.2rem; }
.ed-card { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 1.3rem; display: grid; gap: 1rem; }
.ed-card > .ed-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ed-card h4 { margin: 0; font-family: var(--f-display); font-size: 1.45rem; font-weight: 500; }
.ed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; }
.ed-grid .wide { grid-column: 1 / -1; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; padding-top: .9rem; border-top: 1px dashed var(--line); }
.money-in { position: relative; }
.money-in span { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-family: var(--f-mono); font-size: .85rem; pointer-events: none; }
.money-in input { padding-left: 2.6rem; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.img-field { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.img-thumb { width: 132px; aspect-ratio: 1; max-width: 100%; border: 1px dashed var(--line); border-radius: 4px; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: .75rem; text-align: center; padding: .4rem; flex: none; }
.img-thumb.wide { aspect-ratio: 16 / 10; width: 200px; }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; margin: -.4rem; width: calc(100% + .8rem); height: calc(100% + .8rem); }
.img-actions { display: grid; gap: .5rem; justify-items: start; min-width: 0; }
.link-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: .6rem; align-items: end; }
@media (max-width: 560px) { .link-row { grid-template-columns: 1fr; } }
.ed-errors { border: 1px solid var(--line); border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent); background: var(--bg); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--fg); border-radius: 6px; padding: 1rem 1.2rem; font-size: .88rem; }
.ed-errors ul { margin: .4rem 0 0; padding-left: 1.2rem; }
@media (max-width: 760px) {
  .admin-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .admin-tabs { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: .6rem max(16px, env(safe-area-inset-left, 0px)); }
  .admin-tabs button[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--brass); }
  .admin-bar { padding-block: .7rem; gap: .6rem; }
  .admin-bar h2 { font-size: 1.4rem; }
  .hide-sm { display: none; }
  .admin-actions { width: 100%; gap: .4rem; }
  .admin-actions .dirty { flex-basis: 100%; }
  .admin-actions .btn { white-space: nowrap; }
  .admin-actions .btn.sm { padding: .45rem .7rem; }
  .admin-panel { padding-block: 1.4rem 4rem; }
  .admin-inner > header h3 { font-size: 1.8rem; }
}
.preview-banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 75; background: var(--fg); color: var(--bg); border-radius: 999px; padding: .5rem .5rem .5rem 1.2rem; display: flex; gap: .8rem; align-items: center; box-shadow: var(--shadow); font-size: .85rem; max-width: calc(100% - 32px); flex-wrap: wrap; justify-content: center; }
.preview-banner .btn { border-radius: 999px; padding: .5rem 1rem; font-size: .8rem; }
.preview-banner .btn-ghost { border-color: var(--line); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }

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

/* ---- Real-site additions ---- */
html.is-loading .site-shell { opacity: 0; }
.site-shell { transition: opacity .35s ease; }
.boot { position: fixed; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-items: center; pointer-events: none; z-index: 5; }
.boot span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brass); animation: spin .8s linear infinite; }
html:not(.is-loading) .boot { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-error { border: 1px solid var(--line); border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent); background: var(--bg); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--fg); border-radius: var(--radius); padding: .8rem 1rem; font-size: .86rem; }
.pill { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.pill.reserved { color: var(--brass); } .pill.collected { color: var(--ok); } .pill.cancelled { color: var(--off); }
.stub.is-cancelled { opacity: .6; }
.find-box { border-top: 1px solid var(--line); padding-top: 1rem; display: grid; gap: .7rem; }
.find-box h4 { margin: 0; font-size: .95rem; }

/* Admin as its own page */
.admin.page { position: relative; top: auto; right: auto; bottom: auto; left: auto; min-height: 100vh; z-index: auto; }
.admin.page .admin-panel { overflow: visible; }
.admin.page .admin-main { align-items: start; }
.admin.page .admin-tabs { position: sticky; top: 0; }
.admin-who { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.signin { min-height: 100vh; display: grid; place-items: center; padding-block: 3rem; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.signin-card { width: min(440px, 100%); border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 2rem; display: grid; gap: 1.2rem; box-shadow: var(--shadow); }
.signin-card h1 { font-size: 2.4rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.stat { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 1rem 1.1rem; display: grid; gap: .2rem; }
.stat b { font-family: var(--f-display); font-size: 2rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .78rem; color: var(--muted); }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; }
.toolbar .field { flex: 1 1 180px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
table.res { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 860px; }
table.res th { text-align: left; font-family: var(--f-mono); font-weight: 500; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: .75rem .9rem; border-bottom: 1px solid var(--line); background: var(--bg-2); position: sticky; top: 0; }
table.res td { padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.res tr:last-child td { border-bottom: 0; }
table.res td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.res code { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .04em; }
table.res .sub { color: var(--muted); font-size: .78rem; }
table.res .acts { display: flex; gap: .4rem; flex-wrap: wrap; }
.show-table td, .show-table th { white-space: nowrap; }
.admin-list { display: grid; gap: .5rem; }
.admin-list > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
.saved-note { font-size: .78rem; color: var(--muted); }
.admin-panel, .admin-inner, .admin-inner > *, .toolbar .field { min-width: 0; }
@media (max-width: 760px) { .admin.page .admin-tabs { position: sticky; top: 0; z-index: 5; background: var(--bg); } }
table.res code, table.res .acts .btn { white-space: nowrap; }

/* Customer service chat */
.chat-safety { font-size: .78rem; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: .6rem .8rem; }
.chat-list { display: grid; gap: .7rem; align-content: start; }
.msg { max-width: 85%; display: grid; gap: .2rem; }
.msg .who { font-size: .68rem; color: var(--muted); font-family: var(--f-mono); letter-spacing: .04em; }
.msg .text { padding: .65rem .85rem; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.5; }
.msg.me { justify-self: end; text-align: right; }
.msg.me .text { background: var(--brass); color: var(--brass-ink); border-bottom-right-radius: 3px; text-align: left; }
.msg.team { justify-self: start; }
.msg.team .text { background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.msg.system { justify-self: center; max-width: 95%; text-align: center; font-size: .78rem; color: var(--muted); background: var(--bg-2); border-radius: 999px; padding: .45rem .9rem; }
.chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: end; }
.chat-form textarea { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .65rem .8rem; color: var(--fg); font: inherit; resize: none; min-height: 46px; max-height: 160px; width: 100%; }
.chat-form textarea:focus { outline: none; border-color: var(--brass); }
.pill.paid { color: var(--ok); }
/* Admin inbox */
.inbox { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.convos { display: grid; gap: .4rem; max-height: 70vh; overflow-y: auto; }
.convo { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: .75rem .9rem; display: grid; gap: .2rem; width: 100%; }
.convo[aria-current="true"] { border-color: var(--brass); box-shadow: inset 3px 0 0 var(--brass); }
.convo .top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.convo .prev { color: var(--muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo.unread strong::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--wine); margin-left: .45rem; vertical-align: middle; }
.thread { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: 75vh; min-height: 420px; }
.thread-head { padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; align-items: center; }
.thread-body { overflow-y: auto; padding: 1rem 1.1rem; }
.thread-foot { border-top: 1px solid var(--line); padding: .8rem 1.1rem; display: grid; gap: .5rem; }
.tab-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--wine); color: #fff; font-size: .7rem; margin-left: .4rem; padding: 0 5px; }
@media (max-width: 860px) { .inbox { grid-template-columns: 1fr; } .convos { max-height: 40vh; } }

/* Colour themes chosen in the admin (dark values first, then light) */
html[data-palette="midnight"] { --wine: #2c4770; --wine-deep: #1b2c47; --brass: #b7c3d8; }
html[data-palette="forest"] { --wine: #2f5a46; --wine-deep: #1c3a2c; --brass: #d3b46a; }
html[data-palette="plum"] { --wine: #6b2f5e; --wine-deep: #45193c; --brass: #e2a7b8; }
html[data-palette="ember"] { --wine: #8a3b1f; --wine-deep: #5a2412; --brass: #e39a6a; }
@media (prefers-color-scheme: light) {
  html[data-palette="midnight"]:not([data-theme="dark"]) { --brass: #3d5277; }
  html[data-palette="forest"]:not([data-theme="dark"]) { --brass: #6b5412; }
  html[data-palette="plum"]:not([data-theme="dark"]) { --brass: #8b3a56; }
  html[data-palette="ember"]:not([data-theme="dark"]) { --brass: #9a4517; }
}
html[data-palette="midnight"][data-theme="light"] { --brass: #3d5277; }
html[data-palette="forest"][data-theme="light"] { --brass: #6b5412; }
html[data-palette="plum"][data-theme="light"] { --brass: #8b3a56; }
html[data-palette="ember"][data-theme="light"] { --brass: #9a4517; }
.swatches { display: flex; gap: .6rem; flex-wrap: wrap; }
.swatch { display: flex; align-items: center; gap: .55rem; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: .4rem .9rem .4rem .45rem; font-size: .84rem; }
.swatch i { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.swatch[aria-pressed="true"] { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.faq-ed { display: grid; gap: .7rem; padding: 1rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.faq-ed .row-acts { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Older phones without aspect-ratio support */
@supports not (aspect-ratio: 1 / 1) {
  .cover { height: 0; padding-top: 100%; }
  .portrait { height: auto; }
  .img-thumb { height: 132px; }
  .img-thumb.wide { height: 125px; }
}
/* Never let text inputs trigger iPhone auto-zoom (needs 16px+) */
input, select, textarea { font-size: max(16px, 1em); }
/* Comfortable tap targets on touch screens */
@media (pointer: coarse) { .stepper button { width: 44px; height: 44px; } .chip { padding: .6rem 1.1rem; } }
/* Very narrow phones (e.g. Galaxy Fold, iPhone SE 1st gen) */
@media (max-width: 360px) {
  .nav-actions .my-tix { padding: .5rem .6rem; font-size: .82rem; }
  .logo { font-size: 1.35rem; }
  .stub { grid-template-columns: minmax(0, 1fr) 92px; }
  .stub-main::before, .stub-main::after { right: 83px; }
  .stub-side canvas { width: 70px; height: 70px; }
  .drawer-head, .drawer-body, .drawer-foot { padding-left: 1.1rem; padding-right: 1.1rem; }
  .countdown { gap: .8rem; }
  .facts b { font-size: 1.8rem; }
}
.drawer-head .eyebrow, .drawer-head .sub { padding-right: 2.8rem; }
