:root {
  color-scheme: light;
  --background: #FFF8EE;
  --primary: #2B3A67;
  --accent: #C2531F;
  --text: #252525;
  --muted: #626262;
  --border: #ded9d0;
  font-family: system-ui, -apple-system, "Noto Sans TC", sans-serif;
}
.sheet { width: min(100%, 720px); max-height: 85vh; border: 1px solid var(--border); border-radius: 20px 20px 0 0; padding: 24px; margin: auto auto 0; background: var(--background); color: var(--text); }
.sheet::backdrop { background: rgb(43 58 103 / 35%); }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.cite { display: inline; padding: 0 5px; min-height: 0; color: var(--accent); background: transparent; border: 0; vertical-align: super; font-size: .8em; }
.source { padding: 16px; margin: 10px 0; background: var(--background); border-left: 3px solid var(--accent); white-space: normal; }
.source blockquote { white-space: pre-wrap; margin: 0; }
.envelope { padding: 40px 20px; text-align: center; border: 2px solid var(--border); border-radius: 16px; background: #fff; }
.envelope-symbol { color: var(--accent); font-size: 4rem; }
.loading { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: var(--background); }
.loading[hidden] { display: none; }
.letter-body { min-height: 50vh; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0; background: var(--background); display: flex; gap: 12px; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); line-height: 1.7; }
main { max-width: 720px; padding: 24px 16px 72px; margin: auto; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
header a, h1, h2 { color: var(--primary); }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.2rem; margin-top: 0; }
a { color: var(--primary); overflow-wrap: anywhere; }
nav { display: flex; flex-wrap: wrap; gap: 16px; }
nav a { display: inline-flex; align-items: center; min-height: 52px; }
.card { background: #fff; padding: 24px; border: 1px solid var(--border); border-radius: 16px; margin-bottom: 20px; }
.login { max-width: 440px; margin: 8vh auto 0; }
.login h1, .login .tagline { text-align: center; }
label { display: block; margin-bottom: 16px; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; min-height: 52px; margin-top: 6px; border: 1px solid var(--border); border-radius: 8px; padding: 12px; font: inherit; background: #fff; }
textarea { min-height: 100px; }
input[type=checkbox] { width: 24px; height: 24px; vertical-align: middle; margin-right: 12px; accent-color: var(--primary); }
button, .button { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 12px 20px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font: inherit; cursor: pointer; text-decoration: none; }
button.secondary { color: var(--primary); background: #efedf5; }
button.danger { color: var(--accent); background: #fff0e7; }
button:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.muted, small { color: var(--muted); }
.notice, #notice { background: #fff0e7; border-left: 4px solid var(--accent); padding: 14px 16px; margin-bottom: 20px; border-radius: 8px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.progress { font-size: 1.35rem; color: var(--primary); font-weight: 600; }
.item { border-top: 1px solid var(--border); padding: 20px 0; overflow-wrap: anywhere; }
.item:first-child { border-top: 0; }
.item p { margin: 4px 0 12px; }
.topic { display: flex; justify-content: space-between; align-items: center; min-height: 52px; }
.question-text { font-size: 22px; white-space: pre-wrap; }
.preview { white-space: pre-wrap; }
.record { border-radius: 50%; width: 88px; height: 88px; background: var(--accent); }
.editor { min-height: 240px; font-size: 18px; }
.sticky { position: sticky; top: 0; background: var(--background); padding: 12px 0; z-index: 1; }
audio { display: block; width: 100%; margin: 12px 0; }
dialog { width: min(100% - 24px, 600px); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
dialog::backdrop { background: #0006; }
meter { width: 160px; }
@media (min-width: 600px) { main { padding: 32px 24px 80px; } }
