:root {
  --ink: #17231f;
  --muted: #69736f;
  --paper: #f4f2ed;
  --card: #fbfaf7;
  --line: #dcded8;
  --mint: #b9f4d3;
  --mint-deep: #1b8a5a;
  --coral: #ff6b52;
  --shadow: 0 24px 70px rgba(35, 47, 42, 0.1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(185, 244, 211, .28), transparent 28%),
    linear-gradient(rgba(23,35,31,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,35,31,.025) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 42px 42px, 42px 42px, auto;
  font-family: "Noto Sans SC", system-ui, sans-serif;
}
button, input { font: inherit; }
button { color: inherit; }
.page-shell { width: min(1220px, calc(100% - 44px)); margin: 0 auto; padding-bottom: 64px; }
.site-header { height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(23,35,31,.12); }
.brand { color: inherit; text-decoration: none; font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 35px; height: 35px; display: flex; gap: 3px; align-items: center; justify-content: center; background: var(--ink); border-radius: 50%; }
.brand-mark span { width: 2px; background: var(--mint); border-radius: 3px; }
.brand-mark span:nth-child(1), .brand-mark span:nth-child(5) { height: 8px; }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(4) { height: 15px; }
.brand-mark span:nth-child(3) { height: 22px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.privacy-chip { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.privacy-chip span { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-deep); box-shadow: 0 0 0 4px rgba(27,138,90,.1); }
.icon-button, .close-button { border: 1px solid var(--line); background: rgba(255,255,255,.5); cursor: pointer; display: grid; place-items: center; }
.icon-button { width: 42px; height: 42px; border-radius: 50%; }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.icon-button:hover { background: white; transform: rotate(14deg); }
.hero { padding: 68px 0 46px; position: relative; }
.eyebrow { font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: .18em; color: var(--mint-deep); margin: 0 0 13px; font-weight: 500; }
.hero h1 { font-size: clamp(42px, 5vw, 68px); line-height: 1.08; letter-spacing: -.055em; margin: 0; font-weight: 600; }
.hero h1 em { color: var(--mint-deep); font-style: normal; }
.hero-copy { color: var(--muted); font-size: 16px; margin: 22px 0 0; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(290px, .7fr); gap: 24px; align-items: start; }
.recorder-card, .history-panel { background: rgba(251,250,247,.92); border: 1px solid rgba(23,35,31,.13); box-shadow: var(--shadow); }
.recorder-card { min-height: 530px; }
.recorder-topline { padding: 24px 28px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.recorder-topline label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.recorder-topline input { font-weight: 600; font-size: 18px; background: transparent; border: 0; outline: 0; padding: 0; width: min(390px, 55vw); color: var(--ink); }
.recorder-topline input:focus { box-shadow: inset 0 -1px var(--mint-deep); }
.date-badge { font-family: "DM Mono", monospace; font-size: 12px; color: var(--muted); }
.recorder-meta-actions { display: flex; align-items: center; gap: 10px; }
.mac-settings-button { display: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: white; place-items: center; cursor: pointer; }
.mac-settings-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.recording-stage { min-height: 386px; display: flex; flex-direction: column; align-items: center; padding: 38px 24px 28px; position: relative; overflow: hidden; }
.status-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-line > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: #aeb5b2; }
.is-recording .status-line > span:first-child { background: var(--coral); box-shadow: 0 0 0 5px rgba(255,107,82,.12); animation: blink 1.5s infinite; }
.timer { font-family: "DM Mono", monospace; font-size: 36px; letter-spacing: .03em; font-weight: 500; margin: 9px 0 6px; font-variant-numeric: tabular-nums; }
.waveform { width: min(100%, 650px); height: 72px; opacity: .8; }
.record-button { width: 108px; height: 108px; border-radius: 50%; border: 0; background: transparent; position: relative; cursor: pointer; display: grid; place-items: center; margin-top: 2px; }
.record-rings { position: absolute; inset: 0; border-radius: 50%; background: rgba(185,244,211,.35); transition: transform .25s; }
.record-core { width: 78px; height: 78px; background: var(--ink); border-radius: 50%; display: grid; place-items: center; box-shadow: 0 12px 30px rgba(23,35,31,.2); transition: .2s; position: relative; z-index: 1; }
.record-core svg { width: 29px; fill: none; stroke: var(--mint); stroke-width: 1.8; }
.record-button:hover .record-rings { transform: scale(1.08); }
.record-button:hover .record-core { transform: translateY(-2px); }
.stop-icon { display: none; }
.is-recording .record-rings { animation: breathe 2s infinite; background: rgba(255,107,82,.16); }
.is-recording .record-core { background: var(--coral); }
.is-recording .record-core .mic-icon { display: none; }
.is-recording .record-core .stop-icon { display: block; stroke: white; }
.record-hint { margin: 13px 0 0; font-size: 13px; color: var(--muted); }
.recording-controls { display: flex; gap: 10px; margin-top: 20px; }
.secondary-button, .finish-button, .primary-button, .text-button { border: 0; cursor: pointer; padding: 11px 17px; font-weight: 600; font-size: 13px; }
.secondary-button { border: 1px solid var(--line); background: white; display: flex; align-items: center; gap: 7px; }
.secondary-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.secondary-button .play-glyph { display: none; }
.secondary-button.is-paused .pause-glyph { display: none; }
.secondary-button.is-paused .play-glyph { display: block; fill: currentColor; stroke: none; }
.finish-button, .primary-button { background: var(--ink); color: white; }
.recorder-footnote { border-top: 1px solid var(--line); min-height: 59px; display: flex; justify-content: center; align-items: center; gap: 34px; color: var(--muted); font-size: 11px; }
.recorder-footnote span { display: flex; align-items: center; gap: 6px; }
.recorder-footnote svg { width: 16px; fill: none; stroke: var(--mint-deep); stroke-width: 1.7; }
.live-panel { border-top: 1px solid var(--line); background: #f7f6f1; padding: 24px 28px 20px; }
.live-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.live-panel-head h2 { margin: 4px 0 0; font-size: 19px; letter-spacing: -.03em; }
.live-kicker { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .15em; color: var(--coral); display: flex; align-items: center; gap: 7px; }
.live-kicker i { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); animation: blink 1.5s infinite; }
.translate-toggle { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; cursor: pointer; }
.translate-toggle > .switch { display: inline-block; }
.live-columns-label { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 21px; padding: 0 12px 9px; color: var(--muted); font-size: 10px; border-bottom: 1px solid var(--line); }
.live-feed { max-height: 310px; min-height: 112px; overflow-y: auto; scroll-behavior: smooth; }
.live-empty { min-height: 112px; display: flex; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 11px; }
.live-empty span { width: 3px; height: 9px; background: #93a09a; animation: sound 1.2s ease-in-out infinite; }
.live-empty span:nth-child(2) { animation-delay: -.7s; }
.live-empty span:nth-child(3) { animation-delay: -.35s; margin-right: 7px; }
.live-turn { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; padding: 15px 12px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.75; }
.live-turn time { display: block; font-family: "DM Mono", monospace; font-size: 9px; color: #9ba39f; margin-bottom: 4px; }
.live-original.is-partial { color: #8b9590; }
.live-translation { color: var(--mint-deep); }
.live-translation.is-waiting { color: #9ba39f; font-size: 11px; }
.live-translation.is-hidden { display: none; }
.live-connection { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; padding-top: 12px; }
.live-connection span { width: 6px; height: 6px; border-radius: 50%; background: #d1a643; }
.live-connection.is-online span { background: var(--mint-deep); }
.live-connection.is-fallback span { background: #d18b43; }
.live-connection.is-error span { background: var(--coral); }
.history-panel { padding: 25px; min-height: 350px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.section-heading .eyebrow { margin-bottom: 5px; }
.history-count { font-family: "DM Mono", monospace; color: var(--muted); font-size: 12px; }
.history-list { display: grid; }
.history-item { padding: 18px 1px; border-bottom: 1px solid var(--line); cursor: pointer; }
.history-item:hover h3 { color: var(--mint-deep); }
.history-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.history-item time { font-family: "DM Mono", monospace; font-size: 10px; color: var(--muted); }
.history-item h3 { font-size: 14px; margin: 7px 0 5px; transition: .15s; }
.history-item p { color: var(--muted); margin: 0; font-size: 11px; line-height: 1.6; }
.delete-meeting { border: 0; background: transparent; color: #929a96; padding: 4px 2px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 10px; opacity: .42; transition: .15s; }
.delete-meeting svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.history-item:hover .delete-meeting, .delete-meeting:focus-visible { opacity: 1; }
.delete-meeting:hover { color: var(--coral); }
.empty-state { text-align: center; color: var(--muted); padding: 54px 10px; font-size: 12px; line-height: 1.8; }
.empty-state svg { width: 31px; display: block; margin: 0 auto 13px; fill: none; stroke: #aeb5b2; stroke-width: 1.3; }
.modal { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
.modal::backdrop { background: rgba(17,27,23,.55); backdrop-filter: blur(5px); }
.modal-card { width: min(500px, calc(100vw - 32px)); background: var(--card); padding: 29px; color: var(--ink); box-shadow: 0 40px 120px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; }
.modal-head h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.modal-head .eyebrow { margin-bottom: 6px; }
.close-button { border: 0; background: transparent; font-size: 28px; width: 34px; height: 34px; line-height: 1; }
.modal-intro { color: var(--muted); line-height: 1.7; font-size: 13px; margin: 21px 0; }
.field-label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.key-field { display: flex; border: 1px solid var(--line); background: white; }
.key-field:focus-within { border-color: var(--mint-deep); box-shadow: 0 0 0 3px rgba(27,138,90,.08); }
.key-field input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 13px; font-family: "DM Mono", monospace; font-size: 12px; background: transparent; }
.key-field button { border: 0; background: transparent; color: var(--mint-deep); padding: 0 13px; cursor: pointer; font-size: 12px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; margin: 19px 0; }
.setting-row strong { display: block; font-size: 13px; }
.setting-row small { display: block; color: var(--muted); margin-top: 3px; }
.switch input { display: none; }
.switch span { width: 40px; height: 23px; background: #cfd2cf; display: block; border-radius: 20px; padding: 3px; cursor: pointer; transition: .2s; }
.switch span::after { content: ""; display: block; width: 17px; height: 17px; border-radius: 50%; background: white; transition: .2s; }
.switch input:checked + span { background: var(--mint-deep); }
.switch input:checked + span::after { transform: translateX(17px); }
.security-note { background: #edf7f1; border-left: 3px solid var(--mint-deep); padding: 13px; color: #4e6259; font-size: 11px; line-height: 1.7; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.text-button { background: transparent; color: var(--muted); }
.result-card { width: min(760px, calc(100vw - 32px)); max-height: min(820px, calc(100vh - 40px)); overflow-y: auto; }
.processing { text-align: center; padding: 58px 20px 35px; }
.processing-orb { width: 74px; height: 74px; border-radius: 50%; background: #e7f8ee; margin: 0 auto 21px; display: flex; justify-content: center; align-items: center; gap: 4px; }
.processing-orb span { width: 4px; height: 15px; background: var(--mint-deep); animation: sound 1s ease-in-out infinite; }
.processing-orb span:nth-child(2) { animation-delay: -.7s; }
.processing-orb span:nth-child(3) { animation-delay: -.4s; }
.processing h3 { margin: 0; font-size: 18px; }
.processing p { color: var(--muted); font-size: 12px; margin: 9px 0 24px; }
.progress-track { height: 3px; background: var(--line); width: min(340px, 100%); margin: auto; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 16%; background: var(--mint-deep); transition: width .45s ease; }
.result-content { padding-top: 25px; }
.summary-banner { background: #edf7f1; padding: 19px; border-left: 3px solid var(--mint-deep); line-height: 1.8; font-size: 13px; }
.result-section { border-top: 1px solid var(--line); padding: 21px 0 5px; }
.result-section h3 { margin: 0 0 12px; font-size: 15px; }
.result-section ul { margin: 0; padding-left: 20px; color: #45504c; font-size: 13px; line-height: 1.8; }
.task-list { display: grid; gap: 8px; }
.task-item { display: grid; grid-template-columns: 18px 1fr auto; gap: 9px; padding: 10px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.task-item span:first-child { width: 15px; height: 15px; border: 1px solid #9aa39f; margin-top: 2px; }
.task-owner { color: var(--muted); font-size: 11px; white-space: nowrap; }
.transcript-box { white-space: pre-wrap; font-size: 12px; line-height: 1.8; color: var(--muted); max-height: 180px; overflow: auto; background: #f2f1ec; padding: 15px; }
.bilingual-result div { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.bilingual-result strong { color: var(--ink); font-weight: 500; }
.bilingual-result span { color: var(--mint-deep); }
.toast { position: fixed; left: 50%; bottom: 27px; transform: translate(-50%, 20px); background: var(--ink); color: white; padding: 11px 17px; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes blink { 50% { opacity: .35; } }
@keyframes breathe { 50% { transform: scale(1.12); opacity: .55; } }
@keyframes sound { 50% { height: 30px; } }

@media (max-width: 820px) {
  .page-shell { width: min(100% - 28px, 660px); }
  .site-header { height: 70px; }
  .privacy-chip { display: none; }
  .hero { padding: 46px 0 32px; }
  .hero h1 { font-size: clamp(36px, 10vw, 52px); }
  .workspace-grid { grid-template-columns: 1fr; }
  .history-panel { min-height: auto; }
}
@media (max-width: 520px) {
  .page-shell { width: calc(100% - 20px); }
  .hero h1 { letter-spacing: -.06em; }
  .hero-copy { font-size: 14px; line-height: 1.7; }
  .recorder-card { min-height: 490px; }
  .recorder-topline { padding: 19px; }
  .date-badge { display: none; }
  .recording-stage { padding: 31px 13px 24px; min-height: 362px; }
  .timer { font-size: 31px; }
  .recorder-footnote { gap: 12px; flex-wrap: wrap; padding: 12px; }
  .recording-controls { flex-direction: column; width: min(240px, 100%); }
  .recording-controls button { justify-content: center; }
  .live-panel { padding: 20px 15px 16px; }
  .live-columns-label { display: none; }
  .live-turn { grid-template-columns: 1fr; gap: 8px; padding: 14px 5px; }
  .live-translation { padding-left: 12px; border-left: 2px solid var(--mint); }
  .modal-card { padding: 23px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Compact presentation used by the native macOS floating app. */
.mac-app body { background: var(--paper); }
.mac-app .page-shell { width: 100%; padding: 28px 0 0; }
.mac-app .site-header, .mac-app .hero, .mac-app .history-panel { display: none; }
.mac-app .workspace-grid { display: block; }
.mac-app .recorder-card { min-height: 0; border: 0; box-shadow: none; background: var(--card); }
.mac-app .recorder-topline { padding: 19px 22px 17px; }
.mac-app .recording-stage { min-height: 345px; padding: 27px 18px 22px; }
.mac-app .waveform { height: 62px; }
.mac-app .record-button { width: 96px; height: 96px; }
.mac-app .record-core { width: 70px; height: 70px; }
.mac-app .live-panel { padding: 20px 20px 17px; }
.mac-app .live-feed { max-height: 245px; }
.mac-app .recorder-footnote { min-height: 47px; gap: 16px; }
.mac-app .date-badge { display: block; }
.mac-app .mac-settings-button { display: grid; }
@media (max-width: 430px) {
  .mac-app .date-badge { display: none; }
  .mac-app .recorder-footnote span:last-child { display: none; }
}
