:root {
  color-scheme: dark;
  --bg: #0d0f0e;
  --header: #151917;
  --panel: #1b201d;
  --panel-2: #212724;
  --line: #2b322e;
  --ink: #eef2ef;
  --muted: #93a099;
  --green: #00c264;
  --green-dark: #00a653;
  --green-ink: #03210f;
  --red: #ff4d4f;
  --slip-bg: #ffffff;
  --slip-ink: #1c1f1d;
  --slip-muted: #6a726d;
  --slip-line: #e3e7e4;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--header);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 0.55rem 1rem;
}
.logo {
  font-size: 1.45rem; font-weight: 800; font-style: italic;
  letter-spacing: -0.04em; text-transform: lowercase;
}
.logo em { color: var(--green); font-style: italic; font-weight: 600; }
.search {
  flex: 0 1 22rem; display: flex; align-items: center; gap: 0.5rem;
  background: #0e1210; border: 1px solid var(--line); border-radius: 4px;
  padding: 0.45rem 0.65rem; color: var(--muted);
}
.search svg { width: 0.85rem; height: 0.85rem; flex: none; }
.search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  color: var(--ink); font-size: 0.85rem;
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.balance-pill {
  background: var(--green); color: var(--green-ink);
  font-weight: 700; border-radius: 4px; padding: 0.42rem 0.7rem;
  font-variant-numeric: tabular-nums;
}
.link-btn {
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 4px; padding: 0.42rem 0.8rem; font-weight: 600;
}
.link-btn.muted { background: transparent; color: var(--muted); }

.main-nav {
  display: flex; gap: 0.15rem; padding: 0 1rem;
  border-top: 1px solid var(--line);
}
.main-nav a {
  padding: 0.55rem 0.85rem; font-weight: 600; font-size: 0.92rem;
  color: var(--muted); border-bottom: 3px solid transparent;
}
.main-nav a.is-active { color: var(--ink); border-bottom-color: var(--green); }
.main-nav a.promo-link { color: var(--green); }

.sport-strip {
  display: flex; gap: 0.15rem; padding: 0.3rem 1rem 0.45rem;
  overflow-x: auto; scrollbar-width: none;
  border-top: 1px solid var(--line); background: #101413;
}
.sport-strip::-webkit-scrollbar { display: none; }
.sport-strip a {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.32rem 0.7rem; border-radius: 999px;
  color: var(--muted); font-size: 0.85rem; white-space: nowrap;
}
.sport-strip a.is-active { background: var(--panel-2); color: var(--ink); }
.s-icon { font-style: normal; font-size: 0.95rem; }

/* ---------- layout ---------- */
.page {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr) 19.5rem;
  gap: 0.7rem;
  padding: 0.7rem 1rem 2rem;
  max-width: 92rem;
  margin: 0 auto;
  align-items: start;
}

/* ---------- left nav ---------- */
.left-nav { display: grid; gap: 0.7rem; }
.nav-block {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 0.55rem 0.55rem 0.7rem;
}
.nav-block h3 {
  margin: 0.15rem 0.4rem 0.45rem; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.nav-block a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.4rem 0.45rem; border-radius: 4px; font-size: 0.88rem;
  color: #cfd6d1;
}
.nav-block a:hover { background: var(--panel-2); }
.nav-block a.is-active { background: var(--panel-2); color: var(--ink); font-weight: 600; }
.nav-block .count, .nav-block .tag { color: var(--muted); font-size: 0.78rem; }
.nav-block .tag { color: var(--green); }

/* ---------- content ---------- */
.content { display: grid; gap: 0.7rem; min-width: 0; }

.hero {
  border-radius: 6px; overflow: hidden;
  background:
    radial-gradient(ellipse at 85% 20%, rgba(0, 194, 100, 0.35), transparent 55%),
    linear-gradient(100deg, #0f2417 0%, #123a22 55%, #0d2f1b 100%);
  border: 1px solid #1d4a2e;
  padding: 1.3rem 1.4rem;
  position: relative;
}
.hero::after {
  content: "⚽";
  position: absolute; right: 2.2rem; top: 50%;
  transform: translateY(-50%) rotate(-12deg);
  font-size: 4.2rem; opacity: 0.5; filter: saturate(0.8);
}
.hero-kicker {
  margin: 0 0 0.3rem; color: var(--green);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.hero h2 { margin: 0; font-size: 1.55rem; letter-spacing: -0.01em; }
.hero-terms { margin: 0.45rem 0 0.9rem; color: #9fb3a6; font-size: 0.75rem; }
.hero-cta {
  border: 0; border-radius: 4px; background: var(--green); color: var(--green-ink);
  font-weight: 800; padding: 0.6rem 1.2rem; text-transform: uppercase; font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.coupon {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden;
}
.coupon-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.coupon-head h2 { margin: 0; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em; }
.live-head { background: #231d1d; }
.live-badge {
  display: inline-block; background: var(--red); color: #fff;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em;
  border-radius: 3px; padding: 0.12rem 0.35rem; margin-right: 0.4rem;
  vertical-align: 1px;
}
.more-link { color: var(--green); font-size: 0.8rem; font-weight: 600; }
.market-cols { display: none; gap: 0.35rem; color: var(--muted); font-size: 0.75rem; }
.market-cols.three { grid-template-columns: repeat(3, 3.6rem); }
.market-cols.two { grid-template-columns: repeat(2, 3.6rem); }
@media (min-width: 1100px) {
  .market-cols { display: grid; margin-right: 2.6rem; text-align: center; }
}

.fixture {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr) auto 2.4rem;
  gap: 0.7rem; align-items: center;
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.fixture:last-child { border-bottom: 0; }
.fixture:hover { background: #1e2421; }

.f-time { display: grid; gap: 0.1rem; color: var(--muted); font-size: 0.74rem; line-height: 1.25; }
.live-minute { color: var(--red); font-weight: 700; }
.f-score { color: var(--ink); font-weight: 700; font-size: 0.85rem; }

.f-teams { display: grid; gap: 0.22rem; min-width: 0; }
.f-teams p {
  margin: 0; display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crest {
  flex: none; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--c, #555); color: #fff;
  display: inline-grid; place-items: center;
  font-size: 0.52rem; font-weight: 800; font-style: normal; letter-spacing: 0.02em;
}

.f-odds { display: grid; gap: 0.35rem; }
.f-odds.three { grid-template-columns: repeat(3, 3.6rem); }
.f-odds.two { grid-template-columns: repeat(2, 3.6rem); }
.odd {
  border: 0; border-radius: 4px; background: #2a302d;
  padding: 0.32rem 0.2rem 0.38rem;
  display: grid; justify-items: center; gap: 0.05rem;
}
.odd span { color: var(--muted); font-size: 0.62rem; font-weight: 600; }
.odd strong { font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.odd:hover { background: #343b37; }
.odd.is-selected, .odd.is-open { background: var(--green); }
.odd.is-selected span, .odd.is-selected strong,
.odd.is-open span, .odd.is-open strong { color: var(--green-ink); }

.markets-link {
  color: var(--muted); font-size: 0.76rem; font-weight: 600; text-align: right;
}
.markets-link:hover { color: var(--green); }

/* ---------- right rail / bet slip ---------- */
.right-rail { display: grid; gap: 0.7rem; position: sticky; top: 8.6rem; }

.betslip {
  background: var(--slip-bg); color: var(--slip-ink);
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.slip-head { background: #101413; padding: 0; }
.slip-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.slip-tabs button {
  border: 0; background: transparent; color: var(--muted);
  padding: 0.65rem 0.4rem; font-weight: 700; font-size: 0.85rem;
  border-bottom: 3px solid transparent;
}
.slip-tabs button.is-active { color: #fff; border-bottom-color: var(--green); }
.slip-count {
  display: inline-grid; place-items: center;
  min-width: 1.1rem; height: 1.1rem; border-radius: 999px;
  background: var(--green); color: var(--green-ink);
  font-size: 0.66rem; font-weight: 800; padding: 0 0.25rem;
  vertical-align: 1px;
}

#slip-panel, #bets-panel { padding: 0.7rem; }
.empty-slip { margin: 0.6rem 0; text-align: center; color: var(--slip-muted); font-size: 0.88rem; line-height: 1.5; }
.empty-slip span { font-size: 0.78rem; }

#slip-lines { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.5rem; }
.slip-line {
  border: 1px solid var(--slip-line); border-radius: 5px;
  padding: 0.5rem 0.6rem; position: relative;
}
.slip-line .sl-selection { margin: 0; font-weight: 700; font-size: 0.9rem; }
.slip-line .sl-event { margin: 0.1rem 0 0; color: var(--slip-muted); font-size: 0.78rem; }
.slip-line .sl-price {
  position: absolute; top: 0.5rem; right: 1.9rem;
  color: var(--green-dark); font-weight: 800; font-size: 0.9rem;
}
.slip-line .sl-remove {
  position: absolute; top: 0.45rem; right: 0.45rem;
  border: 0; background: transparent; color: var(--slip-muted);
  font-size: 0.95rem; line-height: 1; padding: 0.1rem;
}

.stake-row { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; }
.stake-row label { font-size: 0.8rem; color: var(--slip-muted); font-weight: 600; }
.stake-box {
  display: flex; align-items: center; gap: 0.25rem;
  border: 1px solid var(--slip-line); border-radius: 4px; padding: 0.35rem 0.5rem;
  font-weight: 700;
}
.stake-box span { color: var(--slip-muted); }
.stake-box input {
  width: 4.5rem; border: 0; outline: none; text-align: right;
  font-weight: 700; color: var(--slip-ink); background: transparent;
}
.quick-stakes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.3rem; margin-top: 0.45rem; }
.quick-stakes button {
  border: 1px solid var(--slip-line); background: #f4f6f5; color: var(--slip-ink);
  border-radius: 4px; padding: 0.3rem 0; font-size: 0.78rem; font-weight: 600;
}
.quick-stakes button:hover { border-color: var(--green-dark); color: var(--green-dark); }

.slip-totals { margin: 0.65rem 0 0; display: grid; gap: 0.3rem; }
.slip-totals div { display: flex; justify-content: space-between; }
.slip-totals dt { color: var(--slip-muted); font-size: 0.82rem; }
.slip-totals dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }

.place {
  width: 100%; margin-top: 0.6rem; border: 0; border-radius: 4px;
  background: var(--green); color: var(--green-ink);
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.7rem; font-size: 0.9rem;
}
.place:hover { background: var(--green-dark); color: #fff; }
.placed-note { margin: 0.55rem 0 0; color: var(--slip-muted); font-size: 0.75rem; text-align: center; }

.open-bet {
  border: 1px solid var(--slip-line); border-radius: 5px; padding: 0.6rem 0.65rem;
}
.open-bet + .open-bet { margin-top: 0.5rem; }
.open-bet header { display: flex; justify-content: space-between; align-items: baseline; }
.open-kicker { color: var(--green-dark); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.open-id { color: var(--slip-muted); font-size: 0.7rem; }
.ob-event { margin: 0.3rem 0 0; font-weight: 700; font-size: 0.9rem; }
.ob-market { margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--slip-muted); }
.ob-market strong { color: var(--slip-ink); }
.ob-odds { font-style: normal; color: var(--green-dark); font-weight: 700; }
.open-bet dl { margin: 0.5rem 0 0; display: grid; gap: 0.2rem; }
.open-bet dl div { display: flex; justify-content: space-between; font-size: 0.82rem; }
.open-bet dt { color: var(--slip-muted); }
.open-bet dd { margin: 0; font-weight: 700; }
.cashout {
  width: 100%; margin-top: 0.55rem; border: 1px solid var(--green-dark);
  background: #e9f9f0; color: var(--green-dark);
  border-radius: 4px; padding: 0.5rem; font-weight: 700; font-size: 0.85rem;
  display: flex; justify-content: space-between;
}

.rail-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 0.75rem 0.85rem;
}
.rail-card h3 { margin: 0; font-size: 0.9rem; }
.rail-card p { margin: 0.3rem 0 0.45rem; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.rail-card a { color: var(--green); font-size: 0.82rem; font-weight: 700; }
.promo-card { border-color: #1d4a2e; background: linear-gradient(120deg, #12271a, var(--panel)); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.2rem 1rem 5rem;
  color: var(--muted); font-size: 0.72rem; text-align: center;
}

/* ---------- mobile ---------- */
.slip-launcher { display: none; }
@media (max-width: 1020px) {
  .page { grid-template-columns: minmax(0, 1fr); padding: 0.6rem 0.6rem 5rem; }
  .left-nav, .right-rail { display: none; }
  .right-rail.is-open {
    display: grid; position: fixed; left: 0.5rem; right: 0.5rem; bottom: 4.4rem;
    z-index: 25; max-height: 72vh; overflow: auto;
  }
  .fixture { grid-template-columns: 3.4rem minmax(0, 1fr); }
  .f-odds.three { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .f-odds.two { grid-column: 1 / -1; grid-template-columns: repeat(2, 1fr); }
  .markets-link { display: none; }
  .slip-launcher {
    display: block; position: fixed; left: 0.8rem; bottom: 1rem; z-index: 24;
    border: 0; border-radius: 999px; background: var(--green); color: var(--green-ink);
    font-weight: 800; padding: 0.75rem 1.1rem; box-shadow: 0 8px 20px rgba(0,0,0,0.45);
  }
  .search { display: none; }
}

/* ---------- chat widget ---------- */
.chat-widget { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; }
.chat-bubble {
  width: 3.4rem; height: 3.4rem; border: 0; border-radius: 50%;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--green-ink);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
  display: grid; place-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.chat-bubble::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(0, 194, 100, 0.55);
  animation: bubble-pulse 2.6s ease-out infinite;
  pointer-events: none;
}
.chat-bubble:hover { transform: scale(1.06); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6); }
.chat-bubble svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }
.chat-bubble.is-open { background: #fff; color: var(--slip-ink); }
.chat-bubble.is-open::before { animation: none; opacity: 0; }
@keyframes bubble-pulse {
  0% { transform: scale(0.9); opacity: 0.9; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

.chat-panel {
  position: absolute; right: 0; bottom: 4.1rem;
  width: min(26rem, calc(100vw - 1.6rem));
  height: min(37rem, calc(100vh - 6.5rem));
  min-width: 19rem; min-height: 24rem;
  max-width: calc(100vw - 1.6rem); max-height: calc(100vh - 5.2rem);
  display: flex; flex-direction: column;
  background: #fff; color: var(--slip-ink);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transform-origin: bottom right;
  animation: panel-in 0.18s ease-out;
}
.chat-resize {
  position: absolute; top: 0; left: 0; z-index: 5;
  width: 1.1rem; height: 1.1rem;
  cursor: nwse-resize;
  border-radius: 14px 0 0 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.35) 0 2px, transparent 2px 5px, rgba(255,255,255,0.35) 5px 7px, transparent 7px);
  background-size: 9px 9px;
  touch-action: none;
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 0.95rem;
  background: linear-gradient(120deg, #0f2417 0%, #123a22 60%, #0d2f1b 100%);
  color: #fff;
  border-bottom: 1px solid #1d4a2e;
}
.chat-id { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.chat-avatar {
  flex: none; width: 2.2rem; height: 2.2rem; border-radius: 10px;
  background: rgba(0, 194, 100, 0.16); border: 1px solid rgba(0, 194, 100, 0.45);
  color: var(--green); display: grid; place-items: center;
}
.chat-avatar svg { width: 1.25rem; height: 1.25rem; }
.chat-title { margin: 0; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em; }
.chat-sub, .status { margin: 0; color: #9fb3a6; font-size: 0.72rem; }
.chat-sub { display: flex; align-items: center; gap: 0.3rem; margin-top: 0.1rem; }
.presence {
  width: 0.45rem; height: 0.45rem; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 2px rgba(0, 194, 100, 0.25);
}
.icon-button, .text-button { border: 0; background: transparent; color: #9fb3a6; }
.icon-button {
  font-size: 1.35rem; line-height: 1; color: #fff; border-radius: 6px;
  padding: 0.15rem 0.4rem; transition: background 0.12s ease;
}
.icon-button:hover { background: rgba(255, 255, 255, 0.12); }

#transcript {
  flex: 1; list-style: none; margin: 0; padding: 0.9rem 0.8rem;
  overflow: auto; display: flex; flex-direction: column; gap: 0.55rem;
  background: #f4f6f5;
  scroll-behavior: smooth;
}
.bubble {
  max-width: 88%; padding: 0.55rem 0.75rem; border-radius: 14px;
  white-space: pre-wrap; word-break: break-word; line-height: 1.45; font-size: 0.88rem;
  box-shadow: 0 1px 2px rgba(16, 20, 19, 0.08);
  animation: bubble-in 0.16s ease-out;
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.bubble.player {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--green-ink); border-bottom-right-radius: 4px;
}
.bubble.form { align-self: flex-start; background: #fff; border: 1px solid var(--slip-line); border-bottom-left-radius: 4px; }
.bubble.error { align-self: flex-start; color: #b3261e; background: #fdf1f0; border: 1px solid #f3c1be; }
.bubble code {
  background: #ecefee; border-radius: 4px; padding: 0.05rem 0.3rem;
  font-size: 0.8rem; font-family: ui-monospace, "SF Mono", Consolas, monospace;
}
.bubble pre.code {
  margin: 0.45rem 0 0.1rem; padding: 0.55rem 0.65rem;
  background: #101413; color: #c9e8d6; border-radius: 8px;
  white-space: pre-wrap; word-break: break-word;
  font-size: 0.74rem; line-height: 1.5;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}
.bubble .md-p { margin: 0.18rem 0; }
.bubble .md-p:first-child { margin-top: 0; }
.bubble .md-p:last-child { margin-bottom: 0; }
.bubble .md-h { font-weight: 700; margin: 0.4rem 0 0.1rem; }
.bubble .md-h:first-child { margin-top: 0; }
.bubble .md-h1, .bubble .md-h2 { font-size: 0.98rem; }
.bubble .md-h3, .bubble .md-h4 { font-size: 0.9rem; }
.bubble .md-list { margin: 0.2rem 0; padding-left: 1.15rem; }
.bubble .md-list li { margin: 0.14rem 0; }
.bubble .md-list li::marker { color: var(--green-dark); font-weight: 700; }
.bubble a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 2px; }
.bubble strong { font-weight: 700; }

.typing { align-self: flex-start; display: flex; gap: 0.28rem; padding: 0.7rem 0.8rem; }
.typing i {
  width: 0.42rem; height: 0.42rem; border-radius: 50%; background: #9fb3a6;
  animation: typing-bounce 1.1s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.tools { align-self: stretch; display: grid; gap: 0.35rem; }
.tool {
  background: #fff; border: 1px solid var(--slip-line); border-left: 3px solid var(--green-dark);
  border-radius: 8px; padding: 0.4rem 0.55rem;
}
.tool summary {
  cursor: pointer; color: var(--slip-ink); font-size: 0.78rem; font-weight: 600;
  display: flex; align-items: center; gap: 0.4rem; list-style: none;
}
.tool summary::-webkit-details-marker { display: none; }
.tool summary::after {
  content: "▸"; margin-left: auto; color: var(--slip-muted);
  transition: transform 0.12s ease;
}
.tool[open] summary::after { transform: rotate(90deg); }
.tool-status { display: inline-grid; place-items: center; width: 0.95rem; height: 0.95rem; flex: none; }
.tool-status .spinner {
  width: 0.7rem; height: 0.7rem; border-radius: 50%;
  border: 2px solid #cfd6d1; border-top-color: var(--green-dark);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tool.is-done { border-left-color: var(--green-dark); }
.tool.is-done .tool-status { color: var(--green-dark); }
.tool.is-error { border-left-color: var(--red); }
.tool.is-error .tool-status { color: var(--red); }
.tool pre { margin: 0.35rem 0 0; white-space: pre-wrap; word-break: break-word; color: var(--slip-muted); font-size: 0.7rem; }
.guard-block {
  display: flex; align-items: center; gap: 0.4rem; margin: 0;
  background: #fdf1f0; border: 1px solid #f3c1be; border-radius: 6px;
  padding: 0.4rem 0.55rem;
  color: #b3261e; font-size: 0.74rem; font-weight: 700;
  animation: bubble-in 0.16s ease-out;
}
.guard-block svg { width: 0.85rem; height: 0.85rem; flex: none; }
.guard-block code { font-weight: 600; color: #8f1d17; background: #fbe3e1; border-radius: 3px; padding: 0 0.25rem; }

#composer { border-top: 1px solid var(--slip-line); padding: 0.65rem; background: #fff; }
.suggestions { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.5rem; }
.suggestion {
  text-align: left;
  border: 1px solid #cfd6d1; background: #fff; color: var(--slip-ink);
  border-radius: 999px; padding: 0.34rem 0.72rem; font-size: 0.78rem;
  transition: border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.suggestion:hover { border-color: var(--green-dark); color: var(--green-dark); box-shadow: 0 1px 4px rgba(0, 166, 83, 0.18); }
.compose-row { display: flex; gap: 0.45rem; align-items: flex-end; }
textarea {
  flex: 1; resize: none; min-height: 2.4rem;
  border: 1px solid var(--slip-line); border-radius: 10px;
  padding: 0.55rem 0.65rem; color: var(--slip-ink); background: #f9fbfa;
  font-size: 0.88rem;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
textarea:focus {
  outline: none; border-color: var(--green-dark); background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 166, 83, 0.15);
}
.send {
  border: 0; border-radius: 50%; width: 2.4rem; height: 2.4rem; flex: none;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--green-ink); font-weight: 800;
  display: grid; place-items: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.send:hover:not(:disabled) { transform: scale(1.07); box-shadow: 0 3px 10px rgba(0, 166, 83, 0.35); }
.compose-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.35rem; }
.text-button { color: var(--slip-muted); font-size: 0.78rem; padding: 0; border-radius: 4px; }
.text-button:hover:not(:disabled) { color: var(--green-dark); }
.status { color: var(--slip-muted); }
.send:disabled, .suggestion:disabled, .text-button:disabled { opacity: 0.55; }
