/* The in-game phone, rebuilt for the Phone tab. Sizes are the game's 1080 x 2297 screen in iPhone points (x 393/1080). */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300&family=Kalam:wght@700&display=swap');
@import url('/js/phone/css/apps.css');
@import url('/js/phone/css/gram.css');

.ph-wrap { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.ph-col { flex: none; padding: 4px 10px 12px; }
.ph-side { flex: 1 1 240px; min-width: 230px; max-width: 340px; position: sticky; top: 12px; }
.ph-side-body { display: grid; gap: 10px; }
.ph-side-who { display: grid; gap: 2px; }
.ph-side-who b { font-size: 15px; }
.ph-side-on { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.ph-side-at { font-size: 12px; }
.ph-side-err .error-box { margin: 0; }

/* ---------- device ---------- */
.ph-dev {
  position: relative; width: 411.9px; height: 854.8px; border-radius: 64.4px; background: #060608; zoom: var(--pz, 1);
  box-shadow: 0 0 0 3.3px #3a3a3e, 0 22px 60px rgba(0, 0, 0, .5); margin: 6px;
  font-family: Inter, -apple-system, system-ui, sans-serif; font-size: 17px; line-height: 1.25; color: #000;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; user-select: none; letter-spacing: -.01em;
}
:where(.ph-dev) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; letter-spacing: inherit; }
:where(.ph-dev) input, :where(.ph-dev) textarea { font: inherit; color: inherit; background: none; border: 0; outline: 0; padding: 0; margin: 0; letter-spacing: inherit; user-select: text; }
:where(.ph-dev) button:focus-visible { outline: 2px solid rgba(0, 122, 255, .6); outline-offset: 1px; }
.ph-btn { position: absolute; width: 4.4px; background: #3a3a3e; border-radius: 2.2px; }
.ph-btn.pw { right: -5.8px; top: 189.2px; height: 83.7px; }
.ph-btn.ac { left: -5.8px; top: 152.8px; height: 32.8px; }
.ph-btn.vu { left: -5.8px; top: 218.3px; height: 54.6px; }
.ph-btn.vd { left: -5.8px; top: 287.5px; height: 54.6px; }
.ph-scr { position: absolute; left: 9.46px; top: 9.46px; width: 393px; height: 835.9px; border-radius: 54.9px; overflow: hidden; background: #000; isolation: isolate; }

/* status bar (StatusBar.lua) */
.ph-sb { position: absolute; left: 0; top: 0; width: 393px; height: 50px; z-index: 20; pointer-events: none; color: #fff; }
.ph-sb.dark { color: #000; }
.ph-time { position: absolute; left: 64px; top: 27px; transform: translate(-50%, -50%); font-weight: 600; font-size: 17px; line-height: 1; letter-spacing: -.02em; }
.ph-sig { position: absolute; width: 3.1px; border-radius: .95px; background: currentColor; }
.ph-wifi { position: absolute; left: 305.1px; top: 19.3px; width: 18.9px; height: 13.8px; }
.ph-bat { position: absolute; left: 330.4px; top: 20px; width: 25.5px; height: 12.8px; border-radius: 4px; box-shadow: 0 0 0 1.24px color-mix(in srgb, currentColor 40%, transparent); }
.ph-bat i { position: absolute; inset: 1.97px; border-radius: 2.37px; background: currentColor; }
.ph-nub { position: absolute; left: 357.2px; top: 24.3px; width: 1.3px; height: 3.8px; border-radius: 1px; background: color-mix(in srgb, currentColor 45%, transparent); }
.ph-isl { position: absolute; left: 133.55px; top: 11.1px; width: 125.9px; height: 37.1px; border-radius: 18.6px; background: #000; z-index: 24; }
.ph-isl::after { content: ""; position: absolute; right: 12.4px; top: 12.4px; width: 12.4px; height: 12.4px; border-radius: 50%; background: #0e101e; }
.ph-hbar { position: absolute; left: 126.1px; bottom: 7.3px; width: 140.8px; height: 4.7px; border-radius: 3px; background: #fff; z-index: 21; cursor: pointer; }
.ph-hit { position: absolute; left: 58.2px; bottom: 0; width: 276.6px; height: 22.6px; z-index: 30; cursor: grab; touch-action: none; display: none; }
.ph-ov { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.ph-ov > * { pointer-events: auto; }

/* app window: grows out of the icon */
.ph-win { position: absolute; z-index: 5; overflow: hidden; background: #fff; display: none; }
.ph-win-apps { position: absolute; left: 0; top: 0; width: 393px; height: 835.9px; }
.ph-win-blank { position: absolute; inset: 0; background: #fff; opacity: 0; z-index: 13; pointer-events: none; }
.ph-win-icon { position: absolute; inset: 0; z-index: 14; pointer-events: none; }
.ph-win-icon .ph-ai { width: 100%; height: 100%; border-radius: 0; }
.ph-appview { position: absolute; left: 0; top: 0; width: 393px; height: 835.9px; overflow: hidden; }
:where(.ph-appview) { background: #fff; }

/* ---------- home screen (HomeScreen.lua) ---------- */
.ph-home { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.ph-wall { position: absolute; inset: 0; transform: scale(var(--bs, 1)); }
.ph-wall img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-wall.nf { background: radial-gradient(120% 70% at 20% 10%, #3b4f7a 0%, transparent 60%), radial-gradient(90% 60% at 90% 90%, #6b3a5a 0%, transparent 60%), linear-gradient(180deg, #1c2235, #101018); }
.ph-dim { position: absolute; inset: 0; background: #000; opacity: var(--dim, .12); }
.ph-grid { position: absolute; inset: 0; transform: scale(var(--gs, 1)); }
.ph-app { position: absolute; width: 60px; height: 60px; border-radius: 13.4px; opacity: var(--io, 1); }
.ph-app.away .ph-ai { visibility: hidden; }
.ph-app:active .ph-ai { filter: brightness(.67); }
.ph-ai { display: block; width: 60px; height: 60px; border-radius: 13.4px; object-fit: cover; }
.ph-ai.nf { display: grid; place-items: center; }
.ph-ai-g { width: 58%; height: 58%; }
.ph-lbl { position: absolute; left: -10.9px; top: 61.9px; width: 81.8px; text-align: center; font-weight: 500; font-size: 12px; line-height: 18.2px; color: #fff; white-space: nowrap; letter-spacing: 0; }
.ph-badge { position: absolute; right: 3.64px; top: 3.64px; transform: translate(50%, -50%); min-width: 23.3px; height: 23.3px; padding: 0 6.9px; box-sizing: border-box; border-radius: 11.65px; background: #ff3b30; color: #fff; font-size: 12.7px; line-height: 23.3px; text-align: center; }
.ph-wid { position: absolute; width: 153px; height: 153px; border-radius: 22.6px; overflow: hidden; opacity: var(--io, 1); }
.ph-wlbl { position: absolute; width: 153px; text-align: center; font-weight: 500; font-size: 12px; line-height: 18.2px; color: #fff; opacity: var(--io, 1); }
.ph-weather { color: #fff; }
.ph-weather > span { position: absolute; left: 16px; width: 127.5px; white-space: nowrap; overflow: hidden; display: flex; align-items: center; }
.w-city { top: 12.4px; height: 18.9px; font-weight: 600; font-size: 15px; }
.w-temp { top: 29.1px; height: 47.3px; font-weight: 300; font-size: 40px; letter-spacing: -.02em; }
.w-gl { position: absolute; left: 14.6px; top: 85.9px; width: 22.6px; height: 22.6px; }
.w-cond { top: 109.2px; height: 16px; font-weight: 600; font-size: 13px; }
.w-hilo { top: 125.2px; height: 16px; font-weight: 600; font-size: 13px; }
.ph-cal { background: #fff; }
.ph-cal > span { position: absolute; left: 16px; width: 127.5px; display: flex; align-items: center; white-space: nowrap; }
.c-day { top: 12.4px; height: 18.9px; font-weight: 700; font-size: 14px; color: #ff3b30; letter-spacing: 0; }
.c-num { top: 31.3px; left: 13.1px !important; height: 71.3px; font-size: 68px; line-height: 1; letter-spacing: -.03em; }
.c-ev { top: 120px; height: 18.2px; font-weight: 600; font-size: 13px; color: #8e8e93; }
.ph-picw { background: #2c2c30; display: grid; place-items: center; }
.ph-picw .p-empty { font-weight: 600; font-size: 14px; color: #c8c8cd; }
.ph-pill { position: absolute; left: 147.5px; width: 98px; height: 30px; border-radius: 15px; background: rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; gap: 5.1px; color: #fff; font-weight: 600; font-size: 13px; opacity: var(--io, 1); }
.p-gl { width: 13.8px; height: 13.8px; }
.ph-dock { position: absolute; left: 12px; width: 369px; height: 92px; border-radius: 34px; background: rgba(255, 255, 255, .26); box-shadow: 0 0 0 .73px rgba(255, 255, 255, .2); }

/* ---------- glyphs, faces ---------- */
:where(.ph-gl) { width: 1em; height: 1em; }
.ph-gl { display: inline-block; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ph-gl.nf { background: none; -webkit-mask: none; mask: none; }
.ph-gl svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ph-gl svg .f { fill: currentColor; stroke: none; }
.ph-face { display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: linear-gradient(180deg, #a5abb8, #858994); color: #fff; }
.ph-face.pic { background: rgb(214, 222, 236); }
.ph-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-face b { font-weight: 600; font-size: .4em; letter-spacing: .02em; }

/* ---------- pages and grouped rows (AppKit) ---------- */
.ph-page { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
:where(.ph-page) { background: #fff; }
.ph-pdim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .5s cubic-bezier(.22, 1, .36, 1); z-index: 60; }
.ph-scroll { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; overscroll-behavior: contain; }
.ph-scroll::-webkit-scrollbar { display: none; }
:where(.k-page) { background: rgb(242, 242, 247); }
.k-body { position: absolute; left: 0; right: 0; bottom: 0; top: 110.3px; }
.k-body.top { top: 58.95px; }
.k-tail { height: 58px; }
.k-large { margin: 2.2px 0 7.3px 21.1px; height: 47.3px; display: flex; align-items: center; font-weight: 700; font-size: 34px; letter-spacing: -.02em; }
.k-glass { position: absolute; left: 16.74px; top: 60.4px; width: 44px; height: 44px; border-radius: 50%; z-index: 5; background: rgba(244, 244, 247, .96); box-shadow: 0 0 0 1.09px rgba(0, 0, 0, .12); display: grid; place-items: center; }
.k-glass .ph-gl { width: 20.2px; height: 20.2px; margin-left: -2px; }
.k-glass:active { transform: scale(.96); }
.k-title { position: absolute; left: 80px; right: 80px; top: 66px; height: 32.75px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 17px; z-index: 5; white-space: nowrap; }
.ph-gh { margin: 0 0 4.4px 34.9px; height: 18.2px; display: flex; align-items: center; font-size: 13px; color: rgb(138, 138, 142); text-transform: uppercase; letter-spacing: 0; }
.ph-group { margin: 0 16.74px; background: #fff; border-radius: 25.5px; overflow: hidden; }
.ph-group.glass { background: rgba(255, 255, 255, .9); }
.ph-gf { margin: 6.6px 34.9px 0; font-size: 13px; line-height: 17.5px; color: rgb(138, 138, 142); }
.ph-gsp { height: 27.7px; }
.ph-row { position: relative; display: flex; align-items: center; width: 100%; min-height: 52px; padding: 0 18.2px; gap: 0; text-align: left; box-sizing: border-box; }
.ph-row.det { min-height: 67.7px; }
.ph-row.lead { padding-left: 15.3px; }
.ph-row + .ph-row::before { content: ""; position: absolute; top: -.36px; left: 18.2px; right: 0; height: 1.09px; background: rgb(222, 222, 226); }
.ph-row.lead + .ph-row.lead::before, .ph-row + .ph-row.lead::before { left: 59.7px; }
.ph-row.press:active, .ph-row.press:hover { background: rgb(209, 209, 214); }
.ph-row.press:hover { background: rgba(209, 209, 214, .45); }
.ph-lead { flex: none; width: 29.8px; height: 29.8px; margin-right: 14.6px; display: grid; place-items: center; }
.ph-row.det .ph-lead { width: 39.3px; height: 39.3px; }
.ph-isq { width: 29.8px; height: 29.8px; border-radius: 7.6px; display: grid; place-items: center; background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 87%, #000)); }
.ph-isq .ph-gl { width: 19.7px; height: 19.7px; }
.ph-row.det .ph-isq { width: 39.3px; height: 39.3px; border-radius: 10.2px; }
.ph-row.det .ph-isq .ph-gl { width: 26px; height: 26px; }
.ph-rt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ph-rtt { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-rtt.red { color: rgb(255, 59, 48); }
.ph-rtd { font-size: 13px; color: rgb(138, 138, 142); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-rv { flex: none; max-width: 60%; margin-left: 8px; font-size: 17px; color: rgb(138, 138, 142); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-chev { width: 16px; height: 16px; margin: 0 -2px 0 4px; color: rgb(174, 174, 178); }
.ph-sw { position: relative; flex: none; width: 63px; height: 28px; border-radius: 14px; background: rgb(233, 233, 235) !important; margin-left: 10px; margin-right: -3.6px; transition: background .26s cubic-bezier(.22, 1, .36, 1); }
.ph-sw.on { background: rgb(52, 199, 89) !important; }
.ph-sw i { position: absolute; left: 1.82px; top: 2px; width: 37.8px; height: 24px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 .73px rgba(0, 0, 0, .1), 0 2px 5px rgba(0, 0, 0, .12); transition: left .26s cubic-bezier(.22, 1, .36, 1); }
.ph-sw.on i { left: 23.4px; }
.ph-sw[disabled] { opacity: .5; cursor: default; }
.k-face { width: 29.8px; height: 29.8px; font-size: 30px; }
.ph-row.det .k-face { width: 39.3px; height: 39.3px; font-size: 39px; }
.ph-empty { text-align: center; padding: 29px 43.7px 0; }
.ph-empty .t { font-weight: 600; font-size: 20px; height: 25.5px; display: grid; place-items: center; }
.ph-empty .l { margin-top: 3px; font-size: 15px; line-height: 19.6px; color: rgb(138, 138, 142); }

/* AppKit.alert */
.ph-alert { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0); transition: background .22s; }
.ph-alert.in { background: rgba(0, 0, 0, .45); }
.ph-alert-card { width: 302px; box-sizing: border-box; padding: 25.5px; border-radius: 35px; background: rgb(250, 250, 252); opacity: 0; transform: scale(1.1); transition: opacity .2s, transform .34s cubic-bezier(.34, 1.56, .64, 1); }
.ph-alert.in .ph-alert-card { opacity: 1; transform: none; }
.ph-alert.out { background: rgba(0, 0, 0, 0); }
.ph-alert.out .ph-alert-card { opacity: 0; transform: scale(.94); transition: opacity .18s, transform .2s ease-in; }
.ph-alert-t { font-weight: 600; font-size: 17px; line-height: 25.5px; }
.ph-alert-b { margin-top: 6px; font-size: 15px; line-height: 19.6px; color: rgb(60, 60, 67); }
.ph-alert-in { display: block; width: 100%; box-sizing: border-box; margin-top: 12px; padding: 10px 12px; min-height: 70px; resize: none; border-radius: 12px; background: #fff !important; box-shadow: 0 0 0 1px rgb(222, 222, 226); font-size: 15px; line-height: 20px; }
.ph-alert-btns { margin-top: 19.6px; display: grid; gap: 8px; }
.ph-alert-btns.two { grid-template-columns: 1fr 1fr; }
.ph-alert-btns button { height: 48px; border-radius: 24px; text-align: center; font-weight: 600; font-size: 17px; background: rgb(233, 233, 235); }
.ph-alert-btns button.primary { background: rgb(0, 122, 255); color: #fff; }
.ph-alert-btns button.destructive { color: rgb(255, 59, 48); }
.ph-alert-btns button:active { transform: scale(.96); }
.ph-fit { white-space: nowrap; overflow: hidden; }
