/* ==========================================================================
   HUNTER×HUNTER 念系統診断 WEBアプリ スタイルシート
   ========================================================================== */

:root {
  --bg-primary: #0a0c10;
  --bg-secondary: #121721;
  --bg-card: rgba(22, 28, 41, 0.85);
  --bg-card-hover: rgba(30, 39, 58, 0.95);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-gold: rgba(212, 175, 55, 0.35);

  --text-main: #f1f2f6;
  --text-sub: #a4b0be;
  --text-muted: #747d8c;
  --gold-accent: #f1c40f;
  --gold-glow: rgba(241, 196, 15, 0.4);

  /* 念系統カラー */
  --c-enhancement: #ff4757;
  --c-transmutation: #a55eea;
  --c-emission: #10ac84;
  --c-conjuration: #0984e3;
  --c-manipulation: #f39c12;
  --c-specialization: #eb4d4b;

  --font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(26, 38, 57, 0.45) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(35, 22, 54, 0.4) 0%, transparent 45%);
  background-attachment: fixed;
}

/* 背景オーラ粒子 */
.bg-ambient-aura {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.aura-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: floatOrb 18s infinite alternate ease-in-out;
}
.orb-1 { width: 450px; height: 450px; background: var(--c-enhancement); top: -10%; left: -10%; }
.orb-2 { width: 500px; height: 500px; background: var(--c-transmutation); bottom: -10%; right: -10%; animation-delay: -5s; }
.orb-3 { width: 350px; height: 350px; background: var(--c-emission); top: 50%; left: 40%; animation-delay: -10s; }

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.1); }
  100% { transform: translate(-30px, -40px) scale(0.9); }
}

/* アプリケーション全体コンテナ */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ヘッダー */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.brand-badge {
  font-size: 0.82rem;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--gold-accent);
  text-transform: uppercase;
  background: rgba(241, 196, 15, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-gold);
}

.header-controls {
  display: flex;
  gap: 10px;
}

.btn-control {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-control:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

/* スクリーン管理 */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   1. スタート画面 (Intro)
   ========================================================================== */
.intro-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.intro-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-enhancement), var(--c-transmutation), var(--c-emission), var(--c-conjuration), var(--c-manipulation), var(--c-specialization));
}

.hunter-symbol {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border: 2px solid var(--gold-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px var(--gold-glow);
}
.hunter-symbol svg {
  width: 44px;
  height: 44px;
  fill: var(--gold-accent);
}

.main-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 30%, #a4b0be 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub-title {
  font-size: 1rem;
  color: var(--gold-accent);
  letter-spacing: 1px;
  margin-bottom: 24px;
  font-weight: 600;
}

.intro-quote-box {
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid var(--gold-accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 24px auto;
  max-width: 620px;
  text-align: left;
}

.quote-speaker {
  font-size: 0.85rem;
  color: var(--gold-accent);
  font-weight: bold;
  margin-bottom: 6px;
}

.quote-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.7;
  font-style: italic;
}

.intro-desc {
  font-size: 0.95rem;
  color: var(--text-sub);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* 6系統プレビューチップス */
.nen-system-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
}

.nen-chip {
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.nen-chip.enh { color: var(--c-enhancement); border-color: rgba(255, 71, 87, 0.4); }
.nen-chip.trn { color: var(--c-transmutation); border-color: rgba(165, 94, 234, 0.4); }
.nen-chip.emi { color: var(--c-emission); border-color: rgba(16, 172, 132, 0.4); }
.nen-chip.cnj { color: var(--c-conjuration); border-color: rgba(9, 132, 227, 0.4); }
.nen-chip.mnp { color: var(--c-manipulation); border-color: rgba(243, 156, 18, 0.4); }
.nen-chip.spc { color: var(--c-specialization); border-color: rgba(235, 77, 75, 0.4); }

/* アクションボタン */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #f1c40f, #e67e22);
  color: #000;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 16px 42px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--gold-glow);
  transition: var(--transition-normal);
  letter-spacing: 1px;
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 32px rgba(241, 196, 15, 0.6);
}
.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* ==========================================================================
   2. クイズ画面 (Quiz)
   ========================================================================== */
.quiz-header {
  margin-bottom: 16px;
}

.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-accent), var(--c-enhancement));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.quiz-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-number {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-accent);
}

.quiz-category-tag {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: 12px;
  color: var(--text-sub);
}

.quiz-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.quiz-card.fade-in {
  animation: cardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.question-text {
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 24px;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-align: left;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(241, 196, 15, 0.4);
  transform: translateX(4px);
}

.option-btn.selected {
  background: rgba(241, 196, 15, 0.15);
  border-color: var(--gold-accent);
  box-shadow: 0 0 15px rgba(241, 196, 15, 0.25);
}

.option-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--gold-accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.option-text {
  flex-grow: 1;
  line-height: 1.55;
}

.quiz-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-start;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-sub);
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.88rem;
  transition: var(--transition-fast);
}
.btn-secondary:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   3. 水見式演出画面 (Mizumishiki)
   ========================================================================== */
.mizumishiki-container {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mizumishiki-stage {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mizumishiki-aura-aura {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--aura-color, #f1c40f) 0%, transparent 70%);
  filter: blur(30px);
  opacity: 0;
  transition: opacity 1.2s ease, transform 1.2s ease;
  z-index: 0;
}

.phase-aura .mizumishiki-aura-aura {
  opacity: 0.65;
  transform: scale(1.25);
  animation: auraPulse 2s infinite alternate ease-in-out;
}

@keyframes auraPulse {
  0% { transform: scale(1.1); opacity: 0.5; }
  100% { transform: scale(1.35); opacity: 0.8; }
}

/* グラス */
.glass-wrapper {
  position: relative;
  width: 140px;
  height: 190px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.glass-rim {
  width: 130px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  margin-bottom: -9px;
  z-index: 3;
}

.glass-body {
  width: 120px;
  height: 160px;
  border-left: 3px solid rgba(255, 255, 255, 0.6);
  border-right: 3px solid rgba(255, 255, 255, 0.6);
  border-bottom: 4px solid rgba(255, 255, 255, 0.7);
  border-radius: 0 0 20px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.18) 100%);
  backdrop-filter: blur(4px);
  position: relative;
  overflow: visible;
}

.glass-base {
  width: 100px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  margin-top: 2px;
}

/* 水面と水 */
.water-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 78%;
  background: linear-gradient(180deg, rgba(52, 152, 219, 0.35) 0%, rgba(41, 128, 185, 0.6) 100%);
  border-radius: 0 0 16px 16px;
  transition: all 1.2s ease;
}

.water-surface {
  position: absolute;
  top: 22%;
  left: 0;
  right: 0;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}

/* 葉っぱ */
.leaf {
  width: 32px;
  height: 14px;
  background: #2ed573;
  border-radius: 50% 10% 50% 10%;
  transform: rotate(-15deg);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: all 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.leaf-vein {
  position: absolute;
  top: 50%;
  left: 10%;
  width: 80%;
  height: 1px;
  background: rgba(0, 0, 0, 0.3);
}

/* 系統別の水見式アニメーション演出 */

/* 1. 強化系：水が溢れ出る */
.effect-overflow .water-fill {
  height: 106% !important;
  background: linear-gradient(180deg, rgba(255, 71, 87, 0.6) 0%, rgba(255, 107, 129, 0.8) 100%) !important;
  box-shadow: 0 -8px 25px rgba(255, 71, 87, 0.7);
}
.effect-overflow .water-surface {
  top: -4% !important;
}

/* 2. 変化系：水の味が変わり蒸気・色変化 */
.effect-taste .water-fill {
  background: linear-gradient(180deg, rgba(165, 94, 234, 0.65) 0%, rgba(136, 84, 208, 0.85) 100%) !important;
  box-shadow: 0 0 20px rgba(165, 94, 234, 0.6);
}
.effect-taste .leaf {
  transform: rotate(45deg) scale(1.1);
}

/* 3. 放出系：水の色が鮮やかに変わる */
.effect-color .water-fill {
  background: linear-gradient(180deg, rgba(16, 172, 132, 0.75) 0%, rgba(29, 209, 161, 0.9) 100%) !important;
  box-shadow: 0 0 25px rgba(16, 172, 132, 0.8);
}

/* 4. 具現化系：水中に不純物・結晶化 */
.effect-impurities .water-fill {
  background: linear-gradient(180deg, rgba(9, 132, 227, 0.6) 0%, rgba(116, 185, 255, 0.8) 100%) !important;
}
.effect-impurities .water-inner-glow {
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  animation: crystalRotate 4s linear infinite;
}
@keyframes crystalRotate {
  0% { transform: rotate(0deg) scale(0.6); opacity: 0.3; }
  50% { transform: rotate(180deg) scale(0.9); opacity: 0.8; }
  100% { transform: rotate(360deg) scale(0.6); opacity: 0.3; }
}

/* 5. 操作系：葉っぱがスイスイ動く */
.effect-leaf .leaf {
  animation: leafMove 2.5s infinite alternate ease-in-out !important;
}
@keyframes leafMove {
  0% { transform: translate(-30px, 0) rotate(-40deg); }
  50% { transform: translate(30px, -2px) rotate(40deg); }
  100% { transform: translate(-10px, 2px) rotate(180deg); }
}

/* 6. 特質系：葉が枯れ落ち特異現象 */
.effect-special .leaf {
  background: #576574 !important;
  transform: rotate(90deg) scale(0.65) translateY(15px) !important;
  opacity: 0.7;
}
.effect-special .water-fill {
  background: linear-gradient(135deg, rgba(235, 77, 75, 0.7), rgba(106, 176, 76, 0.7), rgba(34, 166, 179, 0.7), rgba(190, 46, 221, 0.7)) !important;
  animation: rainbowShift 3s linear infinite;
}
@keyframes rainbowShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* パーティクル */
.m-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--p-color, #fff);
  box-shadow: 0 0 8px var(--p-color, #fff);
  opacity: 0;
  animation: pFloat 2s infinite ease-out;
}
@keyframes pFloat {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  50% { opacity: 0.9; transform: translateY(-25px) scale(1.2); }
  100% { opacity: 0; transform: translateY(-50px) scale(0.2); }
}

.mizumishiki-status-text {
  margin-top: 36px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  min-height: 32px;
  letter-spacing: 1px;
}
.reaction-highlight {
  font-size: 1.15rem;
  font-weight: 800;
  animation: pulseGlow 1.5s infinite alternate;
}
@keyframes pulseGlow {
  from { text-shadow: 0 0 5px currentColor; }
  to { text-shadow: 0 0 15px currentColor; }
}

/* ==========================================================================
   4. 診断結果画面 (Result)
   ========================================================================== */
.result-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.result-header {
  text-align: center;
  margin-bottom: 32px;
  position: relative;
}

.res-aura-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.res-type-title-box {
  margin-bottom: 12px;
}

.res-ruby {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 4px;
  margin-bottom: -2px;
}

.res-type-title {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1.1;
}

.res-hisoka-quote {
  font-size: 1rem;
  color: var(--gold-accent);
  font-weight: 700;
  letter-spacing: 1px;
  margin-top: 6px;
}

.res-summary-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 18px auto 0;
  max-width: 620px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

/* グリッドレイアウト（レーダーチャート＋詳細解説） */
.result-grid-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .result-grid-top {
    grid-template-columns: 1fr;
  }
}

.chart-card-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-accent);
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before {
  content: '◆';
  color: var(--gold-accent);
  font-size: 0.75rem;
}

.hex-canvas-wrapper {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hex-canvas-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

.desc-card-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.personality-desc {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text-sub);
  margin-bottom: 20px;
}

/* 長所・短所 */
.traits-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: auto;
}

.traits-box {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.traits-box h5 {
  font-size: 0.82rem;
  margin-bottom: 8px;
  font-weight: 700;
}
.traits-box.strengths h5 { color: #2ed573; }
.traits-box.weaknesses h5 { color: #ff6b81; }

.traits-box ul {
  list-style: none;
  font-size: 0.82rem;
  color: var(--text-sub);
}
.traits-box ul li {
  margin-bottom: 6px;
  position: relative;
  padding-left: 12px;
}
.traits-box.strengths ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2ed573;
}
.traits-box.weaknesses ul li::before {
  content: '▲';
  position: absolute;
  left: 0;
  color: #ff6b81;
  font-size: 0.7rem;
}

/* オリジナル念能力カード */
.original-ability-section {
  margin-bottom: 32px;
}

.original-ability-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.4));
  border: 1px solid var(--card-color, var(--gold-accent));
  box-shadow: 0 0 20px rgba(241, 196, 15, 0.15);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.original-ability-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--card-color, var(--gold-accent));
}

.ability-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ability-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(241, 196, 15, 0.15);
  color: var(--gold-accent);
  padding: 3px 10px;
  border-radius: 12px;
}

.ability-index-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.ability-name {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
  margin-bottom: 10px;
}

.ability-desc {
  font-size: 0.94rem;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 12px;
}

.ability-subnote {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.btn-reroll {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-reroll:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

/* キャラクター一覧 */
.characters-section {
  margin-bottom: 32px;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.character-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--gold-accent);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: var(--transition-fast);
}
.character-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.char-header {
  margin-bottom: 6px;
}

.char-name {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.char-ability {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-accent);
  margin-top: 2px;
}

.char-desc {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.45;
}

/* 相性セクション */
.compatibility-section {
  margin-bottom: 36px;
}

.comp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) {
  .comp-grid { grid-template-columns: 1fr; }
}

.comp-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.comp-label {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.comp-label.best { color: #2ed573; }
.comp-label.worst { color: #eccc68; }

.comp-desc {
  font-size: 0.84rem;
  color: var(--text-sub);
  line-height: 1.5;
}

/* シェア・アクションエリア */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.btn-share-x {
  background: #000000;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-share-x:hover {
  background: #111;
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-copy {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-copy:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-retry {
  background: linear-gradient(135deg, #3742fa, #5352ed);
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(55, 66, 250, 0.3);
}
.btn-retry:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(55, 66, 250, 0.5);
}

/* フッター */
.app-footer {
  margin-top: auto;
  padding-top: 36px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.app-footer p {
  margin-bottom: 4px;
}
