/* 女神唔好Cut線 — 夜晚手機 UI（成個遊戲就係一部手機） */
:root {
  --bg0: #110d24; --bg1: #1f1742; --bg2: #3b1d55;
  --pink: #ff6f9f; --peach: #ffb38a; --mint: #5ee6c0; --sky: #8ecbff; --gold: #ffd36e; --red: #ff4d6d; --violet: #a98bff;
  --ink: #fff; --muted: rgba(255, 255, 255, .66); --dim: rgba(255, 255, 255, .4);
  --glass: rgba(255, 255, 255, .07); --glass2: rgba(255, 255, 255, .12); --line: rgba(255, 255, 255, .13);
  --font: 'Chiron GoRound TC', 'Noto Sans TC', 'PingFang HK', 'Microsoft JhengHei', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; color: var(--ink); font-family: var(--font); }
body {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 111, 159, .28) 0 3px, transparent 4px),
    radial-gradient(circle at 82% 26%, rgba(142, 203, 255, .3) 0 4px, transparent 5px),
    radial-gradient(circle at 70% 78%, rgba(255, 211, 110, .25) 0 3px, transparent 4px),
    radial-gradient(circle at 25% 70%, rgba(169, 139, 255, .3) 0 5px, transparent 6px),
    radial-gradient(ellipse at 50% 120%, #4a1e5c 0%, transparent 60%),
    linear-gradient(180deg, #0b0918, #160f2c);
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; }
#app { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; }
#phone {
  position: relative; width: 100%; max-width: 430px; height: 100%; max-height: 940px; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -10%, var(--glowA, rgba(255, 111, 159, .35)), transparent 55%),
    radial-gradient(ellipse at 110% 70%, var(--glowB, rgba(142, 203, 255, .16)), transparent 50%),
    linear-gradient(180deg, var(--bg1), var(--bg0) 65%);
  display: flex; flex-direction: column; transition: background .6s;
}
@media (min-width: 600px) and (min-height: 700px) {
  #phone { height: calc(100% - 48px); border-radius: 42px; box-shadow: 0 0 0 10px #06050d, 0 0 0 11px #2d2645, 0 30px 90px rgba(0, 0, 0, .7); }
}

/* 狀態列 */
.statusbar { height: 34px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; font-size: 13px; font-weight: 600; z-index: 6; }
.sb-right { display: flex; align-items: center; gap: 8px; }
.sb-signal { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.sb-signal i { width: 3px; background: #fff; border-radius: 1px; }
.sb-signal i:nth-child(1) { height: 4px; } .sb-signal i:nth-child(2) { height: 6px; } .sb-signal i:nth-child(3) { height: 8px; } .sb-signal i:nth-child(4) { height: 11px; }
.batt { padding: 1px 7px; border-radius: 8px; border: 1.5px solid rgba(255, 255, 255, .7); font-size: 11px; }
.batt.low { color: #fff; background: var(--red); border-color: var(--red); }
.batt.full { border-color: var(--mint); color: var(--mint); }
.batt.blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }

#screen { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.scr { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: fadein .28s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

/* 通用按鈕 */
.btn { display: block; width: 100%; padding: 14px 16px; border-radius: 18px; background: var(--glass2); border: 1px solid var(--line); font-weight: 600; font-size: 16px; transition: transform .12s, background .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--pink), var(--peach)); border: 0; color: #2a0f24; font-weight: 800; box-shadow: 0 8px 24px rgba(255, 111, 159, .35); }
.btn.green { background: linear-gradient(135deg, #3ee08f, #22b573); border: 0; color: #062a17; font-weight: 800; box-shadow: 0 8px 26px rgba(62, 224, 143, .35); }
.btn.small { width: auto; display: inline-block; padding: 8px 12px; font-size: 14px; border-radius: 14px; }
.btn.ghost { background: transparent; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* 頭像 */
.av { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, var(--c1, #888), var(--c2, #555)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); overflow: hidden; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av.lg { width: 88px; height: 88px; font-size: 36px; }
.av.xl { width: 112px; height: 112px; font-size: 46px; }
.av.dead { filter: grayscale(1) brightness(.7); }
.av img { object-position: 50% 40%; }

/* 寫實相：準備頁大相、撥號同通話嘅背景（好似手機來電畫面） */
.hero { position: relative; margin: -16px -16px 10px; height: 320px; border-radius: 24px 24px 0 0; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(17, 13, 36, .9)); }
.hero .hn { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; text-align: left; }
.hero .hn h2 { margin: 0 0 2px; font-size: 24px; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.poster { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: 50% 16%; opacity: .42; transition: filter .8s, opacity .8s; pointer-events: none; }
.poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 13, 36, .15) 0%, rgba(17, 13, 36, .62) 42%, rgba(17, 13, 36, .94) 100%); }
.poster.bright { opacity: .8; }
.poster.dead { filter: grayscale(1); opacity: .22; }
.call > :not(.poster):not(.stat-pop), .dial > :not(.poster):not(.hint) { position: relative; z-index: 1; }
.dial .hint { z-index: 1; }

/* 標題 */
.title { align-items: center; justify-content: center; text-align: center; padding: 20px 28px 28px; gap: 10px; }
.ringer { position: relative; width: 120px; height: 120px; margin-bottom: 8px; display: grid; place-items: center; }
.ringer b { font-size: 54px; filter: drop-shadow(0 6px 16px rgba(255, 111, 159, .6)); animation: shake 2.4s infinite; }
.ringer i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 111, 159, .5); animation: ring 2.4s infinite; }
.ringer i:nth-child(2) { animation-delay: .8s; } .ringer i:nth-child(3) { animation-delay: 1.6s; }
@keyframes ring { from { transform: scale(.55); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@keyframes shake { 0%, 60%, 100% { transform: rotate(0); } 64%, 72%, 80% { transform: rotate(-14deg); } 68%, 76% { transform: rotate(14deg); } }
.logo { margin: 0; font-size: 46px; line-height: 1.08; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(120deg, #fff 10%, var(--peach) 45%, var(--pink) 80%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(255, 111, 159, .35)); }
.logo small { display: block; font-size: 22px; letter-spacing: 6px; }
.logo-en { margin: 0; font-size: 11px; letter-spacing: 3px; color: var(--muted); }
.tagline { margin: 6px 0 10px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.namebox { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); margin-bottom: 4px; }
.namebox span { color: var(--muted); font-size: 14px; flex: none; }
.namebox input { flex: 1; min-width: 0; background: none; border: 0; color: #fff; font-size: 17px; font-weight: 700; outline: none; }
.title .btn { margin-top: 4px; }
.title .row { width: 100%; }
.ver { margin-top: 10px; font-size: 11px; color: var(--dim); }

/* 序幕 */
.intro { justify-content: center; padding: 30px; gap: 18px; }
.intro p { margin: 0; font-size: 18px; line-height: 1.7; opacity: 0; transform: translateY(6px); transition: .6s var(--ease); }
.intro p.on { opacity: 1; transform: none; }
.intro p em { font-style: normal; color: var(--peach); }
.intro .btn { opacity: 0; transition: .5s; } .intro .btn.on { opacity: 1; }

/* 通訊錄 */
.top { display: flex; align-items: center; gap: 10px; padding: 6px 18px 10px; }
.top h2 { margin: 0; font-size: 26px; flex: 1; }
.top .back { font-size: 15px; color: var(--sky); padding: 6px 0; }
.appnote { margin: 0 16px 10px; padding: 10px 12px; border-radius: 14px; background: rgba(169, 139, 255, .14); border: 1px solid rgba(169, 139, 255, .3); font-size: 13px; color: #e6dcff; line-height: 1.5; }
.contacts .scroll { flex: 1; padding: 0 12px 12px; }
.sect { margin: 14px 8px 6px; font-size: 12px; color: var(--dim); letter-spacing: 1px; }
.clist { list-style: none; margin: 0; padding: 0; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); overflow: hidden; }
.clist li + li { border-top: 1px solid var(--line); }
.citem { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; text-align: left; }
.citem:active { background: var(--glass2); }
.citem .info { flex: 1; min-width: 0; }
.citem .nm { font-weight: 700; font-size: 16px; }
.citem .sb { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.citem .meta { text-align: right; font-size: 11px; color: var(--muted); flex: none; }
.citem .stars { color: var(--gold); font-size: 11px; letter-spacing: 1px; }
.citem.struck .nm { text-decoration: line-through; color: var(--dim); }
.tabbar { flex: none; display: flex; border-top: 1px solid var(--line); background: rgba(10, 8, 22, .6); backdrop-filter: blur(12px); padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { flex: 1; padding: 10px 0 12px; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tabbar button b { font-size: 20px; font-weight: 400; }
.tabbar button.on { color: #fff; }

/* 準備 */
.prep .scroll { flex: 1; padding: 0 16px 16px; }
.pcard { text-align: center; padding: 16px 16px 14px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line); }
.pcard .av { margin: 0 auto 8px; }
.pcard h2 { margin: 4px 0 2px; font-size: 22px; }
.pcard .who { font-size: 13px; color: var(--muted); }
.pcard .stars { color: var(--gold); margin: 6px 0; letter-spacing: 2px; }
.pcard .bio { font-size: 14px; line-height: 1.7; color: #eee; text-align: left; margin: 8px 0 10px; }
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.chip { padding: 7px 11px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); font-size: 13px; }
.h3 { margin: 18px 4px 8px; font-size: 13px; color: var(--dim); letter-spacing: 1px; }
.prow { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); margin-bottom: 8px; }
.prow .pi { font-size: 22px; flex: none; }
.prow .pt { flex: 1; font-size: 14px; line-height: 1.4; }
.prow .pt small { display: block; color: var(--muted); font-size: 12px; }
.prow.warn { border-color: rgba(255, 77, 109, .55); background: rgba(255, 77, 109, .1); }
.prow.ok { border-color: rgba(94, 230, 192, .45); }
.prep .foot { flex: none; padding: 10px 16px 16px; }
.loopnote { text-align: center; font-size: 12px; color: var(--dim); margin: 8px 0 0; }

/* 撥號中 */
.dial { position: relative; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
.dial .nm { font-size: 28px; font-weight: 800; }
.dial .st { color: var(--muted); font-size: 15px; }
.dial .av { animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .35); } 100% { box-shadow: 0 0 0 26px rgba(255, 255, 255, 0); } }
.dial .hint { position: absolute; bottom: 40px; font-size: 12px; color: var(--dim); }

/* 通話 */
.call { position: relative; }
.chead { flex: none; display: flex; align-items: center; gap: 12px; padding: 6px 16px 10px; }
.chead .av { width: 58px; height: 58px; font-size: 25px; }
.chead .av.talk { animation: talk .9s infinite; }
@keyframes talk { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .4), inset 0 0 0 2px rgba(255, 255, 255, .25); } 50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0), inset 0 0 0 2px rgba(255, 255, 255, .25); } }
.chead .mood { position: absolute; right: -4px; bottom: -4px; font-size: 20px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.chead .avwrap { position: relative; }
.chead .nm { font-weight: 800; font-size: 18px; }
.chead .tm { font-size: 13px; color: var(--mint); font-variant-numeric: tabular-nums; }
.chead .tm.late { color: var(--peach); } .chead .tm.over { color: var(--red); }
.chead .tone { font-size: 12px; color: var(--muted); margin-top: 1px; }
.chead .grow { flex: 1; min-width: 0; }
.live { display: none; align-self: flex-start; padding: 4px 8px; border-radius: 10px; background: #ff2d55; font-size: 12px; font-weight: 800; white-space: nowrap; animation: livepulse 1.6s infinite; }
.live.on { display: inline-block; }
@keyframes livepulse { 50% { box-shadow: 0 0 0 6px rgba(255, 45, 85, 0); } 0% { box-shadow: 0 0 0 0 rgba(255, 45, 85, .6); } }
.mind { flex: none; display: none; gap: 10px; padding: 0 16px 8px; font-size: 12px; color: var(--muted); }
.mind.on { display: flex; }
.mind .bar { flex: 1; display: flex; align-items: center; gap: 6px; }
.mind .bar i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; position: relative; }
.mind .bar i b { position: absolute; inset: 0 auto 0 0; border-radius: 3px; transition: width .5s var(--ease); }
.mind .aff b { background: linear-gradient(90deg, var(--pink), var(--peach)); }
.mind .pat b { background: linear-gradient(90deg, var(--sky), var(--mint)); }
.items { flex: none; display: flex; gap: 6px; padding: 0 16px 6px; font-size: 12px; color: var(--muted); }
.items:empty { display: none; }
.items span { padding: 3px 8px; border-radius: 10px; background: var(--glass2); }

.log { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; }
.log::-webkit-scrollbar { display: none; }
.bub { max-width: 82%; padding: 10px 13px; border-radius: 18px; font-size: 15px; line-height: 1.55; word-break: break-word; animation: pop .22s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.bub.her { align-self: flex-start; background: #fff; color: #2a2140; border-bottom-left-radius: 6px; }
.bub.me { align-self: flex-end; background: linear-gradient(135deg, var(--pink), #ff8f7a); color: #fff; border-bottom-right-radius: 6px; }
.bub.me.silent { background: transparent; border: 1.5px dashed rgba(255, 255, 255, .35); color: var(--muted); }
.bub.typing { color: #8a80a6; letter-spacing: 3px; }
.bgline { align-self: center; max-width: 90%; text-align: center; font-size: 12.5px; color: #cfc4ff; font-style: italic; opacity: .85; }
.sysline { align-self: center; padding: 4px 10px; border-radius: 10px; background: var(--glass2); font-size: 12px; color: var(--muted); }
.sysline.learn { background: rgba(94, 230, 192, .14); color: var(--mint); }
.sysline.mine { background: rgba(255, 77, 109, .14); color: #ffb0bf; }
.sysline.end { background: rgba(255, 77, 109, .2); color: #ffc1cc; font-weight: 700; }
.sysline.bye { background: rgba(142, 203, 255, .16); color: var(--sky); font-weight: 700; }
.stat-pop { position: absolute; right: 18px; top: 70px; font-size: 13px; font-weight: 800; pointer-events: none; animation: floatup 1.4s forwards; }
@keyframes floatup { to { transform: translateY(-26px); opacity: 0; } }

.choices { flex: none; position: relative; padding: 12px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(14, 10, 30, .78); backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; max-height: 56%; overflow-y: auto; }
.choices.hide { display: none; }
.silbar { position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--mint); transform-origin: left; }
.silbar.run { transition: transform linear, background 1s; }
.silbar.hurry { background: var(--red); }
.opt { text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--glass2); border: 1px solid var(--line); font-size: 15px; line-height: 1.45; transition: transform .1s, background .2s; animation: pop .25s var(--ease) both; }
.opt:active { transform: scale(.98); background: rgba(255, 255, 255, .2); }
.opt.silent { border-style: dashed; color: var(--muted); }
.opt.danger { border-color: rgba(255, 77, 109, .8); }
.opt.danger::before { content: '⚠️ '; }
.opt.bad { border-color: rgba(255, 77, 109, .8); color: #ffb0bf; }
.opt.bad::before { content: '❌ '; }
.opt.last { background: rgba(255, 255, 255, .05); }
.cfoot { flex: none; display: flex; justify-content: space-around; padding: 6px 12px 10px; background: rgba(14, 10, 30, .78); }
.cfoot button { width: 52px; height: 52px; border-radius: 50%; background: var(--glass2); font-size: 20px; display: grid; place-items: center; }
.cfoot button.on { background: #fff; }
.cfoot button.hang { background: #ff3b5c; }
.cfoot button small { display: none; }

/* 結局 */
.ending { align-items: stretch; padding: 0 18px 16px; }
.ending .scroll { flex: 1; text-align: center; padding-top: 10px; }
.end-kick { font-size: 12px; color: var(--muted); letter-spacing: 2px; }
.stamp { width: 108px; height: 108px; margin: 16px auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; font-weight: 800;
  border: 5px solid var(--rk); color: var(--rk); transform: rotate(-10deg); animation: stamp .5s var(--ease) both; box-shadow: 0 0 40px color-mix(in srgb, var(--rk) 40%, transparent); }
.stamp small { display: block; font-size: 12px; letter-spacing: 2px; margin-top: -8px; }
@keyframes stamp { from { transform: rotate(-10deg) scale(2.4); opacity: 0; } }
.end-title { margin: 4px 0 2px; font-size: 26px; }
.end-who { font-size: 12px; color: var(--muted); }
.end-text { white-space: pre-line; text-align: left; font-size: 15px; line-height: 1.8; padding: 14px 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); margin: 14px 0 10px; }
.new { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 10px; background: var(--gold); color: #3a2600; font-weight: 800; font-size: 12px; animation: blink 1.2s steps(2) 3; }
.end-notes { display: flex; flex-direction: column; gap: 6px; text-align: left; font-size: 13px; }
.end-notes div { padding: 8px 12px; border-radius: 12px; background: var(--glass); }
.end-notes .m { color: #ffb0bf; } .end-notes .l { color: var(--mint); }
.ending .foot { flex: none; display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }

/* 遮罩頁（筆記、圖鑑、設定、廣告） */
#overlay { position: absolute; inset: 0; z-index: 20; background: rgba(6, 4, 14, .72); backdrop-filter: blur(6px); display: flex; flex-direction: column; justify-content: flex-end; animation: fadein .2s; }
#overlay[hidden] { display: none; }
.sheet { max-height: 92%; display: flex; flex-direction: column; background: linear-gradient(180deg, #2a2050, #17112f); border-radius: 28px 28px 0 0; border-top: 1px solid var(--line); animation: up .3s var(--ease); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet .sh { flex: none; display: flex; align-items: center; padding: 16px 18px 8px; gap: 10px; }
.sheet .sh h3 { margin: 0; flex: 1; font-size: 19px; }
.sheet .sh .x { width: 34px; height: 34px; border-radius: 50%; background: var(--glass2); font-size: 16px; }
.sheet .sb2 { overflow-y: auto; padding: 4px 18px 22px; scrollbar-width: none; }
.sheet .sb2::-webkit-scrollbar { display: none; }
.tabs { display: flex; gap: 6px; padding: 0 18px 8px; flex: none; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; padding: 7px 12px; border-radius: 12px; background: var(--glass); font-size: 13px; color: var(--muted); }
.tabs button.on { background: #fff; color: #2a2140; font-weight: 700; }
.nb h4 { margin: 16px 0 8px; font-size: 14px; color: var(--muted); }
.nb ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nb li { padding: 9px 12px; border-radius: 12px; background: var(--glass); font-size: 14px; line-height: 1.5; }
.nb li.unk { color: var(--dim); }
.nb li.mine { background: rgba(255, 77, 109, .1); color: #ffc2cd; }
.nb .head { display: flex; align-items: center; gap: 12px; }
.nb .head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ecard { text-align: left; padding: 10px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); min-height: 64px; }
.ecard .rk { display: inline-block; min-width: 26px; text-align: center; padding: 1px 6px; border-radius: 8px; font-size: 11px; font-weight: 800; color: #1a1430; background: var(--rk); }
.ecard .et { font-weight: 700; font-size: 14px; margin-top: 4px; }
.ecard .eh { font-size: 11.5px; color: var(--dim); margin-top: 3px; line-height: 1.4; }
.ecard.lock .rk { background: rgba(255, 255, 255, .2); color: var(--dim); }
.ecard.lock .et { color: var(--dim); }
.prog { height: 8px; border-radius: 4px; background: var(--glass2); overflow: hidden; margin: 4px 0 6px; }
.prog b { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--gold)); }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.setrow small { display: block; color: var(--muted); font-size: 12px; }
.tog { width: 50px; height: 30px; border-radius: 15px; background: rgba(255, 255, 255, .2); position: relative; flex: none; transition: background .2s; }
.tog::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.tog.on { background: var(--mint); } .tog.on::after { transform: translateX(20px); }
.reward { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rw { text-align: left; padding: 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); }
.rw b { font-size: 22px; display: block; }
.rw span { font-weight: 700; font-size: 14px; display: block; margin-top: 4px; }
.rw small { color: var(--muted); font-size: 11.5px; line-height: 1.4; display: block; margin-top: 3px; }
.rw:active { background: var(--glass2); }

/* 假廣告 */
.ad { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; gap: 16px; background: linear-gradient(160deg, var(--a1), var(--a2)); animation: fadein .3s; }
.ad .tag { position: absolute; top: 46px; left: 18px; font-size: 11px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, .3); }
.ad .cd { position: absolute; top: 42px; right: 16px; min-width: 36px; height: 36px; border-radius: 18px; padding: 0 10px; background: rgba(0, 0, 0, .35); font-weight: 800; display: grid; place-items: center; }
.ad h2 { margin: 0; font-size: 36px; text-shadow: 0 4px 20px rgba(0, 0, 0, .25); }
.ad p { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.5; }
.ad small { opacity: .8; font-size: 12px; }

#toast { position: absolute; left: 50%; top: 44px; transform: translate(-50%, -20px); opacity: 0; z-index: 40; max-width: 88%; padding: 9px 14px; border-radius: 14px; background: rgba(255, 255, 255, .95); color: #2a2140; font-size: 13.5px; font-weight: 700; pointer-events: none; transition: .3s var(--ease); text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

.undo { text-align: center; padding: 6px 0 4px; }
.undo .big { font-size: 46px; }
.undo p { color: var(--muted); line-height: 1.6; }

/* 減少動畫 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
button:focus-visible, input:focus-visible { outline: 2px solid var(--peach); outline-offset: 2px; }
