html,
body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background:
    radial-gradient(circle at top left, rgba(0, 74, 153, 0.12), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #edf3f9 100%);
  color: #163150;
  font-family: Arial, Roboto, sans-serif;
  font-size: 16px;
}

.nretc-shell {
  min-height: calc(var(--nretc-vh, 1vh) * 100);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.nretc-header {
  position: sticky;
  top: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #d7dfeb;
  backdrop-filter: blur(10px);
}

.nretc-brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #102a4c;
  text-decoration: none;
}

.nretc-brand__mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #004a99;
  box-shadow: 0 10px 20px rgba(0, 74, 153, 0.18);
}

.nretc-brand__mark img {
  width: 28px;
  height: 28px;
}

.nretc-brand strong,
.nretc-brand small {
  display: block;
}

.nretc-brand strong {
  font-size: 1.08rem;
  color: #102a4c;
  letter-spacing: -0.01em;
}

.nretc-brand small {
  margin-top: 3px;
  color: #5d718e;
  font-size: 0.92rem;
}

.nretc-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.nretc-nav__link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  background: #eef5ff;
  color: #004a99;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
}

.nretc-nav__link--primary {
  background: #004a99;
  color: #ffffff;
}

.nretc-main {
  display: grid;
  place-items: center;
  padding: 14px 14px 8px;
}

.nretc-game-card {
  width: min(100%, 760px);
  padding: 14px;
  border: 1px solid rgba(0, 74, 153, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 48px rgba(15, 35, 63, 0.12);
}

.nretc-game-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  color: #173152;
}

.nretc-game-title span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: #eef5ff;
  color: #004a99;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nretc-game-title strong {
  font-size: 1.04rem;
  font-weight: 700;
  text-align: right;
}

.nretc-sound-toggle {
  min-height: 40px;
  border: 1px solid rgba(0, 74, 153, 0.16);
  border-radius: 999px;
  padding: 0 14px;
  background: #004a99;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.nretc-sound-toggle.is-muted {
  background: #eef5ff;
  color: #004a99;
}

.nretc-game-stage {
  position: relative;
  width: min(100%, 700px);
  height: min(calc(var(--nretc-vh, 1vh) * 74), 680px);
  min-height: 525px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 22px;
  background: #4ec0ca;
  box-shadow:
    inset 0 0 0 1px rgba(0, 74, 153, 0.12),
    0 18px 38px rgba(15, 35, 63, 0.14);
}

#gamecontainer {
  width: 100%;
  height: 100%;
  min-height: 0;
}

#gamescreen {
  overflow: hidden;
}

#bigscore {
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

#splash {
  left: calc(50% - 94px);
}

#scoreboard {
  left: calc(50% - 118px);
}

.nretc-footer {
  padding: 12px 18px 16px;
  text-align: center;
  color: #5d718e;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .nretc-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 12px;
  }

  .nretc-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .nretc-nav__link {
    flex: 1 1 auto;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .nretc-main {
    padding: 10px 8px 6px;
  }

  .nretc-game-card {
    padding: 8px;
    border-radius: 20px;
  }

  .nretc-game-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .nretc-game-title strong {
    text-align: left;
  }

  .nretc-sound-toggle {
    width: 100%;
  }

  .nretc-game-stage {
    height: min(calc(var(--nretc-vh, 1vh) * 62), 540px);
    min-height: 430px;
    border-radius: 18px;
  }
}
