:root {
  --purple: #680a9d;
  --purple-d: #4a0772;
  --purple-l: #9b3eb1;
  --lilac: #f4e6fb;
  --orange: #f07c1b;
  --bg: #faf7fc;
  --card: #ffffff;
  --text: #1d1424;
  --muted: #6c5f75;
  --line: #e8dcef;
  --ok: #1f8a4c;
  --warn: #b25d00;
  --radius: 14px;
  --nav-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #140d19; --card: #1f1527; --text: #f2eaf7; --muted: #b3a5bd; --line: #3a2a46; --lilac: #2b1c38;
    --ok: #4fc883; --warn: #f0a050;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
a { color: var(--purple-l); }
@media (prefers-color-scheme: dark) { a { color: #d7a6ef; } }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: linear-gradient(120deg, var(--purple-d), var(--purple));
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand img { border-radius: 50%; background: #fff; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand small { opacity: .8; font-size: 12px; white-space: nowrap; }
.langs { display: flex; gap: 2px; background: rgba(255,255,255,.14); border-radius: 999px; padding: 3px; flex: none; }
.langs button {
  border: 0; background: transparent; color: #fff; font: inherit; font-size: 13px; font-weight: 600;
  padding: 5px 8px; border-radius: 999px; cursor: pointer; min-width: 34px;
}
.langs button[aria-pressed="true"] { background: #fff; color: var(--purple-d); }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: var(--nav-h); text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600;
  text-align: center; line-height: 1.1; padding: 0 2px;
}
.tabs a .ic { font-size: 21px; line-height: 1; }
.tabs a[aria-current="page"] { color: var(--purple); }
@media (prefers-color-scheme: dark) { .tabs a[aria-current="page"] { color: #d7a6ef; } }
.tabs a.live { color: var(--orange); }

@media (min-width: 820px) {
  body { padding-bottom: 0; }
  .tabs {
    position: sticky; top: 60px; bottom: auto; display: flex; justify-content: center; gap: 4px;
    border-top: 0; border-bottom: 1px solid var(--line); padding: 0 16px;
  }
  .tabs a { flex-direction: row; height: 48px; font-size: 15px; padding: 0 14px; gap: 6px; border-bottom: 3px solid transparent; }
  .tabs a .ic { font-size: 17px; }
  .tabs a[aria-current="page"] { border-bottom-color: var(--purple); }
}

main { max-width: 860px; margin: 0 auto; padding: 16px; outline: none; }
h1 { font-size: 26px; line-height: 1.2; margin: 6px 0 4px; }
h2 { font-size: 19px; margin: 0 0 10px; }
.sub { color: var(--muted); margin: 0 0 14px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 0 0 14px;
}
.hero {
  background: radial-gradient(circle at 85% 15%, rgba(240,124,27,.35), transparent 45%), linear-gradient(140deg, var(--purple-d), var(--purple) 60%, var(--purple-l));
  color: #fff; border: 0; padding: 22px 18px;
}
.hero h1 { color: #fff; }
.hero p { margin: 0 0 14px; opacity: .92; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--orange); color: #fff; font: inherit; font-weight: 700;
  padding: 11px 16px; border-radius: 999px; text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--purple); border: 1px solid var(--line); }
.facts { display: grid; gap: 10px; }
.fact { display: flex; gap: 12px; align-items: flex-start; }
.fact .ic { font-size: 22px; line-height: 1.2; flex: none; width: 28px; text-align: center; }
.fact b { display: block; }
ul.clean { margin: 0; padding-left: 20px; }
ul.clean li { margin: 4px 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; white-space: nowrap; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hotel { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.hotel:last-child { border-bottom: 0; }
.hotel span { color: var(--muted); white-space: nowrap; font-size: 14px; }
.grid2 { display: grid; gap: 14px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }

.grade { margin: 0 0 14px; }
.grade h3 { margin: 0 0 6px; font-size: 16px; }
.danceRow { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.danceRow b { min-width: 120px; }
.chip {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--lilac); color: var(--purple-d); margin: 2px 2px 2px 0; white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .chip { color: #e7c7f7; } }
.chip.dim { opacity: .5; }

.block { border-left: 4px solid var(--purple-l); padding: 4px 0 4px 12px; margin: 0 0 16px; }
.block .time { font-weight: 800; color: var(--purple); }
@media (prefers-color-scheme: dark) { .block .time { color: #d7a6ef; } }
.floors { display: grid; gap: 8px; margin-top: 8px; }
@media (min-width: 640px) { .floors { grid-template-columns: repeat(3, 1fr); } }
.floor { background: var(--lilac); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.floor b { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pause { color: var(--muted); font-size: 14px; margin: -6px 0 16px 16px; }
.note { background: #fff4e8; border: 1px solid #f6d3ae; color: #6b3a07; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
@media (prefers-color-scheme: dark) { .note { background: #2e1f10; border-color: #5c3a17; color: #f6d3ae; } }

.judge { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.judge:last-child { border-bottom: 0; }
.judge .av {
  width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--purple), var(--orange)); color: #fff; font-weight: 800; font-size: 18px;
}
.judge small { color: var(--muted); display: block; }

.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--lilac); border-radius: 999px; padding: 4px; margin: 0 0 14px; }
.seg button { border: 0; background: transparent; font: inherit; font-weight: 700; padding: 9px; border-radius: 999px; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--purple); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
@media (prefers-color-scheme: dark) { .seg button[aria-pressed="true"] { color: #e7c7f7; } }
input[type=search], select {
  width: 100%; font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
}
input[type=search]:focus, select:focus { outline: 2px solid var(--purple-l); outline-offset: 1px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 2px 12px; }
.result { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; cursor: pointer; }
.result b { display: block; }
.result small { color: var(--muted); }
.dancer { margin: 0 0 14px; }
.dancer h3 { margin: 0; font-size: 17px; }
.dancer .meta { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.num-badge { display: inline-block; background: var(--purple); color: #fff; border-radius: 8px; padding: 0 7px; font-size: 13px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }
.comp { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.comp .when { font-weight: 800; font-size: 17px; color: var(--purple); line-height: 1.2; }
@media (prefers-color-scheme: dark) { .comp .when { color: #d7a6ef; } }
.comp .when small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.comp .what b { display: block; }
.comp .what small { color: var(--muted); }
.state { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-top: 3px; }
.state.scheduled { background: var(--lilac); color: var(--purple-d); }
.state.processing { background: #fff1dc; color: var(--warn); }
.state.published { background: #dcf5e6; color: var(--ok); }
@media (prefers-color-scheme: dark) { .state.scheduled { color: #e7c7f7; } .state.processing { background: #3a2610; } .state.published { background: #12321f; } }
.comp.done { opacity: .75; }
.comp.next .when::after { content: " ●"; color: var(--orange); font-size: 12px; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; }
.summary div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.summary b { display: block; font-size: 22px; color: var(--purple); }
@media (prefers-color-scheme: dark) { .summary b { color: #d7a6ef; } }
.summary small { color: var(--muted); font-size: 12px; }
.updated { color: var(--muted); font-size: 12px; text-align: right; margin: 8px 0 0; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 8px 16px 24px; }
.muted { color: var(--muted); }

.btn.light { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.seg.small { margin: 0 0 12px; }
.seg.small button { padding: 7px; font-size: 14px; }
.timeline .comp:first-child { border-top: 0; }
.who { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 2px; font-size: 14px; }
.who .num-badge { font-size: 12px; min-width: 32px; text-align: center; }
.nowline { display: flex; align-items: center; gap: 8px; color: var(--orange); font-weight: 800; font-size: 13px; margin: 6px 0; }
.nowline::before, .nowline::after { content: ""; flex: 1; height: 2px; background: var(--orange); }
.state.dancing { background: var(--orange); color: #fff; }
