/* 查手机·系统 App：时钟（0483）/ 通讯录（0477）/ 日历（0476）/ 备忘录（0469）/ 信息（0467、0468）。
   页面由 ta-phone-system.js 挂载，全部限定在 .sys-app 下。 */

.sys-app { --sys-bg: #f2f2f7; --sys-gray: #8e8e93; --sys-line: rgb(60 60 67 / 18%); --sys-blue: #007aff; background: var(--sys-bg); }
.sys-app svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sys-app button { cursor: pointer; }

/* ---------- 公共：圆按钮 / 胶囊 / 搜索 / 底部浮动 tab ---------- */
.sys-head { flex: 0 0 auto; position: relative; z-index: 2; min-height: 50px; padding: 2px 16px 6px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.sys-head > :first-child { justify-self: start; }
.sys-head > :last-child { justify-self: end; }
.sys-head-left { display: flex; align-items: center; gap: 8px; }
.sys-head > strong { text-align: center; font-size: 16px; font-weight: 600; }
.sys-round { width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgb(255 255 255 / 92%); box-shadow: 0 2px 14px rgb(0 0 0 / 8%); color: #000; }
.sys-round.lg { width: 48px; height: 48px; }
.sys-round svg { width: 20px; height: 20px; stroke-width: 2.2; }
.sys-pill { height: 42px; min-width: 42px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 21px; background: rgb(255 255 255 / 92%); box-shadow: 0 2px 14px rgb(0 0 0 / 8%); color: #000; font-size: 15px; font-weight: 500; }
.sys-pill svg { width: 19px; height: 19px; stroke-width: 2.2; }
.sys-pill.group { padding: 0 6px; gap: 0; }
.sys-pill.group button { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 0; background: none; }
.sys-search { flex: 1; height: 38px; margin: 2px 0 10px; padding: 0 12px; display: flex; align-items: center; gap: 6px; border-radius: 19px; background: #fff; color: var(--sys-gray); font-size: 15px; }
.sys-search span { flex: 1; }
.sys-search svg { width: 17px; height: 17px; }
.sys-bottom { position: absolute; left: 16px; right: 16px; bottom: calc(var(--safe-bottom) + 14px); z-index: 4; display: flex; align-items: center; gap: 14px; }
.sys-bottom .sys-search { height: 48px; margin: 0; padding: 0 18px; border-radius: 24px; box-shadow: 0 4px 22px rgb(0 0 0 / 10%); color: #000; font-weight: 500; }
.sys-bottom .sys-search span { color: rgb(60 60 67 / 75%); }
.sys-bottom .sys-search svg { width: 20px; height: 20px; stroke-width: 2.2; }
.sys-empty { margin: 60px 24px; color: var(--sys-gray); font-size: 15px; text-align: center; }
.sys-large { margin: 2px 0 12px; font-size: 30px; font-weight: 700; letter-spacing: .3px; }

.sys-tabpill { position: absolute; left: 14px; right: 14px; bottom: calc(var(--safe-bottom) + 12px); z-index: 4; height: 58px; padding: 4px; display: flex; border-radius: 29px; background: rgb(255 255 255 / 88%); box-shadow: 0 6px 26px rgb(0 0 0 / 12%); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.sys-tabpill button { flex: 1; min-width: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 25px; background: none; color: #000; font-size: 10px; font-weight: 500; }
.sys-tabpill button svg { width: 21px; height: 21px; }
.sys-tabpill button.active { background: rgb(118 118 128 / 14%); color: var(--sys-blue); }
.sys-tabpill.dark { background: rgb(40 40 42 / 86%); }
.sys-tabpill.dark button { color: #fff; }
.sys-tabpill.dark button.active { background: rgb(255 255 255 / 12%); color: #ff9f0a; }

/* ---------- 时钟（深色） ---------- */
.sys-clock { background: #000; color: #fff; }
.sys-head.dark > strong { color: #fff; }
.sys-round.dark, .sys-pill.dark { background: rgb(44 44 46 / 92%); box-shadow: none; color: #fff; }
.clk-list { padding: 0 20px calc(var(--safe-bottom) + 100px); }
.clk-section { margin: 12px 0 0; padding-bottom: 8px; border-bottom: .5px solid rgb(255 255 255 / 18%); font-size: 19px; font-weight: 600; }
.clk-row { min-height: 96px; display: flex; align-items: center; gap: 12px; border-bottom: .5px solid rgb(255 255 255 / 18%); }
.clk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--sys-gray); }
.clk-main b { font-size: 62px; font-weight: 200; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.clk-main small { margin-top: 2px; font-size: 14px; }
.clk-row.on .clk-main { color: #fff; }
.clk-row.world { min-height: 84px; }
.clk-row.world .clk-main { color: #fff; }
.clk-row.world .clk-main small { color: var(--sys-gray); }
.clk-row.world .clk-main em { font-size: 22px; font-style: normal; }
.clk-world-time { font-size: 50px; font-weight: 200; font-variant-numeric: tabular-nums; }
.clk-del { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: #ff3b30; color: #fff !important; font-size: 22px; line-height: 24px; }
.ios-toggle { position: relative; flex: none; width: 52px; height: 30px; padding: 0; border: 0; border-radius: 15px; background: #39393d; transition: background .2s; }
.ios-toggle i { position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 13px; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 25%); transition: transform .2s; }
.ios-toggle.on { background: #34c759; }
.ios-toggle.on i { transform: translateX(22px); }
.clk-stopwatch { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 70px; padding-bottom: 120px; }
.clk-stopwatch > b { font-size: 68px; font-weight: 200; font-variant-numeric: tabular-nums; }
.clk-sw-btns { width: 100%; padding: 0 24px; box-sizing: border-box; display: flex; justify-content: space-between; }
.clk-sw { width: 76px; height: 76px; border: 2px solid #000; border-radius: 50%; outline: 2px solid; font-size: 17px; }
.clk-sw.gray { background: #333; color: #fff !important; outline-color: #333; }
.clk-sw.green { background: #0a3a17; color: #30d158 !important; outline-color: #0a3a17; }
.clk-sw.red { background: #3c0e0b; color: #ff453a !important; outline-color: #3c0e0b; }

/* ---------- 通讯录 ---------- */
.sys-contacts { background: #f2f2f7; }
.ct-list { position: relative; padding: 0 30px calc(var(--safe-bottom) + 100px) 16px; }
.ct-av { flex: none; width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(180deg, #b4b7e0, #8f93c9); color: #fff; font-size: 16px; font-weight: 500; }
.ct-av img { width: 100%; height: 100%; object-fit: cover; }
.ct-av.lg { width: 54px; height: 54px; font-size: 20px; }
.ct-av.xl { width: 96px; height: 96px; font-size: 36px; }
.ct-mycard, .ct-row { width: 100%; padding: 0; display: flex; align-items: center; gap: 14px; border: 0; background: none; text-align: left; }
.ct-mycard { padding: 6px 0 12px; border-bottom: .5px solid var(--sys-line); }
.ct-mycard span { display: grid; gap: 2px; }
.ct-mycard b { font-size: 18px; font-weight: 600; }
.ct-mycard small { color: var(--sys-gray); font-size: 14px; }
.ct-letter { margin: 18px 0 0; padding-bottom: 6px; border-bottom: .5px solid var(--sys-line); color: var(--sys-gray); font-size: 14px; font-weight: 500; }
.ct-row { min-height: 58px; border-bottom: .5px solid var(--sys-line); font-size: 16px; }
.ct-row .ct-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-row em { color: var(--sys-gray); font-size: 15px; font-style: normal; }
.ct-count { margin: 16px 0; color: var(--sys-gray); font-size: 14px; text-align: center; }
.ct-index { position: absolute; right: 2px; top: 50%; z-index: 3; display: flex; flex-direction: column; transform: translateY(-50%); }
.ct-index button { padding: 0 4px; border: 0; background: none; color: var(--sys-blue) !important; font-size: 11px; font-weight: 600; line-height: 15px; }
.ct-detail { padding: 0 16px calc(var(--safe-bottom) + 40px); }
.ct-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0 18px; }
.ct-hero strong { font-size: 26px; font-weight: 600; }
.ct-hero small { color: var(--sys-gray); font-size: 15px; }
.ct-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.ct-actions button { height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 14px; background: #fff; color: var(--sys-blue) !important; font-size: 12px; }
.ct-card { margin-bottom: 14px; padding: 12px 16px; display: grid; gap: 4px; border-radius: 14px; background: #fff; }
.ct-card small { font-size: 14px; }
.ct-card b { color: var(--sys-blue); font-size: 17px; font-weight: 400; }
.ct-card button { padding: 8px 0; border: 0; background: none; color: var(--sys-blue) !important; font-size: 17px; text-align: left; }
.ct-card button + button { border-top: .5px solid var(--sys-line); }

/* ---------- 日历 ---------- */
.sys-calendar { background: #fff; }
.cal-head { padding-bottom: 0; }
.cal-title { flex: none; margin: 2px 16px 6px; font-size: 28px; font-weight: 700; }
.cal-weekdays { flex: none; display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 4px 8px; border-bottom: .5px solid var(--sys-line); font-size: 13px; font-weight: 600; text-align: center; }
.cal-weekdays .weekend { color: var(--sys-gray); }
.cal-scroll { padding: 0 4px calc(var(--safe-bottom) + 90px); }
.cal-month-label { margin: 12px 0 4px; padding-left: calc(var(--col) * 100% / 7); color: #ff3b30; font-size: 18px; font-weight: 600; text-align: left; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-height: 112px; border-top: .5px solid var(--sys-line); }
.cal-day { min-width: 0; padding: 6px 2px 4px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; border: 0; background: none; text-align: center; }
.cal-day.blank { visibility: hidden; }
.cal-num { align-self: center; width: 40px; padding: 3px 0; display: grid; border-radius: 23px; }
.cal-num b { font-size: 17px; font-weight: 600; line-height: 1.1; }
.cal-num small { color: var(--sys-gray); font-size: 10px; line-height: 1.3; }
.cal-num small.first { color: #000; text-decoration: underline 2px #ff3b30; text-underline-offset: 3px; }
.cal-day.weekend .cal-num b { color: var(--sys-gray); }
.cal-day.today .cal-num { background: #ff3b30; }
.cal-day.today .cal-num b, .cal-day.today .cal-num small { color: #fff; text-decoration: none; }
.cal-chip { display: flex; align-items: center; gap: 2px; min-width: 0; padding: 2px 3px; overflow: hidden; border-radius: 6px; background: #fff0dc; color: #b8620a; font-size: 10px; font-style: normal; font-weight: 600; line-height: 1.3; text-align: left; white-space: nowrap; text-overflow: ellipsis; }
.cal-chip::before { content: "★"; flex: none; width: 12px; height: 12px; display: grid; place-items: center; border-radius: 50%; background: #ff9500; color: #fff; font-size: 7px; }
.cal-chip.mine { background: #ffe5e3; color: #c4271d; }
.cal-chip.mine::before { content: ""; width: 3px; height: 11px; border-radius: 2px; background: #ff3b30; }
.cal-chip.mine.task { background: #e1ecff; color: #0a5fd8; }
.cal-chip.mine.task::before { background: var(--sys-blue); }
.cal-chip.mine.meet { background: #fde4f0; color: #c2185b; }
.cal-chip.mine.meet::before { background: #ff2d55; }
.cal-chip.more { background: none; color: var(--sys-gray); font-weight: 500; }
.cal-chip.more::before { display: none; }
.cal-today { position: absolute; left: 16px; bottom: calc(var(--safe-bottom) + 14px); z-index: 4; }
.cal-corner { position: absolute; right: 16px; bottom: calc(var(--safe-bottom) + 14px); z-index: 4; }
.cal-list { padding: 0 16px calc(var(--safe-bottom) + 30px); }
.cal-list h4 { margin: 18px 0 6px; font-size: 15px; }
.cal-item { margin-bottom: 8px; padding: 10px 12px; display: flex; gap: 12px; border-left: 4px solid #ff3b30; border-radius: 8px; background: #f7f7f9; }
.cal-item.task { border-left-color: var(--sys-blue); }
.cal-item.meet { border-left-color: #ff2d55; }
.cal-item time { flex: none; width: 46px; color: var(--sys-gray); font-size: 14px; }
.cal-item span { display: grid; gap: 2px; font-size: 15px; }
.cal-item small { color: var(--sys-gray); font-size: 13px; }

/* ---------- 备忘录 ---------- */
.nt-head .nt-title { display: grid; text-align: center; }
.nt-head .nt-title strong { font-size: 16px; font-weight: 600; }
.nt-head .nt-title small { color: var(--sys-gray); font-size: 14px; font-weight: 400; }
.nt-list { padding: 0 16px calc(var(--safe-bottom) + 100px); }
.nt-section { margin: 20px 0 8px; display: flex; align-items: center; justify-content: space-between; font-size: 19px; font-weight: 700; }
.nt-fold { padding: 0; border: 0; background: none; color: #e5ae00 !important; transition: transform .2s; }
.nt-fold.closed { transform: rotate(-90deg); }
.nt-card { padding: 0 16px 0 26px; border-radius: 22px; background: #fff; }
.nt-row { width: 100%; padding: 10px 0; display: grid; gap: 2px; border: 0; border-bottom: .5px solid var(--sys-line); background: none; text-align: left; }
.nt-row:last-child { border-bottom: 0; }
.nt-row b { overflow: hidden; font-size: 15px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.nt-sub { overflow: hidden; color: var(--sys-gray); font-size: 13.5px; white-space: nowrap; text-overflow: ellipsis; }
.nt-sub time { margin-right: 8px; }
.nt-folder { display: flex; align-items: center; gap: 4px; color: var(--sys-gray); font-size: 13.5px; }
.nt-folder svg { width: 15px; height: 15px; stroke-width: 1.6; }
.nt-body { padding: 0 22px calc(var(--safe-bottom) + 40px); background: #fff; }
.sys-notes:has(.nt-body) { background: #fff; }
.nt-body time { display: block; margin: 4px 0 14px; color: var(--sys-gray); font-size: 13px; text-align: center; }
.nt-body h1 { margin: 0 0 10px; font-size: 22px; font-weight: 700; }
.nt-body p { margin: 0; font-size: 16px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

/* ---------- 信息 ---------- */
.sys-sms { background: #fff; }
.sms-list { padding: 0 16px calc(var(--safe-bottom) + 100px) 0; }
.sms-list .sys-large { padding-left: 20px; }
.sms-av { flex: none; width: 46px; height: 46px; display: grid; place-items: end center; overflow: hidden; border-radius: 50%; background: linear-gradient(180deg, #a9b9da, #7f86bf); color: #fff; }
.sms-av svg { width: 34px; height: 34px; margin-bottom: -2px; fill: #fff; stroke: none; }
.sms-av.lg { width: 60px; height: 60px; }
.sms-av.lg svg { width: 46px; height: 46px; }
.sms-row { width: 100%; padding: 0; display: flex; align-items: flex-start; gap: 10px; border: 0; background: none; text-align: left; }
.sms-dot { flex: none; width: 12px; height: 12px; margin: 27px 0 0 8px; border-radius: 50%; }
.sms-dot.on { background: var(--sys-blue); }
.sms-row .sms-av { margin-top: 10px; }
.sms-main { flex: 1; min-width: 0; padding: 10px 0 14px; display: grid; gap: 3px; border-bottom: .5px solid var(--sys-line); }
.sms-top { display: flex; align-items: center; gap: 6px; }
.sms-top b { flex: 1; min-width: 0; overflow: hidden; font-size: 16px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.sms-top time { color: var(--sys-gray); font-size: 14px; }
.sms-chev svg { width: 14px; height: 14px; color: #c4c4c7; stroke-width: 2.6; }
.sms-main small { display: -webkit-box; overflow: hidden; color: var(--sys-gray); font-size: 14px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
.sms-line { display: inline-block; margin-right: 4px; padding: 0 3px; border-radius: 3px; background: var(--sys-gray); color: #fff; font-size: 9px; font-style: normal; font-weight: 700; line-height: 14px; vertical-align: 2px; }
.sms-thread-head { flex: 0 0 auto; position: relative; z-index: 2; height: 128px; padding: 0 16px; }
.sms-thread-head > .sys-pill { position: absolute; left: 16px; top: 6px; padding: 0 12px; }
.sms-badge { min-width: 24px; height: 28px; padding: 0 8px; display: grid; place-items: center; border-radius: 14px; background: #000; color: #fff; font-size: 15px; font-style: normal; font-weight: 700; }
.sms-who { position: absolute; left: 50%; top: 0; display: flex; flex-direction: column; align-items: center; transform: translateX(-50%); }
.sms-who .sys-pill { height: 34px; max-width: 220px; margin-top: -6px; padding: 0 12px 0 18px; }
.sms-who .sys-pill b { overflow: hidden; font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.sms-who .sys-pill svg { flex: none; width: 14px; height: 14px; color: var(--sys-gray); }
.sms-thread { padding: 0 16px 20px; display: flex; flex-direction: column; }
.sms-time { margin: 8px 0 10px; color: var(--sys-gray); font-size: 12px; font-weight: 600; line-height: 1.4; text-align: center; }
.sms-bubble { position: relative; align-self: flex-start; max-width: 74%; margin: 0 0 6px; padding: 9px 14px; border-radius: 18px; background: #e9e9eb; color: #000; font-size: 16px; line-height: 1.35; white-space: pre-wrap; word-break: break-word; }
.sms-bubble u { color: var(--sys-blue); text-underline-offset: 2px; }
.sms-bubble.me { align-self: flex-end; background: #34c759; color: #fff; }
.sms-bubble.me u { color: #fff; }
.sms-hint { align-self: flex-end; margin: 0; color: var(--sys-gray); font-size: 11px; }
.sms-composer { flex: 0 0 auto; padding: 8px 16px calc(var(--safe-bottom) + 10px); display: flex; align-items: center; gap: 10px; }
.sms-input { flex: 1; min-height: 40px; padding: 0 8px 0 16px; display: flex; align-items: center; gap: 6px; border-radius: 23px; background: #fff; box-shadow: 0 2px 14px rgb(0 0 0 / 10%); }
.sms-input textarea { flex: 1; min-width: 0; max-height: 100px; padding: 10px 0; border: 0; outline: none; background: none; color: #000; font: 16px/1.3 inherit; resize: none; }
.sms-input textarea::placeholder { color: #b8b8bd; }
.sms-mic { display: grid; color: #b8b8bd; }
.sms-send { display: none; width: 32px; height: 32px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: #34c759; color: #fff !important; }
.sms-send svg { width: 20px; height: 20px; stroke-width: 2.8; }
.sys-sms.typing .sms-send { display: grid; }
.sys-sms.typing .sms-mic { display: none; }
