:root {
  color-scheme: dark;
  --capture-height: 100vh;
  --capture-width: 100%;
  --bg: #1b0d07;
  --card: #2c170d;
  --card-soft: #3a1d0f;
  --text: #ffe9bd;
  --muted: #d1976d;
  --dot-empty: rgba(255, 233, 189, 0.2);
  --green: #b7d96a;
  --yellow: #f3bd59;
  --red: #e76d42;
  --ring: rgba(255, 232, 189, 0.22);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(155, 85, 39, 0.24), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

.app-shell {
  width: min(72rem, var(--capture-width));
  min-height: var(--capture-height);
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: minmax(20rem, 1fr) minmax(18rem, 24rem);
  gap: 1rem;
  align-content: start;
}

.account-card,
.account-menu,
.hero-card,
.setup-card {
  border: 1px solid rgba(255, 232, 189, 0.12);
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(56, 33, 20, 0.95), var(--card));
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.32);
}

.hero-card {
  padding: clamp(1rem, 3vw, 2rem);
}

.setup-card {
  align-self: start;
  padding: 1.5rem;
}

.side-column {
  align-self: start;
  display: grid;
  gap: 1rem;
}

.account-card {
  grid-column: 1 / -1;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(18rem, 34rem) auto;
  gap: 1rem;
  align-items: center;
}

.account-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 0.75rem;
}

.account-menu {
  align-self: start;
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem;
}

.account-menu span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow,
.title-row,
.summary,
.habit-row,
.copy-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eyebrow,
.summary {
  justify-content: space-between;
  color: var(--muted);
  font-weight: 700;
}

.title-row {
  justify-content: space-between;
  margin: 1.25rem 0;
}

.label {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

h2 {
  font-size: 1.2rem;
}

.today-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.today-panel {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(255, 232, 189, 0.12);
  border-radius: 1.5rem;
  background: rgba(20, 13, 9, 0.28);
}

.panel-heading,
.habit-check,
.habit-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.today-habits-list,
.habit-settings-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.habit-check,
.habit-setting {
  border-radius: 1rem;
  background: rgba(255, 232, 189, 0.08);
  padding: 0.75rem 0.85rem;
}

.habit-check {
  justify-content: flex-start;
  color: var(--text);
  font-weight: 800;
}

.habit-check input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--green);
}

.habit-setting button {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 232, 189, 0.16);
  color: var(--text);
  padding: 0.45rem 0.7rem;
}

.status-pill {
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  color: #1f120b;
  font-size: 0.78rem;
  font-weight: 900;
}

.status-pill.done {
  background: var(--green);
}

.status-pill.partial {
  background: var(--yellow);
}

.status-pill.missed {
  background: var(--red);
}

.status-pill.inactive {
  background: #8e6347;
  color: var(--text);
}

.account-card button,
.account-menu button,
.primary-button,
.ghost-button,
.setup-card button {
  border: 0;
  border-radius: 999px;
  color: #1f120b;
  font-weight: 800;
}

.primary-button {
  min-height: 3.25rem;
}

.primary-button.done {
  background: var(--green);
}

.primary-button.missed {
  background: var(--red);
}

.account-card button,
.account-menu button,
.ghost-button,
.setup-card button {
  padding: 0.8rem 1rem;
  background: var(--text);
}

.account-menu button {
  padding: 0.7rem 1rem;
  box-shadow: inset 0 -0.12rem 0 rgba(31, 18, 11, 0.12);
}

.dots-grid {
  display: grid;
  grid-template-columns: repeat(31, minmax(0, 1fr));
  gap: clamp(0.25rem, 0.8vw, 0.48rem);
  margin-top: 1rem;
}

.dot {
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 999px;
  background: var(--dot-empty);
  padding: 0;
  outline: 0.14rem solid transparent;
}

.dot.done {
  background: var(--green);
  box-shadow: 0 0 1.2rem rgba(155, 224, 100, 0.3);
}

.dot.missed {
  background: var(--red);
  box-shadow: 0 0 1.2rem rgba(255, 107, 61, 0.3);
}

.dot.partial {
  background: var(--yellow);
  box-shadow: 0 0 1.2rem rgba(255, 211, 77, 0.28);
}

.dot.inactive {
  background: #7b5135;
  box-shadow: 0 0 1rem rgba(123, 81, 53, 0.18);
}

.dot.future {
  opacity: 0.35;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.dot.today {
  outline-color: var(--ring);
  outline-offset: 0.16rem;
}

.setup-card p {
  color: var(--muted);
  line-height: 1.5;
}

.setup-card label {
  display: block;
  margin: 1rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 232, 189, 0.14);
  border-radius: 1rem;
  background: var(--card-soft);
  color: var(--text);
  padding: 0.85rem 1rem;
}

select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 232, 189, 0.14);
  border-radius: 1rem;
  background: var(--card-soft);
  color: var(--text);
  padding: 0.85rem 1rem;
}

.birth-date-row[hidden] {
  display: none;
}

.field-note {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.habit-check input[type="checkbox"] {
  width: 1.25rem;
  min-width: 1.25rem;
  padding: 0;
}

.copy-row input {
  font-size: 0.78rem;
}

.screenshot-mode {
  background: #151515;
}

.screenshot-mode .app-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--capture-width);
  max-width: 100vw;
  min-height: min(var(--capture-height), 100vh);
  padding: clamp(1rem, 7vw, 6rem);
}

.screenshot-mode .hero-card {
  width: min(100%, 56rem);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.screenshot-mode .setup-card,
.screenshot-mode .title-row,
.screenshot-mode .today-actions,
.screenshot-mode .eyebrow {
  display: none;
}

.screenshot-mode .dots-grid {
  gap: clamp(0.14rem, 0.65vw, 0.34rem);
  margin-top: 0;
}

.screenshot-mode .summary {
  justify-content: center;
  margin-top: 1rem;
  color: #8f8f8f;
  font-weight: 500;
}

.screenshot-mode #completed-count {
  display: none;
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .account-card,
  .account-menu,
  .account-form {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  .today-actions,
  .habit-row,
  .copy-row {
    grid-template-columns: 1fr;
    display: grid;
  }

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