/* ========================================
   ファンマークスロット - IMPACT REDESIGN v2
   スロットリール大型化 + モバイル完全対応
   ======================================== */

/* ---------- リセット & ベース ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hidden { display: none !important; }

:root {
  --hot-pink: #FF1493;
  --electric-pink: #FF3CAC;
  --vivid-magenta: #D946EF;
  --neon-purple: #A855F7;
  --deep-violet: #2D1B4E;
  --midnight: #0F0A1E;
  --dark-purple: #1A0E2E;
  --gold: #FFD700;
  --gold-light: #FFED4A;
  --white: #FFFFFF;
  --white-soft: rgba(255,255,255,0.9);
  --glass-light: rgba(255,255,255,0.07);
  --glass-mid: rgba(255,255,255,0.12);
  --font: 'M PLUS Rounded 1c', sans-serif;

  /* リールサイズ変数 - ここを変えるだけでリール全体が変わる */
  --cell-size: 120px;
  --emoji-size: 3.2rem;
  --reel-gap: 6px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--midnight);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ---------- ステージ背景 ---------- */
.stage-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, #3D1080 0%, #180A35 45%, #08040F 100%);
}

.stage-beams {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.beam {
  position: absolute;
  top: -10%;
  width: 140px;
  height: 130%;
  opacity: 0.07;
  transform-origin: top center;
  animation: beamSway 8s ease-in-out infinite;
}

.beam-1 { left: 5%;  background: linear-gradient(to bottom, var(--hot-pink),    transparent 80%); animation-delay: 0s;   }
.beam-2 { left: 20%; background: linear-gradient(to bottom, var(--neon-purple),  transparent 80%); animation-delay: 1.5s; }
.beam-3 { left: 40%; background: linear-gradient(to bottom, var(--gold),         transparent 80%); animation-delay: 0.8s; }
.beam-4 { left: 60%; background: linear-gradient(to bottom, var(--electric-pink),transparent 80%); animation-delay: 2.2s; }
.beam-5 { left: 75%; background: linear-gradient(to bottom, var(--vivid-magenta),transparent 80%); animation-delay: 0.4s; }
.beam-6 { left: 90%; background: linear-gradient(to bottom, var(--neon-purple),  transparent 80%); animation-delay: 1.8s; }

@keyframes beamSway {
  0%, 100% { transform: rotate(-8deg); }
  50%       { transform: rotate(8deg);  }
}

.stage-stars .star {
  position: absolute;
  color: var(--gold);
  opacity: 0;
  animation: twinkle ease-in-out infinite;
  pointer-events: none;
}

@keyframes twinkle {
  0%, 100% { opacity: 0;   transform: scale(0.5) rotate(0deg);   }
  50%       { opacity: 0.9; transform: scale(1.1) rotate(180deg); }
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--glass-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
}

.site-back-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: #c4b5fd;
  text-decoration: none;
  background: rgba(168,85,247,0.1);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 20px;
  padding: 6px 14px;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.site-back-link:hover {
  background: rgba(168,85,247,0.25);
  color: #fff;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-badge {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--hot-pink), var(--neon-purple));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 4px 24px rgba(255, 20, 147, 0.5),
              0 0 48px rgba(255, 20, 147, 0.15);
  transform: rotate(-3deg);
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(255,20,147,0.5),  0 0 48px rgba(255,20,147,0.15); }
  50%       { box-shadow: 0 4px 32px rgba(255,20,147,0.75), 0 0 64px rgba(255,20,147,0.25); }
}

.logo-text { text-align: left; }

.site-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold), #FFC107, var(--gold-light));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  line-height: 1.2;
}

.site-catch {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 3px;
  margin-top: 2px;
}

/* ティッカー */
.header-ticker {
  background: linear-gradient(90deg, var(--hot-pink), var(--vivid-magenta), var(--neon-purple));
  padding: 6px 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  gap: 60px;
  animation: ticker 25s linear infinite;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
}

.ticker-track span { flex-shrink: 0; }

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- メインコンテンツ ---------- */
.main-content {
  position: relative;
  z-index: 5;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* ---------- セクションバッジ ---------- */
.section-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--hot-pink), var(--vivid-magenta));
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 3px;
  padding: 5px 18px;
  border-radius: 4px;
  margin-bottom: 14px;
}

/* ---------- モード選択 ---------- */
.mode-section {
  text-align: center;
  padding: 24px 0 20px;
}

.mode-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 24px;
  background: var(--glass-light);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  color: var(--white);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font);
  backdrop-filter: blur(10px);
  min-width: 80px;
}

.mode-btn:hover {
  border-color: var(--hot-pink);
  background: rgba(255, 20, 147, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255,20,147,0.2);
}

.mode-btn.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,20,147,0.1));
  box-shadow: 0 0 24px rgba(255,215,0,0.25), inset 0 0 24px rgba(255,215,0,0.05);
}

.mode-count {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mode-label { font-size: 1rem; font-weight: 800; margin-top: -2px; }
.mode-sub   { font-size: 0.6rem; opacity: 0.45; margin-top: 4px; }
.mode-count-info { font-size: 0.55rem; color: var(--gold); margin-top: 4px; font-weight: 700; letter-spacing: 0.5px; opacity: 0.9; }
.mode-divider { font-size: 0.85rem; opacity: 0.25; font-weight: 700; font-style: italic; }

/* ---------- フィルターセクション ---------- */
.filter-section {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 20px;
  background: var(--glass-light);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  cursor: pointer;
  background: rgba(0,0,0,0.2);
  transition: background 0.3s;
}
.filter-header:hover { background: rgba(255,20,147,0.12); }
.filter-icon         { font-size: 1.1rem; }

.filter-title {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--gold-light);
  flex-grow: 1;
  margin-left: 10px;
  letter-spacing: 1px;
}

.filter-toggle-icon {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  transition: transform 0.3s;
}
.filter-header.open .filter-toggle-icon { transform: rotate(180deg); }

.filter-body { padding: 16px 20px 20px; border-top: 1px solid rgba(255,255,255,0.04); }
.filter-body.hidden { display: none; }

.filter-group   { margin-bottom: 14px; display: flex; flex-direction: column; }
.filter-label   { font-size: 0.68rem; color: rgba(255,255,255,0.55); margin-bottom: 6px; font-weight: 700; }

.filter-select {
  background: #140B28;
  color: #FFF;
  border: 1px solid rgba(255,20,147,0.3);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
  cursor: pointer;
}
.filter-select:focus {
  border-color: var(--hot-pink);
  box-shadow: 0 0 10px rgba(255,20,147,0.25);
}

.filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.filter-apply-btn {
  background: linear-gradient(90deg, var(--neon-purple), var(--vivid-magenta));
  color: #FFF;
  border: none;
  padding: 9px 26px;
  border-radius: 24px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.filter-apply-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168,85,247,0.4);
}
.filter-apply-btn:active { transform: translateY(0); }

.filter-stat { font-size: 0.75rem; font-weight: 800; color: var(--gold); }

/* =========================================
   🎰 スロットキャビネット — IMPACT SIZE
   ========================================= */
.slot-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.slot-cabinet {
  width: 100%;
  max-width: 580px;
  background: linear-gradient(180deg, #200F46 0%, #130828 100%);
  border: 2px solid rgba(255,215,0,0.3);
  border-radius: 24px;
  padding: 10px;
  position: relative;
  box-shadow:
    0 0 60px rgba(255,20,147,0.15),
    0 0 120px rgba(168,85,247,0.08),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.3);
}

/* キャビネットランプ */
.cabinet-lamps {
  display: flex;
  justify-content: space-around;
  padding: 7px 16px;
}

.lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: lampBlink 1.2s ease-in-out infinite;
}

.lamp:nth-child(1)  { background: #FF1493; animation-delay: 0s;   }
.lamp:nth-child(2)  { background: #FFD700; animation-delay: 0.1s; }
.lamp:nth-child(3)  { background: #A855F7; animation-delay: 0.2s; }
.lamp:nth-child(4)  { background: #FF1493; animation-delay: 0.3s; }
.lamp:nth-child(5)  { background: #FFD700; animation-delay: 0.4s; }
.lamp:nth-child(6)  { background: #A855F7; animation-delay: 0.5s; }
.lamp:nth-child(7)  { background: #FF1493; animation-delay: 0.6s; }
.lamp:nth-child(8)  { background: #FFD700; animation-delay: 0.7s; }
.lamp:nth-child(9)  { background: #A855F7; animation-delay: 0.8s; }
.lamp:nth-child(10) { background: #FF1493; animation-delay: 0.9s; }
.lamp:nth-child(11) { background: #FFD700; animation-delay: 1.0s; }
.lamp:nth-child(12) { background: #A855F7; animation-delay: 1.1s; }

@keyframes lampBlink {
  0%, 100% { opacity: 1;   box-shadow: 0 0 8px currentColor,  0 0 16px currentColor; }
  50%       { opacity: 0.25; box-shadow: none; }
}

/* スロットディスプレイ */
.slot-display {
  background: linear-gradient(180deg, #060310 0%, #08041A 100%);
  border-radius: 14px;
  padding: 6px;
  position: relative;
  border: 1px solid rgba(255,215,0,0.12);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6);
}

/* ペイライン */
.payline {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  z-index: 10;
  transform: translateY(-1px);
  box-shadow: 0 0 12px var(--gold), 0 0 24px rgba(255,215,0,0.4);
  opacity: 0.85;
}

.payline::before,
.payline::after {
  content: '▶';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 12px;
  text-shadow: 0 0 6px var(--gold);
}
.payline::before { left: 4px; }
.payline::after  { right: 4px; content: '◀'; }

/* リール行 */
.reels-row {
  display: flex;
  justify-content: center;
  gap: var(--reel-gap);
}

/* 各リール */
.reel-column {
  width: var(--cell-size);
  height: calc(var(--cell-size) * 3);
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, #0A0518 0%, #0E071E 50%, #0A0518 100%);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.04);
}

/* 上下フェードオーバーレイ */
.reel-column::before,
.reel-column::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 30%;
  z-index: 5;
  pointer-events: none;
}
.reel-column::before { top:    0; background: linear-gradient(to bottom, rgba(8,3,20,0.92), transparent); }
.reel-column::after  { bottom: 0; background: linear-gradient(to top,    rgba(8,3,20,0.92), transparent); }

/* リールの中身 */
.reel-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform;
}

/* 1アイテム = 1段 */
.reel-cell {
  width: var(--cell-size);
  height: var(--cell-size);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--emoji-size);
  flex-shrink: 0;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: -1px;
}

/* 中央段のハイライト */
.reel-cell.center-highlight::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: 8px;
  background: rgba(255,215,0,0.02);
}

/* 当たり時のハイライト */
.reel-column.matched .reel-cell.center-highlight::before {
  border-color: var(--gold);
  background: rgba(255,215,0,0.1);
  animation: matchGlow 0.7s ease-in-out infinite alternate;
}

@keyframes matchGlow {
  0%   { box-shadow: inset 0 0 16px rgba(255,215,0,0.1),  0 0 0 1px rgba(255,215,0,0.2); }
  100% { box-shadow: inset 0 0 32px rgba(255,215,0,0.25), 0 0 0 2px rgba(255,215,0,0.5); }
}

/* =========================================
   🔥 スピンボタン — MASSIVE
   ========================================= */
.spin-btn {
  position: relative;
  border: none;
  background: linear-gradient(135deg, var(--hot-pink) 0%, var(--vivid-magenta) 50%, var(--neon-purple) 100%);
  border-radius: 70px;
  padding: 4px;
  cursor: pointer;
  box-shadow:
    0 4px 32px rgba(255,20,147,0.5),
    0 0 60px rgba(255,20,147,0.2);
  transition: all 0.25s ease;
  font-family: var(--font);
  width: min(320px, 90%);
}

.spin-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 10px 44px rgba(255,20,147,0.6),
    0 0 80px rgba(255,20,147,0.3);
}
.spin-btn:active { transform: translateY(0) scale(0.97); }
.spin-btn.spinning { pointer-events: none; opacity: 0.6; }

.spin-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 48px;
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, transparent 100%);
  border-radius: 66px;
}

.spin-text {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 6px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.spin-sub {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

/* =========================================
   🎊 結果表示
   ========================================= */
.result-section { margin-top: 28px; transition: all 0.5s; }
.result-section.hidden { display: none; }

.result-flash {
  text-align: center;
  margin-bottom: 20px;
  animation: flashIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-flash span {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 6px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold), #FFA500, var(--gold-light));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: -100% 50%; }
}

@keyframes flashIn {
  0%   { opacity: 0; transform: scale(0.3) rotate(-10deg); }
  100% { opacity: 1; transform: scale(1)   rotate(0deg);   }
}

.result-emoji-header {
  text-align: center;
  margin-bottom: 20px;
  animation: cardSlide 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardSlide {
  0%   { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0);     }
}

.result-marks {
  font-size: 3.2rem;
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}

.result-marks .fm {
  display: inline-block;
  animation: popEmoji 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  filter: drop-shadow(0 0 16px rgba(255,215,0,0.6));
}
.result-marks .fm:nth-child(2) { animation-delay: 0.1s; }
.result-marks .fm:nth-child(3) { animation-delay: 0.2s; }

@keyframes popEmoji {
  0%   { transform: scale(0); }
  100% { transform: scale(1); }
}

.result-match-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 1px;
}

/* カードグリッド */
.result-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding: 0 4px;
}

.result-cards-grid:has(.match-card:only-child) {
  grid-template-columns: minmax(280px, 380px);
  justify-content: center;
}

/* VTuberカード */
.match-card {
  background: linear-gradient(180deg, #1E1038 0%, #160D2A 100%);
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: 18px;
  padding: 16px 12px 14px;
  text-align: center;
  animation: cardSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.match-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,215,0,0.45);
  box-shadow: 0 12px 32px rgba(255,215,0,0.15);
}

.match-card:nth-child(1) { animation-delay: 0.05s; }
.match-card:nth-child(2) { animation-delay: 0.12s; }
.match-card:nth-child(3) { animation-delay: 0.19s; }
.match-card:nth-child(4) { animation-delay: 0.26s; }
.match-card:nth-child(5) { animation-delay: 0.33s; }
.match-card:nth-child(6) { animation-delay: 0.40s; }
.match-card:nth-child(7) { animation-delay: 0.47s; }
.match-card:nth-child(8) { animation-delay: 0.54s; }

/* アバター */
.match-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 12px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--hot-pink), var(--gold), var(--neon-purple));
}

.match-avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--dark-purple);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-avatar-inner img { width: 100%; height: 100%; object-fit: cover; }

.match-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 6px;
  line-height: 1.3;
  word-break: break-all;
}

/* タグ群 */
.match-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}

.match-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.2s;
}
.match-tag:hover { filter: brightness(1.2); }

.match-tag-org  { background: rgba(168,85,247,0.25); color: #C084FC; border: 1px solid rgba(168,85,247,0.4); }
.match-tag-lang { background: rgba(6,182,212,0.2);   color: #67E8F9; border: 1px solid rgba(6,182,212,0.35); }
.match-tag-gender[data-gender="f"] { background: rgba(255,20,147,0.2); color: #FF69B4; border: 1px solid rgba(255,20,147,0.35); }
.match-tag-gender[data-gender="m"] { background: rgba(59,130,246,0.2); color: #93C5FD; border: 1px solid rgba(59,130,246,0.35); }

/* 一口メモ */
.match-memo {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.95);
  background: rgba(0,0,0,0.3);
  border-left: 3px solid var(--neon-purple);
  padding: 10px 12px;
  margin: 14px 0 16px;
  border-radius: 6px;
  text-align: left;
  line-height: 1.6;
  word-break: normal;
  overflow-wrap: anywhere;
}

.memo-line {
  margin-bottom: 4px;
}
.memo-line:last-child {
  margin-bottom: 0;
}

/* 「・」箇条書き用のぶら下がりインデント */
.memo-line.bullet {
  padding-left: 1.1em;
  position: relative;
}
.memo-line.bullet::before {
  content: '・';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  opacity: 0.8;
}

/* リンクアイコン */
.match-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }

.match-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s;
  opacity: 0.85;
}
.match-link-icon:hover { transform: scale(1.2); opacity: 1; }
.match-link-yt   { background: #FF0000; color: #fff; }
.match-link-x    { background: #000;    color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.match-link-tw   { background: #9146FF; color: #fff; }
.match-link-nico { background: #fff;    color: #252525; }

/* リンクボタン */
.result-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 24px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  font-family: var(--font);
  transition: all 0.25s;
  white-space: nowrap;
}
.result-link-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.result-link-yt   { background: #FF0000; color: #fff; }
.result-link-yt:hover   { box-shadow: 0 4px 16px rgba(255,0,0,0.4); }
.result-link-x    { background: #000; color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.result-link-x:hover    { box-shadow: 0 4px 16px rgba(255,255,255,0.15); }
.result-link-tw   { background: #9146FF; color: #fff; }
.result-link-tw:hover   { box-shadow: 0 4px 16px rgba(145,70,255,0.4); }
.result-link-nico { background: #fff; color: #252525; }
.result-link-nico:hover { box-shadow: 0 4px 16px rgba(255,255,255,0.2); }

/* リトライボタン */
.retry-btn {
  display: block;
  margin: 0 auto;
  padding: 11px 36px;
  background: transparent;
  border: 2px solid var(--hot-pink);
  border-radius: 32px;
  color: var(--hot-pink);
  font-size: 0.92rem;
  font-weight: 800;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.3s;
}
.retry-btn:hover {
  background: var(--hot-pink);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255,20,147,0.35);
}

/* ---------- 紙吹雪 ---------- */
.confetti-layer {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  animation: confDrop linear forwards;
}

@keyframes confDrop {
  0%   { transform: translateY(0) rotateZ(0deg) rotateX(0deg);      opacity: 1; }
  100% { transform: translateY(110vh) rotateZ(720deg) rotateX(360deg); opacity: 0; }
}

/* ---------- フッター ---------- */
.site-footer {
  text-align: center;
  padding: 24px 20px;
  color: rgba(255,255,255,0.2);
  font-size: 0.75rem;
  position: relative;
  z-index: 5;
}
.footer-site-link {
  color: rgba(168,85,247,0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-site-link:hover { color: #a855f7; }

/* =========================================
   📱 レスポンシブ — モバイル完全対応
   ========================================= */

/* タブレット */
@media (max-width: 640px) {
  :root {
    --cell-size: 105px;
    --emoji-size: 2.8rem;
  }

  .main-content { max-width: 100%; padding: 0 12px 60px; }
  .slot-cabinet { border-radius: 18px; }
}

/* スマホ (標準) */
@media (max-width: 480px) {
  :root {
    --cell-size: 90px;
    --emoji-size: 2.4rem;
    --reel-gap: 5px;
  }

  .site-title   { font-size: 1.35rem; }
  .logo-badge   { width: 46px; height: 46px; font-size: 1.5rem; border-radius: 11px; }

  .mode-buttons { gap: 8px; }
  .mode-btn     { padding: 12px 18px; min-width: 68px; }
  .mode-count   { font-size: 1.8rem; }
  .mode-label   { font-size: 0.9rem; }

  .spin-btn-inner { padding: 16px 36px; }
  .spin-text      { font-size: 1.5rem; }

  .result-marks   { font-size: 2.5rem; }
  .result-cards-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* スマホ (小型) */
@media (max-width: 390px) {
  :root {
    --cell-size: 78px;
    --emoji-size: 2.0rem;
    --reel-gap: 4px;
  }

  .logo-area   { gap: 10px; }
  .site-title  { font-size: 1.15rem; }
  .logo-badge  { width: 40px; height: 40px; font-size: 1.3rem; }

  .mode-btn    { padding: 10px 14px; min-width: 60px; }
  .mode-count  { font-size: 1.6rem; }
  .spin-text   { font-size: 1.3rem; letter-spacing: 4px; }
  .spin-btn    { width: 95%; }

  .result-cards-grid { grid-template-columns: 1fr; }
}

/* 極小スマホ */
@media (max-width: 320px) {
  :root {
    --cell-size: 66px;
    --emoji-size: 1.7rem;
    --reel-gap: 3px;
  }
  .spin-text { font-size: 1.1rem; letter-spacing: 3px; }
}

/* ============================================================
   データベースセクション
   ============================================================ */
.db-section {
  width: 100%;
  background: #0a051e;
  padding: 60px 0 80px;
  margin-top: 40px;
  border-top: 1px solid rgba(168,85,247,0.2);
  position: relative;
  z-index: 1;
}

.db-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヘッダー */
.db-header { margin-bottom: 28px; }

.db-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.db-icon { font-size: 1.6rem; }

.db-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a855f7, #f9a8d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.db-count {
  font-size: 0.85rem;
  color: #a855f7;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 20px;
  padding: 2px 10px;
  font-weight: 700;
}

.db-subtitle {
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
  margin: 0;
}

/* 検索バー */
.db-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(168,85,247,0.25);
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.db-search-bar:focus-within {
  border-color: rgba(168,85,247,0.7);
  background: rgba(168,85,247,0.06);
}

.db-search-icon { font-size: 1.1rem; flex-shrink: 0; }

.db-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
}
.db-search-input::placeholder { color: rgba(255,255,255,0.3); }

.db-search-clear {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
  display: none;
}
.db-search-clear.visible { display: block; }
.db-search-clear:hover { color: #fff; }

/* 絞り込みチップ */
.db-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.db-chip {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  color: rgba(255,255,255,0.55);
  padding: 5px 14px;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
}
.db-chip:hover {
  border-color: rgba(168,85,247,0.5);
  color: #d8b4fe;
}
.db-chip.active {
  background: rgba(168,85,247,0.2);
  border-color: #a855f7;
  color: #e9d5ff;
  font-weight: 700;
}

/* リストグリッド */
.db-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
}

/* 1行 = 1VTuber */
.db-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(168,85,247,0.13);
  border-radius: 12px;
  padding: 12px 16px;
  transition: background 0.18s, border-color 0.18s;
  animation: dbRowIn 0.2s ease both;
}
@keyframes dbRowIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.db-row:hover {
  background: rgba(168,85,247,0.07);
  border-color: rgba(168,85,247,0.35);
}

/* アバター */
.db-row-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}
.db-row-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(168,85,247,0.35);
  background: rgba(168,85,247,0.1);
  display: block;
}
.db-row-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(168,85,247,0.1);
  border: 2px solid rgba(168,85,247,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

/* 本文エリア */
.db-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* 名前行 */
.db-row-nameline {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.db-row-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f3e8ff;
}
.db-row-org {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  background: rgba(168,85,247,0.1);
  border-radius: 10px;
  padding: 1px 8px;
}

/* 各フィールド行 */
.db-row-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  line-height: 1.5;
}
.db-row-label {
  color: rgba(255,255,255,0.38);
  white-space: nowrap;
  flex-shrink: 0;
}
.db-row-value {
  color: rgba(255,255,255,0.75);
  letter-spacing: 1px;
}
.db-row-link {
  color: #a78bfa;
  text-decoration: none;
  word-break: break-all;
  transition: color 0.15s;
}
.db-row-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* もっと見る */
.db-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.db-more-btn {
  background: rgba(168,85,247,0.12);
  border: 1.5px solid rgba(168,85,247,0.35);
  border-radius: 30px;
  color: #d8b4fe;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 700;
  padding: 10px 32px;
  cursor: pointer;
  transition: all 0.2s;
}
.db-more-btn:hover {
  background: rgba(168,85,247,0.25);
  border-color: #a855f7;
  transform: translateY(-1px);
}
.db-more-wrap.hidden { display: none; }

/* 空状態 */
.db-empty {
  text-align: center;
  color: rgba(255,255,255,0.35);
  padding: 40px 0;
  font-size: 0.9rem;
}

/* レスポンシブ */
@media (max-width: 600px) {
  .db-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .db-title { font-size: 1.2rem; }
}
@media (max-width: 390px) {
  .db-grid { grid-template-columns: repeat(2, 1fr); }
}

