:root {
  color: #142d37;
  background: #f2f7f8;
  font: 100%/1.6 system-ui, sans-serif;
  accent-color: #006b63;
  --ink: #142d37;
  --primary: #006b63;
  --muted: #48626b;
  --line: #a7bec3;
  --paper: #f2f7f8;
  --danger: #952c38;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 44rem; margin-inline: auto; padding: 1.25rem clamp(1rem, 4vw, 2rem) 3rem; }
h1, h2, h3, h4, p { margin: 0 0 .5rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.8rem, 7vw, 2.5rem); letter-spacing: -.03em; line-height: 1.12; }
h2, h3, h4 { line-height: 1.3; }
.masthead, .section-line, nav, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.masthead, .section-line { justify-content: space-between; }
header { border-block-end: 1px solid var(--line); }
header p, .muted { color: var(--muted); }
nav { gap: .35rem; margin-top: .45rem; }
nav button { color: var(--muted); background: transparent; border-color: transparent; border-radius: 0; }
nav [aria-current] { color: var(--primary); border-block-end: 3px solid var(--primary); }
section { margin-block-start: 1.2rem; }
#data > section { padding-block-start: 1rem; border-top: 1px solid var(--line); }
button, input, textarea { min-height: 44px; font: inherit; max-width: 100%; }
button, input::file-selector-button {
  background: var(--primary); color: white; border: 1px solid var(--primary);
  border-radius: .45rem; padding: .45rem .8rem; font-weight: 650; cursor: pointer;
}
.quiet { color: var(--primary); background: transparent; }
.danger { border-color: var(--danger); color: var(--danger); background: transparent; }
button:disabled { opacity: .62; cursor: default; }
label { display: block; font-weight: 650; }
input, textarea {
  display: block; width: 100%; color: var(--ink); background: white;
  border: 1px solid #789199; border-radius: .45rem; padding: .5rem .65rem;
}
input::file-selector-button { min-height: 44px; margin-inline-end: .45rem; }
textarea { resize: vertical; }
:focus-visible { outline: 3px solid #0c757b; outline-offset: 2px; }
#editor { border-block: 1px solid var(--line); padding-block: 1rem; margin-block-start: .75rem; display: grid; gap: .65rem; }
#editor label { min-width: 0; }
#editor-error { color: var(--danger); }
.status, #data-status, #review-status { color: #00564f; font-weight: 600; }
.status:not(:empty), #update { margin-block-start: .8rem; }
#browse, .actions { margin-block-start: .75rem; }
article { border-block-start: 1px solid #cddee2; padding-block: .85rem; }
article h3, #review-card [lang="zh"] { font-size: 1.32rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.multiline { overflow-wrap: anywhere; white-space: pre-wrap; }
#review-card { margin-block-end: .85rem; padding-block: .9rem; border-block: 1px solid var(--line); }
#history-list { padding-inline-start: 1.4rem; overflow-wrap: anywhere; }
#history-list li { margin-block: .45rem; }
#preview { padding: .9rem; margin-top: .8rem; border: 1px solid var(--line); border-radius: .5rem; }
dialog { width: min(92%, 30rem); border: 1px solid var(--line); border-radius: .7rem; background: var(--paper); color: var(--ink); padding: 1.25rem; }
dialog::backdrop { background: #142d3780; }
@media (min-width: 38rem) {
  #editor { grid-template-columns: 1fr 1fr; }
  #editor h3, #editor .actions, #editor-error { grid-column: 1 / -1; }
}
