/*
Theme Name: おじおば診断
Theme URI: https://example.com
Author: run-digital
Description: おじおば診断【老害チェック】テーマ
Version: 1.1.0
License: GNU General Public License v2 or later
Text Domain: ojiobacheck
*/

/* ============================================
   おじおば診断 — Magazine Editorial
   Palette: Thumbnail Yellow × Editorial Black × Red
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Kaisei+Decol:wght@700&family=Zen+Kaku+Gothic+New:wght@400;700;900&display=swap');

:root {
  --yellow:   #F7C400;
  --red:      #E8271A;
  --black:    #111111;
  --white:    #FFFFFF;
  --ink:      #1a1a1a;
  --gray-lt:  #F2F2EE;
  --gray-md:  #DDDDDD;
  --gray-dk:  #888888;
  --border:   #E0E0D8;
  --yellow-bg:#FFF7D6;
  --font-display: 'Kaisei Decol', serif;
  --font-body:    'Zen Kaku Gothic New', sans-serif;
  --radius-sm: 3px;
  --radius:    8px;
  --radius-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--yellow-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--black);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
}

.site-header .masthead-logo {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--yellow);
  letter-spacing: 0.05em;
}

.site-header .masthead-logo a { color: var(--yellow); }

.site-header .masthead-tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-dk);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  background: var(--yellow);
  position: relative;
  overflow: hidden;
  padding: 52px 24px 48px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.08) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}

.hero::after {
  content: '20';
  position: absolute;
  right: -20px;
  bottom: -30px;
  font-family: var(--font-display);
  font-size: 240px;
  color: rgba(0,0,0,0.06);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-issue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--black);
  color: var(--yellow);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.hero-issue::before { content: '➤'; font-size: 10px; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 12vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 12px;
}

.hero-title .line-sub {
  display: block;
  font-size: 0.45em;
  font-family: var(--font-body);
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--red);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.hero-badge {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 900;
  font-size: clamp(16px, 2.5vw, 19px);
  padding: 5px 16px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  letter-spacing: 0.1em;
}

.hero-rule-box {
  background: rgba(0,0,0,0.08);
  border-left: 4px solid var(--black);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 20px 0 28px;
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.8;
}

.hero-rule-box .highlight {
  background: var(--black);
  color: var(--yellow);
  padding: 1px 6px;
  border-radius: 2px;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 32px);
  color: var(--white);
  background: var(--black);
  padding: 18px 40px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 0 rgba(0,0,0,0.35), 0 8px 20px rgba(0,0,0,0.2);
  text-decoration: none;
}

.btn-start:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 rgba(0,0,0,0.35), 0 14px 28px rgba(0,0,0,0.2);
}

.btn-start:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 rgba(0,0,0,0.35);
}

.hero-note {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 700;
  color: rgba(0,0,0,0.45);
  letter-spacing: 0.1em;
}

/* ============================================
   QUIZ
   ============================================ */
#quiz-section {
  display: none;
  background: var(--yellow);
  padding: 0 0 60px;
}

#quiz-section.active { display: block !important; }

.quiz-progress-bar-wrap {
  height: 5px;
  background: rgba(0,0,0,0.12);
}

.quiz-progress-fill {
  height: 100%;
  background: var(--red);
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
}

.quiz-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 36px 24px 0;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.quiz-num-label {
  font-family: var(--font-display);
  font-size: 17px;
  color: rgba(0,0,0,0.45);
  letter-spacing: 0.1em;
}

.quiz-dots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 160px;
  justify-content: flex-end;
}

.quiz-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  transition: background 0.3s, transform 0.2s;
}

.quiz-dot.done    { background: var(--black); }
.quiz-dot.current { background: var(--red); transform: scale(1.3); }

.quiz-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px 28px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.15), 0 12px 40px rgba(0,0,0,0.1);
  animation: cardIn 0.32s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
}

.quiz-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--yellow) 0%, var(--red) 100%);
}

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

.q-category {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

.q-text {
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 28px;
}

.quiz-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quiz-btn {
  font-family: var(--font-display);
  font-size: 26px;
  padding: 18px 12px;
  border-radius: var(--radius);
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.05em;
}

.quiz-btn.yes {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
  box-shadow: 0 3px 0 rgba(0,0,0,0.2);
}

.quiz-btn.no {
  background: var(--gray-lt);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: 0 3px 0 rgba(0,0,0,0.08);
}

.quiz-btn.yes:hover { background: #e8b800; border-color: #e8b800; transform: translateY(-2px); box-shadow: 0 5px 0 rgba(0,0,0,0.25); }
.quiz-btn.no:hover  { background: var(--white); border-color: var(--gray-md); transform: translateY(-2px); box-shadow: 0 5px 0 rgba(0,0,0,0.1); }
.quiz-btn:active    { transform: translateY(1px) !important; }

/* ============================================
   RESULT
   ============================================ */
#result-section {
  display: none;
  background: var(--yellow);
  padding: 0 24px 0;
}

#result-section.active { display: block !important; }

.result-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 0 52px;
}

.result-card {
  border-radius: var(--radius-lg);
  padding: 44px 32px 36px;
  text-align: center;
  animation: cardIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.result-card.rouhai {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 6px 0 rgba(0,0,0,0.25), 0 16px 48px rgba(232,39,26,0.3);
}

.result-card.safe {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 6px 0 rgba(0,0,0,0.12), 0 16px 48px rgba(0,0,0,0.1);
}

.result-eyebrow {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 10px;
}

.result-verdict {
  font-family: var(--font-display);
  font-size: clamp(48px, 12vw, 80px);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.result-score-box {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 20px;
}

.result-score-num {
  font-family: var(--font-display);
  font-size: clamp(64px, 16vw, 100px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.result-score-denom {
  font-size: 22px;
  font-weight: 700;
  opacity: 0.55;
}

.result-message {
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.6;
  opacity: 0.9;
  max-width: 420px;
  margin: 0 auto;
}

.result-message strong { opacity: 1; font-weight: 700; }

.result-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

/* シェアボタン共通 */
.btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 22px);
  padding: 16px 36px;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  width: 100%;
  max-width: 400px;
  border: none;
}

.btn-share:hover  { transform: translateY(-3px); }
.btn-share:active { transform: translateY(2px); }

/* 𝕏 — 黄色地に黒文字（結果カードと同テイスト） */
.btn-share-x {
  background: var(--yellow);
  color: var(--black);
  box-shadow: 0 6px 0 rgba(0,0,0,0.3), 0 8px 20px rgba(0,0,0,0.12);
}
.btn-share-x:hover { box-shadow: 0 9px 0 rgba(0,0,0,0.3), 0 14px 28px rgba(0,0,0,0.15); }
.btn-share-x:active { box-shadow: 0 3px 0 rgba(0,0,0,0.3); }

/* Threads — 黒地に白文字 */
.btn-share-threads {
  background: var(--black);
  color: var(--white);
  box-shadow: 0 6px 0 rgba(0,0,0,0.35), 0 8px 20px rgba(0,0,0,0.15);
}
.btn-share-threads:hover  { box-shadow: 0 9px 0 rgba(0,0,0,0.35), 0 14px 28px rgba(0,0,0,0.18); }
.btn-share-threads:active { box-shadow: 0 3px 0 rgba(0,0,0,0.35); }

.btn-share svg { flex-shrink: 0; width: 20px; height: 20px; }

/* もう一度 — シンプルなアウトライン */
.btn-retry {
  font-family: var(--font-display);
  font-size: 17px;
  color: rgba(0,0,0,0.5);
  background: transparent;
  border: 2px solid rgba(0,0,0,0.2);
  padding: 12px 32px;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
  margin-top: 4px;
}

.btn-retry:hover {
  color: var(--black);
  border-color: var(--black);
  transform: translateY(-2px);
}



/* ============================================
   ABOUT / VIDEO
   ============================================ */
.about-section {
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin-top: 40px;
  padding: 48px 24px 60px;
}

.about-inner {
  max-width: 680px;
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 32px);
  color: var(--ink);
  margin-bottom: 28px;
  line-height: 1.2;
}

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 36px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 520px) { .about-grid { grid-template-columns: 1fr; } }

.btn-subscribe {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--white);
  background: #FF0000;
  padding: 14px 32px;
  border-radius: var(--radius);
  letter-spacing: 0.05em;
  text-decoration: none;
  margin-bottom: 32px;
  box-shadow: 0 5px 0 rgba(0,0,0,0.2), 0 8px 20px rgba(255,0,0,0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-subscribe:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 rgba(0,0,0,0.2), 0 14px 28px rgba(255,0,0,0.3);
}

.btn-subscribe:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 rgba(0,0,0,0.2);
}


.about-card {
  background: var(--gray-lt);
  border-radius: var(--radius);
  padding: 22px 20px;
  border: 1px solid var(--border);
}

.about-card .card-eyebrow {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}

.about-card .card-name {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 10px;
}

.about-card p {
  font-size: 16px;
  color: #555;
  line-height: 1.85;
}

.about-card a {
  color: var(--red);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-card a:hover { opacity: 0.7; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--black);
  padding: 28px 24px;
  text-align: center;
  font-size: 15px;
  color: #666;
  line-height: 2;
}

.site-footer a { color: var(--yellow); }
.site-footer a:hover { opacity: 0.8; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
  .hero { padding: 40px 18px 40px; }
  .hero::after { font-size: 160px; right: -10px; bottom: -20px; }
  .hero-title { font-size: clamp(68px, 15vw, 80px); }
  .quiz-inner  { padding: 28px 16px 0; }
  .quiz-card   { padding: 28px 18px 22px; }
  .quiz-btn    { font-size: 22px; padding: 16px 8px; }
  .result-card { padding: 36px 20px 28px; }
  .about-section { padding: 36px 18px 48px; }
}
