/* ============================================================
   Silueta · layout.css
   Marco, barra superior, área de scroll, dock y botón flotante
   ============================================================ */

.phone{
  position:relative;
  width:min(100%, 412px);
  height:min(880px, calc(100dvh - 56px));
  background:var(--bg);
  border-radius:46px;
  box-shadow:var(--phone-shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:background .3s ease;
}

@media (max-width:720px){
  body{ padding:0; display:block; background:var(--bg); }
  .phone{ width:100%; height:100dvh; border-radius:0; box-shadow:none; }
}

/* Barra superior */
.topbar{
  position:relative; z-index:5;
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 20px 12px;
  background:color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter:blur(14px);
}
.brand{ display:flex; align-items:center; gap:10px; }
.mark{
  width:34px; height:34px; border-radius:12px;
  display:grid; place-items:center;
  background:var(--btn-grad);
  color:#fff; font-weight:600; font-size:16px; letter-spacing:-.03em;
  box-shadow:0 6px 16px rgba(124,92,214,.35);
}
.wordmark{ font-size:19px; font-weight:600; letter-spacing:-.02em; }
.wordmark i{ font-style:normal; color:var(--primary-2); }
[data-theme="dark"] .wordmark i{ color:var(--primary); }

.tools{ display:flex; align-items:center; gap:8px; }
.iconbtn{
  width:38px; height:38px; border-radius:13px;
  display:grid; place-items:center;
  background:var(--surface); border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
  transition:transform .18s ease;
}
.iconbtn:active{ transform:scale(.94); }
.iconbtn svg{
  width:19px; height:19px; stroke:var(--ink); stroke-width:1.7;
  fill:none; stroke-linecap:round; stroke-linejoin:round;
}
.avatar{
  width:38px; height:38px; border-radius:50%;
  background:linear-gradient(145deg,#CDB8F6,#8E74D6);
  display:grid; place-items:center; color:#fff;
  box-shadow:0 6px 16px rgba(124,92,214,.3);
}
.avatar svg{ width:20px; height:20px; fill:none; stroke:#fff; stroke-width:1.8; stroke-linecap:round; }

/* Contenido desplazable */
.scroll{
  flex:1;
  overflow-y:auto;
  overflow-x:hidden;
  padding:6px 20px 138px;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
}

/* Degradado inferior para que el contenido se funda con el dock */
.phone::after{
  content:"";
  position:absolute; left:0; right:0; bottom:0; height:118px;
  pointer-events:none; z-index:10;
  background:linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--bg) 55%, transparent) 40%, var(--bg) 78%);
}

/* Dock inferior */
.dock{
  position:absolute; z-index:20;
  left:16px; right:16px; bottom:16px; height:68px;
  display:grid; grid-template-columns:repeat(4,1fr); align-items:center;
  background:color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter:blur(18px);
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:0 6px;
}
.dockbtn{
  height:56px; border-radius:18px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  color:var(--muted);
  transition:color .18s ease, background .18s ease;
}
.dockbtn svg{
  width:21px; height:21px; stroke:currentColor; stroke-width:1.75;
  fill:none; stroke-linecap:round; stroke-linejoin:round;
}
.dockbtn b{ font-size:9.5px; font-weight:500; letter-spacing:.01em; }
.dockbtn.active{ color:var(--primary-2); background:var(--primary-soft); }
[data-theme="dark"] .dockbtn.active{ color:var(--primary); }

/* Botón flotante */
.fab{
  position:absolute; right:22px; bottom:98px; z-index:21;
  width:56px; height:56px; border-radius:50%;
  background:var(--btn-grad); color:#fff;
  display:grid; place-items:center;
  box-shadow:0 14px 28px rgba(124,92,214,.45);
  transition:transform .18s ease;
}
.fab:active{ transform:scale(.93) rotate(90deg); }
.fab svg{ width:24px; height:24px; stroke:#fff; stroke-width:2; fill:none; stroke-linecap:round; }
