/* ============================================================
   unchikun.app — articles stylesheet
   Shared by all article pages under /articles/ and /en/articles/
   ============================================================ */

:root {
  --primary: #CD6E9A;
  --primary-dark: #B85A85;
  --secondary: #8B4513;
  --accent: #FFC800;
  --premium: #CE82FF;
  --success: #4CAF50;
  --bg: #FFF6F9;
  --bg-soft: #FFE9F1;
  --bg-cream: #FFF8F0;
  --card: #ffffff;
  --text: #2A1F2A;
  --text-secondary: #7C6A78;
  --border: rgba(205, 110, 154, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }

/* ============================================================
   Layout
   ============================================================ */
.article-page { padding: 0 16px; }
.article-container {
  max-width: 760px;
  margin: 0 auto;
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.article-breadcrumb {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.article-breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.article-breadcrumb li::after {
  content: "›";
  margin-left: 8px;
  color: rgba(124, 106, 120, 0.5);
}
.article-breadcrumb li:last-child::after { content: ""; }
.article-breadcrumb a { color: var(--text-secondary); }
.article-breadcrumb a:hover { color: var(--primary); }
.article-breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ============================================================
   Article header
   ============================================================ */
.article-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 0 16px;
  text-align: center;
}
.article-header .category-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-soft);
  color: var(--primary-dark);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.article-header h1 {
  font-size: clamp(24px, 4.5vw, 36px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 16px;
  color: var(--text);
}
.article-header .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.article-header .article-meta span { display: inline-flex; align-items: center; gap: 4px; }
.article-header .article-meta .dot { color: rgba(124, 106, 120, 0.4); }

/* ============================================================
   Articles index header
   ============================================================ */
.articles-index-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 0 32px;
  text-align: center;
}
.articles-index-header .category-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-soft);
  color: var(--primary-dark);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.articles-index-header h1 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text);
}
.articles-index-header .lead {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}
@media (min-width: 768px) {
  .articles-index-header { padding: 56px 0 40px; }
  .articles-index-header .lead { font-size: 16px; }
}

/* ============================================================
   Hero image
   ============================================================ */
.article-hero {
  max-width: 760px;
  margin: 0 auto 32px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(205, 110, 154, 0.12);
  background: var(--bg-soft);
  aspect-ratio: 3 / 2;
}
.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   Article body typography
   ============================================================ */
main.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 48px;
}
main.article-body h2 {
  font-size: 22px;
  font-weight: 800;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--text);
  border-left: 4px solid var(--primary);
  padding-left: 14px;
  line-height: 1.5;
}
main.article-body h2:first-child { margin-top: 0; }
main.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text);
}
main.article-body p {
  margin-bottom: 18px;
  color: var(--text);
  font-size: 16px;
}
main.article-body ul, main.article-body ol {
  margin: 0 0 18px 24px;
  color: var(--text);
}
main.article-body li { margin-bottom: 8px; }
main.article-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--bg-soft);
  border-left: 4px solid var(--primary);
  border-radius: 4px 12px 12px 4px;
  color: var(--text);
  font-style: italic;
}
main.article-body figure {
  margin: 32px 0;
  text-align: center;
}
main.article-body figure img {
  max-width: 100%;
  margin: 0 auto;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(205, 110, 154, 0.10);
}
main.article-body figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
main.article-body strong { color: var(--text); font-weight: 800; }
main.article-body em { font-style: italic; }
main.article-body a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
main.article-body a:hover { color: var(--primary); }
main.article-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ============================================================
   Inline CTA (mid-content)
   ============================================================ */
.article-cta-inline {
  margin: 32px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(205, 110, 154, 0.08), rgba(255, 200, 0, 0.08));
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.article-cta-inline .cta-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}
.article-cta-inline .cta-text { flex: 1; min-width: 180px; }
.article-cta-inline .cta-text strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}
.article-cta-inline .cta-text span {
  font-size: 13px;
  color: var(--text-secondary);
}
.article-cta-inline .cta-button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.article-cta-inline .cta-button:hover {
  background: var(--primary-dark);
  color: white;
}

/* ============================================================
   Article share buttons
   ============================================================ */
.article-share {
  max-width: 720px;
  margin: 0 auto 8px;
  padding: 0 0 8px;
  text-align: center;
}
.article-share-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  border: none;
  padding: 0;
}
.article-share-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  padding: 0;
  font: inherit;
}
.share-btn:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}
.share-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.share-x:hover { background: #000; color: #fff; }
.share-facebook:hover { background: #1877F2; color: #fff; }
.share-line:hover { background: #06C755; color: #fff; }
.share-hatena:hover { background: #00A4DE; color: #fff; }
.share-pocket:hover { background: #EF4056; color: #fff; }
.share-copy:hover { background: var(--primary); color: #fff; }
.share-copy-toast {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 14px;
  background: var(--text);
  color: #fff;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Compact variant (top of article) */
.article-share-compact {
  max-width: 720px;
  margin: -8px auto 24px;
  padding: 0;
}
.article-share-compact .article-share-buttons {
  gap: 8px;
}
.article-share-compact .share-btn {
  width: 36px;
  height: 36px;
}
.article-share-compact .share-btn svg {
  width: 16px;
  height: 16px;
}
.article-share-compact .share-copy-toast {
  margin-top: 10px;
  font-size: 11px;
}

/* ============================================================
   Final CTA banner
   ============================================================ */
.article-cta-final {
  max-width: 760px;
  margin: 48px auto;
  padding: 40px 24px;
  background: linear-gradient(135deg, var(--primary), var(--premium));
  border-radius: 24px;
  text-align: center;
  color: white;
  box-shadow: 0 12px 40px rgba(205, 110, 154, 0.25);
}
.article-cta-final h3 {
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 900;
  margin-bottom: 12px;
  color: white;
}
.article-cta-final p {
  margin-bottom: 24px;
  font-size: 15px;
  opacity: 0.95;
}
.article-cta-final .store-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.article-cta-final .store-badges a {
  display: inline-block;
  transition: transform 0.2s;
}
.article-cta-final .store-badges a:hover { transform: translateY(-2px); }
.article-cta-final .store-badges img {
  height: 48px;
  width: auto;
  display: block;
}
/* Google Play official badge has built-in whitespace padding,
   so render larger and use negative margin to align visual height. */
.article-cta-final .store-badges img[src*="google-play"] {
  height: 60px;
  margin: -6px 0;
}

/* ============================================================
   Related articles
   ============================================================ */
.article-related {
  max-width: 760px;
  margin: 0 auto 48px;
  padding: 0 0 48px;
}
.article-related h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text);
  border-left: 4px solid var(--primary);
  padding-left: 14px;
}
.article-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .article-related-grid { grid-template-columns: repeat(3, 1fr); }
}
.article-related-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.article-related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(205, 110, 154, 0.15);
}
.article-related-card a {
  display: block;
  color: var(--text);
}
.article-related-card .thumb {
  aspect-ratio: 3 / 2;
  background: var(--bg-soft);
  overflow: hidden;
}
.article-related-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-related-card .meta {
  padding: 16px;
}
.article-related-card .meta .tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--bg-soft);
  color: var(--primary-dark);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}
.article-related-card .meta h3 {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 8px;
}

/* ============================================================
   Footer
   ============================================================ */
.article-footer {
  background: #2A1F2A;
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 24px;
  text-align: center;
  font-size: 14px;
  margin-top: 48px;
}
.article-footer .social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.article-footer .social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, color 0.2s;
}
.article-footer .social-links a:hover {
  background: white;
  color: #2A1F2A;
  transform: translateY(-2px);
}
.article-footer .social-links svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.article-footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
  margin-bottom: 16px;
}
.article-footer .links a {
  color: white;
  opacity: 0.85;
}
.article-footer .links a:hover { opacity: 1; text-decoration: underline; }
.article-footer .copy {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

/* ============================================================
   Language switcher (reuses LP/legal style)
   ============================================================ */
.lang-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 100px;
  padding: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.lang-switcher::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: var(--primary);
  border-radius: 100px;
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1), background 0.3s;
  z-index: 0;
}
.lang-switcher.lang-en::before { transform: translateX(100%); }
.lang-switcher:hover::before { background: var(--primary-dark); }
.lang-switcher a {
  position: relative;
  z-index: 1;
  padding: 6px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  letter-spacing: 0.04em;
  min-width: 38px;
  text-decoration: none;
}
.lang-switcher.lang-ja a[data-lang="ja"],
.lang-switcher.lang-en a[data-lang="en"] { color: white; }

/* ============================================================
   Floating mascot (reuses LP style)
   ============================================================ */
.floating-mascot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 64px;
  height: 64px;
  background: white;
  border: 3px solid var(--primary);
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(205, 110, 154, 0.3);
  cursor: pointer;
  z-index: 99;
  padding: 4px;
  transition: transform 0.2s;
}
.floating-mascot:hover { transform: scale(1.06); }
.floating-mascot img { width: 100%; height: 100%; object-fit: contain; }

@media (min-width: 768px) {
  .article-page { padding: 0 24px; }
  .article-header { padding: 40px 0 24px; }
  .article-hero { aspect-ratio: 3 / 2; }
  main.article-body { padding: 0 0 64px; }
  main.article-body h2 { font-size: 24px; margin-top: 56px; }
}

/* ============== Ruby (furigana) for Japanese articles ============== */
ruby {
  ruby-position: over;
  ruby-align: center;
}
ruby rt {
  font-size: 0.55em;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0;
  line-height: 1;
  user-select: none;
  /* Slight nudge so the gloss sits closer to its kanji */
  margin-top: -0.2em;
}
/* Keep ruby selectable while hiding it from copy via plain right-click;
   for now we let it copy along with kanji, which is the typical default. */
