:root {
  --text: #1a2420;
  --text-muted: #4b564f;
  --bg: #ffffff;
  --surface: #f4f7f5;
  --border: #d9e0db;
  --accent: #2f6f5e;
  --tab-height: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #eef2ef;
    --text-muted: #c3ccc6;
    --bg: #15201b;
    --surface: #1d2b24;
    --border: #324139;
    --accent: #6fcbb0;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400; /* no Light/Thin weights anywhere */
  font-size: 17px;
  line-height: 1.45;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header.app-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border);
}

header.app-header h1 {
  font-size: 22px;
  margin: 0;
}

main {
  flex: 1;
  padding: 16px 20px calc(var(--tab-height) + 24px);
  overflow-y: auto;
}

/* --- Home: headline + tiles + activity feed --- */
.headline {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}
.headline .value {
  font-size: 34px;
  font-weight: 700;
  margin: 4px 0;
}
.headline .label { color: var(--text-muted); font-size: 17px; }
.headline .comparison { color: var(--text-muted); font-size: 15px; }

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.tile {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.tile .tile-value { font-size: 18px; font-weight: 700; display: block; }
.tile .tile-label { font-size: 13px; color: var(--text-muted); }

.section-title {
  font-size: 17px;
  font-weight: 700;
  margin: 8px 0 10px;
}

.activity-item, .needs-item, .call-item {
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.activity-item { font-size: 17px; }

.needs-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.needs-item .needs-title { font-size: 17px; }
.needs-item .needs-time { font-size: 13px; color: var(--text-muted); }

.positive-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 17px;
}

/* --- Calls list + detail --- */
.call-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  min-height: 44px;
}
.call-item .call-name { font-size: 17px; }
.call-item .call-status {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-shape {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

.transcript {
  white-space: pre-wrap;
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  font-size: 16px;
  line-height: 1.5;
  margin: 12px 0;
}

button.primary-btn {
  display: block;
  width: 100%;
  min-height: 48px;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 12px;
  cursor: pointer;
}

button.back-btn {
  min-height: 44px;
  min-width: 44px;
  font-size: 17px;
  background: none;
  border: none;
  color: var(--accent);
  padding: 8px 0;
  cursor: pointer;
}

/* --- Bottom tab bar --- */
nav.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  height: var(--tab-height);
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
}
nav.tab-bar button {
  flex: 1;
  min-height: 48px;
  min-width: 44px;
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}
nav.tab-bar button[aria-current="true"] {
  color: var(--accent);
  font-weight: 700;
}
nav.tab-bar .tab-icon { font-size: 20px; }
nav.tab-bar .tab-badge {
  position: absolute;
  top: 4px;
  margin-left: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.coach-shell {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 17px;
}
