/* ==========================================================================
   Ingressos — páginas públicas (eventos, evento, pedido, ingresso) e seção da home.
   Usa os tokens de style.css (paleta creme / azul-royal / dourado, Rozha One +
   Atkinson Hyperlegible). Público maduro no celular: alvos >= 56px, contraste alto.
   ========================================================================== */

:root {
    --tk-ok: #15803d;
    --tk-ok-soft: #86efac;
    --tk-warn: #92400e;
    --tk-warn-soft: #F6DE8C;
    --tk-err: #b91c1c;
    --tk-err-soft: #FCA5A5;
    --tk-line: rgba(212, 175, 55, 0.35);
    --tk-ink-line: rgba(30, 63, 158, 0.25);
}

.tk-page {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 56px) var(--pad-x) 140px;
}
.tk-page-narrow { max-width: 800px; }

.tk-head { margin-bottom: 28px; }
.tk-head .section-subtitle { margin-top: 0; }

.tk-back {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text-2); text-decoration: none; font-weight: 700;
    min-height: 44px; margin-bottom: 10px;
    text-underline-offset: 4px;
}
.tk-back:hover { color: var(--gold-bright); text-decoration: underline; }

/* ---------- Estados (carregando / vazio / erro) ---------- */
.tk-state {
    text-align: center; padding: 56px 24px;
    border: 1px dashed var(--tk-line); border-radius: var(--radius-lg);
    color: var(--text-2); max-width: 60ch; margin: 0 auto;
}
.tk-state strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; color: var(--text); margin-bottom: 8px; }
.tk-state.error { border-color: rgba(252, 165, 165, 0.6); }
.tk-state a { color: var(--gold-bright); font-weight: 700; }
.tk-spinner {
    width: 44px; height: 44px; margin: 0 auto 16px;
    border: 4px solid rgba(255,255,255,0.15); border-top-color: var(--gold-bright);
    border-radius: 50%; animation: tk-spin 0.9s linear infinite;
}
@keyframes tk-spin { to { transform: rotate(360deg); } }

/* ---------- Bloco de data: flâmula creme com o dia em tipografia de cartaz ---------- */
.date-block {
    flex-shrink: 0;
    width: 88px; min-height: 96px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--cream); color: var(--royal);
    border: 1px solid rgba(30, 63, 158, 0.25);
    border-radius: var(--radius);
    box-shadow: var(--shadow-panel);
    line-height: 1;
}
.date-block b { font-family: var(--font-display); font-weight: 400; font-size: 2.4rem; }
.date-block span { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; margin-top: 4px; }
.date-block small { font-size: var(--fs-micro); font-weight: 700; color: var(--cream-ink-2); margin-top: 3px; margin-bottom: 4px; }

/* ---------- Lista de eventos (página e home) ---------- */
.ev-list { display: grid; gap: 18px; }
.ev-list-more { margin-top: 28px; text-align: center; }
.ev-card {
    display: grid; grid-template-columns: 88px 1fr auto; gap: 22px; align-items: center;
    padding: 22px; text-decoration: none; color: inherit;
    background: var(--navy-800); border: 1px solid rgba(212, 175, 55, 0.3); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel);
    transition: transform 0.25s var(--ease-out), border-color 0.25s;
}
.ev-card:hover { transform: translateY(-3px); border-color: var(--gold-bright); }
.ev-card .ev-cover { grid-column: 1 / -1; aspect-ratio: 16 / 7; width: 100%; object-fit: cover; border-radius: var(--radius); margin-bottom: 4px; }
.ev-card h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.15; color: var(--text); }
.ev-meta { color: var(--text-2); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 1rem; }
.ev-price { text-align: right; }
.ev-price .from { display: block; font-size: 0.8rem; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
.ev-price .value { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: var(--gold-bright); line-height: 1.1; }
.ev-price .value.free { color: var(--tk-ok-soft); }
.ev-price .value.soldout { color: var(--tk-err-soft); font-size: 1.2rem; }
.ev-price .cta { display: inline-block; margin-top: 8px; font-weight: 700; color: var(--gold-bright); }

/* ---------- Página do evento ---------- */
.ev-hero { display: grid; grid-template-columns: 88px 1fr; gap: 24px; align-items: start; margin-bottom: 32px; }
.ev-hero-cover { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--radius-lg); border: 2px solid var(--royal); box-shadow: var(--shadow-panel); margin-bottom: 24px; }
.ev-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.08; color: var(--gold-bright); }
.ev-hero .ev-meta { margin-top: 14px; font-size: 1.05rem; color: var(--text); }
.ev-hero .ev-meta a { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 4px; font-weight: 700; }
.ev-hero-body { min-width: 0; }
.ev-age {
    display: inline-block; vertical-align: middle; margin-left: 10px;
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; line-height: 1;
    padding: 6px 9px; border: 2px solid var(--gold); border-radius: 4px; color: var(--gold-pale);
    transform: translateY(-4px);
}

/* Ícones desenhados (traço 2px), herdam a cor do texto */
.ic { width: 1.25em; height: 1.25em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Fatos do evento: quando e onde, com ações de rota */
.ev-facts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.ev-facts li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); font-size: 1.05rem; }
.ev-facts li .ic { margin-top: 3px; color: var(--gold-bright); width: 1.4em; height: 1.4em; }
.ev-facts b { display: block; font-weight: 700; line-height: 1.35; }
.ev-facts span { display: block; color: var(--text-2); font-size: 0.98rem; margin-top: 2px; }
.ev-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; }
.ev-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-bright); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; }
.ev-links a:hover { color: var(--gold-pale); }

/* Ações do topo: agenda e compartilhar (popover nativo com <details>) */
.ev-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ev-pop { position: relative; }
.ev-pop > summary { list-style: none; }
.ev-pop > summary::-webkit-details-marker { display: none; }
.ev-btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
    min-height: 48px; padding: 0 18px; border-radius: var(--radius);
    border: 2px solid var(--gold); background: rgba(212, 175, 55, 0.08); color: var(--gold-pale);
    font-weight: 700; font-size: 1rem; font-family: var(--font-body);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ev-btn:hover, .ev-pop[open] > .ev-btn { background: rgba(212, 175, 55, 0.18); border-color: var(--gold-bright); color: var(--gold-bright); }
.ev-btn:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; }
.ev-pop-menu {
    position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; min-width: 260px;
    display: grid; padding: 6px; border-radius: var(--radius);
    background: var(--cream); color: var(--cream-ink); border: 1px solid rgba(30, 63, 158, 0.25);
    box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.75);
    animation: ev-pop-in 0.22s var(--ease-out);
}
@keyframes ev-pop-in { from { opacity: 0; transform: translateY(-6px); } }
.ev-pop-menu a, .ev-pop-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    min-height: 48px; padding: 0 12px; border: none; border-radius: 4px; background: none; cursor: pointer;
    color: var(--cream-ink); font: inherit; font-weight: 700; text-decoration: none;
}
.ev-pop-menu a:hover, .ev-pop-menu button:hover { background: rgba(30, 63, 158, 0.1); color: var(--royal); }
.ev-pop-menu .ic { color: var(--royal); }

/* Seções de leitura sob a compra: descrição e "bom saber" */
.ev-section { max-width: 68ch; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--tk-line); }
.ev-section h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: var(--gold-bright); margin: 0 0 12px; }
.ev-desc { color: var(--text-2); white-space: pre-line; line-height: 1.65; max-width: 68ch; margin: 0; font-size: 1.05rem; }
.ev-info { margin: 0; display: grid; gap: 14px; }
.ev-info > div { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; align-items: baseline; }
.ev-info dt { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; color: var(--gold); margin: 0; }
.ev-info dd { margin: 0; color: var(--text); line-height: 1.55; }
.ev-info dd a { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-bright); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; }
.ev-org { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }

.buy-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }

/* Painéis de compra: flâmulas creme do site (.panel vem de style.css) */
.tk-panel { padding: 26px 26px 44px; }
.step-title {
    display: flex; align-items: center; gap: 12px; margin: 0 0 16px;
    font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; color: var(--royal);
}
.step-title .n {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--royal); color: var(--cream); font-family: var(--font-body); font-weight: 700; font-size: 1.05rem;
}
.tk-panel .lead-sm { color: var(--cream-ink-2); margin: -6px 0 18px; font-size: 1rem; }

/* Tipo de ingresso: linha com stepper */
.tt-list { display: flex; flex-direction: column; gap: 12px; }
.tt-row {
    display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
    padding: 16px 18px; border-radius: var(--radius);
    background: rgba(30, 63, 158, 0.06); border: 2px solid var(--tk-ink-line);
    transition: border-color 0.2s, background 0.2s;
}
.tt-row.selected { border-color: var(--royal); background: rgba(30, 63, 158, 0.12); }
.tt-row.off { opacity: 0.6; }
.tt-row.off .qty { display: none; } /* lote fechado não pede quantidade */
.tt-name { font-size: var(--fs-lg); font-weight: 700; color: var(--cream-ink); line-height: 1.3; }
.tt-desc { color: var(--cream-ink-2); font-size: 1rem; margin-top: 2px; }
.tt-price { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: var(--royal); margin-top: 6px; line-height: 1.1; }
.tt-price.free { color: var(--tk-ok); }
.tt-note { font-size: var(--fs-sm); color: var(--tk-warn); font-weight: 700; margin-top: 4px; }
.tt-note.err { color: var(--tk-err); }
.tt-badge {
    display: inline-block; vertical-align: middle; margin-left: 6px; padding: 3px 9px; border-radius: 999px;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.3;
}
.tt-badge.off { background: var(--tk-err); color: #fff; }
.tt-badge.soon { background: var(--royal); color: var(--cream); }
.tt-badge.low { background: var(--tk-warn-soft); color: var(--tk-warn); }
.tt-overview { margin: -4px 0 16px; padding: 12px 14px; border-radius: var(--radius); background: rgba(30, 63, 158, 0.08); color: var(--cream-ink); font-weight: 700; line-height: 1.45; }
.tt-overview.err { background: #FEE2E2; color: var(--tk-err); }
.tt-foot { margin: 16px 0 0; color: var(--cream-ink-2); font-size: var(--fs-sm); line-height: 1.5; }

.qty { display: inline-flex; align-items: center; gap: 4px; background: var(--cream-deep); border-radius: var(--radius); padding: 4px; }
.qty button {
    width: 52px; height: 52px; border: none; border-radius: var(--radius); cursor: pointer;
    background: var(--royal); color: var(--cream); font-size: 1.7rem; font-weight: 700; line-height: 1;
    transition: background 0.15s, transform 0.1s;
}
.qty button:hover:not(:disabled) { background: var(--royal-soft); }
.qty button:active:not(:disabled) { transform: scale(0.94); }
.qty button:disabled { opacity: 0.3; cursor: not-allowed; }
.qty output { min-width: 44px; text-align: center; font-size: 1.5rem; font-weight: 700; color: var(--cream-ink); font-variant-numeric: tabular-nums; }

/* Formulário do comprador (sobre creme) */
.tk-panel .field { margin-bottom: 16px; }
.tk-panel .field label { display: block; font-weight: 700; color: var(--cream-ink); margin-bottom: 6px; font-size: 1.02rem; }
.tk-panel .field input {
    width: 100%; min-height: 56px; padding: 12px 16px; font-size: 1.15rem; color: var(--cream-ink);
    background: #fff; border: 2px solid var(--tk-ink-line); border-radius: var(--radius);
    caret-color: var(--royal); transition: border-color 0.2s, box-shadow 0.2s;
}
.tk-panel .field input::placeholder { color: #5C6B8F; }
.tk-panel .field input:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 4px rgba(30, 63, 158, 0.18); }
.tk-panel .field.invalid input { border-color: var(--tk-err); }
.tk-panel .field .hint { color: var(--cream-ink-2); font-size: var(--fs-sm); margin-top: 5px; }
.tk-panel .field .error { display: none; color: var(--tk-err); font-weight: 700; font-size: 0.98rem; margin-top: 6px; }
.tk-panel .field.invalid .error { display: block; }

.summary { border-top: 1px solid var(--tk-ink-line); margin-top: 6px; padding-top: 14px; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; color: var(--cream-ink); padding: 8px 0; font-variant-numeric: tabular-nums; border-bottom: 1px solid rgba(30, 63, 158, 0.12); }
.summary-line:last-of-type { border-bottom: 0; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 12px; border-top: 2px dashed var(--tk-ink-line); }
.summary-total span { font-weight: 700; color: var(--cream-ink); }
.summary-total b { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-num); line-height: 1.1; color: var(--royal); font-variant-numeric: tabular-nums; }
.summary-empty { color: var(--cream-ink-2); padding: 6px 0; }

/* Botões grandes */
.btn-big {
    width: 100%; min-height: 64px; margin-top: 16px; cursor: pointer;
    border: 2px solid var(--gold-bright); border-radius: var(--radius); font-size: 1.2rem; font-weight: 700;
    background: var(--gold-bright); color: var(--navy-950);
    box-shadow: 0 10px 24px -12px rgba(255, 215, 0, 0.7);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
    transition: transform 0.15s var(--ease-out), background 0.15s, box-shadow 0.15s, filter 0.2s;
}
.btn-big:hover:not(:disabled) { background: var(--gold-pale); border-color: var(--gold-pale); transform: translateY(-2px); }
.btn-big:active:not(:disabled) { transform: translateY(0); }
.btn-big:disabled { filter: grayscale(0.6); opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn-big.green { background: var(--tk-ok); border-color: var(--tk-ok); color: #fff; box-shadow: 0 10px 24px -12px rgba(21, 128, 61, 0.8); }
.btn-big.green:hover:not(:disabled) { background: #166534; border-color: #166534; }
.btn-big.ghost { background: transparent; color: var(--gold-bright); border-color: var(--gold); box-shadow: none; }
.btn-big.ghost:hover:not(:disabled) { background: rgba(212, 175, 55, 0.14); border-color: var(--gold-bright); }
.panel .btn-big.ghost { color: var(--royal); border-color: var(--royal); }
.panel .btn-big.ghost:hover:not(:disabled) { background: rgba(30, 63, 158, 0.1); }

.form-alert {
    display: none; margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); font-weight: 700;
    background: #FEE2E2; border: 2px solid var(--tk-err); color: var(--tk-err);
}
.form-alert.show { display: block; }
.form-alert.info { background: var(--tk-warn-soft); border-color: var(--gold); color: var(--tk-warn); }

.pay-methods { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; color: var(--cream-ink-2); font-size: var(--fs-sm); align-items: center; }
.pay-methods span { padding: 4px 10px; border: 1px solid var(--tk-ink-line); border-radius: 999px; font-weight: 700; color: var(--cream-ink); }
.pay-methods small { font-size: 1em; }

/* Barra fixa no celular: total + ação (estado sempre visível) */
.buy-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: none; align-items: center; justify-content: space-between; gap: 14px;
    padding: 12px var(--pad-x) calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(5, 13, 34, 0.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--tk-line);
    transform: translateY(100%); transition: transform 0.3s var(--ease-out);
}
.buy-bar.show { transform: translateY(0); }
.buy-bar.show.docked { transform: translateY(100%); } /* botão de verdade está visível: a barra recolhe */
.buy-bar { min-height: calc(var(--tap-lg) + 24px); }
.buy-bar .bb-info { min-width: 0; }
.buy-bar .bb-info small { display: block; color: var(--text-2); font-size: var(--fs-xs); font-weight: 700; }
.buy-bar .bb-info b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; line-height: 1.1; color: var(--gold-bright); font-variant-numeric: tabular-nums; white-space: nowrap; }
.buy-bar .btn-big { width: auto; margin: 0; min-height: var(--tap-lg); padding: 0 22px; font-size: 1.1rem; flex-shrink: 0; }

/* ---------- Pedido ---------- */
.order-status {
    padding: 30px 24px; border-radius: var(--radius-lg); text-align: center; margin-bottom: 26px;
    background: var(--navy-800); border: 1px solid rgba(212, 175, 55, 0.3); box-shadow: var(--shadow-panel);
}
.order-status .icon { font-size: 3rem; line-height: 1; margin-bottom: 10px; }
.order-status h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 5vw, 2.4rem); color: var(--text); line-height: 1.12; }
.order-status p { color: var(--text-2); margin-top: 12px; max-width: 55ch; margin-inline: auto; }
.order-status.paid { border-color: var(--tk-ok-soft); }
.order-status.paid h1 { color: var(--tk-ok-soft); }
.order-status.pending { border-color: var(--gold); }
.order-status.pending h1 { color: var(--gold-bright); }
.order-status.dead { border-color: var(--tk-err-soft); }
.order-status.dead h1 { color: var(--tk-err-soft); }
.order-status .actions { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin: 20px auto 0; }
.order-status .actions .btn-big { margin-top: 0; }
.pulse { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--gold-bright); margin-right: 8px; animation: tk-pulse 1.2s ease-out infinite; vertical-align: middle; }
@keyframes tk-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.6); } 100% { box-shadow: 0 0 0 14px rgba(255, 215, 0, 0); } }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }

.order-meta { color: var(--text-2); font-size: 1rem; text-align: center; margin-bottom: 26px; }
.order-meta b { color: var(--text); }
.order-meta a { color: var(--gold-bright); }

.share-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 0 0 28px; }
.share-row .btn-big { width: auto; min-height: 54px; padding: 0 20px; font-size: 1.05rem; margin: 0; }

.order-items { max-width: 520px; margin: 0 auto 26px; padding: 22px 24px 32px; }
.order-items .summary-line, .order-items .summary-total span { color: var(--cream-ink); }
.order-items a { color: var(--royal); font-weight: 700; }

.tickets-title { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: var(--gold-bright); margin: 0 0 16px; }
.tickets { display: grid; gap: 20px; }

/* O ingresso: papel creme com picote — se destaca do fundo azul e imprime bem */
.ticket {
    display: grid; grid-template-columns: 1fr 260px;
    background: var(--cream); color: var(--cream-ink); border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: 0 20px 44px -18px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(30, 63, 158, 0.2);
}
.ticket-main { padding: 22px 26px 26px; border-right: 2px dashed var(--tk-ink-line); position: relative; }
.ticket-main::before, .ticket-main::after {
    content: ''; position: absolute; width: 28px; height: 28px; border-radius: 50%;
    background: var(--navy-900); right: -15px; z-index: 1;
}
.ticket-main::before { top: -14px; }
.ticket-main::after { bottom: -14px; }
.ticket-event { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; color: var(--cream-ink-2); }
.ticket-holder { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; line-height: 1.12; margin-top: 8px; color: var(--royal); }
.ticket-type { display: inline-block; margin-top: 12px; padding: 6px 12px; border-radius: 999px; background: var(--royal); color: var(--cream); font-weight: 700; font-size: 0.95rem; }
.ticket-when { margin-top: 14px; color: var(--cream-ink); font-size: 1.02rem; line-height: 1.5; }
.ticket-code { margin-top: 14px; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; color: var(--navy-950); }
.ticket-code small { display: block; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-ink-2); font-weight: 700; }
.ticket-qr { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px; background: #fff; position: relative; }
.ticket-qr img { width: 100%; max-width: 220px; height: auto; image-rendering: pixelated; }
.ticket-qr span { margin-top: 8px; font-size: 0.85rem; color: var(--cream-ink-2); font-weight: 700; text-align: center; }
.ticket.used { filter: grayscale(0.6); }
.ticket.used .ticket-qr::after, .ticket.cancelled .ticket-qr::after {
    content: attr(data-stamp); position: absolute; top: 18px; right: 18px; transform: rotate(8deg);
    border: 3px solid var(--tk-err); color: var(--tk-err); padding: 6px 12px; border-radius: var(--radius);
    font-weight: 700; letter-spacing: 0.1em; font-size: 1rem; background: rgba(255,255,255,0.9);
}
.ticket.cancelled { filter: grayscale(0.8); }

.door-note { margin-top: 28px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--tk-line); background: rgba(212, 175, 55, 0.08); color: var(--text); line-height: 1.6; }
.door-note b { color: var(--gold-bright); }

/* ---------- Ingresso individual ---------- */
.status-banner { padding: 22px 20px; border-radius: var(--radius-lg); text-align: center; margin-bottom: 22px; }
.status-banner b { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 6vw, 2.2rem); letter-spacing: 0.02em; line-height: 1.1; }
.status-banner span { display: block; margin-top: 6px; font-weight: 700; font-size: 1.05rem; }
.status-banner.valid { background: rgba(21, 128, 61, 0.25); border: 2px solid var(--tk-ok-soft); color: var(--tk-ok-soft); }
.status-banner.used { background: rgba(185, 28, 28, 0.25); border: 2px solid var(--tk-err-soft); color: var(--tk-err-soft); }
.status-banner.cancelled { background: rgba(63, 79, 122, 0.35); border: 2px solid var(--text-2); color: var(--text-2); }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
    .buy-layout { grid-template-columns: 1fr; }
    .buy-bar { display: flex; }
}
@media (max-width: 640px) {
    .tk-page { padding-bottom: 150px; }
    .ev-card { grid-template-columns: 76px 1fr; gap: 16px; padding: 18px; }
    .ev-card .ev-price { grid-column: 2; text-align: left; }
    .ev-card .ev-price .value { display: inline-block; margin-right: 10px; }
    .date-block { width: 76px; min-height: 84px; }
    .date-block b { font-size: 2rem; }
    .ev-hero { grid-template-columns: 76px 1fr; gap: 16px; }
    .ev-hero-body { grid-column: 1 / -1; }
    .ev-hero .date-block { display: none; }
    .ev-actions .ev-pop { flex: 1 1 100%; }
    .ev-actions .ev-btn { width: 100%; justify-content: center; min-height: 52px; }
    .ev-pop-menu { min-width: 0; left: 0; right: 0; }
    .ev-info > div { grid-template-columns: 1fr; gap: 2px; }
    .tk-panel { padding: 22px 18px 40px; }
    .tt-row { grid-template-columns: 1fr; }
    .tt-row .qty { justify-self: start; }
    .ticket { grid-template-columns: 1fr; }
    .ticket-main { border-right: none; border-bottom: 2px dashed var(--tk-ink-line); }
    .ticket-main::before, .ticket-main::after { top: auto; bottom: -15px; }
    .ticket-main::before { left: -14px; right: auto; }
    .ticket-main::after { right: -14px; }
    .ticket-qr img { max-width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
    .ev-card:hover, .btn-big:hover:not(:disabled) { transform: none; }
    .pulse { animation: none; }
    .buy-bar { transition: none; }
    .ev-pop-menu { animation: none; }
}

/* ---------- Impressão: só os ingressos, um por página ---------- */
@media print {
    body { background: #fff !important; color: #000; }
    .site-header, .site-footer, .skip-link, #announcement-bar, .share-row, .door-note, .order-meta, .tk-back, .buy-bar, .no-print, .order-items { display: none !important; }
    .tk-page { padding: 0; max-width: none; }
    .order-status { border: 1px solid #999; color: #000; background: #fff; box-shadow: none; }
    .order-status h1, .order-status p { color: #000; }
    .ticket { box-shadow: none; border: 1px solid #999; page-break-inside: avoid; break-inside: avoid; margin-bottom: 20px; background: #fff; }
    .ticket-main::before, .ticket-main::after { background: #fff; border: 1px solid #999; }
}

/* ==========================================================================
   Oficinas — /oficinas e /oficinas/:slug
   Reaproveita a estrutura das páginas de evento (.tk-page, .panel/.tk-panel,
   .btn-big, .field, .ev-facts). Só o que é específico da turma mora aqui.
   ========================================================================== */

/* Capa: a arte da oficina pode ser cartaz VERTICAL ou banner horizontal. Por isso a
   imagem é CONTIDA (object-fit: contain) sobre um fundo da paleta, nunca recortada —
   cortar um cartaz é cortar o texto dele. Sem arte, o bloco simplesmente não existe:
   a página segue bonita com a identidade do site, sem buraco nem placeholder. */
.wk-cover-frame {
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, rgba(30, 63, 158, 0.35), rgba(7, 22, 52, 0.85));
    border: 2px solid var(--royal);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel);
    padding: 12px;
    margin-bottom: 26px;
}
.wk-cover {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(62vh, 560px);
    height: auto;
    object-fit: contain;
    border-radius: var(--radius);
}

.wk-hero { margin-bottom: 26px; }
.wk-hero h1 {
    font-family: var(--font-display); font-weight: 400;
    font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.08; color: var(--gold-bright);
}
.wk-sub { margin-top: 10px; color: var(--text); font-size: 1.12rem; line-height: 1.5; max-width: 60ch; }
.wk-hero .ev-facts { margin-top: 18px; }

/* Vagas: o número que a organização e o público olham primeiro */
.wk-seats {
    margin-top: 22px; padding: 18px 20px;
    border: 1px solid var(--tk-line); border-radius: var(--radius-lg);
    background: rgba(212, 175, 55, 0.08);
}
.wk-seats-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.wk-seats-top b { font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; color: var(--gold-bright); line-height: 1; }
.wk-seats-top span { color: var(--text-2); font-weight: 700; font-size: 0.98rem; }
.wk-bar { margin-top: 12px; height: 12px; border-radius: 999px; background: rgba(7, 22, 52, 0.5); overflow: hidden; border: 1px solid var(--tk-ink-line); }
.wk-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
.wk-min-note { margin: 12px 0 0; color: var(--text); font-weight: 700; line-height: 1.5; display: flex; gap: 10px; align-items: flex-start; }
.wk-min-note .ic { color: var(--gold-bright); margin-top: 2px; }
.wk-min-note.ok .ic { color: var(--tk-ok-soft); }

.wk-soldout {
    margin-top: 22px; padding: 20px; text-align: center;
    border: 2px solid var(--tk-err-soft); border-radius: var(--radius-lg);
    background: rgba(185, 28, 28, 0.22); color: var(--tk-err-soft);
}
.wk-soldout b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; line-height: 1.15; }
.wk-soldout span { display: block; margin-top: 6px; color: var(--text); font-weight: 700; }

/* Datas dos encontros */
.wk-dates { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.wk-date {
    display: flex; align-items: baseline; gap: 8px;
    padding: 10px 12px; border-radius: var(--radius);
    border: 1px solid var(--tk-line); background: rgba(30, 63, 158, 0.12); color: var(--text);
}
.wk-date small { color: var(--text-2); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }
.wk-date b { font-weight: 700; font-size: 1.02rem; }
/* Presença já marcada na entrada (página da inscrição) */
.wk-date.done { border-color: rgba(34, 197, 94, 0.6); background: rgba(34, 197, 94, 0.14); }
.wk-date.done small { color: #86efac; }

/* Texto de divulgação: parágrafos de verdade a partir das quebras de linha (escapado no JS) */
.wk-desc { color: var(--text-2); line-height: 1.7; max-width: 68ch; font-size: 1.06rem; }
.wk-desc p { margin: 0 0 14px; }
.wk-desc p:last-child { margin-bottom: 0; }

/* "Como funciona" — seis passos numerados, entre o preço e o formulário. Letra grande
   (corpo >= 19px), número em dourado, nada abaixo do piso de leitura do site. */
.wk-how { max-width: 68ch; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--tk-line); }
.wk-how h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; color: var(--gold-bright); margin: 0 0 18px; }
.wk-steps { list-style: none; margin: 0; padding: 0; counter-reset: passo; display: grid; gap: 22px; }
.wk-steps > li { position: relative; padding-left: 58px; counter-increment: passo; }
.wk-steps > li::before {
    content: counter(passo);
    position: absolute; left: 0; top: 0;
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--gold-bright); color: var(--navy-950);
    font-family: var(--font-display); font-size: 1.35rem; line-height: 1;
}
.wk-steps > li > b { display: block; font-size: 1.2rem; line-height: 1.3; color: var(--text); margin: 6px 0 6px; }
.wk-steps > li > p { margin: 0 0 8px; color: var(--text-2); font-size: 1.06rem; line-height: 1.6; }
.wk-steps > li > p:last-child { margin-bottom: 0; }
.wk-steps p b { color: var(--text); }
.wk-steps a { color: var(--gold-bright); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.wk-mono { font-family: Consolas, Menlo, monospace; font-size: 0.95em; color: var(--text); word-break: break-all; }
.wk-step-dates {
    list-style: none; margin: 4px 0 12px; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px;
}
.wk-step-dates li {
    display: flex; flex-direction: column; gap: 2px;
    padding: 8px 12px; border: 1px solid var(--tk-line); border-radius: var(--radius);
    background: rgba(7, 22, 52, 0.45); color: var(--text);
}
.wk-step-dates small { color: var(--text-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.02em; }
.wk-step-dates b { font-size: 1.05rem; }
/* Encontros que já aconteceram (apagados, data riscada) × os que faltam (✓ incluso) */
.wk-step-dates .wk-chip-on { border-color: var(--gold-bright); }
.wk-chip-tag { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.wk-chip-on .wk-chip-tag span { color: var(--gold-bright); }
.wk-chip-off { opacity: 0.8; border-style: dashed !important; background: transparent !important; }
.wk-chip-off s { text-decoration-thickness: 2px; }
.wk-chip-off .wk-chip-tag { color: var(--text-2); font-weight: 600; }
.wk-dates .wk-date { flex-wrap: wrap; }
.wk-dates .wk-chip-tag { flex-basis: 100%; }
.wk-passed-line { margin: 6px 0 10px; color: var(--text); font-size: 1.12rem; line-height: 1.5; }
.wk-passed-line b { color: var(--gold-bright); }
.wk-summary-passed { margin: 8px 0 0; color: var(--text-2); font-size: 1.12rem; line-height: 1.5; overflow-wrap: anywhere; }

/* Comprador lembrado neste aparelho (js/comprador.js): a linha "Preenchemos com seus
   dados de…" acima do nome e o aviso LGPD de uma linha dentro do formulário. */
.tk-panel .buyer-memo {
    margin: 0 0 16px; padding: 12px 14px;
    border: 1px solid var(--tk-ink-line); border-left: 4px solid var(--royal); border-radius: var(--radius);
    background: rgba(30, 63, 158, 0.08); color: var(--cream-ink);
    font-size: var(--fs-sm); line-height: 1.5;
}
.buyer-swap {
    background: none; border: 0; padding: 0; margin: 0;
    font: inherit; font-weight: 700; color: var(--royal);
    text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
    min-height: 0; line-height: inherit;
}
.buyer-swap:hover, .buyer-swap:focus-visible { color: var(--navy-800); }
.buyer-swap:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 2px; }
.tk-panel .buyer-lgpd { margin: -4px 0 18px; color: var(--cream-ink-2); font-size: var(--fs-xs); line-height: 1.45; }

/* "Tem o instrumento?" — dois alvos grandes, escolha com uma mão */
.wk-choice { display: flex; gap: 10px; flex-wrap: wrap; }
.wk-choice label {
    position: relative;
    flex: 1 1 140px; display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 56px; padding: 10px 14px; cursor: pointer;
    border: 2px solid var(--tk-ink-line); border-radius: var(--radius);
    background: var(--cream-deep); color: var(--cream-ink); font-weight: 700; font-size: 1.05rem;
}
.wk-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.wk-choice label.on { border-color: var(--royal); background: var(--royal); color: var(--cream); }
.wk-choice label:focus-within { outline: 3px solid var(--gold-bright); outline-offset: 3px; }

/* Aceite das regras ("vou a todos os encontros; sem reembolso"): logo acima do botão,
   nasce desmarcado, e a LINHA inteira é o alvo (≥ 48px, texto 18px) — nunca só a caixinha */
.tk-panel .field.wk-terms { margin: 18px 0 0; }
.tk-panel .field label.wk-terms-row {
    display: flex; align-items: flex-start; gap: 14px;
    min-height: 48px; margin: 0; padding: 12px 14px; cursor: pointer;
    border: 2px solid var(--tk-ink-line); border-radius: var(--radius);
    background: var(--cream-deep); color: var(--cream-ink);
    font-size: 18px; font-weight: 400; line-height: 1.4;
}
.tk-panel .field .wk-terms-row input[type="checkbox"] {
    flex: 0 0 auto; width: 26px; height: 26px; min-height: 0; margin: 2px 0 0; padding: 0;
    accent-color: var(--royal); cursor: pointer; border-radius: 4px;
}
.tk-panel .field label.wk-terms-row.on { border-color: var(--royal); background: rgba(30, 63, 158, 0.08); }
.tk-panel .field.invalid label.wk-terms-row { border-color: var(--tk-err); }
.tk-panel .field label.wk-terms-row:focus-within { outline: 3px solid var(--gold-bright); outline-offset: 3px; }
.tk-panel .field textarea,
.tk-panel .field select {
    width: 100%; padding: 14px 16px; font-size: 1.05rem; font-family: inherit;
    border: 2px solid var(--tk-ink-line); border-radius: var(--radius);
    background: #fff; color: var(--cream-ink);
}
.tk-panel .field textarea:focus, .tk-panel .field select:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 4px rgba(30, 63, 158, 0.18); }

/* Cartão da lista /oficinas */
.wk-card { display: block; padding: 20px 22px; }
.wk-card .wk-thumb { width: 100%; max-height: 260px; object-fit: contain; background: rgba(7, 22, 52, 0.6); border-radius: var(--radius); margin-bottom: 12px; }
.wk-card h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.15; color: var(--text); }
.wk-card-meta { color: var(--text-2); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.wk-tag {
    display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 999px;
    font-size: 0.85rem; font-weight: 700; background: rgba(212, 175, 55, 0.18); color: var(--gold-bright);
}
.wk-tag.off { background: rgba(185, 28, 28, 0.25); color: var(--tk-err-soft); }

@media (max-width: 640px) {
    .wk-dates { grid-template-columns: 1fr 1fr; }
    .wk-cover-frame { padding: 8px; }
}

/* Bar virtual: a chamada mais quente da faixa de ações do evento — na noite da festa é
   o botão que a pessoa procura primeiro. Dourado sólido, e não contorno, para ganhar
   dos demais sem precisar de tamanho maior. */
.ev-btn-bar {
    background: var(--gold-bright);
    border-color: var(--gold-bright);
    color: var(--navy-950);
    text-decoration: none;
}
.ev-btn-bar:hover { background: var(--gold-pale); border-color: var(--gold-pale); color: var(--navy-950); }

/* Relógio da reserva no pedido: classe própria — `.countdown` do style.css é o bloco
   creme do contador da home e virava um painel no meio da frase. */
.tk-countdown {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--gold-bright);
    white-space: nowrap;
}
