:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --ink: #172033;
  --muted: #667085;
  --line: #d8deea;
  --panel: #ffffff;
  --blue: #2563eb;
  --green: #16a34a;
  --orange: #ea580c;
  --red: #dc2626;
  --shadow: 0 16px 40px rgba(33, 45, 70, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

button, input, textarea { font: inherit; }

.shell {
  width: min(840px, 100%);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}

.hidden { display: none !important; }

.auth {
  min-height: 88vh;
  display: grid;
  align-content: center;
  gap: 24px;
}

.app {
  display: grid;
  gap: 18px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-top: 8px;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.04;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.muted {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.panel, .composer, .todo {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tab, .ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 12px;
}

.tab.active {
  border-color: var(--blue);
  color: var(--blue);
  font-weight: 700;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea { resize: vertical; min-height: 86px; }
input:focus, textarea:focus { border-color: var(--blue); }

.primary {
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  padding: 12px 16px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.composer {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.preview {
  min-height: 34px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.composerActions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.mic {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: #e8eefc;
  color: var(--blue);
}

.mic.recording {
  background: #fee2e2;
  color: var(--red);
}

.list {
  display: grid;
  gap: 10px;
}

.todo {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 14px;
  box-shadow: none;
}

.check {
  width: 28px;
  height: 28px;
  border: 2px solid #adb6c7;
  border-radius: 50%;
  background: #fff;
}

.check.done {
  border-color: var(--green);
  background: var(--green);
}

.check.done::after {
  content: "✓";
  display: block;
  color: #fff;
  text-align: center;
  line-height: 24px;
  font-weight: 800;
}

.todoTitle {
  margin: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.todo.done .todoTitle {
  text-decoration: line-through;
  color: var(--muted);
}

.meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.bell {
  color: var(--orange);
}

.delete {
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 22px;
  line-height: 1;
  padding: 2px 6px;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 48px 16px;
}

.error {
  min-height: 18px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
}

@media (max-width: 560px) {
  .topbar {
    display: grid;
  }

  .actions {
    justify-content: flex-start;
  }
}
