/* ============================================================
   QVoice 2.0 — 速度導向語音筆記
   navy 品牌（對齊 QMeeting）+ 即時轉錄速度秀
   ============================================================ */

:root {
    --navy: #34546E;
    --navy-light: #4A6B85;
    --navy-dark: #294050;
    --accent: #ff9f43;
    --accent-hover: #f0871e;
    --ink: #1c2530;
    --ink-soft: #64748b;
    --bg: #eef2f7;
    --card: #ffffff;
    --line: #e2e8f0;
    --ok: #16a34a;
    --err: #dc2626;
    --live: #ef4444;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 3px rgba(20,40,60,.06), 0 1px 2px rgba(20,40,60,.04);
    --shadow-md: 0 6px 20px rgba(20,40,60,.08);
    --shadow-lg: 0 16px 44px rgba(20,40,60,.14);
    --mono: 'SF Mono', 'Roboto Mono', ui-monospace, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e8edf2; --ink-soft: #94a3b8; --bg: #0f1720;
        --card: #1a232e; --line: #2a3744;
        --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
        --shadow-md: 0 6px 20px rgba(0,0,0,.45);
        --shadow-lg: 0 16px 44px rgba(0,0,0,.55);
    }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 96px; }

/* ---------- Header ---------- */
.top {
    position: sticky; top: 0; z-index: 40;
    background: rgba(238,242,247,.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
@media (prefers-color-scheme: dark){ .top { background: rgba(15,23,32,.85); } }
.top-in {
    max-width: 760px; margin: 0 auto; padding: 12px 16px;
    display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; color: var(--navy); }
@media (prefers-color-scheme: dark){ .brand { color: #b9d2e6; } }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255,159,67,.18); }
.top-spacer { flex: 1; }
.who {
    font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px;
    padding: 5px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
    white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis;
}
.who .live-ok { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.who .live-no { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); flex: none; }
.back {
    font-size: 13px; color: var(--navy); text-decoration: none; font-weight: 600;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
    transition: .15s;
}
.back:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Hero capture ---------- */
.hero {
    margin-top: 20px;
    background: linear-gradient(155deg, var(--navy) 0%, var(--navy-dark) 100%);
    border-radius: 22px;
    padding: 22px;
    color: #fff;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: ''; position: absolute; right: -60px; top: -60px;
    width: 220px; height: 220px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,159,67,.22), transparent 70%);
    pointer-events: none;
}
.hero-title { font-size: 15px; font-weight: 700; opacity: .95; }
.hero-sub { font-size: 12.5px; opacity: .68; margin-top: 2px; }

/* mode tabs */
.modes {
    display: flex; gap: 4px; margin-top: 16px;
    background: rgba(255,255,255,.1); border-radius: 12px; padding: 4px;
    position: relative; z-index: 1;
}
.mode-btn {
    flex: 1; border: 0; background: transparent; color: rgba(255,255,255,.7);
    font-family: inherit; font-size: 14px; font-weight: 600; padding: 9px; border-radius: 9px;
    cursor: pointer; transition: .18s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.mode-btn.on { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }

/* capture stage */
.stage { margin-top: 20px; position: relative; z-index: 1; text-align: center; }

.mic-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; }
.mic {
    width: 96px; height: 96px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--accent); color: #fff; font-size: 36px;
    display: grid; place-items: center; transition: transform .12s, background .2s;
    box-shadow: 0 8px 24px rgba(255,159,67,.4);
}
.mic:hover { background: var(--accent-hover); }
.mic:active { transform: scale(.94); }
.mic.rec { background: var(--live); box-shadow: 0 0 0 0 rgba(239,68,68,.5); animation: pulse 1.4s infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239,68,68,.45); }
    70% { box-shadow: 0 0 0 20px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.mic-hint { font-size: 13px; opacity: .8; }

/* upload drop */
.drop {
    border: 2px dashed rgba(255,255,255,.3); border-radius: 14px; padding: 26px 18px;
    cursor: pointer; transition: .18s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(255,159,67,.08); }
.drop .ic { font-size: 34px; opacity: .85; }
.drop .t { font-size: 14px; font-weight: 600; margin-top: 8px; }
.drop .s { font-size: 12px; opacity: .6; margin-top: 3px; }

/* speed HUD */
.hud {
    display: none; align-items: center; justify-content: center; gap: 14px;
    margin: 16px auto 0; padding: 8px 14px; max-width: max-content;
    background: rgba(255,255,255,.14); border-radius: 999px; font-size: 13px;
}
.hud.show { display: flex; }
.hud .zap { color: var(--accent); font-weight: 700; }
.hud b { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.hud .sep { width: 1px; height: 14px; background: rgba(255,255,255,.25); }

/* live transcript box */
.livebox {
    display: none; margin-top: 16px; text-align: left;
    background: rgba(255,255,255,.96); color: var(--ink);
    border-radius: 14px; padding: 16px; min-height: 96px; max-height: 260px; overflow-y: auto;
    font-size: 16px; line-height: 1.8; box-shadow: var(--shadow-md);
}
.livebox.show { display: block; }
.livebox .ph { color: var(--ink-soft); font-size: 14px; }
.livebox .fresh { animation: fadein .35s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.livebox .caret {
    display: inline-block; width: 2px; height: 1.05em; vertical-align: text-bottom;
    background: var(--accent); margin-left: 2px; animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.stop-btn {
    display: none; margin: 16px auto 0; border: 0; cursor: pointer;
    background: #fff; color: var(--live); font-family: inherit; font-weight: 700; font-size: 15px;
    padding: 11px 26px; border-radius: 999px; box-shadow: var(--shadow-md);
    align-items: center; gap: 8px;
}
.stop-btn.show { display: inline-flex; }

/* upload speed result banner */
.speed-flex {
    display: none; margin-top: 16px; padding: 12px 16px; border-radius: 12px;
    background: rgba(22,163,74,.14); color: #d6ffe6;
    font-size: 13.5px; align-items: center; justify-content: center; gap: 8px; text-align: center;
}
.speed-flex.show { display: flex; }
.speed-flex b { font-family: var(--mono); font-size: 16px; color: #fff; }

/* ---------- Result card (after capture) ---------- */
.result { display: none; margin-top: 18px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-md); overflow: hidden; }
.result.show { display: block; }
.result-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.result-head h3 { font-size: 15px; color: var(--navy); flex: 1; }
@media (prefers-color-scheme: dark){ .result-head h3 { color: #b9d2e6; } }
.result-body { padding: 16px 18px; }
.seg-label { font-size: 12px; font-weight: 700; color: var(--ink-soft); letter-spacing: .04em; margin-bottom: 6px; text-transform: uppercase; }
.seg-text { font-size: 15.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.seg-text.orig { color: var(--ink-soft); font-size: 14.5px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.orig-toggle { font-size: 13px; color: var(--navy); background: none; border: 0; cursor: pointer; padding: 4px 0; font-family: inherit; }

/* buttons */
.btn { font-family: inherit; font-weight: 600; font-size: 14px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; padding: 10px 16px; transition: .15s; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.result-actions .grow { flex: 1; min-width: 120px; }
.mini-spin { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Notes library ---------- */
.lib { margin-top: 30px; }
.lib-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.lib-head h2 { font-size: 17px; color: var(--ink); flex: 1; }
.lib-count { font-size: 12px; color: var(--ink-soft); background: var(--card); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.search { position: relative; margin-bottom: 14px; }
.search input { width: 100%; padding: 11px 14px 11px 38px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); font-family: inherit; font-size: 14px; }
.search input:focus { outline: none; border-color: var(--navy); }
.search .si { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }

.cards { display: grid; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; cursor: pointer; transition: .15s; box-shadow: var(--shadow-sm); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--navy-light); }
.card-top { display: flex; align-items: flex-start; gap: 10px; }
.card h4 { font-size: 15.5px; color: var(--ink); flex: 1; line-height: 1.4; }
.card .card-date { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }
.card p { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.empty { text-align: center; padding: 44px 20px; color: var(--ink-soft); }
.empty .ei { font-size: 44px; opacity: .35; }
.empty h3 { font-size: 16px; margin-top: 12px; color: var(--ink); }
.empty p { font-size: 13px; margin-top: 4px; }

/* ---------- Note modal ---------- */
.overlay { display: none; position: fixed; inset: 0; z-index: 90; background: rgba(15,23,32,.55); align-items: flex-end; justify-content: center; padding: 0; }
.overlay.show { display: flex; }
@media (min-width: 640px){ .overlay { align-items: center; padding: 20px; } }
.sheet { background: var(--card); width: 100%; max-width: 640px; max-height: 90vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slideup .25s ease; }
@media (min-width: 640px){ .sheet { border-radius: 20px; } }
@keyframes slideup { from { transform: translateY(30px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.sheet-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.sheet-head input { flex: 1; border: 0; background: none; font-family: inherit; font-size: 17px; font-weight: 700; color: var(--ink); }
.sheet-head input:focus { outline: none; }
.x { border: 0; background: none; color: var(--ink-soft); font-size: 20px; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; }
.x:hover { background: var(--bg); }
.sheet-body { padding: 16px 18px; overflow-y: auto; }
.sheet-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheet-foot .grow { flex: 1; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 120; background: var(--navy-dark); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transition: .25s; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--err); }
.toast.ok { background: var(--ok); }

/* full-screen processing */
.proc { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(238,242,247,.9); backdrop-filter: blur(4px); flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
@media (prefers-color-scheme: dark){ .proc { background: rgba(15,23,32,.92); } }
.proc.show { display: flex; }
.proc .big-spin { width: 46px; height: 46px; border: 4px solid var(--line); border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; }
.proc .pt { font-size: 15px; font-weight: 600; color: var(--ink); }
.proc .ps { font-size: 12.5px; color: var(--ink-soft); }

/* ---------- 文字版 Logo ---------- */
.brand { text-decoration: none; }
.brand-mark { display: flex; filter: drop-shadow(0 2px 5px rgba(41,64,80,.22)); }
.brand-word { font-weight: 800; font-size: 20px; color: var(--navy); letter-spacing: -.01em; }
.brand-word b { font-weight: 800; color: var(--navy-light); }
@media (prefers-color-scheme: dark){ .brand-word { color: #cfe0ee; } .brand-word b { color: #8fb3cc; } }

/* ---------- 主題分類 ---------- */
.topic-bar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.topic-bar::-webkit-scrollbar { display: none; }
.topic-chip { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); font-family: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: .15s; display: inline-flex; align-items: center; gap: 6px; }
.topic-chip:hover { border-color: var(--navy-light); color: var(--navy); }
.topic-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.topic-chip .n { font-size: 11px; opacity: .7; }
.topic-chip.add { border-style: dashed; color: var(--navy); }

.topic-consolidate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; background: rgba(255,159,67,.1); border: 1px solid rgba(255,159,67,.32); border-radius: var(--radius-sm); }
.topic-consolidate .tc-info { flex: 1; min-width: 140px; font-size: 13px; color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.topic-pick { margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.topic-pick label { font-size: 13px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.topic-pick input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font-family: inherit; font-size: 14px; }
.topic-pick input:focus { outline: none; border-color: var(--navy); background: var(--card); }
.sheet-topic { margin-top: 0; margin-bottom: 16px; }

/* 卡片上的主題標籤 */
.card-topic { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--navy); background: rgba(52,84,110,.08); padding: 2px 9px; border-radius: 999px; margin-top: 8px; }
@media (prefers-color-scheme: dark){ .card-topic { color: #9db8cf; background: rgba(157,184,207,.12); } }

/* ---------- 寫作風格 + 長度控制 ---------- */
.rewrite-controls { margin-top: 16px; padding: 12px 14px; background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--line); }
.rc-label { font-size: 12px; font-weight: 700; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 5px; }
.style-row { display: flex; gap: 7px; overflow-x: auto; padding: 8px 0 4px; scrollbar-width: none; }
.style-row::-webkit-scrollbar { display: none; }
.style-chip { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: .15s; }
.style-chip:hover { border-color: var(--navy-light); color: var(--navy); }
.style-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.len-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: transparent; color: var(--ink-soft); font-family: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; cursor: pointer; transition: .15s; }
.seg button.on { background: var(--navy); color: #fff; }
.sheet-restyle { margin-top: 16px; }
#mRestyle { margin-left: auto; }

/* ---------- 文字輸入模式 ---------- */
.text-input-area { width: 100%; min-height: 120px; padding: 14px; border: 0; border-radius: 14px; background: rgba(255,255,255,.96); color: var(--ink); font-family: inherit; font-size: 15px; line-height: 1.7; resize: vertical; box-shadow: var(--shadow-md); }
.text-input-area:focus { outline: none; }

/* ---------- 標籤 ---------- */
.tag-pick { margin-top: 14px; display: flex; align-items: flex-start; gap: 10px; }
.tag-pick label { font-size: 13px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; padding-top: 8px; }
.sheet-tags { margin-top: 0; margin-bottom: 16px; }
.tag-editor { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.tag-editor:focus-within { border-color: var(--navy); background: var(--card); }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--navy); background: rgba(52,84,110,.1); padding: 3px 4px 3px 10px; border-radius: 999px; white-space: nowrap; }
@media (prefers-color-scheme: dark){ .tag-chip { color: #9db8cf; background: rgba(157,184,207,.14); } }
.tag-x { border: 0; background: none; color: inherit; opacity: .6; cursor: pointer; font-size: 14px; width: 18px; height: 18px; border-radius: 50%; line-height: 1; }
.tag-x:hover { opacity: 1; background: rgba(0,0,0,.08); }
.tag-input { flex: 1; min-width: 90px; border: 0; background: none; font-family: inherit; font-size: 13.5px; color: var(--ink); padding: 3px 2px; }
.tag-input:focus { outline: none; }

/* 卡片上的標籤 */
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.card-tag { font-size: 11px; font-weight: 600; color: var(--accent-hover); background: rgba(255,159,67,.12); padding: 2px 8px; border-radius: 999px; }

/* ---------- 輸出語言選單 ---------- */
.lang-select { border: 1px solid var(--line); background: var(--card); color: var(--ink); font-family: inherit; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.lang-select:focus { outline: none; border-color: var(--navy); }

/* ---------- 分享彈窗 ---------- */
.share-url-row { display: flex; gap: 8px; }
.share-url-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font-family: var(--mono); font-size: 12.5px; }
.share-url-row input:focus { outline: none; }

/* ---------- 累積區塊（多則語音補充 + AI 關鍵字/標題）---------- */
.block-header { padding: 14px 16px; background: rgba(52,84,110,.06); border: 1px solid rgba(52,84,110,.14); border-radius: var(--radius-sm); margin-bottom: 14px; }
@media (prefers-color-scheme: dark){ .block-header { background: rgba(157,184,207,.08); border-color: rgba(157,184,207,.18); } }
.block-title-input { width: 100%; border: 0; background: none; font-family: inherit; font-size: 17px; font-weight: 800; color: var(--navy); padding: 2px 0; }
@media (prefers-color-scheme: dark){ .block-title-input { color: #b9d2e6; } }
.block-title-input:focus { outline: none; }
.block-title-input::placeholder { color: var(--ink-soft); font-weight: 600; }
.block-keywords { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kw-chip { border: 1px solid rgba(255,159,67,.4); background: rgba(255,159,67,.1); color: var(--accent-hover); font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 3px 11px; border-radius: 999px; cursor: pointer; transition: .15s; }
.kw-chip:hover { background: rgba(255,159,67,.2); }
.kw-chip.added { background: var(--accent); color: #fff; border-color: var(--accent); }
.rc-hint { font-size: 11px; font-weight: 500; color: var(--ink-soft); text-transform: none; margin-left: 4px; }

.entries-list { display: flex; flex-direction: column; gap: 10px; }
.entry-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.entry-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.entry-restyle { border: 0; background: none; color: var(--ink-soft); cursor: pointer; font-size: 12px; padding: 3px 6px; border-radius: 6px; }
.entry-restyle:hover { color: var(--navy); background: rgba(52,84,110,.08); }
.entry-text { font-size: 15px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.entry-loading { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 13.5px; }

/* 齒輪：全域預設設定入口 */
.settings-btn { border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); width: 34px; height: 34px; border-radius: 999px; cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; transition: .15s; }
.settings-btn:hover { color: var(--navy); border-color: var(--navy-light); }

/* 繼續補充列 */
.add-more-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-top: 4px; background: rgba(52,84,110,.05); border: 1px dashed rgba(52,84,110,.28); border-radius: var(--radius-sm); }
@media (prefers-color-scheme: dark){ .add-more-row { background: rgba(157,184,207,.06); border-color: rgba(157,184,207,.28); } }
.amr-label { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 5px; }
.amr-btn { border: 1px solid var(--line); background: var(--card); color: var(--navy); font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: .15s; display: inline-flex; align-items: center; gap: 5px; }
@media (prefers-color-scheme: dark){ .amr-btn { color: #9db8cf; } }
.amr-btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* 補充既有筆記 */
.append-toggle-row { margin-top: 14px; }
.append-box { margin-top: 10px; padding: 12px 14px; background: var(--bg); border: 1px dashed rgba(52,84,110,.28); border-radius: var(--radius-sm); }
@media (prefers-color-scheme: dark){ .append-box { border-color: rgba(157,184,207,.28); } }
.append-rec-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.append-rec-state { font-size: 12.5px; font-weight: 700; color: var(--live); display: inline-flex; align-items: center; gap: 6px; }
.live-dot-mini { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse-dot 1.2s infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
#mAppendMic.rec-on { background: var(--live); color: #fff; border-color: var(--live); }

/* 設定面板分節 */
.settings-section-title { font-size: 13.5px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
@media (prefers-color-scheme: dark){ .settings-section-title { color: #b9d2e6; } }
.settings-hint { font-size: 12px; color: var(--ink-soft); margin-top: 16px; line-height: 1.6; }

/* 筆記檢視：重新改寫（無參數，套用設定裡的預設） */
.restyle-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.restyle-hint { font-size: 12px; color: var(--ink-soft); }

.hidden { display: none !important; }
