/* ============================================================
   DatingBro — design system
   Mobile-first, warm, soft, premium, emotionally safe
   ============================================================ */

:root {
  /* Brand palette — warm rose / peach / coral with a calm violet accent */
  --rose-50:  #fff1f4;
  --rose-100: #ffe3ea;
  --rose-200: #ffc9d6;
  --rose-300: #ffa3ba;
  --rose-400: #ff7d9c;
  --rose-500: #f7587e;
  --rose-600: #e23b66;

  --peach-200: #ffe0cf;
  --peach-300: #ffc6a8;

  --violet-300: #c4b5fd;
  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;

  --mint-300: #8fe3c4;
  --mint-500: #16b888;

  --amber-400: #f7b955;
  --amber-500: #ef9d23;

  --red-400: #ff6b6b;
  --red-500: #ef4444;

  /* Neutrals */
  --ink-900: #2a2233;
  --ink-700: #4a4356;
  --ink-500: #756d83;
  --ink-400: #9a92a8;
  --ink-300: #c3bccf;

  --bg:       #fff7f8;
  --card:     #ffffff;
  --card-2:   #fff9fb;
  --line:     #f1e6ea;
  --line-2:   #efe9f2;

  --shadow-sm: 0 2px 10px rgba(160, 80, 110, 0.08);
  --shadow-md: 0 10px 30px rgba(160, 70, 110, 0.12);
  --shadow-lg: 0 24px 60px rgba(150, 60, 110, 0.18);

  --grad-warm: linear-gradient(135deg, #ff9a8b 0%, #ff6a88 45%, #ff99ac 100%);
  --grad-brand: linear-gradient(135deg, #ff7d9c 0%, #f7587e 50%, #a78bfa 130%);
  --grad-soft: linear-gradient(160deg, #fff1f4 0%, #fef6ff 60%, #f3f0ff 100%);
  --grad-dawn: linear-gradient(135deg, #ffd3a5 0%, #ff95b5 60%, #c08cf7 120%);

  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --maxw: 460px;
  --tabbar-h: 76px;
  --gutter: 26px;

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  color: var(--ink-900);
  background: var(--grad-soft);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select, button { font-family: inherit; font-size: 16px; }
a { color: var(--rose-600); }

/* ----------------------------------------------------------- */
/* App shell — phone-sized, centered                            */
/* ----------------------------------------------------------- */
.app-shell {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--grad-soft);
  box-shadow: 0 0 80px rgba(170, 90, 130, 0.12);
  overflow: hidden;
}

.screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 0 calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 12px);
  animation: screen-in 0.42s cubic-bezier(.22,.9,.27,1);
}
.screen.no-tabbar { padding-bottom: env(safe-area-inset-bottom, 0px); }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px) scale(.992); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pad { padding: 0 var(--gutter); }
.section { padding: 0 var(--gutter); }

/* decorative blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(34px);
  opacity: .55;
  pointer-events: none;
  z-index: 0;
}

/* ----------------------------------------------------------- */
/* Typography                                                   */
/* ----------------------------------------------------------- */
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
.h-xl { font-size: 30px; font-weight: 800; }
.h-lg { font-size: 24px; font-weight: 800; }
.h-md { font-size: 19px; font-weight: 700; }
.muted { color: var(--ink-500); }
.tiny { font-size: 12.5px; }
.small { font-size: 14px; }
.center { text-align: center; }
.bold { font-weight: 700; }
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ----------------------------------------------------------- */
/* Top bar                                                      */
/* ----------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) var(--gutter) 14px;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(255,247,248,.92), rgba(255,247,248,.55));
}
.topbar .title { font-weight: 800; font-size: 17px; flex: 1; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: #fff; color: var(--ink-700);
  box-shadow: var(--shadow-sm);
  display: grid; place-items: center; font-size: 18px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.iconbtn:active { transform: scale(.9); }

/* ----------------------------------------------------------- */
/* Buttons                                                      */
/* ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%;
  border: none; border-radius: 16px;
  padding: 17px 20px;
  font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em;
  color: #fff; background: var(--grad-brand);
  box-shadow: 0 14px 28px rgba(247, 88, 126, .32);
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}
.btn:active { transform: translateY(1px) scale(.985); box-shadow: 0 6px 16px rgba(247, 88, 126, .3); }
.btn[disabled] { opacity: .45; box-shadow: none; cursor: not-allowed; }
.btn.secondary {
  background: #fff; color: var(--rose-600);
  box-shadow: var(--shadow-sm); border: 1.5px solid var(--rose-100);
}
.btn.ghost {
  background: transparent; color: var(--ink-500);
  box-shadow: none; font-weight: 600;
}
.btn.small { width: auto; padding: 11px 16px; font-size: 14px; border-radius: 14px; }
.btn.dark { background: var(--ink-900); box-shadow: 0 10px 24px rgba(42,34,51,.28); }

.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: 100%; }

/* ----------------------------------------------------------- */
/* Cards                                                        */
/* ----------------------------------------------------------- */
.card {
  position: relative; z-index: 1;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  border: 1px solid rgba(255,255,255,.7);
}
.card + .card { margin-top: 14px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.tint { background: var(--card-2); }

.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 18px; }

/* ----------------------------------------------------------- */
/* Chips / option buttons                                       */
/* ----------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  border: 1.5px solid var(--line-2);
  background: #fff;
  color: var(--ink-700);
  border-radius: 14px;
  padding: 12px 15px;
  font-size: 15px; font-weight: 600;
  transition: transform .12s ease, border-color .15s ease, background .15s ease, color .15s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.chip .emo { font-size: 17px; }
.chip:active { transform: scale(.95); }
.chip.selected {
  border-color: transparent;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(247,88,126,.3);
}
.chip.full { width: 100%; justify-content: flex-start; }

/* ----------------------------------------------------------- */
/* Inputs                                                       */
/* ----------------------------------------------------------- */
.field { display: block; }
.field-label { font-size: 14px; font-weight: 700; color: var(--ink-700); margin: 0 0 8px 2px; }
.input, .textarea, select.input {
  width: 100%;
  border: 1.5px solid var(--line-2);
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--ink-900);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus, select.input:focus {
  border-color: var(--rose-300);
  box-shadow: 0 0 0 4px rgba(255,125,156,.16);
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }

/* ----------------------------------------------------------- */
/* Progress                                                     */
/* ----------------------------------------------------------- */
.progress-wrap { padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--gutter) 6px; }
.progress-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.progress-step { font-size: 13px; font-weight: 700; color: var(--rose-600); }
.progress-hint { font-size: 12.5px; color: var(--ink-400); }
.progress-bar { height: 8px; border-radius: 99px; background: var(--rose-100); overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 99px;
  background: var(--grad-brand);
  transition: width .5s cubic-bezier(.22,.9,.27,1);
}
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rose-200); transition: all .3s ease; }
.dot.on { background: var(--rose-500); width: 20px; border-radius: 99px; }

/* ----------------------------------------------------------- */
/* Tab bar                                                      */
/* ----------------------------------------------------------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: var(--maxw);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex; align-items: center; justify-content: space-around;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 50;
}
.tab {
  border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink-400); font-size: 11px; font-weight: 600;
  width: 56px; padding: 6px 0;
  transition: color .15s ease, transform .15s ease;
}
.tab .tab-ico { font-size: 21px; filter: grayscale(.5); opacity: .7; transition: all .15s ease; }
.tab.active { color: var(--rose-600); }
.tab.active .tab-ico { filter: none; opacity: 1; transform: translateY(-1px); }
.tab:active { transform: scale(.9); }
.tab-fab {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--grad-brand);
  color: #fff; margin-top: -22px;
  box-shadow: 0 12px 26px rgba(247,88,126,.45);
}
.tab-fab .fab-plus { font-size: 30px; font-weight: 400; line-height: 1; margin-top: -2px; }
.tab-fab:active { transform: scale(.92); }

/* ----------------------------------------------------------- */
/* Landing                                                      */
/* ----------------------------------------------------------- */
.landing { min-height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.landing .blob-1 { width: 280px; height: 280px; background: var(--rose-300); top: -80px; right: -70px; }
.landing .blob-2 { width: 240px; height: 240px; background: var(--violet-300); top: 120px; left: -90px; opacity: .4;}
.landing .blob-3 { width: 220px; height: 220px; background: var(--peach-300); bottom: 40px; right: -60px; opacity: .4;}
.landing-left { display: flex; flex-direction: column; flex: 1; padding: 0 var(--gutter); position: relative; z-index: 1; }
.landing-right { padding: 0 var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 24px); position: relative; z-index: 1; }
.landing-right .privacy-note { margin: 14px 0 0; }

.brandmark {
  display: inline-flex; align-items: center; gap: 11px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 30px);
}
.logo-badge {
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  font-size: 24px; box-shadow: 0 10px 22px rgba(247,88,126,.4);
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 0%,100%{ transform: translateY(0) rotate(-2deg);} 50%{ transform: translateY(-7px) rotate(2deg);} }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }

.hero { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 18px 0 16px; }
.hero-emoji {
  width: 58px; height: 58px; border-radius: 18px;
  display: grid; place-items: center; font-size: 30px;
  background: #fff; box-shadow: var(--shadow-md);
  animation: float 6s ease-in-out infinite; margin-bottom: 20px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rose-500); margin-bottom: 14px;
}
.hero-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--rose-400); }
.hero h1 { font-size: 33px; font-weight: 800; line-height: 1.14; letter-spacing: -0.03em; margin: 0; }
.hero .tagline { font-size: 16px; color: var(--ink-500); margin-top: 16px; font-weight: 500; line-height: 1.55; max-width: 34ch; }

.feature-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.pill {
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 99px; padding: 8px 13px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-700);
  box-shadow: 0 4px 14px rgba(160,80,110,.06);
  display: inline-flex; align-items: center; gap: 6px;
}
.landing-cta { padding: 0; display: grid; gap: 11px; }

.privacy-note {
  display: flex; gap: 11px; align-items: flex-start;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: var(--radius-md);
  padding: 14px 16px; margin: 0 var(--gutter) 16px;
  font-size: 12px; color: var(--ink-500); line-height: 1.5;
}
.privacy-note .lock { font-size: 15px; margin-top: 1px; }

/* ----------------------------------------------------------- */
/* Score gauges + report                                        */
/* ----------------------------------------------------------- */
.verdict-hero {
  background: var(--grad-dawn);
  color: #fff;
  border-radius: 0 0 32px 32px;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--gutter) 28px;
  position: relative; overflow: hidden;
}
.verdict-hero .eyebrow { font-size: 12.5px; font-weight: 700; opacity: .9; letter-spacing: .04em; text-transform: uppercase; }
.verdict-hero h1 { font-size: 26px; margin-top: 6px; }
.verdict-hero .intent { font-size: 15px; margin-top: 10px; opacity: .95; line-height: 1.5; }

.gauges { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 16px; }
.gauge { display: flex; flex-direction: column; align-items: center; }
.ring { position: relative; width: 78px; height: 78px; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .ring-num { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #fff; }
.gauge .gauge-label { font-size: 11.5px; margin-top: 7px; opacity: .92; font-weight: 600; text-align: center; }

.meta-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 4px; }
.meta-tile { background: rgba(255,255,255,.18); border-radius: 14px; padding: 10px; text-align: center; backdrop-filter: blur(4px); }
.meta-tile .mt-label { font-size: 10.5px; opacity: .9; font-weight: 600; }
.meta-tile .mt-val { font-size: 14px; font-weight: 800; margin-top: 3px; }

/* flags */
.flag-item {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.flag-item:last-child { border-bottom: none; }
.flag-dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }
.flag-dot.green { background: var(--mint-500); }
.flag-dot.yellow { background: var(--amber-500); }
.flag-dot.red { background: var(--red-500); }
.flag-item .ft { font-size: 14.5px; color: var(--ink-700); line-height: 1.45; }

.section-head { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.section-head .ico { font-size: 18px; }
.section-head h3 { font-size: 16px; }

.callout {
  border-radius: var(--radius-md); padding: 14px 16px; font-size: 14.5px; line-height: 1.5;
  border: 1px solid transparent;
}
.callout.warm { background: var(--rose-50); border-color: var(--rose-100); color: var(--ink-700); }
.callout.mint { background: #eafaf3; border-color: #c9f0e0; color: #15604a; }
.callout.amber { background: #fff7e8; border-color: #fbe6c0; color: #7a531a; }
.callout.violet { background: #f4f0ff; border-color: #e4dcff; color: #4b3a8a; }

.msg-suggest {
  background: var(--ink-900); color: #fff; border-radius: var(--radius-md);
  padding: 15px 16px; font-size: 14.5px; line-height: 1.55; position: relative;
}
.msg-suggest .copy-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,.16); border: none; color: #fff;
  border-radius: 9px; padding: 6px 10px; font-size: 12px; font-weight: 700;
}

.watch-list { list-style: none; padding: 0; margin: 0; }
.watch-list li { display: flex; gap: 10px; padding: 8px 0; font-size: 14px; color: var(--ink-700); align-items: flex-start; }
.watch-list li .wk { color: var(--rose-500); font-weight: 800; }

/* confidence disclaimer */
.disclaimer { font-size: 12.5px; color: var(--ink-400); line-height: 1.5; text-align: center; padding: 4px 8px; }

/* ----------------------------------------------------------- */
/* Chat                                                         */
/* ----------------------------------------------------------- */
.chat-wrap { display: flex; flex-direction: column; height: 100dvh; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 14px 16px 8px; -webkit-overflow-scrolling: touch; }
.bubble {
  max-width: 84%; padding: 12px 15px; border-radius: 20px; font-size: 14.5px; line-height: 1.5;
  margin-bottom: 10px; white-space: pre-wrap; word-wrap: break-word;
  animation: bubble-in .3s ease;
}
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.bubble.ai { background: #fff; color: var(--ink-900); box-shadow: var(--shadow-sm); border-bottom-left-radius: 6px; align-self: flex-start; margin-right: auto; }
.bubble.me { background: var(--grad-brand); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; margin-left: auto; }
.bubble.safety { background: #fff3f3; border: 1.5px solid #ffd0d0; color: #8a2020; }
.chat-row { display: flex; }

.quick-actions { display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px; -webkit-overflow-scrolling: touch; }
.quick-actions::-webkit-scrollbar { display: none; }
.qa {
  flex: 0 0 auto; white-space: nowrap;
  background: #fff; border: 1.5px solid var(--rose-100); color: var(--rose-600);
  border-radius: 99px; padding: 9px 14px; font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.qa:active { transform: scale(.94); }
.chat-input-bar {
  display: flex; gap: 9px; align-items: flex-end;
  padding: 10px 14px calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.chat-input-bar .input { border-radius: 22px; }
.chat-send {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; border: none;
  background: var(--grad-brand); color: #fff; font-size: 19px;
  box-shadow: 0 8px 18px rgba(247,88,126,.35);
}
.typing { display: inline-flex; gap: 4px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-300); animation: typing 1.2s infinite; }
.typing span:nth-child(2){ animation-delay: .2s; } .typing span:nth-child(3){ animation-delay: .4s; }
@keyframes typing { 0%,60%,100%{ transform: translateY(0); opacity:.4;} 30%{ transform: translateY(-5px); opacity:1;} }

/* ----------------------------------------------------------- */
/* Dashboard case cards                                         */
/* ----------------------------------------------------------- */
.case-card {
  display: block; width: 100%; text-align: left;
  background: var(--card); border: none;
  border-radius: var(--radius-lg); padding: 16px;
  box-shadow: var(--shadow-sm); margin-bottom: 14px;
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative; overflow: hidden;
}
.case-card:active { transform: scale(.985); box-shadow: var(--shadow-md); }
.case-top { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 48px; height: 48px; border-radius: 16px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 20px; font-weight: 800; color: #fff;
  background: var(--grad-brand);
}
.case-name { font-weight: 800; font-size: 17px; }
.case-sub { font-size: 12.5px; color: var(--ink-400); margin-top: 1px; }
.status-badge {
  font-size: 11.5px; font-weight: 800; padding: 5px 10px; border-radius: 99px;
  white-space: nowrap;
}
.status-early   { background: #eef1ff; color: #4b56b8; }
.status-unclear { background: #fff7e8; color: #a06a14; }
.status-promising { background: #eafaf3; color: #15795c; }
.status-risky   { background: #fff0ef; color: #c23b34; }
.status-moveon  { background: #f3eef5; color: #6b4a78; }

.case-scorebar { margin-top: 14px; }
.scorebar-track { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.scorebar-fill { height: 100%; border-radius: 99px; background: var(--grad-brand); }
.case-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.continue-link { font-size: 13.5px; font-weight: 800; color: var(--rose-600); display: inline-flex; align-items: center; gap: 4px; }

/* empty state */
.empty {
  text-align: center; padding: 50px 26px;
}
.empty .em-emoji { font-size: 54px; }
.empty h2 { margin: 16px 0 8px; font-size: 21px; }

/* ----------------------------------------------------------- */
/* Timeline                                                     */
/* ----------------------------------------------------------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: ""; position: absolute; left: -23px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--rose-400);
}
.tl-item.score-up::before { border-color: var(--mint-500); }
.tl-item.score-down::before { border-color: var(--red-500); }
.tl-when { font-size: 11.5px; color: var(--ink-400); font-weight: 600; }
.tl-title { font-weight: 700; font-size: 14.5px; margin-top: 2px; }
.tl-note { font-size: 13px; color: var(--ink-500); margin-top: 4px; line-height: 1.45; }
.tl-delta { font-size: 12px; font-weight: 800; margin-top: 6px; display: inline-block; padding: 3px 9px; border-radius: 99px; }
.tl-delta.up { background: #eafaf3; color: #15795c; }
.tl-delta.down { background: #fff0ef; color: #c23b34; }
.tl-delta.flat { background: var(--line); color: var(--ink-500); }

/* ----------------------------------------------------------- */
/* Premium                                                      */
/* ----------------------------------------------------------- */
.premium-hero {
  background: linear-gradient(135deg,#2a2233 0%, #4b3a6e 60%, #8b5cf6 130%);
  color: #fff; border-radius: var(--radius-xl); padding: 24px 20px;
  position: relative; overflow: hidden; margin-top: 4px;
}
.premium-hero h2 { font-size: 23px; }
.premium-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 15px; margin-bottom: 11px; position: relative;
}
.premium-card .pc-ico { font-size: 24px; width: 46px; height: 46px; border-radius: 14px; background: var(--grad-soft); display: grid; place-items: center; flex: 0 0 auto; }
.premium-card .pc-title { font-weight: 700; font-size: 15px; }
.premium-card .pc-sub { font-size: 12.5px; color: var(--ink-400); margin-top: 2px; }
.premium-card .lock-pill { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--violet-500); background: #f4f0ff; padding: 5px 10px; border-radius: 99px; flex: 0 0 auto; }

/* ----------------------------------------------------------- */
/* Message analyzer                                             */
/* ----------------------------------------------------------- */
.meter { margin-bottom: 14px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.meter-label { font-size: 13.5px; font-weight: 700; color: var(--ink-700); }
.meter-val { font-size: 12.5px; font-weight: 800; color: var(--rose-600); }
.meter-track { height: 9px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; transition: width .6s cubic-bezier(.22,.9,.27,1); }

.reply-tone {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px; margin-bottom: 11px; background: #fff;
}
.reply-tone .rt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.reply-tone .rt-tag { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--rose-50); color: var(--rose-600); }
.reply-tone .rt-text { font-size: 14px; color: var(--ink-700); line-height: 1.5; }
.reply-tone .rt-copy { margin-top: 10px; }

/* ----------------------------------------------------------- */
/* Transition / magic screen                                    */
/* ----------------------------------------------------------- */
.magic { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; position: relative; overflow: hidden; }
.magic .spark { font-size: 64px; animation: pop .6s cubic-bezier(.18,1.4,.4,1); }
@keyframes pop { 0%{ transform: scale(0); } 70%{ transform: scale(1.15);} 100%{ transform: scale(1);} }
.magic h1 { font-size: 26px; margin-top: 18px; max-width: 320px; }
.magic p { color: var(--ink-500); margin-top: 12px; max-width: 300px; }
.magic-actions { margin-top: 30px; width: 100%; max-width: 320px; display: grid; gap: 10px; }

/* analyzing loader */
.analyzing { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.brain { font-size: 60px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{ transform: scale(1); opacity: .9;} 50%{ transform: scale(1.12); opacity:1;} }
.analyze-steps { margin-top: 26px; width: 100%; max-width: 300px; text-align: left; }
.analyze-step { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--ink-400); font-size: 14px; font-weight: 600; transition: color .3s ease; }
.analyze-step.done { color: var(--mint-500); }
.analyze-step.active { color: var(--rose-600); }
.analyze-step .as-ico { width: 22px; text-align: center; }

/* misc */
.divider { height: 1px; background: var(--line); margin: 16px 0; border: none; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.spacer-sm { height: 12px; } .spacer { height: 20px; } .spacer-lg { height: 34px; }
.skip-row { text-align: center; margin-top: 16px; }
.skip-link { background: none; border: none; color: var(--ink-400); font-size: 14px; font-weight: 600; text-decoration: underline; }

.fade-in { animation: fade .5s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.q-block { animation: q-in .4s cubic-bezier(.22,.9,.27,1); }
@keyframes q-in { from { opacity: 0; transform: translateX(14px);} to { opacity: 1; transform: translateX(0);} }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px); transform: translateX(-50%);
  background: var(--ink-900); color: #fff; padding: 12px 18px; border-radius: 99px;
  font-size: 13.5px; font-weight: 600; z-index: 200; box-shadow: var(--shadow-lg);
  animation: toast-in .3s ease; max-width: 90%; text-align: center;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px);} to { opacity: 1; transform: translate(-50%,0);} }

/* safety banner */
.safety-banner {
  background: #fff3f3; border: 1.5px solid #ffc9c9; border-radius: var(--radius-md);
  padding: 16px; color: #8a2020; font-size: 14px; line-height: 1.5;
}
.safety-banner h3 { color: #b3261e; font-size: 16px; margin-bottom: 8px; }
.safety-banner ul { margin: 8px 0 0; padding-left: 18px; }
.safety-banner li { margin-bottom: 5px; }

/* When running inside the Telegram Mini App container */
.in-telegram .app-shell { box-shadow: none; }
.in-telegram body { background: var(--bg); }

.flow-tall { display: flex; flex-direction: column; min-height: 100dvh; }

@media (max-width: 360px) {
  .hero h1 { font-size: 31px; }
  .gauges { gap: 6px; }
  .ring { width: 70px; height: 70px; }
}

/* The sidebar only exists on desktop */
.sidebar { display: none; }

/* =========================================================== */
/* DESKTOP — true wide layout: persistent sidebar + multi-      */
/* column main area. Phones/tablets keep the mobile layout.     */
/* Disabled inside Telegram (it provides its own frame).        */
/* 900px so it still triggers under Windows display scaling.    */
/* =========================================================== */
@media (min-width: 900px) {
  html:not(.in-telegram) { --gutter: 40px; }

  html:not(.in-telegram) body { background: var(--bg); }

  html:not(.in-telegram) .app-shell {
    max-width: none; width: 100%;
    min-height: 100vh; box-shadow: none;
    display: flex; align-items: stretch; overflow: visible;
    background: var(--bg);
  }

  /* hide the mobile tab bar; the sidebar replaces it */
  html:not(.in-telegram) .tabbar { display: none; }

  /* ---------- Sidebar ---------- */
  html:not(.in-telegram) .sidebar {
    display: flex; flex-direction: column;
    flex: 0 0 272px; width: 272px;
    position: sticky; top: 0; align-self: flex-start;
    height: 100vh;
    padding: 28px 20px;
    background: linear-gradient(180deg, #fff 0%, #fff6f9 100%);
    border-right: 1px solid var(--line);
    z-index: 30;
  }
  .side-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 8px; }
  .side-brand .logo-badge { width: 40px; height: 40px; font-size: 22px; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 22px; }
  .side-item {
    display: flex; align-items: center; gap: 13px;
    width: 100%; text-align: left; border: none; background: transparent;
    padding: 12px 14px; border-radius: 14px;
    font-size: 14.5px; font-weight: 700; color: var(--ink-500);
    transition: background .15s ease, color .15s ease, transform .1s ease;
  }
  .side-item .si-ico { font-size: 18px; width: 22px; text-align: center; filter: grayscale(.4); }
  .side-item:hover { background: var(--rose-50); color: var(--ink-700); }
  .side-item.active { background: var(--grad-brand); color: #fff; box-shadow: 0 8px 18px rgba(247,88,126,.28); }
  .side-item.active .si-ico { filter: none; }
  .side-new { margin-top: 18px; }
  .side-foot { margin-top: auto; padding-top: 18px; }
  .side-foot .privacy-note { margin: 0; font-size: 11.5px; }

  /* ---------- Main area ---------- */
  html:not(.in-telegram) #screen {
    flex: 1; min-width: 0; min-height: 100vh;
    padding-bottom: 48px;
    animation: screen-in .4s cubic-bezier(.22,.9,.27,1);
  }
  html:not(.in-telegram) .screen.no-tabbar { padding-bottom: 48px; }
  html:not(.in-telegram) .flow-tall,
  html:not(.in-telegram) .magic,
  html:not(.in-telegram) .analyzing { min-height: 100vh; }
  html:not(.in-telegram) .chat-wrap { height: 100vh; }

  /* center most content in a comfortable column */
  html:not(.in-telegram) .screen > section > .pad:not(.cases-grid):not(.report-body),
  html:not(.in-telegram) .screen > section > .section,
  html:not(.in-telegram) .progress-wrap {
    max-width: 780px; margin-inline: auto;
  }
  /* page-header style top bars */
  html:not(.in-telegram) .topbar {
    position: static; background: transparent; backdrop-filter: none;
    max-width: 780px; margin-inline: auto; padding-top: 36px;
  }

  /* ----- Dashboard: multi-column card grid ----- */
  html:not(.in-telegram) .cases-grid {
    max-width: 1120px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px; align-items: start;
  }
  html:not(.in-telegram) .cases-grid .case-card { margin-bottom: 0; }
  html:not(.in-telegram) .cases-grid > .callout { grid-column: 1 / -1; }
  html:not(.in-telegram) .empty { max-width: 560px; margin-inline: auto; }

  /* ----- Report: full-bleed hero, then two-column body ----- */
  html:not(.in-telegram) .verdict-hero {
    border-radius: 0 0 36px 36px; padding-top: 40px;
  }
  html:not(.in-telegram) .verdict-hero > .eyebrow,
  html:not(.in-telegram) .verdict-hero > div,
  html:not(.in-telegram) .verdict-hero > .gauges,
  html:not(.in-telegram) .verdict-hero > .meta-grid {
    max-width: 720px; margin-inline: auto;
  }
  html:not(.in-telegram) .report-body {
    max-width: 1000px; margin-inline: auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start;
  }
  /* let key blocks span both columns */
  html:not(.in-telegram) .report-body > .callout,
  html:not(.in-telegram) .report-body > .disclaimer,
  html:not(.in-telegram) .report-body > .btn,
  html:not(.in-telegram) .report-body > .btn-row,
  html:not(.in-telegram) .report-body > .safety-banner,
  html:not(.in-telegram) .report-body > .spacer,
  html:not(.in-telegram) .report-body > .card.span2 { grid-column: 1 / -1; }
  html:not(.in-telegram) .report-body .card { margin-top: 0; }

  /* ----- Chat / analyzer / forms: comfortable centered width ----- */
  html:not(.in-telegram) .chat-wrap { max-width: 820px; margin-inline: auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  html:not(.in-telegram) .chat-input-bar { border-radius: 0; }

  /* hover affordances (desktop has a cursor) */
  html:not(.in-telegram) .case-card { cursor: pointer; }
  html:not(.in-telegram) .case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
  html:not(.in-telegram) .chip:hover,
  html:not(.in-telegram) .btn:hover { filter: brightness(1.02); }

  /* ---------- Landing: wide two-column hero (no sidebar) ---------- */
  html:not(.in-telegram) #app[data-route="landing"] .sidebar { display: none; }
  /* full-bleed, colorful gradient that fills the whole browser at any size
     (radial glows are placed by % so they scale with the window) */
  html:not(.in-telegram) #app[data-route="landing"] {
    background:
      radial-gradient(900px 650px at 12% 16%, #ffc9da 0%, rgba(255,201,218,0) 60%),
      radial-gradient(850px 620px at 88% 20%, #ddccff 0%, rgba(221,204,255,0) 60%),
      radial-gradient(950px 720px at 78% 94%, #ffd6bd 0%, rgba(255,214,189,0) 58%),
      linear-gradient(135deg, #fff2f6 0%, #f5efff 100%);
  }
  html:not(.in-telegram) #app[data-route="landing"] #screen { background: transparent; }
  /* the small clustered blobs are redundant against the full-bleed gradient */
  html:not(.in-telegram) .landing .blob { display: none; }
  html:not(.in-telegram) .landing {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    align-items: center;
    gap: 56px;
    width: 100%; max-width: 1180px; margin-inline: auto;
    min-height: 100vh;
    padding: 0 56px;
  }
  html:not(.in-telegram) .landing-left { padding: 0; }
  html:not(.in-telegram) .landing-right { display: flex; flex-direction: column; justify-content: center; padding: 0; }
  html:not(.in-telegram) .landing .brandmark { position: absolute; top: 34px; left: 56px; padding-top: 0; z-index: 2; }
  html:not(.in-telegram) .landing .hero { padding: 0; }
  html:not(.in-telegram) .landing .hero-emoji { margin-bottom: 24px; }
  html:not(.in-telegram) .landing .hero h1 { font-size: 52px; }
  html:not(.in-telegram) .landing .hero .tagline { font-size: 19px; max-width: 42ch; }
  html:not(.in-telegram) .landing .feature-pills { margin-top: 30px; }
  html:not(.in-telegram) .landing-cta {
    background: #fff; border: 1px solid var(--line); border-radius: 26px;
    padding: 26px; box-shadow: var(--shadow-lg);
  }
  html:not(.in-telegram) .landing-right .privacy-note {
    margin: 16px 0 0; max-width: none; background: transparent; border: none; padding: 4px;
  }
  html:not(.in-telegram) .landing .blob-2 { left: 30%; }
}

/* Very large screens */
@media (min-width: 1600px) {
  html:not(.in-telegram) .cases-grid { max-width: 1280px; }
}
