body {
  font-family: Helvetica, sans-serif;
  margin: 0;
  overflow: hidden;
  background: #292e35;
  transition: opacity 0.5s, translate 0.5s;
}

/***********************************************
 * サイドバー
 ***********************************************/

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 210px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  backdrop-filter: blur(12px);
  font-size: 0.8em;
  opacity: 0;
  transition: opacity 0.2s, translate 0.2s;
  translate: -10px 0;
  overflow-y: auto;
}
.sidebar.fade-in {
  opacity: 1;
  translate: 0 0;
}
.sidebar h3 {
  font-size: 1em;
  margin-top: 0em;
  margin-bottom: 1.2em;
  font-weight: bold;
}
.sidebar h3 span:nth-child(1) {
  color: #f2843d;
}
.sidebar h3 span:nth-child(2) {
  color: #28ec6c;
}
.sidebar h3 span:nth-child(3) {
  color: #f00;
}
.sidebar h3 span:nth-child(4) {
  color: #f2843d;
}
.sidebar h3 span:nth-child(5) {
  color: #eee;
}
.sidebar h3 span:nth-child(6) {
  color: #eee;
}
.sidebar h4 {
  font-size: 1em;
  margin-top: 1.6em;
  margin-bottom: 0.8em;
  font-weight: bold;
}
.sidebar h4:first-child {
  margin-top: 0;
}
.sidebar select {
  font-size: 1em;
}
.btn-sidebar {
  font-size: 1em;
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.1em;
  margin: 0.4em 0;
}
p {
  font-size: 0.9em;
  opacity: 0.8;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/***********************************************
 *  右クリックメニュー
 ***********************************************/

#context_menu {
  display: inline-block;
  z-index: 999;
  position: absolute;
  left: 500px;
  top: 500px;
  background: #222;
  width: max-content;
  padding: 0.2em 0;
  user-select: none;
  visibility: hidden;
  border-radius: 4px;
}
#context_menu p {
  margin: 0em;
  padding: 0.2em 1.2em;
}
#context_menu p:hover {
  background: #444;
  cursor: pointer;
}
#context_menu hr {
  margin: 0.3em 0;
  padding: 0;
}

/***********************************************
 * レンダラーに重ねて表示するUI
 ***********************************************/

.three-ui {
  display: inline-block;
  position: absolute;
  left: 0%;
  top: 0%;
  transform-origin: left top;
  pointer-events: none;
}

.three-ui.simple div {
  margin-top: 10px;
  background: none;
}
.three-ui.simple div:before {
  display: none;
}
.three-ui.simple div:after {
  display: none;
}
.three-ui.simple div p span {
  display: none;
}
.three-ui.simple div p.important {
  font-size: 1.5em;
}
.three-ui.simple div p span.important {
  display: inline;
  color: white; /* テキストの色を白に設定 */
  text-shadow: /* 8方向にシャドウを設定 */ -2px -2px 0 #000, 2px -2px 0 #000, 2px 2px 0 #000, -2px 2px 0 #000,
    -2px 0px 0 #000, 2px 0px 0 #000, 0px -2px 0 #000, 0px 2px 0 #000;
}

.three-ui div {
  transform: translate(-50%, -100%);
  width: max-content;
  height: max-content;
  font-size: 0.9em;
  pointer-events: none;
}

.three-ui div p {
  margin-top: 0.2em;
}
.three-ui div p:first-child {
  margin-top: 0em;
}

/***********************************************
 * ふきだし
 * @see https://saruwakakun.com/html-css/reference/speech-bubble
 ***********************************************/

.balloon2 {
  border-radius: 4px;
  --color-border: transparent;
  --color-bg: rgba(0, 0, 0, 0.7);
  --color-text: white;
  position: relative;
  display: inline-block;
  padding: 7px 10px;
  color: var(--color-text);
  font-size: 16px;
  background: var(--color-bg);
  border: solid 3px var(--color-border);
  box-sizing: border-box;
}

.balloon2:before {
  content: "";
  position: absolute;
  bottom: -23px;
  left: 50%;
  margin-left: -10px;
  border: 12px solid transparent;
  border-top: 12px solid var(--color-bg);
  z-index: 2;
  pointer-events: none;
}

.balloon2:after {
  content: "";
  position: absolute;
  bottom: -29px;
  left: 50%;
  margin-left: -17px;
  border: 14px solid transparent;
  border-top: 14px solid var(--color-border);
  z-index: 1;
  pointer-events: none;
}

.balloon2 p {
  margin: 0;
  padding: 0;
}

/***********************************************
 * サイト説明
 ***********************************************/

#about_wrapper {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
  display: none;
}

#about_wrapper.fade-in {
  opacity: 1;
  transform: translateY(0);
}

#about_wrapper.fade-out {
  opacity: 0;
  transform: translateY(20px);
}

#about {
  margin: auto;
  max-width: 800px;
  color: #000;
  box-sizing: border-box;
  font-family: YakuHanJPs, Roboto, "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", Arial, nc3Jp, sans-serif !important;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 2em;
}

#about .update-log {
  border: 3px solid black;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  overflow-y: auto;
  height: 8em;
  padding: 1em 3em;
  margin: 2em 0;
}

#about .update-log ul {
  list-style: none;
  font-size: 1em;
  font-weight: bold;
}

#about .update-log li {
  display: flex;
  align-items: flex-start;
}

#about .update-log ul li span:first-child {
  color: #ecfd57;
  display: inline-block;
  flex: 0 0 5em; /* 幅を5emに固定 */
  margin-right: 1em; /* 右側のコンテンツとの間隔 */
}

#about .update-log ul li span:last-child {
  flex-grow: 1; /* 残りのスペースを全て使用 */
}

#about .about-header {
  background: #3d029b;
  color: #ecfd57;
  font-size: 1.2em;
  padding: 0.5em;
  font-weight: bold;
  box-shadow: 4px 0px 4px rgba(0, 0, 0, 0.7);
  margin: 0;
  opacity: 1;
}

#about .about-content {
  background-color: #e8e8e8;
  background-image: url("./glb/Texture.Rock.jpg");
  background-repeat: repeat;
  background-size: 1024px 1024px;
  padding: 3em;
  margin: 0;
}

#about .about-h1-top {
  color: #aaa;
  border-bottom: 2px solid #aaa;
  padding: 0.04em 0;
  margin: 0;
  line-height: 100%;
  font-size: 0.8em;
}

#about h1 {
  display: block;
  text-align: center;
  font-size: 2.6em;
  font-weight: bold;
  border-top: 6px solid #aaa;
  border-bottom: 6px solid #aaa;
  padding: 0.5em 0;
  margin: 0.06em 0;
}

#about .about-block {
  border: 1px solid #aaa;
  padding: 2em;
  margin: 2.5em 0;
  font-size: 1.1em;
  font-weight: bold;

  /**
   * @see https://web-dev.tech/front-end/css/graph-paper-background/
   */
  background-color: #f2f2f2;
  background-image: linear-gradient(0deg, transparent calc(100% - 1px), #e2e2e2 calc(100% - 1px)),
    linear-gradient(90deg, transparent calc(100% - 1px), #e2e2e2 calc(100% - 1px));
  background-size: 16px 16px;
  background-repeat: repeat;
  background-position: center center;
}

#about img {
  display: block;
  width: 100%;
  margin: 1em 0;
}

#about table {
  border-collapse: collapse;
  border-spacing: 0;
  margin: 1em 0;
}

#about_close {
  font-size: 5em;
  color: #444;
  position: absolute;
  right: 0;
  top: 0;
  margin: 0.2em;
  cursor: pointer;
  user-select: none;
}

#about tr {
}

#about td {
  margin: 1em 0;
  vertical-align: top;
}

#about h2 {
  background: #ecfd57;
  color: black;
  display: inline-block;
  rotate: -2deg;
  font-size: 1.5em;
  font-weight: bold;
  padding: 0.5em 1.5em;
  box-shadow: 8px 4px 8px rgba(0, 0, 0, 0.2);
  translate: -1.5em 0;
  margin: 0 0 0.6em;
}

#about h2:first-child {
  margin-top: 0;
}

#about .about-notice-list {
  list-style: none;
  padding-left: 1em;
  margin-left: 0.5em;
  font-size: 0.8em;
  font-weight: normal;
}
#about .about-notice-list li {
  text-indent: -1.5em;
}
#about .about-notice-list li:before {
  content: "※";
  margin-right: 0.2em;
}

#about .about-marker {
  background-color: #ecfd57;
}

/***********************************************
 * ローディング
 ***********************************************/

#loading_cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #292e35;
  z-index: 10000;
  transition: opacity 0.2s;
  opacity: 1;
  pointer-events: none;
}
#loading_cover.fade-out {
  opacity: 0;
}
#loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  z-index: 10000;
  color: #6a6d72;
  display: inline-block;
  width: max-content;
  height: max-content;
  text-align: center;
  pointer-events: none;
}
#loading p {
  transition: opacity 0.2s, translate 0.2s;
  opacity: 1;
  translate: 0px 0px;
}
#loading.fade-out p:nth-child(odd) {
  opacity: 0;
  translate: -10px 0px;
}
#loading.fade-out p:nth-child(even) {
  opacity: 0;
  translate: 10px 0px;
}

#layer_option_list label {
  font-size: 0.9em;
  color: #ddd;
  margin-left: 0.2em;
  user-select: none;
}
