/* ================= 隐私与安全 ================= */
/* 上锁 / 伪装时：下面的内容彻底不可见（联机照常在下面更新） */
html.pv-locked #app, html.pv-covered #app,
html.pv-locked .toast, html.pv-covered .toast, html.pv-locked .ol-sheet, html.pv-covered .ol-sheet, html.pv-covered .cover { visibility: hidden !important; }
html.pv-covered body::before, html.pv-covered body::after { display: none; }

/* ---------- 切出保护：纯色，不带任何字 ---------- */
.pv-shield { position: fixed; inset: 0; z-index: 2147483600; display: none; background: var(--bg); }
.pv-shield.neutral { background: #1c1c1e; }
html.pv-shielded .pv-shield { display: block; }

/* ---------- 锁屏 / 数字键盘 ---------- */
.pv-lock { position: fixed; inset: 0; z-index: 2147483000; overflow-y: auto; display: flex;
  padding: calc(env(safe-area-inset-top) + 20px) 24px calc(env(safe-area-inset-bottom) + 18px); color: var(--text);
  background:
    radial-gradient(90% 50% at 50% -6%, #5a1229 0%, #2a0915 42%, transparent 76%),
    radial-gradient(80% 40% at 50% 112%, #3a0c1d 0%, transparent 70%),
    var(--bg);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
  animation: pvFade .28s var(--ease) both; }
.pv-lock.top { z-index: 2147483200; }
.pv-lock-in { width: 100%; max-width: 330px; display: flex; flex-direction: column; align-items: center; margin: auto; }
.pv-mark { display: flex; flex-direction: column; align-items: center; }
.pv-mark .emblem { width: 62px; height: 62px; }
.pv-brand { font: 600 14px/1 var(--serif); letter-spacing: .6em; margin: 12px 0 0 .6em;
  background: linear-gradient(180deg, var(--gold2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv-t { font: 600 19px/1.3 var(--serif); letter-spacing: .16em; margin-top: 24px; text-align: center; }
.pv-s { color: var(--mute); font-size: 13px; min-height: 20px; margin: 8px 0 0; text-align: center; letter-spacing: .04em; }
.pv-s.err { color: #f2a0b4; }
.pv-dots { display: flex; gap: 16px; height: 14px; margin: 24px 0 30px; }
.pv-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--gold); transition: background .15s, transform .15s, box-shadow .15s; }
.pv-dots i.opt { border-style: dashed; opacity: .55; }
.pv-dots i.on { background: var(--goldg); border-color: transparent; box-shadow: 0 0 12px #d9b26f88; opacity: 1; transform: scale(1.06); }
.pv-dots.bad { animation: pvShake .42s var(--ease); }
.pv-keys { display: grid; grid-template-columns: repeat(3, 74px); gap: 15px 24px; justify-content: center; }
.pv-keys button { width: 74px; height: 74px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  font: 500 30px/1 var(--latin); font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; color: var(--text); letter-spacing: 0;
  background: radial-gradient(circle at 50% 28%, #ffffff12, #ffffff04 70%); border: 1px solid #d9b26f2e; box-shadow: inset 0 1px 0 #ffffff12; }
.pv-keys button:hover { border-color: #d9b26f66; }
.pv-keys button:active { background: #d9b26f2a; transform: scale(.93); }
.pv-keys button.fn { background: none; border-color: transparent; box-shadow: none; font: 500 14px/1 var(--sans); color: var(--mute); letter-spacing: .1em; }
.pv-keys button.fn:empty { visibility: hidden; }
.pv-keys button.fn svg { width: 26px; height: 26px; }
.pv-lock.cool .pv-keys button { opacity: .3; pointer-events: none; }
.pv-ok { width: 100%; max-width: 270px; margin-top: 24px; }
.pv-forgot { margin-top: 20px; color: var(--mute) !important; letter-spacing: .1em; }
.pv-sync { display: inline-flex; align-items: center; gap: 7px; margin: 22px 0 0; font-size: 11.5px; color: var(--mute); letter-spacing: .06em;
  padding: 5px 12px; border-radius: 999px; background: #ffffff06; border: 1px solid #ffffff10; }
.pv-sync i { width: 6px; height: 6px; border-radius: 50%; background: #6fc9a4; box-shadow: 0 0 8px #6fc9a4; animation: pvPulse 1.8s ease-in-out infinite; }
/* 中性锁屏（伪装模式 / 伪装画面里退出时）：不出现任何品牌 */
.pv-lock.neutral { background: #1c1c1e; color: #f2f2f7; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.pv-lock.neutral .pv-mark.n { width: 44px; height: 44px; color: #f2f2f7; opacity: .9; }
.pv-lock.neutral .pv-mark.n svg { width: 100%; height: 100%; }
.pv-lock.neutral .pv-t { font: 500 19px/1.3 inherit; letter-spacing: .04em; font-family: inherit; }
.pv-lock.neutral .pv-s { color: #8e8e93; } .pv-lock.neutral .pv-s.err { color: #ff6961; }
.pv-lock.neutral .pv-dots i { border-color: #f2f2f7; }
.pv-lock.neutral .pv-dots i.on { background: #f2f2f7; box-shadow: none; }
.pv-lock.neutral .pv-keys button { font: 400 32px/1 inherit; font-family: inherit; background: #ffffff1f; border: 0; box-shadow: none; color: #fff; }
.pv-lock.neutral .pv-keys button:active { background: #ffffff55; }
.pv-lock.neutral .pv-keys button.fn { background: none; font-size: 15px; color: #f2f2f7; }
.pv-lock.neutral .pv-forgot { color: #8e8e93 !important; letter-spacing: .04em; }
@media (max-height: 640px) {
  .pv-keys { grid-template-columns: repeat(3, 64px); gap: 11px 22px; }
  .pv-keys button { width: 64px; height: 64px; font-size: 26px; }
  .pv-t { margin-top: 14px; } .pv-dots { margin: 16px 0 20px; } .pv-mark .emblem { width: 48px; height: 48px; }
}

/* ---------- 底部确认框 ---------- */
.pv-sheet { position: fixed; inset: 0; z-index: 2147483400; display: flex; align-items: flex-end; justify-content: center; background: #000000a8;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: pvFade .2s ease both; }
.pv-sheet-in { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 10px; padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #26121c, #140a10); border: 1px solid #d9b26f30; border-bottom: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -20px 50px -20px #000;
  animation: pvUp .32s var(--ease) both; color: var(--text); }
.pv-sheet-in h3 { font: 600 18px/1.3 var(--serif); letter-spacing: .12em; text-align: center; color: var(--gold2); }
.pv-sheet-b { font-size: 14px; line-height: 1.75; color: #e6d4c6; margin-bottom: 6px; }
.pv-sheet-b p { margin: 8px 0; } .pv-sheet-b b { color: #f2a0b4; }
.pv-code { text-align: center; padding: 12px; border-radius: 14px; background: #d9b26f12; border: 1px dashed #d9b26f55; }
.pv-code b { color: var(--gold2) !important; font: 600 18px/1.4 var(--latin); letter-spacing: .12em; }
.pv-code small { color: var(--mute); }

/* ---------- 低调模式：题目糊住 ---------- */
html.pv-blur .card.task .big { cursor: pointer; transition: color .3s, text-shadow .3s; }
html.pv-blur .card.task .big:not(.pv-shown), html.pv-blur .card.task .big:not(.pv-shown) * {
  color: transparent !important; -webkit-text-fill-color: transparent; text-shadow: 0 0 16px #fbefe2d0 !important; }
html.pv-blur .card.task .big:not(.pv-shown) .dot { opacity: .25; }
html.pv-blur .card.task .big:not(.pv-shown)::after { content: "轻点查看"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font: 500 12.5px/1 var(--sans); letter-spacing: .32em; padding: 8px 12px 8px 16px; border-radius: 999px; white-space: nowrap;
  color: var(--gold2); -webkit-text-fill-color: var(--gold2); text-shadow: none; background: #0b0609d9; border: 1px solid #d9b26f50; box-shadow: 0 8px 20px -8px #000; }

/* ---------- 双击安全词栏不要触发缩放 ---------- */
.safe { touch-action: manipulation; -webkit-user-select: none; user-select: none; }

/* ---------- 伪装画面 ---------- */
.pv-cover { position: fixed; inset: 0; z-index: 2147482000; overflow-y: auto; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; letter-spacing: 0; }
.pv-exit { position: fixed; top: 0; left: 0; width: calc(84px + env(safe-area-inset-left)); height: calc(84px + env(safe-area-inset-top)); z-index: 3; touch-action: none; }
.pv-learn { position: fixed; z-index: 4; bottom: calc(env(safe-area-inset-bottom) + 22px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; padding: 7px 14px; border-radius: 999px;
  background: #0000001a; color: #6f6f6f; pointer-events: none; animation: pvFade .3s ease both, pvOut .6s ease 3.6s both; }
.pv-calc .pv-learn { bottom: auto; top: calc(env(safe-area-inset-top) + 24px); }
.pv-calc .pv-learn, .pv-blank .pv-learn, .pv-weather .pv-learn { background: #ffffff1c; color: #c7c7cc; }

/* 备忘录 */
.pv-notes { background: #f7f6f2; color: #1c1c1e; }
.pv-n-bar { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: calc(env(safe-area-inset-top) + 14px) 18px 10px;
  color: #d4a20b; font-size: 17px; background: #f7f6f2ee; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.pv-n-bar .r { font-size: 22px; letter-spacing: .1em; }
.pv-n-doc { max-width: 560px; margin: 0 auto; padding: 4px 22px 60px; }
.pv-n-date { text-align: center; color: #8e8e93; font-size: 12.5px; margin: 0 0 14px; }
.pv-notes h1 { font-size: 27px; font-weight: 700; margin: 0 0 12px; letter-spacing: 0; color: #1c1c1e; }
.pv-notes ul { list-style: none; padding: 0; margin: 0 0 18px; }
.pv-notes li { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 17px; border-bottom: 1px solid #e7e5de; }
.pv-notes li i { width: 21px; height: 21px; border-radius: 50%; border: 1.5px solid #c7c7cc; flex: none; }
.pv-notes li.done { color: #8e8e93; }
.pv-notes li.done i { background: #e0ac12; border-color: #e0ac12; box-shadow: inset 0 0 0 3.5px #f7f6f2; }
.pv-n-txt { font-size: 17px; line-height: 1.7; margin: 0; }

/* 计算器 */
.pv-calc { background: #000; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
  padding: calc(env(safe-area-inset-top) + 20px) 16px calc(env(safe-area-inset-bottom) + 22px); }
.pv-c-disp { flex: 1; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 10px 12px; min-height: 120px; max-width: 420px; width: 100%; margin: 0 auto; }
.pv-c-v { font-size: 80px; font-weight: 300; line-height: 1; white-space: nowrap; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pv-c-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; max-width: 420px; width: 100%; margin: 0 auto; }
.pv-c-keys button { aspect-ratio: 1; border-radius: 999px; border: 0; padding: 0; font-size: 32px; font-weight: 400; color: #fff; background: #333; box-shadow: none;
  font-family: inherit; letter-spacing: 0; transition: background .25s, color .25s; }
.pv-c-keys button:active { background: #737373; transform: none; }
.pv-c-keys .f { background: #a5a5a5; color: #000; font-size: 26px; font-weight: 500; }
.pv-c-keys .f:active { background: #d9d9d9; }
.pv-c-keys .o { background: #ff9f0a; font-size: 36px; }
.pv-c-keys .o:active { background: #fcc78d; }
.pv-c-keys .o.on { background: #fff; color: #ff9f0a; }
.pv-c-keys .z { grid-column: span 2; aspect-ratio: auto; text-align: left; padding-left: 12%; }
.pv-c-keys .e { grid-column: 4; }

/* 天气 */
.pv-weather { color: #fff; background: linear-gradient(180deg, #2f6fd6 0%, #4f8fe0 45%, #7cb0ea 100%); padding: calc(env(safe-area-inset-top) + 42px) 18px 40px; }
.pv-weather > * { max-width: 460px; margin-left: auto; margin-right: auto; }
.pv-w-top { text-align: center; text-shadow: 0 1px 8px #0002; margin-bottom: 26px; }
.pv-w-top p { margin: 0; font-size: 30px; font-weight: 400; }
.pv-w-top b { display: block; font-size: 96px; font-weight: 200; line-height: 1; margin: 2px 0 2px 24px; }
.pv-w-top span { display: block; font-size: 20px; opacity: .9; }
.pv-w-top small { font-size: 17px; opacity: .9; }
.pv-w-card { background: #ffffff26; border-radius: 16px; padding: 12px 16px; margin-bottom: 12px; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.pv-w-cap { margin: 0 0 10px; font-size: 13.5px; padding-bottom: 10px; border-bottom: 1px solid #ffffff33; opacity: .92; }
.pv-w-hours { list-style: none; padding: 0; margin: 0; display: flex; justify-content: space-between; }
.pv-w-hours li { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 15px; }
.pv-w-hours small { font-size: 13px; opacity: .9; } .pv-w-hours span { font-size: 22px; }
.pv-w-days { list-style: none; padding: 0; margin: 0; }
.pv-w-days li { display: grid; grid-template-columns: 52px 30px 34px 1fr 34px; align-items: center; gap: 8px; padding: 9px 0; font-size: 16px; border-top: 1px solid #ffffff22; }
.pv-w-days li:first-child { border-top: 0; }
.pv-w-days em { font-style: normal; font-size: 20px; } .pv-w-days small { opacity: .75; font-size: 15px; text-align: right; }
.pv-w-days li > small:last-child { opacity: 1; text-align: left; }
.pv-w-days i { position: relative; height: 5px; border-radius: 9px; background: #0000002a; }
.pv-w-days i b { position: absolute; top: 0; bottom: 0; border-radius: 9px; background: linear-gradient(90deg, #8fd3ff, #ffd36b, #ffa04d); }

/* 空白 */
.pv-blank { background: #000; cursor: none; }

/* ---------- 设置页 ---------- */
.pv-page section { gap: 12px; }
.pv-hero { padding: 26px 20px 20px; }
.pv-hero-ic { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--gold); filter: drop-shadow(0 0 14px #d9b26f55); }
.pv-hero-ic svg { width: 100%; height: 100%; }
.pv-hero .big { margin: 10px 0 8px; }
.pv-hero .hint { line-height: 1.7; }
.pv-sts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
.pv-st { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; letter-spacing: .06em; color: var(--mute); padding: 4px 10px; border-radius: 999px; border: 1px solid #ffffff12; background: #ffffff05; }
.pv-st i { width: 6px; height: 6px; border-radius: 50%; background: #ffffff26; }
.pv-st.on { color: var(--gold2); border-color: #d9b26f40; }
.pv-st.on i { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.pv-p { margin: 0; font-size: 13.5px; line-height: 1.7; color: #e6d4c6; }
.pv-note { margin: 0; font-size: 12.5px; line-height: 1.75; color: var(--mute); }
.pv-note b { color: var(--gold2); font-weight: 500; }
.pv-lbl { font: 500 11.5px/1 var(--sans); letter-spacing: .24em; color: var(--gold); margin-top: 4px; }
.pv-seg > button { padding: 10px 6px; }
.pv-seg > button b { font-size: 14px; letter-spacing: .08em; }
.pv-row { display: flex; gap: 10px; } .pv-row > button { flex: 1; font-size: 14px; }
.pv-page section > button svg, .pv-page .primary svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.pv-page section > .ghost.small { align-self: center; color: var(--gold); }
.pv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pv-list li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text); line-height: 1.5; }
.pv-list b { color: var(--gold2); font-weight: 500; }
.pv-k { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line2); color: var(--gold); font: 600 13px/1 var(--latin); }
.pv-k svg { width: 15px; height: 15px; }
/* 伪装画面小预览 */
.pv-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pv-pick { padding: 8px 6px 9px; display: flex; flex-direction: column; align-items: center; gap: 7px; border-radius: 14px; background: #0d0709; }
.pv-pick b { font: 500 12.5px/1 var(--serif); letter-spacing: .1em; color: var(--mute); }
.pv-pick.on { border-color: var(--gold); background: #d9b26f12; box-shadow: 0 0 0 1px #d9b26f40, 0 8px 20px -10px #d9b26f66; }
.pv-pick.on b { color: var(--gold2); }
.pv-mini { width: 100%; max-width: 62px; aspect-ratio: 9 / 15; border-radius: 9px; overflow: hidden; position: relative; display: block; box-shadow: 0 0 0 1px #ffffff14; }
.pv-mini.m-notes { background: #f7f6f2; padding: 10px 6px; display: flex; flex-direction: column; gap: 6px; }
.pv-mini.m-notes::before { content: ""; height: 5px; width: 60%; background: #1c1c1e; border-radius: 2px; margin-bottom: 2px; }
.pv-mini.m-notes i { height: 3px; border-radius: 2px; background: #d6d3ca; }
.pv-mini.m-notes i:nth-child(odd) { width: 80%; }
.pv-mini.m-calc { background: #000; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 40% 5px 7px; align-content: end; }
.pv-mini.m-calc i { aspect-ratio: 1; border-radius: 50%; background: #333; }
.pv-mini.m-calc i:nth-child(4n) { background: #ff9f0a; }
.pv-mini.m-calc i:nth-child(-n+3) { background: #a5a5a5; }
.pv-mini.m-weather { background: linear-gradient(180deg, #2f6fd6, #7cb0ea); color: #fff; display: flex; flex-direction: column; align-items: center; padding-top: 22%; gap: 10px; }
.pv-mini.m-weather b { font: 300 17px/1 -apple-system, sans-serif; }
.pv-mini.m-weather i { width: 76%; height: 16px; border-radius: 4px; background: #ffffff33; }
.pv-mini.m-blank { background: #000; }
/* 标签页预览 */
.pv-tab { display: flex; align-items: center; gap: 8px; align-self: center; width: min(100%, 240px); padding: 8px 12px; border-radius: 10px 10px 0 0;
  background: #2b2b2e; color: #e8e8ea; font: 13px/1 -apple-system, "PingFang SC", sans-serif; box-shadow: 0 1px 0 #ffffff10 inset; }
.pv-tab img { width: 16px; height: 16px; border-radius: 4px; }
.pv-tab span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-tab i { font-style: normal; color: #8e8e93; }
/* 本机数据 */
.pv-data { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pv-data li { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: #ffffff05; border: 1px solid #ffffff0c; }
.pv-data b { font: 600 13.5px/1.3 var(--serif); letter-spacing: .08em; }
.pv-data small { font-size: 11.5px; color: var(--mute); }
.pv-end { margin-top: 6px; font-size: 12px; opacity: .7; }
/* 开局设置页入口 */
.pv-entry { display: flex; align-items: center; gap: 12px; text-align: left; padding: 13px 14px; border-radius: var(--r); background: linear-gradient(170deg, #22101a, #150a10); border-color: #ffffff12; }
.pv-entry .ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid #d9b26f40; color: var(--gold); }
.pv-entry .ic svg { width: 18px; height: 18px; }
.pv-entry .tx { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pv-entry b { font: 600 15px/1.3 var(--serif); letter-spacing: .12em; }
.pv-entry small { font-size: 12px; color: var(--mute); }
.pv-entry > i { width: 18px; height: 18px; color: var(--mute); }
.pv-entry > i svg { width: 100%; height: 100%; }

@keyframes pvFade { from { opacity: 0; } }
@keyframes pvOut { to { opacity: 0; } }
@keyframes pvUp { from { transform: translateY(40px); opacity: 0; } }
@keyframes pvShake { 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(3px); } }
@keyframes pvPulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .pv-lock, .pv-sheet, .pv-sheet-in, .pv-learn { animation: none !important; }
  .pv-dots.bad { animation: none !important; outline: 1px solid #f2a0b466; outline-offset: 6px; border-radius: 9px; }
  .pv-sync i { animation: none !important; }
}
@media (max-width: 359px) { .pv-picks { grid-template-columns: repeat(2, 1fr); } .pv-data { grid-template-columns: 1fr; } }
