/* ============ windows — shared chrome ============ */
.window {
  width: var(--w, 520px);
  border-radius: var(--win-r);
  background: linear-gradient(rgba(255,255,255,.045), rgba(255,255,255,.01)), rgba(24, 28, 39, .66);
  -webkit-backdrop-filter: blur(34px) saturate(1.7);
  backdrop-filter: blur(34px) saturate(1.7);
  border: 1px solid rgba(255,255,255,.11);
  box-shadow: 0 34px 80px -20px rgba(2, 6, 16, .72), inset 0 1px 0 rgba(255,255,255,.09);
  overflow: hidden;
}
@supports not (backdrop-filter: blur(1px)) { .window { background: rgba(24, 28, 39, .97); } }
.window.z-top { box-shadow: 0 44px 100px -20px rgba(2, 6, 16, .85), inset 0 1px 0 rgba(255,255,255,.09); }

.win-bar {
  position: relative;
  display: flex; align-items: center;
  height: 40px; padding: 0 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.028);
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}
.win-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 13px; font-weight: 600; color: var(--frost-70); white-space: nowrap;
  max-width: 62%; overflow: hidden; text-overflow: ellipsis;
}
.tl { display: flex; gap: 8px; }
.tl-b { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.16); }
.tl-close { background: #ff5f57; }
.tl-min { background: #febc2e; }
.tl-max { background: #28c840; }
.tl-close:hover { filter: brightness(1.15); }

.win-head-note {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: 12.5px; color: var(--frost-70);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.win-head-note svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
.win-foot-note {
  padding: 9px 16px; font-size: 11.5px; color: var(--frost-35);
  border-top: 1px solid rgba(255,255,255,.05);
}

@keyframes headShake { 0%,100% { transform: translateX(0);} 25% { transform: translateX(-4px);} 65% { transform: translateX(3px);} }
.shaking { animation: headShake .3s ease; }

/* ============ FaceTime window ============ */
.win-facetime { position: relative; background: #0b0d13; padding: 0; }
.fw-drag {
  position: absolute; top: 0; left: 0; right: 0; height: 34px; z-index: 6;
  background: linear-gradient(rgba(4, 6, 12, .45), transparent);
  border: 0;
}
.fw-lights { position: absolute; top: 13px; left: 13px; z-index: 7; }
.fw-resize {
  position: absolute; right: 0; bottom: 0; z-index: 9;
  width: 20px; height: 20px;
  cursor: nwse-resize; touch-action: none;
}
.fw-title {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%); z-index: 7;
  font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.82);
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.meet-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 6px; background: #0b0d13;
}
.tile {
  position: relative; aspect-ratio: 16 / 10.6; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: box-shadow .25s ease;
}
.tile::after {  /* lens vignette */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 -34px 44px -22px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.045);
}
.t-maya {
  background:
    radial-gradient(120% 90% at 28% 18%, rgba(255, 190, 120, .34), transparent 52%),
    radial-gradient(90% 90% at 78% 88%, rgba(90, 60, 40, .5), transparent 60%),
    linear-gradient(165deg, #43364a 8%, #2a2233 55%, #1b1622);
}
.t-sam {
  background:
    radial-gradient(110% 80% at 70% 14%, rgba(140, 220, 210, .22), transparent 55%),
    radial-gradient(100% 100% at 20% 90%, rgba(24, 60, 58, .6), transparent 65%),
    linear-gradient(150deg, #29403e 6%, #1b2b2c 55%, #121b1e);
}
.t-diego {
  background:
    radial-gradient(120% 90% at 30% 16%, rgba(255, 170, 90, .3), transparent 55%),
    radial-gradient(90% 90% at 82% 86%, rgba(70, 42, 22, .55), transparent 62%),
    linear-gradient(160deg, #4a3524 8%, #2e2118 58%, #1c1510);
}
.tile-you {
  background:
    radial-gradient(110% 90% at 60% 12%, rgba(150, 130, 240, .22), transparent 55%),
    linear-gradient(160deg, #322c48 8%, #211d33 55%, #151226);
}
.tile.speaking { box-shadow: 0 0 0 2.5px rgba(255,255,255,.85), 0 0 22px -2px rgba(255,255,255,.35); }
.avatar {
  position: relative; z-index: 1;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; letter-spacing: .02em;
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 0 34px 6px rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.av-you { font-size: 14px; }
.tile-name {
  position: absolute; left: 9px; bottom: 9px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500; color: rgba(255,255,255,.88);
  padding: 3px 9px; border-radius: 999px; background: rgba(6, 9, 15, .5);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.mute-ic { width: 11px; height: 11px; color: #ff7b72; position: relative; }
.mute-ic::after { content: ""; }
.tile-name .mute-ic { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.ft-pill {
  position: absolute; z-index: 8; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 999px;
  background: rgba(28, 32, 43, .55);
  -webkit-backdrop-filter: blur(26px) saturate(1.7); backdrop-filter: blur(26px) saturate(1.7);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.6);
}
.meet-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.9);
}
.meet-btn svg { width: 16px; height: 16px; }
.meet-btn:hover { background: rgba(255,255,255,.2); }
.meet-leave { background: #ff453a; }
.meet-leave svg { width: 18px; height: 18px; fill: #fff; stroke: none; }
.meet-leave:hover { background: #ff5f55; }
.meet-wave { display: flex; align-items: center; gap: 3px; height: 22px; padding: 0 4px; }
.meet-wave i { width: 3px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.3); transition: background .3s; }
.meet-wave.on i { background: #4cd964; animation: wave 1s ease-in-out infinite; }
.meet-wave.on i:nth-child(2) { animation-delay: .12s; } .meet-wave.on i:nth-child(3) { animation-delay: .24s; }
.meet-wave.on i:nth-child(4) { animation-delay: .36s; } .meet-wave.on i:nth-child(5) { animation-delay: .48s; }
@keyframes wave { 50% { height: 18px; } }
.meet-rec {
  position: absolute; top: 10px; right: 13px; z-index: 7;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(10, 12, 18, .55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #ff8a80;
  font-variant-numeric: tabular-nums;
}
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: recPulse 1.4s ease-in-out infinite; }

