:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #efebe4;
  --cell: #e7e2d9;
  --text: #1d1b20;
  --muted: #6d6873;
  --line: #ddd6cc;
  --accent: #e2602b;
  --accent-ink: #ffffff;
  --accent-soft: #fbe3d7;
  --ok: #2e9d6a;
  --warn: #c98a12;
  --bad: #d23f3f;
  --heat-lo: #8fcdaa;
  --heat-hi: #2f9466;
  --heat-full: #17774a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  --tabbar: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16141a;
    --surface: #211e26;
    --surface-2: #2a2630;
    --cell: #2c2833;
    --text: #f1edf5;
    --muted: #a39caf;
    --line: #36313d;
    --accent: #ff7a3d;
    --accent-ink: #1a0f08;
    --accent-soft: #3d2519;
    --ok: #4cc38a;
    --warn: #f0b545;
    --bad: #ff6b6b;
    --heat-lo: #24543c;
    --heat-hi: #2c8a5c;
    --heat-full: #2fae72;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; /* sin zoom por doble toque */ }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: .4em 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
small { font-size: .8rem; }

/* ---------- Shell ---------- */
.shell { min-height: 100dvh; padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 16px); }
header.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; font-weight: 800; letter-spacing: -.01em; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.offline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.me-btn { background: none; border: 0; padding: 0; cursor: pointer; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
.page-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 14px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title-row .page-title { margin-bottom: 14px; }
section { margin: 22px 0; }
.section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 0 0 10px; }
.section-title small { text-transform: none; letter-spacing: 0; font-weight: 500; }

nav.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tabbar); text-decoration: none; color: var(--muted); font-size: .7rem; font-weight: 600; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { color: var(--accent); }
@media (min-width: 900px) {
  nav.tabs { top: 0; bottom: 0; right: auto; width: 96px; grid-template-columns: 1fr; grid-auto-rows: 80px; align-content: start; padding-top: 70px; border-top: 0; border-right: 1px solid var(--line); }
  .shell { padding-left: 96px; padding-bottom: 32px; }
  header.top { padding-left: 24px; }
}

/* ---------- Componentes ---------- */
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); text-decoration: none; margin-bottom: 10px; }
.card.empty { text-align: center; color: var(--muted); padding: 22px 16px; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }
.spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .88rem; border-radius: 10px; }
.btn.block { width: 100%; margin-top: 10px; }
.btn.big { min-height: 60px; font-size: 1.05rem; flex: 1; }
.danger-text { color: var(--bad) !important; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; color: var(--muted); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled { opacity: .25; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: inherit; }
.link-more { display: inline-block; margin-top: 8px; color: var(--accent); text-decoration: none; font-weight: 600; font-size: .9rem; }
.back { display: inline-block; text-decoration: none; color: var(--muted); margin-bottom: 10px; font-weight: 600; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 7px 14px; font-size: .88rem; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip.small { padding: 4px 10px; font-size: .78rem; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 0 7px; font-size: .75rem; }
.chip.on .count { background: color-mix(in oklab, var(--bg) 25%, transparent); color: inherit; }
.chips.seg { background: var(--surface-2); padding: 4px; border-radius: 12px; gap: 2px; flex-wrap: nowrap; }
.chips.seg .chip { border: 0; background: transparent; flex: 1; justify-content: center; border-radius: 9px; }
.chips.seg .chip.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.chips.seg.scroll { margin: 4px 0 10px; padding: 4px; }
.chips.seg.scroll .chip { flex: 0 0 auto; }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: middle; margin-left: 6px; }
.badge.propuesta { background: color-mix(in oklab, var(--warn) 22%, transparent); color: var(--warn); }
.badge.cancelada { background: color-mix(in oklab, var(--bad) 18%, transparent); color: var(--bad); }
.badge.aprendiendo { background: color-mix(in oklab, #6c63ff 20%, transparent); color: #8f88ff; }
.badge.tiny { font-size: .66rem; padding: 1px 6px; margin-left: 0; }

.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; font-weight: 800; font-size: .9rem; flex: none; background: #777; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.avatar.lg { width: 48px; height: 48px; font-size: 1.2rem; }
.avatar.sm { width: 26px; height: 26px; font-size: .75rem; }
.avatar.xs { width: 20px; height: 20px; font-size: .62rem; }

.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; width: 100%; cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item.dim { opacity: .55; }
.list-item.picked { background: var(--accent-soft); }
.li-icon { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; flex: none; font-weight: 800; }
.li-icon.all { background: var(--accent); color: var(--accent-ink); }
.li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.li-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--muted); font-size: 1.3rem; }
.you { color: var(--accent); font-weight: 600; }
.bar { display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; flex: none; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

.warn-box { background: color-mix(in oklab, var(--warn) 14%, transparent); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }

/* ---------- Formularios ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lbl { font-size: .8rem; font-weight: 700; color: var(--muted); }
.hint { font-size: .78rem; color: var(--muted); }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface); font-size: 16px; /* evita zoom en iOS */
  -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 16px center, right 11px center; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
textarea { resize: vertical; min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.inline { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
.inline select { width: auto; min-height: 36px; padding: 4px 30px 4px 10px; }
.filters { margin-bottom: 8px; }
.filters .search { flex: 1; }
.filters select { width: auto; flex: none; }
.search { margin-bottom: 8px; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--text); }
.mono { font-family: ui-monospace, monospace; font-size: .85rem; }

/* ---------- Login ---------- */
.center-screen { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 380px; text-align: center; display: flex; flex-direction: column; gap: 10px; padding: 26px 20px; }
.login h1 { font-size: 1.7rem; font-weight: 800; }
.logo { font-size: 3rem; }
.error { color: var(--bad); font-weight: 600; margin: 0; }
.who-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 8px 0; }
.who { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font-weight: 600; }
.who small { font-weight: 400; font-size: .72rem; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sesiones ---------- */
.session-card { display: flex; gap: 14px; align-items: stretch; }
.session-card.st-cancelada { opacity: .55; }
.session-card.st-cancelada .sc-title strong { text-decoration: line-through; }
.sc-date { flex: none; width: 56px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0; line-height: 1.1; }
.st-propuesta .sc-date { background: var(--surface-2); color: var(--text); border: 1.5px dashed var(--line); }
.sc-dow, .sc-mon { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.sc-day { font-size: 1.5rem; font-weight: 800; }
.session-card.big .sc-date { width: 66px; }
.session-card.big .sc-day { font-size: 1.9rem; }
.sc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sc-title strong { font-size: 1.05rem; }
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.faces { display: flex; }
.face { margin-right: -6px; border-radius: 50%; border: 2px solid var(--surface); position: relative; }
.face.r-none .avatar, .face.r-no .avatar { filter: grayscale(1); opacity: .35; }
.face.r-tal_vez .avatar { opacity: .7; }
.face.r-tal_vez::after { content: "?"; position: absolute; right: -3px; bottom: -3px; background: var(--warn); color: #000; border-radius: 50%; width: 12px; height: 12px; font-size: 9px; font-weight: 800; display: grid; place-items: center; }
.faces.small .avatar { margin-right: -5px; border: 2px solid var(--surface); }
.rsvp-wrap { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
.rsvp { display: flex; gap: 6px; flex-wrap: wrap; }
.rsvp .chip.on.rsvp-si { background: var(--ok); border-color: var(--ok); color: #fff; }
.rsvp .chip.on.rsvp-no { background: var(--bad); border-color: var(--bad); color: #fff; }
.rsvp .chip.on.rsvp-tal_vez { background: var(--warn); border-color: var(--warn); color: #000; }
.rsvp-tag { font-size: .8rem; font-weight: 700; color: var(--muted); }
.rsvp-tag.r-si { color: var(--ok); } .rsvp-tag.r-no { color: var(--bad); } .rsvp-tag.r-tal_vez { color: var(--warn); }

.detail-head { display: flex; flex-direction: column; gap: 12px; }
.detail-head h1 { font-size: 1.5rem; font-weight: 800; }
.detail-head .big { font-size: 1.2rem; font-weight: 700; margin: 4px 0; }
.detail-head.st-cancelada h1 { text-decoration: line-through; opacity: .6; }
.detail-head .badge { margin: 4px 0; }
.goal { font-size: 1rem; }
.head-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.setlist { list-style: none; padding: 0; margin: 0 0 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sl-item { display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 12px; border-bottom: 1px solid var(--line); }
.sl-item:last-child { border-bottom: 0; }
.sl-item input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--ok); flex: none; }
.sl-num { width: 24px; text-align: center; font-weight: 800; color: var(--accent); flex: none; }
.sl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.sl-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-note { color: var(--accent); }
.sl-actions { display: flex; flex: none; }
.sl-actions .icon-btn { width: 30px; height: 34px; font-size: .95rem; }
@media (max-width: 420px) { .sl-actions .icon-btn { width: 26px; } }

.danger-zone { display: flex; gap: 8px; justify-content: center; margin: 30px 0 10px; }
.recap p { white-space: pre-wrap; margin: 4px 0 0; }

/* ---------- Agenda / grilla ---------- */
.week-nav { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 8px; }
.week-label { border: 0; background: none; font-weight: 700; font-size: 1rem; cursor: pointer; }
.week-nav .icon-btn { font-size: 1.6rem; }
.grid-wrap { margin: 6px 0 4px; }
.g-corner { }
.g-head { border: 0; background: none; padding: 4px 0; font-size: .72rem; color: var(--muted); font-weight: 700; display: flex; flex-direction: column; align-items: center; line-height: 1.15; border-radius: 8px; cursor: default; }
.g-head b { font-size: 1rem; color: var(--text); }
.g-head.today b { background: var(--accent); color: var(--accent-ink); border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.g-head.past { opacity: .4; }
.g-head.ov::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-top: 2px; }
.editing .g-head { cursor: pointer; }
.legend { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 8px 0; }
.lg-cell { min-width: 24px; height: 22px; padding: 0 5px; border-radius: 5px; font-size: .68rem; font-weight: 800; display: grid; place-items: center; background: var(--cell); }
.lg-cell.empty { border: 1px solid var(--line); }
.window .btn { flex: none; }
.who-group { margin-bottom: 12px; }
.person { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); padding: 3px 10px 3px 3px; border-radius: 999px; font-size: .88rem; }

/* ---------- Canciones ---------- */
.song { padding: 12px 14px; }
.song.st-descartada { opacity: .6; }
.song-top { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.song-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.song-title strong { font-size: 1.02rem; }
.song-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.song-links:empty { display: none; }
.pill { font-size: .78rem; font-weight: 600; text-decoration: none; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); }
.vote-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.vote { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-weight: 700; }
.vote.on.up { background: color-mix(in oklab, var(--ok) 20%, transparent); border-color: var(--ok); }
.vote.on.down { background: color-mix(in oklab, var(--bad) 18%, transparent); border-color: var(--bad); }
.by { display: block; margin-top: 6px; }
.ready-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ready-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.ready-team { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.rdot .avatar { opacity: .25; filter: grayscale(1); }
.rdot.r1 .avatar { opacity: .5; filter: none; } .rdot.r2 .avatar { opacity: .8; filter: none; } .rdot.r3 .avatar { opacity: 1; filter: none; box-shadow: 0 0 0 2px var(--ok); }
.ready-team .bar { width: 44px; margin-left: 4px; }

/* ---------- Comentarios ---------- */
.c-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.c-item { display: flex; gap: 8px; align-items: flex-end; }
.c-item.mine { flex-direction: row-reverse; }
.c-bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 12px 8px; max-width: 80%; }
.c-item.mine .c-bubble { background: var(--accent-soft); border-color: transparent; }
.c-meta { color: var(--muted); font-size: .72rem; }
.c-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.c-form { display: flex; gap: 8px; align-items: flex-end; }
.c-form textarea { flex: 1; min-height: 42px; resize: none; }

/* ---------- Modal (sheet) ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0); display: flex; align-items: flex-end; justify-content: center; transition: background .18s; }
.backdrop.open { background: rgba(0,0,0,.45); }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--bg); border-radius: 20px 20px 0 0; transform: translateY(100%); transition: transform .2s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
.sheet.wide { max-width: 680px; }
.backdrop.open .sheet { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 8px 18px; gap: 10px; }
.sheet-head h2 { font-size: 1.15rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { overflow-y: auto; padding: 4px 18px 20px; -webkit-overflow-scrolling: touch; }
@media (min-width: 700px) {
  .backdrop { align-items: center; }
  .sheet { border-radius: 20px; transform: translateY(20px); opacity: 0; transition: transform .2s, opacity .2s; }
  .backdrop.open .sheet { opacity: 1; }
}
.picker { max-height: 50dvh; overflow-y: auto; margin-bottom: 70px; }
.sticky-foot { position: sticky; bottom: -20px; display: flex; gap: 8px; padding: 10px 0 16px; background: var(--bg); }
.sticky-foot .btn { flex: 1; margin: 0; }

/* ---------- Toast ---------- */
#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 14px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 100; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: .9rem; transition: all .2s; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--bad); color: #fff; }
#toast.warn { background: var(--warn); color: #000; }

/* ---------- Modo ensayo ---------- */
.stage { position: fixed; inset: 0; z-index: 80; background: #0d0c0f; color: #f6f2ea; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 10px) 18px calc(env(safe-area-inset-bottom) + 14px); }
.stage-top { display: flex; justify-content: space-between; align-items: center; color: #9a94a3; font-weight: 700; }
.stage .icon-btn { color: #9a94a3; font-size: 1.4rem; }
.stage-main { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 10px; overflow-y: auto; }
.stage-main h1 { font-size: clamp(2.2rem, 9vw, 4.5rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.02; }
.stage-artist { color: #a49dad; font-size: 1.2rem; margin: 0; }
.stage-meta { display: flex; gap: 26px; margin: 18px 0 6px; }
.stage-meta span { display: flex; flex-direction: column; align-items: center; font-size: 2rem; font-weight: 800; color: #ff8a4c; position: relative; }
.stage-meta small { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #8b8594; font-weight: 700; }
.beat { display: inline-block; vertical-align: middle; width: 8px; height: 8px; border-radius: 50%; background: #3a343f; }
.beat.on { background: #ff8a4c; box-shadow: 0 0 12px #ff8a4c; }
.stage-note { font-size: 1.3rem; color: #ffd28a; font-weight: 700; max-width: 640px; }
.stage-notes { color: #c7c1cf; white-space: pre-wrap; max-width: 640px; }
.stage .btn { background: #221f27; border-color: #34303a; color: #f6f2ea; }
.stage .btn.primary { background: #ff7a3d; border-color: #ff7a3d; color: #1a0f08; }
.stage-nav { display: flex; gap: 10px; }
.stage-nav .btn { min-width: 0; flex-direction: column; gap: 0; line-height: 1.2; }
.stage-nav .btn small { font-size: .7rem; opacity: .75; }
.stage-nav .btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-nav .btn.primary { flex: 1.6; }

/* ---------- Editor por día (táctil) ---------- */
.chips.mini { margin: 0; gap: 4px; }
.chips.mini .chip { padding: 4px 10px; font-size: .78rem; }
.day-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin: 6px 0 12px; }
.day-pill {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px 8px; min-height: 64px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
}
.day-pill.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.day-pill.past { opacity: .45; }
.dp-dow { font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.dp-num { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.day-pill.today .dp-num { color: var(--accent); }
.mini-bar { position: relative; width: 80%; height: 6px; border-radius: 3px; background: var(--cell); overflow: hidden; margin-top: 2px; }
.mini-bar > span { position: absolute; top: 0; bottom: 0; background: var(--ok); border-radius: 3px; }
.dp-dot { position: absolute; top: 5px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.day-panel { display: flex; flex-direction: column; gap: 12px; }
.dp-title { font-size: 1.2rem; font-weight: 800; }
.day-panel > p { margin: -8px 0 0; }
.dp-hint { margin-top: -4px !important; }
.presets { display: flex; flex-direction: column; gap: 6px; }
.presets .chips { margin: 0; }
.presets .chip { padding: 10px 14px; }

/* ---------- Grilla del grupo: una fila por hora, partida en :00 / :30 ---------- */
.grid { display: grid; grid-template-columns: 30px repeat(var(--cols), minmax(0, 1fr)); gap: 4px 3px; user-select: none; -webkit-user-select: none; }
.g-hour { font-size: .7rem; color: var(--muted); text-align: right; padding-right: 4px; font-variant-numeric: tabular-nums; line-height: 1; padding-top: 1px; }
.g-cell { position: relative; height: 40px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; gap: 1px; background: var(--bg); cursor: pointer; }
.g-cell .half { flex: 1; display: grid; place-items: center; font-size: .6rem; font-weight: 800; color: var(--text); line-height: 1; }
/* grupo: bloque entero por hora, sin línea; cada mitad solo cambia de color */
.grid:not(.editing) .g-cell { gap: 0; background: transparent; border: 1px solid var(--line); }
.g-cell .num { position: absolute; inset: 0; display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: var(--text); pointer-events: none; }
.g-cell.past { opacity: .35; }
.g-cell.in-session { outline: 2px solid var(--text); outline-offset: -2px; }
.g-cell.in-session::after { content: "♪"; position: absolute; top: 0; right: 2px; font-size: .55rem; }
.lg-note { flex-basis: 100%; }
.half-info + .half-info { margin-top: 10px; }

/* ---------- Mi disponibilidad: grilla de un día ---------- */
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dp-status { margin: -6px 0 0 !important; }
.dgrid { display: grid; grid-template-columns: 44px 1fr; gap: 5px 8px; user-select: none; -webkit-user-select: none; }
.dg-hour { border: 0; background: none; color: var(--muted); font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; text-align: right; padding: 4px 4px 0 0; align-self: start; cursor: pointer; border-radius: 8px; min-height: 44px; }
.dg-hour:active { background: var(--surface-2); }
.dg-cell { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.dg-cell .half { height: 24px; border: 0; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; background: var(--cell); color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; cursor: pointer; text-align: left; }
.dg-cell .half + .half { border-top: 1px dashed color-mix(in oklab, var(--muted) 35%, transparent); }
.dg-cell .half.on { background: var(--ok); color: #fff; font-weight: 700; }
.dg-cell .half.ses small { font-weight: 700; color: var(--accent); }
.dg-cell .half.on.ses small { color: #fff; }
@media (pointer: fine) { .dgrid .half { touch-action: none; } .dg-cell .half:hover:not(.on) { background: color-mix(in oklab, var(--ok) 25%, var(--cell)); } }
.dgrid.ro .half, .dgrid.ro .dg-hour { cursor: default; opacity: .7; }


/* ---------- Mi disponibilidad: semana entera (pantalla ancha) ---------- */
.grid.editing .g-cell, .grid.editing .half { cursor: default; }
.grid.editing .half { background: var(--cell); touch-action: none; }
.grid.editing .half.on { background: var(--ok); }
.grid.editing .half:hover:not(.on) { background: color-mix(in oklab, var(--ok) 30%, var(--cell)); }
.grid.editing .g-cell.past { cursor: default; }
.grid.editing .g-head:not(:disabled) { cursor: pointer; }
.grid.editing .g-head:not(:disabled):hover { background: var(--surface-2); }

/* ---------- Grupo: íconos por persona y bloque de ensayo ---------- */
.g-cell .g-icons { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 1px 2px; padding: 2px; color: #fff; pointer-events: none; }
.g-cell .g-icons .partial { opacity: .45; }
.g-session {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 8px; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 4px 2px; overflow: hidden; min-width: 0;
  box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--accent) 70%, #000);
}
.g-session.tentative { background: repeating-linear-gradient(135deg, var(--accent-soft) 0 6px, color-mix(in oklab, var(--accent) 35%, var(--bg)) 6px 12px); color: var(--text); box-shadow: inset 0 0 0 2px var(--accent); }
.g-session.past { opacity: .45; }
.gs-time { font-size: .62rem; font-weight: 800; line-height: 1.1; text-align: center; font-variant-numeric: tabular-nums; }
.gs-tag { font-size: .55rem; font-weight: 700; }
.gs-who { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; opacity: .85; }
.legend { flex-direction: column; align-items: flex-start; gap: 6px; }
.lg-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lg-session { background: var(--accent); color: var(--accent-ink); margin-left: 8px; }
.lg-person { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; background: var(--surface-2); padding: 2px 8px 2px 6px; border-radius: 999px; margin-right: 2px; }
.lg-cell:not(.empty):not(.lg-session) { color: #fff; }

/* Grupo en el celular: 4 días visibles, deslizar de costado; la columna de horas queda fija */
@media (max-width: 759px) {
  .grid-wrap.scroll-x { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 33px; overscroll-behavior-x: contain; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .grid-wrap.scroll-x::-webkit-scrollbar { display: none; }
  .grid.group { grid-template-columns: 30px repeat(var(--cols), calc((100vw - 32px - 30px - 9px) / 4)); }
  .grid.group .g-head { scroll-snap-align: start; }
  .grid.group .g-hour, .grid.group .g-corner { position: sticky; left: 0; z-index: 2; background: var(--bg); }
  .grid.group .g-hour, .grid.group .g-corner { box-shadow: -2px 0 0 var(--bg), 3px 0 0 var(--bg); }
  .grid.group .g-hour { align-self: stretch; }
}
