
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    /*! font-size: 1rem; */
}

.demo-container {
    width: 100%;
    height: 100%;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 300;
    color: #333;
}
.modelviewer-header {
    width: 100%;
    height: 60px;
    background-color: #000;
    color: #fff;
    margin: 0;
    z-index: 100;
    /*! align-content: center; */
    text-align: center;
    position: relative;
}
.header-title {
    font-size: 1.6rem;
    font-weight: 500;
    padding-top: 14px;
}
.header-logo{
    position: absolute;
    left: 40px;
    top: 15px;
}
.header-logo img{
    width: 80px;
    height: auto;
}
.header-title span {
    font-size: 2rem;
    padding-right: 3rem;
    margin-right: 3rem;
    border-right: 1px solid #fff;
}
.demo-container .container {
    display: flex;
    width: 100%;
    height: 100%;
}

.demo-container .container model-viewer {
    height: 100%;
    width: 100%;
}
/*
.lineContainer{
    pointer-events: none;
    display: block;
}
*/
.annotation-line[data-visible] {
    stroke: #0091ff;
    stroke-width: 2;
    stroke-dasharray: 2;
}

#model-selector-container {
    z-index: 200;
    width: 100%;
    height: 120px;
    display: flex;
    position: absolute;
    align-content: center;
    justify-content: center;
}
#model-selector-container > div {
    width: 100%;
}
#model-selector-container div {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}
#model-selector-container div input {
    display: none;
}
#model-selector-container div label {
    background-color: #F2F2F2;
    border: 0px;
    font-size: 1.8rem;
    font-weight: 600;
    box-sizing: border-box;
    color: #4D4D4D;
    width: 340px;
    /*! height: 40px; */
    padding: 6.5px;
    margin: 0 0.1rem 0 0.1rem;
    text-align: center;
    cursor: pointer;
}
@media screen and (max-width: 1000px) {
  #model-selector-container div label {
    font-size: 1.5rem;
  }
}
#model-selector-container div input:checked + label {
    background: #4D4D4D;
    color: #fff;
}
#model-selector-container div label:first-of-type {
    border-radius: 20px 0 0 20px;
}
#model-selector-container div label:last-of-type {
    border-radius: 0 20px 20px 0;
}

.hotspot-selector-container{
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-align: center;
    justify-content: center;
    pointer-events: auto;
    margin: 0.9rem auto 0.5rem auto;
}

.control-container{
    position: absolute;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    top: 20rem;
    left: 4rem;
}

.control-category-container {
    padding-bottom: 70px;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.control-category-header {
    color: #000000;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0.2rem auto 0.1rem auto;
    text-shadow: 1px 1px 5px #fffc, -1px 1px 5px #fffc, 1px -1px 5px #fffc, -1px -1px 5px #fffc;
}

.control-color-selector {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0.5rem auto 0.5rem auto;
}
.control-color-selector input{
    display: none;
}
.control-color-selector input + label{
    display: none;
    width: 18px;
    height: 18px;
    border-radius: 15px;
    margin: 0.5rem;
    box-shadow: 0px 0px 7px 0px rgb(255, 255, 255);
    cursor: pointer;
}
.control-color-selector input:checked + label{
    /*! transform: scale(2); */
    width: 27px;
    height: 27px;
    cursor: default;
}
#color-5g + label {
    background-color: #000;
}
#color-zero + label {
    background-color: #000;
}
#color-black + label {
    background-color: #000;
}
#color-gray + label {
    background-color: #A6A6A6;
}
#color-white + label {
    background-color: #E5E5E5;
}
.selected-color {
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 5px #fffc, -1px 1px 5px #fffc, 1px -1px 5px #fffc, -1px -1px 5px #fffc;
}

#control-anim-selector {
    margin: 1.5rem auto 1.5rem auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 200px;
}
#control-anim-selector input{
    display: none;
}
.control-anim-item + label{
    background-color: #F2F2F2;
    border: 0px;
    box-sizing: border-box;
    color: #575656;
    display: inline-block;
    font-size: 1.3rem;
    font-weight: bold;
    /*! padding: 0.3rem 0.3rem; */
    text-align: center;
    min-width: 70px;
    max-width: 150px;
    height: auto;
    border-radius: 17px;
    cursor: pointer;
    margin: 0.3rem auto;
    padding-top: 0.15rem;
    padding: 4px 16px;
    
}
#control-anim-container .control-anim-item + label {
    margin: 4px 4px;
}
.control-anim-item:checked + label{
    background: #4D4D4D;
    color: #fff;
}
.control-anim-item + label:hover{
    background: #FAFAFA;
    color: #B8B8B8;
}

.control-anim-seekbar-container {
    position: relative;
    width: 100%;
    margin: auto 0;
}

.control-anim-seekbar {
    -webkit-apperance: none;
    appearance: none;
    background: #F2F2F2;
    border: 0px;
    outline: none;
    width: 100%;
    height: 0.8rem;
    border-radius: 0.25rem;
}
.control-anim-seekbar::-webkit-slider-thumb {
    -webkit-apperance: none;
    appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    background: #505050;
    border-radius: 50%;
    cursor: pointer;
}

.control-anim-seekbar::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    background: #505050;
    border-radius: 50%;
    cursor: pointer;
}

.control-anim-seekbar-container .value-label {
    position: absolute;
    top: 1.8rem; /* ノブの下に表示 */
    transform: translateX(-50%);
    color: #505050;
    font-size: 1.3rem;
    font-weight: 600;
}

#control-compare-selector {
    margin: 1.5rem auto 1.5rem auto;
}
#control-compare-selector input{
    display: none;
}
.control-compare-item + label{
    background-color: #F2F2F2;
    border: 0px;
    box-sizing: border-box;
    color: #575656;
    display: inline-block;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    width: 6rem;
    height: 2rem;
    line-height: 2rem;
    border-radius: 1rem;
    cursor: pointer;
    margin: 0 auto;
}
.control-compare-item:checked + label{
    background: #505050;
    color: #fff;
}

.control-container button{
    width:12rem;
    height: 2.5rem;
    pointer-events: auto;
}
.control-container select{
    pointer-events: auto;
}

.hotspot-overlay{
    position: absolute;
}

.hotspot-selector {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    cursor: hand;
}
.annotation-label{
    background-color: #F2F2F2;
    color: #575656;
    border: 0px;
    box-sizing: border-box;
    /*! color: #4D4D4D; */
    display: inline-block;
    font-size: 1.3rem;
    font-weight: bold;
    /*! padding: 0.4rem; */
    text-align: center;
    width: 130px;
    height: 24px;
    border-radius: 12px;
    cursor: pointer;
    margin: 0.7rem auto;
    padding-top: 0.2rem;
}
.annotation-label:hover{
    background: #FAFAFA;
    color: #B8B8B8;
}
.hotspot-selector:checked + .annotation-label {
    background: #0091FF;
    color: #fff;
}

#modelviewer::part(default-ar-button){
    bottom: 64px;
}

.Hotspot{
    display: none;
    width: 4rem;
    height: 4rem;
    background: transparent;
    box-sizing: border-box;
    border: 2px solid rgb(0, 145, 255);
    border-radius: 2rem;
    pointer-events: none;
}
.Hotspot[data-selected] {
    display: inline-block;
}

#modelviewer-preload-area {
    display: flex;
    flex-direction: column;
    position: absolute;
    width: 35rem;
    left: 50%;
    top: 43%;
    transform: translateX(-50%);
    align-items: center;
    text-align: center;
}
.viewer-title {
    font-size: 3.5rem;
    font-weight: bold;
    color: #000;
}
#load-button {
    border: 0;
    background-color: #4D4D4D;
    color: #fff;
    margin : 1rem;
    width: 185px;
  height: 35px;
  border-radius: 18px;
  font-size: 1.6rem;
  font-weight: bold;
}
#progress-bar {
    display: none;
    margin: 1rem;
    width: 185px;
    height: 7px;
    z-index: 100;
    background-color: rgb(88, 88, 88);
    border-radius: 0.2rem;
}
#progress-bar::-webkit-progress-bar {
    background-color: rgb(88, 88, 88);
    border-radius: 0.2rem;
}

#progress-bar::-webkit-progress-value {
    background-color: rgb(245, 245, 245);
    border-radius: 0.2rem;
}

#progress-bar::-moz-progress-bar {
    background-color: rgb(245, 245, 245);
    border-radius: 0.2rem;
}

#progress-bar::-ms-fill {
    background-color: rgb(245, 245, 245);
    border-radius: 0.2rem;
}


.howtouse-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #F2F2F2;
    border: 0px;
    box-sizing: border-box;
    width: 260px;
    border-radius: 10px;
    padding: 25px 15px;
    top: 51rem;
    right: 4rem;
    transform: translateY(-50%);
}
.howtouse-container div.howtouse-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 0 10px;
}
.howtouse-container div.howtouse-description-area {
    display: flex;
    flex-direction: column;
}
.howtouse-container div.howtouse-item {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px 0;
    
    width: 230px;
    height: 70px;
}
.howtouse-container div.howtouse-description {
    background-color: #4D4D4D;
    color: #fff;
    border-radius: 0.3rem 0.3rem 0 0;
    /*! height: 1.5rem; */
    text-align: center;
    align-content: center;
    width: 100%;
    padding: 0.7rem 0.4rem;
}
.howtouse-container div.howtouse-action {
    background-color: #fff;
    /*! color:#000; */
    border-radius: 0 0 0.3rem 0.3rem;
    /*! height: 1.5rem; */
    text-align: center;
    align-content: center;
    width: 100%;
    padding: 0.7rem 0.4rem;
}

#howtouse-switch {
    display: none;
}
#howtouse-switch + label {
    background-color: #fff;
    width: 60px;
    /*! height: 1.5rem; */
    border-radius: 12px;
    text-align: center;
    /*! margin: 10px; */
    padding: 0.15rem;
    margin: 5px 0 0;
    font-size: 1.3rem;
    cursor: pointer;
}
#howtouse-switch + label span:after {
    content: "開く";
    /*! font-size: 1rem; */
    font-weight: 700;
}
#howtouse-switch:checked + label span:after {
    content: "閉じる";
}
.howtouse-description-area:has(+ #howtouse-switch) {
    display: none;
}
.howtouse-description-area:has(+ #howtouse-switch:checked) {
    display: flex;
}





/*------- SP -------*/
@media screen and (max-width: 767px) {
.modelviewer-header {
    text-align: right;
}
.header-title {
    margin: 0 55px 0 auto;
    font-size: 1.4rem;
    width: 65%;
    padding-top: 3px;
}
.header-logo {
    left: 10px;
}
.header-title span {
    padding-right: 0;
    margin-right: 0;
    border: none;
    display: block;
}
.demo-container .container model-viewer {
    /*margin-top: -120px;*/
}

#model-selector-container {
    display: block;
    padding: 10px 0;
}
#model-selector-container div {
    display: block;
    text-align: center;
}
#model-selector-container div input {
    display: none;
}
#model-selector-container div label:first-of-type,
#model-selector-container div label:last-of-type{
    border-radius: 20px;
}
#model-selector-container div label:nth-of-type(n+2){
    margin-top: 10px;
}
    
.control-container{
    display: flex;
    width: 100%;
    bottom: 1rem;
    left: 50%;
    top: auto;
    flex-direction: initial;
    align-items: start;
    transform: translateX(-50%);
    justify-content: space-evenly;
}

.control-category-container {
    padding-bottom: 20px;
}

.control-category-header {
    margin: auto;
    background-color: #F2F2F2;
    border: 0px;
    color: #575656;
    display: inline-block;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    height: auto;
    border-radius: 17px;
    cursor: pointer;
    padding-top: 0.15rem;
}


.control-anim-item + label {
  width: 150px;
  border-radius: 17px;
  padding: 6px;
  height: 3rem;
  margin: 0.3rem auto;
}
#control-anim-container .control-anim-item + label {
  margin: 0.3rem auto;
}

.control-selector {
    display: none !important;
}
.selected-color {
    display: none;
}
/* .control-category-headerを画面下部に固定し横並びで表示 */
.control-category-header {
    z-index: 9999;

    background-color: #F2F2F2;
    border: 0px;
    box-sizing: border-box;
    color: #575656;
    display: inline-block;
    font-size: 1.6rem;
    font-weight: bold;
    /*! padding: 0.3rem 0.3rem; */
    text-align: center;
    max-width: 150px;
    height: auto;
    border-radius: 17px;
    cursor: pointer;
    margin: 0.3rem auto;
    padding: 4px 11px;

}

.annotation-label {
    border-radius: 17px;
    padding: 6px;
    height: 3rem;
    margin: 0.3rem auto;
}
#modelviewer-preload-area {
    width: 15rem;
}
.viewer-title {
    font-size: 1.5rem;
}
#progress-bar {
    width: 8rem;
    height: 0.3rem;
}
#load-button {
    font-size: 1.3rem;
}
.howtouse-container {
   display: none;
}
  

/* ▼選択中ラベルをドロップダウン風に */
#model-selector-container input[type="radio"],
#model-selector-container label {
    display: none;
}
#model-selector-container input[type="radio"]:checked + label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    padding: 14px 18px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    position: relative;
    cursor: pointer;
    border: 1px solid #ccc;
}
#model-selector-container input[type="radio"]:checked + label::after {
    content: "▼";
    font-size: 1.1em;
    color: #888;
    margin-left: 1em;
    pointer-events: none;
}
#model-selector-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 10000;
    display: flex
;
    align-items: flex-end;
    justify-content: center;
    animation: fadein 0.2s;
}


.control-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadein 0.2s;
}
@keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

.control-dialog-content {
    background: #fff;
    border-radius: 18px 18px 0 0;
    min-width: 90vw;
    max-width: 480px;
    min-height: 120px;
    box-shadow: 0 0 16px rgba(0,0,0,0.15);
    padding: 24px 16px 32px 16px;
    margin-bottom: 0;
    animation: slideup 0.2s;
    position: relative;
}
@keyframes slideup {
    from { transform: translateY(100px);}
    to { transform: translateY(0);}
}
.control-dialog-close {
    display: block;
    background: #eee;
    color: #333;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    position: absolute;
    right: 18px;
    top: 12px;
    z-index: 2;
    cursor: pointer;
}
/* ダイアログ内のselector本体も強制表示 */
.control-dialog-content .control-selector {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.control-dialog-content .control-selector > label {
    display: block;
}
.control-dialog-content .control-anim-seekbar-container {
    display: flex;
    width: 60%;
    left: 50%;
    transform: translateX(-50%);
}


.control-dialog-content .control-category-header {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    /* 必要なら幅やフォントサイズも調整 */
    font-size: 1.5rem;
    min-width: none;
    font-weight: bold;
    background: none;
    box-shadow: none;
    border: none;
    margin-bottom: 1.5rem;
    pointer-events: none; /* ダイアログ内ヘッダーはクリック不可 */
}
#model-selector-overlay .control-dialog-content .control-selector{
    flex-direction: column;
}
#model-selector-overlay .control-dialog-content .control-selector > label{
    display: block !important;
    background-color: #F2F2F2;
    border: 0px;
    width: 90%;
    height: 3rem;
    box-sizing: border-box;
    color: #575656;
    display: inline-block;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    border-radius: 17px;
    cursor: pointer;
    margin: 0.3rem auto;
    padding: 6px 16px;
}
#model-selector-overlay .control-dialog-content .control-selector input:checked + label{
    background: #0091FF;
    color: #fff;
}

.control-dialog-content .control-anim-seekbar-container {
    display: block !important;
}
.control-dialog-content .selected-color {
    display: block;
    text-align: center;
}

.control-dialog-content .control-color-selector input:checked + label{
    /*! transform: scale(2); */
    width: 27px !important;
    height: 27px !important;
    cursor: default;
}
.control-dialog-content .hotspot-selector-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    height: auto;
    width: 100%;
    margin: 0.5rem auto 0 auto;
}
}