/* Tablero Vertex — layout de la app (tema v2 "Vertex claro") */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --pad-top: calc(var(--safe-top) + 16px);
}

#app {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg);
  position: relative; overflow: hidden;
  max-width: 560px; margin: 0 auto;
}

.screen { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.scroller { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* header común: logo + píldora WK (+ engrane) */
.hdr-row { display: flex; align-items: center; justify-content: space-between; }

.sect-title { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }

.overlay {
  position: absolute; inset: 0; background: var(--bg); z-index: 40;
  display: flex; flex-direction: column;
  animation: riseUp .18s ease both;
}
.overlay-junta { z-index: 45; animation: fadeIn .18s ease both; }

/* hoja de configuración (bottom sheet) */
.sheet-dim {
  position: absolute; inset: 0; z-index: 55;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: rgba(26, 26, 26, .4);
}
.sheet {
  position: relative; background: var(--bg);
  border-radius: 28px 28px 0 0;
  padding: 22px 22px calc(24px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 16px;
  animation: riseUp .22s ease both;
  max-height: 86%; overflow-y: auto;
}

.toast {
  position: absolute; left: 22px; right: 22px;
  bottom: calc(110px + var(--safe-bottom));
  z-index: 60; padding: 13px 16px; border-radius: 16px;
  background: var(--text); color: #fff; font-size: 12.5px; font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
  animation: riseUp .16s ease both;
}

/* nav inferior: píldora blanca flotante */
.tabbar {
  position: absolute; left: 16px; right: 16px;
  bottom: calc(14px + var(--safe-bottom)); z-index: 30;
  background: var(--card); border-radius: 99px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .12);
  display: flex; align-items: center; padding: 7px;
}
.tabbar .tab {
  flex: 1; text-align: center; font-size: 12px; font-weight: 700;
  padding: 11px 0; border-radius: 99px; color: var(--text-2);
}
.tabbar .tab.on { background: var(--accent); color: #fff; }

.footer-fixed {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 22px calc(16px + var(--safe-bottom));
  background: rgba(250, 250, 250, .96); border-top: 1.5px solid var(--border);
  display: flex; gap: 9px; align-items: center;
}

.ptr {
  height: 0; overflow: hidden; display: flex; align-items: flex-end; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--text-2);
  transition: height .15s ease;
}
.ptr.pulling { transition: none; }

/* checklist */
.checkline {
  display: flex; align-items: flex-start; gap: 11px; padding: 8px 0;
  border-bottom: 1.5px solid var(--hairline); width: 100%;
}
.checkline:last-child { border-bottom: 0; }
.checkline .box {
  width: 21px; height: 21px; flex: none; margin-top: 1px;
  border-radius: 8px; border: 1.5px solid #ddd5cd; background: var(--card);
  display: flex; align-items: center; justify-content: center;
}
.checkline.on .box { background: var(--accent); border-color: var(--accent); }
.checkline .box svg { opacity: 0; }
.checkline.on .box svg { opacity: 1; }
.checkline .txt { font-size: 13px; line-height: 1.45; text-wrap: pretty; }
.checkline.on .txt { opacity: .4; text-decoration: line-through; }

@keyframes riseUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.rise { animation: riseUp .2s ease both; }
