:root {
  color-scheme: dark;
  --page: #0b1220;
  --surface: #111b2b;
  --surface-raised: #172438;
  --surface-soft: #0f1928;
  --line: #25344a;
  --text: #f1f5f9;
  --muted: #9aabc0;
  --accent: #b7f34a;
  --accent-dark: #89bd20;
  --blue: #79b8ff;
  --danger: #ff8a8a;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  transition: background-color 180ms ease, color 180ms ease;
}

body.modo-claro {
  color-scheme: light;
  --page: #f4f7f2;
  --surface: #ffffff;
  --surface-raised: #f8faf5;
  --surface-soft: #edf3e8;
  --line: #dce5d6;
  --text: #142018;
  --muted: #657367;
  --accent: #5f9200;
  --accent-dark: #4c7600;
  --blue: #246ab2;
  --danger: #b93232;
  --shadow: 0 22px 55px rgba(34, 53, 27, 0.08);
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
::selection { color: #0b1220; background: var(--accent); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  background: color-mix(in srgb, var(--page) 90%, transparent);
  backdrop-filter: blur(16px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 16px; font-weight: 750; letter-spacing: -0.04em; white-space: nowrap; }
.brand img { display: block; border-radius: 12px; object-fit: cover; }
.brand strong { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; margin-right: 24px; }
.nav-link { padding: 9px 14px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 650; text-decoration: none; transition: color 150ms ease, background 150ms ease; }
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface-raised); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 19px; transition: border-color 150ms ease, transform 150ms ease; }
.icon-button:hover { border-color: var(--accent); transform: translateY(-1px); }
.menu-toggle { display: none; }

.page-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.hero {
  position: relative;
  display: grid;
  min-height: 340px;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  overflow: hidden;
  margin: 34px 0 70px;
  padding: 48px 58px;
  border: 1px solid #2b3d4d;
  border-radius: 28px;
  background: radial-gradient(ellipse at 78% 42%, rgba(183, 243, 74, 0.15), transparent 35%), linear-gradient(120deg, #142331 0%, #0f1a28 58%, #152534 100%);
  box-shadow: var(--shadow);
}
.modo-claro .hero { border-color: #cfddc5; background: radial-gradient(ellipse at 78% 42%, rgba(95, 146, 0, 0.13), transparent 36%), linear-gradient(120deg, #eff5e8 0%, #e9f1e0 62%, #f5f8ef 100%); }
.hero-copy { position: relative; z-index: 2; max-width: 590px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 17px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 0.16em; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #b7f34a; box-shadow: 0 0 0 5px rgba(183, 243, 74, 0.13); }
.hero h1 { margin: 0; font-size: clamp(37px, 5vw, 58px); line-height: 1.04; letter-spacing: -0.065em; }
.hero h1 span { color: var(--accent); }
.hero-description { max-width: 460px; margin: 17px 0 23px; color: #b3c0cd; font-size: 14px; }
.modo-claro .hero-description { color: #596a5a; }
.primary-button { display: inline-flex; align-items: center; gap: 15px; padding: 12px 17px; border-radius: 12px; background: var(--accent); color: #101a0a; font-size: 13px; font-weight: 800; text-decoration: none; transition: transform 150ms ease, filter 150ms ease; }
.primary-button:hover { filter: brightness(1.06); transform: translateY(-2px); }
.hero-side { position: relative; display: grid; min-height: 240px; place-items: center; }
.hero-orbit { position: absolute; border: 1px solid rgba(183, 243, 74, 0.23); border-radius: 50%; transform: rotate(-20deg); }
.orbit-one { width: 270px; height: 190px; }
.orbit-two { width: 205px; height: 290px; transform: rotate(38deg); }
.hero-ball { position: relative; z-index: 1; display: grid; width: 112px; height: 112px; place-items: center; border: 1px solid rgba(183, 243, 74, 0.3); border-radius: 50%; background: radial-gradient(circle at 35% 28%, #d6ff7c, #8cbf24 68%, #456b13); box-shadow: 0 0 70px rgba(183, 243, 74, 0.16); font-size: 53px; filter: saturate(0.75); }
.hero-note { position: absolute; z-index: 2; top: 14px; right: 0; display: flex; align-items: center; gap: 10px; color: #c1cfdb; font-size: 11px; font-weight: 650; line-height: 1.45; }
.note-mark { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(183, 243, 74, 0.4); border-radius: 10px; color: var(--accent); font-size: 10px; }
.hero-date { position: absolute; right: 4px; bottom: 6px; color: #8192a0; font-size: 10px; font-weight: 750; letter-spacing: 0.13em; text-transform: uppercase; }

.content-section { margin: 0 0 68px; scroll-margin-top: 100px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-eyebrow { margin-bottom: 8px; font-size: 9px; }
.section-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.1; letter-spacing: -0.05em; }
.section-description { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.timezone-chip, .channel-count { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
.timezone-icon { color: var(--accent); font-size: 17px; line-height: 1; }
.agenda-toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.search-box { display: flex; min-width: 0; max-width: 500px; height: 46px; flex: 1; align-items: center; gap: 11px; padding: 0 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); transition: border-color 140ms ease; }
.search-box:focus-within { border-color: var(--accent); }
.search-icon { color: var(--muted); font-size: 24px; line-height: 1; transform: rotate(-20deg); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-box input::placeholder { color: var(--muted); }
.search-box kbd { padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: 10px ui-monospace, monospace; }
.filter-button { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; transition: color 150ms ease, border-color 150ms ease, background 150ms ease; }
.filter-button:hover, .filter-button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: var(--surface-raised); }
.filter-button > span:first-child { color: var(--accent); font-size: 18px; }
.favorite-count { display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 7px; background: var(--surface-soft); color: var(--accent); font-size: 10px; }
.date-filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 3px 1px 13px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.date-filter { flex: 0 0 auto; min-height: 35px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; transition: all 150ms ease; }
.date-filter:hover, .date-filter.active { border-color: var(--accent); background: var(--accent); color: #142008; }
.agenda-status, .channel-status { min-height: 0; margin: 0; color: var(--muted); font-size: 12px; }
.agenda-status:not(:empty) { margin: 5px 0 10px; }
.agenda-status.error, .channel-status.error { color: var(--danger); }
.events-list { display: grid; gap: 10px; }
.events-day-heading { display: flex; align-items: center; gap: 10px; margin: 15px 0 1px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.events-day-heading::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.event-card { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 19px; padding: 16px 17px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); transition: border-color 150ms ease, transform 150ms ease, background 150ms ease; }
.event-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--surface-raised); transform: translateY(-1px); }
.event-time-block { display: grid; justify-items: start; gap: 5px; }
.event-time { color: var(--text); font-size: 19px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.event-state { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em; }
.state-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.event-state.is-live { color: #ff8f8f; }
.event-state.is-live .state-dot { background: #ff6464; box-shadow: 0 0 0 4px rgba(255, 100, 100, 0.1); }
.event-state.is-finished .state-dot { background: #748194; }
.event-main { display: flex; min-width: 0; align-items: center; gap: 13px; }
.event-logos { display: flex; width: 45px; min-width: 45px; align-items: center; justify-content: center; }
.event-logos img { width: 35px; height: 35px; border-radius: 9px; background: var(--surface-raised); object-fit: contain; }
.event-logos img + img { width: 27px; height: 27px; margin-left: -10px; border: 2px solid var(--surface); }
.event-logos .logo-placeholder { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--accent); font-size: 17px; }
.event-copy { min-width: 0; }
.event-competition { overflow: hidden; margin: 0 0 3px; color: var(--muted); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.event-name { overflow-wrap: anywhere; margin: 0; font-size: 14px; font-weight: 750; line-height: 1.35; }
.event-extra { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.event-controls { display: flex; align-items: center; gap: 8px; }
.favorite-button { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: transparent; color: var(--muted); font-size: 21px; cursor: pointer; transition: all 150ms ease; }
.favorite-button:hover, .favorite-button.is-favorite { border-color: rgba(183, 243, 74, 0.5); color: var(--accent); background: rgba(183, 243, 74, 0.08); }
.server-picker { position: relative; }
.server-picker summary { display: flex; min-height: 38px; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); font-size: 10px; font-weight: 750; list-style: none; white-space: nowrap; cursor: pointer; }
.server-picker summary::-webkit-details-marker { display: none; }
.server-picker summary::after { color: var(--accent); content: "⌄"; font-size: 15px; }
.server-picker[open] summary { border-color: var(--accent); }
.server-list { display: grid; min-width: 190px; gap: 5px; margin-top: 8px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-raised); box-shadow: var(--shadow); }
.server-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-size: 11px; font-weight: 650; text-decoration: none; }
.server-link:hover { background: var(--surface-soft); color: var(--accent); }
.server-empty { margin: 0; padding: 9px 10px; color: var(--muted); font-size: 11px; }
.empty-state { display: grid; min-height: 150px; place-items: center; padding: 28px; border: 1px dashed var(--line); border-radius: 17px; background: var(--surface-soft); text-align: center; }
.empty-state-mark { display: grid; width: 38px; height: 38px; place-items: center; margin: 0 auto 10px; border: 1px solid var(--line); border-radius: 13px; color: var(--accent); font-size: 17px; }
.empty-state h3 { margin: 0; font-size: 14px; }
.empty-state p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.retry-button { margin-top: 13px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); font-size: 11px; font-weight: 700; cursor: pointer; }
.retry-button:hover { border-color: var(--accent); }

.channels-heading { margin-bottom: 19px; }
.channel-count { color: var(--accent); }
.channels-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.channel-card { display: flex; min-height: 115px; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-decoration: none; transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.channel-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--surface-raised); transform: translateY(-2px); }
.channel-logo-wrap { display: grid; width: 68px; height: 68px; flex: 0 0 auto; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.channel-logo-wrap img { max-width: 90%; max-height: 90%; object-fit: contain; }
.channel-copy { min-width: 0; }
.channel-copy h3 { overflow-wrap: anywhere; margin: 0; font-size: 13px; font-weight: 750; }
.channel-copy p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.channel-arrow { margin-left: auto; color: var(--accent); font-size: 17px; }
.channels-empty { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }

.privacy-note { display: flex; align-items: center; gap: 12px; margin: 0 0 70px; padding: 14px 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.privacy-mark { color: var(--accent); font-size: 18px; }
.privacy-note p { margin: 0; color: var(--muted); font-size: 11px; }
.privacy-note strong { color: var(--text); }
.site-footer { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px 24px; padding: 24px max(24px, calc((100vw - 1180px) / 2)); border-top: 1px solid var(--line); background: var(--surface-soft); }
.footer-brand { font-size: 13px; }
.site-footer p { margin: 0; color: var(--muted); font-size: 11px; }
.footer-link { color: var(--muted); font-size: 11px; text-decoration: none; }
.footer-link:hover { color: var(--accent); }
.footer-links { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.site-footer small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.privacy-page { min-height: calc(100vh - 210px); padding-top: 38px; padding-bottom: 70px; }
.back-to-site { display: inline-block; margin-bottom: 24px; color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; }
.back-to-site:hover { color: var(--accent); }
.privacy-document { max-width: 820px; }
.privacy-document > h1 { margin: 0; font-size: clamp(34px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.06em; }
.privacy-lead { max-width: 690px; margin: 14px 0 27px; color: var(--muted); font-size: 14px; }
.privacy-card { margin: 10px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.privacy-card h2 { margin: 0 0 7px; font-size: 14px; letter-spacing: -0.02em; }
.privacy-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.privacy-updated { margin-top: 17px; color: var(--muted); font-size: 10px; }

@media (max-width: 900px) {
  .hero { min-height: 310px; padding: 40px; }
  .hero-side { min-height: 215px; }
  .channels-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-card { grid-template-columns: 78px minmax(0, 1fr); gap: 14px; }
  .event-controls { grid-column: 2; justify-content: flex-start; }
}

@media (max-width: 620px) {
  html { scroll-padding-top: 72px; }
  .site-header { height: 66px; padding: 0 17px; }
  .brand { gap: 8px; font-size: 14px; }
  .brand img { width: 33px; height: 33px; }
  .main-nav { position: absolute; top: 65px; right: 14px; left: 14px; display: none; flex-direction: column; align-items: stretch; gap: 3px; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .nav-link { padding: 12px; }
  .menu-toggle { display: grid; }
  .page-shell { width: min(100% - 30px, 1180px); }
  .hero { min-height: 0; grid-template-columns: 1fr; margin: 20px 0 52px; padding: 32px 24px 24px; border-radius: 22px; }
  .hero h1 { font-size: clamp(37px, 11vw, 51px); }
  .hero-description { max-width: 330px; font-size: 12px; }
  .hero-side { position: absolute; right: -39px; bottom: -42px; width: 170px; min-height: 160px; opacity: 0.55; transform: scale(0.72); transform-origin: bottom right; }
  .hero-ball { width: 95px; height: 95px; font-size: 45px; }
  .hero-note, .hero-date { display: none; }
  .content-section { margin-bottom: 52px; }
  .section-heading { align-items: flex-start; gap: 12px; }
  .section-heading h2 { font-size: 26px; }
  .section-description { max-width: 300px; font-size: 11px; }
  .timezone-chip { max-width: 130px; padding: 7px 9px; font-size: 9px; }
  .agenda-toolbar { flex-wrap: wrap; }
  .search-box { max-width: none; flex-basis: 100%; }
  .filter-button { min-height: 39px; }
  .date-filter-row { margin-right: -15px; }
  .event-card { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 13px 11px; border-radius: 14px; }
  .event-time { font-size: 16px; }
  .event-state { font-size: 8px; letter-spacing: 0.04em; }
  .event-main { gap: 8px; }
  .event-logos { width: 35px; min-width: 35px; }
  .event-logos img { width: 29px; height: 29px; }
  .event-logos img + img { width: 23px; height: 23px; }
  .event-name { font-size: 12px; }
  .event-controls { gap: 6px; }
  .favorite-button { width: 34px; height: 34px; }
  .server-picker summary { min-height: 34px; padding: 0 9px; font-size: 9px; }
  .channels-grid { grid-template-columns: 1fr; gap: 9px; }
  .channel-card { min-height: 84px; padding: 10px; }
  .channel-logo-wrap { width: 56px; height: 56px; }
  .privacy-note { align-items: flex-start; margin-bottom: 48px; }
  .site-footer { grid-template-columns: 1fr auto; padding: 21px 17px; }
  .site-footer p { grid-column: 1 / -1; grid-row: 2; }
  .footer-link { grid-column: 2; grid-row: 1; }
}

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