:root {
  --bg: #DCE1DE;
  --surface: #EFF2EF;
  --ink: #1F2A24;
  --ink-soft: #4B564F;
  --line: #C7CEC9;

  --sage: #4F7862;
  --clay: #A85D3D;

  --accent: var(--sage);

  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, ui-serif, serif;
  --font-body: -apple-system, "SF Pro Text", ui-sans-serif, system-ui, sans-serif;

  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---- topbar ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 8px;
}

.topbar__mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transition: background 200ms ease;
}

.topbar__title {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---- layout ---- */
main {
  flex: 1;
  padding: 8px 20px 20px;
  display: flex;
}

.view {
  flex: 1;
  display: flex;
  opacity: 1;
  transition: opacity 150ms ease;
}

.view[hidden] { display: none; }

/* ---- today card ---- */
.card {
  align-self: center;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 26px;
  border: 1px solid var(--line);
}

.card__eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 600;
}

.card__quote {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink);
}

.card__source {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--ink-soft);
}

.card__note {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---- chat shell ---- */
.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.chat__empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  padding: 0 30px;
}

.chat__composer {
  display: flex;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 10px 10px 10px 18px;
}

.chat__composer input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  outline: none;
}

.chat__composer input::placeholder { color: var(--ink-soft); }

.chat__composer button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--clay);
  color: var(--surface);
  font-size: 16px;
  line-height: 1;
}

.chat__composer input:disabled,
.chat__composer button:disabled {
  opacity: 0.5;
}

/* ---- tabbar ---- */
.tabbar {
  display: flex;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.tabbar__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px 0 18px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-soft);
}

.tabbar__btn--active { color: var(--ink); font-weight: 600; }

.tabbar__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  opacity: 0.35;
  transition: opacity 200ms ease;
}

.tabbar__dot--sage { background: var(--sage); }
.tabbar__dot--clay { background: var(--clay); }

.tabbar__btn--active .tabbar__dot { opacity: 1; }

/* ---- motion & accessibility ---- */
@media (prefers-reduced-motion: reduce) {
  .view, .topbar__mark, .tabbar__dot { transition: none; }
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}
