/* Game first: the partner player, its title and the essential controls. */
main.is-game-page {
  padding-top: 6px;
}

.is-game-page .game-page,
.is-game-page .game-main {
  min-width: 0;
}

.is-game-page .game-player {
  position: relative;
  min-width: 0;
  margin: 0;
  border-radius: 14px;
  background: #100b17;
  box-shadow: 0 8px 30px #08030d24;
  isolation: isolate;
}

.is-game-page .game-stage,
html[data-player=classic] .is-game-page .game-stage {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  min-height: 160px;
  max-height: calc(100dvh - var(--player-chrome-height, 156px) - 88px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: #100b17;
}

.game-iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #100b17;
}

.is-game-page .player-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 20px;
  min-height: 76px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: var(--surface);
  color: var(--text);
}

.player-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  flex: 1 1 auto;
}

.player-thumb {
  flex: 0 0 48px;
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 2px solid #ffffff38;
  border-radius: 14px;
  box-shadow: 0 2px 7px #0d061e30;
}

.player-title {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-family: Nunito, system-ui, sans-serif;
  font-size: calc(23px * var(--gc-scale, 1));
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.45px;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.player-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex: 0 0 auto;
}

.game-voting {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  height: 46px;
  border-radius: 12px;
  background: #130a1b36;
}

.is-game-page .player-toolbar .vote-button,
.is-game-page .player-toolbar .favorite-button,
.is-game-page .player-toolbar .player-fullscreen {
  position: relative;
  inset: auto;
  z-index: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  gap: 0;
  width: 46px;
  height: 46px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--input);
  color: var(--text);
  box-shadow: none;
  font: inherit;
  opacity: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.is-game-page .player-toolbar .vote-button[data-action=upvote] {
  border-radius: 12px 0 0 12px;
}

.is-game-page .player-toolbar .vote-button[data-action=downvote] {
  border-radius: 0 12px 12px 0;
}

.is-game-page .player-toolbar .vote-button > svg,
.is-game-page .player-toolbar .favorite-button > svg,
.is-game-page .player-toolbar .player-fullscreen > svg {
  display: block;
  width: 23px;
  height: 23px;
  flex-shrink: 0;
}

.is-game-page .player-toolbar .favorite-button[aria-pressed=true] {
  color: #ffc3ea;
  background: #803e704d;
  border-color: #ffc3ea60;
}

.is-game-page .player-toolbar .favorite-button[aria-pressed=true] > svg {
  fill: currentColor;
}

.is-game-page .player-toolbar .vote-button[data-action=upvote][aria-pressed=true],
.is-game-page .player-toolbar .vote-button[data-action=upvote].is-selected {
  background: #42865c4d;
  color: #b6f0c7;
  border-color: #b6f0c766;
}

.is-game-page .player-toolbar .vote-button[data-action=downvote][aria-pressed=true],
.is-game-page .player-toolbar .vote-button[data-action=downvote].is-selected {
  background: #9545614d;
  color: #ffc0d0;
  border-color: #ffc0d066;
}

.is-game-page .player-toolbar .vote-button:hover,
.is-game-page .player-toolbar .favorite-button:hover,
.is-game-page .player-toolbar .player-fullscreen:hover {
  background: var(--line);
}

.is-game-page .player-toolbar button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.is-game-page .player-toolbar button:disabled {
  opacity: .55;
  cursor: wait;
}

.vote-score {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 47px;
  min-width: 47px;
  padding: 0 0 4px;
  color: var(--text);
}

.vote-value {
  font-family: Nunito, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.vote-meter {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  height: 5px;
  overflow: hidden;
  background: #ffffff24;
}

.vote-meter > i {
  display: block;
  height: 100%;
  max-width: 100%;
  background: #afd865;
  transition: width .2s ease;
}

.player-tooltip {
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 10px);
  left: 50%;
  width: max-content;
  max-width: 210px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #21112df5;
  color: #fff5ff;
  box-shadow: 0 4px 15px #0004;
  font-family: Nunito, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.player-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: calc(50% - 4px);
  border: 4px solid transparent;
  border-top-color: #21112df5;
}

.is-game-page .player-toolbar .player-status {
  position: absolute;
  z-index: 6;
  right: 16px;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: min(360px, calc(100% - 32px));
  margin: 0;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #21112df5;
  color: var(--text);
  box-shadow: 0 5px 20px #0005;
  font-family: Nunito, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.is-game-page .player-toolbar .player-status:empty {
  display: none;
}

.player-actions > :last-child .player-tooltip {
  left: auto;
  right: -1px;
  transform: translate(0, 4px);
}

.player-actions > :last-child .player-tooltip::after {
  left: auto;
  right: 17px;
}

.player-actions button:hover > .player-tooltip,
.player-actions button:focus-visible > .player-tooltip,
.vote-score:hover > .player-tooltip,
.vote-score:focus-visible > .player-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.player-actions > :last-child:hover .player-tooltip,
.player-actions > :last-child:focus-visible .player-tooltip {
  transform: none;
}

.game-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 17px;
}

.game-context .breadcrumbs {
  margin: 0;
  font-size: 11px;
}

.game-context .game-tags {
  margin: 0;
}

.is-game-page .game-description {
  margin: 23px 0 30px;
  gap: 30px;
}

.is-game-page .game-description .game-about-title {
  margin: 0 0 12px;
  font-size: calc(22px * var(--gc-scale, 1));
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -.35px;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.is-game-page .game-description .instructions > h2 {
  font-size: calc(18px * var(--gc-scale, 1));
  line-height: 1.4;
  font-weight: 850;
}

.is-game-page .game-description p {
  max-width: 85ch;
  line-height: 1.8;
}

body.player-expanded {
  overflow: hidden;
}

.game-player:fullscreen,
.is-game-page .game-player.expanded-fallback {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #100b17;
}

.game-player:fullscreen::backdrop {
  background: #100b17;
}

.game-player:fullscreen .game-stage,
html[data-player=classic] .game-player:fullscreen .game-stage,
.is-game-page .game-player.expanded-fallback .game-stage,
html[data-player=classic] .is-game-page .game-player.expanded-fallback .game-stage {
  flex: 1 1 0;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

.game-player:fullscreen .player-toolbar,
.is-game-page .game-player.expanded-fallback .player-toolbar {
  flex: 0 0 auto;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

@media (max-width: 850px) {
  .is-game-page .player-toolbar { gap: 12px; padding-inline: 12px; }
  .player-identity { gap: 10px; }
  .player-title { font-size: calc(20px * var(--gc-scale, 1)); }
  .player-thumb { flex-basis: 44px; width: 44px; height: 44px; border-radius: 12px; }
  .player-actions { gap: 7px; }
}

@media (max-width: 640px) {
  main.is-game-page { padding-top: 4px; }
  .is-game-page .game-player { border-radius: 11px; }
  .is-game-page .game-stage,
  html[data-player=classic] .is-game-page .game-stage {
    min-height: 240px;
    max-height: calc(100dvh - var(--player-chrome-height, 105px) - 132px);
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 11px 11px 0 0;
  }
  .is-game-page .player-toolbar {
    flex-wrap: wrap;
    min-height: 0;
    gap: 9px;
    padding: 10px;
    border-radius: 0 0 11px 11px;
  }
  .player-identity { flex-basis: 100%; gap: 10px; }
  .player-title { font-size: calc(20px * var(--gc-scale, 1)); line-height: 1.22; letter-spacing: -.3px; }
  .player-thumb { flex-basis: 40px; width: 40px; height: 40px; border-radius: 11px; }
  .player-actions { justify-content: flex-end; width: 100%; gap: 8px; }
  .game-voting { height: 44px; }
  .is-game-page .player-toolbar .vote-button,
  .is-game-page .player-toolbar .favorite-button,
  .is-game-page .player-toolbar .player-fullscreen { width: 44px; height: 44px; flex-basis: 44px; border-radius: 11px; }
  .is-game-page .player-toolbar .vote-button > svg,
  .is-game-page .player-toolbar .favorite-button > svg,
  .is-game-page .player-toolbar .player-fullscreen > svg { width: 22px; height: 22px; }
  .vote-score { width: 46px; min-width: 46px; }
  .vote-value { font-size: 15px; }
  .player-tooltip { max-width: 170px; }
  .game-context { margin-top: 14px; gap: 8px; }
  .game-context .breadcrumbs { font-size: 10px; }
  .is-game-page .game-description { margin: 19px 0 24px; gap: 19px; }
  .is-game-page .game-description .game-about-title { font-size: calc(19px * var(--gc-scale, 1)); margin-bottom: 9px; }
  .is-game-page .game-description .instructions > h2 { font-size: calc(17px * var(--gc-scale, 1)); }
  .game-player:fullscreen .player-toolbar,
  .is-game-page .game-player.expanded-fallback .player-toolbar { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (hover: none) {
  .player-actions button:hover > .player-tooltip,
  .vote-score:hover > .player-tooltip { opacity: 0; visibility: hidden; }
  .player-actions button:focus-visible > .player-tooltip,
  .vote-score:focus-visible > .player-tooltip { opacity: 1; visibility: visible; }
}

@media (prefers-reduced-motion: reduce) {
  .is-game-page .player-toolbar button,
  .player-tooltip,
  .vote-meter > i { transition: none; }
}

.game-description-copy {color:var(--muted);font-size:calc(14px * var(--gc-scale,1));line-height:1.8}.game-description-copy p{white-space:pre-line}.game-description-copy p+p{margin-top:1em}.game-description-copy a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
