:root {
  color-scheme: dark;
  --bg: #151714;
  --panel: #20231d;
  --raised: #282d24;
  --line: #3a4034;
  --ink: #f3f4eb;
  --muted: #afb7a8;
  --lime: #ddf88b;
  --danger: #ffc2ad;
  font: 14px/1.45 "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: #111310;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 260px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a, .photo-picker { transition: background-color 140ms, color 140ms, border-color 140ms; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .58; cursor: wait; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
button, input, select, textarea { border-radius: 10px; }
h1, h2, p { margin: 0; }
a { color: var(--lime); }
.shell { width: min(100%, 440px); margin: min(7vh, 60px) auto; background: var(--bg); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 22px 72px #0006; }
.native { background: var(--bg); }
.native .shell { width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 15px; border-bottom: 1px solid var(--line); background: #191c17; }
.brand { display: flex; align-items: center; flex: 1; gap: 9px; user-select: none; min-width: 0; }
.brand strong { display: block; font-size: 15px; line-height: 1.15; font-weight: 720; }
.brand small { color: var(--muted); font-size: 11px; }
.native #grip { cursor: grab; }
.window-actions { display: flex; gap: 2px; align-items: center; }
.icon { position: relative; flex: none; width: 34px; height: 34px; background: transparent; border: 1px solid transparent; }
.icon:hover { background: var(--raised); border-color: var(--line); }
.icon[aria-pressed="true"] { color: var(--lime); background: #303e24; }
.icon::before, .icon::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.close::before, .close::after, .minimize::before { width: 12px; height: 1.5px; background: currentColor; }
.close::before { transform: translate(-50%, -50%) rotate(45deg); }
.close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.minimize::before { top: 60%; }
.pin::before { width: 9px; height: 9px; border: 1.5px solid currentColor; border-radius: 2px; transform: translate(-50%, -67%) rotate(35deg); }
.pin::after { width: 1.5px; height: 7px; background: currentColor; transform: translate(-3px, 1px) rotate(35deg); }
main { padding: 16px; }
.welcome-cover { height: 153px; display: flex; position: relative; overflow: hidden; border-radius: 15px; align-items: end; padding: 16px; background: var(--lime); color: #141c0d; }
.welcome-heading { position: relative; z-index: 1; }
.welcome-heading h1 { font-size: clamp(29px, 8.5vw, 37px); font-weight: 780; letter-spacing: -.055em; line-height: 1; }
.welcome-heading p { max-width: 230px; margin-top: 8px; font-size: 13px; font-weight: 550; }
.signal { position: absolute; width: 134px; height: 134px; border-radius: 50%; right: 0; top: -34px; }
.signal i { position: absolute; inset: 3px; border-radius: 50%; border: 1px solid #53673770; }
.signal i:nth-child(2) { inset: 19px; }
.signal i:nth-child(3) { inset: 35px; }
.signal b { position: absolute; inset: 56px; border-radius: 50%; background: #1c2813; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 15px 0; border: 1px solid var(--line); padding: 3px; border-radius: 13px; background: #191c17; }
.mode { padding: 8px 6px; border: 1px solid transparent; background: none; color: var(--muted); font-weight: 630; }
.mode:hover { color: var(--ink); }
.mode.chosen { background: var(--raised); border-color: var(--line); color: var(--ink); }
.form { display: grid; gap: 11px; }
.form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
input, textarea, select { width: 100%; padding: 9px 10px; color: var(--ink); background: #181b16; border: 1px solid #4d5546; font-size: 14px; }
input::placeholder, textarea::placeholder { color: #959e8e; }
textarea { min-height: 76px; resize: vertical; }
.primary, .secondary, .danger { min-height: 36px; border: 1px solid transparent; padding: 8px 11px; font-weight: 680; }
.primary { background: var(--lime); color: #162014; }
.primary:hover { background: #edffb8; }
.secondary { background: var(--raised); color: var(--lime); border-color: var(--line); }
.secondary:hover { border-color: #687851; background: #333c2a; }
.danger { background: #422b23; border-color: #774c3d; color: var(--danger); }
.danger:hover { background: #56382d; }
.subtle { background: transparent; color: var(--muted); border: 0; padding: 7px 5px; font-size: 12px; }
.subtle:hover { color: var(--ink); background: var(--raised); }
.form-error { color: var(--danger); font-size: 12px; overflow-wrap: anywhere; }
.download { display: grid; gap: 4px; padding: 14px 0 0; border-top: 1px solid var(--line); margin-top: 16px; }
.download a { text-decoration: none; font-weight: 650; }
.download a:hover { text-decoration: underline; }
.download small { color: var(--muted); }
.room-heading { margin-bottom: 13px; }
.connection { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.connection i,.status i { width: 7px; height: 7px; border-radius: 50%; background: #a4a89e; flex: none; }
.connection[data-online="true"] i { background: var(--lime); box-shadow: 0 0 0 3px #ddf88220; }
.room-title { margin-top: 3px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.room-title h1 { font-size: 29px; line-height: 1.13; letter-spacing: -.04em; font-weight: 750; overflow-wrap: anywhere; }
.members { display: grid; gap: 9px; }
.member { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 11px; background: var(--panel); min-width: 0; }
.member.self { background: #282e22; border-color: #45523a; }
.member-header { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 9px; align-items: center; }
.avatar { position: relative; overflow: hidden; border: 1px solid #59654d; border-radius: 13px; width: 44px; height: 44px; display: grid; place-items: center; background: #343e2c; color: var(--lime); font-size: 17px; font-weight: 750; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member-name { overflow-wrap: anywhere; font-size: 15px; font-weight: 720; line-height: 1.15; }
.status { display: flex; gap: 5px; align-items: center; margin-top: 4px; width: fit-content; color: var(--lime); font-size: 11px; font-weight: 600; }
.status i { width: 6px; height: 6px; background: currentColor; }
.status[data-status="busy"] { color: #ffba97; }
.status[data-status="away"] { color: #c1c8b9; }
.status[data-status="rest"] { color: #d3c5ff; }
.member .subtle { padding: 5px 7px; color: var(--ink); border: 1px solid var(--line); }
.message { overflow-wrap: anywhere; white-space: pre-wrap; font-size: 13px; color: #e7ebdf; padding: 8px 9px; border-radius: 9px; background: #171a15; }
.message.empty { color: var(--muted); }
.waiting { margin-top: 11px; border: 1px dashed #46513e; padding: 13px 10px; border-radius: 13px; color: var(--muted); font-size: 13px; }
.room-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.notice { color: var(--lime); margin-top: 10px; font-size: 12px; overflow-wrap: anywhere; }
.peer .member { padding: 8px; border: 0; background: transparent; }
.peer .member-header { grid-template-columns: 44px 1fr; }
.peer .message { max-height: 88px; overflow-y: auto; }
.detached main { padding: 9px; }
.detached .topbar { padding: 8px 10px; }
dialog { width: min(calc(100vw - 22px), 402px); max-height: calc(100dvh - 24px); overflow: auto; padding: 0; border: 1px solid #58634e; border-radius: 17px; background: var(--panel); color: var(--ink); box-shadow: 0 18px 70px #0008; }
dialog::backdrop { background: #090a08bb; }
.dialog-form { padding: 13px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.dialog-heading h2 { font-size: 21px; letter-spacing: -.025em; }
.dialog-copy { color: var(--muted); }
.photo-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.form .photo-picker { position: relative; display: inline-flex; border: 1px solid #5a684e; padding: 6px 9px; border-radius: 8px; color: var(--ink); cursor: pointer; }
.photo-picker:hover { background: var(--raised); }
.photo-picker input { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; opacity: 0; }
.photo-picker:focus-within { outline: 2px solid var(--lime); outline-offset: 3px; }
@media (max-width: 460px) {
  body:not(.native) .shell { margin: 0; border-radius: 0; border: 0; min-height: 100svh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
