:root {
  color-scheme: light;
  --paper: #f4f3ed;
  --surface: #fcfcf8;
  --ink: #242d28;
  --muted: #7b8278;
  --line: #e3e5dc;
  --green: #4d765d;
  --green-soft: #e9efe5;
  --red: #b85040;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid #9bb6a1; outline-offset: 5px; }
[hidden] { display: none !important; }
.page { max-width: 1120px; padding: 0 44px; margin: 0 auto; }
.topbar { height: 104px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); font-size: 22px; font-weight: 600; letter-spacing: 2px; }
.brand-sub { display: block; font-size: 8px; letter-spacing: 2.6px; margin-top: 3px; font-weight: 500; }
.brand-mark { display: flex; gap: 4px; align-items: center; height: 34px; }
.brand-mark i { display: block; width: 4px; height: 16px; border-radius: 3px; background: var(--green); }
.brand-mark i:nth-child(2) { height: 31px; }
.brand-mark i:nth-child(3) { height: 24px; }
.brand-mark i:nth-child(4) { height: 12px; }
.local-badge { display: inline-flex; gap: 8px; align-items: center; color: #687461; font-size: 11px; letter-spacing: .8px; border: 1px solid #d9dfd1; padding: 7px 11px; border-radius: 20px; }
.status-dot { display: inline-block; width: 5px; height: 5px; background: #6e9171; border-radius: 50%; flex-shrink: 0; }
.intro { padding: 55px 0 35px; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: 2.5px; color: var(--green); }
.eyebrow > span { width: 15px; height: 1px; background: var(--green); }
h1 { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 43px); letter-spacing: 2px; font-weight: 500; margin: 17px 0 13px; }
h1 em { color: var(--green); font-style: normal; }
.intro > p { font-size: 12px; color: var(--muted); letter-spacing: .7px; margin: 0; line-height: 1.8; }
.workspace { display: grid; grid-template-columns: .86fr 1.14fr; gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: 17px; background: var(--surface); overflow: hidden; }
.panel-heading { height: 66px; padding: 0 25px; display: flex; align-items: center; justify-content: space-between; }
.panel-heading h2 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; }
.section-number { color: #a1a79b; font-family: Georgia, serif; font-size: 12px; font-style: italic; letter-spacing: .2px; }
.state-tag { font-size: 10px; color: var(--green); padding: 5px 8px; border-radius: 5px; background: var(--green-soft); }
.recording-stage { display: flex; flex-direction: column; align-items: center; padding-top: 19px; }
.mic-orbit { width: 124px; height: 124px; border-radius: 50%; border: 1px solid #e8ebe1; display: grid; place-items: center; background: #f6f7f0; position: relative; }
.mic-orbit::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 1px solid #eff0e9; }
.mic-core { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: #edf0e7; color: #658167; transition: background .3s; }
.mic-core svg { width: 31px; height: 31px; }
.mic-orbit.active::after { animation: pulse 2s ease-in-out infinite; border-color: #cedbc7; }
.mic-orbit.active .mic-core { background: #dce9d8; color: #3a6b49; }
.timer { font: 400 43px/1.1 "Baskerville", "Palatino Linotype", Georgia, serif; font-variant-numeric: tabular-nums; letter-spacing: 2px; margin-top: 30px; }
.timer > span { color: #a4ab9b; padding: 0 4px; }
.stage-caption { margin: 10px 0 0; color: var(--muted); font-size: 11px; letter-spacing: 1px; }
#waveform { display: block; width: calc(100% - 58px); height: 52px; margin: 15px 29px 16px; }
.recording-actions { padding: 0 28px; display: flex; flex-direction: column; align-items: center; gap: 13px; }
.primary-button { width: 100%; height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 9px; font-size: 13px; letter-spacing: 1.2px; transition: background .2s, transform .2s; }
.primary-button:hover:enabled { background: #3c5140; transform: translateY(-1px); }
.primary-button:disabled { opacity: .6; }
.primary-button.recording { background: var(--red); border-color: var(--red); }
.primary-button.recording:hover { background: #a14739; }
.button-symbol { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.primary-button.recording .button-symbol { border-radius: 2px; }
.primary-button.waiting .button-symbol { width: 12px; height: 12px; border: 1.5px solid #ffffff55; border-top-color: white; background: transparent; animation: spin .8s linear infinite; }
.demo-button { display: flex; align-items: center; gap: 5px; border: 0; background: transparent; color: #707f6a; font-size: 11px; padding: 4px 8px; }
.demo-button svg { width: 15px; height: 15px; }
.demo-button:hover:enabled { color: #2e583a; }
.demo-button:disabled { opacity: .4; }
.upload-button { width: 100%; min-height: 43px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #d6ddce; border-radius: 9px; background: transparent; color: var(--green); font-size: 12px; }
.upload-button svg { width: 17px; height: 17px; }
.upload-button:hover:enabled { background: var(--green-soft); }
.upload-button:disabled { opacity: .45; }
.upload-limits { margin: -3px 0 2px; color: var(--muted); font-size: 10px; line-height: 1.8; text-align: center; }
.file-details { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #f3f5ed; font-size: 11px; }
#file-name { display: block; overflow-wrap: anywhere; line-height: 1.6; }
#file-meta, #file-progress-label { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
#file-progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 3px; margin-top: 12px; accent-color: var(--green); background: var(--line); }
#file-progress::-webkit-progress-bar { background: var(--line); border-radius: 3px; }
#file-progress::-webkit-progress-value { background: var(--green); border-radius: 3px; }
#file-progress::-moz-progress-bar { background: var(--green); border-radius: 3px; }
.audio-notice { text-align: center; font-size: 9px; color: #999e92; margin: 17px 14px 22px; line-height: 1.6; }
.transcript { display: flex; flex-direction: column; position: relative; }
.transcript .panel-heading { border-bottom: 1px solid #eceee5; margin: 0 25px; padding: 0; flex-shrink: 0; }
.transcript-status { color: #9a9f94; font-size: 10px; }
.transcript-status.live { color: var(--green); }
.transcript-content { padding: 28px 30px; flex: 1; min-height: 320px; max-height: 395px; overflow: auto; }
.empty-state { padding: 24px 0 0; }
.quote-mark { font: 100px/.8 Georgia, serif; color: #dde4d6; display: block; height: 69px; }
.empty-state p { font-family: var(--serif); font-size: 21px; letter-spacing: 1px; margin: 17px 0 12px; color: #87917f; }
.empty-state > span:last-child { font-size: 11px; color: #abb0a4; letter-spacing: .4px; }
.transcript-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-size: 19px; letter-spacing: .5px; line-height: 2; font-family: var(--serif); }
.transcript-text.live::after { content: ""; display: inline-block; height: 19px; width: 2px; vertical-align: -3px; margin-left: 5px; background: var(--green); animation: blink 1s ease-in-out infinite; }
.transcript-footer { margin: auto 25px 0; min-height: 62px; border-top: 1px solid #eceee5; display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: #a1a698; }
.copy-button { display: flex; align-items: center; gap: 5px; background: none; border: 0; color: var(--green); font-size: 11px; padding: 8px 0 8px 8px; }
.copy-button svg { width: 16px; height: 16px; }
.copy-button:disabled { color: #a6ab9e; opacity: .6; }
.feedback { text-align: center; color: #969d8e; min-height: 32px; font-size: 10px; letter-spacing: .3px; line-height: 1.7; margin: 17px 0 20px; }
.feedback.error { color: var(--red); }
.footer { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: #969d8d; font-size: 9px; letter-spacing: .8px; padding: 22px 0 28px; }
.footer > span:last-child { display: flex; align-items: center; gap: 6px; }
.account-controls { display: flex; align-items: center; gap: 10px; }
.account-controls .local-badge { max-width: 170px; }
#account-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.access-dialog { width: min(440px, calc(100vw - 36px)); border: 1px solid var(--line); border-radius: 17px; padding: 34px; background: var(--surface); color: var(--ink); }
.access-dialog::backdrop { background: #242d2870; backdrop-filter: blur(5px); }
.access-dialog h2 { font: 500 24px/1.7 var(--serif); margin: 18px 0 10px; }
.access-dialog p { font-size: 12px; line-height: 1.8; color: var(--muted); }
.access-dialog label { display: block; font-size: 12px; margin: 22px 0 8px; }
.access-dialog input { width: 100%; padding: 13px 12px; border: 1px solid #d6ddce; border-radius: 8px; font: 14px var(--sans); background: white; color: var(--ink); }
.access-dialog input:focus { outline: 2px solid #9bb6a1; outline-offset: 2px; }
.access-dialog .access-error { min-height: 22px; color: var(--red); margin: 10px 0 15px; }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .2; } }
@media (max-width: 700px) {
  .page { padding: 0 22px; }
  .topbar { height: 85px; }
  .intro { padding: 35px 0 27px; }
  h1 { font-size: 31px; letter-spacing: .3px; }
  .intro > p { font-size: 11px; letter-spacing: 0; }
  .workspace { grid-template-columns: 1fr; gap: 16px; }
  .recording-stage { padding-top: 9px; }
  .mic-orbit { width: 100px; height: 100px; }
  .mic-core { width: 72px; height: 72px; }
  .timer { margin-top: 22px; font-size: 37px; }
  #waveform { margin-top: 8px; margin-bottom: 8px; }
  .transcript-content { min-height: 235px; max-height: 400px; }
  .empty-state { padding: 10px 0; }
  .footer { font-size: 8px; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::after { animation: none !important; transition: none !important; }
}
