.study-entry {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  background: #111517;
  color: #f3f5f4;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.study-entry[hidden],
.study-entry-page[hidden],
.study-entry button[hidden] {
  display: none !important;
}

.study-entry-content {
  box-sizing: border-box;
  display: grid;
  align-items: center;
  min-height: 100%;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 36px 24px;
}

.study-entry-page {
  position: relative;
  width: 100%;
  text-align: center;
}

.study-entry h1,
.study-entry h2 {
  margin: 0 0 28px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
}

.study-entry h1 {
  font-size: 42px;
}

.study-entry h2 {
  font-size: 28px;
}

.study-entry p {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.75;
}

.study-entry-copy {
  margin: 0 auto 28px;
  max-width: 600px;
  text-align: left;
}

.study-entry-menu {
  position: fixed;
  inset-block: 0;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  display: grid;
  grid-template-rows: minmax(0, 42fr) auto minmax(0, 58fr);
  width: min(100vw, 44.59dvh);
  height: 100dvh;
  overflow-y: auto;
  background: #08090b url("game/images/backgrounds/black.png") center / 100% 100% no-repeat;
}

.study-entry-menu-list {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.study-entry-menu h1 {
  margin: 0 0 2.56dvh;
  color: #fff;
  font-size: 4.95dvh;
  line-height: 1.1;
}

.study-entry-stories,
.study-entry-menu-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.91dvh;
}

.study-entry-menu-actions {
  margin-top: 2.4dvh;
}

.study-entry-menu button:not(.study-entry-back) {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 3.14dvh;
  line-height: 1.1;
}

.study-entry-menu-actions button:not(.study-entry-back) {
  font-size: 2.15dvh;
  line-height: 1.2;
}

.study-entry-menu button:not(:disabled):hover,
.study-entry-menu button:not(:disabled):focus-visible {
  color: #ffd700;
}

.study-entry-menu button:disabled {
  color: #666;
  cursor: default;
  opacity: 1;
}

.study-entry button {
  box-sizing: border-box;
  min-height: 48px;
  max-width: 100%;
  padding: 11px 20px;
  border-radius: 6px;
  font: inherit;
  font-size: 17px;
  line-height: 1.4;
  cursor: pointer;
}

.study-entry-primary {
  border: 1px solid #e9eceb;
  background: #e9eceb;
  color: #182124;
}

.study-entry-primary:hover,
.study-entry-primary:focus-visible {
  border-color: #b3d7d0;
  background: #b3d7d0;
}

.study-entry-secondary {
  border: 1px solid #8c9a9e;
  background: transparent;
  color: #e7eded;
}

.study-entry-secondary:hover,
.study-entry-secondary:focus-visible {
  border-color: #b3d7d0;
  color: #b3d7d0;
}

.study-entry-back {
  position: absolute;
  top: -8px;
  left: 0;
  width: 48px;
  padding: 0 !important;
  border: 0;
  background: transparent;
  color: #e7eded;
  font-size: 26px !important;
}

.study-entry-qr {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(56vh, 560px);
  margin: 12px auto 18px;
  object-fit: contain;
}

.study-entry-qr-crop {
  position: relative;
  width: 220px;
  height: 220px;
  overflow: hidden;
  margin: 0 auto 24px;
  border-radius: 4px;
  background: #fff;
}

.study-entry-qr-crop img {
  position: absolute;
  top: -765px;
  left: -520px;
  width: 750px;
  height: 1052px;
  max-width: none;
}

.study-entry-hint {
  color: #c7d0d0;
}

#study-entry-progress {
  display: block;
  width: min(100%, 520px);
  height: 14px;
  margin: 28px auto;
  accent-color: #87b8af;
}

@media (max-width: 600px) {
  .study-entry-content {
    padding: 30px 20px;
  }

  .study-entry h1 {
    font-size: 34px;
  }

  .study-entry h2 {
    font-size: 24px;
  }

  .study-entry p {
    font-size: 16px;
  }

  .study-entry-qr {
    max-height: 54vh;
  }

  .study-entry button:not(.study-entry-back) {
    width: 100%;
  }
}
