/* =========================================================================
   taskbot — panel. Tokens, tipografía y motion del portfolio (ACL):
   fondo navy cobalto, Archivo auto-alojada, barra cobalto bajo los titulares.
   El motion es solo CSS y nunca deja contenido escondido (.motion-off).
   ========================================================================= */

/* ---- fuentes (Archivo variable, auto-alojada) ---------------------- */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo'; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url('/fonts/archivo-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo'; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url('/fonts/archivo-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- tokens (de ~/obsidian/Portfolio/style.css) --------------------- */
:root {
  color-scheme: dark;

  --cobalt:   #2439FF;
  --electric: #8593FF;
  --indigo:   #1B23A8;

  --ink:   #0A0E24;
  --ink-2: #111634;
  --ink-3: #171D42;
  --bone:  #F2F3FA;
  --bone-2:#B9BEDB;
  --muted: #7C82A8;

  --line:   rgba(224, 228, 255, .12);
  --line-2: rgba(224, 228, 255, .22);

  --warn: #FFB547;
  --bad:  #FF6B7A;
  --ok:   #5BE3A8;

  --font: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --bar-h: .09em;
  --bar-inset: 5%;
  --r-card: 10px;
  --r-chip: 5px;
  --r-bar: 2px;

  --maxw: 1140px;
  --pad: clamp(1rem, 4vw, 2.6rem);
  --top-h: 60px;
  --tabbar-h: 64px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---- reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px; line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  background: var(--ink); color: var(--bone);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { line-height: 1.1; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
img, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; color: var(--electric); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--cobalt); color: #fff; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* fondo: la luz cobalto/índigo en esquinas opuestas y el grano del portfolio */
body::before, body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
body::before {
  inset: -20vh -10vw;
  background-image:
    radial-gradient(115vw 80vh at 85% 5%, rgba(36, 57, 255, .13), transparent 55%),
    radial-gradient(100vw 75vh at -12% 95%, rgba(27, 35, 168, .18), transparent 52%);
}
body::after {
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- primitivas del portfolio --------------------------------------- */
.label {
  font-size: .72rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.label--c { color: var(--electric); }

.bar { position: relative; display: inline-block; }
.bar::after {
  content: ""; position: absolute; left: 0; right: var(--bar-inset);
  bottom: -.12em; height: var(--bar-h); background: var(--cobalt);
  border-radius: var(--r-bar);
}

.opener {
  width: 48px; height: 5px;
  background: linear-gradient(90deg, var(--cobalt) 0 68%, transparent 68% 76%, var(--electric) 76%);
  transform: skewX(-14deg); transform-origin: left;
}

.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  background: rgba(36, 57, 255, .16); border: 1px solid rgba(36, 57, 255, .42); color: #C3C9FF;
  padding: .18rem .5rem; border-radius: var(--r-chip);
  font-size: .74rem; font-weight: 600; white-space: nowrap;
}
.chip--warn { background: rgba(255, 181, 71, .12); border-color: rgba(255, 181, 71, .45); color: var(--warn); }
.chip--bad  { background: rgba(255, 107, 122, .12); border-color: rgba(255, 107, 122, .45); color: var(--bad); }
.chip--ok   { background: rgba(91, 227, 168, .1); border-color: rgba(91, 227, 168, .4); color: var(--ok); }
.chip--line { background: transparent; border-color: var(--line-2); color: var(--bone-2); }

.tag {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .5rem; border-radius: 3px;
  font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  line-height: 1.3; white-space: nowrap; background: var(--cobalt); color: #fff;
}
.tag--line { background: transparent; color: var(--electric); box-shadow: inset 0 0 0 1px rgba(133, 147, 255, .55); }
.tag--mute { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }

.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--cobalt); color: #fff; font-weight: 700;
  font-size: .9rem; padding: .72rem 1.3rem; border-radius: var(--r-chip);
  transition: background .15s ease, transform .12s ease;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.btn::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: -1;
  background: linear-gradient(90deg, rgba(255,255,255,.26) 0 62%, transparent 62% 74%, rgba(255,255,255,.26) 74%);
  transform: skewX(-14deg); transition: left .6s var(--ease-out);
}
@media (hover: hover) {
  .btn:hover { background: var(--electric); }
  .btn:hover::before { left: 120%; }
  .btn--ghost:hover { background: var(--ink-2); border-color: var(--cobalt); }
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn--ghost { background: transparent; border: 1px solid var(--line-2); color: var(--bone); }
.btn--ghost::before { display: none; }
.btn--danger { color: var(--bad); }
.btn--wide { width: 100%; }
.btn--sm { font-size: .8rem; padding: .45rem .8rem; }

.field { display: grid; gap: .4rem; margin-bottom: .9rem; }
.input, .field input, .field select {
  width: 100%; background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--r-chip); padding: .65rem .8rem;
  font-size: 16px; /* evita el zoom de iOS */
  transition: border-color .15s ease;
}
.input:focus, .field input:focus { outline: none; border-color: var(--cobalt); }

/* =========================================================================
   ACCESO
   ========================================================================= */
.gate {
  min-height: 100dvh; display: grid; place-items: center;
  padding: calc(var(--safe-t) + 2rem) var(--pad) calc(var(--safe-b) + 2rem);
}
.gate__card { width: min(380px, 100%); text-align: left; }
.gate__mark { width: 78px; height: auto; color: var(--bone); margin-bottom: 2.2rem; }
.gate__title {
  font-size: clamp(2.6rem, 11vw, 3.6rem); font-weight: 900; font-style: italic;
  letter-spacing: -.035em; margin-bottom: 1rem;
}
.gate__lead { color: var(--bone-2); margin-bottom: 2rem; }
.gate__hint { color: var(--muted); font-size: .86rem; margin: 1rem 0; }
.gate__error {
  margin-top: 1rem; padding: .7rem .85rem; border-radius: var(--r-chip);
  background: rgba(255, 107, 122, .1); border: 1px solid rgba(255, 107, 122, .4);
  color: var(--bad); font-size: .88rem;
}
#gate-enroll .btn + .btn { margin-top: .6rem; }

/* =========================================================================
   ESTRUCTURA
   ========================================================================= */
.top {
  position: sticky; top: 0; z-index: 50;
  padding-top: var(--safe-t);
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.top__in {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad);
  height: var(--top-h); display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .65rem; margin-right: auto; }
.brand svg { width: 42px; height: auto; color: var(--bone); }
.brand__name { font-weight: 800; font-style: italic; letter-spacing: -.02em; font-size: 1.02rem; }

.tabs { display: flex; gap: .25rem; }
.tab {
  position: relative; padding: .5rem .85rem; border-radius: var(--r-chip);
  font-weight: 700; font-size: .9rem; color: var(--bone-2);
  transition: color .15s ease, background .15s ease;
}
.tab::after {
  content: ""; position: absolute; left: .85rem; right: calc(.85rem + 5%); bottom: .2rem;
  height: 2px; background: var(--cobalt); border-radius: var(--r-bar);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.tab[aria-selected="true"] { color: var(--bone); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
@media (hover: hover) { .tab:hover { color: var(--bone); background: var(--ink-2); } }
.tab__dot {
  position: absolute; top: .45rem; right: .4rem; width: 7px; height: 7px;
  border-radius: 50%; background: var(--electric); box-shadow: 0 0 0 2px var(--ink);
}

.top__more {
  display: grid; place-items: center; gap: 3px; width: 40px; height: 40px;
  border-radius: var(--r-chip); grid-auto-flow: column;
}
.top__more span { width: 4px; height: 4px; border-radius: 50%; background: var(--bone-2); }
@media (hover: hover) { .top__more:hover { background: var(--ink-2); } }

.view {
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(1.4rem, 4vw, 2.6rem) var(--pad) 4rem;
  outline: none;
}

/* móvil: pestañas abajo, al alcance del pulgar */
@media (max-width: 720px) {
  /* backdrop-filter haría de bloque contenedor de la barra fija: en móvil la cabecera va opaca */
  .top { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--ink); }
  .tabs {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    padding: .35rem .5rem calc(var(--safe-b) + .35rem);
    background: color-mix(in srgb, var(--ink) 92%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    justify-content: space-around;
  }
  .tab { flex: 1; text-align: center; padding: .7rem .5rem; font-size: .86rem; }
  .tab::after { left: 30%; right: 30%; bottom: .3rem; }
  .tab__dot { right: 22%; top: .55rem; }
  .view { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 2rem); }
}

/* ---- cabecera de cada vista ---------------------------------------- */
.vhead { margin-bottom: clamp(1.6rem, 4vw, 2.4rem); }
.vhead .opener { margin-bottom: 1rem; }
.vhead__title {
  font-size: clamp(2.1rem, 7vw, 3.4rem); font-weight: 900; font-style: italic;
  letter-spacing: -.035em; text-transform: lowercase;
}
.vhead__sub { color: var(--bone-2); margin-top: .9rem; font-size: .98rem; }

/* ---- rejilla y tarjetas --------------------------------------------- */
.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.5rem); }
@media (min-width: 900px) {
  .grid--today { grid-template-columns: 1.15fr 1fr; align-items: start; }
  .grid--two { grid-template-columns: 1fr 1fr; align-items: start; }
}
.card {
  background: color-mix(in srgb, var(--ink-2) 88%, transparent);
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: clamp(1rem, 2.6vw, 1.4rem);
  min-width: 0;
}
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.card__count { color: var(--muted); font-size: .8rem; font-weight: 600; }
.empty { color: var(--muted); font-size: .9rem; padding: .4rem 0; }
.stack > * + * { margin-top: clamp(1rem, 2.4vw, 1.5rem); }
.mt { margin-top: clamp(1rem, 2.4vw, 1.5rem); }
.mt-s { margin-top: 1.2rem; }
.d1 { --i: 1; } .d2 { --i: 2; } .d3 { --i: 3; } .d4 { --i: 4; } .d5 { --i: 5; }

/* ---- agenda ---------------------------------------------------------- */
.agenda { position: relative; }
.slot {
  display: grid; grid-template-columns: 6.4rem 1fr; gap: .9rem;
  padding: .7rem 0; border-top: 1px solid var(--line);
}
.slot:first-child { border-top: 0; padding-top: 0; }
.slot__time { font-weight: 700; font-size: .86rem; color: var(--bone-2); white-space: nowrap; }
.slot__label { font-weight: 600; overflow-wrap: anywhere; }
.slot__where { color: var(--muted); font-size: .82rem; }
.slot--past { opacity: .45; }
.slot--now .slot__time { color: var(--electric); }
.slot--now { position: relative; }
.slot--now::before {
  content: ""; position: absolute; left: -.9rem; top: .95rem; width: 6px; height: 6px;
  border-radius: 50%; background: var(--electric); box-shadow: 0 0 0 4px rgba(133,147,255,.18);
}
.free { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line-2); }
.free .label { width: 100%; margin-bottom: .2rem; }

/* ---- listas de tareas / entregas ------------------------------------ */
.group + .group { margin-top: 1.1rem; }
.group__title { margin-bottom: .4rem; display: flex; align-items: center; gap: .5rem; }
.row {
  display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start;
  padding: .6rem 0; border-top: 1px solid var(--line);
}
.group .row:first-of-type { border-top: 0; }
.row__text { font-weight: 600; overflow-wrap: anywhere; }
.row__meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.row--done .row__text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.row a.row__text:hover { color: var(--electric); }

.check {
  width: 22px; height: 22px; margin-top: .1rem; border-radius: 6px;
  border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
  touch-action: manipulation;
}
.check svg { width: 14px; height: 14px; }
.check:active { transform: scale(.88); }
@media (hover: hover) { .check:hover { border-color: var(--cobalt); } }
.check[aria-checked="true"] { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.due { display: grid; place-items: center; width: 22px; height: 22px; font-size: .8rem; }

/* ---- bloques: área → asignatura -------------------------------------- */
.blk > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .55rem;
  padding: .55rem 0; user-select: none; -webkit-user-select: none;
}
.blk > summary::-webkit-details-marker { display: none; }
.blk > summary::before {
  content: ""; width: 0; height: 0; flex: none;
  border-left: 5px solid var(--muted); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform .2s var(--ease-out);
}
.blk[open] > summary::before { transform: rotate(90deg); }
.blk > summary .chip { margin-left: auto; }

.blk--area + .blk--area { margin-top: .6rem; border-top: 1px solid var(--line); padding-top: .4rem; }
.blk--area > summary .blk__title {
  font-weight: 900; font-style: italic; font-size: 1.12rem; letter-spacing: -.02em;
  position: relative;
}
.blk--area > summary .blk__title::after {
  content: ""; position: absolute; left: 0; right: 5%; bottom: -.12em; height: 2px;
  background: var(--cobalt); border-radius: var(--r-bar);
}

.blk--sub {
  margin: .35rem 0 .5rem .15rem; padding-left: .85rem;
  border-left: 2px solid var(--line-2);
  transition: border-color .2s ease;
}
.blk--sub[open] { border-left-color: var(--cobalt); }
.blk--sub > summary { padding: .4rem 0; }
.blk--sub > summary .blk__title { font-weight: 700; font-size: .92rem; color: var(--bone); }
.blk ul .row:first-child { border-top: 0; }

/* ---- todas las tareas ------------------------------------------------ */
.tools { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.tools form { flex: 1 1 260px; }
.tools .input { flex: 1 1 180px; }
.filters { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .8rem; }
.filter {
  padding: .35rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
  border: 1px solid var(--line); color: var(--bone-2);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.filter[aria-pressed="true"] { background: rgba(36,57,255,.18); border-color: rgba(36,57,255,.6); color: var(--bone); }
.item-actions {
  grid-column: 2; display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem;
}
.item-actions select, .item-actions input {
  background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--r-chip);
  padding: .4rem .55rem; font-size: 16px; max-width: 100%;
}
.thumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.thumbs audio { max-width: 100%; height: 36px; }
.row__body { min-width: 0; cursor: pointer; }

/* ---- reuniones y mensajes ------------------------------------------- */
.meet {
  display: grid; grid-template-columns: 4.2rem 1fr; gap: 1rem;
  padding: .9rem 0; border-top: 1px solid var(--line);
}
.meet:first-child { border-top: 0; padding-top: 0; }
.meet__date { text-align: center; border: 1px solid var(--line-2); border-radius: var(--r-chip); padding: .45rem .2rem; align-self: start; }
.meet__day { display: block; font-size: 1.5rem; font-weight: 900; font-style: italic; line-height: 1; }
.meet__mon { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .2rem; }
.meet__who { font-weight: 800; font-size: 1.05rem; }
.meet__when { color: var(--bone-2); font-size: .88rem; }
.meet__msg { color: var(--bone-2); font-size: .9rem; margin-top: .45rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.meet__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; align-items: center; }
.meet--cancelled { opacity: .55; }
.meet--cancelled .meet__who { text-decoration: line-through; }

.msg { padding: .9rem 0; border-top: 1px solid var(--line); cursor: pointer; }
.msg:first-child { border-top: 0; padding-top: 0; }
.msg__head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.msg__who { font-weight: 800; }
.msg__when { color: var(--muted); font-size: .8rem; margin-left: auto; }
.msg__body { color: var(--bone-2); font-size: .92rem; margin-top: .35rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg:not(.msg--open) .msg__body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msg--new .msg__who::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--electric); margin-right: .45rem; vertical-align: .12em; }

details.past > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem; }
details.past > summary::-webkit-details-marker { display: none; }
details.past > summary::before { content: "▸"; color: var(--muted); transition: transform .2s ease; }
details.past[open] > summary::before { transform: rotate(90deg); }
details.past[open] > summary { margin-bottom: 1rem; }

/* ---- semana ---------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.stat { border: 1px solid var(--line); border-radius: var(--r-card); padding: .9rem 1rem; }
.stat__n { display: block; font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 900; font-style: italic; letter-spacing: -.03em; line-height: 1; }
.stat__l { display: block; margin-top: .45rem; }
.stat__s { display: block; color: var(--muted); font-size: .76rem; margin-top: .15rem; }
.repo { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.repo:first-child { border-top: 0; }
.repo__name { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.repo__n { color: var(--bone-2); font-size: .86rem; white-space: nowrap; }
.repo__msgs { color: var(--muted); font-size: .8rem; margin-top: .2rem; }
.draft {
  position: relative; background: var(--ink-3); border: 1px solid var(--line-2);
  border-left: 3px solid var(--cobalt); border-radius: var(--r-chip);
  padding: 1rem 1.1rem; white-space: pre-wrap; font-size: 1rem; line-height: 1.5;
}
.draft__foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .7rem; color: var(--muted); font-size: .8rem; }
.weeks summary { padding: .7rem 0; border-top: 1px solid var(--line); }

/* ---- ajustes (hoja) -------------------------------------------------- */
.sheet {
  margin: auto; width: min(440px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem);
  background: var(--ink-2); color: var(--bone); border: 1px solid var(--line-2);
  border-radius: 14px; padding: 1.3rem;
}
.sheet::backdrop { background: rgba(5, 7, 20, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.sheet__close { width: 36px; height: 36px; font-size: 1.5rem; line-height: 1; color: var(--bone-2); border-radius: var(--r-chip); }
.sheet__h { font-size: 1rem; margin-bottom: .6rem; }
.sheet__note { color: var(--muted); font-size: .84rem; margin: .7rem 0; }
.sheet .btn { margin-top: .7rem; }
.creds li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.creds li:first-child { border-top: 0; }
.creds small { display: block; color: var(--muted); font-size: .76rem; }
.creds button { color: var(--bad); font-size: .8rem; font-weight: 700; padding: .3rem .5rem; }

.toast {
  position: fixed; z-index: 100; left: 50%; bottom: calc(var(--safe-b) + 1.2rem);
  transform: translateX(-50%);
  background: var(--bone); color: var(--ink); font-weight: 700; font-size: .88rem;
  padding: .6rem 1rem; border-radius: var(--r-chip); box-shadow: 0 10px 30px rgba(0,0,0,.35);
  max-width: calc(100% - 2rem);
}
@media (max-width: 720px) { .toast { bottom: calc(var(--tabbar-h) + var(--safe-b) + .8rem); } }

.skeleton { height: 1rem; border-radius: 4px; background: var(--ink-3); margin: .6rem 0; }
.skeleton:nth-child(2) { width: 80%; } .skeleton:nth-child(3) { width: 60%; }

/* =========================================================================
   MOTION: solo CSS, transform/opacity. Todo estado "desde" vive aquí dentro,
   así que con :root.motion-off (reduce motion, ?motion=off, prerender) todo
   se ve al instante. Además app.js marca .settled a los 1,2 s: si algo se
   quedó a medias (pestaña en segundo plano), se muestra igualmente.
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
  :root:not(.motion-off) {
    .rise { animation: rise .55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
    .vhead .opener { animation: draw-skew .7s cubic-bezier(.7,0,.3,1) .05s both; }
    .vhead__title.bar::after { animation: draw .8s cubic-bezier(.7,0,.3,1) .25s both; transform-origin: left; }
    .gate__mark { animation: rise .7s var(--ease-out) both; }
    .gate__title .bar::after { animation: draw .8s cubic-bezier(.7,0,.3,1) .4s both; transform-origin: left; }
    .toast:not([hidden]) { animation: toast-in .35s var(--ease-out) both; }
    .sheet[open] { animation: rise .35s var(--ease-out) both; }
    .row, .msg { transition: opacity .25s ease; }
    .row--leaving { opacity: 0; transition: opacity .25s ease, transform .25s ease; transform: translateX(8px); }
    .settled .rise, .settled .opener, .settled .bar::after { animation: none !important; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes draw { from { transform: scaleX(0); } }
@keyframes draw-skew { from { transform: skewX(-14deg) scaleX(0); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
