:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f0eee9;
  --ink: #16151a;
  --ink-2: #4a4852;
  --ink-3: #85838d;
  --line: #e4e1da;
  --accent: #ff5a36;
  --accent-ink: #ffffff;
  --accent-soft: #ffe7e0;
  --good: #1f9d63;
  --good-soft: #dcf3e8;
  --warn: #c98a00;
  --warn-soft: #fbf0d4;
  --bad: #d23f3f;
  --bad-soft: #fbe2e2;
  --pro: #6a4cff;
  --pro-soft: #ebe6ff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 18, 30, .06), 0 6px 24px rgba(20, 18, 30, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Montserrat", var(--font);
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111014; --surface: #1a191f; --surface-2: #232229; --ink: #f3f2f6; --ink-2: #c3c1cb; --ink-3: #8b8994;
    --line: #2e2c35; --accent-soft: #3a1d16; --good-soft: #12301f; --warn-soft: #33290d; --bad-soft: #3a1717;
    --pro-soft: #251d4d; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111014; --surface: #1a191f; --surface-2: #232229; --ink: #f3f2f6; --ink-2: #c3c1cb; --ink-3: #8b8994;
  --line: #2e2c35; --accent-soft: #3a1d16; --good-soft: #12301f; --warn-soft: #33290d; --bad-soft: #3a1717;
  --pro-soft: #251d4d; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--ink-3); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- layout ---------- */
.app { min-height: 100vh; padding-bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); }
.app.public { padding-bottom: 0; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
.wrap.wide { max-width: 1080px; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: #fff; font-size: 16px; }
.topbar .spacer { flex: 1; }
.desk-nav { display: none; gap: 4px; }
.desk-nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 10px; font-weight: 500; }
.desk-nav a.on, .desk-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: space-around;
  background: var(--surface); border-top: 1px solid var(--line); height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink-3); font-size: .72rem; font-weight: 600; }
.tabbar a:hover { text-decoration: none; }
.tabbar a .ic { font-size: 1.3rem; line-height: 1; }
.tabbar a.on { color: var(--accent); }
@media (min-width: 860px) {
  .tabbar { display: none; }
  .desk-nav { display: flex; }
  .app { padding-bottom: 24px; }
}

/* ---------- components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card.flat { box-shadow: none; }
.card h3 { margin-bottom: .35em; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap-ok { flex-wrap: wrap; }
.row .grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid3 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 11px 18px; border-radius: 12px;
  transition: transform .06s ease, filter .15s ease; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.pro { background: var(--pro); }
.btn.danger { background: var(--bad); }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: .88rem; border-radius: 10px; }
.btn.lg { padding: 14px 24px; font-size: 1.05rem; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .8rem; font-weight: 600; border: 1px solid var(--line); }
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.pro { background: var(--pro-soft); color: var(--pro); border-color: transparent; }
a.chip:hover { text-decoration: none; filter: brightness(.97); }

.banner { border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; font-size: .94rem; }
.banner.warn { background: var(--warn-soft); }
.banner.pro { background: var(--pro-soft); }
.banner.good { background: var(--good-soft); }
.banner.bad { background: var(--bad-soft); }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
label.field > small { display: block; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=time], input[type=date], select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 70px; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); cursor: pointer; font-weight: 500; font-size: .95rem;
}
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); }
.choices.big .choice { flex: 1 1 140px; }
.choices.big .choice span { width: 100%; flex-direction: column; align-items: flex-start; padding: 14px; }
.choices.big .choice span b { font-size: 1rem; }
.choices.big .choice span small { font-weight: 400; }

.progress-dots { display: flex; gap: 6px; margin: 4px 0 18px; }
.progress-dots i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.progress-dots i.on { background: var(--accent); }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 24px); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 12px; z-index: 100; font-weight: 500; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

.modal-bg { position: fixed; inset: 0; background: rgba(10, 8, 16, .5); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 20px; padding: 24px; max-width: 440px; width: 100%; box-shadow: var(--shadow); }

.empty { text-align: center; padding: 32px 16px; color: var(--ink-2); }
.empty .big { font-size: 2.4rem; }

.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- markdown ---------- */
.md { overflow-wrap: anywhere; }
.md p:last-child, .md ul:last-child, .md ol:last-child { margin-bottom: 0; }
.md ul, .md ol { padding-left: 1.3em; margin: 0 0 .8em; }
.md li { margin: .2em 0; }
.md h1, .md h2, .md h3, .md h4 { font-size: 1.05rem; margin-top: 1em; }
.md blockquote { margin: .6em 0; padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--ink-2); }
.md table { border-collapse: collapse; width: 100%; font-size: .88rem; margin: .6em 0 1em; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.md th { background: var(--surface-2); }
.md code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.md a[href^="#/library/"] { background: var(--accent-soft); padding: 1px 7px; border-radius: 6px; font-weight: 600; font-size: .92em; }

/* ---------- landing ---------- */
.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.3rem); max-width: 14em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 8px; }
.demo-chat { display: flex; flex-direction: column; gap: 10px; }
.feature .ic { font-size: 1.6rem; }
.section-title { margin: 44px 0 16px; }
.price-card { position: relative; }
.price-card.best { border: 2px solid var(--pro); }
.price-card .price { font-family: var(--display); font-size: 2rem; font-weight: 700; }
.price-card ul { padding-left: 0; list-style: none; margin: 14px 0; }
.price-card li { padding: 4px 0 4px 26px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.price-card li.no::before { content: "–"; color: var(--ink-3); }
.toggle { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 4px; border: 1px solid var(--line); }
.toggle button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.toggle button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
details.faq { border-bottom: 1px solid var(--line); padding: 14px 0; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { margin-top: 8px; color: var(--ink-2); }
footer.site { border-top: 1px solid var(--line); margin-top: 40px; padding: 24px 0 40px; color: var(--ink-3); font-size: .88rem; }

/* ---------- chat ---------- */
.chat-page { display: flex; flex-direction: column; height: calc(100vh - 57px - var(--nav-h) - env(safe-area-inset-bottom)); }
@media (min-width: 860px) { .chat-page { height: calc(100vh - 57px - 24px); } }
.chat-head { display: flex; gap: 8px; align-items: center; padding: 10px 16px; max-width: 760px; width: 100%; margin: 0 auto; }
.chat-head .title { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-scroll { flex: 1; overflow-y: auto; }
.chat-list { max-width: 760px; margin: 0 auto; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 92%; }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 18px 18px 4px 18px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); padding: 12px 16px; border-radius: 18px 18px 18px 4px; box-shadow: var(--shadow); }
.msg .sources { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.msg .status { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: .88rem; }
.composer { border-top: 1px solid var(--line); background: var(--bg); }
.composer .inner { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 46px; max-height: 160px; border-radius: 14px; }
.composer .meta { max-width: 760px; margin: 0 auto; padding: 0 16px 8px; font-size: .78rem; color: var(--ink-3); }
.suggestions { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 640px) { .suggestions { grid-template-columns: 1fr 1fr; } }
.suggestions button { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; color: var(--ink); }
.suggestions button:hover { border-color: var(--accent); }
.drawer { position: fixed; inset: 0; z-index: 80; background: rgba(10,8,16,.45); }
.drawer .panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 86vw); background: var(--surface); padding: 16px; overflow-y: auto; }
.drawer .conv { display: flex; align-items: center; gap: 6px; padding: 10px; border-radius: 10px; color: var(--ink); }
.drawer .conv:hover { background: var(--surface-2); text-decoration: none; }
.drawer .conv .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- plan / log ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; }
.tabs button { border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week .day { background: var(--surface-2); border-radius: 10px; padding: 8px 4px; text-align: center; font-size: .75rem; min-height: 64px; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.week .day b { font-size: .8rem; }
.week .day.train { background: var(--accent-soft); }
.week .day.today { outline: 2px solid var(--accent); }
.week .day .lbl { color: var(--ink-2); line-height: 1.2; overflow-wrap: anywhere; }
.week .day .dot { display: none; color: var(--accent); }
.week-list { display: none; }
@media (max-width: 560px) {
  .week .day { min-height: 0; }
  .week .day .lbl { display: none; }
  .week .day .dot { display: block; }
  .week-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: .88rem; color: var(--ink-2); }
  .week-list .on { color: var(--accent); }
  .plan-head .grow { flex-basis: 100%; }
}
.ex { border-top: 1px solid var(--line); padding: 14px 0; }
.ex:first-of-type { border-top: 0; }
.ex .name { font-weight: 700; }
.ex .rx { font-family: var(--display); font-weight: 600; color: var(--accent); }
.ex .cue { font-size: .9rem; color: var(--ink-2); margin-top: 6px; }
.ex .alts { font-size: .82rem; color: var(--ink-3); margin-top: 4px; }
.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .kv { grid-template-columns: repeat(4, 1fr); } }
.kv .k { background: var(--surface-2); border-radius: 12px; padding: 12px; }
.kv .k b { display: block; font-family: var(--display); font-size: 1.35rem; }
.kv .k small { color: var(--ink-3); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline .t { font-family: var(--display); font-weight: 700; color: var(--accent); }
.sets { width: 100%; border-collapse: collapse; margin-top: 8px; }
.sets th { font-size: .75rem; color: var(--ink-3); text-align: left; font-weight: 600; padding: 4px; }
.sets td { padding: 4px; }
.sets input, .sets select { padding: 9px 8px; border-radius: 10px; text-align: center; }
.sets td:first-child { width: 34px; color: var(--ink-3); font-weight: 700; text-align: center; }
.timer { position: fixed; right: 16px; bottom: calc(var(--nav-h) + 20px); z-index: 50; background: var(--ink); color: var(--bg); border-radius: 16px; padding: 10px 16px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; }
.timer button { background: transparent; border: 1px solid color-mix(in srgb, var(--bg) 40%, transparent); color: var(--bg); border-radius: 8px; padding: 3px 8px; cursor: pointer; font-size: .8rem; }

.ring { --p: 0; --c: var(--good); width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring > div { width: 94px; height: 94px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.8rem; }
.scale { display: flex; gap: 6px; }
.scale label { flex: 1; }
.scale input { position: absolute; opacity: 0; }
.scale span { display: block; text-align: center; padding: 9px 0; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; }
.scale input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }

.guide-list a.g { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); color: var(--ink); }
.guide-list a.g:hover { text-decoration: none; background: var(--surface-2); }
.guide-list .num { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--ink-2); }
.guide-list .tl { font-size: .82rem; color: var(--ink-3); }
.locked { position: relative; padding: 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-3); }
.chart { width: 100%; height: 180px; }
.chart .ln { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart .pt { fill: var(--accent); }
.chart .ax { stroke: var(--line); }
.chart text { fill: var(--ink-3); font-size: 10px; }
.hide { display: none !important; }

/* ---------- trainer panel (Plan screen) ---------- */
.ex-actions { display: flex; gap: 6px; margin-top: 8px; }
.ex-actions .chip { cursor: pointer; background: var(--surface); }
.ex-actions .chip:hover { border-color: var(--accent); color: var(--ink); }
.fab {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 40;
  background: var(--ink); color: var(--bg); border: 0; border-radius: 999px; padding: 13px 20px; font-weight: 700;
  box-shadow: 0 8px 28px rgba(0,0,0,.25); cursor: pointer; font-size: .98rem;
}
.fab:hover { filter: brightness(1.1); }
@media (min-width: 860px) { .fab { bottom: 24px; right: 24px; } }
.sheet { position: fixed; inset: 0; z-index: 85; }
.sheet-bg { position: absolute; inset: 0; background: rgba(10,8,16,.45); opacity: 0; transition: opacity .2s; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; height: 86vh; background: var(--bg); border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .22s ease; box-shadow: var(--shadow);
}
.sheet.open .sheet-bg { opacity: 1; }
.sheet.open .sheet-panel { transform: none; }
@media (min-width: 860px) {
  .sheet-bg { background: transparent; pointer-events: none; }
  .sheet-panel { left: auto; top: 0; height: auto; width: 440px; border-radius: 0; border-left: 1px solid var(--line); transform: translateX(100%); }
}
.sheet-panel header { padding: 14px 16px; border-bottom: 1px solid var(--line); gap: 10px; }
.logo-sm { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; }
.sheet-scroll { flex: 1; overflow-y: auto; }
.sheet-scroll .chat-list { padding: 14px 16px; }
.sheet-scroll .suggestions { grid-template-columns: 1fr; }
.sheet-composer { display: flex; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); align-items: flex-end; }
.sheet-composer textarea { min-height: 46px; max-height: 140px; border-radius: 14px; }
.plan-chip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--pro-soft); border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; font-size: .9rem; font-weight: 600; }

/* Illustrated field-guide cards */
.guide-list .gthumb { width: 42px; height: 56px; flex: none; border-radius: 6px; object-fit: cover; object-position: top; background: var(--surface-2); border: 1px solid var(--line); }
.card-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; margin: 10px 0 14px; }
.card-thumb { position: relative; flex: none; width: 168px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f1ede4; cursor: zoom-in; scroll-snap-align: start; box-shadow: var(--shadow); text-align: left; font: inherit; color: var(--ink); }
.card-thumb img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.card-thumb .cap { display: block; padding: 7px 9px; font-size: .78rem; font-weight: 600; background: var(--surface); border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-thumb:hover { border-color: var(--accent); }
.card-thumb.is-locked img { filter: blur(3px) saturate(.7); transform: scale(1.04); }
.card-thumb .lock { position: absolute; top: 8px; right: 8px; background: var(--pro); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
@media (min-width: 640px) { .card-thumb { width: 200px; } }
.src-cards { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.src-card { position: relative; flex: none; width: 66px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: zoom-in; background: #f1ede4; }
.src-card img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.src-card span { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.65); color: #fff; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.src-card:hover { border-color: var(--accent); }

.noscroll { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 120; background: rgba(12, 10, 14, .97); backdrop-filter: blur(8px); color: #fff; display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.viewer-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.viewer-top small { color: rgba(255,255,255,.65); }
.viewer-x { background: rgba(255,255,255,.12); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; flex: none; }
.viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; position: relative; }
.viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #f1ede4; }
.viewer-nav { background: rgba(255,255,255,.12); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.6rem; line-height: 1; cursor: pointer; flex: none; }
.viewer-nav:disabled { opacity: .25; cursor: default; }
@media (max-width: 640px) {
  .viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(0,0,0,.45); }
  .viewer-nav.prev { left: 10px; } .viewer-nav.next { right: 10px; }
}
.viewer-lock { position: relative; height: 100%; max-height: 100%; aspect-ratio: 3 / 4; max-width: 100%; border-radius: 6px; overflow: hidden; }
.viewer-lock img { width: 100%; height: 100%; object-fit: cover; filter: blur(10px) brightness(.8); transform: scale(1.06); }
.viewer-lock-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(300px, 86%); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 18px; text-align: center; box-shadow: var(--shadow); }
.viewer-lock-box p { color: var(--ink-2); font-size: .92rem; margin: 6px 0 12px; }
.viewer-dots { display: flex; justify-content: center; gap: 6px; padding: 12px; }
.viewer-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.3); }
.viewer-dots i.on { background: #fff; }
.viewer-guide { align-self: center; margin-bottom: 14px; }

/* Guide reading mode */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; margin: 4px 0 14px; }
.seg button { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; font-size: .9rem; padding: 7px 14px; border-radius: 9px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tldr { background: var(--accent-soft); border-color: transparent; }
.tldr h3 { margin: 0 0 6px; }
.tldr ul { margin: 0; padding-left: 20px; }
.tldr li { margin: 5px 0; }
.read-note { font-size: .88rem; margin-top: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }

/* Free vs Pro: upgrade prompts and locked previews */
.pw-badge { display: inline-block; background: var(--pro-soft); color: var(--pro); font-weight: 700; font-size: .8rem; padding: 4px 10px; border-radius: 999px; }
.perks { list-style: none; padding: 0; margin: 14px 0 18px; }
.perks li { position: relative; padding: 5px 0 5px 28px; font-size: .95rem; }
.perks li::before { content: "✓"; position: absolute; left: 4px; top: 5px; color: var(--pro); font-weight: 800; }
.more-locked { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 10px; padding: 9px 12px; border: 1px dashed color-mix(in srgb, var(--pro) 45%, var(--line)); border-radius: 10px; background: var(--pro-soft); color: var(--pro); font: inherit; font-size: .88rem; font-weight: 600; text-align: left; cursor: pointer; }
.more-locked:hover { border-style: solid; }
.kv-lock { border: 0; background: var(--pro-soft); color: var(--pro); font: inherit; font-weight: 700; font-size: .85rem; padding: 3px 8px; border-radius: 8px; cursor: pointer; margin-top: 2px; }
.preview-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(135deg, var(--pro-soft), var(--accent-soft)); border: 1px solid color-mix(in srgb, var(--pro) 25%, transparent); }
.preview-banner p { margin: 4px 0 0; font-size: .92rem; color: var(--ink-2); }
.preview-banner .grow { min-width: 220px; }
.session-locked { position: relative; }
.fake-wrap { position: relative; margin-top: 6px; }
.ex.fake { filter: blur(5px); user-select: none; pointer-events: none; opacity: .75; }
.fake-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 12px; }
.fake-over p { margin: 0; max-width: 360px; font-size: .92rem; background: color-mix(in srgb, var(--surface) 88%, transparent); padding: 8px 12px; border-radius: 10px; }
.btn.pro-ghost { background: var(--pro-soft); color: var(--pro); border-color: transparent; }
.pro-teaser { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; border-color: color-mix(in srgb, var(--pro) 30%, var(--line)); }
.pro-teaser h3 { display: flex; align-items: center; gap: 8px; }
.pro-teaser:hover { border-color: var(--pro); }
.pro-page { text-align: center; max-width: 560px; margin: 16px auto; }
.pro-page .perks { text-align: left; display: inline-block; }

/* ---------- Landing page (sales) ---------- */
:root { --gold: #f2c14e; --lp-dark: #0e0d11; }
/* Landing type: Montserrat throughout — black all-caps headlines, like big gym brands */
.lp-band, .lp-section { font-family: var(--display); }
.lp-band { width: 100vw; margin-left: calc(50% - 50vw); padding: 64px 16px; }
.lp-dark { background: radial-gradient(1200px 500px at 80% -10%, #2a1a14 0%, transparent 60%), var(--lp-dark); color: #f3f2f6; }
.lp-dark .muted, .lp-dark .lp-lead { color: #c3c1cb; }
.lp-inner { max-width: 1080px; margin: 0 auto; }
.lp-section { padding: 56px 0 8px; }
.lp-eyebrow { font-family: var(--display); font-weight: 800; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.lp-dark .lp-eyebrow { color: var(--gold); }
.lp-h1, .lp-h2 { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.005em; line-height: 1.04; margin: 0 0 16px; }
.lp-h1 { font-size: clamp(2.3rem, 6.6vw, 4.2rem); }
.lp-h2 { font-size: clamp(1.7rem, 4.4vw, 2.7rem); max-width: 20em; }
.lp-h1 em, .lp-h2 em { font-style: normal; color: var(--accent); }
.lp-dark .lp-h1 em, .lp-dark .lp-h2 em { color: var(--gold); }
.lp-lead { font-size: 1.12rem; max-width: 36em; color: var(--ink-2); }
.lp-sub { color: var(--ink-2); font-size: 1.08rem; margin: 0 0 18px; }
.lp-fine { display: block; font-size: .85rem; color: #9b99a3; margin-top: 6px; }
.lp-hero { padding-top: 48px; }
.lp-hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 6px; }
.lp-ghost { background: transparent; color: #f3f2f6; border: 1.5px solid rgba(255,255,255,.3); }
.lp-ghost:hover { border-color: #fff; }
.lp-hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .lp-hero-grid { grid-template-columns: 1.15fr .85fr; } }

.lp-card { padding: 0; border: 0; background: #f1ede4; border-radius: 8px; overflow: hidden; cursor: zoom-in; box-shadow: 0 14px 40px rgba(0,0,0,.35); display: block; transition: transform .2s ease; }
.lp-card img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.lp-card:hover { transform: translateY(-4px); }
.lp-fan { position: relative; height: clamp(300px, 52vw, 430px); }
.lp-fan .lp-card { position: absolute; width: 56%; top: 0; }
.lp-fan .f1 { left: 0; top: 8%; transform: rotate(-8deg); }
.lp-fan .f2 { left: 22%; z-index: 2; }
.lp-fan .f3 { right: 0; top: 8%; transform: rotate(8deg); }
.lp-fan .f1:hover { transform: rotate(-8deg) translateY(-6px); } .lp-fan .f3:hover { transform: rotate(8deg) translateY(-6px); }
@media (max-width: 859px) { .lp-fan { max-width: 420px; width: 100%; margin: 0 auto; } }

.lp-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 40px; }
@media (min-width: 760px) { .lp-stats { grid-template-columns: repeat(4, 1fr); } }
.lp-stat { border: 1px solid rgba(242,193,78,.35); background: linear-gradient(180deg, rgba(242,193,78,.08), transparent); border-radius: 14px; padding: 14px; text-align: center; }
.lp-stat b { display: block; font-family: var(--display); font-size: 2.3rem; font-weight: 900; color: var(--gold); line-height: 1.05; }
.lp-stat span { font-size: .85rem; color: #c3c1cb; }

.lp-pains { display: grid; gap: 0; border-top: 1px solid var(--line); }
.lp-pain { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.lp-num { font-family: var(--display); font-weight: 900; font-size: 1.4rem; color: var(--accent); line-height: 1.2; }
.lp-pain h3 { margin: 0 0 4px; font-size: 1.15rem; }
.lp-pain p { margin: 0; color: var(--ink-2); }
@media (min-width: 860px) { .lp-pains { grid-template-columns: 1fr 1fr; column-gap: 32px; } }

.lp-solution { max-width: 820px; }
.lp-sources { margin-top: 18px; font-size: .9rem; color: #9b99a3; border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; }

.lp-cmp-wrap { overflow-x: auto; margin: 10px 0 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lp-cmp { border-collapse: collapse; width: 100%; min-width: 680px; font-size: .9rem; }
.lp-cmp th, .lp-cmp td { padding: 12px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.lp-cmp thead th { font-size: .82rem; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.lp-cmp tbody th { font-weight: 600; width: 26%; position: sticky; left: 0; background: var(--surface); }
.lp-cmp tr:last-child th, .lp-cmp tr:last-child td { border-bottom: 0; }
.lp-cmp td { color: var(--ink-2); }
.lp-cmp .us { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.lp-cmp thead .us { color: var(--accent); }
.lp-cmp .yes { color: var(--good); font-weight: 800; margin-right: 4px; }
.lp-cmp .no { color: var(--ink-3); }

.lp-row { display: grid; gap: 24px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .lp-row { grid-template-columns: 1fr 1fr; gap: 48px; } .lp-row.rev .lp-row-text { order: 2; } }
.lp-row h3 { font-size: 1.45rem; margin: 10px 0 8px; }
.lp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lp-cues { display: grid; gap: 8px; margin-top: 14px; }
.lp-cues div { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.lp-cues b { color: var(--accent); }
.lp-cues span { color: var(--ink-2); font-size: .9rem; }
.lp-mock { display: grid; gap: 10px; }
.lp-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.lp-week span { font-size: .66rem; text-align: center; padding: 6px 2px; border-radius: 8px; background: var(--surface-2); color: var(--ink-3); line-height: 1.2; }
.lp-week span b { display: block; font-size: .78rem; color: var(--ink-2); }
.lp-week span.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lp-mock-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; border: 1px solid var(--line); }
.lp-mock-row span { font-size: 1.3rem; }
.lp-mock-row small { display: block; color: var(--ink-3); }
.lp-tiles { margin-top: 24px; }
.lp-tiles .ic { font-size: 1.6rem; }

.lp-wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
@media (min-width: 640px) { .lp-wall { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 960px) { .lp-wall { grid-template-columns: repeat(6, 1fr); } }
.lp-step { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--display); }
.lp-final { text-align: center; margin-top: 48px; margin-bottom: -40px; }
.lp-final .lp-h2, .lp-final .lp-lead { margin-left: auto; margin-right: auto; }
.app.public main.wrap:has(.lp-hero) { padding-top: 0; }
.brand { white-space: nowrap; }
@media (max-width: 480px) { .hide-xs { display: none !important; } }
.show-xs { display: none; }
@media (max-width: 680px) { .show-xs { display: inline; } }

/* Landing buttons: bold uppercase pills */
.lp-band .btn, .lp-section .btn { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border-radius: 999px; font-size: .92rem; }
.lp-band .btn.lg, .lp-section .btn.lg { padding: 15px 26px; }
.lp-pain h3, .lp-row h3, .lp-tiles h3 { font-weight: 800; }
.lp-lead, .lp-sub { font-weight: 500; }
/* Cuedie wordmark */
.brand { font-weight: 900; letter-spacing: .06em; font-size: 1.05rem; }
.brand .logo svg { width: 24px; height: 24px; display: block; }
/* Private beta */
.beta-tag { margin-left: 6px; font-size: .58rem; font-weight: 800; letter-spacing: .08em; padding: 2px 6px; border-radius: 6px; background: var(--pro-soft); color: var(--pro); vertical-align: middle; }
@media (max-width: 480px) { .topbar [data-feedback] { padding: 6px 9px; font-size: 0; } .topbar [data-feedback]::before { content: "💬"; font-size: 1rem; } }
/* Legal pages and consent */
.legal { max-width: 760px; margin: 16px auto; }
.legal .md h1 { margin-top: 0; }
.legal .md h2 { margin-top: 1.6em; font-size: 1.2rem; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 14px; font-size: .88rem; color: var(--ink-2); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent); }
footer.site a { color: var(--ink-2); }
.legal .md h1 { font-size: clamp(1.8rem, 4vw, 2.3rem); margin-bottom: .2em; }
.legal .md td:first-child, .legal .md th:first-child { white-space: nowrap; font-weight: 600; }
.legal .md table { display: table; }
@media (max-width: 560px) { .legal .md table { display: block; } }
