:root {
  color: #17233a;
  background: #edf2f9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }

.offline-layout { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 72px 0 88px; }
.intro { max-width: 680px; margin-bottom: 36px; }
.eyebrow, .step, .provider-label { margin: 0; color: #1c67bc; font-weight: 760; letter-spacing: .07em; font-size: .78rem; }
h1 { margin: 10px 0 14px; font-size: clamp(2.35rem, 5vw, 4.2rem); line-height: .98; letter-spacing: -.065em; }
.lede { margin: 0; color: #66748d; line-height: 1.65; font-size: 1.05rem; }

.workspace { display: grid; grid-template-columns: minmax(300px, .92fr) minmax(460px, 1.35fr); gap: 24px; align-items: start; }
.upload-panel, .result-column { background: rgba(255,255,255,.94); border: 1px solid #d8e1ef; border-radius: 22px; box-shadow: 0 18px 48px rgba(33, 67, 117, .09); }
.upload-panel { padding: 28px; }
.result-column { padding: 12px; }
.panel-heading, .result-heading, .provider-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.quiet-status, .provider-state { margin: 0; color: #6b7890; font-weight: 650; }

.drop-zone { min-height: 192px; margin: 24px 0 12px; border: 1.5px dashed #90b8eb; border-radius: 16px; background: linear-gradient(145deg, #f7fbff, #edf5ff); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; color: #61718b; transition: .2s ease; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: #1768c5; background: #e7f1ff; transform: translateY(-1px); }
.drop-zone strong { color: #233b60; }
.upload-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #1768c5; color: white; font-size: 1.5rem; line-height: 1; }
.file-meta { min-height: 1.25rem; margin: 0 0 22px; color: #68758d; font-size: .89rem; overflow-wrap: anywhere; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 7px; color: #4a5a74; font-size: .88rem; font-weight: 670; }
input, textarea, select { width: 100%; padding: 10px 11px; border: 1px solid #cbd8e9; border-radius: 10px; color: #17233a; background: white; outline-color: #1c67bc; resize: vertical; }
.phrase-label { margin-top: 15px; }
#transcribe-button { width: 100%; margin-top: 22px; padding: 13px 16px; border: 0; border-radius: 11px; color: white; background: #155eae; font-weight: 750; transition: .2s ease; }
#transcribe-button:not(:disabled):hover { background: #104d90; transform: translateY(-1px); }
.upload-note { margin: 14px 0 0; color: #8591a6; font-size: .78rem; line-height: 1.55; }

.result-heading { padding: 16px 16px 10px; }
.provider-result { padding: 22px; border-radius: 15px; background: #f8faff; border: 1px solid #e0e8f3; }
.provider-result + .provider-result { margin-top: 12px; }
.provider-header h2 { margin: 5px 0 0; font-size: 1.2rem; letter-spacing: -.03em; }
.provider-label { font-size: .69rem; }
.result-body { min-height: 116px; display: grid; grid-template-columns: 34px 1fr; gap: 12px; margin: 20px 0 14px; }
.result-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #d9eafe; color: #1b64b6; font-weight: 800; }
.result-body p { margin: 0; color: #35445c; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-button { border: 0; background: transparent; padding: 0; color: #1768c5; font-size: .85rem; font-weight: 720; }
.conversation-stream { display: grid; gap: 10px; min-height: 124px; margin: 18px 0 14px; padding: 14px; border: 1px solid #dce7f5; border-radius: 12px; background: white; color: #66748d; }
.conversation-row { display: grid; grid-template-columns: 116px 28px minmax(0, 1fr); align-items: start; gap: 9px; color: #35445c; }
.conversation-row time { padding-top: 2px; color: #71819a; font-size: .77rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.channel-tag { display: grid; place-items: center; min-height: 24px; border-radius: 7px; background: #dcecff; color: #1b64b6; font-size: .78rem; font-weight: 800; }
.conversation-row[data-channel="right"] .channel-tag { background: #f2e5ff; color: #7d4ba5; }
.conversation-row p { margin: 0; line-height: 1.62; overflow-wrap: anywhere; }
.channel-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.channel-result { min-height: 126px; padding: 14px; border: 1px solid #dce7f5; border-radius: 12px; background: white; }
.channel-result h3 { margin: 0 0 9px; color: #58708f; font-size: .78rem; letter-spacing: .04em; }
.channel-result p { min-height: 46px; margin: 0 0 12px; color: #35445c; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.provider-result.is-processing { border-color: #8db9ec; }
.provider-result.is-processing .provider-state::after { content: ""; display: inline-block; width: 1em; height: 1em; margin-left: 8px; vertical-align: -2px; border: 2px solid #bed7f4; border-top-color: #1768c5; border-radius: 50%; animation: spin .75s linear infinite; }
.provider-result.is-error { background: #fff9f8; border-color: #f1cdc7; }
.provider-result.is-error .provider-state { color: #b64a3c; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 840px) { .offline-layout { width: min(100% - 28px, 660px); padding-top: 42px; } .workspace { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .channel-results { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .conversation-row { grid-template-columns: 1fr; gap: 5px; } .channel-tag { width: 28px; } }
@media (max-width: 440px) { .offline-layout { width: min(100% - 20px, 660px); } .upload-panel { padding: 20px; } .settings-grid { grid-template-columns: 1fr; } }
