:root { color-scheme: dark; --ink:#eef6f4; --muted:#9aafb0; --line:#29414a; --bg:#101a20; --surface:#16242b; --surface-2:#1c3038; --teal:#58cbb9; --gold:#efc45a; --blue:#86b8f7; --red:#ff988d; font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }

* { box-sizing:border-box; }
 body { min-height:100vh; margin:0; color:var(--ink); background:#101a20; }
 button,input,textarea { font:inherit; }
 button { cursor:pointer; }
 button:disabled { opacity:.55; cursor:wait; }
 .hidden { display:none!important; }
 .sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

.login-view { min-height:100vh; max-width:1120px; margin:auto; padding:60px 28px; display:grid; grid-template-columns:minmax(0,1.2fr) minmax(330px,.8fr); align-items:center; gap:clamp(40px,8vw,120px); }
 .login-intro { max-width:610px; }
 .kicker { margin:0 0 9px; color:var(--teal); font-size:.74rem; font-weight:800; letter-spacing:.12em; }
 h1,h2,h3,p { margin-top:0; }
 h1 { margin-bottom:16px; font-size:clamp(2.8rem,6vw,5rem); line-height:1; letter-spacing:0; }
 h2 { margin-bottom:8px; font-size:1.45rem; }
 h3 { font-size:1rem; }
 .login-intro>p:not(.kicker) { color:var(--muted); max-width:46ch; font-size:1.08rem; line-height:1.6; }
 .feature-list { display:grid; gap:9px; margin:26px 0 0; padding:0; list-style:none; color:var(--ink); }
 .feature-list li::before { content:"+"; color:var(--gold); font-weight:800; margin-right:10px; }

.auth-form,.composer,.post-card,.player-card,.profile-header,.profile-form,.community-note,.messages-layout { border:1px solid var(--line); border-radius:8px; background:var(--surface); }
 .auth-form { padding:28px; }
 .auth-form h2 { font-size:1.2rem; line-height:1.35; }
 label { display:grid; gap:7px; margin:15px 0; color:var(--muted); font-size:.86rem; }
 input,textarea { width:100%; border:1px solid #42616b; border-radius:5px; outline:none; padding:10px 11px; color:var(--ink); background:#0e181d; }
 input:focus,textarea:focus { border-color:var(--teal); box-shadow:0 0 0 2px rgba(88,203,185,.18); }
 textarea { min-height:100px; resize:vertical; line-height:1.5; }
 button { min-height:36px; border:1px solid var(--teal); border-radius:5px; padding:7px 12px; color:#06201d; background:var(--teal); font-weight:800; }
 button:hover { filter:brightness(1.06); }
 .secondary,.plain-button,.like-post,.delete-post { color:var(--ink); background:transparent; border-color:#4f6a73; }
 .plain-button { border:0; min-height:auto; padding:5px 7px; color:var(--muted); }
 .form-message { min-height:1.3em; margin:10px 0 0; color:var(--red); font-size:.86rem; }
 .form-message.good { color:var(--teal); }

.topbar { position:sticky; top:0; z-index:5; min-height:64px; padding:0 max(18px,calc((100vw - 1500px)/2)); display:flex; align-items:center; gap:24px; border-bottom:1px solid var(--line); background:rgba(16,26,32,.95); backdrop-filter:blur(12px); }
 .wordmark { min-height:auto; padding:0; border:0; color:var(--ink); background:transparent; font-size:1.13rem; white-space:nowrap; }
 .wordmark span { color:var(--teal); }
 nav { display:flex; align-self:stretch; gap:3px; }
 .nav-button { min-height:100%; padding:0 11px; color:var(--muted); border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; }
 .nav-button.active { color:var(--ink); border-bottom-color:var(--teal); }
 .top-account { display:flex; align-items:center; gap:8px; margin-left:auto; }
 .notification-button.enabled { color:var(--teal); }
 .account-button { display:flex; align-items:center; gap:7px; min-height:36px; padding:3px 7px 3px 3px; color:var(--ink); border-color:transparent; background:transparent; }

.social-shell { width:min(100% - 32px,1500px); margin:26px auto; display:grid; grid-template-columns:220px minmax(0,760px) 240px; justify-content:center; align-items:start; gap:24px; }
 .left-rail,.right-rail { position:sticky; top:86px; }
 .self-card { width:100%; display:flex; align-items:center; gap:10px; padding:0 0 16px; color:var(--ink); text-align:left; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; }
 .self-card small { display:block; margin-top:3px; color:var(--muted); font-weight:400; }
 .rail-link { display:block; width:100%; padding:10px 0; color:var(--muted); text-align:left; border:0; border-radius:0; background:transparent; }
 .rail-link.active { color:var(--teal); }
 .rail-note { margin-top:22px; color:var(--muted); font-size:.86rem; line-height:1.55; }
 code { color:var(--gold); }
 .community-note { padding:16px; margin-bottom:13px; color:var(--muted); line-height:1.5; font-size:.9rem; }
 .community-note h2 { color:var(--ink); font-size:1.03rem; }

.composer { padding:16px; margin-bottom:18px; }
 .composer-heading { display:flex; align-items:flex-start; gap:10px; }
 .composer textarea { min-height:82px; border:0; border-radius:0; background:transparent; }
 .composer-actions { display:flex; align-items:center; gap:10px; padding:11px 0 0 42px; border-top:1px solid var(--line); }
 .composer-actions button[type="submit"] { margin-left:auto; }
 .file-button { display:inline-flex; width:auto; margin:0; cursor:pointer; color:var(--blue); font-weight:700; }
 .file-button input { position:absolute; width:1px; height:1px; opacity:0; }
 .capture-controls { display:flex; flex-wrap:wrap; gap:7px; }
 .capture-button { min-height:32px; padding:5px 9px; font-size:.8rem; }
 .capture-button.is-recording { color:#fff4ef; border-color:#b86658; background:#7a4039; }
 .muted { color:var(--muted); }
 .feed { display:grid; gap:16px; }
 .post-card { padding:16px; }
 .post-header { display:flex; justify-content:space-between; gap:14px; }
 .identity,.profile-preview { display:flex; align-items:center; gap:9px; min-height:0; padding:0; color:var(--ink); text-align:left; border:0; background:transparent; }
 .post-author,.profile-preview strong { display:block; color:var(--ink); }
 .post-time,.profile-preview small { display:block; margin-top:2px; color:var(--muted); font-size:.78rem; }
 .post-content { margin:15px 0; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
 .post-media img,.post-media video { display:block; width:100%; max-height:650px; object-fit:contain; border:1px solid var(--line); border-radius:5px; background:#080f13; }
 .post-actions { margin-top:12px; }
 .like-post.liked { color:var(--teal); border-color:var(--teal); }
 .delete-post { min-height:30px; padding:4px 8px; color:var(--red); border-color:#7d514d; font-size:.8rem; }
 .comments { display:grid; gap:9px; margin:14px 0; }
 .comment { display:flex; gap:7px; align-items:flex-start; min-height:0; padding:0; color:var(--muted); text-align:left; border:0; background:transparent; font-size:.87rem; line-height:1.42; }
 .comment strong { display:block; color:var(--ink); font-size:.82rem; }
 .comment-form { display:flex; gap:8px; }
 .comment-form label { display:none; }
 .comment-input { padding:7px 9px; }
 .comment-form button { min-height:34px; padding:5px 10px; }

.avatar { flex:0 0 auto; width:42px; height:42px; display:grid; place-items:center; overflow:hidden; border:1px solid #50727a; border-radius:50%; color:#09201d; background:#d2c079 center/cover no-repeat; font-weight:900; }
 .avatar.small { width:29px; height:29px; font-size:.7rem; }
 .avatar.has-image { color:transparent; }
 .comment-avatar { width:28px; height:28px; font-size:.65rem; }
 .profile-avatar { width:100px; height:100px; font-size:1.5rem; }
 .player-avatar { width:52px; height:52px; }

.view-heading { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:18px; }
 .view-heading h2 { margin-bottom:5px; }
 .search-label { width:min(250px,100%); margin:0; }
 .players-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
 .player-card { padding:14px; }
 .profile-preview { width:100%; }
 .profile-preview small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
 .player-card footer { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:15px; font-size:.82rem; }

.messages-layout { display:grid; grid-template-columns:270px minmax(0,1fr); min-height:560px; overflow:hidden; }
 .conversation-list { border-right:1px solid var(--line); background:#132129; }
 .conversation { width:100%; display:flex; align-items:center; gap:9px; padding:12px; color:var(--ink); text-align:left; border:0; border-bottom:1px solid #263d46; border-radius:0; background:transparent; }
 .conversation>span:nth-child(2) { min-width:0; }
 .conversation small { display:block; overflow:hidden; color:var(--muted); font-size:.77rem; text-overflow:ellipsis; white-space:nowrap; }
 .badge { display:inline-grid; place-items:center; min-width:19px; min-height:19px; margin-left:auto; padding:1px 5px; border-radius:10px; color:#10201e; background:var(--gold); font-size:.7rem; font-weight:900; }
 .message-thread { min-height:560px; display:flex; flex-direction:column; }
 .thread-header { display:flex; align-items:center; gap:8px; padding:13px; border-bottom:1px solid var(--line); }
 .thread-header .plain-button { margin-left:auto; }
 .message-list { flex:1; display:flex; flex-direction:column; gap:8px; overflow:auto; padding:16px; }
 .message { max-width:min(78%,530px); margin:0; padding:9px 11px; border-radius:7px; line-height:1.45; overflow-wrap:anywhere; }
 .message.sent { align-self:flex-end; color:#07211d; background:var(--teal); }
 .message.received { align-self:flex-start; background:#29414a; }
 .message-form { display:flex; gap:8px; padding:12px; border-top:1px solid var(--line); }
 .message-form textarea { min-height:42px; max-height:130px; }
 .message-form button { align-self:flex-end; }

.profile-header { display:flex; align-items:flex-start; gap:18px; padding:22px; }
 .profile-header h2 { margin-bottom:3px; font-size:1.7rem; }
 .profile-handle { margin:0 0 12px; color:var(--blue); font-size:.88rem; }
 .profile-bio { margin-bottom:10px; color:var(--ink); line-height:1.55; white-space:pre-wrap; }
 .profile-actions { margin-top:15px; }
 .profile-form { max-width:620px; margin-top:16px; padding:18px; }
 .profile-form h3 { margin-bottom:12px; }
 .field-note { margin:-8px 0 14px; color:var(--muted); font-size:.8rem; line-height:1.45; }
 .check-label { display:flex; grid-template-columns:none; align-items:center; gap:8px; }
 .check-label input { width:auto; }
 .form-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; }
 .form-footer .form-message { margin:0; }
 .empty-state { display:grid; place-items:center; min-height:180px; padding:20px; color:var(--muted); text-align:center; border:1px dashed #415f68; border-radius:8px; }
 .compact-empty { min-height:80px; margin:12px; }

@media (max-width:1100px) { .social-shell { grid-template-columns:200px minmax(0,760px); }
 .right-rail { display:none; }
 }

@media (max-width:760px) { .login-view { grid-template-columns:1fr; gap:34px; padding:44px 20px; }
 .topbar { min-height:auto; flex-wrap:wrap; gap:8px; padding:10px 16px 0; }
 nav { order:3; width:100%; overflow:auto; }
 .nav-button { min-height:38px; padding:0 9px; white-space:nowrap; }
 .top-account { margin-left:auto; }
 #accountName,#logoutButton { display:none; }
 .social-shell { width:min(100% - 24px,760px); grid-template-columns:1fr; margin-top:16px; }
 .left-rail,.right-rail { display:none; }
 .view-heading { align-items:flex-start; flex-direction:column; }
 .search-label { width:100%; }
 .players-grid { grid-template-columns:1fr; }
 .messages-layout { grid-template-columns:1fr; min-height:0; }
 .conversation-list { max-height:220px; overflow:auto; border-right:0; border-bottom:1px solid var(--line); }
 .message-thread { min-height:430px; }
 .composer-actions { flex-wrap:wrap; padding-left:0; }
 .composer-actions button[type="submit"] { margin-left:auto; }
 .profile-header { align-items:center; flex-direction:column; text-align:center; }
 .profile-avatar { width:84px; height:84px; }
 }
