/* ===== 灵次元 · 极简工具页 共享样式 ===== */
:root {
  --bg: #07060f; --panel: #0f0d1e; --sheet: #131127;
  --surface: rgba(255,255,255,0.05); --surface-2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.10); --border-strong: rgba(255,255,255,0.18);
  --text: #ECEBF6; --text-2: #B7B2D0; --text-3: #837EA0;
  --violet: #9B6CFF; --cyan: #2DD4F0; --live: #FB7185; --ok: #34D399; --warn: #FBBF24;
  --grad: linear-gradient(115deg, #B07CFF 0%, #7C6CFF 45%, #38CFF0 100%);
  --grad-soft: linear-gradient(115deg, rgba(176,124,255,0.18), rgba(56,207,240,0.13));
  --shadow: 0 24px 60px -24px rgba(0,0,0,0.7);
  --maxw: 1180px;
}
[data-theme="light"] {
  --bg: #F4F2FA; --panel: #FFFFFF; --sheet: #FFFFFF;
  --surface: rgba(34,24,70,0.04); --surface-2: rgba(34,24,70,0.07);
  --border: rgba(34,24,70,0.10); --border-strong: rgba(34,24,70,0.18);
  --text: #1A1530; --text-2: #524C6C; --text-3: #8a85a3;
  --live: #E5476A; --ok: #0FA968; --warn: #C77800;
  --shadow: 0 24px 60px -26px rgba(80,60,150,0.22);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body { background: var(--bg); color: var(--text); font-family: "Noto Sans SC", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(155,108,255,0.4); color: #fff; }
.ic { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ic svg { width: 100%; height: 100%; display: block; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .grad-text { background: linear-gradient(115deg,#7C3AED,#5B5BF0 45%,#0C9FC4); -webkit-background-clip: text; background-clip: text; color: transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 999px; }

button, input, textarea { font-family: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
.btn { font-size: 15px; font-weight: 500; border-radius: 12px; padding: 12px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s, color .2s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--grad); color: #0a0814; font-weight: 600; box-shadow: 0 8px 22px -10px rgba(124,108,255,.7); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn .ic { width: 17px; height: 17px; }
.iconbtn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); transition: background .18s, color .18s; flex: none; }
.iconbtn:hover { background: var(--surface); color: var(--text); }
.iconbtn .ic { width: 21px; height: 21px; }

/* ===== shell ===== */
.shell { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.appbar { flex: none; display: flex; align-items: center; gap: 6px; padding: 12px clamp(16px, 3vw, 40px); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); border-bottom: 1px solid var(--border); z-index: 10; }
.appbar .brand { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; color: inherit; min-width: 0; }
.appbar .brand .mk { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; flex: none; box-shadow: 0 5px 14px -5px rgba(124,108,255,.8); position: relative; overflow: hidden; }
.appbar .brand .mk::after { content:""; position:absolute; inset:0; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.5), transparent 55%); }
.appbar .brand .mk .ic { width: 19px; height: 19px; color: #0a0814; }
.appbar .brand .nm b { font-family: "Noto Serif SC", serif; font-weight: 900; font-size: 17px; letter-spacing: .5px; display: block; line-height: 1.1; white-space: nowrap; }
.appbar .brand .nm span { font-size: 10.5px; color: var(--text-3); letter-spacing: 1.5px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); text-decoration: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); transition: color .15s, border-color .15s; white-space: nowrap; }
.back:hover { color: var(--text); border-color: var(--border-strong); }
.back .ic { width: 14px; height: 14px; }

/* ===== page scroll ===== */
.page { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.col { width: 100%; max-width: min(var(--maxw), 92vw); margin: 0 auto; padding: 30px clamp(16px, 3vw, 40px) 90px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 26px; align-content: start; }
.col > * { grid-column: 1 / -1; }
.col.split > .card { grid-column: 1; align-self: start; position: sticky; top: 18px; }
.col.split > .result, .col.split > .result-card { grid-column: 2; }
.col.wide { max-width: min(1320px, 95vw); }
@media (max-width: 900px) { .col, .col.split > .card, .col.split > .result, .col.split > .result-card { grid-template-columns: 1fr; grid-column: 1 / -1 !important; position: static; } }

/* hero intro */
.intro { text-align: center; margin-bottom: 26px; }
.intro .eyebrow { font-size: 13px; color: var(--violet); font-weight: 600; letter-spacing: 1px; margin-bottom: 10px; }
.intro h1 { font-family: "Noto Serif SC", serif; font-size: clamp(26px, 4.4vw, 36px); font-weight: 900; letter-spacing: .5px; margin-bottom: 12px; }
.intro p { font-size: 15px; color: var(--text-2); font-weight: 300; line-height: 1.7; max-width: 520px; margin: 0 auto; }

/* cards / fields */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 20px; margin-bottom: 16px; }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 9px; white-space: nowrap; flex-wrap: wrap; }
.field label .ic { width: 15px; height: 15px; color: var(--violet); }
.field label .opt { font-weight: 400; color: var(--text-3); font-size: 12px; }
textarea.in, input.in { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 13px 15px; color: var(--text); font-size: 15px; line-height: 1.7; outline: none; transition: border-color .2s, box-shadow .2s; }
textarea.in { resize: vertical; min-height: 110px; }
textarea.in:focus, input.in:focus { border-color: rgba(155,108,255,.55); box-shadow: 0 0 0 3px rgba(155,108,255,.12); }
textarea.in::placeholder, input.in::placeholder { color: var(--text-3); }
textarea.in.tall { min-height: 200px; }

/* segmented control */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { font-size: 13.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); padding: 9px 15px; border-radius: 999px; transition: all .15s; white-space: nowrap; }
.seg button:hover { color: var(--text); border-color: var(--border-strong); }
.seg button.on { color: #0a0814; background: var(--grad); border-color: transparent; font-weight: 600; box-shadow: 0 6px 16px -8px rgba(124,108,255,.6); }

/* modes (paper) larger */
.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mode { display: flex; align-items: flex-start; gap: 12px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-align: left; transition: all .15s; }
.mode:hover { border-color: var(--border-strong); background: var(--surface-2); }
.mode.on { border-color: rgba(155,108,255,.55); background: var(--grad-soft); }
.mode .mic { width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.mode.on .mic { background: linear-gradient(140deg, rgba(176,124,255,.9), rgba(56,207,240,.8)); }
.mode.on .mic .ic { color: #fff; }
.mode .mic .ic { width: 19px; height: 19px; color: var(--violet); }
.mode .mt { display: block; font-size: 14.5px; font-weight: 600; }
.mode .md { display: block; font-size: 12px; color: var(--text-3); margin-top: 3px; line-height: 1.5; }

/* generate row */
.gen-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.gen-row .btn-primary { padding: 13px 26px; font-size: 15.5px; }
.gen-hint { font-size: 12.5px; color: var(--text-3); }

/* recorder (meeting) */
.rec-area { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rec-btn { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; border-radius: 999px; padding: 12px 22px; border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: all .15s; white-space: nowrap; }
.rec-btn.on { background: rgba(251,113,133,.14); color: var(--live); border-color: rgba(251,113,133,.45); }
.rec-btn .ic { width: 19px; height: 19px; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(251,113,133,.55); } 70% { box-shadow: 0 0 0 9px rgba(251,113,133,0); } 100% { box-shadow: 0 0 0 0 rgba(251,113,133,0); } }
.rec-wave { display: inline-flex; align-items: center; gap: 3px; height: 15px; }
.rec-wave i { width: 3px; height: 4px; background: var(--live); border-radius: 2px; animation: rw 1s ease-in-out infinite; }
.rec-wave i:nth-child(2){animation-delay:.15s} .rec-wave i:nth-child(3){animation-delay:.3s} .rec-wave i:nth-child(4){animation-delay:.45s}
@keyframes rw { 0%,100%{height:4px} 50%{height:15px} }

/* ===== result ===== */
.result { margin-top: 8px; }
.result-card { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; margin-bottom: 16px; }
.result-card .rc-head { display: flex; align-items: center; gap: 9px; padding: 15px 18px; border-bottom: 1px solid var(--border); font-size: 14.5px; font-weight: 700; }
.result-card .rc-head .ic { width: 17px; height: 17px; color: var(--violet); }
.result-card .rc-head .acts { margin-left: auto; display: flex; gap: 6px; }
.result-card .rc-body { padding: 18px; }
.rich { font-size: 15px; line-height: 1.9; color: var(--text); white-space: pre-wrap; }
.rich.muted { color: var(--text-2); }

/* score ring */
.score-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.ring { width: 92px; height: 92px; flex: none; position: relative; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring .num { font-family: "Space Grotesk", sans-serif; font-size: 28px; font-weight: 700; }
.score-txt { flex: 1; min-width: 180px; }
.score-txt h4 { font-size: 16px; font-weight: 700; margin-bottom: 5px; }
.score-txt p { font-size: 13.5px; color: var(--text-2); font-weight: 300; line-height: 1.6; }

/* suggestion item */
.sug { border: 1px solid var(--border); border-radius: 14px; padding: 15px; margin-bottom: 12px; background: var(--surface); }
.sug:last-child { margin-bottom: 0; }
.sug .sh { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
.sug .sh .ic { width: 15px; height: 15px; }
.sug.warn .sh { color: var(--warn); } .sug.ok .sh { color: var(--ok); }
.sug .old { font-size: 13.5px; color: var(--text-3); text-decoration: line-through; line-height: 1.6; margin-bottom: 8px; }
.sug .new { font-size: 14.5px; color: var(--text); line-height: 1.7; }
.sug .why { font-size: 12.5px; color: var(--text-3); margin-top: 8px; line-height: 1.55; }

/* todo / decision lists */
.li { display: flex; align-items: flex-start; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.li:last-child { border-bottom: none; }
.li .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); flex: none; margin-top: 9px; }
.li .tx { font-size: 14.5px; line-height: 1.6; color: var(--text); }
.li .who { font-size: 12px; color: var(--violet); background: var(--grad-soft); padding: 1px 9px; border-radius: 999px; margin-left: auto; flex: none; white-space: nowrap; }
.todo-li { cursor: pointer; }
.todo-li .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--text-3); flex: none; margin-top: 1px; display: grid; place-items: center; transition: all .15s; }
.todo-li.done .box { background: var(--grad); border-color: transparent; }
.todo-li.done .box .ic { width: 12px; height: 12px; color: #0a0814; }
.todo-li.done .tx { color: var(--text-3); text-decoration: line-through; }

/* busy / empty */
.busy-row { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; padding: 6px 0; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--violet); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-tip { text-align: center; color: var(--text-3); font-size: 13.5px; padding: 26px 16px; line-height: 1.7; }
.empty-tip .ic { width: 28px; height: 28px; opacity: .5; margin-bottom: 8px; }

/* toast */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--sheet); border: 1px solid var(--border-strong); color: var(--text); font-size: 14px; padding: 11px 20px; border-radius: 12px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 9px; animation: rise .25s ease; max-width: 90vw; }
.toast .ic { width: 16px; height: 16px; color: var(--ok); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 12px); } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
@media (max-width: 720px) {
  .col { padding: 22px 16px 70px; }
  .appbar { padding: 10px 14px; }
  .modes { grid-template-columns: 1fr; }
  .appbar .brand .nm span { display: none; }
}
