:root{color-scheme:dark;--bg:#181a1f;--panel:#202329;--line:#353940;--muted:#a1a5ae;--text:#f2f3f5;--blue:#6ee7b7}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.5 system-ui,sans-serif}button,input{font:inherit}button{cursor:pointer;border:0;border-radius:10px;background:var(--blue);color:#11251d;padding:12px 18px;font-weight:700}button:disabled{opacity:.5;cursor:wait}input{width:100%;background:#191c21;border:1px solid var(--line);border-radius:10px;color:var(--text);padding:14px;outline:none}input:focus,button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}p{color:var(--muted)}[hidden]{display:none!important}.brand{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:700;white-space:nowrap}.brand b{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:var(--blue);color:#11251d}.brand span{font-size:10px;letter-spacing:2px;color:var(--muted);font-weight:500}.login{min-height:100dvh;max-width:1130px;margin:auto;display:grid;grid-template-columns:1.2fr 1fr;align-items:center;gap:80px;padding:60px 30px}.intro h1{font-size:clamp(36px,4vw,56px);line-height:1.15;letter-spacing:-2px;margin:55px 0 24px}.intro h1 span{color:var(--blue)}.intro p{font-size:18px}.intro small{display:block;color:var(--muted);margin-top:35px}.chips{display:flex;gap:9px;flex-wrap:wrap;margin-top:30px}.chips span{border:1px solid #3c5b4e;border-radius:25px;padding:6px 13px;color:#9fe7c7;font-size:13px}.card{background:var(--panel);border:1px solid var(--line);border-radius:22px;padding:36px;box-shadow:0 25px 70px #0003}.eyebrow{font-size:11px;letter-spacing:2px;color:var(--muted);font-weight:700}.card h2{font-size:30px;margin:10px 0}.card>p{margin:0 0 28px}.card label{display:block;margin:20px 0 8px;font-size:13px}.card label span{float:right;color:var(--muted);font-size:11px}.card .hint{margin:18px 0;font-size:12px}.card button{width:100%;display:flex;justify-content:space-between}.card #login-error{color:#ff9a9a;margin:14px 0 0;font-size:13px;min-height:20px}.hint{font-size:12px;color:var(--muted)}header{height:76px;display:flex;align-items:center;gap:25px;padding:0 25px;border-bottom:1px solid var(--line)}#status{margin-left:auto;color:var(--muted);font-size:12px}.quiet{background:transparent;color:var(--muted);font-size:12px;border:1px solid var(--line);padding:8px 12px}.workspace{display:grid;grid-template-columns:215px minmax(0,1fr) 210px;height:calc(100dvh - 76px)}.channels,.people{padding:25px 16px;background:#1c1f24;overflow:auto}.channels{display:flex;flex-direction:column;border-right:1px solid var(--line)}nav{margin:20px 0;display:grid;gap:6px}nav button{text-align:left;background:transparent;color:var(--muted);font-size:14px;overflow-wrap:anywhere;padding:12px}nav button.active{background:#293e34;color:#a0ebc9}nav button.unread::after{content:' ●';color:var(--blue)}.identity{margin-top:auto;padding-top:25px;display:flex;align-items:center;gap:9px;font-size:13px;overflow-wrap:anywhere}.avatar{color:#5ed4ac}.conversation{display:flex;flex-direction:column;min-height:0;min-width:0}.room-head{min-height:85px;padding:18px 25px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px}.room-head>div{min-width:0;flex:1}.room-head h2{margin:0;font-size:19px}.room-head p{margin:3px 0 0;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#messages{flex:1;overflow:auto;padding:20px 25px;overflow-wrap:anywhere}.line{padding:5px 0;display:grid;grid-template-columns:45px minmax(0,1fr);gap:10px}.line time{font-size:10px;color:#7e858f;padding-top:4px}.line strong{color:#9be5c4;margin-right:10px;font-size:13px}.line.system{font-size:12px;color:var(--muted)}.line.action{color:#b1dbc7}#message-form{display:flex;margin:10px 22px 0;gap:10px}#send{width:48px;font-size:22px;padding:7px}#message{min-width:0}.composer-hint{padding:8px 25px 15px;font-size:10px;color:var(--muted)}.people{border-left:1px solid var(--line)}.people .eyebrow{display:flex;justify-content:space-between}.people .hint{font-size:10px}#users{display:grid;gap:3px}#users button{text-align:left;background:transparent;color:#c0c5ca;font-size:12px;font-weight:500;padding:6px;overflow-wrap:anywhere}#users button:hover{background:#293e34}#people-toggle{display:none}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:950px){.workspace{grid-template-columns:170px minmax(0,1fr)}.people{display:none}.people.open{display:block;position:absolute;right:0;top:76px;bottom:0;width:220px;z-index:2;box-shadow:-10px 0 30px #0005}#people-toggle{display:block}.login{gap:35px}.card{padding:28px}}@media(max-width:650px){.login{display:block;padding:28px 20px}.intro h1{font-size:34px;margin:30px 0 15px}.intro p,.intro small{display:none}.chips{margin:15px 0 25px}.card{padding:25px}header{height:65px;padding:0 12px;gap:8px}.brand{font-size:16px}.brand span{display:none}#status{font-size:10px}.workspace{height:calc(100dvh - 65px);display:flex;flex-direction:column}.channels{padding:10px;border-right:0;border-bottom:1px solid var(--line);flex-shrink:0;display:block}.channels>.eyebrow,.identity{display:none}nav{display:flex;overflow-x:auto;margin:0 0 8px;gap:5px}nav button{white-space:nowrap;padding:7px 12px}.channels>#private{padding:3px 10px}.conversation{flex:1;min-height:0}.room-head{padding:12px 15px;min-height:68px}#messages{padding:10px 14px}#message-form{margin:8px 12px 0}.composer-hint{padding:8px 14px;font-size:9px}.people.open{top:65px}.line{gap:4px;grid-template-columns:36px 1fr}}

/* Лични разговори: различими цветове за двете страни. */
.line.private-self strong{color:#6ee7b7}
.line.private-self>div{color:#bdeed8}
.line.private-peer strong{color:#6ee7b7}
.line.private-peer>div{color:#f3d2bb}

.line.private-peer strong{color:#f4b183}

/* IRC статуси в списъка с потребители. */
#users button{display:flex;align-items:center;gap:8px}
#users .user-rank{display:inline-grid;place-items:center;flex:0 0 22px;height:22px;border-radius:6px;background:#292d34;color:#949ca8;font-weight:800;font-size:13px}
#users button[data-rank="@"] .user-rank{color:#6ee7b7;background:#283e34}
#users button[data-rank="%"] .user-rank{color:#f4b183;background:#44352b}
#users button[data-rank="+"] .user-rank{color:#e6d48b;background:#3e3927}
#users button[data-rank="~"] .user-rank,#users button[data-rank="&"] .user-rank{color:#f3bccb;background:#44303a}

/* Отделни достъпни бутони за избор и затваряне на разговор. */
.tab-row{display:flex;align-items:center;gap:3px;min-width:0}
.tab-row>button:first-child{flex:1;min-width:0}
nav .tab-close{flex:0 0 28px;width:28px;padding:3px;color:#a1a5ae;font-size:21px;line-height:1.2;text-align:center;border-radius:6px}
nav .tab-close:hover{color:#ffb5b5;background:#493036}
@media(max-width:650px){.tab-row{flex:0 0 auto}.tab-row>button:first-child{flex:0 0 auto}}

#join-channel{margin-bottom:8px}

.composer{position:relative}
#emoji-toggle{flex:0 0 44px;padding:7px;font-size:23px;background:#292e35;border:1px solid var(--line);color:var(--text)}
#emoji-panel{position:absolute;bottom:calc(100% + 8px);right:22px;width:min(340px,calc(100% - 30px));padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--panel);box-shadow:0 12px 40px #0006;z-index:5}
.emoji-head{display:flex;justify-content:space-between;align-items:center;font-size:14px}.emoji-head button{font-size:20px;padding:0 8px}
#emoji-tabs{display:flex;gap:8px;margin:12px 0}#emoji-tabs button{background:transparent;color:var(--muted);padding:6px 10px;font-size:12px}#emoji-tabs .chosen{background:#293e34;color:#a0ebc9}
#emoji-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px;max-height:220px;overflow:auto}#emoji-grid button{background:transparent;color:var(--text);font-size:20px;padding:5px 0;min-height:35px}#emoji-grid button:hover{background:#34463d}#emoji-note{font-size:10px;margin:10px 0 0;color:var(--muted)}
@media(max-width:650px){#emoji-toggle{flex-basis:38px}#emoji-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}

/* OptiLan: знак с два разговора. */
.brand .brand-mark{display:inline-flex;flex:0 0 42px;width:42px;height:42px;letter-spacing:normal}
.brand-mark svg{width:100%;height:100%;display:block}
@media(max-width:650px){.brand .brand-mark{display:inline-flex;flex-basis:36px;width:36px;height:36px}}

/* Одобрено лого OptiLan IRC Network; оригиналът се пази без преоразмеряване. */
.brand.brand-logo{position:relative;display:block;width:230px;height:74px;flex:0 0 230px;overflow:hidden}
.brand-logo img{position:absolute;width:390px;height:auto;max-width:none;left:-78px;top:-25px}
.intro .brand.brand-logo{width:310px;height:100px}
.intro .brand-logo img{width:520px;left:-104px;top:-33px}
@media(max-width:650px){.brand.brand-logo{width:175px;height:58px;flex-basis:175px}.brand-logo img{width:300px;left:-60px;top:-19px}.intro .brand.brand-logo{width:260px;height:85px}.intro .brand-logo img{width:440px;left:-88px;top:-28px}header{gap:6px}header #disconnect{padding:7px 9px}}

/* Прозрачно лого: позициониране според видимата емблема и надпис. */
.brand-logo img{width:346px;left:-57px;top:-18px}
.intro .brand-logo img{width:465px;left:-77px;top:-25px}
@media(max-width:650px){.brand-logo img{width:264px;left:-44px;top:-14px}.intro .brand-logo img{width:392px;left:-65px;top:-21px}}

#help-button{width:100%;text-align:left;color:#a0ebc9}
#help-dialog{width:min(540px,calc(100% - 28px));max-height:85dvh;overflow:auto;padding:24px;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:16px;box-shadow:0 16px 60px #0006}
#help-dialog::backdrop{background:#0005}.help-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.help-head h2{margin:0;font-size:21px}.help-head button{font-size:22px;padding:0 10px}#help-dialog p{font-size:13px}.help-commands dt{margin-top:17px;color:#6ee7b7}.help-commands dd{margin:5px 0;color:#c0c5ca;font-size:13px}.help-commands code{font-size:13px;overflow-wrap:anywhere}@media(max-width:650px){#help-button{width:auto;padding:5px 12px}}
