/* ============================================================
   DESIGN TOKENS — rakusiru-finance 準拠
   ============================================================ */
: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;
  --shadow:    0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --r:    3px;
  --r-md: 6px;
}

/* ============================================================
   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);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
: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; color: rgba(255,255,255,0.9); }
.logo span {
  font-size: 11px;
  font-weight: 400;
  display: block;
  margin-top: 2px;
  color: rgba(255,255,255,0.8);
}
.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);
  transition: background 0.15s;
}
.header-btn:hover { background: rgba(255,255,255,0.25); }
.header-btn.primary { background: #fff; color: var(--red); font-weight: 700; }
.header-btn.primary:hover { background: #f5f5f5; }

.search-bar { background: #b84400; 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;
  font-family: var(--font);
  outline: none;
}
.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;
  font-family: var(--font);
  white-space: nowrap;
  transition: background 0.15s;
}
.search-inner button:hover { background: #e55a00; }

/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.nav-bar {
  background: #222;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-bar::-webkit-scrollbar { display: none; }
.nav-item {
  color: #ddd;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  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;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--link); }
.breadcrumb a:hover { text-decoration: underline; }

/* ============================================================
   HERO — 海外テーマ: 深海ブルー〜エメラルドグリーン
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #005f8f 0%, #003d5c 50%, #007a6e 100%);
  color: #fff;
  padding: 28px 0;
}
.hero-inner { max-width: 700px; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}
.hero-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}
.hero-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.88);
  line-height: 1.7;
  max-width: 560px;
}
@media (max-width: 479px) {
  .hero { padding: 20px 0; }
  .hero-title { font-size: 22px; }
  .hero-desc { font-size: 12px; }
}

/* ============================================================
   CHECK BANNER — 4大チェックポイント
   ============================================================ */
.check-banner {
  background: #005f8f;
  color: #fff;
  padding: 10px 0;
}
.check-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.check-label {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.check-items {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.check-item {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--r-md);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}
@media (max-width: 479px) {
  .check-inner { gap: 8px; }
  .check-label { font-size: 11px; }
  .check-item { padding: 5px 8px; font-size: 10px; }
}

/* ============================================================
   USE-CASE TABS
   ============================================================ */
.use-tabs-wrapper {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 88px;
  z-index: 90;
}
.use-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.use-tabs::-webkit-scrollbar { display: none; }
.use-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -2px;
}
.use-tab:hover { color: var(--red); }
.use-tab[aria-selected="true"] {
  color: var(--red);
  border-bottom-color: var(--red);
  font-weight: 700;
}
@media (max-width: 479px) {
  .use-tab { padding: 9px 12px; font-size: 12px; }
}

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

/* ============================================================
   SECTION CARD
   ============================================================ */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.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);
  margin: 0;
  line-height: inherit;
}
.section-more {
  font-size: 12px;
  color: var(--link);
  cursor: pointer;
  white-space: nowrap;
}
.section-more:hover { text-decoration: underline; }
.update-date { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   USE PANEL
   ============================================================ */
.use-panel { display: flex; flex-direction: column; gap: 12px; }
.use-panel[hidden] { display: none; }

.use-intro-body {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-sub);
}
.use-intro-body strong { color: var(--text); }

/* ============================================================
   NEEDS GRID
   ============================================================ */
.use-needs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  padding: 12px 14px;
}
.need-item {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  text-align: center;
}
.need-icon { font-size: 22px; margin-bottom: 4px; }
.need-label { font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.need-desc { font-size: 10px; color: var(--text-muted); line-height: 1.4; }

/* ============================================================
   CARD RANKING LIST
   ============================================================ */
.card-ranking { display: flex; flex-direction: column; }
.card-item {
  padding: 14px;
  border-bottom: 1px solid var(--gray-100);
  position: relative;
}
.card-item:last-child { border-bottom: none; }
.card-item.rank-1 { background: #fffaf0; }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.rank-1 .rank-badge { background: #d4a000; }
.rank-2 .rank-badge { background: #888888; }
.rank-3 .rank-badge { background: #c07850; }

.card-info {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.card-visual { flex-shrink: 0; }
.card-img {
  width: 100px;
  height: 64px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  position: relative;
}
.card-img::before {
  content: '✈️';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
}
.card-img--teal   { background: linear-gradient(135deg, #006d7a, #004a54); }
.card-img--blue   { background: linear-gradient(135deg, #005f8f, #003d5c); }
.card-img--green  { background: linear-gradient(135deg, #1a6b3c, #0d4a27); }
.card-img--orange { background: linear-gradient(135deg, #cc5500, #994400); }
.card-img--gold   { background: linear-gradient(135deg, #b8860b, #8b6914); }
.card-img--purple { background: linear-gradient(135deg, #4b0082, #2d004e); }
.card-img--navy   { background: linear-gradient(135deg, #00246b, #001242); }
.card-img--red    { background: linear-gradient(135deg, #aa0000, #770000); }

.card-details { flex: 1; min-width: 0; }
.card-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.card-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}
.tag-free     { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.tag-point    { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.tag-security { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.tag-pay      { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ce93d8; }
.tag-travel   { background: #e8eaf6; color: #283593; border: 1px solid #9fa8da; }
.tag-gold     { background: #fffde7; color: #f57f17; border: 1px solid #fff176; }
.tag-premium  { background: #212121; color: #ffd700; border: 1px solid #ffd700; }
.tag-family   { background: #fce4ec; color: #880e4f; border: 1px solid #f48fb1; }

.card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.stat-item { display: flex; flex-direction: column; }
.stat-label { font-size: 10px; color: var(--text-muted); }
.stat-value { font-size: 13px; font-weight: 600; color: var(--text); }
.stat-value.highlight { color: var(--red); }

.card-merit {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.65;
  background: var(--gray-50);
  border-left: 3px solid var(--red);
  padding: 6px 10px;
  margin-bottom: 10px;
  border-radius: 0 var(--r) var(--r) 0;
}
.card-merit strong { color: var(--text); }

.btn-apply {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--r);
  text-decoration: none;
  transition: background 0.15s;
}
.btn-apply:hover { background: #e55a00; text-decoration: none; color: #fff; }

@media (max-width: 479px) {
  .card-info { flex-direction: column; }
  .card-img { width: 100%; height: 80px; }
  .card-name { font-size: 15px; }
  .card-stats { gap: 8px; }
}

/* ============================================================
   COMPARISON TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 560px;
}
.compare-table caption {
  font-size: 11px;
  color: var(--text-muted);
  text-align: left;
  padding: 6px 10px 4px;
  caption-side: top;
}
.compare-table th {
  background: #f0f0f0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  color: var(--text);
}
.compare-table td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  vertical-align: middle;
}
.compare-table tr.recommended td { background: #fff9e6; }
.compare-table tr:hover td { background: var(--gray-50); }
.compare-table .highlight { color: var(--red); font-weight: 700; }

/* ============================================================
   TIPS
   ============================================================ */
.tips-body { padding: 4px 0; }
.tip-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.tip-item:last-child { border-bottom: none; }
.tip-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.tip-content h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.tip-content p { font-size: 12px; color: var(--text-sub); line-height: 1.65; }

/* ============================================================
   KNOWLEDGE GRID
   ============================================================ */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.knowledge-item {
  background: var(--surface);
  padding: 14px;
}
.knowledge-icon { font-size: 24px; margin-bottom: 6px; }
.knowledge-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.knowledge-desc {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { padding: 4px 0; }
.faq-item { border-bottom: 1px solid var(--gray-100); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  transition: background 0.15s;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::before {
  content: 'Q';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.faq-q::after {
  content: '▼';
  margin-left: auto;
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
}
details[open] .faq-q::after { transform: rotate(-180deg); }
.faq-item:hover .faq-q { background: var(--gray-50); }
.faq-a {
  padding: 10px 14px 14px 44px;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.75;
  background: var(--gray-50);
}

/* ============================================================
   DISCLAIMER
   ============================================================ */
.disclaimer-box {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px 14px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.sidebar-widget-head {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--gray-50);
  border-bottom: 2px solid var(--red);
  border-left: 3px solid var(--red);
}
.sidebar-widget-head--warn { border-color: #c84f14; }
.sidebar-widget-body { padding: 10px 12px; }

/* Use-case selector */
.use-selector { display: flex; flex-direction: column; gap: 1px; }
.use-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
  transition: color 0.15s;
  border-radius: var(--r);
}
.use-link:last-child { border-bottom: none; }
.use-link::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.use-link:hover, .use-link.active {
  color: var(--red);
  text-decoration: none;
}
.use-link.active::before { background: var(--red); }

/* Rank list */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item { display: flex; align-items: center; gap: 8px; }
.rank-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rank-num.rank-1 { background: #d4a000; color: #fff; }
.rank-num.rank-2 { background: #888888; color: #fff; }
.rank-num.rank-3 { background: #c07850; color: #fff; }
.rank-name { flex: 1; font-size: 12px; color: var(--text); font-weight: 500; }
.rank-tag {
  font-size: 10px;
  padding: 1px 6px;
  background: #e8eaf6;
  color: #283593;
  border-radius: 20px;
  white-space: nowrap;
}
.rank-tag--premium { background: #fffde7; color: #f57f17; }

/* Fee table (sidebar) */
.fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.fee-table caption {
  font-size: 10px;
  color: var(--text-muted);
  text-align: left;
  padding-bottom: 4px;
}
.fee-table th {
  background: var(--gray-100);
  padding: 5px 8px;
  border: 1px solid var(--border);
  font-weight: 700;
  text-align: left;
}
.fee-table td {
  padding: 5px 8px;
  border: 1px solid var(--border);
}
.fee-low  { color: #2e7d32; font-weight: 700; }
.fee-mid  { color: #e65100; font-weight: 700; }
.fee-high { color: var(--text-muted); }

/* Related list */
.related-list { display: flex; flex-direction: column; }
.related-list li { border-bottom: 1px solid var(--gray-100); }
.related-list li:last-child { border-bottom: none; }
.related-list a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px;
  font-size: 12px;
  color: var(--text);
  transition: color 0.15s;
}
.related-list a::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}
.related-list a:hover { color: var(--link); text-decoration: none; }

.sidebar-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.75;
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
  .use-tabs-wrapper { top: 76px; }
  .layout-side {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}
@media (max-width: 479px) {
  .use-tabs-wrapper { top: 72px; }
  .layout-side { grid-template-columns: 1fr; }
  .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
  .compare-table { font-size: 11px; }
  .check-banner { display: none; }
}
