:root {
  color-scheme: light;
  --bg: #f7f5f0;
  --panel: #fffdfa;
  --panel-strong: #f1ece3;
  --text: #24211d;
  --muted: #70695f;
  --line: #ded7cb;
  --accent: #2f6f5e;
  --accent-strong: #24584b;
  --accent-soft: #dcebe5;
  --danger: #a84d3f;
  --shadow: 0 18px 60px rgba(58, 49, 38, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(47, 111, 94, 0.14), transparent 34rem),
    linear-gradient(135deg, #fbfaf7 0%, var(--bg) 58%, #ece6dc 100%);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 26px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.95;
}

h2 {
  font-size: 1.2rem;
}

.hero-copy {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

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

.primary-button,
.ghost-button,
.ghost-link,
.inline-form button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  padding: 0 18px;
  background: var(--accent);
  color: white;
}

.ghost-button {
  padding: 0 16px;
  background: var(--panel-strong);
  color: var(--text);
}

.ghost-link {
  padding: 0 16px;
  background: var(--panel-strong);
  color: var(--text);
}

.dashboard {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: start;
}

.panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(222, 215, 203, 0.82);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.focus-panel {
  grid-column: 1 / -1;
}

.week-panel,
.notes-panel {
  box-shadow: none;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.92rem;
  white-space: nowrap;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

textarea,
input[type="text"],
input[type="email"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

textarea {
  display: block;
  resize: vertical;
  padding: 14px;
  line-height: 1.5;
}

input[type="text"],
input[type="email"] {
  min-height: 44px;
  padding: 0 12px;
}

textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 111, 94, 0.13);
}

.progress-wrap {
  margin-top: 16px;
}

.progress-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-strong);
}

.progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #7a9f74);
  transition: width 180ms ease;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 14px;
}

.inline-form button {
  padding: 0 14px;
  background: var(--text);
  color: white;
}

.icon-button {
  width: 42px;
  padding: 0;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
}

.check-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 7px 8px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.check-item label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.check-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.item-text {
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.check-item.is-done .item-text {
  color: var(--muted);
  text-decoration: line-through;
}

.check-item button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--danger);
  font-size: 1.1rem;
}

.check-item button:hover {
  background: #f7e6e2;
}

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

.day-cell {
  display: grid;
  place-items: center;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.day-cell strong {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
}

.day-cell.is-today {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.admin-dashboard {
  grid-template-columns: 1fr 1fr;
}

.helper-text {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.switch-row span {
  display: grid;
  gap: 4px;
}

.switch-row small,
.access-mode {
  color: var(--muted);
  line-height: 1.45;
}

.switch-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.access-mode {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.settings-preview {
  display: grid;
  gap: 10px;
}

.settings-preview p {
  margin: 8px 0 0;
}

.settings-preview code,
.settings-preview pre {
  display: block;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.settings-preview code {
  padding: 10px 12px;
}

.settings-preview pre {
  margin: 0;
  padding: 12px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.check-item button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  opacity: 0.55;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 560px);
    padding-top: 14px;
  }

  .hero {
    display: grid;
    padding: 20px 0 18px;
  }

  .hero-actions {
    justify-content: stretch;
  }

  .hero-actions button {
    flex: 1 1 150px;
  }

  .dashboard,
  .admin-dashboard {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .panel {
    padding: 16px;
  }

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

  .day-cell {
    min-height: 58px;
  }
}

@media (max-width: 420px) {
  .inline-form {
    grid-template-columns: 1fr;
  }

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