:root {
  --paper: #f6f3ec;
  --ink: #263c35;
  --muted: #59665e;
  --line: #d9ddd4;
  --accent: #425c4c;
  --white: #fffdf8;
  --red: #863c32;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    20px/1.7 system-ui,
    -apple-system,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
[hidden] {
  display: none !important;
}
header {
  max-width: 1240px;
  margin: auto;
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  font:
    30px/1.1 Georgia,
    "Songti SC",
    serif;
  letter-spacing: 4px;
}
.brand small {
  display: block;
  font: 12px/2 system-ui;
  letter-spacing: 3px;
}
.seal {
  width: 45px;
  height: 50px;
  border: 1px solid #987d65;
  color: #795f4b;
  text-align: center;
  line-height: 48px;
  font-size: 27px;
}
main {
  max-width: 1160px;
  margin: 70px auto;
  padding: 0 30px;
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 80px;
}
h1 {
  font:
    normal clamp(36px, 4.5vw, 60px) / 1.35 Georgia,
    "Songti SC",
    "STSong",
    serif;
  letter-spacing: 3px;
  margin: 20px 0 28px;
}
h2 {
  font:
    normal 30px/1.5 Georgia,
    "Songti SC",
    serif;
  margin: 0 0 18px;
}
h3 {
  font-size: 24px;
}
.eyebrow {
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--muted);
  margin: 0 0 16px;
}
.intro {
  color: var(--muted);
  line-height: 2;
}
.paper {
  margin-top: 65px;
  padding: 30px 20px;
  border-left: 2px solid #b4b9a5;
  font-family: Georgia, "Songti SC", serif;
  color: #586953;
  letter-spacing: 2px;
}
.paper span {
  display: block;
  line-height: 2;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 16px 45px #233b2d05;
}
.card > p {
  margin: 0 0 20px;
}
label {
  display: block;
  margin: 18px 0 8px;
  font-size: 20px;
}
input,
textarea {
  display: block;
  width: 100%;
  background: white;
  border: 1px solid #99a59a;
  border-radius: 6px;
  padding: 12px 14px;
  min-height: 52px;
  color: var(--ink);
}
textarea {
  resize: vertical;
}
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
}
.check input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex-shrink: 0;
}
.primary,
.secondary,
.quiet {
  min-height: 52px;
  border-radius: 6px;
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-decoration: none;
}
.primary {
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
  font-weight: 500;
}
.secondary {
  background: var(--white);
  border: 1px solid #93a493;
  color: var(--ink);
}
.quiet {
  background: none;
  color: var(--ink);
  border: 1px solid transparent;
  font-size: 18px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.primary span {
  margin-left: auto;
}
.hint {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}
#login > .primary {
  width: 100%;
  margin-top: 20px;
}
#show-activate {
  padding-left: 0;
  margin-top: 16px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
#workspace {
  grid-column: 1/-1;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.scope {
  font-size: 18px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.scope small {
  font-size: 16px;
}
.library {
  margin: 50px 0;
}
.stories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.story {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  overflow-wrap: anywhere;
}
.story h3 {
  font:
    26px/1.5 Georgia,
    "Songti SC",
    serif;
  margin: 8px 0;
}
.story p {
  white-space: pre-wrap;
}
.story .actions {
  gap: 12px;
}
.story audio {
  width: 100%;
  margin: 16px 0;
}
.story img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 8px;
  background: #edece4;
}
.danger {
  color: var(--red);
}
#editor,
#upload-progress,
#recording {
  margin-top: 28px;
}
#record-time {
  font-size: 48px;
  font-variant-numeric: tabular-nums;
}
progress {
  width: 100%;
  height: 18px;
  accent-color: var(--accent);
}
footer {
  border-top: 1px solid var(--line);
  max-width: 1160px;
  margin: 40px auto 0;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
}
footer p:first-child {
  font:
    24px/1.5 Georgia,
    "Songti SC",
    serif;
  letter-spacing: 4px;
}
footer span {
  font-size: 14px;
}
#message {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  padding: 16px 24px;
  background: #253d34;
  color: white;
  box-shadow: 0 8px 30px #0002;
  max-width: calc(100vw - 24px);
  width: 650px;
  border-radius: 8px;
  z-index: 10;
}
#message.error {
  background: #773b31;
}
:focus-visible {
  outline: 3px solid #9a6035;
  outline-offset: 4px;
}
#identity {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
#who {
  font-size: 18px;
}
#record-result {
  display: grid;
  gap: 16px;
}
#record-audio {
  width: 100%;
}
@media (max-width: 760px) {
  header {
    padding: 20px;
    align-items: flex-start;
  }
  .brand {
    font-size: 26px;
  }
  .brand small {
    font-size: 11px;
  }
  main {
    margin: 35px auto;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 20px;
  }
  .welcome h1 {
    font-size: 40px;
  }
  .paper {
    display: none;
  }
  .card {
    padding: 24px;
  }
  .intro {
    font-size: 18px;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .scope {
    padding-left: 14px;
    margin: 0 0 22px;
  }
  .stories {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .actions > * {
    flex: 1 1 auto;
  }
  #identity {
    max-width: 55%;
    gap: 0;
    justify-content: flex-end;
  }
  #who {
    text-align: right;
  }
  #identity .quiet {
    padding: 8px 0;
    font-size: 16px;
  }
  footer {
    padding: 24px 20px;
  }
  .story h3 {
    font-size: 26px;
  }
}
