:root { --bg:#0b0d12; --card:#151924; --line:#252b3a; --fg:#f2f0ea; --mute:#8b92a5; --acc:#ffb547; --ok:#5fd38d; --warn:#ff7a59; }
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { margin:0; background:var(--bg); color:var(--fg); font:16px/1.5 -apple-system,BlinkMacSystemFont,"PingFang TC","Noto Sans TC",sans-serif; }
body { min-height:100vh; padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
#app { max-width:480px; margin:0 auto; padding:16px 20px 40px; }
header { display:flex; justify-content:space-between; align-items:center; margin-bottom:28px; }
.brand { font-weight:800; letter-spacing:.18em; font-size:14px; }
.brand span { color:var(--acc); }
.pill { font-size:12px; padding:4px 10px; border-radius:99px; background:var(--card); color:var(--mute); border:1px solid var(--line); }
.pill.ok { color:var(--ok); border-color:#1f4d33; }
.pill.warn { color:var(--warn); border-color:#5a2a1e; }
.eyebrow { color:var(--acc); font-size:13px; letter-spacing:.12em; margin:0 0 4px; }
h1 { font-size:30px; line-height:1.2; margin:0 0 14px; }
h2 { margin:0 0 8px; }
.hint { color:var(--mute); font-size:14px; }
.small { font-size:12px; }
.hidden { display:none !important; }
button { font:inherit; color:inherit; border:0; cursor:pointer; }
.primary { width:100%; padding:16px; border-radius:14px; background:var(--acc); color:#1a1200; font-weight:700; font-size:17px; margin-top:12px; }
.primary:disabled { opacity:.4; }
.big { width:100%; aspect-ratio:1.6; border-radius:24px; background:radial-gradient(circle at 50% 40%,#ffc66e,#ff9a1f); color:#1a1200; font-weight:800; font-size:26px; margin:16px 0; box-shadow:0 20px 60px -20px #ff9a1f88; }
.ghost { padding:10px 14px; border-radius:10px; background:#1e2332; border:1px solid var(--line); flex:1; }
.link { background:none; color:var(--mute); text-decoration:underline; display:block; margin:18px auto 0; }
.tracks { display:grid; gap:8px; margin:18px 0 4px; }
.track { display:flex; justify-content:space-between; padding:14px 16px; border-radius:12px; background:var(--card); border:1px solid var(--line); text-align:left; }
.track span { color:var(--mute); font-size:13px; }
.track.on { border-color:var(--acc); box-shadow:inset 0 0 0 1px var(--acc); }
.progress { display:flex; align-items:center; gap:10px; margin-top:12px; font-size:13px; color:var(--mute); }
.bar { flex:1; height:6px; border-radius:6px; background:var(--card); overflow:hidden; }
.bar i { display:block; height:100%; width:0; background:var(--acc); transition:width .2s; }
.live { text-align:center; padding:26px 0 18px; }
.status { color:var(--mute); margin-top:10px; }
.clock { font-size:40px; font-weight:700; font-variant-numeric:tabular-nums; letter-spacing:.02em; }
.wave { display:flex; gap:6px; justify-content:center; height:46px; align-items:center; }
.wave i { width:6px; height:10px; border-radius:3px; background:var(--line); }
.live.playing .wave i { background:var(--acc); animation:w 1s ease-in-out infinite; }
.live.playing .wave i:nth-child(2){animation-delay:.15s} .live.playing .wave i:nth-child(3){animation-delay:.3s}
.live.playing .wave i:nth-child(4){animation-delay:.45s} .live.playing .wave i:nth-child(5){animation-delay:.6s}
.live.playing .status { color:var(--ok); }
@keyframes w { 0%,100%{height:10px} 50%{height:42px} }
.card { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:16px; margin-top:16px; }
.row { display:flex; justify-content:space-between; align-items:center; }
.row span { color:var(--mute); font-variant-numeric:tabular-nums; }
input[type=range] { width:100%; margin:14px 0 6px; accent-color:var(--acc); height:28px; }
.btns { display:flex; gap:8px; margin-top:12px; }
.dbg { display:none; font:12px ui-monospace,Menlo,monospace; color:var(--mute); text-align:center; margin-top:14px; }
.dbg.on { display:block; }
.cal { position:fixed; inset:0; display:flex; align-items:flex-end; padding:20px; padding-bottom:calc(20px + env(safe-area-inset-bottom)); }
.flash { position:fixed; inset:0; background:#000; transition:none; }
.flash.on { background:#fff; }
.cal-box { position:relative; width:100%; max-width:480px; margin:0 auto; background:#151924ee; border:1px solid var(--line); border-radius:18px; padding:18px; }
.cal-box p { color:var(--mute); font-size:14px; margin:0 0 6px; }
.cal-box strong { color:var(--fg); }
.label { color:var(--mute); font-size:13px; margin:18px 0 6px; }
.seg { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.seg button { padding:12px 4px; border-radius:10px; background:var(--card); border:1px solid var(--line); font-size:13px; }
.seg button.on { border-color:var(--acc); color:var(--acc); box-shadow:inset 0 0 0 1px var(--acc); }
details.card summary { cursor:pointer; color:var(--mute); list-style:none; }
details.card summary::-webkit-details-marker { display:none; }
details.card summary::after { content:" ›"; }
details[open].card summary { margin-bottom:10px; }
a { color:var(--acc); }
#toast { position:fixed; left:50%; bottom:calc(24px + env(safe-area-inset-bottom)); transform:translate(-50%,20px); width:max-content; max-width:90vw; background:var(--acc); color:#1a1200; font-weight:700; padding:12px 18px; border-radius:12px; opacity:0; transition:.25s; pointer-events:none; z-index:9; text-align:center; }
#toast.on { opacity:1; transform:translate(-50%,0); }
