/* Floating LudoRoom theme selector. Cocos game canvas is untouched. */
#ludoroom-theme-widget {
  position: fixed; top: 10px; left: 10px; z-index: 2147483646;
  width: max-content; max-width: calc(100vw - 20px);
  font-family: system-ui, Arial, sans-serif; color: #f7f9ff; font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
#ludoroom-theme-widget * { box-sizing: border-box; }
#ludoroom-theme-widget button {
  cursor: pointer; font-family: inherit; font-size: inherit;
  line-height: 1.25; touch-action: manipulation;
}
#ludoroom-theme-toggle {
  background: #132940; border: 1px solid var(--ludo-theme-accent, #86b5e2); color: #fff;
  border-radius: 9px; padding: 10px 13px; font-weight: 700;
  box-shadow: 0 3px 16px rgba(0,0,0,.45);
}
#ludoroom-theme-toggle:focus-visible, #ludoroom-theme-widget button:focus-visible {
  outline: 3px solid #ffd185; outline-offset: 2px;
}
#ludoroom-theme-panel {
  position: absolute; left: 0; top: calc(100% + 9px);
  width: min(318px, calc(100vw - 20px)); max-height: min(72vh, 600px);
  overflow: auto; background: #101e32; border: 1px solid var(--ludo-theme-accent, #7091b9);
  box-shadow: 0 14px 32px rgba(0,0,0,.65);
  border-radius: 13px; padding: 13px;
}
#ludoroom-theme-panel[hidden] { display: none !important; }
#ludoroom-theme-panel .lr-theme-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
#ludoroom-theme-panel .lr-theme-head strong { font-size: 14px; }
#ludoroom-theme-panel .lr-theme-close { border: 0; background: none; color: #fff; font-size: 23px; padding: 1px 5px; }
#ludoroom-theme-panel > p { font-size: 12px; line-height: 1.35; color: #cbd7e8; margin: 8px 0 12px; }
#ludoroom-theme-panel .lr-theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
#ludoroom-theme-panel .lr-theme-option {
  width: 100%; min-width: 0; background: #1b344d; color: #f7f9ff;
  border: 2px solid #365474; border-radius: 10px;
  padding: 5px 5px 8px; text-align: center;
}
#ludoroom-theme-panel .lr-theme-option.selected { border-color: #ffd16a; background: #25485f; }
#ludoroom-theme-panel .lr-theme-option > img,
#ludoroom-theme-panel .lr-theme-classic-icon {
  width: 100%; height: 90px; display: flex; align-items: center; justify-content: center;
  object-fit: cover; border-radius: 6px; background: #22354e; font-size: 41px;
}
#ludoroom-theme-panel .lr-theme-option strong, #ludoroom-theme-panel .lr-theme-option small {
  display: block; overflow-wrap: break-word;
}
#ludoroom-theme-panel .lr-theme-option strong { font-size: 12px; margin-top: 6px; }
#ludoroom-theme-panel .lr-theme-option small { font-size: 10px; color: #d3dfed; padding-top: 2px; }
#ludoroom-theme-status { min-height: 14px; color: #9aeabb !important; }
#ludoroom-theme-status.lr-theme-error { color: #ffd09a !important; }
@media (max-width: 440px) {
  #ludoroom-theme-widget { left: 8px; top: 9px; }
  #ludoroom-theme-toggle { padding: 8px 9px; font-size: 12px !important; }
  #ludoroom-theme-panel { width: min(302px, calc(100vw - 16px)); max-height: 65vh; }
}
