*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

html,
body {
  margin: 0;
  max-height: 100vh;
  max-height: 100dvh;
}

body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: #f4efe4;
  color: #1c1917;
}

.portal {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 10px 12px 10px;
  overflow: hidden;
}

.portal__mast {
  flex-shrink: 0;
  text-align: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 3px double #1c1917;
}

.portal__issue {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.35em;
  color: #78716c;
}

.portal__headline {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.1;
}

.portal__headline-ar {
  display: block;
  font-size: clamp(1.35rem, 4.5vh, 2.2rem);
  font-weight: 700;
  color: #b45309;
}

.portal__headline-en {
  display: block;
  margin-top: 2px;
  font-size: clamp(1rem, 3vh, 1.5rem);
  font-weight: 400;
  font-style: italic;
  color: #44403c;
}

.portal__deck {
  margin: 6px auto 4px;
  max-width: 420px;
  font-size: clamp(11px, 1.8vh, 14px);
  line-height: 1.4;
  color: #57534e;
}

.portal__menu {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(6px, 1.2vh, 10px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 4px;
}

.menu-row {
  flex: 0 0 auto;
  min-height: 0;
  max-height: none;
  display: grid;
  grid-template-columns: auto 1fr min(34%, 140px);
  align-items: center;
  gap: clamp(8px, 2vw, 14px);
  width: 100%;
  padding: clamp(8px, 1.5vh, 12px) clamp(10px, 2vw, 14px);
  border: 3px solid #1c1917;
  cursor: pointer;
  font: inherit;
  text-align: right;
  background: #fff;
  box-shadow: 5px 5px 0 #1c1917;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.menu-row:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 #1c1917;
}

.menu-row:active {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 #1c1917;
}

.menu-row:focus {
  outline: 3px solid #0369a1;
  outline-offset: 3px;
}

.menu-row__index {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 4vh, 2rem);
  font-weight: 700;
  line-height: 1;
  color: #d6d3d1;
  min-width: 1.5rem;
}

.menu-row__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.menu-row__brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2.8vh, 1.45rem);
  font-weight: 700;
  color: #1c1917;
}

.menu-row__tag {
  margin: 0;
  font-size: clamp(10px, 1.7vh, 13px);
  font-weight: 700;
  color: #57534e;
  line-height: 1.35;
}

.menu-row__action {
  font-size: clamp(10px, 1.6vh, 12px);
  font-weight: 800;
  color: #0369a1;
  margin-top: 2px;
}

.menu-row__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  max-height: clamp(65px, 14vh, 96px);
  padding: 8px;
  transform: rotate(-3deg);
  border: 3px solid #1c1917;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.15);
}

.menu-row__frame--fun {
  background: linear-gradient(135deg, #fef08a, #fde047);
}

.menu-row__frame--bx {
  background: linear-gradient(135deg, #fecaca, #fb923c);
}

.menu-row__frame--mg {
  background: linear-gradient(135deg, #ddd6fe, #f9a8d4);
}

.menu-row__frame--mindrush {
  background: linear-gradient(135deg, #a5f3fc, #c084fc);
}

.menu-row__logo {
  max-width: 100%;
  max-height: clamp(36px, 8vh, 56px);
  width: auto;
  object-fit: contain;
}

.menu-row__logo--svg {
  max-height: clamp(30px, 6vh, 44px);
}

.menu-row--fun {
  background: linear-gradient(90deg, #fff 70%, #fffbeb 100%);
}

.menu-row--bx {
  background: linear-gradient(90deg, #fff 70%, #fef2f2 100%);
}

.menu-row--mg {
  background: linear-gradient(90deg, #fff 70%, #f5f3ff 100%);
}

.menu-row--mindrush {
  background: linear-gradient(90deg, #fff 70%, #fdf4ff 100%);
}

.menu-row__frame--gliq {
  background: linear-gradient(135deg, #bae6fd, #0284c7);
}

.menu-row__frame--gluae {
  background: linear-gradient(135deg, #bbf7d0, #059669);
}

.menu-row__frame--flexgpt {
  background: linear-gradient(135deg, #e0e7ff, #6366f1);
}

.menu-row__frame--gamezroid {
  background: linear-gradient(135deg, #fde68a, #d97706);
}

.menu-row__frame--ludodzo {
  background: linear-gradient(135deg, #fecdd3, #e11d48);
}

.menu-row__frame--ludokw {
  background: linear-gradient(135deg, #a5f3fc, #2e758b);
}

.menu-row--gliq {
  background: linear-gradient(90deg, #fff 70%, #f0f9ff 100%);
}

.menu-row--gluae {
  background: linear-gradient(90deg, #fff 70%, #ecfdf5 100%);
}

.menu-row--flexgpt {
  background: linear-gradient(90deg, #fff 70%, #eef2ff 100%);
}

.menu-row--gamezroid {
  background: linear-gradient(90deg, #fff 70%, #fffbeb 100%);
}

.menu-row--ludodzo {
  background: linear-gradient(90deg, #fff 70%, #fff1f2 100%);
}

.menu-row--ludokw {
  background: linear-gradient(90deg, #fff 70%, #ecfeff 100%);
}

@media (max-height: 520px) {
  .portal__deck {
    display: none;
  }

  .menu-row__tag {
    display: none;
  }

  .menu-row__frame {
    max-height: 65px;
  }
}

@media (max-width: 540px) {
  html,
  body {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: none;
    height: auto;
    min-height: 100dvh;
  }

  .portal {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: visible;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }

  .menu-row {
    max-height: none;
    flex: 0 0 auto;
    grid-template-columns: auto 1fr min(36%, 108px);
  }
}

@media (max-width: 400px) {
  .portal__issue {
    letter-spacing: 0.2em;
    font-size: 10px;
  }

  .menu-row {
    grid-template-columns: 2rem 1fr;
    grid-template-rows: auto auto;
    gap: 6px 10px;
    padding: 10px;
  }

  .menu-row__frame {
    grid-column: 1 / -1;
    max-height: 65px;
    transform: none;
  }

  .menu-row__index {
    align-self: center;
  }

  .menu-row__text {
    align-items: flex-start;
  }

  .menu-row__action {
    word-break: break-word;
  }
}
