@font-face { font-family: 'Candy'; src: url('../fonts/emilys-candy.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'Logo'; src: url('../fonts/lobster-two-bold-italic.woff2') format('woff2'); font-display: block; }

:root {
  --sat: env(safe-area-inset-top, 20px);
  --sab: env(safe-area-inset-bottom, 0px);
  --f: "Avenir Next", "Avenir", -apple-system, "Helvetica Neue", "PingFang SC", "PingFang TC", sans-serif;
  --blue: #2474F0;
  --teal: #19D3A8;
  --red: #E0334C;
  --slate: #5E6F7D;
  --gray: #8C98A4;
  --line: #E1E5E9;
  --navy: #313B75;
  --ease: cubic-bezier(.22, .8, .24, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--f); color: #222; -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
input { font: inherit; }
#app { position: fixed; inset: 0; overflow: hidden; background: #000; }
/* iOS 26+ blurs the status-bar area of Home Screen web apps ("scroll edge effect") unless a fixed,
   solid box touches the top edge; WebKit then shows that box's colour instead of the blur. */
#sat-strip { position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: #000; z-index: 1000; pointer-events: none; }
.ic { display: block; flex: none; }
.hidden { display: none !important; }

/* ---------- layers & transitions ---------- */
.layer { position: absolute; inset: 0; overflow: hidden; transition: transform .42s var(--ease), opacity .32s ease; will-change: transform; }
.k-right.enter, .k-right.leave { transform: translateX(100%); }
.k-left.enter, .k-left.leave { transform: translateX(-100%); }
.k-up.enter, .k-up.leave { transform: translateY(100%); }
.k-fade.enter, .k-fade.leave { opacity: 0; }
.k-zoom.enter, .k-zoom.leave { opacity: 0; transform: scale(1.06); }
.k-sheet { transition: none; }
.k-sheet > .backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .42); transition: opacity .32s ease; }
.k-sheet > .sheet { position: absolute; left: 0; right: 0; bottom: 0; transition: transform .42s var(--ease); }
.k-sheet.enter > .backdrop, .k-sheet.leave > .backdrop { opacity: 0; }
.k-sheet.enter > .sheet, .k-sheet.leave > .sheet { transform: translateY(100%); }

/* Screen = sizing container so themes can position in cqh/cqw (also used for small previews) */
.screen { position: absolute; inset: 0; container-type: size; overflow: hidden; background: #000; }

/* ---------- shared bits ---------- */
.topbar { position: absolute; left: 0; right: 0; top: 0; padding-top: calc(var(--sat) - 6px); height: calc(var(--sat) + 40px); display: flex; align-items: center; justify-content: space-between; color: #fff; z-index: 5; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.topbar .tb-btn { width: 60px; height: 44px; display: flex; align-items: center; justify-content: center; }
.topbar .tb-btn.right { justify-content: center; }
.topbar .tb-text { font-size: 13px; font-weight: 700; letter-spacing: .6px; }
.topbar.solid { background: #000; }
.hero-bg { position: absolute; inset: 0; background: #000; overflow: hidden; }
.hero-bg img, .detail-bg img { position: absolute; left: 0; top: 50%; width: 100%; transform: translateY(-50%); display: block; }
.hero-bg img.fill, .detail-bg img.fill { top: 0; height: 100%; object-fit: cover; transform: none; }
.scroller { position: absolute; left: 0; right: 0; bottom: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.hero-hit { position: relative; cursor: pointer; }
.arrow { display: inline-block; flex: none; }
.num { font-variant-numeric: lining-nums; }
/* z-index: must sit above the transparent list scroller, or its buttons never receive taps */
.empty-hint { position: absolute; left: 0; right: 0; top: 38cqh; text-align: center; color: #fff; padding: 0 30px; z-index: 4; }
.empty-hint h2 { font-weight: 300; font-size: 26px; margin: 0 0 8px; }
.empty-hint p { margin: 0 0 18px; font-size: 14px; opacity: .85; line-height: 1.5; }
.empty-hint button { background: rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; padding: 11px 20px; border-radius: 22px; font-weight: 600; font-size: 15px; margin: 4px; }

/* ---------- FLAT ---------- */
.t-flat .f-count { position: absolute; left: 0; right: 0; top: 36cqh; transform: translateY(-50%); text-align: center; color: #fff; pointer-events: none; text-shadow: 0 1px 12px rgba(0, 0, 0, .12); }
.f-big { display: inline-flex; align-items: flex-end; justify-content: center; font-weight: 200; font-size: 86px; line-height: .9; letter-spacing: -1px; position: relative; }
.f-big .arrow { width: 13px; height: 13px; stroke-width: 2.6; margin: 0 -17px 8px 4px; }
.f-big .unit { font-size: 15px; font-weight: 600; margin: 0 6px 6px 2px; letter-spacing: 0; }
.f-big .unit:last-child { margin-right: -18px; }
.f-div { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0 8px; }
.f-div i { width: 80px; height: 1.5px; background: currentColor; opacity: .95; }
.f-div .ic { width: 27px; height: 27px; }
.f-ttl { font-size: 17px; font-weight: 500; max-width: 80%; margin: 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-flat .scroller { top: calc(var(--sat) + 40px); }
.t-flat .hero-hit { height: calc(70cqh - var(--sat) - 40px); }
.t-flat .topbar { z-index: 6; }
.f-pill { display: flex; align-items: center; justify-content: center; gap: 6px; width: 197px; height: 26px; border-radius: 4px; background: #5F5F5F; color: #9C9C9C; font-size: 14px; font-weight: 500; }
.f-pill .ic { color: #8A8A8A; }
.f-list { background: #fff; min-height: 31cqh; padding-bottom: calc(var(--sab) + 10px); }
.frow { display: flex; align-items: center; height: 59px; padding: 0 12px 0 16px; position: relative; cursor: pointer; background: #fff; }
.frow::after { content: ''; position: absolute; left: 21px; right: 0; bottom: 0; height: 1px; background: var(--line); }
.frow:active { background: #F4F6F8; }
.frow .ficon { width: 26px; color: var(--slate); margin-right: 17px; }
.frow .ficon .ic { width: 26px; height: 26px; }
.frow .fmain { flex: 1; min-width: 0; }
.frow .ftitle { font-size: 16px; color: #2B2B2B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.frow .fdate { font-size: 12px; color: var(--gray); letter-spacing: .6px; margin-top: 2px; font-weight: 500; }
.frow .fnum { display: flex; align-items: center; font-size: 24px; margin-left: 10px; font-weight: 400; }
.frow .fnum .arrow { width: 13px; height: 13px; stroke-width: 2.8; margin-left: 4px; margin-top: 3px; }
.f-menu { position: absolute; top: calc(var(--sat) + 36px); left: 50%; transform: translateX(-50%); width: 230px; background: #fff; border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); overflow: hidden; z-index: 20; }
.f-menu button { display: flex; width: 100%; padding: 12px 16px; font-size: 15px; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
.f-menu button:last-child { border-bottom: 0; }
.f-menu .ic { color: var(--blue); }

/* ---------- SIMPLICITY / TILES ---------- */
.s-count { position: absolute; left: 26px; right: 20px; color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, .15); }
.s-big { display: flex; align-items: flex-end; font-weight: 700; font-size: 80px; line-height: .86; letter-spacing: -1.5px; }
.s-big .arrow { width: 13px; height: 13px; stroke-width: 3; margin: 0 0 5px 8px; }
.s-big .unit { font-size: 22px; font-weight: 700; margin: 0 4px 4px 2px; letter-spacing: 0; }
.s-ttl { font-size: 17px; font-weight: 600; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-date { font-size: 13px; color: rgba(255, 255, 255, .72); letter-spacing: .5px; margin-top: 2px; font-weight: 500; }
.t-simplicity .scroller { top: 0; }
.t-simplicity .hero-hit { height: 75cqh; }
.t-simplicity .hero-hit .s-count { bottom: 22px; }
.s-list { padding: 0 17px calc(var(--sab) + 24px); min-height: 25cqh; }
.scard { display: flex; align-items: flex-end; background: #fff; border-radius: 14px; padding: 13px 16px 13px 17px; margin-bottom: 9px; cursor: pointer; min-height: 108px; transition: transform .15s; }
.scard:active { transform: scale(.98); }
.scard .smain { flex: 1; min-width: 0; }
.scard .sicon .ic { width: 25px; height: 25px; }
.scard .sicon { margin-bottom: 14px; }
.scard .stitle { font-size: 17px; font-weight: 600; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard .sdate { font-size: 13px; color: #8E8E93; letter-spacing: .5px; margin-top: 3px; font-weight: 500; }
.scard .snum { display: flex; align-items: flex-end; font-weight: 700; font-size: 50px; line-height: .8; letter-spacing: -1px; color: #000; margin-left: 10px; padding-bottom: 6px; }
.scard .snum .arrow { width: 19px; height: 19px; stroke-width: 3.4; margin-left: 5px; margin-bottom: 1px; color: #000; }
.knock { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; background-repeat: no-repeat; background-color: #000; }
.t-tiles .hero-hit { position: absolute; inset: 0; }
.t-tiles .hero-hit .s-count { bottom: calc(23cqh + 16px); }
.tiles { position: absolute; left: 0; right: 0; top: 77cqh; bottom: 0; display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; padding: 0 25px calc(var(--sab) + 6px); scroll-snap-type: x mandatory; scroll-padding: 25px; scrollbar-width: none; overscroll-behavior-x: contain; }
.tiles::-webkit-scrollbar { display: none; }
.tile { flex: none; width: 55cqw; max-height: 170px; background: #fff; border-radius: 14px; padding: 14px 18px; scroll-snap-align: start; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; }
.tile .sicon { margin-bottom: auto; }
.tile .sicon .ic { width: 25px; height: 25px; }
.tile .snum { display: flex; align-items: flex-end; font-weight: 700; font-size: 44px; line-height: .8; letter-spacing: -1px; margin-top: 8px; }
.tile .snum .arrow { width: 17px; height: 17px; stroke-width: 3.4; margin-left: 5px; margin-bottom: 1px; }
.tile .stitle { font-size: 16px; font-weight: 600; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .sdate { font-size: 12.5px; color: #8E8E93; letter-spacing: .5px; margin-top: 3px; font-weight: 500; white-space: nowrap; }
.tiles .tile-add { background: rgba(255, 255, 255, .14); color: #fff; align-items: center; justify-content: center; }

/* ---------- CLASSIC ---------- */
.c-hero { position: absolute; left: 0; right: 0; top: 0; height: 40cqh; overflow: hidden; background: #000; cursor: pointer; }
.c-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.c-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .08) 40%, rgba(0, 0, 0, .2)); }
.c-line { position: absolute; left: 0; right: 0; top: 40cqh; height: 4px; background: #1A8FB5; z-index: 2; }
.c-count { position: absolute; left: 0; right: 0; top: calc(var(--sat) + 44px); bottom: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; z-index: 1; }
.c-big { display: flex; align-items: flex-end; }
.c-big .num { font-family: 'Candy', var(--f); font-size: 66px; line-height: .95; }
.c-big .lbl { font-size: 9px; letter-spacing: .4px; line-height: 1.25; margin: 0 -42px 12px 8px; width: 34px; text-align: left; }
.c-div { display: flex; align-items: center; gap: 12px; margin: 8px 0 6px; }
.c-div i { width: 44px; height: 4px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.c-div .cap { color: #fff; }
.c-div .cap [fill="#fff"] { fill: rgba(0, 0, 0, .6); }
.c-div .cap [stroke="#fff"] { stroke: rgba(0, 0, 0, .6); }
.c-ttl { font-size: 16px; font-weight: 500; }
.c-logo { font-family: 'Logo', cursive; font-size: 27px; color: #fff; letter-spacing: .3px; text-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
.t-classic .scroller { top: calc(40cqh + 4px); background: #fff; }
.c-list { padding: 11px 11px calc(var(--sab) + 20px); min-height: 100%; }
.ccard { display: flex; align-items: center; height: 65px; border-radius: 4px; border: 1.5px solid; padding: 0 12px 0 13px; margin-bottom: 8px; cursor: pointer; }
.ccard:active { filter: brightness(.97); }
.ccard .cicon { color: #222; margin-right: 15px; }
.ccard .cicon .cap, .ccard .cicon .ic { width: 33px; height: 33px; }
.ccard .cmain { flex: 1; min-width: 0; }
.ccard .ctitle { font-size: 16px; font-weight: 700; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard .cdate { font-size: 13px; color: #8A8A8A; letter-spacing: .4px; margin-top: 2px; }
.ccard .cnum { text-align: right; margin-left: 8px; }
.ccard .cnum .num { font-family: 'Candy', var(--f); font-size: 36px; line-height: 1; display: block; }
.ccard .cnum .lbl { font-size: 12px; color: #444; letter-spacing: .3px; margin-top: -2px; white-space: nowrap; }
.t-classic .topbar .tb-text { font-size: 13px; }

/* ---------- DETAIL ---------- */
.detail { background: #000; }
.detail-bg { position: absolute; inset: 0; overflow: hidden; }
.detail .d-tap { cursor: pointer; }
.detail .topbar { background: none; }
.d-bottom { position: absolute; right: 0; bottom: calc(var(--sab) + 4px); left: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 12px; color: #fff; z-index: 5; }
.d-bottom button { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.d-memo { opacity: .95; }
.d-memo.playing { color: var(--teal); }
.fade-swap { transition: opacity .22s ease; }
.fade-swap.out { opacity: 0; }
.detail.t-flat .f-count { position: absolute; left: 0; right: 0; top: 50cqh; transform: translateY(-50%); text-align: center; color: #fff; pointer-events: auto; }
.detail.t-flat .d-tap { display: inline-block; padding: 10px 24px; }
.detail.t-flat .f-big { font-size: 90px; }
.detail.t-simplicity .s-count, .detail.t-tiles .s-count { bottom: auto; top: 71cqh; }
.detail .c-badge { position: absolute; left: 50%; top: 50cqh; width: 196px; height: 196px; margin: -98px 0 0 -98px; color: #fff; transition: transform .45s var(--ease); }
.c-badge svg.outline { position: absolute; inset: 0; width: 100%; height: 100%; }
.c-badge .in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.c-badge .b-ttl { font-family: Didot, "Bodoni 72", Georgia, serif; font-style: italic; font-size: 17px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: -6px; }
.c-badge .b-num { font-family: 'Candy', var(--f); font-size: 58px; line-height: 1.05; margin-top: 2px; }
.c-badge .c-div { margin: 2px 0 4px; }
.c-badge .c-div i { width: 50px; }
.c-badge .seal { width: 25px; height: 25px; }
.c-badge .b-lbl { font-size: 12.5px; letter-spacing: .4px; font-weight: 500; }
.detail.ymd .c-badge { transform: translateY(calc(-50cqh + var(--sat) + 44px + 20cqh - 64px)) scale(.5); }
.c-ymd { position: absolute; left: 0; right: 0; top: 50cqh; transform: translateY(-40%); display: flex; justify-content: center; gap: 44px; color: #fff; opacity: 0; transition: opacity .35s; pointer-events: none; }
.detail.ymd .c-ymd { opacity: 1; }
.c-ymd div { text-align: center; }
.c-ymd .num { font-family: 'Candy', var(--f); font-size: 76px; line-height: 1; display: block; }
.c-ymd .lbl { font-size: 14px; font-weight: 700; letter-spacing: .5px; }

/* ---------- white pages (edit / sheets) ---------- */
.page { position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column; }
.navbar { flex: none; display: flex; align-items: center; height: calc(var(--sat) + 52px); padding: calc(var(--sat) - 4px) 14px 0 16px; background: #000; color: #fff; }
.navbar .nb-x { width: 40px; height: 44px; display: flex; align-items: center; justify-content: flex-start; }
.navbar .nb-title { flex: 1; font-size: 17px; font-weight: 700; letter-spacing: .5px; margin-left: 10px; }
.navbar.light { background: #fff; color: #111; }
.navbar.light .nb-title { font-weight: 400; font-size: 19px; letter-spacing: .6px; }
.pill-btn { background: #fff; color: #1B58D0; font-size: 12px; font-weight: 700; letter-spacing: .7px; padding: 8px 14px; border-radius: 16px; min-width: 66px; }
.navbar.light .pill-btn, .pill-btn.blue { background: var(--blue); color: #fff; }

.sheetpage { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--sat) + 8px); background: #fff; border-radius: 12px 12px 0 0; display: flex; flex-direction: column; overflow: hidden; }
.sheetpage .navbar { height: 60px; padding-top: 4px; }
.sheet-grab { position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: #D5D8DC; }

/* edit */
.edit .e-head { position: relative; flex: none; height: 167px; overflow: hidden; background: #333; }
.edit .e-head .e-img { position: absolute; inset: 0; background-size: cover; background-position: center 18%; }
.edit .e-head .e-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.05), rgba(0,0,0,.28)); }
.edit .e-head .e-count { position: absolute; left: 22px; right: 16px; bottom: 16px; color: #fff; }
.edit .e-head .s-big { font-size: 72px; }
.edit .e-head .s-ttl { margin-top: 6px; }
.edit .e-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 22px calc(var(--sab) + 10px); }
.e-title { width: 100%; border: 0; outline: 0; font-size: 17px; color: var(--blue); padding: 18px 0 16px; background: none; -webkit-user-select: text; user-select: text; }
.e-title::placeholder { color: #BFC4CA; }
.erow { display: flex; align-items: center; min-height: 52px; font-size: 17px; color: #1E1E1E; cursor: pointer; }
.erow .ev { margin-left: auto; color: var(--blue); display: flex; align-items: center; gap: 10px; text-align: right; font-weight: 500; }
.erow .ev .ic { color: #BFC5CC; }
.erow.sep { border-bottom: 1px solid var(--line); }
.esep { height: 1px; background: var(--line); margin: 6px 0; }
.toggle { position: relative; width: 51px; height: 31px; border-radius: 16px; background: #E6EBEF; transition: background .25s; flex: none; margin-left: auto; }
.toggle::after { content: ''; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.toggle.on { background: var(--teal); }
.toggle.on::after { transform: translateX(20px); }
.gbtn { display: flex; align-items: center; height: 58px; border-radius: 12px; background: #F2F3F5; padding: 0 20px; font-size: 17px; color: #4A4F55; margin: 14px 0 0; width: 100%; text-align: left; }
.gbtn .ic { margin-left: auto; color: #8F959B; }
.gbtn.rec { background: #2474F0; color: #fff; }
.gbtn.rec .ic { color: #fff; }
.memo-row { display: flex; gap: 10px; margin-top: 14px; }
.memo-row .memo-play { flex: 1; position: relative; overflow: hidden; margin: 0; }
.memo-row .memo-play .prog { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #D3D5D9; }
.memo-row .memo-play span, .memo-row .memo-play .ic { position: relative; }
.memo-row .memo-play .ic { color: var(--blue); }
.memo-row .memo-del { width: 58px; flex: none; justify-content: center; padding: 0; margin: 0; }
.memo-row .memo-del .ic { margin: 0; color: #F2304B; }
.e-delete { display: block; width: calc(100% + 44px); margin: 22px -22px 0; padding: 26px 0; border-top: 1px solid var(--line); color: #D8344A; font-size: 17px; letter-spacing: .8px; font-weight: 500; text-align: center; }

/* lists in sheets (category, repeat, photos, export) */
.plist { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 14px 0 calc(var(--sab) + 20px); }
.prow { display: flex; align-items: center; height: 52px; padding: 0 22px 0 16px; font-size: 17px; color: #222; cursor: pointer; background: #fff; position: relative; }
.prow .pic { color: var(--slate); width: 28px; margin-right: 18px; display: flex; justify-content: center; }
.prow .pic .ic { width: 27px; height: 27px; }
.prow .pcheck { margin-left: auto; color: var(--blue); }
.prow:active { background: #F5F6F8; }
.prow.simple { padding-left: 22px; }
.psep { height: 1px; background: var(--line); margin: 10px 22px 16px; }
.padd { margin: 0 22px; width: calc(100% - 44px); }
.swipe-wrap { position: relative; overflow: hidden; }
.swipe-wrap .swipe-del { position: absolute; right: 0; top: 0; bottom: 0; width: 88px; background: #FF3B30; color: #fff; font-size: 17px; }
.swipe-wrap .prow { transition: transform .25s var(--ease); touch-action: pan-y; }
.swipe-wrap.dragging .prow { transition: none; }

/* photos / backgrounds */
.album { display: flex; align-items: center; padding: 12px 22px; cursor: pointer; }
.album .thumb { width: 72px; height: 72px; border-radius: 2px; object-fit: cover; flex: none; background: #EEF0F3; display: flex; align-items: center; justify-content: center; color: #9AA2AA; box-shadow: 0 -3px 0 -1px #fff, 0 -4px 0 -1px #ccc; }
.album .aname { font-size: 17px; font-weight: 600; color: #333; margin-left: 20px; }
.album .ic.chev { margin-left: auto; color: #C4C9CE; }
.album .asub { font-size: 13px; color: #8E8E93; margin: 3px 0 0 20px; font-weight: 400; }
.bg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; }
.bg-grid button { position: relative; aspect-ratio: 9 / 16; overflow: hidden; }
.bg-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-grid .sel::after { content: ''; position: absolute; inset: 0; border: 3px solid var(--blue); }

/* settings */
.settings { background: var(--navy); color: #fff; padding: calc(var(--sat) - 4px) 22px calc(var(--sab) + 20px); overflow-y: auto; }
.settings .st-x { width: 44px; height: 44px; display: flex; align-items: center; margin-left: -4px; }
.settings .strow { display: flex; align-items: center; min-height: 46px; font-size: 16.5px; cursor: pointer; }
.settings .strow .sv { margin-left: auto; display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .6); font-size: 14px; }
.settings .strow .sv .ic { color: rgba(255, 255, 255, .7); }
.settings .toggle { background: rgba(255, 255, 255, .28); }
.settings .toggle.on { background: var(--teal); }
.settings .stsep { height: 1px; background: rgba(255, 255, 255, .22); margin: 18px 0 14px; }
.settings .st-foot { margin-top: 36px; font-size: 12.5px; line-height: 1.6; color: rgba(255, 255, 255, .5); }

/* theme picker */
.th-car { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 30px calc(50% - 150px) 0; scrollbar-width: none; align-items: flex-start; }
.th-car::-webkit-scrollbar { display: none; }
.th-item { flex: none; width: 300px; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; }
.th-frame { position: relative; width: 286px; height: 430px; border: 3px solid transparent; border-radius: 4px; overflow: hidden; background: #000; }
.th-item.sel .th-frame { border-color: #2B9BE0; }
.th-item:not(.sel) .th-frame { transform: scale(.94); transition: transform .2s; }
.th-frame .th-scale { position: absolute; left: 0; top: 0; width: 393px; height: 582px; transform: scale(.7125); transform-origin: 0 0; pointer-events: none; }
.th-frame .th-scale .screen { --sat: 26px; --sab: 0px; }
.th-check { position: absolute; right: 0; top: 0; width: 22px; height: 22px; background: #2B9BE0; color: #fff; display: none; align-items: center; justify-content: center; z-index: 3; }
.th-item.sel .th-check { display: flex; }
.th-name { margin-top: 16px; font-size: 15px; color: #444; }
.th-dots { display: flex; justify-content: center; gap: 9px; padding: 10px 0 calc(var(--sab) + 30px); }
.th-dots i { width: 7px; height: 7px; border-radius: 50%; background: #C8CED4; }
.th-dots i.on { background: #5E6F7D; }

/* export */
.ex-row { display: flex; align-items: center; padding: 10px 22px; gap: 14px; cursor: pointer; }
.ex-row .cb { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #C4CAD0; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.ex-row.on .cb { background: var(--blue); border-color: var(--blue); }
.ex-row .ex-t { font-size: 16px; color: #222; }
.ex-row .ex-d { font-size: 12px; color: var(--gray); letter-spacing: .5px; margin-top: 2px; }
.ex-foot { flex: none; padding: 12px 22px calc(var(--sab) + 16px); border-top: 1px solid var(--line); }
.ex-foot .note { font-size: 12.5px; color: #8E8E93; line-height: 1.5; margin-bottom: 12px; }
.big-btn { display: block; width: 100%; height: 50px; border-radius: 12px; background: var(--blue); color: #fff; font-size: 17px; font-weight: 600; }
.big-btn:disabled { opacity: .45; }

/* passcode */
.passcode { background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; padding-top: calc(var(--sat) + 60px); }
.passcode .pc-x { position: absolute; left: 16px; top: calc(var(--sat) - 4px); width: 44px; height: 44px; display: flex; align-items: center; }
.passcode .pc-title { font-size: 19px; font-weight: 500; margin-top: 18px; }
.passcode .pc-sub { font-size: 13px; opacity: .6; margin-top: 6px; height: 18px; }
.passcode .pc-dots { display: flex; gap: 22px; margin: 30px 0 44px; }
.passcode .pc-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #fff; }
.passcode .pc-dots i.on { background: #fff; }
.passcode .pc-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.pc-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px 26px; }
.pc-pad button { width: 76px; height: 76px; border-radius: 50%; background: rgba(255, 255, 255, .12); font-size: 30px; font-weight: 300; display: flex; align-items: center; justify-content: center; }
.pc-pad button:active { background: rgba(255, 255, 255, .35); }
.pc-pad button.blank { background: none; }

/* alert */
.k-alert { display: flex; align-items: center; justify-content: center; transition: opacity .2s; }
.k-alert.enter, .k-alert.leave { opacity: 0; }
.k-alert .backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .3); }
.alert { position: relative; width: 272px; border-radius: 14px; background: rgba(246, 246, 247, .96); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); text-align: center; overflow: hidden; transition: transform .25s var(--ease); font-family: -apple-system, var(--f); }
.k-alert.enter .alert { transform: scale(1.12); }
.alert .al-body { padding: 19px 16px 18px; }
.alert .al-title { font-size: 17px; font-weight: 600; color: #000; }
.alert .al-msg { font-size: 13px; color: #111; margin-top: 4px; line-height: 1.35; }
.alert input { width: 100%; margin-top: 16px; height: 30px; border-radius: 6px; border: 1px solid #C9C9CD; padding: 0 7px; font-size: 16px; background: #fff; outline: 0; -webkit-user-select: text; user-select: text; }
.alert .al-btns { display: flex; border-top: 1px solid rgba(60, 60, 67, .22); }
.alert .al-btns button { flex: 1; height: 44px; font-size: 17px; color: #147EFB; }
.alert .al-btns button + button { border-left: 1px solid rgba(60, 60, 67, .22); }
.alert .al-btns button.bold { font-weight: 600; }
.alert .al-btns button.danger { color: #FF3B30; }
.alert .al-btns.vertical { flex-direction: column; }
.alert .al-btns.vertical button + button { border-left: 0; border-top: 1px solid rgba(60, 60, 67, .22); }

/* wheel picker */
.wheel-sheet { background: #fff; padding-bottom: var(--sab); }
.wheels { position: relative; display: flex; justify-content: center; height: 252px; overflow: hidden; }
.wheel { height: 252px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.wheel::-webkit-scrollbar { display: none; }
.wheel .wpad { height: 108px; }
.wheel .wi { height: 36px; line-height: 36px; font-size: 21px; color: #999; scroll-snap-align: center; white-space: nowrap; padding: 0 10px; transition: color .1s; cursor: pointer; }
.wheel .wi.c { color: #000; font-size: 23px; }
.wheel .wi.dim { color: #D6D6D6; }
.wheels .band { position: absolute; left: 0; right: 0; top: 108px; height: 36px; border-top: 1px solid #DADADA; border-bottom: 1px solid #DADADA; pointer-events: none; }

/* toast & install guide */
.toast { position: absolute; left: 50%; bottom: calc(var(--sab) + 40px); transform: translateX(-50%); background: rgba(30, 30, 30, .9); color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 14px; z-index: 100; white-space: nowrap; transition: opacity .3s; }
.install { position: absolute; left: 12px; right: 12px; bottom: calc(var(--sab) + 12px); background: #fff; border-radius: 16px; padding: 18px 18px 14px; z-index: 90; box-shadow: 0 10px 50px rgba(0, 0, 0, .5); font-size: 15px; line-height: 1.5; color: #222; }
.install b { font-weight: 600; }
.install .ic { display: inline-block; vertical-align: -5px; color: var(--blue); }
.install .row { display: flex; justify-content: flex-end; margin-top: 10px; }
.install .row button { color: var(--blue); font-weight: 600; padding: 6px 4px; }

/* safety: cloud backup, versions, recently deleted */
.settings .strow .sv.warn { color: #FFC56B; }
.plist.safety { padding: 10px 22px calc(var(--sab) + 30px); }
.sf-hero { width: 72px; height: 72px; border-radius: 50%; margin: 18px auto 14px; display: flex; align-items: center; justify-content: center; }
.sf-hero.off { background: #EEF2F6; color: #5E6F7D; }
.sf-hero.ok { background: #E3F8F1; color: #10A37F; }
.sf-hero.warn { background: #FFF4E0; color: #D98A00; }
.sf-status { text-align: center; font-size: 17px; font-weight: 600; color: #222; }
.sf-p { font-size: 15px; line-height: 1.5; color: #444; margin: 10px 0 18px; }
.sf-p.sf-small { font-size: 13px; color: #8E8E93; text-align: center; margin: 6px 0 14px; }
.sf-note { font-size: 12.5px; line-height: 1.5; color: #8E8E93; margin: 12px 0 0; }
.sf-pad { padding: 14px 22px; margin: 0; }
.gbtn.sf-center { justify-content: center; font-weight: 600; color: var(--blue); }
.sf-card { margin-top: 22px; border-top: 1px solid var(--line); }
.sf-row { display: flex; justify-content: space-between; align-items: center; min-height: 52px; font-size: 17px; border-bottom: 1px solid var(--line); cursor: pointer; }
.sf-row .sf-v { color: var(--blue); }
.sf-code { font-family: ui-monospace, Menlo, monospace; font-size: 19px; letter-spacing: 1px; text-align: center; background: #F5F6F8; border-radius: 10px; padding: 14px 8px; margin: 14px 0 0; color: #111; -webkit-user-select: all; user-select: all; }
.sf-code.big { font-size: 22px; padding: 20px 8px; }
.sf-check { display: flex; align-items: center; gap: 10px; font-size: 15px; margin: 22px 0 14px; color: #333; }
.sf-check input { width: 22px; height: 22px; }
.sf-off { display: block; width: 100%; margin-top: 30px; padding: 14px; color: #D8344A; font-size: 16px; }
.sf-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--teal); border-radius: 5px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.prow.ver { height: auto; min-height: 60px; padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ver-sub { font-size: 12.5px; color: var(--gray); letter-spacing: .3px; margin-top: 2px; }
