:root {
  --bg: #0f0f12; --panel: #18181d; --panel2: #202027; --line: #2c2c35; --text: #ececf1; --muted: #9a9aa8;
  --accent: #ff5c39; --accent2: #ff875f; --ok: #3ccf7e; --warn: #f5b942; --err: #ff5d6c; --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent2); }
button, input, textarea, select { font: inherit; color: inherit; }
.center { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

header { position: sticky; top: 0; z-index: 5; background: rgba(15,15,18,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo { font-weight: 800; letter-spacing: .3px; font-size: 18px; }
.logo span { color: var(--accent); }
.tabs { display: flex; gap: 4px; background: var(--panel); padding: 4px; border-radius: 999px; }
.tabs button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.tabs button.on { background: var(--panel2); color: var(--text); }
.grow { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--panel); font-size: 13px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); } .dot.warn { background: var(--warn); } .dot.err { background: var(--err); }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 0; }

main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 80px; }
h2 { margin: 28px 0 4px; font-size: 20px; }
h2 + p { margin: 0 0 12px; color: var(--muted); }

.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.claude textarea { width: 100%; min-height: 96px; resize: vertical; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.btn { border: 0; border-radius: 10px; padding: 10px 18px; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.file { display: inline-flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px dashed var(--line); padding: 8px 12px; border-radius: 10px; cursor: pointer; color: var(--muted); }
.file input { display: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--panel2); border-radius: 999px; padding: 3px 10px; font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; text-align: left; padding: 0; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.thumb { aspect-ratio: 4/3; background: var(--panel2) center/cover no-repeat; position: relative; display: flex; }
.thumb .ph { margin: auto; color: var(--muted); font-size: 34px; opacity: .5; }
.thumb video, .thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.65); padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.badge.r { left: auto; right: 8px; background: var(--err); }
.card .body { padding: 12px 14px 14px; }
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card p { margin: 0; color: var(--muted); font-size: 13px; }

dialog { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 18px; width: min(560px, calc(100vw - 24px)); padding: 0; }
dialog::backdrop { background: rgba(0,0,0,.6); }
.dlg { padding: 18px; }
.dlg h3 { margin: 0 0 4px; }
.field { margin-top: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field textarea, .field select { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.field textarea { min-height: 90px; resize: vertical; }
.examples { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; }
.examples img, .examples video { height: 150px; border-radius: 10px; }

.task { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.task .top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.task .t { font-weight: 600; }
.st { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--panel2); }
.st.done { background: rgba(60,207,126,.15); color: var(--ok); } .st.error { background: rgba(255,93,108,.15); color: var(--err); }
.st.run { background: rgba(245,185,66,.15); color: var(--warn); }
.task .msg { margin-top: 6px; color: var(--muted); font-size: 14px; white-space: pre-wrap; }
.task .reply { margin-top: 8px; padding: 8px 10px; background: var(--panel2); border-radius: 8px; font-size: 14px; }
.outs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.outs img, .outs video { max-height: 360px; max-width: 100%; border-radius: 10px; background: #000; }
.outs pre { white-space: pre-wrap; background: var(--panel2); padding: 10px; border-radius: 8px; margin: 0; max-width: 100%; }
.ins { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ins img { height: 48px; border-radius: 6px; }
.acts { display: flex; gap: 12px; margin-top: 10px; font-size: 13px; }
.login { max-width: 360px; margin: 12vh auto; }
.login input { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 10px; }
.err { color: var(--err); font-size: 14px; margin-top: 8px; min-height: 1em; }
.toggle { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; cursor: pointer; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr 1fr; gap: 8px; } .card .body { padding: 8px 10px 10px; } .card p { display: none; } .bar { gap: 8px; } }
