/* ============================================================
   クライアントポータル CSS - ナナコジャパン ブランドデザイン
   Brand Colors:
   Primary: #00a4b4 (シアン)
   Navy (Header/Footer): #1c2c40
   Text: #222222 / #444444
   Modern Design with Enhanced Interactivity
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Inter:wght@400;600;700;900&display=swap');

:root {
  /* デフォルト：従来のシアン＆ネイビー系テーマ */
  --c-brand:     #00a4b4; /* シアン */
  --c-brand-d:   #008a99; /* ディープシアン */
  --c-brand-lt:  #cbeff2; /* アイスシアン */
  --c-navy:      #1c2c40; /* ネイビー */
  --c-navy-d:    #121d2b;
  --c-navy-lt:   #3a4a5e;
  --c-accent:    #f59e0b; /* オレンジ/ゴールド */
  --c-accent-d:  #d97706;
  --c-accent-lt: #fffbeb;
  --c-success:   #059669;
  --c-danger:    #dc2626;
  --c-purple:    #8b5cf6;
  --c-indigo:    #6366f1;

  --c-bg:        #fafafa;
  --c-surface:   #ffffff;
  --c-border:    #e5e7eb;
  --c-text:      #222222;
  --c-text-light:#444444;
  --c-muted:     #666666;

  --radius:      8px;
  --radius-lg:   16px;
  --radius-xl:   16px;
  --sh-sm:       0 1px 3px rgba(0,0,0,0.06);
  --sh:          0 4px 12px rgba(28,44,64,0.06);
  --sh-lg:       0 12px 32px rgba(0,164,180,0.12);
  --sh-xl:       0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --sh-2xl:      0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --t:           0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max:         1080px;
}

.theme-nanacojapan, :root.theme-nanacojapan, html.theme-nanacojapan {
  /* ナナコジャパン合同会社専用：Vivid Blue / Indigo テーマ */
  --c-brand:     #3B82F6; /* ビビッドブルー */
  --c-brand-d:   #2563EB; /* ディープブルー */
  --c-brand-lt:  #DBEAFE; /* アイスブルー */
  --c-navy:      #1e1b4b; /* インディゴネイビー */
  --c-navy-d:    #0f0d2e;
  --c-navy-lt:   #3730a3;
  --c-accent:    #F59E0B; /* アンバー */
  --c-accent-d:  #D97706; /* ディープアンバー */
  --c-accent-lt: #FFFBEB; /* クリームアンバー */
  --c-success:   #10B981; /* エメラルド */
  --c-danger:    #EF4444; /* コーラル */
  --c-purple:    #8B5CF6; /* バイオレット */
  --c-indigo:    #6366F1; /* インディゴ */

  --c-bg:        #F9FAFB;
  --c-surface:   #FFFFFF;
  --c-border:    #E5E7EB;
  --c-text:      #111827;
  --c-text-light:#374151;
  --c-muted:     #6B7280;

  --radius:      12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --sh-sm:       0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --sh:          0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --sh-lg:       0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --sh-xl:       0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --sh-2xl:      0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --t:           0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max:         1280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body {
  font-family: 'Noto Sans JP', system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; transition: all var(--t); }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ── Header ── */
.site-header {
  background: var(--c-navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.theme-nanacojapan .site-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--c-border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.theme-nanacojapan .header-inner {
  padding: 1rem 2rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.theme-nanacojapan .header-logo {
  gap: 0.75rem;
  transition: transform var(--t);
}
.theme-nanacojapan .header-logo:hover {
  transform: scale(1.02);
}

.header-logo-icon {
  font-size: 1.1rem;
  color: var(--c-brand);
}
.theme-nanacojapan .header-logo-icon {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--c-brand), var(--c-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-logo-text {
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  letter-spacing: 0.05em;
}
.theme-nanacojapan .header-logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-text);
  letter-spacing: -0.01em;
}

.header-client {
  text-align: right;
}
.theme-nanacojapan .header-client {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.theme-nanacojapan .header-client > div {
  background: var(--c-brand-lt);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  border: 2px solid var(--c-border);
}

.header-client-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
}
.theme-nanacojapan .header-client-label {
  font-size: 0.7rem;
  color: var(--c-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-client strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}
.theme-nanacojapan .header-client strong {
  color: var(--c-text);
  font-size: 1rem;
  font-weight: 900;
  margin-top: 0.2rem;
}

/* ── Header Actions ── */
.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.header-actions a {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}
.header-actions a:hover {
  color: var(--c-brand);
}
.theme-nanacojapan .header-actions a {
  font-size: 0.85rem;
  color: var(--c-muted);
  text-decoration: none;
  transition: all var(--t);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: var(--c-surface);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--c-border);
  font-weight: 600;
  white-space: nowrap;
}
.theme-nanacojapan .header-actions a:hover {
  color: var(--c-brand-d);
  background: var(--c-brand-lt);
  border-color: var(--c-brand);
}

/* ── Nav ── */
.page-nav {
  background: var(--c-navy-lt);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: sticky;
  top: 58px; /* header height */
  z-index: 90;
}
.page-nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0.25rem;
}
.page-nav-inner::-webkit-scrollbar { display: none; }
.nav-link {
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav-link:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.05);
  border-bottom-color: rgba(255,255,255,0.3);
}
.nav-link-cta {
  color: var(--c-brand) !important;
  font-weight: 700;
}
.nav-link-cta:hover {
  background: rgba(0,164,180,0.1) !important;
  border-bottom-color: var(--c-brand);
}

/* ── Main ── */
.main-wrapper { padding: 2rem 0 4rem; }

.hero-section {
  background: var(--c-navy);
  color: #ffffff;
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,164,180,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner { max-width: 650px; margin: 0 auto; position: relative; z-index: 1; }
.hero-label {
  display: inline-block;
  background: rgba(0,164,180,0.15);
  border: 1px solid rgba(0,164,180,0.4);
  color: var(--c-brand);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 0.3rem 1.25rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.hero-title {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}
.hero-date {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 4px;
  background: rgba(0,0,0,0.2);
}

/* ── Section General ── */
.content-section {
  padding: 4rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
}
.section-inner { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.section-header { margin-bottom: 2.5rem; text-align: center; }
.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--c-brand-lt);
  color: var(--c-brand-d);
  border-radius: 50%;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--c-text);
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.section-desc { font-size: 0.88rem; color: var(--c-muted); line-height: 1.8; max-width: 800px; margin: 0 auto; }
.section-icon { font-size: 1.8rem; margin-bottom: 0.5rem; display: block; }

/* ── Current Contract Cards ── */
.contract-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contract-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--sh);
  border-top: 3px solid var(--c-brand-lt);
}
.contract-card-site { font-size: 0.7rem; color: var(--c-brand); font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.contract-card-service { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--c-text); }
.contract-card-hours { font-size: 0.8rem; color: var(--c-muted); margin-bottom: 0.75rem; }
.contract-card-fee { display: flex; align-items: baseline; gap: 0.25rem; }
.fee-amount { font-size: 1.4rem; font-weight: 900; color: var(--c-text); font-family: 'Inter', sans-serif; }
.fee-label { font-size: 0.75rem; color: var(--c-muted); }

.total-summary {
  background: var(--c-text);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.total-label { font-size: 0.85rem; font-weight: 700; opacity: 0.9; }
.total-amount { font-size: 1.8rem; font-weight: 900; font-family: 'Inter', sans-serif; color: var(--c-brand-lt); }
.total-unit { font-size: 0.75rem; opacity: 0.7; margin-left: 0.25rem; }

/* ── Plan Cards ── */
.mplan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.mplan-card {
  position: relative;
  cursor: pointer;
  border: 2px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  background: var(--c-surface);
  transition: all var(--t);
  box-shadow: var(--sh);
}
.mplan-card input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.mplan-card:hover { border-color: var(--c-brand-lt); box-shadow: var(--sh-lg); transform: translateY(-2px); }
.mplan-card.mplan-selected, .mplan-card:has(input:checked) {
  border-color: var(--c-brand);
  background: var(--c-brand-lt);
  box-shadow: 0 0 0 3px rgba(0,164,180,0.1), var(--sh-lg);
  transform: translateY(-2px);
}
.mplan-card.plan-card-custom { border-color: #fcd34d; background: #fffbeb; }
.mplan-card.plan-card-custom:hover, .mplan-card.plan-card-custom.mplan-selected {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.1), var(--sh-lg);
}

.mplan-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.mplan-icon { font-size: 1.25rem; }
.mplan-name { font-size: 1.05rem; font-weight: 800; color: var(--c-text); flex: 1; min-width: 0; }
.mplan-recommend {
  background: var(--c-brand);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.05em;
}
.mplan-custom-badge { background: var(--c-accent) !important; color: #fff !important; }

.mplan-fee { margin-bottom: 1.25rem; border-bottom: 1px solid var(--c-border); padding-bottom: 1.25rem; }
.mplan-fee-amount { font-size: 1.8rem; font-weight: 900; color: var(--c-text); font-family: 'Inter', sans-serif; line-height: 1; }
.mplan-card.plan-card-custom .mplan-fee-amount { color: var(--c-accent); }
.mplan-fee-tax { font-size: 0.75rem; color: var(--c-muted); margin-left: 0.2rem; }
.mplan-fee-in { display: block; font-size: 0.8rem; color: var(--c-muted); margin-top: 0.35rem; font-weight: 600; }
.mplan-fee-per { display: block; font-size: 0.75rem; color: var(--c-muted); margin-top: 0.2rem; }

.mplan-features { list-style: none; margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.mplan-features li { font-size: 0.85rem; color: var(--c-text); padding-left: 1.2rem; position: relative; line-height: 1.5; font-weight: 500; }
.mplan-features li::before { content: '✓'; position: absolute; left: 0; color: var(--c-brand); font-weight: 900; }

.mplan-meta { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.8rem; background: rgba(0,0,0,0.02); padding: 0.75rem; border-radius: var(--radius); }
.mplan-meta-item { display: flex; justify-content: space-between; align-items: center; }
.mplan-meta-label { color: var(--c-muted); }
.mplan-meta-val { font-weight: 700; color: var(--c-text); }

.mplan-custom-sites { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px dashed var(--c-border); font-size: 0.76rem; }
.psl-tag { background: var(--c-brand-lt); color: var(--c-brand-d); font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 99px; }

.mplan-check-mark { display: none; position: absolute; top: -10px; right: -10px; background: var(--c-brand); color: #fff; font-size: 0.65rem; font-weight: 800; padding: 0.25rem 0.6rem; border-radius: 99px; box-shadow: 0 2px 8px rgba(0,164,180,0.3); }
.mplan-card.mplan-selected .mplan-check-mark, .mplan-card:has(input:checked) .mplan-check-mark { display: block; }

/* ── Summary Bar ── */
.mplan-summary-bar {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: var(--sh-lg);
  position: sticky;
  bottom: 20px;
  z-index: 80;
}
.msb-info { flex: 1; min-width: 0; }
.msb-plan-label { font-size: 0.7rem; color: var(--c-brand); font-weight: 800; letter-spacing: 0.1em; margin-bottom: 0.3rem; text-transform: uppercase; }
.msb-plan-name { font-size: 1.1rem; font-weight: 900; color: var(--c-text); }
.msb-fee-detail { font-size: 0.8rem; color: var(--c-muted); margin-top: 0.25rem; font-weight: 500; }
.msb-action { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; flex-shrink: 0; }
.msb-annual { font-size: 0.75rem; color: var(--c-brand-lt); font-weight: 700; }
.msb-scroll-btn {
  background: var(--c-brand);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,164,180,0.3);
  transition: all var(--t);
  display: inline-flex;
  align-items: center;
}
.msb-scroll-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,164,180,0.4); color: #fff; background: var(--c-brand-d); }
.msb-none-note { font-size: 0.78rem; color: var(--c-muted); }

/* ── Minor Fix (軽微修正) ── */
.minor-fix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.minor-fix-box {
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--c-surface);
}
.minor-fix-included { border: 2px solid var(--c-success); box-shadow: 0 4px 20px rgba(5,150,105,0.08); }
.minor-fix-excluded { border: 2px solid var(--c-border); box-shadow: var(--sh); background: #fafafa; }
.mfb-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
  font-size: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--c-border);
}
.minor-fix-included .mfb-head { color: var(--c-success); }
.minor-fix-excluded .mfb-head { color: var(--c-muted); }
.mfb-icon { font-size: 1.2rem; }
.mfb-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.mfb-list li {
  font-size: 0.88rem;
  line-height: 1.6;
  padding-left: 1.4rem;
  position: relative;
  color: var(--c-text);
  font-weight: 500;
}
.minor-fix-included .mfb-list li::before { content: '✓'; position: absolute; left: 0; color: var(--c-success); font-weight: 900; }
.minor-fix-excluded .mfb-list li::before { content: '✕'; position: absolute; left: 0; color: var(--c-muted); font-weight: 900; }
.mfb-note {
  font-size: 0.8rem;
  line-height: 1.6;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  margin-top: auto;
  font-weight: 500;
}
.minor-fix-included .mfb-note { background: #ecfdf5; color: #065f46; }
.minor-fix-excluded .mfb-note { background: #f3f4f6; color: #4b5563; }

/* ── Note Box ── */
.note-box {
  background: #f8fafc;
  border-left: 4px solid var(--c-brand-lt);
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  color: var(--c-text);
  border-radius: 0 var(--radius) var(--radius) 0;
  line-height: 1.7;
}
.note-box p+p { margin-top: 0.5rem; }

/* ── Menu Table ── */
.menu-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--sh);
  border: 1px solid var(--c-border);
  margin-bottom: 1.5rem;
  background: var(--c-surface);
}
.menu-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.menu-table thead { background: var(--c-brand-lt); }
.menu-table th {
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.menu-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.menu-table tr:last-child td { border-bottom: none; }
.menu-table tr:hover td { background: var(--c-bg); }
.menu-table-name { font-weight: 800; color: var(--c-text); }
.menu-table-desc { font-size: 0.8rem; color: var(--c-muted); max-width: 250px; line-height: 1.6; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--c-muted); }
.price-col-in { font-weight: 900; color: var(--c-text); white-space: nowrap; font-family: 'Inter', sans-serif; font-size: 0.95rem; }
.rt-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
}
.rt-planning { background: #ede9fe; color: #5b21b6; }
.rt-design { background: #fce7f3; color: #9d174d; }
.rt-system { background: var(--c-brand-lt); color: var(--c-brand-d); }
.rt-simple { background: #f1f5f9; color: #475569; }

/* ── Approval ── */
.approval-list { display: flex; flex-direction: column; gap: 0.75rem; max-width: 800px; margin: 0 auto; }
.approval-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  gap: 1.25rem;
  box-shadow: var(--sh-sm);
}
.approval-info { flex: 1; min-width: 0; }
.approval-subject { font-weight: 800; font-size: 0.95rem; margin-bottom: 0.25rem; color: var(--c-text); }
.approval-meta { display: flex; gap: 0.85rem; font-size: 0.8rem; color: var(--c-muted); align-items: center; }
.approval-status { flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.7rem; font-weight: 800; white-space: nowrap; letter-spacing: 0.05em; }
.badge-blue { background: var(--c-brand-lt); color: var(--c-brand-d); }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-teal { background: #ccfbf1; color: #115e59; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* ── Timeline ── */
.flow-timeline { position: relative; padding-left: 2rem; max-width: 700px; margin: 0 auto; }
.flow-timeline::before { content: ''; position: absolute; left: 0.75rem; top: 0.5rem; bottom: 2rem; width: 2px; background: var(--c-border); }
.timeline-item { position: relative; padding: 0 0 2rem 1.5rem; }
.timeline-dot {
  position: absolute;
  left: -2.25rem;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--c-muted);
}
.timeline-completed .timeline-dot { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.timeline-in_progress .timeline-dot { background: var(--c-text); border-color: var(--c-text); color: #fff; box-shadow: 0 0 0 4px rgba(28,44,64,0.1); }
.timeline-title { font-weight: 800; font-size: 1rem; margin-bottom: 0.25rem; color: var(--c-text); }
.timeline-status { font-size: 0.75rem; color: var(--c-muted); font-weight: 600; }
.timeline-memo { font-size: 0.85rem; margin-top: 0.4rem; color: var(--c-text); background: var(--c-bg); padding: 0.75rem; border-radius: var(--radius); border: 1px solid var(--c-border); }
.timeline-date { font-size: 0.75rem; margin-top: 0.4rem; color: var(--c-muted); }
.timeline-completed .timeline-title { color: var(--c-brand-d); }

/* ── Apply Section ── */
.section-apply { background: var(--c-brand-lt); border: none; padding: 5rem 1.5rem; }
.apply-confirm-box {
  background: var(--c-surface);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.apply-confirm-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.apply-confirm-title { font-size: 1.6rem; font-weight: 900; color: var(--c-text); margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.apply-confirm-desc { font-size: 0.9rem; color: var(--c-muted); line-height: 1.8; margin-bottom: 2rem; }
.apply-confirm-checklist { text-align: left; margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.apply-check-label {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--t);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-text);
  border: 1px solid var(--c-border);
  background: var(--c-bg);
}
.apply-check-label:hover { background: #f1f5f9; border-color: #cbd5e1; }
.apply-check-label input[type=checkbox] { display: none; }
.apply-check-box {
  width: 24px;
  height: 24px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
  background: #fff;
}
.apply-check-label input:checked + .apply-check-box { background: var(--c-brand); border-color: var(--c-brand); animation: ckPop .3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.apply-check-label input:checked + .apply-check-box::after { content: '✓'; color: #fff; font-size: 0.9rem; font-weight: 900; }
.apply-check-label:has(input:checked) { color: var(--c-brand-d); border-color: var(--c-brand-lt); background: #f0fdfa; }
@keyframes ckPop { 0% { transform: scale(0.8); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
.apply-check-hint { font-size: 0.8rem; color: var(--c-muted); text-align: center; margin-bottom: 1.5rem; font-weight: 600; }

.apply-selected-summary {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}
.asm-label { font-size: 0.7rem; color: var(--c-muted); font-weight: 800; letter-spacing: 0.1em; margin-bottom: 0.4rem; text-transform: uppercase; }
.asm-plan-name { font-size: 1.1rem; font-weight: 900; color: var(--c-text); }
.asm-fee { font-size: 0.85rem; color: var(--c-brand-d); margin-top: 0.25rem; font-weight: 600; }

.apply-btn-wrap { text-align: center; }
.btn-apply-final {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-brand);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.05rem;
  padding: 1.1rem 2.5rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,164,180,0.3);
  transition: all var(--t);
  width: 100%;
  max-width: 420px;
  letter-spacing: 0.05em;
}
.btn-apply-final:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,164,180,0.4); color: #fff; background: var(--c-brand-d); }
.apply-btn-note { font-size: 0.8rem; color: var(--c-muted); margin-top: 0.85rem; font-weight: 500; }

/* ── Footer ── */
.site-footer {
  background: var(--c-surface);
  color: var(--c-muted);
  text-align: center;
  padding: 3rem 2rem;
  font-size: 0.85rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
  border-top: 2px solid var(--c-border);
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: var(--c-brand);
}
.footer-inner { max-width: var(--max); margin: 0 auto; position: relative; z-index: 1; }
.footer-company {
  font-weight: 900;
  color: var(--c-brand);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}
.footer-note {
  font-size: 0.8rem;
  color: var(--c-muted);
  margin-bottom: 0.75rem;
}
.footer-copy {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  opacity: 0.7;
}

/* ============================================================
   ダッシュボード専用スタイル（クライアントポータル）
   ============================================================ */

/* ── ダッシュボードヒーロー ── */
.dash-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 3rem;
  border-radius: var(--radius-xl);
  margin-bottom: 2.5rem;
  box-shadow: var(--sh-xl);
  position: relative;
  overflow: hidden;
}
.dash-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.dash-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
  letter-spacing: -0.025em;
  position: relative;
  z-index: 1;
}
.dash-hero p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}
.dash-hero .hero-date {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 0.6rem 1.4rem;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
}

/* ── お知らせセクション ── */
.notif-section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: var(--sh);
}
.notif-header {
  background: var(--c-brand-lt);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--c-border);
}
.notif-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.notif-icon {
  font-size: 1.3rem;
}
.notif-title h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0;
}
.notif-badge {
  background: var(--c-danger);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  min-width: 1.5rem;
  text-align: center;
  font-family: 'Inter', sans-serif;
}
.notif-all-link {
  font-size: 0.85rem;
  color: var(--c-brand-d);
  font-weight: 600;
  text-decoration: none;
}
.notif-all-link:hover {
  color: var(--c-brand);
}
.notif-list {
  display: flex;
  flex-direction: column;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
  text-decoration: none;
  transition: all var(--t);
  position: relative;
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item:hover {
  background: var(--c-bg);
}
.notif-item.unread {
  background: var(--c-brand-lt);
}
.notif-item.unread:hover {
  background: #E0F2FE;
}
.notif-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--c-border);
  flex-shrink: 0;
  margin-top: 0.3rem;
}
.notif-item.unread .notif-dot {
  background: var(--c-brand);
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}
.notif-content {
  flex: 1;
}
.notif-subject {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.5;
  margin-bottom: 0.25rem;
}
.notif-item.unread .notif-subject {
  font-weight: 700;
}
.notif-meta {
  font-size: 0.75rem;
  color: var(--c-muted);
  font-weight: 500;
}

/* ── 統計カード ── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.dash-stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  box-shadow: var(--sh);
  transition: all var(--t);
  position: relative;
  overflow: hidden;
}
.dash-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c-brand), var(--c-indigo));
  transform: scaleX(0);
  transition: transform var(--t);
}
.dash-stat-card:hover {
  box-shadow: var(--sh-lg);
  transform: translateY(-4px);
}
.dash-stat-card:hover::before {
  transform: scaleX(1);
}
.dash-stat-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  filter: grayscale(0.2);
  transition: filter var(--t);
}
.dash-stat-card:hover .dash-stat-icon {
  filter: grayscale(0);
}
.dash-stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--c-brand), var(--c-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Inter', sans-serif;
  line-height: 1.1;
  margin: 0.5rem 0;
}
.dash-stat-label {
  font-size: .85rem;
  color: var(--c-muted);
  margin-top: .5rem;
  font-weight: 600;
}

/* ── セクションカード ── */
.dash-section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: var(--sh);
}
.dash-section-header {
  background: linear-gradient(135deg, var(--c-brand-lt) 0%, rgba(99, 102, 241, 0.24) 100%);
  padding: 1.25rem 1.75rem 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--c-border);
  border-left: 5px solid var(--c-brand);
}
.dash-section-header h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--c-navy);
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--c-brand);
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: 100px;
  padding: .6rem 1.2rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--t);
  box-shadow: var(--sh-sm);
  position: relative;
  overflow: hidden;
}
.btn-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c-brand), var(--c-indigo));
  opacity: 0;
  transition: opacity var(--t);
}
.btn-pill:hover {
  border-color: var(--c-brand);
  box-shadow: var(--sh);
  transform: translateY(-1px);
}
.btn-pill:hover::before {
  opacity: 0.1;
}
.dash-section-body {
  padding: 1.5rem;
  font-size: .9rem;
  color: var(--c-text);
  line-height: 1.7;
}

/* ── 依頼リスト ── */
.request-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  gap: 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--sh-sm);
  transition: all var(--t);
  flex-wrap: nowrap;
  text-decoration: none;
  color: inherit;
}
.request-item:hover {
  border-color: var(--c-brand);
  background: var(--c-brand-lt);
  transform: translateY(-1.5px);
  box-shadow: var(--sh);
}
.request-item:last-child { margin-bottom: 0; }
.request-info {
  flex: 1;
  min-width: 0;
}
.request-subject {
  font-weight: 700;
  color: var(--c-text);
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.request-date {
  font-size: .75rem;
  color: var(--c-muted);
  margin-top: 0.25rem;
}

/* ── バッジ（重複削除済み） ── */

/* ── 契約プラン ── */
.plan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.plan-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 0;
}
.plan-fee {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-brand-d);
  font-family: 'Inter', sans-serif;
}
.plan-fee small {
  font-size: .75rem;
  color: var(--c-muted);
  font-weight: 500;
}
.plan-meta {
  font-size: .8rem;
  color: var(--c-muted);
  margin-top: .5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .85rem;
  background: var(--c-brand-lt);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-brand-d);
  margin-right: .5rem;
  margin-top: .5rem;
  box-shadow: var(--sh-sm);
}

/* ── クイックリンク ── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.quick-link {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.75rem;
  background: var(--c-surface);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--t);
  box-shadow: var(--sh);
  position: relative;
  overflow: hidden;
}
.quick-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c-brand-lt) 0%, var(--c-accent-lt) 100%);
  opacity: 0;
  transition: opacity var(--t);
  z-index: 0;
}
.quick-link:hover {
  border-color: var(--c-brand);
  box-shadow: var(--sh-lg);
  transform: translateY(-2px);
}
.quick-link:hover::before {
  opacity: 1;
}
.quick-link > * {
  position: relative;
  z-index: 1;
}
.quick-link-icon {
  font-size: 3rem;
  flex-shrink: 0;
  transition: transform var(--t);
}
.quick-link:hover .quick-link-icon {
  transform: scale(1.1) rotate(-5deg);
}
.quick-link h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-text);
  margin: 0 0 .4rem;
}
.quick-link p {
  font-size: .9rem;
  color: var(--c-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── ニュース ── */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.news-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--c-border);
  transition: all var(--t);
  position: relative;
  padding-left: 1rem;
}
.news-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: linear-gradient(135deg, var(--c-brand), var(--c-indigo));
  border-radius: 2px;
  transition: height var(--t);
}
.news-item:hover::before {
  height: 60%;
}
.news-item:hover {
  background: var(--c-brand-lt);
  padding-left: 1.25rem;
}
.news-item:last-child { border-bottom: none; }
.news-item a {
  color: var(--c-text);
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.6;
  display: block;
  transition: all var(--t);
}
.news-item a::after {
  content: ' ↗';
  font-size: 0.75rem;
  color: var(--c-brand);
  opacity: 0.6;
  display: inline-block;
  margin-left: 0.25rem;
  transition: opacity var(--t), transform var(--t);
}
.news-item a:hover {
  color: var(--c-brand);
}
.news-item a:hover::after {
  opacity: 1;
  transform: translate(1px, -1px);
}
.news-meta {
  font-size: .72rem;
  color: var(--c-muted);
  margin-top: .35rem;
  font-weight: 400;
  opacity: 0.85;
}

/* ── アナリティクス用スタイル ── */
.kpi-period {
  font-size: .8rem;
  color: var(--c-muted);
  font-weight: 700;
  margin-bottom: 1rem;
}

.kpi-row {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--c-brand-lt) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--sh);
}
.kpi-item { flex: 1; }
.kpi-item label {
  display: block;
  font-size: .75rem;
  color: var(--c-muted);
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 0.5rem;
}
.kpi-item .num {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--c-brand-d);
  font-family: 'Inter', sans-serif;
}
.kpi-guide {
  font-size: .7rem;
  color: var(--c-muted);
  margin-top: .3rem;
  font-weight: 500;
}
.data-guide {
  font-size: .85rem;
  color: var(--c-text);
  background: var(--c-brand-lt);
  padding: .75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  line-height: 1.6;
  border-left: 3px solid var(--c-brand);
}

/* ── 4分割グリッド ── */
.four-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.mini-stat {
  text-align: center;
  padding: 1.2rem 1rem;
  background: var(--c-surface);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  box-shadow: var(--sh-sm);
}
.mini-stat-val {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--c-brand-d);
  font-family: 'Inter', sans-serif;
}
.mini-stat-label {
  font-size: .75rem;
  color: var(--c-muted);
  font-weight: 600;
  margin-top: 0.5rem;
}
.mini-stat-guide {
  font-size: .7rem;
  color: var(--c-muted);
  margin-top: .4rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ── 2カラムレイアウト ── */
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ── 分析ブロック ── */
.a-block {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--c-surface);
  box-shadow: var(--sh);
}
.a-block-head {
  background: linear-gradient(135deg, var(--c-brand-lt) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-bottom: 1px solid var(--c-border);
  padding: 1rem 1.5rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.a-block-body {
  padding: 1.5rem;
}

/* ── 人気ページリスト ── */
.plist {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  padding: .3rem 0;
  font-size: .8rem;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.2s ease;
}
.plist:hover {
  background: var(--c-bg);
  margin: 0 -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 4px;
}
.plist:last-child { border-bottom: none; }
.plist .rk {
  color: var(--c-brand);
  font-weight: 900;
  min-width: 1.2rem;
}
.plist .tt {
  flex: 1;
  font-weight: 600;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plist .pv {
  font-weight: 700;
  color: var(--c-muted);
  flex-shrink: 0;
  font-size: .75rem;
  font-family: 'Inter', sans-serif;
}

/* ── 検索クエリリスト ── */
.query-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.query-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.query-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--c-bg);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  transition: all var(--t);
}
.query-item:hover {
  background: var(--c-brand-lt);
  border-color: var(--c-brand);
  transform: translateX(4px);
}
.query-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, var(--c-brand), var(--c-indigo));
  color: white;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}
.query-content {
  flex: 1;
  min-width: 0;
}
.query-keyword {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.query-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--c-muted);
}
.query-clicks {
  font-weight: 600;
  color: var(--c-brand);
  font-family: 'Inter', sans-serif;
}
.query-stats {
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

@media (max-width: 768px) {
  .query-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 地域リスト（男女比付き） ── */
.rg-item {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .4rem 0;
  font-size: .75rem;
  border-bottom: 1px solid #f5f5f5;
}
.rg-item:last-child { border-bottom: none; }
.rg-header {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.rg-num {
  font-weight: 900;
  color: var(--c-brand);
  min-width: 2.5rem;
  text-align: right;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
}
.rg-name {
  font-weight: 600;
  color: var(--c-text);
  flex: 1;
}
.gender-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-left: 2.5rem;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}
.gender-male { background: #3B82F6; }
.gender-female { background: #EC4899; }
.gender-other { background: #94A3B8; }
.gender-legend {
  display: flex;
  gap: .75rem;
  margin-left: 2.5rem;
  font-size: .65rem;
  color: var(--c-muted);
  margin-top: 0.2rem;
}
.gender-legend-item {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.gender-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.region-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-left: 2.5rem;
  background: var(--c-bg-alt, #f1f5f9);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}
.region-bar-fill {
  background: var(--c-brand, #3B82F6);
  height: 100%;
  border-radius: 4px;
}
.region-legend {
  display: flex;
  justify-content: space-between;
  margin-left: 2.5rem;
  font-size: .65rem;
  color: var(--c-muted);
  margin-top: 0.2rem;
}

/* ── 円グラフ ── */
.pie-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  padding: 1rem 0;
}
.pie {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  transition: all 0.4s ease;
}
.pie:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 40px rgba(0,212,255,0.3);
}
.pie-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 50%;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
}
.pie-legend {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.pie-legend-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--c-text);
  min-width: 6rem;
  transition: all 0.3s ease;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
}
.pie-legend-item:hover {
  transform: translateX(5px);
  background: rgba(0,212,255,0.05);
}
.pie-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.pie-legend-val {
  font-weight: 900;
  color: var(--c-brand);
  margin-left: auto;
  font-family: 'Inter', sans-serif;
}

/* ── 横棒グラフ ── */
.ibar-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
  font-size: .8rem;
  transition: all 0.3s ease;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
}
.ibar-row:hover {
  background: rgba(0,212,255,0.05);
  transform: translateX(3px);
}
.ibar-label {
  min-width: 4.5rem;
  font-weight: 700;
  color: var(--c-text);
}
.ibar-track {
  flex: 1;
  height: 12px;
  background: linear-gradient(135deg, #edf0f4 0%, #e2e8f0 100%);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.08);
}
.ibar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
}
.ibar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.ibar-val {
  min-width: 3rem;
  text-align: right;
  font-weight: 900;
  color: var(--c-brand);
  font-size: .75rem;
  font-family: 'Inter', sans-serif;
}

/* ── 12ヶ月推移グラフ ── */
.dual-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 140px;
  padding: 0 1rem;
  background: linear-gradient(to top, rgba(0,117,194,0.05) 0%, transparent 100%);
  border-radius: var(--radius);
}
.dual-bar-group {
  flex: 1;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 100%;
}
.dual-bar {
  flex: 1;
  border-radius: 6px 6px 0 0;
  min-width: 5px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: .85;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.12);
  position: relative;
  overflow: hidden;
}
.dual-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
}
.dual-bar:hover {
  opacity: 1;
  transform: scaleY(1.08) scaleX(1.1);
  box-shadow: 0 -4px 15px rgba(0,117,194,0.4);
  z-index: 10;
}
.dual-labels {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  text-align: center;
  font-size: .7rem;
  color: var(--c-muted);
  margin-top: 8px;
  padding: 0 1rem;
  font-weight: 700;
}
.dual-values {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  margin-top: 8px;
  text-align: center;
  font-size: .58rem;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  padding: 0 1rem;
}
.dual-values .dv-pv {
  color: var(--c-brand);
}
.dual-values .dv-uu {
  color: var(--c-accent);
}
.dual-legend {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: .75rem;
  font-weight: 800;
}
.dual-legend span {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0.4rem 1rem;
  background: var(--c-surface);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  border: 2px solid var(--c-border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.dl-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ── 時間帯グラフ ── */
.hour-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 50px;
}
.hour-bar {
  flex: 1;
  background: var(--c-brand);
  border-radius: 2px 2px 0 0;
  opacity: .7;
  min-width: 3px;
  transition: all 0.2s ease;
  box-shadow: 0 -1px 2px rgba(0,0,0,0.1);
}
.hour-bar:hover {
  opacity: 1;
  transform: scaleY(1.1);
}
.hour-labels {
  display: flex;
  justify-content: space-between;
  font-size: .55rem;
  color: var(--c-muted);
  margin-top: 3px;
  font-weight: 600;
}

/* ── 曜日グラフ ── */
.day-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  font-size: .75rem;
  margin-bottom: .25rem;
}
.day-name {
  min-width: 1.8rem;
  font-weight: 700;
  color: var(--c-muted);
}
.day-bar-track {
  flex: 1;
  height: 12px;
  background: #edf0f4;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}
.day-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--c-brand);
  transition: width 0.5s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.day-val {
  min-width: 3rem;
  text-align: right;
  font-weight: 800;
  color: var(--c-text);
  font-size: .7rem;
  font-family: 'Inter', sans-serif;
}

/* ── Responsive ── */
@media(max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: 1rem; }
  .four-col { grid-template-columns: 1fr; }
  .kpi-row { flex-direction: column; gap: 1rem; padding: 1.25rem; }
  .news-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-title { font-size: 1.6rem; }

  .content-section { padding: 3rem 1rem; }
  .section-title { font-size: 1.35rem; }
  .mplan-grid { grid-template-columns: 1fr; }
  .mplan-summary-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .msb-action { align-items: center; }
  .msb-scroll-btn { width: 100%; justify-content: center; }
  .apply-confirm-box { padding: 2rem 1.25rem; }
  .minor-fix-grid { grid-template-columns: 1fr; }
  .total-summary { flex-direction: column; gap: 0.5rem; text-align: center; }
  .form-row { flex-direction: column; }
  .form-row .col-6 { width: 100%; }
  .checkbox-grid { grid-template-columns: 1fr; }
}
@media(max-width: 480px) {
  .hero-title { font-size: 1.4rem; }
  .mplan-fee-amount { font-size: 1.6rem; }
  .header-logo-text { display: none; }
}

/* ============================================================
   フォーム共通スタイル（作業依頼フォーム等）
   ============================================================ */
.estimate-form {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--sh);
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: 0.5rem;
}
.form-label .required {
  color: var(--c-danger);
  font-size: 0.85rem;
}
.form-control {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-bg);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
  line-height: 1.5;
}
.form-control:focus {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(0,164,180,0.1);
  background: #fff;
}
textarea.form-control {
  resize: vertical;
  min-height: 120px;
}
.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-row .col-6 {
  flex: 1;
  min-width: 0;
}

/* ── Checkbox Grid ── */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.5rem;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--c-bg);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--t);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-text);
  position: relative;
}
.checkbox-label:hover {
  border-color: var(--c-brand-lt);
  background: #f0fdfa;
}
.checkbox-label:has(input:checked) {
  border-color: var(--c-brand);
  background: var(--c-brand-lt);
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--c-brand);
  flex-shrink: 0;
}
.check-price {
  margin-left: auto;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--c-text);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.check-price small {
  font-size: 0.7rem;
  color: var(--c-muted);
  font-weight: 600;
}
.check-menu-name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.check-hours {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--c-brand-lt);
  color: var(--c-brand-d);
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 4px;
  white-space: nowrap;
}
.check-price-quote {
  color: #b45309 !important;
  font-size: 0.72rem !important;
  font-style: normal;
  font-weight: 700 !important;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
  min-width: 5.5em;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 800;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
}
.btn-cta {
  background: var(--c-brand);
  color: #fff;
  font-size: 1rem;
  padding: 1rem 2rem;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,164,180,0.25);
  letter-spacing: 0.05em;
}
.btn-cta:hover {
  background: var(--c-brand-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,164,180,0.35);
  color: #fff;
}
.btn-block {
  display: flex;
  width: 100%;
  margin-top: 1rem;
}

/* ── Alert ── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
}
.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-color: #a7f3d0;
}
.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

/* ============================================================
   ポータルナビ共通スタイル
   ============================================================ */
.portal-nav {
  background: #fff;
  border-bottom: 2px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.portal-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  padding: 0 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.portal-nav-inner::-webkit-scrollbar { display: none; }
.portal-nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c-muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}
.portal-nav-link:hover {
  color: var(--c-brand);
  background: #f8fafc;
}
.portal-nav-link.active {
  color: var(--c-brand);
  border-bottom-color: var(--c-brand);
}
.portal-nav-icon { font-size: 1rem; }


/* AIアドバイザー専用の追加スタイル */
.ai-advisor .dash-section-header { display: flex; justify-content: space-between; align-items: center; }
.ai-tabs { display: flex; gap: 0.5rem; padding: 1rem 1.25rem 0; border-bottom: 1px solid var(--c-border); overflow-x: auto; }
.ai-tab { background: none; border: none; padding: 0.5rem 1rem; cursor: pointer; font-weight: 600; color: var(--c-muted); border-bottom: 2px solid transparent; white-space: nowrap; transition: all 0.2s; }
.ai-tab.active { color: var(--c-brand); border-bottom-color: var(--c-brand); }
.ai-tab:hover:not(.active) { color: var(--c-text); background: var(--c-bg); border-radius: 4px 4px 0 0; }
.ai-feed-container { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; max-height: 500px; overflow-y: auto; }
.ai-feed-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--sh-sm); }
.ai-feed-card.priority-high { border-left: 4px solid var(--c-danger); }
.ai-feed-card.priority-medium { border-left: 4px solid var(--c-accent); }
.ai-feed-card.priority-low { border-left: 4px solid var(--c-success); }
.ai-feed-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--c-muted); }
.ai-feed-title { font-weight: 700; color: var(--c-text); font-size: 1rem; margin-bottom: 0.5rem; }
.ai-feed-content { font-size: 0.9rem; color: var(--c-text-light); line-height: 1.5; }
.ai-tab-badge { background: var(--c-danger); color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 99px; margin-left: 0.25rem; }
