/* PRISMA — venta de entradas: compra, carrito, entradas con QR y área de cliente.
   Mismo lenguaje que la web (negro, Exo 2, líneas finas). Lo propio: el «espectro» del prisma,
   una línea de color que solo aparece donde importa (la entrada válida y el tiempo de reserva). */
:root {
  --spectrum: linear-gradient(90deg, #ff2d55, #ff9f0a, #ffd60a, #30d158, #0ac8ff, #5e5ce6, #bf5af2);
  --tk-ok: #30d158;
  --tk-warn: #ffd60a;
  --tk-err: #ff453a;
}

.tk { padding-bottom: 80px; position: relative; z-index: 2; }
.tk .back { display: inline-block; margin: 6px 0 26px; color: var(--mute); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; }
.tk .back:hover { color: #fff; }
.tk-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); max-width: 980px; }
@media (min-width: 900px) {
  .tk-grid { grid-template-columns: 340px minmax(0, 1fr); align-items: start; }
  .tk-grid .tk-ev { flex-direction: column; align-items: stretch; margin: 0; }
  .tk-grid .tk-cover { width: 100%; aspect-ratio: 4 / 5; }
}

/* Cabecera del evento */
.tk-ev { display: flex; gap: 18px; align-items: center; margin-bottom: 26px; }
.tk-cover { width: 84px; aspect-ratio: 1; flex: none; overflow: hidden; border: 1px solid var(--line); position: relative; background: #050505; }
.tk-cover img, .tk-cover .cover { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.tk-h { font-size: clamp(30px, 5vw, 56px); font-weight: 600; line-height: .98; text-transform: uppercase; letter-spacing: -.01em; margin: 10px 0 8px; overflow-wrap: anywhere; }
.tk-head h1 { font-size: clamp(40px, 7vw, 96px); }

/* Tarjeta de compra */
.tk-card { border: 1px solid var(--line); background: rgba(0, 0, 0, .66); padding: clamp(20px, 4vw, 36px); position: relative; max-width: 980px; }
.tk-big { font-size: clamp(22px, 3.4vw, 32px); font-weight: 300; line-height: 1.2; margin-bottom: 10px; }
.tk-fase { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.tk-fase b { font-size: 28px; font-weight: 400; }
.tk-chip { font-size: 10px; letter-spacing: .36em; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, .35); padding: 7px 10px 7px 13px; }
.tk-pocas { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--tk-warn); }
.tk-step { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.tk-step label { margin: 0; flex-basis: 100%; }
.tk-qty { display: inline-flex; align-items: stretch; border: 1px solid rgba(255, 255, 255, .35); }
.tk-qty button { width: 56px; min-height: 56px; background: none; border: 0; color: #fff; font-size: 26px; font-weight: 300; cursor: pointer; transition: background .25s; }
.tk-qty button:hover { background: rgba(255, 255, 255, .08); }
.tk-qty button:active { background: rgba(255, 255, 255, .16); }
.cform .tk-qty input { width: 64px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 22px; padding: 0; -moz-appearance: textfield; }
.tk-qty input::-webkit-outer-spin-button, .tk-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tk-fields { display: grid; gap: 22px 28px; grid-template-columns: minmax(0, 1fr); padding: 26px 0 16px; }
@media (min-width: 640px) { .tk-fields { grid-template-columns: 1fr 1fr; } }
.cform .opt { letter-spacing: .1em; text-transform: none; }
.tk-check { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 4px; font-size: 14px; font-weight: 300; line-height: 1.5; color: var(--dim); cursor: pointer; }
.tk-check input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: #fff; }
.tk-check a { text-decoration: underline; color: #fff; }
.tk-total { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 26px 0 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.tk-total > div { display: flex; flex-direction: column; gap: 6px; }
.tk-total b { font-size: 34px; font-weight: 400; font-variant-numeric: tabular-nums; }
.tk-total .btn, .tk-pay { min-height: 56px; padding: 0 30px; }
.tk-err { color: var(--tk-err); font-size: 14px; margin: 6px 0 12px; }
.tk-aviso { border: 1px solid var(--line); border-left: 2px solid #fff; padding: 14px 18px; margin: 0 0 22px; font-size: 14px; line-height: 1.5; color: var(--dim); max-width: 980px; }
.tk .note a { text-decoration: underline; }
.hp { position: absolute; left: -9999px; }

/* Carrito: cuenta atrás */
.tk-cart { max-width: 620px; }
.tk-timer { margin: -2px 0 24px; }
.tk-timer-bar { height: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-bottom: 12px; }
.tk-timer-bar i { display: block; height: 100%; width: 100%; background: var(--spectrum); transform-origin: left; transition: transform 1s linear; }
.tk-timer span { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.tk-timer b { color: #fff; font-weight: 400; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.tk-timer.fin b { color: var(--tk-warn); }
.tk-lineas > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 300; }
.tk-lineas .tot { font-size: 22px; border-bottom: 0; padding: 18px 0 22px; }
.tk-lineas b { font-weight: 400; font-variant-numeric: tabular-nums; }
.tk-pay { width: 100%; }
.tk-cart .note { margin-top: 14px; }
.tk-cancel { margin-top: 18px; }
.tk-link { background: none; border: 0; color: var(--mute); font: 300 13px 'Exo 2', sans-serif; text-decoration: underline; cursor: pointer; padding: 6px 0; }
.tk-link:hover { color: #fff; }

/* Pagado */
.tk-ok { max-width: 980px; margin-bottom: 26px; }
.tk-ok .tk-big { font-size: clamp(34px, 6vw, 64px); font-weight: 600; text-transform: uppercase; }
.tk-acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.tk-acciones form { display: contents; }
.tk-tickets { display: grid; gap: 18px; max-width: 980px; }
.tk-pie { margin-top: 18px; }

/* Entrada: matriz + resguardo con muescas y perforado */
.tk-ticket { --notch: 13px; display: grid; grid-template-columns: minmax(0, 1fr); background: #f4f2ee; color: #0b0b0b; position: relative; }
.tk-ticket::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--spectrum); }
.tk-ticket.off::before { background: #b9b9b9; }
.tk-ticket-a { padding: 26px 22px 18px; }
.tk-ticket .kicker { color: #6a6a6a; }
.tk-ticket .kicker::before { background: rgba(0, 0, 0, .2); }
.tk-ticket h2 { font-size: clamp(22px, 4vw, 32px); font-weight: 600; text-transform: uppercase; line-height: 1; margin: 12px 0 16px; overflow-wrap: anywhere; }
.tk-ticket dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.tk-ticket dt { font-size: 9px; letter-spacing: .34em; text-transform: uppercase; color: #6a6a6a; padding-top: 3px; }
.tk-ticket-b { border-top: 2px dashed rgba(0, 0, 0, .25); padding: 20px 22px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.tk-ticket code { font: 600 17px/1 ui-monospace, 'DejaVu Sans Mono', monospace; letter-spacing: .14em; }
.tk-qr { display: block; width: min(64vw, 240px); aspect-ratio: 1; background: #fff; }
.tk-qr svg { display: block; width: 100%; height: 100%; }
.tk-sello { width: min(64vw, 240px); aspect-ratio: 1; display: grid; place-items: center; border: 2px solid currentColor; color: #8a8a8a;
  font-size: 13px; letter-spacing: .3em; text-transform: uppercase; transform: rotate(-6deg); }
.tk-ticket.off .tk-ticket-a { opacity: .55; }
@media (min-width: 720px) {
  .tk-ticket { grid-template-columns: minmax(0, 1fr) 300px; }
  .tk-ticket { --muesca: radial-gradient(circle var(--notch) at calc(100% - 300px) 0, transparent 98%, #000 100%) top / 100% 51% no-repeat,
                         radial-gradient(circle var(--notch) at calc(100% - 300px) 100%, transparent 98%, #000 100%) bottom / 100% 51% no-repeat;
               -webkit-mask: var(--muesca); mask: var(--muesca); }
  .tk-ticket-a { padding: 34px 32px 28px; }
  .tk-ticket-b { border-top: 0; border-left: 2px dashed rgba(0, 0, 0, .25); }
  .tk-qr, .tk-sello { width: 220px; }
}

/* Área de cliente */
.tk-cuenta { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 980px; margin: 8px 0 10px; }
.tk-tile { border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: border-color .3s, background .3s; background: rgba(0, 0, 0, .5); }
.tk-tile:hover { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .03); }
.tk-tile b { font-size: 26px; font-weight: 400; }
.tk-sec { font-size: 11px; font-weight: 400; letter-spacing: .5em; text-transform: uppercase; color: var(--mute); margin: 46px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); max-width: 980px; }
.tk-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); max-width: 980px; }
.tk-row > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.tk-row b { font-weight: 400; font-size: 17px; }
.tk-row-cart { border: 1px solid rgba(255, 255, 255, .3); padding: 16px 18px; position: relative; overflow: hidden; }
.tk-row-cart::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--spectrum); }
.tk-row-t { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.tk-evcard { border: 1px solid var(--line); margin-bottom: 16px; max-width: 980px; background: rgba(0, 0, 0, .55); }
.tk-evcard header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 20px 22px; }
.tk-evcard h3 { font-size: 24px; font-weight: 600; text-transform: uppercase; margin: 8px 0 6px; }
.tk-evcard-b { display: flex; gap: 10px; align-items: center; }
.tk-evcard-b .btn { padding: 14px 18px; }
.tk-strip { display: flex; gap: 12px; overflow-x: auto; padding: 0 22px 22px; scroll-snap-type: x mandatory; }
.tk-mini { flex: none; scroll-snap-align: start; background: #f4f2ee; border: 0; padding: 10px 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: #0b0b0b; }
.tk-mini .tk-qr, .tk-mini .tk-sello { width: 112px; }
.tk-mini .tk-sello { font-size: 9px; transform: none; }
.tk-mini .note { color: #555; }
.tk-mini.off { cursor: default; opacity: .7; }
.tk-vacio { border: 1px dashed var(--line); padding: 34px 24px; text-align: center; max-width: 980px; color: var(--dim); }
.tk-vacio svg { width: 110px; color: rgba(255, 255, 255, .4); margin: 0 auto 14px; }
.tk-vacio p { margin-top: 8px; }

/* QR ampliado (mi cuenta) */
.tk-dlg { border: 0; padding: 26px 22px; background: #f4f2ee; color: #0b0b0b; width: min(92vw, 420px); text-align: center; }
.tk-dlg::backdrop { background: rgba(0, 0, 0, .85); }
.tk-dlg .kicker { color: #555; justify-content: center; }
.tk-dlg .kicker::before { display: none; }
.tk-qr-xl { width: 100%; margin: 16px 0; }
.tk-dlg code { display: block; font: 600 22px ui-monospace, monospace; letter-spacing: .14em; margin-bottom: 8px; }
.tk-dlg .note { color: #555; margin-bottom: 18px; }
.tk-dlg .btn.ghost { color: #000; border-color: #000; width: 100%; }

/* Ficha del evento: caja de compra */
.tk-buy { margin-top: 24px; }
.tk-buy .tk-fase { border: 0; padding: 0 0 14px; }
.tk-buy .tk-fase b { font-size: 24px; }
.tk-buy-row { display: flex; gap: 10px; align-items: stretch; }
.tk-buy-row .tk-qty button { width: 44px; min-height: 52px; font-size: 22px; }
.tk-buy-row .tk-qty input { width: 44px; background: none; color: #fff; text-align: center; border: 0; font: 300 18px 'Exo 2', sans-serif; border-left: 1px solid var(--line); border-right: 1px solid var(--line); -moz-appearance: textfield; }
.tk-buy-row .btn { flex: 1; min-height: 54px; }
.tier .tk-est { font-size: 9px; letter-spacing: .3em; text-transform: uppercase; color: var(--mute); margin-left: 8px; }
.tier.now { color: #fff; }
.tier.now .tk-est { color: var(--tk-ok); }
.tier.later { color: var(--mute); }

/* Pasarela de pruebas */
.tk-demo { background: #111; color: #fff; font-family: 'Exo 2', sans-serif; display: grid; place-items: center; min-height: 100vh; text-align: center; }
.tk-demo h1 { font-size: 56px; margin: 14px 0; }
.tk-demo button { margin-top: 26px; padding: 16px 22px; font: inherit; border: 1px solid #fff; background: #fff; color: #000; cursor: pointer; }
.tk-demo button[value="ko"] { background: none; color: #fff; }

@media (prefers-reduced-motion: reduce) { .tk-timer-bar i { transition: none; } }
@media print {
  .nav, .menu, .foot, .back, .tk-acciones, .grain, .vig, .cur, .cur-ring { display: none !important; }
  html, body { background: #fff; }
  .tk-ticket { break-inside: avoid; -webkit-mask: none; border: 1px solid #000; }
}

/* Código promocional y entradas pasadas a otra persona */
.tk-promo { margin: 4px 0 18px; }
.tk-promo summary { cursor: pointer; font-size: 13px; color: var(--dim); text-decoration: underline; padding: 6px 0; }
.tk-promo > div { margin-top: 12px; max-width: 320px; display: flex; flex-direction: column; gap: 6px; }
.cform .tk-promo input { text-transform: uppercase; letter-spacing: .12em; }
.tk-lineas .desc b { color: var(--tk-ok); }
.tk-pasar { width: 100%; border-top: 1px dashed rgba(0, 0, 0, .25); padding-top: 12px; color: #0b0b0b; }
.tk-pasar summary { cursor: pointer; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; text-align: center; padding: 6px 0; }
.tk-pasar form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.tk-pasar input { width: 100%; border: 1px solid rgba(0, 0, 0, .3); background: #fff; color: #000; font: 300 15px 'Exo 2', sans-serif; padding: 11px 10px; border-radius: 0; }
.tk-pasar button { background: #0b0b0b; color: #fff; border: 0; padding: 13px; font: 500 11px 'Exo 2', sans-serif; letter-spacing: .26em; text-transform: uppercase; cursor: pointer; }
.tk-pasar .note { color: #555; }
.tk-pasada { text-align: center; font-size: 13px; color: #333; line-height: 1.5; }
.tk-pasada b { display: block; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: #6a6a6a; margin-bottom: 4px; }
