/* ── 锁屏 (js/apps/lockscreen.js) ──
   The sheet carries the wallpaper, clock and notifications and slides up off the page underneath; the swipe zone is the
   lower-middle band, ending above the real phone's bottom system edge. Same column as the app (max 430px). */
.lockscreen{position:fixed;inset:0;left:0;right:0;margin:0 auto;max-width:430px;z-index:95;overflow:hidden}
.lockscreen[hidden]{display:none}
.lockscreen:focus{outline:none}
.lock-sheet{position:absolute;inset:0;display:flex;flex-direction:column;background:var(--bg);will-change:transform;box-shadow:0 12px 32px rgba(46,62,80,calc(.22 * var(--lock-progress,0)))}
.lock-wallpaper{z-index:0}
.lock-sheet>:not(.lock-wallpaper){position:relative;z-index:1}
.lock-clock-wrap{flex-shrink:0;text-align:center;padding:calc(72px + env(safe-area-inset-top,0px)) 24px 0}
.lock-date{margin-bottom:4px;font-size:14px;color:var(--wall-ink2,var(--ink2));letter-spacing:.04em;text-shadow:var(--wall-shadow,none)}
.lock-time{font-size:clamp(92px,32.3vw,126px)}   /* 字体与玻璃效果: .glass-clock (styles/desktop.css); 126px keeps "22:14" whole */
.lock-notifs{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:28px 16px 8px;display:flex;flex-direction:column;gap:10px;scrollbar-width:none}
.lock-notifs::-webkit-scrollbar{display:none}
/* the list fades out at its lower edge instead of being cut, so a longer list reads as scrollable */
.lock-notifs{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 28px),transparent);padding-bottom:28px}
/* 通知: standard glass cards, radius 22 */
.lock-notif{position:relative;display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border:1px solid var(--glass-line);border-radius:22px;background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);box-shadow:var(--glass-shadow);color:var(--wall-ink,var(--ink));font:inherit;text-align:left;cursor:pointer}
.lock-notif:active{transform:scale(.99)}
.lock-notif.stacked{margin-bottom:8px;box-shadow:var(--glass-shadow),0 12px 0 -6px var(--glass-line),0 11px 0 -6px var(--glass-bg)}   /* 还有更多: a second glass edge under the card */
.lock-notif-avwrap{position:relative;flex:none}
.lock-notif-av{width:42px;height:42px;border-radius:14px;overflow:hidden;background:rgb(255 255 255/55%);display:flex;align-items:center;justify-content:center;color:var(--ink2)}
.lock-notif-av img,.lock-notif-av .avatar-placeholder{width:100%;height:100%;object-fit:cover;display:flex;align-items:center;justify-content:center}
.lock-notif-av svg{width:19px;height:19px;stroke-width:1.6}
.lock-notif-n{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 4px;box-sizing:border-box;border-radius:9px;background:rgb(255 255 255/95%);color:#3b4d63;font-style:normal;font-size:11px;line-height:18px;text-align:center;box-shadow:0 1px 4px rgb(0 0 0/20%)}
.lock-notif-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.lock-notif-main b{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lock-notif-main span{font-size:12px;opacity:.88}
.lock-notif time{align-self:flex-start;flex-shrink:0;font-size:11px;opacity:.85}
.lock-empty{margin:auto 0 0;text-align:center;font-size:13px;color:var(--wall-ink,var(--ink));text-shadow:var(--wall-shadow,none)}
.lock-swipe-zone{flex-shrink:0;height:clamp(120px,24vh,200px);margin-bottom:calc(24px + var(--sab));display:flex;align-items:flex-end;justify-content:center;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
.lock-unlock-btn{display:flex;flex-direction:column;align-items:center;gap:9px;border:none;background:none;color:var(--wall-ink,var(--ink));text-shadow:var(--wall-shadow,none);font:inherit;font-size:12.5px;letter-spacing:.04em;padding:10px 22px;border-radius:16px;cursor:pointer}
.lock-bar{width:130px;height:5px;border-radius:3px;background:rgb(255 255 255/90%);box-shadow:0 1px 4px rgb(0 0 0/18%);animation:lockNudge 2.4s ease-in-out infinite}
@keyframes lockNudge{0%,70%,100%{transform:translateY(0)}80%{transform:translateY(-5px)}90%{transform:translateY(0)}}

/* ── Pull-down notification panel (js/apps/notifications.js) ──
   Opens straight to full screen: it fills the app's own column (max 430px wide, the whole height) whatever the list's
   length, an empty list included. Plain dim + solid surface (no backdrop blur) so dragging never re-blurs the page every
   frame. touch-action:none only where a drag is ours: the desktop's status row (pull down to open), the panel head and
   handle (push up to close), and the list while it has nothing to scroll (.is-static); a list that scrolls keeps pan-y. */
#v-home .status-bar{touch-action:none}
.notif-panel-root{position:fixed;inset:0;left:0;right:0;margin:0 auto;max-width:430px;z-index:90;overflow:hidden}
.notif-panel-root[hidden]{display:none}
.notif-panel-scrim{position:absolute;inset:0;background:rgba(30,40,52,.3);opacity:var(--panel-progress,0)}
.notif-panel-root.animating .notif-panel-scrim{transition:opacity .3s ease}
.notif-panel{position:absolute;inset:0;display:flex;flex-direction:column;background:var(--bg);color:var(--wall-ink,var(--ink));box-shadow:0 18px 40px rgba(46,62,80,.18);padding-top:env(safe-area-inset-top,0px);will-change:transform;outline:none;overflow:hidden}
/* 背景: the wallpaper as its pre-blurred copy (made once, theme-engine updateWallBlur), dimmed - no live blur while dragging.
   No wallpaper: the theme background under a soft dark veil. */
.np-bg{position:absolute;inset:0;z-index:0;pointer-events:none;background:var(--bg)}
.notif-panel-root.has-wall .np-bg{background:var(--wall-blur,var(--bg)) center/cover no-repeat}
.np-bg::after{content:"";position:absolute;inset:0}
/* only a wallpaper is dimmed; the plain theme background stays as it is (no grey wash) */
.notif-panel-root.has-wall .np-bg::after{background:rgb(18 26 38/30%)}
/* a bright wallpaper (dark ink) gets a light veil, a dark one a dark veil - never a grey wash */
.notif-panel-root[data-wall-tone="dark"] .np-bg::after{background:linear-gradient(180deg,rgb(255 255 255/38%),rgb(255 255 255/22%))}
.notif-panel-root[data-wall-tone="dark"] .np-bg{filter:saturate(1.15)}
.notif-panel-root:not(.has-wall):not(.icons-on-dark) .notif-glass .notif-row,.notif-panel-root[data-wall-tone="dark"] .notif-glass .notif-row{background:linear-gradient(180deg,rgb(255 255 255/70%),rgb(255 255 255/46%));border-color:rgb(255 255 255/85%);box-shadow:inset 0 1px 0 rgb(255 255 255/55%),0 8px 22px -10px rgb(40 52 72/35%)}
.notif-panel>:not(.np-bg){position:relative;z-index:1}
.notif-panel-head{flex-shrink:0;display:flex;flex-wrap:wrap;align-items:center;gap:10px 6px;padding:14px 14px 6px 18px;touch-action:none;user-select:none;-webkit-user-select:none}
.notif-panel-head::after{content:"";flex-basis:100%;order:1}
.notif-panel-head h2{flex:1;margin:0;font-family:var(--font-display);font-size:20px;font-weight:600;color:var(--wall-ink,var(--ink))}
/* Read filters and the global mark-all action: small glass capsules. */
.notif-panel-filters{display:inline-flex;gap:2px;flex:0 0 auto;order:2;padding:3px;border-radius:999px;border:1px solid var(--glass-line);background:rgb(255 255 255/30%);margin-bottom:2px}
.notif-panel-head .notif-panel-filters .notif-top-action{border-color:transparent;background:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;padding:5px 15px}
.notif-panel-head .notif-panel-filters .notif-top-action.active{background:rgb(255 255 255/82%);box-shadow:0 2px 8px rgb(40 52 72/12%)}
.notif-panel-filters .notif-top-action.active{color:var(--pri-deep)}
.notif-panel-head .notif-top-action{padding:7px 14px;border:1px solid var(--glass-line);border-radius:999px;background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);box-shadow:var(--glass-shadow);color:var(--wall-ink,var(--ink))}
.notif-panel-head .notif-top-action:disabled{opacity:.45;cursor:default}
.notif-panel-head>#notif-panel-mark-all{border-color:transparent;background:none;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;font-weight:500;opacity:.85}
.notif-panel-list{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;padding-bottom:12px}
.notif-panel-list::-webkit-scrollbar{display:none}
.notif-panel-list.is-static{touch-action:none}
.notif-panel-empty{padding:34px 20px 26px}
/* 分段 + 按 App 分组 + 玻璃卡。The cards are plain translucent fill (no backdrop-filter): what is behind them is already the
   blurred copy, and a live blur on every card would be redone on every frame of the pull. */
.notif-glass .notif-group-title{padding:12px 20px 4px;font-size:12px;font-weight:500;color:var(--wall-ink2,var(--ink2));opacity:.9;text-shadow:var(--wall-shadow,none)}
.notif-app-head{display:flex;align-items:center;gap:7px;padding:4px 22px 4px;min-height:36px;width:100%;border:0;background:none;font-family:inherit;text-align:left;cursor:pointer;color:var(--wall-ink,var(--ink));text-shadow:var(--wall-shadow,none)}
.notif-app-head.active{color:var(--pri-deep);text-shadow:none}
.notif-source-reset{font-size:10px}
.notif-app-head b{flex:1;font-size:12px;font-weight:500;opacity:.9}
.notif-app-head>span:last-child{font-size:11.5px;opacity:.85}
.notif-app-head .notif-app-ic{width:20px;height:20px;border-radius:7px;flex-shrink:0}
.notif-app-head .notif-app-ic>svg:not(.glass-glyph){width:13px;height:13px}
.notif-glass .notif-row{position:relative;width:auto;margin:0 16px 8px;padding:12px 14px 12px 16px;align-items:center;border:1px solid var(--glass-line);border-bottom-width:1px;border-radius:22px;background:var(--glass-bg);box-shadow:var(--glass-shadow);color:var(--wall-ink,var(--ink))}
.notif-glass .notif-row.unread{background:var(--glass-bg)}
.notif-glass .notif-row.read .notif-body-top b{font-weight:500}   /* read = lighter weight and no dot; never dimmed as a whole (contrast) */
.notif-glass .notif-body-top b{color:inherit;font-weight:600}
.notif-glass .notif-row.read .notif-body-top b{color:inherit}
.notif-glass .notif-time,.notif-glass .notif-count,.notif-glass .notif-snippet{color:inherit;opacity:.85}
.notif-glass .notif-snippet{margin-top:3px;-webkit-line-clamp:1}
.notif-glass .notif-icon-wrap .notif-av{background:rgb(255 255 255/55%)}
/* 未读: a cream dot on the card's left edge, ringed in translucent white */
.notif-glass .notif-unread-dot{position:absolute;left:-3px;top:50%;margin:-3.5px 0 0;background:var(--icon-accent,#F7D27A);box-shadow:0 0 0 2px rgb(255 255 255/50%)}
.notif-glass .notif-row-menu-btn{color:inherit;opacity:.5}
.notif-panel-empty svg{box-sizing:content-box;width:30px;height:30px;padding:16px;margin-bottom:12px;border-radius:50%;border:1px solid var(--glass-line);background:var(--glass-bg);box-shadow:var(--glass-shadow);color:var(--wall-ink,var(--ink2))}
.notif-panel-empty h3{color:var(--wall-ink,var(--ink))}
/* above the real phone's bottom system edge (home indicator), like the lock screen's swipe zone */
.notif-panel-handle{flex-shrink:0;height:calc(34px + var(--sab));padding:0 0 var(--sab);box-sizing:border-box;border:none;background:none;display:flex;align-items:center;justify-content:center;touch-action:none;cursor:grab;color:#fff}
.notif-panel-handle i{display:block;width:120px;height:5px;border-radius:3px;background:rgb(255 255 255/90%);box-shadow:0 1px 4px rgb(0 0 0/18%)}

/* A row that newly appeared in an open list fades in; rows that were already there glide (FLIP, notifications.js). */
.notif-row-enter{animation:notifRowIn .26s ease-out}
@keyframes notifRowIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

/* Short screens (a 320×568 phone, landscape): a smaller clock and less air, so the notifications keep usable room. */
@media (max-height:600px){
  .lock-clock-wrap{padding-top:calc(22px + env(safe-area-inset-top,0px))}
  .lock-date{font-size:12.5px}
  .lock-time{font-size:clamp(44px,13vh,64px)}
  .lock-notifs{padding-top:14px}
  .lock-swipe-zone{height:clamp(72px,18vh,120px);margin-bottom:calc(12px + var(--sab))}
  .lock-unlock-btn{padding:6px 18px;gap:6px}
}

@media (prefers-reduced-motion:reduce){
  .lock-bar,.notif-row-enter{animation:none}
  .notif-panel-root.animating .notif-panel-scrim{transition:none}
}


/* ── 锁屏时钟和桌面时钟一样大 (hand-written, keep LAST): the same size rule as .home-clock (index.html), so unlocking does
   not make the time jump. ── */
.lock-time{font-size:clamp(56px,11.4vh,96px)}
