/* Ember AI — design tokens taken from the Ember AI web mockup. */

:root {
  --pink: #ff3d9a;
  --pink-hi: #ff4fa2;
  --pink-lo: #d31f77;
  --pink-soft: #ff6bae;
  --pink-pale: #ff9dc8;
  --purple: #c86bff;
  --purple-pale: #dba8ff;
  --gold: #f5c97a;
  --gold-deep: #f5a623;
  --green: #3ddc84;
  --red: #ff6b6b;
  --blue: #7fd4ff;

  --bg: #0a090c;
  --bg-deep: #050506;
  --panel: #131117;
  --ink: #fbf7f9;
  --ink-2: #f2ecef;
  --dim: rgba(242, 236, 239, 0.6);
  --dim-2: rgba(242, 236, 239, 0.4);
  --faint: rgba(242, 236, 239, 0.28);

  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --fill: rgba(255, 255, 255, 0.04);
  --fill-2: rgba(255, 255, 255, 0.06);

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glow: 0 10px 26px rgba(255, 61, 154, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg-deep);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 400; letter-spacing: 0.01em; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.09); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

.hidden { display: none !important; }

/* ======================================================== AUTH / SPLIT */

.auth-wrap { display: flex; min-height: 100dvh; background: var(--bg-deep); }

.auth-hero {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 60px; gap: 22px;
  background: radial-gradient(70% 55% at 12% 18%, rgba(255, 61, 154, 0.16), transparent 66%), var(--bg-deep);
  border-right: 1px solid var(--line);
}
.auth-hero img.mark { width: 62px; height: 62px; border-radius: 20px; box-shadow: var(--glow); }
.auth-hero h1 { font-size: 54px; line-height: 1.03; color: var(--ink); max-width: 15ch; }
.auth-hero p { color: var(--dim); font-size: 16px; max-width: 46ch; }
.auth-hero ul { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.auth-hero li { display: flex; align-items: center; gap: 11px; font-size: 14.5px; color: var(--dim); }
.auth-hero li i { width: 6px; height: 6px; border-radius: 50%; flex: none; }

.auth-panel {
  flex: none; width: 46%; max-width: 640px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 48px 40px;
}
.auth-card { width: 100%; max-width: 410px; }
.auth-card > img.mark {
  width: 62px; height: 62px; border-radius: 20px; display: block;
  margin: 0 auto 16px; box-shadow: var(--glow);
}
.auth-card h2 { font-size: 38px; text-align: center; color: var(--ink); line-height: 1; }
.auth-card .tagline { text-align: center; color: var(--dim-2); font-size: 13.5px; margin: 8px 0 26px; }

.seg {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 18px;
  background: var(--fill); border: 1px solid var(--line); border-radius: 14px;
}
.seg button {
  flex: 1; padding: 10px; border: 0; border-radius: 11px; cursor: pointer;
  font: 600 13.5px var(--sans); color: var(--dim); background: transparent;
  transition: all 0.2s var(--ease);
}
.seg button.on { background: rgba(255, 61, 154, 0.16); color: var(--pink-pale); }

.tos-row { display: flex; align-items: flex-start; gap: 11px; margin: 18px 0; }
.tos-box {
  width: 22px; height: 22px; flex: none; margin-top: 1px; border-radius: 6px;
  border: 2px solid var(--line-2); background: transparent;
  display: grid; place-items: center; cursor: pointer; transition: all 0.18s var(--ease);
}
.tos-box:hover { border-color: var(--pink); }
.tos-box.on { border-color: var(--pink); background: var(--pink); }
.tos-box.on::after { content: '✓'; font-size: 13px; color: #fff; line-height: 1; }
.tos-row label { font-size: 13px; color: var(--dim); }
.tos-row a { color: var(--pink-pale); }

.auth-fine { text-align: center; font-size: 11.5px; color: var(--faint); margin-top: 14px; }
.auth-fine a { color: var(--dim-2); }

/* ======================================================== ONBOARDING */

.onb {
  min-height: 100dvh; display: flex; flex-direction: column;
  padding: 26px 40px 34px;
  background: radial-gradient(64% 42% at 80% -6%, rgba(255, 61, 154, 0.15), transparent 62%), var(--bg);
}
.onb-bars { display: flex; gap: 8px; justify-content: center; }
.onb-bars i { width: 128px; max-width: 22vw; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
.onb-bars i.on { background: var(--pink); box-shadow: 0 0 12px rgba(255, 61, 154, 0.6); }

.onb-body { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 560px; margin: 0 auto; width: 100%; }
.onb-body h2 { font-size: 42px; line-height: 1.06; color: var(--ink); margin-bottom: 14px; }
.onb-body > p { color: var(--dim); font-size: 15px; margin-bottom: 22px; max-width: 52ch; }

.onb-foot { display: flex; align-items: center; gap: 18px; justify-content: center; }
.onb-foot .skip { background: none; border: 0; color: var(--dim-2); font: 400 14px var(--sans); cursor: pointer; }

/* ======================================================== APP SHELL */

.app { height: 100dvh; display: flex; background: radial-gradient(64% 42% at 80% -6%, rgba(255, 61, 154, 0.15), transparent 62%), var(--bg); }

.side {
  flex: none; width: 272px; display: flex; flex-direction: column;
  padding: 26px 16px 20px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 22px; }
.brand img { width: 40px; height: 40px; flex: none; border-radius: 14px; box-shadow: var(--glow); }
.brand .n { font-family: var(--serif); font-size: 22px; line-height: 1; color: var(--ink); }
.brand .s { font-size: 11.5px; color: var(--dim-2); margin-top: 3px; }

.nav { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.nav button {
  width: 100%; border: 0; background: transparent; color: var(--dim);
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: 12px; cursor: pointer;
  font: 500 14.5px var(--sans); text-align: left; transition: all 0.18s var(--ease);
}
.nav button:hover { background: var(--fill-2); }
.nav button.on { background: rgba(255, 61, 154, 0.1); color: var(--pink); }
.nav .gi { width: 19px; height: 16px; flex: none; border: 1.7px solid currentColor; border-radius: 6px 6px 6px 2px; }
.nav .gi.sq { border-radius: 5px; height: 17px; width: 17px; }
.nav .gi.circ { border-radius: 50%; height: 17px; width: 17px; }
.nav .gi.dia { border-radius: 3px; height: 15px; width: 15px; transform: rotate(45deg); }
.nav .gi.bars { border: 0; display: flex; align-items: flex-end; gap: 2.5px; height: 15px; }
.nav .gi.bars b { width: 3px; background: currentColor; border-radius: 1px; }
.nav .gi.bars b:nth-child(1) { height: 7px; }
.nav .gi.bars b:nth-child(2) { height: 14px; }
.nav .gi.bars b:nth-child(3) { height: 10px; }

.side-foot { margin-top: 12px; }
.plan-chip {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 14px; cursor: pointer;
  background: var(--fill); border: 1px solid var(--line-2); color: var(--ink);
  font: 400 13px var(--sans); text-align: left; transition: all 0.18s var(--ease);
}
.plan-chip:hover { background: var(--fill-2); }
.plan-chip .l { font-size: 11px; color: var(--dim-2); }
.plan-chip .v { font-weight: 700; font-size: 14px; }
.plan-chip[data-tier='starter'] { border-color: rgba(255, 61, 154, 0.35); }
.plan-chip[data-tier='starter'] .v { color: var(--pink); }
.plan-chip[data-tier='pro'] { border-color: rgba(200, 107, 255, 0.35); }
.plan-chip[data-tier='pro'] .v { color: var(--purple); }
.plan-chip[data-tier='coachplus'] { border-color: rgba(245, 201, 122, 0.35); background: rgba(245, 201, 122, 0.06); }
.plan-chip[data-tier='coachplus'] .v { color: var(--gold); }
.side-foot .tos { display: block; margin: 12px 0 0 4px; font-size: 11.5px; color: var(--faint); background: none; border: 0; cursor: pointer; font-family: var(--sans); }

/* ======================================================== MAIN */

.main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }

.screen-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 24px 28px 12px;
}
.screen-head h2 { font-size: 30px; line-height: 1; color: var(--ink); }
.screen-head .sub { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--dim-2); margin-top: 7px; }
.screen-head .sub i { width: 6px; height: 6px; border-radius: 50%; background: var(--pink); flex: none; }

.scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 28px 30px; }
.view { display: none; }
.view.on { display: block; animation: rise 0.26s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; align-items: start; }
.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 16px; align-items: start; }

/* ======================================================== PRIMITIVES */

.card {
  background: var(--fill); border: 1px solid var(--line); border-radius: 20px;
  padding: 18px; margin-bottom: 14px;
}
.card.tight { padding: 14px; }
.card h3 { font-size: 20px; color: var(--ink); }
.card .hint { font-size: 12.5px; color: var(--dim-2); margin-top: 4px; }

.eyebrow { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }

.field { position: relative; margin-bottom: 10px; }
.field .lab {
  position: absolute; top: 9px; left: 15px; z-index: 1;
  font-size: 9.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint);
  pointer-events: none;
}
.field .lab .opt { text-transform: none; letter-spacing: 0; color: var(--faint); }
input, textarea, select {
  width: 100%; padding: 25px 15px 11px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2);
  border-radius: 14px; color: var(--ink); font: 400 15px var(--sans);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: rgba(255, 61, 154, 0.55); background: rgba(255, 61, 154, 0.05);
}
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.field.plain input, .field.plain textarea, .field.plain select { padding: 12px 15px; }
select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath fill='%23ff3d9a' d='M5.5 7 0 0h11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; padding-right: 36px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border: 0; border-radius: 14px; cursor: pointer;
  font: 700 14px var(--sans); color: #fff;
  background: linear-gradient(140deg, var(--pink-hi), var(--pink-lo));
  box-shadow: var(--glow); transition: transform 0.18s var(--ease), opacity 0.18s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: scale(0.985); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; background: var(--fill-2); color: var(--dim-2); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--fill); border: 1px solid var(--line-2); color: var(--dim); box-shadow: none; font-weight: 500; }
.btn.ghost:hover:not(:disabled) { background: var(--fill-2); color: var(--ink); }
.btn.purple { background: linear-gradient(140deg, #c86bff, #8a2be2); box-shadow: 0 10px 26px rgba(200, 107, 255, 0.3); }
.btn.gold { background: transparent; border: 1px solid rgba(245, 201, 122, 0.5); color: var(--gold); box-shadow: none; }
.btn.sm { padding: 9px 15px; font-size: 12.5px; border-radius: 11px; }
.btn.danger { background: transparent; border: 1px solid rgba(255, 107, 107, 0.4); color: var(--red); box-shadow: none; }
.btn.ok { background: transparent; border: 1px solid rgba(61, 220, 132, 0.4); color: var(--green); box-shadow: none; }
.btn.danger:hover:not(:disabled) { background: rgba(255, 107, 107, 0.09); }
.btn.btn-block { display: block; width: 100%; }
.danger-zone { border-color: rgba(255, 107, 107, 0.22); }
.confirm-input { letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.btn .spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  font: 500 12.5px var(--sans); background: var(--fill);
  border: 1px solid var(--line-2); color: var(--dim); transition: all 0.18s var(--ease);
}
.chip:hover { background: var(--fill-2); color: var(--ink); }
.chip.on { background: rgba(255, 61, 154, 0.16); border-color: rgba(255, 61, 154, 0.45); color: var(--pink-pale); }

.pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pick button {
  padding: 11px; border-radius: 12px; cursor: pointer; font: 500 13px var(--sans);
  background: var(--fill); border: 1px solid var(--line-2); color: var(--dim);
  transition: all 0.18s var(--ease);
}
.pick button:hover { background: var(--fill-2); }
.pick button.on { background: rgba(255, 61, 154, 0.16); border-color: rgba(255, 61, 154, 0.45); color: var(--pink-pale); }
.pick button.on[data-v='great'], .pick button.on[data-v='yes'] { background: rgba(61, 220, 132, 0.12); border-color: rgba(61, 220, 132, 0.4); color: var(--green); }
.pick button.on[data-v='okay'], .pick button.on[data-v='maybe'] { background: rgba(245, 166, 35, 0.12); border-color: rgba(245, 166, 35, 0.4); color: var(--gold-deep); }
.pick button.on[data-v='no'] { background: rgba(255, 107, 107, 0.12); border-color: rgba(255, 107, 107, 0.4); color: var(--red); }

.badge {
  font: 700 9.5px var(--sans); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}
.badge.pink { background: rgba(255, 61, 154, 0.15); color: var(--pink-pale); border: 1px solid rgba(255, 61, 154, 0.3); }
.badge.purple { background: rgba(200, 107, 255, 0.14); color: var(--purple-pale); border: 1px solid rgba(200, 107, 255, 0.3); }
.badge.gold { background: rgba(245, 201, 122, 0.12); color: var(--gold); border: 1px solid rgba(245, 201, 122, 0.32); }
.badge.green { background: rgba(61, 220, 132, 0.12); color: var(--green); border: 1px solid rgba(61, 220, 132, 0.3); }
.badge.grey { background: var(--fill-2); color: var(--dim-2); border: 1px solid var(--line-2); }
.badge.red { background: rgba(255, 107, 107, 0.12); color: var(--red); border: 1px solid rgba(255, 107, 107, 0.3); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--fill); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.stat .v { font-family: var(--serif); font-size: 28px; line-height: 1; color: var(--ink); }
.stat .l { font-size: 11px; color: var(--dim-2); margin-top: 6px; }
.stat.green { border-color: rgba(61, 220, 132, 0.28); background: rgba(61, 220, 132, 0.05); }
.stat.green .v { color: var(--green); }
.stat.pink { border-color: rgba(255, 61, 154, 0.28); background: rgba(255, 61, 154, 0.05); }
.stat.pink .v { color: var(--pink); }

.empty { text-align: center; padding: 42px 20px; color: var(--faint); font-size: 13.5px; }
.empty b { display: block; font-family: var(--serif); font-size: 21px; color: var(--dim-2); margin-bottom: 6px; font-weight: 400; }

/* ======================================================== CHAT */

.chat-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 28px 18px; display: flex; flex-direction: column; gap: 16px; }

.turn { display: flex; gap: 12px; max-width: 760px; }
.turn.me { align-self: flex-end; flex-direction: row-reverse; }
.turn .av { width: 26px; height: 26px; flex: none; border-radius: 9px; margin-top: 6px; }
.turn.me .av { display: none; }
.bubble {
  padding: 13px 17px; border-radius: 18px; font-size: 14.5px; line-height: 1.62;
  background: var(--fill); border: 1px solid var(--line); color: var(--ink-2);
  border-bottom-left-radius: 6px; animation: rise 0.24s var(--ease);
}
.turn.me .bubble {
  background: linear-gradient(140deg, var(--pink-hi), var(--pink-lo)); border: 0; color: #fff;
  border-bottom-left-radius: 18px; border-bottom-right-radius: 6px;
}
.bubble strong { color: var(--pink-pale); font-weight: 600; }
.turn.me .bubble strong { color: #fff; }
.bubble h4 { font: 600 12px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--pink); margin: 12px 0 5px; }
.bubble h4:first-child { margin-top: 0; }
.bubble ul { margin: 6px 0 6px 17px; }
.bubble li { margin: 3px 0; }
.bubble p + p { margin-top: 9px; }
.bubble img.shot { max-width: 220px; border-radius: 12px; display: block; margin-bottom: 8px; }
.stamp { font-size: 10.5px; color: var(--faint); margin-top: 5px; }
.turn.me .stamp { text-align: right; }

.dots { display: inline-flex; gap: 5px; padding: 3px 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--pink); animation: bob 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bob { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.starters { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 28px 10px; }

.composer-wrap { padding: 0 28px 18px; }
.usage-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 9px; }
.usage-line span { font-size: 11.5px; color: var(--faint); }
.usage-bar { width: 150px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.usage-bar i { display: block; height: 100%; background: var(--pink); border-radius: 2px; transition: width 0.4s var(--ease); }

.composer {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05);
  border-radius: 22px; backdrop-filter: blur(14px);
}
.composer input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 6px 0;
  font-size: 16px; border-radius: 0;
}
.composer input:focus { background: transparent; border: 0; }
.round {
  width: 40px; height: 40px; flex: none; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; position: relative;
  border: 1px solid var(--line-2); background: var(--fill);
  transition: all 0.2s var(--ease);
}
.round:hover { transform: translateY(-1px); }
.round:active { transform: scale(0.94); }
.round.send { border: 0; background: linear-gradient(140deg, var(--pink-hi), var(--pink-lo)); box-shadow: var(--glow); color: #fff; font-size: 17px; }
.round .mic { width: 11px; height: 17px; border-radius: 6px; background: var(--dim); }
.round svg { width: 17px; height: 17px; stroke: var(--dim); fill: none; stroke-width: 1.7; }
.round.live .mic { background: var(--pink); }
.round .lock {
  position: absolute; right: -2px; bottom: -2px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line-2); display: grid; place-items: center;
  font-size: 8px; color: var(--dim-2);
}
.composer-note { text-align: center; font-size: 11.5px; color: var(--faint); margin-top: 9px; }

/* ======================================================== TOOLS */

.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(390px, 1fr)); gap: 14px; }
.tool {
  position: relative; overflow: hidden; cursor: pointer; text-align: left;
  background: var(--fill); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; display: flex; gap: 13px; align-items: flex-start;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease);
  font-family: var(--sans); color: var(--ink-2);
}
.tool:hover { transform: translateY(-2px); border-color: var(--line-2); }
.tool::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px;
  border-radius: 50%; background: var(--acc); opacity: 0.12; filter: blur(28px); pointer-events: none;
}
.tool .ini {
  width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center;
  font: 700 13px var(--sans); color: #fff; background: var(--acc);
}
.tool .body { flex: 1; min-width: 0; display: block; }
.tool .nm { display: block; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.tool .sb { display: block; font-size: 12.5px; color: var(--dim-2); margin: 3px 0 10px; }
.tool .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tool .meta span { font-size: 10.5px; color: var(--dim-2); background: var(--fill-2); border-radius: 6px; padding: 3px 7px; }
.tool .meta span:last-child { background: none; color: var(--faint); padding-left: 0; }
.tool > .badge { position: relative; z-index: 1; flex: none; }

/* ======================================================== SHEETS */

.scrim {
  position: fixed; inset: 0; z-index: 60; background: rgba(4, 3, 6, 0.72);
  backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center;
  animation: fade 0.22s var(--ease);
}
.scrim.center { align-items: center; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%; max-width: 620px; max-height: 88vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 26px 26px 0 0; padding: 14px 26px 30px;
  animation: up 0.3s var(--ease);
}
.scrim.center .sheet { border-radius: 26px; }
@keyframes up { from { transform: translateY(26px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet .grip { width: 42px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 18px; }
.sheet h3 { font-size: 27px; color: var(--ink); line-height: 1.1; margin-bottom: 8px; }
.sheet > p { color: var(--dim); font-size: 14px; margin-bottom: 16px; }
.sheet ul.bullets { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; }
.sheet ul.bullets li { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.sheet ul.bullets li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--pink); flex: none; margin-top: 7px; }
.sheet .not-now { display: block; width: 100%; background: none; border: 0; color: var(--dim-2); font: 400 13.5px var(--sans); cursor: pointer; padding: 14px 0 4px; }
.sheet .price-note { text-align: center; font-size: 11.5px; color: var(--faint); }

.sheet-head { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.sheet-head .back { width: 32px; height: 32px; flex: none; border-radius: 10px; border: 1px solid var(--line-2); background: var(--fill); color: var(--dim); cursor: pointer; }
.sheet-head .ini { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; font: 700 13px var(--sans); color: #fff; background: var(--acc); }
.sheet-head .t { flex: 1; min-width: 0; }
.sheet-head .t b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.sheet-head .t span { font-size: 12.5px; color: var(--dim-2); }

.sheet-wide { max-width: 900px; }
.lock-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 18px; background: rgba(255, 61, 154, 0.14); margin-bottom: 16px; }

.result {
  margin-top: 16px; padding: 16px; border-radius: 16px;
  background: rgba(255, 61, 154, 0.05); border: 1px solid rgba(255, 61, 154, 0.18);
  font-size: 14px; line-height: 1.62; animation: rise 0.3s var(--ease);
}
.result:empty { display: none; }
.result h4 { font: 600 11.5px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink); margin: 14px 0 6px; }
.result h4:first-child { margin-top: 0; }
.result strong { color: var(--pink-pale); }
.result ul { margin: 6px 0 6px 17px; }
.result li { margin: 4px 0; }
.result p + p { margin-top: 9px; }

/* ======================================================== HISTORY */

.hist-item {
  width: 100%; text-align: left; cursor: pointer; margin-bottom: 8px;
  background: var(--fill); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px;
  font-family: var(--sans); color: var(--ink-2); transition: all 0.18s var(--ease);
}
.hist-item:hover { background: var(--fill-2); }
.hist-item.on { background: rgba(255, 61, 154, 0.08); border-color: rgba(255, 61, 154, 0.35); }
.hist-item .r { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.hist-item .ti { font-weight: 600; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-item.on .ti { color: var(--pink-pale); }
.hist-item .wh { font-size: 11px; color: var(--faint); flex: none; }
.hist-item .pv { font-size: 12.5px; color: var(--dim-2); margin: 5px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hist-item .ct { font-size: 11px; color: var(--faint); }

/* ======================================================== PROFILE */

.who { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.who .pic {
  width: 56px; height: 56px; flex: none; border-radius: 18px; object-fit: cover;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 6px, transparent 6px 12px);
  border: 1px solid var(--line-2); display: grid; place-items: center;
  font-size: 10px; color: var(--faint);
}
.who h3 { font-size: 24px; }
.who .meta { font-size: 12.5px; color: var(--dim-2); margin: 2px 0 8px; }

.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo {
  aspect-ratio: 1; max-height: 130px; border-radius: 14px; border: 1px dashed var(--line-2);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 6px, transparent 6px 12px);
  display: grid; place-items: center; cursor: pointer; position: relative; overflow: hidden;
  color: var(--faint); font-size: 11px; transition: border-color 0.18s var(--ease);
}
.photo:hover { border-color: var(--pink); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .x {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(5, 5, 6, 0.8); border: 1px solid var(--line-2); color: var(--ink);
  cursor: pointer; font-size: 12px; line-height: 1;
}
.photo.add { border-style: solid; font-size: 22px; color: var(--dim-2); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 7px; }

.ref-copy { display: flex; align-items: center; gap: 10px; background: var(--fill); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 15px; }
.ref-copy code { flex: 1; min-width: 0; font: 400 13px var(--sans); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-copy button { background: none; border: 0; color: var(--pink); font: 600 12.5px var(--sans); cursor: pointer; flex: none; }

.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.ref-stats div { background: var(--fill); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ref-stats .v { font-family: var(--serif); font-size: 24px; line-height: 1; color: var(--ink); }
.ref-stats .l { font-size: 10.5px; color: var(--dim-2); margin-top: 5px; }

.prog { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin: 4px 0 14px; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink-lo), var(--pink)); border-radius: 2px; }

.steps { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.steps li { display: flex; gap: 11px; font-size: 12.5px; color: var(--dim); }
.steps li b {
  width: 19px; height: 19px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 61, 154, 0.15); color: var(--pink); font-size: 10px; font-weight: 700;
}

/* ======================================================== DATES */

.date-card { background: var(--fill); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; }
.date-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.date-card h4 { font-family: var(--serif); font-size: 20px; font-weight: 400; color: var(--ink); }
.date-card .when { font-size: 11.5px; color: var(--faint); margin: 2px 0 9px; }
.date-card .what { font-size: 13.5px; color: var(--ink-2); margin-bottom: 11px; }
.date-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rating { display: flex; gap: 4px; }
.rating i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.13); }
.rating i.on { background: var(--pink); }
.rating.tap i { width: 16px; height: 16px; cursor: pointer; transition: transform 0.15s var(--ease); }
.rating.tap i:hover { transform: scale(1.2); }

/* ======================================================== FLASHCARDS */

.deck { position: relative; margin: 8px 0 14px; }
.flip {
  width: 100%; min-height: 190px; border-radius: 22px; cursor: pointer; text-align: left;
  padding: 20px 22px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(150deg, var(--pink-hi), var(--pink-lo)); border: 0; color: #fff;
  box-shadow: 0 16px 40px rgba(255, 61, 154, 0.22); font-family: var(--sans);
  transition: transform 0.2s var(--ease);
}
.flip:active { transform: scale(0.99); }
.flip .hd { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.flip .hd span { font: 700 9.5px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.72; }
.flip .hd b { font: 700 9.5px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; background: rgba(255,255,255,.18); padding: 4px 9px; border-radius: 999px; }
.flip .txt { font-family: var(--serif); font-size: 25px; line-height: 1.2; }
.flip .ft { font-size: 11.5px; opacity: 0.72; }
.flip.back { background: linear-gradient(150deg, #2a1a24, #191118); box-shadow: none; border: 1px solid var(--line-2); }

.deck-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.deck-nav .arrow { width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--fill); color: var(--dim); cursor: pointer; }
.deck-nav .arrow:disabled { opacity: 0.35; cursor: default; }
.pips { display: flex; gap: 5px; }
.pips i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.pips i.on { width: 18px; border-radius: 999px; background: var(--pink); }

.card-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 15px; margin-bottom: 7px;
  background: var(--fill); border: 1px solid var(--line); border-radius: 13px;
  font-size: 13px; cursor: pointer; transition: all 0.18s var(--ease);
}
.card-row:hover { background: var(--fill-2); }
.card-row.on { border-color: rgba(255, 61, 154, 0.4); }
.card-row i { width: 6px; height: 6px; border-radius: 50%; background: var(--pink); flex: none; }
.card-row i.done { background: var(--green); }
.card-row .f { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.card-row.on .f { color: var(--pink-pale); }
.card-row .w { font-size: 11px; color: var(--faint); flex: none; }

/* ======================================================== PLANS */

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.plan-card { position: relative; background: var(--fill); border: 1px solid var(--line); border-radius: 20px; padding: 20px 18px; }
.plan-card.starter { border-color: rgba(255, 61, 154, 0.3); background: rgba(255, 61, 154, 0.04); }
.plan-card.pro { border-color: rgba(200, 107, 255, 0.3); background: rgba(200, 107, 255, 0.04); }
.plan-card.coachplus { border-color: rgba(245, 201, 122, 0.35); background: rgba(245, 201, 122, 0.04); }
.plan-card .hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.plan-card h3 { font-size: 24px; color: var(--ink); }
.plan-card .pr { font: 700 13.5px var(--sans); color: var(--pink); }
.plan-card.pro .pr { color: var(--purple); }
.plan-card.coachplus .pr { color: var(--gold); }
.plan-card.free .pr { color: var(--dim-2); }
.plan-card .bl { font-size: 13px; color: var(--dim); margin: 7px 0 14px; }
.plan-card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.plan-card li { display: flex; gap: 9px; font-size: 13.5px; color: var(--ink-2); align-items: flex-start; }
.plan-card li::before { content: '✓'; color: var(--pink); flex: none; }
.plan-card.pro li::before { color: var(--purple); }
.plan-card.coachplus li::before { color: var(--gold); }
.plan-card li.no { color: var(--faint); }
.plan-card li.no::before { content: '✕'; color: var(--faint); }
.plan-card .flag {
  position: absolute; top: -11px; left: 18px; padding: 4px 11px; border-radius: 999px;
  font: 700 9.5px var(--sans); letter-spacing: 0.11em; text-transform: uppercase;
  background: var(--gold); color: #231603;
}

/* ======================================================== INSIGHTS */

.donut-row { display: flex; align-items: center; gap: 20px; }
.donut { position: relative; width: 104px; height: 104px; flex: none; }
.donut .mid { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 26px; color: var(--ink); }
.legend { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--dim); }
.legend div { display: flex; align-items: center; gap: 9px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.bar-row { margin-bottom: 12px; }
.bar-row .lb { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.bar-row .lb b { color: var(--pink); font-weight: 600; }
.bar-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--pink-lo), var(--pink)); transition: width 0.5s var(--ease); }

.spark { height: 92px; width: 100%; }
.read-card { background: rgba(255, 61, 154, 0.05); border: 1px solid rgba(255, 61, 154, 0.2); border-radius: 20px; padding: 18px; }
.read-card h4 { font-family: var(--serif); font-size: 21px; font-weight: 400; color: var(--ink); line-height: 1.25; margin-bottom: 9px; }
.read-card p { font-size: 13.5px; color: var(--dim); line-height: 1.6; }
.patterns { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.patterns li { display: flex; gap: 11px; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.patterns li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--pink); flex: none; margin-top: 8px; }

/* ======================================================== TOAST */

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(14px);
  background: var(--panel); border: 1px solid var(--line-2); color: var(--ink);
  padding: 12px 20px; border-radius: 999px; font-size: 13.5px; z-index: 200;
  opacity: 0; pointer-events: none; max-width: 90vw; text-align: center;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { border-color: rgba(255, 107, 107, 0.5); }

.notice { padding: 12px 15px; border-radius: 14px; font-size: 12.5px; margin-bottom: 14px; line-height: 1.5; }
.notice.warn { background: rgba(245, 166, 35, 0.09); border: 1px solid rgba(245, 166, 35, 0.28); color: #f5c97a; }
.notice.bad { background: rgba(255, 107, 107, 0.09); border: 1px solid rgba(255, 107, 107, 0.3); color: #ffb4b4; }
.notice.ok { background: rgba(61, 220, 132, 0.09); border: 1px solid rgba(61, 220, 132, 0.28); color: #8fe9bb; }
.notice code { background: rgba(255, 255, 255, 0.08); padding: 1px 5px; border-radius: 4px; }

/* ======================================================== MOBILE */

.mobile-bar { display: none; }
.mobile-top { display: none; }

@media (max-width: 860px) {
  .side { display: none; }
  .app { flex-direction: column; }

  .mobile-top {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid var(--line); flex: none;
  }
  .mobile-top .brand { padding: 0; }
  .mobile-top .brand img { width: 30px; height: 30px; border-radius: 11px; }
  .mobile-top .brand .n { font-size: 18px; }
  .mobile-top .brand .s { display: none; }

  .screen-head { flex-direction: column; align-items: stretch; padding: 16px 16px 8px; }
  .screen-head h2 { font-size: 25px; }
  .demo-bar { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .demo-bar::-webkit-scrollbar { display: none; }

  .scroll { padding: 4px 16px 26px; }
  .msgs { padding: 8px 16px 14px; }
  .starters { padding: 0 16px 8px; flex-wrap: nowrap; overflow-x: auto; }
  .starters::-webkit-scrollbar { display: none; }
  .composer-wrap { padding: 0 16px 12px; }
  .turn { max-width: 100%; }
  .bubble { font-size: 14px; }

  .cols, .cols-2, .tool-grid, .plan-grid { grid-template-columns: 1fr; }

  .mobile-bar {
    display: flex; flex: none; border-top: 1px solid var(--line);
    background: rgba(10, 9, 12, 0.94); backdrop-filter: blur(20px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mobile-bar button {
    flex: 1; padding: 9px 2px 10px; background: none; border: 0; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    font: 500 10px var(--sans); color: var(--faint);
  }
  .mobile-bar button.on { color: var(--pink); }
  .mobile-bar .gi { width: 17px; height: 15px; border: 1.7px solid currentColor; border-radius: 5px 5px 5px 2px; }
  .mobile-bar .gi.sq { border-radius: 4px; width: 15px; }
  .mobile-bar .gi.circ { border-radius: 50%; width: 15px; }
  .mobile-bar .gi.dia { border-radius: 3px; width: 13px; height: 13px; transform: rotate(45deg); }
  .mobile-bar .gi.bars { border: 0; display: flex; align-items: flex-end; gap: 2px; }
  .mobile-bar .gi.bars b { width: 3px; background: currentColor; border-radius: 1px; }
  .mobile-bar .gi.bars b:nth-child(1) { height: 6px; }
  .mobile-bar .gi.bars b:nth-child(2) { height: 13px; }
  .mobile-bar .gi.bars b:nth-child(3) { height: 9px; }

  .auth-wrap { flex-direction: column; }
  .auth-hero { display: none; }
  .auth-panel { width: 100%; max-width: none; flex: 1; padding: 34px 22px; }

  .onb { padding: 20px 22px 28px; }
  .onb-body h2 { font-size: 33px; }

  .sheet { max-width: none; padding: 14px 20px 26px; }
  .photos { grid-template-columns: repeat(3, 1fr); }
  .ref-stats { grid-template-columns: repeat(3, 1fr); }
}
