* { box-sizing: border-box; }
:root { color-scheme: dark; font: 15px/1.55 system-ui, sans-serif; color: #eff1f8; background: #101119; --surface: #1a1c28; --line: #303345; --muted: #a9adbf; --accent: #bdb4ff; }
body { margin: 0; min-height: 100dvh; }
button, input, select, textarea { font: inherit; }
button, .button { border: 1px solid transparent; border-radius: 9px; background: var(--accent); color: #191334; font-weight: 660; padding: .48rem .85rem; cursor: pointer; }
button.secondary, .button.secondary, nav button { color: inherit; background: var(--surface); border-color: var(--line); }
button:disabled, select:disabled, input:disabled + label { opacity: .52; cursor: default; }
:focus-visible, label:has(+ input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.top { border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1000px; margin: auto; min-height: 66px; padding: .65rem 1.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand, nav, .row, .compose-controls { display: flex; align-items: center; gap: .55rem; }
.brand small { display: block; color: var(--muted); font-size: .73rem; }
.mark { display: grid; place-items: center; background: #302953; color: #d7d0ff; border: 1px solid #544888; border-radius: 10px; width: 34px; height: 34px; font-weight: 750; }
.mark.large { width: 48px; height: 48px; margin: auto; font-size: 1.35rem; }
nav button { padding: .35rem .7rem; }
nav button[aria-pressed=true] { background: #2d2746; border-color: #5a5086; color: #e1daff; }
main { max-width: 860px; margin: auto; padding: 1rem 1rem 2rem; }
.statuses, .status { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.status { font-size: .8rem; border: 1px solid var(--line); border-radius: 99px; padding: .3rem .65rem; }
.status span:last-child { color: var(--muted); }
.dot { background: #aeb1c6; width: .54rem; height: .54rem; border-radius: 50%; }
.dot[data-state=online] { background: #77dfae; }
.dot[data-state=busy], .dot[data-state=loading], .dot[data-state=checking] { background: #f1c47d; }
.dot[data-state=offline] { background: #e990a0; }
#welcome { text-align: center; padding: clamp(2.5rem, 12vh, 8rem) 0 2.4rem; }
h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); letter-spacing: -.04em; margin: .65rem 0 .4rem; }
#welcome p { max-width: 34rem; margin: auto; color: var(--muted); }
#transcript:not(:empty) { padding: 1.25rem 0; }
.message { max-width: 95%; padding: .85rem 1rem; margin: 0 0 .85rem; overflow-wrap: anywhere; }
.message.user { width: fit-content; max-width: 85%; margin-left: auto; background: #29263a; border-radius: 15px; }
.message.assistant { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }
.message p { margin: .2rem 0 0; white-space: pre-wrap; }
.message small { color: var(--accent); }
#composer { border: 1px solid #44465d; border-radius: 15px; background: var(--surface); padding: .65rem; }
textarea { background: transparent; color: inherit; border: none; display: block; width: 100%; resize: vertical; padding: .3rem; }
.compose-controls { flex-wrap: wrap; }
#send { margin-left: auto; }
select, input[type=password], input[type=number] { min-width: 0; padding: .43rem .55rem; border: 1px solid var(--line); border-radius: 8px; background: #12141f; color: inherit; }
.row { flex-wrap: wrap; margin: .55rem 0; }
.row select, .row input[type=password] { flex: 1 1 14rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin: .8rem 0; }
.card h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.card label { display: block; }
.card .check { margin: .7rem 0; }
.hint { font-size: .82rem; color: var(--muted); margin: .45rem 0; }
#activity:not(:empty) { color: var(--accent); min-height: 1.3rem; }
.links { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .84rem; }
#uploads { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; list-style: none; margin: .4rem 0; }
#uploads:empty { display: none; }
#uploads li { display: flex; align-items: center; gap: .35rem; background: #29263a; border-radius: 7px; padding: .1rem .2rem .1rem .5rem; font-size: .82rem; overflow-wrap: anywhere; min-width: 0; }
#uploads button { font-size: .78rem; padding: .1rem .35rem; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
