/* PRO-AM Quito 2027 · piloto
   Idea visual: el tablero manual de un torneo de golf (fichas blancas sobre verde)
   y la tarjeta de score en papel (círculo = bajo par, cuadro = sobre par). */
:root {
  --pine: #0E2A22;
  --board: #103528;
  --board-2: #18473A;
  --fairway: #1F6B4A;
  --fairway-2: #2A8A60;
  --paper: #EEF2EC;
  --card: #FFFFFF;
  --line: #D6DED6;
  --ink: #13201A;
  --muted: #5A6B62;
  --red: #C8102E;
  --flag: #F2C230;
  --sky: #2F6F95;
  --warn: #A86A12;
  --wa: #1DA851;
  --radius: 14px;
  --f-display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --f-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #D3DDD5;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
input, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--flag); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }

/* ---------- Layout ---------- */
.layout { display: flex; justify-content: center; gap: 48px; min-height: 100dvh; }
.shell {
  width: 100%; max-width: 460px; min-height: 100dvh;
  background: var(--paper);
  display: flex; flex-direction: column; position: relative;
  box-shadow: 0 0 0 1px rgba(14, 42, 34, .06), 0 40px 80px -40px rgba(14, 42, 34, .45);
}
.guide { display: none; }
@media (min-width: 1080px) {
  .layout { padding: 0 24px; }
  .guide { display: block; width: 320px; position: sticky; top: 0; align-self: flex-start; padding: 56px 0 32px; }
}

.demo-band {
  position: sticky; top: 0; z-index: 30;
  background: var(--flag); color: var(--pine);
  font-weight: 600; font-size: 12px; letter-spacing: .02em;
  text-align: center; padding: 5px 12px;
}

/* ---------- Header ---------- */
.top { background: var(--pine); color: #fff; padding: 12px 16px 14px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 42px; height: 42px; flex: none; }
.brand-txt { min-width: 0; }
.brand-txt b {
  display: block; font-family: var(--f-display); font-weight: 700;
  font-size: 23px; letter-spacing: .05em; text-transform: uppercase; line-height: 1;
}
.brand-txt small { display: block; color: #B7D0C3; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.clock { font-family: var(--f-display); font-size: 20px; font-weight: 600; letter-spacing: .04em; color: var(--flag); }
.lang {
  background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  padding: 3px 10px; font-size: 12px; font-weight: 600; color: #fff; cursor: pointer;
}
.roles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px;
  margin-top: 12px; background: rgba(255,255,255,.08); padding: 3px; border-radius: 12px;
}
.roles button {
  border: 0; background: transparent; color: #CFE0D6; padding: 8px 2px;
  border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.roles button[aria-pressed="true"] { background: #fff; color: var(--pine); }

main { flex: 1; padding: 18px 16px 72px; }

/* ---------- Bottom nav ---------- */
.nav {
  position: sticky; bottom: 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: #fff; border-top: 1px solid var(--line);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
}
.nav button {
  border: 0; background: transparent; cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 2px 6px; font-size: 11px; font-weight: 600; color: var(--muted); border-radius: 10px;
}
.nav button svg { width: 22px; height: 22px; }
.nav button[aria-current="page"] { color: var(--fairway); }
.nav button[aria-current="page"]::before {
  content: ""; position: absolute; top: -4px; left: 30%; right: 30%; height: 3px;
  background: var(--fairway); border-radius: 0 0 3px 3px;
}
.badge {
  position: absolute; top: 3px; left: calc(50% + 6px);
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 10.5px; line-height: 17px; text-align: center;
}

/* ---------- Type & common ---------- */
.eyebrow { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.display {
  font-family: var(--f-display); font-weight: 700; text-transform: uppercase;
  font-size: 40px; line-height: .95; letter-spacing: .01em; margin: 4px 0 6px; color: var(--pine);
}
.h {
  font-family: var(--f-display); font-weight: 600; text-transform: uppercase;
  font-size: 18px; letter-spacing: .06em; margin: 26px 0 10px; color: var(--pine);
}
.h3 { font-size: 15px; font-weight: 700; margin: 20px 0 4px; }
.lead { color: var(--muted); margin-bottom: 14px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 12px; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; border: 1.5px dashed var(--line); border-radius: var(--radius); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: 0; border-radius: 12px; padding: 13px 16px; font-weight: 600; font-size: 15px;
  cursor: pointer; background: var(--fairway); color: #fff; margin-top: 10px;
  transition: transform .12s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:hover { background: #185A3E; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn.ghost:hover { background: #fff; }
.btn.wa { background: var(--wa); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.link { background: none; border: 0; color: var(--fairway); font-weight: 600; padding: 10px 0 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 7px; border-radius: 6px; background: #E3EBE4; color: var(--fairway);
}
.tag.warn { background: #FBEFD3; color: var(--warn); }
.tag.push { background: #E1ECF3; color: var(--sky); }

/* ---------- Score marks (como en la tarjeta de papel) ---------- */
.mk { display: inline-grid; place-items: center; width: 24px; height: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.mk.b { border: 1.5px solid var(--red); border-radius: 50%; color: var(--red); }
.mk.e { border: 1.5px solid var(--red); border-radius: 50%; color: var(--red); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--red); }
.mk.bo { border: 1.5px solid var(--ink); }
.mk.db { border: 1.5px solid var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); }
.mk.none { color: #A3B1A9; }
.mk.pend { color: var(--sky); font-weight: 700; letter-spacing: -.05em; }

/* ---------- Leaderboard: tablero manual ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: #DCE4DD; padding: 3px; border-radius: 12px; margin-bottom: 12px; }
.seg button { border: 0; background: transparent; padding: 9px; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button[aria-selected="true"] { background: #fff; color: var(--pine); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.board {
  background: var(--board); color: #fff; border-radius: 16px; padding: 10px;
  box-shadow: inset 0 0 0 2px #0A241B, 0 14px 30px -20px rgba(14,42,34,.8);
}
.board-title {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  font-family: var(--f-display); text-transform: uppercase; letter-spacing: .12em;
  font-size: 13px; color: #B9D3C5; padding: 2px 4px 8px;
}
.live { color: var(--flag); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--flag); animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.board-head, .row-btn { display: grid; grid-template-columns: 46px 1fr 58px 42px; gap: 6px; align-items: center; }
.board-head { padding: 0 6px; }
.board-head span { font-family: var(--f-display); font-size: 11px; letter-spacing: .14em; color: #9FC0B0; text-align: center; text-transform: uppercase; }
.board-head span:nth-child(2) { text-align: left; }
.board-rows { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 5px; }
.board-rows > li { position: relative; }
.row-btn {
  width: 100%; border: 0; background: var(--board-2); border-radius: 10px;
  padding: 6px; cursor: pointer; text-align: left; color: #fff;
}
.row-btn:hover { background: #1E5444; }
.tile {
  background: #F7F7F1; color: var(--ink); font-family: var(--f-display); font-weight: 600;
  font-size: 23px; line-height: 1; text-align: center; padding: 7px 0 5px; border-radius: 4px;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.14), 0 1px 0 rgba(0,0,0,.25);
  font-variant-numeric: tabular-nums;
}
.tile.under { color: var(--red); }
.tile.sm { font-size: 18px; padding: 9px 0 7px; }
.tname { min-width: 0; }
.tname b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: .03em; text-transform: uppercase; line-height: 1.05; }
.tname small { display: block; color: #A9C6B7; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tname em { font-style: normal; color: var(--flag); font-weight: 600; }
.row.me .row-btn { background: #23604A; box-shadow: inset 0 0 0 2px var(--flag); }
.row.me .tname b::after { content: " · tu equipo"; font-size: 13px; color: var(--flag); letter-spacing: .06em; }
.row.flash .row-btn { animation: flash 2.4s ease; }
@keyframes flash { 0%, 35% { background: #3E8A66; } 100% { } }
.board-empty { padding: 30px 12px; text-align: center; color: #B9D3C5; }
.board-foot { font-size: 12px; color: #A9C6B7; padding: 10px 4px 2px; }
.board-foot a { color: var(--flag); }

.sc { background: #FBFCF9; color: var(--ink); border-radius: 10px; margin-top: 5px; padding: 8px 6px; }
.sc table { border-collapse: collapse; width: 100%; font-family: var(--f-display); font-size: 16px; text-align: center; table-layout: fixed; }
.sc table + table { margin-top: 6px; border-top: 1px solid var(--line); }
.sc th { font-weight: 500; color: var(--muted); font-size: 12px; font-family: var(--f-body); }
.sc th:first-child { text-align: left; width: 54px; }
.sc td, .sc th { padding: 3px 0; }
.sc tr.par td { color: var(--muted); font-size: 14px; }

/* ---------- Jugador ---------- */
.hello p { color: var(--muted); }
.status {
  width: 100%; margin-top: 16px; border: 0; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
  background: var(--board); color: #fff; border-radius: 16px; padding: 12px;
}
.status > span { display: flex; flex-direction: column; align-items: center; }
.status small { font-size: 11.5px; color: #A9C6B7; }
.status b { font-family: var(--f-display); font-size: 34px; line-height: 1.05; font-weight: 600; }
.status b.under { color: #FF8A8A; }
.status .go { grid-column: 1 / -1; align-items: flex-end; font-size: 13px; color: var(--flag); font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 52px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding: 8px 0; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 48px; top: 15px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--fairway);
}
.timeline time { font-family: var(--f-display); font-size: 19px; font-weight: 600; color: var(--pine); }
.timeline b { display: block; }
.timeline small { color: var(--muted); }
.timeline li.past { opacity: .5; }
.timeline li.key::before { background: var(--fairway); }
.timeline li.res::before { background: var(--flag); border-color: var(--warn); }
.timeline li.now { padding: 2px 0; }
.timeline li.now::before { background: var(--red); border-color: var(--red); top: 9px; }
.timeline li.now span { font-size: 12px; font-weight: 700; color: var(--red); letter-spacing: .04em; text-transform: uppercase; }

.team .tm { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.team .tm:last-child { border-bottom: 0; }
.team small { color: var(--muted); text-align: right; }
.wa-pair { display: grid; gap: 0; margin-top: 8px; }

.mycard .sc { background: #fff; border: 1px solid var(--line); padding: 10px 8px; }
.kpis3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.kpis3 div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.kpis3 b { display: block; font-family: var(--f-display); font-size: 30px; line-height: 1; font-weight: 600; color: var(--pine); }
.kpis3 b.under { color: var(--red); }
.kpis3 small { color: var(--muted); font-size: 12px; }

.act { margin-bottom: 12px; }
.act-h b { display: block; font-size: 16px; }
.act-h small { color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 12px; }
.slot {
  border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
}
.slot b { font-family: var(--f-display); font-size: 21px; font-weight: 600; line-height: 1.1; }
.slot small { font-size: 11.5px; color: var(--fairway); font-weight: 600; }
.slot.full { background: #F1F3F0; color: #9AA7A0; cursor: not-allowed; }
.slot.full small { color: #9AA7A0; }
.slot.mine { border-color: var(--fairway); background: var(--fairway); color: #fff; }
.slot.mine small { color: var(--flag); }

.bol { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.bol.new { border-color: var(--flag); box-shadow: 0 0 0 2px rgba(242,194,48,.35); }
.bol header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.bol time { font-family: var(--f-display); font-size: 16px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.bol h3 { font-size: 16px; margin-bottom: 2px; }
.bol p { color: #33443B; }

/* ---------- Onboarding ---------- */
.onb .display { font-size: 44px; }
.onb > p { color: var(--muted); }
.data { margin: 16px 0 4px; }
.data div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.data div:last-child { border-bottom: 0; }
.data dt { color: var(--muted); }
.data dd { margin: 0; font-weight: 600; text-align: right; }
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--fairway); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-top: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--fairway); flex: none; }
.langs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.langs button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; font-weight: 600; cursor: pointer; }
.langs button[aria-pressed="true"] { border-color: var(--fairway); box-shadow: inset 0 0 0 1px var(--fairway); }
.install { display: grid; gap: 8px; margin-top: 14px; }
.install .card b { display: block; margin-bottom: 2px; }
.install .card p { color: var(--muted); font-size: 14px; }

/* ---------- Voluntario ---------- */
.assign { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: stretch; }
.assign-flag {
  background: var(--pine); color: #fff; border-radius: 16px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 12px; min-height: 132px;
}
.assign-flag::before { content: ""; position: absolute; left: 22px; top: 14px; width: 2px; height: 46px; background: #fff; }
.assign-flag::after { content: ""; position: absolute; left: 24px; top: 14px; border-left: 26px solid var(--flag); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.assign-flag span { font-family: var(--f-display); text-transform: uppercase; letter-spacing: .14em; font-size: 13px; color: #B9D3C5; }
.assign-flag b { font-family: var(--f-display); font-size: 72px; line-height: .85; font-weight: 700; }
.assign-info .big { font-family: var(--f-display); font-size: 24px; font-weight: 600; color: var(--pine); margin: 2px 0 6px; }
.assign-info .next { font-size: 13.5px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }

.signal {
  width: 100%; margin-top: 14px; display: flex; gap: 12px; align-items: center; text-align: left;
  border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; cursor: pointer;
}
.signal .sw { flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--fairway); position: relative; transition: background-color .2s; }
.signal .sw::after { content: ""; position: absolute; top: 3px; left: 21px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s cubic-bezier(.2,.8,.2,1); }
.signal.off { border-color: #E9C987; background: #FFF8E8; }
.signal.off .sw { background: #B9C2BC; }
.signal.off .sw::after { left: 3px; }
.signal b { display: block; }
.signal small { color: var(--muted); font-size: 13px; }
.pend-banner { margin-top: 10px; background: #E1ECF3; color: #1F4E6B; border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; }

.groups { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.groups button {
  width: 100%; display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: center;
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; cursor: pointer; text-align: left;
}
.grp-time { font-family: var(--f-display); font-size: 19px; font-weight: 600; color: var(--muted); }
.grp-main b { display: block; }
.grp-main small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp-main { min-width: 0; }
.grp-st { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px; background: #EEF1EE; color: var(--muted); white-space: nowrap; }
.grp.llego button { border-color: var(--fairway); box-shadow: 0 0 0 3px rgba(31,107,74,.15); }
.grp.llego .grp-st { background: var(--fairway); color: #fff; }
.grp.llego .grp-time { color: var(--fairway); }
.grp.enviado button { background: #F6F8F5; }
.grp.enviado .grp-st { background: #E3EBE4; color: var(--fairway); }
.grp.pendiente .grp-st { background: #E1ECF3; color: var(--sky); }
.grp.enviando .grp-st { background: var(--sky); color: #fff; }

.back { background: none; border: 0; padding: 0 0 10px; font-weight: 600; color: var(--fairway); cursor: pointer; }
.entry-h p { color: var(--muted); }
.steppers { display: grid; gap: 8px; margin-top: 14px; }
.stp { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 10px 14px; }
.stp b { display: block; }
.stp small { color: var(--muted); font-size: 12.5px; }
.stp-c { display: flex; align-items: center; gap: 6px; flex: none; }
.stp-c button {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper);
  font-size: 24px; line-height: 1; cursor: pointer; font-weight: 500;
}
.stp-c button:active { background: #DCE4DD; }
.stp-n { width: 46px; display: grid; place-items: center; }
.stp-n .mk { width: 40px; height: 40px; font-family: var(--f-display); font-size: 28px; font-weight: 600; }
.confirm-list { list-style: none; margin: 12px 0 0; padding: 0; }
.confirm-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.confirm-list b { font-family: var(--f-display); font-size: 26px; font-weight: 600; }
.qitem { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.qitem small { display: block; color: var(--muted); }

/* ---------- Espectador ---------- */
.amen { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.amen i { width: 38px; height: 38px; border-radius: 10px; background: #E3EBE4; color: var(--fairway); display: grid; place-items: center; }
.amen i svg { width: 20px; height: 20px; }
.amen b { display: block; }
.amen small { color: var(--muted); }
.spon { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); margin-bottom: 12px; }
.spon-band { background: var(--sc); color: #fff; padding: 14px; }
.spon-band b { display: block; font-family: var(--f-display); font-size: 26px; text-transform: uppercase; letter-spacing: .04em; line-height: 1; }
.spon-band small { opacity: .85; }
.spon-body { padding: 4px 14px 14px; }
.spon-offer { font-size: 18px; font-weight: 700; margin-top: 10px; }
.metrics { font-size: 12.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.coupon { text-align: center; border: 2px dashed var(--line); border-radius: 16px; padding: 16px; margin-top: 12px; }
.coupon svg { width: 168px; height: 168px; }
.code { font-family: var(--f-display); font-size: 30px; font-weight: 700; letter-spacing: .08em; color: var(--pine); margin-top: 6px; }
.redeemed { color: var(--fairway); font-weight: 700; margin-top: 10px; }

/* ---------- Admin ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: left; }
button.kpi { cursor: pointer; font: inherit; }
.kpi b { display: block; font-family: var(--f-display); font-size: 28px; line-height: 1.05; font-weight: 600; color: var(--pine); }
.kpi small { color: var(--muted); font-size: 12px; line-height: 1.2; display: block; }
.kpi.alert { border-color: var(--red); }
.kpi.alert b { color: var(--red); }
.kpi.attn { border-color: #E9C987; }
.kpi.attn b { color: var(--warn); }
.holes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.hl {
  border: 0; border-radius: 10px; padding: 7px 2px 6px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; background: #E3EBE4; color: var(--pine);
}
.hl b { font-family: var(--f-display); font-size: 22px; line-height: 1; font-weight: 600; }
.hl small { font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.hl.warn { background: #FBEFD3; color: var(--warn); }
.hl.bad { background: var(--red); color: #fff; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.row-set { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row-set:last-child { border-bottom: 0; }
.row-set small { color: var(--muted); display: block; }
.toggle { position: relative; width: 46px; height: 28px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 14px; background: #B9C2BC; transition: background-color .2s; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s cubic-bezier(.2,.8,.2,1); }
.toggle input:checked + span { background: var(--fairway); }
.toggle input:checked + span::after { left: 21px; }
.toggle input:focus-visible + span { outline: 3px solid var(--flag); outline-offset: 2px; }
.toggle input:disabled + span { opacity: .4; }

.conf h2 { font-size: 19px; margin: 4px 0 6px; }
.conf > p { color: var(--muted); font-size: 14px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.opt { display: flex; flex-direction: column; gap: 4px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; position: relative; background: #fff; }
.opt input { position: absolute; opacity: 0; }
.opt:has(input:checked) { border-color: var(--fairway); box-shadow: inset 0 0 0 1px var(--fairway); background: #F3F8F4; }
.opt:has(input:focus-visible) { outline: 3px solid var(--flag); outline-offset: 2px; }
.opt-n { font-family: var(--f-display); font-size: 40px; font-weight: 700; line-height: 1; color: var(--pine); }
.opt b { font-size: 14px; }
.opt small { color: var(--muted); font-size: 12px; }
.fld { display: block; margin-top: 12px; border: 0; padding: 0; }
.fld > span, .fld legend { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; padding: 0; }
.fld input, .fld textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; resize: vertical; }
.fld input:focus, .fld textarea:focus { border-color: var(--fairway); outline: none; box-shadow: 0 0 0 3px rgba(31,107,74,.15); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chipr { position: relative; }
.chipr input { position: absolute; opacity: 0; }
.chipr span { display: block; border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; background: #fff; }
.chipr input:checked + span { background: var(--pine); border-color: var(--pine); color: #fff; }
.chipr input:focus-visible + span { outline: 3px solid var(--flag); outline-offset: 2px; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--fairway); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.log small { display: block; color: var(--muted); }
.log i { display: block; font-style: normal; font-size: 13.5px; color: #33443B; margin-top: 2px; }

/* ---------- WhatsApp FAB & sheets ---------- */
.fab-wrap { position: sticky; bottom: 72px; height: 0; z-index: 15; display: flex; justify-content: flex-end; padding-right: 16px; }
.fab {
  position: relative; top: -54px;
  width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--wa); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 24px -8px rgba(13, 80, 40, .6);
}
.fab svg { width: 26px; height: 26px; }
.wa-msg { background: #E7F6EC; border-radius: 12px; padding: 12px; margin-top: 10px; }
.wa-msg small { color: var(--muted); font-size: 12px; }
.grp-link { width: 100%; display: flex; justify-content: space-between; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; margin-top: 8px; cursor: pointer; font-weight: 600; text-align: left; }
.grp-link span { color: var(--wa); white-space: nowrap; }

.sheet-wrap {
  position: fixed; inset: 0; z-index: 60; background: rgba(8, 26, 19, .5);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease;
}
.sheet {
  background: var(--paper); width: 100%; max-width: 460px; border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); max-height: 90dvh; overflow: auto;
  animation: up .3s cubic-bezier(.2,.8,.2,1);
}
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: #C2CCC4; margin: 0 auto 12px; }
.sheet-t { font-family: var(--f-display); font-size: 26px; text-transform: uppercase; color: var(--pine); letter-spacing: .02em; }
.sheet > p { color: var(--muted); margin-top: 4px; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

#toast {
  position: fixed; left: 50%; bottom: 140px; transform: translate(-50%, 20px); z-index: 70;
  width: calc(100% - 32px); max-width: 420px; background: var(--pine); color: #fff;
  border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.2,.8,.2,1);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button { background: var(--flag); color: var(--pine); border: 0; border-radius: 8px; padding: 6px 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }

#push .pushcard {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 80;
  width: calc(100% - 20px); max-width: 420px; background: rgba(255,255,255,.97);
  border-radius: 18px; padding: 12px 14px; display: grid; grid-template-columns: 38px 1fr; gap: 10px;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.35); border: 0; text-align: left; cursor: pointer;
  animation: drop .45s cubic-bezier(.2,.8,.2,1);
}
#push img { width: 38px; height: 38px; }
#push small { color: var(--muted); font-size: 12px; }
#push b { display: block; }
#push p { font-size: 14px; color: #33443B; }
@keyframes drop { from { transform: translate(-50%, -140%); } }

/* ---------- Footer & guide ---------- */
.sign { text-align: center; font-family: 'Poppins', var(--f-body); font-weight: 500; font-size: 11.5px; color: var(--muted); padding: 6px 16px 14px; }
.sign button { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; }
.guide-in h2 { font-family: var(--f-display); text-transform: uppercase; font-size: 30px; color: var(--pine); letter-spacing: .02em; }
.guide-in > p { color: var(--muted); margin: 6px 0 18px; }
.moments { list-style: none; margin: 0; padding: 0; counter-reset: m; display: grid; gap: 12px; }
.moments li { counter-increment: m; background: #fff; border-radius: 14px; padding: 14px 14px 14px 52px; position: relative; border: 1px solid var(--line); }
.moments li::before {
  content: counter(m); position: absolute; left: 14px; top: 13px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--pine); color: var(--flag); font-family: var(--f-display); font-weight: 700; font-size: 17px;
  display: grid; place-items: center;
}
.moments b { display: block; }
.moments p { font-size: 13.5px; color: var(--muted); margin: 2px 0 8px; }
.moments button { border: 0; background: var(--fairway); color: #fff; border-radius: 9px; padding: 7px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
.guide-reset { margin-top: 16px; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 360px) {
  .display { font-size: 34px; }
  .assign { grid-template-columns: 96px 1fr; }
  .assign-flag b { font-size: 60px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
