/* ===================================================
   KOLOMUA MEDIA — Stylesheet (Editorial Design)
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* --- Design Tokens --- */
:root {
  --bg:            #f6f6f4;
  --surface:       #ffffff;
  --fg:            #1a1a1a;
  --fg-muted:      #6b7280;
  --fg-light:      #9ca3af;
  --accent:        #1d4ed8;        /* deep blue — used sparingly */
  --accent-light:  #eff6ff;
  --cta:           #c2410c;        /* warm red-orange for CTAs */
  --cta-hover:     #9a3412;
  --border:        #e4e4e0;
  --border-dark:   #c9c9c3;
  --rank1:         #b45309;        /* amber-brown for gold */
  --rank2:         #4b5563;        /* steel for silver */
  --rank3:         #6b7280;        /* muted for bronze */
  --radius:        6px;
  --radius-lg:     10px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow:        0 2px 8px rgba(0,0,0,.10);
  --shadow-lg:     0 6px 24px rgba(0,0,0,.12);
  --header-h:      56px;
  --max-w:         860px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #111111;
    --surface:      #1c1c1c;
    --fg:           #e8e8e4;
    --fg-muted:     #9ca3af;
    --fg-light:     #6b7280;
    --accent:       #60a5fa;
    --accent-light: #172554;
    --cta:          #f97316;
    --cta-hover:    #fb923c;
    --border:       #2a2a2a;
    --border-dark:  #3a3a3a;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.4);
    --shadow:       0 2px 8px rgba(0,0,0,.4);
    --shadow-lg:    0 6px 24px rgba(0,0,0,.5);
  }
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }

/* --- Base Typography --- */
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans',
    'BIZ UDPGothic', Meiryo, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 200;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.site-header .inner {
  max-width: var(--max-w);
  margin: 0 auto; padding: 0 1.25rem;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.site-logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--fg);
}
.site-logo em { font-style: normal; color: var(--accent); }
.site-nav a {
  font-size: 0.85rem;
  color: var(--fg-muted);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover { color: var(--fg); }

/* =====================================================================
   INDEX PAGE
   ===================================================================== */
.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* Hero */
.hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--fg-muted); font-size: 0.95rem; }

/* Section label */
.section-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Featured card */
.featured-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--fg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
@media (min-width: 640px) {
  .featured-card { grid-template-columns: 320px 1fr; }
}
.featured-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.featured-img-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
}
@media (min-width: 640px) {
  .featured-img-wrap { aspect-ratio: unset; height: 100%; min-height: 220px; }
}
.featured-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.featured-card:hover .featured-img { transform: scale(1.04); }
.featured-body {
  display: flex; flex-direction: column; gap: 0.65rem;
  padding: 1.5rem 1.75rem;
}
.featured-badge { display: flex; align-items: center; gap: 0.5rem; }
.featured-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
}
.featured-title {
  font-size: clamp(1rem, 2.5vw, 1.3rem); font-weight: 700; line-height: 1.45;
}
.featured-desc { font-size: 0.875rem; color: var(--fg-muted); line-height: 1.6; flex: 1; }
.featured-cta { font-size: 0.82rem; font-weight: 700; color: var(--accent); margin-top: auto; }

/* Category tabs */
.cat-tabs {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.cat-tab {
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.8rem; font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all .12s;
}
.cat-tab.active, .cat-tab:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Article grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.article-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none; color: var(--fg);
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.article-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.article-card:hover .card-thumb-img { transform: scale(1.04); }

/* Card thumbnail */
.card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}
.card-thumb-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.card-thumb-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  background: var(--bg);
  color: var(--fg-light);
}

/* Card body */
.card-body {
  display: flex; flex-direction: column; gap: 0.45rem;
  padding: 1rem 1.25rem 1.25rem;
  flex: 1;
}
.card-badge { display: flex; align-items: center; gap: 0.4rem; }
.card-title { font-size: 0.92rem; font-weight: 700; line-height: 1.45; }
.card-desc { font-size: 0.8rem; color: var(--fg-muted); line-height: 1.55; flex: 1; }
.card-cta { font-size: 0.78rem; font-weight: 700; color: var(--accent); margin-top: 0.5rem; }

/* Badge — single minimal style */
.badge {
  display: inline-block;
  font-size: 0.68rem; font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  border: 1px solid currentColor;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  background: transparent;
}

/* =====================================================================
   ARTICLE PAGE
   ===================================================================== */
.article-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 5rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--fg-muted);
  display: flex; align-items: center; gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--fg-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--fg); }
.breadcrumb .sep { color: var(--fg-light); }

/* Article header */
.article-header { margin-bottom: 2rem; }
.article-header .badge { margin-bottom: 0.75rem; }
.article-title {
  font-size: clamp(1.35rem, 3.5vw, 1.9rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.article-meta {
  font-size: 0.8rem;
  color: var(--fg-muted);
  display: flex; gap: 1rem; align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* Article body */
.article-body { line-height: 1.9; }
.article-body h2 {
  font-size: 1.2rem; font-weight: 700;
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  letter-spacing: -0.01em;
}
.article-body h3 {
  font-size: 1.05rem; font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent);
}
.article-body p { margin-bottom: 1rem; }
.article-body ul, .article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.article-body li { margin-bottom: 0.3rem; }
.article-body strong { font-weight: 700; }
.article-body a { color: var(--accent); }

/* =====================================================================
   ARTICLE COMPONENTS
   ===================================================================== */

/* Disclosure box */
.disclosure-box {
  font-size: 0.78rem;
  color: #6b4c11;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
@media (prefers-color-scheme: dark) {
  .disclosure-box { background: #2a1e07; color: #fde68a; border-color: #78350f; }
}

/* Intro box */
.intro-box {
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.8;
}
.intro-box p + p { margin-top: 0.5rem; }

/* This-article checklist box */
.this-article-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}
.this-article-box > p {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 0.65rem;
}

/* Check list */
.check-list { list-style: none; padding: 0; }
.check-list li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}
.check-list li::before {
  content: '✓';
  position: absolute; left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Editorial note */
.editorial-note {
  font-size: 0.8rem;
  color: var(--fg-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  margin-bottom: 1.25rem;
}

/* Point card */
.point-card {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}
.point-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.point-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.25rem; }
.point-desc { font-size: 0.85rem; color: var(--fg-muted); line-height: 1.6; }

/* Point box variants */
.point-box {
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  line-height: 1.7;
}
.point-box.warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
}
.point-box.tip {
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}
@media (prefers-color-scheme: dark) {
  .point-box.warning { background: #2a1607; border-color: #7c2d12; color: #fed7aa; }
  .point-box.tip    { background: #172554; border-color: #1e40af; color: #bfdbfe; }
}

/* =====================================================================
   COMPARISON TABLE
   ===================================================================== */
.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.compare-table thead { background: #f3f4f6; }
@media (prefers-color-scheme: dark) {
  .compare-table thead { background: #1e1e1e; }
}
.compare-table th {
  padding: 0.65rem 0.9rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.compare-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--fg);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: var(--bg); }
.compare-table tr:hover td { background: var(--accent-light); }
.compare-table .service-cell {
  display: flex; align-items: center; gap: 0.6rem;
}
.brand-logo {
  width: 20px; height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
  object-fit: contain;
}
.rank-badge-sm {
  display: inline-block;
  font-size: 0.68rem; font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  color: #fff;
  flex-shrink: 0;
}
.rank-badge-sm.r1 { background: #b45309; }
.rank-badge-sm.r2 { background: #6b7280; }
.rank-badge-sm.r3 { background: #9ca3af; }

/* PR / highlight badges */
.pr-badge {
  display: inline-block;
  font-size: 0.62rem; font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: #dc2626; color: #fff;
  letter-spacing: 0.04em;
  vertical-align: middle;
  flex-shrink: 0;
}
.highlight-badge {
  display: inline-block;
  font-size: 0.68rem; font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid #bfdbfe;
  margin-left: 0.4rem;
  white-space: nowrap;
}

/* Brand logos */
.brand-logo { width: 20px; height: 20px; border-radius: 4px; object-fit: contain; flex-shrink: 0; }
.brand-logo-lg { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; flex-shrink: 0; }

/* Markdown-generated table (fallback) */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1.25rem 0;
}
.article-body th {
  background: #f3f4f6;
  padding: 0.6rem 0.85rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  color: var(--fg-muted);
}
.article-body td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
}
.article-body tr:nth-child(even) td { background: var(--bg); }
@media (prefers-color-scheme: dark) {
  .article-body th { background: #1e1e1e; }
}

/* =====================================================================
   RANKING CARDS
   ===================================================================== */
.ranking-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.ranking-header {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.rank-brand-info {
  display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0;
}
.rank-tagline-small {
  font-size: 0.8rem; color: var(--fg-muted); margin-top: 0.15rem;
  line-height: 1.4;
}
.rank-number {
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.9rem; font-weight: 800;
  flex-shrink: 0;
}
.rank-1 .rank-number { background: #b45309; color: #fff; }
.rank-2 .rank-number { background: #6b7280; color: #fff; }
.rank-3 .rank-number { background: #9ca3af; color: #fff; }
.rank-label {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.ranking-body { padding: 1.25rem 1.5rem; }
.ranking-body h3 {
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.ranking-body h3 img.brand-logo { width: 24px; height: 24px; }
.rank-tagline {
  font-size: 0.85rem; color: var(--fg-muted);
  margin-bottom: 1.1rem;
}

/* Pros / Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
@media (max-width: 560px) { .pros-cons { grid-template-columns: 1fr; } }
.pros, .cons {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.pros h4, .cons h4 {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.pros h4 { color: #065f46; }
.cons h4 { color: #9f1239; }
.pros ul, .cons ul { list-style: none; padding: 0; }
.pros li, .cons li {
  font-size: 0.84rem;
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: 0.3rem;
  line-height: 1.55;
}
.pros li::before { content: '+'; position: absolute; left: 0; color: #10b981; font-weight: 700; }
.cons li::before { content: '−'; position: absolute; left: 0; color: #f43f5e; font-weight: 700; }

/* For-who */
.for-who {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1.1rem;
}
.for-who-title {
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--fg-muted); margin-bottom: 0.5rem;
}
.for-who ul { list-style: none; padding: 0; }
.for-who li {
  font-size: 0.84rem;
  padding-left: 1rem; position: relative;
  margin-bottom: 0.25rem;
}
.for-who li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

/* =====================================================================
   CTA BUTTON
   ===================================================================== */
.affiliate-cta {
  margin: 0.5rem 0 1rem;
  text-align: center;
}
.btn-affiliate {
  display: inline-block;
  background: var(--cta);
  color: #fff;
  font-size: 0.95rem; font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background .15s, transform .1s;
}
.btn-affiliate:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
}
.affiliate-cta.no-aff { margin: 0.5rem 0 0.25rem; text-align: left; }
.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--border-dark);
  color: var(--fg-muted);
  font-size: 0.85rem; font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.price-note {
  font-size: 0.78rem; color: var(--fg-muted);
  margin-top: 0.4rem;
}

/* =====================================================================
   FAQ
   ===================================================================== */
.faq-section { margin: 0.5rem 0; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.faq-item summary {
  padding: 0.85rem 1rem;
  font-size: 0.92rem; font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-weight: 400; font-size: 1.2rem;
  color: var(--fg-muted);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: '−'; }
.faq-body {
  padding: 0 1rem 0.85rem;
  font-size: 0.875rem; color: var(--fg-muted);
  line-height: 1.75;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

/* =====================================================================
   RELATED ARTICLES
   ===================================================================== */
.related-section {
  margin: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.related-section h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}
.related-card {
  display: flex; flex-direction: column; gap: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  text-decoration: none; color: var(--fg);
  transition: box-shadow .15s;
}
.related-card:hover { box-shadow: var(--shadow); }
.related-icon { font-size: 1.2rem; }
.related-title { font-size: 0.84rem; font-weight: 700; line-height: 1.4; }
.related-badge { margin-top: auto; }

/* =====================================================================
   BACK LINK / FOOTER
   ===================================================================== */
.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--fg-muted);
  text-decoration: none;
}
.back-link:hover { color: var(--fg); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem;
  max-width: var(--max-w);
  margin: 0 auto;
  font-size: 0.78rem;
  color: var(--fg-muted);
  line-height: 1.7;
}
.footer-links { margin-bottom: 0.75rem; }
.footer-links a { color: var(--fg-muted); text-decoration: none; margin-right: 1.25rem; }
.footer-links a:hover { color: var(--fg); }
