:root {
  --bg: #1a1510;
  --surface: #2a221c;
  --text: #f3ebe1;
  --muted: #b9a996;
  --accent: #c4a574;
  --line: rgba(243, 235, 225, 0.12);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); }
a { color: var(--accent); }
.hero {
  min-height: clamp(520px, 78vh, 720px);
  position: relative;
  display: grid;
  place-items: end stretch;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(26, 21, 16, 0.35) 0%,
      rgba(26, 21, 16, 0.55) 35%,
      rgba(26, 21, 16, 0.82) 72%,
      #1a1510 100%
    ),
    url("/media/covers/cover-lavanda-hero.png") center 40% / cover no-repeat;
}
.hero-inner {
  position: relative;
  padding: 2.5rem 6vw 3.2rem;
  max-width: 720px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 0.85rem;
}
.brand { font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.btn {
  appearance: none; border: 1px solid var(--line); background: transparent; color: var(--text);
  padding: .85rem 1.2rem; border-radius: 999px; text-decoration: none; cursor: pointer; font: inherit;
}
.btn.primary { background: var(--accent); color: #1a1510; border-color: transparent; font-weight: 600; }
.btn.ghost { background: rgba(255,255,255,.06); }
.btn.small { padding: .45rem .8rem; font-size: .9rem; }
.section { padding: 4.5rem 6vw; max-width: 1100px; margin: 0 auto; border-top: 1px solid var(--line); }
.section h2 { font-family: var(--font-display); font-size: 2.2rem; margin: 0 0 1rem; }
.steps { padding-left: 1.2rem; color: var(--muted); line-height: 1.8; }
.cards, .price-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cards article, .price-grid article {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1rem; overflow: hidden;
}
.cards img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; border-radius: 12px; display: block; margin-bottom: .8rem; }
.price { font-family: var(--font-display); font-size: 2rem; margin: .3rem 0 0.8rem; }
.price-note { font-family: var(--font-body, inherit); font-size: 0.85rem; font-weight: 400; opacity: 0.7; }
.footer { padding: 3rem 6vw 4rem; color: var(--muted); border-top: 1px solid var(--line); }
.muted { color: var(--muted); }
.pay-result { margin-top: 1rem; padding: 1rem; background: var(--surface); border-radius: 12px; }
.page-app { min-height: 100vh; }
.app-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 4vw; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(26,21,16,.92); backdrop-filter: blur(8px);
}
.brand-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.code-box { display: flex; gap: .4rem; }
.code-box input, .chat-input input, .diary input[type="text"] {
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: .55rem .7rem; font: inherit;
}
.app-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem; padding: 1.5rem 4vw 3rem; }
@media (max-width: 900px) { .app-grid { grid-template-columns: 1fr; } }
.now-cover { width: min(100%, 320px); aspect-ratio: 1; object-fit: cover; object-position: top; border-radius: 16px; background: var(--surface); }
.track-list { display: grid; gap: .6rem; margin-top: 1rem; }
.track-item {
  display: grid; grid-template-columns: 56px 1fr auto; gap: .7rem; align-items: center;
  background: var(--surface); border-radius: 12px; padding: .5rem; cursor: pointer; border: 1px solid transparent;
}
.track-item.active { border-color: var(--accent); }
.track-item img { width: 56px; height: 56px; object-fit: cover; object-position: top; border-radius: 8px; }
.chat-log {
  height: 340px; overflow: auto; background: var(--surface); border-radius: 14px; padding: .8rem; margin: .6rem 0;
  display: flex; flex-direction: column; gap: .6rem;
}
.bubble { max-width: 90%; padding: .65rem .8rem; border-radius: 12px; line-height: 1.45; white-space: pre-wrap; }
.bubble.user { align-self: flex-end; background: #3a3028; }
.bubble.assistant { align-self: flex-start; background: #243028; }
.chat-input { display: grid; grid-template-columns: auto 1fr auto; gap: .4rem; }
.diary { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: .5rem; }
.diary-scales label {
  grid-template-columns: 7.5rem 1fr 1.5rem;
}
.diary-note { margin: .4rem 0 .2rem; }
.diary-note textarea {
  width: 100%; min-height: 5rem; resize: vertical;
  background: #1a1510; border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: .75rem .85rem; font: inherit; line-height: 1.5;
}
.diary-note textarea:focus {
  outline: 1px solid var(--accent); border-color: var(--accent);
}
audio { width: 100%; margin: .8rem 0; }
details { margin: .5rem 0; color: var(--muted); }

/* Interactive guide */
.page-guide { min-height: 100vh; }
.guide { max-width: 720px; margin: 0 auto; padding: 1.5rem 5vw 3rem; }
.guide-hero { margin-bottom: 2rem; }
.guide-hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .8rem; }
.guide-note { font-size: .9rem; margin-top: 1rem; }
.guide-block { margin: 2rem 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.guide-block h2 { font-family: var(--font-display); font-size: 1.8rem; margin: 0 0 .8rem; }
.day-nav { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.day-chip {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: .45rem .85rem; cursor: pointer; font: inherit;
}
.day-chip.active { background: var(--accent); color: #1a1510; border-color: transparent; font-weight: 600; }
.guide-day-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.25rem 1.2rem;
}
.guide-day-card h2 { font-family: var(--font-display); font-size: 1.7rem; margin: 0 0 .4rem; }
.guide-track { color: var(--muted); margin: 0 0 1.2rem; }
.guide-scales {
  display: grid; gap: .7rem; margin-bottom: 1.2rem;
}
.guide-scales label {
  display: grid; grid-template-columns: 6.5rem 1fr 1.5rem; gap: .6rem; align-items: center; color: var(--muted);
}
.guide-scales input[type="range"] { width: 100%; accent-color: var(--accent); }
.guide-field { display: grid; gap: .35rem; margin: 1rem 0; }
.guide-field span { font-weight: 600; }
.guide-field em { font-style: normal; font-size: .92rem; }
.guide-field textarea, .guide-block textarea {
  width: 100%; min-height: 5rem; resize: vertical;
  background: #1a1510; border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: .75rem .85rem; font: inherit; line-height: 1.5;
}
.guide-field textarea:focus, .guide-block textarea:focus {
  outline: 1px solid var(--accent); border-color: var(--accent);
}
.guide-formats {
  align-items: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px) {
  .guide-formats { grid-template-columns: 1fr; }
}
.guide-formats article {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.55rem;
}
.guide-formats h3 { margin: 0; }
.guide-formats .muted {
  flex: 1 1 auto;
  margin: 0 0 0.4rem;
  line-height: 1.5;
}
.guide-formats .btn {
  margin-top: auto;
  align-self: flex-start;
}
.guide-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.format-tag {
  display: inline-block; margin: 0;
  font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent);
}
.guide-code-row { margin: 1rem 0; max-width: 520px; }
.guide-progress { margin: 0.6rem 0 0.2rem; }
.recommend-card {
  margin-top: 1rem;
  padding: 1.1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  line-height: 1.55;
}
.recommend-card p { margin: 0 0 0.85rem; }
.recommend-card p:last-child { margin-bottom: 0; }
