:root {
  --bg: #0F0E0D;
  --card: #1C1A18;
  --line: #34302C;
  --ink: #F5F1EC;
  --muted: #B5ADA5;
  --faint: #8F877F;
  --accent: #0F9D58;      /* koyu zümrüt */
  --accent-hi: #13B866;
  --on-accent: #06140C;
  --pct: 0deg;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { color: var(--ink); font-family: Archivo, system-ui, -apple-system, sans-serif; overscroll-behavior: none; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.app {
  max-width: 440px; min-height: 100dvh; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 24px) 24px calc(env(safe-area-inset-bottom) + 24px);
  display: flex; flex-direction: column;
}
.top { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 26px; font-weight: 900; letter-spacing: -0.5px; }
.logo span { color: var(--accent-hi); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 12px; color: var(--muted); text-decoration: none; }

/* Basılı tut */
.press { flex: 1; display: flex; flex-direction: column; }
.hero { text-align: center; margin-top: 40px; }
.hero h1 { margin: 0; font-size: 40px; font-weight: 900; line-height: 1.02; letter-spacing: -1px; }
.hero p { margin: 14px 0 0; color: var(--muted); font-size: 16px; }
.stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.ring { width: 272px; height: 272px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent-hi) var(--pct), #2A2623 0deg); }
.big { width: 224px; height: 224px; border-radius: 50%; border: none; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  box-shadow: 0 0 48px 0 color-mix(in srgb, var(--accent) 28%, transparent); transition: width .18s, height .18s, box-shadow .18s, background .18s, transform .06s; }
.big:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }
@keyframes breathe { 0%,100% { box-shadow: 0 0 40px 0 color-mix(in srgb, var(--accent) 22%, transparent) } 50% { box-shadow: 0 0 70px 6px color-mix(in srgb, var(--accent) 40%, transparent) } }
[data-phase="idle"] .big { animation: breathe 2.8s ease-in-out infinite; }
[data-phase="rec"] .big { width: 248px; height: 248px; background: var(--accent-hi); box-shadow: 0 0 90px 12px color-mix(in srgb, var(--accent-hi) 45%, transparent); }

.wave { height: 48px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.wave b { width: 4px; border-radius: 2px; background: var(--accent-hi); height: 6px; transition: height .08s; }
.status { text-align: center; margin-top: 8px; min-height: 40px; }
#status { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
#status.err { color: #FF8A73; }
.hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.mode { height: 44px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.mode[aria-checked="true"] { border-color: var(--accent-hi); color: var(--ink); background: color-mix(in srgb, var(--accent) 18%, transparent); }
[data-phase="rec"] .modes, [data-phase="think"] .modes { visibility: hidden; }
[data-mode="dert"] .big { border-radius: 50%; }
[data-mode="dert"][data-phase="idle"] .big { animation-duration: 5s; }


/* Bitti */
.done { flex: 1; display: flex; flex-direction: column; }
.done-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.done h1 { margin: 0; font-size: 56px; font-weight: 900; letter-spacing: -1.5px; color: var(--accent-hi); }
.done-sub { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.45; }
.done-sub span { color: var(--ink); font-weight: 700; }
.done-sub span.plain { color: var(--muted); font-weight: 400; }
.peak { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.peak-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.peak-row b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.peak .track { flex: none; height: 8px; }
.peak-line { font-size: 15px; font-weight: 700; }
.help { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.45; border-top: 1px solid var(--line); padding-top: 12px; }
.player { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.track { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.fill { height: 100%; width: 0; background: var(--accent-hi); }
.time { font-size: 13px; color: var(--muted); min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.primary { height: 56px; border-radius: 16px; border: none; background: var(--accent); color: var(--on-accent); font-size: 17px; font-weight: 900; }
.secondary { height: 48px; border-radius: 16px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 15px; font-weight: 500; }
.gone { text-align: center; font-size: 12px; color: var(--faint); margin-top: 4px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Düşünüyor (Birlikte) */
.dots { display: none; gap: 10px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--accent-hi); animation: blink 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%,100% { opacity: .25 } 50% { opacity: 1 } }
[data-phase="think"] .big { background: var(--card); animation: none; box-shadow: none; }
[data-phase="think"] .mic { display: none; }
[data-phase="think"] .dots { display: flex; }

/* Onay */
.consent { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.consent h2 { margin: 0 0 4px; font-size: 30px; font-weight: 900; line-height: 1.1; letter-spacing: -0.5px; color: var(--accent-hi); }
.consent p, .consent li { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.consent p b, .consent li b { color: var(--ink); }
.consent ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.link { color: var(--muted); font-size: 13px; text-align: center; margin-top: 4px; }

/* Cevap */
.reply { flex: 1; display: flex; flex-direction: column; }
.reply-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.who { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 900; font-size: 16px; }
.who-name { font-weight: 700; font-size: 16px; }
.who-sub { font-size: 12px; color: var(--muted); }
.bubble { background: var(--card); border-radius: 20px; padding: 22px 20px; font-size: 20px; line-height: 1.4; font-weight: 500; }
.play { width: 44px; height: 44px; flex: none; border-radius: 50%; border: none; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.play .i-play { display: none; }
.play.paused .i-play { display: block; } .play.paused .i-pause { display: none; }
.reply .player { margin-top: 0; }
