:root{font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",sans-serif;color:#000;background:#e9e9ed;font-synthesis:none;--blue:#007aff;--gray:#8e8e93;--line:#e5e5ea}*{box-sizing:border-box}body{margin:0;min-height:100dvh;display:grid;place-items:center;padding:28px}button,input{font:inherit}button{border:0;background:none;cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible{outline:3px solid #80bfff;outline-offset:3px}button:active{opacity:.55}svg{width:24px;height:24px;fill:currentColor;flex-shrink:0}.phone{width:393px;height:852px;background:white;border-radius:52px;box-shadow:0 0 0 9px #242426,0 0 0 11px #626266,0 28px 70px #0003;overflow:hidden;position:relative;display:flex;flex-direction:column}.content{flex:1;min-height:0;overflow-y:auto;scrollbar-width:none}.toolbar{height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 17px;color:var(--blue)}.toolbar button{padding:8px 0;font-size:17px;min-width:35px}.toolbar .plus{font-size:32px;font-weight:300}h1{font-size:34px;letter-spacing:.3px;line-height:1.15;margin:5px 20px 15px;font-weight:700}.tab-bar{height:57px;flex-shrink:0;border-top:.5px solid #b9b9bd;background:#fafafaf2;display:flex;justify-content:space-around;padding:5px 5px 0}.tab{display:flex;flex:1;flex-direction:column;align-items:center;gap:3px;color:#999;font-size:10px;font-weight:500;padding:0}.tab svg{width:29px;height:28px}.tab.active{color:var(--blue)}.home-area{height:28px;background:#fafafa;display:grid;place-items:center;flex-shrink:0}.home-area div{width:134px;height:5px;background:#000;border-radius:4px;margin-top:6px}.dial-view{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:0 0 52px}.display{width:100%;height:136px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 20px}.phone-number{font-size:34px;font-weight:400;letter-spacing:.3px;max-width:100%;overflow-wrap:anywhere;text-align:center;line-height:1.2}.phone-number.long{font-size:25px}.add-number{height:32px;color:var(--blue);font-size:17px;margin-top:5px}.keypad{display:grid;grid-template-columns:repeat(3,78px);gap:16px 25px}.key{width:78px;height:78px;background:#e5e5e5;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0}.key span{font-size:36px;font-weight:400;line-height:39px}.key small{font-size:10px;font-weight:600;letter-spacing:2px;height:14px;line-height:14px}.key.symbol span{font-size:42px;line-height:50px}.key:active{background:#bcbcc0;opacity:1}.controls{display:grid;grid-template-columns:repeat(3,78px);column-gap:25px;margin-top:16px;align-items:center}.call-button{grid-column:2;width:78px;height:78px;background:#34c759;color:white;border-radius:50%;display:grid;place-items:center}.call-button svg{width:36px;height:36px}.backspace-button{color:#78787d;display:grid;place-items:center;height:60px}.backspace-button svg{width:27px}.search{margin:0 16px 16px;background:#efeff0;border-radius:10px;display:flex;align-items:center;padding:8px;gap:6px;color:var(--gray)}.search svg{width:18px;height:18px}.search input{width:100%;border:0;outline:0;background:none;font-size:17px;min-width:0}.row{min-height:74px;display:flex;align-items:center;margin-left:20px;padding:11px 17px 11px 0;gap:13px;border-bottom:.5px solid var(--line)}.row-main{flex:1;min-width:0;text-align:left;padding:0;display:flex;flex-direction:column;gap:4px}.name{font-weight:600;font-size:17px}.subtitle{font-size:14px;color:var(--gray);display:flex;align-items:center;gap:4px}.subtitle svg{width:13px;height:13px}.avatar{height:43px;width:43px;border-radius:50%;background:linear-gradient(#b5b8bf,#90959f);color:white;display:grid;place-items:center;font-size:17px;font-weight:500;flex-shrink:0}.info{color:var(--blue);padding:6px 0 6px 7px}.info svg{width:22px;height:22px}.time{font-size:14px;color:var(--gray)}.missed{color:#ff3b30}.segment{display:flex;background:#efeff0;border-radius:9px;padding:2px;width:160px;color:#000;font-size:13px}.segment button{font-size:13px;min-width:0;flex:1;padding:5px 13px}.segment .selected{background:white;border-radius:7px;box-shadow:0 1px 3px #0002;font-weight:600}.section-letter{padding:5px 20px;background:#f2f2f7;font-size:14px;color:#6d6d72;font-weight:600}.contact-row{min-height:46px;padding:12px 25px 12px 0}.my-card{padding-bottom:18px;margin-bottom:8px}.my-card .avatar{width:58px;height:58px;font-size:23px}.my-card .name{font-size:20px}.contacts-list{position:relative}.alphabet{position:absolute;right:4px;top:300px;display:flex;flex-direction:column;gap:3px;color:var(--blue);font-size:10px}.alphabet button{font-size:10px;padding:0 3px}.empty{text-align:center;color:var(--gray);padding:65px 28px;line-height:1.5}.voicemail-empty{height:75%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px}.voicemail-empty>svg{width:66px;height:66px;color:#c7c7cc;margin-bottom:12px}.voicemail-empty h2{font-size:23px;margin:0 0 10px}.voicemail-empty p{font-size:15px;color:var(--gray);line-height:1.5;margin:0;max-width:280px}.setup{margin-top:23px;color:var(--blue);border:1px solid var(--blue);border-radius:8px;padding:10px 36px}.remove{background:#ff3b30;color:white;border-radius:50%;width:23px;height:23px;padding:0;font-size:22px;line-height:20px}.toast{position:absolute;bottom:104px;left:25px;right:25px;background:#333e;color:white;border-radius:14px;text-align:center;padding:13px;font-size:14px;pointer-events:none;opacity:0;transition:opacity .2s}.toast.show{opacity:1}dialog{border:0;border-radius:22px;padding:24px;width:min(345px,90vw);box-shadow:0 15px 50px #0003}dialog::backdrop{background:#0005}dialog h2{font-size:24px;margin:12px 0}dialog p{color:#777;line-height:1.5}dialog .avatar{margin:10px auto;width:72px;height:72px;font-size:27px}dialog .profile{text-align:center}dialog button.action{display:block;background:#f2f2f7;color:var(--blue);padding:14px;border-radius:10px;width:100%;margin-top:10px}dialog .close{color:var(--blue);display:block;margin-left:auto;padding:4px}dialog label{display:block;font-size:14px;margin:15px 0}dialog input{display:block;width:100%;border:1px solid #ddd;border-radius:8px;padding:10px;margin-top:6px}.demo-call{text-align:center;padding:25px 0}.demo-call .hangup{background:#ff3b30;color:white;width:65px;height:65px;border-radius:50%;margin-top:25px}.hangup svg{transform:rotate(135deg)}@media(max-width:500px){body{padding:0;background:white}.phone{width:100%;height:100dvh;border-radius:0;box-shadow:none}.home-area{height:max(25px,env(safe-area-inset-bottom))}.dial-view{padding-bottom:35px}}@media(max-height:740px){.dial-view{padding-bottom:18px}.display{height:90px}.keypad{gap:11px 25px}.key,.call-button{width:68px;height:68px}.keypad,.controls{grid-template-columns:repeat(3,68px)}.controls{margin-top:11px}.key span{font-size:32px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
@media(min-width:501px){.phone{height:min(852px,calc(100dvh - 56px))}}
/* Keep rapid taps responsive without triggering double-tap zoom. */
button,.keypad,.controls,.content[aria-label="Keypad"],.dial-view{touch-action:manipulation}

/* Leave room for the device safe area without a simulated status bar. */
.phone{padding-top:env(safe-area-inset-top,0px)}

dialog select{display:block;width:100%;padding:10px;border:1px solid #ddd;border-radius:8px;margin-top:6px;background:white}button:disabled{opacity:.4;cursor:wait}.time{text-align:right;line-height:1.4}

.recent-swipe{position:relative;overflow:hidden;--swipe-offset:0px}
.recent-swipe .swipe-surface{position:relative;background:white;margin-left:0;padding-left:20px;transform:translateX(var(--swipe-offset));transition:transform .18s ease;touch-action:pan-y}
.recent-swipe.dragging .swipe-surface{transition:none;user-select:none;-webkit-user-select:none}
.swipe-delete{position:absolute;right:0;top:0;bottom:0;width:84px;background:#ff3b30;color:white;font-size:17px;font-weight:500;visibility:hidden}
.recent-swipe.swipe-right .swipe-delete{right:auto;left:0}
.recent-swipe.swipe-open .swipe-delete,.recent-swipe.dragging .swipe-delete{visibility:visible}

/* Keep the phone shell fixed; only lists inside the app may scroll. */
html{height:100%;overflow:hidden;overscroll-behavior:none}
body{position:fixed;inset:0;height:100%;min-height:0;overflow:hidden;overscroll-behavior:none}
.phone{overscroll-behavior:none}
.content{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.content[aria-label="Keypad"]{overflow:hidden;touch-action:none}

.hangup-action{display:flex;align-items:center;justify-content:center;gap:10px;background:#ff3b30;color:#fff;border-radius:30px;padding:12px 20px;min-height:48px;margin:16px auto 0;font-weight:600;flex-shrink:0}.hangup-action svg{transform:rotate(135deg);width:25px;height:25px}.hangup-action:disabled{opacity:.45;cursor:default}

.call-button.is-hangup{background:#ff3b30}.call-button.is-hangup svg{transform:rotate(135deg)}.call-button:disabled{opacity:.55;cursor:wait}

.phone-state-notice{font-size:12px;color:#8e8e93;padding:6px 12px;max-width:100%}.phone-state-notice[hidden]{display:none}

.dial-view{position:relative}.state-refresh{position:absolute;top:max(6px,env(safe-area-inset-top));right:10px;width:44px;height:44px;display:grid;place-items:center;color:var(--blue);border-radius:50%;z-index:1}.state-refresh svg{width:20px;height:20px}.state-refresh:disabled{opacity:.4;cursor:default}

.audio-open{left:10px;right:auto;font-size:24px}.audio-actions{display:flex;gap:16px;flex-wrap:wrap}.audio-actions button{color:var(--blue);padding:12px 0}.audio-actions button:disabled{opacity:.4}

.audio-playback-hint{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(92px + env(safe-area-inset-bottom));z-index:10;background:#007aff;color:white;padding:10px 16px;border-radius:20px;white-space:nowrap}.audio-playback-hint[hidden]{display:none}

.audio-owner-hint{bottom:calc(140px + env(safe-area-inset-bottom))}

.recording-status{position:fixed;top:env(safe-area-inset-top,0px);left:50%;transform:translateX(-50%);z-index:6;background:#fff;color:#c62828;font-size:12px;padding:7px 10px;border-radius:14px;max-width:70%}.recording-status[hidden]{display:none}.recordings{padding:0 16px 8px;background:var(--bg,#fff)}.recordings:empty{display:none}.recording-play{padding:8px 0;color:var(--blue)}.recording-player{display:block;width:100%;max-width:360px}.recording-player[hidden]{display:none}

/* A call and its recordings move as one swipe surface. */
.recent-swipe .recent-surface{padding-left:0;border-bottom:.5px solid var(--line)}
.recent-surface>.row{border-bottom:0}
.recent-surface>.recordings{padding-left:20px;background:transparent}

.schedule-note{margin:10px 20px;color:var(--gray);font-size:13px;line-height:1.5}.schedule-card{margin:12px 16px;padding:16px;background:#f2f2f7;border-radius:14px}.schedule-card p{font-size:13px;color:#666;margin:8px 0;overflow-wrap:anywhere}.schedule-time{font-size:28px;font-variant-numeric:tabular-nums}.schedule-delete{color:#ff3b30;padding:8px 0}.schedule-days{border:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}.schedule-days legend{font-size:14px}.schedule-days label{margin:8px 0}.schedule-days input{width:18px;height:18px;margin:0 auto 5px}.schedule-days span{font-size:13px}.schedule-clock{display:flex;gap:10px}.schedule-clock label{flex:1;margin:0;min-width:0}#schedule-error{color:#c62828}#detail{max-height:90dvh;overflow-y:auto}

/* Three native-scrolling, snapping time wheels; 40px rows match JS selection. */
.schedule-clock{position:relative;display:flex;gap:0;padding-top:24px;margin:8px 0 18px;background:#f5f5f7;border-radius:14px;overflow:hidden}
.schedule-clock::before{content:"";position:absolute;left:8px;right:8px;top:104px;height:40px;background:#e5e5ea;border-radius:8px;pointer-events:none}
.clock-column{position:relative;flex:1;min-width:0;text-align:center}.clock-unit{position:absolute;top:-21px;left:0;right:0;font-size:12px;color:#777}
.clock-wheel{height:200px;overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y;scroll-snap-type:y mandatory;scrollbar-width:none;padding:80px 0;-webkit-mask-image:linear-gradient(transparent,#000 30%,#000 70%,transparent);mask-image:linear-gradient(transparent,#000 30%,#000 70%,transparent)}
.clock-wheel::-webkit-scrollbar{display:none}.clock-option{display:block;width:100%;height:40px;min-height:40px;padding:0;line-height:40px;scroll-snap-align:center;font-size:24px;font-variant-numeric:tabular-nums;color:#888}.clock-option.selected{color:#000;font-weight:500}.clock-wheel:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}

.schedule-edit{color:var(--blue);padding:8px 0;margin-right:24px}

.schedule-clock[hidden]{display:none}.schedule-time-field{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 10px;font-size:14px}#schedule-time-toggle{background:#efeff4;color:var(--blue);border-radius:8px;padding:8px 12px;font-size:19px;font-variant-numeric:tabular-nums}#schedule-time-toggle[aria-expanded="true"]{background:#e1edff}

.schedule-dialog-actions{display:flex;justify-content:flex-end;align-items:center;gap:18px;position:sticky;top:-24px;background:white;z-index:2;padding:8px 0}.schedule-dialog-actions button{color:var(--blue);padding:6px 4px}.schedule-dialog-actions .close{margin-left:0}

.schedule-phone-fields{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px}.schedule-phone-fields label{min-width:0}.schedule-phone-fields select,.schedule-phone-fields input{width:100%;min-width:0;font-size:16px}.schedule-phone-fields select{text-overflow:ellipsis}

.schedule-phone-fields{align-items:end}.schedule-contact-picker{position:relative;height:42px;margin-bottom:15px;border-radius:9px;background:#f2f2f7;color:var(--blue);display:grid;place-items:center}.schedule-contact-picker>span{font-size:27px;line-height:1}.schedule-contact-picker select{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;padding:0;cursor:pointer}.schedule-contact-picker:focus-within{outline:2px solid var(--blue);outline-offset:2px}

.schedule-notify .schedule-attach{display:flex;align-items:center;gap:8px;font-size:14px}.schedule-notify .schedule-attach input{width:18px;height:18px;margin:0}

.schedule-dialog-actions .close{font-size:27px;line-height:1;min-width:36px}#schedule-error:empty{display:none}

.keypad[hidden],.keypad-toggle[hidden]{display:none}.keypad-toggle{color:var(--blue);font-size:15px;padding:12px 20px;min-height:44px;margin-top:10px}.keypad-toggle:disabled{opacity:.45}.keypad-collapsed .display{flex:1;max-height:420px}

.in-call-digits{font-size:28px;letter-spacing:3px;text-align:center;max-width:100%;overflow-wrap:anywhere;max-height:72px;overflow-y:auto;margin-top:10px;color:var(--blue)}.in-call-digits[hidden]{display:none}

