/* Shared chrome for all four games. Game boards keep their own presentation. */
.zb-page .mentorio-game-header,
.zb-page .mentorio-game-footer {
  color: #0f1429;
  background: #fff;
}
.zb-page .mentorio-game-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid #dce3ef;
}
.mentorio-game-header__inner,
.mentorio-game-footer__inner {
  width: min(calc(100% - 2rem), 75rem);
  margin-inline: auto;
}
.mentorio-game-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.75rem;
  padding-block: .625rem;
}
.zb-page .mentorio-game-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  /* Every game logo shares one height; width follows each logo's own proportions. */
  width: auto;
  height: 2.75rem;
  color: #102440;
  text-decoration: none;
}
.zb-page .mentorio-game-brand img {
  display: block;
  width: auto;
  height: 100%;
  max-width: none;
}
.mentorio-game-brand__wordmark {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  font-size: 1.8125rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.mentorio-game-brand__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.4375rem;
  height: 2.625rem;
  border-radius: .5625rem;
  color: #fcd000;
  background: #102440;
  font-size: 1.5rem;
}
.mentorio-game-header__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.zb-page .mentorio-game-header__help,
.zb-page .mentorio-game-header__home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin: 0;
  padding: .625rem .875rem;
  border: 1px solid transparent;
  border-radius: .375rem;
  color: #0f1429;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: .875rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.zb-page .mentorio-game-header__home {
  border-color: #fcd000;
  background: #fcd000;
}
.zb-page .mentorio-game-header__help:hover {
  color: #102e5c;
  background: #f2f5fa;
  filter: none;
  transform: none;
}
.zb-page .mentorio-game-header__home:hover {
  border-color: #e6be00;
  color: #0f1429;
  background: #e6be00;
}
.zb-page .mentorio-game-footer {
  border-top: 1px solid #dce3ef;
  text-align: left;
}
.mentorio-game-footer__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem;
  gap: 2.5rem 5rem;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.zb-page .mentorio-game-footer__tagline {
  max-width: 31rem;
  margin: .875rem 0 0;
  color: #536477;
  font-size: .9375rem;
  line-height: 1.7;
}
.zb-page .mentorio-game-footer__credit {
  display: inline-block;
  margin-top: .875rem;
  color: #3f6297;
  font-size: .8125rem;
  line-height: 1.6;
  text-underline-offset: .25em;
}
.zb-page .mentorio-game-footer__games h2 {
  margin: 0 0 .875rem;
  color: #3f6297;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .1em;
  line-height: 1.5;
  text-transform: uppercase;
}
.mentorio-game-footer__games ul {
  display: grid;
  gap: .25rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.zb-page .mentorio-game-footer__games a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: #102440;
  font-size: .9375rem;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none;
  text-underline-offset: .25em;
}
.zb-page .mentorio-game-footer__games a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: #fcd000;
  text-decoration-thickness: 3px;
}
.zb-page .mentorio-game-footer a:hover {
  color: #3f6297;
  text-decoration: underline;
}
.mentorio-game-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.25rem;
  border-top: 1px solid #dce3ef;
  color: #536477;
  font-size: .75rem;
  line-height: 1.7;
}
.zb-page .mentorio-game-footer__bottom p { margin: 0; }
.mentorio-game-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}
.zb-page .mentorio-game-footer__legal a {
  color: #102440;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1.7;
  text-underline-offset: .25em;
}
.zb-page .mentorio-game-header :focus-visible,
.zb-page .mentorio-game-footer :focus-visible {
  outline: 2px solid #3f6297;
  outline-offset: 4px;
}
@media (max-width: 680px) {
  .mentorio-game-header__inner { gap: .75rem; min-height: 4.75rem; }
  .zb-page .mentorio-game-header .mentorio-game-brand { height: 2.25rem; }
  .mentorio-game-header__nav { gap: .5rem; }
  .zb-page .mentorio-game-header__help,
  .zb-page .mentorio-game-header__home { padding: .5rem .625rem; font-size: .75rem; }
  .mentorio-game-header .mentorio-game-brand__wordmark { gap: .5rem; font-size: 1.5rem; }
  .mentorio-game-header .mentorio-game-brand__icon { width: 1.9375rem; height: 2.1875rem; font-size: 1.25rem; }
  .mentorio-game-footer__content { grid-template-columns: minmax(0, 1fr) 8rem; gap: 2rem; }
  .mentorio-game-footer__bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .mentorio-game-header__inner { width: calc(100% - 1.5rem); gap: .5rem; }
  .zb-page .mentorio-game-header .mentorio-game-brand { height: 1.875rem; }
  .mentorio-game-header__nav { gap: .375rem; }
  .zb-page .mentorio-game-header__help,
  .zb-page .mentorio-game-header__home { padding-inline: .375rem; font-size: .6875rem; }
  .mentorio-game-header .mentorio-game-brand__wordmark { gap: .375rem; font-size: 1.3125rem; }
  .mentorio-game-header .mentorio-game-brand__icon { width: 1.75rem; height: 2rem; font-size: 1.125rem; }
  .mentorio-game-footer__content { grid-template-columns: minmax(0, 1fr); }
  .mentorio-game-footer__games ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .zb-page .mentorio-game-header__help,
  .zb-page .mentorio-game-header__home { transition: none; }
}

/* ---------- Footer: same look as the main site footer (dark navy, yellow eyebrows) ---------- */
.zb-page .mentorio-game-footer { margin: 0; border-top: 0; color: #fff; background: #0f1429; text-align: left; }
.mentorio-game-footer__content { grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(10rem, .45fr)); gap: clamp(2.5rem, 5vw, 5rem); padding-block: clamp(3rem, 6vw, 4.5rem) clamp(2.5rem, 5vw, 3.5rem); }
.zb-page .mentorio-game-footer .mentorio-game-brand { height: 3.25rem; color: #fff; }
.zb-page .mentorio-game-footer .mentorio-game-brand__icon { color: #0f1429; background: #fcd000; }
.zb-page .mentorio-game-footer__tagline { margin-top: 1.25rem; color: rgba(255, 255, 255, .76); font-size: 1rem; line-height: 1.65; }
.zb-page .mentorio-game-footer__credit { margin-top: .75rem; color: #fcd000; font-size: .875rem; font-weight: 700; text-decoration: none; }
.zb-page .mentorio-game-footer__games h2 { margin: 0 0 1.2rem; color: #fcd000; font-size: .72rem; font-weight: 850; letter-spacing: .12em; }
.mentorio-game-footer__games ul { gap: .72rem; }
.zb-page .mentorio-game-footer__games a { min-height: 0; color: #fff; font-size: .94rem; font-weight: 700; text-decoration: none; }
.zb-page .mentorio-game-footer__games a[aria-current="page"] { color: #fcd000; text-decoration: none; }
.zb-page .mentorio-game-footer a:hover,
.zb-page .mentorio-game-footer a:focus-visible { color: #fcd000; text-decoration: underline; text-underline-offset: .28em; }
.mentorio-game-footer__bottom { padding-block: 1.35rem; border-top: 1px solid rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .68); font-size: .79rem; }
.mentorio-game-footer__legal { gap: .5rem 1.25rem; }
.zb-page .mentorio-game-footer__legal a { color: #fff; font-size: .79rem; font-weight: 750; text-decoration: none; }
.zb-page .mentorio-game-footer :focus-visible { outline-color: #fff; }
@media (max-width: 680px) {
  .mentorio-game-footer__content { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 1.5rem; }
  .mentorio-game-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .mentorio-game-footer__games ul { grid-template-columns: minmax(0, 1fr); }
}

/* Зборопат's artwork reads slightly smaller than the others at the shared height. */
.zb-page .mentorio-game-brand--zboropat { height: 3.0625rem; margin-block: -.15625rem; }
.zb-page .mentorio-game-footer .mentorio-game-brand--zboropat { height: 3.625rem; margin-block: -.1875rem; }
@media (max-width: 760px) { .zb-page .mentorio-game-header .mentorio-game-brand--zboropat { height: 2.5rem; margin-block: -.125rem; } }
@media (max-width: 480px) { .zb-page .mentorio-game-header .mentorio-game-brand--zboropat { height: 2.0625rem; margin-block: -.09375rem; } }
/* Шини's train logo carries a chimney and steam above the letters, so it gets extra height to keep the letters readable. */
.zb-page .mentorio-game-brand--shini { height: 3.5rem; margin-block: -.375rem; }
.zb-page .mentorio-game-footer .mentorio-game-brand--shini { height: 4rem; margin-block: -.375rem; }
@media (max-width: 760px) { .zb-page .mentorio-game-header .mentorio-game-brand--shini { height: 2.875rem; margin-block: -.3125rem; } }
@media (max-width: 480px) { .zb-page .mentorio-game-header .mentorio-game-brand--shini { height: 2.375rem; margin-block: -.25rem; } }

/* Phones: no zoom while playing.
   1) Fast repeated taps (e.g. "Бриши") must not trigger double-tap zoom; pinch zoom stays available.
   2) iOS zooms into any text field under 16px when it is focused, so fields are 16px on touch screens. */
body.zb-page { touch-action: manipulation; }
@media (hover: none) and (pointer: coarse) {
	.zb-page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
	.zb-page select,
	.zb-page textarea { font-size: 16px; }
}

/* Ad band above the game footer (same consent-gated slot as articles). */
.mentorio-game-ad { padding: 28px 16px 32px; text-align: center; }
.mentorio-game-ad__label { display: block; margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8a95a8; }
.mentorio-ad { position: relative; width: var(--ad-w); max-width: 100%; height: var(--ad-h); margin: 0 auto; }
@media (max-width: 760px) { .mentorio-ad--responsive { width: var(--ad-mw); height: var(--ad-mh); } }
.mentorio-ad__placeholder { position: absolute; inset: 0; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .6rem; border: 1px dashed #d8dee8; border-radius: 10px; background: #edf0f5; color: #8a95a8; padding: 1rem; text-align: center; }
.mentorio-ad__placeholder > span { font-size: 2.25rem; color: #c7cfdd; font-weight: 850; line-height: 1; }
.mentorio-ad__placeholder small { font-size: .65rem; line-height: 1.5; }
.mentorio-ad__frame { position: relative; display: block; width: 100%; height: 100%; border: 0; background: transparent; }
.mentorio-ad__frame:not([src]) { display: none; }
.mentorio-ad__placeholder small { max-width: 17rem; }
.mentorio-ad__consent { font: inherit; font-size: .75rem; font-weight: 600; color: #1f3a68; background: #fff; border: 1px solid #c9d2e0; border-radius: 999px; padding: .4rem .9rem; cursor: pointer; }
.mentorio-ad__consent:hover, .mentorio-ad__consent:focus-visible { border-color: #1f3a68; }
@media (min-width: 761px) { .mentorio-ad[style*="--ad-h:90px"] .mentorio-ad__placeholder { flex-direction: row; gap: 1rem; padding: .5rem 1rem; } .mentorio-ad[style*="--ad-h:90px"] .mentorio-ad__placeholder > span { display: none; } }

/* Зборко: 300×250 banner to the right of the board on wide screens. */
.zb-side-ad { display: none; }
@media (min-width: 1280px) {
	.zb-page:not(.zp-page) .zb-game-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 580px) minmax(0, 1fr); column-gap: 32px; }
	.zb-page:not(.zp-page) .zb-game-section > * { grid-column: 1 / -1; }
	.zb-page:not(.zp-page) .zb-game-section > .zb-game-card { grid-column: 2; width: 100%; box-sizing: border-box; }
	.zb-page:not(.zp-page) .zb-game-section > .zb-side-ad { grid-column: 3; display: block; justify-self: start; align-self: start; position: sticky; top: 24px; margin-top: 0; text-align: center; }
}

/* Pull-to-refresh on phones: the area revealed above a game page matches its white header, never transparent. */
html { background: #fff; }

/* Ad spaces: without marketing consent the placeholder (with the cookie-settings button) is shown;
   once ads are allowed the frame loads and the placeholder disappears, so only the ad itself shows. */
.mentorio-ad:has(.mentorio-ad__frame[src]) .mentorio-ad__placeholder { display: none !important; }

/* Allowed but not loaded yet: a soft frame with a small spinner, until the ad appears. An empty slot is hidden. */
.mentorio-ad:has(.mentorio-ad__frame[src]):not(.is-filled) { border-radius: 10px; background: #f3f5f9; box-shadow: inset 0 0 0 1px #e1e6ee; }
.mentorio-ad:has(.mentorio-ad__frame[src]):not(.is-filled)::after { content: ""; position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2px solid #d4dbe6; border-top-color: #8a95a8; border-radius: 50%; animation: mentorio-ad-spin .8s linear infinite; pointer-events: none; }
@keyframes mentorio-ad-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mentorio-ad:has(.mentorio-ad__frame[src]):not(.is-filled)::after { animation-duration: 2.4s; } }
:is(.site-top-ad, .home-ad, .article-top-ad, .article-sidebar__ad, .aggregator__ad, .mentorio-game-ad, .zb-side-ad):has(.mentorio-ad.is-empty) { display: none !important; }
