body { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; padding: 16px; line-height: 1.6; }
:root{
    --bg: #0b1020;
    --panel: #0f1a33;
    --line: #2b3a66;
    --text: #e7eeff;
    --muted: #9fb0dd;
    --accent: #8bd5ff;
  }
  
  *{ box-sizing: border-box; }
  
  body{
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    background: radial-gradient(1200px 600px at 30% 10%, #16234a 0%, var(--bg) 55%);
    color: var(--text);
    padding: 18px;
  }
  
  .wrap{
    max-width: 720px;
    margin: 0 auto;
  }
  
  .top{
    margin: 10px 0 16px;
  }
  
  .badge{
    display: inline-block;
    font-size: 12px;
    letter-spacing: .14em;
    padding: 6px 10px;
    border: 1px solid var(--line);
    background: rgba(15, 26, 51, .8);
    border-radius: 10px;
    color: var(--muted);
  }
  
  h1{
    margin: 10px 0 4px;
    font-size: 26px;
  }
  
  .sub{
    margin: 0;
    color: var(--muted);
    font-size: 13px;
  }
  
  .panel{
    border: 2px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 26, 51, .92), rgba(10, 16, 32, .92));
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
  }
  
  .type{
    margin: 0 0 12px;
    font-size: 22px;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(139,213,255,.25);
  }
  
  .stats{
    display: grid;
    gap: 12px;
    margin: 10px 0 12px;
  }
  
  .stat{
    display: grid;
    grid-template-columns: 60px 1fr 56px;
    align-items: center;
    gap: 10px;
  }
  
  .label{
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--muted);
  }
  
  .bar{
    height: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(0,0,0,.25);
    overflow: hidden;
  }
  
  .fill{
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #68f, #8bd5ff);
    border-radius: 10px;
    transition: width 700ms ease;
  }
  
  .num{
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--text);
  }
  
  .note{
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
    padding-top: 10px;
    border-top: 1px dashed rgba(43,58,102,.8);
  }
  
  .actions{
    margin-top: 14px;
    display: flex;
    gap: 10px;
  }
  
  .btn{
    display: inline-block;
    text-decoration: none;
    color: var(--bg);
    background: var(--accent);
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
  }
  
  .btn:active{ transform: translateY(1px); }
  
  @media (max-width: 420px){
    h1{ font-size: 22px; }
    .stat{ grid-template-columns: 54px 1fr 52px; }
  }
  
  .resultText{
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(43,58,102,.8);
    color: var(--text);
  }
  
  .resultText h3{
    margin: 12px 0 6px;
    font-size: 13px;
    letter-spacing: .08em;
    color: var(--muted);
  }
  
  .resultText p{
    margin: 0 0 8px;
    line-height: 1.8;
    color: var(--text);
  }
  
  .resultText ul{
    margin: 0 0 8px;
    padding-left: 18px;
    color: var(--text);
  }
  
  .oneLine{
    margin: 0 0 10px;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(139,213,255,.18);
  }

  .share{
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
  }
  
  .btn.ghost{
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(139,213,255,.55);
  }
  
  .btn.ghost:hover{
    background: rgba(139,213,255,.08);
  }
  
  .toast{
    font-size: 12px;
    color: var(--muted);
    opacity: 0;
    transform: translateY(2px);
    transition: opacity .2s ease, transform .2s ease;
  }
  
  .toast.show{
    opacity: 1;
    transform: translateY(0);
  }
  
  .hint{
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--text);
    opacity: .95;
  }
  
  .tip{
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--muted);
  }

  /* ===== index RPG style ===== */

.start{
  text-align: center;
}

.title{
  font-size: 26px;
  letter-spacing: .08em;
  margin-bottom: 6px;
}

.subtitle{
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

.quiz label{
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
}


.quiz select{
  margin-top: 6px;
  width: 100%;
}

.start-btn{
  margin-top: 18px;
  width: 100%;
  font-size: 15px;
}

.note{
  margin-top: 16px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== index (stable) ===== */
.quiz{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.meta{
  display: flex;
  justify-content: center;
  margin-top: 6px;
  margin-bottom: 4px;
}

.ageLabel{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
}

.ageLabel input{
  width: 80px;
}

.qcard{
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
}

.qtitle{
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text);
}

.qcard select{
  width: 100%;
}

.start-btn{
  width: 100%;
  margin-top: 6px;
}

.subtitle.small{
  margin-top: -6px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.note{
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}

/* 旧スタイルが残ってる場合の保険（label装飾を無効化） */
.quiz label{
  background: transparent;
  border: none;
  padding: 0;
}

/* PCで横に伸びすぎないようにする */
.panel{
  max-width: 920px;
  margin: 0 auto;
}

.quiz{
  max-width: 760px;
  margin: 0 auto;
}


.qcard{
  padding: 14px 16px;
}

.qcard select{
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
}

.qcard select{
  min-width:520px;
}


@media (max-width: 600px){
  .panel{
    padding: 16px;
  }
  .qtitle{
    font-size: 13px;
  }
  .start-btn{
    font-size: 14px;
  }
  .qcard select{
    min-width:100%;
  }
}
.level{
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .08em;
}
.stat-note{
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
