:root { --bg:#0f1218; --card:#181d26; --line:#2a3140; --text:#e8ebf1; --muted:#98a2b5; --accent:#4f8cff; --ok:#3ecf8e; --warn:#f5b942; --error:#ff6b6b; color-scheme:dark; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:15px/1.5 system-ui,sans-serif; }
header { position:sticky; top:0; z-index:2; display:flex; gap:16px; flex-wrap:wrap; align-items:center; padding:12px 20px; background:var(--card); border-bottom:1px solid var(--line); }
.logo { font-size:20px; margin-right:auto; }
main, footer { max-width:1180px; margin:0 auto; padding:20px; }
button, input, select { font:inherit; color:inherit; background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:8px 12px; }
button { cursor:pointer; } button:disabled { opacity:.4; cursor:default; }
button.on, button.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
a { color:var(--accent); }
.bar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
.bar > input[type=search], #question { flex:1; min-width:200px; }
.center { justify-content:center; margin-top:16px; }
.muted { color:var(--muted); font-size:13px; }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; }
.card, aside, .slot, #log { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; }
.card img { width:100%; height:160px; object-fit:contain; background:#fff; border-radius:8px; }
.card h3 { font-size:14px; margin:10px 0; }
.offer { display:flex; gap:8px; justify-content:space-between; align-items:center; border-top:1px solid var(--line); padding:8px 0 0; margin-top:8px; }
.offer.out { opacity:.55; }
.badge { display:inline-block; background:var(--ok); color:#06231a; border-radius:6px; padding:0 6px; font-size:12px; font-weight:700; }
.price, .total { font-weight:700; } .total { font-size:26px; margin:4px 0; }
.split { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:16px; align-items:start; }
.slot { display:flex; gap:10px; justify-content:space-between; align-items:center; margin-bottom:10px; }
ul { padding:0; list-style:none; } li { border-left:4px solid var(--line); padding:4px 10px; margin:8px 0; font-size:14px; }
li.ok { border-color:var(--ok); } li.warn { border-color:var(--warn); } li.error { border-color:var(--error); }
dialog { width:min(760px,94vw); max-height:85vh; background:var(--card); color:var(--text); border:1px solid var(--line); border-radius:12px; }
dialog input[type=search] { width:100%; }
#log { height:55vh; overflow-y:auto; margin-bottom:12px; }
.msg { white-space:pre-wrap; padding:10px 12px; border-radius:10px; margin:8px 0; max-width:85%; background:var(--bg); }
.msg.user { margin-left:auto; background:var(--accent); color:#fff; }
@media (max-width:760px) { .split { grid-template-columns:1fr; } }
.slot > .bar { flex-wrap:nowrap; margin:0; } .slot > div:first-child { min-width:0; overflow-wrap:anywhere; } .offer .badge { margin-right:6px; }
