* { box-sizing: border-box; }
html, body { margin: 0; background: #070b08; color: #e8f2ea; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { background: radial-gradient(circle at 50% -20%, #12361e 0%, #070b08 60%) fixed; min-height: 100vh; }
.shell { max-width: 640px; margin: 0 auto; padding: 12px 14px 24px; }
.top { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; }
.top h1 { font-size: 1.25rem; margin: 0; flex: 1; letter-spacing: .5px; text-transform: uppercase; font-weight: 900; font-style: italic; }
.top h1 span { color: #3dff7a; }
h2, h3 { margin: 0; }
.hello { margin: 0 0 12px; color: #9fb7a5; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.card { background: linear-gradient(160deg, #111a14, #0c120e); border: 1px solid #1f3a27; border-radius: 16px; padding: 16px; color: inherit; text-align: left; }
.hero { display: flex; flex-direction: column; gap: 6px; cursor: pointer; border-color: #3dff7a55; box-shadow: 0 0 24px #3dff7a22; font: inherit; width: 100%;
	background: linear-gradient(135deg, #0f2f1a, #0b130e 70%), repeating-linear-gradient(90deg, #ffffff05 0 30px, transparent 30px 60px); }
.hero h2 { font-size: 1.5rem; }
.hero p { margin: 0 0 8px; color: #a9c2b0; }
.kicker { color: #3dff7a; font-size: .72rem; font-weight: 800; letter-spacing: 2px; }
.section { color: #9fb7a5; font-size: .85rem; text-transform: uppercase; letter-spacing: 1.5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid #2a4a33;
	background: #142019; color: #e8f2ea; font: inherit; font-weight: 700; cursor: pointer; align-self: flex-start; }
.btn.primary { background: #3dff7a; color: #04170a; border-color: #3dff7a; }
.btn.primary:disabled { opacity: .6; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .85rem; }
.btn.icon { padding: 0 12px; font-size: 1.2rem; }
.btn:focus-visible, .input:focus-visible, .link:focus-visible { outline: 2px solid #3dff7a; outline-offset: 2px; }
.input { min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid #2a4a33; background: #0a100c; color: #e8f2ea; font: inherit; font-size: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: #9fb7a5; }
.auth { display: flex; flex-direction: column; gap: 12px; }
.auth .btn.primary { width: 100%; }
.link { background: none; border: 0; color: #3dff7a; font: inherit; font-size: .88rem; cursor: pointer; padding: 6px 0; text-decoration: none; }
.alert { padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
.alert-error { background: #3a1212; color: #ffb4b4; border: 1px solid #6a2020; }
.badge { font-size: .75rem; color: #9fb7a5; }
.badge.on { color: #3dff7a; }
.loading { display: flex; justify-content: center; padding: 30px; }
.spinner { width: 28px; height: 28px; border: 3px solid #1f3a27; border-top-color: #3dff7a; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 28px 12px; color: #7f9886; }
.empty-title { font-weight: 600; }
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: #0f1712; border: 1px solid #1f3a27; border-radius: 14px; }
.room b { display: block; overflow-wrap: anywhere; }
.room small { color: #7f9886; }
.chat { display: flex; flex-direction: column; height: calc(100dvh - 76px); }
.chat-head { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid #1f3a27; }
.chat-head h2 { font-size: 1.1rem; overflow-wrap: anywhere; }
.chat .msgs, .chat .empty, .chat .loading { flex: 1; overflow-y: auto; }
.msgs { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.preview .msgs { max-height: 260px; overflow: hidden; }
.msg { max-width: 85%; align-self: flex-start; background: #142019; border: 1px solid #1f3a27; border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.msg.mine { align-self: flex-end; background: #13401f; border-color: #3dff7a55; border-radius: 14px 14px 4px 14px; }
.msg .meta { font-size: .72rem; color: #8fae98; margin-bottom: 3px; }
.msg .meta b { color: #3dff7a; }
.msg .body { overflow-wrap: anywhere; white-space: pre-wrap; }
.msg img { display: block; max-width: 100%; max-height: 280px; border-radius: 10px; margin: 4px 0; object-fit: cover; }
.composer { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid #1f3a27; }
.composer .input { min-width: 0; }
.composer .row { flex-wrap: nowrap; }
.attach { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: .85rem; background: #0f1712; padding: 8px 10px; border-radius: 10px; }
.check { display: flex; gap: 6px; align-items: center; color: #3dff7a; }
.check input { width: 20px; height: 20px; accent-color: #3dff7a; }
