
/* "Którą odpowiedź wolisz?": two drafts side by side, stacked on a phone */
.compare { margin-top: 6px; }
.compare-q { font-weight: 600; margin-bottom: 10px; }
.compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare-card { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--border);
                border-radius: 12px; padding: 12px 14px; min-width: 0; }
.compare-card .answer { flex: 1; }
.compare-pick { align-self: flex-start; border: 1px solid var(--border2); border-radius: 8px; padding: 6px 12px;
                background: none; }
.compare-pick:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) { .compare-row { grid-template-columns: 1fr; } }
/* about page (/o-projekcie): the CSP allows no inline styles */
.about { max-width: 720px; margin: 0 auto; padding: 22px 16px 60px; line-height: 1.6; }
.about header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.about h1 { font-size: 32px; line-height: 1.2; margin: 0 0 14px; }
.about .lead { font-size: 17px; color: var(--muted); margin: 0 0 34px; }
.about section { background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
                   padding: 18px 22px; margin-bottom: 14px; }
.about h2 { font-size: 17px; margin: 0 0 8px; color: var(--accent); }
.about p { margin: 0 0 8px; }
.about ul { margin: 6px 0 0; padding-left: 20px; }
.about li { margin-bottom: 4px; }
.about a { color: var(--accent); }
@media (max-width: 560px) { .about h1 { font-size: 26px; } }
.about .home { text-decoration: none; color: inherit; }
.about .lead b { color: var(--text); }
.land-top.with-link { display: flex; justify-content: space-between; align-items: center; }
.disclaimer a { color: inherit; }
:root {
  color-scheme: dark;
  --bg: #08090c; --panel: #101216; --panel2: #0b0d10; --border: #1e2128; --border2: #2a2e37;
  --text: #eceef2; --muted: #878d99; --accent: #c9a227; --accent-soft: #c9a2271f;
  --user: #1a1d23; --danger: #e5484d; --ok: #3fb37f;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 15px;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.logo { width: 28px; height: 28px; color: var(--accent); flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.wordmark { font-size: 17px; font-weight: 700; }
.wordmark b { color: var(--accent); font-weight: 700; }
.badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid var(--border2); color: var(--muted); border-radius: 6px; padding: 2px 6px; flex-shrink: 0;
}
.badge.pro { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.primary {
  background: var(--accent); color: #14150f; border: none; border-radius: 10px;
  padding: 11px 18px; font-weight: 700;
}
.primary:hover:not(:disabled) { filter: brightness(1.12); }
.primary:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }
.secondary, .danger {
  background: var(--panel); border: 1px solid var(--border2); border-radius: 9px; padding: 9px 14px;
}
.secondary:hover { border-color: var(--accent); }
.danger { color: var(--danger); }
.danger:hover { border-color: var(--danger); }
.ghost { background: none; border: none; color: var(--muted); font-size: 20px; padding: 4px 8px; border-radius: 8px; }
.ghost:hover { color: var(--text); background: var(--panel); }
.error { color: var(--danger); font-size: 13px; line-height: 1.45; }
.error.ok { color: var(--ok); }
.note { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.note.warn { color: #e0b64a; }
input[type=email], input[type=password] {
  width: 100%; background: var(--panel2); border: 1px solid var(--border2); border-radius: 9px;
  padding: 11px 12px; outline: none;
}
input:focus { border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input:focus-visible { outline: none; }

#landing { height: 100%; overflow-y: auto; padding: 0 16px 48px; }
.land-top { max-width: 1040px; margin: 0 auto; padding: 22px 0; }
.land-grid {
  max-width: 1040px; margin: 40px auto 0; display: grid; grid-template-columns: 1.25fr 1fr;
  gap: 48px; align-items: center;
}
.hero h1 { font-size: 40px; line-height: 1.12; margin: 0 0 16px; font-weight: 700; }
.hero p { color: var(--muted); font-size: 16px; line-height: 1.65; margin: 0; max-width: 520px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.auth { display: flex; flex-direction: column; gap: 13px; }
.auth label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.google {
  display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f;
  border-radius: 10px; padding: 10px 14px; font-weight: 600; text-decoration: none;
}
.google svg { width: 18px; height: 18px; }
.google.off { background: var(--panel2); color: var(--muted); border: 1px solid var(--border2); cursor: not-allowed; }
.google.off svg { filter: grayscale(1); opacity: .6; }
.google.off:hover { box-shadow: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border2); }
.tabs { display: flex; gap: 4px; background: var(--panel2); border-radius: 10px; padding: 4px; }
.tab { flex: 1; background: none; border: none; border-radius: 7px; padding: 8px; color: var(--muted); font-size: 14px; }
.tab.on { background: var(--panel); color: var(--text); font-weight: 600; }
.land-plans { max-width: 1040px; margin: 64px auto 0; }
.land-plans h2 { margin: 0 0 6px; font-size: 22px; }
.land-plans > p { margin: 0 0 18px; font-size: 14px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; }
.plan.pro { border-color: var(--accent); }
.plan-name { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 16px; }
.plan-price { font-size: 22px; font-weight: 700; margin: 8px 0 12px; }
.plan ul { list-style: none; margin: 0 0 14px; padding: 0; font-size: 13.5px; line-height: 1.5; flex: 1; }
.plan li { padding: 3px 0 3px 18px; position: relative; color: #c5c9d1; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.plan button { width: 100%; }

#app { display: flex; height: 100dvh; }
#side {
  width: 272px; flex-shrink: 0; background: var(--panel2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 14px 12px; height: 100dvh;
}
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 12px; }
.close-side { display: none; }
.new-chat {
  background: var(--panel); border: 1px solid var(--border2); border-radius: 10px; padding: 10px 12px;
  text-align: left; font-weight: 600;
}
.new-chat:hover { border-color: var(--accent); }
.conv-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 8px 6px; font-weight: 600; }
#convs { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.conv { display: flex; align-items: center; border-radius: 8px; }
.conv:hover, .conv.on { background: var(--panel); }
.conv-open {
  flex: 1; min-width: 0; background: none; border: none; text-align: left; padding: 8px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; color: #c5c9d1;
}
.conv.on .conv-open { color: var(--text); }
.conv-del { background: none; border: none; color: var(--muted); padding: 4px 9px; font-size: 16px; opacity: 0; }
.conv:hover .conv-del, .conv-del:focus-visible { opacity: 1; }
.conv-del:hover { color: var(--danger); }
.empty-convs { color: var(--muted); font-size: 13px; padding: 6px 10px; }
.account {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  text-align: left; margin-top: 10px; display: flex; flex-direction: column; gap: 7px;
}
.account:hover { border-color: var(--border2); }
.acc-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.acc-mail { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-use { font-size: 11.5px; color: var(--muted); }
.mini-meter, .meter { display: block; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.mini-meter i, .meter i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .25s; }
.mini-meter i.full, .meter i.full { background: var(--danger); }
#scrim { display: none; }

main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100dvh; }
header {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-bottom: 1px solid var(--border);
  background: var(--panel2); flex-shrink: 0; min-height: 52px;
}
.side-btn { display: none; }
.title { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-pill { font-size: 11.5px; color: var(--muted); border: 1px solid var(--border); border-radius: 20px; padding: 4px 10px; white-space: nowrap; }
#scroll { flex: 1; overflow-y: auto; padding: 22px 16px; -webkit-overflow-scrolling: touch; }
#thread { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; min-height: 100%; }
.msg { line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.user {
  align-self: flex-end; max-width: 85%; background: var(--user); border: 1px solid var(--border);
  border-radius: 14px; border-bottom-right-radius: 4px; padding: 10px 14px;
}
.msg.assistant { align-self: stretch; padding: 2px 2px 2px 14px; border-left: 2px solid var(--accent); }
.msg.failed { border-left-color: var(--danger); color: var(--danger); }
.msg pre {
  background: var(--panel2); border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px;
  overflow-x: auto; white-space: pre; margin: 8px 0; font-size: 13.5px;
}
.msg code { font-family: Consolas, "Cascadia Code", Menlo, monospace; }
.stats { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; }
.welcome { margin: auto; text-align: center; padding: 20px 8px; max-width: 560px; }
.welcome .logo { width: 44px; height: 44px; opacity: .85; }
.welcome h2 { font-size: 24px; font-weight: 600; margin: 14px 0 20px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips button {
  background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 9px 14px; font-size: 13.5px;
}
.chips button:hover { border-color: var(--accent); background: var(--accent-soft); }
#composer { padding: 0 16px max(10px, env(safe-area-inset-bottom)); flex-shrink: 0; width: 100%; max-width: 812px; margin: 0 auto; }
.banner {
  background: var(--accent-soft); border: 1px solid #c9a22755; color: #e6c964; border-radius: 10px;
  font-size: 13.5px; padding: 9px 12px; margin-bottom: 8px; line-height: 1.45;
}
.banner button { background: none; border: none; color: var(--accent); text-decoration: underline; padding: 0; font-weight: 600; }
.box { background: var(--panel); border: 1px solid var(--border2); border-radius: 14px; padding: 10px 10px 8px 14px; }
.box:focus-within { border-color: var(--accent); }
#input {
  width: 100%; resize: none; background: none; border: none; outline: none; line-height: 1.45;
  max-height: 160px; font-size: 16px; display: block;
}
#input::placeholder { color: #5b616b; }
.box-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.count { flex: 1; text-align: right; font-size: 11.5px; color: var(--muted); }
.send { padding: 7px 16px; font-size: 14px; }
.send.stop { background: var(--panel2); color: var(--text); border: 1px solid var(--border2); }
.disclaimer { text-align: center; font-size: 11.5px; color: var(--muted); padding-top: 7px; }

dialog {
  background: var(--panel2); color: var(--text); border: 1px solid var(--border2); border-radius: 14px;
  padding: 20px; width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto;
}
dialog::backdrop { background: rgba(0, 0, 0, .6); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg-head h2 { margin: 0; font-size: 18px; }
.dlg-mail { color: var(--muted); font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; }
dialog h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 0 9px; font-weight: 600; }
.meter-row { margin-bottom: 13px; }
.meter-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.meter-top span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.meter-sub { font-size: 12px; color: var(--muted); margin-top: 5px; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.inline:first-of-type { margin-top: 0; }
.inline input { flex: 1; min-width: 150px; }
.dlg-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 22px; }
.dlg-links { display: flex; gap: 8px; flex-wrap: wrap; }
a.secondary { color: var(--text); text-decoration: none; font-size: 14px; }

.rate { display: flex; align-items: center; gap: 4px; margin-top: 6px; white-space: normal; }
.rate-btn {
  background: none; border: 1px solid transparent; border-radius: 7px; padding: 2px 7px;
  font-size: 14px; line-height: 1.4; filter: grayscale(1); opacity: .65;
}
.rate-btn:hover { background: var(--panel); opacity: 1; }
.rate-btn.on { filter: none; opacity: 1; border-color: var(--accent); background: var(--accent-soft); }
.rate-link { background: none; border: none; color: var(--muted); font-size: 12.5px; padding: 3px 7px; border-radius: 7px; }
.rate-link:hover { color: var(--text); background: var(--panel); }
.rate-link.on { color: var(--danger); }
.rate-form { display: flex; gap: 6px; margin-top: 6px; max-width: 520px; white-space: normal; }
.rate-form input {
  flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--border2); border-radius: 8px;
  padding: 7px 10px; outline: none; font-size: 13.5px;
}
.rate-form button { font-size: 13px; padding: 6px 11px; }
.rate-saved { font-size: 12px; color: var(--muted); }

.adm-top {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px;
  border-bottom: 1px solid var(--border); background: var(--panel2);
}
.adm-tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.adm-tabs button { background: none; border: none; color: var(--muted); padding: 7px 12px; border-radius: 8px; font-size: 14px; }
.adm-tabs button:hover { color: var(--text); }
.adm-tabs button.on { background: var(--panel); color: var(--text); font-weight: 600; }
.adm-back { color: var(--muted); font-size: 13.5px; }
.adm-main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
.adm-main h1 { font-size: 20px; margin: 0 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.tile { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; }
.tile b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 12.5px; }
.adm-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.adm-bar input[type=search], .adm-bar select, .adm-table select, .adm-table input {
  background: var(--panel2); border: 1px solid var(--border2); border-radius: 8px; padding: 8px 10px; outline: none;
}
.adm-bar input[type=search] { flex: 1; min-width: 200px; }
.adm-bar input:focus { border-color: var(--accent); }
.adm-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-table th {
  text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 600; padding: 9px 11px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.adm-table td { padding: 9px 11px; border-bottom: 1px solid var(--border); vertical-align: top; }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table td.num { font-variant-numeric: tabular-nums; text-align: right; }
.adm-table tr.click { cursor: pointer; }
.adm-table tr.click:hover td { background: var(--panel); }
.adm-table .days { width: 72px; }
.adm-plan { display: flex; gap: 6px; align-items: center; }
.adm-plan button { font-size: 13px; padding: 6px 10px; }
.fb { background: var(--panel); border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; margin-bottom: 9px; cursor: pointer; }
.fb:hover { border-color: var(--border2); }
.fb-head { display: flex; gap: 10px; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; flex-wrap: wrap; }
.fb-q { font-weight: 600; margin-bottom: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-a { color: #c5c9d1; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-c { color: #e6c964; margin-top: 6px; font-size: 13.5px; overflow-wrap: anywhere; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.logbox {
  background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 12px;
  font-family: Consolas, "Cascadia Code", Menlo, monospace; font-size: 12.5px; line-height: 1.5;
  overflow: auto; max-height: 70dvh; white-space: pre; margin: 0;
}
.adm-note { color: var(--muted); font-size: 13px; margin: 0 0 12px; line-height: 1.5; }
#conv-view { width: min(760px, calc(100vw - 32px)); }
#conv-view .msg { margin-bottom: 10px; }
.msg-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; white-space: normal; }

@media (max-width: 820px) {
  .land-grid { grid-template-columns: 1fr; gap: 26px; margin-top: 12px; }
  .hero h1 { font-size: 30px; }
  .land-plans { margin-top: 40px; }
  #side {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(84vw, 300px); z-index: 30;
    transform: translateX(-105%); transition: transform .2s ease; box-shadow: 8px 0 32px rgba(0, 0, 0, .5);
  }
  body.side-open #side { transform: translateX(0); }
  body.side-open #scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 20; }
  .close-side, .side-btn { display: block; }
  header { padding: 8px 12px; }
  .model-pill { display: none; }
  .conv-del { opacity: 1; }
}
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } }

/* --- motion ------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.97); } }
@keyframes bump { 40% { transform: scale(1.3); } }
@keyframes draw { from { stroke-dashoffset: 60; } }
@keyframes drift { 50% { transform: translate(6%, 4%) scale(1.12); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(.72); opacity: .7; } }
@keyframes shimmer { from { background-position: 180% 0; } to { background-position: -80% 0; } }
@keyframes caret { 50% { opacity: 0; } }

button { transition: transform .12s ease, background-color .15s, border-color .15s, color .15s, filter .15s; }
button:active:not(:disabled) { transform: scale(.97); }
.google { transition: transform .12s ease, box-shadow .2s; }
.google:hover { box-shadow: 0 0 0 3px #ffffff26; }
.google:active { transform: scale(.98); }

#landing { position: relative; isolation: isolate; }
#landing::before {
  content: ""; position: fixed; z-index: -1; top: -30%; left: -15%; width: 75vw; height: 75vw; pointer-events: none;
  background: radial-gradient(closest-side, #c9a2271c, transparent); animation: drift 16s ease-in-out infinite;
}
.hero h1, .hero p, .auth, .land-plans { animation: rise .55s ease both; }
.hero p { animation-delay: .08s; }
.auth { animation-delay: .14s; }
.land-plans { animation-delay: .24s; }
.plan { transition: transform .18s ease, border-color .18s; }
.plan:hover { transform: translateY(-3px); }

.msg { animation: rise .28s ease both; }
.welcome > .logo path { stroke-dasharray: 60; animation: draw 1s ease-out both; }
.welcome > .logo, .welcome h2 { animation: rise .45s ease both; }
.welcome h2 { animation-delay: .06s; }
.chips button { animation: rise .4s ease both; }
.chips button:nth-child(1) { animation-delay: .1s; }
.chips button:nth-child(2) { animation-delay: .15s; }
.chips button:nth-child(3) { animation-delay: .2s; }
.chips button:nth-child(4) { animation-delay: .25s; }
.chips button:nth-child(5) { animation-delay: .3s; }
.chips button:nth-child(6) { animation-delay: .35s; }
.chips button:nth-child(7) { animation-delay: .4s; }
.chips button:nth-child(8) { animation-delay: .45s; }
.chips button:hover { transform: translateY(-2px); }
.more-chips { background: none; border: none; color: var(--muted); font-size: 13px; margin-top: 12px; padding: 6px 10px; border-radius: 8px; }
.more-chips:hover { color: var(--text); background: var(--panel); }
.banner { animation: rise .25s ease both; }
dialog[open] { animation: pop-in .2s ease both; }
dialog[open]::backdrop { animation: fade .2s ease both; }
.rate { animation: fade .3s ease both; }
.rate-btn.on { animation: bump .28s ease; }
.rate-saved.pop { animation: rise .25s ease both; }
.rate-form { animation: rise .2s ease both; }

.spark {
  display: inline-block; width: 16px; height: 16px; flex-shrink: 0; background: var(--accent);
  clip-path: polygon(50% 0, 60% 38%, 100% 50%, 60% 62%, 50% 100%, 40% 62%, 0 50%, 40% 38%);
}
.spark.live { animation: spin 2.6s linear infinite, breathe 1.3s ease-in-out infinite; }
.shimmer {
  background: linear-gradient(90deg, var(--muted) 35%, #f1dc8f 50%, var(--muted) 65%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.8s linear infinite;
}
.working { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; }
.answer.streaming::after {
  content: ""; display: inline-block; width: 8px; height: 1.05em; margin-left: 2px; vertical-align: text-bottom;
  background: var(--accent); border-radius: 2px; animation: caret .9s steps(1) infinite;
}

.think-block { margin-bottom: 8px; white-space: normal; }
.think-head {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: none; padding: 3px 8px 3px 0;
  font-size: 13.5px; color: var(--muted); border-radius: 7px;
}
.think-head:hover { color: var(--text); }
.chev { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .2s ease; }
.think-block.open .chev { transform: rotate(45deg); }
.think-fold { display: none; }
.think-block.open .think-fold { display: block; animation: rise .2s ease both; }
.draft { border-left: 2px solid var(--border2); padding: 3px 0 3px 11px; margin-top: 8px; animation: rise .25s ease both; transition: border-color .25s, opacity .25s; }
.draft.chosen { border-left-color: var(--accent); }
.think-block.settled .draft:not(.chosen) { opacity: .55; }
.draft-title { display: flex; gap: 8px; align-items: center; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.draft-text { font-size: 13.5px; color: #b3b8c2; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }

.picker { position: relative; }
.model-btn { background: none; border: none; border-radius: 8px; padding: 6px 9px; font-size: 13px; white-space: nowrap; }
.model-btn:hover, .model-btn[aria-expanded=true] { background: var(--panel2); }
.dim { color: var(--muted); }
.menu, .submenu {
  position: absolute; z-index: 15; background: var(--panel2); border: 1px solid var(--border2); border-radius: 12px;
  padding: 5px; box-shadow: 0 12px 34px rgba(0, 0, 0, .5); animation: pop-in .15s ease both;
}
.menu { bottom: calc(100% + 8px); right: 0; width: 250px; }
.submenu { bottom: 0; right: calc(100% + 6px); width: 300px; }
.menu-row {
  display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: none; border-radius: 8px;
  padding: 7px 9px; text-align: left; font-size: 13.5px; position: relative;
}
.menu-row:hover:not(:disabled), .menu-row.open { background: var(--panel); }
.menu-row:disabled { cursor: not-allowed; opacity: .55; }
.menu-row .name { flex: 1; min-width: 0; }
.menu-row .val { color: var(--muted); font-size: 12.5px; }
.menu-row small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 1px; }
.menu-row .tick { color: var(--accent); font-weight: 700; }
.menu-row .next { width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-top: 1.5px solid var(--muted); transform: rotate(45deg); }
.menu-line { height: 1px; background: var(--border); margin: 5px 4px; }
.menu-note { color: var(--muted); font-size: 12px; line-height: 1.4; padding: 6px 9px 7px; }
.badge.warn { color: #e0b64a; border-color: #e0b64a66; }

@media (max-width: 820px) {
  .submenu { position: static; width: auto; box-shadow: none; margin: 4px 0; animation: none; }
  .menu { width: min(300px, calc(100vw - 48px)); max-height: 70dvh; overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    animation-delay: 0s !important; transition-duration: .01ms !important;
  }
}
