:root{--member-surface:#181e27;--member-muted:#a1afc2;--member-border:#343e4d;--member-gold:#f5ca60;--member-green:#78cfaf}button,a,input,select,textarea{touch-action:manipulation}.member-tools{display:flex;align-items:center;gap:8px}.member-tools>a{text-decoration:none;white-space:nowrap}.notification-toggle{position:relative;border:1px solid var(--member-border);background:#1a202a;color:var(--member-gold);width:42px;height:42px;border-radius:12px;cursor:pointer}.notification-toggle svg{width:21px;height:21px}.notification-toggle b{position:absolute;right:-5px;top:-5px;background:var(--member-gold);color:#131820;border-radius:20px;padding:2px 5px;font-size:10px}.notification-panel{position:fixed;right:24px;top:92px;width:390px;max-height:min(680px,80dvh);overflow:auto;background:var(--member-surface);border:1px solid var(--member-border);box-shadow:0 20px 60px #0009;border-radius:18px;z-index:140;padding:20px}.member-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}.member-heading h2,.member-heading h3{margin:7px 0}.member-heading .quiet{flex-shrink:0}.text-button{background:none;border:0;padding:10px 0;color:var(--member-gold);cursor:pointer;text-align:left}.notification-row{width:100%;border:0;border-top:1px solid #ffffff12;border-radius:10px;background:transparent;color:#e9eef6;text-align:left;display:flex;gap:12px;padding:16px 10px;cursor:pointer}.notification-row:hover,.notification-row.unread{background:#f5ca600a}.notification-icon{display:grid;place-items:center;align-self:start;width:32px;height:32px;flex-shrink:0;border:1px solid #f5ca6030;border-radius:10px;color:var(--member-gold)}.notification-row>span:last-child{display:grid;gap:7px}.notification-row small,.notification-row span span{color:var(--member-muted);line-height:1.5}.notification-row.unread strong:after{content:'';display:inline-block;width:6px;height:6px;background:var(--member-gold);border-radius:50%;margin-left:8px}.notification-empty{color:var(--member-muted);padding:20px 0}.member-dialog{border:1px solid #3a485b;background:#151c26;color:#edf1f6;border-radius:22px;padding:26px;width:min(640px,calc(100vw - 24px));max-height:90dvh;overflow:auto;box-shadow:0 30px 100px #0009}.member-dialog::backdrop{background:#060b12c9;backdrop-filter:blur(5px)}.member-dialog.compact{max-width:470px}.member-dialog-body{margin-top:22px}.member-form{display:grid;gap:14px;border-top:1px solid #ffffff15;padding:24px 0 8px;margin-top:20px}.member-form label{display:grid;gap:8px;font-size:13px;color:#cad2df}.member-form input,.member-form select,.member-form textarea{width:100%;padding:13px;border:1px solid #394657;border-radius:10px;background:#0e141d;color:#f1f5fa;font:inherit;box-sizing:border-box;resize:vertical}.member-form h3{margin:0}.form-status{min-height:20px;color:var(--member-green);font-size:13px;line-height:1.55;margin:0}.form-status.error,[role=status].error{color:#ffacaa}.member-chip{font-size:11px;border:1px solid #a58a4b;border-radius:20px;padding:6px 9px;color:#f5ca60}.member-chip.success{color:#82d5b5;border-color:#39755f}.profile-identity{display:flex;gap:16px;align-items:center}.profile-identity h3{font-size:24px;margin:0 0 7px}.profile-avatar{display:grid;place-items:center;width:64px;height:64px;border-radius:18px;background:linear-gradient(140deg,#f5ca60,#bf923a);color:#171a20;font-size:23px;font-weight:900}.profile-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:23px 0}.profile-stats>div{background:#202937;border:1px solid #ffffff0b;border-radius:12px;padding:14px 10px;display:grid;gap:8px}.profile-stats strong{font-size:22px;color:var(--member-gold)}.profile-stats small{color:var(--member-muted);font-size:11px}.general-chat-widget{position:fixed;right:24px;bottom:20px;z-index:110;width:350px;max-width:calc(100vw - 24px)}#general-chat-toggle{display:flex;align-items:center;gap:13px;width:100%;padding:15px 19px;border:1px solid #665636;border-radius:15px;background:linear-gradient(100deg,#242a34,#171d26);color:#f2f4f7;box-shadow:0 10px 35px #0005;text-align:left;cursor:pointer}#general-chat-toggle>span:nth-child(2){flex:1;font-weight:750}#general-chat-toggle small{display:block;margin-top:4px;color:#9ba9bc;font-size:10px;font-weight:400}.chat-bubble-icon{font-size:23px;color:var(--member-gold)}#general-unread{border-radius:20px;padding:4px 7px;background:var(--member-gold);color:#181e27;font-size:11px}#general-chat-panel{background:#161d27;border:1px solid #3b4758;border-radius:18px;box-shadow:0 20px 50px #0008;margin-bottom:10px;padding:18px}#general-chat-panel h2{font-size:20px}.chat-intro{font-size:12px;color:#9aabc1;margin:7px 0 14px}#general-chat-log{height:min(340px,42dvh);overflow:auto;overscroll-behavior:contain;padding-right:4px}.general-chat-message{border-top:1px solid #ffffff0c;padding:13px 0}.general-chat-message.mine strong{color:#f5ca60}.general-message-heading{display:flex;align-items:center;gap:7px}.general-message-heading strong{font-size:12px;overflow-wrap:anywhere}.general-message-heading time{margin-left:auto;font-size:9px;color:#8491a3;white-space:nowrap}.general-chat-message p{font-size:13px;line-height:1.6;margin:7px 0 0;overflow-wrap:anywhere;white-space:pre-wrap}.chat-report{background:none;border:0;color:#9aabc1;cursor:pointer}.chat-empty{font-size:13px;color:#9aabc1}#general-chat-form{display:flex;gap:8px;border-top:1px solid #ffffff16;padding-top:14px;margin-top:8px}#general-chat-form input{min-width:0;width:100%;background:#0d141e;color:white;border:1px solid #3a485e;border-radius:9px;padding:11px;font:inherit;font-size:13px}#general-chat-form button{min-width:42px;width:42px;padding:8px}#general-chat-status{font-size:11px;color:#a7b5c7;margin:7px 0 0}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.game-fullscreen .general-chat-widget{display:none}.fullscreen-chat{display:none}.game-stage.is-fullscreen .fullscreen-chat{display:flex;flex-direction:column;position:absolute;right:16px;top:70px;width:min(280px,26vw);max-height:65dvh;z-index:30;background:#101620d9;backdrop-filter:blur(7px);border:1px solid #465166;border-radius:12px;padding:13px;color:#e7edf6;pointer-events:auto}.fullscreen-chat.collapsed .fullscreen-chat-log,.fullscreen-chat.collapsed form{display:none}.fullscreen-chat-heading{display:flex;align-items:center;justify-content:space-between;font-size:11px;letter-spacing:.08em;color:#f5ca60}.fullscreen-chat-heading button{background:none;border:0;color:#d8e0ec;font-size:18px;cursor:pointer}.fullscreen-chat-log{overflow:auto;max-height:40dvh;font-size:12px;overscroll-behavior:contain}.fullscreen-chat .chat-message{padding:9px 0}.fullscreen-chat .chat-message p{margin:5px 0;overflow-wrap:anywhere}.fullscreen-chat .chat-message strong{font-size:10px;color:#f5ca60}.fullscreen-chat form{display:flex;gap:5px;margin-top:9px}.fullscreen-chat input{min-width:0;width:100%;padding:8px;background:#080d15;color:#fff;border:1px solid #45526a;border-radius:6px;font-size:12px}.fullscreen-chat form button{padding:6px 9px;border:0;border-radius:6px;background:#f5ca60;color:#161a20}.game-stage.is-fullscreen .fullscreen-chat-toggle{display:block}@media(max-width:760px){.member-tools{gap:5px;flex-wrap:wrap}.member-tools .quiet{font-size:11px;padding:8px}.notification-panel{right:12px;top:140px;width:calc(100vw - 24px);box-sizing:border-box;max-height:70dvh}.general-chat-widget{right:12px;bottom:max(12px,env(safe-area-inset-bottom));width:320px}.member-dialog{padding:20px}.profile-stats{grid-template-columns:repeat(2,1fr)}.game-stage.is-fullscreen .fullscreen-chat{right:6px;top:46px;width:180px;padding:9px;max-height:45dvh}.fullscreen-chat-log{max-height:24dvh}.game-stage.is-fullscreen .fullscreen-chat input{font-size:12px}.account-bar{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.account-security{margin:10vh auto}.account-bar{gap:14px}.member-tools [hidden]{display:none}

.preview-ribbon{padding:9px 18px;background:#2e291a;color:#ead291;font-size:11px;text-align:center;border-bottom:1px solid #615139}.preview-ribbon a{color:#fff0bb;margin-left:12px;white-space:nowrap}

.profile-level-progress{margin:22px 0;padding:20px;border:1px solid #bda25b45;border-radius:12px;background:#c6a54c09}.profile-level-progress h3{margin:0 0 10px;font-size:14px}.profile-level-progress>p{font-size:12px;color:#d8c28e;line-height:1.7}.profile-level-progress progress{display:block;width:100%;height:9px;accent-color:#edc66a;margin:13px 0 18px}.profile-level-progress summary{font-size:12px;color:#e7d4a0;cursor:pointer}.level-cost-table{max-height:260px;overflow:auto;margin-top:14px}.level-cost-table table{width:100%;border-collapse:collapse;font-size:12px}.level-cost-table th,.level-cost-table td{text-align:left;padding:9px;border-bottom:1px solid #ffffff12}.level-cost-table th{position:sticky;top:0;background:#202735}
/* Chat changes are local to the scrollable log, not the game canvas layout. */
.chat-log,.fullscreen-chat-log,#general-chat-log{contain:layout paint}

.chat-message .chat-translation-toggle,.general-chat-message .chat-translation-toggle{
  display:inline-block;background:transparent;border:0;color:#a6c9da;border-radius:3px;
  font:inherit;font-size:.72rem;line-height:1.45;padding:2px 3px;margin:0;cursor:pointer;
}
.chat-translation-toggle:hover,.chat-translation-toggle:focus-visible{text-decoration:underline}
.chat-translation-toggle:focus-visible{outline:2px solid #e9c267;outline-offset:2px}
