:root {
  --bg: #f4f5f1; --ink: #1d2a2c; --muted: #5d6b6f; --line: #d6d5c8; --card: #fbfbf7;
  --accent: #3f6b4a; --accent-ink: #ffffff; --me: #e6efe2; --them: #ffffff; --warn-bg: #fff3d6; --warn-ink: #6a4700; --bad: #b04a2f;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141a17; --ink: #e8e6df; --muted: #9fb0a8; --line: #2c3a32; --card: #1a231e; --accent: #8fd1a1; --accent-ink: #0c1a10; --me: #223327; --them: #1f2a24; --warn-bg: #2f2510; --warn-ink: #f1d18a; --bad: #e7936f; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", sans-serif; line-height: 1.7; font-size: 16px; }
main { max-width: 44rem; margin: 0 auto; padding: 2rem 1.25rem 5rem; }
header.site { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
header.site a { color: var(--accent); text-decoration: none; font-weight: 700; }
.kicker { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
h1 { font-size: 1.8rem; line-height: 1.25; margin: .3rem 0 .6rem; text-wrap: balance; }
h2 { font-size: 1.2rem; margin: 1.8rem 0 .6rem; }
p { margin: .5rem 0; max-width: 42rem; }
.lede { color: var(--muted); font-size: 1.02rem; }
label { display: block; margin: .9rem 0 .3rem; font-weight: 600; }
label small { display: block; font-weight: 400; color: var(--muted); font-size: .88rem; }
input[type="text"], input[type="number"], textarea, select { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; }
textarea { min-height: 5rem; }
.hint { color: var(--muted); font-size: .88rem; margin-top: .25rem; }
.button { display: inline-block; padding: .55rem 1rem; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.button.ghost { background: transparent; color: var(--accent); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.1rem; margin: 1rem 0; }
.status { font-size: .92rem; color: var(--muted); min-height: 1.4rem; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; margin: 1rem 0; }
.consent input { margin-top: .35rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.chat { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0; }
.msg { max-width: 85%; padding: .6rem .9rem; border-radius: 12px; border: 1px solid var(--line); white-space: pre-wrap; }
.msg.interviewer { background: var(--them); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.participant { background: var(--me); align-self: flex-end; border-bottom-right-radius: 4px; }
.composer { display: flex; gap: .6rem; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 3.2rem; }
.progress { font-size: .82rem; color: var(--muted); }
.notice { background: var(--warn-bg); color: var(--warn-ink); padding: .7rem 1rem; border-radius: 6px; font-size: .92rem; margin: 1rem 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .7rem; margin: 1rem 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: .6rem .8rem; }
.stat b { display: block; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .78rem; color: var(--muted); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }
.links a { word-break: break-all; }
.private { color: var(--bad); font-size: .85rem; }
.hidden { display: none !important; }
.error { color: var(--bad); }
footer { margin-top: 3rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); padding-top: 1rem; }
footer a { color: var(--accent); }
