:root {
  color-scheme: light;
  --paper: #f8f5ef;
  --ink: #282c29;
  --muted: #72766f;
  --line: #e2e1d8;
  --accent: #c84b34;
  --accent-dark: #ad3e29;
  --green: #46664e;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, a { touch-action: manipulation; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .42; cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid #a55122; outline-offset: 4px; }
[hidden] { display: none !important; }
.app { max-width: 510px; margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) 24px max(26px, env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 750; letter-spacing: -.8px; }
.brand-dot { width: 6px; height: 6px; margin-top: 10px; background: var(--accent); border-radius: 50%; }
.offline { background: transparent; border: 1px solid var(--line); border-radius: 30px; padding: 7px 10px; min-height: 36px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.offline.ready { color: var(--green); border-color: #c7d5c5; }
.offline.ready::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 5px 1px 0; border-radius: 50%; background: var(--green); }
.intro { margin: 36px 0 27px; }
h1 { margin: 0; font-size: clamp(34px, 9.5vw, 44px); line-height: 1.35; letter-spacing: -1.8px; font-weight: 650; }
.intro p { color: var(--muted); margin: 12px 0 0; font-size: 14px; }
.track-card { display: flex; align-items: center; width: 100%; gap: 13px; padding: 17px 14px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8; min-height: 84px; }
.track-icon { display: grid; place-items: center; width: 42px; height: 44px; flex-shrink: 0; border-radius: 9px; color: var(--accent); background: #f5e7da; font-size: 26px; }
.track-text { min-width: 0; flex: 1; }
.track-text strong { display: block; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.track-text > span { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.track-action { color: var(--muted); font-size: 23px; }
.recorder { padding-top: 25px; }
.state-line { display: flex; gap: 7px; justify-content: center; align-items: center; color: var(--muted); font-size: 12px; min-height: 20px; }
.state-dot { width: 6px; height: 6px; background: #999c90; border-radius: 50%; }
.state-dot.recording { background: var(--accent); animation: breathe 1.2s ease-in-out infinite; }
.clock { text-align: center; padding: 10px 0 0; font-family: ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
#elapsed { font-size: 49px; font-weight: 450; letter-spacing: -3px; }
#total { font-size: 15px; color: #81857b; letter-spacing: -.5px; }
#waveform { display: block; width: 100%; height: 65px; margin: 9px 0 19px; }
.meter { display: flex; align-items: center; gap: 8px; margin: -7px 0 15px; color: var(--muted); font-size: 11px; }
.meter meter { flex: 1; min-width: 0; height: 9px; accent-color: var(--green); }
.button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; min-height: 56px; border-radius: 12px; font-weight: 600; font-size: 16px; }
.record-button { color: #fffdf9; background: var(--accent); min-height: 62px; }
.record-button:not(:disabled):active { background: var(--accent-dark); transform: translateY(1px); }
.record-symbol { width: 13px; height: 13px; border-radius: 50%; background: currentColor; }
.record-button.is-recording .record-symbol { border-radius: 3px; }
.record-note { text-align: center; font-size: 11px; color: var(--muted); line-height: 1.65; margin: 11px 0 20px; }
.secondary-actions { display: flex; gap: 12px; }
.secondary { flex: 1; border: 1px solid #d4d6ca; background: transparent; font-size: 14px; min-height: 51px; }
.play-symbol { font-size: 11px; }
.mix-panel { margin-top: 23px; border-top: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 56px; font-size: 13px; }
summary::-webkit-details-marker { display: none; }
.expand { font-size: 18px; color: var(--muted); }
details[open] > summary .expand { transform: rotate(45deg); }
.mix-controls { padding: 2px 1px 18px; }
.slider-label { display: flex; justify-content: space-between; font-size: 13px; margin: 7px 0 4px; }
.slider-label output { color: var(--muted); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 37px; margin: 0 0 6px; }
.control-help { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 5px 0 0; }
.text-button { min-height: 44px; border: 0; background: none; color: var(--accent); font-size: 12px; padding: 0; }
.message { margin-top: 18px; border-left: 2px solid var(--accent); padding: 4px 0 4px 12px; color: #9d3926; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.message[data-kind="info"] { border-color: var(--green); color: var(--green); }
.export-panel { padding: 24px 0; border-top: 1px solid var(--line); }
h2 { font-size: 23px; font-weight: 600; letter-spacing: -.6px; margin: 0 0 10px; }
#export-info { color: var(--muted); overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
.share-button { background: var(--green); color: white; }
.download-button { display: grid; place-items: center; min-height: 48px; margin: 8px 0 0; text-decoration: none; color: var(--accent); font-size: 14px; border: 1px solid var(--line); border-radius: 10px; }
.help-panel { border-top: 1px solid var(--line); }
.help-content { padding-bottom: 12px; }
.help-content p { font-size: 12px; line-height: 1.8; margin: 0 0 14px; color: var(--muted); }
footer { text-align: center; padding: 20px 0 0; font-size: 11px; color: #888a80; }
@keyframes breathe { 50% { opacity: .35; } }
@media (max-width: 360px) { .app { padding-left: 18px; padding-right: 18px; } .track-card { gap: 10px; } .track-text > span { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
