html{
    width:100vw;
    height: 100vh;
}
body{
    width:100vw;
    height: 100vh;
}
/* Primary #f48fb1
Light #ffc1e3
Dark #bf5f82 */
.app{
    width:100vw;
    height: calc(100vh - 1rem);
    background-color: #bf5f82;
    padding-top:1rem;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}
.appbar{
    width:calc(100vw - 2rem);
    height: 3rem;
    background-color: #f48fb1;
    color:#333;
    padding:1rem;
    font-size: 3rem;
    box-shadow: 2px 2px 2px 2px #0004;
    position:relative;
}
.body{
    height:calc(100vh - 5rem - 2rem - 1rem);
    width:calc(100vw - 2rem);
    padding:1rem;
    background-color:#ddd;
}
.panel{
    padding:1rem;
    background-color: #efefef;
    border-radius: 10px;
    box-shadow: 1px 1px 1px 1px #0002;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.panel.upper{
    /* 10rem は上からの総数 */
    width: min(100vw * 0.9, (100vh - 10rem) / 3 * 0.9);
    height: min(100vw * 0.9, (100vh - 10rem) / 3 * 0.9);
    margin: min(100vw * 0.05, (100vh - 10rem) / 3 * 0.05);
}
.panel.lower{
    margin: 1rem;
    /* 100vh-10remはbody,次のカッコがupper,6remがbody+panel+panelのpadding */
    /* height: max(100vh - 10rem - (100vw * 0.9) - 6rem, 100vh - 10rem - ((100vh - 10rem) / 3 * 0.9) - 6rem) */
    height: max(100vh - 16rem - (100vw * 0.9), 100vh - 16rem - ((100vh - 10rem) * 0.3));
    position:relative
}
#button-title{
    font-size:2rem;
    color:#bf5f82;
}
svg{
    margin-left: auto;
    margin-right: auto;
    display: block;
    position:absolute;
    bottom:1rem;
    left: calc((100vw - 4rem) / 2 - 100px); 
    top: max((100vh - 16rem - (100vw * 0.9)) / 2 - 100px, (100vh - 16rem - ((100vh - 10rem) * 0.3)) / 2 - 100px);
}
#button-footer{
    background-color:#f48fb1;
    padding:1rem;
    width:50%;
    height:2rem;
    border-radius: 10px;
    margin: auto;
    box-shadow: 1px 1px 1px 1px #0002;
    position:absolute;
    bottom:1rem;
    /* widthが50%だから */
    left:calc((100vw - 6rem) / 2 - 50% / 2); 
}
#button-text{
    font-size:2rem;
    color:#000;
}
.panel.center{
    width: min(100vw - 4rem, 100vh - 5rem - 2rem - 1rem - 2rem);
}
.graph-title{
    font-size: min(100vw * 0.9, (100vh - 10rem) / 3 * 0.1);
    color:#bf5f82;
}
.graph{
    /* background-color: #3fefef; */
    background-color: #efefef;
    width: min(100vw * 0.9, (100vh - 10rem) / 3 * 0.75);
    height: min(100vw * 0.9, (100vh - 10rem) / 3 * 0.75);
    margin-left: auto;
    margin-right: auto;
    display: block;
}
.graph-footer{
    font-size: min(100vw * 0.9, (100vh - 10rem) / 3 * 0.05);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    height: 100%;
    background:#ddd;
    opacity: 0;
    visibility: hidden;
    transition: .3s linear;
    /* display: none; */
}
.overlay.is-open {
    opacity: 1;
    visibility: visible;
}
#login-title{
    text-align: center;
    font-size: 2rem
}
.logout{
    float:right;
    font-size:1rem;
    color:white;
}

svg{
    transition-duration: 2s;
}
svg.unlocked{
    transform:rotate(90deg);
    transition-duration: 2s;
}
.blink {
    animation: blinkAnime .2s infinite alternate;
  }
@keyframes blinkAnime{
    0% { opacity: 0; }
    100% { opacity: 1; }
}
.off{
    opacity: 0;
}
.on{
    opacity: 1;
}

#horizontal-list {
    margin-left:-1rem;
    margin-right:-1rem;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
#horizontal-list::-webkit-scrollbar {
    display: none;
}
#horizontal-list.item {
    /* 横スクロール用 */
    display: inline;
}
h2{
    font-size:1.5rem;
    color:#bf5f82;
}
.stat{
    text-align: left;
    table-layout: fixed;
    width:calc(100%);
    font-size: 1rem;
}
.stat td{
    padding:0.25em;
    border-collapse: separate;
}
.stat .right{
    text-align: right;
}
#loading{
    background-color: #f48fb1;
}
.spinner {
    width: 40px;
    height: 40px;
    background-color: #fff8;

    position:absolute;
    top:calc(100vh / 2 - 20px);
    left:calc(100vw / 2 - 20px);
  
    border-radius: 100%;  
    -webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
    animation: sk-scaleout 1.0s infinite ease-in-out;
  }
  
  @-webkit-keyframes sk-scaleout {
    0% { -webkit-transform: scale(0) }
    100% {
      -webkit-transform: scale(1.0);
      opacity: 0;
    }
  }
  
  @keyframes sk-scaleout {
    0% { 
      -webkit-transform: scale(0);
      transform: scale(0);
    } 100% {
      -webkit-transform: scale(1.0);
      transform: scale(1.0);
      opacity: 0;
    }
  }
.version{
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 1rem;
}