/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --red:        #e05a00;
  --red-dk:     #b84400;
  --orange:     #ff6600;
  --bg:         #f4f4f0;
  --surface:    #ffffff;
  --gray-50:    #fafafa;
  --gray-100:   #f0f0f0;
  --border:     #dddddd;
  --text:       #1a1a1a;
  --text-sub:   #555555;
  --text-muted: #999999;
  --link:       #0066cc;
  --font: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', sans-serif;
  --r:    3px;
  --r-md: 6px;
  --shadow:    0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --rank1: #d4a000;
  --rank2: #888888;
  --rank3: #c07850;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 14px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 8px;
}
@media (min-width: 640px) {
  .container { padding: 0 16px; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--red);
  border-bottom: 3px solid var(--red-dk);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
}
.logo {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo span {
  font-size: 11px;
  font-weight: 400;
  display: block;
  letter-spacing: 0;
  margin-top: 2px;
  color: rgba(255,255,255,0.85);
}
.header-right { display: flex; align-items: center; gap: 8px; }
.header-btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 5px 12px;
  border-radius: var(--r);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
}
.header-btn.primary { background: #fff; color: var(--red); font-weight: 700; }
.search-bar { background: var(--red-dk); padding: 8px 16px 10px; }
.search-inner { display: flex; gap: 6px; max-width: 600px; }
.search-inner input {
  flex: 1; padding: 8px 12px; border: none;
  border-radius: var(--r) 0 0 var(--r); font-size: 14px;
  outline: none; font-family: var(--font);
}
.search-inner button {
  background: var(--orange); color: #fff; border: none;
  padding: 8px 18px; border-radius: 0 var(--r) var(--r) 0;
  font-size: 13px; font-weight: 700; cursor: pointer;
  white-space: nowrap; font-family: var(--font);
  transition: background 0.15s;
}
.search-inner button:hover { background: #e55a00; }

/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.nav-bar {
  background: #222;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-bar::-webkit-scrollbar { display: none; }
.nav-item {
  color: #ddd; padding: 8px 14px; font-size: 13px;
  white-space: nowrap; border-right: 1px solid #333;
  transition: background 0.15s; text-decoration: none; display: block;
}
.nav-item:hover { background: #333; color: #fff; text-decoration: none; }
.nav-item.active { color: var(--orange); font-weight: 700; }
.nav-item-btn { background: none; border: none; font-family: var(--font); cursor: pointer; }
.nav-item-caret { font-size: 9px; margin-left: 3px; opacity: 0.7; }
.nav-dropdown-wrap { position: relative; display: flex; }
.nav-dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  min-width: 240px; background: #2a2a2a; border: 1px solid #444;
  box-shadow: 0 4px 12px rgba(0,0,0,.4); z-index: 200;
}
.nav-dropdown-wrap:hover .nav-dropdown,
.nav-dropdown-wrap:focus-within .nav-dropdown { display: block; }
.nav-dropdown a {
  display: flex; align-items: center; gap: 8px; color: #ddd;
  padding: 10px 14px; font-size: 13px; border-bottom: 1px solid #3a3a3a;
  white-space: nowrap; text-decoration: none;
}
.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover { background: #3a3a3a; color: #fff; text-decoration: none; }
.nav-dropdown-label {
  font-size: 10px; color: var(--orange); font-weight: 700;
  margin-left: auto; padding: 1px 5px;
  border: 1px solid var(--orange); border-radius: 2px;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px; font-size: 12px; color: var(--text-muted);
}
.breadcrumb a { color: var(--link); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text-sub); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1a0500 0%, #3d1200 50%, #5c2200 100%);
  padding: 28px 0;
}
@media (max-width: 480px) { .hero { padding: 20px 0; } }
.hero-inner { max-width: 720px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(212,160,0,0.25); color: #ffd966;
  border: 1px solid rgba(212,160,0,0.4);
  font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 2px; margin-bottom: 10px;
}
.hero-title {
  font-size: 28px; font-weight: 700; color: #fff;
  line-height: 1.3; margin-bottom: 12px;
}
@media (max-width: 480px) { .hero-title { font-size: 22px; } }
.hero-desc {
  font-size: 14px; color: rgba(255,255,255,0.8);
  line-height: 1.7; max-width: 620px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px 0 40px;
  align-items: start;
}
@media (min-width: 768px) {
  .layout { grid-template-columns: 1fr 260px; }
}
@media (max-width: 767px) {
  .layout-side { order: 2; }
  .layout-main { order: 1; }
}

/* ============================================================
   SECTION CARD
   ============================================================ */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 12px;
}
.section-card:last-child { margin-bottom: 0; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-bottom: 2px solid var(--red);
  background: var(--gray-50);
}
.section-title {
  font-size: 14px; font-weight: 700; color: var(--red);
  display: flex; align-items: center; gap: 6px;
}

/* ============================================================
   ARTICLE BODY
   ============================================================ */
.article-body {
  padding: 14px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.75;
}
.article-body p { margin-bottom: 10px; }
.article-body p:last-child { margin-bottom: 0; }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body h3 {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin: 14px 0 8px; padding-left: 8px;
  border-left: 3px solid var(--orange);
}

/* ============================================================
   RANKING CARD（メイン：順位カード）
   ============================================================ */
.ranking-list {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rank-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.rank-card:hover { box-shadow: var(--shadow-md); }

.rank-card.rank-1 { border-color: var(--rank1); }
.rank-card.rank-2 { border-color: var(--rank2); }
.rank-card.rank-3 { border-color: var(--rank3); }

/* カードヘッダー */
.rank-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
}
.rank-card.rank-1 .rank-card-head { background: #fffaf0; border-bottom-color: #f0dea0; }
.rank-card.rank-2 .rank-card-head { background: #f8f8f8; border-bottom-color: #cccccc; }
.rank-card.rank-3 .rank-card-head { background: #fdf6f0; border-bottom-color: #e0c0a0; }

.rank-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: var(--text-muted);
}
.rank-card.rank-1  .rank-badge { background: var(--rank1); font-size: 16px; }
.rank-card.rank-2  .rank-badge { background: var(--rank2); }
.rank-card.rank-3  .rank-badge { background: var(--rank3); }
.rank-card.rank-top .rank-badge { background: var(--orange); }

.rank-card-icon { font-size: 26px; flex-shrink: 0; }
.rank-card-title-area { flex: 1; }
.rank-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
}
.rank-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.rank-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 2px;
}
.tag-beginner { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.tag-income   { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.tag-skill    { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.tag-popular  { background: #fce4ec; color: #880e4f; border: 1px solid #f48fb1; }
.tag-ai       { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ce93d8; }

/* カードボディ */
.rank-card-body {
  padding: 12px 14px;
}
.rank-card-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* スコア行 */
.rank-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
@media (max-width: 400px) {
  .rank-scores { grid-template-columns: repeat(3, 1fr); }
}
.rank-score-item {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px;
  text-align: center;
}
.rank-score-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
  white-space: nowrap;
}
.rank-score-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.rank-score-val.income { color: var(--orange); }

/* 始め方ヒント */
.rank-tips {
  background: var(--gray-50);
  border-radius: var(--r);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.65;
  border-left: 3px solid var(--orange);
}
.rank-tips-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 3px;
}

/* ============================================================
   PLATFORM TABLE（サービス比較）
   ============================================================ */
.table-outer { padding: 0 14px 14px; }
.table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 520px;
}
.compare-table caption {
  font-size: 11px; color: var(--text-muted);
  text-align: left; padding: 0 0 6px;
}
.compare-table th {
  background: var(--gray-100); padding: 8px 10px;
  font-weight: 700; text-align: left;
  border: 1px solid var(--border); color: var(--text);
  white-space: nowrap;
}
.compare-table td {
  padding: 8px 10px; border: 1px solid var(--border);
  color: var(--text-sub); vertical-align: top; line-height: 1.55;
}
.compare-table tr:nth-child(even) td { background: var(--gray-50); }
.compare-table .recommended td { background: #fff9e6; }
.compare-table .highlight { font-weight: 700; color: var(--orange); }

/* ============================================================
   NOTICE BOX
   ============================================================ */
.notice-box {
  margin: 0 14px 14px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 12px;
  line-height: 1.7;
}
.notice-box.info { background: #e3f2fd; border: 1px solid #90caf9; color: #1565c0; }
.notice-box.warn { background: #fff8e1; border: 1px solid #ffe082; color: #795548; }
.notice-box-title {
  font-weight: 700; margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px;
}

/* ============================================================
   CHECKLIST
   ============================================================ */
.checklist {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.checklist-item {
  display: flex; align-items: flex-start;
  gap: 8px; font-size: 13px;
  color: var(--text-sub); line-height: 1.55;
}
.checklist-item::before {
  content: '✔'; color: var(--orange);
  font-weight: 700; flex-shrink: 0; margin-top: 1px;
}

/* ============================================================
   STEP FLOW
   ============================================================ */
.step-flow { padding: 12px 14px; display: flex; flex-direction: column; gap: 0; }
.step-item { display: grid; grid-template-columns: 36px 1fr; gap: 0 12px; padding-bottom: 14px; }
.step-item:last-child { padding-bottom: 0; }
.step-num-col { display: flex; flex-direction: column; align-items: center; }
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--red); color: #fff;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; z-index: 1;
}
.step-connector { flex: 1; width: 2px; background: var(--border); margin-top: 4px; }
.step-item:last-child .step-connector { display: none; }
.step-content { padding-bottom: 4px; }
.step-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  line-height: 1.4; margin-bottom: 4px; padding-top: 4px;
}
.step-desc { font-size: 12px; color: var(--text-sub); line-height: 1.65; }

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list { padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; font-size: 13px; font-weight: 700;
  color: var(--text); cursor: pointer; list-style: none;
  background: var(--surface); gap: 8px;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::before {
  content: 'Q';
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 50%; flex-shrink: 0;
}
.faq-q::after {
  content: '▼'; font-size: 10px; color: var(--text-muted);
  flex-shrink: 0; transition: transform 0.2s;
}
details[open] .faq-q::after { transform: rotate(180deg); }
.faq-a {
  padding: 10px 12px; font-size: 13px; color: var(--text-sub);
  line-height: 1.7; background: var(--gray-50);
  border-top: 1px solid var(--border);
}

/* ============================================================
   DISCLAIMER BOX
   ============================================================ */
.disclaimer-box {
  padding: 10px 14px; font-size: 11px; color: var(--text-muted);
  line-height: 1.7; border: 1px solid var(--border);
  border-radius: var(--r); background: var(--surface); margin-bottom: 12px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-widget {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; margin-bottom: 12px;
}
.sidebar-widget:last-child { margin-bottom: 0; }
.sidebar-widget-head {
  padding: 8px 12px; background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--red);
  font-size: 13px; font-weight: 700; color: var(--text);
}
.sidebar-widget-head--warn { border-left-color: #c84f14; color: #c84f14; }
.sidebar-widget-body { padding: 10px 12px; }
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-list li {
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
  font-size: 12px; line-height: 1.5;
}
.related-list li:last-child { border-bottom: none; padding-bottom: 0; }
.related-list a { color: var(--link); }
.related-list a:hover { text-decoration: underline; }
.sidebar-toc { display: flex; flex-direction: column; gap: 4px; }
.sidebar-toc a {
  font-size: 12px; color: var(--link);
  padding: 4px 0; border-bottom: 1px solid var(--border);
  display: block; line-height: 1.5;
}
.sidebar-toc a:last-child { border-bottom: none; }
.sidebar-toc a:hover { text-decoration: underline; }
.sidebar-disclaimer { font-size: 11px; color: var(--text-muted); line-height: 1.7; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #222; color: #aaa; text-align: center;
  padding: 20px 16px; font-size: 12px; line-height: 1.8;
}
.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px 16px; margin-bottom: 8px;
}
.footer-links a { color: #aaa; }
.footer-links a:hover { color: #fff; text-decoration: none; }
