:root {
  --paper: #f5f1e8;
  --paper-deep: #ece5d7;
  --ink: #23231f;
  --muted: #78756d;
  --line: rgba(46, 45, 39, .14);
  --red: #d5503f;
  --red-dark: #b94031;
  --white: #fffdf8;
  font-family: "Noto Sans SC", system-ui, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(84, 75, 57, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 75, 57, .018) 1px, transparent 1px),
    var(--paper);
  background-size: 26px 26px;
}

button, select, textarea { font: inherit; }
button { color: inherit; }

.ambient { position: fixed; border-radius: 50%; filter: blur(10px); pointer-events: none; z-index: -1; }
.ambient-one { width: 420px; height: 420px; left: -250px; top: 15%; background: rgba(218, 136, 92, .12); }
.ambient-two { width: 360px; height: 360px; right: -220px; bottom: -50px; background: rgba(104, 146, 133, .1); }

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 20px; letter-spacing: .12em; }
.brand-mark { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; gap: 2px; background: var(--ink); border-radius: 50%; }
.brand-mark i { display: block; width: 2px; background: var(--paper); border-radius: 2px; }
.brand-mark i:nth-child(1) { height: 6px; }.brand-mark i:nth-child(2) { height: 13px; }.brand-mark i:nth-child(3) { height: 9px; }.brand-mark i:nth-child(4) { height: 4px; }
.privacy-pill { font-size: 12px; color: #68665e; letter-spacing: .04em; border: 1px solid var(--line); border-radius: 100px; padding: 8px 12px; background: rgba(255,255,255,.34); }
.privacy-pill span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #66917c; margin-right: 5px; vertical-align: 1px; }

main { width: min(860px, calc(100% - 36px)); margin: 0 auto; padding: 62px 0 44px; }
.intro { text-align: center; margin-bottom: 36px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .3em; color: var(--red); margin: 0 0 16px; }
h1 { margin: 0; font-size: clamp(36px, 6vw, 58px); line-height: 1.16; letter-spacing: -.04em; font-weight: 600; }
h1 em { font-family: "Playfair Display", "Noto Serif SC", serif; color: var(--red); font-weight: 600; }
.subtitle { margin: 16px 0 0; color: var(--muted); font-size: 15px; }

.workspace {
  background: rgba(255, 253, 248, .88);
  border: 1px solid rgba(70, 66, 56, .16);
  box-shadow: 0 20px 60px rgba(77, 67, 48, .1), 0 2px 7px rgba(77, 67, 48, .05);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.toolbar, .statusbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.toolbar { border-bottom: 1px solid var(--line); }
.select-wrap { display: flex; align-items: center; gap: 12px; }
.select-wrap label { font-size: 12px; color: var(--muted); }
select { appearance: none; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%236d6a62' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right center; padding: 6px 18px 6px 0; font-weight: 600; font-size: 13px; outline: none; cursor: pointer; }
.toolbar-actions { display: flex; gap: 6px; }
.compat-warning { margin: 14px 18px 0; padding: 12px 14px; border: 1px solid rgba(213,80,63,.28); border-radius: 12px; background: rgba(213,80,63,.07); display: flex; align-items: center; gap: 10px; color: #7c352c; font-size: 12px; }
.compat-warning[hidden] { display: none; }
.compat-warning strong { font-size: 12px; white-space: nowrap; }
.compat-warning span { flex: 1; color: #86655f; }
.compat-warning button { border: 1px solid rgba(213,80,63,.3); border-radius: 8px; padding: 6px 9px; background: rgba(255,255,255,.7); color: #873b31; cursor: pointer; white-space: nowrap; font-size: 11px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; cursor: pointer; transition: .2s; }
.icon-button:hover:not(:disabled) { background: var(--paper-deep); }
.icon-button:disabled { opacity: .3; cursor: default; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.editor-wrap { position: relative; min-height: 280px; }
textarea { width: 100%; min-height: 280px; resize: vertical; display: block; border: 0; outline: 0; padding: 30px 34px 46px; background: transparent; color: var(--ink); font-size: 18px; line-height: 1.9; caret-color: var(--red); }
textarea::placeholder { color: transparent; }
.interim { position: absolute; left: 34px; right: 34px; bottom: 20px; color: #a29d92; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.empty-hint { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; color: #a09c91; pointer-events: none; transition: .2s; }
.empty-hint.hidden { opacity: 0; visibility: hidden; }
.empty-hint p { margin: 0; font-size: 13px; }
.sound-lines { height: 36px; display: flex; align-items: center; gap: 5px; }
.sound-lines i { width: 3px; height: 10px; border-radius: 4px; background: #bdb8ad; }
.sound-lines i:nth-child(2), .sound-lines i:nth-child(4) { height: 22px; }
.sound-lines i:nth-child(3) { height: 34px; background: var(--red); }
.is-recording .sound-lines i { animation: pulse .75s ease-in-out infinite alternate; }
.is-recording .sound-lines i:nth-child(2) { animation-delay: -.3s; }.is-recording .sound-lines i:nth-child(3) { animation-delay: -.5s; }.is-recording .sound-lines i:nth-child(4) { animation-delay: -.15s; }
@keyframes pulse { to { transform: scaleY(.35); } }

.statusbar { border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.statusbar b { font-weight: 500; color: #57554f; }
#status i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #aaa59b; margin-right: 6px; }
#status.live i { background: var(--red); box-shadow: 0 0 0 4px rgba(213,80,63,.12); animation: blink 1.3s infinite; }
@keyframes blink { 50% { opacity: .4; } }

.controls { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: 30px; }
.record-button { display: flex; align-items: center; gap: 13px; border: 0; border-radius: 100px; padding: 10px 24px 10px 10px; background: var(--ink); color: white; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgba(35,35,31,.19); transition: transform .2s, background .2s; }
.record-button:hover { transform: translateY(-2px); }
.record-button.recording { background: var(--red-dark); }
.record-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--red); }
.record-icon i { width: 11px; height: 11px; background: #fff; border-radius: 50%; transition: .2s; }
.recording .record-icon { background: rgba(255,255,255,.18); }
.recording .record-icon i { border-radius: 2px; }
.export-actions { display: flex; gap: 10px; }
.export-actions button { display: flex; align-items: center; gap: 8px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.4); font-size: 12px; color: #625f57; cursor: pointer; transition: .2s; }
.export-actions button:hover { background: var(--white); transform: translateY(-1px); }
.export-actions svg { width: 15px; height: 15px; }
.support-note { margin: 22px 0 0; text-align: center; color: #979287; font-size: 11px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: white; padding: 11px 17px; border-radius: 10px; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s; box-shadow: 0 8px 30px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 600px) {
  .topbar { height: 68px; padding: 0 18px; }
  .privacy-pill { font-size: 10px; padding: 7px 9px; }
  main { width: calc(100% - 24px); padding-top: 44px; }
  .intro { margin-bottom: 28px; }
  .subtitle { font-size: 13px; }
  .workspace { border-radius: 16px; }
  .toolbar { padding: 13px 14px; }
  .compat-warning { align-items: flex-start; flex-wrap: wrap; }
  .compat-warning span { flex-basis: 70%; }
  .select-wrap label { display: none; }
  textarea { min-height: 310px; padding: 24px 22px 46px; font-size: 17px; }
  .interim { left: 22px; right: 22px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
