
:root {
  --bg: #f6fbf4;
  --bg-soft: #eef7ea;
  --card: rgba(255, 255, 255, 0.82);
  --card-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(109, 154, 114, 0.18);
  --line-strong: rgba(109, 154, 114, 0.28);
  --text: #284132;
  --text-soft: #57735f;
  --text-faint: #78907d;
  --primary: #86b88f;
  --primary-deep: #5f8e6c;
  --primary-soft: #dcefd6;
  --shadow: 0 24px 60px rgba(86, 124, 91, 0.10);
  --shadow-soft: 0 12px 28px rgba(86, 124, 91, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(209, 236, 198, 0.55), transparent 28%),
    radial-gradient(circle at top right, rgba(234, 245, 226, 0.9), transparent 32%),
    linear-gradient(180deg, #f9fdf7 0%, #f3faf0 44%, #eef8ec 100%);
  color: var(--text);
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 36px 0 56px;
  position: relative;
  z-index: 2;
}

.hero {
  text-align: center;
  padding: 34px 20px 14px;
  max-width: 920px;
  margin: 0 auto 16px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary-deep);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 auto;
  max-width: 900px;
  font-size: clamp(2.25rem, 4.9vw, 4.1rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-copy {
  max-width: 760px;
  margin: 18px auto 0;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.8;
  color: var(--text-soft);
}

.panel {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(132, 181, 139, 0.38), transparent 78%);
}

.section-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

h3 {
  margin: 0 0 8px;
  font-size: clamp(1.04rem, 1.6vw, 1.18rem);
  line-height: 1.35;
}

.section-note,
.current-mood,
.guide-card p,
.facebook-card p,
.empty-state,
.micro-feedback {
  color: var(--text-soft);
}

.section-note {
  margin: 8px 0 0;
  font-size: 1rem;
  line-height: 1.75;
  max-width: 720px;
}

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

.guide-card,
.story-card,
.facebook-card,
.spotify-card,
.saved-item {
  background: var(--card-strong);
  border: 1px solid rgba(123, 170, 128, 0.16);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.guide-card {
  padding: 22px;
}

.guide-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 700;
  margin-bottom: 14px;
}

.guide-card p {
  margin: 0;
  line-height: 1.75;
}

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

.mood-chip {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.78);
  color: var(--text);
  border-radius: 22px;
  padding: 18px 16px;
  text-align: left;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  min-height: 142px;
}

.mood-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(95, 142, 108, 0.34);
}

.mood-chip.is-active {
  background: linear-gradient(180deg, rgba(214, 236, 205, 0.96), rgba(244, 250, 241, 0.95));
  border-color: rgba(95, 142, 108, 0.42);
  box-shadow: 0 18px 34px rgba(110, 153, 114, 0.16);
}

.mood-chip strong {
  display: block;
  font-size: 1.12rem;
  line-height: 1.35;
  margin-bottom: 10px;
}

.mood-chip span {
  display: block;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text-soft);
}

.story-panel .section-top {
  align-items: center;
}

.refresh-button {
  min-width: 168px;
}

.ghost-button,
.action-button,
.action-link,
.facebook-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 50px;
  padding: 0 18px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, opacity 180ms ease, border-color 180ms ease, background 180ms ease;
}

.ghost-button,
.action-button,
.action-link {
  width: 100%;
}

.ghost-button {
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.84);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.ghost-button:hover,
.action-button:hover,
.action-link:hover,
.facebook-inline:hover {
  transform: translateY(-1px);
}

.story-card {
  padding: clamp(22px, 3vw, 34px);
}

.story-text {
  margin: 0;
  font-size: clamp(1.08rem, 1.85vw, 1.32rem);
  line-height: 1.95;
  color: var(--text);
  white-space: pre-line;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.action-button,
.action-link,
.facebook-inline {
  border: none;
  background: linear-gradient(180deg, #98c6a0, #7eb58a);
  color: white;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(102, 150, 111, 0.18);
}

.like-button.is-liked {
  background: linear-gradient(180deg, #6fa67a, #5d8f67);
}

.micro-feedback {
  min-height: 24px;
  margin: 12px 2px 0;
  font-size: 0.95rem;
}

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

.saved-item {
  padding: 20px;
}

.saved-item-head {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.saved-tag {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 700;
  font-size: 0.9rem;
}

.saved-remove {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
}

.saved-text {
  margin: 0;
  color: var(--text);
  line-height: 1.8;
  font-size: 1rem;
}

.empty-state {
  margin: 4px 2px 0;
  font-size: 1rem;
  line-height: 1.8;
}

.connect-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.connect-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 18px;
}

.spotify-card,
.facebook-card {
  padding: 22px;
}

.spotify-card h3,
.facebook-card h3 {
  font-size: 1.18rem;
  margin-bottom: 14px;
}

.spotify-embed-wrap {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.facebook-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.facebook-card p {
  margin: 0 0 18px;
  line-height: 1.85;
}

.facebook-inline {
  width: 100%;
}

.leaf-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.leaf {
  position: absolute;
  top: -10vh;
  width: 16px;
  height: 11px;
  background: linear-gradient(135deg, rgba(141, 189, 145, 0.62), rgba(194, 224, 188, 0.24));
  border-radius: 100% 0 100% 0;
  opacity: 0.55;
  filter: blur(0.15px);
  animation: drift linear infinite;
}

.leaf::after {
  content: "";
  position: absolute;
  left: 7px;
  top: -1px;
  width: 1px;
  height: 13px;
  background: rgba(95, 142, 108, 0.22);
  transform: rotate(38deg);
  transform-origin: center;
}

.leaf-1 { left: 8%; animation-duration: 20s; animation-delay: -2s; }
.leaf-2 { left: 19%; width: 14px; height: 10px; animation-duration: 24s; animation-delay: -10s; }
.leaf-3 { left: 34%; animation-duration: 26s; animation-delay: -6s; opacity: 0.42; }
.leaf-4 { left: 49%; width: 18px; height: 12px; animation-duration: 23s; animation-delay: -16s; }
.leaf-5 { left: 66%; animation-duration: 28s; animation-delay: -13s; opacity: 0.36; }
.leaf-6 { left: 81%; width: 13px; height: 9px; animation-duration: 21s; animation-delay: -8s; }
.leaf-7 { left: 92%; animation-duration: 29s; animation-delay: -18s; opacity: 0.3; }

@keyframes drift {
  0% { transform: translate3d(0, -5vh, 0) rotate(0deg); }
  25% { transform: translate3d(12px, 25vh, 0) rotate(60deg); }
  50% { transform: translate3d(-14px, 55vh, 0) rotate(115deg); }
  75% { transform: translate3d(10px, 82vh, 0) rotate(170deg); }
  100% { transform: translate3d(-8px, 112vh, 0) rotate(230deg); }
}

@media (max-width: 1080px) {
  .mood-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .connect-grid { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .guide-grid,
  .saved-list,
  .action-row,
  .connect-actions { grid-template-columns: 1fr; }
  .section-top { flex-direction: column; }
  .refresh-button { min-width: 0; }
}

@media (max-width: 720px) {
  .page-shell { width: min(calc(100% - 20px), var(--max)); padding-top: 20px; }
  .panel { padding: 20px; border-radius: 24px; }
  .hero { padding-inline: 4px; }
  .mood-grid { grid-template-columns: 1fr; }
  .mood-chip { min-height: auto; }
  .hero-copy, .section-note, .guide-card p, .saved-text, .facebook-card p, .story-text { line-height: 1.8; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
