/* Club = player and play. Locations remain a separate world control. */
.rotor-club-button,
.rotor-club-center {
  --club-green: #b6ef3c;
  --club-yellow: #ffe45b;
  --club-ink: #080b05;
  --club-text: #f3f6ed;
  --club-border: #eaf2d47a;
  color: var(--club-text);
  font-family: Inter, Arial, sans-serif;
  box-sizing: border-box;
}
html body .rotor-club-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 20px 9px 12px;
  border: 1px solid #dfff968c;
  border-radius: 28px;
  color: #d9ff91;
  background: linear-gradient(163deg, #fbffe730, #080b0555 45%, #b6ef3c12);
  box-shadow: inset 0 2px 1px #ffffdda1, inset 0 -3px 7px #0008, 0 8px 20px #0007;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  cursor: pointer;
}
.rotor-club-button svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #ffe45b;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html body .rotor-club-button:hover,
html body .rotor-club-button[aria-expanded=true] {
  color: #f2ffcc;
  border-color: var(--club-green);
  background: linear-gradient(163deg, #faffdb42, #101706bb 45%, #b6ef3c2b);
}
.rotor-club-floating { position: fixed; z-index: 550; top: 24px; right: var(--ui-safe, 24px); }
html body .rotor-club-center {
  position: fixed;
  z-index: 1020;
  top: var(--ui-content-top, 96px);
  right: var(--ui-safe, 24px);
  bottom: calc(var(--ui-safe-bottom, 20px) + 72px);
  width: min(360px, calc(100vw - 2 * var(--ui-safe, 24px)));
  min-width: 0;
  max-height: calc(100vh - 188px);
  max-height: calc(100dvh - 188px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--club-border);
  border-radius: 32px;
  background: linear-gradient(156deg, #f7ffe61c, #04070366 25%, #0006 75%, #b6ef3c0d);
  box-shadow: inset 0 2px 1px #faffdf94, inset 1px 0 2px #fff2, inset 0 -2px 2px #fff2, 0 20px 48px #0009;
  text-shadow: 0 1px 3px #000c;
  transform: none;
}
.rotor-club-center[hidden] { display: none !important; }
.club-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  padding: 18px 18px 14px 22px;
  border-bottom: 1px solid #eaffaa26;
  background: #0005;
}
.club-center-head h2 { margin: 0; font-size: 27px; line-height: 1.1; letter-spacing: -.03em; font-weight: 800; }
.rotor-club-center button,
.rotor-club-center a,
.rotor-club-center summary { -webkit-tap-highlight-color: #b6ef3c44; }
.rotor-club-center button { cursor: pointer; }
.rotor-club-center :is(button, a, input, summary):focus-visible,
.rotor-club-button:focus-visible { outline: 2px solid #b6ef3c; outline-offset: 3px; }
.rotor-club-center :is(button, a, input, summary) { color: inherit; font-family: inherit; }
.rotor-club-center .club-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  border: 1px solid #f1f7dc70;
  border-radius: 50%;
  background: linear-gradient(165deg, #faffde24, #0008);
  box-shadow: inset 0 1px #fff8, inset 0 -2px #0009;
}
.club-close svg,
.club-emblem-entry > svg,
.club-mode > svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.club-center-content { overflow: auto; overscroll-behavior: contain; min-height: 0; padding: 20px 22px; scrollbar-width: thin; scrollbar-color: #b6ef3c80 transparent; scrollbar-gutter: stable; }
.club-center-content::-webkit-scrollbar { width: 5px; }
.club-center-content::-webkit-scrollbar-thumb { background: #b6ef3c80; border-radius: 4px; }
.club-identity h3 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: .02em; overflow-wrap: anywhere; }
.club-tier { margin: 7px 0 15px; color: #d4f397; font-size: 11px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.club-player-visual { margin-bottom: 14px; }
.club-player-visual[hidden] { display: none; }
/* The actual badge host keeps all its original controls and shared 3D geometry. */
html body .rotor-club-center .rotor-pilot-summary {
  position: relative !important;
  top: auto !important; bottom: auto !important; left: auto !important; right: auto !important;
  width: 100% !important; min-width: 0 !important; max-width: none !important; max-height: none !important;
  margin: 0; padding: 0 !important;
  visibility: visible !important; opacity: 1 !important; display: block !important; pointer-events: auto !important;
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
.rotor-club-center .rotor-pilot-summary > :is(small,strong,span,.rotor25-emblem-access) { display: none !important; }
html body .rotor-club-center .rotor-badge-stage { display: block !important; height: 142px; border: 1px solid #ecffd930; border-radius: 26px; background: transparent; }
html body .rotor-club-center .rotor-badge-actions { display: flex !important; margin-top: 9px; }
html body .rotor-club-center .rotor-badge-actions small { color: #d4f397; font-size: 10px; max-width: none; }
html body .rotor-club-center .rotor-badge-inspect { min-height: 40px; border-radius: 20px; background: linear-gradient(160deg,#ffffff22,#0006); border-color:#eaffb75c; color:#e9ffc4; }
html body .rotor-club-center .rotor-pilot-summary[data-badge-inspect=true] .rotor-badge-stage { height: 208px; }
.club-emblem-entry {
  display: grid;
  grid-template-columns: minmax(0,1fr) 20px;
  align-items: center;
  gap: 3px 10px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid #ffe45b94;
  border-radius: 22px;
  background: linear-gradient(160deg, #fff2a516, #0008);
  box-shadow: inset 0 1px #fff8, inset 0 -2px #0009;
  text-decoration: none;
}
.club-emblem-entry strong { color: #ffe45b; font-size: 13px; }
.club-emblem-entry span { grid-column: 1; color: #e9e9c6; font-size: 11px; overflow-wrap: anywhere; }
.club-emblem-entry > svg { grid-column: 2; grid-row: 1 / span 2; color: #ffe45b; }
.club-play { display: grid; gap: 8px; margin-top: 24px; }
.club-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 13px 15px;
  border: 1px solid #e2ff9a66;
  border-radius: 22px;
  background: linear-gradient(161deg, #fcffde20, #0008);
  box-shadow: inset 0 1px #fff7, inset 0 -2px #000b;
  text-decoration: none;
}
.club-mode span { display: grid; gap: 5px; min-width: 0; }
.club-mode strong { color: #e2ff9a; font-size: 14px; font-weight: 750; }
.club-mode small { color: #ddecc8; font-size: 11px; line-height: 1.35; }
.club-mode > svg { color: #b6ef3c; }
.club-mode-duel { border-color: #b6ef3ca6; background: linear-gradient(162deg, #b6ef3c32, #152106ba); }
.rotor-club-center :is(.club-mode,.club-emblem-entry):hover { border-color: #efffc5; background-color: #b6ef3c18; }
.club-record,
.club-trophy { margin-top: 21px; border-top: 1px solid #edffc230; }
.club-record summary,
.club-trophy summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  gap: 12px;
  color: #edf8de;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.club-record summary::-webkit-details-marker,
.club-trophy summary::-webkit-details-marker { display: none; }
.club-record summary::after,
.club-trophy summary::after { content: ''; width: 7px; height: 7px; border: solid #b6ef3c; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin-right: 5px; flex: none; }
.club-record[open] summary::after,
.club-trophy[open] summary::after { transform: rotate(225deg); }
.club-local-note { margin: 0 0 14px; color: #d4e4c1; font-size: 11px; line-height: 1.4; }
.club-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin: 0; }
.club-stats div { min-width: 0; }
.club-stats dt { color: #c6dfa0; font-size: 11px; margin-bottom: 5px; }
.club-stats dd { margin: 0; color: #d4ff74; font-size: 20px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.club-medals { margin: 20px 0; padding: 0; list-style: none; }
.club-medals li:not(.club-empty) { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid #e5ffc421; }
.club-medals strong { color: #ffe45b; font-size: 11px; }
.club-medals span { color: #d4e4c1; font-size: 11px; line-height: 1.35; }
.club-empty { color: #d4e4c1; font-size: 12px; line-height: 1.45; }
.club-name-form { margin-top: 18px; }
.club-name-form label { display: block; margin-bottom: 7px; color: #edf8de; font-size: 12px; }
.club-name-form > div { display: flex; gap: 8px; }
.club-name-form input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; background: #0006; border: 1px solid #e6ffc66b; border-radius: 16px; font-size: 13px; caret-color: #b6ef3c; }
.club-name-form button { min-height: 44px; padding: 10px 16px; border: 1px solid #e9ffaf; border-radius: 16px; background: #b6ef3c; color: #0a1003; font-size: 12px; font-weight: 800; text-shadow: none; }
.club-save-status { min-height: 16px; margin: 8px 0 0; color: #d4ff74; font-size: 11px; }
.club-save-status[data-state=error] { color: #ffe45b; }
.club-trophy-body a { display: block; min-height: 44px; padding: 13px 0; color: #ffe45b; font-size: 12px; text-decoration-thickness: 1px; text-underline-offset: 4px; overflow-wrap: anywhere; }
.club-center-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; flex: none; padding: 12px 22px; border-top: 1px solid #eaffaa26; background: #0003; }
.club-center-foot a { min-height: 40px; display: inline-flex; align-items: center; color: #e4f6c8; font-size: 11px; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.rotor-club-center ::selection { background: #b6ef3c; color: #080b05; text-shadow: none; }
@media (max-width: 760px), (max-height: 540px) {
  html body .rotor-club-center { top: auto; right: var(--ui-safe,16px); left: var(--ui-safe,16px); bottom: calc(var(--ui-safe-bottom,16px) + 76px); width: auto; max-height: 48vh; max-height: 48dvh; border-radius: 28px; }
  .club-center-head { padding: 12px 14px 10px 18px; }
  .club-center-head h2 { font-size: 24px; }
  .club-center-content { padding: 16px 18px; }
  .club-center-foot { padding: 8px 18px; }
  html body .rotor-club-button { min-height: 44px; padding: 8px 15px 8px 10px; gap: 7px; }
  .rotor-club-button svg { width: 23px; height: 23px; }
  .rotor-club-floating { top: 16px; }
  html body .rotor-club-center .rotor-badge-stage { height: 120px; }
}
@media (prefers-reduced-transparency: reduce) {
  html body .rotor-club-center { background: #080b05; }
}
@media (forced-colors: active) {
  .rotor-club-center, .rotor-club-button, .club-mode, .club-emblem-entry, .club-name-form input, .club-name-form button { background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none; }
  .rotor-club-center :is(a,button,input,summary):focus-visible, .rotor-club-button:focus-visible { outline-color: Highlight; }
  .club-mode > svg, .club-emblem-entry > svg, .rotor-club-button svg { stroke: ButtonText; }
}

/* World/arena header and footer rules never own a window's internal chrome. */
html body .rotor-club-center > .club-center-head { position: relative !important; inset: auto !important; width: auto !important; min-height: 0 !important; margin: 0 !important; padding: 18px 18px 14px 22px !important; z-index: auto !important; transform: none !important; pointer-events: auto !important; }
html body .rotor-club-center > .club-center-foot { position: relative !important; inset: auto !important; width: auto !important; margin: 0 !important; z-index: auto !important; transform: none !important; display: flex !important; flex-wrap: wrap; gap: 10px; padding: 14px 18px !important; flex-shrink: 0; }
html body > header .topActions { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
html body > header .topActions .rotor-club-button { position: relative; inset: auto; }
