/* Inherit the existing help dialogs and landscape safe areas. */
body.entry-shell > :is(#community-group, #android-version-panel)[open]:not(#game-entry-overlay):not(#hero-selection-modal):not(#game-session-frame) { display: block !important; }
:is(#community-group, #android-version-panel):not([open]) { display: none !important; }
:is(#community-group, #android-version-panel) {
  position: fixed; inset: 0; margin: auto; padding: 0; box-sizing: border-box;
  width: min(480px, calc(100% - 32px - var(--rd-safe-area-left) - var(--rd-safe-area-right)));
  max-width: none; max-height: calc(100% - 24px - var(--rd-safe-area-top) - var(--rd-safe-area-bottom));
  overflow-y: auto; border: 1px solid #927447; border-radius: 8px;
  background: #151c20; color: #eee4cd; font: 15px/1.6 'Microsoft YaHei', system-ui, sans-serif;
}
:is(#community-group, #android-version-panel)::backdrop { background: #050b10dc; }
.community-group-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 16px; border-bottom: 1px solid #4b4537; }
.community-group-header h2 { margin: 0; color: #edcd83; font-size: 20px; }
.community-group-content { padding: 16px 20px; }
.community-group-name { margin: 0; color: #f6e6b9; font-size: 20px; font-weight: bold; }
.community-group-description { margin: 4px 0 16px; color: #c7bd9f; }
.community-group-number { display: flex; align-items: center; gap: 12px; color: #c7bd9f; }
#community-group-number { width: 0; min-width: 0; flex: 1; min-height: 44px; padding: 6px 12px; box-sizing: border-box; border: 1px solid #6e6754; border-radius: 6px; background: #0d1519; color: #eee4cd; font: 20px/1.4 ui-monospace, monospace; user-select: text; }
:is(#community-group, #android-version-panel) :is(button, a) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; box-sizing: border-box; border: 1px solid #8d784c; border-radius: 6px; background: #302c21; color: #f3e8ca; font: inherit; text-decoration: none; cursor: pointer; touch-action: manipulation; }
:is(#community-group, #android-version-panel) :is(button, a):hover { background: #45402d; }
:is(#community-group, #android-version-panel) :focus-visible { outline: 2px solid #ffe2a0; outline-offset: -3px; }
.community-group-actions { display: flex; gap: 10px; margin-top: 16px; }
.community-group-actions > * { flex: 1; }
#community-group #community-group-join { background: #66522e; color: #fff0cc; }
#community-group-copy:disabled { opacity: .6; cursor: default; }
#community-group-status { min-height: 22px; margin: 12px 0 0; color: #b9c9bf; font-size: 12px; }
.game-entry-secondary-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
#game-entry-overlay :is([data-community-group], .android-version-open) { min-width: 120px; min-height: 44px; margin-top: 8px; padding: 6px 14px; background: #22312c; border-color: #6e8069; font-weight: normal; }
#fullscreen-controls > [data-community-group] { min-height: 44px; margin-left: 6px; padding: 6px 10px; border: 1px solid #927447; border-radius: 6px; background: #201a13; color: #f0dfbb; font: inherit; cursor: pointer; }
body.mobile-layout #fullscreen-controls > [data-community-group] { display: none; }
.android-version-open { min-height: 44px; white-space: nowrap; }
.android-version-content { padding: 12px 16px; }
.android-version-content p { margin: 0; }
.android-version-upgrade { color: #f4d494; font-weight: 600; }
#android-version-downloads { padding: 0; margin: 10px 0 6px; list-style: none; }
#android-version-downloads li { display: flex; align-items: center; gap: 10px; min-width: 0; }
#android-version-downloads li + li { margin-top: 6px; }
#android-version-downloads a { justify-content: flex-start; flex: 1; overflow-wrap: anywhere; }
.android-version-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.android-version-detail, #android-version-install-note { color: #c7bd9f; font-size: 13px; }
.android-version-content .android-version-detail { margin-top: 8px; }
#android-version-panel [hidden] { display: none !important; }
@media (max-height: 360px) {
  .community-group-content { padding: 10px 16px; }
  .community-group-description { margin-bottom: 10px; }
  .community-group-actions { margin-top: 10px; }
  #community-group-status { margin-top: 8px; }
}
