/* Observatorio público del Campeonato de España de Hapkido 2026 */
:root {
  --navy: #101c50;
  --blue: #1a266a;
  --bright-blue: #2476d2;
  --red: #e31f2a;
  --green: #009447;
  --gold: #e8b522;
  --silver: #9da8b5;
  --bronze: #b87333;
  --ink: #18243a;
  --muted: #68758a;
  --line: #dce3ec;
  --surface: #ffffff;
  --background: #f3f6fa;
  --shadow: 0 14px 38px rgba(9, 27, 63, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--background); font-family: "Barlow", system-ui, sans-serif; }
button,input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
body:not(.authenticated) > .site-header,
body:not(.authenticated) > main,
body:not(.authenticated) > footer { display: none; }

.access-gate { min-height: calc(100vh - 5px); padding: 28px 16px; display: grid; place-items: center; background: radial-gradient(circle at 70% 15%,#27499b 0,transparent 35%),linear-gradient(145deg,#081337,#172b70); }
body.authenticated .access-gate { display: none; }
.access-card { width: min(100%,460px); padding: 34px; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: rgba(255,255,255,.98); box-shadow: 0 30px 75px rgba(0,0,0,.3); }
.access-mark { width: 66px; height: 66px; margin-bottom: 25px; display: grid; place-items: center; border-radius: 16px; color: white; background: linear-gradient(145deg,var(--bright-blue),var(--blue)); font-family: "Barlow Condensed"; font-size: 28px; font-weight: 900; box-shadow: 0 12px 28px rgba(16,28,80,.25); }
.access-card h1 { color: var(--blue); font-size: 39px; line-height: .96; }
.access-card > p { margin: 14px 0 23px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.access-card label,.vip-form label,.entity-filter { display: block; margin-top: 13px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.access-card input,.vip-form input,.entity-filter select { width: 100%; min-height: 46px; margin-top: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--ink); background: white; font-size: 14px; }
.access-card input:focus,.vip-form input:focus,.entity-filter select:focus { border-color: var(--bright-blue); box-shadow: 0 0 0 3px rgba(36,118,210,.13); }
.access-button { width: 100%; min-height: 48px; margin-top: 18px; border: 0; border-radius: 8px; color: white; background: var(--blue); font-weight: 800; }
.access-card > small { margin-top: 15px; display: block; color: var(--muted); font-size: 10px; text-align: center; }
.login-error { min-height: 18px; margin: 9px 0 -4px !important; color: #b51e2b !important; font-size: 12px !important; font-weight: 700; }

.top-stripe { height: 5px; display: grid; grid-template-columns: 1fr 1fr 1fr; }
.top-stripe i:nth-child(1) { background: var(--red); }
.top-stripe i:nth-child(2) { background: #f4c425; }
.top-stripe i:nth-child(3) { background: var(--red); }
.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid rgba(255,255,255,.12); color: white; background: rgba(16,28,80,.97); backdrop-filter: blur(14px); }
.header-inner { width: min(1240px, calc(100% - 32px)); min-height: 76px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: white; text-decoration: none; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.9); border-radius: 11px; background: linear-gradient(145deg,var(--bright-blue),var(--blue)); font-family: "Barlow Condensed"; font-size: 21px; font-weight: 900; letter-spacing: .04em; box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.brand strong,.brand small,.live-state strong,.live-state small { display: block; }
.brand strong { font-family: "Barlow Condensed"; font-size: 22px; letter-spacing: .02em; text-transform: uppercase; }
.brand small { margin-top: 1px; color: #bcc9e3; font-size: 11px; }
.live-state { display: flex; align-items: center; gap: 10px; text-align: right; }
.live-state > i { width: 11px; height: 11px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 6px rgba(34,197,94,.13); animation: pulse 2s infinite; }
.live-state strong { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.live-state small { margin-top: 2px; color: #aebdd9; font-size: 10px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.management-app-link { min-height: 46px; padding: 7px 11px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #6ca6e8; border-radius: 9px; color: white; background: #2476d2; text-decoration: none; box-shadow: 0 5px 14px rgba(0,0,0,.14); }
.management-app-link > span:first-child { font-size: 18px; }
.management-app-link small,.management-app-link strong { display: block; white-space: nowrap; }
.management-app-link small { color: #d9e9fb; font-size: 8px; text-transform: uppercase; }
.management-app-link strong { margin-top: 2px; font-size: 10px; text-transform: uppercase; }
.management-app-link:hover { border-color: white; background: #185ead; }
.session-button { min-height: 46px; max-width: 240px; padding: 7px 10px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; color: white; background: rgba(255,255,255,.08); text-align: left; }
.session-button > span:last-child { min-width: 0; }
.session-button small,.session-button strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.session-button small { color: #aebdd9; font-size: 8px; text-transform: uppercase; }
.session-button strong { max-width: 165px; font-size: 10px; }

main { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 70px; }
.event-intro { min-height: 188px; padding: 30px 34px; display: flex; align-items: center; justify-content: space-between; gap: 32px; overflow: hidden; position: relative; border-radius: 18px; color: white; background: linear-gradient(125deg,#0d1949 0%,#1a327d 70%,#245ba6 100%); box-shadow: var(--shadow); }
.event-intro::after { content: ""; position: absolute; right: -70px; bottom: -120px; width: 360px; height: 360px; border: 46px solid rgba(255,255,255,.055); border-radius: 50%; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--red); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.event-intro .eyebrow { color: #ffd154; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { font-family: "Barlow Condensed"; line-height: .98; text-transform: uppercase; }
h1 { max-width: 710px; font-size: clamp(42px,7vw,72px); letter-spacing: -.02em; }
.event-intro p { max-width: 650px; margin-top: 14px; color: #dbe6fb; font-size: 16px; line-height: 1.5; }
.event-date { z-index: 1; min-width: 142px; padding: 17px 19px; border: 1px solid rgba(255,255,255,.22); border-radius: 12px; background: rgba(255,255,255,.1); text-align: center; backdrop-filter: blur(7px); }
.event-date span,.event-date small { display: block; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.event-date strong { display: block; margin: -1px 0 -5px; font-family: "Barlow Condensed"; font-size: 65px; line-height: 1; }
.draw-status-banner { margin: 18px 0; padding: 15px 18px; display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: center; gap: 14px; border: 1px solid #e7c760; border-radius: 12px; background: #fff8dc; box-shadow: 0 6px 22px rgba(9,27,63,.04); }
.draw-status-banner.completed { border-color: #84caa3; background: #e9f8ef; }
.draw-status-symbol { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.8); font-size: 23px; }
.draw-status-banner small,.draw-status-banner strong,.draw-status-banner p { display: block; }
.draw-status-banner small { color: #896600; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.draw-status-banner.completed small { color: #08703b; }
.draw-status-banner strong { margin-top: 3px; color: var(--blue); font-size: 13px; line-height: 1.25; }
.draw-status-banner p { margin-top: 4px; color: var(--muted); font-size: 10px; }
.presence-observatory-panel { margin: 18px 0 24px; padding: 20px; border: 1px solid #bcd3eb; border-radius: 13px; background: linear-gradient(120deg,#fff,#f2f7fd); box-shadow: 0 6px 22px rgba(9,27,63,.04); }
.presence-observatory-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.presence-observatory-heading h2 { font-size: 30px; }
.presence-observatory-heading p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.presence-count { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; color: #08703b; background: #def4e7; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.presence-observatory-list { margin-top: 15px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.presence-observatory-person { min-width: 0; min-height: 58px; padding: 10px 11px; display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.presence-observatory-person.current { border-color: #75abd9; box-shadow: inset 0 0 0 1px #d5e7f7; }
.presence-online-dot { width: 9px; height: 9px; border-radius: 50%; background: #22a75a; box-shadow: 0 0 0 4px rgba(34,167,90,.13); }
.presence-observatory-person strong,.presence-observatory-person small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presence-observatory-person strong { color: var(--blue); font-size: 11px; text-transform: uppercase; }
.presence-observatory-person small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.presence-session-count { padding: 5px 6px; border-radius: 999px; color: var(--blue); background: #edf3fa; font-size: 8px; font-weight: 800; white-space: nowrap; }
.presence-empty { grid-column: 1/-1; padding: 14px; border-radius: 8px; color: var(--muted); background: white; font-size: 11px; text-align: center; }

.summary-grid { margin: 18px 0 34px; display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; }
.summary-grid article { min-height: 92px; padding: 17px 20px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 6px 22px rgba(9,27,63,.04); }
.summary-icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; font-size: 22px; }
.summary-icon.blue { color: white; background: var(--bright-blue); }
.summary-icon.gold { background: #fff5c7; }
.summary-icon.red { background: #ffeaec; }
.summary-grid strong { display: block; color: var(--blue); font-family: "Barlow Condensed"; font-size: 30px; line-height: 1; }
.summary-grid small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }

.ranking-section,.results-section,.live-mats-section,.entity-section,.credential-section,.vip-section,.venue-section { margin-bottom: 24px; padding: 25px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 8px 28px rgba(9,27,63,.045); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
h2 { color: var(--blue); font-size: clamp(28px,4vw,39px); }
.entity-heading p,.credential-section p,.vip-section p,.venue-heading p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.entity-filter { width: min(330px,100%); margin: 0; }
.entity-stats { margin: 19px 0 14px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.entity-stats article { padding: 14px; border-radius: 9px; background: #f3f6fa; }
.entity-stats strong,.entity-stats small { display: block; }
.entity-stats strong { color: var(--blue); font-family: "Barlow Condensed"; font-size: 26px; }
.entity-stats small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.entity-table-wrap { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.entity-entries table { min-width: 1080px; }
.entity-entries td { text-align: left; }
.entity-entries td strong,.entity-entries td small { display: block; }
.entity-entries td small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.entity-entries tr.withdrawn { color: #9098a5; background: #f0f1f3; text-decoration: line-through; }
.entry-status { display: inline-block; padding: 5px 7px; border-radius: 999px; color: #755300; background: #fff2c5; font-size: 8px; font-weight: 900; text-decoration: none; }
.entry-status.published { color: #08703b; background: #ddf5e7; }
.entry-status.withdrawn { color: #69707b; background: #dfe2e6; }
.draw-order-badge { display: inline-block; min-width: 48px; padding: 6px 8px; border-radius: 999px; color: white; background: var(--bright-blue); font-size: 10px; font-weight: 900; white-space: nowrap; }
.draw-order-badge.pending { color: #8a6500; background: #fff1bc; }
.mat-assignment-badge { display: inline-flex; align-items: center; gap: 4px; min-width: 65px; padding: 6px 8px; border-radius: 999px; color: white; background: var(--blue); font-size: 9px; font-weight: 900; white-space: nowrap; }
.mat-assignment-badge.mat-2 { background: var(--bright-blue); }
.mat-assignment-badge.unassigned { color: #69758a; background: #e7ebf0; }
.entry-time-badge { display: inline-block; min-width: 84px; padding: 6px 8px; border-radius: 7px; color: #075f35; background: #ddf5e7; font-size: 10px; font-weight: 900; text-align: center; white-space: nowrap; }
.entry-time-badge.pending { color: #68758a; background: #edf1f5; font-size: 8px; }
.entity-schedule-warning { margin-top: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid #e0bd45; border-left: 5px solid #e0a900; border-radius: 10px; color: #624900; background: #fff7d6; box-shadow: 0 5px 16px rgba(98,73,0,.08); }
.entity-schedule-warning > span { flex: 0 0 auto; font-size: 25px; }
.entity-schedule-warning strong,.entity-schedule-warning small { display: block; }
.entity-schedule-warning strong { color: #6f5100; font-size: 12px; letter-spacing: .045em; }
.entity-schedule-warning small { margin-top: 3px; color: #705f2c; font-size: 10px; font-weight: 700; line-height: 1.4; }
.credential-section { border-color: #cad8ea; background: linear-gradient(115deg,#fff,#f6f9fd); }
.credential-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.credential-count { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: var(--blue); background: #e8f1fc; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.credential-toolbar { margin: 18px 0 12px; padding: 12px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; border-radius: 10px; background: #edf3fa; }
.credential-toolbar label { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.credential-toolbar label span { display: block; margin-bottom: 5px; }
.credential-toolbar input,.credential-toolbar select { width: 100%; min-height: 41px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; outline: 0; color: var(--ink); background: white; font-size: 12px; }
.credential-people { max-height: 570px; overflow: auto; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.credential-person { min-width: 0; padding: 12px; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.person-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-family: "Barlow Condensed"; font-size: 16px; font-weight: 900; }
.person-identity { min-width: 0; align-self: center; }
.person-identity strong,.person-identity small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.person-identity strong { color: var(--blue); font-size: 12px; text-transform: uppercase; }
.person-identity small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.person-credential-actions { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 6px; }
.person-credential-actions button { min-height: 34px; padding: 0 10px; border: 1px solid #b9cae0; border-radius: 7px; color: var(--blue); background: #f1f6fd; font-size: 9px; font-weight: 900; }
.person-credential-actions button:hover { color: white; border-color: var(--blue); background: var(--blue); }
.person-credential-actions button span { margin-right: 5px; }
.print-button { min-height: 62px; padding: 10px 17px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 10px; color: white; background: var(--blue); text-align: left; box-shadow: 0 8px 20px rgba(16,28,80,.18); }
.print-button > span:first-child { font-size: 25px; }
.print-button strong,.print-button small { display: block; }
.print-button strong { font-size: 12px; text-transform: uppercase; }
.print-button small { margin-top: 3px; color: #c3d2eb; font-size: 9px; }
.vip-section { border-color: #e5cc67; background: linear-gradient(120deg,#fffdf2,#fff7d4); }
.vip-section,.vip-form { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; }
.vip-form { flex: 1; justify-content: flex-end; }
.vip-form label { width: min(230px,100%); margin: 0; }
.print-button.vip { background: #9b7210; }

.print-credential { display: none; }
.credential-card { width: 148mm; height: 210mm; overflow: hidden; position: relative; color: var(--ink); background: white; font-family: "Barlow",Arial,sans-serif; }
.credential-card .credential-stripe { height: 7mm; display: grid; grid-template-columns: repeat(3,1fr); }
.credential-card .credential-stripe i:nth-child(1),.credential-card .credential-stripe i:nth-child(3) { background: var(--red); }
.credential-card .credential-stripe i:nth-child(2) { background: #f4c425; }
.credential-card header { height: 44mm; padding: 6mm 8mm; display: flex; align-items: center; gap: 6mm; color: var(--navy); background: white; border-bottom: .8mm solid #d9e0ea; }
.credential-official-logos { flex: 0 0 auto; display: flex; align-items: center; gap: 3mm; }
.credential-official-logos > span { width: 27mm; height: 29mm; padding: 1.8mm; display: grid; place-items: center; background: white; }
.credential-official-logos img { width: 100%; height: 100%; display: block; object-fit: contain; }
.credential-event-title { min-width: 0; }
.credential-card header strong,.credential-card header small { display: block; }
.credential-card header strong { font-family: "Barlow Condensed"; font-size: 6.3mm; line-height: .95; }
.credential-card header small { margin-top: 2mm; color: #596985; font-size: 3.3mm; }
.credential-body { height: 94mm; padding: 15mm 11mm 8mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.credential-body > span { color: var(--red); font-size: 4mm; font-weight: 900; letter-spacing: .5mm; }
.credential-body h1 { max-width: 124mm; margin-top: 7mm; color: var(--navy); font-size: 12mm; line-height: .95; overflow-wrap: anywhere; }
.credential-body > strong { margin-top: 8mm; padding: 3mm 6mm; border-radius: 20mm; color: white; background: var(--bright-blue); font-size: 4mm; letter-spacing: .3mm; }
.credential-body > p { max-width: 115mm; margin-top: 6mm; color: #53617a; font-size: 4.2mm; font-weight: 700; line-height: 1.2; text-transform: uppercase; }
.credential-access { width: 122mm; margin: 0 auto; padding: 5mm; border: .8mm solid var(--navy); border-radius: 3mm; color: var(--navy); font-family: "Barlow Condensed"; font-size: 8mm; font-weight: 900; text-align: center; }
.credential-card > footer { position: absolute; inset: auto 0 0; height: 32mm; min-height: 0; padding: 8mm 11mm; display: flex; align-items: center; justify-content: space-between; color: white; background: var(--navy); font-size: 4mm; }
.credential-card.vip .credential-body > span { color: #9b7210; }
.credential-card.vip .credential-body > strong { background: #9b7210; }
.credential-card.vip .credential-access { color: #9b7210; border-color: #c99b27; background: #fff6cf; }
.credential-card.vip .credential-stripe i { background: linear-gradient(90deg,#9b7210,#f1ce62,#9b7210); }
.credential-card.vip header { border-bottom-color: #d6b74d; }
.vip-emblem { position: absolute; z-index: 0; right: -7mm; top: 55mm; color: rgba(201,155,39,.13); font-size: 78mm; line-height: 1; transform: rotate(9deg); }
.credential-card.vip .credential-body,.credential-card.vip .credential-access { position: relative; z-index: 1; }
.venue-heading { align-items: center; }
.venue-open-button { flex: 0 0 auto; min-height: 42px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; border-radius: 8px; color: white; background: var(--blue); font-size: 10px; font-weight: 900; text-decoration: none; text-transform: uppercase; }
.venue-plan-observatory { margin-top: 18px; display: block; overflow: hidden; border: 1px solid #ccd6e3; border-radius: 12px; background: #eef2f6; }
.venue-plan-observatory img { width: 100%; height: auto; display: block; transition: transform .25s; }
.venue-plan-observatory:hover img { transform: scale(1.01); }
.venue-note { margin-top: 10px; color: var(--muted); font-size: 10px; }
.live-heading { align-items: center; }
.finish-estimate { min-width: 220px; padding: 12px 15px; border: 1px solid #cbd9e9; border-radius: 10px; background: #f4f8fd; text-align: right; }
.finish-estimate span,.finish-estimate strong,.finish-estimate small { display: block; }
.finish-estimate span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.finish-estimate strong { margin: 3px 0; color: var(--red); font-family: "Barlow Condensed"; font-size: 23px; text-transform: uppercase; }
.finish-estimate small { color: var(--muted); font-size: 10px; }
.public-clock-notice { display: none; margin-top: 16px; padding: 9px 12px; border-radius: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.public-clock-notice.show { display: block; }
.public-clock-notice.running { color: #08723a; background: #e5f7ed; }
.public-clock-notice.paused { color: #8b5a00; background: #fff3cd; }
.mat-live-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.mat-live-card { min-width: 0; overflow: hidden; border: 1px solid #cad5e4; border-radius: 13px; background: #f8fafc; }
.mat-live-card > header { min-height: 76px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: white; background: linear-gradient(120deg,#17296e,#245ba6); }
.mat-live-card.mat-2 > header { background: linear-gradient(120deg,#8f1721,#e31f2a); }
.mat-live-card > header > div { display: flex; align-items: center; gap: 11px; }
.mat-number { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.52); border-radius: 11px; background: rgba(255,255,255,.12); font-family: "Barlow Condensed"; font-size: 21px; font-weight: 900; }
.mat-live-card header small { display: block; color: rgba(255,255,255,.72); font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.mat-live-card h3 { margin-top: 3px; color: white; font-size: 26px; }
.mat-status { flex: 0 0 auto; padding: 6px 8px; display: flex; align-items: center; gap: 6px; border-radius: 999px; color: #dbe4f5; background: rgba(0,0,0,.16); font-size: 8px; font-weight: 900; letter-spacing: .04em; }
.mat-status i { width: 7px; height: 7px; border-radius: 50%; background: #9eabc1; }
.mat-status.active i { background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.17); animation: pulse 2s infinite; }
.mat-status.paused i { background: #facc15; }
.current-category { min-height: 190px; padding: 17px; }
.live-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.live-category-title { display: flex; align-items: center; gap: 12px; }
.live-category-title > span { flex: 0 0 auto; }
.live-category-title strong,.live-category-title small { display: block; }
.live-category-title strong { color: var(--blue); font-family: "Barlow Condensed"; font-size: 23px; line-height: 1.04; text-transform: uppercase; }
.live-category-title small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.category-progress { height: 8px; margin-top: 21px; overflow: hidden; border-radius: 999px; background: #dee5ef; }
.category-progress i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,var(--bright-blue),#49a1f6); transition: width .4s; }
.mat-2 .category-progress i { background: linear-gradient(90deg,#b71320,#ef4751); }
.progress-caption { margin-top: 7px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; }
.progress-caption strong { color: var(--ink); font-size: 10px; }
.mat-empty { min-height: 120px; display: grid; place-items: center; align-content: center; text-align: center; }
.mat-empty > span { margin-bottom: 5px; color: #a5b1c1; font-size: 25px; }
.mat-empty strong { color: var(--blue); font-size: 12px; }
.mat-empty small { max-width: 330px; margin-top: 5px; color: var(--muted); font-size: 10px; }
.next-category { min-height: 86px; padding: 13px 16px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; border-top: 1px solid var(--line); background: white; }
.next-arrow { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--bright-blue); font-weight: 900; }
.mat-2 .next-arrow { background: var(--red); }
.next-category .live-label { margin-bottom: 3px; }
.next-category strong,.next-category small { display: block; }
.next-category strong { color: var(--ink); font-size: 12px; line-height: 1.15; text-transform: uppercase; }
.next-category small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.next-category time { max-width: 145px; color: var(--red); font-size: 10px; font-weight: 800; text-align: right; }
.mat-program { border-top: 1px solid var(--line); background: white; }
.mat-program-title { padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f7f9fc; }
.mat-program-title span,.mat-program-title small { display: block; }
.mat-program-title span { color: var(--blue); font-family: "Barlow Condensed"; font-size: 17px; font-weight: 900; text-transform: uppercase; }
.mat-program-title small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.public-phase > header { min-height: 45px; padding: 8px 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; border-bottom: 1px solid #cfdded; background: #edf4fd; }
.public-phase > header span { padding: 4px 7px; border-radius: 999px; color: white; background: var(--bright-blue); font-size: 8px; font-weight: 900; letter-spacing: .04em; }
.public-phase > header strong { color: var(--blue); font-family: "Barlow Condensed"; font-size: 15px; }
.public-phase > header small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.public-phase.phase-para-hapkido > header { border-bottom-color: #dfd2f4; background: #f3edff; }
.public-phase.phase-para-hapkido > header span { background: #7045a0; }
.public-phase.phase-absoluto > header { border-bottom-color: #d4d9e1; background: #edf0f4; }
.public-phase.phase-absoluto > header span { background: #161b23; }
.public-phase ol { margin: 0; padding: 0; list-style: none; }
.public-phase li { min-height: 52px; padding: 8px 14px; display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid #edf0f4; }
.public-phase li:last-child { border-bottom: 0; }
.public-phase li.active { border-left: 4px solid var(--red); background: #fff1f2; }
.public-phase li.complete { background: #f1faf5; }
.public-phase li.empty { opacity: .58; }
.program-order { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--blue); background: #e8eef7; font-size: 9px; font-weight: 900; }
.public-phase li strong,.public-phase li small { display: block; }
.public-phase li strong { color: var(--ink); font-size: 10px; line-height: 1.15; text-transform: uppercase; }
.public-phase li small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.public-phase li em { color: var(--muted); font-size: 8px; font-style: normal; font-weight: 800; text-align: right; text-transform: uppercase; }
.public-phase li.active em { color: var(--red); }
.public-phase li.complete em { color: #08723a; }
.program-empty { padding: 16px; color: var(--muted); font-size: 10px; }
.mat-live-card > footer { min-height: 0; padding: 9px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #718096; background: #edf2f7; font-size: 9px; }
.mat-live-card > footer strong { color: var(--blue); font-size: 10px; }
.live-estimate-note { margin-top: 12px; color: var(--muted); font-size: 10px; }
.ranking-scope { padding: 4px; display: flex; border-radius: 9px; background: #e9eef6; }
.ranking-scope button,.division-tabs button { min-height: 38px; padding: 0 15px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; }
.ranking-scope button.active { color: white; background: var(--blue); box-shadow: 0 4px 12px rgba(16,28,80,.18); }
.division-tabs { margin-top: 17px; display: flex; gap: 7px; flex-wrap: wrap; }
.division-tabs button { border: 1px solid var(--line); background: white; }
.division-tabs button.active { color: white; border-color: var(--bright-blue); background: var(--bright-blue); }
.ranking-total-points { width: fit-content; margin: 12px 0 -10px auto; padding: 7px 11px; border-radius: 999px; color: var(--blue); background: #edf4fd; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.ranking-podium { margin: 24px 0 16px; display: grid; grid-template-columns: 1fr 1.08fr 1fr; align-items: end; gap: 12px; }
.ranking-card { min-width: 0; min-height: 142px; padding: 17px; display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg,#fff,#f7f9fc); text-align: center; }
.ranking-card.position-1 { min-height: 170px; border-color: #efd56f; background: linear-gradient(180deg,#fff9dc,#fffdf3); }
.ranking-position { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.ranking-card > strong { margin: 10px 0 6px; color: var(--blue); font-family: "Barlow Condensed"; font-size: 19px; line-height: 1.05; text-transform: uppercase; }
.ranking-card > b { color: var(--red); font-size: 17px; }
.ranking-card > small { margin-top: 6px; color: var(--muted); }
.ranking-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; }
th,td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: center; font-size: 12px; }
th:nth-child(2),td:nth-child(2) { text-align: left; }
th { color: #6b7890; background: #f6f8fb; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.ranking-note { margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.ranking-note strong { color: var(--blue); }

.results-section { padding-bottom: 30px; }
.result-count { padding: 7px 11px; border-radius: 999px; color: var(--blue); background: #edf4fd; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.filter-bar { margin: 18px 0 20px; padding: 13px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; border-radius: 11px; background: #f4f7fb; }
.filter-bar .division-tabs { margin: 0; }
.search-field { width: min(330px,100%); color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.search-field span { display: block; margin-bottom: 5px; }
.search-field input { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; outline: 0; color: var(--ink); background: white; font-size: 13px; text-transform: none; }
.search-field input:focus { border-color: var(--bright-blue); box-shadow: 0 0 0 3px rgba(36,118,210,.12); }
.category-results { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.category-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.category-card > header { min-height: 82px; padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: linear-gradient(110deg,#f7f9fc,#eef4fb); }
.category-title { min-width: 0; display: flex; align-items: center; gap: 11px; }
.category-title > span { min-width: 34px; }
.category-title small { color: var(--red); font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.category-title h3 { margin-top: 4px; color: var(--blue); font-size: 21px; line-height: 1.05; }
.category-card time { flex: 0 0 auto; padding: 5px 7px; border-radius: 5px; color: #006d35; background: #def5e8; font-size: 8px; font-weight: 900; letter-spacing: .06em; }
.belt { position: relative; width: 32px; height: 8px; display: inline-block; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.belt::after { content: ""; position: absolute; top: -3px; left: 13px; width: 8px; height: 14px; border-radius: 2px; background: inherit; transform: rotate(8deg); }
.belt.colored { background: linear-gradient(90deg,#f2c500 0 32%,#e31f2a 32% 66%,#2476d2 66%); }
.belt.black { background: #111827; }
.para-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--green); font-family: "Barlow Condensed"; font-size: 13px; font-weight: 900; }
.podium-row { min-height: 77px; padding: 12px 14px; display: grid; grid-template-columns: 38px 66px 1fr 58px; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.podium-row:last-child { border-bottom: 0; }
.medal-symbol { font-size: 26px; }
.place strong,.place small,.winner strong,.winner small,.score strong,.score small { display: block; }
.place strong { color: var(--blue); font-size: 10px; }
.place small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.winner { min-width: 0; }
.winner strong { color: var(--ink); font-size: 13px; line-height: 1.15; }
.winner small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.score { text-align: right; }
.score strong { color: var(--red); font-family: "Barlow Condensed"; font-size: 18px; }
.score small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.empty-state { grid-column: 1/-1; min-height: 230px; padding: 38px 20px; display: grid; place-items: center; align-content: center; border: 1px dashed #bfc9d8; border-radius: 12px; color: var(--muted); background: #fafbfd; text-align: center; }
.empty-state > span { margin-bottom: 10px; font-size: 37px; }
.empty-state strong { color: var(--blue); font-family: "Barlow Condensed"; font-size: 22px; text-transform: uppercase; }
.empty-state p { max-width: 520px; margin-top: 7px; font-size: 12px; }
.empty-state.compact { min-height: 150px; }

footer { min-height: 98px; padding: 24px max(16px,calc((100% - 1240px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #b8c4db; background: var(--navy); font-size: 11px; }
footer strong { color: white; text-transform: uppercase; }
.connection-notice { position: fixed; z-index: 40; left: 50%; bottom: 22px; max-width: calc(100% - 28px); padding: 11px 15px; border-radius: 8px; color: white; background: #9f2530; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%,15px); pointer-events: none; transition: .25s; }
.connection-notice.show { opacity: 1; transform: translate(-50%,0); }

@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } }

@media (max-width: 820px) {
  main { padding-top: 20px; }
  .event-intro { min-height: 166px; padding: 24px; }
  .event-date { display: none; }
  .category-results { grid-template-columns: 1fr; }
  .mat-live-grid { grid-template-columns: 1fr; }
  .presence-observatory-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .vip-section,.vip-form { align-items: stretch; flex-direction: column; }
  .vip-form label { width: 100%; }
  .credential-people { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .header-inner,main { width: min(100% - 22px,1240px); }
  .header-inner { min-height: 69px; }
  .brand { min-width: 0; flex: 1; }
  .brand > span:last-child { min-width: 0; }
  .brand-mark { width: 42px; height: 42px; font-size: 18px; }
  .brand strong { font-size: 19px; }
  .brand small { max-width: 135px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .live-state { display: none; }
  .header-actions { min-width: 0; flex: 0 1 122px; gap: 0; }
  body.admin-observatory .header-inner { padding: 9px 0; flex-wrap: wrap; }
  body.admin-observatory .header-actions { flex: 1 0 100%; display: grid; grid-template-columns: minmax(0,1fr) 122px; gap: 8px; }
  body.admin-observatory .management-app-link { min-width: 0; justify-content: center; }
  body.admin-observatory .management-app-link strong { overflow: hidden; text-overflow: ellipsis; }
  .session-button { width: 100%; min-width: 0; max-width: 122px; }
  .session-button strong { max-width: 84px; }
  .event-intro { padding: 22px 19px; border-radius: 13px; }
  .draw-status-banner { padding: 13px; grid-template-columns: 40px minmax(0,1fr); }
  .draw-status-symbol { width: 40px; height: 40px; }
  .presence-observatory-panel { padding: 16px 13px; }
  .presence-observatory-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .presence-observatory-list { grid-template-columns: 1fr; }
  .presence-observatory-person { grid-template-columns: 9px minmax(0,1fr); }
  .presence-session-count { grid-column: 2; width: fit-content; }
  h1 { font-size: 45px; }
  .event-intro p { font-size: 13px; }
  .summary-grid { grid-template-columns: 1fr; gap: 8px; }
  .summary-grid article { min-height: 70px; padding: 12px 14px; }
  .summary-icon { width: 40px; height: 40px; }
  .ranking-section,.results-section,.live-mats-section,.entity-section,.credential-section,.vip-section,.venue-section { padding: 18px 13px; border-radius: 12px; }
  .section-heading { align-items: stretch; flex-direction: column; gap: 12px; }
  .venue-open-button { width: 100%; justify-content: center; }
  .finish-estimate { min-width: 0; text-align: left; }
  .ranking-scope { width: 100%; }
  .ranking-scope button { flex: 1; }
  .division-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .division-tabs button { padding: 0 8px; }
  .ranking-total-points { width: 100%; margin: 12px 0 -8px; text-align: center; }
  .ranking-podium { grid-template-columns: 1fr; align-items: stretch; }
  .ranking-card,.ranking-card.position-1 { min-height: 0; }
  .ranking-card.position-1 { order: -1; }
  .podium-placeholder { display: none; }
  .category-card > header { align-items: flex-start; }
  .mat-live-card > header { align-items: flex-start; }
  .next-category { grid-template-columns: 30px 1fr; }
  .next-category time { grid-column: 2; max-width: none; text-align: left; }
  .public-phase > header { grid-template-columns: auto 1fr; }
  .public-phase > header small { grid-column: 2; }
  .public-phase li { grid-template-columns: 25px minmax(0,1fr); }
  .public-phase li em { grid-column: 2; text-align: left; }
  .category-title h3 { font-size: 19px; }
  .podium-row { grid-template-columns: 32px 58px 1fr; padding: 11px 10px; }
  .score { grid-column: 3; text-align: left; }
  .score strong,.score small { display: inline; }
  footer { align-items: flex-start; flex-direction: column; }
  .entity-stats { grid-template-columns: 1fr 1fr; }
  .credential-section-heading { align-items: flex-start; flex-direction: column; }
  .credential-toolbar { grid-template-columns: 1fr; }
  .access-card { padding: 27px 20px; }
  .access-card h1 { font-size: 34px; }
}

@page { size: A5 portrait; margin: 0; }
@media print {
  html,body { width: 148mm; height: 210mm; margin: 0 !important; padding: 0 !important; background: white !important; }
  body.printing-credential > *:not(#printCredential) { display: none !important; }
  body.printing-credential #printCredential { width: 148mm; height: 210mm; margin: 0; display: block !important; }
  .credential-card { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
