/* Enjoy Help — warm Enjoy design system (DESIGN.md), mobile-first for the in-app embed. */
:root {
  --bg1: #FFE5E5;
  --bg2: #FFD4C4;
  --bg3: #FFC4B4;
  --brown: #4B1F0F;
  --brown2: #512E11;
  --muted: #6b5a52;
  --coral1: #FFC09E;
  --coral2: #FA5C42;
  --surf: #ffffff;
  --surf-alt: #FCFBFA;
  --green: #2D8B4E;
  --shadow-sm: 0 2px 8px rgba(75, 31, 15, 0.08);
  --shadow-md: 0 4px 16px rgba(75, 31, 15, 0.12);
  --shadow-lg: 0 10px 30px rgba(75, 31, 15, 0.16);
  --radius-card: 16px;
  --radius-pill: 999px;
  --gap: 12px;
  --page-max: 680px;
  --pad-x: clamp(14px, 4vw, 22px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--brown);
  background: linear-gradient(165deg, var(--bg1), var(--bg2) 55%, var(--bg3));
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  font-size: clamp(15px, 2.6vw, 16px);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.ic {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

/* ── Top bar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  padding: 10px var(--pad-x);
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(255, 250, 247, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(75, 31, 15, 0.06);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  font-size: 19px;
  background: linear-gradient(135deg, var(--coral1), var(--coral2));
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; font-weight: 800; font-size: 16px; line-height: 1.1; }
.brand-sub { font-weight: 600; font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }

/* ── Guide nav (horizontally scrollable pills) ── */
.guidenav {
  position: sticky;
  top: 0;
  z-index: 15;
  background: linear-gradient(180deg, rgba(255, 245, 240, 0.6), rgba(255, 245, 240, 0));
}
.guidenav-track {
  display: flex;
  gap: 8px;
  padding: 10px var(--pad-x);
  max-width: var(--page-max);
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.guidenav-track::-webkit-scrollbar { display: none; }
.guidenav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  min-height: 38px;
  border-radius: var(--radius-pill);
  background: var(--surf);
  color: var(--brown2);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.guidenav-link .ic { font-size: 16px; opacity: 0.8; }
.guidenav-link:active { transform: scale(0.97); }
.guidenav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--coral1), var(--coral2));
  box-shadow: var(--shadow-md);
}
.guidenav-link.is-active .ic { opacity: 1; }

/* ── Page container ── */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 4px var(--pad-x) 8px;
}

/* ── Hero ── */
.hero { padding: 22px 2px 6px; }
.hero--home { padding-top: 28px; }
.hero-title {
  margin: 0 0 6px;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.hero-sub { margin: 0; color: var(--brown2); font-size: clamp(15px, 3.6vw, 17px); max-width: 36ch; }
.hero-img { width: 100%; border-radius: var(--radius-card); margin-top: 16px; box-shadow: var(--shadow-md); }

/* ── Sections ── */
.section { margin: 26px 0; }
.section-title {
  margin: 0 0 14px;
  font-size: clamp(18px, 4.4vw, 21px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── Card grids (feature grid + guide cards) ── */
.cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--gap);
}
.fcard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--surf);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}
.fcard--link { transition: transform 0.12s ease, box-shadow 0.12s ease; }
.fcard--link:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.fcard--link:active { transform: scale(0.99); }
.fcard-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  border-radius: 11px;
  font-size: 22px;
  color: var(--coral2);
  background: linear-gradient(135deg, rgba(255, 192, 158, 0.30), rgba(250, 92, 66, 0.16));
}
.fcard-img { width: 100%; border-radius: 10px; margin-bottom: 4px; }
.fcard-title { font-weight: 700; font-size: 16px; }
.fcard-desc { color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ── Guide cards (landing + 404) ── */
.cardgrid--guides { grid-template-columns: 1fr; }
.gcard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surf);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.gcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.gcard:active { transform: scale(0.99); }
.gcard-ic {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--coral1), var(--coral2));
  flex-shrink: 0;
}
.gcard-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.gcard-title { font-weight: 700; font-size: 16px; }
.gcard-desc { color: var(--muted); font-size: 14px; }
.gcard-arrow { color: var(--coral2); font-size: 20px; font-weight: 700; flex-shrink: 0; }

/* ── Steps ── */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--gap); }
.step {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--surf);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--coral1), var(--coral2));
  flex-shrink: 0;
}
.step-body { display: flex; flex-direction: column; gap: 3px; }
.step-title { font-weight: 700; font-size: 16px; }
.step-desc { color: var(--muted); font-size: 14px; }

/* ── Timeline ── */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--coral1), var(--coral2));
  opacity: 0.5;
}
.tl-item { position: relative; display: flex; gap: 16px; padding: 0 0 18px 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--coral1), var(--coral2));
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}
.tl-body { display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; }
.tl-title { font-weight: 700; font-size: 16px; }
.tl-desc { color: var(--muted); font-size: 14px; }

/* ── FAQ (native details/summary) ── */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surf);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  min-height: 44px;
  font-weight: 650;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-chev {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--coral2);
  border-bottom: 2px solid var(--coral2);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-right: 4px;
}
.faq-item[open] .faq-chev { transform: rotate(-135deg); }
.faq-a { padding: 0 16px 15px; color: var(--brown2); font-size: 15px; }
.faq-a p { margin: 0 0 8px; }
.faq-a p:last-child { margin-bottom: 0; }

/* ── Prose ── */
.prose-body { color: var(--brown2); font-size: 16px; }
.prose-body p { margin: 0 0 12px; }
.prose-body p:last-child { margin-bottom: 0; }
.prose-body a, .faq-a a, .callout-text a { color: var(--coral2); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.prose-body ul, .prose-body ol { margin: 0 0 12px; padding-left: 22px; }
.prose-body li { margin-bottom: 4px; }

/* ── Callout ── */
.callout {
  display: flex;
  gap: 12px;
  padding: 15px 16px;
  border-radius: var(--radius-card);
  background: var(--surf);
  box-shadow: var(--shadow-sm);
}
.callout-ic { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.callout-title { margin: 0 0 3px; font-weight: 700; font-size: 15px; }
.callout-text { color: var(--brown2); font-size: 15px; }
.callout-text p { margin: 0; }
.callout--tip { background: linear-gradient(135deg, rgba(255, 245, 211, 0.7), rgba(255, 224, 196, 0.55)); }
.callout--tip .callout-ic { color: var(--coral2); }
.callout--note .callout-ic { color: var(--brown2); }
.callout--warning { background: linear-gradient(135deg, rgba(255, 224, 196, 0.7), rgba(255, 200, 180, 0.6)); }
.callout--warning .callout-ic { color: #C32525; }

/* ── Footer ── */
.foot {
  max-width: var(--page-max);
  margin: 8px auto 0;
  padding: 22px var(--pad-x);
  padding-bottom: max(22px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.foot p { margin: 0; }

/* ── Larger screens: roomier hero, multi-column guide cards ── */
@media (min-width: 560px) {
  .cardgrid--guides { grid-template-columns: 1fr 1fr; }
}

/* ── Footer links ── */
.foot-links { display: flex; gap: 18px; justify-content: center; margin-bottom: 10px; }
.foot-links a { color: var(--brown2); font-weight: 600; }
.foot-links a:hover { color: var(--coral2); text-decoration: underline; }

/* ── Long-form pages (terms, privacy, about) ── */
.legal { padding-bottom: 16px; }
.longform { color: var(--brown2); font-size: 15.5px; line-height: 1.62; }
.longform h2 {
  font-size: clamp(18px, 4.4vw, 21px);
  font-weight: 700;
  color: var(--brown);
  margin: 30px 0 10px;
  letter-spacing: -0.01em;
}
.longform h3 { font-size: 16.5px; font-weight: 700; color: var(--brown); margin: 22px 0 8px; }
.longform p { margin: 0 0 12px; }
.longform ul, .longform ol { margin: 0 0 14px; padding-left: 22px; }
.longform li { margin-bottom: 6px; }
.longform a { color: var(--coral2); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.longform strong { color: var(--brown); }
.longform hr { border: none; border-top: 1px solid rgba(75, 31, 15, 0.1); margin: 24px 0; }

/* ── Non-copyable legal text (best-effort: CSS hides selection; JS blocks copy/menu) ── */
.no-copy, .no-copy * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ── Doc pages (terms / privacy / about): a comfortable reading column that scales
   from phone to desktop. `--page-max` widens the nav, content, and footer together so
   they stay aligned; on phones the column already fills the width, so nothing changes. ── */
body.doc { --page-max: 820px; }
@media (min-width: 760px) {
  body.doc .longform { font-size: 16.5px; line-height: 1.72; }
  body.doc .longform h2 { margin-top: 34px; }
  body.doc .hero { padding-top: 30px; }
  body.doc .hero-title { font-size: clamp(30px, 4vw, 40px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
