/* 縦画面固定 */

@media screen and (orientation: landscape) {
    body {
        /*transform: rotate(90deg);*/

        width: 100vh;
        height: 100vw;
        overflow: hidden;


    }
}


/* スマホ向け（画面幅が600px以下） */
@media (max-width: 600px) {

  body{
    margin:0 auto;
    background-color: black;
    background-size: auto auto;
    height: 100vh;
    font-family: "メイリオ" ;
    font-family: sans-serif ;
    user-select: none;
    overflow: hidden;
  }

  #loading{
    position: absolute;
    top:0;
    left:0;
    right:0;
    bottom:0;
  }

  #main-container{
    overflow-x: hidden;
  }

  #g-wrap{
    overflow-x: hidden;
  }

  #g-box{
    margin:0 auto;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    text-align: center;
    overflow-x: hidden;
    background-color:rgba(0,0,0,1);
    background-image: url(../assets/bg/bgC1.png);
  }


  #game-container{
    width: 100%; /* スマホサイズ基準 */
    height: 100%;
    overflow: hidden;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    text-align: center;
    margin: 0 auto;
  }

  #title-screen {
      margin:0 auto;
      text-align: center;
      height:100%;
      color: white;
      z-index:5000;
      overflow: hidden;
  }


    #title-screen {
      padding:0;
      width:88%;
      height:22rem;
      margin: auto auto;
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      top:0;
      color: white;
      border: 1px solid #3a3a3a;
      background:rgb(20,20,20,0.75);
      z-index:4000;
    }

    #title-screen h1{
      padding:10px;
      font-size:16px;
      background:#202020;
    }

    .start-text{
      margin:26px 0 20px 0;
    }

    span.t-color{
      color:#ff83cc;
    }

    #start-bgm-button {
      margin:0 0 26px 0;
      padding:8px 8px 8px 30px;
      width:300px;
      height:50px;
      font-size:20px;
      border-radius:14px ;
      color:#fff;
      background: rgba(255,255,255,0.2);
      background-image: url(../assets/icon/icon3.png);
      background-repeat: no-repeat;
      background-size:28px 28px;
      background-position:top 50% left 18px;
      border:1px solid #ffffff;
      ransition: .3s;
    }

    #start-bgm-button:hover {
      margin:0 0 26px 0;
      padding:8px 8px 8px 30px;
      width:300px;
      height:50px;
      font-size:20px;
      border-radius:14px ;
      color:#fff;
      background: rgba(50,50,50,0.2);
      background-image: url(../assets/icon/icon3.png);
      background-repeat: no-repeat;
      background-size:28px 28px;
      background-position:top 50% left 18px;
      border:1px solid #ffffff;
    }



    #start-bgm-off-button {
      margin:0 0 0 0;
      padding:8px 8px 8px 30px;
      width:300px;
      height:50px;
      font-size:20px;
      border-radius:14px ;
      color:#fff;
      background: rgba(255,255,255,0.2);
      background-image: url(../assets/icon/icon4.png);
      background-repeat: no-repeat;
      background-size:28px 28px;
      background-position:top 50% left 18px;
      border:1px solid #ffffff;
    }


      #start-bgm-off-button:hover {
        margin:0 0 0 0;
        padding:8px 8px 8px 30px;
        width:300px;
        height:50px;
        font-size:20px;
        border-radius:14px ;
        color:#fff;
        background: rgba(50,50,50,0.2);
        background-image: url(../assets/icon/icon4.png);
        background-repeat: no-repeat;
        background-size:28px 28px;
        background-position:top 50% left 18px;
        border:1px solid #ffffff;
      }



    #no-18{
      padding:24px 0 0 0;
    }

    #no-18 a{
      color:#fff;
    }

    #no-18 a:hover{
      color:#41a3ff;
    }


  #game-clear-screen {
      margin:0 auto;
      text-align: center;
      height:100%;
      color: white;
      z-index:5000;
      overflow: hidden;
  }


    #game-clear-screen {
      padding:0;
      width:88%;
      height:12rem;
      margin: auto auto;
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      top:0;
      color: white;
      border: 1px solid #3a3a3a;
      background:rgb(20,20,20,0.75);
      z-index:4000;
    }

    #game-clear-screen h1{
      padding:10px;
      font-size:18px;
      background:#202020;
    }

    #questionnaire-button {
      margin:0 0 26px 0;
      padding:8px 8px 8px 30px;
      width:300px;
      height:50px;
      font-size:20px;
      border-radius:14px ;
      color:#fff;
      background: rgba(255,255,255,0.2);
      background-repeat: no-repeat;
      background-size:28px 28px;
      background-position:top 50% left 18px;
      border:1px solid #ffffff;
      ransition: .3s;
    }



    #background-area{
     background: rgb(10,10,10,1);
    }

    #character-area{
     background: rgb(10,10,10,1);
    }


  #background-1,
  #background-2 {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      height: 100%;
      object-fit: cover;
      overflow: hidden;
  }

  #character-1,
  #character-2 {
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      bottom: 0;
      width: 100%; /* キャラの大きさ */

  }

  #text-container {
      position: absolute;

      right: 0;
      bottom: 0;
      left: 0;
      bottom: 0;
      width: 100%;
      height: 34%;

      background: rgb(0,0,0);
      background: linear-gradient(0deg, rgba(0,0,0,0.8491771708683473) 70%, rgba(0,0,0,0.6951155462184874) 84%, rgba(0,0,0,0) 100%);
      color: white;
      font-size: 15px;
      padding:14px 0px 10px 0px;
      overflow-x: hidden;
      overflow-y: scroll;
  }

  #close-backlog {
    position:absolute;
    top:0;
    right:0;
    margin:10px 10px 0 0;
    padding:5px 8px 5px 32px;
    font-size:14px;
    color:#fff;
    background: rgba(0,0,0,0.6);
    background-image: url(../assets/icon/icon5.png);
    background-repeat: no-repeat;
    background-size:20px 20px;
    background-position:top 50% left 8px;
    border-radius: 6px;
    border:1px solid #ffffff;
    z-index:7001;
  }


  #close-backlog:hover {
    position:absolute;
    top:0;
    right:0;
    margin:10px 10px 0 0;
    padding:5px 8px 5px 32px;
    font-size:14px;
    color:#fff;
    background: rgba(255,255,255,0.4);
    background-image: url(../assets/icon/icon5.png);
    background-repeat: no-repeat;
    background-size:20px 20px;
    background-position:top 50% left 8px;
    border-radius: 6px;
    border:1px solid #ffffff;
  }



  .descText{
    padding:0 10px 10px 0;
  }

  /*
  .charText{
    background-color: rgba(255, 255, 255, 0.18);
    color:#64e0ff;
    padding:8px;
    width:74%;
    border-radius:5px;
    margin:0 0 20px 0;
  }
  */

  .b-opa {
      transition: opacity 2s ease-in-out;
  }

  .b-hid {
      opacity: 0;
  }

  .c-opa {
      transition: opacity 0.8s ease-in-out;
  }

  .c-hid {
      opacity: 0;
  }

  .charText{
    width:74%;
    position: relative;
    display: inline-block;
    margin:0 0 20px 4px;
    padding: 10px 0 10px 10px;
    border-radius: 12px;
    background-color: rgba(255,255,255,0.18) ;
    text-align: left;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color:#64e0ff;
  }


  .charText::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 0;
    border-style: solid;
    border-width: 20px 20px 0 0;
    border-color: transparent rgba(255,255,255,0.18) transparent transparent;
    translate: -100% calc(-50% + 0.4px);
    transform: skew(0, 33deg);
    transform-origin: right;
  }


  /*
  .choiceText{
    background-color: rgba(255, 255, 255, 0.13);
    color:#fff;
    font-size:18px;
    margin:0 6px 10px auto;
    padding:8px 8px 8px 8px;
    border:none;
    border-radius:8px;
  }
  */
  .choiceText {
      position: relative;
      display: inline-block;
      margin:0 20px 20px 0;
      padding: 10px 10px 10px 40px;
      border-radius: 12px;
      background-color: rgba(255,255,255,0.2) ;
      background-image: url(../assets/icon/icon1.png);
      background-repeat: no-repeat;
      background-size:20px 20px;
      background-position:top 50% left 10px;
      text-align: left;
      font-size: 16px;
      font-weight: 400;
      line-height: 1.5;
      color: #fff;
  }

  .choiceText::after {
    content: "";
    position: absolute;
    top: 22px;
    right: 0;
    border-style: solid;
    border-width: 0 0 20px 20px;
    border-color: transparent transparent transparent rgba(255,255,255,0.2);
    translate: 100% calc(-50% - 0.4px);
    transform: skew(0, 24deg);
    transform-origin: left;
  }


  .playerText{
    text-align: left;
    display:block;
    background-color: rgba(0, 0, 0, 0.6);
    background-image: url(../assets/icon/icon1.png);
    background-repeat: no-repeat;
    background-size:20px 20px;
    background-position:top 50% left 10px;
    color:#fff;
    font-size:16px;
    margin:0 20px 10px auto;
    padding:8px 8px 8px 40px;
    border:none;
    border-radius:8px;
    border: solid 1px #bababa;
  }

  .playerText:hover{
    text-align: left;
    display:block;
    background-color: rgba(255, 255, 255, 0.4);
    background-image: url(../assets/icon/icon1.png);
    background-repeat: no-repeat;
    background-size:20px 20px;
    background-position:top 50% left 10px;
    color:#fff;
    font-size:16px;
    margin:0 20px 10px auto;
    padding:8px 8px 8px 40px;
    border:none;
    border-radius:8px;
    border: solid 1px #bababa;
  }




  #text-box{
    background-color:#ffffff;
  }

  .character-content {
      text-align: left;
      gap: 1rem;
  }

  .player-content {
      text-align: right;
      justify-content: flex-end;
      gap: 1rem;
  }

  .face {
      width: 50px;
      height: 50px;
      margin-top: 5px;
  }

  /* スクロールバー非表示 */
  .scrollbar {
      -ms-overflow-style: none;
      scrollbar-width: none;
  }

  .scrollbar::-webkit-scrollbar {
      display: none;
  }

  #dialog-text {
      margin-top: 5px;
  }

  .text {
      margin-top: 5px;
  }

  /* 使ってない
  #dialog-box {
      position: absolute;
      bottom: 0px;
      width: 100%;
      height: 25%;
      left: 0px;
      background-color: rgba(0, 0, 0, 0.8);
      color: white;
      padding: 15px;
      font-size: 18px;

      max-height: 120px;
      overflow-y: auto;
  }

  #character-name {
      font-weight: bold;
      font-size: 20px;
      color: yellow;
  }

  #selection-container {
      position: absolute;
      bottom: 80px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      gap: 10px;
  }

  #selection-container button {
      background-color: white;
      color: black;
      padding: 10px;
      border: none;
      border-radius: 5px;
      font-size: 18px;
      cursor: pointer;
      width: 80%;
  }
  */

  .fade-in {
      animation: fadeIn 1s forwards;
  }

  .fade-out {
      animation: fadeOut 1s forwards;
  }

  .flex{
      display: -webkit-flex;
      display: -moz-flex;
      display: -ms-flex;
      display: -o-flex;
      display: flex;
  }

  @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
  }

  @keyframes fadeOut {
      from { opacity: 1; }
      to { opacity: 0; }
  }


  /* バックログ */
  #backlog-container {
      margin:0 auto;
      position: absolute;
      top: 0;
      right:0;
      left: 0;
      bottom:0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0);
      color: white;
      display: flex;
      z-index:9000;
  }

  #bl-box {
      width:100%;
      height:94%;
      overflow-y: hidden;
      padding: 58px 20px 20px 20px;
      background: rgba(10, 10, 10, 0.95);
      overflow-y: auto;
  }

  #backlog-content {

  }

  #backlog-button {
    position:absolute;
    top:0;
    right:0;
    margin:10px 10px 0 0;
    padding:5px 8px 5px 32px;
    font-size:14px;
    color:#fff;
    background: rgba(255,255,255,0.2);
    background-image: url(../assets/icon/icon2.png);
    background-repeat: no-repeat;
    background-size:20px 20px;
    background-position:top 50% left 8px;
    border-radius: 6px;
    border:1px solid #ffffff;
  }

  .character-content {
      text-align: left;
      gap: 1rem;

  }

  .player-content {
      text-align: right;
      justify-content: flex-end;
      gap: 1rem;
  }

  .character-content-b {
    width:90%;
    border-bottom:1px solid #a0a0a0;
    margin:0 0 20px 0;
    padding:0 0 20px 0;
  }

  .player-content-b {
    width:90%;
    border-bottom:1px solid #a0a0a0;
    margin:0 0 20px 0;
    padding:0 0 20px 0;

  }

  .backlog-charText{
    padding:0 6px 0 6px;
    color:#64e0ff;
  }

  .backlog-playerText{
    padding:0 10px 0 0;
    margin:0 0 0 auto;
  }

  .backlog-voice-play {
      width: 50px;
      height: 50px;
  }

  .hidden {
      display: none;
  }

  /* クリック待ち */
  .img_next{
      -webkit-animation: next 1s ease-in-out infinite alternate;
      animation: next 0.5s ease-in-out infinite alternate;
      width: 10px;
      height: 10px;
  }
  @-webkit-keyframes next {
      0% { opacity:1; }
      100% { opacity:0; }
  }
  @keyframes next {
      0% { opacity:1; }
      100% { opacity:0; }
  }

}
