  :root {
    --bg: #fffAfA;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --accent: #ec4899;
    --accent-dark: #9d174d;
    --border: #f3d1e5;
    --border-strong: #f472b6;
    --radius: 20px;
    --shadow: 0 12px 28px rgba(236, 72, 153, 0.12);
    --sidebar-width: 260px;
  }

  * {
    box-sizing: border-box;
  }

  html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Noto Sans JP", "Hiragino Kaku Gothic ProN",
                 "Yu Gothic", "YuGothic", sans-serif;
  }

  .wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 16px 80px;
  }

  .titlebar {
    font-weight: 800;
    font-size: 20px;
    padding: 8px 4px 0;
    color: var(--text);
  }

  .hint {
    font-size: 13px;
    color: #9aa1ad;
    margin: 4px 0 14px;
  }

  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin: 14px 4px;
  }

  .card details {
    display: block;
  }

  .card summary {
    list-style: none;
    cursor: pointer;
    outline: none;
    padding: 16px 16px 12px;
  }

  .card summary::-webkit-details-marker {
    display: none;
  }

  .card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
  }

    .card-header2 {
      background: var(--accent-soft);
      color: #ba2f6f;
      font-size: 22px;
      font-weight: 900;
      padding: 18px 22px;
      border-bottom: 1px solid var(--border);
    }

  .badge-no {
    background: linear-gradient(135deg, #ec4899, #f97316);
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 12px;
    box-shadow: 0 4px 10px rgba(236,72,153,.35);
  }

  .event-title {
    font-size: 19px;
    font-weight: 400;
  }

  .banner img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
  }

  .banner2 img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
  }

  .content {
    border-top: 1px solid #f1d7e8;
    padding: 16px;
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(6px);
  }

  .grid {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 8px 12px;
    font-size: 15px;
  }

  .label {
    color: #6b7280;
    padding-left: 8px;
    border-left: 3px solid #f9a8d4;
  }

  .label2 {
    color: #6b7280;
    padding-left: 8px;

  }

  .section-title {
    font-weight: 800;
    letter-spacing: .02em;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fde8f3;
    color: #9d174d;
    margin-top: 16px;
    display: inline-block;
  }

  ul {
    margin: 8px 0 0 1.1em;
    padding: 0;
  }

  ul li::marker {
    content: "• ";
    color: #ec4899;
  }

  .voice img {
    margin-top: 8px;
    border-radius: 12px;
    max-width: 200px;
    display: block;
  }

  .chip-limited {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #fff3c4;
    color: #92400e;
    border: 1px solid #fde68a;
  }

.copyright {
  margin-top: 40px;
  padding: 20px;
  font-size: 12px;
  color: #777;
  text-align: center;
  border-top: 1px solid #ddd;
}

  #format-filters {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff5f8;
    padding: 8px 0 6px;
  }

  #format-filters .chip {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #fff;
    color: #9d174d;
    border: 1px solid #fbcfe8;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 8px;
  }

  #format-filters .chip.active {
    background: #ffe8f0;
    border-color: #f472b6;
    box-shadow: 0 3px 8px rgba(244,114,182,.18);
  }

  #format-filters #count {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
  }

  .red {
    color: red;
    font-weight: 700;
  }

.calc-box-play {
  max-width: 420px;
  margin: 20px;
  padding: 20px;
  background: #fff7fa;
  border-radius: 16px;
  border: 1px solid #efc8d7;
}

.calc-box-play input {
  width: 100%;
  padding: 8px;
  margin: 6px 0 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.calc-box-play button {
  width: 100%;
  padding: 10px;
  background: #cc4d83;
  color: white;
  border: none;
  border-radius: 10px;
}

.calc_result {
  margin-top: 15px;
  white-space: pre-line;
}


/* ===== レイアウト ===== */

.layout{
  display:grid;
  grid-template-columns:220px 1fr;
  min-height:100vh;
}

/* ===== サイドバー ===== */

.sidebar{
  background:white;
  border-right:1px solid #f3d1e5;
  padding:20px 14px;
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  color: var(--text);
  transition: 0.2s;
}

.sidebar-title{
  font-weight:800;
  font-size:20px;
  margin-bottom:16px;
}

.menu{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.menu a{
  text-decoration:none;
  padding:4px 6px;
  border-radius:14px;
  border:1px solid transparent;
  color:#1f2937;
}

.menu a:hover{
  background:#fff0f6;
  border-color:#fbcfe8;
}

.menu a.active{
  background:#ffe8f3;
  border-color:#f472b6;
}

/* ===== スマホ対応 ===== */
@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }
}

/* ===== メイン ===== */

.main{
  padding:0 20px;
}


/* ===== ボイスタ ===== */
.voice-img {
  max-width: 100px;
  border-radius: 12px;
}


/* ===== ランク ===== */
.table-wrap{
  width:100%;
  overflow-x:auto;
}

.rank-table{
  width:auto;
  margin:auto;

  border-collapse:collapse;
  background:#fff;
  border:1px solid var(--border);

  font-size:14px;

  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.rank-table th{
  background:#ffe8f3;
  color:var(--text);

  padding:5px 8px;
  border:1px solid var(--border);

  text-align:center;
  font-weight:700;
  white-space:nowrap;

  position:sticky;
  top:0;
}

.rank-table td{
  padding:2px 8px;
  border:1px solid var(--border);

  text-align:right;
  white-space:nowrap;
}

.rank-table tr:nth-child(even){
  background:#fff7fb;
}

.rank-table tr:hover{
  background:#fff0f6;
}

.high-rank{
  color:#d94672;
}

.bold-cell{
  font-weight:700;
}

.estimate td{
  color:#d94672;
}

/* ===== 詳細ランク ===== */
.detail-table th{
  padding:4px 5px;
}

.detail-table td{
  padding:1px 5px;
  font-size:12px;
}

.section-head td{
  font-weight:700;
  text-align:center !important;
  background:#fff7fb;
}