:root {
  color-scheme: dark;
  --bg: oklch(0 0 0);
  --panel: oklch(0.18 0 0 / 0.92);
  --panel-2: oklch(0.22 0 0 / 0.86);
  --line: oklch(1 0 0 / 0.12);
  --line-strong: oklch(1 0 0 / 0.2);
  --text: oklch(0.98 0 0);
  --muted: oklch(0.78 0 0);
  --soft: oklch(0.88 0 0 / 0.78);
  --accent: oklch(0.92 0 0);
  --shadow: 0 24px 80px oklch(0 0 0 / 0.55);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max-w: 420px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at top, oklch(0.12 0 0) 0, var(--bg) 46%); color: var(--text); font-family: var(--sans); }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(transparent 0%, transparent 96%, oklch(1 0 0 / 0.03) 100%),
    radial-gradient(circle at 50% 0%, oklch(1 0 0 / 0.08), transparent 35%);
  opacity: 0.55;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; }

#app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px 14px 40px;
}

.phone {
  width: min(100%, var(--max-w));
  min-height: min(calc(100vh - 40px), 980px);
  background: linear-gradient(180deg, oklch(0.06 0 0 / 0.96), oklch(0.03 0 0 / 0.98));
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.chrome {
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, oklch(1 0 0 / 0.04), transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 34% 28%, oklch(1 0 0 / 0.92), transparent 26%),
    radial-gradient(circle at 50% 50%, oklch(1 0 0 / 0.18), transparent 58%),
    linear-gradient(180deg, oklch(1 0 0 / 0.11), oklch(1 0 0 / 0.03));
  border: 1px solid var(--line-strong);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.15),
    0 8px 22px oklch(0 0 0 / 0.28);
}

.logo-mark-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.logo-mark svg circle,
.logo-mark svg path {
  vector-effect: non-scaling-stroke;
}

.brand h1, .section-title, .display {
  font-family: var(--serif);
  letter-spacing: -0.02em;
}

.brand h1 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.badge {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--soft);
  background: oklch(1 0 0 / 0.03);
  font-size: 0.78rem;
}

.content {
  padding: 18px 16px 22px;
}

.screen {
  display: grid;
  gap: 14px;
  animation: fadeUp 240ms var(--ease) both;
}

.hero {
  padding: 18px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, oklch(1 0 0 / 0.07), transparent 35%),
    linear-gradient(180deg, oklch(1 0 0 / 0.05), oklch(1 0 0 / 0.025));
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.display {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.6rem);
  line-height: 0.96;
}

.subtle {
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.45;
  font-size: 0.94rem;
}

.ring {
  width: 90px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  flex: none;
}

.ring::before,
.ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.ring::before {
  background: conic-gradient(from 220deg, oklch(0.96 0 0), oklch(0.74 0 0), oklch(0.96 0 0));
  mask: radial-gradient(circle at center, transparent 51%, black 53%);
  opacity: 0.9;
}

.ring::after {
  inset: 10px;
  background: oklch(0.05 0 0);
  border: 1px solid var(--line);
}

.ring span {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, oklch(1 0 0 / 0.05), oklch(1 0 0 / 0.025));
  border: 1px solid var(--line);
}

.card h3, .card h4, .section-title, .label {
  margin: 0;
}

.card h3 {
  font-size: 0.94rem;
  font-weight: 600;
}

.card .value {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.muted {
  color: var(--muted);
}

.toolbar, .tabs, .row, .stack, .row-between, .chip-row, .action-row, .toggle-row {
  display: flex;
  gap: 10px;
}

.toolbar, .row-between, .toggle-row {
  align-items: center;
  justify-content: space-between;
}

.tabs {
  padding: 4px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--line);
}

.tab {
  flex: 1;
  border-radius: 999px;
  padding: 10px 12px;
  text-align: center;
  color: var(--muted);
  background: transparent;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}

.tab.active {
  color: var(--text);
  background: oklch(1 0 0 / 0.08);
}

.button, .button-ghost, .button-soft, .button-danger {
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 600;
  transition: transform 150ms var(--ease), background 150ms var(--ease), border-color 150ms var(--ease);
}

.button:hover, .button-ghost:hover, .button-soft:hover, .button-danger:hover, .tab:hover {
  transform: translateY(-1px);
}

.button {
  background: oklch(0.98 0 0);
  color: oklch(0.06 0 0);
}

.button-soft {
  background: oklch(1 0 0 / 0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.button-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.button-danger {
  background: oklch(0.35 0.03 24);
  color: white;
}

.section-title {
  font-size: 1.22rem;
  margin-bottom: 4px;
}

.panel {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, oklch(1 0 0 / 0.05), oklch(1 0 0 / 0.02));
}

.insight {
  line-height: 1.55;
  color: var(--soft);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border-radius: 999px;
  padding: 8px 10px;
  background: oklch(1 0 0 / 0.07);
  color: var(--text);
  border: 1px solid var(--line);
  font-size: 0.82rem;
}

.chip.active {
  background: oklch(1 0 0 / 0.18);
  border-color: var(--line-strong);
}

.landing-hero {
  display: grid;
  gap: 18px;
}

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

.landing-actions {
  flex-wrap: wrap;
}

.landing-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.landing-metric {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: oklch(1 0 0 / 0.04);
}

.landing-metric strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.landing-metric span {
  color: var(--muted);
  font-size: 0.8rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.feature-card {
  padding: 14px;
  border-radius: 18px;
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--line);
}

.feature-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.sample-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, oklch(1 0 0 / 0.06), transparent 36%),
    oklch(1 0 0 / 0.04);
}

.sample-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.sample-score {
  font-family: var(--serif);
  font-size: 3rem;
  letter-spacing: -0.05em;
  margin: 6px 0 10px;
}

.sample-text {
  margin: 0 0 14px;
  color: var(--soft);
  line-height: 1.55;
}

.price-grid {
  display: grid;
  gap: 10px;
}

.price-card {
  padding: 14px;
  border-radius: 18px;
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--line);
  color: var(--text);
  text-align: left;
}

.price-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.94rem;
}

.price-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.price-card.active {
  background: oklch(1 0 0 / 0.14);
  border-color: var(--line-strong);
}

.mini {
  font-size: 0.82rem;
  color: var(--muted);
}

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

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

.accordion {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: oklch(1 0 0 / 0.04);
  overflow: hidden;
}

.accordion summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion-title {
  display: grid;
  gap: 4px;
}

.accordion-title strong {
  font-size: 0.98rem;
}

.accordion-title span {
  color: var(--muted);
  font-size: 0.8rem;
}

.accordion-chevron {
  color: var(--muted);
  font-size: 0.9rem;
  transition: transform 180ms var(--ease);
}

.accordion[open] .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 12px;
}

.accordion-preview {
  color: var(--soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.prompt {
  width: 100%;
  text-align: left;
  padding: 14px;
  border-radius: 18px;
  background: oklch(1 0 0 / 0.05);
  border: 1px solid var(--line);
  color: var(--text);
}

.prompt strong {
  display: block;
  margin-bottom: 4px;
}

.wave {
  height: 78px;
  display: flex;
  align-items: end;
  gap: 4px;
  overflow: hidden;
}

.wave span {
  width: 100%;
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(180deg, oklch(1 0 0 / 0.82), oklch(1 0 0 / 0.2));
  transform-origin: bottom;
  animation: wave 1.2s var(--ease) infinite;
}

.wave.paused span { animation-play-state: paused; opacity: 0.45; }

.wave .s1 { height: 24%; animation-delay: -0.1s; }
.wave .s2 { height: 46%; animation-delay: -0.3s; }
.wave .s3 { height: 68%; animation-delay: -0.5s; }
.wave .s4 { height: 36%; animation-delay: -0.7s; }
.wave .s5 { height: 84%; animation-delay: -0.9s; }
.wave .s6 { height: 54%; animation-delay: -1.1s; }
.wave .s7 { height: 72%; animation-delay: -1.3s; }

.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.06);
  border: 1px solid var(--line);
  overflow: hidden;
}

.progress > div {
  height: 100%;
  width: var(--p, 0%);
  background: linear-gradient(90deg, oklch(0.95 0 0), oklch(0.75 0 0));
  transition: width 180ms var(--ease);
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.autocomplete-hint {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.autocomplete-list {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
}

.autocomplete-item {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: oklch(1 0 0 / 0.04);
  color: var(--text);
  text-align: left;
  transition: transform 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
}

.autocomplete-item:hover,
.autocomplete-item.active {
  border-color: var(--line-strong);
  background: oklch(1 0 0 / 0.08);
  transform: translateY(-1px);
}

.autocomplete-item strong {
  display: block;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}

.field label, .label {
  color: var(--muted);
  font-size: 0.82rem;
}

input[type="text"], input[type="email"], input[type="password"], input[type="datetime-local"], select, textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: oklch(1 0 0 / 0.04);
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input::placeholder, textarea::placeholder { color: oklch(0.72 0 0 / 0.7); }

.stepper {
  display: flex;
  gap: 6px;
}

.dot {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.12);
}

.dot.active {
  background: oklch(0.96 0 0);
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.day {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: oklch(1 0 0 / 0.03);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.day[data-intensity="1"] { background: oklch(0.28 0 0); color: white; }
.day[data-intensity="2"] { background: oklch(0.42 0 0); color: white; }
.day[data-intensity="3"] { background: oklch(0.56 0 0); color: white; }
.day[data-intensity="4"] { background: oklch(0.72 0 0); color: black; }

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

.entry {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: oklch(1 0 0 / 0.04);
  display: grid;
  gap: 8px;
}

.entry strong {
  font-size: 0.98rem;
}

.entry .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-nav {
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, oklch(0.02 0 0 / 0.95) 26%);
  padding: 10px 12px 14px;
}

.nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.nav button {
  border-radius: 14px;
  padding: 10px 6px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 0.74rem;
}

.nav button.active {
  background: oklch(1 0 0 / 0.07);
  color: var(--text);
  border-color: var(--line);
}

.overlay {
  position: absolute;
  inset: 0;
  background: oklch(0 0 0 / 0.84);
  backdrop-filter: blur(18px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.overlay-card {
  width: 100%;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, oklch(1 0 0 / 0.08), oklch(1 0 0 / 0.03));
  padding: 18px;
  box-shadow: var(--shadow);
}

.overlay-card h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
}

.status-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: oklch(1 0 0 / 0.04);
  color: var(--soft);
  font-size: 0.82rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(0.9 0 0);
  box-shadow: 0 0 0 6px oklch(1 0 0 / 0.05);
}

.checks {
  display: grid;
  gap: 8px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--soft);
}

.check input { accent-color: white; }

.split {
  display: grid;
  gap: 12px;
}

.today-layout {
  display: grid;
  gap: 14px;
}

.today-primary,
.today-sidebar {
  display: grid;
  gap: 14px;
}

.today-sidebar .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hidden { display: none !important; }

.grow { flex: 1; }

.empty {
  padding: 18px;
  text-align: center;
  border-radius: 20px;
  color: var(--muted);
  border: 1px dashed var(--line);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wave {
  0%, 100% { transform: scaleY(0.52); }
  50% { transform: scaleY(1); }
}

@media (max-width: 520px) {
  #app {
    padding: 10px;
  }

  .phone {
    width: 100%;
    min-height: calc(100vh - 20px);
    border-radius: 24px;
  }

  .content {
    padding: 14px 12px 18px;
  }

  .panel,
  .hero {
    padding: 14px;
  }

  .grid,
  .feature-grid,
  .landing-metrics {
    grid-template-columns: 1fr;
  }

  .action-row {
    flex-direction: column;
  }

  .button,
  .button-ghost,
  .button-soft,
  .button-danger {
    width: 100%;
  }

  .chrome {
    padding: 14px 14px 10px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .brand h1 {
    font-size: 1rem;
  }

  .brand p {
    font-size: 0.74rem;
  }
}

@media (min-width: 720px) {
  :root {
    --max-w: 760px;
  }

  #app {
    padding: 24px 18px 40px;
  }

  .content {
    padding: 22px 20px 24px;
  }

  .phone {
    min-height: min(calc(100vh - 48px), 1120px);
  }

  .grid,
  .feature-grid {
    gap: 14px;
  }

  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .today-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.85fr);
    align-items: start;
    gap: 16px;
  }

  .today-sidebar {
    position: sticky;
    top: 12px;
  }

  .today-sidebar .grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 960px) {
  :root {
    --max-w: 980px;
  }

  #app {
    padding: 28px 20px 44px;
  }

  .phone {
    min-height: min(calc(100vh - 56px), 1040px);
  }

  .content {
    padding: 24px;
  }

  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-layout {
    grid-template-columns: minmax(0, 1.38fr) minmax(320px, 0.78fr);
    gap: 18px;
  }

  .today-primary,
  .today-sidebar {
    gap: 16px;
  }

  .today-sidebar .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
