:root {
  --ink: #231F20;
  --ink-2: #4A4547;
  --blue: #0F6CBD;
  --blue-dark: #0A4F8A;
  --orange: #F7941D;
  --orange-soft: #FFE7C7;
  --paper: #F4F2EF;
  --line: #E3DED8;
  --white: #FFFFFF;
  --red: #9A2B12;
  --gold: #E2B23A;
  --silver: #C9CFD6;
  --bronze: #D08A55;
  --display: 'Alfa Slab One', Georgia, serif;
  --body: 'Archivo', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(30px, 5vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 20px; }
p { margin: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--white); padding: 8px 12px; z-index: 50; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.loading { padding: 48px 20px; text-align: center; font-weight: 700; }

/* Header */
.site-header { background: var(--white); border-bottom: 4px solid var(--ink); position: sticky; top: 0; z-index: 20; }
.hdr { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand img { height: 56px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nav a, .nav button.navbtn { text-decoration: none; color: var(--ink); font-weight: 800; padding: 8px 12px; border: 3px solid transparent; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; background: none; }
.nav a:hover, .nav button.navbtn:hover { border-color: var(--ink); color: var(--ink); }
.nav a.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.nav a.cta { background: var(--orange); border-color: var(--ink); }
.nav a.admin { background: var(--blue); color: var(--white); border-color: var(--ink); }
.more { position: relative; }
.more-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--white); border: 3px solid var(--ink); border-radius: 10px; padding: 8px; display: none; flex-direction: column; min-width: 220px; z-index: 30; box-shadow: 6px 6px 0 var(--orange); }
.more.open .more-menu { display: flex; }
.more-menu a { padding: 10px 12px; border-radius: 6px; text-decoration: none; color: var(--ink); font-weight: 700; }
.more-menu a:hover { background: var(--paper); }
.announce { background: var(--blue); color: var(--white); border-bottom: 4px solid var(--ink); }
.announce div { max-width: 1240px; margin: 0 auto; padding: 10px 20px; font-weight: 700; }

/* Layout */
main { max-width: 1240px; margin: 0 auto; padding: 28px 20px 72px; display: flex; flex-direction: column; gap: 24px; outline: none; }
.row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.grow { flex: 999 1 520px; min-width: 0; }
.side { flex: 1 1 300px; min-width: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.card { background: var(--white); border: 4px solid var(--ink); border-radius: 12px; padding: 20px; min-width: 0; }
.card.tight { padding: 14px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.lbl { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.big { font-family: var(--display); font-size: 36px; line-height: 1; }
.empty { border: 3px dashed var(--ink-2); border-radius: 12px; padding: 28px 20px; text-align: center; color: var(--ink-2); font-weight: 600; background: var(--white); }

/* Hero */
.hero { background: var(--white); border: 4px solid var(--ink); border-radius: 12px; padding: 32px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.hero h1 { font-size: clamp(44px, 8vw, 92px); line-height: .95; }
.hero .two { color: var(--orange); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.hero .t { color: var(--blue); }
.hero-logo { flex: 0 1 320px !important; width: 100%; max-width: 320px; height: auto; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.fact { border: 3px solid var(--ink); border-radius: 10px; padding: 14px; background: var(--white); }
.fact b { display: block; font-family: var(--display); font-size: 28px; color: var(--blue); font-weight: 400; }

/* Buttons and forms */
.btn { border: 3px solid var(--ink); border-radius: 8px; padding: 10px 18px; font-weight: 800; min-height: 48px; background: var(--white); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { color: var(--ink); background: var(--paper); }
.btn.o { background: var(--orange); }
.btn.o:hover { background: #E8850F; }
.btn.b { background: var(--blue); color: var(--white); }
.btn.b:hover { background: var(--blue-dark); color: var(--white); }
.btn.k { background: var(--ink); color: var(--white); }
.btn.sm { min-height: 40px; padding: 6px 12px; font-size: 14px; }
.btn.danger { color: var(--red); }
.fld { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.fld input, .fld select, .fld textarea, input.in, select.in, textarea.in { font-weight: 500; font-size: 16px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 8px; background: var(--white); min-height: 48px; width: 100%; }
.fld textarea, textarea.in { min-height: 120px; resize: vertical; }
.fld .hint { font-weight: 500; color: var(--ink-2); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: 0 0 22px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.err { color: var(--red); font-weight: 700; }
.ok { color: var(--blue-dark); font-weight: 700; }
fieldset { border: 3px solid var(--ink); border-radius: 10px; padding: 16px; margin: 0; display: flex; flex-direction: column; gap: 14px; }
legend { font-family: var(--display); font-size: 18px; padding: 0 6px; }

/* Tables */
.scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: 10px 12px; border-bottom: 3px solid var(--ink); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.win td.tn { font-weight: 800; }
.chip { display: inline-block; font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 4px; border: 2px solid var(--ink); white-space: nowrap; background: var(--white); }
.chip.final, .chip.paid { background: var(--ink); color: var(--white); }
.chip.next, .chip.pending { background: var(--orange); }
.chip.wait { background: var(--orange-soft); }
.chip.blue { background: var(--blue); color: var(--white); }
.chip.gold { background: var(--gold); }
.chip.silver { background: var(--silver); }
.chip.bronze { background: var(--bronze); }
.chip.grey { background: var(--line); }
.bar { height: 14px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--paper); }
.bar > div { height: 100%; background: var(--orange); }

/* Bracket */
.madness { background: var(--ink); color: var(--white); border-radius: 12px; padding: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.madness h1 { font-size: clamp(34px, 5vw, 56px); }
.tier { display: flex; flex-direction: column; gap: 18px; }
.mm { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 0; }
.mm .col { flex: 1 1 250px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mm .col.final { flex: 1.2 1 280px; }
.mmbox { border: 4px solid var(--ink); border-radius: 10px; background: var(--white); overflow: hidden; }
.mmbox.final { border-width: 5px; box-shadow: 6px 6px 0 var(--orange); }
.mmrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 2px solid var(--ink); min-height: 52px; }
.mmrow:last-child { border-bottom: 0; }
.mmrow.w { background: var(--orange-soft); font-weight: 800; }
.mmrow.tbd { background: var(--paper); color: var(--ink-2); }
.mmrow .sd { font-size: 13px; font-weight: 800; color: var(--ink-2); width: 22px; flex: 0 0 22px; }
.mmrow .nm { flex: 1; min-width: 0; }
.mmrow .sc { font-weight: 800; font-size: 20px; }
.arm { display: flex; align-items: center; flex: 0 0 52px; }
.armL { width: 28px; height: 56px; border: 4px solid var(--orange); border-left: 0; border-radius: 0 8px 8px 0; }
.armR { width: 28px; height: 56px; border: 4px solid var(--orange); border-right: 0; border-radius: 8px 0 0 8px; }
.stub { width: 24px; height: 4px; background: var(--orange); }
@media (max-width: 820px) { .arm { display: none; } }

/* Admin */
.admin-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.admin-nav { flex: 1 1 220px; max-width: 100%; background: var(--white); border: 4px solid var(--ink); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.admin-nav a { text-decoration: none; color: var(--ink); font-weight: 700; padding: 10px 12px; border-radius: 8px; }
.admin-nav a:hover { background: var(--paper); }
.admin-nav a.active { background: var(--ink); color: var(--white); }
.admin-nav .sep { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--ink-2); padding: 10px 12px 2px; }
.admin-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kpi .big { font-size: 32px; }
.todo li { margin: 6px 0; }
.todo .done { color: var(--blue-dark); font-weight: 700; }
.todo .open { color: var(--red); font-weight: 700; }
.qr svg, .qr img { width: 140px; height: 140px; }
.qr { background: var(--white); padding: 8px; border: 3px solid var(--ink); border-radius: 8px; display: inline-block; }
.prose { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.prose h2 { margin-top: 12px; }
.prose ul, .prose ol { margin: 0; padding-left: 22px; }
.prose li { margin: 4px 0; }
.product-img { height: 180px; border: 3px solid var(--ink); border-radius: 10px; background: var(--paper); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.step { width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 8px; background: var(--white); font-weight: 800; font-size: 20px; }
.player-card { background: var(--ink); color: var(--white); border-radius: 16px; padding: 22px; box-shadow: 8px 8px 0 var(--orange); display: flex; flex-direction: column; gap: 10px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button { border: 3px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 800; min-height: 44px; background: var(--white); }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

/* TV */
body.tv { background: var(--ink); }
body.tv .site-header, body.tv .site-footer, body.tv #announcement { display: none; }
body.tv main { max-width: none; padding: 24px; }

/* Footer */
.site-footer { background: var(--ink); color: var(--white); }
.site-footer .ft { max-width: 1240px; margin: 0 auto; padding: 28px 20px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-footer a { color: var(--white); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }

#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: 8px; font-weight: 700; display: none; z-index: 60; max-width: calc(100% - 32px); }
#toast.show { display: block; }

@media (max-width: 640px) {
  .hero { padding: 22px; }
  .card { padding: 16px; }
  .brand img { height: 46px; }
}
