/* =====================
   PHYSICAL SHIKAKU - BASE DESIGN
   Clean, simple, universally appealing
   ===================== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #0891b2;
  --accent: #f59e0b;
  --success: #16a34a;
  --danger: #dc2626;
  --bg: #f9fafb;
  --bg-white: #ffffff;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Meiryo', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius); font-weight: 700; font-size: 0.95rem;
  text-decoration: none; border: none; cursor: pointer;
  transition: all 0.2s ease; font-family: inherit; letter-spacing: 0.2px;
}
.btn-primary {
  background: var(--primary); color: white;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,0.35); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.btn-ghost { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: white; border-color: var(--primary); color: var(--primary); }

/* ---- HEADER ---- */
.header {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000; padding: 14px 0;
}
.header .container { display: flex; justify-content: space-between; align-items: center; }
.logo {
  font-size: 1.35rem; font-weight: 900; color: var(--primary);
  text-decoration: none; letter-spacing: -0.3px;
}
.nav { display: flex; gap: 2px; align-items: center; }
.nav a {
  text-decoration: none; color: var(--text-secondary); font-weight: 600;
  padding: 7px 14px; border-radius: var(--radius-sm); transition: all 0.15s; font-size: 0.9rem;
}
.nav a:hover { color: var(--text); background: var(--bg); }
.nav-cta {
  background: var(--primary) !important; color: white !important;
  padding: 7px 18px !important; font-weight: 700 !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; }

/* ---- HERO (index.html) ---- */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
  padding: 80px 0 100px; position: relative; overflow: hidden;
}
.hero-blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.05); }
.hero-blob-1 { width: 480px; height: 480px; top: -160px; right: -100px; animation: blobMove 10s ease-in-out infinite; }
.hero-blob-2 { width: 280px; height: 280px; bottom: -100px; left: -40px; animation: blobMove 8s ease-in-out infinite reverse; }
@keyframes blobMove {
  0%, 100% { transform: scale(1) translate(0,0); }
  50% { transform: scale(1.08) translate(16px,-16px); }
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.hero-content { color: white; max-width: 600px; }
.hero-tag {
  display: inline-block; background: rgba(255,255,255,0.15);
  padding: 6px 16px; border-radius: 50px; font-size: 0.82rem; font-weight: 700;
  margin-bottom: 20px; letter-spacing: 0.5px; border: 1px solid rgba(255,255,255,0.2);
}
.hero h1 { font-size: 3.4rem; font-weight: 900; line-height: 1.15; margin-bottom: 18px; letter-spacing: -0.5px; }
.hero-highlight { color: #fbbf24; }
.hero p { font-size: 1.08rem; opacity: 0.88; margin-bottom: 32px; line-height: 1.85; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { font-size: 5.5rem; line-height: 1.3; animation: floatAnim 4s ease-in-out infinite; }
@keyframes floatAnim {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-18px) rotate(4deg); }
}

/* ---- TICKER ---- */
.ticker { background: var(--text); padding: 11px 0; overflow: hidden; }
.ticker-inner { display: flex; gap: 56px; animation: tickerScroll 26s linear infinite; white-space: nowrap; width: max-content; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-item { color: rgba(255,255,255,0.8); font-weight: 600; font-size: 0.88rem; display: inline-flex; align-items: center; gap: 8px; }

/* ---- STATS ---- */
.stats-section { background: white; padding: 44px 0; border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-card {
  text-align: center; padding: 24px 16px; background: var(--bg);
  border-radius: var(--radius); border: 1px solid var(--border);
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-icon { font-size: 2rem; margin-bottom: 10px; }
.stat-number { font-size: 1.3rem; font-weight: 900; color: var(--primary); margin-bottom: 4px; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 600; }

/* ---- SECTION / LEVEL CARDS ---- */
.section { padding: 72px 0; }
.section-title { text-align: center; margin-bottom: 52px; }
.section-title h2 { font-size: 2.1rem; font-weight: 900; margin-bottom: 10px; }
.section-title p { font-size: 1rem; color: var(--text-secondary); }

.level-card {
  background: white; border-radius: var(--radius-lg); margin-bottom: 24px; overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: all 0.25s ease;
}
.level-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: transparent; }

.level-header { padding: 22px 28px; display: flex; align-items: center; gap: 18px; }
.level-icon-big { font-size: 2.6rem; line-height: 1; }
.level-title-area h3 { font-size: 1.4rem; font-weight: 900; color: white; }
.level-title-area .target { font-size: 0.85rem; opacity: 0.82; color: white; font-weight: 600; margin-top: 3px; }
.level-badge-pill {
  margin-left: auto; background: rgba(255,255,255,0.22); color: white;
  padding: 5px 16px; border-radius: 50px; font-size: 1rem; font-weight: 900;
}

.level-body { padding: 24px 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.strategy-box, .merit-box {
  background: var(--bg); border-radius: var(--radius-sm); padding: 18px;
  border: 1px solid var(--border);
}
.strategy-box h4, .merit-box h4 { font-size: 0.9rem; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.strategy-box ul, .merit-box ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.strategy-box li, .merit-box li { font-size: 0.85rem; line-height: 1.55; padding-left: 2px; }
.strategy-box li::before { content: "✏️ "; }
.merit-box li::before { content: "✨ "; }

.level-footer {
  padding: 14px 28px; background: var(--bg); border-top: 1px solid var(--border);
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
}
.level-meta { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); }

/* Level header gradient colors */
.lc-5  { background: linear-gradient(135deg, #059669, #10b981); }
.lc-4  { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.lc-3  { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.lc-p2 { background: linear-gradient(135deg, #d97706, #f59e0b); }
.lc-2  { background: linear-gradient(135deg, #dc2626, #ef4444); }
.lc-p1 { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.lc-1  { background: linear-gradient(135deg, #b45309, #d97706); }

/* ---- CTA ---- */
.cta-section {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  padding: 72px 0; text-align: center; color: white;
}
.cta-section .cta-emoji { font-size: 3.5rem; margin-bottom: 18px; }
.cta-section h2 { font-size: 2.2rem; font-weight: 900; margin-bottom: 14px; }
.cta-section p { font-size: 1.05rem; opacity: 0.88; margin-bottom: 32px; line-height: 1.85; }

/* ---- FOOTER ---- */
.footer { background: var(--text); padding: 40px 24px; text-align: center; }
.footer-logo { font-size: 1.35rem; font-weight: 900; color: white; margin-bottom: 10px; }
.footer p { font-size: 0.82rem; color: rgba(255,255,255,0.5); margin-bottom: 18px; line-height: 1.8; }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.footer a { color: rgba(255,255,255,0.7); text-decoration: none; font-weight: 600; font-size: 0.85rem; }
.footer a:hover { color: white; }

/* =====================
   QUIZ PAGE
   ===================== */
.quiz-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  padding: 60px 0; text-align: center; color: white;
}
.quiz-hero-tag {
  display: inline-block; background: rgba(255,255,255,0.15);
  padding: 6px 18px; border-radius: 50px; font-size: 0.85rem; font-weight: 700;
  margin-bottom: 18px; border: 1px solid rgba(255,255,255,0.2);
}
.quiz-hero h1 { font-size: 2.5rem; font-weight: 900; margin-bottom: 10px; line-height: 1.3; }
.quiz-hero p { font-size: 1.05rem; opacity: 0.88; }

.quiz-section { padding: 56px 0; }
.quiz-wrapper { max-width: 680px; margin: 0 auto; }

.quiz-progress { margin-bottom: 24px; }
.progress-info { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 700; font-size: 0.85rem; color: var(--text-secondary); }
.progress-bar-bg { background: var(--border); border-radius: 50px; height: 10px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #60a5fa); border-radius: 50px; transition: width 0.4s ease; }

.quiz-card {
  background: white; border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.question-level-tag {
  display: inline-block; padding: 3px 12px; border-radius: 50px;
  font-size: 0.75rem; font-weight: 700; background: var(--primary-light);
  color: var(--primary); margin-bottom: 14px;
}
.question-text { font-size: 1.2rem; font-weight: 800; margin-bottom: 24px; line-height: 1.6; }

.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.option-btn {
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; font-size: 0.9rem; font-weight: 600; color: var(--text);
  cursor: pointer; transition: all 0.15s; text-align: left; font-family: inherit; line-height: 1.5;
}
.option-btn:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.option-btn.correct { background: #f0fdf4; border-color: #22c55e; color: #15803d; }
.option-btn.wrong   { background: #fef2f2; border-color: #ef4444; color: #b91c1c; }
.option-btn:disabled { cursor: default; }

.quiz-next-btn {
  display: none; width: 100%; padding: 14px;
  background: var(--primary); color: white;
  border: none; border-radius: var(--radius); font-size: 1rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.quiz-next-btn:hover { background: var(--primary-dark); }
.quiz-next-btn.show { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Result */
#resultArea { animation: fadeInUp 0.5s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.result-card {
  background: white; border-radius: var(--radius-lg); padding: 44px 36px;
  box-shadow: var(--shadow); text-align: center; border: 1px solid var(--border);
}
.result-score-ring {
  width: 148px; height: 148px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: 50%; display: flex; flex-direction: column; align-items: center;
  justify-content: center; margin: 0 auto 28px; color: white;
  box-shadow: 0 8px 28px rgba(37,99,235,0.3);
}
.result-score-number { font-size: 2.6rem; font-weight: 900; line-height: 1; }
.result-score-label { font-size: 0.8rem; opacity: 0.82; font-weight: 600; }
.result-title { font-size: 0.9rem; color: var(--text-secondary); font-weight: 700; margin-bottom: 6px; }
.result-level-name { font-size: 2.2rem; font-weight: 900; margin-bottom: 10px; }
.result-level-emoji { font-size: 3rem; margin-bottom: 14px; }
.result-description { font-size: 0.96rem; color: var(--text-secondary); margin-bottom: 28px; line-height: 1.8; }
.result-tips {
  background: var(--bg); border-radius: var(--radius); padding: 22px;
  margin-bottom: 28px; text-align: left; border: 1px solid var(--border);
}
.result-tips h4 { font-size: 0.95rem; font-weight: 800; margin-bottom: 10px; }
.result-tips ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.result-tips li { font-size: 0.9rem; line-height: 1.6; }
.result-tips li::before { content: "💡 "; }
.result-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-result-primary { background: var(--primary); color: white; box-shadow: 0 2px 12px rgba(37,99,235,0.3); }
.btn-result-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-result-secondary { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); }
.btn-result-secondary:hover { background: white; border-color: var(--primary); }

/* Confetti */
.confetti-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti-piece { position: absolute; top: -20px; animation: confettiFall 3.5s ease-in forwards; }
@keyframes confettiFall { 0% { transform: translateY(-20px) rotate(0deg); opacity: 1; } 100% { transform: translateY(110vh) rotate(720deg); opacity: 0; } }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero h1 { font-size: 2.4rem; }
  .hero-art { display: none; }
  .hero-btns { justify-content: center; }
  .level-body { grid-template-columns: 1fr; padding: 18px; }
  .level-header { padding: 18px; flex-wrap: wrap; }
  .level-footer { padding: 12px 18px; }
  .options-grid { grid-template-columns: 1fr; }
  .quiz-card { padding: 24px 18px; }
  .result-card { padding: 28px 20px; }
  .section-title h2 { font-size: 1.75rem; }
}
@media (max-width: 480px) {
  .nav a:not(.nav-cta) { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* =====================
   LINE CHAT SECTION
   ===================== */
.chat-section {
  padding: 72px 0;
  background: var(--bg);
}
.chat-window {
  max-width: 580px; margin: 0 auto;
  background: #dfe5ea; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md);
}
.chat-win-header {
  background: #25d366; padding: 14px 20px;
  display: flex; align-items: center; gap: 12px; color: white;
}
.chat-win-header-avatar {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.chat-win-header-info h4 { font-size: 0.95rem; font-weight: 800; margin-bottom: 1px; }
.chat-win-header-info span { font-size: 0.72rem; opacity: 0.85; }
.chat-body { padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; background: #dfe5ea; }
.chat-date-divider {
  text-align: center; font-size: 0.7rem; color: #666; font-weight: 600;
  background: rgba(255,255,255,0.5); display: inline-block; margin: 0 auto;
  padding: 3px 12px; border-radius: 50px; align-self: center;
}
.chat-msg { display: flex; align-items: flex-start; gap: 9px; }
.chat-msg.student { flex-direction: row-reverse; }
.chat-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.chat-avatar.teacher-av { background: #25d366; }
.chat-avatar.student-av { background: #74b9ff; }
.chat-bubble-wrap { display: flex; flex-direction: column; max-width: 72%; gap: 3px; }
.chat-msg.student .chat-bubble-wrap { align-items: flex-end; }
.chat-sender-name { font-size: 0.7rem; font-weight: 700; color: #555; padding-left: 3px; }
.chat-bubble {
  padding: 10px 14px; border-radius: 16px;
  font-size: 0.88rem; line-height: 1.6; font-weight: 600; word-break: break-word;
}
.chat-msg.teacher .chat-bubble { background: white; border-top-left-radius: 4px; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.chat-msg.student .chat-bubble { background: #25d366; border-top-right-radius: 4px; color: white; }
.chat-row-with-time { display: flex; align-items: flex-end; gap: 5px; }
.chat-msg.student .chat-row-with-time { flex-direction: row-reverse; }
.chat-time { font-size: 0.66rem; color: #888; white-space: nowrap; margin-bottom: 2px; }

/* =====================
   LEVEL DETAIL PAGES
   ===================== */
/* Nav strip */
.level-nav-strip {
  background: white; border-bottom: 1px solid var(--border);
  padding: 10px 0; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;
}
.level-nav-strip .container { display: flex; gap: 6px; justify-content: center; flex-wrap: nowrap; }
.lnav-item {
  padding: 7px 18px; border-radius: 50px; font-weight: 700; font-size: 0.83rem;
  text-decoration: none; transition: all 0.15s; color: var(--text-secondary);
  border: 1.5px solid var(--border); white-space: nowrap;
}
.lnav-item:hover, .lnav-item.active { color: white; border-color: transparent; }
.lnav-5.active,  .lnav-5:hover  { background: #059669; }
.lnav-4.active,  .lnav-4:hover  { background: #2563eb; }
.lnav-3.active,  .lnav-3:hover  { background: #7c3aed; }
.lnav-p2.active, .lnav-p2:hover { background: #d97706; }
.lnav-2.active,  .lnav-2:hover  { background: #dc2626; }
.lnav-p1.active, .lnav-p1:hover { background: #0891b2; }
.lnav-1.active,  .lnav-1:hover  { background: #b45309; }

/* Level page hero */
.level-page-hero {
  padding: 72px 0 88px; position: relative; overflow: hidden; color: white;
}
.level-page-hero .container { position: relative; z-index: 1; }
.level-page-badge {
  display: inline-block; background: rgba(255,255,255,0.18);
  padding: 5px 18px; border-radius: 50px; font-size: 0.85rem; font-weight: 700; margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,0.25);
}
.level-page-hero h1 { font-size: 2.8rem; font-weight: 900; line-height: 1.2; margin-bottom: 14px; }
.level-page-hero p { font-size: 1.05rem; opacity: 0.9; max-width: 580px; line-height: 1.8; margin-bottom: 32px; }
.level-hero-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.level-hero-stat {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 12px 20px; border-radius: var(--radius); text-align: center; min-width: 100px;
}
.level-hero-stat .stat-val { font-size: 1.15rem; font-weight: 900; display: block; margin-bottom: 2px; }
.level-hero-stat .stat-lbl { font-size: 0.72rem; opacity: 0.82; font-weight: 700; }
.level-page-hero-blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.06); }
.level-page-hero-blob-1 { width: 360px; height: 360px; top: -130px; right: -90px; }
.level-page-hero-blob-2 { width: 220px; height: 220px; bottom: -70px; left: 8%; }

/* Pros / Cons */
.pros-cons-section { padding: 64px 0; background: white; }
.pros-cons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pros-box {
  background: #f0fdf4; border: 1.5px solid #86efac;
  border-radius: var(--radius-lg); padding: 24px;
}
.cons-box {
  background: #fff7ed; border: 1.5px solid #fed7aa;
  border-radius: var(--radius-lg); padding: 24px;
}
.pros-box h3 { font-size: 1.1rem; font-weight: 900; color: #15803d; margin-bottom: 20px; }
.cons-box h3 { font-size: 1.1rem; font-weight: 900; color: #c2410c; margin-bottom: 20px; }
.pci-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06); align-items: flex-start;
}
.pci-item:last-child { border-bottom: none; padding-bottom: 0; }
.pci-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.pci-content h4 { font-size: 0.88rem; font-weight: 800; margin-bottom: 3px; }
.pci-content p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; }

/* Study Tips */
.study-tips-section { padding: 64px 0; background: var(--bg); }
.study-tips-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 36px; }
.study-tip-card {
  background: white; border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  display: flex; gap: 14px; align-items: flex-start;
  transition: transform 0.2s, box-shadow 0.2s;
}
.study-tip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.study-tip-icon { font-size: 1.8rem; flex-shrink: 0; }
.study-tip-content h4 { font-size: 0.9rem; font-weight: 800; margin-bottom: 5px; }
.study-tip-content p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.55; }

/* Detail Chat (level pages) */
.detail-chat-section { padding: 64px 0; background: var(--bg); }
.detail-chat-section .chat-window { max-width: 560px; }

/* "詳しく見る" link */
.lc-detail-link {
  display: block; text-align: center; padding: 13px;
  font-weight: 700; font-size: 0.9rem; text-decoration: none;
  color: white; transition: all 0.2s; letter-spacing: 0.2px;
}
.lc-detail-link:hover { filter: brightness(1.08); }
.lc-dl-5  { background: #059669; }
.lc-dl-4  { background: #2563eb; }
.lc-dl-3  { background: #7c3aed; }
.lc-dl-p2 { background: #d97706; }
.lc-dl-2  { background: #dc2626; }
.lc-dl-p1 { background: #0891b2; }
.lc-dl-1  { background: #b45309; }

/* Level page responsive */
@media (max-width: 768px) {
  .pros-cons-grid { grid-template-columns: 1fr; }
  .level-page-hero h1 { font-size: 2.1rem; }
  .level-hero-stats { gap: 10px; }
  .level-hero-stat { min-width: 88px; padding: 10px 14px; }
  .study-tips-grid { grid-template-columns: 1fr; }
  .level-nav-strip .container { justify-content: flex-start; padding: 0 16px; }
}

/* =====================
   PORTAL PAGE
   ===================== */
.portal-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e3a8a 100%);
  padding: 88px 0 108px; position: relative; overflow: hidden;
  color: white; text-align: center;
}
.portal-hero-blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.03); }
.portal-hero-blob-1 { width: 560px; height: 560px; top: -200px; right: -140px; }
.portal-hero-blob-2 { width: 380px; height: 380px; bottom: -140px; left: -90px; }
.portal-hero .container { position: relative; z-index: 1; }
.portal-hero-tag {
  display: inline-block; background: rgba(255,255,255,0.1);
  padding: 6px 20px; border-radius: 50px; font-size: 0.85rem; font-weight: 700; margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.18);
}
.portal-hero h1 { font-size: 3.4rem; font-weight: 900; line-height: 1.15; margin-bottom: 18px; letter-spacing: -0.5px; }
.portal-hero p { font-size: 1.08rem; opacity: 0.82; max-width: 580px; margin: 0 auto 36px; line-height: 1.88; }
.portal-hero-stats {
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px;
}
.portal-hero-stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 14px 24px; border-radius: var(--radius); text-align: center; min-width: 110px;
}
.portal-hero-stat .phs-num { font-size: 1.55rem; font-weight: 900; display: block; margin-bottom: 2px; }
.portal-hero-stat .phs-lbl { font-size: 0.72rem; opacity: 0.75; font-weight: 700; }
.portal-hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Category sections */
.category-section { padding: 64px 0; }
.category-section-white { background: white; }
.category-section-cream { background: var(--bg); }
.category-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 36px; padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.category-accent { width: 5px; height: 44px; border-radius: 3px; flex-shrink: 0; }
.category-accent-it     { background: linear-gradient(180deg, #1d4ed8, #3b82f6); }
.category-accent-fin    { background: linear-gradient(180deg, #059669, #10b981); }
.category-accent-legal  { background: linear-gradient(180deg, #374151, #6b7280); }
.category-accent-build  { background: linear-gradient(180deg, #92400e, #b45309); }
.category-accent-lang   { background: linear-gradient(180deg, #dc2626, #f59e0b); }
.category-header-icon { font-size: 2.4rem; }
.category-header-text h2 { font-size: 1.65rem; font-weight: 900; margin-bottom: 3px; }
.category-header-text p { color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; }

/* Cert cards grid */
.cert-cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px;
}
.cert-card {
  background: white; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: all 0.2s ease; text-decoration: none; display: block;
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: transparent; }
.cert-card-head { padding: 20px 22px; color: white; display: flex; gap: 12px; align-items: center; }
.cert-card-icon { font-size: 2rem; flex-shrink: 0; }
.cert-card-name { font-size: 1rem; font-weight: 900; line-height: 1.3; }
.cert-card-org  { font-size: 0.72rem; opacity: 0.82; margin-top: 2px; font-weight: 600; }
.cert-card-body { padding: 14px 18px 10px; }
.cert-level-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.cert-lv {
  padding: 2px 9px; border-radius: 50px; font-size: 0.7rem; font-weight: 700;
  background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border);
}
.cert-card-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; }
.cert-card-footer {
  padding: 9px 18px 12px; display: flex; justify-content: space-between;
  align-items: center; border-top: 1px solid var(--border-light);
}
.cert-card-tag  { font-size: 0.72rem; font-weight: 700; color: var(--text-light); }
.cert-card-arrow { font-size: 0.85rem; font-weight: 800; color: var(--primary); }

/* Cert card header colors */
.cc-aws .cert-card-head      { background: linear-gradient(135deg, #ea580c, #f97316); }
.cc-azure .cert-card-head    { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.cc-gcp .cert-card-head      { background: linear-gradient(135deg, #1d4ed8, #4285F4); }
.cc-ipa .cert-card-head      { background: linear-gradient(135deg, #075985, #0ea5e9); }
.cc-nissho .cert-card-head   { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.cc-fp .cert-card-head       { background: linear-gradient(135deg, #059669, #10b981); }
.cc-securities .cert-card-head { background: linear-gradient(135deg, #0369a1, #0ea5e9); }
.cc-ginko .cert-card-head    { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.cc-boki .cert-card-head     { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.cc-shiho .cert-card-head    { background: linear-gradient(135deg, #1f2937, #4b5563); }
.cc-gyosei .cert-card-head   { background: linear-gradient(135deg, #14532d, #16a34a); }
.cc-kenchi .cert-card-head   { background: linear-gradient(135deg, #78350f, #b45309); }
.cc-eiken .cert-card-head    { background: linear-gradient(135deg, #dc2626, #ef4444); }
.cc-suken .cert-card-head    { background: linear-gradient(135deg, #4c1d95, #7c3aed); }

/* Cert page breadcrumb */
.cert-page-nav {
  background: white; border-bottom: 1px solid var(--border); padding: 11px 0;
}
.cert-page-nav .container { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cert-page-nav-back {
  color: var(--text-secondary); font-weight: 600; font-size: 0.85rem;
  text-decoration: none; transition: color 0.15s;
}
.cert-page-nav-back:hover { color: var(--primary); }
.cert-nav-sep { color: var(--border); }
.cert-nav-current { font-weight: 700; font-size: 0.85rem; color: var(--text); }

/* Cert page hero gradients */
.cert-hero-aws         { background: linear-gradient(135deg, #c2410c, #ea580c, #f97316); }
.cert-hero-azure       { background: linear-gradient(135deg, #1e3a8a, #1d4ed8, #3b82f6); }
.cert-hero-gcp         { background: linear-gradient(135deg, #1e40af, #2563eb, #34a853); }
.cert-hero-it-national { background: linear-gradient(135deg, #0c4a6e, #0369a1, #0ea5e9); }
.cert-hero-nissho      { background: linear-gradient(135deg, #4c1d95, #6d28d9, #8b5cf6); }
.cert-hero-suken       { background: linear-gradient(135deg, #2e1065, #4c1d95, #7c3aed); }
.cert-hero-shiho       { background: linear-gradient(135deg, #111827, #1f2937, #374151); }
.cert-hero-gyosei      { background: linear-gradient(135deg, #052e16, #14532d, #15803d); }
.cert-hero-kenchikushi { background: linear-gradient(135deg, #451a03, #78350f, #92400e); }
.cert-hero-fp          { background: linear-gradient(135deg, #022c22, #064e3b, #059669); }
.cert-hero-securities  { background: linear-gradient(135deg, #0c4a6e, #075985, #0369a1); }
.cert-hero-boki        { background: linear-gradient(135deg, #2d1b69, #4c1d95, #7c3aed); }
.cert-hero-ginko       { background: linear-gradient(135deg, #0f172a, #1e3a8a, #2563eb); }

/* Cert overview cards */
.cert-overview-section { padding: 64px 0; background: white; }
.cert-overview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px; margin-top: 36px;
}
.cert-ov-card {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: transform 0.2s;
}
.cert-ov-card:hover { transform: translateY(-2px); }
.cert-ov-head { padding: 14px 18px; color: white; font-weight: 900; font-size: 1rem; }
.cert-ov-body { padding: 14px 18px; background: white; }
.cert-ov-row {
  display: flex; gap: 8px; font-size: 0.82rem; padding: 5px 0;
  border-bottom: 1px solid var(--border-light); align-items: flex-start; line-height: 1.5;
}
.cert-ov-row:last-child { border-bottom: none; }
.cert-ov-lbl { font-weight: 800; color: var(--text-secondary); flex-shrink: 0; font-size: 0.74rem; min-width: 44px; }

/* =====================
   インタビューコメント COMPONENT
   ===================== */
.interview-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #f0f9ff 0%, #fefce8 100%);
  border-top: 1px solid #bae6fd;
  border-bottom: 1px solid #bae6fd;
}
.interview-section .section-title { margin-bottom: 48px; }

.interview-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.interview-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 22px 22px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  border: 1px solid #e0f2fe;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.interview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(37,99,235,0.13);
}
.interview-card:nth-child(1) { grid-column: 1 / 3; }
.interview-card:nth-child(2) { grid-column: 3 / 5; }
.interview-card:nth-child(3) { grid-column: 5 / 7; }
.interview-card:nth-child(4) { grid-column: 2 / 4; }
.interview-card:nth-child(5) { grid-column: 4 / 6; }

.interview-quote-mark {
  font-size: 2.8rem;
  line-height: 0.7;
  color: var(--primary);
  font-family: Georgia, serif;
  font-weight: 900;
  opacity: 0.25;
}
.interview-text {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text);
  font-weight: 600;
  flex: 1;
}
.interview-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #f0f4f8;
}
.interview-avatar { font-size: 1.9rem; line-height: 1; flex-shrink: 0; }
.interview-info { flex: 1; }
.interview-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text);
}
.interview-role {
  font-size: 0.73rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 2px;
}
.interview-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 24px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .interview-grid { grid-template-columns: repeat(2, 1fr); }
  .interview-card:nth-child(1),
  .interview-card:nth-child(2),
  .interview-card:nth-child(3),
  .interview-card:nth-child(4),
  .interview-card:nth-child(5) { grid-column: auto; }
}
@media (max-width: 580px) {
  .interview-grid { grid-template-columns: 1fr; }
}

/* cert detail nav strip */
.cert-level-nav {
  background: var(--bg-white);
  border-bottom: 2px solid var(--border);
  padding: 0;
  overflow-x: auto;
  white-space: nowrap;
}
.cert-level-nav .container {
  display: flex;
  gap: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.clnav-item {
  padding: 14px 22px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  flex-shrink: 0;
}
.clnav-item:hover { color: var(--primary); background: var(--primary-light); }
.clnav-item.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--primary-light); }

/* detail page study steps */
.study-steps-section { padding: 72px 0; }
.study-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.study-step-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
}
.study-step-number {
  position: absolute;
  top: -14px; left: 20px;
  background: var(--primary);
  color: white;
  font-weight: 900;
  font-size: 0.8rem;
  padding: 3px 12px;
  border-radius: 20px;
}
.study-step-icon { font-size: 2rem; margin-bottom: 12px; }
.study-step-card h4 { font-size: 1rem; font-weight: 800; margin-bottom: 8px; }
.study-step-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; }

/* cert ov card detail button */
.cert-ov-detail-btn {
  display: block;
  margin: 14px 14px 14px;
  padding: 9px;
  text-align: center;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1.5px solid var(--primary);
  transition: all 0.2s;
}
.cert-ov-detail-btn:hover { background: var(--primary); color: white; }

/* Portal responsive */
@media (max-width: 900px) {
  .portal-hero h1 { font-size: 2.6rem; }
  .cert-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .portal-hero h1 { font-size: 2rem; }
  .cert-cards-grid { grid-template-columns: 1fr; }
  .cert-overview-grid { grid-template-columns: 1fr; }
  .portal-hero-stats { gap: 10px; }
  .portal-hero-stat { min-width: 92px; padding: 10px 16px; }
}

/* ---- AD SLOT (ads.js が描画) ---- */
.ad-slot { width: 100%; max-width: 1100px; margin: 24px auto; padding: 0 24px; }
.ad-slot[hidden] { display: none; }
.ad-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-white); border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 14px 18px; text-decoration: none; color: var(--text-secondary);
  font-size: 0.85rem; line-height: 1.6;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.ad-banner:hover { border-color: var(--text-light); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.ad-label {
  flex-shrink: 0; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em;
  background: var(--border-light); color: var(--text-secondary); padding: 3px 9px; border-radius: 20px;
}
.ad-img { max-width: 100%; display: block; border-radius: var(--radius-sm); }

/* ---- 画面下部固定広告（カテゴリ別 / ads.js が描画） ---- */
.bottom-fixed-ad {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  z-index: 999; display: flex; align-items: center; gap: 10px;
  background: var(--bg-white); border: 1px solid var(--border); border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-md);
  padding: 8px 34px 8px 12px; max-width: calc(100vw - 16px);
}
.bottom-fixed-ad .ad-label { flex-shrink: 0; }
.bottom-fixed-ad-close {
  position: absolute; top: 4px; right: 6px; width: 22px; height: 22px;
  border: none; background: var(--border-light); color: var(--text-secondary);
  border-radius: 50%; font-size: 14px; line-height: 1; cursor: pointer; padding: 0;
}
.bottom-fixed-ad-close:hover { background: var(--border); }
