:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #e9eff7;
  background: #121c2a;
  font-synthesis: none;
  --muted: #a6b5c7;
  --line: #34475e;
  --accent: #b9d8fb;
  --panel: #1a293b;
  --raised: #25384e;
  --live: #addbc4;
  --warning: #f2cea3;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, summary, input[type=range], input[type=checkbox] { -webkit-tap-highlight-color: transparent; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 10px;
  color: inherit; background: var(--raised); cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1.35;
}
button:hover { background: #314861; }
button:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 4px;
}
button.primary { background: var(--accent); border-color: var(--accent); color: #17293f; min-height: 50px; }
button.primary:hover { background: #d2e6ff; }
button[aria-pressed=true]:not(.primary) { color: var(--warning); background: #40372d; border-color: #897154; }
input:not([type=range]):not([type=checkbox]), textarea, select {
  width: 100%; min-height: 48px; padding: 13px 14px; color: inherit; background: #121f30; border: 1px solid #49617b; border-radius: 9px;
}
input::placeholder, textarea::placeholder { color: #94a7bd; }
input[type=range] { width: 100%; min-height: 32px; margin: 0; accent-color: var(--accent); }
input[type=checkbox] { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); }
label { display: block; font-size: 14px; color: #c7d5e6; margin: 19px 0 9px; }
a { color: inherit; }
h1, h2, p { margin: 0; }
h1, h2 { font-weight: 650; }
[hidden] { display: none !important; }
.icon-defs { position: absolute; overflow: hidden; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }
.shell { width: min(1192px, 100%); margin: 0 auto; padding: 0 36px; min-height: 100dvh; display: flex; flex-direction: column; }
.site-header { height: 88px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #2a3c52; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 25px; font-weight: 750; letter-spacing: -.9px; text-decoration: none; }
.brand>span { color: var(--accent); margin-left: -9px; }
.brand-mark { width: 27px; height: 30px; stroke-width: 2.2; color: var(--accent); }
.private { color: var(--muted); font-size: 13px; }
main { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.lobby { display: grid; grid-template-columns: 1.1fr 1fr; gap: 90px; align-items: center; padding: 54px 24px 66px; }
.channel-mark { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 27px; border-radius: 22px 22px 22px 6px; background: #28405a; color: var(--accent); transform: rotate(-6deg); }
.channel-mark svg { width: 39px; height: 39px; stroke-width: 1.4; }
.intro h1 { font-size: clamp(42px, 4.7vw, 60px); line-height: 1.1; letter-spacing: -2.2px; }
.intro p { margin-top: 25px; color: #bccadd; font-size: 17px; line-height: 1.7; }
.lobby-footnote { display: flex; align-items: center; gap: 9px; margin-top: 30px; color: var(--muted); font-size: 13px; }
.little-dot { width: 6px; height: 6px; background: var(--live); border-radius: 50%; }
.join-panel { padding: 33px; background: var(--panel); border: 1px solid #354b65; border-radius: 20px; }
.join-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.join-heading h2 { font-size: 23px; letter-spacing: -.5px; }
.seats { display: flex; flex-shrink: 0; }
.seats i { width: 15px; height: 15px; border: 2px solid var(--panel); border-radius: 50%; background: #bbd7f4; margin-left: -4px; }
.seats i:nth-child(2) { background: #b9d7c8; }.seats i:nth-child(3) { background: #d8bea2; }
.join-description { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 11px 0 25px; }
.join-panel .primary { width: 100%; justify-content: space-between; margin-top: 22px; }
.join-note { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 22px; }
.join-note .icon { width: 17px; height: 19px; }
.room { display: grid; grid-template-columns: 344px minmax(0, 1fr); gap: 20px; padding: 25px 0 31px; }
.room-toolbar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 3px; }
.room-heading h1 { font-size: 27px; letter-spacing: -.6px; }
.room-heading>span { display: block; font-size: 13px; margin-top: 5px; color: var(--muted); }
.room-actions { display: flex; align-items: center; gap: 8px; }
.invite-button { color: var(--accent); background: #20354d; border-color: #405c7b; min-width: 249px; }
.leave { color: var(--muted); background: transparent; border-color: transparent; font-size: 13px; }
.leave:hover { background: #3c2c32; color: #f5bfc1; }
.voice-panel { padding: 23px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; align-self: start; }
.voice-heading h2 { font-size: 18px; }
.connection { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin-top: 8px; min-height: 18px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #cbb58b; flex-shrink: 0; }
.dot.connected { background: var(--live); }
.people { display: grid; gap: 19px; margin: 26px 0; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { display: grid; place-items: center; position: relative; width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px; color: #cedff6; background: #344c6a; font-size: 18px; font-weight: 650; }
.person[data-voice=on] .avatar::after, .person[data-voice=muted] .avatar::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border: 2px solid var(--panel); border-radius: 50%; background: var(--live); }
.person[data-voice=muted] .avatar::after { background: var(--warning); }
.person>div { min-width: 0; }
.person strong { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.person div>span { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; line-height: 1.45; }
.person[data-voice=on] div>span { color: var(--live); }
.person[data-voice=muted] div>span { color: var(--warning); }
.friend .avatar { color: #d7ecdf; background: #355046; }
.friend ~ .friend .avatar { color: #ead9c9; background: #514535; }
.you { margin-left: auto; border-radius: 5px; background: #28394f; color: var(--muted); padding: 3px 6px; font-size: 11px; }
.waiting .avatar { background: transparent; color: #859bb5; border: 1px dashed #526881; font-weight: 400; }
.waiting strong { font-size: 14px; color: #b9c9db; }
.audio-controls { border-top: 1px solid var(--line); padding-top: 21px; }
.audio-controls>.primary { width: 100%; font-size: 14px; }
#voice[aria-pressed=true] { background: #254538; color: #c5e8d6; border-color: #527f68; }
#voice[aria-pressed=true]:hover { background: #305543; }
#voice[data-muted=true] { background: #40372d; border-color: #897154; color: var(--warning); }
.control-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.control-row button { flex-direction: column; padding: 10px 5px; min-height: 65px; gap: 6px; font-size: 12px; }
.control-row .icon { width: 19px; height: 19px; }
.voice-hint { color: var(--muted); margin: 12px 0 17px; font-size: 12px; line-height: 1.5; min-height: 36px; }
.audio-unlock { width: 100%; color: var(--warning); border-color: #897154; background: #40372d; margin-bottom: 16px; }
details { border-top: 1px solid var(--line); font-size: 13px; }
summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 14px 0 0; cursor: pointer; color: #cad7e6; list-style: none; }
summary::-webkit-details-marker { display: none; }
details[open] summary .icon { transform: rotate(180deg); }
.settings { padding-top: 2px; }
.volume-label { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-top: 20px; }
.volume-label label { margin: 0 0 8px; font-size: 13px; }
.volume-label output { font-size: 12px; color: var(--accent); font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: 9px; min-height: 44px; margin: 10px 0 0; font-size: 13px; cursor: pointer; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 4px; }
.chat-panel { display: flex; flex-direction: column; min-width: 0; min-height: 530px; max-height: 650px; background: #162334; border: 1px solid #30435a; border-radius: 16px; overflow: hidden; }
.chat-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 22px 25px; border-bottom: 1px solid #30435a; }
.chat-heading h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.chat-heading h2 .icon { color: #a3bddb; }
.network { color: var(--muted); font-size: 12px; }
.network[data-online=true] { color: var(--live); }
.conversation { position: relative; flex: 1; min-height: 200px; display: flex; }
.messages { flex: 1; min-width: 0; height: 380px; padding: 23px 25px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #4b617a transparent; overscroll-behavior: contain; }
.message { width: fit-content; max-width: 88%; margin: 0 0 19px; overflow-wrap: anywhere; }
.message-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: 12px; }
.message strong { color: #c4d7ef; font-weight: 600; }
.message time { font-size: 11px; color: #97abc2; font-variant-numeric: tabular-nums; }
.message p { padding: 10px 13px; border-radius: 3px 12px 12px; color: #e6edf6; background: #25364c; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.message.own { margin-left: auto; }
.message.own .message-top { justify-content: flex-end; }
.message.own p { background: #2d4867; border-radius: 12px 3px 12px 12px; }
.empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; padding: 28px; text-align: center; pointer-events: none; }
.empty>svg { width: 40px; height: 40px; color: #7491b3; margin-bottom: 6px; stroke-width: 1.2; }
.empty strong { font-size: 17px; font-weight: 600; color: #c7d6e8; }
.empty p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.new-messages { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); white-space: nowrap; border-radius: 24px; color: #17293f; background: var(--accent); border-color: var(--accent); font-size: 12px; box-shadow: 0 3px 14px #101a2999; }
.new-messages:hover { background: #d2e6ff; }
.composer { padding: 17px 21px 16px; border-top: 1px solid #30435a; }
#chatForm { display: flex; align-items: center; gap: 10px; }
#attach { width: 44px; height: 48px; padding: 0; flex-shrink: 0; color: var(--accent); background: transparent; }
.attachment-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.attachment-preview img { width: 62px; height: 50px; object-fit: contain; border-radius: 5px; }
.attachment-preview>span { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; }
#removeAttachment { width: 44px; padding: 0; font-size: 24px; background: transparent; border: 0; }
.message-image { display: flex; width: 320px; max-width: 100%; height: 220px; padding: 5px; border-radius: 12px; background: #101c2b; border-color: #435b75; overflow: hidden; }
.message-image img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 7px; }
.message-image+p { margin-top: 5px; }
.message-image:disabled { opacity: 1; }
.image-state { color: var(--muted); font-weight: 400; font-size: 12px; padding: 12px; text-align: center; }
#imageViewer { width: min(1000px, 94vw); max-height: 94dvh; padding: 14px; border: 1px solid #506987; border-radius: 16px; color: #e9eff7; background: #121c2a; }
#imageViewer::backdrop { background: #050b14de; }
.viewer-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.viewer-heading strong { font-size: 14px; overflow-wrap: anywhere; }.viewer-heading button { width: 44px; padding: 0; flex-shrink: 0; font-size: 26px; }
#viewerImage { display: block; max-width: 100%; max-height: 77dvh; margin: 0 auto; object-fit: contain; }
#message { min-height: 53px; max-height: 150px; padding: 13px 14px; resize: vertical; line-height: 1.5; font-size: 14px; }
#message { min-width: 0; }
#send { flex-shrink: 0; width: 46px; height: 48px; padding: 0; background: var(--accent); color: #17293f; border-color: var(--accent); }
#send:disabled { background: #2b3f56; color: #a2b7cd; border-color: #405774; }
.chat-note { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 10px; line-height: 1.5; color: #a0b1c6; }
kbd { font: inherit; }
.notice { margin-top: 20px; padding: 16px 20px; border: 1px solid #897154; border-left-width: 3px; border-radius: 10px; background: #362f29; color: #f6ddbb; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.notice input { margin-top: 10px; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 63px; border-top: 1px solid #2a3c52; color: #91a5bd; font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1000px) {
  .shell { padding: 0 25px; }.lobby { gap: 45px; padding-inline: 0; }.join-panel { padding: 26px; }
  .room { grid-template-columns: 300px minmax(0,1fr); gap: 16px; }.voice-panel { padding: 20px; }
  .room-actions { gap: 4px; }.leave { padding-inline: 10px; }.leave span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }.leave { width: 44px; }
  .desktop-hint { display: none; }.chat-heading { padding: 20px; }.messages { padding: 20px; }.composer { padding: 15px; }
}
@media (max-width: 700px) {
  .shell { padding: 0 17px; }.site-header { height: 70px; gap: 12px; }.brand { font-size: 23px; gap: 8px; }.brand-mark { width: 24px; }.private { max-width: 108px; font-size: 11px; line-height: 1.55; text-align: right; }
  .lobby { grid-template-columns: 1fr; gap: 28px; padding: 32px 0; }.channel-mark { display: none; }.intro h1 { font-size: 40px; letter-spacing: -1.5px; }.intro h1 br:nth-child(2) { display: none; }.intro p { margin-top: 17px; font-size: 15px; }.lobby-footnote { margin-top: 17px; font-size: 12px; }
  .join-panel { padding: 24px; border-radius: 16px; }.join-heading h2 { font-size: 22px; }.join-description { margin-bottom: 21px; }.join-note { margin-top: 18px; }
  .room { grid-template-columns: 1fr; padding: 21px 0 25px; gap: 15px; }.room-toolbar { flex-wrap: wrap; gap: 16px; margin: 0; }.room-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; }.room-heading h1 { font-size: 23px; }.room-heading>span { font-size: 11px; margin: 0; white-space: nowrap; }.room-actions { width: 100%; gap: 8px; }.invite-button { flex: 1; min-width: 0; font-size: 13px; }
  .voice-panel { padding: 17px; border-radius: 13px; }.voice-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }.voice-heading h2 { font-size: 16px; }.connection { margin: 0; font-size: 11px; }.people { gap: 13px; margin: 19px 0; }.avatar { width: 36px; height: 36px; border-radius: 11px; font-size: 16px; }.person strong { font-size: 14px; }.person div>span { font-size: 12px; margin-top: 2px; }.audio-controls { padding-top: 16px; }.control-row button { flex-direction: row; min-height: 44px; font-size: 12px; gap: 7px; }.control-row .icon { width: 17px; height: 17px; }.voice-hint { min-height: 0; margin: 11px 0 14px; font-size: 11px; }summary { padding-top: 0; }
  .chat-panel { min-height: 430px; border-radius: 13px; }.chat-heading { padding: 17px; }.chat-heading h2 { font-size: 16px; }.messages { height: 310px; padding: 18px 15px; }.message { max-width: 92%; }.message p { font-size: 14px; }.composer { padding: 13px; }.chat-note { font-size: 9px; }footer { min-height: 56px; gap: 10px; font-size: 10px; }.notice { padding: 13px 15px; font-size: 13px; }
}
@media (max-width: 360px) {
  .shell { padding-inline: 12px; }.private { max-width: 87px; font-size: 10px; }.brand { font-size: 21px; gap: 6px; }.brand-mark { width: 22px; }
  .room-heading h1 { font-size: 20px; }.room-heading>span { font-size: 10px; }.voice-panel { padding: 15px; }.connection { max-width: 175px; line-height: 1.5; }.join-panel { padding: 20px; }.join-heading h2 { font-size: 20px; }.control-row button { font-size: 11px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
