:root {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #203a35;
  background: #f5f7f4;
  font-synthesis: none;
  --ink: #203a35;
  --muted: #5c7068;
  --accent: #076b63;
  --accent-hover: #05574f;
  --line: #dce4de;
  --surface: #fff;
  --subtle: #eef3ef;
  --danger: #9f3a30;
  --radius: 12px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button, a, input, textarea, summary { touch-action: manipulation; }
button, summary { cursor: pointer; }
a { color: var(--accent); text-underline-offset: .25em; }
a:hover { text-decoration-thickness: 2px; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
::selection { background: #cbe5d9; color: #173d32; }
input, textarea { caret-color: var(--accent); }
button { border: 0; }
button:disabled { cursor: not-allowed; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; z-index: 10; top: 12px; left: 12px; padding: 12px 18px; background: var(--surface); border: 1px solid var(--accent); border-radius: 6px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.topbar { max-width: 1168px; margin: auto; padding: 28px 40px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 1.125rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand-icon { color: var(--accent); }
.topnav { display: flex; gap: 24px; }
.topnav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .875rem; text-decoration: none; }
.topnav a:hover { color: var(--accent); }
main { max-width: 1168px; margin: auto; padding: 56px 40px 24px; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: 36px; }
h1 { font-size: 2.5rem; font-weight: 650; line-height: 1.4; letter-spacing: -.025em; margin: 0 0 16px; text-wrap: balance; }
.intro p { color: var(--muted); font-size: .9375rem; line-height: 1.85; margin: 0; }
.intro .intro-note { flex-shrink: 0; font-size: .8125rem; line-height: 2; padding-bottom: 2px; }
.intro-note span { color: var(--accent); }
h2, h3, p { overflow-wrap: anywhere; }
.input-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; }
.workspace-form { min-width: 0; padding: 32px; }
.workspace-form h2 { font-size: 1.125rem; margin: 0 0 28px; font-weight: 650; }
.field + .field { margin-top: 24px; }
label { display: block; font-size: .875rem; font-weight: 600; line-height: 1.5; }
textarea, .search-field { border: 1px solid #a7b9ae; border-radius: 8px; background: #fcfdfb; transition: border-color 180ms var(--ease), background-color 180ms var(--ease); }
textarea:hover, .search-field:hover { border-color: #708c7e; }
textarea:focus, .search-field:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); background: var(--surface); }
textarea { display: block; width: 100%; min-height: 104px; margin-top: 10px; padding: 13px 15px; resize: vertical; color: var(--ink); font-size: .9375rem; line-height: 1.7; }
textarea::placeholder, input::placeholder { color: #64776e; opacity: 1; }
.hint { color: var(--muted); font-size: .8125rem; line-height: 1.8; margin: 9px 0 0; }
.form-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.source-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: .8125rem; }
.source-label svg { color: var(--accent); flex-shrink: 0; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; gap: 20px; padding: 13px 20px; border-radius: 8px; background: var(--accent); color: white; font-size: .875rem; font-weight: 600; transition: background-color 180ms var(--ease); }
.primary-button:hover:enabled { background: var(--accent-hover); }
.primary-button:active:enabled { background: #03473f; }
.primary-button:disabled { color: #4e645b; background: #e2eae4; }
.primary-button.is-loading { color: white; background: var(--accent); cursor: progress; }
.is-loading .button-icon { display: none; }
.message { margin: 16px 0 0; color: var(--accent); font-size: .875rem; line-height: 1.8; overflow-wrap: anywhere; }
.message:empty { display: none; }
.message.error { padding: 12px 14px; border: 1px solid #edc9c3; border-radius: 8px; background: #fff6f3; color: var(--danger); }
.request-progress { display: grid; gap: 8px; margin-top: 16px; }
.request-progress span { height: 8px; background: var(--subtle); border-radius: 3px; }
.request-progress span:nth-child(2) { width: 78%; }
.request-progress span:nth-child(3) { width: 52%; }
.workspace-help { min-width: 0; padding: 32px 28px; background: #f0f5f0; border-left: 1px solid var(--line); border-radius: 0 16px 16px 0; }
.workspace-help h2 { font-size: .9375rem; font-weight: 650; margin: 0 0 12px; }
.workspace-help > p { color: #526b5e; font-size: .8125rem; line-height: 1.9; margin: 0; }
.workspace-help .formats { margin-top: 12px; font-size: .75rem; }
.usage-guide { margin-top: 26px; border-top: 1px solid #ceddd0; border-bottom: 1px solid #ceddd0; font-size: .8125rem; line-height: 1.9; color: #435f50; }
.usage-guide summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; list-style: none; color: var(--accent); font-weight: 600; }
.usage-guide summary::-webkit-details-marker { display: none; }
.usage-guide summary svg { flex-shrink: 0; transition: transform 180ms var(--ease); }
.usage-guide[open] summary svg { transform: rotate(180deg); }
.usage-guide ol { margin: 4px 0 18px; padding-left: 20px; }
.usage-guide li + li { margin-top: 14px; }
.usage-guide .hint { padding-bottom: 16px; color: #435f50; }
.workspace-help .help-footnote { margin-top: 22px; }
.workspace-help .service-status { margin-top: 16px; font-size: .75rem; }
.service-status:empty { display: none; }
.service-status.error { color: var(--danger); }
.detail { margin-top: 48px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; scroll-margin-top: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.section-heading h2 { font-size: 1.125rem; font-weight: 650; margin: 0; }
.section-heading .section-label { font-size: .875rem; color: var(--muted); font-weight: 500; }
.badge { padding: 4px 9px; border-radius: 5px; background: #edf5ee; color: #366444; font-size: .75rem; }
.episode-head { display: flex; align-items: flex-start; gap: 20px; margin: 24px 0 14px; }
.cover { width: 80px; height: 80px; aspect-ratio: 1; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.episode-info { min-width: 0; }
.podcast { font-size: .8125rem; color: var(--accent); line-height: 1.6; margin: 0 0 6px; }
.episode-head h3 { font-size: 1.375rem; line-height: 1.6; font-weight: 650; margin: 0; }
.muted { font-size: .8125rem; color: var(--muted); line-height: 1.7; }
.episode-head .muted { margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.export-section { margin-top: 28px; }
.export-section h3 { font-size: .875rem; margin: 0 0 12px; font-weight: 600; }
.files { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; }
.files a { display: inline-flex; align-items: flex-start; gap: 7px; max-width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #bacfc2; border-radius: 7px; color: var(--accent); background: #f8fbf7; font-size: .8125rem; line-height: 1.65; text-decoration: none; overflow-wrap: anywhere; transition: background-color 180ms var(--ease), border-color 180ms var(--ease); }
.files a:hover { border-color: var(--accent); background: #edf5ee; }
.files svg { margin-top: 3px; flex-shrink: 0; }
.transcript-panel { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.transcript-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.transcript-heading h3 { font-size: 1rem; font-weight: 650; margin: 0; }
.transcript-heading .muted { margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.search-field { display: flex; align-items: center; width: 260px; max-width: 100%; padding-left: 12px; color: var(--muted); }
.search-field svg { flex-shrink: 0; }
.search-field input { width: 100%; min-width: 0; padding: 11px 10px; border: 0; border-radius: 8px; outline: none; background: transparent; color: var(--ink); font-size: .875rem; }
.transcript { max-height: 620px; max-height: min(68vh, 720px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; margin-top: 20px; border-top: 1px solid var(--line); }
.segment { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 20px; padding: 18px 12px 18px 0; border-bottom: 1px solid #e8eee8; align-items: start; }
.segment .timestamp { display: inline-flex; justify-content: flex-start; align-items: center; min-width: 72px; min-height: 44px; padding: 0 7px; margin-left: -7px; border-radius: 5px; background: transparent; color: var(--accent); font: .8125rem ui-monospace, "Cascadia Code", monospace; font-variant-numeric: tabular-nums; }
.segment .timestamp:hover { background: var(--subtle); }
.segment p { max-width: 66ch; margin: 6px 0 0; font-size: 1rem; line-height: 1.95; }
mark { background: #d8ecb7; color: #243e20; border-radius: 2px; }
.copy-message { min-height: 1.6em; font-size: .8125rem; color: var(--accent); margin: 10px 0 0; line-height: 1.6; }
.copy-message.error { color: var(--danger); }
.history-section { margin-top: 48px; }
.history { margin-top: 18px; }
.history-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; text-align: left; padding: 19px 12px; border-top: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); transition: background-color 180ms var(--ease); }
.history-item:hover, .history-item[aria-current="true"] { background: #eaf1e9; }
.history-item[aria-current="true"] .history-title { color: var(--accent); }
.history-copy { min-width: 0; }
.history-title { display: block; font-size: .9375rem; font-weight: 500; overflow-wrap: anywhere; line-height: 1.7; }
.history-podcast { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.6; margin-top: 3px; }
.history-state { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.empty { margin: 0; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; line-height: 1.8; }
.transcript .empty { border: 0; }
footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; line-height: 1.8; }
.footer-brand { color: var(--ink); font-weight: 600; }
footer p { margin: 0; }
footer a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; }
@media (max-width: 960px) {
  .intro-note { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr) 270px; }
  .workspace-form { padding: 28px; }
  .workspace-help { padding: 28px 22px; }
  .form-bottom { align-items: flex-start; flex-direction: column; }
  .primary-button { width: 100%; }
}
@media (max-width: 760px) {
  .topbar { padding: 16px 24px; }
  main { padding: 36px 24px 24px; }
  h1 { font-size: 2rem; }
  .intro { margin-bottom: 28px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .workspace-form { padding: 28px; }
  .workspace-help { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; padding: 24px 28px; }
  .workspace-help h2, .workspace-help > p:first-of-type, .workspace-help .formats { display: none; }
  .usage-guide { margin-top: 0; border-top: 0; }
  .workspace-help .help-footnote { margin-top: 16px; }
  .detail { padding: 28px; }
  .form-bottom { align-items: center; flex-direction: row; }
  .primary-button { width: auto; }
}
@media (max-width: 480px) {
  .topbar { padding: 12px 20px; gap: 16px; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand-icon { width: 24px; }
  .topnav { gap: 14px; }
  .topnav a { font-size: .8125rem; }
  main { padding: 32px 20px 20px; }
  h1 { font-size: 1.875rem; }
  .intro p { font-size: .875rem; }
  .workspace-form, .detail { padding: 24px 20px; }
  .workspace-help { padding: 16px 20px; }
  .workspace-form h2 { margin-bottom: 24px; }
  .form-bottom { flex-direction: column; align-items: stretch; gap: 16px; }
  .primary-button { width: 100%; }
  .source-label { font-size: .75rem; }
  .detail, .history-section { margin-top: 36px; }
  .cover { width: 56px; height: 56px; }
  .episode-head { gap: 14px; }
  .episode-head h3 { font-size: 1.125rem; }
  .search-field { width: 100%; }
  .segment { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding-right: 0; }
  .segment .timestamp { min-width: 64px; padding-left: 3px; margin-left: -3px; font-size: .75rem; }
  .segment p { font-size: .9375rem; line-height: 1.9; }
  .history-item { gap: 12px; padding-left: 8px; padding-right: 8px; }
  .history-state { gap: 4px; }
  .history-state svg { display: none; }
  footer { margin-top: 48px; }
  footer p { order: 1; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
