/* styles.css — 推し活タイプ診断
   独自ビジュアルID: 「ホロ箔トレカ（推し活ステータスカード）」
   palette: paper#ECE6F2 / card#FBFAFE / ink#1E1630 / oshi#FF4E8B / foil#C9BCDD
   holo: cyan#57E3D6 → violet#8B6CF0 → magenta#FF5FA2 → gold#FFD56B
   タイプフェイス: 重ゴシック大タイトル + tabular mono。明朝禁止。
*/

/* ===== Reset / Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper:    #ECE6F2;
  --card:     #FBFAFE;
  --ink:      #1E1630;
  --muted:    #7B6E8D;
  --foil:     #C9BCDD;
  --oshi:     #FF4E8B;
  --hcyan:    #57E3D6;
  --hviolet:  #8B6CF0;
  --hmagenta: #FF5FA2;
  --hgold:    #FFD56B;
  --rule:     #DED5EE;
  --font-jp:  "Hiragino Sans","Yu Gothic UI","Noto Sans JP",sans-serif;
  --font-num: "SFMono-Regular","Roboto Mono",monospace;
  --holo-grad: linear-gradient(135deg, var(--hcyan) 0%, var(--hviolet) 33%, var(--hmagenta) 66%, var(--hgold) 100%);
  --radius-sm:  6px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

html { font-size: 16px; }

body {
  font-family: var(--font-jp);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

/* ===== Layout ===== */
.page-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* ===== トレカヘッダ ===== */
.card-header {
  background: var(--ink);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 44px;
  font-family: var(--font-num);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.card-header__app {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 15px;
}
.card-header__tag {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 48px 0 32px;
}
.hero__eyebrow {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-num);
  margin-bottom: 12px;
}
.hero__title {
  font-size: clamp(22px, 5vw, 34px);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.hero__title em {
  font-style: normal;
  background: var(--holo-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__sub {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}
.hero__badge {
  display: inline-block;
  margin-top: 16px;
  padding: 5px 16px;
  background: var(--holo-grad);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  font-family: var(--font-num);
  letter-spacing: 0.06em;
}

/* ===== 設問 ===== */
.quiz-section { padding-top: 8px; }

.q-block { margin-bottom: 20px; }
.q-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.4;
}
.choice-chips {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.choice-chip {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
  font-family: var(--font-jp);
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.choice-chip:hover {
  border-color: var(--oshi);
  background: rgba(255,78,139,0.04);
}
.choice-chip.is-active {
  border-color: var(--oshi);
  background: rgba(255,78,139,0.08);
  font-weight: 600;
  color: var(--oshi);
}

/* ===== 診断ボタン ===== */
.btn-diagnose {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-jp);
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.15s, transform 0.1s;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}
.btn-diagnose::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--holo-grad);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-diagnose:hover::after { opacity: 0.15; }
.btn-diagnose:active { transform: scale(0.98); }
.btn-diagnose:disabled {
  background: var(--rule);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
}
.btn-diagnose:disabled::after { display: none; }

/* ===== 結果セクション ===== */
#result-section.hidden { display: none; }

/* ===== トレカ風結果カード (signature: result-trading-card) ===== */
.result-trading-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(30,22,48,0.12);
  overflow: hidden;
  margin: 32px 0 24px;
  position: relative;
  border: 2px solid transparent;
  /* ホロ箔縁 */
  background-clip: padding-box;
}
.result-trading-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: var(--holo-grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* 型番ラベル (holo-numbering) */
.holo-numbering-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px 8px;
  border-bottom: 1px solid var(--rule);
}
.holo-eyebrow {
  font-family: var(--font-num);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
#holo-numbering {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  background: var(--holo-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.08em;
}

/* タイプ名バナー */
.card-type-banner {
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--rule);
}
.card-type-banner__type {
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.card-type-banner__catch {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ステータスバー群 (status-slab) */
.status-slab-area {
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
}
.status-slab-heading {
  font-family: var(--font-num);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.status-slab {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.slab-name {
  font-size: 12px;
  color: var(--ink);
  width: 90px;
  flex-shrink: 0;
  font-weight: 600;
}
.slab-bar-wrap {
  flex: 1;
  height: 10px;
  background: var(--rule);
  border-radius: 5px;
  overflow: hidden;
}
.slab-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s ease;
}
.slab-num {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  width: 30px;
  text-align: right;
  flex-shrink: 0;
  color: var(--muted);
}

/* タイプ詳細 */
.card-detail {
  padding: 16px 20px;
}
.card-detail__row {
  margin-bottom: 10px;
}
.card-detail__row:last-child { margin-bottom: 0; }
.card-detail__tag {
  display: inline-block;
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 3px;
}
.tag--strong { background: rgba(87,227,214,0.15); color: #2a9d8f; }
.tag--bug    { background: rgba(255,93,162,0.12); color: #cc3a78; }
.tag--compat { background: rgba(139,108,240,0.12); color: #6b45c4; }
.card-detail__text {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
}

/* ===== アフィリエイト枠 ===== */
.oshi-offer-panel {
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--rule);
  margin: 24px 0;
  overflow: hidden;
}
.oshi-offer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  transition: background 0.12s;
}
.oshi-offer-row:last-child { border-bottom: none; }
.oshi-offer-row:hover { background: rgba(255,78,139,0.04); }
.oshi-offer-label { flex: 1; font-size: 14px; font-weight: 600; }
.oshi-offer-link {
  font-size: 12px;
  color: var(--oshi);
  font-weight: 700;
}

/* ===== シェアパネル ===== */
#share-panel { margin: 24px 0; }
#share-panel.hidden { display: none; }

.share-preview-wrap { margin-bottom: 12px; }
.share-preview-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.share-variant-chooser { margin-bottom: 14px; }
.share-variant-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.share-variant-preview {
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 8px;
  white-space: pre-wrap;
  line-height: 1.6;
}

.share-image-notice { font-size: 13px; color: var(--muted); margin-bottom: 12px; }

.share-btn-area { display: flex; flex-direction: column; gap: 8px; }

.share-btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-jp);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, transform 0.1s;
  text-align: center;
}
.share-btn:active { transform: scale(0.98); }
.btn-primary   { background: var(--oshi);  color: #fff; }
.btn-primary:hover { background: #e03a75; }
.btn-secondary { background: var(--paper); color: var(--ink); border: 1.5px solid var(--rule); }
.btn-secondary:hover { border-color: var(--oshi); }
.btn-x         { background: #000;         color: #fff; }
.btn-x:hover   { background: #222; }
.btn-line      { background: #06C755;       color: #fff; }
.btn-line:hover { background: #05a849; }
.btn-variant   { background: var(--paper);  color: var(--muted); border: 1px solid var(--rule); padding: 6px 14px; width: auto; display: inline-block; font-size: 13px; }
.btn-variant.is-active { border-color: var(--oshi); color: var(--oshi); background: rgba(255,78,139,0.06); }

.share-image-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== クロスプロモ (penlight-crosspromo) ===== */
#crosspromo { margin: 32px 0 0; }
.crosspromo-heading {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}
.penlight-crosspromo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.promo-penlight-chip {
  display: inline-flex;
}
.promo-penlight-link {
  display: inline-flex;
  flex-direction: column;
  padding: 8px 14px;
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 20px;
  text-decoration: none;
  transition: border-color 0.12s, background 0.12s;
}
.promo-penlight-link:hover {
  border-color: var(--hviolet);
  background: rgba(139,108,240,0.05);
}
.promo-penlight-title {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.promo-penlight-blurb {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ===== 免責ブロック ===== */
.disclaimer-block {
  font-size: 12px;
  color: var(--muted);
  background: rgba(30,22,48,0.03);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  line-height: 1.7;
  margin: 20px 0;
}

/* ===== 診断前免責 ===== */
.pre-disclaimer {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
}

/* ===== フッタ ===== */
.site-footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  text-align: center;
}

/* ===== ユーティリティ ===== */
.hidden { display: none !important; }
#share-panel.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ===== Reduced motion (frontend-design quality floor) ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .slab-bar-fill { transition: none !important; }
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .holo-numbering-bar { padding: 10px 14px 6px; }
  .card-type-banner { padding: 16px 14px 12px; }
  .status-slab-area { padding: 14px; }
  .card-detail { padding: 12px 14px; }
  .slab-name { width: 80px; font-size: 11px; }
}
