/* ════════════════════════════════════════════
   SUPERNOVA — chat interface
   Builds on /css/swiftaw.css + /supernova/sn.css (brand tokens).
   Fortized-inspired message rows; Lifecheck-docs code cards + tables.
════════════════════════════════════════════ */

html, body { height: 100%; }
body.sn-chat-body { overflow: hidden; background: #0d1117; }
body.sn-chat-body::before { display: none; } /* drop the site grain in the app */
/* the shared account script injects a floating top-right chip; the chat has its own in the sidebar footer */
#swiftaw-acct { display: none !important; }

/* ─── access gate (Swiftaw account only) ─── */
.sn-gate {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(circle at 50% 0%, #141b28, var(--bg) 60%);
}
.sn-gate.on { display: flex; }
.sn-gate-card {
  width: 100%; max-width: 420px; text-align: center;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1.5px solid var(--border); border-radius: 26px;
  box-shadow: 0 12px 0 0 var(--ink), 0 34px 70px rgba(0,0,0,.55);
  padding: 40px 34px;
}
.sn-gate-card img.mark { width: 62px; height: 62px; border-radius: 16px; margin: 0 auto 18px; box-shadow: 0 0 0 1px var(--border); }
.sn-gate-card h1 { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -1px; margin-bottom: 8px; }
.sn-gate-card p { font-size: 14.5px; color: var(--muted-light); line-height: 1.55; margin-bottom: 22px; }
.sn-gate-card .g-btns { display: flex; flex-direction: column; gap: 10px; }
.sn-gate-card a.g-primary {
  font-family: var(--font-display); font-weight: 700; font-size: 14.5px; color: #0d1117;
  background: linear-gradient(120deg, var(--sn-blue), var(--sn-pink) 62%, var(--sn-green));
  border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 6px 0 0 var(--ink);
  padding: 13px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: transform .12s;
}
.sn-gate-card a.g-primary:hover { transform: translateY(-2px); }
.sn-gate-card a.g-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 0 var(--ink); }
.sn-gate-card a.g-ghost { font-size: 13px; color: var(--muted-light); font-weight: 600; padding: 8px; }
.sn-gate-card a.g-ghost:hover { color: #fff; }

/* ─── app shell ─── */
.sn-app { display: none; height: 100dvh; }
.sn-app.on { display: grid; grid-template-columns: 288px 1fr; grid-template-rows: 100dvh; }
body.side-collapsed .sn-app.on { grid-template-columns: 0 1fr; }

/* icons */
.ic { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.ic-sm { width: 13px; height: 13px; fill: currentColor; }

/* ═══ SIDEBAR ═══ */
.side {
  background: #0d1117; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
}
body.side-collapsed .side { border-right: 0; }
.side-head { padding: 14px 14px 10px; display: flex; align-items: center; gap: 8px; }
.side-brand { display: flex; align-items: center; gap: 9px; margin-right: auto; min-width: 0; }
.side-brand img { height: 22px; width: auto; }
.side-brand .chip { font-family: var(--font-display); font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sn-blue); background: rgba(var(--sn-blue-rgb),.12); border: 1px solid rgba(var(--sn-blue-rgb),.3); padding: 2px 6px; border-radius: 100px; }
.side-icobtn {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: var(--muted-light); background: transparent; border: 1px solid transparent; transition: .15s;
}
.side-icobtn:hover { color: #fff; background: rgba(255,255,255,.06); }

.side-new {
  margin: 4px 14px 12px; padding: 11px 14px; border-radius: 13px;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; color: #0d1117;
  background: linear-gradient(120deg, var(--sn-blue), var(--sn-pink));
  border: 1.5px solid var(--ink); box-shadow: 0 4px 0 0 var(--ink); transition: transform .12s, filter .15s;
}
.side-new:hover { transform: translateY(-1px); filter: brightness(1.05); }
.side-new:active { transform: translateY(3px); box-shadow: 0 1px 0 0 var(--ink); }
.side-new .ic { fill: #0d1117; }

.side-search { margin: 0 14px 10px; position: relative; }
.side-search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; fill: var(--muted); pointer-events: none; }
.side-search input {
  width: 100%; padding: 9px 12px 9px 34px; border-radius: 11px;
  background: var(--panel); border: 1.5px solid var(--border); color: #fff; font-size: 13.5px;
  outline: none; transition: border-color .15s;
}
.side-search input:focus { border-color: rgba(var(--sn-blue-rgb),.5); }
.side-search input::placeholder { color: var(--muted); }

.side-scroll { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.side-sec-h { font-family: var(--font-display); font-weight: 800; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 6px; display: flex; align-items: center; gap: 7px; }
.side-sec-h .ic-sm { fill: var(--muted); }
.side-empty { font-size: 12.5px; color: var(--muted); padding: 6px 8px 10px; }

.thread {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px;
  cursor: pointer; color: var(--muted-light); position: relative; transition: background .12s, color .12s;
}
.thread:hover { background: rgba(255,255,255,.05); color: #fff; }
.thread.active { background: rgba(var(--sn-blue-rgb),.12); color: #fff; }
.thread.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--sn-blue); }
.thread .pinico { width: 12px; height: 12px; fill: var(--sn-pink); flex-shrink: 0; }
.thread .t-title { flex: 1; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .t-menu { opacity: 0; width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted-light); flex-shrink: 0; }
.thread:hover .t-menu, .thread.active .t-menu { opacity: 1; }
.thread .t-menu:hover { background: rgba(255,255,255,.1); color: #fff; }
.thread .t-rename { flex: 1; background: var(--bg); border: 1.5px solid rgba(var(--sn-blue-rgb),.5); border-radius: 7px; color: #fff; font-size: 13.5px; padding: 4px 8px; outline: none; }

/* thread context menu */
.ctx-menu {
  position: fixed; z-index: 120; min-width: 168px; padding: 6px;
  background: var(--panel); border: 1.5px solid var(--border-strong); border-radius: 13px;
  box-shadow: 0 14px 34px rgba(0,0,0,.55); display: none;
}
.ctx-menu.on { display: block; }
.ctx-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text); font-size: 13.5px; text-align: left; }
.ctx-menu button:hover { background: rgba(255,255,255,.07); color: #fff; }
.ctx-menu button.danger { color: #ff9a9a; } .ctx-menu button.danger:hover { background: rgba(253,2,53,.12); }
.ctx-menu .ic-sm { fill: currentColor; }

.side-foot { border-top: 1px solid var(--border); padding: 8px; }
.side-foot .acct-trigger { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; transition: background .12s; }
.side-foot .acct-trigger:hover { background: rgba(255,255,255,.05); }
.side-foot .acct-trigger .cv { margin-left: auto; width: 12px; height: 12px; fill: var(--muted); transition: transform .2s; }
body.acct-open .side-foot .acct-trigger .cv { transform: rotate(180deg); }
.side-foot .av { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; background: var(--panel); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 15px; flex-shrink: 0; }
.side-foot .who { min-width: 0; margin-right: auto; }
.side-foot .who .n { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who .e { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ═══ MAIN ═══ */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: #0d1117; }
.topbar { height: 56px; flex-shrink: 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.topbar .t-toggle { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--muted-light); }
.topbar .t-toggle[hidden] { display: none; }
.topbar .t-toggle:hover { color: #fff; background: rgba(255,255,255,.06); }
.topbar .t-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; margin-right: auto; }
.model-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 100px; background: var(--panel); border: 1px solid var(--border); font-size: 11.5px; color: var(--muted-light); flex-shrink: 0; }
.model-badge .d { width: 7px; height: 7px; border-radius: 50%; background: var(--sn-green); box-shadow: 0 0 8px var(--sn-green); }
.model-badge b { color: #fff; font-family: var(--font-display); font-weight: 700; }
.model-badge .lat { color: var(--muted); }

/* stream */
.stream { flex: 1; min-height: 0; overflow-y: auto; }
.stream-inner { max-width: 780px; margin: 0 auto; padding: 24px 20px 8px; }

/* system / error banners */
.banner { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; border-radius: 14px; margin-bottom: 16px; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.banner .ic { margin-top: 1px; }
.banner .x { margin-left: auto; color: var(--muted-light); cursor: pointer; }
.banner .x:hover { color: #fff; }
.banner.note { background: rgba(var(--sn-blue-rgb),.09); border: 1.5px solid rgba(var(--sn-blue-rgb),.28); } .banner.note .ic { fill: var(--sn-blue); }
.banner.warn { background: rgba(253,186,116,.09); border: 1.5px solid rgba(253,186,116,.28); } .banner.warn .ic { fill: var(--c-peach); }
.banner.err  { background: rgba(253,2,53,.09);  border: 1.5px solid rgba(253,2,53,.3); }  .banner.err .ic  { fill: var(--c-red); }
.banner b { color: #fff; }

/* empty state */
.empty-hero { text-align: center; padding: 46px 20px 30px; }
.empty-hero img { width: 66px; height: 66px; border-radius: 18px; margin: 0 auto 16px; box-shadow: 0 0 0 1px var(--border); }
.empty-hero h2 { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -1px; margin-bottom: 8px; }
.empty-hero p { font-size: 14.5px; color: var(--muted-light); max-width: 420px; margin: 0 auto; line-height: 1.55; }
.empty-suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 520px; margin: 22px auto 0; }
@media (max-width: 560px){ .empty-suggest { grid-template-columns: 1fr; } }
.empty-suggest button { text-align: left; padding: 14px 15px; border-radius: 14px; background: var(--panel); border: 1.5px solid var(--border); box-shadow: 0 4px 0 0 var(--ink); font-size: 13.5px; color: var(--text); transition: transform .12s; }
.empty-suggest button:hover { transform: translateY(-2px); border-color: rgba(var(--sn-blue-rgb),.4); }
.empty-suggest button b { display: block; font-family: var(--font-display); color: #fff; font-size: 14px; margin-bottom: 3px; }

/* ─── message rows (Fortized-inspired) ─── */
.msg { display: flex; gap: 13px; padding: 14px 0; }
.msg .av { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; object-fit: cover; }
.msg .av.user { display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 15px; background: linear-gradient(140deg, #2b3448, #1a2233); }
.msg .body { min-width: 0; flex: 1; }
.msg .head { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.msg .head .nm { font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: -.2px; color: #fff; }
.msg .head .nm.ai { background: linear-gradient(120deg, var(--sn-blue), var(--sn-pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.msg .head .ts { font-size: 11px; color: var(--muted); }
.msg .head .tag-ai { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sn-blue); background: rgba(var(--sn-blue-rgb),.12); border: 1px solid rgba(var(--sn-blue-rgb),.28); padding: 1px 6px; border-radius: 100px; }

/* prose */
.prose { font-size: 15px; color: var(--text); line-height: 1.7; }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }
.prose p { margin: 0 0 12px; }
.prose h1, .prose h2, .prose h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.4px; color: #fff; margin: 18px 0 10px; line-height: 1.2; }
.prose h1 { font-size: 22px; } .prose h2 { font-size: 19px; } .prose h3 { font-size: 16.5px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin-bottom: 5px; }
.prose b, .prose strong { color: #fff; font-weight: 600; }
.prose a { color: var(--sn-blue); text-decoration: underline; text-underline-offset: 2px; }
.prose blockquote { border-left: 3px solid rgba(var(--sn-blue-rgb),.5); padding: 2px 0 2px 14px; margin: 0 0 12px; color: var(--muted-light); }
.prose :not(pre) > code.inline { font-family: 'Roboto Mono', monospace; font-size: 13px; color: var(--sn-blue); background: rgba(var(--sn-blue-rgb),.1); padding: 1.5px 6px; border-radius: 6px; }

/* code card (Lifecheck-docs style + copy + view) */
.code-card { margin: 6px 0 14px; border: 1.5px solid var(--border-strong); border-radius: 14px; overflow: hidden; background: #0a0e14; }
.code-card .cc-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(255,255,255,.03); border-bottom: 1px solid var(--border); }
.code-card .cc-lang { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-light); margin-right: auto; }
.code-card .cc-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted-light); padding: 5px 9px; border-radius: 8px; border: 1px solid transparent; transition: .12s; }
.code-card .cc-btn:hover { color: #fff; background: rgba(255,255,255,.07); }
.code-card .cc-btn .ic-sm { fill: currentColor; }
.code-card .cc-btn.ok { color: var(--sn-green); }
.code-card pre { margin: 0; padding: 15px 16px; overflow-x: auto; }
.code-card code { font-family: 'Roboto Mono', ui-monospace, monospace; font-size: 12.7px; line-height: 1.75; color: #cbd5e1; white-space: pre; }
.tok-tag { color: #7dd3fc; } .tok-at { color: #fbbf24; } .tok-str { color: #86efac; } .tok-cm { color: #5b6678; } .tok-kw { color: #ff8ab4; } .tok-num { color: #c4b5fd; } .tok-fn { color: #fef83d; }

/* tables (Lifecheck-docs style) */
.prose .tbl-wrap { overflow-x: auto; margin: 6px 0 16px; border: 1.5px solid var(--border); border-radius: 14px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.prose th, .prose td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-family: var(--font-display); font-weight: 700; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-light); background: rgba(255,255,255,.02); }
.prose tr:last-child td { border-bottom: 0; }

/* math */
.sn-math { overflow-x: auto; padding: 12px 14px; margin: 6px 0 14px; border-radius: 12px; background: rgba(255,255,255,.02); border: 1px solid var(--border); text-align: center; color: #eef2f8; font-size: 15px; }

/* media / image card */
.media-card { display: inline-block; margin: 4px 8px 10px 0; border-radius: 14px; overflow: hidden; border: 1.5px solid var(--border); background: var(--panel); max-width: 320px; }
.media-card img { display: block; width: 100%; height: auto; }
.media-card .cap { font-size: 11.5px; color: var(--muted-light); padding: 8px 11px; }

/* thinking / reasoning accordion */
.think { margin: 0 0 12px; border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.02); }
.think summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 10px 13px; font-size: 12.5px; font-weight: 700; font-family: var(--font-display); color: var(--muted-light); }
.think summary::-webkit-details-marker { display: none; }
.think summary .ic-sm { fill: var(--sn-pink); }
.think summary .chev { margin-left: auto; transition: transform .2s; fill: var(--muted); }
.think[open] summary .chev { transform: rotate(180deg); }
.think .think-body { padding: 0 14px 13px 36px; font-size: 13px; color: var(--muted-light); line-height: 1.6; }
.think .think-body p { margin: 0 0 8px; }

/* streaming cursor */
.stream-cursor { display: inline-block; width: 8px; height: 16px; margin-left: 2px; vertical-align: -3px; border-radius: 2px; background: var(--sn-blue); animation: snCaret 1s steps(2) infinite; }
@keyframes snCaret { 0%,100%{opacity:1} 50%{opacity:0} }
.typing-dots { display: inline-flex; gap: 5px; padding: 6px 0; }
.typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--sn-blue); opacity: .5; animation: snType 1.3s ease-in-out infinite; }
.typing-dots i:nth-child(2){animation-delay:.18s} .typing-dots i:nth-child(3){animation-delay:.36s}
@keyframes snType { 0%,60%,100%{transform:translateY(0);opacity:.4} 30%{transform:translateY(-4px);opacity:1} }

/* message utility toolbar */
.msg-tools { display: flex; align-items: center; gap: 2px; margin-top: 8px; opacity: 0; transition: opacity .15s; }
.msg:hover .msg-tools, .msg-tools.pinned { opacity: 1; }
.msg-tool { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted-light); position: relative; }
.msg-tool:hover { color: #fff; background: rgba(255,255,255,.07); }
.msg-tool .ic-sm { fill: currentColor; }
.msg-tool.on-up { color: var(--sn-green); } .msg-tool.on-down { color: var(--c-red); }
.msg-tool[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; color: #fff; background: #05070c; border: 1px solid var(--border-strong); padding: 4px 8px; border-radius: 7px; pointer-events: none; }

/* ═══ COMPOSER ═══ */
.composer { flex-shrink: 0; padding: 4px 20px 16px; }
.composer-inner { max-width: 780px; margin: 0 auto; }

.elicit { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.elicit button { font-size: 12.5px; color: var(--sn-blue); background: rgba(var(--sn-blue-rgb),.08); border: 1.5px solid rgba(var(--sn-blue-rgb),.28); padding: 7px 13px; border-radius: 100px; transition: .12s; display: inline-flex; align-items: center; gap: 7px; }
.elicit button:hover { background: rgba(var(--sn-blue-rgb),.16); transform: translateY(-1px); }
.elicit button .ic-sm { fill: currentColor; }

.attach-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.attach-chip { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1.5px solid var(--border); border-radius: 11px; padding: 7px 9px; max-width: 220px; }
.attach-chip img { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; }
.attach-chip .ic { fill: var(--sn-blue); }
.attach-chip .meta { min-width: 0; }
.attach-chip .meta .fn { font-size: 12px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.attach-chip .meta .sz { font-size: 10.5px; color: var(--muted); }
.attach-chip .rm { color: var(--muted-light); width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.attach-chip .rm:hover { color: #fff; background: rgba(255,255,255,.08); }

.composer-box {
  background: var(--panel); border: 1.5px solid var(--border); border-radius: 20px;
  box-shadow: 0 6px 0 0 var(--ink); padding: 10px 10px 8px; transition: border-color .15s;
}
.composer-box.focus { border-color: rgba(var(--sn-blue-rgb),.45); }
.composer-box textarea {
  width: 100%; resize: none; border: 0; outline: 0; background: transparent; color: #fff;
  font-family: var(--font-body); font-size: 15px; line-height: 1.55; padding: 6px 8px; max-height: 220px; min-height: 26px;
}
.composer-box textarea::placeholder { color: var(--muted); }
.composer-actions { display: flex; align-items: center; gap: 6px; padding: 4px 4px 0; }
.cbtn { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: var(--muted-light); border: 1px solid transparent; transition: .12s; }
.cbtn:hover { color: #fff; background: rgba(255,255,255,.07); }
.cbtn .ic { fill: currentColor; }

/* model selector */
.model-sel { position: relative; }
.model-sel .model-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 11px; background: rgba(255,255,255,.04); border: 1px solid var(--border); color: #fff; font-size: 13px; font-family: var(--font-display); font-weight: 700; }
.model-sel .model-btn:hover { background: rgba(255,255,255,.08); }
.model-sel .model-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(120deg, var(--sn-blue), var(--sn-pink)); }
.model-sel .model-btn .chev { fill: var(--muted-light); width: 11px; height: 11px; }
.model-pop { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 30; width: 260px; padding: 6px; background: var(--panel); border: 1.5px solid var(--border-strong); border-radius: 14px; box-shadow: 0 14px 34px rgba(0,0,0,.55); display: none; }
.model-pop.on { display: block; }
.model-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; }
.model-opt:hover { background: rgba(255,255,255,.06); }
.model-opt .mi { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(140deg, var(--sn-blue), var(--sn-pink)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.model-opt .mi .ic-sm { fill: #0d1117; }
.model-opt.soon { opacity: .55; cursor: default; }
.model-opt.soon .mi { background: var(--bg-2); border: 1px solid var(--border); } .model-opt.soon .mi .ic-sm { fill: var(--muted); }
.model-opt .mt { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; color: #fff; display: flex; align-items: center; gap: 7px; }
.model-opt .mt .sel { margin-left: auto; fill: var(--sn-green); width: 13px; height: 13px; }
.model-opt .md { font-size: 11.5px; color: var(--muted-light); line-height: 1.4; margin-top: 2px; }
.model-opt .badge-soon { font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-light); background: var(--bg-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 100px; }

.counter { margin-left: auto; font-size: 11px; color: var(--muted); font-family: 'Roboto Mono', monospace; white-space: nowrap; }
.counter.warn { color: var(--c-peach); }

.send-btn { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: linear-gradient(120deg, var(--sn-blue), var(--sn-pink)); border: 1.5px solid var(--ink); box-shadow: 0 3px 0 0 var(--ink); transition: transform .1s, filter .15s; }
.send-btn .ic { fill: #0d1117; }
.send-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.send-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--ink); }
.send-btn:disabled { opacity: .45; filter: grayscale(.4); cursor: not-allowed; box-shadow: 0 3px 0 0 var(--ink); transform: none; }
.send-btn.stop { background: var(--panel); border-color: var(--border-strong); box-shadow: 0 3px 0 0 var(--ink); }
.send-btn.stop .ic { fill: #fff; }

.composer-foot { text-align: center; font-size: 11px; color: var(--muted); margin-top: 9px; }

/* view-code overlay */
.view-overlay { position: fixed; inset: 0; z-index: 150; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(3,5,9,.72); }
.view-overlay.on { display: flex; }
.view-panel { width: 100%; max-width: 900px; height: 80vh; display: flex; flex-direction: column; background: var(--panel); border: 1.5px solid var(--border-strong); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.6); }
.view-panel .vp-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.view-panel .vp-head .t { font-family: var(--font-display); font-weight: 700; font-size: 14px; margin-right: auto; }
.view-panel .vp-head .x { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--muted-light); }
.view-panel .vp-head .x:hover { color: #fff; background: rgba(255,255,255,.08); }
.view-panel iframe { flex: 1; border: 0; background: #fff; }

/* toasts */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; background: var(--panel); border: 1.5px solid var(--border-strong); box-shadow: 0 12px 30px rgba(0,0,0,.5); font-size: 13.5px; color: #fff; animation: toastIn .25s cubic-bezier(.22,1,.36,1); }
.toast .ic-sm { fill: var(--sn-green); }
.toast.err .ic-sm { fill: var(--c-red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* mobile */
@media (max-width: 760px) {
  .sn-app.on { grid-template-columns: 1fr; grid-template-rows: 100dvh; }
  .side { position: fixed; z-index: 90; top: 0; bottom: 0; left: 0; width: 288px; box-shadow: 0 0 60px rgba(0,0,0,.6); transform: translateX(-100%); transition: transform .22s; }
  body.side-open .side { transform: translateX(0); }
  .side-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.5); display: none; }
  body.side-open .side-backdrop { display: block; }
}
@media (min-width: 761px) { .side-backdrop { display: none; } }

/* ═══ ACCOUNT MENU (sidebar footer popover) ═══ */
.acct-menu {
  position: fixed; z-index: 130; width: 264px; padding: 7px;
  background: var(--panel); border: 1.5px solid var(--border-strong); border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0,0,0,.6); display: none;
}
.acct-menu.on { display: block; }
.acct-menu .cur { display: flex; align-items: center; gap: 11px; padding: 10px 10px 12px; }
.acct-menu .cur .av { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; color: #fff; background: linear-gradient(140deg, var(--sn-blue), var(--sn-pink)); }
.acct-menu .cur .who { min-width: 0; }
.acct-menu .cur .who .n { font-family: var(--font-display); font-weight: 800; font-size: 14.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-menu .cur .who .e { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-menu .sep { height: 1px; background: var(--border); margin: 5px 4px; }
.acct-menu .row { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--text); font-size: 13.5px; text-align: left; transition: background .12s; }
.acct-menu .row:hover { background: rgba(255,255,255,.06); color: #fff; }
.acct-menu .row .av { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 12px; color: #fff; background: linear-gradient(140deg, #2b3448, #1a2233); }
.acct-menu .row .ic-wrap { width: 28px; height: 28px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.acct-menu .row .ic-wrap .ic-sm { fill: var(--muted-light); }
.acct-menu .row .lbl { min-width: 0; flex: 1; }
.acct-menu .row .lbl .n { font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-menu .row .lbl .e { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-menu .row.out { color: #ff9a9a; }
.acct-menu .row.out:hover { background: rgba(253,2,53,.1); }
.acct-menu .row.out .ic-wrap .ic-sm { fill: #ff9a9a; }

/* ═══ WEB SOURCES (Grok-style) ═══ */
.msg-sources { margin: 4px 0 8px; }
.msg-sources .src-h { display: flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-light); margin-bottom: 8px; }
.msg-sources .src-h .ic-sm { fill: var(--sn-blue); }
.msg-sources .src-list { display: flex; gap: 8px; flex-wrap: wrap; }
.src-chip { display: inline-flex; align-items: center; gap: 9px; max-width: 240px; padding: 8px 13px 8px 9px; border-radius: 13px; background: var(--panel); border: 1.5px solid var(--border); transition: border-color .12s, transform .12s; overflow: hidden; }
.src-chip:hover { border-color: rgba(var(--sn-blue-rgb),.4); transform: translateY(-1px); }
.src-chip .num { flex-shrink: 0; font-family: var(--font-display); font-weight: 800; font-size: 10.5px; color: var(--sn-blue); background: rgba(var(--sn-blue-rgb),.12); border-radius: 100px; padding: 2px 7px; }
.src-chip .fav { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; background: var(--bg-2); object-fit: cover; }
.src-chip .st { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.src-chip .st .tt { display: block; font-size: 12.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 165px; }
.src-chip .st .dm { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 165px; }

/* ═══ AI TRAINER ═══ */
.trainer { position: fixed; inset: 0; z-index: 160; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(3,5,9,.74); }
.trainer.on { display: flex; }
.trainer-panel { width: 100%; max-width: 760px; max-height: 88vh; display: flex; flex-direction: column; background: var(--panel); border: 1.5px solid var(--border-strong); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.tr-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.tr-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -.4px; margin-right: auto; }
.tr-title .ic { width: 18px; height: 18px; }
.tr-badge { font-family: var(--font-display); font-weight: 800; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--sn-green); background: rgba(var(--sn-green-rgb),.12); border: 1px solid rgba(var(--sn-green-rgb),.3); padding: 2px 7px; border-radius: 100px; }
.tr-head .x { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--muted-light); }
.tr-head .x:hover { color: #fff; background: rgba(255,255,255,.08); }
.tr-body { padding: 20px 22px 26px; overflow-y: auto; }
.tr-lede { font-size: 14px; color: var(--muted-light); line-height: 1.6; margin-bottom: 20px; }
.tr-lede b { color: #fff; }
.tr-sec-h { font-family: var(--font-display); font-weight: 800; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; }
.tr-note { font-size: 12.5px; color: var(--muted); margin: -4px 0 12px; }
.tr-models { display: flex; gap: 10px; flex-wrap: wrap; }
.tr-model { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1.5px solid var(--border); min-width: 220px; }
.tr-model.on { border-color: rgba(var(--sn-blue-rgb),.5); }
.tr-model .mi { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(140deg, var(--sn-blue), var(--sn-pink)); display: flex; align-items: center; justify-content: center; }
.tr-model .mi .ic-sm { fill: #0d1117; }
.tr-model .mt { font-family: var(--font-display); font-weight: 800; font-size: 14px; }
.tr-model .md { font-size: 12px; color: var(--muted-light); }
.tr-model .sel { margin-left: auto; fill: var(--sn-green); }
.tr-data { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 620px){ .tr-data { grid-template-columns: 1fr; } }
.tr-toggle { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1.5px solid var(--border); cursor: pointer; transition: border-color .15s; }
.tr-toggle.on { border-color: rgba(var(--sn-green-rgb),.45); }
.tr-toggle .sw { width: 40px; height: 23px; border-radius: 100px; background: var(--panel); border: 1px solid var(--border-strong); flex-shrink: 0; position: relative; transition: background .18s; margin-top: 1px; }
.tr-toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--muted-light); transition: transform .18s, background .18s; }
.tr-toggle.on .sw { background: rgba(var(--sn-green-rgb),.35); }
.tr-toggle.on .sw::after { transform: translateX(17px); background: var(--sn-green); }
.tr-toggle .tt { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: #fff; margin-bottom: 2px; display: flex; align-items: center; gap: 7px; }
.tr-toggle .tt .trust { font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sn-green); background: rgba(var(--sn-green-rgb),.12); border: 1px solid rgba(var(--sn-green-rgb),.3); padding: 1px 6px; border-radius: 100px; }
.tr-toggle .dd { font-size: 12.5px; color: var(--muted-light); line-height: 1.5; }
.tr-games { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px){ .tr-games { grid-template-columns: 1fr; } }
.tr-game { padding: 16px; border-radius: 16px; background: var(--bg-2); border: 1.5px solid var(--border); }
.tr-game .gi { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; background: rgba(var(--sn-blue-rgb),.12); }
.tr-game .gi .ic { fill: var(--sn-blue); width: 18px; height: 18px; }
.tr-game h4 { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: -.3px; margin-bottom: 5px; }
.tr-game p { font-size: 12.5px; color: var(--muted-light); line-height: 1.5; margin-bottom: 12px; }
.tr-game .grun { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 12.5px; color: #0d1117; background: linear-gradient(120deg, var(--sn-blue), var(--sn-pink)); border: 1.5px solid var(--ink); border-radius: 11px; box-shadow: 0 3px 0 0 var(--ink); padding: 9px 14px; transition: transform .1s; }
.tr-game .grun:hover { transform: translateY(-1px); filter: brightness(1.05); }
.tr-game .grun:active { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--ink); }
.tr-game .grun .ic-sm { fill: #0d1117; }
.tr-game .gres { margin-top: 10px; font-size: 12px; color: var(--sn-green); display: none; align-items: center; gap: 7px; }
.tr-game .gres.on { display: flex; }
.tr-game .gres .ic-sm { fill: var(--sn-green); }

/* inline prompt edit */
.msg-edit { margin-top: 4px; }
.msg-edit textarea { width: 100%; resize: none; background: var(--panel); border: 1.5px solid rgba(var(--sn-blue-rgb),.45); border-radius: 14px; color: #fff; font-family: var(--font-body); font-size: 15px; line-height: 1.55; padding: 12px 14px; outline: none; }
.msg-edit .me-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.msg-edit .me-cancel, .msg-edit .me-save { font-family: var(--font-display); font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 10px; transition: transform .1s; }
.msg-edit .me-cancel { color: var(--muted-light); background: rgba(255,255,255,.05); border: 1px solid var(--border); }
.msg-edit .me-cancel:hover { color: #fff; }
.msg-edit .me-save { color: #0d1117; background: linear-gradient(120deg, var(--sn-blue), var(--sn-pink)); border: 1.5px solid var(--ink); box-shadow: 0 3px 0 0 var(--ink); }
.msg-edit .me-save:active { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--ink); }

/* embedded images (Pulsar can show pictures) */
.prose .msg-embed-img { display: block; max-width: min(440px, 100%); width: auto; height: auto; border-radius: 14px; border: 1.5px solid var(--border); margin: 6px 0 12px; background: var(--panel); }
.prose .msg-embed-img.broken { display: none; }

/* prompt version pager (‹ 2 / 2 ›) */
.ver-pager { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; }
.ver-pager .vp-btn { width: 24px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--muted-light); font-size: 17px; line-height: 1; border-radius: 7px; }
.ver-pager .vp-btn:hover { color: #fff; background: rgba(255,255,255,.07); }
.ver-pager .vp-n { font-size: 11.5px; color: var(--muted); font-family: 'Roboto Mono', monospace; min-width: 36px; text-align: center; }

/* trainer stats + train button */
.tr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 620px){ .tr-stats { grid-template-columns: 1fr 1fr; } }
.tr-stat { padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1.5px solid var(--border); }
.tr-stat .v { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.5px; color: #fff; }
.tr-stat .l { font-size: 11.5px; color: var(--muted-light); margin-top: 2px; }
.tr-stat.wide { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.tr-stat.wide .v { font-size: 15px; }
.tr-stat.wide .v.ready { color: var(--sn-green); } .tr-stat.wide .v.learning { color: var(--sn-blue); }
.tr-stat.wide .l { margin-top: 0; }
.tr-train { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border-radius: 14px; margin-bottom: 6px;
  font-family: var(--font-display); font-weight: 800; font-size: 15px; color: #0d1117;
  background: linear-gradient(120deg, var(--sn-blue), var(--sn-pink) 62%, var(--sn-green));
  border: 2px solid var(--ink); box-shadow: 0 5px 0 0 var(--ink); transition: transform .1s, filter .15s; }
.tr-train:hover { transform: translateY(-1px); filter: brightness(1.05); }
.tr-train:active { transform: translateY(3px); box-shadow: 0 2px 0 0 var(--ink); }
.tr-train:disabled { opacity: .6; cursor: default; transform: none; }
.tr-train .ic { fill: #0d1117; }
.tr-train.busy .ic { animation: snSpin 1s linear infinite; }
@keyframes snSpin { to { transform: rotate(360deg); } }

/* feedback-note tag on a Swiftaw message */
.fb-tag { font-family: var(--font-display); font-weight: 800; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; color: var(--sn-green); background: rgba(var(--sn-green-rgb),.12); border: 1px solid rgba(var(--sn-green-rgb),.3); padding: 1px 7px; border-radius: 100px; }

/* neural train button */
.tr-train.neural { background: var(--panel); color: #fff; border: 1.5px solid rgba(var(--sn-pink-rgb),.5); box-shadow: 0 5px 0 0 var(--ink); margin-top: 8px; }
.tr-train.neural .ic { fill: var(--sn-pink); }
.tr-train.neural[hidden] { display: none; }
.tr-train.neural .beta { font-family: var(--font-display); font-weight: 800; font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--sn-pink); background: rgba(var(--sn-pink-rgb),.14); border: 1px solid rgba(var(--sn-pink-rgb),.35); padding: 1px 6px; border-radius: 100px; }

/* training-session bar (above the composer) */
.train-bar { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(var(--sn-green-rgb),.08); border: 1.5px solid rgba(var(--sn-green-rgb),.3); }
.train-bar[hidden] { display: none; }
.train-bar .ic-sm { fill: var(--sn-green); }
.train-bar .tb-label { flex: 1; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--sn-green); }
.train-bar .tb-stop { font-family: var(--font-display); font-weight: 700; font-size: 12px; color: #fff; background: rgba(255,255,255,.06); border: 1px solid var(--border-strong); padding: 6px 12px; border-radius: 9px; }
.train-bar .tb-stop:hover { background: rgba(253,2,53,.14); border-color: rgba(253,2,53,.4); color: #ff9a9a; }

/* Answer tag (teal, distinct from Feedback green) */
.fb-tag.ans { color: var(--sn-blue); background: rgba(var(--sn-blue-rgb),.12); border-color: rgba(var(--sn-blue-rgb),.3); }

/* ═══ FOLDERS ═══ */
.side-folder-new { display: flex; align-items: center; gap: 8px; margin: 0 14px 10px; padding: 7px 12px; border-radius: 11px; color: var(--muted-light); font-size: 12.5px; font-weight: 600; border: 1.5px dashed var(--border-strong); transition: .12s; }
.side-folder-new:hover { color: #fff; border-color: rgba(var(--sn-blue-rgb),.5); background: rgba(255,255,255,.03); }
.side-folder-new .ic-sm { fill: currentColor; }

.folder { margin-bottom: 2px; }
.folder-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--text); transition: background .12s; }
.folder-head:hover { background: rgba(255,255,255,.05); }
.folder-head .fico { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.folder-head .fico svg { width: 14px; height: 14px; fill: #0d1117; }
.folder-head .fname { flex: 1; font-family: var(--font-display); font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-head .fcount { font-size: 11px; color: var(--muted); }
.folder-head .fchev { width: 11px; height: 11px; fill: var(--muted); transition: transform .18s; }
.folder.collapsed .folder-head .fchev { transform: rotate(-90deg); }
.folder-head .fmenu { opacity: 0; width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--muted-light); }
.folder-head:hover .fmenu { opacity: 1; }
.folder-head .fmenu:hover { background: rgba(255,255,255,.1); color: #fff; }
.folder-body { padding-left: 12px; margin-left: 10px; border-left: 1.5px solid var(--border); }
.folder.collapsed .folder-body { display: none; }
.folder-empty { font-size: 11.5px; color: var(--muted); padding: 4px 8px 8px; }

/* folder modal */
.fld-modal { position: fixed; inset: 0; z-index: 170; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(3,5,9,.72); }
.fld-modal.on { display: flex; }
.fld-card { width: 100%; max-width: 420px; background: var(--panel); border: 1.5px solid var(--border-strong); border-radius: 20px; box-shadow: 0 30px 70px rgba(0,0,0,.6); padding: 22px; }
.fld-head { display: flex; align-items: center; margin-bottom: 16px; }
.fld-head .t { font-family: var(--font-display); font-weight: 800; font-size: 18px; margin-right: auto; }
.fld-head .x { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--muted-light); }
.fld-head .x:hover { color: #fff; background: rgba(255,255,255,.08); }
.fld-l { display: block; font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }
.fld-input { width: 100%; padding: 11px 13px; border-radius: 12px; background: var(--bg-2); border: 1.5px solid var(--border); color: #fff; font-size: 14px; outline: none; }
.fld-input:focus { border-color: rgba(var(--sn-blue-rgb),.5); }
.fld-colors { display: flex; gap: 9px; flex-wrap: wrap; }
.fld-sw { width: 30px; height: 30px; border-radius: 9px; cursor: pointer; border: 2px solid transparent; transition: transform .1s; }
.fld-sw:hover { transform: scale(1.1); }
.fld-sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px currentColor; }
.fld-icons { display: flex; gap: 8px; flex-wrap: wrap; }
.fld-ico { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--bg-2); border: 1.5px solid var(--border); cursor: pointer; }
.fld-ico svg { width: 17px; height: 17px; fill: var(--muted-light); }
.fld-ico:hover { border-color: var(--border-strong); }
.fld-ico.on { border-color: rgba(var(--sn-blue-rgb),.6); background: rgba(var(--sn-blue-rgb),.1); } .fld-ico.on svg { fill: #fff; }
.fld-actions { display: flex; gap: 10px; margin-top: 22px; }
.fld-del { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: #ff9a9a; padding: 11px 16px; border-radius: 12px; background: rgba(253,2,53,.08); border: 1px solid rgba(253,2,53,.3); }
.fld-del[hidden] { display: none; }
.fld-save { margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: 14px; color: #0d1117; padding: 11px 20px; border-radius: 12px; background: linear-gradient(120deg, var(--sn-blue), var(--sn-pink)); border: 1.5px solid var(--ink); box-shadow: 0 4px 0 0 var(--ink); }
.fld-save:active { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--ink); }
