/* GlassOS · el sistema
   Se diseña a 390 pt de ancho. En un teléfono ocupa toda la pantalla; en una
   pantalla grande vive dentro de un marco de cristal escalado con --k.
   La tinta (clara u oscura) la decide data-tone según el mundo que hay detrás. */

.os {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000;
  overflow: hidden;
  font-family: var(--sans);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  animation: fade .5s var(--ease) both;
}

.os.is-leaving { opacity: 0; transition: opacity .5s var(--ease); }

.os-world { position: absolute; inset: 0; overflow: hidden; }
.os-world canvas,
.os-world video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.os-world video { opacity: 0; transition: opacity .8s var(--ease), transform .7s var(--ease); }
.os-world.is-live video { opacity: 1; }

.os-device {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 390px;
  height: 844px;
  transform: translate(-50%, -50%) scale(var(--k, 1));
}

.os-screen {
  --fg: #fff;
  --fg2: rgba(255, 255, 255, .68);
  --fg3: rgba(255, 255, 255, .42);
  --line: rgba(255, 255, 255, .14);
  --g1: rgba(255, 255, 255, .22);
  --g2: rgba(255, 255, 255, .07);
  --gb: rgba(255, 255, 255, .42);
  --sheet: rgba(16, 14, 38, .36);
  --shadow: rgba(0, 0, 0, .38);
  --acc: #fff;
  --acc-ink: #10131f;
  --frost: 22px;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: var(--fg);
  font-size: 15px;
  line-height: 1.35;
  transition: color .6s var(--ease);
}

.os-screen[data-tone="light"] {
  --fg: #0c1220;
  --fg2: rgba(12, 18, 32, .68);
  --fg3: rgba(12, 18, 32, .44);
  --line: rgba(12, 18, 32, .12);
  --g1: rgba(255, 255, 255, .56);
  --g2: rgba(255, 255, 255, .22);
  --gb: rgba(255, 255, 255, .92);
  --sheet: rgba(255, 255, 255, .36);
  --shadow: rgba(30, 50, 90, .26);
  --acc: #0c1220;
  --acc-ink: #fff;
}

.os.is-framed .os-screen { border-radius: 58px; }
.os.is-framed .os-device::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 66px;
  padding: 9px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .18) 30%, rgba(255, 255, 255, .06) 60%, rgba(255, 255, 255, .5));
  -webkit-backdrop-filter: blur(10px) brightness(1.15) saturate(160%);
  backdrop-filter: blur(10px) brightness(1.15) saturate(160%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6);
  pointer-events: none;
}
.os.is-framed .os-device::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 66px;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .3);
  pointer-events: none;
}

/* ───────── materiales ───────── */

.g, .g0 {
  position: relative;
  background: linear-gradient(135deg, var(--g1), var(--g2) 60%, var(--g1) 150%);
  box-shadow: inset 0 1px 0 var(--gb), inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 -10px 16px -14px rgba(255, 255, 255, .5), 0 12px 30px -16px var(--shadow);
  transition: background .6s var(--ease), box-shadow .6s var(--ease);
}
.g { -webkit-backdrop-filter: blur(var(--frost)) saturate(185%); backdrop-filter: blur(var(--frost)) saturate(185%); }

.os svg.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.os button { color: inherit; font: inherit; touch-action: manipulation; }
.os input, .os textarea { font: inherit; color: inherit; background: none; border: 0; outline: 0; user-select: text; -webkit-user-select: text; }
.os ::placeholder { color: var(--fg3); }
.serif { font-family: var(--serif); font-weight: 300; letter-spacing: -.02em; }

.press { transition: transform .5s var(--spring), filter .3s; }
.press:active { transform: scale(.9, .86); transition-duration: .12s; filter: brightness(1.2); }

/* ───────── barra de estado ───────── */

.os-bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
  height: calc(52px + var(--st));
  padding: var(--st) 18px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  transition: opacity .4s;
}
.os-back { justify-self: start; display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 12px 0 6px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.os-back svg.ic { width: 16px; height: 16px; stroke-width: 2.2; }
.os-clock { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.os-sys { justify-self: end; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px; }
.os-sys svg.ic { width: 17px; height: 17px; stroke-width: 2; }
.sig { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.sig i { width: 3px; border-radius: 1px; background: currentColor; }
.sig i:nth-child(1) { height: 4px; } .sig i:nth-child(2) { height: 6px; } .sig i:nth-child(3) { height: 8.5px; } .sig i:nth-child(4) { height: 11px; opacity: .35; }
.bat { position: relative; width: 25px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1.2px currentColor; opacity: .95; }
.bat::before { content: ""; position: absolute; inset: 2.2px; right: 6px; border-radius: 2px; background: currentColor; }
.bat::after { content: ""; position: absolute; right: -3px; top: 3.5px; width: 2px; height: 5px; border-radius: 0 2px 2px 0; background: currentColor; opacity: .6; }
.is-airplane .sig, .is-nowifi .os-sys .wifi { opacity: .25; }

/* ───────── arranque ───────── */

.os-boot { position: absolute; inset: 0; z-index: 60; background: #000; color: #fff; display: grid; place-items: center; }
.os-boot__in { display: grid; justify-items: center; gap: 26px; transform: translateY(-3%); }
.boot-drop { position: relative; width: 74px; height: 74px; }
.boot-drop b {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .22) 26%, rgba(255, 255, 255, .03) 56%, rgba(255, 255, 255, .2) 82%, rgba(255, 255, 255, .5));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset -8px -10px 18px -8px rgba(255, 255, 255, .6), 0 0 40px rgba(255, 255, 255, .12);
  animation: boot-fall 1.25s cubic-bezier(.5, 0, .9, .5) both, boot-wobble 1.5s 1.25s var(--ease) both;
}
.boot-drop i { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7); opacity: 0; animation: boot-ring 1.8s 1.3s var(--ease) both; }
.boot-drop i + i { animation-delay: 1.6s; }
.boot-name { font: 300 38px/1 var(--serif); letter-spacing: -.02em; animation: boot-focus 1.5s 1.5s var(--ease) both; }
.boot-line { width: 120px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .16); overflow: hidden; animation: fade .6s 1.9s both; }
.boot-line u { display: block; height: 100%; background: #fff; border-radius: 2px; transform-origin: left; animation: boot-fill 1.7s 2s cubic-bezier(.6, 0, .2, 1) both; }
.boot-ver { position: absolute; bottom: calc(34px + var(--sb, 0px)); left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .4); animation: fade 1s 2s both; }

@keyframes boot-fall { 0% { transform: translateY(-72vh) scale(.5, .9); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(0) scale(.8, 1.15); } }
@keyframes boot-wobble { 0% { transform: scale(1.4, .62); } 22% { transform: scale(.86, 1.14); } 44% { transform: scale(1.08, .94); } 66% { transform: scale(.97, 1.03); } 100% { transform: scale(1); } }
@keyframes boot-ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(4.6); opacity: 0; } }
@keyframes boot-focus { 0% { opacity: 0; filter: blur(16px); letter-spacing: .42em; } 100% { opacity: 1; filter: blur(0); letter-spacing: -.02em; } }
@keyframes boot-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ───────── bloqueo ───────── */

.os-lock { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; padding: calc(74px + var(--st)) 16px calc(22px + var(--sb)); will-change: transform, opacity; }
.lock-date { font-size: 17px; font-weight: 500; color: var(--fg2); }
.lock-time { margin-top: 2px; font: 300 112px/1 var(--serif); letter-spacing: -.045em; font-variant-numeric: tabular-nums; text-shadow: 0 2px 30px rgba(0, 0, 0, .12); }
.lock-notes { width: 100%; margin-top: auto; display: grid; gap: 10px; }
.note { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; width: 100%; padding: 13px 14px; border-radius: 24px; text-align: left; }
.note__ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; }
.note__ic svg.ic { width: 21px; height: 21px; }
.note b { display: block; font-size: 14px; font-weight: 600; }
.note span { display: block; font-size: 13.5px; color: var(--fg2); }
.note small { float: right; font-size: 12px; font-weight: 400; color: var(--fg3); }
.lock-foot { width: 100%; margin-top: 22px; display: flex; justify-content: space-between; align-items: center; padding: 0 22px; }
.round { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; }
.round.is-on { background: var(--acc); color: var(--acc-ink); }
.lock-hint { min-height: 44px; padding: 0 10px; font-size: 13px; font-weight: 500; color: var(--fg2); }
.lock-hint span { display: block; animation: hint 2.6s ease-in-out infinite; }
@keyframes hint { 0%, 100% { transform: translateY(0); opacity: .55; } 50% { transform: translateY(-6px); opacity: 1; } }
.os-torch { position: absolute; inset: 0; z-index: 19; pointer-events: none; opacity: 0; background: radial-gradient(90% 60% at 50% 0%, rgba(255, 250, 235, .85), rgba(255, 250, 235, 0) 70%); transition: opacity .5s var(--ease); }
.is-torch .os-torch { opacity: 1; }

/* ───────── inicio ───────── */

.os-home { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(62px + var(--st)) 18px calc(30px + var(--sb)); transition: transform .65s var(--ease), opacity .45s var(--ease), filter .5s var(--ease); }
.os-home.is-behind { transform: scale(.9); opacity: 0; filter: blur(10px); pointer-events: none; }
.os-home.is-locked { transform: scale(1.12); opacity: 0; filter: blur(12px); pointer-events: none; }
.widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.widget { aspect-ratio: 1; padding: 15px 16px; border-radius: 30px; display: flex; flex-direction: column; text-align: left; overflow: hidden; }
.widget__k { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg2); }
.widget__k svg.ic { width: 15px; height: 15px; stroke-width: 2; }
.widget__big { margin-top: auto; font: 300 58px/1 var(--serif); letter-spacing: -.04em; }
.widget__s { margin-top: 4px; font-size: 13px; color: var(--fg2); }
.widget__ev { margin-top: 8px; padding-left: 9px; border-left: 2.5px solid var(--fg); font-size: 12.5px; line-height: 1.3; }
.widget__ev span { display: block; color: var(--fg2); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 0; margin-top: 26px; }
.icon { display: grid; justify-items: center; gap: 7px; font-size: 11.5px; font-weight: 500; }
.icon__g { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 20px; }
.icon__g svg.ic { width: 29px; height: 29px; stroke-width: 1.6; }
.icon__g .serif { font-size: 28px; line-height: 1; }
.icon__g small { display: block; font-size: 8.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fg2); }
.search { align-self: center; margin-top: auto; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px 0 10px; border-radius: 99px; font-size: 13px; font-weight: 500; color: var(--fg2); }
.search svg.ic { width: 15px; height: 15px; stroke-width: 2; }
.dock { margin-top: 16px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 13px 4px; border-radius: 34px; }
.dock .icon > span:last-child { display: none; }
.os-home.is-in .icon, .os-home.is-in .widget, .os-home.is-in .dock, .os-home.is-in .search { animation: pop .8s var(--spring) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }

.os-homebar { position: absolute; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(26px + var(--sb)); display: grid; place-items: start center; padding-top: 12px; cursor: pointer; touch-action: none; }
.os-homebar i { width: 134px; height: 5px; border-radius: 5px; background: var(--fg); opacity: .85; transition: transform .4s var(--spring), opacity .3s; }
.os-homebar:active i { transform: scale(1.12, 1.3); }

/* ───────── apps ───────── */

.os-app { position: absolute; inset: 0; z-index: 10; overflow: hidden; background: var(--sheet); -webkit-backdrop-filter: blur(calc(var(--frost) * 1.5)) saturate(170%); backdrop-filter: blur(calc(var(--frost) * 1.5)) saturate(170%); will-change: transform; transform-origin: 0 0; }
.os-app[hidden], .os-cc[hidden], .os-call[hidden], .os-boot[hidden], .os-lock[hidden] { display: none; }
.os-app.is-clear { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(52px + var(--st)) 0 calc(28px + var(--sb)); }
.view.is-sub { animation: slide .55s var(--ease) both; }
.view.is-out { animation: slide-out .4s var(--ease) both; }
.view.is-under { transform: translateX(-24%); opacity: 0; pointer-events: none; transition: transform .5s var(--ease), opacity .4s; }
.view { transition: transform .5s var(--ease), opacity .4s; }
@keyframes slide { from { transform: translateX(100%); } }
@keyframes slide-out { to { transform: translateX(100%); opacity: 0; } }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 20px; touch-action: pan-y; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.vh { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 12px; }
.vh__t { position: absolute; left: 50%; transform: translateX(-50%); font-size: 16px; font-weight: 600; white-space: nowrap; }
.vh button { display: inline-flex; align-items: center; gap: 2px; min-width: 44px; height: 40px; padding: 0 8px; border-radius: 99px; font-size: 15px; font-weight: 500; }
.vt { padding: 6px 4px 14px; font: 300 40px/1.02 var(--serif); letter-spacing: -.03em; }
.sub { padding: 0 4px; margin: -8px 0 16px; font-size: 14px; color: var(--fg2); }
.cap { margin: 20px 6px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fg3); }

.list { border-radius: 24px; overflow: hidden; }
.row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 9px 14px; text-align: left; font-size: 15.5px; }
.row + .row::before { content: ""; position: absolute; left: 56px; right: 0; top: 0; height: 1px; background: var(--line); }
.row.plain + .row.plain::before { left: 14px; }
.row__ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--g1); box-shadow: inset 0 1px 0 var(--gb); flex: none; }
.row__ic svg.ic { width: 18px; height: 18px; stroke-width: 1.9; }
.row__l { flex: 1; min-width: 0; }
.row__l small { display: block; font-size: 12.5px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__v { color: var(--fg2); font-size: 14.5px; display: inline-flex; align-items: center; gap: 4px; }
.row__v svg.ic { width: 16px; height: 16px; opacity: .6; }

.tog { position: relative; width: 54px; height: 32px; border-radius: 99px; background: var(--g2); box-shadow: inset 0 0 0 1px var(--line), inset 0 2px 5px rgba(0, 0, 0, .12); flex: none; transition: background .4s var(--ease); }
.tog::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 13px; background: radial-gradient(circle at 34% 26%, #fff, rgba(255, 255, 255, .82) 60%, rgba(255, 255, 255, .95)); box-shadow: 0 3px 8px rgba(0, 0, 0, .28), inset 0 -3px 5px -2px rgba(0, 0, 0, .12); transition: transform .55s var(--spring), width .3s var(--ease); }
.tog.is-on { background: var(--acc); }
.tog.is-on::after { transform: translateX(22px); background: radial-gradient(circle at 34% 26%, #fff, rgba(255, 255, 255, .9)); }
.os-screen[data-tone="light"] .tog.is-on::after, .has-tint .tog.is-on::after { box-shadow: 0 3px 8px rgba(0, 0, 0, .3); }
.tog:active::after { width: 32px; }
.tog.is-on:active::after { transform: translateX(16px); }

.sl { position: relative; height: 34px; flex: 1; touch-action: none; cursor: pointer; }
.sl__t { position: absolute; left: 0; right: 0; top: 13px; height: 8px; border-radius: 8px; background: var(--g2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.sl__f { height: 100%; width: calc(var(--v) * 100%); background: var(--acc); border-radius: 8px; opacity: .9; }
.sl__k { position: absolute; top: 3px; left: calc(var(--v) * (100% - 28px)); width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 34% 26%, #fff, rgba(255, 255, 255, .85)); box-shadow: 0 3px 9px rgba(0, 0, 0, .3); transition: transform .4s var(--spring); }
.sl:active .sl__k { transform: scale(1.25, 1.1); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chipx { height: 38px; padding: 0 14px; border-radius: 99px; font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; color: var(--fg2); box-shadow: inset 0 0 0 1px var(--line); }
.chipx i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.chipx.is-on { color: var(--acc-ink); background: var(--acc); box-shadow: none; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 99px; margin: 0 16px 12px; }
.seg button { height: 34px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--fg2); transition: background .4s var(--ease), color .3s; }
.seg button.is-on { color: var(--acc-ink); background: var(--acc); }
.fab { display: grid; place-items: center; border-radius: 50%; }
.empty { margin: 60px 20px; text-align: center; color: var(--fg2); font-size: 14.5px; }

/* teléfono y llamada */
.dial-num { min-height: 62px; margin: 18px 20px 6px; text-align: center; font: 300 44px/1.2 var(--serif); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; }
.dial-num.is-empty { font-size: 18px; font-family: var(--sans); font-weight: 400; color: var(--fg3); padding-top: 18px; letter-spacing: 0; }
.keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 22px; justify-content: center; margin-top: auto; padding-bottom: 6px; }
.key { width: 76px; height: 76px; border-radius: 50%; display: grid; place-content: center; text-align: center; font: 300 32px/1 var(--serif); }
.key small { display: block; margin-top: 1px; font: 600 9px/1 var(--sans); letter-spacing: .16em; color: var(--fg2); min-height: 9px; }
.key--call { background: #2fd27a; color: #06250f; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 12px 24px -10px rgba(20, 160, 80, .7); }
.key--call[disabled] { opacity: .4; }
.key--ghost { background: none; box-shadow: none; }
.os-call { position: absolute; inset: 0; z-index: 25; display: flex; flex-direction: column; align-items: center; padding: calc(96px + var(--st)) 20px calc(60px + var(--sb)); background: var(--sheet); -webkit-backdrop-filter: blur(40px) saturate(170%); backdrop-filter: blur(40px) saturate(170%); animation: rise .6s var(--ease) both; }
@keyframes rise { from { transform: translateY(30px) scale(.96); opacity: 0; } }
.avatar { display: grid; place-items: center; border-radius: 50%; font: 300 22px/1 var(--serif); flex: none; }
.call-name { margin-top: 18px; font: 300 38px/1.05 var(--serif); letter-spacing: -.02em; text-align: center; }
.call-st { margin-top: 8px; color: var(--fg2); font-variant-numeric: tabular-nums; }
.call-grid { margin-top: auto; display: grid; grid-template-columns: repeat(3, 72px); gap: 26px; }
.call-grid button { display: grid; justify-items: center; gap: 8px; font-size: 12px; color: var(--fg2); }
.call-end { margin-top: 34px; width: 76px; height: 76px; background: #ff4d5e; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 14px 26px -10px rgba(255, 50, 70, .8); }
.call-end svg.ic { width: 30px; height: 30px; transform: rotate(135deg); }

/* mensajes */
.chatrow .avatar, .crow .avatar { width: 46px; height: 46px; }
.row .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); }
.bubbles { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }
.bub { max-width: 78%; padding: 10px 14px; border-radius: 22px; font-size: 15.5px; line-height: 1.32; user-select: text; -webkit-user-select: text; animation: bub .5s var(--spring) both; transform-origin: 0 100%; }
.bub.me { align-self: flex-end; background: var(--acc); color: var(--acc-ink); border-bottom-right-radius: 7px; transform-origin: 100% 100%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 20px -12px var(--shadow); }
.bub.them { align-self: flex-start; border-bottom-left-radius: 7px; }
.bub.typing { display: inline-flex; gap: 4px; padding: 14px; }
.bub.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--fg2); animation: dots 1.1s ease-in-out infinite; }
.bub.typing i:nth-child(2) { animation-delay: .15s; } .bub.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bub { from { transform: scale(.4); opacity: 0; } }
@keyframes dots { 0%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }
.composer { display: flex; gap: 8px; align-items: center; margin: 0 12px; padding: 6px 6px 6px 16px; border-radius: 99px; }
.composer input { flex: 1; min-width: 0; height: 36px; font-size: 16px; }
.composer .fab { width: 36px; height: 36px; background: var(--acc); color: var(--acc-ink); }
.composer .fab svg.ic { width: 18px; height: 18px; stroke-width: 2.2; }
.composer .fab[disabled] { opacity: .35; }

/* cámara */
.cam { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: calc(60px + var(--st)) 0 calc(36px + var(--sb)); }
.cam-top { display: flex; justify-content: space-between; padding: 0 18px; }
.cam-top .round { width: 44px; height: 44px; }
.cam-grid { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: linear-gradient(to right, transparent 33.2%, rgba(255, 255, 255, .4) 33.2% 33.5%, transparent 33.5% 66.5%, rgba(255, 255, 255, .4) 66.5% 66.8%, transparent 66.8%), linear-gradient(to bottom, transparent 33.2%, rgba(255, 255, 255, .4) 33.2% 33.4%, transparent 33.4% 66.5%, rgba(255, 255, 255, .4) 66.5% 66.7%, transparent 66.7%); }
.cam.has-grid .cam-grid { opacity: 1; }
.cam-focus { position: absolute; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 1px rgba(0, 0, 0, .15); pointer-events: none; animation: focus .9s var(--ease) both; }
@keyframes focus { 0% { transform: scale(1.7); opacity: 0; } 40% { transform: scale(1); opacity: 1; } 80% { opacity: 1; } 100% { transform: scale(.94); opacity: 0; } }
.cam-zoom { align-self: center; display: flex; gap: 4px; padding: 4px; border-radius: 99px; }
.cam-zoom button { width: 38px; height: 38px; border-radius: 50%; font-size: 12px; font-weight: 600; }
.cam-zoom button.is-on { background: var(--acc); color: var(--acc-ink); }
.cam-modes { display: flex; justify-content: center; gap: 22px; margin: 16px 0 18px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg2); }
.cam-modes .is-on { color: var(--fg); }
.cam-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 30px; }
.cam-thumb { width: 50px; height: 50px; border-radius: 15px; background-size: cover; background-position: center; justify-self: start; }
.shutter { width: 80px; height: 80px; border-radius: 50%; padding: 6px; }
.shutter i { display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 34% 26%, #fff, rgba(255, 255, 255, .86)); box-shadow: inset 0 -5px 9px -4px rgba(0, 0, 0, .2); transition: transform .4s var(--spring); }
.shutter:active i { transform: scale(.82); transition-duration: .1s; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: .9; } 100% { opacity: 0; } }

/* fotos */
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 22px; overflow: hidden; }
.pgrid button { aspect-ratio: 1; background-size: cover; background-position: center; }
.pview { position: absolute; inset: 0; z-index: 5; background: #000 center / contain no-repeat; animation: fade .35s both; }
.pview .round { position: absolute; top: calc(58px + var(--st)); right: 16px; width: 44px; height: 44px; color: #fff; }

/* calendario */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 0; padding: 10px 8px 12px; border-radius: 26px; text-align: center; }
.cal b { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--fg3); padding: 6px 0; }
.cal button { position: relative; width: 40px; height: 40px; margin: 0 auto; border-radius: 50%; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.cal button.has::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; opacity: .7; }
.cal button.is-today { font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--fg); }
.cal button.is-on { background: var(--acc); color: var(--acc-ink); box-shadow: none; }
.ev { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 12px 14px; }
.ev + .ev { border-top: 1px solid var(--line); }
.ev time { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 1px; }
.ev span { display: block; font-size: 13px; color: var(--fg2); }

/* reloj */
.face { position: relative; width: 250px; height: 250px; margin: 14px auto 0; border-radius: 50%; }
.face i { position: absolute; left: 50%; top: 50%; width: 2px; height: 9px; margin: -4.5px 0 0 -1px; background: var(--fg2); border-radius: 2px; }
.hand { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; border-radius: 4px; background: var(--fg); }
.hand.h { width: 5px; height: 62px; margin-left: -2.5px; } .hand.m { width: 3.5px; height: 94px; margin-left: -1.75px; } .hand.s { width: 1.5px; height: 104px; margin-left: -.75px; opacity: .6; }
.face::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--fg); }
.bigtime { margin-top: 26px; text-align: center; font: 300 62px/1 var(--serif); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pair { display: flex; justify-content: center; gap: 30px; margin-top: 30px; }
.pair .fab { width: 78px; height: 78px; font-size: 13.5px; font-weight: 600; }
.pair .fab.go { background: var(--acc); color: var(--acc-ink); }
.cities { margin-top: 26px; }

/* tiempo */
.wx { text-align: center; padding-top: 8px; }
.wx__t { font: 300 118px/1 var(--serif); letter-spacing: -.05em; margin-left: .18em; }
.wx__d { font-size: 17px; font-weight: 500; }
.wx__m { margin-top: 2px; color: var(--fg2); }
.hours { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: 26px; padding: 14px 6px; border-radius: 26px; text-align: center; font-size: 13px; }
.hours div { display: grid; justify-items: center; gap: 8px; }
.hours b { font-size: 15.5px; font-weight: 600; }
.hours span { color: var(--fg2); }
.days .row { min-height: 50px; }
.days .rng { position: relative; width: 84px; height: 5px; border-radius: 5px; background: var(--g2); box-shadow: inset 0 0 0 1px var(--line); }
.days .rng i { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: var(--fg); opacity: .85; }
.days .t { width: 30px; text-align: right; font-variant-numeric: tabular-nums; }

/* notas */
.editor { flex: 1; display: flex; flex-direction: column; padding: 4px 20px 0; }
.editor input { font: 300 32px/1.1 var(--serif); letter-spacing: -.02em; padding: 4px 0 10px; width: 100%; }
.editor textarea { flex: 1; width: 100%; resize: none; font-size: 16px; line-height: 1.5; touch-action: pan-y; }

/* calculadora */
.calc-out { margin: auto 26px 14px; text-align: right; font: 300 78px/1 var(--serif); letter-spacing: -.04em; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.calc-out small { display: block; min-height: 20px; font: 400 16px/1.2 var(--sans); letter-spacing: 0; color: var(--fg2); }
.calc { display: grid; grid-template-columns: repeat(4, 78px); gap: 12px; justify-content: center; padding-bottom: 8px; }
.calc button { height: 78px; border-radius: 39px; font: 300 30px/1 var(--serif); }
.calc .op { background: var(--acc); color: var(--acc-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 10px 20px -12px var(--shadow); }
.calc .fn { color: var(--fg2); font-size: 23px; }
.calc .w2 { grid-column: span 2; }

/* contactos */
.field { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 99px; margin-bottom: 14px; }
.field svg.ic { width: 17px; height: 17px; opacity: .6; }
.field input { flex: 1; min-width: 0; font-size: 16px; }
.card { display: grid; justify-items: center; padding: 12px 0 6px; }
.card .avatar { width: 104px; height: 104px; font-size: 42px; }
.card h3 { margin-top: 14px; font: 300 34px/1.05 var(--serif); letter-spacing: -.02em; }
.acts { display: flex; gap: 12px; margin: 18px 0 6px; }
.acts button { width: 78px; padding: 12px 0 10px; border-radius: 22px; display: grid; justify-items: center; gap: 6px; font-size: 12px; font-weight: 500; }

/* música */
.cover { position: relative; width: 250px; height: 250px; margin: 10px auto 0; border-radius: 40px; display: grid; place-items: center; overflow: hidden; }
.cover b { position: absolute; border-radius: 50%; inset: 22%; background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .15) 30%, rgba(255, 255, 255, .02) 60%, rgba(255, 255, 255, .35)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); animation: breathe 5s ease-in-out infinite; animation-play-state: paused; }
.is-playing .cover b { animation-play-state: running; }
@keyframes breathe { 0%, 100% { transform: scale(.82); } 50% { transform: scale(1.12, 1.05); } }
.track { margin-top: 24px; text-align: center; }
.track h3 { font: 300 32px/1.1 var(--serif); letter-spacing: -.02em; }
.track p { margin-top: 4px; color: var(--fg2); }
.prog { display: flex; align-items: center; gap: 10px; margin: 18px 26px 0; font-size: 12px; color: var(--fg2); font-variant-numeric: tabular-nums; }
.ctrl { display: flex; justify-content: center; align-items: center; gap: 26px; margin-top: 14px; }
.ctrl .fab { width: 58px; height: 58px; }
.ctrl .fab.main { width: 78px; height: 78px; background: var(--acc); color: var(--acc-ink); }
.ctrl .fab.main svg.ic { width: 30px; height: 30px; fill: currentColor; }
.queue { margin-top: 22px; }

/* ajustes */
.me { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 26px; margin-bottom: 4px; }
.me .avatar { width: 58px; height: 58px; font-size: 24px; }
.me b { display: block; font-size: 17px; font-weight: 600; }
.me span { font-size: 13.5px; color: var(--fg2); }
.blk { padding: 14px; border-radius: 24px; }
.blk + .blk { margin-top: 10px; }
.blk__h { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 15.5px; }
.blk__h span { color: var(--fg2); font-size: 14px; }
.blk p { margin-top: 8px; font-size: 12.5px; color: var(--fg2); line-height: 1.4; }
.about-top { display: grid; justify-items: center; padding: 10px 0 20px; text-align: center; }
.about-top .boot-drop { width: 64px; height: 64px; }
.about-top .boot-drop b { animation: none; }
.about-top h3 { margin-top: 14px; font: 300 36px/1 var(--serif); }
.about-top p { margin-top: 6px; color: var(--fg2); font-size: 14px; }
.danger { width: 100%; height: 54px; margin-top: 16px; border-radius: 24px; font-weight: 600; color: #ff6b78; }

/* ───────── centro de control ───────── */

.os-cc { position: absolute; inset: 0; z-index: 35; padding: calc(60px + var(--st)) 18px 0; background: rgba(8, 8, 20, .22); -webkit-backdrop-filter: blur(34px) saturate(170%); backdrop-filter: blur(34px) saturate(170%); animation: cc .5s var(--ease) both; }
.os-cc.is-out { animation: cc-out .35s var(--ease) both; }
@keyframes cc { from { opacity: 0; transform: translateY(-26px) scale(1.04); } }
@keyframes cc-out { to { opacity: 0; transform: translateY(-20px); } }
.cc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cc-conn { grid-column: span 2; grid-row: span 2; display: grid; grid-template-columns: 1fr 1fr; place-items: center; gap: 8px; padding: 14px; border-radius: 34px; }
.cc-conn .round { width: 58px; height: 58px; }
.cc-now { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: space-between; padding: 16px; border-radius: 34px; text-align: left; }
.cc-now b { display: block; font-size: 15px; }
.cc-now span { font-size: 13px; color: var(--fg2); }
.cc-v { grid-row: span 2; position: relative; height: 164px; border-radius: 30px; overflow: hidden; touch-action: none; cursor: pointer; }
.cc-v u { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--v) * 100%); background: var(--acc); opacity: .92; border-radius: 0 0 30px 30px; transition: height .12s; }
.cc-v svg.ic { position: absolute; left: 50%; bottom: 16px; margin-left: -12px; color: #fff; mix-blend-mode: difference; }
.cc-t { aspect-ratio: 1; border-radius: 30px; display: grid; place-items: center; }
.cc-t.is-on { background: var(--acc); color: var(--acc-ink); }
.cc-wide { grid-column: span 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; padding: 0 20px; border-radius: 30px; font-weight: 500; }
.cc-wide span { color: var(--fg2); font-size: 14px; }

.os-dim { position: absolute; inset: 0; z-index: 50; background: #000; opacity: 0; pointer-events: none; transition: opacity .2s; }
.os-toast { position: absolute; z-index: 55; left: 50%; top: calc(58px + var(--st)); max-width: 320px; padding: 11px 18px; border-radius: 22px; font-size: 14px; font-weight: 500; text-align: center; transform: translateX(-50%); animation: toast 3.4s var(--ease) both; pointer-events: none; }
@keyframes toast { 0% { transform: translate(-50%, -30px) scale(.9); opacity: 0; } 10%, 86% { transform: translate(-50%, 0) scale(1); opacity: 1; } 100% { transform: translate(-50%, -20px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .os *, .os *::before, .os *::after { animation-duration: .01s !important; animation-delay: 0s !important; transition-duration: .01s !important; }
}
