:root {
  font-size: 1.25vw;
  line-height: 1.5;
  font-weight: 400;
  font-optical-sizing: auto;
  -webkit-text-size-adjust: 100%;
  color: var(--color-text);
  --header-height: 7rem;
  --color-text: rgb(40, 80, 152);
  --color-text-white: rgb(255, 255, 255);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html.lang-ja {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-en {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-fr {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-it {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-de {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-es {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-es-la {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-sc {
  font-family: 'PingFang SC', ' Lucida Grande', 'Hiragino Kaku Gothic ProN', 'SimSun', Meiryo, sans-serif;
}

html.lang-tc {
  font-family: 'PingFang TC', 'Lucida Grande', 'Hiragino Kaku Gothic ProN', 'Microsoft JhengHei', Meiryo, sans-serif;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
}

body {
  background-image: url("./Help_Background.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

button {
  cursor: pointer;
}

h1 {
  font-size: 2.5rem;
  font-weight: bold;
  padding-bottom: 1rem;
}

header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--header-height);
}

header::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  background-image: url("./ui_web_TitleBG_01.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

#header-bg {
  position: absolute;
  width: 30rem;
  height: 3rem;
  z-index: -1;
}

main {
  display: flex;
  justify-content: center;
  width: 100%;
  height: calc(100vh - var(--header-height));
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36rem;
  height: 4rem;
  margin: 0 auto;
  font-size: 1.125rem;
  font-weight: normal;
  color: var(--color-text);
  background: linear-gradient(to right, rgb(240, 240, 255), rgb(224, 232, 255));
  border: none;
  border-radius: 2rem 0.25rem 2rem 0.25rem;
  box-shadow: 0 0.125rem 0.25rem 0.125rem rgba(152, 160, 228, 0.6);
}

.button:focus,
.button:hover {
  background: linear-gradient(to right, rgb(168, 240, 16), rgb(240, 240, 56));
  border: 0.125rem solid rgb(255, 255, 255);
  box-shadow: 0 0 0.5rem 0.25rem rgba(168, 240, 16, 0.6);
}

.color-1 {
  color: rgb(255, 198, 0);
}

.hidden,
#level1.hidden,
#level2and3.hidden {
  display: none;
}

#level1 {
  width: 100%;
  padding: 2rem;
  overflow-y: scroll;
}

#level1-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  row-gap: 2rem;
  width: 100%;
  margin: 0 auto;
}

#level2and3 {
  display: flex;
  justify-content: center;
  column-gap: 1rem;
  padding-bottom: 1rem;
}

#level2 {
  position: relative;
  width: 38rem;
  padding: 2rem 0;
  background: linear-gradient(rgba(104, 88, 204, 0.6), rgba(152, 160, 228, 0.6));
  overflow-y: scroll;
}

#level2::after {
  position: absolute;
  z-index: -1;
  content: '';
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0.5rem 0.25rem -0.25rem rgba(0, 0, 0, 0.2);
}

#level2-buttons {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: end;
  row-gap: 1.5rem;
}

#level3 {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 38rem;
  background-color: rgba(104, 88, 204, 0.6);
  border: 0.125rem solid rgba(255, 255, 255, 0.6);
  border-radius: 1rem 0.25rem 1rem 0.25rem;
  box-shadow:
    0 0 0.25rem 0.25rem rgba(152, 160, 228, 0.6),
    inset 0 0 2rem 1rem rgba(255, 255, 255, 0.2);
}

#level3::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("./Help_DetailWindowBasePattern.png");
  border-radius: 1rem 0.25rem 1rem 0.25rem;
}

#level3-image {
  width: 100%;
  height: calc(100% - 4.5rem);
  margin: 0 auto;
}

#level3-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top;
}

#level3-text {
  padding: 1rem 1rem 0;
  font-size: 1rem;
  line-height: 1.5rem;
  white-space: pre-wrap;
  color: var(--color-text-white);
}

#level3-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--color-text-white);
}

.level3-button {
  width: 3rem;
  height: 4.5rem;
  background-color: rgba(0, 0, 0, 0);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border: none;
}

#level3-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16rem;
  height: 2.25rem;
  padding-bottom: 0.125rem;
  font-size: 1.5rem;
  line-height: 1.5rem;
  font-weight: 700;
  background-color: rgba(104, 88, 204, 0.8);
  border-top: 0.125rem solid rgba(0, 0, 0, 0.2);
  border-radius: 2.25rem;
}

#scroll-container {
  position: fixed;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 100%;
}

#scroll-thumb {
  position: absolute;
  top: 4rem;
  width: 0.5rem;
  height: 4rem;
  background-color: rgb(240, 240, 255);
  border-radius: 0.5rem;
  cursor: pointer;
  user-select: none;
  touch-action: none;
}

#scroll-track {
  position: absolute;
  width: 0.25rem;
  height: calc(100% - 4rem);
  background-color: rgb(255, 255, 255, 0.2);
  border-radius: 0.125rem;
  cursor: pointer;
  user-select: none;
}

.scroll-active #level1-buttons {
  padding-right: 1rem;
}

.scroll-active #level2 {
  width: 39rem;
  padding-right: 1rem;
}

.scroll-deactive #scroll-container {
  display: none;
}
