#online-gate{position:fixed;inset:0;z-index:9999;background:var(--bg);display:grid;place-items:center;padding:24px;overflow:auto}
.online-auth{width:min(100%,380px);padding:30px;border-radius:24px;background:var(--panel);border:1px solid var(--line)}
.online-brand{font-size:26px;font-weight:800;color:var(--accent)}
.online-auth h1{font-size:25px;margin:28px 0 10px}.online-auth p,.online-auth small{color:var(--muted);line-height:1.6}
.online-auth label{display:grid;gap:8px;margin-top:20px;font-size:14px}.online-auth input{width:100%;box-sizing:border-box;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--soft);color:var(--text);font-size:16px}
.online-auth button{width:100%;margin:8px 0;padding:14px;border-radius:12px}.online-auth small{display:block;margin-top:20px;font-size:12px}
#online-auth-error{min-height:22px;color:var(--up);font-size:13px}.online-disconnected #save-status{color:var(--up)}
.online-busy #submit-order,.online-busy [data-close],.online-busy [data-close-group],.online-busy #modal-form button[type=submit]{pointer-events:none;opacity:.55}
.online-mode #pause,.online-mode #speed{opacity:.45;cursor:default}
.online-profile-button{width:36px;height:36px;padding:0;border:1px solid var(--line);border-radius:50%;background:var(--soft);color:var(--accent);font-weight:700;overflow:hidden;flex-shrink:0}.online-profile-button img,.online-profile-preview img{width:100%;height:100%;object-fit:cover}
.online-dialog{box-sizing:border-box;width:min(480px,calc(100% - 32px));max-height:85dvh;overflow:auto;padding:24px;border:1px solid var(--line);border-radius:20px;background:var(--panel);color:var(--text)}.online-dialog::backdrop{background:#0008}.online-dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.online-dialog-head h2{font-size:20px;margin:0}.online-dialog-head button{font-size:24px;background:none;border:0;color:var(--muted)}.online-dialog label{display:grid;gap:8px;margin:20px 0 12px}.online-dialog input:not([type=file]){width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;background:var(--soft);color:var(--text);padding:12px;font-size:16px}.online-profile-preview{width:88px;height:88px;display:grid;place-items:center;background:var(--soft);border-radius:50%;overflow:hidden;margin:0 auto;font-size:32px;color:var(--accent)}.online-photo-label input{font-size:13px;max-width:100%}.online-profile-note,.online-dialog p,.online-member small{font-size:13px;color:var(--muted);line-height:1.5}#online-profile-error,#online-admin-error,#online-pending-error{color:var(--up);font-size:13px}.online-dialog form>button[type=submit]{width:100%;margin-top:12px}.online-members{width:min(620px,calc(100% - 32px))}.online-member{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 0;border-bottom:1px solid var(--line)}.online-member small{display:block;margin-top:6px}.online-member-actions{display:flex;gap:6px;flex-wrap:wrap}.online-member-actions button{padding:8px 10px;font-size:12px}.online-dialog .action-button{white-space:nowrap}
@media(max-width:480px){.online-auth{padding:24px}.online-auth h1{font-size:22px}.online-member{align-items:flex-start;flex-direction:column}.online-dialog{padding:20px}.online-profile-button{width:30px;height:30px}}
.online-settings-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.online-settings-actions .action-button{flex:1;min-width:100px}
.settings-market{margin-top:18px;border-top:1px solid var(--line);padding-top:14px;color:var(--muted);font-size:12px}.settings-market summary{cursor:pointer;margin-bottom:10px}#scenario-queue{max-height:220px;overflow:auto;padding:12px;background:var(--soft);border-radius:10px;margin-top:16px}#scenario-queue h3,#scenario-preview h3{font-size:14px}#scenario-preview{max-height:220px;overflow:auto}#scenario-install{width:100%;margin-top:8px}#scenario-error{color:var(--accent);min-height:20px}
#online-crop-editor{text-align:center;margin:0 auto}#online-crop-editor[hidden],.online-profile-preview[hidden]{display:none}
#online-crop-canvas{display:block;width:min(256px,100%);height:auto;aspect-ratio:1;margin:auto;border-radius:50%;background:var(--soft);touch-action:none;cursor:grab;outline-offset:4px}#online-crop-canvas:active{cursor:grabbing}#online-crop-help{font-size:12px;margin:10px 0}
.online-dialog .online-crop-zoom{grid-template-columns:1fr auto;text-align:left;margin:14px 0 4px}.online-crop-zoom input[type=range]{grid-column:1/-1;padding:0;border:0;accent-color:var(--accent);height:28px;background:none}.online-crop-zoom output{color:var(--muted);font-size:13px}
.player-rankings{max-width:1050px}.player-ranking-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.player-ranking-heading h1{font-size:28px;margin:0 0 10px}.player-ranking-heading p{margin:0;font-size:12px;color:var(--muted)}.player-ranking-heading button{white-space:nowrap}.player-ranking-hint{font-size:13px;color:var(--muted);margin:0 0 24px}.player-ranking-tabs{display:flex;gap:8px;margin-bottom:20px;overflow:auto}.player-ranking-tabs button{padding:11px 18px;white-space:nowrap;border-radius:12px;background:var(--soft);color:var(--muted);font-size:14px}.player-ranking-tabs button.active{color:var(--accent);background:var(--accent-bg);font-weight:700}.player-ranking-card .section-heading h2{font-size:18px}.player-ranking-card .section-heading>span{font-size:12px;color:var(--muted)}.player-ranking-row{display:grid;grid-template-columns:30px 44px minmax(0,1fr) minmax(0,auto);align-items:center;gap:14px;padding:18px 10px;border-top:1px solid var(--line);border-radius:10px}.player-ranking-row.is-me{background:var(--accent-bg)}.player-rank-number{font-size:17px;font-weight:700;color:var(--muted);text-align:center}.player-rank-avatar{width:44px;height:44px;border-radius:50%;overflow:hidden;background:var(--soft);display:grid;place-items:center;font-weight:700;color:var(--accent)}.player-rank-avatar img{width:100%;height:100%;object-fit:cover}.player-rank-name{min-width:0}.player-rank-name strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-rank-name small{display:block;font-size:11px;color:var(--muted);margin-top:5px}.player-rank-value{font-size:20px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;text-align:right;min-width:0}.player-ranking-definition{margin:22px 0;color:var(--muted);font-size:12px;line-height:1.7}.player-ranking-definition summary{cursor:pointer}.player-ranking-definition p{margin:12px 0}#online-ranking-error{font-size:13px;color:var(--up);min-height:18px}
@media(min-width:701px) and (max-width:1100px){.online-mode .topbar{gap:16px}.online-mode .topbar nav{gap:13px}.online-mode .header-end{gap:6px}.online-mode .header-search{width:34px}.online-mode .header-search>span:nth-child(2){display:none}}
@media(max-width:700px){.online-mode .topbar nav button{font-size:10px}.player-ranking-heading{align-items:flex-start;flex-direction:column}.player-ranking-heading h1{font-size:25px}.player-ranking-heading button{width:100%;margin-top:8px}.player-ranking-tabs{gap:6px}.player-ranking-tabs button{flex:1;padding:10px 6px;font-size:12px}.player-ranking-hint{font-size:12px;line-height:1.6;margin-bottom:16px}.player-ranking-row{grid-template-columns:24px 36px minmax(0,1fr);gap:10px;padding:14px 8px}.player-rank-avatar{width:36px;height:36px}.player-rank-value{grid-column:3;justify-self:start;text-align:left;font-size:19px;margin-top:-6px}.player-rank-name strong{font-size:14px}.player-ranking-card{padding:18px}}
.chat-launcher{position:fixed;right:24px;bottom:36px;z-index:75;display:flex;align-items:center;gap:8px;padding:13px 17px;border-radius:18px;background:var(--accent);color:var(--bg);box-shadow:0 4px 22px #0003;font-weight:700}.chat-launcher svg{width:20px;height:20px}.chat-launcher b{position:absolute;top:-6px;right:-6px;font-size:11px;background:var(--up);color:#fff;border-radius:20px;padding:3px 6px}.chat-launcher b[hidden],.chat-panel[hidden],#chat-new[hidden]{display:none}
.chat-panel{position:fixed;right:24px;bottom:94px;z-index:80;display:flex;flex-direction:column;width:min(380px,calc(100vw - 32px));height:min(550px,calc(100dvh - 150px));box-sizing:border-box;border:1px solid var(--line);border-radius:20px;background:var(--panel);color:var(--text);box-shadow:0 14px 60px #0004;overflow:hidden}.chat-panel header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px;border-bottom:1px solid var(--line)}.chat-panel header strong{font-size:17px}.chat-panel header small{display:block;margin-top:5px;font-size:11px;color:var(--muted)}#chat-close{font-size:25px;background:none;color:var(--muted);padding:2px 7px}.chat-panel form{padding:14px;border-top:1px solid var(--line);background:var(--panel)}#chat-input{display:block;box-sizing:border-box;width:100%;resize:none;font-size:16px;line-height:1.4;border:1px solid var(--line);background:var(--soft);color:var(--text);border-radius:12px;padding:12px}.chat-compose-footer{display:flex;align-items:center;justify-content:space-between;margin-top:8px}.chat-compose-footer small{font-size:11px;color:var(--muted)}#chat-send{padding:8px 18px}#chat-error{font-size:12px;color:var(--up);margin:8px 0 0}#chat-error:empty{display:none}#chat-messages{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:14px;scrollbar-gutter:stable}.chat-message{display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;margin:0 0 18px}.chat-avatar{width:30px;height:30px;background:var(--soft);border-radius:50%;overflow:hidden;display:grid;place-items:center;color:var(--accent);font-size:12px;font-weight:700}.chat-avatar img{width:100%;height:100%;object-fit:cover}.chat-meta{display:flex;align-items:baseline;gap:8px}.chat-meta strong{font-size:12px;overflow-wrap:anywhere}.chat-meta time{font-size:10px;color:var(--muted);white-space:nowrap}.chat-message p{width:fit-content;max-width:100%;box-sizing:border-box;background:var(--soft);padding:9px 12px;border-radius:0 12px 12px;margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.6}.chat-message.is-me p{background:var(--accent-bg)}.chat-empty{color:var(--muted);font-size:13px;line-height:1.7;text-align:center;margin-top:32px}#chat-new{position:absolute;align-self:center;bottom:145px;background:var(--accent);color:var(--bg);border-radius:20px;padding:7px 14px;font-size:12px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.career-rewards summary{cursor:pointer;font-size:16px;font-weight:700}.career-rewards summary small{font-size:11px;font-weight:400;color:var(--muted);margin-left:6px}
@media(max-width:700px){body.chat-open{overflow:hidden}.chat-launcher{bottom:calc(80px + env(safe-area-inset-bottom));right:16px;padding:11px;border-radius:16px}.chat-launcher>span{display:none}body[data-page=trade] .chat-launcher{bottom:calc(156px + env(safe-area-inset-bottom))}.chat-panel{inset:0;border-radius:0;width:100%;height:100dvh;z-index:200;padding-top:env(safe-area-inset-top)}.chat-panel form{padding-bottom:calc(14px + env(safe-area-inset-bottom))}.chat-message p{font-size:14px}}
