@font-face { font-family: "Phone Serif"; src: url("/fonts/serif-r.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Phone Serif"; src: url("/fonts/serif-sb.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #f0f2ed;
  --ink: #22252a;
  --ink2: rgba(34, 37, 42, .62);
  --ink3: rgba(34, 37, 42, .38);
  --card: rgba(255, 255, 255, .58);
  --line: rgba(34, 37, 42, .12);
  --seal: #c8402f;
  --bezel: #17181b;
  --ink-img: url("/ink/light.png");
  --serif: "Phone Serif", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --sans: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}
:root[data-theme="dark"] {
  --paper: #1a1e27;
  --ink: #ece9dd;
  --ink2: rgba(236, 233, 221, .64);
  --ink3: rgba(236, 233, 221, .36);
  --card: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .13);
  --bezel: #08090b;
  --ink-img: url("/ink/dark.png");
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--serif); overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* ---------- desk ---------- */
.stage { position: fixed; inset: 0; display: grid; place-items: center; }
.scroll { position: absolute; left: 0; right: 0; top: 50%; height: 21.7vw; min-height: 180px; background: var(--ink-img) center / cover no-repeat; transform: translateY(-8%); opacity: .9; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%); mask-image: linear-gradient(to bottom, transparent 0, #000 16%); }
.caption { position: absolute; left: calc(50% - min(46vh, 430px) * .4621 - 96px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.caption .seal { width: 30px; height: 30px; background: var(--seal); color: #fbf3e6; font-weight: 600; font-size: 15px; line-height: 30px; text-align: center; border-radius: 4px; letter-spacing: -.5px; }
.caption .vt { writing-mode: vertical-rl; letter-spacing: .42em; font-size: 14px; color: var(--ink2); }

.phone {
  --h: min(92vh, 860px);
  position: relative; height: var(--h); aspect-ratio: 390 / 844; padding: calc(var(--h) * .0125); transition: transform .65s cubic-bezier(.3, .8, .2, 1);
  background: linear-gradient(145deg, #55575e 0%, #1b1c20 18%, #0c0d0f 50%, #24262b 82%, #4a4c53 100%); border-radius: calc(var(--h) * .068);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16) inset, 0 0 0 calc(var(--h) * .0085) #050506 inset, 0 calc(var(--h) * .04) calc(var(--h) * .09) calc(var(--h) * -.03) rgba(20, 24, 30, .55), 0 2px 6px rgba(20, 24, 30, .25);
}
.key { position: absolute; width: 4px; background: var(--bezel); border-radius: 2px; }
.key.power { right: -4px; top: 24%; height: 11%; }
.key.power::after { content: ""; position: absolute; inset: -6px -10px -6px -4px; }
.key.vol1 { left: -4px; top: 20%; height: 6.5%; }
.key.vol2 { left: -4px; top: 28.5%; height: 6.5%; }
.screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--h) * .056); overflow: hidden; clip-path: inset(0 round calc(var(--h) * .056)); background: var(--paper); container-type: size; isolation: isolate; }

/* everything inside is sized in em: 1em = 10px on a 390-wide screen, shrunk on short ones */
.ui { position: absolute; inset: 0; font-size: min(100cqw / 39, 100cqh / 72); overflow: hidden; user-select: none; -webkit-user-select: none; }

.wall { position: absolute; inset: 0; background: var(--paper); }
.wall .ink { position: absolute; left: 0; right: 0; bottom: 9em; height: 26em; background: var(--ink-img) 50% 50% / auto 100% no-repeat; opacity: .5; -webkit-mask-image: linear-gradient(transparent 0, #000 16%, #000 80%, transparent); mask-image: linear-gradient(transparent 0, #000 16%, #000 80%, transparent); }

/* ---------- status bar ---------- */
.status { position: absolute; z-index: 45; top: 0; left: 0; right: 0; height: 5em; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: .6em 2.8em 0; font-family: var(--sans); pointer-events: none; transition: color .3s; }
.st-time { font-size: 1.55em; font-weight: 600; letter-spacing: .01em; }
.island { position: relative; width: 10.6em; height: 3em; border-radius: 2em; background: #050506; }
.island::after { content: ""; position: absolute; right: .95em; top: 50%; width: 1.05em; height: 1.05em; margin-top: -.52em; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #303a5c, #0a0c14 62%); }
.st-left { display: flex; align-items: center; }
.st-carrier { display: none; font-size: 1.36em; font-weight: 600; letter-spacing: .02em; }
.st-ic.wifi { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.st-right { justify-self: end; display: flex; gap: .6em; align-items: center; }
.st-ic { height: 1.15em; fill: currentColor; }
.ui.in-app .status { color: var(--app-fg, var(--ink)); }
.ui.locked .st-time { display: none; }
.ui.locked .st-carrier { display: inline; }

/* ---------- home ---------- */
.home { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 5.6em 2.3em 2.7em; transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .35s, filter .35s; }
.ui.locked .home { transform: scale(1.12); opacity: 0; pointer-events: none; }
.ui.in-app .home, .ui.in-folder .home { transform: scale(.94); filter: blur(.6em); opacity: .55; pointer-events: none; }

.home::after { content: ""; position: absolute; left: 50%; bottom: .8em; width: 13.6em; height: .5em; margin-left: -6.8em; border-radius: 1em; background: var(--ink); opacity: .5; }
.widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6em; }
.wcell { display: flex; flex-direction: column; align-items: center; gap: .55em; }
.wcell .widget { width: 100%; }
.wname { font-family: var(--sans); font-size: 1.12em; font-weight: 500; color: var(--ink); }
.widget { position: relative; height: 15em; border-radius: 2.5em; overflow: hidden; text-align: left; display: block; box-shadow: 0 1em 2em -1.2em rgba(15, 18, 24, .45); transition: transform .15s; }
.widget:active { transform: scale(.97); }
.w-label { position: absolute; left: 1.5em; top: 1.3em; font-size: 1.05em; letter-spacing: .12em; opacity: .7; }

.w-fire { background: radial-gradient(120% 90% at 50% 100%, #2a1a12 0%, #120f0e 62%); color: #f3e7d3; }
.w-fire.out { background: radial-gradient(120% 90% at 50% 100%, #1c1b1c 0%, #121214 62%); }
.w-fire .pit { position: absolute; left: 50%; bottom: 6em; width: 7em; height: 7em; transform: translateX(-50%); }
.w-fire .flame { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 50% 88%; transform: scale(var(--lv, .6)); filter: drop-shadow(0 0 1.4em rgba(240, 138, 44, .75)); animation: flick 1.7s ease-in-out infinite alternate; }
.w-fire .flame path:first-child { fill: #f08a2c; }
.w-fire .flame path:last-child { fill: #ffe08a; }
.w-fire.out .flame { display: none; }
.w-fire .logs { position: absolute; left: 50%; bottom: .2em; width: 6.4em; height: 1.5em; transform: translateX(-50%); }
.w-fire .logs i { position: absolute; left: 0; right: 0; top: .3em; height: .85em; border-radius: .5em; background: #4a3628; }
.w-fire .logs i:first-child { transform: rotate(13deg); }
.w-fire .logs i:last-child { transform: rotate(-13deg); background: #3a2a20; }
.w-fire.out .logs i { background: #57534f; }
.w-fire.out .logs i:last-child { background: #45413e; }
.w-fire .smoke { display: none; position: absolute; left: 50%; bottom: 1.6em; width: .22em; height: 4.4em; margin-left: -.1em; border-radius: 1em; background: linear-gradient(transparent, rgba(220, 220, 225, .32)); animation: smoke 4s ease-in-out infinite; transform-origin: 50% 100%; }
.w-fire.out .smoke { display: block; }
.w-fire .w-main { position: absolute; left: 1.5em; right: 1.2em; bottom: 2.6em; font-size: 1.36em; font-weight: 600; }
.w-fire .w-sub { position: absolute; left: 1.5em; right: 1em; bottom: 1.2em; font-size: 1.02em; opacity: .62; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes flick { 0% { transform: scale(var(--lv, .6)) skewX(-2.5deg) scaleY(.96); } 50% { transform: scale(var(--lv, .6)) skewX(2deg) scaleY(1.05); } 100% { transform: scale(var(--lv, .6)) skewX(-1deg) scaleY(.99); } }
@keyframes smoke { 0%, 100% { transform: skewX(-6deg) scaleY(.9); opacity: .5; } 50% { transform: skewX(7deg) scaleY(1.1); opacity: 1; } }

.w-sea { background: #0b1016; color: #eef2f4; }
.w-sea img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: drift 26s ease-in-out infinite alternate; }
.w-sea::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 38%, rgba(5, 8, 12, .8)); }
.w-sea .w-main, .w-sea .w-sub { position: absolute; z-index: 1; left: 1.5em; right: 1em; }
.w-sea .w-main { bottom: 2.5em; font-size: 1.5em; font-weight: 600; letter-spacing: .2em; left: 1.36em; }
.w-sea .w-sub { bottom: 1.2em; font-size: 1.02em; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.18) translateX(-3%); } }
.w-pat { background: #ece6db; color: #2a2622; }
.w-pat img { position: absolute; right: .3em; top: .9em; width: 9em; height: 9em; object-fit: contain; mix-blend-mode: multiply; }
.w-pat .w-main { position: absolute; left: 1.5em; right: 1.2em; bottom: 2.6em; font-size: 1.36em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-pat .w-sub { position: absolute; left: 1.5em; right: 1em; bottom: 1.2em; font-size: 1.02em; opacity: .62; font-family: var(--sans); letter-spacing: .02em; }

.grid { flex: 1; display: grid; grid-template-columns: repeat(4, 6.2em); justify-content: space-between; align-content: space-evenly; padding: 1em .3em; }
.app { display: flex; flex-direction: column; align-items: center; gap: .65em; width: 6.2em; }
.app .name { font-family: var(--sans); font-size: 1.12em; font-weight: 500; color: var(--ink); white-space: nowrap; }
.tile { position: relative; width: 6.2em; height: 6.2em; border-radius: 23%; display: grid; place-items: center; background: var(--bg, #333); color: var(--fg, #f3efe4); box-shadow: 0 .7em 1.3em -.8em rgba(15, 18, 24, .6), inset 0 0 0 1px rgba(255, 255, 255, .07); transition: transform .15s, filter .15s; }
.tile::after { content: ""; position: absolute; inset: .52em; border: 1px solid currentColor; border-radius: 20%; opacity: .28; }
.tile .ch { font-size: 3.2em; font-weight: 600; line-height: 1; transform: translateY(-.03em); }
.tile svg { width: 3.1em; height: 3.1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile.logo::after, .tile.sys::after, .tile.fold::after, .tile.nat::after { display: none; }
.tile.nat { background: none; overflow: hidden; }
.tile.nat svg { width: 100%; height: 100%; display: block; fill: none; stroke: none; }
.tile.logo svg { fill: currentColor; stroke: none; width: 3.3em; height: 3.3em; }
.tile.sys { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), 0 .7em 1.3em -.9em rgba(15, 18, 24, .4); -webkit-backdrop-filter: blur(1em); backdrop-filter: blur(1em); }
.tile .tri { font-size: 1.42em; font-weight: 600; letter-spacing: .02em; }
.app:active .tile { transform: scale(.92); filter: brightness(.9); }
.tile.fold { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: stretch; align-content: start; grid-template-columns: repeat(3, 1fr); gap: .36em; padding: .78em; -webkit-backdrop-filter: blur(1em); backdrop-filter: blur(1em); }
.tile.fold i { border-radius: 26%; background: var(--bg); aspect-ratio: 1; }

.search-pill { align-self: center; flex: none; display: flex; align-items: center; gap: .45em; height: 2.9em; padding: 0 1.3em 0 1.1em; margin-bottom: 1.2em; border-radius: 2em; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); -webkit-backdrop-filter: blur(1.6em); backdrop-filter: blur(1.6em); font-family: var(--sans); color: var(--ink2); }
.search-pill svg { width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.search-pill span { font-size: 1.2em; }
.dock { display: grid; grid-template-columns: repeat(4, 6.2em); justify-content: space-between; padding: 1.3em 1.5em; margin: 0 -1.2em; border-radius: 3.2em; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); -webkit-backdrop-filter: blur(1.6em); backdrop-filter: blur(1.6em); }
.dock .name { display: none; }

/* ---------- folder ---------- */
.folder { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2em; animation: fade .25s both; }
.folder h2 { font-size: 2.6em; font-weight: 600; letter-spacing: .3em; margin-right: -.3em; }
.folder-box { width: 31em; padding: 2.6em 2.2em; border-radius: 3.4em; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); -webkit-backdrop-filter: blur(2em); backdrop-filter: blur(2em); display: grid; grid-template-columns: repeat(3, 6.2em); justify-content: space-between; row-gap: 2.2em; animation: pop .32s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* ---------- search ---------- */
.search { position: absolute; inset: 0; z-index: 22; display: flex; flex-direction: column; gap: 2.2em; padding: 6.6em 2em 0; animation: fade .2s both; }
.s-bar { flex: none; display: flex; align-items: center; gap: .8em; height: 4.4em; padding: 0 1.3em; border-radius: 1.5em; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); -webkit-backdrop-filter: blur(2em); backdrop-filter: blur(2em); font-family: var(--sans); animation: pop .28s cubic-bezier(.2, .9, .3, 1.1) both; }
.s-bar svg { flex: none; width: 1.8em; height: 1.8em; fill: none; stroke: var(--ink2); stroke-width: 2; stroke-linecap: round; }
.s-bar input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: max(16px, 1.6em); -webkit-user-select: text; user-select: text; -webkit-appearance: none; appearance: none; }
.s-bar input::-webkit-search-cancel-button { display: none; }
.s-bar button { flex: none; font-size: 1.45em; color: var(--ink2); }
.s-res { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(4, 6.2em); justify-content: space-between; align-content: start; row-gap: 1.9em; padding: .4em .3em 3em; }
.s-none { grid-column: 1 / -1; text-align: center; font-family: var(--sans); font-size: 1.4em; color: var(--ink2); padding-top: 2em; }

/* ---------- app view ---------- */
.appview { position: absolute; inset: 0; z-index: 25; background: var(--app-bg, var(--paper)); color: var(--app-fg, var(--ink)); display: flex; flex-direction: column; padding-top: 5em; transform-origin: var(--ox, 50%) var(--oy, 50%); animation: open .42s cubic-bezier(.2, .85, .25, 1) both; }
.appview.closing { animation: close .3s cubic-bezier(.5, 0, .8, .4) both; }
@keyframes open { from { transform: scale(.16); opacity: 0; border-radius: 9em; } 60% { opacity: 1; } }
@keyframes close { to { transform: scale(.16); opacity: 0; border-radius: 9em; } }
.app-body { position: relative; flex: 1; min-height: 0; background: var(--app-bg, var(--paper)); }
.app-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; opacity: 0; transition: opacity .35s; }
.app-body iframe.ready { opacity: 1; }
.splash { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6em; }
.splash .tile { width: 9em; height: 9em; box-shadow: none; }
.splash .tile .ch { font-size: 4.6em; }
.splash b { font-size: 1.5em; letter-spacing: .3em; margin-right: -.3em; font-weight: 400; opacity: .8; }
.homebar { position: relative; height: 5em; flex: none; display: grid; place-items: center; background: var(--app-bg, var(--paper)); }
.pill { display: flex; align-items: center; gap: .5em; height: 3.3em; padding: 0 1.7em 0 1.4em; border-radius: 2em; background: color-mix(in srgb, currentColor 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 30%, transparent); position: relative; transition: background .15s, transform .15s; touch-action: none; }
.pill::after { content: ""; position: absolute; inset: -.8em -1.5em; }
.pill svg { width: 1.7em; height: 1.7em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pill span { font-size: 1.36em; letter-spacing: .16em; }
.pill:hover { background: color-mix(in srgb, currentColor 24%, transparent); }
.pill:active { transform: scale(.94); }
.ext { position: absolute; right: 1.8em; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-size: 1.5em; opacity: .5; padding: .2em .5em; }
.ext:hover { opacity: 1; }

.splash .need { max-width: 20em; text-align: center; font-family: var(--sans); font-size: 1.3em; line-height: 1.7; opacity: .75; }
.need-go { font-family: var(--sans); font-size: 1.3em; padding: .7em 1.6em; border-radius: 2em; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 35%, transparent); }
.turn { position: absolute; left: 50%; top: 1.4em; transform: translateX(-50%); z-index: 2; padding: .6em 1.3em; border-radius: 2em; background: rgba(10, 12, 16, .78); color: #f1efe6; font-family: var(--sans); font-size: 1.3em; white-space: nowrap; pointer-events: none; animation: rise .4s both; }

/* ---------- landscape: the phone turns on its side, the app stays upright ---------- */
.phone.land { transform: rotate(-90deg) scale(var(--ls, 1)); }
.phone.land .status { display: none; }
.phone.land .appview { inset: auto; left: 50%; top: 50%; width: 100cqh; height: 100cqw; padding-top: 0; transform-origin: 50% 50%; transform: translate(-50%, -50%) rotate(90deg); animation-name: openL; }
@keyframes openL { from { transform: translate(-50%, -50%) rotate(90deg) scale(.3); opacity: 0; } }
.phone.land .homebar { height: 3.9em; }
.phone.land .pill { height: 2.7em; }
.stage:has(.phone.land) .caption { opacity: 0; }

/* ---------- native apps ---------- */
.native { position: absolute; inset: 0; overflow-y: auto; padding: .4em 2em 3em; font-size: 1em; }
.native h1 { font-size: 3.2em; font-weight: 600; margin: .3em .1em .6em; }
.me { display: flex; gap: 1.5em; align-items: center; padding: 1.6em; border-radius: 2em; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.me .chop { flex: none; width: 5.6em; height: 5.6em; border-radius: .9em; background: var(--seal); color: #fbf3e6; display: grid; place-items: center; }
.me .chop span { font-size: 2.6em; font-weight: 600; letter-spacing: -.04em; }
.me b { display: block; font-size: 1.9em; font-weight: 600; }
.me small { display: block; margin-top: .35em; font-family: var(--sans); font-size: 1.15em; line-height: 1.45; color: var(--ink2); }
.native h3 { font-size: 1.15em; font-weight: 400; letter-spacing: .2em; color: var(--ink2); margin: 2.1em 1em .7em; }
.rows { border-radius: 1.8em; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5em; padding: 1.15em 1.5em; font-size: 1em; }
.row + .row { border-top: 1px solid var(--line); }
.row span { font-size: 1.42em; }
.row em { font-style: normal; font-family: var(--sans); font-size: 1.22em; color: var(--ink2); text-align: right; }
a.row em::after { content: " ↗"; opacity: .6; }
.store { padding: 1.4em 1.5em 1.5em; }
.store p { font-size: 1.42em; margin-bottom: .8em; }
.bar { display: flex; height: 1.3em; border-radius: .5em; overflow: hidden; gap: 2px; }
.bar i { background: var(--c); }
.legend { display: flex; flex-wrap: wrap; gap: .5em 1.5em; margin-top: 1em; font-family: var(--sans); }
.legend span { font-size: 1.12em; color: var(--ink2); }
.legend span::before { content: ""; display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--c); margin-right: .45em; }
.row.col { flex-direction: column; align-items: flex-start; gap: .3em; }
.row.col em { text-align: left; font-size: 1.12em; line-height: 1.55; }
.row.col em::after { content: none !important; }
.row.col span i { font-style: normal; font-family: var(--sans); font-size: .72em; color: var(--ink2); margin-left: .7em; }
.p-head { display: flex; flex-direction: column; align-items: center; gap: .45em; padding: 1.2em 0 1.4em; }
.p-head .tile { width: 8.4em; height: 8.4em; margin-bottom: .8em; }
.p-head .tile .ch { font-size: 4.3em; }
.p-head .tile .tri { font-size: 1.9em; }
.p-head .tile svg { width: 4.5em; height: 4.5em; }
.p-head b { font-size: 2.5em; font-weight: 600; }
.p-head small { font-family: var(--sans); font-size: 1.25em; color: var(--ink2); }
.p-ink { display: block; width: 100%; aspect-ratio: 1660 / 500; object-fit: cover; border-radius: 1.5em; box-shadow: inset 0 0 0 1px var(--line); }
.p-cards { display: grid; gap: 1em; margin-top: 1em; }
.p-cards img { display: block; width: 100%; border-radius: 1.2em; }
.p-qr { display: flex; flex-direction: column; align-items: center; gap: .9em; margin: 2.6em 0 .6em; font-family: var(--sans); }
#pQr { width: 13em; height: 13em; padding: .5em; border-radius: 1.3em; background: #fff; box-shadow: 0 .8em 1.6em -1em rgba(15, 18, 24, .4); }
#pQr svg { display: block; width: 100%; height: 100%; }
.p-qr span { font-size: 1.15em; color: var(--ink2); }
.p-go { display: block; margin: 1.8em 0 .6em; padding: .95em 1em; border-radius: 1.7em; text-align: center; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 1.45em; font-weight: 600; }
.todo { padding: 1.5em; border-radius: 1.8em; border: 1.5px dashed var(--ink3); color: var(--ink2); font-size: 1.3em; line-height: 1.7; }



/* ---------- lock screen ---------- */
.lock { position: absolute; inset: 0; z-index: 40; background: var(--paper); display: flex; flex-direction: column; padding: 6.6em 1.8em 0; transition: transform .55s cubic-bezier(.3, .7, .2, 1), opacity .45s; touch-action: none; cursor: pointer; }
.lock::before { content: ""; position: absolute; left: 0; right: 0; top: 31em; height: 21em; background: var(--ink-img) 0% 50% / auto 100% repeat-x; animation: pan 90s linear infinite alternate; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%); mask-image: linear-gradient(to bottom, transparent 0, #000 16%); }
@keyframes pan { to { background-position: 100% 50%; } }
.ui:not(.locked) .lock { transform: translateY(-104%); opacity: 0; pointer-events: none; }
.lk-top { position: relative; text-align: center; }
.lk-lock { display: block; width: 2.3em; height: 2.3em; margin: 0 auto .7em; opacity: .85; }
.lk-date { font-size: 1.7em; letter-spacing: .14em; color: var(--ink2); }
.lk-time { font-size: 9.6em; line-height: 1.08; font-weight: 400; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.lk-poem { margin-top: .5em; font-size: 1.42em; line-height: 1.7; color: var(--ink2); letter-spacing: .1em; min-height: 3.4em; padding: 0 1em; }
.lk-poem small { display: block; font-size: .8em; color: var(--ink3); letter-spacing: .08em; }
.lk-notes { position: relative; margin-top: auto; display: flex; flex-direction: column; gap: .9em; }
.note-card { display: grid; grid-template-columns: 4em 1fr; gap: 1.2em; align-items: center; padding: 1.25em 1.4em; border-radius: 2.2em; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); -webkit-backdrop-filter: blur(1.6em) saturate(1.2); backdrop-filter: blur(1.6em) saturate(1.2); text-align: left; animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.note-card:nth-child(2) { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(2.4em); opacity: 0; } }
.note-card .tile { width: 4em; height: 4em; box-shadow: none; }
.note-card .tile::after { inset: .32em; }
.note-card .tile .ch { font-size: 2.1em; }
.note-card .nc-head { display: flex; justify-content: space-between; align-items: baseline; }
.note-card .nc-head b { font-size: 1.36em; font-weight: 600; }
.note-card .nc-head time { font-family: var(--sans); font-size: 1.05em; color: var(--ink3); }
.note-card p { margin-top: .25em; font-size: 1.3em; line-height: 1.5; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lk-foot { position: relative; height: 9.4em; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .9em; padding-bottom: 1em; }
.lk-btn { position: absolute; bottom: 3.2em; width: 5.2em; height: 5.2em; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); -webkit-backdrop-filter: blur(1.6em); backdrop-filter: blur(1.6em); transition: transform .15s, background .2s, color .2s; }
.lk-btn.l { left: 1.2em; }
.lk-btn svg { width: 2.4em; height: 2.4em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lk-btn:active { transform: scale(1.14); }
.lk-btn.on { background: var(--ink); color: var(--paper); }
.lk-owner { font-size: 1.12em; letter-spacing: .2em; color: var(--ink3); }
.lk-hint { font-size: 1.22em; letter-spacing: .26em; color: var(--ink2); animation: breathe 2.6s ease-in-out infinite; }
.lk-bar { width: 13.6em; height: .52em; border-radius: 1em; background: var(--ink); opacity: .7; }
@keyframes breathe { 50% { opacity: .35; transform: translateY(-.3em); } }

/* ---------- on a real phone: no shell, the page is the screen ---------- */
@media (max-width: 560px), (pointer: coarse) and (max-height: 560px) {
  .scroll, .caption, .key { display: none; }
  .phone { --h: 100dvh; width: 100vw; height: 100dvh; aspect-ratio: auto; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .screen { border-radius: 0; clip-path: none; }
  .status { display: none; }
  .p-qr { display: none; }
  .home { padding-top: max(2.4em, env(safe-area-inset-top)); padding-bottom: max(2em, env(safe-area-inset-bottom)); }
  .lock { padding-top: max(4.4em, calc(env(safe-area-inset-top) + 2.6em)); }
  .search { padding-top: max(2.6em, calc(env(safe-area-inset-top) + 1em)); }
  .lock::before { top: 28em; }
  .appview { padding-top: 0; }
  .homebar { height: calc(5em + env(safe-area-inset-bottom) * .6); padding-bottom: calc(env(safe-area-inset-bottom) * .6); }
}
@media (max-width: 1000px) and (min-width: 561px) { .caption { display: none; } }
/* a real phone held sideways: apps get the whole landscape screen, the home screen asks to be turned back */
@media (pointer: coarse) and (max-height: 560px) and (orientation: landscape) {
  .ui { font-size: min(100cqh / 39, 12px); }
  .homebar { height: 3.6em; padding-bottom: 0; }
  .pill { height: 2.6em; }
  .ui:not(.in-app)::after { content: "把手机竖过来"; position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--paper); font-size: 2em; letter-spacing: .3em; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; } }
