/* Cora's Crew: the same clean look as the Resona Health Affiliate App site, in Cora's colours
   (spring green, cream, Coerenza blue) from the Character Bible. */
:root {
  --green: #2C874F; --green-mid: #59AA69; --green-soft: #e8f4ea; --blue: #2F6FB0; --blue-soft: #e8f0fa;
  --cream: #FAEADB; --ink: #18212b; --muted: #5d6b78; --line: #e3e8ee; --bg: #f5f8f6; --card: #ffffff;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #eef2f0; --muted: #a7b3ad; --card: #1b2420; --bg: #111714; --line: #2a3530; --cream: #2a2620;
          --green-soft: #1d2d23; --blue-soft: #1b2633; --shadow: none; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
       color: var(--ink); background: var(--bg); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }

/* top bar */
.bar { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
       padding: 14px 20px; padding-top: calc(14px + env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 19px; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.bar-link { color: var(--blue); font-weight: 600; text-decoration: none; }

/* hero */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding-top: 24px; padding-bottom: 40px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
@media (prefers-color-scheme: dark) { .eyebrow { color: #7fcf92; } }
.hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; margin: 0 0 18px; }
.accent { color: var(--green); }
@media (prefers-color-scheme: dark) { .accent { color: #7fcf92; } }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 24px; }
.lead b { color: var(--ink); }
.hero-btn { max-width: 380px; }
.fine { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.hero-art { position: relative; display: grid; place-items: center; }
.cora-glow { position: absolute; width: 88%; aspect-ratio: 1; border-radius: 50%;
             background: radial-gradient(circle, rgba(89,170,105,.35), rgba(89,170,105,0) 68%); }
.cora-3d { position: relative; width: min(100%, 440px); aspect-ratio: 1; object-fit: cover; border-radius: 36px;
           box-shadow: 0 30px 60px rgba(30,60,50,.25); }
.bubble { position: absolute; left: 0; bottom: 6%; background: var(--card); color: var(--ink); font-weight: 700; font-size: 16px;
          padding: 12px 16px; border-radius: 18px 18px 18px 4px; box-shadow: var(--shadow); border: 1px solid var(--line); }

/* panels and section heads */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 28px; margin: 0 0 48px; }
.panel h2 { margin: 0 0 10px; font-size: 26px; }
.meet { display: grid; grid-template-columns: 1fr 140px; gap: 24px; align-items: center; background: var(--green-soft); border-color: transparent; }
.meet img { width: 140px; height: auto; }
.meet p { margin: 0; color: var(--muted); font-size: 18px; }
.section-title { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 12px; font-weight: 800; }
.section-lead { font-size: 18px; color: var(--muted); max-width: 760px; margin: 0 0 24px; }
.section-lead b { color: var(--ink); }

/* five pillars */
.pillars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.pillar img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 14px; }
.pillar h3 { margin: 10px 0 4px; font-size: 18px; color: var(--green); }
@media (prefers-color-scheme: dark) { .pillar h3 { color: #7fcf92; } }
.pillar p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.45; }
.quote { margin: 18px 0 56px; font-size: 15px; color: var(--muted); }

/* why join */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 56px; }
.why-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); }
.why-card .ico { font-size: 28px; }
.why-card h3 { margin: 8px 0 6px; font-size: 18px; }
.why-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* today */
.app { padding-top: 8px; }
.loading { text-align: center; color: var(--muted); padding: 30px 0; }
.today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; margin-bottom: 24px; }
.card { background: var(--card); border-radius: 22px; padding: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.card h3 { margin: 8px 0 8px; font-size: 22px; }
.kicker { font-size: 13px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: .05em; }
@media (prefers-color-scheme: dark) { .kicker { color: #7fcf92; } }
.pill { background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 99px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tip-pose { display: block; width: 160px; height: 160px; object-fit: cover; border-radius: 50%; margin: 14px auto 6px; background: #fff;
            box-shadow: 0 0 0 6px var(--green-soft); }
.tip-body { font-size: 17px; margin: 0 0 12px; }
.try { background: var(--green-soft); border-left: 4px solid var(--green-mid); padding: 10px 14px; border-radius: 12px; margin: 0 0 16px; }
.champ-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 16px; margin: 12px 0 4px; background: var(--cream); }
.star { color: #e3a008; }
.story { white-space: pre-line; }
.enter { background: var(--blue-soft); text-align: center; }
.enter-cora { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; background: #fff; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 14px;
       padding: 12px 20px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center; min-height: 50px;
       transition: transform .08s, box-shadow .15s; }
.btn.big { width: 100%; font-size: 19px; min-height: 58px; }
.btn.green { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(44,135,79,.28); }
.btn.blue { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(47,111,176,.25); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn.link { background: none; color: var(--blue); width: 100%; min-height: 40px; font-weight: 600; text-decoration: underline; box-shadow: none; }
@media (prefers-color-scheme: dark) { .btn.link, .bar-link { color: #8fb8e6; } }
.btn:active { transform: scale(.98); }
.pulse { animation: pulse 1.2s ease-in-out 3; border-color: var(--green-mid); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(89,170,105,.35); } }
.small { font-size: 14px; color: var(--muted); }
.tiny { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.45; }

/* book and shop */
.book { display: grid; grid-template-columns: 1fr 220px; gap: 24px; align-items: center; background: linear-gradient(135deg, var(--card), var(--green-soft)); }
.book p { color: var(--muted); }
.book-cora { width: 220px; height: 220px; object-fit: cover; border-radius: 50%; background: #fff; }
.steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; max-width: 420px; }
.steps .btn { width: 100%; }
#book-links { display: grid; gap: 10px; margin-top: 12px; max-width: 420px; }
#book-links .btn { width: 100%; }
.shop { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; }
.shop img { width: 220px; height: 220px; object-fit: contain; background: #fff; border-radius: 18px; }
.shop p { color: var(--muted); margin: 0 0 8px; }
.shop .price { font-size: 26px; font-weight: 800; color: var(--ink); margin: 4px 0 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 28px; }
.two .card h3 { margin-top: 0; font-size: 19px; }
.two .card p { margin: 0; color: var(--muted); }
.prana a { color: var(--blue); font-weight: 700; }

/* earlier strips */
.strip-wrap h3 { margin: 10px 0 10px; }
.strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 18px; scroll-snap-type: x mandatory; }
.thumb { flex: none; width: 140px; scroll-snap-align: start; border: 1px solid var(--line); background: var(--card);
         border-radius: 16px; padding: 0 0 10px; text-align: left; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; overflow: hidden; }
.thumb img { width: 100%; height: 110px; object-fit: cover; display: block; margin-bottom: 6px; background: #fff; }
.thumb span { display: block; padding: 0 10px; font-weight: 600; line-height: 1.3; }

.foot { max-width: 760px; margin: 28px auto 30px; padding: 0 20px calc(16px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); text-align: center; }

/* dialogs */
dialog { border: 0; border-radius: 22px; padding: 22px; width: min(520px, calc(100vw - 24px)); max-height: 90vh; background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.5); }
dialog h2 { margin: 0 0 12px; }
dialog label { display: block; margin: 0 0 12px; font-weight: 600; font-size: 15px; }
dialog input:not([type=checkbox]):not([type=radio]):not([type=file]), dialog textarea {
  display: block; width: 100%; margin-top: 4px; padding: 11px 12px; font: inherit; font-weight: 400; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); }
dialog .check { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
dialog .check input { margin-top: 5px; width: 20px; height: 20px; flex: none; }
.row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.row .btn { flex: 1; }
.thumbs label { font-size: 28px; font-weight: 400; }
.photo-pick { display: grid; place-items: center; gap: 8px; border: 2px dashed var(--green-mid); border-radius: 16px; padding: 18px;
              cursor: pointer; text-align: center; color: var(--green); }
.photo-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.photo-pick img { max-width: 100%; max-height: 220px; border-radius: 10px; }
.err { color: #c0392b; font-weight: 600; min-height: 1em; }
#item-img { width: 100%; border-radius: 12px; margin-bottom: 12px; }
#save-dlg .btn { width: 100%; margin-bottom: 10px; }
#save-text { margin: 4px 0 10px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
         background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600; max-width: 90vw; z-index: 9; }

/* phones */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 8px; }
  .hero-art { order: -1; }
  .cora-3d { width: min(78vw, 340px); }
  .bubble { left: 4%; bottom: 2%; font-size: 14px; }
  .hero-btn { max-width: none; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .pillars .pillar:last-child { grid-column: span 2; }
  .why { grid-template-columns: 1fr 1fr; }
  .meet { grid-template-columns: 1fr 90px; padding: 22px; }
  .meet img { width: 90px; }
  .book, .shop { grid-template-columns: 1fr; text-align: left; }
  .book-cora { display: none; }
  .shop img { width: 100%; height: 220px; }
  .two { grid-template-columns: 1fr; }
  .panel { padding: 22px; margin-bottom: 36px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap, .bar { padding-left: 16px; padding-right: 16px; }
  .why { grid-template-columns: 1fr; }
  .meet { grid-template-columns: 1fr; text-align: center; }
  .meet img { order: -1; margin: 0 auto; }
  .lead, .section-lead { font-size: 17px; }
}
