/* Pizarra — tokens y componentes.
 *
 * Los valores salen del handoff de diseño y son finales: colores, tipografía,
 * radios y espaciados no se "mejoran" acá. Lo que en el prototipo iba como estilo
 * inline repetido (la píldora, el segmentado, la tarjeta) acá es una clase; sólo
 * queda inline lo que depende del dato (un ancho de barra, el color de una marca).
 */

:root {
  --ink: #111111;
  --lime: #D4F25A;
  --lime-soft: #EEF9C4;
  --olive: #A3C21E;
  --canvas: #E7E7E3;
  --surface: #FFFFFF;
  --rail: #FAFAF8;
  --card: #F4F4F1;
  --line: #E4E4DF;
  --n200: #EDEDE8;
  --n200b: #E2E2DC;
  --n300: #D9D9D3;
  --n400: #CFCFC9;
  --n500: #BDBDB7;
  --muted: #8A8A85;
  --muted-strong: #55554F;
  --kicker: #A3A39E;
  --link-hover: #5B6E00;
  --shadow-shell: 0 30px 80px rgba(0, 0, 0, .08);
  --shadow-float: 0 30px 80px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--canvas);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
button, input, select, textarea { font-family: inherit; color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--lime); }
.hide { display: none !important; }

/* --- Shell ---------------------------------------------------------------- */
.page { min-height: 100vh; padding: 18px; }

.shell {
  display: flex;
  min-height: calc(100vh - 36px);
  background: var(--surface);
  border-radius: 30px;
  box-shadow: var(--shadow-shell);
}

.rail {
  width: 88px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 0;
  background: var(--rail);
  border-radius: 30px 0 0 30px;
  position: sticky;
  top: 18px;
  align-self: flex-start;
  height: calc(100vh - 36px);
}
.rail .mark { font-size: 32px; }
.rail .wordmark { font-size: 10px; font-weight: 800; letter-spacing: .08em; margin-bottom: 12px; }

.navbtn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  color: var(--ink);
}
.navbtn .ico {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px;
  background: var(--surface); border: 1px solid var(--line);
}
.navbtn .lbl { font-size: 10px; font-weight: 600; color: var(--muted); }
.navbtn.on .lbl { font-weight: 800; color: var(--ink); }
.navbtn .badge {
  position: absolute; top: -3px; right: 6px;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--ink); color: var(--lime);
  font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 5px;
}
.navbtn .gap { margin-top: 10px; }
.rail .me {
  margin-top: auto; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  border: 0; cursor: pointer;
}

.main { flex: 1; min-width: 0; padding: 22px 30px 40px; display: flex; flex-direction: column; gap: 20px; }

/* --- Header --------------------------------------------------------------- */
.hdr { display: flex; flex-direction: column; gap: 10px; }
.hdrrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.asbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 6px 6px 8px;
}
.asbar .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.asbar .txt { font-size: 13.5px; font-weight: 600; }
.today {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px;
  font-size: 13.5px; font-weight: 600;
}
.hello { text-align: right; line-height: 1.3; }
.hello b { display: block; font-size: 14px; font-weight: 700; }
.hello span { font-size: 12px; color: var(--muted); }

.entrow { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.entchip {
  flex: none; display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px;
  cursor: pointer; background: var(--surface); font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.entchip .av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.entchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* --- Título de página ----------------------------------------------------- */
.titlerow { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
h1.pt {
  margin: 0; font-weight: 500; font-size: 40px; line-height: 1.05; letter-spacing: -0.03em;
}
h1.pt .kick { display: block; color: var(--kicker); font-weight: 400; }
.ptdot { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; }
.ctx {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 600;
}
.ro-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--n200b); border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 700;
}

/* --- Controles ------------------------------------------------------------ */
.seg { display: flex; background: var(--card); border-radius: 999px; padding: 4px; }
.seg > button {
  display: flex; gap: 7px; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; padding: 9px 16px;
  font-size: 13.5px; font-weight: 700; cursor: pointer; background: transparent; color: var(--ink);
  white-space: nowrap;
}
.seg > button.on { background: var(--ink); color: #fff; }
.seg.fill > button { flex: 1; }

.btnp {
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; border: 0; border-radius: 999px;
  padding: 6px 6px 6px 20px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.btnp:hover { background: #2A2A27; }
.btnp .circ { width: 36px; height: 36px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-size: 17px; }
.btnp.wide { flex: 1; justify-content: space-between; }
.btnp.wide .circ { width: 38px; height: 38px; }

.btng {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 0 20px; height: 48px; font-weight: 700; font-size: 14px; cursor: pointer;
}
.btndash {
  height: 46px; border: 1.5px dashed var(--n400); border-radius: 16px; background: var(--surface);
  font-weight: 700; font-size: 13.5px; cursor: pointer; width: 100%;
}

.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; gap: 6px; align-items: center; white-space: nowrap;
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { opacity: .6; font-weight: 600; }
.chiprow { display: flex; gap: 6px; flex-wrap: wrap; }
.chiprow.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }

.inp {
  height: 46px; border: 0; background: var(--card); border-radius: 14px; padding: 0 12px;
  font-size: 14px; font-weight: 600; outline: none; width: 100%; min-width: 0;
}
.inp.big { height: 52px; border-radius: 16px; font-size: 16px; padding: 0 16px; }
.inp.round { border-radius: 999px; padding: 0 16px; font-size: 13.5px; }
.lab { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.labtxt { font-size: 11.5px; font-weight: 800; color: var(--muted); }
textarea.inp { height: auto; min-height: 150px; padding: 12px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; resize: vertical; font-weight: 500; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; display: grid; place-items: center;
}
.iconbtn.sm { width: 36px; height: 36px; }

/* --- Paneles y tarjetas --------------------------------------------------- */
.panel { background: var(--card); border-radius: 24px; padding: 20px; min-width: 0; }
.panel.tight { padding: 16px; }
.panel.scrollx { overflow-x: auto; }
.ph { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.ph .sq { width: 16px; height: 16px; border-radius: 4px; }
.psub { font-size: 12.5px; color: var(--muted); }

.row2 { display: flex; flex-wrap: wrap; gap: 16px; }
.cards { display: grid; gap: 14px; }

.kpis { display: flex; gap: 12px; flex-wrap: wrap; }
.kpi { flex: 1 1 170px; border-radius: 22px; padding: 16px; background: var(--card); }
.kpi .l { font-size: 12px; font-weight: 700; opacity: .8; }
.kpi .v { font-size: 40px; font-weight: 300; letter-spacing: -0.04em; line-height: 1.1; }
.kpi .s { font-size: 11.5px; opacity: .7; }

.bar { height: 8px; border-radius: 999px; background: var(--n200b); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--ink); }
.barseg { display: flex; border-radius: 999px; overflow: hidden; }
.barseg > span { display: block; }
.minibar { height: 6px; border-radius: 999px; background: var(--n200); overflow: hidden; }
.labrow { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; margin-bottom: 5px; }

.tbl { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 13px; }
.tbl thead tr { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.tbl th { padding: 4px 12px; font-weight: 800; }
.tbl tbody tr { background: var(--surface); }
.tbl td { padding: 10px 12px; }
.tbl td:first-child { border-radius: 14px 0 0 14px; }
.tbl td:last-child { border-radius: 0 14px 14px 0; }
.tbl tbody tr.clic { cursor: pointer; }
.tbl tbody tr.clic:hover { background: #FBFBF9; }
.pillv { font-weight: 800; border-radius: 999px; padding: 2px 9px; background: var(--n200); display: inline-block; }

.stripe { background: repeating-linear-gradient(135deg, #E6E6E1 0 10px, #EDEDE9 10px 20px); }
.stripe-sm { background: repeating-linear-gradient(135deg, #E1E1DB 0 6px, #EAEAE5 6px 12px); }
.stripe-md { background: repeating-linear-gradient(135deg, #E6E6E1 0 8px, #EDEDE9 8px 16px); }

.tag { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 10px; display: inline-block; white-space: nowrap; }
.av { border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }

/* --- Inicio --------------------------------------------------------------- */
.hero { display: flex; flex-wrap: wrap; gap: 16px; }
.herocard {
  flex: 1 1 280px; border: 0; border-radius: 24px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px; text-align: left; cursor: pointer;
  color: var(--ink); background: var(--card); font-family: inherit;
}
.herocard .hh { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; width: 100%; }
.herocard .big { font-size: 60px; font-weight: 300; letter-spacing: -0.05em; line-height: 1; }
.pulse { display: grid; grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(0, 1fr)) 50px; gap: 6px 14px; align-items: center; }
.pulse .lg { font-size: 11px; font-weight: 800; display: flex; gap: 6px; align-items: center; }
.pulse .lg i { width: 10px; height: 10px; border-radius: 3px; }
.pulse .nm {
  display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 0;
  cursor: pointer; text-align: left; font-size: 13px; font-weight: 700; min-width: 0;
}
.pulse .nm span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse .tot { font-size: 13px; font-weight: 800; text-align: right; }
.agenda { display: flex; flex-direction: column; gap: 6px; }
.agenda button {
  display: flex; gap: 10px; align-items: center; background: var(--surface); border: 0;
  border-radius: 14px; padding: 8px 10px; text-align: left; cursor: pointer; color: var(--ink);
}
.agenda .sq { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; font-size: 16px; }
.trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Calendario ----------------------------------------------------------- */
.tl { position: relative; min-width: 980px; }
.tlrow { display: grid; gap: 2px; align-items: center; }
.tlhead { margin-bottom: 8px; }
.tlband {
  min-height: 34px; background: var(--surface); border-radius: 10px; margin-bottom: 4px; padding: 3px 0;
}
.tlname {
  grid-column: 1; display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; padding: 0 10px; min-width: 0;
}
.tlitem {
  grid-row: 1; border: 0; border-radius: 999px; font-size: 11px; font-weight: 700; cursor: pointer;
  padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; min-width: 0;
}
.tlgroup {
  display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 6px;
}
.tlgroup i { width: 12px; height: 12px; border-radius: 4px; }
.tlgroup em { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; font-style: normal; }
.tlday { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tlday .dw { font-size: 9px; color: var(--muted); font-weight: 700; }
.tlday .nm { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; }
.tlnow { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--lime); pointer-events: none; }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month .dw { font-size: 11px; font-weight: 700; color: var(--muted); padding: 2px 8px; text-transform: uppercase; }
.mcell {
  min-height: 124px; border-radius: 16px; padding: 8px; background: var(--rail);
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.mcell .hd { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mcell .num { min-width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.mcell .key { font-size: 10px; font-weight: 700; color: var(--muted-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mact {
  height: 16px; border: 0; background: var(--ink); color: var(--lime);
  font-size: 10px; font-weight: 700; cursor: pointer; padding: 0 6px; text-align: left;
  white-space: nowrap; overflow: hidden;
}
.mitem {
  display: flex; gap: 5px; align-items: center; border: 0; padding: 3px 7px;
  font-size: 11px; font-weight: 600; cursor: pointer; color: var(--ink);
  border-radius: 8px; min-width: 0; text-align: left;
}

/* --- Contenido ------------------------------------------------------------ */
.stboxes { display: flex; gap: 8px; flex-wrap: wrap; }
.stbox {
  flex: 1 1 110px; border: 0; border-radius: 20px; padding: 12px 14px;
  background: var(--card); text-align: left; cursor: pointer; font-family: inherit;
}
.stbox.on { background: var(--ink); color: #fff; }
.stbox .l { font-size: 12px; font-weight: 700; opacity: .8; }
.stbox .n { font-size: 34px; font-weight: 300; letter-spacing: -0.04em; line-height: 1.1; }

.chbtn {
  height: 38px; min-width: 38px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); cursor: pointer; display: flex; gap: 6px; align-items: center;
  justify-content: center; padding: 0 10px; font-size: 12.5px; font-weight: 700;
}
.chbtn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.mix { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 260px; flex: 0 1 360px; }
.mix .ttl { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mixbar { flex: 1; display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--n200); }
.mixleg { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; font-weight: 600; color: var(--muted-strong); margin-top: -8px; justify-content: flex-end; }
.mixleg i { width: 9px; height: 9px; border-radius: 3px; border: 1px solid var(--n300); display: inline-block; }

.pipe { display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.pcol { background: var(--card); border-radius: 22px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pcol .hd { display: flex; align-items: center; gap: 8px; padding: 4px 6px; }
.pcol .dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); }
.pcol .nm { font-size: 13.5px; font-weight: 800; }
.pcol .n { margin-left: auto; font-size: 12px; font-weight: 800; background: var(--surface); border-radius: 999px; padding: 1px 8px; }
.pcard { background: var(--surface); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.pcard .fmt { display: flex; gap: 5px; align-items: center; font-size: 11px; font-weight: 700; background: var(--card); border-radius: 999px; padding: 3px 8px; }
.pcard .ttl { background: none; border: 0; padding: 0; text-align: left; font-size: 13.5px; font-weight: 700; line-height: 1.3; cursor: pointer; color: var(--ink); }
.pcard .meta { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); font-weight: 600; }
.pcard .dots { display: flex; gap: 3px; align-items: center; }
.pcard .dots > i { flex: 1; height: 5px; border-radius: 999px; display: block; }
.adv { width: 26px; height: 26px; margin-left: 6px; border: 0; border-radius: 50%; background: var(--ink); color: var(--lime); cursor: pointer; font-size: 12px; display: grid; place-items: center; padding: 0; flex: none; }

.grid7 { display: grid; gap: 6px; }
.gcell { background: var(--surface); border-radius: 12px; min-height: 70px; padding: 5px; display: flex; flex-direction: column; gap: 4px; }
.gmini {
  text-align: left; border: 0; border-left: 3px solid var(--ink); background: var(--card);
  border-radius: 8px; padding: 5px 7px; cursor: pointer; font-size: 11px; font-weight: 700; line-height: 1.3;
}
.gmini .sub { display: flex; gap: 4px; margin-top: 3px; font-size: 10px; font-weight: 600; color: var(--muted-strong); }

.feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 14px; overflow: hidden; }
.feed button { aspect-ratio: 4/5; border: 0; padding: 0; cursor: pointer; position: relative; display: grid; place-items: center; }
.feed .cap { position: absolute; left: 6px; bottom: 6px; right: 6px; font-size: 10px; font-weight: 800; text-align: left; line-height: 1.2; }
.feed .st { position: absolute; top: 6px; right: 6px; font-size: 9px; font-weight: 800; border-radius: 999px; padding: 1px 6px; }
.feedstat { display: flex; align-items: baseline; gap: 10px; background: var(--surface); border-radius: 14px; padding: 10px 12px; }
.feedstat b { font-size: 26px; font-weight: 300; letter-spacing: -0.03em; }
.feedstat span { font-size: 12.5px; color: var(--muted-strong); }

.barchart { display: flex; align-items: flex-end; gap: 10px; height: 160px; }
.barchart > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.barchart .v { font-size: 11px; font-weight: 800; }
.barchart .b { width: 100%; max-width: 34px; border-radius: 999px; border: 1px solid var(--n300); }
.barchart .n { font-size: 10.5px; font-weight: 700; color: var(--muted-strong); }

/* --- Activaciones --------------------------------------------------------- */
.actcard {
  background: var(--card); border-radius: 24px; padding: 18px;
  display: flex; flex-direction: column; gap: 12px; cursor: pointer;
}
.actcard:hover { background: #EEEEEA; }
.actcard .ttl { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.actcard .sub2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.subcard { background: var(--surface); border-radius: 16px; padding: 10px 12px; }
.subcard .l { font-size: 11px; color: var(--muted); font-weight: 700; }
.subcard .v { font-size: 22px; font-weight: 300; letter-spacing: -0.03em; }
.legend { display: flex; gap: 12px; font-size: 11.5px; font-weight: 700; color: var(--muted-strong); flex-wrap: wrap; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

.matrix { display: grid; gap: 6px; }
.matrix .hcell {
  background: var(--ink); color: #fff; border: 0; border-radius: 14px; padding: 8px 10px;
  text-align: left; cursor: pointer; font-size: 12px; font-weight: 700; line-height: 1.25;
}
.matrix .hcell span { display: block; font-size: 10.5px; color: var(--lime); font-weight: 600; margin-top: 2px; }
.matrix .rname { display: flex; align-items: center; font-size: 13px; font-weight: 700; padding: 0 6px; }
.mcellbtn {
  height: 38px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  cursor: pointer; font-size: 11.5px; font-weight: 700; display: flex; gap: 5px;
  align-items: center; justify-content: center; padding: 0 6px;
}
.poscard {
  border: 1px solid transparent; border-radius: 20px; padding: 14px; text-align: left;
  cursor: pointer; color: var(--ink); background: var(--surface);
  display: flex; flex-direction: column; gap: 8px; min-height: 140px;
}
.poscard .hd { display: flex; align-items: center; gap: 8px; width: 100%; }
.poscard .av { width: 30px; height: 30px; background: var(--ink); color: var(--lime); font-size: 10.5px; }
.poscard .nm { font-size: 15px; font-weight: 800; }
.postag {
  display: flex; gap: 6px; align-items: center; font-size: 11.5px; font-weight: 700;
  border-radius: 10px; padding: 4px 8px; border: 1px solid var(--line);
}

/* --- Cultura -------------------------------------------------------------- */
.evcard { background: var(--card); border-radius: 24px; padding: 8px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.evcard:hover { background: #EEEEEA; }
.poster {
  border-radius: 18px; padding: 16px; min-height: 170px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.poster .top { display: flex; justify-content: space-between; align-items: flex-start; }
.poster .fmt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.poster .day { font-size: 72px; font-weight: 300; letter-spacing: -0.05em; line-height: .85; }
.poster .mon { font-size: 13px; font-weight: 800; text-transform: uppercase; padding-bottom: 4px; }
.poster .mon span { display: block; font-weight: 600; text-transform: none; }
.evbody { padding: 2px 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.evbody .ttl { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }

/* --- Gameplan ------------------------------------------------------------- */
.gp { display: grid; gap: 4px; }
.gprow { display: grid; gap: 4px; align-items: stretch; }
.gpq .q {
  grid-column: span 3; font-size: 11px; font-weight: 800; letter-spacing: .06em;
  color: var(--muted); padding: 2px 8px; border-left: 1px solid var(--line);
}
.gphead .m {
  font-size: 11px; font-weight: 800; text-align: center; padding: 6px 0;
  border-radius: 10px; background: var(--surface);
}
.gphead .m.hoy { background: var(--lime); }
.gpname {
  display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700;
  padding: 10px; background: var(--surface); border-radius: 12px; min-width: 0;
}
.gpcell {
  display: flex; flex-direction: column; gap: 4px; min-height: 54px; padding: 5px;
  background: var(--surface); border-radius: 12px;
}
.gpcell[data-act] { cursor: pointer; }
.gpcell[data-act]:hover { background: #FBFBF9; box-shadow: inset 0 0 0 1.5px var(--line); }
.gpcell.hoy { background: #FCFEF2; box-shadow: inset 0 0 0 1.5px var(--lime); }
.hito {
  border: 1.5px solid transparent; border-radius: 8px; padding: 4px 7px;
  font-size: 11px; font-weight: 700; line-height: 1.25; text-align: left;
  cursor: pointer; background: var(--ink); color: #fff;
}
.hito.libre { background: transparent; border-style: dashed; border-color: var(--n500); color: var(--muted-strong); }
.hito.fija { background: var(--card); color: var(--muted-strong); border-color: var(--line); cursor: default; font-weight: 600; }
.gpfechas .gpname { background: var(--card); }
.gpfechas .gpcell { background: var(--card); }

/* Campañas: la banda que cruza los meses. La barra se coloca por grid-column, así
   que una campaña que envuelve diciembre son dos barras en la misma fila. */
.gpcamp { margin-bottom: 2px; }
.gpname.camp {
  background: transparent; font-size: 12px; color: var(--muted-strong);
  justify-content: flex-end; text-align: right; overflow: hidden;
  /* Con la columna angosta del móvil un nombre largo se parte en tres renglones y
     estira la fila entera; se corta en dos y el resto vive en el tooltip. */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.gpbar {
  display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 5px 10px;
  border: 1.5px solid transparent; border-radius: 12px; cursor: pointer;
  font-size: 11.5px; font-weight: 800; text-align: left; overflow: hidden;
}
.gpbar .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gpbar .st { margin-left: auto; font-size: 10px; font-weight: 700; opacity: .72; white-space: nowrap; }
.gpbar .gped { font-size: 13px; opacity: .6; padding: 2px; }
.gpbar .gped:hover { opacity: 1; }
.gpcamp.sel .gpbar { box-shadow: 0 0 0 2px var(--ink); }
/* Con una campaña elegida, el resto se apaga en vez de desaparecer: el punto es
   verla DENTRO del año, no el año sin lo demás. */
.hito.off { opacity: .28; }
.hito .al { font-size: 10px; margin-left: 5px; opacity: .8; vertical-align: -1px; }

/* --- Aliados -------------------------------------------------------------- */
.alcard {
  display: flex; flex-direction: column; gap: 9px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
}
.alhead { display: flex; align-items: center; gap: 10px; }
.alhead .nm { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.alhead .nm b { font-size: 14px; letter-spacing: -0.01em; }
.alhead .nm span { font-size: 11.5px; color: var(--muted); }
.alcp { font-size: 12.5px; line-height: 1.45; background: var(--card); border-radius: 12px; padding: 9px 11px; }
.alcp .k { display: block; font-size: 10.5px; font-weight: 800; color: var(--muted); letter-spacing: .05em; margin-bottom: 2px; }
.alrow { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted-strong); }
.allinks { display: flex; flex-wrap: wrap; gap: 6px; }
.allinks .chip { font-size: 11.5px; padding: 5px 10px; }
.alpie { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.alpie .btng { height: 32px; margin-left: auto; font-size: 12px; }

/* --- Ideas ---------------------------------------------------------------- */
.search { position: relative; flex: 1 1 360px; max-width: 640px; }
.search i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 20px; }
.search input { width: 100%; height: 52px; border: 0; border-radius: 999px; background: var(--card); padding: 0 18px 0 50px; font-size: 15px; outline: none; }
.ideacard { background: var(--card); border-radius: 24px; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.ideaimg { aspect-ratio: 4/3; border-radius: 18px; position: relative; display: grid; place-items: center; }
.ideaimg .ph { font-size: 11px; color: var(--muted); font-weight: 600; }
.ideaimg.conimg { background-size: cover; background-position: center; }
.ideaimg .ideax { position: absolute; bottom: 10px; right: 10px; background: var(--surface); }
.ideacard:hover .ideax { background: var(--ink); color: #fff; }
.ideaimg .fmt { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; align-items: center; background: var(--surface); border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; }
.ideaimg .er { position: absolute; top: 10px; right: 10px; background: var(--lime); border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 800; }
.ideabody { padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.ideabody .src { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ideabody .ttl { font-size: 16px; font-weight: 700; line-height: 1.3; }
.ideabody .why { font-size: 12.5px; color: var(--muted-strong); line-height: 1.5; }
.btnlime, .btnink {
  flex: 1; border: 0; border-radius: 999px; padding: 9px; font-weight: 700; font-size: 12.5px; cursor: pointer;
}
.btnlime { background: var(--lime); color: var(--ink); }
.btnink { background: var(--ink); color: #fff; }

/* --- Cuentas -------------------------------------------------------------- */
.conncell {
  min-width: 30px; height: 30px; border: 0; border-radius: 999px;
  font-size: 11px; font-weight: 800; padding: 0 8px; display: inline-grid; place-items: center;
  position: relative;
}
/* El punto distingue una conexión REAL de un estado declarado a mano. Va como
   marca aparte y no como un color propio: el color de la celda ya significa en qué
   estado está, y un segundo eje de color pelearía con el primero. */
.conncell.real::after {
  content: ''; position: absolute; right: -1px; bottom: -1px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--dot, var(--ink)); border: 1.5px solid var(--bg);
}

.connlist { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.connrow {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--card); border: 0; border-radius: 14px; padding: 9px 12px; cursor: pointer; font: inherit;
}
.connrow .ic { width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-size: 15px; flex: none; }
.connrow .t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.connrow .t b { font-size: 12.5px; }
.connrow .t em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.connrow .s { font-size: 11.5px; white-space: nowrap; }
/* En el móvil el nombre más el canal ya ocupan el ancho: la sincronización baja a
   su propia línea en vez de pelearle el espacio y partir el título en tres. */
@media (max-width: 620px) {
  .connrow { flex-wrap: wrap; }
  .connrow .s { flex: 1 0 100%; margin-left: 38px; white-space: normal; }
}

/* --- Ajustes -------------------------------------------------------------- */
.rolecard { flex: 1 1 240px; border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--card); }
.rolecard .hd { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; }
.rolecard .n { margin-left: auto; font-size: 30px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; }
.rolecard .desc { font-size: 12.5px; line-height: 1.45; opacity: .85; }
.urow {
  display: flex; align-items: center; gap: 12px; background: transparent;
  border: 1.5px solid transparent; border-radius: 16px; padding: 10px 12px;
  text-align: left; cursor: pointer; color: var(--ink); min-width: 0; width: 100%;
}
.urow.on { background: var(--surface); border-color: var(--ink); }
.urow .av { width: 38px; height: 38px; font-size: 12px; }
.urow .nm { flex: 1 1 150px; min-width: 0; }
.urow .nm b { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 700; }
.urow .nm span { display: block; font-size: 11.5px; color: var(--muted); }
.urow .sc { flex: 1 1 140px; min-width: 0; font-size: 12px; font-weight: 600; color: var(--muted-strong); }
.urow .secs { display: flex; gap: 3px; flex: none; }
.urow .secs span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.urow .role { flex: none; min-width: 96px; text-align: center; }
.editor { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 20px; display: grid; gap: 12px; align-content: start; }
.rolepick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rolepick button {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 16px; padding: 10px 12px;
  text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font-family: inherit;
}
.rolepick button i { font-size: 18px; }
.rolepick button span { font-size: 13px; font-weight: 700; }
.note { font-size: 12.5px; color: var(--muted-strong); background: var(--card); border-radius: 14px; padding: 10px 12px; line-height: 1.45; }

/* Bloque de contraseña: va aparte y con su propio botón, porque una contraseña no
   se guarda al salir del campo. Ver el comentario de bloqueClave() en app.js. */
.pwbox { display: grid; gap: 8px; background: var(--card); border-radius: 18px; padding: 14px; }
.pwbox .inp { background: var(--surface); }
.pwbox .hint { margin-bottom: 2px; }
.pwerr:not(:empty) {
  font-size: 12.5px; font-weight: 600; background: var(--ink); color: #fff;
  border-radius: 10px; padding: 8px 10px;
}

.temas { display: grid; gap: 6px; max-width: 460px; }
.temarow { display: flex; gap: 8px; align-items: center; }
.temarow .inp { height: 46px; }
.iconpick {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 10px;
  background: var(--surface); border-radius: 16px; margin-bottom: 4px;
}

.entrow2 { display: flex; gap: 6px; align-items: center; }
.entrow2 .inp { height: 40px; font-size: 13.5px; }
.entrow2 .inp.corto { width: 92px; flex: none; }
.entrow2 .chip { height: 40px; padding: 0 12px; }
.entrow2.baja { opacity: .55; }
.entrow2.baja .inp { text-decoration: line-through; }

/* --- Drawer de ficha y modal --------------------------------------------- */
.scrim { position: fixed; inset: 0; background: rgba(17, 17, 17, .3); backdrop-filter: blur(2px); z-index: 40; border: 0; }
.drawer {
  position: fixed; top: 18px; right: 18px; bottom: 18px;
  width: min(580px, calc(100% - 36px)); background: var(--surface); border-radius: 30px;
  box-shadow: var(--shadow-float); z-index: 41; overflow: auto; padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.dhead { display: flex; align-items: flex-start; gap: 12px; }
.dhead .ic { width: 50px; height: 50px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 24px; }
.dhead .kick { font-size: 12px; font-weight: 700; color: var(--muted); }
.dhead h2 { margin: 3px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.steps { display: flex; gap: 4px; }
.steps > div { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.steps .st { height: 7px; border-radius: 999px; background: var(--n200); }
.steps .lb { font-size: 10px; font-weight: 500; }
.robanner {
  display: flex; gap: 8px; align-items: center; background: var(--card); border-radius: 14px;
  padding: 10px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted-strong);
}
.metagrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.metabox { background: var(--card); border-radius: 16px; padding: 10px 12px; }
.metabox .l { font-size: 11px; color: var(--muted); font-weight: 700; }
.metabox .v { font-size: 13.5px; font-weight: 700; }
.objbox { background: var(--card); border-radius: 16px; padding: 14px; font-size: 13.5px; line-height: 1.55; }
.objbox .l { font-size: 11px; color: var(--muted); font-weight: 800; margin-bottom: 4px; }
.bigbox { background: var(--ink); color: #fff; border-radius: 20px; padding: 16px; display: flex; align-items: center; gap: 16px; }
.bigbox .v { font-size: 44px; font-weight: 300; letter-spacing: -0.04em; color: var(--lime); }
.bigbox .l { font-size: 14px; font-weight: 700; }
.bigbox .s { font-size: 12px; color: var(--n500); }
.linkedbox {
  display: flex; gap: 10px; align-items: center; background: var(--lime-soft); border: 0;
  border-radius: 16px; padding: 12px 14px; font-size: 13px; cursor: pointer; text-align: left; width: 100%;
}
.checks { display: flex; flex-direction: column; gap: 6px; }
.checks button, .checks .line {
  display: flex; gap: 10px; align-items: center; background: var(--card); border: 0;
  border-radius: 14px; padding: 10px 12px; cursor: pointer; text-align: left; color: var(--ink); width: 100%;
}
.checks .box {
  width: 22px; height: 22px; flex: none; border-radius: 7px; border: 1.5px solid var(--n500);
  background: var(--surface); display: grid; place-items: center; color: var(--lime); font-size: 12px;
}
.checks .box.on { background: var(--ink); border-color: var(--ink); }
.checks .it { flex: 1; font-size: 13.5px; font-weight: 600; }
.checks .it.done { text-decoration: line-through; }
.checks .sub { font-size: 11.5px; color: var(--muted); }
.ros { display: flex; flex-direction: column; }
.ros .r { display: flex; gap: 12px; align-items: stretch; }
.ros .t { width: 48px; font-size: 13px; font-weight: 800; padding: 8px 0; }
.ros .line { display: flex; flex-direction: column; align-items: center; }
.ros .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); margin-top: 10px; }
.ros .rod { flex: 1; width: 2px; background: var(--line); }
.ros .what { flex: 1; font-size: 13.5px; padding: 8px 0; font-weight: 600; }
.copyprev {
  flex: 0 0 150px; aspect-ratio: 9/16; border-radius: 18px; display: grid; place-items: center; position: relative;
}
.copyprev i { font-size: 28px; color: #9A9A94; }
.copyprev span { position: absolute; bottom: 8px; left: 8px; right: 8px; font-size: 10px; font-weight: 700; color: var(--muted-strong); }
.posrow { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 14px; padding: 8px 10px; }
.posrow .ph { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; color: var(--muted); flex: none; }
.posrow .nm { flex: 1; font-size: 13.5px; font-weight: 700; }
.posrow .steps4 { display: flex; gap: 3px; }
.posrow .steps4 i { width: 16px; height: 6px; border-radius: 999px; display: block; }
.posrow button { border-radius: 999px; padding: 5px 12px; font-size: 11.5px; font-weight: 700; cursor: pointer; min-width: 120px; border: 1px solid var(--line); background: var(--surface); }
.linkcard {
  display: flex; gap: 12px; align-items: stretch; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; padding: 8px;
  text-decoration: none; color: var(--ink); position: relative;
}
.linkcard .thumb { width: 88px; min-height: 76px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 28px; background-size: cover; background-position: center; }
.linkcard .body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding-right: 30px; }
.linkcard .site { font-size: 10.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.linkcard .ttl { font-size: 14px; font-weight: 700; }
.linkcard .url { font-size: 11.5px; color: var(--muted-strong); }
.xbtn {
  width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--card);
  cursor: pointer; display: grid; place-items: center; font-size: 11px; padding: 0; flex: none;
}
.linkcard .xbtn { position: absolute; top: 8px; right: 8px; }
.imggrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.imgcell { aspect-ratio: 1; border-radius: 14px; position: relative; display: flex; align-items: flex-end; padding: 6px; overflow: hidden; background-size: cover; background-position: center; cursor: pointer; border: 0; }
.imgcell .n { font-size: 10px; font-weight: 700; color: var(--muted-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imgcell .xbtn { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; background: var(--surface); }
.filerow { display: flex; gap: 10px; align-items: center; background: var(--card); border-radius: 14px; padding: 9px 12px; }
.filerow .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; font-size: 18px; flex: none; }
.filerow .n { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; }
.filerow .sz { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.filerow .xbtn { background: var(--surface); }
.fh { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; }
.fh .up {
  margin-left: auto; display: flex; gap: 6px; align-items: center; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.hint { font-size: 12.5px; color: var(--muted); }
/* En el alta los dos botones de adjuntar se reparten el ancho; `.up` trae un
   margin-left:auto que ahí los desarma. */
.upbtn {
  flex: 1; display: flex; gap: 6px; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 999px; padding: 11px 14px;
  font-size: 13px; font-weight: 700; cursor: pointer; background: var(--surface);
}
.upbtn:hover { background: var(--card); }
.btots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.btots > div { border-radius: 16px; padding: 12px; background: var(--card); }
.btots .l { font-size: 11px; font-weight: 700; opacity: .75; }
.btots .v { font-size: 24px; font-weight: 300; letter-spacing: -0.03em; }
.bl { display: grid; grid-template-columns: minmax(0, 1fr) 104px 104px 28px; gap: 6px; align-items: center; }
.bl .h { font-size: 11px; font-weight: 800; color: var(--muted); }
.bl input { height: 42px; border: 0; background: var(--card); border-radius: 12px; padding: 0 12px; font-size: 13.5px; font-weight: 600; outline: none; min-width: 0; }
.bl input.num { text-align: left; font-weight: 700; padding: 0 10px; }
.bl input.real { background: var(--lime-soft); }
.bl .xbtn { width: 28px; height: 28px; }
.dfoot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.donechip {
  flex: 1; display: flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--lime); border-radius: 999px; height: 50px; font-size: 14px; font-weight: 700;
}

.modalwrap { position: fixed; inset: 0; background: rgba(17, 17, 17, .35); backdrop-filter: blur(2px); z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal {
  width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  background: var(--surface); border-radius: 30px; padding: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .25); display: grid; gap: 14px; align-content: start;
}
.insp { background: var(--lime-soft); border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 30px; z-index: 60; }
.toast {
  background: var(--ink); color: #fff; padding: 8px 18px 8px 8px; border-radius: 999px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25); font-size: 14px; font-weight: 600;
  display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px);
}
.toast .circ { width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; flex: none; }
.toast.err .circ { background: #fff; }

/* --- Login ---------------------------------------------------------------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.loginbox {
  width: min(420px, 100%); background: var(--surface); border-radius: 30px; padding: 30px;
  box-shadow: var(--shadow-shell); display: grid; gap: 14px;
}
.loginbox .mark { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.loginbox .claim { font-size: 28px; font-weight: 300; letter-spacing: -0.03em; line-height: 1.15; }
.err { background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 12px; font-size: 13px; font-weight: 600; }

/* --- Tab bar móvil -------------------------------------------------------- */
.tabbar { display: none; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1100px) {
  .bl { grid-template-columns: minmax(0, 1fr) 84px 84px 28px; }
}

@media (max-width: 900px) {
  /* El móvil tiene paridad completa con el escritorio: las mismas pantallas, con
     el lenguaje visual del mock (tab bar abajo, hojas con handle, chips que
     scrollean). No hay vistas que falten ni que sobren. */
  body { font-size: 14px; }
  .page { padding: 0; }
  .shell { border-radius: 0; box-shadow: none; min-height: 100vh; }
  .rail { display: none; }
  .main {
    padding: calc(14px + env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom));
    gap: 14px;
  }
  h1.pt { font-size: 32px; }
  .ptdot { width: 44px; height: 44px; font-size: 20px; }
  .hello { display: none; }
  .today { display: none; }
  .titlerow { align-items: flex-start; flex-direction: column; gap: 10px; }
  .titlerow > div:last-child { margin-left: 0 !important; width: 100%; }
  /* En móvil el alta vive en el botón grande de la tab bar: repetirlo acá arriba
     empujaba el contenido media pantalla hacia abajo. */
  .titlerow .btnp { display: none; }
  .hdrrow .seg { width: 100%; overflow-x: auto; }
  .hdrrow .seg > button { padding: 9px 13px; }
  .hdrrow .seg > button span { display: none; }
  .mix { margin-left: 0; width: 100%; flex: 1 1 100%; }
  .mixleg { justify-content: flex-start; margin-top: 0; }
  .panel { padding: 14px; border-radius: 22px; }
  .pulse { grid-template-columns: minmax(96px, 1fr) repeat(3, minmax(0, 1fr)) 34px; gap: 6px 8px; font-size: 12px; }
  .metagrid { grid-template-columns: 1fr; }
  .imggrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rolepick { grid-template-columns: 1fr; }
  .btots { grid-template-columns: 1fr; }
  .bl { grid-template-columns: minmax(0, 1fr) 72px 72px 26px; gap: 5px; }
  .bl .h { font-size: 10px; }
  .g2 { grid-template-columns: 1fr; }
  .feed { grid-template-columns: repeat(3, 1fr); }

  /* Las hojas suben desde abajo, con handle, como en el mock móvil. */
  .drawer {
    top: auto; right: 0; left: 0; bottom: 0;
    width: 100%; max-height: 92vh; border-radius: 30px 30px 0 0;
    padding: 10px 16px calc(28px + env(safe-area-inset-bottom));
    gap: 14px;
  }
  .drawer::before {
    content: ''; width: 40px; height: 5px; border-radius: 3px;
    background: #DADAD4; align-self: center; flex: none; margin-bottom: 2px;
  }
  .modalwrap { place-items: end center; padding: 0; }
  .modal {
    width: 100%; border-radius: 30px 30px 0 0; max-height: 92vh;
    padding: 10px 16px calc(28px + env(safe-area-inset-bottom));
  }
  .modal::before {
    content: ''; width: 40px; height: 5px; border-radius: 3px; background: #DADAD4;
    justify-self: center; margin-bottom: 4px;
  }
  #toast { bottom: calc(92px + env(safe-area-inset-bottom)); }

  /* Cinco pestañas no entran en 375px: el segmentado de la hoja scrollea en vez de
     cortar la última ("Presupues…"). */
  .drawer .seg, .modal .seg { overflow-x: auto; scrollbar-width: none; }
  .drawer .seg::-webkit-scrollbar, .modal .seg::-webkit-scrollbar { display: none; }
  .drawer .seg.fill > button, .modal .seg.fill > button { flex: 0 0 auto; padding: 9px 14px; }

  .tabbar {
    display: flex; align-items: center; gap: 4px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: var(--surface); box-shadow: 0 -1px 0 var(--n200);
  }
  .tabbar button.tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: 0; cursor: pointer; font-size: 10.5px; font-weight: 600;
    min-height: 50px; padding: 0; color: var(--ink); min-width: 0;
  }
  .tabbar button.tab .ico { width: 44px; height: 32px; border-radius: 999px; display: grid; place-items: center; font-size: 21px; }
  .tabbar button.tab.on { font-weight: 800; }
  .tabbar .fab {
    width: 56px; height: 56px; flex: none; border-radius: 50%; border: 0;
    background: var(--ink); color: var(--lime); font-size: 24px;
    display: grid; place-items: center; cursor: pointer; margin: 0 4px;
  }
  .tabbar .more { position: relative; }
  .moremenu {
    position: fixed; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom));
    background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-float);
    padding: 8px; display: grid; gap: 4px; z-index: 31;
  }
  .moremenu button {
    display: flex; gap: 12px; align-items: center; background: none; border: 0;
    padding: 12px 14px; border-radius: 16px; font-size: 15px; font-weight: 700;
    cursor: pointer; text-align: left; color: var(--ink);
  }
  .moremenu button.on { background: var(--card); }

  /* El Gameplan scrollea de costado —es un año entero— pero la columna de carriles
     no puede comerse media pantalla: queda angosta y pegada al borde izquierdo. */
  .gp { font-size: 11px; }
  .gpname { padding: 8px; font-size: 11.5px; }
  .gpcell { min-height: 46px; padding: 4px; }
  .hito { font-size: 10px; padding: 3px 5px; }
  .gpfechas .gpcell { max-height: 112px; overflow-y: auto; }

  /* Las filas de Parámetros apilan sus campos en vez de apretarlos. */
  .entrow2 { flex-wrap: wrap; }
  .entrow2 .inp { flex: 1 1 100%; }
  .entrow2 .inp.corto { flex: 1 1 90px; width: auto; }

  /* Objetivos cómodos para el dedo. */
  .chip, .chbtn { min-height: 40px; }
  .iconbtn { width: 44px; height: 44px; }
}

@media (max-width: 560px) {
  .pipe { grid-template-columns: repeat(6, minmax(78vw, 1fr)); }
  .imggrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: 1fr !important; }
}

@media print {
  .rail, .tabbar, .scrim, .drawer, .modalwrap, #toast { display: none !important; }
  .page { padding: 0; }
  .shell { box-shadow: none; border-radius: 0; }
}
