.games { width: min(152px, 100%); align-self: flex-start; }
.active-game-title { margin: 0; font-size: 18px; font-weight: 750; text-align: center; }
.games ul { list-style: none; padding: 0; margin: 0; }
.games li + li { border-top: 1px solid #8a9ca5; }
.games a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 8px;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.games a[aria-current=page] { font-weight: 750; }
.games img { width: 26px; height: 26px; border-radius: 5px; flex: none; }
.games a:hover, .games a[aria-current=page] { background: #203847; border-radius: 5px; }

.website:has(.games) {
  --game-width: 760px;
  --game-side-space: 252px;
}
@media (min-width: 901px) {
  .website:has(.games) {
    display: grid;
    grid-template-columns: minmax(0, var(--game-width));
    justify-content: center;
    padding-inline: var(--game-side-space);
  }
  .website:has(.games) > :is(.game, .website-game) {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: var(--game-width);
  }
}

/* Apply the same navigation to the existing Nicotom 27 home page. */
.website-links:has(.games) {
  top: 16px;
  bottom: 0;
  left: 0;
  width: max(var(--game-side-space), calc((100% - var(--game-width)) / 2));
  transform: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  padding: 0;
  background: none;
}
.website:has(.website-links .games) { min-height: 100dvh; }
.website:has(.website-links .games) .website-game { max-height: 852px; }
.website-links:has(.games) .play-promo {
  align-self: center;
  width: min(192px, calc(100% - 24px));
  border: 1px solid #263d4c;
  border-radius: 8px;
  padding: 16px 12px;
  background: linear-gradient(155deg,#1b3040f2,#0d1b29f2);
}
.website-links:has(.games) .active-game-title { margin-bottom: 12px; }
@media (max-width: 900px) {
  .games { width: 100%; }
  .active-game-title { font-size: 15px; }
  .website:has(.games) { padding-inline: 0; }
  .website:has(.games) > :is(.game, .website-game) {
    width: 100%;
    max-width: var(--game-width);
    border: 0;
    border-radius: 0;
  }
  .website:has(.website-links .games) {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .website:has(.website-links .games) .website-game {
    order: -1;
    height: 100dvh;
    max-height: none;
  }
  .website-links:has(.games) .play-promo { width: 100%; flex-wrap: wrap; }
  .website-links:has(.games) .active-game-title { width: 100%; margin: 0; }
  .website-links:has(.games) {
    width: min(100%,440px);
    align-self: center;
  }
}

/* Shared download panel and game spacing across the Nicotom app pages. */
.website:has(.games) {
  padding-top: 24px;
  padding-bottom: 24px;
}
.website:has(.games) > :is(.game, .website-game) {
  height: max(520px, calc(100dvh - 48px));
  max-height: 852px;
  border: 1px solid #304756;
  border-radius: 8px;
}
.website:has(.games) > :is(.side, .website-links) {
  top: 24px;
}
.website:has(.games) :is(.download, .play-promo) {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  align-self: flex-start;
  width: 208px;
  height: 288px;
  padding: 20px 12px;
  gap: 12px;
  text-align: center;
}
.website:has(.games) .active-game-title {
  margin: 0;
  font: 750 18px/1.25 system-ui, sans-serif;
}
.website:has(.games) :is(.download-icon, .play-game-logo) {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 12px;
}
.website:has(.games) .download > a,
.website:has(.games) .play-promo > .play-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 156px;
  max-width: 100%;
  padding: 0;
  gap: 12px;
}
.website:has(.games) :is(img.play-badge, .play-store-badge) {
  display: block;
  width: 156px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  padding: 0;
}
.website:has(.games) .ios-promo {
  width: 156px;
  max-width: 100%;
  padding: 0;
  margin: 0;
}
@media (max-width: 900px) {
  .website:has(.games) > :is(.game, .website-game) {
    height: calc(100dvh - 48px);
    min-height: 0;
    max-height: none;
  }
  .website:has(.games) > :is(.side, .website-links) {
    position: static;
    width: min(100% - 24px, 440px);
  }
}

.website:has(.games) :is(.download, .play-promo) .active-game-title { display: none; }
.games .game-unreleased {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 500;
}
.website-footer { padding: 0; background: #2c3e50; text-align: center; }
.website-footer h2 { margin: 0 0 26px; font-size: 24px; line-height: 1.25; font-weight: 800; text-transform: uppercase; }
.website-footer p { margin: 0; font-size: 18px; line-height: 1.55; }
.footer-columns { max-width: 1340px; margin: auto; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 48px; padding: 32px 24px 64px; }
.footer-social-links { display: flex; justify-content: center; gap: 14px; }
.footer-social-links a { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border: 2px solid currentColor; border-radius: 50%; color: #fff; text-decoration: none; }
.footer-social-links a:hover { background: #fff; color: #2c3e50; }
.footer-social-links svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.footer-bottom { padding: 24px; background: #233140; }
.footer-bottom a { display: inline-block; color: #fff; font-size: 15px; line-height: 24px; text-underline-offset: 4px; }
@media(max-width:900px) {
  .footer-columns { grid-template-columns: minmax(0,1fr); gap: 40px; padding: 32px 24px 48px; }
  .website-footer h2 { font-size: 22px; margin-bottom: 20px; }
  .website-footer p { font-size: 17px; }
}

/* Brand left, app downloads right, with complementary game lists below. */
.website:has(.games) > :is(.download, .play-promo) {
  position: absolute;
  top: 24px;
  right: 0;
  height: 216px;
  padding: 12px;
  gap: 8px;
  border: 1px solid #304756;
  border-radius: 8px;
  background: linear-gradient(155deg,#192f3c,#101e2c);
}
.website:has(.games) :is(.download-icon, .play-game-logo) {
  width: 52px;
  height: 52px;
}
.website:has(.games) .play-promo > .play-badge { gap: 8px; }
.website:has(.games) .ios-promo small { margin-top: 4px; font-size: 10px; }
.developer-brand { display: block; width: min(152px,100%); }
.developer-brand img { display: block; width: 100%; height: auto; }
.website > .more-games { position: absolute; right: 0; bottom: 0; width: 180px; }
.more-games h2 { font-size: 14px; line-height: 1.3; margin: 0; padding: 8px; font-weight: 700; }
.more-games li { border-top: 1px solid #8a9ca5; }
@media(max-width:900px) {
  .website:has(.games) > :is(.download, .play-promo) { position: static; order: 1; align-self: center; flex: none; }
  .website:has(.games) > :is(.side, .website-links) { order: 2; }
  .website > .more-games { position: static; order: 3; width: min(100% - 24px,440px); }
  .developer-brand { display: none; }
}
.website:has(.games) {
  --site-menu-text: #e0eff9;
  --site-menu-border: #647e91;
  --site-menu-active: #243e51;
  --site-panel-border: #304b60;
  --site-panel-background: linear-gradient(155deg,#1b3040,#0d1b29);
}
.website:has(> .game) {
  --site-menu-text: #e0f2e9;
  --site-menu-border: #638478;
  --site-menu-active: #284b42;
  --site-panel-border: #3c6057;
  --site-panel-background: linear-gradient(155deg,#234039,#132923);
}
.website:has(.games) :is(.games, .download, .play-promo) { color: var(--site-menu-text); }
.website:has(.games) :is(.games li + li, .more-games li) { border-color: var(--site-menu-border); }
.website:has(.games) .games a:is(:hover,[aria-current=page]) { background: var(--site-menu-active); }
.website:has(.games) > :is(.download, .play-promo) {
  background: var(--site-panel-background);
  border-color: var(--site-panel-border);
}

/* Align the swapped top panels while retaining the original logo proportions. */
.website:has(.games) > :is(.download, .play-promo) { left: 0; right: auto; z-index: 1; }
.website:has(.games) > :is(.side, .website-links) { justify-content: flex-end; }
.website > .developer-brand { position: absolute; top: 24px; right: 0; width: 152px; height: 216px; display: flex; align-items: center; z-index: 1; }
.website > .developer-brand img { width: 152px; height: 216px; object-fit: contain; }
@media(max-width:900px) {
  .website > .developer-brand { display: none; }
}

.trial-ad { position:absolute; z-index:1; top:264px; left:4px; width:200px; height:200px; overflow:hidden; border:1px solid var(--site-panel-border); border-radius:8px; background:var(--site-panel-background); color:var(--site-menu-text); text-align:center; }
.trial-ad-label { display:block; padding:5px 2px; font:10px/1.2 system-ui,sans-serif; opacity:.8; }
.trial-ad a { display:flex; flex-direction:column; align-items:center; gap:6px; color:inherit; text-decoration:none; font:12px/1.2 system-ui,sans-serif; }
.trial-ad img { width:70px; height:70px; border-radius:12px; }
.trial-ad strong { font-size:18px; }
.trial-ad b { margin-top:2px; padding:7px 12px; border-radius:5px; background:var(--site-menu-active); font-size:12px; }
@media(max-width:900px) { .trial-ad { position:static; order:2; flex:none; margin:0 auto; } }
.more-games h2 { text-align: center; }

.trial-ad-right { left: auto; right: 4px; }
@media(max-width:900px) { .trial-ad-right { display: none; } }

.trial-ad[hidden] { display: none; }
.trial-ad[data-compact] a { flex-direction:row; justify-content:center; padding:0 4px; }
.trial-ad[data-compact] img { width:26px; height:26px; border-radius:4px; }
.trial-ad[data-compact] strong { font-size:12px; }
.trial-ad[data-compact] a span { display:none; }
.trial-ad[data-compact] b { margin:0; padding:3px 5px; font-size:11px; }

/* The first screen has the same game and side-rail geometry on every title. */
@media(min-width:901px) {
  .website:has(.games) { height:100dvh; min-height:0; }
}
:is(.website:has(.website-links .games),.website:has(.side .games)) > :is(.game,.website-game) {
  height:max(1px,calc(100dvh - 48px));
  min-height:0;
  max-height:852px;
}
@media(max-width:900px) {
  .website:has(.games) { height:auto; min-height:0; gap:12px; }
}
@media(min-width:901px) and (max-height:560px) {
  .website:has(.games) { --compact-panel-height:clamp(98px,36dvh,190px); }
  .website:has(.games) > :is(.download,.play-promo,.developer-brand) {
    top:min(24px,5dvh);
    height:var(--compact-panel-height);
  }
  .website:has(.games) > :is(.download,.play-promo) { padding:5px; gap:4px; }
  .website:has(.games) :is(.download-icon,.play-game-logo) { width:clamp(22px,8dvh,44px); height:clamp(22px,8dvh,44px); margin:0; }
  .website:has(.games) :is(.play-store-badge,img.play-badge,.ios-promo) { width:min(156px,26dvh); }
  .website:has(.games) .play-promo > .play-badge { gap:4px; }
  .website:has(.games) .ios-promo small { margin-top:2px; }
  .website > .developer-brand img { height:100%; }
  .website:has(.games) .games :is(a,.game-unreleased) {
    min-height:clamp(23px,7dvh,36px);
    padding:2px 8px;
  }
  .website:has(.games) .games img { width:clamp(16px,4.5dvh,24px); height:clamp(16px,4.5dvh,24px); }
  .trial-ad { top:calc(min(24px,5dvh) + var(--compact-panel-height) + 12px); }
}
