
/* Panel de Laura: app de una columna en móvil (barra inferior) y con barra lateral en ordenador.
   Mismo mundo que su web: verde bosque, dorado y crema. Una sola apariencia, oscura, a propósito. */
:root {
  --bg: #262b22;
  --surface: #352e26;
  --surface-2: #40372d;
  --line: rgba(244, 232, 216, .12);
  --line-gold: rgba(201, 154, 91, .35);
  --gold: #c99a5b;
  --gold-2: #dfc092;
  --cream: #efe6d6;
  --muted: #c6bdab;
  --faint: #8f9a8f;
  --ok: #8cc79a;
  --warn: #e9b766;
  --danger: #e58a78;
  --wa: #25d366;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body, .sheet, .card, .toast, .menu-item { overflow-wrap: anywhere; }
.app, .main, .view { min-width: 0; max-width: 100%; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--cream); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; line-height: 1.1; text-wrap: balance; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Aviso de maqueta ---------- */
.demo { background: var(--gold); color: #2a2216; font-size: 12.5px; font-weight: 600; text-align: center; padding-block: 6px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- Entrada ---------- */
.login { min-height: calc(100% - 30px); display: grid; place-items: center; padding-block: 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: radial-gradient(ellipse 70% 60% at 50% 30%, #3a3a2a, var(--bg) 70%); }
.login-box { width: min(100%, 380px); text-align: center; }
.login-flower { width: 70px; animation: turn 60s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.login h1 { font-size: 2.6rem; margin: 18px 0 6px; }
.login p { color: var(--muted); margin: 0 0 28px; }
.login form { display: grid; gap: 12px; text-align: left; }
.login .hint { font-size: 13px; color: var(--faint); margin: 6px 0 0; text-align: center; }

/* ---------- Estructura ---------- */
.app { display: grid; grid-template-columns: 1fr; min-height: calc(100% - 30px); }
.side { display: none; }
.main { min-width: 0; padding-block: 22px 110px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.view { max-width: 780px; margin: 0 auto; display: grid; gap: 18px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(46, 40, 33, .96); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: max(4px, env(safe-area-inset-left, 0px)); padding-right: max(4px, env(safe-area-inset-right, 0px)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tab { background: none; border: 0; padding: 9px 2px 10px; display: grid; justify-items: center; gap: 3px; color: var(--faint); font-size: 11px; font-weight: 600; }
.tab svg { width: 23px; height: 23px; }
.tab.on { color: var(--gold-2); }
@media (min-width: 900px) {
  .app { grid-template-columns: 250px 1fr; }
  .side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: calc(100vh - 30px); padding: 24px 16px; border-right: 1px solid var(--line); background: #2e2821; }
  .side-logo { width: 150px; margin: 0 8px 22px; }
  .side .tab { grid-template-columns: 24px 1fr; justify-items: start; align-items: center; gap: 12px; font-size: 14.5px; padding: 11px 12px; border-radius: 12px; color: var(--muted); }
  .side .tab.on { background: var(--surface); color: var(--gold-2); }
  .side-foot { margin-top: auto; display: grid; gap: 4px; }
  .tabbar { display: none; }
  .main { padding-block: 34px 60px; }
}

/* ---------- Cabecera de cada sección ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head h1 { font-size: clamp(2.1rem, 6vw, 2.8rem); }
.head p { margin: 4px 0 0; color: var(--muted); }
.kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #a3b18a; margin: 0 0 6px; }

/* ---------- Botones y campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; border: 1px solid var(--line-gold); background: transparent; padding: 11px 18px; font-weight: 600; font-size: 14px; color: var(--cream); text-decoration: none; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #2a2216; }
.btn-quiet { border-color: transparent; color: var(--muted); padding-inline: 10px; }
.btn-danger { border-color: rgba(229, 138, 120, .5); color: var(--danger); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-wide { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; color: var(--cream); flex: none; text-decoration: none; }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.wa { color: var(--wa); }
label.field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.field small { font-weight: 500; color: var(--faint); }
input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; min-width: 0; background: #2a241e; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--cream); font-size: 15px; }
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--cream); cursor: pointer; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: #46534b; position: relative; transition: background .2s; flex: none; margin: 0; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--cream); transition: transform .2s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(18px); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--surface-2); color: var(--gold-2); }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.card + .card { margin-top: 0; }
.list { display: grid; gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: rgba(140, 199, 154, .4); }
.pill.warn { color: var(--warn); border-color: rgba(233, 183, 102, .45); }
.pill.gold { color: var(--gold-2); border-color: var(--line-gold); }
.pill.danger { color: var(--danger); border-color: rgba(229, 138, 120, .45); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.empty { text-align: center; padding: 36px 18px; color: var(--muted); }
.empty h3 { font-size: 1.6rem; color: var(--cream); margin-bottom: 6px; }

/* ---------- Reservas ---------- */
.daynav { display: flex; align-items: center; gap: 10px; }
.daynav h2 { font-size: 1.7rem; flex: 1; min-width: 0; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wday { border: 1px solid var(--line); background: transparent; border-radius: 14px; padding: 8px 0 9px; display: grid; justify-items: center; gap: 1px; color: var(--muted); position: relative; }
.wday span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.wday strong { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; color: var(--cream); line-height: 1.1; }
.wday i { width: 5px; height: 5px; border-radius: 50%; background: transparent; margin-top: 2px; }
.wday.has i { background: var(--gold); }
.wday.closed i { background: var(--danger); }
.wday.on { background: var(--gold); border-color: var(--gold); color: #2a2216; }
.wday.on strong { color: #2a2216; }
.wday.on i { background: #2a2216; }
.wday.today::after { content: "hoy"; position: absolute; top: -8px; font-size: 10px; font-weight: 700; background: var(--bg); padding: 0 5px; color: var(--gold-2); }
.summary { display: flex; flex-wrap: wrap; gap: 8px; }
.summary .pill { font-size: 12.5px; padding: 5px 12px; color: var(--cream); }
.closed-banner { border: 1px dashed rgba(229, 138, 120, .55); background: rgba(229, 138, 120, .07); border-radius: var(--r); padding: 14px 16px; display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.closed-banner strong { color: var(--danger); }
.cls { padding: 0; overflow: hidden; }
.cls-top { width: 100%; background: none; border: 0; text-align: left; display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 16px 16px 16px 18px; }
.cls-time { font-family: var(--serif); font-size: 1.75rem; line-height: 1; color: var(--gold-2); }
.cls-name { display: block; font-weight: 700; font-size: 15.5px; }
.cls-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.bar { display: block; height: 5px; border-radius: 9px; background: #18201b; margin-top: 8px; overflow: hidden; max-width: 260px; }
.bar b { display: block; height: 100%; background: var(--gold); border-radius: 9px; }
.bar.full b { background: var(--danger); }
.chev { width: 20px; height: 20px; color: var(--faint); transition: transform .25s; }
.cls.open .chev { transform: rotate(180deg); }
.cls-body { border-top: 1px solid var(--line); padding: 6px 16px 16px; display: grid; gap: 4px; }
.person { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.person:last-of-type { border-bottom: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--gold-2); font-weight: 700; font-size: 14px; }
.p-name { font-weight: 600; }
.p-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.p-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.p-acts .came, .p-acts .btn { white-space: nowrap; flex-shrink: 0; }
.came { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; background: none; }
.came.yes { color: var(--ok); border-color: rgba(140, 199, 154, .45); background: rgba(140, 199, 154, .08); }
.subhead { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 12px 0 2px; }
.cls-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---------- Talleres / formaciones ---------- */
.item { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: start; }
.thumb { width: 92px; aspect-ratio: 1; border-radius: 14px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.item h3 { font-size: 1.45rem; margin-bottom: 4px; }
.item-meta .pill { white-space: normal; }
a.tab { text-decoration: none; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.item-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(229, 138, 120, .08); border: 1px solid rgba(229, 138, 120, .35); font-size: 13.5px; margin-top: 10px; }
.ed-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: end; padding: 12px; border-radius: 14px; background: #1a231e; border: 1px solid var(--line); }
.ed-row .field { font-size: 12px; }
.stat { display: flex; align-items: baseline; gap: 6px; }
.stat strong { font-family: var(--serif); font-size: 2rem; font-weight: 500; color: var(--gold-2); line-height: 1; }

/* ---------- Horarios ---------- */
.hours-day { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hours-day:last-child { border-bottom: 0; }
.hours-day > span { font-family: var(--serif); font-size: 1.25rem; color: var(--gold-2); padding-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 1px solid var(--line-gold); padding: 6px 6px 6px 13px; font-weight: 700; font-size: 14px; }
.chip button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; padding: 0; }
.chip button svg { width: 13px; height: 13px; }
.add-chip { border: 1px dashed var(--line-gold); background: none; border-radius: 999px; padding: 6px 13px; font-weight: 600; font-size: 13px; color: var(--gold-2); }

/* ---------- Más ---------- */
.menu-list { display: grid; gap: 10px; }
.menu-item { width: 100%; display: grid; grid-template-columns: 44px 1fr 20px; gap: 14px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; text-decoration: none; color: var(--cream); }
.menu-item .mi-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--gold-2); }
.menu-item .mi-ico svg { width: 22px; height: 22px; }
.menu-item strong { display: block; font-size: 15px; }
.menu-item span { font-size: 13px; color: var(--muted); }
.menu-item > svg { width: 18px; height: 18px; color: var(--faint); }

/* ---------- Hoja deslizante (formularios) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; background: rgba(8, 12, 10, .62); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--bg); border-top: 1px solid var(--line-gold); border-radius: 24px 24px 0 0; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  padding-block: 10px calc(24px + env(safe-area-inset-bottom, 0px)); padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); animation: up .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet-grip { width: 42px; height: 5px; border-radius: 9px; background: #4a564e; margin: 0 auto 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.sheet-head h2 { font-size: 1.9rem; }
.sheet form, .sheet .form { display: grid; gap: 16px; }
.sheet-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom, 0px)); background: var(--bg); padding-block: 14px 4px; margin-top: 6px; border-top: 1px solid var(--line); }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; justify-items: center; padding: 24px; }
  .sheet { width: min(100%, 620px); border-radius: 24px; border: 1px solid var(--line-gold); max-height: 88vh; }
  .sheet-grip { display: none; }
}
.photo-pick { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; }
.photo-pick .thumb { width: 110px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Vista previa con el aspecto de la web */
.preview { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-gold); background: var(--surface); }
.preview-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px; }
.pv-img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #e8c27a, #d98a6a); display: grid; place-items: center; color: #4a3020; font-family: var(--serif); font-size: 1.2rem; }
.pv-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-body { padding: 18px; display: grid; gap: 10px; }
.pv-body h3 { font-size: 1.7rem; }
.pv-body p { margin: 0; color: var(--muted); white-space: pre-line; }
.pv-tags { display: flex; gap: 6px; }

.lbl-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.cnt { font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
.cnt.near { color: var(--warn); }
.ge-err { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(229, 138, 120, .1); border: 1px solid rgba(229, 138, 120, .4); color: var(--danger); font-weight: 600; font-size: 14px; }
.subhead { margin: 10px 0 0; }
.icon-btn:disabled { opacity: .3; cursor: default; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.gal-it { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.gal-it img { width: 100%; height: 100%; object-fit: cover; }
.gal-acts { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.gal-acts button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(246, 236, 228, .85); color: #2a2421; font-weight: 700; padding: 0; line-height: 1; }
.gal-acts button:disabled { opacity: .3; }
.chip-on { border-color: rgba(140, 199, 154, .5); }
.chip small { font-size: 11px; font-weight: 700; color: var(--ok); text-transform: uppercase; letter-spacing: .04em; }
/* ---------- Vista previa de emails ---------- */
.mail-pv { width: 100%; height: 70vh; min-height: 520px; border: 1px solid var(--line-gold); border-radius: 16px; background: #f3ebe3; }
/* Hora de las sesiones individuales */
.ses { grid-template-columns: 56px 1fr auto; }
.ses-time { font-family: var(--serif); font-size: 19px; color: var(--gold-2); white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 520px) { .ses { grid-template-columns: 52px 1fr; } .ses-time { font-size: 17px; } }
/* ---------- Solicitudes ---------- */
.sol-box { display: grid; gap: 12px; padding: 18px; border-radius: var(--r); border: 1px solid var(--line-gold); background: rgba(201, 154, 91, .05); }
.sol-prev { padding: 12px 14px; border-radius: 12px; background: #2a241e; border: 1px solid var(--line); color: var(--cream); font-size: 14.5px; line-height: 1.55; white-space: pre-line; }
.sol .person { grid-template-columns: 38px 1fr auto; }
.sol-old summary { cursor: pointer; color: var(--gold-2); font-weight: 600; font-size: 14px; padding: 6px 0; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #2a1712; font-size: 11px; font-weight: 800; margin-left: 4px; vertical-align: 1px; }
.tabbar .tab span { white-space: nowrap; }
/* ---------- Aviso flotante ---------- */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--cream); color: #262b22; border-radius: 14px; padding: 12px 14px 12px 18px; display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: 14px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6); width: max-content; max-width: calc(100% - 32px); animation: up .25s ease; }
.toast button { background: none; border: 0; color: #9a5a12; font-weight: 700; padding: 4px 6px; }
@media (min-width: 900px) { .toast { bottom: 28px; left: calc(50% + 125px); } }

@media (max-width: 520px) {
  .row2 { grid-template-columns: 1fr; }
  .ed-row { grid-template-columns: 1fr 1fr; }
  .item { grid-template-columns: 72px 1fr; gap: 12px; }
  .thumb { width: 72px; }
  .cls-top { grid-template-columns: 56px 1fr auto; gap: 10px; }
  .cls-time { font-size: 1.5rem; }
  .person { grid-template-columns: 34px 1fr; }
  .avatar { width: 34px; height: 34px; }
  .p-acts { grid-column: 2; }
  .hours-day { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Guía rápida */
.guia { display: grid; gap: 10px; margin-top: 14px; }
.guia details { padding: 14px 16px; }
.guia summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.guia summary::-webkit-details-marker { display: none; }
.guia summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--gold, #c9a46a); flex: none; }
.guia details[open] summary::after { content: '–'; }
.guia details p { margin: 10px 0 12px; line-height: 1.55; }
.guia-item { border-color: var(--gold, #c9a46a) !important; }

.help-fab { position: fixed; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); z-index: 40; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gold, #c9a46a); background: #2e2821; color: var(--gold, #c9a46a); font: 700 18px/1 Georgia, serif; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
@media (min-width: 900px) { .help-fab { display: none; } }
#login:not([hidden]) ~ .help-fab, body:has(#login:not([hidden])) .help-fab { display: none; }
.toast button { white-space: nowrap; flex: none; }

/* Entrada: todo centrado */
.login form.login-box { justify-items: center; text-align: center; }
.login form.login-box > div { width: 100%; }

/* Filas sin foto (niveles de Reiki, personas, emails…): en el móvil los botones no pisan el texto */
.person.sinfoto, .person.lvl { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 520px) {
  .person.sinfoto { grid-template-columns: minmax(0, 1fr) auto; }
  .person.sinfoto > .p-acts { grid-column: auto; }
  .person.lvl { grid-template-columns: 1fr; gap: 8px; }
  .person.lvl > .p-acts { grid-column: 1; }
}
/* Enlaces de vídeo: mismo aspecto que el resto de casillas */
input[type=url] { width: 100%; min-width: 0; background: #2a241e; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--cream); font-size: 15px; }
/* En el iPhone, con letra de menos de 16 px la pantalla se amplía sola al tocar una casilla: se evita */
@media (max-width: 760px) {
  input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], select, textarea { font-size: 16px; }
}
/* Fechas de una convocatoria: en pantallas estrechas, una debajo de otra para que se lean enteras */
.ed-row.ed2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 400px) { .ed-row, .ed-row.ed2 { grid-template-columns: minmax(0, 1fr); } }
/* Listas (méritos, retiros, precios…): en el móvil los botones van debajo y el texto se lee entero */
@media (max-width: 520px) {
  .li-row { grid-template-columns: minmax(0, 1fr) !important; row-gap: 8px !important; }
  .li-row.con-foto { grid-template-columns: 56px minmax(0, 1fr) !important; }
  .li-row > .item-acts { grid-column: 1 / -1; justify-content: flex-end; }
}
/* Móviles pequeños: los botones de cada persona usan todo el ancho (debajo de la foto también) */
@media (max-width: 380px) { .person > .p-acts { grid-column: 1 / -1; } }
/* Personas del panel: en el móvil, los botones debajo para que el nombre y el email se lean enteros */
@media (max-width: 520px) { .person.us { grid-template-columns: minmax(0, 1fr); } .person.us .us-acts { justify-content: flex-start !important; } .person.us .faint { overflow-wrap: anywhere; } }
/* Listas de vídeos, PDF y bonos de cada actividad */
.mat { display: grid; gap: 16px; }
.mat-list { display: grid; gap: 8px; margin: 4px 0 8px; }
.mat-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: center; padding: 10px; border-radius: 12px; background: #1a231e; border: 1px solid var(--line); }
.mat-row.mat-pdf { grid-template-columns: minmax(0, 1fr) auto auto; }
.mat-row.bono-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
.mat-row .field { font-size: 12.5px; }
@media (max-width: 520px) {
  .mat-row { grid-template-columns: minmax(0, 1fr) auto; }
  .mat-row > input[data-f="url"] { grid-column: 1 / -1; grid-row: 2; }
  .mat-row.mat-pdf { grid-template-columns: minmax(0, 1fr) auto auto; }
  .mat-row.mat-pdf > input { grid-column: 1 / -1; }
  .mat-row.mat-pdf > a { grid-column: 2; }
}

/* Vídeos para alumnas */
.ac-p + .ac-p { border-top: 1px solid var(--line); }
.ac-p .person { border-bottom: 0; }
.ac-vids { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.ac-vids li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--bg-2, rgba(0,0,0,.03)); }
.ac-vids li span { min-width: 0; overflow-wrap: anywhere; }
.ac-p.ac-new { animation: acNew 2.4s ease; }
@keyframes acNew { 0%, 40% { background: rgba(92,102,73,.12); } 100% { background: transparent; } }
.ac-elige { border: 0; padding: 0; margin: 4px 0 0; display: grid; gap: 12px; }
.ac-elige legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.ac-grupo { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.ac-gh { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ac-grupo .switch { font-weight: 500; }
