:root {
  --bg-deep: #1a0d2b;
  --panel-soft: rgba(58, 47, 92, 0.72);
  --panel-lighter: rgba(77, 66, 112, 0.62);
  --text-main: #f8f2eb;
  --text-soft: #e5d8f6;
  --text-muted: #cfc2df;
  --accent: #d7b6ff;
  --accent-3: #f0ca73;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --glow: 0 0 30px rgba(215, 182, 255, 0.28);
  --radius-xl: 28px;
  --radius-lg: 22px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 50% 18%, rgba(122, 93, 186, 0.24) 0%, rgba(122, 93, 186, 0.08) 22%, transparent 42%),
    radial-gradient(circle at 15% 85%, rgba(86, 50, 130, 0.16) 0%, transparent 28%),
    radial-gradient(circle at 85% 85%, rgba(86, 50, 130, 0.14) 0%, transparent 26%),
    linear-gradient(180deg, #43124d 0%, #2a103e 24%, #1b102f 60%, #120b23 100%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 36px 20px 60px;
}

.app-shell {
  width: 100%;
  max-width: 980px;
  background: linear-gradient(180deg, rgba(29, 20, 52, 0.94), rgba(34, 24, 58, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 28px;
  backdrop-filter: blur(14px);
}

.moon {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 14px;
}

h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  text-align: center;
  margin: 0 0 10px;
}

.subtitle {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.6;
  color: var(--text-soft);
  text-align: center;
  max-width: 760px;
  margin: 0 auto 30px;
}

.loop-card,
.reflection-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.loop-card {
  margin-bottom: 24px;
}

.step-indicator {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
}

.dot.active,
.dot.done {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(215, 182, 255, 0.45);
}

.step-header {
  text-align: center;
  margin-bottom: 18px;
}

.step-chip {
  display: inline-flex;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 12px;
}

.step-label,
.reflection-title,
.guided-question {
  font-family: "Playfair Display", serif;
}

.step-label {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  margin: 0 0 8px;
}

.step-prompt,
.reflection-intro,
.soft-note {
  color: var(--text-soft);
  line-height: 1.7;
}

.input-wrap {
  margin-top: 22px;
}

textarea {
  width: 100%;
  min-height: 148px;
  resize: vertical;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 18px;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-main);
  background: rgba(10, 8, 20, 0.22);
  outline: none;
}

textarea::placeholder {
  color: rgba(232, 220, 245, 0.48);
}

.button-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  padding: 15px 24px;
  border-radius: 999px;
}

.primary-btn {
  color: #2d1840;
  background: linear-gradient(180deg, #d9b7ff 0%, #c8a4f3 100%);
  box-shadow: var(--glow);
  min-width: 180px;
}

.secondary-btn {
  color: var(--text-main);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.reflection-title {
  font-size: 1.8rem;
  margin: 0 0 8px;
  text-align: center;
}

.reflection-intro {
  text-align: center;
  margin: 0 0 22px;
}

.loop-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.loop-box {
  background: var(--panel-lighter);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 14px 12px;
  min-height: 130px;
}

.loop-box h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  margin: 0 0 8px;
  color: var(--accent);
}

.loop-box p {
  margin: 0;
  line-height: 1.55;
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.repeat-line,
.guided-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 18px 20px;
}

.repeat-line {
  text-align: center;
  color: var(--text-soft);
  margin-bottom: 18px;
  line-height: 1.7;
}

.guided-label {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 10px;
}

.guided-question {
  font-size: 1.35rem;
  line-height: 1.5;
  text-align: center;
  margin: 0 0 16px;
}

.guided-answer {
  min-height: 120px;
}

.soft-note {
  margin-top: 20px;
  text-align: center;
  font-size: 0.96rem;
}

.hidden {
  display: none;
}

.print-only {
  display: none;
}

@media (max-width: 820px) {
  .loop-grid {
    grid-template-columns: 1fr;
  }

  .app-shell,
  .loop-card,
  .reflection-card {
    padding: 20px;
  }
}