:root {
  --navy: #183247;
  --teal: #0f766e;
  --teal-dark: #0b5d57;
  --ink: #203543;
  --muted: #657785;
  --page: #f5f7f8;
  --line: #dce5e8;
  --white: #ffffff;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; line-height: 1.5; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #38b6a6; outline-offset: 3px; }
[hidden] { display: none !important; }
.container { width: min(1160px, calc(100% - 36px)); margin: 0 auto; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-content { display: flex; justify-content: space-between; align-items: center; min-height: 78px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; background: var(--navy); color: white; border-radius: 12px; font-size: 15px; font-weight: 800; letter-spacing: -.05em; }
.brand-name { font-size: 20px; font-weight: 500; letter-spacing: -.04em; white-space: nowrap; }
.navigation { display: flex; gap: 28px; }
.navigation a { color: #4c6070; font-size: 14px; text-decoration: none; font-weight: 600; }
.navigation a:hover { color: var(--teal); }

.hero { padding: 64px 0; background: linear-gradient(125deg, #183247, #24465a); color: white; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 52px; align-items: center; }
.eyebrow { display: inline-block; color: #87ded2; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.eyebrow-dark { color: var(--teal); }
h1, h2, h3, h4, p { margin-top: 0; }
.hero h1 { max-width: 630px; margin: 16px 0; font-size: clamp(32px, 4.2vw, 52px); line-height: 1.13; letter-spacing: -.045em; }
.hero-copy > p { max-width: 550px; color: #d7e2e8; font-size: 16px; }
.primary-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 10px; padding: 14px 20px; color: white; background: var(--teal); border-radius: 11px; font-size: 14px; font-weight: 750; text-decoration: none; }
.primary-link:hover { background: var(--teal-dark); }
.hero-highlights { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 21px; font-size: 12px; font-weight: 650; color: #b7e5df; }
.prize-card { padding: 30px; border: 1px solid #466272; border-radius: 20px; background: rgba(255,255,255,.075); }
.prize-kicker { font-size: 11px; letter-spacing: .13em; color: #b7d1d9; font-weight: 750; }
.prize-number { margin-top: 6px; font-size: clamp(34px, 4vw, 46px); font-weight: 850; letter-spacing: -.05em; }
.prize-number small { font-size: 15px; font-weight: 600; letter-spacing: normal; }
.prize-card > p { margin: 0; color: #d9e5e9; font-size: 14px; }
.prize-line { margin: 22px 0; height: 1px; background: #577281; }
.prize-details { display: grid; gap: 13px; }
.prize-details > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13px; }
.prize-details span { color: #c0d2da; }
.prize-details strong { text-align: right; }

.section { padding: 56px 0; }
.section-title { margin-bottom: 24px; }
.section h2 { margin: 7px 0 6px; font-size: clamp(25px, 3vw, 34px); line-height: 1.2; letter-spacing: -.035em; }
.section-title p { margin-bottom: 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.stat-label { color: var(--muted); font-size: 13px; }
.stat strong { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--navy); }
.tickets-layout { display: grid; grid-template-columns: minmax(0, 1fr) 335px; align-items: start; gap: 20px; }
.panel { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 7px 25px rgba(26,55,70,.035); }
.grid-panel { padding: 23px; }
.grid-tools { display: flex; align-items: end; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12px; font-weight: 750; color: #4b6070; }
.search-field { flex: 1; min-width: 0; }
.filter-field { width: 164px; flex: none; }
.field input, .field select { width: 100%; height: 46px; padding: 0 12px; border: 1px solid #cad8de; border-radius: 9px; background: #fff; color: var(--ink); outline-offset: 2px; }
.field input::placeholder { color: #8998a3; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; color: #566a75; font-size: 12px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1px solid; }
.available-dot { background: #fff; border-color: #98abb5; }
.reserved-dot { background: #f6d48b; border-color: #b5862f; }
.sold-dot { background: #e2a1a2; border-color: #bb777a; }
.results-line { display: flex; justify-content: space-between; gap: 10px; margin: 21px 0 11px; color: var(--muted); font-size: 12px; }
.ticket-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-flow: column; grid-template-rows: repeat(var(--filas-boletos, 25), auto); gap: 8px; }
.ticket { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 61px; padding: 6px 2px; border: 1px solid #d3dee2; border-radius: 9px; background: white; cursor: pointer; transition: background-color .12s ease, border-color .12s ease; }
.ticket:hover { border-color: var(--teal); }
.ticket-number { font-size: 15px; font-weight: 800; letter-spacing: .005em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.ticket-label { font-size: 10px; line-height: 1.2; color: var(--muted); }
.ticket--apartado { background: #fff5df; border-color: #e9c986; color: #805514; }
.ticket--apartado .ticket-label { color: #875b17; }
.ticket--vendido { background: #fae9e9; border-color: #e7babc; color: #8a4147; }
.ticket--vendido .ticket-label { color: #98585d; }
.ticket.is-selected { outline: 3px solid var(--teal); outline-offset: 0; border-color: var(--teal); }
.empty-state { padding: 45px 12px; color: var(--muted); text-align: center; background: var(--page); border-radius: 9px; }
.grid-note { margin: 17px 0 0; font-size: 11px; color: #7c8990; }

.detail-panel { padding: 23px; position: sticky; top: 16px; scroll-margin-top: 16px; }
.detail-heading { padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.detail-heading h3 { margin: 6px 0 0; font-size: 20px; letter-spacing: -.025em; }
.detail-empty { padding: 36px 6px 24px; text-align: center; }
.detail-illustration { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 17px; background: #eaf2f3; color: var(--teal); border-radius: 18px; font-size: 35px; font-weight: 750; }
.detail-empty h4 { margin-bottom: 7px; font-size: 17px; }
.detail-empty p { margin: 0; font-size: 13px; color: var(--muted); }
.detail-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 21px 0 5px; }
.detail-number { font-size: 38px; line-height: 1.1; font-weight: 850; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.status-pill { border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 750; }
.status-pill--disponible { background: #e1f3eb; color: #186c46; }
.status-pill--apartado { background: #fff0c8; color: #815506; }
.status-pill--vendido { background: #fce6e6; color: #923f43; }
.detail-description { margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.detail-subtitle { margin: 17px 0 10px; font-size: 13px; font-weight: 750; }
.associated-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; }
.associated-grid span { padding: 10px 0; border: 1px solid #dce7e8; border-radius: 7px; text-align: center; background: #f3f8f8; color: var(--navy); font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.detail-price { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin: 22px 0 15px; padding-top: 16px; border-top: 1px solid var(--line); }
.detail-price span { color: var(--muted); font-size: 13px; }
.detail-price strong { font-size: 19px; }
.request-button { display: flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; width: 100%; min-height: 46px; padding: 11px 13px; background: var(--teal); color: white; border: none; border-radius: 10px; font-weight: 750; cursor: pointer; }
.request-button:hover { background: var(--teal-dark); }
.detail-help { margin: 11px 0 0; color: var(--muted); font-size: 12px; }
.detail-warning { margin-top: 20px; padding: 12px; border-radius: 9px; background: #f4f6f7; color: #566670; font-size: 13px; }
.back-button { display: none; margin-top: 16px; padding: 9px 0; background: none; border: 0; color: var(--teal); font-weight: 700; cursor: pointer; }

.how-section { background: #eaf0f1; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; margin-top: 24px; }
.step { padding: 23px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.step-number { color: var(--teal); font-size: 13px; font-weight: 850; }
.step h3 { margin: 13px 0 8px; font-size: 18px; }
.step p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.important-note { margin: 22px 0 0; padding: 16px 20px; background: #fff; border-left: 3px solid var(--teal); color: #506675; font-size: 13px; border-radius: 7px; }
.site-footer a { color: #c3eae3; text-underline-offset: 3px; font-weight: 650; }
.site-footer a:hover { color: #fff; }
.site-footer { background: var(--navy); color: #c7d6dc; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 24px 0; font-size: 12px; }

@media (max-width: 950px) {
  .hero-layout { gap: 25px; }
  .tickets-layout { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
  .ticket-grid { grid-template-columns: repeat(8, minmax(0,1fr)); }
  .back-button { display: inline-block; }
}
@media (max-width: 680px) {
  .hero { padding: 44px 0; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(31px, 8.5vw, 41px); }
  .prize-card { padding: 23px; }
  .navigation { gap: 13px; }
  .navigation a { font-size: 12px; }
  .brand-name { font-size: 17px; }
  .brand-mark { width: 36px; height: 36px; }
  .stats { gap: 8px; }
  .stat { display: block; padding: 11px 12px; }
  .stat-label { display: block; font-size: 11px; }
  .stat strong { display: block; margin-top: 4px; font-size: 24px; }
  .ticket-grid { grid-template-columns: repeat(6, minmax(0,1fr)); gap: 7px; }
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .section { padding: 42px 0; }
}
@media (max-width: 440px) {
  .container { width: min(100% - 24px, 1160px); }
  .header-content { min-height: 68px; }
  .navigation a:last-child { display: none; }
  .grid-panel, .detail-panel { padding: 15px; }
  .grid-tools { gap: 8px; }
  .filter-field { width: 126px; }
  .field input, .field select { padding-left: 9px; padding-right: 9px; font-size: 13px; }
  .ticket-grid { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
  .ticket { min-height: 60px; }
  .ticket-number { font-size: 14px; }
  .ticket-label { font-size: 9.5px; }
  .legend { gap: 10px; font-size: 11px; }
  .prize-details > div { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
