/* Shared Cześć Giżycko game chrome. Game mechanics and artwork stay game-specific. */
:root {
  --portal-game-blue: #0849a2;
  --portal-game-navy: #0c254f;
  --portal-game-sky: #d6e9fe;
  --portal-game-ice: #eef6ff;
  --portal-game-paper: #fbf8f0;
  --portal-game-white: #ffffff;
  --portal-game-muted: #536674;
  --portal-game-line: rgba(8, 73, 162, 0.18);
  --portal-game-display: "Archivo Black", "Arial Black", sans-serif;
  --portal-game-body: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.portal-game {
  color: var(--portal-game-navy);
  background: var(--portal-game-paper);
  font-family: var(--portal-game-body);
}

.portal-game .portal-header {
  border: 0;
  border-bottom: 1px solid var(--portal-game-line);
  background: var(--portal-game-white);
}

.portal-game :is(.portal-header__masthead, .portal-header__inner) {
  display: flex;
  width: min(calc(100% - 2rem), 1240px);
  min-height: 82px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
}

.portal-game .portal-header__brand img {
  display: block;
  width: 72px;
  height: auto;
}

.portal-game .portal-header__nav {
  display: flex;
  align-self: stretch;
  align-items: stretch;
}

.portal-game .portal-header__nav a {
  display: inline-flex;
  min-width: 8.25rem;
  padding-inline: 1.25rem;
  align-items: center;
  justify-content: center;
  color: var(--portal-game-blue);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.portal-game .portal-header__nav a + a {
  border-left: 1px solid var(--portal-game-line);
}

.portal-game .portal-header__nav a:hover,
.portal-game .portal-header__nav a:focus-visible,
.portal-game .portal-header__nav a[aria-current="page"] {
  color: var(--portal-game-white);
  background: var(--portal-game-blue);
  outline: 0;
}

.portal-game :is(.game-shell, .leaderboard, .game-manual, .game-notes, .game-overlay) {
  border-radius: 0;
  box-shadow: none;
}

.portal-game .game-shell {
  border: 0;
}

.portal-game :is(.game-intro__eyebrow, .leaderboard__eyebrow) {
  display: none;
}

.portal-game :is(.game-heading h1, .game-intro h1) {
  max-width: 18ch;
  color: var(--portal-game-blue);
  font-family: var(--portal-game-display);
  font-size: clamp(2rem, 3.15vw, 3rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.portal-game :is(.game-heading__lead, .game-intro__lead) {
  max-width: 46rem;
  color: var(--portal-game-muted);
  font-family: var(--portal-game-body);
  font-size: clamp(0.95rem, 0.9rem + 0.15vw, 1.04rem);
  line-height: 1.62;
}

.portal-game .game-heading__facts {
  display: flex;
  max-width: 28rem;
  flex-flow: row wrap;
  gap: 0.35rem 0;
  align-items: center;
  color: var(--portal-game-blue);
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.portal-game .game-heading__facts span {
  transform: none !important;
}

.portal-game .game-heading__facts span:not(:last-child)::after {
  content: " · ";
  margin-inline: 0.35rem;
  color: rgba(8, 73, 162, 0.55);
}

.portal-game .game-overlay {
  border: 0;
  color: var(--portal-game-navy);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
}

.portal-game :is(.game-overlay__stamp, .game-overlay__art, .game-overlay__flag) {
  display: none !important;
}

.portal-game .game-overlay:has(> :is(.game-overlay__content, .game-overlay__copy)) {
  grid-template-columns: minmax(0, 1fr);
}

.portal-game :is(.game-overlay__content, .game-overlay__copy) {
  min-width: 0;
}

.portal-game .game-overlay__eyebrow {
  color: var(--portal-game-blue);
  font-size: 0.66rem;
  font-weight: 820;
  letter-spacing: 0.015em;
  text-transform: none;
}

.portal-game .game-overlay h2 {
  max-width: 18ch;
  color: var(--portal-game-blue);
  font-family: var(--portal-game-display);
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.portal-game .game-overlay :is(p, small) {
  font-family: var(--portal-game-body);
}

.portal-game :is(.primary-button, .score-form button, .action-button) {
  position: relative;
  isolation: isolate;
  min-height: 48px !important;
  padding: 0.75rem 1.2rem;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: var(--portal-game-white);
  background-color: var(--portal-game-blue);
  background-image: none;
  box-shadow: none;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  transform: none;
  touch-action: manipulation;
}

.portal-game :is(.primary-button, .score-form button, .action-button):hover,
.portal-game :is(.primary-button, .score-form button, .action-button):focus-visible {
  border: 0;
  color: var(--portal-game-white);
  background-color: var(--portal-game-sky);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 64' preserveAspectRatio='none'%3E%3Cpath fill='%230849a2' d='M0 31 C 20 20 44 20 64 31 S 108 42 128 31 S 152 22 160 25 V64 H0 Z'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 10rem 100%;
  box-shadow: none;
  outline: 3px solid rgba(8, 73, 162, 0.24);
  outline-offset: 3px;
  transform: none;
  animation: portal-game-wave 900ms linear infinite;
}

.portal-game :is(
  .difficulty-picker button,
  .level-picker button,
  .ranking-filter button,
  .leaderboard-periods button,
  .leaderboard-tabs button,
  .bait-button,
  .touch-control,
  [data-touch-control]
) {
  min-height: 48px;
  border-radius: 0;
  box-shadow: none;
  touch-action: manipulation;
}

.portal-game :is(.icon-button, .sound-button) {
  min-width: 48px;
  min-height: 48px;
  border-radius: 0;
  touch-action: manipulation;
}

.portal-game .leaderboard {
  margin-top: clamp(3.5rem, 7vw, 6.5rem);
  padding-top: clamp(2.25rem, 4vw, 3.75rem);
  border: 0;
  border-top: 1px solid var(--portal-game-line);
  background: transparent;
}

.portal-game .leaderboard__header h2,
.portal-game :is(.game-manual, .game-notes) h2 {
  color: var(--portal-game-blue);
  font-family: var(--portal-game-display);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.018em;
}

.portal-game .leaderboard__mark {
  color: var(--portal-game-blue);
  background: var(--portal-game-sky);
}

.portal-game .leaderboard__table-wrap {
  border: 0;
  border-top: 1px solid var(--portal-game-line);
  background: var(--portal-game-white);
  box-shadow: none;
}

.portal-game .leaderboard tbody tr:nth-child(-n + 3) td {
  background: var(--portal-game-ice);
}

.portal-game .game-manual {
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  padding: 0;
  border: 0;
  background: transparent;
}

.portal-game .game-manual__rules > p {
  border: 0;
  border-top: 1px solid var(--portal-game-line);
  background: transparent;
  box-shadow: none;
}

.portal-game .game-manual__rules > p:last-child {
  border-bottom: 1px solid var(--portal-game-line);
}

.portal-game .game-footer {
  border-top: 1px solid var(--portal-game-line);
  color: var(--portal-game-muted);
  background: var(--portal-game-paper);
}

.portal-game :is(.mobile-orientation, .landscape-gate) {
  color: var(--portal-game-white);
  background: var(--portal-game-blue) !important;
  font-family: var(--portal-game-body);
}

.portal-game :is(.mobile-orientation, .landscape-gate) strong {
  color: var(--portal-game-white);
  background: transparent;
  border: 0;
  box-shadow: none;
  font-family: var(--portal-game-display);
  font-size: clamp(1.35rem, 5vw, 1.8rem);
  font-weight: 400;
  line-height: 1.05;
}

.portal-game :is(.mobile-orientation, .landscape-gate) small,
.portal-game .mobile-orientation p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  line-height: 1.5;
}

.portal-game :is(.mobile-orientation__phone, .landscape-gate__phone) {
  border-color: var(--portal-game-white);
  box-shadow: none;
}

@media (min-width: 1025px) {
  .portal-game .game-page {
    width: min(calc(100% - 3rem), 1240px);
    padding-block: clamp(2.25rem, 4vw, 3.75rem) clamp(4rem, 7vw, 6rem);
  }

  .portal-game :is(.game-heading, .game-intro) {
    grid-template-columns: minmax(0, 0.68fr) minmax(20rem, 0.32fr);
    gap: clamp(2rem, 5vw, 5rem);
    margin-bottom: clamp(1.5rem, 2.5vw, 2.25rem);
    align-items: end;
  }

  .portal-game .play-layout {
    gap: clamp(1.5rem, 3vw, 3rem);
  }
}

@media (max-width: 760px) {
  .portal-game :is(.portal-header__masthead, .portal-header__inner) {
    width: 100%;
    min-height: 72px;
    padding-left: 0.9rem;
  }

  .portal-game .portal-header__brand img {
    width: 62px;
  }

  .portal-game .portal-header__nav a {
    min-width: 0;
    padding-inline: 0.8rem;
    font-size: 0.62rem;
  }

  .portal-game .game-page {
    width: min(calc(100% - 1.25rem), 1240px);
  }

  .portal-game :is(.game-heading h1, .game-intro h1) {
    font-size: clamp(1.9rem, 9vw, 2.45rem);
  }

  .portal-game .game-overlay h2 {
    font-size: clamp(1.35rem, 6.4vw, 1.8rem);
  }

  .portal-game .leaderboard__mark {
    padding: 0.45rem 0.6rem;
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-game :is(.primary-button, .score-form button, .action-button):hover,
  .portal-game :is(.primary-button, .score-form button, .action-button):focus-visible {
    animation: none;
  }
}

@keyframes portal-game-wave {
  to {
    background-position: 10rem 0;
  }
}

/* Follow-up: portal topbar, smaller hierarchy and unnumbered instructions. */
.portal-game .portal-header {
  min-height: 88px;
}

.portal-game :is(.portal-header__masthead, .portal-header__inner) {
  min-height: 88px;
  padding-block: 8px;
}

.portal-game .portal-header__brand img {
  width: 76px;
}

.portal-game .portal-header__nav {
  align-self: auto;
  gap: 10px;
}

.portal-game .portal-header__nav a {
  min-width: 86px;
  min-height: 44px;
  padding-inline: 18px;
  border: 1px solid var(--portal-game-line);
  font-size: 0.68rem;
}

.portal-game .portal-header__nav a + a {
  border-left: 1px solid var(--portal-game-line);
}

.portal-game .portal-header__nav a[aria-current="page"] {
  color: var(--portal-game-white);
  background: var(--portal-game-blue);
  border-color: var(--portal-game-blue);
}

.portal-game :is(.game-heading h1, .game-intro h1) {
  font-size: clamp(1.9rem, 2.65vw, 2.35rem);
}

.portal-game :is(.game-heading__lead, .game-intro__lead) {
  font-size: clamp(0.9rem, 0.86rem + 0.12vw, 0.98rem);
}

.portal-game .game-heading__facts {
  display: none;
}

.portal-game .game-overlay h2 {
  font-size: clamp(1.4rem, 2vw, 1.85rem);
}

.portal-game .leaderboard__header h2,
.portal-game :is(.game-manual, .game-notes) h2 {
  font-size: clamp(1.35rem, 1.85vw, 1.75rem);
}

.portal-game .game-manual__rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 1.4rem;
}

.portal-game .game-manual__rules > p,
.portal-game .game-manual__rules > p:last-child {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--portal-game-muted);
  font-size: 0.92rem;
  line-height: 1.68;
}

.portal-game .game-manual__rules > p > span {
  display: block;
}

.portal-game .game-notes__section {
  display: block;
}

.portal-game .game-notes__number {
  display: none;
}

@media (max-width: 760px) {
  .portal-game .portal-header,
  .portal-game :is(.portal-header__masthead, .portal-header__inner) {
    min-height: 76px;
  }

  .portal-game :is(.portal-header__masthead, .portal-header__inner) {
    padding: 6px 10px 6px 14px;
  }

  .portal-game .portal-header__brand img {
    width: 64px;
  }

  .portal-game .portal-header__nav {
    gap: 6px;
  }

  .portal-game .portal-header__nav a {
    min-width: 66px;
    min-height: 42px;
    padding-inline: 12px;
    font-size: 0.62rem;
  }

  .portal-game :is(.game-heading h1, .game-intro h1) {
    font-size: clamp(1.75rem, 8vw, 2.05rem);
  }

  .portal-game .game-manual__rules {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
}
