/* LyricSync — 樣式（2026-09 依「LyricSync 節奏對時」設計稿重做）
   識別「金心 × 燈海」：一套骨架、兩種光線。深色＝石墨演唱會（發光只給正在發生的事），
   淺色＝暖白客廳（用位移與陰影分層）。深色預設，body.light 覆寫。tokens 與 plave-lyrics 相同。 */
:root {
  --bg: #121110; --ink: #F5F1E8; --ink-dim: rgba(245,241,232,.62); --ink-faint: rgba(245,241,232,.25);
  --gold: #D9B25F; --gold-deep: #8A6A2A; --on-gold: #1C1A17; --gold-rt: rgba(217,178,95,.88);
  --panel: rgba(255,255,255,.05); --panel-2: rgba(255,255,255,.05); --pop: #1E1C19;
  --line: rgba(255,255,255,.10); --line-2: rgba(255,255,255,.22); --hover: rgba(255,255,255,.06);
  --gold-bg: rgba(217,178,95,.14); --gold-line: rgba(217,178,95,.45);
  --glow-shadow: 0 0 22px rgba(217,178,95,.16); --glow-text: 0 0 12px rgba(217,178,95,.5);
  --shadow-pop: 0 18px 48px rgba(0,0,0,.5);
  --red: #ee5548; --green: #57d98a;
  --font-title: 'Manrope', 'Noto Sans TC', 'Noto Sans KR', sans-serif;
  --font-display: 'Space Grotesk', 'Noto Sans KR', monospace;
  --font-body: 'Noto Sans TC', 'Noto Sans KR', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-ko: 'Manrope', 'Noto Sans KR', 'Noto Sans TC', 'Noto Sans JP', sans-serif;
  --r-card: 16px; --r-thumb: 12px; --r-pill: 999px; --r-container: 18px;
}
body.light {
  --bg: #F7F5F1; --ink: #1C1A17; --ink-dim: rgba(28,26,23,.65); --ink-faint: rgba(28,26,23,.3);
  --gold: #C99328; --gold-deep: #8A5A1E; --gold-rt: #7A5A12;
  --panel: rgba(255,255,255,.72); --panel-2: #FFFFFF; --pop: #FFFFFF;
  --line: rgba(28,26,23,.10); --line-2: rgba(28,26,23,.22); --hover: rgba(28,26,23,.045);
  --gold-bg: rgba(201,147,40,.16); --gold-line: rgba(201,147,40,.55);
  --glow-shadow: 0 6px 24px rgba(28,26,23,.08); --glow-text: none;
  --shadow-pop: 0 10px 30px rgba(28,26,23,.16);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-family: var(--font-title); font-weight: 800; }
p { margin: 0 0 .8em; }
.muted { color: var(--ink-dim); }
.small { font-size: 12.5px; }
.mono { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }
.hint { color: var(--ink-dim); font-size: 13px; }
.warn { color: var(--red); font-size: 13px; }
.empty { padding: 48px 16px; text-align: center; }
.kicker { font: 800 11px var(--font-display); letter-spacing: .2em; color: var(--gold); }
.label-caps { font: 800 11px var(--font-display); letter-spacing: .16em; color: var(--ink-dim); }
.kbd { font: 600 11px var(--font-display); padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line-2); }
/* 品牌記號：金色音符 */
.mark { color: var(--gold); font-size: 1.15em; line-height: 1; }

/* ---- 按鈕：膠囊為主 ---- */
.pill, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--r-pill); border: 1px solid var(--line-2);
  background: transparent; color: var(--ink); font: 600 13px var(--font-body); line-height: 1.2; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .08s;
}
.pill:hover, .btn:hover { background: var(--hover); }
.pill:active, .btn:active { transform: translateY(1px); }
.pill:disabled, .btn:disabled { opacity: .45; cursor: not-allowed; }
.pill.gold, .btn.primary { background: var(--gold); color: var(--on-gold); border-color: transparent; font-weight: 700; }
.pill.gold:hover, .btn.primary:hover { background: var(--gold); filter: brightness(1.06); }
.pill.big, .btn.big { padding: 12px 22px; font-size: 15px; }
.pill.sm, .btn.small { padding: 5px 12px; font-size: 12.5px; }
.pill.dim, .btn.ghost { border-color: transparent; color: var(--ink-dim); }
.pill.danger, .btn.danger { color: var(--red); border-color: rgba(238,85,72,.4); }
.pill.on, .btn.on { background: var(--gold); color: var(--on-gold); border-color: transparent; font-weight: 700; }
.pill.sq, .btn.sq { border-radius: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.iconbtn { width: 32px; height: 32px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; display: inline-grid; place-items: center; font-size: 14px; padding: 0; }
.iconbtn:hover { background: var(--hover); }
.link-dim { font-size: 13px; font-weight: 600; color: var(--ink-dim); }
.link-dim:hover { color: var(--gold); }
.playbtn { width: 44px; height: 44px; border-radius: var(--r-pill); border: none; background: var(--gold); color: var(--on-gold); font-size: 16px; box-shadow: var(--glow-shadow); flex: none; padding: 0; }
.time-big { font: 600 20px var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
/* 分段膠囊（分頁、模式、讀音） */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--panel); }
.seg > button, .seg > span { padding: 5px 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; color: var(--ink-dim); border: none; background: transparent; white-space: nowrap; }
.seg > button:hover { color: var(--ink); }
.seg > .on { background: var(--gold); color: var(--on-gold); }
.seg.sm > button, .seg.sm > span { padding: 2px 10px; font-size: 12px; }
/* 開關 */
.switch { width: 36px; height: 20px; border-radius: var(--r-pill); background: var(--line-2); position: relative; border: none; padding: 0; flex: none; transition: background .15s; }
.switch::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: left .15s, background .15s; }
.switch.on { background: var(--gold); }
.switch.on::after { left: 18px; background: var(--on-gold); }
.chk { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-dim); font-size: 12.5px; white-space: nowrap; }
.chk input[type=checkbox] { width: auto; margin: 0; accent-color: var(--gold); }
input[type=range] { accent-color: var(--gold); padding: 0; background: none; border: none; width: 120px; }

/* ---- 頂欄／頁尾 ---- */
.topbar { display: flex; align-items: center; gap: 14px; padding: 0 20px; height: 56px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 8px; font: 800 17px var(--font-title); white-space: nowrap; }
.brand small { font: 500 12px var(--font-body); color: var(--ink-dim); margin-left: 2px; }
.crumb { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumb:empty { display: none; }
.crumb .sep { color: var(--line-2); }
.crumb .crumb-title { font: 800 15px var(--font-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.crumb .crumb-meta { color: var(--ink-dim); font-size: 12.5px; white-space: nowrap; }
.tb-right { display: flex; align-items: center; gap: 12px; }
#tb-mid:empty { display: none; }
#app { flex: 1; width: 100%; }
.page { max-width: 1240px; margin: 0 auto; padding: 16px 20px; width: 100%; }
.foot { padding: 20px 16px; text-align: center; color: var(--ink-dim); font-size: 12px; border-top: 1px solid var(--line); }

/* ---- 表單 ---- */
input:not([type=range]):not([type=checkbox]), select, textarea {
  font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 8px 10px; width: 100%; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
input.bad { border-color: var(--red); }
textarea { resize: vertical; line-height: 1.9; font-size: 14px; border-radius: 12px; padding: 12px 14px; }
label.f { display: block; font-size: 12px; color: var(--ink-dim); }
label.f > input, label.f > select { margin-top: 4px; display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
select.mini { width: auto; padding: 3px 24px 3px 8px; font-size: 12.5px; border-radius: var(--r-pill); }
.copy-row { display: block; font-size: 12.5px; color: var(--ink-dim); }
.copy-row span { display: flex; gap: 6px; margin-top: 6px; }
.copy-row input { font: 500 12.5px var(--font-display); }

/* ---- 影片與播放控制 ---- */
.video { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--r-thumb); overflow: hidden; border: 1px solid var(--line); flex: none; }
.video iframe, .video > div { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-empty { display: flex; align-items: center; justify-content: center; color: var(--ink-dim); font-size: 12px; padding: 16px; text-align: center; background: var(--panel); }
.transport { display: flex; align-items: center; gap: 8px; }
.rates { display: flex; gap: 6px; align-items: center; }
.rates .lbl { font-size: 12px; color: var(--ink-dim); margin-right: 4px; }
.rates .rate { padding: 4px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; color: var(--ink-dim); font: 600 12px var(--font-display); }
.rates .rate.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.divider { height: 1px; background: var(--line); flex: none; }
.stat { padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.stat b { display: block; font: 800 26px var(--font-display); line-height: 1; }
.stat b small { font: 500 13px var(--font-display); color: var(--ink-dim); }
.stat > span { display: block; font-size: 12px; color: var(--ink-dim); margin-top: 6px; }
.stat.gold { border-color: var(--gold-line); box-shadow: var(--glow-shadow); }
.stat.gold b { color: var(--gold); }
.stats2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.keys { font-size: 12px; color: var(--ink-dim); line-height: 1.7; }
.keys div { display: flex; justify-content: space-between; align-items: center; }

/* ---- 首頁 ---- */
.home { position: relative; }
.home::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(50% 40% at 80% 10%, rgba(217,178,95,.10), transparent 70%); }
.hero { padding: 40px 36px 0; position: relative; max-width: 760px; }
.hero h1 { font-size: 46px; line-height: 1.15; margin-top: 14px; text-wrap: pretty; }
.hero p { margin: 18px 0 0; font-size: 16px; color: var(--ink-dim); max-width: 560px; text-wrap: pretty; }
.hero .btn-row { margin-top: 26px; gap: 10px; }
.list-head { display: flex; align-items: center; gap: 14px; margin: 48px 36px 18px; position: relative; }
.list-head h2 { font-size: 20px; white-space: nowrap; }
.list-head .small { white-space: nowrap; }
.list-head input { width: 320px; border-radius: var(--r-pill); padding: 8px 14px; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding: 0 36px 24px; position: relative; }
.grid .empty { grid-column: 1 / -1; }
.card { display: block; }
.card img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #000; border-radius: var(--r-thumb); border: 1px solid var(--line); transition: transform .2s; }
.card:hover img { transform: translateY(-3px); }
.card-title { margin-top: 10px; font: 800 15px var(--font-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { color: var(--ink-dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-badges { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 11px; padding: 2px 9px; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--ink-dim); }
.badge.gold { background: var(--gold); color: var(--on-gold); border-color: transparent; font-weight: 700; }
.badge.gold-o { color: var(--gold); border-color: var(--gold); font-weight: 700; }
.mine { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.mine li { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-thumb); }
.mine img { width: 72px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: #000; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

/* ---- 編輯器版面：頂欄以下滿高，主欄自己捲、舞台釘在底 ---- */
.ed { display: flex; flex-direction: column; height: calc(100vh - 56px); position: relative; }
.ed::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 70% 100%, rgba(217,178,95,.08), transparent 70%); }
.ed-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 360px minmax(0, 1fr); position: relative; z-index: 1; }
.ed-side { border-right: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 14px; overflow: auto; min-height: 0; }
.ed-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.ed-main .pane { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.pane-text { padding: 18px 20px; gap: 12px; }
.pane-text .ta-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; flex: 1; min-height: 0; }
.pane-text .ta-grid > div { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.pane-text .ta-grid > div > span { font-size: 12px; color: var(--ink-dim); }
.pane-text .ta-grid textarea { flex: 1; resize: none; min-height: 200px; }
.pane-publish { padding: 40px 56px; max-width: 900px; gap: 22px; overflow: auto; }
.pane-publish h3 { font-size: 13px; color: var(--ink-dim); margin-bottom: 8px; }
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stats4 .stat { padding: 16px 18px; border-radius: var(--r-card); }
.stats4 .stat b { font-size: 32px; }
.problems { color: var(--red); font-size: 13px; padding-left: 1.2em; margin: 0; }
.modebar { display: flex; align-items: center; gap: 8px; padding: 14px 20px 10px; flex: none; flex-wrap: wrap; }
.modebar .vsep { width: 1px; height: 18px; background: var(--line-2); margin: 0 6px; }
.ed-main .lyrics { flex: 1; min-height: 0; overflow: auto; padding: 0 12px 8px; margin: 0; }
details.info { font-size: 13px; color: var(--ink-dim); }
details.info summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.info summary::-webkit-details-marker { display: none; }
details.info > div { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
#ed-status { font-size: 12.5px; color: var(--ink-dim); white-space: nowrap; }

/* ---- 歌詞列表（編輯器） ---- */
.lyrics { list-style: none; margin: 0; padding: 0; --size: 1; display: flex; flex-direction: column; gap: 2px; }
.lyrics li { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 9px 12px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.lyrics li:hover { background: var(--hover); }
.lyrics .t { font: 600 12px var(--font-display); color: var(--ink-dim); }
.lyrics .body { min-width: 0; }
.lyrics .txt { font-size: calc(19px * var(--size)); font-weight: 600; line-height: 1.4; display: flex; flex-wrap: wrap; gap: 0 .35em; align-items: baseline; }
.lyrics .w { white-space: nowrap; }
.lyrics .u { transition: color .08s; }
.lyrics .rm { display: none; font: 500 calc(13px * var(--size)) var(--font-display); color: var(--ink-dim); margin-top: 1px; flex-wrap: wrap; gap: 0 .35em; }
.lyrics.show-roma .rm { display: flex; }
.lyrics .rm .w .u + .u { margin-left: .18em; }
.lyrics .tr { display: none; font-size: calc(13px * var(--size)); color: var(--ink-dim); margin-top: 1px; }
.lyrics.show-tr .tr { display: block; }
.lyrics .dots { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; max-width: 90px; justify-content: flex-end; }
.lyrics .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); display: block; }
.lyrics .dots i.on { background: var(--gold); }
.lyrics .hearts { display: flex; gap: 6px; align-items: center; padding: 4px 0; }
.lyrics .hearts .mark { font-size: 14px; }
.lyrics .hearts .mark:nth-child(2) { opacity: .5; }
.lyrics .hearts .mark:nth-child(3) { opacity: .25; }
.lyrics li.untimed .t { color: var(--red); }
.lyrics li.w-done .t { color: var(--gold); }
.lyrics li.w-part .t { color: rgba(217,178,95,.7); }
.lyrics li.cur, .lyrics li.editing { background: rgba(217,178,95,.08); border-color: var(--gold-line); box-shadow: var(--glow-shadow); }
.lyrics li.cursor { border-color: var(--gold-line); border-style: dashed; }
.lyrics li.active { background: var(--panel); }
.lyrics li.active .u.sung { color: var(--gold); text-shadow: var(--glow-text); }
.lyrics li.active .rm .u.sung { color: var(--gold-rt); }
.lyrics .u.ph { color: var(--ink-faint); letter-spacing: .1em; }
/* 讀音還沒填的漢字：虛線，可直接點 */
.ed .lyrics .u.nr { text-decoration: underline dashed var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
/* 應援：ci 跟唱字、ca 句中口號、chantline 整行 */
.lyrics .u.ci, .lyrics .u.ca, .lyrics li.chantline .txt { color: var(--gold); }
.lyrics li.chantline .mega { font-size: .8em; }
.lyrics li.active .u.ci, .lyrics li.active .u.ca, .lyrics li.active.chantline .u { color: rgba(217,178,95,.55); text-shadow: none; }
.lyrics li.active .u.ci.sung, .lyrics li.active .u.ca.sung, .lyrics li.active.chantline .u.sung { color: var(--gold); background: rgba(217,178,95,.18); border-radius: 4px; text-shadow: var(--glow-text); }
.hide-chant .lyrics .u.ci, .lyrics.hide-chant .u.ci { color: inherit; }
.hide-chant .lyrics .ca, .lyrics.hide-chant .ca, .hide-chant .lyrics li.chantline, .lyrics.hide-chant li.chantline { display: none; }

/* ---- 歌詞列表（播放頁） ---- */
.view-lyrics { gap: 0; padding: 0 0 30vh; }
.view-lyrics li { grid-template-columns: 56px 1fr; gap: 16px; align-items: start; padding: 16px 18px; margin: 5px -18px; border-radius: var(--r-card); opacity: .5; transition: opacity .35s, border-color .25s; }
.view-lyrics li:hover { opacity: .8; background: transparent; }
.view-lyrics li.active { opacity: 1; background: transparent; border-color: var(--gold-line); box-shadow: var(--glow-shadow); }
.view-lyrics .t { padding-top: 8px; }
.view-lyrics li.active .t { color: var(--gold); }
.view-lyrics .txt { font: 800 calc(28px * var(--size)) / 1.3 var(--font-ko); gap: 0 .3em; }
.view-lyrics .rm { font-size: calc(14px * var(--size)); margin-top: 2px; }
.view-lyrics .tr { font-size: calc(16px * var(--size)); margin-top: 4px; }
.view-lyrics li.active .tr { color: var(--ink); }
.view-lyrics .hearts { padding-top: 10px; }
.view-lyrics .u.ph { font-size: .8em; }

/* ---- 播放頁版面 ---- */
.view { position: relative; }
.view::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 60% at 30% 0%, rgba(217,178,95,.10), transparent 70%); }
.view-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); position: relative; min-height: calc(100vh - 56px); }
.view-side { padding: 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; position: sticky; top: 56px; height: calc(100vh - 56px); overflow: auto; scrollbar-width: thin; }
.view-side .title { font: 800 26px var(--font-title); line-height: 1.2; }
.view-side .meta { font-size: 13px; color: var(--ink-dim); margin-top: 4px; }
.view-main { padding: 40px 48px; min-width: 0; }
.progress { height: 3px; border-radius: var(--r-pill); background: var(--line); position: relative; overflow: hidden; flex: none; }
.progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: var(--r-pill); background: var(--gold); display: block; }
.settings { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.settings .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.settings .row .mono { font-size: 12px; color: var(--ink-dim); }
.paste { border: 1px solid var(--gold-line); border-radius: var(--r-card); padding: 14px 16px; margin-bottom: 16px; background: var(--pop); box-shadow: var(--glow-shadow); }
.paste h3 { font-size: 15px; margin-bottom: 6px; }
.paste .ta-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; }
.paste .ta-grid textarea { min-height: 200px; }
.paste label { display: block; font-size: 12px; color: var(--ink-dim); }
.paste label textarea { margin-top: 4px; }
.report { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.report li { padding: 4px 8px; border-radius: 8px; background: var(--hover); }
.report li i { color: var(--ink-dim); font-style: normal; }
.report .rp-count { color: var(--green); }
.report .rp-mismatch, .report .rp-missing { color: var(--red); }
.report .rp-extra { color: var(--ink-dim); }

/* ---- 節奏舞台（逐字對時，1a） ---- */
.stage { flex: none; margin: 0 12px 12px; border-radius: var(--r-container); border: 1px solid var(--gold-line); background: var(--pop); box-shadow: var(--glow-shadow); overflow: hidden; position: relative; }
.stage.shakeA { animation: shakeA .14s ease-out; }
.stage.shakeB { animation: shakeB .14s ease-out; }
.stage-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px 0; flex-wrap: wrap; }
.stage-head .label-caps { color: var(--gold); }
.stage-head .lineno { font-size: 13px; font-weight: 700; }
.stage-head .count { font-size: 12.5px; color: var(--ink-dim); }
.stage-head .pill { padding: 4px 10px; font-size: 12px; }
.stage-head .iconbtn { width: 28px; height: 26px; font-size: 12px; }
.lane { position: relative; height: 172px; margin-top: 6px; overflow: hidden; }
.lane-scroll { position: absolute; inset: 0; will-change: transform; }
.lane-scroll .wv { position: absolute; bottom: 0; width: 3px; border-radius: 2px 2px 0 0; background: rgba(255,255,255,.07); }
.lane-scroll .wv.past { background: rgba(217,178,95,.28); }
.lane-scroll .beat { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.08); }
.lane-scroll .beat.bar { background: rgba(217,178,95,.28); }
.lane-scroll .beat-label { position: absolute; top: 6px; font: 600 10px var(--font-display); color: rgba(245,241,232,.45); white-space: nowrap; }
body.light .lane-scroll .wv { background: rgba(28,26,23,.08); }
body.light .lane-scroll .beat { background: rgba(28,26,23,.08); }
body.light .lane-scroll .beat-label { color: rgba(28,26,23,.45); }
.jline { position: absolute; top: 0; bottom: 0; left: 150px; width: 2px; background: var(--gold); box-shadow: var(--glow-text); }
.ring { position: absolute; left: 150px; top: 50%; width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--gold); transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.ring.ringA { animation: ringA .5s ease-out forwards; }
.ring.ringB { animation: ringB .5s ease-out forwards; }
.note { position: absolute; top: 50%; height: 66px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--panel); color: var(--ink-dim); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; cursor: pointer; transform: translate(-50%, -50%); transition: left .18s ease-out, transform .18s, width .15s, opacity .2s; width: 66px; }
.note b { font: 800 24px var(--font-ko); line-height: 1; }
.note small { font: 600 10px var(--font-display); opacity: .8; letter-spacing: .02em; }
.note.cur { background: rgba(217,178,95,.12); border-color: var(--gold); color: var(--ink); transform: translate(-50%, -50%) scale(1.08); animation: breathe 1.2s ease-in-out infinite; }
.note.stamped { width: 48px; background: var(--gold); border-color: var(--gold); color: var(--on-gold); box-shadow: 0 0 22px rgba(217,178,95,.35); transition: width .15s; animation: none; }
.note.stamped.past { opacity: .55; }
.note.stamped small { opacity: .85; }
.particle { position: absolute; left: 150px; top: 86px; background: var(--gold); color: var(--gold); pointer-events: none; animation: burst var(--dur) ease-out forwards; line-height: 1; font-size: 12px; text-align: center; }
.particle.note-glyph { background: transparent; }
.judge { position: absolute; left: 150px; top: 14px; transform: translate(-50%, 0); font: 800 22px var(--font-title); letter-spacing: .08em; color: var(--gold); text-shadow: var(--glow-text); opacity: 0; white-space: nowrap; pointer-events: none; }
.judge.popA { animation: popA .7s ease-out forwards; }
.judge.popB { animation: popB .7s ease-out forwards; }
.combo { position: absolute; right: 18px; top: 12px; text-align: right; pointer-events: none; }
.combo b { display: block; font: 800 46px var(--font-display); line-height: 1; color: var(--ink-faint); transition: color .2s; }
.combo.hot b { color: var(--gold); text-shadow: var(--glow-text); }
.combo span { font: 800 10px var(--font-display); letter-spacing: .2em; color: var(--ink-dim); }
.lane-hint { position: absolute; left: 150px; bottom: 8px; transform: translateX(-50%); font: 600 10px var(--font-display); letter-spacing: .14em; color: var(--ink-dim); white-space: nowrap; }
.summary { position: absolute; right: 14px; bottom: 12px; padding: 12px 16px; border-radius: 14px; background: var(--bg); border: 1px solid var(--gold-line); box-shadow: var(--glow-shadow); animation: riseIn .3s ease-out; min-width: 260px; }
.summary .label-caps { color: var(--gold); margin-bottom: 6px; }
.summary .nums { display: flex; gap: 18px; }
.summary .nums b { display: block; font: 800 20px var(--font-display); line-height: 1; }
.summary .nums b.gold { color: var(--gold); }
.summary .nums b small { font-size: 12px; }
.summary .nums span { display: block; font-size: 11px; color: var(--ink-dim); margin-top: 3px; }
.summary .flow { height: 2px; background: var(--gold); margin-top: 10px; transform-origin: left; animation: flowIn 1.1s linear; }
.stage-foot { display: flex; align-items: center; gap: 12px; padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.stampbtn { display: flex; align-items: center; gap: 12px; padding: 0 22px; height: 52px; border-radius: 14px; border: none; background: var(--gold); color: var(--on-gold); box-shadow: 0 4px 0 var(--gold-deep), var(--glow-shadow); flex: none; }
.stampbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-deep); }
.stampbtn.breathe { animation: breathe 1.2s ease-in-out infinite; }
.stampbtn b { font: 800 18px var(--font-title); letter-spacing: .02em; }
.stampbtn .key { font: 800 11px var(--font-display); letter-spacing: .18em; padding: 3px 8px; border-radius: 6px; background: rgba(28,26,23,.14); }
.undobtn { height: 40px; padding: 0 14px; }
.stage-foot .tip { font-size: 12px; color: var(--ink-dim); text-align: right; line-height: 1.5; }

/* ---- 組句舞台（逐字對時，2a）：沒有跑動的時間軸，字從下方飛上來拼成句子 ---- */
.build { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.build.shakeA { animation: shakeA .14s ease-out; }
.build.shakeB { animation: shakeB .14s ease-out; }
.build .flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(45% 30% at 50% 46%, rgba(217,178,95,.22), transparent 70%); opacity: 0; }
.build .flash.flashA { animation: flashA .5s ease-out forwards; }
.build .flash.flashB { animation: flashB .5s ease-out forwards; }
.build .combo { top: 20px; right: 28px; }
.build .combo b { font-size: 64px; }
.build .now { position: absolute; left: 28px; top: 20px; pointer-events: none; }
.build .now .label-caps { color: var(--gold); }
.build .now div:last-child { font-size: 13px; font-weight: 700; margin-top: 4px; }
.build .now span { color: var(--ink-dim); font-weight: 500; }
.build .centre { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 0 48px; position: relative; }
.build .nb { font: 800 20px var(--font-ko); color: var(--ink-faint); display: flex; gap: .3em; flex-wrap: wrap; justify-content: center; }
.build .line-wrap { position: relative; text-align: center; }
.build .judge { top: -40px; font-size: 24px; letter-spacing: .1em; }
.build .slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .28em; }
.build .slots.lineClear { animation: lineClear .5s ease-out; }
.build .slot { position: relative; display: inline-flex; flex-direction: column; align-items: center; padding: 6px 4px 10px; cursor: pointer; }
.build .slot.sp { margin-right: .5em; }
.build .slot b { font: 800 44px/1.1 var(--font-ko); color: var(--ink-faint); text-shadow: none; transition: color .12s; }
.build .slot small { font: 600 12px var(--font-display); color: rgba(245,241,232,.3); margin-top: 2px; letter-spacing: .02em; }
body.light .build .slot small { color: rgba(28,26,23,.3); }
.build .slot.cur b { color: var(--ink-dim); }
.build .slot.set b { color: var(--ink); }
.build .slot.set small { color: var(--gold-rt); }
.build .slot.sung b, .build .slot.land b { color: var(--gold); text-shadow: var(--glow-text); }
.build .slot .bar { position: absolute; left: 4px; right: 4px; bottom: 2px; height: 3px; border-radius: var(--r-pill); background: transparent; }
.build .slot.cur:not(.set) .bar { background: var(--gold); animation: breathe 1.2s ease-in-out infinite; }
.build .slot.landA { animation: landA .42s cubic-bezier(.2,.9,.3,1.2); }
.build .slot.landB { animation: landB .42s cubic-bezier(.2,.9,.3,1.2); }
.build .slot .ring { left: 50%; top: 40%; width: 90px; height: 90px; }
.build .slot .particle { left: 50%; top: 40%; }
.build .trline { margin-top: 14px; font-size: 17px; color: var(--ink-faint); transition: color .3s; }
.build .trline.done { color: var(--ink); }
.build .summary { left: 50%; right: auto; bottom: 18px; transform: translateX(-50%); display: flex; gap: 22px; align-items: center; min-width: 0; }
.build .summary .label-caps { margin: 0; }
.build .summary .nums b { font-size: 18px; display: inline; }
.build .summary .nums b small { font-size: 11px; color: var(--ink-dim); font-weight: 500; margin-left: 4px; font-family: var(--font-body); }
.build .deck { flex: none; padding: 0 20px 18px; display: flex; align-items: flex-end; gap: 16px; position: relative; z-index: 2; }
.build .deckbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 120px; height: 120px; border-radius: 22px; border: none; background: var(--gold); color: var(--on-gold); box-shadow: 0 6px 0 var(--gold-deep), var(--glow-shadow); flex: none; }
.build .deckbtn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gold-deep); }
.build .deckbtn.breathe { animation: breathe 1.2s ease-in-out infinite; }
.build .deckbtn b { font: 800 40px/1 var(--font-ko); }
.build .deckbtn b.deckIn { animation: deckIn .25s ease-out; }
.build .deckbtn small { font: 600 11px var(--font-display); letter-spacing: .06em; opacity: .75; }
.build .deckbtn .key { font: 800 10px var(--font-display); letter-spacing: .18em; padding: 2px 8px; border-radius: 6px; background: rgba(28,26,23,.14); margin-top: 2px; }
.build .queue { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.build .queue .label-caps { font-size: 10px; }
.build .qrow { display: flex; gap: 8px; overflow: hidden; }
.build .q { flex: none; width: 56px; height: 56px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity .2s; }
.build .q b { font: 800 22px/1 var(--font-ko); color: var(--ink); }
.build .q small { font: 600 9px var(--font-display); color: var(--ink-dim); margin-top: 3px; }
.build .qhint { font-size: 12px; color: var(--ink-dim); }
/* 逐行對時：打點列 */
.lm-bar { flex: none; margin: 0 12px 12px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--gold-line); background: var(--pop); box-shadow: var(--glow-shadow); }
.lm-bar .lm-info { font-size: 13px; color: var(--ink-dim); min-width: 0; flex: 1; }
.lm-bar .lm-info b { color: var(--ink); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.mode-hint { padding: 0 20px 8px; margin: 0; font-size: 12.5px; color: var(--ink-dim); flex: none; }

/* ---- 讀音／應援編輯面板 ---- */
#edit-prompt { position: fixed; inset: 0; z-index: 90; background: rgba(5,6,15,.6); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; }
#ep-panel { width: min(640px, 100%); max-height: 90vh; overflow-y: auto; overflow-x: hidden; background: var(--pop); border: 1px solid var(--line-2); border-radius: var(--r-card); padding: 20px 22px; box-shadow: var(--shadow-pop); }
#ep-panel h3 { font-size: 15px; margin: 0 0 10px; }
#ep-line { font-size: 15px; font-weight: 700; line-height: 1.5; padding: 10px 12px; margin-bottom: 12px; background: var(--panel); border-radius: 10px; }
#ep-units { display: flex; flex-wrap: wrap; gap: 8px 4px; }
.ep-unit { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 0; }
.ep-unit input { min-width: 36px; text-align: center; border-radius: 6px; padding: 5px 4px; font-size: 12.5px; }
.ep-unit.need input { border-color: var(--gold); background: rgba(217,178,95,.12); }
.ep-unit span { font-size: 18px; font-weight: 700; line-height: 1; }
#ep-input { font-size: 15px; padding: 10px 12px; }
#ep-hint { margin-top: 10px; }
.ep-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ---- toast ---- */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--pop); color: var(--ink); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 16px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 200; max-width: 90vw; box-shadow: var(--shadow-pop); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- 動畫（來自設計稿） ---- */
@keyframes popA { 0%{transform:translate(-50%,10px) scale(.6);opacity:0} 25%{transform:translate(-50%,0) scale(1.15);opacity:1} 100%{transform:translate(-50%,-22px) scale(1);opacity:0} }
@keyframes popB { 0%{transform:translate(-50%,10px) scale(.6);opacity:0} 25%{transform:translate(-50%,0) scale(1.15);opacity:1} 100%{transform:translate(-50%,-22px) scale(1);opacity:0} }
@keyframes shakeA { 0%{transform:translate(0,0)} 30%{transform:translate(-3px,2px)} 60%{transform:translate(2px,-2px)} 100%{transform:translate(0,0)} }
@keyframes shakeB { 0%{transform:translate(0,0)} 30%{transform:translate(3px,-2px)} 60%{transform:translate(-2px,2px)} 100%{transform:translate(0,0)} }
@keyframes burst { 0%{transform:translate(0,0) scale(1);opacity:1} 100%{transform:translate(var(--dx),var(--dy)) scale(.2);opacity:0} }
@keyframes ringA { 0%{transform:translate(-50%,-50%) scale(.4);opacity:.9} 100%{transform:translate(-50%,-50%) scale(1.8);opacity:0} }
@keyframes ringB { 0%{transform:translate(-50%,-50%) scale(.4);opacity:.9} 100%{transform:translate(-50%,-50%) scale(1.8);opacity:0} }
@keyframes breathe { 0%,100%{box-shadow:0 0 0 0 rgba(217,178,95,0)} 50%{box-shadow:0 0 0 6px rgba(217,178,95,.18)} }
@keyframes riseIn { 0%{transform:translateY(12px);opacity:0} 100%{transform:translateY(0);opacity:1} }
@keyframes flowIn { 0%{transform:scaleX(0)} 100%{transform:scaleX(1)} }
@keyframes landA { 0%{transform:translateY(190px) scale(1.7);opacity:0} 55%{transform:translateY(-8px) scale(1.08);opacity:1} 100%{transform:translateY(0) scale(1)} }
@keyframes landB { 0%{transform:translateY(190px) scale(1.7);opacity:0} 55%{transform:translateY(-8px) scale(1.08);opacity:1} 100%{transform:translateY(0) scale(1)} }
@keyframes flashA { 0%{opacity:.9} 100%{opacity:0} }
@keyframes flashB { 0%{opacity:.9} 100%{opacity:0} }
@keyframes deckIn { 0%{transform:translateY(24px) scale(.8);opacity:0} 100%{transform:translateY(0) scale(1);opacity:1} }
@keyframes lineClear { 0%{transform:scale(1)} 40%{transform:scale(1.04)} 100%{transform:scale(1)} }
@media (prefers-reduced-motion: reduce) { .stage, .build, .judge, .ring, .particle, .note.cur, .stampbtn.breathe, .deckbtn.breathe, .summary, .slot, .flash { animation: none !important; } }

/* ---- 手機 ---- */
@media (max-width: 900px) {
  .topbar { padding: 0 14px; gap: 10px; }
  .brand small, #tb-crumb .crumb-meta { display: none; }
  #tb-mid .seg > button, #tb-mid .seg > span { padding: 4px 10px; font-size: 12px; }
  .page { padding: 12px; }
  .hero { padding: 24px 16px 0; }
  .hero h1 { font-size: 30px; }
    .list-head { margin: 28px 16px 12px; flex-wrap: wrap; }
  .list-head input { width: 100%; }
  .grid { padding: 0 16px 24px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .ed { height: auto; }
  .ed-grid, .view-grid { grid-template-columns: 1fr; }
  .ed-side, .view-side { position: static; height: auto; overflow: visible; border-right: none; border-bottom: 1px solid var(--line); }
  .video { position: sticky; top: 56px; z-index: 6; }
  .ed-main .lyrics { overflow: visible; }
  .pane-text .ta-grid, .paste .ta-grid { grid-template-columns: 1fr; }
  .pane-publish { padding: 20px 16px; }
  .stats4 { grid-template-columns: 1fr 1fr; }
  .view-main { padding: 20px 16px; }
  .view-lyrics li { margin: 4px 0; padding: 12px; }
  .view-lyrics .txt { font-size: calc(22px * var(--size)); }
  .lyrics li { grid-template-columns: 48px 1fr auto; gap: 10px; }
  .lyrics .t { font-size: 11px; }
  .lyrics .dots { display: none; }
  .stage { position: sticky; bottom: 8px; margin: 8px; z-index: 20; }
  .lane { height: 132px; }
  .combo b { font-size: 32px; }
  .summary { min-width: 0; right: 8px; bottom: 8px; padding: 8px 10px; }
  .stage-foot .tip { display: none; }
  .build { min-height: 70vh; }
  .build .slot b { font-size: 32px; }
  .build .deckbtn { width: 96px; height: 96px; }
  .build .combo b { font-size: 40px; }
  .lm-bar { position: sticky; bottom: 8px; margin: 8px; z-index: 20; }
  .row2 { grid-template-columns: 1fr; }
}

/* ---- 逐字對時一般模式：底部格子面板 ---- */
#kt-panel .kt-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 4px; max-height: 26vh; overflow: auto; }
.kt-chip { border: 1px solid var(--line-2); background: var(--panel); border-radius: 10px; padding: 6px 9px; cursor: pointer; font: inherit; color: inherit; display: inline-flex; flex-direction: column; align-items: center; min-width: 44px; line-height: 1.2; }
.kt-chip .kt-u { font: 800 18px var(--font-ko); }
.kt-chip small { font: 600 10px var(--font-display); opacity: .65; margin-top: 2px; }
.kt-chip.set { background: rgba(217,178,95,.15); border-color: var(--gold-line); }
.kt-chip.cur { outline: 2px solid var(--gold); outline-offset: 1px; }
.kt-chip.live .kt-u { color: var(--gold); }

/* ---- 譜面模式（節奏遊戲的音符編輯） ---- */
.chartpanel { flex: none; margin: 0 12px 12px; border-radius: var(--r-container); border: 1px solid var(--gold-line); background: var(--pop); box-shadow: var(--glow-shadow); padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; outline: none; }
.cp-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-row .label-caps { color: var(--gold); min-width: 46px; }
.cp-f { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-dim); margin: 0; }
.cp-f input { width: 76px; padding: 4px 8px; font: 600 13px var(--font-display); }
.cp-tools { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cp-lane { position: relative; height: 112px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; cursor: crosshair; user-select: none; touch-action: none; }
.cp-scroll { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; will-change: transform; }
.cp-now { position: absolute; top: 0; bottom: 0; left: 180px; width: 2px; background: var(--gold); box-shadow: var(--glow-text); pointer-events: none; }
.cp-beat { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.cp-beat.s2 { background: rgba(217,178,95,.14); }
.cp-beat.s0 { background: rgba(217,178,95,.3); }
.cp-beat.bar { background: rgba(217,178,95,.6); width: 2px; }
.cp-beatlabel { position: absolute; top: 4px; font: 600 10px var(--font-display); color: var(--ink-dim); }
.cp-onset { position: absolute; bottom: 8px; width: 5px; height: 5px; margin-left: -2px; border-radius: 50%; background: var(--ink-faint); }
.cp-notes { position: absolute; inset: 0; }
.cp-note { position: absolute; top: 50%; width: 40px; height: 40px; margin-left: -20px; transform: translateY(-50%); border-radius: 12px; border: 2px solid var(--gold); background: var(--bg); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.cp-note b { font: 800 13px var(--font-display); color: var(--gold); }
.cp-note.ro { opacity: .55; cursor: default; }
.cp-note.hold .cp-tail { position: absolute; left: 50%; top: 50%; height: 14px; width: calc(var(--w) + 20px); transform: translateY(-50%); background: linear-gradient(to right, rgba(217,178,95,.7), rgba(217,178,95,.2)); border-radius: 0 7px 7px 0; z-index: -1; }
.cp-handle { position: absolute; right: -9px; top: 50%; width: 14px; height: 26px; transform: translateY(-50%); border-radius: 6px; background: var(--gold-line); cursor: ew-resize; opacity: 0; transition: opacity .15s; }
.cp-note.hold .cp-handle { right: calc(-1 * var(--w) - 9px); }
.cp-note:hover .cp-handle { opacity: 1; }
.cp-note.ro .cp-handle { display: none; }
.cp-hint { margin: 0; font-size: 12px; }

/* ---- 帳號選單（頂欄） ---- */
details.menu { position: relative; }
details.menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
details.menu > summary::-webkit-details-marker { display: none; }
details.menu .avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--panel); border: 1px solid var(--line-2); }
details.menu .avatar.ph { display: inline-grid; place-items: center; color: var(--gold); font-size: 14px; }
details.menu .uname { font-size: 13px; font-weight: 600; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--pop); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; display: flex; flex-direction: column; z-index: 60; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 8px; border: none; background: none; font: 600 13px var(--font-body); color: var(--ink); }
.menu-pop a:hover, .menu-pop button:hover { background: var(--hover); }
.menu-pop .hint { padding: 6px 12px 4px; font-size: 11.5px; }
@media (max-width: 900px) { details.menu .uname { display: none; } }
#tb-user { display: inline-flex; align-items: center; margin-left: 4px; }

/* ---- 法律頁（隱私權政策／使用條款） ---- */
.foot-links { margin-left: 10px; }
.foot-links a { margin-left: 10px; color: var(--ink-dim); text-decoration: underline; text-underline-offset: 3px; }
.legal { max-width: 760px; margin: 0 auto; padding: 32px 20px 60px; font-size: 15px; line-height: 1.8; }
.legal h1 { font-size: 30px; margin-bottom: 6px; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; }
.legal h3 { font-size: 14px; margin: 14px 0 4px; color: var(--ink-dim); }
.legal ul { padding-left: 1.3em; margin: 0 0 10px; }
.legal li { margin: 4px 0; }
.legal a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.legal code { font: 600 12.5px var(--font-display); background: var(--panel); padding: 1px 6px; border-radius: 6px; }

/* ---- 帳號設定／作者頁 ---- */
.card .card-sub .bylink { color: var(--ink-dim); }
.card .card-sub .bylink:hover { color: var(--gold); }
.view-side .meta .bylink:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.big-avatar { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; background: var(--panel); border: 2px solid var(--gold-line); display: block; }
.big-avatar.ph { display: grid; place-items: center; color: var(--gold); font-size: 44px; }
.acct-grid { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; max-width: 760px; }
.acct-avatar { display: flex; flex-direction: column; align-items: center; }
.acct-form .f { color: var(--ink-dim); }
.acct-form .f input { margin-top: 4px; max-width: 360px; }
.author-head { display: flex; align-items: center; gap: 18px; margin: 8px 0 22px; }
.author-head h2 { font-size: 26px; }
@media (max-width: 900px) { .acct-grid { grid-template-columns: 1fr; } .author-head { gap: 12px; } .big-avatar { width: 80px; height: 80px; } }
/* 登入按鈕：品牌圖示＋文字，白底卡片樣式，看起來像正規的第三方登入 */
.login-btn { display: flex !important; align-items: center; gap: 10px; padding: 9px 12px !important; border-radius: 10px; border: 1px solid var(--line-2) !important; background: var(--panel) !important; margin: 2px 0; font-weight: 600; }
.login-btn:hover { border-color: var(--gold) !important; background: var(--hover) !important; }
.login-btn svg { width: 20px; height: 20px; flex: none; }
.login-btn .mark { font-size: 18px; width: 20px; text-align: center; }
.login-row { display: inline-flex; gap: 8px; vertical-align: middle; margin: 0 6px 4px 0; }
.login-row .login-btn { display: inline-flex !important; margin: 0; padding: 6px 10px !important; font-size: 13px; }
.menu-pop { min-width: 232px; }
