:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #20312d;
  background: #f6f5f0;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
.topbar, main, footer { width: min(100% - 36px, 760px); margin-inline: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 24px; }
.brand { color: inherit; text-decoration: none; font-size: 18px; font-weight: 700; }
.brand span { margin-left: 6px; color: #71847a; font-size: 11px; font-weight: 500; letter-spacing: .13em; }
.badge { padding: 7px 10px; border: 1px solid #d7dfd6; border-radius: 999px; color: #557664; font-size: 12px; white-space: nowrap; }
.intro { padding: 42px 0 30px; }
.eyebrow { color: #4d7664; font-size: 11px; font-weight: 700; letter-spacing: .2em; }
h1 { margin: 18px 0 22px; font-size: clamp(36px, 7vw, 56px); font-weight: 600; letter-spacing: -.045em; line-height: 1.18; }
.intro > p:not(.eyebrow) { max-width: 650px; color: #52645b; line-height: 1.8; }
.intro .notice { padding: 12px 16px; border-left: 3px solid #79a18b; background: #eaf0e9; color: #3d6250 !important; font-size: 13px; }
.panel { margin: 0 0 16px; padding: 20px; border: 1px solid #e1e5dc; border-radius: 16px; background: #fff; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
h2 { margin: 0; font-size: 17px; font-weight: 650; }
.count { color: #6c7c72; font-size: 12px; white-space: nowrap; }
.hint { margin: 12px 0 16px; color: #62736a; font-size: 13px; line-height: 1.7; }
.facts { margin: 18px 0 0; }
.facts > div { display: grid; grid-template-columns: minmax(115px, 36%) 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid #eff1ed; font-size: 13px; }
.facts dt { color: #6c7c72; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
button, .button-label { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; border: 1px solid #315a46; border-radius: 10px; padding: 9px 15px; background: #315a46; color: white; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
button.secondary { background: white; color: #315a46; }
button.danger { background: #884f44; border-color: #884f44; }
button:disabled, .button-label.disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, .button-label:focus-visible, a:focus-visible { outline: 3px solid #a5c6af; outline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.result { min-height: 24px; margin: 14px 0 0; color: #335a46; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.result.error { color: #a54235; }
.preview { display: block; width: 100%; max-height: 320px; margin-top: 14px; border-radius: 10px; background: #e9ede7; object-fit: contain; }
.playback { display: block; width: 100%; margin-top: 14px; }
.hidden { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.event-log { margin: 16px 0 0; padding-left: 20px; color: #63736a; font-size: 12px; line-height: 1.7; }
.event-log:empty { display: none; }
textarea { display: block; width: 100%; margin-top: 14px; padding: 12px; border: 1px solid #d8dfd6; border-radius: 10px; background: #fafbf8; color: #304139; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
footer { padding: 22px 0 36px; color: #8b978e; font-size: 12px; }

@media (max-width: 480px) {
  .topbar, main, footer { width: min(100% - 28px, 760px); }
  .intro { padding-top: 28px; }
  .panel { padding: 17px; }
  .facts > div { grid-template-columns: 1fr; gap: 3px; }
}
