/* SutlacRC phone page — warm "sütlaç" palette */

:root {
  --cream: #fff7ed;
  --cream-2: #ffedd5;
  --peach: #fdba74;
  --caramel: #d97706;
  --terracotta: #c2410c;
  --terracotta-dark: #9a3412;
  --brown: #431407;
  --brown-2: #7c2d12;
  --night: #170a04;
  --green: #15803d;
  --red: #dc2626;

  --bg: var(--cream);
  --bg-glow: #fed7aa;
  --surface: #ffffff;
  --surface-border: rgba(194, 65, 12, 0.14);
  --text: var(--brown);
  --text-soft: #8a4b2b;
  --shadow: 0 10px 30px rgba(124, 45, 18, 0.14), 0 2px 6px rgba(124, 45, 18, 0.08);

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);

  --ease: cubic-bezier(0.22, 0.8, 0.26, 1);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d0d06;
    --bg-glow: #5a1d0a;
    --surface: #2b140a;
    --surface-border: rgba(253, 186, 116, 0.16);
    --text: var(--cream);
    --text-soft: #e7b996;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  font-size: 17px;
  line-height: 1.4;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body[data-screen="call"] { background: var(--night); }

h1, h2, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.noscript { position: fixed; inset: auto 0 0 0; padding: 16px; text-align: center; background: var(--brown); color: var(--cream); z-index: 99; }

:focus-visible { outline: 3px solid var(--caramel); outline-offset: 3px; }

/* ───────────── Screens ───────────── */

.screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(10px) scale(0.99);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
.screen.is-active {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s;
}

.screen--boot, .screen--login, .screen--home {
  background:
    radial-gradient(120% 60% at 50% -10%, var(--bg-glow) 0%, transparent 70%),
    var(--bg);
  overflow-y: auto;
}

/* iOS installed app (status bar black-translucent = white text over the page): in light mode put a dark
   strip under the status bar on the cream screens so the clock and battery stay readable. app.js sets
   html.is-ios on iPhone/iPad only (Android draws its own status bar from theme-color). The call screen
   is dark already. */
@media (prefers-color-scheme: light) {
  .is-ios .screen--boot::before, .is-ios .screen--login::before, .is-ios .screen--home::before {
    content: ""; position: fixed; top: 0; left: 0; right: 0;
    height: var(--sat);
    background: var(--brown-2); z-index: 5; pointer-events: none;
  }
}

.column {
  width: 100%; max-width: 480px; margin: 0 auto; flex: 1;
  display: flex; flex-direction: column;
  padding: calc(var(--sat) + 16px) calc(var(--sar) + 22px) calc(var(--sab) + 22px) calc(var(--sal) + 22px);
}

.screen--boot { align-items: center; justify-content: center; }
.boot-logo { border-radius: 24px; animation: breathe 1.8s ease-in-out infinite; }

/* ───────────── Shared bits ───────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.btn {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 0 24px;
  border-radius: 18px; font-weight: 700; font-size: 18px; letter-spacing: 0.01em;
  transition: transform 0.15s var(--ease), box-shadow 0.2s, filter 0.2s, opacity 0.2s;
}
.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #dc5a1c 0%, var(--terracotta) 100%);
  box-shadow: 0 8px 20px rgba(194, 65, 12, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.75; pointer-events: none; }
.btn .spinner { display: none; }
.btn.is-busy .spinner { display: block; }
.btn.is-busy .btn-label { opacity: 0.85; }

.spinner {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
.spinner--small { width: 14px; height: 14px; border-width: 2px; }

.btn-quiet {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px; margin-right: -10px;
  border-radius: 14px; color: var(--text-soft); font-size: 15px; font-weight: 600;
  transition: background 0.2s;
}
.btn-quiet .icon { width: 20px; height: 20px; }
.btn-quiet:active { background: rgba(194, 65, 12, 0.1); }

/* ───────────── Login ───────────── */

.login { justify-content: center; gap: 26px; padding-bottom: calc(var(--sab) + 40px); }
.login-hero { text-align: center; }
.login-logo {
  width: 112px; height: 112px; border-radius: 28px;
  box-shadow: 0 14px 34px rgba(194, 65, 12, 0.35);
  animation: pop-in 0.6s var(--ease) both;
}
.login-hero h1 { margin-top: 20px; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.lead { margin-top: 6px; color: var(--text-soft); font-size: 17px; }

.login-form { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.field-label { font-size: 14px; font-weight: 700; color: var(--text-soft); letter-spacing: 0.02em; }
.field { position: relative; }
.field-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--caramel); width: 22px; height: 22px; pointer-events: none; }
.field input {
  width: 100%; height: 58px; padding: 0 16px 0 48px;
  border-radius: 16px; border: 2px solid var(--surface-border);
  background: var(--bg); color: var(--text); font-size: 18px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: var(--text-soft); opacity: 0.6; }
.field input:focus { outline: none; border-color: var(--caramel); box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.18); }
.login-form.has-error .field input { border-color: var(--terracotta); }
.login-form.shake { animation: shake 0.4s; }
.form-error { color: var(--terracotta); font-weight: 600; font-size: 15px; }
@media (prefers-color-scheme: dark) { .form-error { color: var(--peach); } }
.fineprint { text-align: center; color: var(--text-soft); font-size: 14px; opacity: 0.85; }

/* ───────────── Home ───────────── */

.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand img { border-radius: 9px; }

.net-banner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 10px; padding: 10px 14px; border-radius: 14px;
  background: rgba(217, 119, 6, 0.16); color: var(--text);
  font-size: 15px; font-weight: 600;
  animation: slide-down 0.3s var(--ease) both;
}
.net-banner .spinner { color: var(--caramel); }

.hero {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 12px; padding: 12px 0;
}

.avatar { position: relative; width: 168px; height: 168px; margin-bottom: 12px; }
.avatar img {
  position: relative; width: 100%; height: 100%; border-radius: 42px;
  box-shadow: 0 18px 40px rgba(194, 65, 12, 0.3);
  transition: filter 0.5s, opacity 0.5s, transform 0.5s var(--ease);
}
.avatar-ring {
  position: absolute; inset: -10px; border-radius: 52px;
  border: 3px solid transparent; transition: border-color 0.4s;
}
.avatar[data-state="idle"] .avatar-ring { border-color: rgba(21, 128, 61, 0.35); }
.avatar[data-state="waking"] .avatar-ring { border-color: var(--caramel); animation: ring-pulse 1.2s ease-in-out infinite; }
.avatar[data-state="in_call"] .avatar-ring { border-color: var(--terracotta); }
.avatar[data-state="offline"] img,
.avatar[data-state="connecting"] img { filter: grayscale(0.85); opacity: 0.6; transform: scale(0.96); }
.avatar[data-state="waking"] img { animation: wiggle 0.9s ease-in-out infinite; }

.zzz { position: absolute; right: -14px; top: -18px; width: 56px; height: 56px; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.avatar[data-state="idle"] .zzz { opacity: 1; }
.zzz i {
  position: absolute; font-style: normal; font-weight: 800; color: var(--caramel);
  animation: zzz 3s ease-in-out infinite;
}
.zzz i:nth-child(1) { left: 2px; bottom: 2px; font-size: 16px; }
.zzz i:nth-child(2) { left: 16px; bottom: 16px; font-size: 21px; animation-delay: 0.4s; }
.zzz i:nth-child(3) { left: 33px; bottom: 32px; font-size: 27px; animation-delay: 0.8s; }

.hero-title { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.hero-sub { color: var(--text-soft); font-size: 15px; min-height: 21px; }

.chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px 8px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--surface-border);
  box-shadow: 0 2px 8px rgba(124, 45, 18, 0.08);
  font-weight: 700; font-size: 15px;
  transition: background 0.3s, color 0.3s;
}
.chip-dot { width: 10px; height: 10px; border-radius: 50%; background: #a8a29e; flex: none; }
.chip[data-state="idle"] .chip-dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2); }
.chip[data-state="waking"] .chip-dot { background: var(--caramel); animation: blink 0.9s ease-in-out infinite; }
.chip[data-state="in_call"] .chip-dot { background: var(--terracotta); box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.2); }
.chip[data-state="connecting"] .chip-dot { animation: blink 1.2s ease-in-out infinite; }

.notice {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 30px; padding: 14px 8px 14px 18px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--surface-border);
  border-left: 5px solid var(--caramel);
  box-shadow: var(--shadow);
  animation: rise 0.35s var(--ease) both;
}
.notice[data-kind="error"] { border-left-color: var(--terracotta); }
.notice[data-kind="ok"] { border-left-color: #22c55e; }
.notice-body { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.notice-body strong { font-size: 17px; }
.notice-body span { color: var(--text-soft); }
.notice-close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--text-soft); flex: none; margin-top: -6px; }
.notice-close .icon { width: 20px; height: 20px; }

.call-zone { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-bottom: 6px; }

.call-btn {
  position: relative; width: 148px; height: 148px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: #fff; font-weight: 800; font-size: 22px; letter-spacing: 0.01em;
  background: radial-gradient(circle at 35% 25%, #f08a3c 0%, var(--terracotta) 62%, var(--terracotta-dark) 100%);
  box-shadow: 0 18px 36px rgba(194, 65, 12, 0.42), inset 0 2px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.18s var(--ease), filter 0.3s, box-shadow 0.3s;
}
.call-btn .icon { width: 44px; height: 44px; stroke-width: 1.9; }
.call-btn:active { transform: scale(0.94); }
.call-btn[data-state="offline"], .call-btn[data-state="connecting"] {
  filter: grayscale(0.7) brightness(1.02); box-shadow: 0 10px 22px rgba(67, 20, 7, 0.2);
}
.call-btn-pulse {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid var(--terracotta); opacity: 0; pointer-events: none;
}
.call-btn[data-state="idle"] .call-btn-pulse { animation: halo 2.4s ease-out infinite; }
.call-hint { color: var(--text-soft); font-size: 15px; text-align: center; text-wrap: balance; min-height: 21px; }

.toggle { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 6px; cursor: pointer; color: var(--text-soft); font-size: 15px; font-weight: 600; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-track { width: 46px; height: 28px; border-radius: 999px; background: rgba(124, 45, 18, 0.22); position: relative; transition: background 0.25s; flex: none; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); transition: transform 0.25s var(--ease); }
.toggle input:checked + .toggle-track { background: var(--caramel); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(18px); }
.toggle input:focus-visible + .toggle-track { outline: 3px solid var(--caramel); outline-offset: 3px; }

.install-card {
  display: flex; align-items: center; gap: 10px;
  margin-top: 18px; padding: 14px 8px 14px 18px; border-radius: 20px;
  animation: rise 0.35s var(--ease) both;
}
.install-body { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.install-body strong { font-size: 16px; }
.install-body span { color: var(--text-soft); }
.install-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.install-btn { width: auto; min-height: 44px; padding: 0 18px; font-size: 16px; border-radius: 14px; }
.install-actions .notice-close { margin-top: 0; }

/* ───────────── Call ───────────── */

.screen--call { background: var(--night); color: var(--cream); overflow: hidden; user-select: none; -webkit-user-select: none; }

/* a blurred, zoomed copy of the picture fills the bars around the 4:3 video on a tall phone */
.remote-backdrop {
  position: absolute; left: -8%; top: -8%; width: 116%; height: 116%;
  object-fit: cover; filter: blur(32px) brightness(0.45) saturate(1.2);
  pointer-events: none;
}
.screen--call[data-fit="cover"] .remote-backdrop { display: none; }
.remote-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: transparent;
}
.screen--call[data-fit="cover"] .remote-video { object-fit: cover; }

.call-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 0 28px 120px; text-align: center;
  background: radial-gradient(90% 60% at 50% 38%, #6b2409 0%, #2a1008 55%, var(--night) 100%);
  transition: opacity 0.5s var(--ease), visibility 0s linear 0.5s;
}
.screen--call[data-phase="live"] .call-overlay { opacity: 0; visibility: hidden; pointer-events: none; }
.call-overlay h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 26px; }
.call-overlay p { color: #f5cba7; font-size: 16px; min-height: 22px; text-wrap: balance; }

.overlay-avatar { position: relative; width: 120px; height: 120px; }
.overlay-avatar img { position: relative; width: 100%; height: 100%; border-radius: 32px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); animation: breathe 2s ease-in-out infinite; }
.ripple { position: absolute; inset: -6px; border-radius: 38px; border: 2px solid var(--peach); opacity: 0; animation: ripple 2.4s ease-out infinite; }
.ripple--2 { animation-delay: 1.2s; }

.steps { list-style: none; display: flex; gap: 8px; margin: 22px 0 0; padding: 0; }
.steps li {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 0.03em;
  color: rgba(255, 247, 237, 0.45); background: rgba(255, 247, 237, 0.08);
  transition: background 0.4s, color 0.4s;
}
.screen--call[data-phase="permission"] .steps li[data-step="calling"],
.screen--call[data-phase="calling"] .steps li[data-step="calling"],
.screen--call[data-phase="ringing"] .steps li[data-step="ringing"],
.screen--call[data-phase="connecting"] .steps li[data-step="connecting"] { background: var(--caramel); color: #fff; }
.screen--call[data-phase="ringing"] .steps li[data-step="calling"],
.screen--call[data-phase="connecting"] .steps li[data-step="calling"],
.screen--call[data-phase="connecting"] .steps li[data-step="ringing"] { background: rgba(217, 119, 6, 0.35); color: var(--cream); }

.call-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: calc(var(--sat) + 10px) calc(var(--sar) + 14px) 28px calc(var(--sal) + 16px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
}
.call-top > * { pointer-events: auto; }
.quality { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: rgba(255, 247, 237, 0.85); min-width: 0; }
.quality span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 14px; flex: none; }
.bars i { width: 4px; border-radius: 2px; background: rgba(255, 247, 237, 0.3); transition: background 0.3s; }
.bars i:nth-child(1) { height: 6px; } .bars i:nth-child(2) { height: 10px; } .bars i:nth-child(3) { height: 14px; }
.quality[data-q="good"] .bars i { background: #4ade80; }
.quality[data-q="fair"] .bars i:nth-child(-n+2) { background: #fbbf24; }
.quality[data-q="poor"] .bars i:nth-child(1) { background: #f87171; }
.timer {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; letter-spacing: 0.04em;
  padding: 6px 14px; border-radius: 999px; background: rgba(23, 10, 4, 0.5);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: opacity 0.3s;
}
.screen--call:not([data-phase="live"]) .timer { opacity: 0; }
.top-btn {
  justify-self: end; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(23, 10, 4, 0.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: opacity 0.3s, background 0.2s;
}
.top-btn .icon { width: 20px; height: 20px; }
.top-btn[aria-pressed="true"] { background: var(--cream); color: var(--brown); }
.screen--call:not([data-phase="live"]) .top-btn { opacity: 0; pointer-events: none; }

.weak-pill, .sound-btn, .toast {
  position: absolute; left: 50%; z-index: 5; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; white-space: nowrap; max-width: calc(100% - 32px);
  border-radius: 999px; font-weight: 700; font-size: 15px;
  animation: rise-center 0.3s var(--ease) both;
}
.weak-pill { top: calc(var(--sat) + 70px); padding: 10px 16px; background: rgba(217, 119, 6, 0.92); color: #fff; }
.sound-btn { top: 42%; padding: 14px 22px; min-height: 52px; background: var(--cream); color: var(--brown); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.toast { bottom: calc(var(--sab) + 150px); padding: 10px 18px; background: rgba(23, 10, 4, 0.82); color: var(--cream); font-weight: 600; white-space: normal; text-align: center; border-radius: 18px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

.pip {
  position: absolute; left: 0; top: 0; z-index: 3;
  width: clamp(92px, 27vw, 150px); aspect-ratio: 3 / 4;
  border-radius: 18px; overflow: hidden; background: #2a1008;
  border: 2px solid rgba(255, 247, 237, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  touch-action: none; cursor: grab;
  transition: transform 0.35s var(--ease), box-shadow 0.2s, opacity 0.3s;
  will-change: transform;
}
.pip.is-dragging { transition: box-shadow 0.2s; cursor: grabbing; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7); }
.pip.no-media { opacity: 0; pointer-events: none; }
.pip video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pip[data-mirror="true"] video { transform: scaleX(-1); }
.pip-off { position: absolute; inset: 0; display: none; place-items: center; background: #2a1008; color: rgba(255, 247, 237, 0.7); }
.pip-off .icon { width: 30px; height: 30px; }
.pip[data-off="true"] .pip-off { display: grid; }
.pip-muted { position: absolute; left: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; }
.pip-muted .icon { width: 15px; height: 15px; }

.call-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; justify-content: center; align-items: flex-start; gap: clamp(10px, 4.5vw, 28px);
  padding: 44px calc(var(--sar) + 12px) calc(var(--sab) + 18px) calc(var(--sal) + 12px);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72) 20%, transparent);
}
.ctl-wrap { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 72px; }
.ctl {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 247, 237, 0.18); color: var(--cream);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform 0.15s var(--ease), background 0.2s, color 0.2s, opacity 0.2s;
}
.ctl .icon { width: 27px; height: 27px; }
.ctl:active { transform: scale(0.92); }
.ctl .icon--on { display: none; }
.ctl[aria-pressed="true"] { background: var(--cream); color: var(--brown); }
.ctl[aria-pressed="true"] .icon--on { display: block; }
.ctl[aria-pressed="true"] .icon--off { display: none; }
.ctl[disabled] { opacity: 0.35; pointer-events: none; }
.ctl--hang { background: var(--red); color: #fff; box-shadow: 0 8px 24px rgba(220, 38, 38, 0.45); }
.ctl--hang .icon { width: 30px; height: 30px; }
.ctl-label { font-size: 12.5px; font-weight: 600; color: rgba(255, 247, 237, 0.85); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); white-space: nowrap; }

/* ───────────── Larger screens ───────────── */

@media (min-width: 700px) and (min-height: 800px) {
  body { font-size: 18px; }
  .column { max-width: 520px; padding-top: calc(var(--sat) + 28px); padding-bottom: calc(var(--sab) + 56px); }
  .avatar { width: 208px; height: 208px; }
  .avatar img { border-radius: 52px; }
  .avatar-ring { border-radius: 62px; }
  .hero-title { font-size: 32px; }
  .call-btn { width: 168px; height: 168px; font-size: 24px; }
  .ctl { width: 72px; height: 72px; }
  .ctl-wrap { width: 84px; }
  .ctl-label { font-size: 14px; }
  .call-controls { padding-bottom: calc(var(--sab) + 32px); }
  .pip { width: 170px; }
}

@media (max-height: 640px) {
  .avatar { width: 112px; height: 112px; margin-bottom: 4px; }
  .avatar img { border-radius: 30px; }
  .avatar-ring { border-radius: 40px; }
  .hero-title { font-size: 22px; }
  .call-btn { width: 116px; height: 116px; font-size: 18px; }
  .call-btn .icon { width: 34px; height: 34px; }
  .login { gap: 16px; }
  .login-logo { width: 80px; height: 80px; border-radius: 20px; }
  .call-overlay { padding-bottom: 100px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .home { max-width: 760px; flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 24px; }
  .topbar, .net-banner, .notice, .install-card { flex-basis: 100%; }
  .hero { flex: 1 1 0; }
  .call-zone { flex: 1 1 0; }
  .call-controls { padding-top: 20px; }
  .ctl-label { display: none; }
  .pip { aspect-ratio: 4 / 3; width: 150px; }
}

/* ───────────── Motion ───────────── */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.8) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rise-center { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes ring-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.5; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
@keyframes halo { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes zzz { 0%, 100% { transform: translateY(0); opacity: 0.35; } 50% { transform: translateY(-5px); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: 0.001ms !important; transition-delay: 0s !important;
  }
  .spinner { animation: spin 1.6s linear infinite !important; }
  .call-btn-pulse, .ripple { display: none; }
  .zzz i { opacity: 0.9; }
}
