:root {
  --bg: #111315;
  --panel: #191c1f;
  --raised: #202428;
  --her: #23272c;
  --me: #2d5c55;
  --text: #eceae6;
  --muted: #a3a8ad;
  --accent: #8fc7b8;
  --line: #2c3136;
  --danger: #ff8a80;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; }
/* iOS: al abrir el teclado Safari desplaza la ventana entera. Fijamos el documento y colocamos la app
   sobre la zona realmente visible (visualViewport: alto y desplazamiento), que app.js mantiene al día. */
html, body { position: fixed; inset: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

button, .btn { font: inherit; color: inherit; border: 0; border-radius: 12px; padding: 11px 16px; min-height: 44px;
  background: var(--raised); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; gap: 6px; }
button.primary { background: var(--accent); color: #0d1f1b; font-weight: 600; }
button.big { width: 100%; padding: 14px; }
button.ghost, .btn.ghost { background: transparent; border: 1px solid var(--line); }
button.link { background: none; color: var(--accent); padding: 8px 4px; min-height: 44px; }
button.small, .small { font-size: 15px; padding: 6px 12px; min-height: 36px; }
.danger { color: var(--danger) !important; }
input, textarea, select { font: inherit; color: var(--text); background: var(--raised); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; min-height: 44px; }
input[type=search], textarea { width: 100%; }
textarea { resize: none; }
input[type=checkbox] { width: 26px; height: 26px; min-height: 0; accent-color: var(--accent); flex: none; }
h2 { margin: 6px 0 12px; font-size: 24px; }
h3 { margin: 18px 4px 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.hint { color: var(--muted); font-size: 15px; margin: 0; }

/* ── bloqueo, primer arranque y velo ── */
.screen { position: fixed; left: 0; right: 0; top: var(--vvtop, 0px); height: var(--vvh, 100dvh); background: var(--bg); display: grid; place-items: center;
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bottom) + 24px); z-index: 30; overflow-y: auto; }
.lock-box { width: min(340px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lock-icon { border-radius: 16px; }
.lock-title { font-size: 22px; font-weight: 600; margin: 0 0 18px; }
#login-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.ob-step { width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; }
.ob-step p { margin: 0; }
#veil { position: fixed; inset: 0; background: var(--bg); z-index: 40; }

/* ── estructura ── */
#app { position: fixed; left: 0; right: 0; top: var(--vvtop, 0px); height: var(--vvh, 100dvh);
  display: flex; flex-direction: column; }
header { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-top) + 6px) 8px 6px 14px;
  background: var(--panel); border-bottom: 1px solid var(--line); flex: none; user-select: none; }
#avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--her); }
.who { flex: 1; min-width: 0; }
#name { font-weight: 600; }
#status { font-size: 13px; color: var(--muted); }
#status:empty { display: none; }
.icon-btn { background: none; color: var(--muted); width: 44px; height: 44px; padding: 0; border-radius: 50%; }
main { flex: 1; min-height: 0; position: relative; }
.view { display: none; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.view.active { display: block; }
#view-chat.active { display: flex; flex-direction: column; }
.pad { padding: 14px 16px 32px; display: flex; flex-direction: column; gap: 10px; }

/* ── chat ── */
#messages { flex: 1; overflow-y: auto; padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 4px; }
.day { align-self: center; color: var(--muted); font-size: 13px; margin: 12px 0 6px; background: var(--panel);
  padding: 3px 12px; border-radius: 10px; }
.msg { content-visibility: auto; contain-intrinsic-size: auto 60px; max-width: 80%; padding: 8px 12px 6px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.assistant { align-self: flex-start; background: var(--her); border-bottom-left-radius: 6px; }
.msg.user { align-self: flex-end; background: var(--me); border-bottom-right-radius: 6px; }
.msg + .msg.assistant, .msg + .msg.user { margin-top: 0; }
.msg em { color: #c9d6d2; }
.msg.grouped { margin-bottom: -2px; }
.msg.grouped > .t { display: none; }
.msg.assistant.grouped:not(.reacted) { border-bottom-left-radius: 18px; }
.msg.user.grouped:not(.reacted) { border-bottom-right-radius: 18px; }
.msg .t { display: block; text-align: right; font-size: 12px; color: var(--muted); margin-top: 2px; }
.msg.user .t { color: #bcd8d2; }
.msg.system { align-self: center; background: none; color: var(--danger); font-size: 15px; border: 1px dashed var(--line); }
.gift-card { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 8px 0;
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--raised); text-align: center; }
.gift-card small { color: var(--muted); font-size: 12px; }
.invite-btns { gap: 8px; margin-top: 8px; justify-content: center; flex-wrap: wrap; }
.invite-card .hint { margin: 6px 0 0; }
.msg.media-msg { padding: 4px; background: var(--her); }
.media { position: relative; border-radius: 14px; overflow: hidden; }
.media img, .media video { display: block; width: 240px; max-width: 100%; border-radius: 14px; }
.media .reveal { display: none; }
.media.blurred img, .media.blurred video { filter: blur(28px) brightness(.7); transform: scale(1.08); pointer-events: none; }
.media.blurred .reveal { display: flex; position: absolute; inset: 0; background: transparent; color: var(--text);
  font-weight: 600; border-radius: 14px; }
.ph { width: 240px; max-width: 100%; aspect-ratio: 3/4; border-radius: 14px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; color: var(--muted);
  font-size: 15px; background: var(--raised); }
.ph small { font-size: 13px; }
.ph.small-ph { aspect-ratio: auto; padding: 10px; width: auto; }
.ph.loading { background: linear-gradient(110deg, var(--raised) 30%, #2a3035 50%, var(--raised) 70%); background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.regen { align-self: flex-start; margin-left: 6px; }
.fab { position: absolute; right: 14px; bottom: 76px; width: 44px; height: 44px; border-radius: 50%; padding: 0;
  background: var(--raised); border: 1px solid var(--line); z-index: 2; }

#composer { display: flex; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--panel); flex: none; }
#input { max-height: 140px; border-radius: 22px; padding: 10px 16px; }
#send { border-radius: 50%; width: 44px; height: 44px; padding: 0; flex: none; align-self: flex-end;
  background: var(--accent); color: #0d1f1b; }
#send:disabled { opacity: .45; }

nav#tabs { display: flex; flex: none; background: var(--panel); border-top: 1px solid var(--line); padding-bottom: var(--safe-bottom); }
nav#tabs button { flex: 1; background: none; border-radius: 0; padding: 6px 0 4px; flex-direction: column; gap: 2px;
  color: var(--muted); min-height: 50px; }
nav#tabs svg { width: 24px; height: 24px; }
nav#tabs span { font-size: 11px; }
nav#tabs button.active { color: var(--accent); }
body.kb nav#tabs { display: none; }
body.kb #composer { padding-bottom: 8px; }

/* ── carpetas, pendientes y ajustes ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.area { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-align: left;
  flex-direction: column; align-items: flex-start; gap: 4px; }
.area .e { font-size: 26px; }
.area .n { font-size: 14px; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 6px 14px;
  display: flex; flex-direction: column; }
.card > * + * { border-top: 1px solid var(--line); }
.card > .hint, .card > button.link { border-top: 0; padding-bottom: 10px; }
.card > button.ghost, .card > .btn { margin: 8px 0; border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 4px 0; }
.row > span:first-child { flex: 1; }
.times { display: flex; align-items: center; gap: 6px; }
.times input { width: 92px; padding: 6px; }
.seg { display: inline-flex; background: var(--raised); border-radius: 12px; padding: 3px; }
.seg button { background: none; padding: 6px 12px; min-height: 36px; font-size: 15px; border-radius: 9px; color: var(--muted); }
.seg button.on { background: var(--accent); color: #0d1f1b; font-weight: 600; }
ul.plain { list-style: none; margin: 0; padding: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; padding: 12px 0; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-size: 22px; }
.stats span { font-size: 13px; color: var(--muted); }
.entry { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 6px 8px 12px;
  display: flex; gap: 2px; align-items: flex-start; }
.entry .txt { flex: 1; white-space: pre-wrap; padding-top: 4px; }
.entry .src { font-size: 13px; color: var(--muted); display: block; margin-top: 3px; }
.entry button { padding: 0; width: 40px; min-height: 40px; background: none; font-size: 16px; }
.entry.pinned { border-color: var(--accent); }
.fu { border-left: 3px solid var(--accent); }
#note-form { display: flex; flex-direction: column; gap: 8px; }
#note-form button { align-self: flex-end; }
.back { align-self: flex-start; }

#lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.94); display: grid; place-items: center; z-index: 20;
  padding: var(--safe-top) 0 var(--safe-bottom); }
#lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }

#dev-state { white-space: pre-wrap; font: 13px/1.5 ui-monospace, Menlo, monospace; padding: 10px 0; margin: 0; }

/* ── detalles del chat: citas, reacciones, visto, menú y búsqueda ── */
.msg { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; position: relative; }
.msg.reacted { margin-bottom: 14px; content-visibility: visible; } /* auto recorta lo que sobresale (la reacción) */
.msg .react { position: absolute; bottom: -14px; font-size: 15px; line-height: 1; background: var(--raised);
  border: 1px solid var(--line); border-radius: 12px; padding: 3px 5px; }
.msg.assistant .react { right: -4px; }
.msg.user .react { left: -4px; }
.msg .star { font-size: 11px; margin-right: 4px; }
.msg.user .tick::after { content: ' ✓'; font-style: normal; }
.msg.user.seen .tick::after { content: ' ✓✓'; color: var(--accent); }
.msg.user .tick { font-style: normal; color: #bcd8d2; }
.quote { display: flex; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; min-height: 0; text-align: left;
  background: rgba(0,0,0,.18); border-left: 3px solid var(--accent); border-radius: 8px; padding: 4px 8px; margin: 0 0 4px;
  font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.quote b { color: var(--accent); font-size: 13px; }
.quote, .quote b { text-overflow: ellipsis; max-width: 100%; overflow: hidden; display: block; }
.msg.picked { outline: 2px solid var(--accent); }
.msg.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: none; } }
#msg-menu { position: fixed; z-index: 25; background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 6px; display: flex; flex-direction: column; min-width: 220px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
#msg-menu > button { background: none; justify-content: flex-start; border-radius: 10px; }
.mm-react { display: flex; justify-content: space-between; padding-bottom: 4px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.mm-react button { background: none; font-size: 22px; padding: 4px; min-height: 40px; width: 40px; border-radius: 50%; }
.mm-react button.on { background: var(--raised); }
#reply-bar { display: flex; align-items: center; gap: 8px; padding: 6px 8px 0 14px; background: var(--panel); border-top: 1px solid var(--line); flex: none; }
#reply-bar .rq { flex: 1; min-width: 0; border-left: 3px solid var(--accent); padding: 2px 8px; display: flex; flex-direction: column; }
#reply-bar .rq b { color: var(--accent); font-size: 13px; }
#reply-bar .rq span { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#reply-bar + #composer { border-top: 0; }
#finder { flex: none; background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px 10px; max-height: 55%; overflow-y: auto; }
.finder-row { display: flex; gap: 8px; }
.finder-row input[type=search] { flex: 1; min-width: 0; }

#find-results { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.hit { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: var(--raised); padding: 8px 12px; }
.hit small { color: var(--muted); font-size: 12px; }
.hit span { font-size: 15px; }
mark { background: rgba(143,199,184,.35); color: inherit; border-radius: 3px; }

/* ── nosotros ── */
.seg.wide { display: flex; }
.seg.wide button { flex: 1; padding-inline: 4px; min-width: 0; }
.diary-entry { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.diary-entry h4 { margin: 0 0 6px; font-size: 14px; color: var(--accent); font-weight: 600; }
.diary-entry h4::first-letter { text-transform: uppercase; }
.diary-entry p { margin: 0; white-space: pre-wrap; font-family: Georgia, "Iowan Old Style", serif; font-size: 17px; line-height: 1.55; }
.us-pane { display: flex; flex-direction: column; gap: 10px; }
.us-pane[hidden] { display: none; }
.timeline { display: flex; flex-direction: column; gap: 8px; }
.ms { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.ms.go { cursor: pointer; }
.ms-e { font-size: 24px; line-height: 1.2; }
.ms small { display: block; color: var(--muted); font-size: 13px; }
.ms p { margin: 4px 0 0; white-space: pre-wrap; }
.ms img { display: block; width: 120px; border-radius: 10px; margin-top: 6px; }
.ms img.blurred { filter: blur(18px) brightness(.7); }
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.album .cell { position: relative; padding: 0; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; min-height: 0; background: var(--raised); }
.album .cell img, .album .cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.album .cell.blurred img, .album .cell.blurred video { filter: blur(18px) brightness(.7); }
.album .star, .album .vid { position: absolute; font-size: 14px; text-shadow: 0 1px 3px #000; }
.album .star { top: 4px; right: 5px; }
.album .vid { bottom: 4px; left: 6px; color: #fff; }
#lightbox { grid-template-rows: 1fr auto; }
#lightbox .lb-bar { display: flex; gap: 8px; justify-content: center; padding: 10px; }
#lightbox .lb-bar button { background: rgba(32,36,40,.9); }
.date-btn { position: relative; flex: none; width: 48px; display: grid; place-items: center; background: var(--raised);
  border: 1px solid var(--line); border-radius: 12px; font-size: 20px; }
.date-btn input { position: absolute; inset: 0; opacity: 0; width: 100%; min-height: 0; }

/* ── ajustes: portada con apartados (como los Ajustes del iPhone) ── */
.nav-list { list-style: none; margin: 0 0 18px; padding: 0; }
.nav-list li + li { border-top: 1px solid var(--line); }
.nav-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 0;
  background: none; color: var(--text); text-align: left; border-radius: 0; font-size: 17px; }
.nav-list .ic { font-size: 22px; width: 30px; text-align: center; flex: none; }
.nav-list .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nav-list small { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-list .chev { color: var(--muted); font-size: 22px; flex: none; }
.panel .back { align-self: flex-start; padding: 0; min-height: 40px; font-size: 17px; }
.panel h2 { margin-top: 0; }

/* horas de silencio: la franja dentro del día */
.dayline { position: relative; height: 34px; margin: 4px 0 2px; border-top: 0 !important; }
.dayline .track { position: absolute; left: 0; right: 0; top: 6px; height: 12px; border-radius: 6px; background: var(--raised); overflow: hidden; }
.dayline .quiet { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, #8b93e0 0 6px, #6f78c9 6px 12px); }
.dayline .now { position: absolute; top: 2px; width: 2px; height: 20px; background: var(--accent); border-radius: 1px; }
.dayline .ticks { position: absolute; left: 0; right: 0; top: 20px; display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted); }

/* uso: barras por día */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding: 12px 0 4px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars .b i { display: block; width: 100%; max-width: 30px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: var(--accent); }
.bars .b.zero i { background: var(--raised); }
.bars .b span { font-size: 12px; color: var(--muted); }
.bars .b b { font-size: 12px; font-weight: 600; }

/* ── su habitación (isométrica, dibujada con CSS/SVG) ── */
@keyframes drop { from { transform: translate(-50%, -140%) scale(.6); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
.book { display: flex; align-items: center; gap: 10px; }
.book .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.book .bar i { display: block; height: 100%; background: var(--accent); }

/* ── notas de voz ── */
#mic { border-radius: 50%; width: 44px; height: 44px; padding: 0; flex: none; align-self: flex-end; background: var(--raised); color: var(--text); }
#composer.has-text #mic, #composer:not(.has-text):not(.recording) #send { display: none; }
#composer.recording #input, #composer.recording #mic { display: none; }
#rec { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 8px; font-variant-numeric: tabular-nums; }
#rec[hidden] { display: none; }
#rec .dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5b5b; animation: blink 1s infinite; }
#rec-cancel { margin-left: auto; }
@keyframes blink { 50% { opacity: .25; } }
.msg.voice-msg audio { display: block; width: 230px; max-width: 100%; height: 40px; }
.msg.voice-msg .vt { font-size: 14px; color: var(--muted); margin-top: 4px; white-space: pre-wrap; }
.msg.user.voice-msg .vt { color: #bcd8d2; }

/* viajes */
.trip { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; margin-bottom: 12px; }
.trip.now { border-color: var(--accent); }
.trip h4 { margin: 0 0 4px; font-size: 17px; }
.trip h4 small { color: var(--muted); font-weight: 400; font-size: 13px; }
.trip .hint { margin: 0 0 6px; }
.trip .why { margin: 0 0 10px; font-family: Georgia, "Iowan Old Style", serif; font-size: 16px; line-height: 1.5; }
.trip .album { border-radius: 10px; overflow: hidden; }

/* necesidades (Cómo está) */

.wish { margin: 4px 0 16px; }
.wish label { display: block; font-weight: 600; margin-bottom: 6px; }
.wish .row { gap: 8px; }
.wish input { flex: 1; min-width: 0; }

/* ── su mundo: la isla a pantalla completa (world3d.js) ── */
#view-world.view.active { position: relative; overflow: hidden; }
.world { position: absolute; inset: 0; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 110%, #3b4a6b 0%, #222a40 45%, #141826 100%); }
.world::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(1px 1px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 72% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 38% 30%, #dfe9ff, transparent), radial-gradient(1px 1px at 88% 40%, #fff, transparent),
    radial-gradient(1px 1px at 22% 62%, #fff, transparent), radial-gradient(1.5px 1.5px at 60% 74%, #dfe9ff, transparent),
    radial-gradient(1px 1px at 8% 85%, #fff, transparent), radial-gradient(1px 1px at 93% 82%, #fff, transparent); }
.world.dia { background: radial-gradient(120% 80% at 50% 110%, #f4d8b8 0%, #b9cde6 48%, #8eaad2 100%); }
.world.dia::before { opacity: 0; }
.world > canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.w-ov { position: absolute; inset: 0; pointer-events: none; }
.w-label { position: absolute; left: 0; top: 0; pointer-events: auto; min-height: 0; padding: 3px 9px; border-radius: 999px;
  font-size: 13px; white-space: nowrap; background: rgba(17, 19, 21, .62); color: var(--text); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.w-label.borde { background: rgba(120, 170, 220, .35); }
.w-label.obra { background: rgba(176, 138, 90, .55); }
.world.lejos .w-label { opacity: 0; pointer-events: none; }
.w-label { transition: opacity .25s; font-size: 12px; }
.w-top, .w-bottom { position: absolute; left: 12px; right: 12px; display: flex; gap: 8px; pointer-events: none; z-index: 2; }
.w-top { top: 10px; justify-content: space-between; align-items: flex-start; }
.w-bottom { bottom: 14px; flex-direction: column; align-items: center; }
.w-pill { pointer-events: auto; margin: 0; padding: 7px 12px; border-radius: 16px; font-size: 14px; line-height: 1.3;
  background: rgba(17, 19, 21, .66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); max-width: 75%; }
.w-btn { min-height: 36px; flex: none; }
.w-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.w-gift { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.shop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shop button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; min-height: 92px;
  background: var(--raised); border: 1px solid var(--line); border-radius: 14px; color: var(--text); font-size: 13px; }
.shop button span { font-size: 28px; }
.shop button:disabled { opacity: .45; }
.w-seed { pointer-events: auto; border-radius: 999px; padding: 12px 22px; box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; max-height: 72%; overflow-y: auto; padding: 18px 16px calc(16px + var(--safe-bottom));
  background: var(--panel); border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .4); }
.sheet h3 { margin: 0 36px 8px 0; font-size: 20px; text-transform: none; letter-spacing: 0; color: var(--text); }
.sheet h4 { margin: 14px 0 6px; }
.sheet blockquote { margin: 6px 0 10px; padding-left: 12px; border-left: 3px solid var(--accent); font-style: italic; }
.sheet-x { position: absolute; top: 10px; right: 10px; }
.sheet textarea { width: 100%; }
.sheet .book { display: flex; align-items: center; gap: 10px; }
.sheet .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.sheet .bar i { display: block; height: 100%; background: var(--accent); }
.brotes li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line, rgba(127,127,127,.2)); }
.brotes li small { grid-column: 1; }
.brotes li button { grid-column: 2; grid-row: 1 / span 2; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.chip { min-height: 34px; padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.w-list li button { width: 100%; justify-content: flex-start; margin-bottom: 6px; text-align: left; }
.w-flat { position: absolute; inset: 60px 16px; display: flex; flex-direction: column; gap: 8px; }
#followups-box { margin-bottom: 18px; }

/* lo íntimo */
#us-intimo .fant p { margin: 0 0 8px; }
#us-intimo .seg.small button { min-height: 34px; padding: 4px 10px; font-size: 14px; }
#us-intimo .date-now { border: 1px solid var(--accent); }
#us-intimo form.row { gap: 8px; margin-bottom: 10px; }
#us-intimo form.row input, #date-idea { flex: 1; min-width: 0; width: 100%; margin: 8px 0; }
