@font-face {
  font-family: UltraVazir; src: url("/vazirmatn.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
:root {
  color-scheme: dark; --bg: #101922; --panel: #192731; --panel2: #233642;
  --ink: #f2f5f7; --muted: #b3c1cc; --line: #40525f; --blue: #a5d9f6;
  --gold: #efbc66; --font: UltraLocal, Calibri, UltraVazir, system-ui, sans-serif;
  color: var(--ink); background: var(--bg); font: 16px/1.55 var(--font);
}
* { box-sizing: border-box; }
[hidden], .icon-library { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: radial-gradient(ellipse at 45% 1%, #20313f 0%, #131f28 38%, #101922 75%); }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border-radius: 12px; border: 1px solid var(--line); padding: 10px 15px; min-height: 46px; background: var(--panel2); color: var(--ink); font-weight: 650; }
button:disabled, select:disabled { opacity: .45; }
button:active:not(:disabled) { filter: brightness(.89); }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
input:not([type=checkbox]), textarea, select {
  min-height: 48px; width: 100%; border: 1px solid #536775; background: #111e28; color: var(--ink);
  border-radius: 13px; padding: 8px 12px; font-size: max(16px, 1rem);
}
input[type=checkbox] { accent-color: #8cc1de; }
p { margin: 0; }
h1, h2 { margin: 0; line-height: 1.35; }
h1 { font-size: clamp(1.78rem, 6.2vw, 2.35rem); }
h2 { font-size: 1.45rem; }
.panel { max-width: 33rem; margin: auto; padding: max(18px, env(safe-area-inset-top)) max(17px, env(safe-area-inset-right)) calc(110px + env(safe-area-inset-bottom)) max(17px, env(safe-area-inset-left)); }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 0 14px; border-bottom: 1px solid #374853; }
.brand-lockup { display: inline-flex; align-items: center; gap: clamp(5px, 2.4vw, 11px); }
.brand-version { color: var(--muted); font-size: .73rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.brand img { border-radius: 12px; display: block; box-shadow: 0 3px 14px #050c1545; }
.wordmark { font: 750 1.63rem/1 var(--font); letter-spacing: -.055em; }
.wordmark span { color: var(--blue); }
.device-id { color: #afc1cf; font-size: .9rem; text-align: end; max-width: 54%; overflow-wrap: anywhere; }
.device-edit { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.device-edit input { min-width: 0; flex: 1; }
.device-edit button { flex: none; width: auto; }
[data-android-model] { overflow-wrap: anywhere; }
.section-title { margin: clamp(24px,4.3vh,38px) 3px 17px; }
.language-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block: 0 18px; }
.language-row select { width: auto; min-width: 9rem; }
.settings-group + .settings-group { margin-top: 15px; }
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.call-card {
  position: relative; overflow: hidden; border: 1px solid #4b5c66; border-radius: 24px;
  padding: 16px clamp(17px,5vw,28px) 22px; text-align: center;
  background: radial-gradient(ellipse at 52% -12%, #41617bcb, transparent 72%),
    linear-gradient(180deg,#1d2d3ae8 0%,#172630fa 69%),url("/chat-stone.png") center/cover;
  box-shadow: 0 18px 44px #050a102d,inset 0 1px #cde3f122;
}
.device-link { position: relative; display: grid; isolation: isolate; grid-template-columns: minmax(0,1fr) minmax(54px,1.1fr) minmax(0,1fr); align-items: start; padding: 16px 0 11px; direction: ltr; }
.device-link::before { content: ""; z-index: -1; position: absolute; inset: 36% 1% 4%; border: 1px solid #5b77814f; border-radius: 50%; transform: perspective(220px) rotateX(51deg); background: repeating-radial-gradient(ellipse at center,#6392a719 0 1px,transparent 1px 14px),radial-gradient(ellipse,#4b829345,transparent 68%); box-shadow: 0 0 30px #030e1a70,inset 0 0 26px #0f344d7d; }
.link-device { display: grid; justify-items: center; gap: 16px; min-width: 0; color: var(--ink); font-size: .88rem; font-weight: 700; }
.link-device bdi { min-width: 0; max-width: 100%; overflow-wrap: anywhere; text-shadow: 0 2px 6px #09111c; }
.device-render { --angle:-23deg; --opposite:-13deg; --rim:#79b9b8; --shade:#203d48; --glass:#659eb1; --edge:4px; position: relative; z-index: 1; display: block; width: clamp(44px,14vw,67px); height: clamp(74px,23vw,110px); border: 1px solid var(--rim); border-radius: 15px; background: linear-gradient(158deg,#202e3a 15%,#101924 49%,var(--shade)); box-shadow: var(--edge) 3px 0 var(--shade),0 17px 16px #050a13a2,inset 0 0 0 2px #0b1521; transform: perspective(240px) rotateY(var(--angle)) rotateX(10deg); }
.device-render::before { content: ""; position: absolute; inset: 4px; border-radius: 11px; background: linear-gradient(130deg,#d2faf62c,transparent 39%),radial-gradient(ellipse at 38% 72%,var(--glass),var(--shade) 64%,#101a2a); }
.device-render::after { content: ""; position: absolute; top: 8px; left: 50%; width: 5px; height: 5px; border-radius: 8px; background: #0c1522; box-shadow: 0 0 0 1px #b9d1da38; transform: translateX(-50%); }
.device-render i { position: absolute; inset: 53% 24% auto; height: 12%; border-top: 1px solid #c3fff4a8; border-bottom: 1px solid #e8ffff46; transform: skewY(-21deg); }
.iphone-render { --angle:24deg; --opposite:14deg; --rim:#a4a0d4; --shade:#302d4c; --glass:#776eb2; --edge:-4px; }
.iphone-render::after { width: 13px; }
.link-bridge { position: relative; display: grid; align-content: space-evenly; align-self: start; height: clamp(74px,23vw,110px); perspective: 170px; }
.route-bluetooth { --route:#b7aaff; }
.route-wifi { --route:#8ce7bf; }
.route-internet { --route:#8cddff; }
.route-track { position: relative; display: block; height: 12px; opacity: .3; border-top: 1px dashed var(--route); border-radius: 53%; transform: rotateX(35deg); }
.route-track:nth-child(3) { transform: rotateX(-35deg) rotateZ(-6deg); }
.route-track i { position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--route); }
.device-link[data-state=online] .route-internet { opacity: 1; border-top: 2px solid var(--route); box-shadow: 0 -4px 15px #8cdfff54; }
.device-link[data-state=online] .route-internet i { box-shadow: 0 0 11px 3px #8cdfff; animation: link-travel 1.8s linear infinite; }
.device-link[data-state=connecting] .route-internet { opacity: .8; --route:#efbc66; }
.device-link[data-state=connecting] .route-internet i { animation: link-travel 2.8s ease-in-out infinite alternate; }
.device-link[data-state=online] .device-render { animation: linked-device 4s ease-in-out infinite; }
.device-link[data-state=online] .iphone-render { animation-delay: -.6s; }
.device-link[data-state=offline] .device-render { opacity: .69; }
.link-routes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; padding: 0; margin: 4px 0 12px; list-style: none; }
.link-routes li { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; align-content: center; gap: 4px; min-height: 60px; padding: 7px 4px; border: 1px solid #74869663; border-radius: 12px; background: #101c29a8; }
.link-routes li[data-state=online] { background: #19374b; border-color: #91dfff; box-shadow: inset 0 1px #91dfff55; }
.link-routes li[data-state=connecting] { --route:#efbc66; }
.link-routes .ico { width: 16px; height: 16px; flex: 0 0 16px; color: var(--route); }
.link-routes b, .link-routes small { display:block; line-height:1.28; overflow-wrap:anywhere; }
.link-routes b { font-size: .75rem; }
.link-routes small { margin-top: 4px; font-size: .67rem; color:var(--muted); }
.link-transport { color: #a0e9ce; font-size: .79rem; margin-top: 6px; }
@keyframes linked-device { 0%, 100% { transform: perspective(240px) rotateY(var(--angle)) rotateX(10deg); } 50% { transform: perspective(240px) translateY(-9px) rotateY(var(--opposite)) rotateX(1deg); } }
@keyframes link-travel { from { left:3%; } to { left:94%; } }
.first-device-name { padding: 13px 15px; margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.dialpad { display:flex; flex-direction:column; margin: 0 0 12px; perspective:650px; }
.dialpad label { display: block; margin-bottom: 8px; color: var(--muted); font-weight: 650; }
.dial-number-row { display: flex; gap: 8px; }
.dialpad .dial-number-row input { min-width: 0; text-align: center; font-size: 1.35rem; letter-spacing: .05em; }
.dial-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.dial-keys button { min-height: 52px; border-radius: 15px; font-size: 1.25rem; font-variant-numeric: tabular-nums; background: linear-gradient(154deg,#2c4e60,#192c3c); box-shadow: 0 3px #10212d,inset 0 1px #c2eef037; transition: transform .16s,box-shadow .16s; }
.dial-keys button:active { transform: translateY(3px) rotateX(8deg); box-shadow: 0 0 #10212d,inset 0 1px #c2eef037; }
#dialpad .dial-keys button { min-height: clamp(53px, 9.5dvh, 78px); font-size: 1.6rem; }
#dialpad [data-digit="0"] { grid-column: 2; grid-row: 4; }
#dialpad [data-digit="+"] { grid-row: 4; }
#dial-submit { display: flex; justify-content:center; align-items:center; gap:9px; width:100%; min-height:clamp(54px,9dvh,64px); margin-top:19px; background: linear-gradient(150deg,#2d9678,#1b664f); border-color:#83c0a3; color:#fff; font-size:1.05rem; box-shadow:0 6px #102e2a,0 13px 22px #0b1c22; transition:transform .18s,box-shadow .18s; }
#dial-submit:active:not(:disabled) { transform:translateY(4px); box-shadow:0 2px #102e2a; }
.dial-suggestions { display: grid; gap: 5px; max-height: 9.5rem; overflow: auto; margin: 8px 0; padding: 0; list-style: none; }
.dial-suggestions button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 7px 12px; text-align: start; font-size: .9rem; }
.dial-suggestions strong { overflow-wrap: anywhere; }
.dial-suggestions bdi { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.call-page-title { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.phone-history-open, .subpage-back { display: inline-flex; align-items: center; gap: 7px; padding-inline: 10px; font-size: .91rem; }
.subpage-back { background:#192c3a; color:var(--blue); }
.subpage-back .ico, .phone-history-open .ico { width:19px; height:19px; flex:0 0 auto; }
[dir="rtl"] .subpage-back .ico { transform: scaleX(-1); }
#calls-page:has(#calls-overview[hidden]) .call-page-title { display:none; }
#phone-history-view, #phone-call-detail { padding-top:clamp(15px,4dvh,28px); }
#phone-history-view > .history-title { margin-top: 14px; padding-top: 0; border-top: 0; }
.call-history { display: grid; gap: 7px; list-style: none; padding: 0; }
.call-history li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; background: var(--panel); }
.call-history li div { display: grid; min-width: 0; overflow-wrap: anywhere; }
.call-history time { color: var(--muted); font-size: .85rem; }
.phone-data { display: grid; justify-items: start; gap: 7px; margin-block: 10px 18px; }
.phone-data .sms-note:empty { display: none; }
.phone-data .sms-note { margin: 0; }
.phone-list-sentinel { display: block; min-height: 1px; }
.call-history bdi { color: var(--ink); font-variant-numeric: tabular-nums; }
.call-history .call-details-open { display: grid; flex: 1; text-align: start; gap: 2px; min-width: 0; min-height: 48px; padding: 3px 4px; background: transparent; border: 0; }
.call-details-open strong { overflow-wrap: anywhere; }
.call-details-open small { font-size: .79rem; color: var(--muted); line-height: 1.35; }
.phone-call-detail > button:first-child { margin-bottom: 15px; }
.phone-call-detail h2 { overflow-wrap: anywhere; }
.phone-call-detail > bdi { display: block; margin: 3px 0 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
#phone-call-detail-dial { margin-block: 10px; background: #237b61; border-color: #57977d; }
.call-duration { font-variant-numeric: tabular-nums; color: #a0e9ce; }
.history-title { margin: 24px 0 12px; padding-top: 15px; border-top: 1px solid var(--line); }
.calls-status { min-height: 0 !important; }
.calls-status:empty { display: none; }
.status { margin: 7px auto 0; color: #cad7df; min-height: 1.5rem; font-size: .94rem; overflow-wrap: anywhere; }
.actions { margin: 18px auto 0; display: flex; gap: 8px; justify-content: center; }
.actions button { flex: 1; }
.quick-actions { display: grid; grid-template-columns:1fr 1fr; gap:10px; margin:14px 0; }
.quick-actions button { display: grid; gap:8px; justify-items:start; text-align:start; padding:14px; background:linear-gradient(145deg,#2a3f4d,#1e2d38); border-color:#4e6270; }
.quick-actions .ico { box-sizing:content-box; width:18px; height:18px; padding:7px; border-radius:10px; background:#385367; color:#d3eafd; }
.quick-actions button:nth-child(2) .ico { background:#3b4648; color:#eed2a4; }
#start, .pwa-retry, #private-setup button, #messages-new, #sms-send { background: linear-gradient(120deg,#494bb2,#315c94); color: #fff; border: 1px solid #8c9fc7; box-shadow: inset 0 1px #e4ebff20; }
#stop { border-color: #5a6c7b; background: #263844; }
.call-note, .sms-note { color: var(--muted); font-size: .88rem; }
.pwa-help { margin-top: 16px; padding: 2px 15px; background: #1a2730; border: 1px solid var(--line); border-radius: 15px; color: var(--muted); }
.pwa-help summary { padding: 12px 0; color: var(--ink); cursor: pointer; }
.pwa-help p, .pwa-help form { margin-bottom: 12px; }
.pwa-help button, .pwa-help input { margin-top: 8px; }
.pwa-retry { display: inline-block; margin: 18px auto; padding: 11px 18px; border-radius: 12px; text-decoration: none; }
.dock { position: fixed; z-index: 5; inset-inline: 0; bottom: 0; margin: auto; max-width: 34rem; display: flex; gap: 4px; padding: 7px 10px max(7px,env(safe-area-inset-bottom)); border: 1px solid #40515d; border-bottom: 0; border-radius: 21px 21px 0 0; background: #121e28f5; box-shadow: 0 -8px 30px #070d1433; }
.dock button { border: 1px solid transparent; border-radius: 13px; min-width: 0; flex: 1; padding: 8px 1px 5px; display: grid; place-items: center; gap: 2px; color: #a8b9c6; background: transparent; font-size: .75rem; font-weight: 550; }
.dock button[aria-current=page] { background: linear-gradient(135deg,#3b3831,#2b3436); border-color: #a080473b; color: var(--gold); }
.dock .ico { width: 23px; height: 23px; }
.settings-group { margin: 0; min-width: 0; padding: 12px 16px 15px; border: 1px solid var(--line); border-radius: 19px; background: var(--panel); }
.settings-group legend { font-weight: 650; padding: 0 5px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; gap: 12px; }
.switch-row + .switch-row { border-top: 1px solid var(--line); }
.switch-row input { appearance: none; flex: 0 0 auto; width: 44px; height: 27px; border: 1px solid #667782; border-radius: 20px; background: #364550; cursor: pointer; position: relative; }
.switch-row input::before { content: ""; width: 19px; height: 19px; position:absolute; top: 3px; left: 3px; background: #f3f6f8; border-radius: 50%; transition: transform .16s; }
.switch-row input:checked { background: #287c69; border-color: #5aaa96; }
.switch-row input:checked::before { transform: translateX(17px); }
.font-controls { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 10px 0; }
.font-controls input { max-width: 100%; }
.phone-screen { position: fixed; inset: 0; z-index: 20; height: 100%; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(ellipse at 55% 18%,#284b59 0%,#172933 39%,transparent 73%),#0e171f; }
.in-call, .in-call body { overflow: hidden; }
.phone-screen-inner { min-height: 100%; width: min(100%,30rem); margin: auto; display: flex; flex-direction: column; align-items: center; padding: max(27px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(30px,calc(env(safe-area-inset-bottom) + 17px)) max(20px,env(safe-area-inset-left)); }
.call-sim { display: flex; align-items: center; gap: .6em; max-width: 100%; padding: 7px 13px; border: 1px solid #67959c55; border-radius: 999px; background: #101f28; color: #b7d1d9; font-size: .86rem; }
.call-sim bdi { min-width: 0; overflow-wrap: anywhere; }
.sim-indicator { display: block; flex: 0 0 6px; height: 6px; border-radius: 50%; background: #8bf0cb; box-shadow: 0 0 8px #8bf0cb8c; }
.caller-identity { width: 100%; text-align: center; margin: auto 0; padding-block: clamp(20px,5vh,54px); }
.caller-identity h2 { font-size: clamp(1.9rem,8vw,2.6rem); margin-top: 19px; overflow-wrap: anywhere; letter-spacing: -.035em; }
.caller-identity p { margin-top: 6px; color: #d1dde3; }
.caller-number { display: block; margin-top: 6px; color: #d1dde3; font-size: 1.05rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.caller-identity small:not(:empty) { display:block; color:#ccd6de; font-size:.8rem; margin:6px auto 0; max-width:30ch; }
.caller-icon { display: grid; place-items: center; width: clamp(68px,12vh,96px); aspect-ratio:1; margin: auto; color: #d0fbf2; border: 1px solid #a7e4dc6b; border-radius:29%; background:linear-gradient(145deg,#2c5b61,#1a353f); box-shadow: 0 18px 36px #07141b94, inset 0 1px #c9ede94c; }
.caller-icon .ico { width: 51%; height: 51%; }
.incoming-actions { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; width: 100%; }
.incoming-actions button, .end-call { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 68px; padding: 8px; background:#16262f; border:1px solid #65758579; color:white; font-weight:650; border-radius: 20px; }
.incoming-actions #answer { background: #19392f; border-color: #69ae8f85; }
.incoming-actions #reject, .end-call { background: #372631; border-color: #a9728575; }
.round { display:grid; place-items:center; flex: 0 0 34px; width:34px; aspect-ratio:1; border-radius: 12px; box-shadow: inset 0 1px #ffffff42; }
.round .ico { width: 20px; height: 20px; stroke: white; stroke-width:1.55; }
.decline { background: #a14762; }.decline .ico { transform: rotate(133deg); }
.accept { background: #2f8467; }
.call-tools { width: 100%; display: grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap: 9px; align-items: stretch; }
#call-mic, #call-speaker, #call-keypad-toggle, #output-route { display:grid; place-content:center; justify-items:center; gap: 4px; margin:0; background:#364956a8; border:1px solid #9fbdca55; color:#fff; border-radius:17px; padding:8px 3px; min-height:64px; font-size: .84rem; }
#call-mic[aria-pressed=true] { background:#e3edf1; color:#233341; }
#call-speaker[aria-pressed=true], #call-keypad-toggle[aria-expanded=true] { background:#244f49; border-color:#88d6bf; color:#d5ffef; }
#call-mic .mic-slash, #call-mic .mic-off-label, #call-mic[aria-pressed=true] .mic-on-label { display:none; }
#call-mic[aria-pressed=true] .mic-slash, #call-mic[aria-pressed=true] .mic-off-label { display:block; }
#call-timer { display:block; margin:9px auto; color:#a0e9ce; font-size: 1.2rem; font-variant-numeric:tabular-nums; }
#output-route label {font-size:.84rem; color:#d3dee5; }
#output-route { grid-column:1/-1; min-height: 0; padding: 7px 12px; }
#output-route:has(#output-choice[hidden]):has(#output-hint:empty) { display:none; }
#output-choice { padding:3px 8px; min-height:40px; max-width:100%; background:#263b49; }
#output-hint {font-size:.72rem; color:#ccd8df; text-align:center; }
#output-hint:empty { display:none; }
.end-call { grid-column:1/-1; }
.call-keypad { grid-column: 1/-1; margin: 0; gap: 6px; }
.call-keypad button { min-height: 45px; padding: 4px 8px; }
@keyframes page-depth { from { opacity:.64; transform:perspective(850px) translateY(12px) rotateX(-5deg); } to { opacity:1; transform:perspective(850px) translateY(0) rotateX(0); } }
@keyframes screen-depth { from { opacity:.65; transform:translateY(12px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }
#ultra-home:not([hidden]), .subpage:not([hidden]), #messages:not([hidden]) > #message-list:not([hidden]), #phone-history-view:not([hidden]), #phone-call-detail:not([hidden]), #calls-overview:not([hidden]) { animation:page-depth .25s cubic-bezier(.15,.55,.3,1) both; transform-origin:top center; }
.phone-screen:not([hidden]) { animation:screen-depth .24s cubic-bezier(.15,.55,.3,1) both; }
.dock button { transition:transform .19s,background .19s; }
.dock button:active { transform:perspective(260px) rotateX(12deg) translateY(2px); }
@media (max-height:550px) { .phone-screen-inner { padding-top:9px; padding-bottom:9px; } .caller-icon {width:48px;} .caller-identity {padding-block:4px;} .caller-identity h2 {margin-top:8px;font-size:1.45rem;} }
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
