:root {
  --bg: #fffaf7;
  --bg-strong: #fdeeea;
  --card: rgba(255, 255, 255, 0.84);
  --card-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(124, 92, 90, 0.12);
  --text: #261a2d;
  --muted: #6d5867;
  --primary: #ff7a59;
  --primary-dark: #ec653d;
  --secondary: #f7d8d1;
  --success: #2e9d74;
  --shadow: 0 24px 80px rgba(131, 76, 78, 0.15);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Manrope', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 177, 153, 0.38), transparent 28%),
    radial-gradient(circle at bottom right, rgba(244, 209, 96, 0.34), transparent 32%),
    linear-gradient(135deg, #fffaf7 0%, #fff1ee 45%, #fbeae8 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

button {
  font: inherit;
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: min(100%, 1100px);
  margin: 32px auto;
  padding: 24px;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.7;
  z-index: 0;
}

.glow-one {
  width: 260px;
  height: 260px;
  background: rgba(255, 167, 134, 0.38);
  top: 40px;
  left: 30px;
}

.glow-two {
  width: 300px;
  height: 300px;
  background: rgba(254, 218, 182, 0.5);
  right: 20px;
  bottom: 10px;
}

.session-app {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 8px;
}

.name-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.name-field label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.name-field input {
  border: none;
  background: transparent;
  color: var(--text);
  width: 90px;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.08em;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--primary) 0%, #ff9b7d 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(255, 122, 89, 0.3);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 8px 18px rgba(124, 92, 90, 0.06);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.timer-card {
  padding: 28px 28px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,248,246,0.82));
}

.status-row,
.meta-row,
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 122, 89, 0.1);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chip.accent {
  background: rgba(46, 157, 116, 0.12);
  color: var(--success);
}

.status {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
}

.status.complete { color: var(--success); }

.timer {
  text-align: center;
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  margin: 18px 0 20px;
}

.progress-track {
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(196, 166, 160, 0.2);
  border: 1px solid rgba(130, 99, 106, 0.12);
}

.progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb199 0%, var(--primary) 50%, #f4d160 100%);
  transition: width 0.3s ease;
}

.meta-row {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 700;
}

.affirmation-card {
  padding: 24px 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,246,240,0.82));
  animation: fadeInUp 0.45s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.affirmation-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 12px;
}

.mood-button,
.mini-button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  transition: all 0.18s ease;
}

.mood-button.active {
  background: linear-gradient(135deg, rgba(255, 122, 89, 0.12), rgba(244, 209, 96, 0.2));
  border-color: rgba(255, 122, 89, 0.4);
  color: var(--primary-dark);
}

.mood-button:hover,
.mini-button:hover {
  transform: translateY(-1px);
}

.mini-button {
  background: rgba(255, 122, 89, 0.06);
  border-color: rgba(255, 122, 89, 0.2);
}

.moment-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(244, 209, 96, 0.18);
  color: #7c5c15;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.affirmation-card h2 {
  margin: 18px 0 10px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.06em;
}

.affirmation-card p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 70ch;
}

.milestones {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.milestone-card {
  padding: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,250,248,0.74));
}

.section-select {
  width: 100%;
  min-height: 220px;
  padding: 18px 16px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.section-select:hover,
.section-select:focus-visible {
  background: rgba(255, 122, 89, 0.08);
  outline: none;
  transform: translateY(-2px);
}

.section-select.active {
  background: linear-gradient(160deg, rgba(255, 122, 89, 0.16), rgba(244, 209, 96, 0.18));
  box-shadow: inset 0 0 0 2px rgba(255, 122, 89, 0.35);
}

.section-select span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-select strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.section-select p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
  font-size: 0.9rem;
}

.section-select em {
  display: block;
  margin-top: 16px;
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .milestones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 18px;
    margin: 18px auto;
  }

  .topbar,
  .status-row,
  .meta-row,
  .label-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .name-field {
    width: 100%;
    justify-content: space-between;
  }

  .actions {
    width: 100%;
  }

  .primary-button,
  .secondary-button {
    flex: 1;
    width: 100%;
  }

  .milestones {
    grid-template-columns: 1fr;
  }

  .timer-card,
  .affirmation-card {
    padding: 20px 18px;
  }
}
