:root {
  color: #25312f;
  background: #f7f0e6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(200, 159, 86, 0.26), transparent 30%),
    linear-gradient(180deg, #fffaf2 0%, #f7f0e6 54%, #dfe9e3 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 42px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 6vw, 56px);
  border-radius: 18px;
  color: #fffaf2;
  background:
    linear-gradient(135deg, rgba(23, 35, 52, 0.94), rgba(59, 83, 77, 0.88)),
    #172334;
  box-shadow: 0 24px 60px rgba(23, 35, 52, 0.22);
}

.eyebrow {
  margin: 0 0 10px;
  color: #c89f56;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 9vw, 6rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 10px;
  color: #172334;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 4vw, 2.8rem);
  line-height: 1.05;
}

p,
li,
label {
  color: #60706b;
  line-height: 1.7;
}

.hero p {
  max-width: 650px;
  margin-bottom: 0;
  color: rgba(255, 250, 242, 0.78);
  font-size: 1.08rem;
}

.night-badge {
  display: grid;
  min-height: 150px;
  place-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 250, 242, 0.16);
  border-radius: 14px;
  background: rgba(255, 250, 242, 0.08);
}

.night-badge span,
.night-badge small {
  color: rgba(255, 250, 242, 0.72);
  font-weight: 800;
}

.night-badge strong {
  color: #c89f56;
  font-size: 4rem;
  line-height: 1;
}

section,
footer {
  margin-top: 18px;
}

.progress-card,
.daily-card,
.journal-card,
.sos-card,
.history-card {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(38, 49, 47, 0.12);
  border-radius: 14px;
  background: rgba(255, 250, 242, 0.84);
}

.section-title p:last-child {
  margin-bottom: 0;
}

.progress-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #e9ded0;
}

#progressFill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c9b8c, #c89f56);
  transition: width 240ms ease;
}

.night-dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.night-dot {
  min-height: 42px;
  border: 1px solid rgba(38, 49, 47, 0.12);
  border-radius: 10px;
  color: #60706b;
  background: #fffaf2;
  font-weight: 900;
}

.night-dot.done {
  color: #172334;
  background: #ead7b3;
}

.night-dot.active {
  border-color: #172334;
  color: #fffaf2;
  background: #172334;
}

.checklist {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.check-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(38, 49, 47, 0.12);
  border-radius: 10px;
  background: #fffaf2;
}

.check-item input {
  width: 22px;
  height: 22px;
  accent-color: #172334;
}

.check-item span {
  color: #34433f;
  font-weight: 800;
}

.journal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: #34433f;
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: #172334;
}

textarea {
  width: 100%;
  resize: vertical;
  padding: 14px;
  border: 1px solid rgba(38, 49, 47, 0.16);
  border-radius: 10px;
  color: #25312f;
  background: #fffaf2;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  font-weight: 900;
}

.primary-button {
  width: 100%;
  margin-top: 18px;
  color: #fffaf2;
  background: #172334;
}

.secondary-button {
  width: 100%;
  margin-top: 14px;
  color: #172334;
  background: #ead7b3;
}

.sos-card ol {
  padding-left: 22px;
}

.breathing-guide {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(124, 155, 140, 0.28);
  border-radius: 10px;
  background: rgba(223, 233, 227, 0.66);
}

.breathing-guide strong {
  display: block;
  color: #172334;
  font-weight: 900;
}

.breathing-guide p {
  margin: 6px 0 0;
  color: #4f605b;
  font-size: 0.95rem;
  line-height: 1.55;
}

.breathing-box {
  display: grid;
  place-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 22px;
  border-radius: 12px;
  color: #fffaf2;
  background: #172334;
}

.breathing-box span {
  color: #c89f56;
  font-size: 3rem;
  font-weight: 900;
}

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

.history-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 10px;
  background: #fffaf2;
}

.history-item strong {
  color: #172334;
}

.history-item p {
  margin-bottom: 0;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 22px 0;
}

footer p {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 0.92rem;
}

.text-button {
  border: 0;
  color: #172334;
  background: transparent;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 780px) {
  .hero,
  .journal-grid {
    grid-template-columns: 1fr;
  }

  .night-badge {
    min-height: 120px;
  }

  .night-dots {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding: 12px;
  }

  .hero,
  .progress-card,
  .daily-card,
  .journal-card,
  .sos-card,
  .history-card {
    border-radius: 12px;
  }

  .history-item {
    grid-template-columns: 1fr;
  }
}
