:root {
  --font-size: 1.4rem;
  --title-url: url("../images/ui/bg/bg_02.png");
  --bg-url: url("../images/ui/bg/bg_02.png");
  --button-url: url("../images/ui/button/button_02.png");
}

html {
  font-size: 62.5%;
  font-size: 250%;
  touch-action: manipulation;
  --webkit-font-feature-settings: "palt";
  font-feature-settings: "palt";
}

body {
  margin: 0;
  overflow: hidden;
  font-size: 1.4rem;
  font-size: var(--font-size);
  user-select: none;
}

/* --- */

#debug-button {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  font-size: var(--font-size);
  background-color: #008cba;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#message-box {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  width: calc(var(--font-size) * 25.1);
  max-width: 95dvmin;
  min-height: calc(var(--font-size) * 2.5);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: calc(var(--font-size) * 0.5) calc(var(--font-size) * 1);
  background-color: rgba(255, 255, 255, 0.7);
  color: black;
  font-size: var(--font-size);
  line-height: 1.5;
  text-align: left;
  /* opacity: 0; */
  transition: opacity 0.5s ease;
  border-radius: 10px;
  z-index: 99999;
  display: flex;
  align-items: center;
  text-align: left;
  justify-content: flex-start;
}

/* 横画面の時 */
@media (orientation: landscape) {
  #message-box {
    width: calc(var(--font-size) * 28);
    max-width: 85dvw;
  }
}

.fade-in {
  transition: opacity 0.5s ease;
  opacity: 1 !important;
}

.fade-out {
  transition: opacity 0.5s ease;
  opacity: 0;
}

a-scene {
  z-index: 1;
}

.image-container {
  z-index: 0;
  display: flex;
  gap: 3dvmin;
  flex-direction: column;

  position: absolute;
  /* top: calc(20px + calc(var(--font-size)* 2.5)); */
  top: 5dvmin;
  right: 5dvw;
  /* right: 20px; */
  /* left : 35dvmin; */
  /* width: calc(var(--font-size)* 15); */
  /* width: 40dvmin; */
  /* height: 40dvmin; */
  width: 60dvmin;
  height: 60dvmin;
  /* padding: 15px; */
  /* background-color: white; */
  /* border: 1px solid #ccc; */
  /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
  /* font-family: Arial, sans-serif; */
  /* font-size: 16px; */
  /* z-index: 2000; */
  /* opacity: 0; */
  /* display: none; */
  transition: all 0.5s ease-in-out;
  /* pointer-events: none; */
}

.image-box {
  transition: all 0.5s ease-in-out;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  opacity: 1;
}
.image-box.fadeout {
  opacity: 0;
}
.image-box.disable {
  display: none;
}

.note-image {
  transition: all 0.5s ease-in-out;
  max-width: 40dvmin;
  max-height: 40dvmin;
  width: 40dvmin;
  opacity: 1;
}
.note-image.fadeout {
  opacity: 0;
}
.note-caption {
  font-size: calc(var(--font-size) * 0.7);
  /* margin-top: 0; */
  margin: 0;
  transition: all 0.5s ease-in-out;
  max-width: 40dvmin;
  /* height: 60dvmin; */
  padding: 1dvmin;
  width: calc(40dvmin - 2dvmin);
  background-color: rgba(255, 255, 255, 0.7);
  opacity: 1;
}
.note-caption.fadeout {
  opacity: 0;
}

/* 全体のコンテナ */
.app-container {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100dvw;
  height: 100svh;
  width: 100sXvw;
}
.a-canvas {
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -2;
  visibility: hidden;
  opacity: 0;
}
.a-canvas.active {
  visibility: visible;
  opacity: 1;
}

.content-container {
  flex: 1;
  position: relative;
  background-color: none;
  /* opacity:0; */
}

.control-container {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: var(--bg-url);
  background-color: #1c2f2f;
  background-position: left top;
  background-size: cover;
}

/* 縦画面の時 */
@media (orientation: portrait) {
  :root {
    --orientation: portrait;
  }

  .app-container {
    flex-direction: column;
  }

  .content-container {
    flex-basis: 86%;
    overflow: hidden;
    /* 画面の上半分にコンテンツを表示 */
  }

  .control-container {
    flex-basis: 14%;
    /* 画面の下半分に操作エリアを表示 */
  }

  .round-button.left {
    top: 1rem;
    left: 2rem;
  }

  .round-button.right {
    top: 1rem;
    right: 2rem;
  }

  .image-container {
    flex-direction: column;
    justify-content: center;
    align-content: center;
    align-items: flex-end;
    width: 80dvw;
    height: 60dvh; /* message-boxとのクリアランス */
  }
}

/* 横画面の時 */
@media (orientation: landscape) {
  :root {
    --orientation: landscape;
  }

  .app-container {
    flex-direction: row;
  }

  .content-container {
    flex-basis: 86%;
    /* 左側にコンテンツを表示 */
  }

  .control-container {
    flex-basis: 14%;
    /* 右側に操作エリアを表示 */
  }

  .round-button.left {
    bottom: 2rem;
    left: 1rem;
  }

  .round-button.right {
    top: 2rem;
    left: 1rem;
  }

  .image-container {
    right: 3dvw;
    flex-direction: row;
    justify-content: center;
    align-content: center;
    align-items: flex-start;
    width: 60dvw; /* 右に寄せる */
    height: 80dvh;
  }
}

#video-player {
  position: absolute;
  left: 0%;
  top: 0%;
  width: 0%;
  height: 0%;
}

/* --- */

/* ボタン全体の基本スタイル */
.round-button {
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  font-size: 3dvmin;
  width: 6rem;
  height: 6rem;
  width: 10dvmin;
  height: 10dvmin;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  /* border: none; */
  border: solid;
  border-color: white;
  border-width: 0.25rem;
  cursor: pointer;
  /* background-blend-mode: hard-light; */
  background-image: var(--button-url);
  padding: 0;
  border-radius: 50%;
}

.round-button:hover {
  background-color: #e99e18;
}

.round-button:active {
  background-image: none !important;
  background-color: #e99e18;
}

.round-button.left-top {
  top: 2rem;
  left: 2rem;
}

.round-button.left-bottom {
  bottom: 2rem;
  left: 2rem;
}

.round-button.right-top {
  top: 2rem;
  right: 2rem;
}

.round-button.right-bottom {
  bottom: 2rem;
  right: 2rem;
}

.button_icon {
  object-fit: contain;
  width: 80%;
  max-width: 100%;
  transform: scale(0.9);
}

.center-button {
  -webkit-tap-highlight-color: transparent;
  padding: 1rem 2rem;
  /* background-color: #28a745; */
  color: white;
  border: solid;
  border-color: white;
  border-width: 0.25rem;
  /* border: none; */
  /* border-radius: 25px; */
  /* cursor: pointer; */
  z-index: 1000;
  width: 10rem;
  height: 10rem;
  width: 20dvmin;
  height: 20dvmin;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  /* border: none; */
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.2s ease;
  /* background-color: rgb(255, 199, 96); */
  border-radius: 50%;
  background-image: var(--button-url);
  padding: 0;
  border-radius: 50%;
}

.center-button:hover {
  transform: scale(1.05) translateY(-2px);
}

.blinking {
  -webkit-animation: blink 0.6s ease-in-out infinite alternate;
  -moz-animation: blink 0.6s ease-in-out infinite alternate;
  animation: blink 0.6s ease-in-out infinite alternate;
  background-image: none !important;
}

@-webkit-keyframes blink {
  0% {
    background-color: #000;
    opacity: 1;
  }

  100% {
    background-color: #e99e18;
    opacity: 0.95;
  }
}

@-moz-keyframes blink {
  0% {
    background-color: #000;
    opacity: 1;
  }

  100% {
    background-color: #e99e18;
    opacity: 0.95;
  }
}

@keyframes blink {
  0% {
    background-color: #000;
    opacity: 1;
  }

  100% {
    background-color: #e99e18;
    opacity: 0.95;
  }
}

.center-button:active {
  transform: scale(0.95) translateY(+2px);
  opacity: 0.95;
  /* background-color: rgb(255, 255, 255); */
  /* background-color: rgb(125, 82, 0); */
  background-image: none !important;
  background-color: #e99e18;
}

.center-button > img {
  user-select: none;
  /* CSS3 */
  -moz-user-select: none;
  /* Firefox */
  -webkit-user-select: none;
  /* Safari、Chromeなど */
  -ms-user-select: none;
  /* IE10かららしい */
}

/* --- */

/* モーダル背景 */
.modal-overlay-fontsize {
  position: fixed;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2001;
  display: none;
}

/* モーダルの基本スタイル */
.modal-overlay {
  font-size: calc(var(--font-size) * 1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background-color: rgba(0, 0, 0, 0.5); */
  /* background: rgba(0, 0, 0, 0.6); */
  background-color: rgba(0, 0, 0, 0);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  color: white;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  /* フェードイン用 */
  clip-path: inset(0);
}

.modal-overlay.active {
  visibility: visible;
  opacity: 1;
}

/* --- */

/* 切り抜きエフェクト用マスク */
.modal-overlay.masked::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 5dvmin 5dvmin, transparent 70dvmin, rgba(0, 0, 0, 0.6) 71dvmin);
  z-index: 999;
  pointer-events: none;
}

.modal-overlay.masked.left_top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 5% 5%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
  z-index: 999;
  pointer-events: none;
}

@media (orientation: portrait) {
}

.modal-overlay.masked.right_top::before {
  top: 0;
  right: 0;
  background: radial-gradient(circle at 95% 5%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
}

.modal-overlay.masked.right_bottom::before {
  bottom: 0;
  right: 0;
  background: radial-gradient(circle at 95% 95%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
}

.modal-overlay.masked.left_bottom::before {
  bottom: 0;
  left: 0;
  background: radial-gradient(circle at 5% 95%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
}

.modal-overlay.masked.center_button::before {
  bottom: 0;
  left: 0;
  background: radial-gradient(circle at 50% 95%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
}

.modal-overlay.masked.right_button::before {
  bottom: 0;
  left: 0;
  background: radial-gradient(circle at 95% 95%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
}

.modal-overlay.masked.left_button::before {
  bottom: 0;
  left: 0;
  background: radial-gradient(circle at 5% 95%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
}

/* 横画面の時 */
@media (orientation: landscape) {
  .modal-overlay.masked.right_top::before {
    top: 0;
    right: 0;
    background: radial-gradient(circle at 80% 5%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
  }

  .modal-overlay.masked.right_bottom::before {
    bottom: 0;
    right: 0;
    background: radial-gradient(circle at 80% 95%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
  }

  .modal-overlay.masked.left_bottom::before {
    bottom: 0;
    left: 0;
    background: radial-gradient(circle at 5% 95%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
  }

  .modal-overlay.masked.center_button::before {
    bottom: 0;
    left: 0;
    background: radial-gradient(circle at 95% 50%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
  }

  .modal-overlay.masked.right_button::before {
    bottom: 0;
    right: 0;
    background: radial-gradient(circle at 95% 5%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
  }

  .modal-overlay.masked.left_button::before {
    bottom: 0;
    left: 0;
    background: radial-gradient(circle at 95% 95%, transparent 28dvmin, rgba(0, 0, 0, 0.6) 30dvmin);
  }
}

/* --- */

.modal-content {
  position: relative;
  /* max-width: 600px; */
  width: 80dvmin;
  height: 80dvmin;
  /* padding: 20px; */
  padding: 5dvmin;
  /* background: rgba(0, 0, 0, 0.7); */
  background: rgba(40, 40, 40, 1);
  border-radius: 8px;
  text-align: center;
  color: white;
  z-index: 3001;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#tutorial-modal .modal-content {
  justify-content: space-between;
}

.highlight {
  position: absolute;
  border-radius: 8px;
  pointer-events: none;
  top: 0px;
  left: 0px;
  width: 50dvmin;
  height: 50dvmin;
  background: transparent;
}

.modal-overlay.clip-highlight {
  clip-path: circle(0 at 0 0);
  transition: clip-path 0.5s ease;
}

/* --- */

.font-size-controls button {
  /* margin: 5px; */
  margin: 1dvmin;
  padding: 0.5rem;
  /* font-size: 1.6rem; */
  font-size: var(--font-size);
  cursor: pointer;
  /* border-radius: 10px; */
  border-radius: 2dvmin;
  background-color: #28a745;
  background-color: hsl(130, 80%, 20%);
  color: white;
  min-width: 25rem;
}

.font-size-controls button:hover {
  /* background-color: #e99e18; */
}
.font-size-controls button:active {
  /* background-image: none !important; */
  /* background-color: #e99e18; */
  background-color: rgba(233, 158, 24, 0.8);
  background-blend-mode: hard-light;
}

.font-size-controls button[data-fs="2.2"] {
  font-size: 2.2rem;
  min-width: calc(2.2rem * 3);
  height: calc(2.2rem * 3);
  /* background-color: #28a745; */
  /* color: white; */
}

.font-size-controls button[data-fs="1.6"] {
  font-size: 1.6rem;
  min-width: calc(1.6rem * 3);
  height: calc(1.6rem * 3);
  /* background-color: #28a745; */
  /* color: white; */
}

.font-size-controls button[data-fs="1.2"] {
  font-size: 1.2rem;
  min-width: calc(1.2rem * 3);
  height: calc(1.2rem * 3);
  /* background-color: #28a745; */
  /* color: white; */
}

/* --- */

#tutorial-title {
  margin: 0;
  margin-bottom: 4dvmin;
}

#tutorial-text {
  /* min-height: 3rem; */
  /* margin-bottom: 7dvmin; */
  margin: 0;
}
#tutorial-diagram-area {
  display: flex;
  justify-content: center;
}
.tutorial-sample-icon {
  max-height: 30dvmin;
}

.pointer,
.arrow {
  position: absolute;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  /* font-size: 2rem; */
  display: none;
  color: white;
}

.controls {
  /* margin-top: 30dvmin; */
  display: flex;
  justify-content: space-between;
}

.control-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  font-size: calc(var(--font-size) * 1);
  cursor: pointer;
  display: flex;
  flex-direction: column-reverse;
}

.control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tutorial-button {
  position: fixed;
  /* top: 1rem; */
  bottom: 1rem;
  right: 1rem;
  background: #888;
  color: white;
  border: none;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  /* font-size: 1.5rem; */
  cursor: pointer;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

.tutorial-button:hover {
  background: #555;
}

/* --- */

/* アンケートウインドウのスタイル */
#survey-window {
  min-height: 60dvmin;
  /* position: fixed; */
  position: absolute;
  /* bottom: 20px; */
  bottom: calc(20px + calc(var(--font-size) * 2.5));
  right: 20px;
  /* width: 300px; */
  width: calc(var(--font-size) * 16);
  /* padding: 15px; */
  padding: 3dvmin;
  background-color: white;
  border: 1px solid #ccc;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  /* font-size: 16px; */
  z-index: 2000;
  opacity: 0;
  /* display: none; */
  pointer-events: none;
  transition: all 0.5s ease-in-out;
}

#survey-title {
  /* font-size: 18px; */
  font-weight: bold;
  margin-bottom: 10px;
  margin-bottom: 5dvmin;
}

#survey-question {
  margin-bottom: 10px;
  line-height: 1.5;
  margin-bottom: 3dvmin;
  font-weight: 400;
  min-height: 12dvmin;
}
#survey-options {
  min-height: 35dvmin;
}

.answer-button {
  display: block;
  width: 100%;
  /* margin: 5px 0; */
  padding: 10px;
  background-color: #f0f0f0;
  color: black;
  text-align: center;
  border: 1px solid #ddd;
  cursor: pointer;
  border-radius: 5px;
  /* font-size: 16px; */
  font-size: var(--font-size);
  height: calc(var(--font-size) * 3);
  line-height: 1.25;
  margin-bottom: 2dvmin;
}

.answer-button:hover {
  background-color: #e0e0e0;
}

/* トースト通知のスタイル */
#survey-toast {
  /* position: fixed; */
  position: absolute;
  bottom: calc(20px + calc(var(--font-size) * 0.5));
  right: 20px;
  padding: 10px 20px;
  background-color: #333;
  color: white;
  /* font-size: 14px; */
  font-size: var(--font-size);
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 2001;
}

#survey-toast.show {
  opacity: 1;
}

/* --- */

.marker_hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80dvmin;
}

/* --- */

.console {
  position: absolute;
  bottom: 0;
  right: 0;
  color: black;
  background: white;
  font-weight: bold;
}

/* --- */

.bg {
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* position: relative; */
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  color: #fff;
  pointer-events: none;
  width: calc(100dvw - 20dvmin);
  height: calc(100dvh - 20dvmin);
  padding: 10dvmin;
}

.bg.-visible:before {
  transform: translate(0, 0);
  pointer-events: auto;
}

.bg:before {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background-color: #a33e46; */
  background-color: #fff;
  background-image: var(--title-url);
  background-size: cover;
  background-position: center;
  transform: translate(0, 100%);
  transition: transform cubic-bezier(0.215, 0.61, 0.355, 1) 1.6s;
  content: "";
  transition-delay: 1.25s;
}

/* テキストのスタイル */
.title {
  display: block;
  color: #fff;
  /* font-family: 'Josefin Sans', sans-serif; */
  text-align: center;
}

.title span {
  display: block;
  opacity: 0;
  transition: transform cubic-bezier(0.215, 0.61, 0.355, 1) 1s, opacity linear 0.7s;
}

.title_1 {
  transform: translate(0, 100px);
  font-size: calc(var(--font-size) * 1.5);
  transition-delay: 2.15s;
}

.title_2 {
  margin-top: 18px;
  transform: translate(0, 120px);
  font-size: calc(var(--font-size) * 1.5);
  transition-delay: 2.2s;
}

.title_3 {
  margin-top: 18px;
  transform: translate(0, 140px);
  font-size: calc(var(--font-size) * 1.5);
  transition-delay: 2.25s;
}

.bg.-visible .title span {
  opacity: 1;
  transform: translate(0, 0);
}

.title img {
  display: block;
  max-width: 50dvmin;
  max-height: 50dvmin;
  position: absolute;
  bottom: 10dvmin;
  right: 0dvmin;
}
.logo_text {
    text-align: right;
    font-size: 1.2rem;
    line-height: 1.3;
}
.logo {
  transition-delay: 0.15s;
  transition: transform cubic-bezier(0.215, 0.61, 0.355, 1) 1s, opacity linear 0.7s;
  transform: translate(0, 10dvmin);
  position: absolute;
  bottom: 5dvmin;
  right: 5dvmin;
  opacity: 0;
}

.bg.-visible .logo {
  opacity: 1;
  transform: translate(0, 0);
}

/* --- */
