* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    background: #090a0e;
    background-image: url('charpiclist/bg2.png');
    background-size: 33.5%;
    position:'relative';
    z-index: -5;
  }

  .characterGrid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    
    gap: 5px;
}


.character-icon {
    background-size: cover;

    position: relative;
    
    width: 48px;
    height: 50px;
    background-color:rgba(0, 0, 0, 0.589);
    background-blend-mode:multiply;
    border-radius: 2px;
    cursor: pointer;
    
}
.selected {
    background-color: lightblue;
    background-blend-mode:normal;
}
.fixed {
    background-color: rgba(255, 166, 0, 0.507);
    background-blend-mode:lighten;
}
.fixed::after {
    content: '🔒';
    position: absolute;
    top: 0px;
    left: 0px;
    font-size: 14px;
    line-height: 1;
    filter: brightness(0) drop-shadow(0 0 1px rgba(255,255,255,0.5));
    pointer-events: none;
}
.friend-selected {
    background-color: lightgreen;
    background-blend-mode:normal;
}

  .item-frame {
    margin: 1rem auto;
 }
  .text {
    vertical-align: middle;
 }
  label {
    cursor: pointer;
 }
  .switch {
    position: relative;
 }
  .switch:before, .switch:after {
    content: '';
    vertical-align: middle;
    display: inline-block;
 }
  .switch:before {
    width: 2em;
    height: 1em;
    border: 2px solid #c4c9ff;
    border-radius: 32px;
    background: #999;
 }
  .switch:after {
    position: relative;
    width: 1em;
    height: 1em;
    background: #c4c9ff;
    border-radius: 50%;
    left: -2.2em;
 }
  #setting-item-1 {
    display: none;
 }
  input:checked ~ .switch:before {
    background: #00b715;
    border-color: #84ff92;
 }
  input:checked ~ .switch:after {
    background: #84ff92;
    left: -1.15em;
 }
 

  #open1, #open2, #open5, #open6 {
    border: solid 1px rgba(255,255,255,0.12);
    border-radius: 10px;
    background-color: rgba(0, 10, 30, 0.55);
    color: #e8e8e8;
    padding: 1rem;
  }
  #opt1, #opt2, #opt5, #opt6, .opt-box {
    border: solid 1px rgba(255,255,255,0.08);
    border-radius: 8px;
    background-color: rgba(0, 10, 30, 0.4);
    color: #e8e8e8;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
  }
  
  .item-tooltip-elem img{
    width: 20px;
    height: 20px;
    border-radius: 3px;
    vertical-align: middle;
}
  
.charcard {
  vertical-align: baseline;
  font-size: 16px;
  display: flex;

}

  .charcard img{
      width: 42px;
      height: 44px;
      border-radius: 3px;
      vertical-align: middle;
  }

  
  .chakra-link{
    margin: auto;
  }



  .bmcdiv{
    margin: auto;
    width:217px;
    height:auto;
    position: relative;
}
.bmcpic{
    width:100%;
    height:auto;
}
.bmcdis{
    position: absolute;
    top:67%;
    left:40%;
    
    padding:0;
    margin:0;
    font-size:10px;
}

  .up {
    top:    40px;
    }

    .down {
        bottom: 40px;
    }


    .down:after {
      bottom: -20px;
      border-top-color: #333;
      }

      .up:after {
      top: -20px;
      border-bottom-color: #333;
      }



.item-tooltip {
  display: none;
  position: absolute;
  left: 8px;
  padding: 8px;

  font-size: 14px;                       /* �����T�C�Y */
  left : 0px;                           /* �\���ʒu */
  width:160px;                          /* �����o���S�̂̕� */
  background: #333;
  border-radius: 8px;
  -moz-border-radius: 8px;
  -webkit-border-radius: 8px;
  color: #fff;
  z-index: 5;

}

.item-tooltip:after {
  border: solid transparent;
  content: "";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
  border-color: rgba(51, 51, 51, 0);
  border-width: 10px;
  left: 20px; 
  margin-left: -10px;
  z-index: 5;
  
}

/* ── Result team cards ── */
.result-team {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  position: relative;
}
.result-team:has(.result-card-wrap:hover) {
  z-index: 100;
}
.result-team-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.result-team-num {
  font-weight: bold;
  font-size: 1.1em;
  color: #7eb8ff;
  min-width: 2.5em;
}
.result-team-sub {
  font-size: 0.85em;
  color: #ccc;
}
.result-team-cards {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 3px;
  align-items: flex-end;
}
.result-card-wrap {
  display: inline-block;
  position: relative;
  width: fit-content;
}
.result-card-wrap:hover {
  z-index: 9999;
}
.result-card-wrap > .item-tooltip {
  position: absolute;
  width: 160px;
  z-index: 9999;
}
.result-team-bonuses {
  margin-top: 2px;
}

.bud{
  width: 42px;
  height: 44px;
  position:relative;
}
.bontype{
width: 14px;
height: 14px;
}

  
  h4{
    color: #fff;
    padding: 0.5em 0;
  }
  /* search1/2/3 now use .opt-box class (same style as #opt1) */
  

  #red{
    border: 2px solid #b40000;
  }
  #blue{
    border: 2px solid#001bb1;
  }
  #green{
    border: 2px solid#00a51b;
  }

  .label1 {
    margin: auto;
    width: 500px;
    overflow: auto;
    padding: 3rem 2rem;
  }

  @media screen and (max-width:500px){
    #right{
      width: 5vw;
    }
    #left{
      width: 5vw;
    }
    #middle{
      width: 90vw;
    }
    .shloudpc{
      display: none
    }
    .shloud{
      height: 29.86vw;
    }
    header {
      height: 41.86vw;
      display: block;
      background: #000d47;
      color: #48bcff;
      padding: 2rem 0rem;
      text-align: center;
      font-size: 4vw;
      background-image: url('charpiclist/head2.png');
      background-size: 100%;
      background-repeat: no-repeat;
      

    }


    #fix{
      width: 44px;
    }
    #pic{
      width: 70px;
    }
    #form1 {
      border-radius: 10px;
      padding: 1rem;
      background: #6b92ff;
      
    }
    #form2 {
      display: none;
      width: 90%;
      margin: auto;
      border-radius: 10px;
      padding: 1rem;
      background: #6b92ff;
    }

    #form3{
      border-radius: 10px;
      padding: 1rem;
      background: #9bb7ff;
      margin: auto;
    }

    #form4{
      display: none;
    }
    #form5{
      display: none;
      width: 0;
    }

    #form6 {
      display: none;
      width: 90%;
      margin: auto;
      border-radius: 10px;
      padding: 1rem;
      
    }

    .container {
      border-radius: 10px;
      margin: auto;
      width: 90vw;
      padding: 0rem 0rem;
      background: #011f4d;
    }

    #ads{
      z-index: 20;
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100vw;
    }

    
    #adphone{
      z-index: 20;
      display: none;
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100vw;
    }

    #adpc{
      display: none;
    }

    #ads_twst{
      width: 300px;
    }

    select {
      width: 100%;
      max-width: 100%;
      font-size: 0.85em;
      padding: 8px 28px 8px 10px;
      margin-bottom: 4px;
    }

    input[type='button'] {
      width: 48%;
      padding: 8px 6px;
      font-size: 0.8em;
      margin-bottom: 4px;
    }

    h4 {
      font-size: 0.9em;
      margin-bottom: 4px;
    }
  }

  @media screen and (min-width:501px){
    #right{
      width: calc((100vw - 500px)/2);
    }
    #left{
      width: calc((100vw - 500px)/2);
    }
    

    .shloud{
      display: none
    }
    #form1 {
      border-radius: 10px;
      padding: 1rem;
      background: #6b92ff;
    }
    #form2 {
      display: none;
      width: 90%;
      margin: auto;
      border-radius: 10px;
      padding: 1rem;
      background: #6b92ff;
    }

    #form3{
      width: 95%;
      border-radius: 10px;
      padding: 1rem calc((95% - 300px)/2);
      background: #9bb7ff;
      margin-left: auto;
      margin-right: auto;
    }

    #form4{
      display: none;
    }
    #form5{
      display: none;
      width: 0;
    }
    #form6 {
      display: none;
      width: 90%;
      margin: auto;
      border-radius: 10px;
      padding: 1rem;
      
    }
    #fix{
      width: 44px;
    }
    #pic{
      width: 70px;
    }
    .heading br{
      display: none;
    }
    header {
      background: #000d47;
      color: #92d7ff;
      padding: 1rem;
      text-align: center;
      background-image: url('charpiclist/head.png');
      background-repeat: no-repeat;
      background-size: 100%;
    }
    .container {
      border-radius: 10px;
      margin: auto;
      width: 90vw;
      padding: 0;
      background: #011f4d;
    }
    #adpc{
      display: none;
      background: #b40000;
      background: #00a51b;
      background: #001bb1;
    }
    #adphone{
      /*display: block;
      width: 100vw;*/
      display: none;
    }

    #ads{
      
      width: 500px;
    }
  }
      

  
  
  #hhh{
    width: auto;
  }


  #all_onoff{
    width: auto;
  }

  .btn {
    display: block;
    height: 50px;
    width: 90%;
    max-width: 500px;
    padding: 10px 15px;
    border: 0;
    background: linear-gradient(135deg, #3a5ccc, #5b7cee);
    color: #fff;
    border-radius: 8px;
    margin: 8px auto;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }

  .btn:hover {
    background: linear-gradient(135deg, #4a6cdd, #6b8cff);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  }
  .btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }
  
  .bg-dark {
    background: #333;
    color: #fff;
  }
  
  .error {
    background: orangered;
    color: #fff;
    padding: 5px;
    margin: 5px;
  }



label, input[type='checkbox'] {
  cursor: pointer;
}

/* ── Form controls ── */
select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 6px 28px 6px 10px;
  font-size: 0.9em;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fff'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  max-width: 100%;
}
select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
}
select option {
  background: #0a1530;
  color: #fff;
}

input[type='button'] {
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.85em;
  cursor: pointer;
  transition: background 0.15s;
  margin: 3px 2px;
}
input[type='button']:hover {
  background: rgba(255,255,255,0.15);
}

input[type='checkbox'] {
  accent-color: #5b7cee;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 4px;
}

label[for='atk'], label[for='def'], label[for='blc'],
label[for='forssr'], label[for='forsr'], label[for='forr'] {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 5px;
  margin: 2px;
  font-size: 0.9em;
  color: #fff;
}

/* ── Accordion headers ── */
#option_middle, #search_middle, #option_left, #search_left {
  cursor: pointer;
}
#option_middle h2, #search_middle h2, #option_left h2, #search_left h2 {
  transition: color 0.15s;
}
#option_middle:hover h2, #search_middle:hover h2,
#option_left:hover h2, #search_left:hover h2 {
  color: #c0d8ff;
}
h1{
  font-size: 30;
  font-weight: bold;
}
h2 {
  border-bottom: solid 3px #aad1ff;
  position: relative;
}

h2:after {
  position: absolute;
  content: " ";
  display: block;
  border-bottom: solid 3px #355aca;
  bottom: -3px;
  width: 20%;
}

/* ▼�?セルの�?飾 */
td { /* 表の罫�?(=セルの�?�?) */
  padding: auto;       /* セル�?側の余白�? */  
}

#myProgress {
  margin: auto;
  width: 100%;
}





.ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
}

.shareli {
  width: 30%;
  margin-bottom: 10px;
}



.twitter-share-button {
  background-color: #1ca1f3;
  box-shadow: 0 4px 0 #1473ad;
  width: 100%;
}

.sns-share__btn--line {
  background-color: #00b900;
  box-shadow: 0 4px 0 #007700;
}

.sns-share__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  margin: 0;
  background-color: #fff;
}
.sns-share__item {
  width: 30%;
  margin-bottom: 14px;
}

#sns-share__btn {
  display: block;
  width: 100%;
  padding: 6px 0;
  box-sizing: border-box;
  text-align: center;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  border-radius: 2px;
  transform: translate3d(0, 0, 0);
  cursor: pointer;
  transition: all 0.2s ease-out;
}



details {
  border: 1px solid #aaa;
  border-radius: 4px;
  padding: .5em .5em 0;
}

summary {
  font-weight: bold;
  margin: -.5em -.5em 0;
  padding: .5em;
}

details[open] {
  padding: .5em;
}

details[open] summary {
  border-bottom: 1px solid #aaa;
  margin-bottom: .5em;
}

#sbtn{

  display: inline-block;

  height: 20px;
  width: calc(90%/2);
  border: 0;
  padding: 0rem 1rem;
  background: #333;
  color: #fff;
  border-radius: 5px;
  margin: 5px;
}