/* LiveWOD — estilos sem etapa de build. */
:root {
  --background: #ffffff;
  --foreground: #111111;
  --brand: #1878e1;
  --brand-ink: #0f5fb8;
  --brand-soft: #e8f1fc;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --surface: #f6f7f9;
  --ok: #138a4b;
  --ok-soft: #e5f5ec;
  --warn: #9a6300;
  --warn-soft: #fff4dc;
  --danger: oklch(57.7% 0.245 27.325);
  --danger-soft: #fdecec;
  --radius: 12px;
  --font-inter: "Inter", Arial, Helvetica, sans-serif;
  --font-anton: "Anton", Impact, sans-serif;
}

/* preflight */
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; tab-size: 4; }
h1, h2, h3 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; background-color: transparent; border-radius: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
input::placeholder, textarea::placeholder { opacity: 1; color: color-mix(in oklab, currentColor 45%, transparent); }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--brand) 55%, transparent); outline-offset: 2px; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-inter);
}
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* utilitários usados nas telas de entrada (equivalentes ao Tailwind original) */
.mx-auto { margin-inline: auto; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.justify-center { justify-content: center; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.min-h-screen { min-height: 100vh; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.w-full { width: 100%; }
.p-3 { padding: 0.75rem; }
.p-6 { padding: 1.5rem; }
.font-title { font-family: var(--font-anton); }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; }
.underline { text-decoration-line: underline; }
.bg-brand { background-color: var(--brand); }
.text-brand { color: var(--brand); }
.text-white { color: #fff; }
.text-red-600 { color: var(--danger); }
.rounded { border-radius: 0.25rem; }
.border { border-width: 1px; border-style: solid; }
.border-neutral-300 { border-color: oklch(87% 0 0); }

/* ---------- app (painel e staff) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; padding-top: max(.75rem, env(safe-area-inset-top));
  background: color-mix(in oklab, var(--background) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .logo { font-family: var(--font-anton); font-size: 1.35rem; letter-spacing: .02em; text-transform: uppercase; }
.topbar .logo span { color: var(--brand); }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: .8125rem; color: var(--muted); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { width: 100%; max-width: 46rem; margin-inline: auto; padding: 1rem 1rem 4rem; display: flex; flex-direction: column; gap: 1rem; }
.crumb { font-size: .8125rem; color: var(--muted); display: inline-flex; align-items: center; gap: .25rem; }
.crumb:hover { color: var(--brand); }
.title { font-family: var(--font-anton); text-transform: uppercase; font-size: 1.875rem; line-height: 1.1; letter-spacing: .01em; }
.subtitle { color: var(--muted); font-size: .9375rem; }
.section-title { font-weight: 700; font-size: 1rem; margin-top: .5rem; }
.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } .title { font-size: 2.25rem; } }

/* abas roláveis */
.tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; margin-inline: -1rem; padding: 0 1rem; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: .625rem .75rem; font-size: .875rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { color: var(--foreground); border-color: var(--brand); }

/* cartões e listas */
.card { background: var(--background); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.card.soft { background: var(--surface); border-color: transparent; }
.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list > li, .list > a { display: flex; align-items: center; gap: .75rem; padding: .875rem 1rem; border-top: 1px solid var(--line); }
.list > :first-child { border-top: 0; }
.list > a:hover { background: var(--surface); }
.list .grow { flex: 1; min-width: 0; }
.list .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.list .meta { font-size: .8125rem; color: var(--muted); }
.chev { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 1.5rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); font-size: .9375rem; }

/* selos */
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .125rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface); color: var(--muted); white-space: nowrap; }
.badge.blue { background: var(--brand-soft); color: var(--brand-ink); }
.badge.green { background: var(--ok-soft); color: var(--ok); }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.red { background: var(--danger-soft); color: var(--danger); }

/* formulários */
.field { display: flex; flex-direction: column; gap: .375rem; }
.field > label, .label { font-size: .875rem; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 3rem; padding: .625rem .875rem;
  border: 1px solid #d4d4d4; border-radius: 10px; background: #fff; font-size: 1rem;
}
.textarea { min-height: 14rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875rem; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); outline: 3px solid var(--brand-soft); }
.hint { font-size: .8125rem; color: var(--muted); }
.error { font-size: .8125rem; color: var(--danger); font-weight: 500; }
.choice { display: flex; gap: .5rem; }
.choice label { flex: 1; display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; border: 1px solid #d4d4d4; border-radius: 10px; font-weight: 600; cursor: pointer; }
.choice input { accent-color: var(--brand); }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.cat-picker { border: 0; padding: 0; margin: 0; min-width: 0; }
.cat-picker legend { font-weight: 600; font-size: .875rem; padding: 0; margin-bottom: .25rem; }
.cat-list { display: grid; gap: .5rem; margin-top: .5rem; }
.cat-level { border: 1px solid var(--line); border-radius: var(--radius); background: var(--background); padding: .5rem .75rem; display: grid; gap: .5rem; }
.cat-level:has(> .cat-check input:checked) { border-color: var(--brand); }
.cat-check { display: flex; align-items: center; gap: .5rem; font-weight: 600; cursor: pointer; min-height: 2rem; }
.cat-check input { accent-color: var(--brand); width: 1.125rem; height: 1.125rem; }
.cat-body { display: grid; gap: .5rem; padding: 0 0 .25rem 1.625rem; }
.cat-level:not(:has(> .cat-check input:checked)) > .cat-body { display: none; }
.cat-age { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.cat-age input { width: 3.5rem; text-align: center; }
.cat-sex { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }
.cat-check-sm { font-weight: 500; min-width: 7rem; }
.cat-sex .cat-size { flex: 1 1 18rem; }
.cat-size label { min-height: 2.25rem; font-size: .8125rem; }
.cat-sex:not(:has(> .cat-check input:checked)) > .cat-size { display: none; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .625rem 1.125rem; border-radius: 10px; font-weight: 600; font-size: 1rem; background: var(--brand); color: #fff; border: 1px solid var(--brand); text-align: center; }
.btn:hover { background: var(--brand-ink); }
.btn.ghost { background: #fff; color: var(--foreground); border-color: #d4d4d4; }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { background: #fff; color: var(--danger); border-color: color-mix(in oklab, var(--danger) 40%, #fff); }
.btn.small { min-height: 2.25rem; padding: .375rem .75rem; font-size: .875rem; }
.btn.block { width: 100%; }
.link { color: var(--brand); font-weight: 600; }
.icon-btn { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; border: 1px solid #d4d4d4; background: #fff; font-size: 1.125rem; }
.icon-btn.sm { width: 1.875rem; height: 1.875rem; font-size: .875rem; border-radius: 6px; }

/* avisos */
.flash { padding: .75rem 1rem; border-radius: 10px; font-size: .9375rem; font-weight: 500; background: var(--ok-soft); color: var(--ok); }
.flash.error { background: var(--danger-soft); color: var(--danger); }
.flash.info { background: var(--brand-soft); color: var(--brand-ink); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }

/* tabela que vira cartões no celular */
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: .5rem; border-bottom: 1px solid var(--line); }
.table td { padding: .625rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.scroll-x { overflow-x: auto; margin-inline: -1rem; padding-inline: 1rem; }

/* montador de blocos */
.block-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .25rem 0; }
.block-row .combo { flex: 2; min-width: 140px; }
.block-row [data-reps], .block-row [data-measure] { width: 5.5rem; flex-shrink: 0; }
.block-row [data-load], .block-row [data-load-female] { width: 5.5rem; flex-shrink: 0; }
.block-row [data-load-unit] { width: 4.2rem; flex-shrink: 0; }
.block-row .tools { display: flex; gap: .25rem; margin-left: auto; }
.block-row .tools { display: flex; gap: .25rem; }
.combo { position: relative; min-width: 0; }
.combo .input { width: 100%; }
/* Caixa de movimento com aparência de lista suspensa (seta à direita) */
.combo .input[data-combo-input] {
  cursor: pointer; padding-right: 2.25rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23333' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right .8rem center;
}
.combo .input[data-combo-input]:focus { cursor: text; }
.combo .input[data-combo-input][aria-expanded=true] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 8l4-4 4 4' fill='none' stroke='%23333' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.combo-list { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 16rem; overflow-y: auto; background: var(--background); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgb(0 0 0 / .12); padding: .25rem; }
.combo-list li { padding: .45rem .65rem; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.combo-list li.active, .combo-list li[role=option]:hover { background: var(--brand-soft); color: var(--brand-ink); }
.combo-list li[aria-selected=true] { font-weight: 600; }
.combo-list .combo-empty { color: var(--muted); cursor: default; }
.preview { background: #111; color: #fff; border-radius: var(--radius); padding: 1rem; font-family: var(--font-anton); text-transform: uppercase; font-size: 1.5rem; letter-spacing: .02em; display: flex; flex-direction: column; gap: .25rem; }
.preview small { font-family: var(--font-inter); text-transform: none; font-size: .75rem; color: #aaa; letter-spacing: 0; }

details.disclosure > summary { cursor: pointer; font-weight: 600; color: var(--brand); list-style: none; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure[open] > summary { margin-bottom: .75rem; }

/* ---------- tela do judge (escura, alto contraste) ---------- */
body.judge { background: #0b0b0c; color: #fff; overscroll-behavior: none; }
.judge .topbar { background: #0b0b0c; border-color: #222; }
.judge .topbar .who { color: #9a9a9a; }
.jwrap { min-height: calc(100dvh - 3.5rem); display: flex; flex-direction: column; padding: .75rem; gap: .75rem; padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
.jhead { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.jhead .lane { font-size: .8125rem; color: #9a9a9a; }
.jhead .athlete { font-weight: 700; font-size: 1rem; }
.jstat { display: flex; gap: .5rem; }
.jstat > div { flex: 1; background: #17171a; border-radius: var(--radius); padding: .5rem .75rem; }
.jstat .k { font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: #8a8a8a; }
.jstat .v { font-family: var(--font-anton); font-size: 1.75rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bigbtn {
  flex: 1; min-height: 76px; width: 100%; border-radius: 20px; background: var(--brand); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; padding: 1rem;
  font-family: var(--font-anton); text-transform: uppercase; text-align: center; line-height: 1.05;
  font-size: clamp(2rem, 10vw, 4rem); letter-spacing: .01em;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .06s ease, background .1s;
}
.bigbtn small { font-family: var(--font-inter); text-transform: none; font-size: .875rem; font-weight: 600; opacity: .8; letter-spacing: 0; }
.bigbtn:active { transform: scale(.985); background: var(--brand-ink); }
.bigbtn.green { background: #138a4b; }
.bigbtn.green:active { background: #0f6e3c; }
.bigbtn.pulse { animation: pulse .18s ease; }
@keyframes pulse { 50% { transform: scale(.97); } }
.countdown { flex: 1; display: grid; place-items: center; font-family: var(--font-anton); font-size: clamp(6rem, 40vw, 14rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.jstate { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .75rem; padding: 1rem; }
.jstate h2 { font-family: var(--font-anton); text-transform: uppercase; font-size: 2.25rem; line-height: 1.1; }
.jstate p { color: #b5b5b5; }
.jfoot { display: flex; align-items: center; gap: .5rem; }
.jfoot .grow { flex: 1; font-size: .8125rem; color: #8a8a8a; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.jbtn { min-height: 3rem; padding: .5rem 1rem; border-radius: 12px; background: #1f1f23; color: #fff; font-weight: 600; border: 1px solid #2c2c31; }
.jbtn:active { background: #2a2a30; }
.jbtn.primary { background: var(--brand); border-color: var(--brand); }
.jbtn.ok { background: #138a4b; border-color: #138a4b; }
.jbtn.block { width: 100%; min-height: 3.5rem; font-size: 1.0625rem; }
.sync { display: inline-flex; align-items: center; gap: .375rem; font-size: .75rem; color: #8a8a8a; }
.sync::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #3ecf7a; }
.sync.pending::before { background: #f0b429; }
.sync.offline::before { background: #ef4444; }
.loadpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.loadpad button { min-height: 3.25rem; border-radius: 12px; background: #1f1f23; border: 1px solid #2c2c31; color: #fff; font-weight: 700; font-size: 1.125rem; }
.loadpad button:active { background: #2a2a30; }
.loadval { text-align: center; font-family: var(--font-anton); font-size: clamp(3rem, 18vw, 5.5rem); line-height: 1; font-variant-numeric: tabular-nums; }
.loadval small { font-size: .4em; color: #9a9a9a; }
.jinput { width: 100%; min-height: 4rem; border-radius: 14px; background: #17171a; border: 1px solid #2c2c31; color: #fff; text-align: center; font-family: var(--font-anton); font-size: 2.5rem; }
.summary { width: 100%; background: #17171a; border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: .25rem; }
.summary .big { font-family: var(--font-anton); font-size: 2.75rem; line-height: 1.05; }
.lanes { display: flex; flex-direction: column; gap: .5rem; width: 100%; }
.lanes > div { display: flex; justify-content: space-between; gap: .5rem; background: #17171a; border-radius: 12px; padding: .75rem 1rem; }
.lanes .lv { font-family: var(--font-anton); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.judge .flash.error { background: #3a1416; color: #ff9b9b; }

/* ---------- páginas públicas ---------- */
.hero { background: #111; color: #fff; border-radius: var(--radius); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.hero .hero-k { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #9a9a9a; }
.hero p { color: #cfcfcf; font-size: .9375rem; }
.hero .btn.ghost { background: transparent; color: #fff; border-color: #3a3a3a; }
.hero .btn.ghost:hover { background: #1d1d1d; }
.prose { display: flex; flex-direction: column; gap: .75rem; line-height: 1.6; }
.prose h2 { font-family: var(--font-anton); text-transform: uppercase; font-size: 1.375rem; margin-top: .75rem; }
.prose h3, .prose h4 { font-weight: 700; margin-top: .5rem; }
.prose ul { list-style: disc; padding-left: 1.25rem; display: flex; flex-direction: column; gap: .25rem; }
.prose ul ul { list-style: circle; margin-top: .25rem; color: var(--muted); }
.board { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.board li { display: grid; grid-template-columns: 2.75rem 1fr auto; align-items: center; gap: .75rem; padding: .75rem 1rem; border-top: 1px solid var(--line); }
.board li:first-child { border-top: 0; }
.board .pos { font-family: var(--font-anton); font-size: 1.5rem; }
.board li:first-child .pos { color: var(--brand); }
.board .who { display: flex; flex-direction: column; min-width: 0; }
.board .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .places { font-size: .75rem; color: var(--muted); }
.board .pts { font-family: var(--font-anton); font-size: 1.375rem; text-align: right; }
.board .pts small { font-family: var(--font-inter); font-size: .6875rem; color: var(--muted); }
.sync-light { display: inline-flex; align-items: center; gap: .375rem; font-size: .75rem; font-weight: 600; color: var(--ok); }
.sync-light::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #3ecf7a; }

/* ---------- telão: legível a 10 m; relógio e placar na mesma tela ---------- */
body.judge:has(.telao) { overflow: hidden; }
.telao { --rows: 6; position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr; background: #111; color: #fff; }
.t-clock { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3vh 4vw 1vh; gap: .5vh; }
.t-event { font-size: clamp(.875rem, 2.2vh, 1.5rem); color: #8a8a8a; text-transform: uppercase; letter-spacing: .1em; }
.t-heat { font-family: var(--font-anton); font-size: clamp(1.25rem, 4vh, 3rem); text-transform: uppercase; }
.t-time { font-family: var(--font-anton); font-size: clamp(5rem, 25vh, 22rem); line-height: .95; font-variant-numeric: tabular-nums; color: #fff; }
.t-time.over { color: #f0b429; }
.t-sub { font-size: clamp(.875rem, 2.4vh, 1.75rem); color: #b5b5b5; }
.t-board { padding: 1vh 4vw 3vh; overflow: hidden; }
.t-board ol { height: 100%; display: grid; grid-auto-rows: minmax(0, calc((100% - (var(--rows) - 1) * .6vh) / var(--rows))); gap: .6vh; }
.t-board li { display: grid; grid-template-columns: 2.2em 1fr auto; align-items: center; gap: .6em; padding: 0 .8em; border-radius: 1vh; background: #1b1b1e;
  font-family: var(--font-anton); text-transform: uppercase; font-size: clamp(1rem, calc(60vh / var(--rows) * .5), 4rem); line-height: 1; }
.t-board li:first-child .t-pos { color: var(--brand); }
.t-pos { color: #7a7a7a; font-variant-numeric: tabular-nums; }
.t-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-score { font-variant-numeric: tabular-nums; text-transform: none; }
.t-board li.t-empty { grid-template-columns: 1fr; text-align: center; color: #9a9a9a; background: transparent; }
.t-exit { position: fixed; top: 1vh; right: 1.5vw; color: #444; font-size: 1.5rem; padding: .25rem .5rem; }
.t-exit:hover { color: #aaa; }
@media (min-aspect-ratio: 4/3) {
  .telao { grid-template-rows: 1fr; grid-template-columns: 1fr 1fr; }
  .t-clock { padding: 4vh 2vw; }
  .t-time { font-size: clamp(5rem, 30vh, 24rem); }
  .t-board { padding: 4vh 3vw 4vh 0; }
  .t-board li { font-size: clamp(1rem, calc(80vh / var(--rows) * .45), 4rem); }
}
.bigbtn.rest, .bigbtn:disabled.rest { background: #1f1f23; color: #9a9a9a; opacity: 1; cursor: default; transform: none; }

/* Judge: prova em partes */
.partnow { width: 100%; background: #17171a; border-radius: var(--radius); padding: .875rem 1rem; display: flex; flex-direction: column; gap: .25rem; text-align: left; }
.partnow .step { font-size: .8125rem; color: #9a9a9a; text-transform: uppercase; letter-spacing: .06em; }
.partnow .title { font-family: var(--font-anton); text-transform: uppercase; font-size: clamp(1.5rem, 7vw, 2.25rem); line-height: 1.05; color: #fff; }
.partnow .left { font-family: var(--font-anton); font-size: clamp(2.5rem, 14vw, 4rem); line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
.partnow.rest { background: #101012; }
.partnow.rest .title { color: #b5b5b5; }
.partlist { width: 100%; display: flex; flex-direction: column; gap: .25rem; font-size: .875rem; color: #b5b5b5; text-align: left; }
.partlist > div { display: flex; justify-content: space-between; gap: .5rem; padding: .375rem .625rem; border-radius: 10px; background: #121214; }
.partlist > div.now { background: #1f1f23; color: #fff; font-weight: 600; }
.partlist b { color: #fff; font-variant-numeric: tabular-nums; }
.loadpad.four { grid-template-columns: repeat(4, 1fr); }
.partlist > div[role=button] { cursor: pointer; }

/* prova em partes: etapa compacta e enxuta */
.part-row {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .5rem .75rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / .03);
}
.part-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  line-height: 1;
}
.part-row-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.part-row-title {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--foreground);
}
.part-row-time {
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: .125rem .375rem;
  border-radius: 4px;
}
.part-row-tools {
  display: flex;
  gap: .25rem;
  margin-left: auto;
}
.part-fields {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .5rem;
  align-items: flex-end;
}
.part-field {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}
.part-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  white-space: nowrap;
}
.part-field-kind {
  flex: 2 1 170px;
  min-width: 140px;
}
.part-field-dur {
  flex: 0 0 5.25rem;
  width: 5.25rem;
}
.part-field-dur .input {
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.part-field-mov {
  flex: 3 1 170px;
  min-width: 130px;
}
.part-field-unit {
  flex: 1 1 7.25rem;
  min-width: 6.5rem;
}
.part-row .input,
.part-row .select {
  min-height: 2.25rem;
  height: 2.25rem;
  padding: .25rem .5rem;
  font-size: .875rem;
  border-radius: 7px;
  border: 1px solid #d4d4d4;
  background: #fff;
}
.part-row .input:focus,
.part-row .select:focus {
  border-color: var(--brand);
  outline: 2px solid var(--brand-soft);
}

/* prova em partes: transição simplificada entre etapas */
.part-rest {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .75rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: .85rem;
}
.part-rest-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.part-rest .part-rest-sec {
  width: 4rem;
  min-height: 2rem;
  height: 2rem;
  padding: .2rem .4rem;
  text-align: center;
  font-size: .875rem;
  border-radius: 6px;
  font-weight: 600;
}
.part-rest-time {
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.part-rest-tools {
  display: flex;
  gap: .25rem;
  margin-left: auto;
}

/* prova em partes: módulo de duplas e criação paralela */
.parts-module { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.parts-split-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 860px) {
  .parts-split-grid { grid-template-columns: 1fr; }
}
.parts-col { background: var(--card-bg, #fff); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.parts-col-a { border-top: 3px solid #2563eb; }
.parts-col-b { border-top: 3px solid #059669; }
.parts-split-divider { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .5rem 0; }
.parts-exchange-card { background: var(--brand-soft, #f1f5f9); border: 1px dashed var(--line); border-radius: var(--radius); padding: .75rem; text-align: center; min-width: 7.5rem; }
.parts-sublist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .375rem; }


/* Card de Etapa com foco no Movimento */
.part-row {
  background: var(--card-bg, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .625rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.part-row:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.part-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.part-row-title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.part-row-time {
  font-size: .8125rem;
  color: var(--muted);
  margin-left: .5rem;
}
.part-mov-highlight {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.part-mov-highlight .part-label {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--brand-ink, #0f172a);
  letter-spacing: .02em;
}
.part-mov-input {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  padding: .5rem .75rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  width: 100%;
}
.part-mov-input:focus {
  border-color: var(--brand);
  background: #fff;
}
.part-row-specs {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding-top: .25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.part-spec-field {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.part-spec-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.part-spec-field .input,
.part-spec-field .select {
  padding-block: .35rem;
  font-size: .875rem;
}

/* Movimentos da etapa: nome + reps; 2 ou mais = complex */
.part-mov-head { display: flex; align-items: center; gap: .5rem; }
.part-complex-badge { font-size: .7rem; }
.part-mov-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .375rem; }
.part-mov-line { display: flex; align-items: center; gap: .375rem; }
.part-mov-line .part-mov-input { flex: 1; min-width: 0; }
.part-mov-line .part-mov-reps { width: 4.5rem; flex: none; text-align: center; font-weight: 600; font-size: 1rem; padding: .5rem .25rem; }
.part-mov-line .icon-btn { flex: none; }
.part-row.is-complex .part-mov-lines { background: var(--brand-soft); border-radius: var(--radius); padding: .375rem; }
.part-mov-add {
  width: 100%; text-align: left; cursor: pointer; font: inherit; font-size: .875rem; font-weight: 600;
  color: var(--brand); background: transparent; border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: .5rem .75rem; transition: border-color .15s, background .15s;
}
.part-mov-add:hover, .part-mov-add:focus-visible { border-color: var(--brand); background: var(--brand-soft); outline: none; }
.part-mov-add .muted { font-weight: 400; font-size: .8125rem; }
@media (max-width: 480px) { .part-mov-add .muted { display: none; } }

/* Inscrições: lista por categoria com arrastar, busca e ações rápidas */
.regs-toolbar { display: flex; align-items: center; gap: .75rem; }
.regs-toolbar .input { flex: 1; min-height: 2.5rem; padding-block: .375rem; font-size: .9375rem; }
.regs-toolbar .small { white-space: nowrap; }
.regs-hint { margin-top: -.5rem; }
[data-regs].is-busy { cursor: progress; }
.reg-cat { display: flex; flex-direction: column; gap: .5rem; border-radius: calc(var(--radius) + 4px); transition: background .15s, outline-color .15s; outline: 2px dashed transparent; outline-offset: 4px; }
.reg-cat-head { display: flex; align-items: center; gap: .5rem; }
.reg-cat-head .section-title { margin-top: 0; }
.reg-count { margin-left: auto; }
.is-dragging .reg-cat { outline-color: var(--line); }
.reg-cat.drop-over { outline-color: var(--brand); background: var(--brand-soft); }
.reg-list { background: var(--background); }
.reg-list > li.reg-item { padding: .5rem .75rem .5rem .5rem; gap: .5rem; transition: background .15s, opacity .15s; }
.reg-item:hover { background: var(--surface); }
.reg-item.dragging { opacity: .4; }
.reg-item.just-moved { animation: reg-flash 1s ease-out; }
@keyframes reg-flash { from { background: var(--brand-soft); } to { background: transparent; } }
.reg-item.status-cancelled .reg-name { text-decoration: line-through; color: var(--muted); }
.reg-grip { color: #b0b0b0; cursor: grab; font-size: 1.125rem; line-height: 1; user-select: none; padding: .25rem; }
.reg-item:hover .reg-grip { color: var(--muted); }
.reg-item:active .reg-grip { cursor: grabbing; }
.reg-name { width: 100%; font-weight: 600; padding: .125rem .375rem; margin-left: -.375rem; border-radius: 6px; border: 1px solid transparent; text-overflow: ellipsis; }
/* Fora da edição o nome não captura o mouse: o cartão inteiro arrasta e um clique abre a edição */
.reg-item[draggable] { cursor: grab; }
.reg-item:not(.editing) .reg-name { pointer-events: none; cursor: inherit; }
.reg-item:not(.editing) .grow:hover .reg-name, .reg-name:hover { border-color: var(--line); background: #fff; }
.reg-name:focus { border-color: var(--brand); background: #fff; outline: 3px solid var(--brand-soft); }
.reg-item .meta { padding-left: .0625rem; }
.reg-actions { display: flex; align-items: center; gap: .375rem; flex: none; }
.reg-status { appearance: none; -webkit-appearance: none; cursor: pointer; border-radius: 999px; font-size: .75rem; font-weight: 600;
  padding: .3125rem 1.5rem .3125rem .625rem; border: 1px solid transparent; background: var(--surface) no-repeat right .5rem center / .5rem
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b6b6b' stroke-width='1.5'/%3E%3C/svg%3E"); color: var(--muted); }
.reg-status:focus-visible { outline: 3px solid var(--brand-soft); border-color: var(--brand); }
.status-free .reg-status, .status-paid .reg-status { background-color: var(--ok-soft); color: var(--ok); }
.status-pending .reg-status { background-color: var(--warn-soft); color: var(--warn); }
.status-cancelled .reg-status { background-color: var(--danger-soft); color: var(--danger); }
.reg-move .icon-btn { position: relative; cursor: pointer; color: var(--muted); }
.reg-move select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.reg-move .icon-btn:hover, .reg-del:hover { background: var(--surface); color: var(--foreground); }
.reg-del { color: var(--muted); }
.reg-del:hover { color: var(--danger) !important; border-color: color-mix(in oklab, var(--danger) 40%, #fff); }
.reg-list > li.reg-empty { justify-content: center; color: var(--muted); font-size: .875rem; padding: 1rem; }
.reg-add { display: flex; gap: .5rem; }
.reg-add .input { min-height: 2.5rem; padding-block: .375rem; font-size: .9375rem; border-style: dashed; background: transparent; }
.reg-add .input:focus { border-style: solid; background: #fff; }
.reg-add .btn { display: none; }
.reg-add:focus-within .btn { display: inline-flex; }
.reg-toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 50; max-width: min(32rem, calc(100vw - 2rem));
  background: #111; color: #fff; padding: .625rem 1rem; border-radius: 10px; font-size: .875rem; font-weight: 500; box-shadow: 0 8px 24px rgb(0 0 0 / .2); }
.reg-toast.error { background: var(--danger); }
.reg-toast.warn { background: var(--warn); }
/* atletas do time */
.reg-list > li.reg-item { flex-wrap: wrap; }
.reg-roster-toggle { border: 1px solid var(--line); cursor: pointer; font: inherit; font-size: .75rem; font-weight: 600; flex: none; }
.reg-roster-toggle.green, .reg-roster-toggle.amber, .reg-roster-toggle.red { border-color: transparent; }
.reg-roster-toggle:hover { filter: brightness(.96); }
.reg-roster-toggle:focus-visible { outline: 3px solid var(--brand-soft); border-color: var(--brand); }
.reg-roster-toggle[aria-expanded="true"] { box-shadow: inset 0 0 0 1px currentColor; }
.reg-roster { flex-basis: 100%; display: flex; flex-direction: column; gap: .5rem; padding: .25rem 0 .25rem 2rem; cursor: default; }
.reg-roster[hidden] { display: none; }
.reg-roster-warn { margin: 0; font-size: .8125rem; font-weight: 600; color: var(--warn); }
.reg-roster-warn.over { color: var(--danger); }
.reg-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.reg-person { display: flex; align-items: center; gap: .5rem; padding: .375rem .5rem; border-radius: 8px; background: var(--surface); font-size: .875rem; }
.reg-person .grow { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; min-width: 0; }
.reg-person.excess { background: var(--danger-soft); }
.reg-person.slot { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.reg-person-add .input { min-height: 2.25rem; font-size: .875rem; }
@media (max-width: 30rem) {
  .reg-grip { display: none; }
  .reg-list > li.reg-item { padding-left: .75rem; flex-wrap: wrap; }
  .reg-item .grow { flex-basis: 60%; }
  .reg-roster { padding-left: 0; }
  .reg-roster .grow { flex: 1 1 auto; }
}

/* cronograma: data → prova → bateria */
.sched-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: .5rem; }
.sched-summary > div { background: var(--surface); border-radius: var(--radius); padding: .625rem .75rem; display: flex; flex-direction: column; }
.sched-summary strong { font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.sched-summary span { font-size: .75rem; color: var(--muted); }
.sched-day { display: flex; flex-direction: column; gap: 1.5rem; }
.sched-day-title { font-weight: 700; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); padding: .5rem .75rem; background: var(--brand-soft); border-radius: 8px; position: sticky; top: 0; z-index: 2; }
.sched-wod { display: flex; flex-direction: column; gap: .75rem; }
.sched-wod-head { padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.sched-wod-title { font-family: var(--font-anton); text-transform: uppercase; font-size: 1.75rem; line-height: 1.1; letter-spacing: .01em; }
.sched-heats { display: flex; flex-direction: column; }
.sched-heat { position: relative; background: var(--background); border: 1px solid var(--line); border-radius: var(--radius); padding: .875rem 1rem; display: flex; flex-direction: column; gap: .625rem; }
.sched-heat.is-clickable { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.sched-heat.is-clickable:hover { border-color: color-mix(in oklab, var(--brand) 45%, var(--line)); box-shadow: 0 2px 10px rgb(24 120 225 / .08); }
.sched-heat.is-running { border-color: var(--ok); box-shadow: inset 4px 0 0 var(--ok); }
.sched-heat.is-done { background: var(--surface); }
.sched-heat-head { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.sched-heat-title { font-weight: 700; font-size: 1.0625rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.sched-time { font-variant-numeric: tabular-nums; font-size: .9375rem; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); padding: .0625rem .5rem; border-radius: 6px; }
.sched-cats { display: flex; flex-wrap: wrap; gap: .375rem; }
.cat-chip { font-size: .75rem; font-weight: 600; padding: .125rem .5rem; border-radius: 999px; }
.cat-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; vertical-align: middle; margin-left: .25rem; }
.tone-0 { background: #e8f1fc; color: #0f5fb8; } .cat-dot.tone-0 { background: #1878e1; }
.tone-1 { background: #e5f5ec; color: #0f6f3c; } .cat-dot.tone-1 { background: #138a4b; }
.tone-2 { background: #fff4dc; color: #8a5700; } .cat-dot.tone-2 { background: #d48a00; }
.tone-3 { background: #f3e9fb; color: #6b2fa0; } .cat-dot.tone-3 { background: #8a46c7; }
.tone-4 { background: #fdecec; color: #a32020; } .cat-dot.tone-4 { background: #d13b3b; }
.tone-5 { background: #e6f6f7; color: #0d6a72; } .cat-dot.tone-5 { background: #13909a; }
.sched-lanes { display: grid; gap: .25rem; font-size: .875rem; }
.sched-lanes li { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.sched-lanes .lane-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-no { flex: none; display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 6px; background: var(--surface); color: var(--muted); font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sched-open { align-self: flex-start; font-size: .8125rem; font-weight: 600; color: var(--brand-ink); }
.sched-open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* a caixinha inteira abre */
.sched-gap { display: flex; align-items: center; gap: .5rem; padding: .375rem 0 .375rem 1.25rem; font-size: .75rem; font-weight: 600; color: var(--muted); }
.sched-gap::before { content: ""; width: 2px; height: 1.25rem; background: repeating-linear-gradient(to bottom, var(--line) 0 3px, transparent 3px 6px); }
.sched-gap span { background: var(--surface); padding: .125rem .5rem; border-radius: 999px; }
.sched-gap.is-tight span { background: var(--warn-soft); color: var(--warn); }
.sched-gap.is-overlap span { background: var(--danger-soft); color: var(--danger); }
.sched-dialog { margin: auto; width: min(34rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); border: 0; border-radius: 16px; padding: 1.25rem; box-shadow: 0 20px 60px rgb(0 0 0 / .25); color: var(--foreground); background: var(--background); }
.sched-dialog[open] { display: flex; flex-direction: column; gap: .75rem; }
.sched-dialog::backdrop { background: rgb(17 17 17 / .45); }
.sched-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.sched-dialog .eyebrow { color: var(--muted); text-transform: uppercase; }
.sched-move { display: grid; grid-template-columns: 1fr; gap: .5rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.sched-move-who { display: flex; gap: .5rem; align-items: flex-start; font-size: .875rem; }
@media (min-width: 560px) { .sched-move { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: center; } }
