:root {
  --bg: #fff8f0;
  --ink: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --card: #ffffff;
  --coral: #ff2d55;
  --teal: #00a86b;
  --sun: #ffcc00;
  --wa: #25d366;
  --bubble: #fff;
  --user: #fff1f4;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:
    radial-gradient(ellipse at top, rgba(255, 204, 0, 0.22), transparent 48%),
    radial-gradient(ellipse at bottom right, rgba(255, 45, 85, 0.08), transparent 42%),
    var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.off { display: none !important; }
a { color: inherit; text-decoration: none; }

.topbar {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.brand {
  display: flex; align-items: center; gap: 10px; font-weight: 800;
}
.brand em {
  font-style: normal;
  color: var(--coral);
  margin-left: 2px;
}
.mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; color: #fff; font-size: 13px;
  background: var(--coral);
}
.links { display: flex; gap: 14px; font-size: 14px; font-weight: 600; color: var(--muted); }
.links .on, .links a:hover { color: var(--ink); }

.shell {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 120px;
  overflow-y: auto;
}

.welcome { text-align: center; padding: 28px 0 18px; }
.welcome h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 7vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.welcome h1 span { color: var(--coral); }
.sub {
  margin: 0 auto 18px;
  max-width: 540px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.chips {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.chips button {
  border: 1px solid #ffc4d0;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.chips button:hover { background: #fff1f4; }

.feed { display: grid; gap: 12px; }
.msg {
  display: grid;
  gap: 6px;
  max-width: 100%;
}
.msg.user { justify-items: end; }
.msg.bot { justify-items: start; }
.bubble {
  max-width: min(100%, 620px);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bubble);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
}
.msg.user .bubble {
  background: var(--user);
  border-color: #ffc4d0;
}
.msg.bot .bubble { background: #fff; }
.bubble .who {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.proof {
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
  max-width: min(100%, 620px);
}
.proof.win { border-color: #b7ebc8; background: #f0fdf6; }
.proof.loss { border-color: #f5d76e; background: #fffbeb; }
.proof b { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.proof strong { font-size: 18px; letter-spacing: -0.02em; }
.proof p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; font-weight: 600; }

.section-label {
  margin: 4px 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: min(100%, 620px);
}

.platforms, .list { display: grid; gap: 8px; max-width: min(100%, 620px); width: 100%; }
.plat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
}
.plat.best { border-color: #b7ebc8; background: #f0fdf6; }
.plat.t3 { border-color: #ffc4d0; }
.plat.t3.best { border-color: #b7ebc8; background: #f0fdf6; }
.plat .name { font-weight: 800; font-size: 14px; }
.plat .name small { display: block; margin-top: 2px; color: var(--muted); font-weight: 600; font-size: 11px; }
.plat .price { font-size: 17px; font-weight: 800; text-align: right; }
.plat .delta { font-size: 12px; font-weight: 700; color: var(--muted); grid-column: 2; text-align: right; }
.plat .delta.low { color: var(--teal); }
.plat .delta.up { color: var(--coral); }
.plat .cta {
  grid-column: 1 / -1;
  border: 0; border-radius: 10px; padding: 9px 12px;
  font-weight: 800; cursor: pointer; width: 100%;
  background: var(--ink); color: #fff;
}
.plat.t3 .cta, .plat.t3.best .cta { background: var(--coral); }
.plat.best:not(.t3) .cta { background: var(--teal); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.card.best { border-color: #f5d76e; background: #fffbeb; }
.air { font-weight: 800; font-size: 15px; }
.air small { display: block; margin-top: 2px; color: var(--muted); font-weight: 600; font-size: 12px; }
.times {
  margin-top: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-weight: 700;
}
.times .line {
  flex: 1; min-width: 40px; height: 2px; background: #e5e7eb; position: relative;
}
.times .line::after {
  content: attr(data-d);
  position: absolute; left: 50%; top: -14px; transform: translateX(-50%);
  font-size: 11px; color: var(--muted); white-space: nowrap; font-weight: 700;
}
.right { text-align: right; min-width: 110px; }
.price { font-size: 18px; font-weight: 800; }
.gap { font-size: 12px; font-weight: 700; margin-top: 2px; color: var(--muted); }
.gap.low { color: var(--teal); }
.gap.up { color: var(--coral); }
.book {
  margin-top: 8px; border: 0; border-radius: 10px; padding: 9px 12px;
  background: var(--coral); color: #fff; font-weight: 800; cursor: pointer; width: 100%;
}

.actions-row {
  display: flex; gap: 8px; flex-wrap: wrap; max-width: min(100%, 620px);
}
.wa, .ghost {
  height: 40px; border-radius: 12px; padding: 0 14px;
  font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0;
}
.wa { background: var(--wa); color: #fff; text-decoration: none; }
.ghost {
  background: #fff; border: 1px solid var(--line); color: var(--muted);
}

.notice {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
  max-width: min(100%, 620px);
}

.loading {
  margin-top: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 14px; display: flex; gap: 12px; align-items: center;
  max-width: min(100%, 620px);
}
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #ffe0e7; border-top-color: var(--coral);
  animation: spin 0.7s linear infinite;
}
.loading p { margin: 0; font-weight: 600; color: var(--muted); }

.composer {
  position: sticky;
  bottom: 0;
  width: 100%;
  padding: 10px 16px 16px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  flex-shrink: 0;
}
.composer-box {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 8px 8px 14px;
  box-shadow: 0 12px 40px rgba(17, 24, 39, 0.1);
}
.composer-box input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 15px;
  font-weight: 600;
  background: transparent;
  color: var(--ink);
  height: 40px;
}
.send {
  width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: var(--coral); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer;
}
.send:disabled { opacity: 0.5; cursor: wait; }
.composer-hint {
  max-width: 760px;
  margin: 8px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%);
  background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 14px;
  font-size: 13px; font-weight: 700; opacity: 0; transition: 0.2s; pointer-events: none;
  z-index: 20;
}
.toast.on { opacity: 1; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .card { grid-template-columns: 1fr; }
  .right { text-align: left; }
  .links a:nth-child(1) { display: none; }
  .welcome { padding-top: 12px; }
}
