/* Tango-Ticket – shop and back office
 *
 * Design system shared with tango-kalender.de (decision E16): white paper, dark bars (#1d1d1d),
 * dates, times and prices in Bodoni Moda like a milonga poster, everything else in Source Sans 3,
 * fonts from our own server. The accent colour belongs to the organizer / festival (set inline in
 * base.html), so nothing below assumes a particular brand. The programme reads like a dance card;
 * milongas are dark "night" rows. The back office (.backoffice) uses the Kalender's editorial look:
 * white boxes with round corners and a soft shadow.
 */

@font-face { font-family: "Bodoni Moda"; font-weight: 500; font-display: swap; src: url("../fonts/bodoni-moda-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-weight: 600; font-display: swap; src: url("../fonts/bodoni-moda-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-weight: 700; font-display: swap; src: url("../fonts/bodoni-moda-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-3-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap; src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-display: swap; src: url("../fonts/source-sans-3-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); }

[hidden] { display: none !important; }

/* ---------------------------------------------------------------- tokens (as tango-kalender.de) */

:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #333333;
  --text: #444444;
  --muted: #767676;
  --line: #e5e5e5;
  --soft: #f2f2f2;
  --dark: #1d1d1d;
  --dark-2: #262626;
  --accent: #d81608;        /* organizer / festival colour, set in base.html */
  --accent-deep: color-mix(in srgb, var(--accent) 78%, black);
  --gold: #b07d2b;          /* second festival colour: passes, free tickets */
  --ok: #2f6b3a;
  --warn: #7a5a00;
  --bad: #b3261e;
  --display: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 3px;
  --box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .05);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}

* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 17px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0 0 .4em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: 1.5rem; margin-top: 2rem; }
h3 { font-size: 1.2rem; }
p, ul, ol { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: var(--gutter); padding-right: max(16px, env(safe-area-inset-right, 0px)); width: 100%; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.lead { font-size: 1.15rem; max-width: 70ch; }
.num, .price { font-family: var(--display); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }

/* ---------------------------------------------------------------- header and footer */

.site-header { background: var(--dark); border-bottom: 3px solid var(--accent); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: #fff; text-transform: uppercase; letter-spacing: .14em; text-decoration: none; padding: 16px 0; margin-right: 8px; }
.brand:hover { color: var(--accent); }
.main-nav { display: flex; flex-wrap: wrap; flex: 1; align-items: center; }
.main-nav a { color: rgba(255, 255, 255, .55); text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; font-weight: 600; padding: 20px 14px; position: relative; }
.main-nav a + a::before { content: "/"; position: absolute; left: -4px; color: #555; }
.main-nav a[aria-current="page"], .main-nav a:hover { color: #fff; }
.header-actions { display: flex; gap: 14px; align-items: center; padding-block: 10px; flex-wrap: wrap; }
.lang-switch { display: flex; gap: 2px; }
.lang-switch a { font: 600 .76rem var(--sans); letter-spacing: .08em; text-decoration: none; border: 1px solid transparent; color: rgba(255, 255, 255, .55); padding: 3px 6px; border-radius: var(--radius); }
.lang-switch a:hover { color: #fff; }
.lang-switch a[aria-current="true"] { color: #fff; border-color: #555; }
.nav-account { color: rgba(255, 255, 255, .7); font-size: .85rem; font-weight: 600; text-decoration: none; }
.nav-account:hover { color: #fff; }
form.inline { display: inline; margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--accent); text-decoration: underline; }
.site-header .linklike.nav-account { color: rgba(255, 255, 255, .7); text-decoration: none; font-size: .85rem; font-weight: 600; }
.site-header .linklike.nav-account:hover { color: #fff; }
.cartlink { display: inline-flex; align-items: center; gap: 8px; }
.badge-count { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem; border-radius: 999px; background: #fff; color: var(--accent); font-size: .78rem; font-weight: 700; line-height: 1; }
@media (max-width: 900px) {
  .main-nav { width: 100%; flex: none; order: 3; }
  .main-nav a { padding: 12px 12px; }
  .main-nav a:first-child { padding-left: 0; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 520px) {
  .main-nav a { padding: 10px 9px; letter-spacing: .05em; }
  .header-actions { width: 100%; justify-content: space-between; margin-left: 0; padding-top: 0; }
}

main.wrap { padding-block: 28px 64px; }

.site-footer { border-top: 1px solid var(--line); padding-block: 22px 32px; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* ---------------------------------------------------------------- buttons, forms, notices */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 .95rem var(--sans); text-decoration: none; padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.secondary:hover { background: var(--soft); color: var(--accent-deep); }
.btn.dark { background: var(--dark); border-color: var(--dark); }
.btn.dark:hover { background: #000; border-color: #000; }
.btn.small { padding: 4px 12px; font-size: .86rem; }
.btn.large { padding: 11px 22px; font-size: 1.05rem; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 1.25rem 0; }

label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date],
input[type=datetime-local], input[type=time], input[type=url], input[type=tel], input[type=file], select, textarea {
  font: inherit; font-size: .98rem; padding: 8px 10px; border: 1px solid #cfcfcf; border-radius: var(--radius);
  background: #fff; color: var(--ink); width: 100%; min-width: 0;
}
select { width: auto; max-width: 100%; }
textarea { min-height: 8em; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); vertical-align: -.15rem; margin: 0 8px 0 0; }
label:has(> input[type=checkbox]) { font-weight: 400; display: flex; align-items: flex-start; gap: 2px; }
.form { max-width: 44rem; }
.form p { margin: 0 0 14px; }
.form .two, .grid-2 { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
legend { font-family: var(--display); font-size: 1.2rem; font-weight: 600; color: var(--ink); margin-bottom: 10px; padding: 0; }
ul.errorlist { color: var(--accent); list-style: none; padding: 0; margin: 4px 0 0; font-size: .88rem; font-weight: 600; }
.helptext { color: var(--muted); font-size: .84rem; display: block; margin-top: 3px; }
form.stack { max-width: 44rem; }
form.stack p { margin: 0 0 14px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack > * + * { margin-top: .9rem; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.messages { list-style: none; padding: 0; margin: 0 0 18px; }
.messages li, .alert { padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--soft); margin-bottom: 8px; }
.messages li.success, .alert.success { background: #eef7ee; border-color: #b9dcb9; }
.messages li.error, .alert.error { background: #fdecea; border-color: #f2b8b3; }
.messages li.warning, .messages li.info, .alert.info, .hint { background: #fff8e1; border-color: #f0dc9a; }
.hint { border: 1px solid #f0dc9a; border-radius: var(--radius); padding: 10px 14px; margin: 14px 0; max-width: 70ch; }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 14px; }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); vertical-align: .1rem; }
.badge.ok, .badge.status-published, .badge.status-paid { background: #e6f4e6; color: var(--ok); }
.badge.warn, .badge.status-pending, .badge.status-draft { background: #fff3cd; color: var(--warn); }
.badge.bad, .badge.status-cancelled, .badge.status-refunded { background: #fdecea; color: var(--bad); }
.badge.gold { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.badge.ai { background: #eef1fb; color: #3a4a8c; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); vertical-align: .1rem; }
.pill.gold { background: transparent; border: 1px solid var(--gold); color: var(--gold); }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: .96rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); padding: 6px 8px; font-weight: 600; }
td.r, th.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
tr.free td { color: var(--muted); }
.qr svg { width: 9rem; height: 9rem; background: #fff; padding: .4rem; border-radius: var(--radius); }

/* ---------------------------------------------------------------- availability lights */

.avail { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.avail::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--ok); }
.avail.red::before { background: var(--accent); }
.avail.soldout::before { background: transparent; border: 1.5px solid var(--muted); }
.avail.soldout { text-decoration: line-through; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 6px; }
.light { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--ok); margin: 0 .3rem 0 .6rem; }
.light.red { background: var(--accent); } .light.soldout { background: var(--muted); }

/* ---------------------------------------------------------------- festival list (home) */

.festivals { list-style: none; padding: 0; margin: 10px 0 0; }
.festivals li { border-bottom: 1px solid var(--line); }
.festivals a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 18px; padding: 18px 0; color: inherit; text-decoration: none; align-items: start; }
.festivals .date-block { grid-row: span 3; }
.festivals .name { font-family: var(--display); font-size: 1.6rem; font-weight: 600; color: var(--ink); line-height: 1.15; }
.festivals a:hover .name { color: var(--accent); }
.festivals .when { color: var(--muted); }
.festivals .tagline { color: var(--text); }
.past-festivals { margin-top: 2.5rem; }
.festivals.past a { padding: 12px 0; }
.festivals.past .name { font-size: 1.2rem; color: var(--muted); }
.festivals.past .tagline { display: none; }

/* date block as on the Kalender: weekday small, day large in the accent colour, month small */
.date-block { text-align: center; line-height: 1; padding-top: 2px; }
.date-block .dow { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.date-block .day { display: block; font-family: var(--display); font-weight: 700; font-size: 2.5rem; color: var(--accent); margin: 3px 0 2px; font-variant-numeric: lining-nums; }
.date-block .mon { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }

/* ---------------------------------------------------------------- edition page */

.edition-hero { padding-bottom: 6px; }
.edition-hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin-bottom: 8px; }
.edition-meta { display: flex; flex-wrap: wrap; gap: 2px 18px; align-items: baseline; margin-bottom: 12px; font-size: 1.05rem; }
.edition-meta .dates { font-family: var(--display); font-weight: 600; font-size: 1.35rem; color: var(--accent); }
.edition-meta .place { color: var(--muted); }

.section-heading { font-family: var(--display); font-size: 1.35rem; font-weight: 600; margin: 30px 0 4px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); color: var(--ink); }
.programme-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 6px 24px; margin: 30px 0 4px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.programme-head h2 { margin: 0; font-size: 1.35rem; }
.programme-head .legend { margin: 0; }

.passes { list-style: none; padding: 0; margin: 0; }
.pass { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 16px 0 16px 14px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--gold); }
.pass .name { font-family: var(--display); font-size: 1.2rem; font-weight: 600; color: var(--ink); }
.pass .includes { color: var(--muted); font-size: .94rem; margin: 2px 0 0; }
@media (max-width: 700px) { .pass { grid-template-columns: 1fr; } }

/* the dance card */
.day-heading { display: flex; align-items: baseline; gap: 10px; font-family: var(--display); font-size: 1.35rem; font-weight: 600; margin: 30px 0 0; padding-bottom: 6px; border-bottom: 2px solid var(--ink); color: var(--ink); }
.day-heading .daynum { font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1; font-variant-numeric: lining-nums; }
.day-heading small { font-family: var(--sans); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.slots { list-style: none; padding: 0; margin: 0; }
.slot { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 4px 18px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.slot-time { text-align: center; line-height: 1; padding-top: 2px; }
.slot-time .from { display: block; font-family: var(--display); font-weight: 700; font-size: 1.55rem; color: var(--accent); font-variant-numeric: lining-nums tabular-nums; }
.slot-time .until { display: block; font-size: .78rem; letter-spacing: .06em; color: var(--muted); margin-top: 5px; }
.kind { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.slot-title { font-family: var(--display); font-size: 1.28rem; font-weight: 600; line-height: 1.2; color: var(--ink); text-decoration: none; }
a.slot-title:hover { color: var(--accent); }
.slot-meta { font-size: .94rem; color: var(--muted); margin: 3px 0 0; }
.slot-meta a { color: inherit; }
.slot-teaser { margin: 6px 0 0; font-size: .96rem; max-width: 70ch; }
.slot-avail { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 8px; }
.slot-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 15rem; }
.slot-buy form { margin: 0; }
.slot.is-cancelled .slot-title { text-decoration: line-through; text-decoration-color: var(--accent); }
.slot.is-cancelled { opacity: .7; }
@media (max-width: 800px) {
  .slot { grid-template-columns: 58px minmax(0, 1fr); gap: 4px 12px; }
  .slot-buy { grid-column: 2; align-items: flex-start; min-width: 0; margin-top: 8px; }
  .slot-time .from { font-size: 1.3rem; }
}

/* milongas are the nights: the Kalender's dark bars, inverted */
.slot.night { background: var(--dark); color: rgba(255, 255, 255, .78); border-bottom: 0; border-radius: var(--radius); padding-inline: 12px; margin: 6px 0; }
.slot.night .slot-title { color: #fff; }
.slot.night a.slot-title:hover { color: #fff; text-decoration: underline; }
.slot.night .kind { color: var(--gold); }
.slot.night .slot-time .from { color: #fff; }
.slot.night .slot-meta, .slot.night .until, .slot.night .avail { color: rgba(255, 255, 255, .55); }
.slot.night .price { color: #fff; }
.slot.night .btn { background: #fff; color: var(--dark); border-color: #fff; }
.slot.night .btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.slot.night .btn.secondary { background: transparent; color: #fff; }
.slot.night select { background: var(--dark-2); color: #fff; border-color: #444; }

.buy { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; margin: 0; }
.buy .price { font-size: 1.4rem; color: var(--ink); margin-right: 4px; }
.buy select { font-size: .9rem; padding: 5px 8px; }
@media (max-width: 800px) { .buy { justify-content: flex-start; } }

/* ---------------------------------------------------------------- event page */

.back { display: inline-block; margin-bottom: 14px; font-size: .92rem; }
.event-head { margin-bottom: 18px; }
.event-when { font-family: var(--display); font-size: 1.25rem; margin: 0 0 4px; color: var(--accent); }
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.aside-card h3 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-family: var(--sans); color: var(--muted); margin-bottom: 8px; }
.aside-card .buy { justify-content: flex-start; }
.aside-card .buy .price { font-size: 1.9rem; width: 100%; }
@media (max-width: 800px) { .event-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- cart and checkout */

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
@media (max-width: 860px) { .checkout-layout { grid-template-columns: minmax(0, 1fr); } }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; position: sticky; top: 16px; }
.summary h2 { margin-top: 0; font-size: 1.2rem; }
.summary .line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.summary .line.sub { border-bottom: 0; padding: 1px 0 1px 12px; font-size: .86rem; color: var(--muted); border-left: 2px solid var(--gold); margin-left: 2px; }
.summary .line.sub + .line:not(.sub) { border-top: 1px solid var(--line); margin-top: 6px; }
.summary .line.total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 10px; font-weight: 700; color: var(--ink); align-items: baseline; }
.summary .line.total .price { font-size: 1.6rem; }
.cart-items { list-style: none; padding: 0; margin: 0 0 18px; border-top: 2px solid var(--ink); }
.cart-item { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item .what { flex: 1 1 16rem; font-weight: 600; color: var(--ink); }
.cart-item input[type=number] { width: 4.5rem; }
.choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.choice { display: flex !important; align-items: center; gap: 2px; margin: 0; font-weight: 600; padding: 12px 14px; border: 1px solid #cfcfcf; border-radius: var(--radius); cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.toast:empty { display: none; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 10; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: var(--radius); background: var(--dark); color: #fff; box-shadow: 0 8px 30px rgb(0 0 0 / .25); font-weight: 600; animation: toast 4.5s forwards; }
.toast a { color: #fff; margin-left: 12px; }
.toast.is-error { background: var(--bad); animation-duration: 7s; }
@keyframes toast { 0% { opacity: 0; translate: 0 8px; } 6%, 85% { opacity: 1; translate: 0 0; } 100% { opacity: 0; visibility: hidden; } }

/* ---------------------------------------------------------------- price page */

.tiers { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 10px 0 18px; max-width: 42rem; }
.tier { flex: 1 1 8rem; padding: 12px 14px; border-right: 1px solid var(--line); }
.tier:last-child { border-right: 0; }
.tier .num { font-size: 1.6rem; display: block; color: var(--accent); }

/* ---------------------------------------------------------------- area navigation */

.subnav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 20px; padding-bottom: 8px; font-size: .92rem; }
.subnav a { text-decoration: none; color: var(--muted); font-weight: 600; padding-bottom: 2px; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--accent); }
.subnav .end { margin-left: auto; }
.subnav select { font-size: .88rem; padding: 4px 8px; }

/* ================================================================ back office (as /redaktion/) */

.backoffice { --radius: 12px; padding-bottom: 40px; }
.backoffice h1 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
.backoffice h2 { font-size: 1.15rem; margin: 26px 0 10px; }
.backoffice input, .backoffice select, .backoffice textarea, .backoffice .btn { border-radius: 8px; }
.backoffice .card, .backoffice .panel, .backoffice .box { background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--box-shadow); padding: 18px 20px; margin-bottom: 16px; }
.backoffice table:not(.plain-table) { background: var(--surface); border-radius: var(--radius); box-shadow: var(--box-shadow); overflow: hidden; border-collapse: separate; border-spacing: 0; }
.backoffice table:not(.plain-table) thead th { padding: 10px 12px; background: var(--surface); }
.backoffice table:not(.plain-table) td { padding: 11px 12px; }
.backoffice table:not(.plain-table) tbody tr:last-child td { border-bottom: 0; }
.backoffice table:not(.plain-table) tbody tr:hover { background: #fdf6f5; }
.backoffice .subnav { margin-bottom: 22px; }

.bo-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin-bottom: 6px; }
.bo-head h1 { margin: 0; }
.bo-crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 6px; }
.bo-crumbs a { color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 14px 0 6px; }
.stat { display: block; background: var(--surface); border: 1px solid transparent; border-radius: var(--radius); box-shadow: var(--box-shadow); padding: 14px 16px; color: var(--muted); text-decoration: none; font-size: .9rem; }
.stat strong { display: block; font-size: 1.9rem; color: var(--ink); font-family: var(--display); line-height: 1.1; font-variant-numeric: lining-nums; }
.stat.attention { border-color: var(--accent); }
.stat.attention strong { color: var(--accent); }
a.stat:hover { border-color: var(--line); color: var(--ink); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 10px 0 14px; }
.toolbar input[type=search] { width: auto; min-width: min(320px, 100%); }
.toolbar.box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--box-shadow); padding: 12px 14px; }

/* edit pages: form on the left, help and assistants on the right */
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.edit-grid > .edit-main > form, .edit-aside > .box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--box-shadow); padding: 18px 20px; }
.edit-aside { position: sticky; top: 16px; display: grid; gap: 14px; }
.edit-aside h3 { font-family: var(--sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
@media (max-width: 900px) { .edit-grid { grid-template-columns: 1fr; } .edit-aside { position: static; } }
.form-section { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.form-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section > h2 { margin: 0 0 12px; font-size: 1.1rem; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 2px; border-top: 1px solid var(--line); margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; z-index: 2; }

/* two languages side by side */
.lang-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lang-pair > div { min-width: 0; }
.lang-pair .lang-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
@media (max-width: 700px) { .lang-pair { grid-template-columns: 1fr; } }
.field { margin-bottom: 12px; }
.field > label { margin-bottom: 4px; }
.field .help { font-size: .84rem; color: var(--muted); margin: 3px 0 0; }
.machine-draft { outline: 2px dashed #9aa6d6; outline-offset: 1px; }

/* checklist before publishing */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before { content: ""; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; background: var(--ok); }
.checklist li.problem::before { background: var(--accent); }
.checklist li.warning::before { background: #e0a800; }
.checklist li.info::before { background: #9aa6d6; }
.checklist .what { color: var(--ink); }
.checklist .detail { display: block; font-size: .88rem; color: var(--muted); }

/* programme editor: the dance card with edit handles */
.bo-day { margin-top: 22px; }
.bo-day h2 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.bo-day h2 .daynum { font-size: 1.8rem; color: var(--accent); font-variant-numeric: lining-nums; }
.bo-slots { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--box-shadow); overflow: hidden; }
.bo-slot { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.bo-slot:last-child { border-bottom: 0; }
.bo-slot:hover { background: #fdf6f5; }
.bo-slot .time { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.bo-slot .time small { display: block; font-family: var(--sans); font-weight: 400; font-size: .78rem; color: var(--muted); }
.bo-slot .title { font-weight: 600; color: var(--ink); text-decoration: none; }
.bo-slot .title:hover { color: var(--accent); }
.bo-slot .facts { font-size: .86rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 12px; }
.bo-slot.night { border-left: 4px solid var(--dark); }
.bo-slot .flags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
@media (max-width: 700px) { .bo-slot { grid-template-columns: 60px minmax(0, 1fr); } .bo-slot .flags { grid-column: 2; justify-content: flex-start; } }

/* assistant panels */
.assistant { border-left: 3px solid #9aa6d6; }
.assistant p { font-size: .92rem; }
.assistant textarea { min-height: 10em; font-size: .92rem; }
.draft-list { list-style: none; padding: 0; margin: 10px 0; }
.draft-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.preview { border: 1px dashed var(--line); border-radius: 8px; padding: 10px 14px; background: #fcfcfc; font-size: .95rem; }
.preview :first-child { margin-top: 0; }

/* narrow windows: tables become cards */
@media (max-width: 760px) {
  .backoffice table.cards thead { display: none; }
  .backoffice table.cards, .backoffice table.cards tbody { display: block; }
  .backoffice table.cards tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .backoffice table.cards td { display: block; border: 0; padding: 2px 0; font-size: .92rem; }
  .backoffice table.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation-duration: .01s !important; } }
@media print { .site-header, .site-footer, .slot-buy, .actions, .subnav { display: none; } }

/* console navigation in three groups */
.bo-nav { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: -6px 0 22px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.bo-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.bo-group-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #aaa; font-weight: 700; margin-right: -4px; }
.bo-nav a { text-decoration: none; color: var(--muted); font-weight: 600; padding-bottom: 2px; }
.bo-nav a:hover { color: var(--ink); }
.bo-nav a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--accent); }
.choice-list { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.choice-list.column { flex-direction: column; gap: 2px; }
.choice-inline { display: inline-flex !important; align-items: center; font-weight: 400; margin: 0; }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }
.plain-table.windows { table-layout: fixed; }
.plain-table.windows th:last-child, .plain-table.windows td:last-child { width: 4.5rem; text-align: center; }
.plain-table.windows th:first-child { width: 7.5rem; }
.plain-table.windows td { padding: 6px 4px; }
.plain-table.windows input { font-size: .9rem; padding: 6px; }
@media (max-width: 700px) { .plain-table.windows, .plain-table.windows tbody, .plain-table.windows tr { display: block; } .plain-table.windows thead { display: none; } .plain-table.windows td { display: block; width: auto !important; } }
.linklike.small { font-size: .88rem; }
/* Mail texts */
.placeholders { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0 0 10px; font-size: .9rem; }
.placeholders dt { margin: 0; } .placeholders dd { margin: 0; color: var(--muted); }
.mail-preview { width: 100%; height: 540px; border: 1px solid var(--line); border-radius: 8px; background: #f4f3f1; }
/* Inbox */
.bo-nav .badge-count { background: var(--accent); color: #fff; margin-left: 2px; }
.inbox-list tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.inbox-list tr.is-new strong { color: var(--ink); }
.thread { list-style: none; padding: 0; margin: 0 0 18px; }
.thread .mail { background: var(--surface); border-radius: var(--radius); box-shadow: var(--box-shadow); padding: 14px 18px; margin-bottom: 12px; }
.thread .mail.out { background: #faf7f8; border-left: 3px solid var(--accent); }
.mail-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
.mail-body { overflow-wrap: anywhere; line-height: 1.5; }
.mail-body .quote { color: var(--muted); border-left: 2px solid var(--line); padding-left: 10px; margin: 6px 0; font-size: .92rem; }
.attachments { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.reply { background: var(--surface); border-radius: var(--radius); box-shadow: var(--box-shadow); padding: 18px 20px; }
.reply .lang-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 600; }
.reply textarea { width: 100%; }
.inline-form { display: flex; gap: 6px; margin: 8px 0; }
.inline-form input { flex: 1; min-width: 0; }
ul.plain { list-style: none; padding: 0; margin: 0 0 8px; }
.conversation-title { font-size: clamp(1.4rem, 3vw, 2rem); }
/* Customers */
.customer-head { align-items: flex-start; gap: 12px; }
.customer-filter { flex-wrap: wrap; }
.customer-filter input[type=search] { flex: 1 1 16rem; }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 14px 0; }
.notes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.notes li { border-top: 1px solid var(--line); padding-top: 8px; overflow-wrap: anywhere; }
.notes li.change { color: var(--muted); font-size: .9rem; }
.stack-small { display: grid; gap: 6px; }
.stack-small textarea { width: 100%; }
.compact-form p { margin: 0 0 8px; }
.compact-form label { display: block; font-size: .8rem; color: var(--muted); }
.compact-form input, .compact-form select { width: 100%; }
details.box > summary { cursor: pointer; list-style: none; }
details.box > summary::-webkit-details-marker { display: none; }
details.box > summary::after { content: " ▾"; color: var(--muted); }
.mail-history { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.mail-history li { background: var(--surface); border-radius: var(--radius); box-shadow: var(--box-shadow); }
.mail-history li.in { border-left: 3px solid var(--accent); }
.mail-history li.failed { border-left: 3px solid #b0483d; }
.mail-history summary { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 10px 14px; cursor: pointer; list-style: none; }
.mail-history summary::-webkit-details-marker { display: none; }
.mail-history .what { min-width: 0; overflow-wrap: anywhere; }
.mail-history .what .small { display: block; }
.mail-history .dir { color: var(--muted); }
.mail-history li.in .dir { color: var(--accent); }
.mail-history .mail-text { padding: 0 14px 12px 38px; overflow-wrap: anywhere; line-height: 1.5; }
.mail-history li.system summary strong { font-weight: 600; color: var(--muted); }
/* Payment history */
.pay-timeline { list-style: none; padding: 0; margin: 0 0 18px; border-left: 2px solid var(--line); }
.pay-timeline li { position: relative; padding: 8px 0 10px 18px; }
.pay-timeline li::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.pay-timeline li.src-webhook::before { border-color: var(--accent); }
.pay-timeline li.src-staff::before { border-color: #b07d2b; }
.pay-timeline li.warn::before { background: #b0483d; border-color: #b0483d; }
.pay-timeline .pt-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.pay-timeline pre.raw { max-height: 240px; overflow: auto; font-size: .78rem; background: #f6f4f1; padding: 8px; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.test-mode { border: 1px dashed var(--line); box-shadow: none; }
.badge.status-disputed, .badge.status-charged_back { background: #f8e6e3; color: #b0483d; }
.badge.status-processing { background: #fbf3e2; color: #7a5a12; }
/* Two-click video players (apps/core/richtext.py, static/js/site.js) */
figure.embed { margin: 1.4em 0; aspect-ratio: 16 / 9; max-width: 100%; background: #1d1d1d; color: #eee; border-radius: 3px; display: grid; place-items: center; overflow: hidden; }
figure.embed .embed-consent { padding: 18px 22px; max-width: 34rem; text-align: center; }
figure.embed .embed-title { font-family: var(--display); font-size: 1.2rem; margin: 0 0 6px; }
figure.embed .small { color: #bbb; }
figure.embed a { color: #ddd; }
figure.embed .embed-player { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.prose video, .prose img { max-width: 100%; height: auto; }
.prose table { border-collapse: collapse; margin: 1em 0; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; }
/* Editor and media library (ported from tango-kalender.de, static/js/richtext.js + media.js) */
/* Description editor (static/js/richtext.js) */
.rte { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); overflow: hidden; }
.rte:focus-within { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(216, 22, 8, .15); }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; background: var(--soft); border-bottom: 1px solid var(--line); }
.rte-btn { min-width: 34px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent;
           font: 600 .95rem var(--sans); color: var(--ink); cursor: pointer; }
.rte-btn:hover { background: #fff; border-color: var(--line); }
.rte-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.rte-italic { font-style: italic; } .rte-underline { text-decoration: underline; }
.rte-heading { font-family: var(--display); }
.rte-link, .rte-unlink, .rte-clear { font-weight: 400; }
.rte-editor { min-height: 220px; max-height: 60vh; overflow-y: auto; padding: 12px 14px; outline: none; line-height: 1.55; }
.rte-editor p { margin: 0 0 .7em; }
.rte-editor h2, .rte-editor h3, .rte-editor h4 { font-size: 1.15rem; margin: .8em 0 .4em; }
.rte-editor blockquote { margin: .5em 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.rte-editor ul, .rte-editor ol { padding-left: 1.4em; margin: 0 0 .7em; }

.image-choice .form-thumb { width: 160px; height: 160px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.image-choice > div { flex: 1 1 260px; }

/* Media library dialog */
.media-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 14px;
                box-shadow: 0 20px 60px rgba(0, 0, 0, .35); overflow: auto; }
.media-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.media-head { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 18px;
              background: var(--paper); border-bottom: 1px solid var(--line); }
.media-head h2 { margin: 0 auto 0 0; font-size: 1.3rem; }
.media-search { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; flex: 0 1 220px; }
.media-upload { cursor: pointer; }
.media-close { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.media-status { margin: 10px 18px 0; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 14px 18px; }
.media-item { position: relative; padding: 0; border: 2px solid transparent; border-radius: 10px; background: var(--soft); cursor: pointer;
              aspect-ratio: 1; overflow: hidden; }
.media-item:hover, .media-item:focus-visible { border-color: var(--accent); }
.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px; background: rgba(0, 0, 0, .55); color: #fff;
                 font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.rte-editor video { max-width: 100%; display: block; margin: .6em 0; }
.rte-editor figure[data-provider] { margin: .6em 0; padding: 18px; background: var(--dark); color: #eee; border-radius: 8px; text-align: center; font-weight: 600; user-select: none; }
.rte-editor figure[data-provider]::before { content: "▶ " attr(data-title) "  ·  " attr(data-provider) ": " attr(data-ref); }
.rte-editor table { border-collapse: collapse; } .rte-editor td, .rte-editor th { border: 1px solid var(--line); padding: 4px 8px; }
.media-video { display: grid; place-items: center; height: 100%; padding: 8px; background: var(--dark); color: #eee; font-size: .85rem; text-align: center; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.library-grid a { display: block; border-radius: 10px; overflow: hidden; background: var(--soft); text-decoration: none; color: var(--ink); box-shadow: var(--box-shadow); }
.library-grid img, .library-grid .media-video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.library-grid span.t { display: block; padding: 6px 8px; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.media-preview { max-width: 100%; max-height: 420px; border-radius: 8px; display: block; background: var(--soft); }
/* Sign-in: link or (team) password */
.login-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 18px; align-items: start; max-width: 52rem; }
.login-grid h2 { font-size: 1.25rem; margin-top: 0; }
.login-grid details > summary { cursor: pointer; list-style: none; }
.login-grid details > summary::-webkit-details-marker { display: none; }
.password-box { max-width: 34rem; }
.password-box .field { margin-bottom: 12px; }
.password-box .helptext ul { margin: 4px 0 0; padding-left: 1.1rem; }
.password-remove { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, #eee); }
/* Festival photos in the console */
.photo-upload-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 10px 14px; margin-bottom: 10px; }
.photo-upload-grid label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.photo-upload-grid select, .photo-upload-grid input { width: 100%; margin-top: 3px; }
.photo-day { font-size: 1.15rem; margin: 22px 0 4px; }
.photo-tile { position: relative; display: block; border-radius: 10px; overflow: hidden; background: var(--soft); box-shadow: var(--box-shadow); cursor: pointer; }
.photo-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.photo-tile input[type=checkbox] { position: absolute; top: 8px; left: 8px; width: 20px; height: 20px; accent-color: var(--accent); }
.photo-tile:has(input:checked) { outline: 3px solid var(--accent); outline-offset: -3px; }
.photo-tile .t { display: block; padding: 6px 8px; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.photo-tile .photo-open { position: absolute; top: 6px; right: 8px; background: rgba(0, 0, 0, .55); color: #fff; padding: 1px 7px; border-radius: 6px; text-decoration: none; }
.photo-bulk { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.photo-bulk select { width: auto; }

/* ---------------------------------------------------------------- customer area (My account) */

.account-head h1 { margin-bottom: 2px; }
.account-head p { margin: 0 0 10px; }
.account-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px 20px; white-space: nowrap; }
.account-nav::-webkit-scrollbar { display: none; }
.back { margin: 0 0 8px; font-size: .92rem; }
.back a { text-decoration: none; }

.todo-list { list-style: none; padding: 0; margin: 10px 0 0; }
.todo-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 14px; margin-bottom: 8px; background: #fff8e1; border-left: 3px solid var(--gold); border-radius: var(--radius); }
.todo-list li span { flex: 1 1 18rem; }

.next-festival { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 4px 20px; background: var(--dark); color: rgba(255, 255, 255, .78); border-radius: 6px; padding: 22px 22px 8px; margin: 26px 0 14px; border-bottom: 3px solid var(--accent); }
.next-festival .date-block .dow, .next-festival .date-block .mon { color: rgba(255, 255, 255, .6); }
.next-festival .kind { color: rgba(255, 255, 255, .55); }
.next-festival h2 { margin: 2px 0 4px; font-size: clamp(1.5rem, 4vw, 2rem); }
.next-festival h2 a { color: #fff; text-decoration: none; }
.next-festival h2 a:hover { color: #fff; text-decoration: underline; }
.next-meta { margin: 0 0 6px; }
.next-ticket { margin: 0; }
.next-ticket a { color: #fff; }
.next-ticket .price { color: var(--accent); filter: brightness(1.6); margin-right: 4px; }
.next-festival .btn.secondary { color: #fff; border-color: rgba(255, 255, 255, .5); }
.next-festival .btn.secondary:hover { background: rgba(255, 255, 255, .08); }
@media (max-width: 520px) {
  .next-festival { grid-template-columns: 1fr; padding: 18px 16px 4px; }
  .next-festival .date-block { display: none; }
}
.also-coming { margin: 0 0 6px; }

.empty-state { background: var(--soft); border-radius: 6px; padding: 26px 20px; text-align: center; margin: 22px 0; }
.empty-state p { margin-bottom: 12px; }
.plain-list { list-style: none; padding: 0; margin: 6px 0 0; }
.plain-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.plain-list .row { justify-content: space-between; }

.order-list { list-style: none; padding: 0; margin: 4px 0 8px; }
.order-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 2px 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.order-list a:hover .o-number { color: var(--accent); }
.o-number { font-weight: 600; color: var(--ink); }
.o-edition { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) {
  .order-list a { grid-template-columns: minmax(0, 1fr) auto; }
  .order-list .o-edition { grid-column: 1 / -1; grid-row: 2; }
}

.ticket-row { grid-template-columns: 74px minmax(0, 1fr) auto; }
.ticket-row.is-used { opacity: .62; }
.ticket-qr-link svg { flex: none; }
@media (max-width: 520px) {
  .ticket-row { grid-template-columns: 58px minmax(0, 1fr); }
  .ticket-row .slot-time .from { font-size: 1.3rem; }
  .ticket-row .ticket-qr-link { grid-column: 2; justify-self: start; }
}
.past-tickets { margin-top: 30px; }
.past-tickets > summary { cursor: pointer; list-style: none; }
.past-tickets > summary::-webkit-details-marker { display: none; }
.past-tickets > summary::after { content: " ▾"; color: var(--muted); font-size: 1rem; }
.past-edition { margin: 18px 0 0; font-size: 1.15rem; }

.ticket-view { max-width: 30rem; margin: 0 auto 10px; text-align: center; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 6px; padding: 22px 18px 6px; box-shadow: var(--box-shadow); }
.ticket-view h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); margin: 4px 0 6px; }
.ticket-view .when { color: var(--accent); font-size: 1.15rem; margin: 0 0 2px; }
.ticket-view header p.muted { margin: 0 0 8px; font-size: .95rem; }
.ticket-qr svg { width: min(78vw, 300px); height: auto; background: #fff; padding: 8px; display: block; margin: 8px auto 4px; }
.ticket-holder { font-family: var(--display); font-size: 1.45rem; font-weight: 600; color: var(--ink); margin: 6px 0 0; }
.ticket-code { margin: 2px 0 0; }
.ticket-used { color: var(--bad); font-weight: 600; margin: 8px 0 0; }
.ticket-view.is-used .ticket-qr { opacity: .35; }
.ticket-view .actions { justify-content: center; }
.ticket-settings { max-width: 40rem; margin: 0 auto; }

.order-head h1 { margin-bottom: 4px; }
.order-card { border-bottom: 1px solid var(--line); padding: 14px 0 4px; }
.order-card header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.order-card header .price { margin-left: auto; }
.order-card .o-number { font-size: 1.1rem; text-decoration: none; }
.order-card p { margin: 4px 0 8px; }
.doc-list { list-style: none; padding: 0; margin: 6px 0 10px; }
.doc-list li { padding: 3px 0; }
.doc-list a::before { content: "PDF"; font-size: .64rem; font-weight: 700; letter-spacing: .06em; border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; margin-right: 8px; vertical-align: .15em; }
.pay-box { border: 1px solid #f0dc9a; background: #fffaf0; border-radius: 6px; padding: 16px 18px; margin: 18px 0 8px; max-width: 40rem; }
.pay-box h2 { margin-top: 0; }
.bank-data { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 18px; margin: 0 0 10px; }
.bank-data dt { color: var(--muted); }
.bank-data dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.cancel-form { margin-top: 12px; }
tr.refund td { color: var(--muted); border-bottom: 0; }

.gallery-label { margin: 16px 0 6px; font-weight: 600; color: var(--ink); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 30%), 1fr)); gap: 6px; }
.gallery-grid a { display: block; background: var(--soft); border-radius: 3px; overflow: hidden; }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform .2s; }
.gallery-grid a:hover img { transform: scale(1.03); }
.gallery-note { margin-top: 24px; }
.profile-form legend { margin-top: 6px; }
.ticket-view .when span { white-space: nowrap; }
.ticket-view .when span + span::before { content: "· "; }
@media (max-width: 520px) { .ticket-view .when span { display: block; } .ticket-view .when span + span::before { content: ""; } }
.edition-tickets .programme-head h2 a { color: inherit; text-decoration: none; }
.edition-tickets .programme-head h2 a:hover { color: var(--accent); }
.next-festival .date-block .day { color: #fff; }
.next-ticket .price { color: #fff; filter: none; }
.next-ticket a { text-decoration: none; }
.next-ticket a:hover { text-decoration: underline; }
@media (max-width: 520px) {
  .order-list .o-number { grid-column: 1; grid-row: 1; }
  .order-list .price { grid-column: 2; grid-row: 1; text-align: right; }
  .order-list .o-edition { grid-column: 1; grid-row: 2; }
  .order-list .badge { grid-column: 2; grid-row: 2; justify-self: end; }
}
.doc-states li.voided a { text-decoration: line-through; }
.compact-form input[type=checkbox] { width: auto; }
.checkout-total { display: none; color: var(--ink); }
.checkout-total .price { font-size: 1.3rem; margin-left: 4px; }
@media (max-width: 860px) { .checkout-total { display: inline; } }
/* Four or more main links (team members, teachers): the menu gets its own row instead of wrapping. */
@media (min-width: 901px) {
  .main-nav:has(a:nth-child(4)) { width: 100%; flex: none; order: 3; margin-top: -6px; }
  .main-nav:has(a:nth-child(4)) a { padding: 4px 14px 14px; }
  .main-nav:has(a:nth-child(4)) a:first-child { padding-left: 0; }
  .main-nav:has(a:nth-child(4)) ~ .header-actions { margin-left: auto; }
}
.ticket-holder .pill { font-family: var(--sans); vertical-align: .35rem; }
.hero-preview { display: block; max-width: 100%; max-height: 220px; border-radius: 6px; margin-bottom: 10px; object-fit: cover; }

/* ---------------------------------------------------------------- festival hero (start page, edition page) */

.festival-hero { position: relative; background: var(--dark); color: rgba(255, 255, 255, .82); overflow: hidden; border-bottom: 3px solid var(--accent); }
.festival-hero-media { position: absolute; inset: 0 0 0 auto; width: 64%; }
.festival-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.festival-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--dark) 0%, rgba(29, 29, 29, .88) 22%, rgba(29, 29, 29, .35) 55%, rgba(29, 29, 29, .05) 100%); }
.festival-hero-inner { position: relative; padding-block: clamp(36px, 7vw, 84px) clamp(30px, 5vw, 56px); }
.festival-hero-inner > * { max-width: 36rem; }
.hero-kicker { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: color-mix(in srgb, var(--gold) 75%, white); margin: 0 0 10px; }
.hero-name { font-family: var(--display); font-weight: 600; font-size: clamp(2.5rem, 7vw, 4.6rem); line-height: 1.02; margin: 0 0 12px; color: #fff; }
.hero-name a { color: inherit; text-decoration: none; }
.hero-name a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; }
.hero-dates { font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 2.6vw, 1.6rem); color: #fff; margin: 0 0 6px; font-variant-numeric: lining-nums; }
.hero-place { font-family: var(--sans); font-weight: 400; font-size: 1rem; color: rgba(255, 255, 255, .7); }
.hero-tagline { font-family: var(--display); font-style: italic; font-size: clamp(1.15rem, 2.4vw, 1.45rem); color: rgba(255, 255, 255, .9); margin: 4px 0 14px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 16px; }
.hero-facts span { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 3px 10px; color: rgba(255, 255, 255, .85); }
.hero-teachers { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 20px; }
.hero-teacher { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 600; }
.hero-teacher img, .hero-teacher .initial { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, .7); }
.hero-teacher .initial { display: inline-grid; place-items: center; background: var(--accent); font-family: var(--display); }
.hero-teacher:hover span:last-child { text-decoration: underline; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 0; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; border-color: #fff; }
.festival-hero.empty .festival-hero-inner { padding-block: 64px 56px; }
.festival-hero + main.wrap { padding-top: 32px; }
@media (max-width: 760px) {
  .festival-hero-media { position: relative; inset: auto; width: 100%; aspect-ratio: 16 / 10; }
  .festival-hero-media::after { background: linear-gradient(180deg, rgba(29, 29, 29, 0) 45%, var(--dark) 100%); }
  .festival-hero-inner { padding-top: 6px; }
  .festival-hero.has-image .festival-hero-inner { margin-top: -48px; }
}

.festival-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; margin: 14px 0 10px; }
.festival-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.festival-card-media { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--dark); overflow: hidden; text-decoration: none; }
.festival-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.festival-card:hover .festival-card-media img { transform: scale(1.03); }
.festival-card-media .date-block .day { color: #fff; }
.festival-card-media .date-block .dow, .festival-card-media .date-block .mon { color: rgba(255, 255, 255, .65); }
.festival-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.festival-card-body h3 { margin: 0; font-size: 1.35rem; }
.festival-card-body h3 a { color: var(--ink); text-decoration: none; }
.festival-card-body h3 a:hover { color: var(--accent); }
.festival-card-body p { margin: 0 0 4px; }
.festival-card-body .btn { align-self: flex-start; margin-top: auto; }
.festival-card-dates { font-family: var(--display); font-weight: 700; color: var(--accent); }
.festival-card.past .festival-card-media img { filter: saturate(.75); }

.home-intro { max-width: 70ch; margin: 34px 0 8px; font-size: 1.05rem; }
.archive-teaser { margin-top: 36px; }
.archive-mini { list-style: none; padding: 0; margin: 8px 0 10px; display: flex; flex-wrap: wrap; gap: 12px 26px; }
.archive-mini a { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.archive-mini img, .archive-mini-blank { width: 96px; height: 64px; object-fit: cover; border-radius: 4px; display: block; background: var(--soft); }
.archive-mini a:hover strong { color: var(--accent); }
.archive-year { font-family: var(--display); font-size: 2.2rem; color: var(--accent); margin: 28px 0 0; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.home-intro { margin-bottom: 18px; }
.festival-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; margin: 6px 0 16px; }
.festival-part { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; color: var(--text); text-decoration: none; background: var(--surface); transition: box-shadow .2s; }
.festival-part:hover { box-shadow: var(--box-shadow); }
.part-dates { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--accent); }
.part-name { font-family: var(--display); font-weight: 600; font-size: 1.45rem; color: var(--ink); line-height: 1.2; }
.part-text { color: var(--text); }
.part-facts { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-top: 4px; }
.hero-back { margin: 0 0 14px; font-size: .9rem; }
.hero-back a { color: rgba(255, 255, 255, .7); text-decoration: none; }
.hero-back a:hover { color: #fff; }
.event-hero .hero-name { font-size: clamp(2rem, 5.5vw, 3.4rem); }
.teacher-card { display: flex; gap: 16px; align-items: flex-start; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; }
.teacher-card img, .teacher-card .initial { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; }
.teacher-card .initial { display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--display); font-size: 2.2rem; }
.teacher-card h3 { margin: 0 0 4px; }
.teacher-card h3 a { color: var(--ink); text-decoration: none; }
.teacher-card .kind { margin: 0; }
.teacher-bio { font-size: .95rem; } .teacher-bio p { margin: 0 0 .5em; }
