/* Chat villages only. Light uses the original palette; dark follows the homepage. */
#gameApp.chat-village .player-avatar-wrap::after{content:none}
#gameApp.chat-village .player-avatar-wrap{position:relative}
.chat-presence{position:absolute;right:0;bottom:0;width:11px;height:11px;border:2px solid #fff;border-radius:50%;background:#94a3b8;box-shadow:0 0 0 1px #0002}
.chat-presence[data-presence=online]{background:#22c55e}
.chat-presence[data-presence=unknown]{background:transparent;border-color:#94a3b8;box-shadow:inset 0 0 0 1px #fff}

#gameApp.desktop-horizontal.chat-village .desktop-layout-shell{grid-template-columns:minmax(0,1fr) clamp(280px,26%,330px);gap:10px}
#gameApp.desktop-horizontal.chat-village .desktop-members-column{display:flex;min-height:0;min-width:0;overflow:hidden}
#gameApp.desktop-horizontal.chat-village #playerPanel{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;max-height:100%;padding:10px}
#gameApp.desktop-horizontal.chat-village .player-panel-head{flex:0 0 auto;flex-wrap:wrap;gap:6px}
#gameApp.desktop-horizontal.chat-village #playerGrid{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:5px;min-height:0;overflow:auto;scrollbar-gutter:stable}
#gameApp.desktop-horizontal.chat-village #playerPanel.is-collapsed{flex:0 0 100%;align-self:flex-start}
#gameApp.desktop-horizontal.chat-village #playerPanel.is-collapsed #playerGrid{display:none}
#gameApp.desktop-horizontal.chat-village .player-card{flex-direction:row;align-items:center;justify-content:flex-start;min-height:52px;gap:9px;padding:6px 8px;border-radius:5px}
#gameApp.desktop-horizontal.chat-village .player-avatar-wrap{width:38px;height:38px;flex:0 0 38px}
#gameApp.desktop-horizontal.chat-village .player-avatar{max-width:36px;max-height:36px}
#gameApp.desktop-horizontal.chat-village .player-info{min-width:0;text-align:left}
#gameApp.desktop-horizontal.chat-village .player-name{display:block;text-align:left;font-size:13px;line-height:1.3;white-space:nowrap;max-height:none;overflow:hidden;text-overflow:ellipsis}
#gameApp.desktop-horizontal.chat-village .player-meta{justify-content:flex-start}
#gameApp.desktop-horizontal.chat-village .desktop-talk-column>:is(.ability-panel,.login-box,.status-panel){flex-shrink:0;margin:0}

html[data-chat-theme=dark],html[data-chat-theme=dark] body{background:#040200;color:#f4eee8;color-scheme:dark}
html[data-chat-theme=dark] #gameApp.chat-village{background:#040200;color:#f4eee8;--higu-reading-background:#14100e;--game-bg-beforegame:#040200;--game-bg-day:#040200;--game-bg-night:#040200;--game-bg-aftergame:#040200;--game-text-beforegame:#f4eee8;--game-text-day:#f4eee8;--game-text-night:#f4eee8;--game-text-aftergame:#f4eee8}
html[data-chat-theme=dark] #gameApp.chat-village :is(.game-topbar,.talk-input-bar,.mobile-more-hud,.village-options-panel,.smile-picker-panel,.arona-assistant-panel,.self-lastwords-float){background:#110c09;color:#f4eee8;border-color:#423027;box-shadow:0 8px 24px #0004}
html[data-chat-theme=dark] #gameApp.chat-village :is(.player-panel,.talk-panel,.ability-panel,.login-box,.status-panel,.heaven-panel){background:#14100e;color:#f4eee8;border:1px solid #3f3029;border-radius:5px;box-shadow:none}
html[data-chat-theme=dark] #gameApp.chat-village :is(.player-card,.ability-self-info,.ability-card,.talk-bubble,.system-row,.event-block){background:#1c1511;color:#f4eee8;border-color:#3f3029;box-shadow:none}
html[data-chat-theme=dark] #gameApp.chat-village .player-card:hover{background:#291b15;border-color:#925347}
html[data-chat-theme=dark] #gameApp.chat-village .player-card.is-self{border-color:#a94736}
html[data-chat-theme=dark] #gameApp.chat-village :is(.talk-log,.talk-messages,.heaven-body){background:transparent;color:#f4eee8}
html[data-chat-theme=dark] #gameApp.chat-village :is(.section-head,.player-panel-head,.village-options-head,.mobile-more-head,.smile-picker-head){color:#f4eee8;border-color:#3f3029}
html[data-chat-theme=dark] #gameApp.chat-village :is(.section-note,.room-sub,.talk-time,.speech-hint,.player-trip,.ability-label,.ability-self-label,.village-options-title,.mobile-more-group-title){color:#bcb2a9;opacity:1}
html[data-chat-theme=dark] #gameApp.chat-village :is(button,.mini-btn,.register-link){background:#211711;color:#e7ddd5;border-color:#594035;border-radius:4px;box-shadow:none}
html[data-chat-theme=dark] #gameApp.chat-village :is(button,.mini-btn,.register-link):hover{background:#352019;border-color:#a94736}
html[data-chat-theme=dark] #gameApp.chat-village :is(.talk-send-btn,.login-btn){background:#940000;color:#fff;border-color:#b71919}
html[data-chat-theme=dark] #gameApp.chat-village :is(.objection-action-btn,.roomend-action-btn,.game-abort-btn){background:#421915;color:#ffb4a5;border-color:#a94736}
html[data-chat-theme=dark] #gameApp.chat-village :is(.vote-drawer-shell,.vote-role-editor,.vote-victory-editor,.self-lastwords-body){background:#14100e;color:#f4eee8;border-color:#594035}
html[data-chat-theme=dark] #gameApp.chat-village :is(.vote-target-card,.vote-secondary-btn,.arona-tab).is-selected,
html[data-chat-theme=dark] #gameApp.chat-village .arona-tab.is-active{background:#663026;color:#fff;border-color:#df9b81;box-shadow:inset 0 0 0 1px #df9b81}
html[data-chat-theme=dark] #gameApp.chat-village :is(.vote-confirm-btn,.primary){background:#940000;color:#fff;border-color:#b71919}
html[data-chat-theme=dark] #gameApp.chat-village :is(.vote-error,.arona-error){color:#ffb4a5}
html[data-chat-theme=dark] #gameApp.chat-village #willDirty{color:#ffb4a5!important}
html[data-chat-theme=dark] #gameApp.chat-village :is(input,textarea,select,.talk-editor-shell){background:#080503;color:#f4eee8;-webkit-text-fill-color:currentColor;border-color:#544035;border-radius:4px}
html[data-chat-theme=dark] #gameApp.chat-village :is(input,textarea)::placeholder{color:#a99587}
html[data-chat-theme=dark] #gameApp.chat-village :is(.talk-body,.message-body){color:#f4eee8}
html[data-chat-theme=dark] #gameApp.chat-village .talk-body a{color:#e1b5a0}
html[data-chat-theme=dark] #gameApp.chat-village .talk-name{color:#f4eee8}
html[data-chat-theme=dark] #gameApp.chat-village .talk-style-gm-broadcast :is(.talk-name,.talk-body){color:#ffb4a5}
html[data-chat-theme=dark] #gameApp.chat-village .player-card.is-red-name .player-name{color:#ffaaa0}
html[data-chat-theme=dark] #gameApp.chat-village :is(.player-badge.self,.player-badge.gm){background:#47231a;color:#f4d5c4;border-color:#79503c}
html[data-chat-theme=dark] #gameApp.chat-village .chat-presence{border-color:#1c1511}
html[data-chat-theme=dark] #gameApp.chat-village .chat-presence[data-presence=unknown]{border-color:#bcb2a9;box-shadow:none}
html[data-chat-theme=dark] #gameApp.chat-village :focus-visible{outline-color:#dc8065}
html[data-chat-theme=dark] #gameApp.chat-village ::selection{background:#940000;color:#fff}
html[data-chat-theme=dark] :is(dialog,dialog input,dialog textarea,dialog select){background:#14100e;color:#f4eee8;border-color:#594035;color-scheme:dark}
html[data-chat-theme=dark] dialog :is(button,.button){background:#291b15;color:#f4eee8;border-color:#79503c}
@media(max-width:900px){html[data-chat-theme=dark] #gameApp.chat-village .player-panel:not(.is-collapsed){background:#14100e}}
