/* ========================================================================
   Piletikiosk — avalik sait
   Sama perekond mis halduspaneel (Fraunces + Manrope, kreem + tint + korall),
   aga plakatlikum: suured kaanepildid, suur serif, vähe kroomi.
   Ürituse leht võib aktsendi üle kirjutada: style="--accent:#…".
   ====================================================================== */

:root {
    --cream-50: #faf6ee;
    --cream-100: #f4ecdb;
    --cream-200: #ebe1cb;
    --paper: #ffffff;
    --ink-900: #11142b;
    --ink-800: #1a1f44;
    --ink-600: #364069;
    --ink-500: #555f86;
    --ink-400: #828aa8;
    --ink-200: #d4d7e1;
    --coral: #e35846;
    --gold: #d8a23b;
    --emerald: #2c7a4e;
    --emerald-soft: #d9eee1;
    --danger-soft: #fbe0db;

    --accent: var(--coral);
    --accent-ink: #ffffff;
    --border: rgba(17, 20, 43, 0.10);
    --border-strong: rgba(17, 20, 43, 0.20);
    --shadow-md: 0 6px 16px -8px rgba(17, 20, 43, 0.18), 0 2px 4px rgba(17, 20, 43, 0.04);
    --shadow-lg: 0 24px 48px -24px rgba(17, 20, 43, 0.32), 0 6px 12px rgba(17, 20, 43, 0.06);
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 22px;
    --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-900);
    background: var(--cream-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; margin: 0; }
em.accent { font-style: italic; color: var(--accent); }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.muted { color: var(--ink-500); }
.eyebrow { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }

/* ── päis / jalus ─────────────────────────────────────────────────── */
.sandbox-bar { background: var(--gold); color: var(--ink-900); text-align: center; font-size: 0.75rem; font-weight: 700; padding: 3px 8px; letter-spacing: 0.04em; }
.site-head {
    width: min(var(--wrap), 100% - 40px); margin-inline: auto;
    display: flex; align-items: center; justify-content: space-between;
    padding-block: 22px;
}
.site-head nav a { font-weight: 700; font-size: 0.9rem; text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); }
.site-head nav a:hover { background: var(--ink-900); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; text-decoration: none; letter-spacing: -0.01em; }
.brand--small { font-size: 1.1rem; }
.brand-mark { width: 26px; height: 18px; border-radius: 5px; background: var(--coral); position: relative; flex: none; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--cream-50); transform: translateY(-50%); }
.brand-mark::before { left: -4px; }
.brand-mark::after { right: -4px; }
.site-foot .brand-mark::before, .site-foot .brand-mark::after { background: var(--ink-900); }

.site-foot { margin-top: 80px; background: var(--ink-900); color: var(--ink-200); padding: 40px max(20px, calc((100% - var(--wrap)) / 2)) 28px; font-size: 0.9rem; }
.site-foot__top { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
.site-foot .brand { color: #fff; }
.site-foot p { margin: 10px 0 0; max-width: 46ch; color: var(--ink-400); }
.site-foot p b { color: var(--ink-200); }
.site-foot nav { display: flex; gap: 10px 22px; flex-wrap: wrap; max-width: 520px; }
.site-foot nav a { text-decoration: none; font-weight: 600; }
.site-foot a:hover { color: #fff; }
.site-foot__legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); color: var(--ink-400); font-size: 0.8rem; line-height: 1.7; }
.site-foot__legal a { color: inherit; }

/* küpsiseteade — ainult teavitus, nõusolekut ei ole vaja (vt privaatsus#kupsised) */
.cookie-note { position: fixed; left: 16px; bottom: 16px; z-index: 30; max-width: 420px; display: flex; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 14px 16px; font-size: 0.85rem; }
.cookie-note p { margin: 0; color: var(--ink-600); }
.cookie-note a { color: var(--accent); font-weight: 700; }
body.has-buy-bar .cookie-note { bottom: 88px; }
@media (max-width: 560px) { .cookie-note { left: 10px; right: 10px; max-width: none; } }

.legal-table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 0.6em 0 1.2em; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.legal-table th { width: 34%; font-weight: 700; color: var(--ink-600); white-space: normal; }
.legal-table code { font-size: 0.85em; background: var(--cream-100); padding: 2px 6px; border-radius: 6px; }

/* ── teated ───────────────────────────────────────────────────────── */
.flash-stack { width: min(var(--wrap), 100% - 40px); margin: 0 auto 8px; display: grid; gap: 8px; }
.flash { padding: 13px 18px; border-radius: var(--r-md); font-weight: 600; background: var(--paper); border: 1px solid var(--border); border-left: 5px solid var(--ink-400); }
.flash--error { border-left-color: var(--coral); background: var(--danger-soft); }
.flash--success { border-left-color: var(--emerald); background: var(--emerald-soft); }
.flash--warning { border-left-color: var(--gold); background: #fbf0d3; }

/* ── nupud ────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 800; font-size: 1rem; letter-spacing: 0.01em;
    padding: 15px 26px; border-radius: 999px; border: 1.5px solid transparent;
    cursor: pointer; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 22px -12px var(--accent); }
.btn--primary:hover { filter: brightness(0.94); }
.btn--ink { background: var(--ink-900); color: #fff; }
.btn--ink:hover { background: var(--ink-800); }
.btn--ghost { background: transparent; border-color: var(--border-strong); color: var(--ink-900); }
.btn--ghost:hover { background: var(--paper); }
.btn--block { width: 100%; }
.btn--sm { padding: 9px 16px; font-size: 0.875rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--ink-600); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ── avaleht ──────────────────────────────────────────────────────── */
.home-hero { padding: 36px 0 44px; }
.home-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); max-width: 14ch; }
.home-hero p { font-size: 1.15rem; color: var(--ink-500); max-width: 52ch; margin: 18px 0 0; }

.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.event-card {
    display: flex; flex-direction: column; text-decoration: none; background: var(--paper);
    border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-md);
    transition: transform .18s ease, box-shadow .18s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.event-card__cover { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--ink-800), var(--ink-600)); position: relative; overflow: hidden; }
.event-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.event-card__date {
    position: absolute; left: 16px; top: 16px; background: var(--cream-50); border-radius: var(--r-sm);
    padding: 7px 12px; text-align: center; line-height: 1.05; box-shadow: var(--shadow-md);
}
.event-card__date b { display: block; font-family: var(--font-display); font-size: 1.5rem; }
.event-card__date span { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral); }
.event-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.event-card__body h2 { font-size: 1.5rem; }
.event-card__meta { color: var(--ink-500); font-size: 0.92rem; font-weight: 500; }
.event-card__foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.event-card__foot span:last-child { color: var(--coral); }
.event-grid--single { grid-template-columns: minmax(0, 760px); }

.empty { text-align: center; padding: 80px 20px; color: var(--ink-500); }
.empty h2 { font-size: 2rem; color: var(--ink-900); margin-bottom: 10px; }

/* ── ürituse leht ─────────────────────────────────────────────────── */
.preview-bar { background: var(--ink-900); color: #fff; text-align: center; padding: 9px 16px; font-weight: 700; font-size: 0.875rem; }
.preview-bar a { color: var(--gold); }
.cancelled-bar { background: var(--coral); color: #fff; text-align: center; padding: 14px 16px; font-weight: 800; }

.event-cover { width: min(var(--wrap), 100% - 40px); margin-inline: auto; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 8; background: linear-gradient(135deg, var(--ink-900), var(--ink-600)); box-shadow: var(--shadow-lg); }
.event-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-cover--top img { object-position: top; }
.event-cover--bottom img { object-position: bottom; }

.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; align-items: start; margin-top: 40px; }
.event-title { font-size: clamp(2.2rem, 5.5vw, 4rem); margin-top: 8px; }
.event-tagline { font-size: 1.2rem; color: var(--ink-500); margin: 14px 0 0; max-width: 56ch; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 30px 0; }
.fact { background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 18px; }
.fact dt { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-400); }
.fact dd { margin: 3px 0 0; font-weight: 700; }
.fact dd small { display: block; font-weight: 500; color: var(--ink-500); font-size: 0.875rem; }
.fact a { color: var(--accent); font-weight: 700; font-size: 0.875rem; }

.prose { font-size: 1.05rem; max-width: 68ch; }
.prose h2, .prose h3, .prose h4 { margin: 1.6em 0 0.5em; }
.prose h2 { font-size: 1.7rem; } .prose h3 { font-size: 1.35rem; }
.prose p { margin: 0 0 1em; }
.prose a { color: var(--accent); font-weight: 600; }
.prose img { border-radius: var(--r-md); margin: 1em 0; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--accent); color: var(--ink-600); font-style: italic; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.prose th, .prose td { border-bottom: 1px solid var(--border); padding: 8px 10px; text-align: left; }

.organizer-line { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; gap: 14px; align-items: center; color: var(--ink-500); font-size: 0.92rem; }
.organizer-line img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; }
.organizer-line b { color: var(--ink-900); display: block; }

/* piletikast */
.ticket-box { position: sticky; top: 20px; background: var(--paper); border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 26px; scroll-margin-top: 20px; }
.ticket-box h2 { font-size: 1.6rem; margin-bottom: 16px; }
.tt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 16px 0; border-top: 1px solid var(--border); align-items: center; }
.tt:first-of-type { border-top: 0; padding-top: 4px; }
.tt__name { font-weight: 800; font-size: 1.05rem; }
.tt__desc { color: var(--ink-500); font-size: 0.875rem; grid-column: 1; }
.tt__price { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; grid-column: 1; }
.tt__side { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tt--off { opacity: 0.55; }
.tt--off .tt__price { text-decoration: none; }
.pill { display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--cream-100); color: var(--ink-600); white-space: nowrap; }
.pill--hot { background: var(--danger-soft); color: var(--coral); }
.pill--ok { background: var(--emerald-soft); color: var(--emerald); }
.pill--secret { background: var(--ink-900); color: var(--gold); }

.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--border-strong); border-radius: 999px; overflow: hidden; background: var(--paper); }
.stepper button { width: 40px; height: 40px; border: 0; background: none; font-size: 1.3rem; font-weight: 700; cursor: pointer; color: var(--ink-900); line-height: 1; }
.stepper button:hover { background: var(--cream-100); }
.stepper button[disabled] { opacity: .3; cursor: default; }
.stepper input { width: 34px; border: 0; text-align: center; font: inherit; font-weight: 800; background: none; -moz-appearance: textfield; appearance: textfield; padding: 0; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ticket-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ink-900); margin-top: 8px; padding-top: 16px; font-weight: 800; }
.ticket-total b { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; }
.ticket-box .btn { margin-top: 16px; }
.ticket-box .fineprint { font-size: 0.8rem; color: var(--ink-500); margin: 12px 0 0; text-align: center; }
.code-row { margin-top: 14px; }
.code-row summary { cursor: pointer; font-weight: 700; font-size: 0.875rem; color: var(--ink-600); list-style: none; }
.code-row summary::-webkit-details-marker { display: none; }
.code-row summary::before { content: "+ "; color: var(--accent); }
.code-row[open] summary::before { content: "− "; }
.code-row .inline-form { display: flex; gap: 8px; margin-top: 10px; }
.code-row .error { color: var(--coral); font-size: 0.85rem; font-weight: 600; margin-top: 6px; }

.buy-bar { display: none; }

/* ── vormid ───────────────────────────────────────────────────────── */
.form-control {
    width: 100%; font: inherit; color: inherit; background: var(--paper);
    border: 1.5px solid var(--border-strong); border-radius: var(--r-sm); padding: 11px 14px;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.form-control-lg { padding: 14px 16px; font-size: 1.02rem; }
.form-control:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 0.875rem; }
.field .help { font-size: 0.8rem; color: var(--ink-500); }
.field .error, .errorlist { color: var(--coral); font-size: 0.85rem; font-weight: 600; list-style: none; margin: 0; padding: 0; }
.field--invalid .form-control { border-color: var(--coral); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; cursor: pointer; }
.form-check-input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }

/* ── kassa ────────────────────────────────────────────────────────── */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; padding-top: 12px; }
.checkout h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 8px; }
.panel { background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-md); }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 1.35rem; margin-bottom: 18px; display: flex; gap: 10px; align-items: baseline; }
.panel h2 span { font-family: var(--font-body); font-size: 0.75rem; font-weight: 800; color: var(--accent); letter-spacing: 0.1em; }
.stack { display: grid; gap: 16px; }
.company-fields { display: none; margin-top: 4px; }
.company-fields.is-open { display: grid; }

.timer { display: flex; align-items: center; gap: 12px; background: var(--ink-900); color: #fff; border-radius: var(--r-md); padding: 14px 18px; margin-bottom: 16px; }
.timer b { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 4ch; }
.timer span { font-size: 0.85rem; color: var(--ink-200); line-height: 1.35; }
.timer.is-low { background: var(--coral); }

.summary { position: sticky; top: 20px; }
.summary__event { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.summary__event img { width: 84px; height: 60px; object-fit: cover; border-radius: var(--r-sm); flex: none; }
.summary__event b { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; line-height: 1.15; display: block; }
.summary__event small { color: var(--ink-500); }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.lines li small { display: block; color: var(--ink-500); }
.lines .discount { color: var(--emerald); font-weight: 700; }
.lines .total { border-top: 2px solid var(--ink-900); font-weight: 800; align-items: baseline; }
.lines .total b { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; }
.lines .vat { border-top: 0; padding-top: 0; color: var(--ink-500); font-size: 0.85rem; }

.methods { display: grid; gap: 10px; }
.method { border: 1.5px solid var(--border-strong); border-radius: var(--r-md); padding: 14px 16px; }
.method > label { display: flex; gap: 12px; align-items: center; font-weight: 800; cursor: pointer; }
.method input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); }
.method:has(> label input:checked) { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.method img.method-logo { height: 22px; margin-left: auto; }
.banks { display: none; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 14px; }
.method:has(> label input:checked) .banks { display: grid; }
.bank { position: relative; }
.bank input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.bank span { display: flex; align-items: center; justify-content: center; height: 58px; padding: 8px; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--paper); font-size: 0.8rem; font-weight: 700; text-align: center; }
.bank img { max-height: 30px; max-width: 100%; object-fit: contain; }
.bank input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, white); }
.bank input:focus-visible + span { outline: 2px solid var(--accent); }

.notice { border-radius: var(--r-md); padding: 14px 18px; background: var(--cream-100); border: 1px solid var(--cream-200); font-size: 0.95rem; }
.notice--warn { background: #fbf0d3; border-color: #f0dca0; }

/* ── makstud tellimus / pilet ─────────────────────────────────────── */
.done-hero { text-align: center; padding: 28px 0 36px; }
.done-hero .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--emerald); color: #fff; display: grid; place-items: center; margin: 0 auto 20px; font-size: 2.2rem; }
.done-hero .tick--off { background: var(--ink-400); }
.done-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.done-hero p { color: var(--ink-500); font-size: 1.1rem; max-width: 52ch; margin: 14px auto 0; }
.done-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }

.ticket-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin-top: 12px; }
.ticket {
    background: var(--paper); border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--shadow-md);
    overflow: hidden; display: flex; flex-direction: column; position: relative;
}
.ticket__head { padding: 20px 22px 16px; border-bottom: 2px dashed var(--border-strong); position: relative; }
.ticket__head::before, .ticket__head::after { content: ""; position: absolute; bottom: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--cream-50); border: 1px solid var(--border); }
.ticket__head::before { left: -11px; } .ticket__head::after { right: -11px; }
.ticket__head h3 { font-size: 1.3rem; }
.ticket__head small { color: var(--ink-500); font-weight: 600; }
.ticket__qr { padding: 20px 22px 8px; display: grid; place-items: center; }
.ticket__qr svg { width: min(230px, 100%); height: auto; display: block; }
.ticket__code { text-align: center; font-weight: 800; letter-spacing: 0.14em; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ticket__foot { padding: 12px 22px 20px; text-align: center; font-size: 0.875rem; color: var(--ink-500); display: grid; gap: 8px; }
.ticket__foot a { font-weight: 700; color: var(--ink-600); }
.ticket--void { opacity: 0.6; }
.ticket--void .ticket__qr { filter: grayscale(1) blur(3px); }
.ticket__stamp { position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); border: 4px solid var(--coral); color: var(--coral); font-weight: 800; font-size: 1.4rem; letter-spacing: 0.1em; padding: 6px 18px; border-radius: 10px; background: rgba(255,255,255,.85); text-transform: uppercase; white-space: nowrap; }
.ticket__stamp--used { border-color: var(--emerald); color: var(--emerald); }

.single-ticket { max-width: 420px; margin: 10px auto 0; }
.section-title { font-size: 1.6rem; margin: 44px 0 6px; }

/* ── tekstilehed ──────────────────────────────────────────────────── */
.page { max-width: 760px; padding-top: 18px; }
.page h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 22px; }

/* ── mobiil ───────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .event-layout, .checkout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .ticket-box, .summary { position: static; }
    .checkout .summary { order: -1; }
    .event-cover { width: 100%; border-radius: 0; aspect-ratio: 16 / 10; }
    .event-layout { margin-top: 26px; display: flex; flex-direction: column; gap: 0; }
    /* Telefonis tulevad piletid KOHE pärast aega-kohta, mitte pika kirjelduse järel. */
    .event-layout article { display: contents; }
    .event-layout .ticket-box { order: 2; margin-bottom: 36px; }
    .event-layout .prose { order: 3; }
    .event-layout .organizer-line { order: 4; }
    /* Telefonis peab ost olema ühe pöidlaliigutuse kaugusel. */
    .buy-bar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; gap: 14px; align-items: center; justify-content: space-between;
        padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--border); box-shadow: 0 -10px 30px -18px rgba(17,20,43,.4);
    }
    .buy-bar small { display: block; color: var(--ink-500); font-size: 0.75rem; font-weight: 600; }
    .buy-bar b { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
    .buy-bar.is-hidden { display: none; }
    body.has-buy-bar .site-foot { padding-bottom: 110px; }
}
@media (max-width: 560px) {
    .field-row { grid-template-columns: 1fr; }
    .panel, .ticket-box { padding: 20px; }
    .event-grid { grid-template-columns: 1fr; }
    .site-head { padding-block: 16px; }
}
@media print {
    .site-head, .site-foot, .done-actions, .buy-bar, .flash-stack { display: none !important; }
    body { background: #fff; }
}
