.player-community[hidden], .guest-room[hidden] { display: none; }
.player-community {
  min-width: 0;
  margin-block: 14px 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 8px;
}
.player-community details { min-width: 0; flex: 0 1 auto; }
.player-community details[open] { flex-basis: 100%; }
.player-community summary, .player-community button, .guest-widget button {
  border: 1px solid #c7d5c9;
  border-radius: 6px;
  font: 700 13px/1.35 'DM Sans', Arial, sans-serif;
  color: #1c5036;
  background: #f5f9f2;
  cursor: pointer;
}
.player-community summary, .player-community button { padding: 8px 11px; }
.player-community button[aria-pressed="true"], .guest-modes button[aria-pressed="true"] {
  background: #dff1d6;
  border-color: #a0c993;
  color: #18452d;
}
.player-community button:focus-visible, .guest-widget button:focus-visible,
.guest-widget textarea:focus-visible, .player-community textarea:focus-visible {
  outline: 3px solid #72a951;
  outline-offset: 2px;
}
.player-community [data-vote-count] { margin-inline-start: 3px; font-variant-numeric: tabular-nums; }
.community-review-panel {
  padding: 10px;
  border: 1px solid #dce6da;
  border-radius: 6px;
  margin-block: 6px;
  background: #fff;
}
.community-form { display: grid; gap: 8px; }
.community-form label { display: grid; gap: 4px; min-width: 0; font-size: 12px; font-weight: 700; }
.community-form input, .community-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #b9c9bc;
  border-radius: 5px;
  background: #fff;
  color: #17271e;
  padding: 7px 9px;
  font: 400 16px/1.35 'DM Sans', Arial, sans-serif;
}
.community-form textarea { resize: vertical; }
.community-form button { justify-self: start; padding: 8px 12px; }
.community-status { min-width: 0; font-size: 12px; color: #355948; }
.community-status:empty { display: none; }
.community-review-panel [data-review-list] { max-height: 250px; overflow: auto; margin-bottom: 10px; }
.community-review-panel article, .guest-history article {
  min-width: 0;
  padding: 7px 9px;
  overflow-wrap: anywhere;
  background: #fff;
  border-radius: 5px;
  margin-block: 4px;
  font-size: 13px;
}
.community-review-panel article header, .guest-history article header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 8px;
}
.community-review-panel article p, .guest-history article p { margin: 3px 0 0; white-space: pre-wrap; }
.community-review-panel time, .guest-history time { color: #52665a; font-size: 11px; }
.guest-widget {
  --guest-edge: max(14px, env(safe-area-inset-right));
  --guest-left: max(14px, env(safe-area-inset-left));
}
.guest-widget .guest-launch {
  position: fixed;
  inset: auto var(--guest-edge) max(16px, env(safe-area-inset-bottom)) auto;
  z-index: 30;
  background: #20583d;
  color: #fff;
  border-color: #18462f;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  box-shadow: 0 4px 20px #142c2140;
}
.guest-widget .guest-panel {
  position: fixed;
  inset: auto var(--guest-edge) max(71px, calc(env(safe-area-inset-bottom) + 56px)) auto;
  z-index: 31;
  margin: 0;
  width: min(370px, calc(100vw - var(--guest-edge) - var(--guest-left)));
  max-height: min(620px, calc(100vh - 85px));
  max-height: min(620px, calc(100dvh - 85px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  padding: 0;
  border: 1px solid #c7d5c9;
  border-radius: 12px;
  background: #fff;
  color: #17271e;
  box-shadow: 0 12px 48px #142c2140;
  overflow: auto;
}
.guest-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  color: #fff;
  background: #20583d;
}
.guest-heading h2 { font-size: 18px; line-height: 1.3; margin: 0; }
.guest-widget .guest-close { min-height: 36px; min-width: 36px; font-size: 21px; }
.guest-presence {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 9px 13px 0;
  color: #406453;
  font-size: 12px;
  font-weight: 700;
}
.guest-presence::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9baa9e;
}
.guest-presence.is-online::before { background: #2c8a54; }
.guest-modes { display: flex; gap: 8px; padding: 10px 13px 0; }
.guest-modes button { flex: 1; min-height: 39px; }
.guest-room { display: grid; gap: 8px; padding: 10px 13px 13px; }
.guest-caption { font-size: 12px; color: #486458; }
.guest-history {
  height: clamp(85px, 27dvh, 220px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 6px;
  background: #edf3ee;
  border-radius: 6px;
  font-size: 13px;
}
.guest-history > p { padding: 5px; color: #486458; }
.guest-history a {
  display: block;
  margin-top: 5px;
  color: #1b5a38;
  text-decoration: underline;
}

@media (max-width: 600px), (orientation: landscape) and (max-height: 500px) {
  .guest-widget .guest-close, .guest-modes button, .community-form button { min-height: 44px; }
  .guest-widget .guest-close { min-width: 44px; }
  .guest-modes button { min-width: 0; overflow-wrap: anywhere; }
  .guest-history { height: clamp(70px, 21dvh, 155px); }
}
