:root {
  color-scheme: light;
  --cream: #ead8c8;
  --paper: #fffaf5;
  --paper-strong: #ffffff;
  --ink: #24443b;
  --muted: #79766f;
  --sage: #8fa68a;
  --sage-dark: #617b62;
  --sage-pale: #e2ebdf;
  --peach: #f2d9cc;
  --peach-pale: #faeae1;
  --butter: #f6eac9;
  --lavender: #e6e0ed;
  --sand: #eadacb;
  --line: rgba(23, 55, 47, .10);
  --shadow: 0 18px 44px rgba(71, 68, 54, .10);
  --radius-lg: 28px;
  --radius-md: 20px;
  font-family: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: #e9ddd4; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,.78), transparent 34%),
    linear-gradient(160deg, #e3cdb9 0%, #f2e3d5 44%, #fffaf7 100%);
}

button { font: inherit; }

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  background:
    radial-gradient(circle at 92% 15%, rgba(204,178,154,.35), transparent 25%),
    linear-gradient(165deg, #e5cfbd 0%, #f2e3d5 34%, #fffaf7 64%, #eee0d3 100%);
  position: relative;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
  box-shadow: 0 0 70px rgba(27, 48, 41, .08);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(16px + env(safe-area-inset-top)) 20px 14px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(239, 224, 211, .93);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(23, 55, 47, .06);
}

.brand-mark, .profile-avatar {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #f7f0e4;
  border-radius: 50%;
  font-family: "Prata", serif;
}

.brand-mark { width: 42px; height: 42px; font-size: 20px; }
.topbar > div:nth-child(2) { flex: 1; }

.eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sage-dark);
}

.brand-subtitle { margin: 0; color: var(--muted); font-size: 13px; }

.icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(61, 71, 61, .08);
}

.screen { display: none; min-width: 0; padding: 14px 18px 34px; overflow-x: hidden; }
.screen.is-active { display: block; animation: enter .24s ease-out; }

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

h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin-top: 0; }
h1 { font-family: "Prata", Georgia, serif; font-weight: 400; }
h2 { font-size: 22px; line-height: 1.25; }

.hero {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(circle at 14% 12%, rgba(255,255,255,.82), transparent 31%),
    linear-gradient(142deg, #dfc6b1 0%, #f1dfd0 40%, #fffaf7 74%, #f0e1d5 100%);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 24px 54px rgba(115, 88, 69, .13);
}

.hero-badge {
  display: inline-flex;
  position: relative;
  z-index: 2;
  margin-bottom: 22px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 999px;
  background: rgba(255,250,246,.78);
  color: var(--ink);
  box-shadow: 0 7px 20px rgba(78,61,48,.12);
  backdrop-filter: blur(9px);
  font-size: 11px;
  font-weight: 700;
}

.hero-copy { position: relative; z-index: 2; min-width: 0; padding: 27px 22px 26px; }
.hero h1 { max-width: 100%; margin-bottom: 13px; font-size: clamp(27px, 7vw, 40px); line-height: 1.13; overflow-wrap: break-word; }
.hero-copy > p:not(.eyebrow) { max-width: 390px; margin: 0 0 21px; color: var(--muted); line-height: 1.55; }

.botanical-wall {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background-image:
    url("assets/botanical-watercolor-mobile-v1.png"),
    radial-gradient(circle at 84% 15%, rgba(210,163,128,.25) 0 16%, transparent 16.4%);
  background-repeat: no-repeat;
  background-position: right -12px bottom -24px, center;
  background-size: auto 112%, 100% 100%;
}

.botanical-wall::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,250,245,.90) 0%, rgba(255,250,245,.58) 43%, rgba(255,250,245,.02) 100%);
}

.primary-button {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--ink), #3d6256);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(23,55,47,.18);
}

.primary-button:active { transform: translateY(1px); }

.content-section { padding: 30px 2px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; }
.section-heading h2 { margin-bottom: 0; }

.featured-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 17px;
  margin-top: 16px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(255,250,246,.98), rgba(250,234,225,.72));
  border: 1px solid rgba(194,154,129,.16);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(71,68,54,.06);
}

.document-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 88px;
  border-radius: 18px 18px 26px 18px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--sage-pale), #f0e4d1);
  color: var(--sage-dark);
  font-family: "Prata", serif;
  font-size: 30px;
}

.document-icon::before,
.document-icon::after {
  content: "";
  position: absolute;
  border-radius: 100% 0 100% 0;
  background: rgba(143,166,138,.28);
  transform: rotate(28deg);
}
.document-icon::before { width: 46px; height: 24px; right: -13px; top: 8px; }
.document-icon::after { width: 34px; height: 18px; left: -9px; bottom: 10px; }
.document-icon span { position: relative; z-index: 1; }

.featured-copy h3 { margin: 9px 0 7px; font-size: 17px; line-height: 1.35; }
.featured-copy p, .product-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill-free { color: var(--sage-dark); background: var(--sage-pale); }
.pill-soon { color: #81684c; background: #f1e5d5; }

.text-button { border: 0; padding: 12px 0 0; background: none; color: var(--ink); font-weight: 700; cursor: pointer; }
.text-button span { color: var(--sage-dark); }

.notice {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  margin-top: 20px;
  padding: 17px;
  border-radius: 20px;
  background: rgba(230,224,237,.42);
}
.notice p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.notice-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sage-pale); color: var(--sage-dark); font-weight: 700; }

.page-heading { padding: 18px 5px 12px; }
.page-heading h1 { margin: 6px 0 9px; font-size: 34px; }
.page-heading > p:last-child { margin: 0; color: var(--muted); line-height: 1.55; }

.filter-row { display: flex; gap: 8px; padding: 10px 2px 18px; overflow-x: auto; scrollbar-width: none; }
.filter { white-space: nowrap; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); cursor: pointer; }
.filter.is-active { background: var(--ink); color: white; border-color: var(--ink); }

.product-list { display: grid; gap: 13px; }
.product-card { padding: 19px; background: var(--paper); border: 1px solid rgba(194,154,129,.14); border-radius: 24px; box-shadow: 0 12px 28px rgba(106,83,67,.06); }
.product-card:nth-child(2) { background: linear-gradient(135deg, var(--paper), rgba(226,235,223,.7)); }
.product-card:nth-child(3) { background: linear-gradient(135deg, var(--paper), rgba(230,224,237,.62)); }
.product-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.product-card h3 { margin: 13px 0 7px; font-size: 18px; }
.product-meta { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.product-meta strong { font-size: 13px; }
.product-meta button { border: 0; border-radius: 12px; padding: 9px 12px; background: var(--sage-pale); color: var(--sage-dark); font-weight: 700; cursor: pointer; }

.empty-state { margin-top: 30px; padding: 34px 24px; text-align: center; background: var(--paper); border-radius: var(--radius-lg); border: 1px solid var(--line); }
.empty-state h2 { margin: 20px 0 8px; }
.empty-state p { color: var(--muted); line-height: 1.55; }
.empty-illustration { width: 90px; height: 70px; margin: 0 auto; border: 2px solid var(--sage); border-radius: 12px 12px 25px 12px; transform: rotate(-3deg); position: relative; }
.empty-illustration span { position: absolute; width: 38px; height: 2px; top: 22px; left: 24px; background: var(--sage); box-shadow: 0 12px var(--sage), 0 24px var(--sage); }

.profile-card { display: flex; gap: 15px; align-items: center; margin: 18px 0; padding: 19px; border-radius: var(--radius-md); background: var(--paper); border: 1px solid var(--line); }
.profile-avatar { width: 56px; height: 56px; font-size: 22px; }
.profile-card h2 { margin: 0 0 4px; font-size: 18px; }
.profile-card p { margin: 0; color: var(--muted); font-size: 13px; }
.settings-list { overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); }
.settings-list button { width: 100%; display: flex; justify-content: space-between; gap: 16px; padding: 17px 18px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: left; cursor: pointer; }
.settings-list button:last-child { border-bottom: 0; }
.settings-list b { max-width: 42%; color: var(--sage-dark); font-size: 12px; text-align: right; }

.bottom-nav {
  position: fixed;
  z-index: 8;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255,250,246,.94);
  backdrop-filter: blur(18px);
}
.nav-item { display: grid; place-items: center; gap: 3px; border: 0; padding: 6px; background: none; color: #90958f; font-size: 10px; cursor: pointer; }
.nav-icon { font-size: 21px; line-height: 1; }
.nav-item.is-active { color: var(--ink); font-weight: 700; }

.sheet-backdrop { position: fixed; z-index: 20; inset: 0; display: flex; align-items: end; justify-content: center; padding: 20px 12px 0; background: rgba(17,36,31,.38); }
.sheet-backdrop[hidden] { display: none; }
.bottom-sheet { width: min(100%, 536px); padding: 14px 22px calc(25px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: var(--paper); position: relative; animation: sheet-in .25s ease-out; }
.bottom-sheet h2 { font-family: "Prata", serif; font-size: 28px; font-weight: 400; margin-bottom: 10px; }
.bottom-sheet > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.bottom-sheet .primary-button { width: 100%; margin-top: 8px; }
.sheet-handle { width: 44px; height: 4px; margin: 0 auto 22px; border-radius: 4px; background: #d7d2ca; }
.sheet-close { position: absolute; right: 18px; top: 20px; border: 0; background: none; color: var(--muted); font-size: 26px; cursor: pointer; }
@keyframes sheet-in { from { transform: translateY(30px); opacity: 0; } }

.toast { position: fixed; z-index: 30; left: 50%; bottom: 98px; width: max-content; max-width: calc(100% - 40px); transform: translate(-50%, 15px); padding: 11px 15px; border-radius: 13px; background: var(--ink); color: white; font-size: 13px; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  body { padding: 28px 0; }
  .app-shell { min-height: calc(100vh - 56px); border-radius: 34px; overflow: hidden; }
  .bottom-nav { bottom: 28px; border-radius: 0 0 34px 34px; }
  .topbar { padding-top: 16px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 27px; }
}

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