/* ===================================================
   歯科経営コンパス — CSS Design System
   =================================================== */

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

/* ---------- Design Tokens ---------- */
:root {
  --navy:        #0d2137;
  --navy-light:  #1a3a5c;
  --navy-soft:   #243f5c;
  --teal:        #00c9a7;
  --teal-dark:   #00a47e;
  --gold:        #c9a84c;
  --gold-light:  #e8c97a;
  --white:       #ffffff;
  --off-white:   #f5f7fa;
  --gray-50:     #f8f9fb;
  --gray-100:    #f0f2f5;
  --gray-200:    #e4e8ee;
  --gray-400:    #9aa5b4;
  --gray-600:    #637282;
  --gray-800:    #2d3748;
  --text:        #1a2332;
  --text-muted:  #637282;

  --ease-smooth: cubic-bezier(0.21, 0.51, 0.51, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-sharp:  cubic-bezier(0.77, 0, 0.175, 1);

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  --shadow-sm:  0 2px 8px rgba(13,33,55,0.08);
  --shadow:     0 8px 32px rgba(13,33,55,0.12);
  --shadow-lg:  0 20px 60px rgba(13,33,55,0.18);
  --shadow-teal: 0 8px 32px rgba(0,201,167,0.25);

  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: 'Noto Serif JP', serif;
  font-feature-settings: 'palt';
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.75rem, 3vw + 0.5rem, 3rem);
  color: var(--navy);
  margin-bottom: 1rem;
}
.section-desc {
  font-size: clamp(0.95rem, 1.5vw + 0.3rem, 1.1rem);
  color: var(--text-muted);
  max-width: 640px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
}
.section { padding-block: clamp(4rem, 8vw, 7rem); }

/* ---------- Custom Cursor ---------- */
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--teal);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.3s var(--ease-spring), height 0.3s var(--ease-spring), background 0.3s;
  mix-blend-mode: normal;
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(0,201,167,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease-smooth), height 0.4s var(--ease-smooth), opacity 0.3s;
}
.cursor.is-hover { width: 18px; height: 18px; background: var(--gold); }
.cursor-ring.is-hover { width: 56px; height: 56px; opacity: 0.5; }
@media (hover: none) { .cursor, .cursor-ring { display: none; } }

/* ---------- Page Loader ---------- */
.loader {
  position: fixed; inset: 0;
  background: var(--navy);
  z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 2rem;
}
.loader-logo {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: 0.1em;
  opacity: 0;
}
.loader-bar-wrap {
  width: 200px; height: 2px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  border-radius: 2px;
  transition: width 0.05s linear;
}
.loader.is-done { pointer-events: none; }

/* ---------- Noise Texture ---------- */
.noise::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1000;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
.header.scrolled {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
}
.logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: 'Noto Serif JP', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.nav-list {
  display: flex; align-items: center; gap: 0.25rem;
}
.nav-list a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}
.nav-list a:hover { background: var(--gray-100); color: var(--teal-dark); }
.nav-cta {
  background: var(--navy) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: var(--radius-sm) !important;
  transition: background 0.2s, transform 0.2s !important;
}
.nav-cta:hover { background: var(--navy-light) !important; transform: translateY(-1px); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after { content: ' ▾'; font-size: 0.7rem; opacity: 0.6; }
.dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  width: 720px;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
}
.nav-dropdown:hover .dropdown-menu { display: grid; }
.dropdown-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--gray-800);
  transition: background 0.2s;
}
.dropdown-item:hover { background: var(--gray-50); color: var(--teal-dark); }
.dropdown-item .di-icon {
  width: 28px; height: 28px;
  background: var(--gray-100);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Hamburger */
.hamburger {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.hamburger:hover { background: var(--gray-100); }
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-smooth), opacity 0.3s;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: var(--white);
  overflow-y: auto;
  padding: 1.5rem;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-smooth);
}
.mobile-nav.is-open { transform: translateX(0); }
.mobile-nav-list { display: flex; flex-direction: column; gap: 0.5rem; }
.mobile-nav-list a {
  display: block;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  color: var(--navy);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.mobile-nav-list a:hover { background: var(--gray-100); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  background: var(--navy);
  position: relative;
  display: flex; align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 30%, rgba(0,201,167,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(201,168,76,0.08) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 800px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(0,201,167,0.12);
  border: 1px solid rgba(0,201,167,0.3);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  color: var(--teal);
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}
.hero-badge::before { content: '●'; font-size: 0.6rem; }
.hero-title {
  font-size: clamp(1.9rem, 5vw + 0.5rem, 4.5rem);
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}
.hero-title .accent { color: var(--teal); }
.hero-title .accent-gold { color: var(--gold); }
.hero-subtitle {
  font-size: clamp(0.95rem, 1.5vw + 0.3rem, 1.15rem);
  color: rgba(255,255,255,0.65);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-bottom: 3.5rem;
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--teal);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.15);
  transform: translateX(-100%);
  transition: transform 0.3s var(--ease-smooth);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-teal); }
.btn-primary:hover::after { transform: translateX(0); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.2);
  transition: background 0.25s, color 0.25s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 2rem;
}
.hero-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.hero-stat-num {
  font-family: 'Noto Serif JP', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
}
.hero-stat-num span { color: var(--teal); font-size: 1.1rem; }
.hero-stat-label { font-size: 0.78rem; color: rgba(255,255,255,0.5); letter-spacing: 0.06em; }
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: rgba(255,255,255,0.4);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }
.hero-scroll::after { content: '↓'; font-size: 1rem; }

/* ---------- Scroll Progress Bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 2000;
}

/* ---------- Category Nav Tabs ---------- */
.cat-tabs-section {
  background: var(--off-white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top: var(--header-h);
  z-index: 100;
}
.cat-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0.25rem;
  padding-block: 0.6rem;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-600);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.cat-tab:hover { background: var(--gray-200); color: var(--navy); }
.cat-tab.active { background: var(--navy); color: var(--white); }
.cat-tab .tab-icon { font-size: 0.85rem; }

/* ---------- Section Common ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth);
}
.fade-up.is-visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }

/* ---------- Category Sections ---------- */
.cat-section { border-bottom: 1px solid var(--gray-200); }
.cat-section:nth-child(even) { background: var(--gray-50); }
.cat-header {
  display: flex; align-items: flex-start; gap: 1.5rem;
  margin-bottom: 3rem;
}
.cat-icon-wrap {
  width: 64px; height: 64px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.cat-title { font-size: clamp(1.4rem, 2.5vw + 0.3rem, 2rem); color: var(--navy); }
.cat-overview { font-size: 1rem; color: var(--text-muted); margin-top: 0.4rem; line-height: 1.7; }
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.info-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s;
  position: relative;
}
.info-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 4px; height: 100%;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--teal);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s var(--ease-smooth);
}
.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.info-card:hover::before { transform: scaleY(1); }

/* DSO バナー */
.dso-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 100%);
  border-radius: var(--radius);
  color: var(--white);
  transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.dso-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 5px; height: 100%;
  background: var(--teal);
  border-radius: var(--radius) 0 0 var(--radius);
}
.dso-banner:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.dso-banner-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  padding: 0.25rem 0.55rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.dso-banner-body { flex: 1; min-width: 0; }
.dso-banner-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.35rem;
}
.dso-banner-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  margin: 0;
}
.dso-banner-arrow {
  flex-shrink: 0;
  color: var(--teal);
  opacity: 0.85;
  transition: transform 0.25s;
}
.dso-banner:hover .dso-banner-arrow { transform: translateX(4px); }
@media (max-width: 600px) {
  .dso-banner { flex-wrap: wrap; gap: 0.75rem; }
  .dso-banner-label { display: none; }
  .dso-banner-arrow { display: none; }
}

/* クリッカブルカード */
.info-card.card-clickable { cursor: pointer; }
.info-card.card-clickable:hover .card-expand-hint { opacity: 1; color: var(--teal); }
.card-expand-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-dark);
  opacity: 0.65;
  transition: opacity 0.2s, color 0.2s;
}
.expand-chevron { flex-shrink: 0; transition: transform 0.2s var(--ease-smooth); }
.info-card.card-clickable:hover .expand-chevron { transform: translateX(3px); }
.info-card h4 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.info-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; }
.info-card ul { margin-top: 0.5rem; }
.info-card ul li {
  font-size: 0.85rem; color: var(--text-muted);
  padding-block: 0.25rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: flex-start; gap: 0.5rem;
}
.info-card ul li::before { content: '›'; color: var(--teal); font-weight: 700; flex-shrink: 0; }

/* Revision Badge */
.revision-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: linear-gradient(135deg, #fff3cd, #fff8e1);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #8a6a00;
  margin-bottom: 1rem;
}
.revision-badge::before { content: '📋'; }

/* Point list */
.point-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.point-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.point-item .pi-num {
  min-width: 24px; height: 24px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.point-item .pi-num.teal { background: var(--teal); color: var(--navy); }
.point-item .pi-text { color: var(--text); line-height: 1.6; }
.point-item .pi-text strong { color: var(--navy); }

/* Table */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th {
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.data-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--text);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }
.data-table .td-highlight { color: var(--teal-dark); font-weight: 700; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--gray-200); }

/* Alert boxes */
.alert {
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  line-height: 1.65;
  display: flex; gap: 0.75rem;
  margin-top: 1rem;
}
.alert-info { background: #e8f4f8; border-left: 4px solid #3b9eca; color: #1a5276; }
.alert-warn { background: #fff8e1; border-left: 4px solid var(--gold); color: #7d5a00; }
.alert-danger { background: #fdecea; border-left: 4px solid #e74c3c; color: #7b2121; }
.alert-success { background: #e8f8f2; border-left: 4px solid var(--teal-dark); color: #0d5a42; }
.alert-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ---------- Tools Section ---------- */
.tools-section { background: var(--navy); position: relative; overflow: hidden; }
.tools-section .noise::after { opacity: 0.03; }
.tools-section .section-label { color: var(--gold); }
.tools-section .section-title { color: var(--white); }
.tools-section .section-desc { color: rgba(255,255,255,0.6); }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}
.tool-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: background 0.3s, transform 0.25s var(--ease-spring), box-shadow 0.25s;
  cursor: pointer;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.tool-card::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-smooth);
}
.tool-card:hover { background: rgba(255,255,255,0.09); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.3); }
.tool-card:hover::before { transform: scaleX(1); }
.tool-card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
.tool-card h3 { font-size: 1.05rem; color: var(--white); margin-bottom: 0.5rem; }
.tool-card > p { font-size: 0.85rem; color: rgba(255,255,255,0.55); line-height: 1.65; margin-bottom: 1.25rem; flex: 1; }
.tool-open-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.04em;
  transition: gap 0.2s;
}
.tool-card:hover .tool-open-btn { gap: 0.6rem; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,33,55,0.75);
  backdrop-filter: blur(6px);
  z-index: 5000;
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-overlay.is-open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.35s var(--ease-spring);
}
@keyframes modal-in { from { opacity: 0; transform: scale(0.94) translateY(20px); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; background: var(--white); z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-title { font-size: 1.2rem; color: var(--navy); }
.modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--gray-600);
  transition: background 0.2s;
}
.modal-close:hover { background: var(--gray-200); }
.modal-body { padding: 2rem; }

/* Tool input styles */
.tool-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.form-group input, .form-group select, .form-group textarea {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,201,167,0.12);
}
.form-hint { font-size: 0.75rem; color: var(--gray-400); }
.btn-calc {
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s, transform 0.2s;
  align-self: flex-start;
}
.btn-calc:hover { background: var(--navy-light); transform: translateY(-1px); }

/* Result box */
.result-box {
  display: none;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
  color: var(--white);
}
.result-box.show { display: block; animation: fade-in 0.4s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.result-item { display: flex; flex-direction: column; gap: 0.2rem; }
.result-label { font-size: 0.75rem; color: rgba(255,255,255,0.55); letter-spacing: 0.04em; }
.result-value { font-family: 'Noto Serif JP', serif; font-size: 1.4rem; font-weight: 700; color: var(--white); }
.result-value .unit { font-size: 0.9rem; font-weight: 400; color: var(--teal); }
.result-note { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-top: 0.5rem; line-height: 1.6; }

/* Checklist */
.checklist { display: flex; flex-direction: column; gap: 0.5rem; }
.check-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.check-item:hover { border-color: var(--teal); background: var(--gray-50); }
.check-item input[type="checkbox"] { display: none; }
.check-box {
  width: 20px; height: 20px;
  border: 2px solid var(--gray-400);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.check-item input:checked ~ .check-box { background: var(--teal); border-color: var(--teal); }
.check-item input:checked ~ .check-box::after { content: '✓'; color: var(--navy); font-size: 0.75rem; font-weight: 700; }
.check-text { font-size: 0.88rem; color: var(--text); line-height: 1.5; }
.check-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Schedule table */
.schedule-table { width: 100%; font-size: 0.85rem; }
.schedule-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  border-bottom: 1px solid var(--gray-200);
  padding: 0.65rem 0;
  gap: 1rem;
}
.schedule-month { font-weight: 700; color: var(--navy); }
.schedule-tasks { color: var(--text-muted); }
.schedule-row:last-child { border-bottom: none; }

/* Chart container */
.chart-container { position: relative; height: 280px; margin-top: 1rem; }

/* Tag */
.tag {
  display: inline-flex;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.tag.green { background: #e8f8f2; color: var(--teal-dark); }
.tag.gold  { background: #fff8e1; color: #8a6a00; }
.tag.red   { background: #fdecea; color: #c0392b; }
.tag.navy  { background: var(--navy); color: var(--white); }

/* ---------- CTA Section ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  position: relative; overflow: hidden;
  padding-block: clamp(3rem, 6vw, 5rem);
  text-align: center;
}
.cta-section .section-title { color: var(--white); }
.cta-section .section-desc { color: rgba(255,255,255,0.8); margin-inline: auto; }
.cta-section .btn-primary { background: var(--white); color: var(--teal-dark); margin-top: 2rem; }
.cta-section .btn-primary:hover { background: var(--off-white); }

/* ---------- Footer ---------- */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.55);
  padding-block: 3rem 1.5rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1.5rem;
}
.footer-brand .logo { color: var(--white); margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.82rem; line-height: 1.7; }
.footer-col h5 { font-size: 0.85rem; font-weight: 700; color: var(--white); margin-bottom: 1rem; letter-spacing: 0.04em; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul li a { font-size: 0.82rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--teal); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.78rem;
}
.footer-disclaimer { font-size: 0.75rem; color: rgba(255,255,255,0.3); margin-top: 0.5rem; }

/* ---------- Back to Top ---------- */
.back-top {
  position: fixed; right: 1.5rem; bottom: 1.5rem;
  width: 44px; height: 44px;
  background: var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1rem;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 900;
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { transform: translateY(-3px); background: var(--teal-dark); }

/* ---------- Download Cards ---------- */
.dl-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.25s, transform 0.25s;
}
.dl-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.dl-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.dl-card-body { flex: 1; }
.dl-card-body h4 { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 0.35rem; }
.dl-card-body p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.65; margin: 0; }
.dl-btn {
  display: inline-flex; align-items: center;
  padding: 0.45rem 1rem;
  background: var(--navy);
  color: var(--white);
  border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  align-self: flex-start;
}
.dl-btn:hover { background: var(--teal-dark); color: var(--white); }

/* =====================================================
   カード詳細展開（CARD_DETAILS）
   ===================================================== */
/* 旧インライン展開は廃止 — ドロワーに移行 */
.card-detail-body { display: none; }

.card-detail-inner {
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 1rem;
}
.detail-lead {
  font-size: 0.9rem; color: var(--text); line-height: 1.8;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: rgba(0,201,167,0.06);
  border-left: 3px solid var(--teal);
  border-radius: 0 8px 8px 0;
}
.detail-section { margin-bottom: 1.5rem; }
.detail-heading {
  font-size: 0.85rem; font-weight: 700;
  color: var(--navy); letter-spacing: 0.04em;
  margin-bottom: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--teal);
  display: inline-block;
}

/* テーブル */
.detail-table-wrap { overflow-x: auto; border-radius: 8px; }
.detail-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.82rem; line-height: 1.55;
}
.detail-table th {
  background: var(--navy); color: var(--white);
  padding: 0.55rem 0.75rem; text-align: left;
  font-weight: 600; white-space: nowrap;
}
.detail-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--text);
  vertical-align: top;
}
.detail-table tr:nth-child(even) td { background: var(--gray-50); }
.detail-table tr:hover td { background: rgba(0,201,167,0.05); }
.detail-table td.highlight { color: var(--teal-dark); font-weight: 700; }

/* リスト */
.detail-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.45rem;
}
.detail-list li {
  font-size: 0.85rem; color: var(--text); line-height: 1.65;
  padding-left: 1.1rem; position: relative;
}
.detail-list li::before {
  content: '▸'; color: var(--teal); position: absolute; left: 0;
  font-size: 0.75rem; top: 0.1em;
}
.detail-list li strong { color: var(--navy); }

/* ステップ */
.detail-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.detail-steps li {
  display: flex; gap: 0.85rem; align-items: flex-start;
}
.step-label {
  background: var(--navy); color: var(--teal);
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0; line-height: 1.8;
}
.detail-steps li div { flex: 1; }
.detail-steps li strong { font-size: 0.87rem; color: var(--navy); display: block; margin-bottom: 0.2rem; }
.detail-steps li p { font-size: 0.82rem; color: var(--text-muted); margin: 0; line-height: 1.65; }

/* アラート */
.detail-alert {
  display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.75rem 1rem; border-radius: 8px;
  font-size: 0.83rem; line-height: 1.7;
}
.detail-alert-info  { background: rgba(59,158,202,0.1); border-left: 3px solid #3b9eca; color: #1a5a7a; }
.detail-alert-warn  { background: rgba(201,168,76,0.12); border-left: 3px solid var(--gold); color: #6b4e00; }
.detail-alert-danger{ background: rgba(231,76,60,0.1);  border-left: 3px solid #e74c3c;  color: #7a1a1a; }
.detail-alert-success{ background: rgba(39,174,96,0.1); border-left: 3px solid #27ae60;  color: #1a5c2a; }

/* 公式リンクボタン */
.detail-links { display: flex; flex-direction: column; gap: 0.6rem; }
.detail-link-btn {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.detail-link-btn:hover {
  border-color: var(--teal);
  box-shadow: 0 2px 12px rgba(0,201,167,0.15);
  transform: translateX(3px);
}
.dl-icon { font-size: 1.3rem; flex-shrink: 0; }
.dl-text { flex: 1; display: flex; flex-direction: column; gap: 0.1rem; }
.dl-text strong { font-size: 0.85rem; color: var(--navy); font-weight: 700; }
.dl-text small { font-size: 0.77rem; color: var(--text-muted); }
.dl-arrow { color: var(--teal); font-size: 1rem; font-weight: 700; flex-shrink: 0; }

/* ─── 情報品質インジケーター ──────────────────────── */
.detail-meta-strip {
  display: flex; align-items: flex-start; gap: 0.45rem; flex-wrap: wrap;
  padding: 0.5rem 0.7rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.72rem;
  line-height: 1.5;
}
.dmeta-badge {
  display: inline-block;
  padding: 0.17rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}
.dmeta-legal    { background: rgba(125,60,195,0.12); color: #5a0f8c; }
.dmeta-official { background: rgba(59,130,202,0.14); color: #0d4f7a; }
.dmeta-estimate { background: rgba(201,150,40,0.18); color: #7a4d00; }
.dmeta-guidance { background: rgba(0,180,140,0.13); color: #005545; }

.dmeta-date { color: var(--text-muted); }
.dmeta-stale { color: #b83232; font-weight: 600; }
.dmeta-unverified { color: #b85500; font-weight: 600; }
.dmeta-volatile {
  display: inline-block;
  background: rgba(201,150,40,0.16);
  color: #7a4d00;
  padding: 0.17rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  white-space: nowrap;
}
.dmeta-note {
  width: 100%;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-style: italic;
  margin-top: 0.1rem;
  line-height: 1.6;
}

/* ─── セクション出典表示 ──────────────────────────── */
.detail-source-cite {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.3rem;
  margin-top: 0.6rem;
  padding: 0.35rem 0.65rem;
  background: rgba(0,0,0,0.025);
  border-left: 2px solid var(--gray-200);
  border-radius: 0 4px 4px 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.source-tag {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 0.06rem 0.4rem;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.67rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.detail-source-cite a { color: #3b8eca; text-decoration: underline; }
.detail-source-cite a:hover { color: var(--teal-dark); }
.source-date { color: var(--text-muted); }
.source-note { width: 100%; color: var(--text-muted); font-style: italic; margin-top: 0.2rem; }

/* ---------- About Grid ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .dropdown-menu { width: 480px; grid-template-columns: repeat(2, 1fr); }
  /* about セクションのグリッド */
  #about .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}
@media (max-width: 768px) {
  .nav-list { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .hero-stats { gap: 1.25rem; }
  .dropdown-menu { display: none !important; }
  .tools-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 1.25rem; }
  .modal-header { padding: 1.1rem 1.25rem; }
  .result-value { font-size: 1.15rem; }
  /* about inline grid */
  #about .container > div { grid-template-columns: 1fr !important; gap: 2rem !important; }

  /* === モバイル可読性改善 === */

  /* ヒーロー：サブタイトル・スタット文字を明るく */
  .hero-subtitle { color: rgba(255,255,255,0.88); font-size: 0.93rem; line-height: 1.75; }
  .hero-subtitle br { display: none; }
  .hero-stat-label { color: rgba(255,255,255,0.72); }

  /* ヒーロー：ボタンをフルワイドに */
  .hero-actions { flex-direction: column; gap: 0.75rem; }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary { width: 100%; justify-content: center; padding: 1rem 1.5rem; }

  /* ヒーロー：タイトルサイズを小画面に最適化 */
  .hero-title { font-size: clamp(1.75rem, 8vw, 2.6rem); letter-spacing: 0.01em; }

  /* カテゴリ：ヘッダーアイコン縮小＋ギャップ調整 */
  .cat-icon-wrap { width: 50px; height: 50px; font-size: 1.5rem; }
  .cat-header { gap: 0.875rem; margin-bottom: 2rem; align-items: center; }
  .cat-title { font-size: clamp(1.25rem, 5vw, 1.6rem); }
  .cat-overview { font-size: 0.92rem; }

  /* セクションタイトル：長い日本語タイトルに対応 */
  .section-title { font-size: clamp(1.45rem, 5.5vw + 0.2rem, 2.5rem); line-height: 1.35; }

  /* ツールセクション：説明文を明るく */
  .tools-section .section-desc { color: rgba(255,255,255,0.82); }
  .tools-section .section-title { font-size: clamp(1.45rem, 5.5vw + 0.2rem, 2.5rem); }

  /* カテゴリタブ：スクロール可能を示すフェード */
  .cat-tabs-section { position: relative; }
  .cat-tabs-section::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--off-white));
    pointer-events: none;
    z-index: 1;
  }

  /* コンテンツグリッド：1列固定 */
  .content-grid { grid-template-columns: 1fr; }

  /* カード詳細テーブル：th折り返し許可 */
  .detail-table th { white-space: normal; min-width: 70px; }
  .detail-table { font-size: 0.78rem; }
  .detail-table th, .detail-table td { padding: 0.45rem 0.6rem; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .modal { border-radius: var(--radius-lg); max-height: 95vh; }
  .result-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stat-num { font-size: 1.6rem; }

  /* 極小画面での追加調整 */
  .hero-title { font-size: clamp(1.6rem, 7.5vw, 2rem); }
  .hero-badge { font-size: 0.72rem; padding: 0.28rem 0.75rem; }
  .section-title { font-size: clamp(1.35rem, 5vw, 1.75rem); }
  .cat-title { font-size: 1.2rem; }
  .cat-icon-wrap { width: 44px; height: 44px; font-size: 1.3rem; }

  /* info-card タイトルの省略を防ぐ */
  .info-card h4 { font-size: 0.95rem; line-height: 1.45; }
  .info-card p, .info-card ul li { font-size: 0.82rem; }

  /* カードヘッダーの詳細展開ヒント */
  .card-expand-hint { font-size: 0.75rem; }
}

/* ===================================================================
   SCANNER SECTION
   =================================================================== */
.scanner-section {
  background: linear-gradient(170deg, #081828 0%, #0a2035 60%, #061420 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.scanner-section::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 55%;
  height: 100%;
  background: radial-gradient(ellipse 80% 70% at 80% 40%, rgba(0,201,167,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.scanner-section .section-label { color: var(--teal); }
.scanner-section .section-title { color: var(--white); }
.scanner-desc { color: rgba(255,255,255,0.65); max-width: 600px; margin: 0 auto 3rem; }

.scanner-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  align-items: start;
}

/* ─── Input Panel ─── */
.scanner-inputs {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
}
.scanner-panel-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0;
}
.scan-item {
  margin-bottom: 1.5rem;
}
.scan-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.55rem;
}
.scan-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
}
.scan-ideal {
  font-size: 0.72rem;
  color: var(--teal);
  opacity: 0.8;
}
.scan-slider {
  width: 100%;
  height: 5px;
  border-radius: 3px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
}
.scan-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00c9a7;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,201,167,0.5);
  transition: box-shadow 0.2s, transform 0.2s;
}
.scan-slider::-webkit-slider-thumb:hover,
.scan-slider:active::-webkit-slider-thumb {
  box-shadow: 0 0 20px rgba(0,201,167,0.85);
  transform: scale(1.2);
}
.scan-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00c9a7;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(0,201,167,0.5);
}
.scan-value-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  margin-top: 0.4rem;
}
.scan-cur-val {
  font-weight: 700;
  font-size: 0.8rem;
  color: #00c9a7 !important;
}
.scan-btn {
  width: 100%;
  margin-top: 0.25rem;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  font-size: 0.97rem;
  letter-spacing: 0.04em;
}
.scan-btn.scanning {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── Output Panel ─── */
.scanner-outputs {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.radar-canvas {
  width: 100%;
  height: 360px;
  display: block;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-xl);
}
.scan-result-body {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
}

/* Score ring */
.scan-score-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.scan-score-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px solid #00c9a7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,201,167,0.07);
  box-shadow: 0 0 22px rgba(0,201,167,0.22), inset 0 0 14px rgba(0,201,167,0.06);
  flex-shrink: 0;
}
.scan-score-num {
  font-family: 'Noto Serif JP', serif;
  font-size: 2.1rem;
  font-weight: 900;
  color: #00c9a7;
  line-height: 1;
  display: block;
}
.scan-score-unit {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.35);
  margin-top: 0.15rem;
}
.scan-grade-info { display: flex; flex-direction: column; gap: 0.35rem; }
.scan-grade-badge {
  font-family: 'Noto Serif JP', serif;
  font-size: 2.6rem;
  font-weight: 900;
  color: #00c9a7;
  line-height: 1;
  transition: color 0.5s;
}
.scan-grade-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

/* KPI bars */
.kpi-section-title,
.rec-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.38);
  margin-bottom: 0.875rem;
}
.kpi-list { display: flex; flex-direction: column; gap: 0.6rem; }
.kpi-item {
  opacity: 0;
  animation: kpiFadeIn 0.4s ease forwards;
}
@keyframes kpiFadeIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.kpi-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.28rem;
  min-width: 0;
}
.kpi-name  {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.78);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kpi-status { font-size: 0.77rem; font-weight: 700; white-space: nowrap; }
.kpi-bar-bg {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
}
.kpi-bar { height: 100%; border-radius: 2px; width: 0; }

/* Recommendations */
.rec-section { margin-top: 1.25rem; }
.rec-list { display: flex; flex-direction: column; gap: 0.65rem; }
.rec-item {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 0.875rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  opacity: 0;
  animation: kpiFadeIn 0.4s ease forwards;
}
.rec-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00c9a7, #00a88a);
  color: #061420;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.rec-body { flex: 1; min-width: 0; }
.rec-item-title {
  font-size: 0.87rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.25rem;
}
.rec-item-text {
  font-size: 0.79rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  margin-bottom: 0.45rem;
}
.rec-item-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
}
.rec-item-link {
  font-size: 0.77rem;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.rec-item-link:hover { color: rgba(255,255,255,0.75); text-decoration: underline; }
.rec-tool-btn {
  font-size: 0.77rem;
  font-weight: 700;
  color: #00c9a7;
  background: rgba(0,201,167,0.1);
  border: 1px solid rgba(0,201,167,0.35);
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
  letter-spacing: 0.01em;
}
.rec-tool-btn:hover {
  background: rgba(0,201,167,0.22);
  border-color: rgba(0,201,167,0.6);
  transform: translateY(-1px);
}
.rec-perfect {
  font-size: 0.9rem;
  color: #00c9a7;
  text-align: center;
  padding: 1.25rem;
  font-weight: 600;
}

/* ─── Scanner mobile ─── */
@media (max-width: 900px) {
  .scanner-layout { grid-template-columns: 1fr; }
  .scanner-outputs { order: -1; }
  .radar-canvas { height: 260px; }
}
@media (max-width: 768px) {
  .scanner-inputs { padding: 1.5rem 1.25rem; }
  .scan-result-body { padding: 1.25rem; }
  .scan-score-ring { width: 76px; height: 76px; }
  .scan-score-num { font-size: 1.75rem; }
  .scan-grade-badge { font-size: 2rem; }
  .scanner-desc { font-size: 0.88rem; }
}

/* ===================================================================
   SEARCH MODAL
   =================================================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,12,24,0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s, visibility 0.22s;
}
.search-overlay.is-open { opacity: 1; visibility: visible; }

.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9001;
  padding: 8vh 1rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px) scale(0.98);
  transition: opacity 0.22s, visibility 0.22s, transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
}
.search-modal.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.search-modal-inner {
  max-width: 640px;
  margin: 0 auto;
  background: #0c1e30;
  border: 1px solid rgba(0,201,167,0.22);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0,0,0,0.55), 0 0 50px rgba(0,201,167,0.07);
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
#searchInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  font-family: 'Noto Sans JP', sans-serif;
  min-width: 0;
}
#searchInput::placeholder { color: rgba(255,255,255,0.28); }
.search-close-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.11);
  color: rgba(255,255,255,0.45);
  border-radius: 5px;
  padding: 0.18rem 0.55rem;
  font-size: 0.7rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  transition: background 0.15s;
}
.search-close-btn:hover { background: rgba(255,255,255,0.12); }
.search-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.5rem;
}
.search-result-item {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.search-result-item:hover { background: rgba(0,201,167,0.09); }
.sri-cat {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 0.18rem;
}
.sri-title {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}
.search-hint, .search-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: rgba(255,255,255,0.3);
  font-size: 0.88rem;
}
.search-footer {
  display: flex;
  gap: 1.5rem;
  padding: 0.55rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.18);
}
.search-footer span {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.27);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.search-footer kbd {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 4px;
  padding: 0.08rem 0.38rem;
  font-size: 0.62rem;
  font-family: monospace;
  color: rgba(255,255,255,0.45);
}

/* ─── Header search button ─── */
.header-search-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.header-search-btn:hover {
  background: rgba(0,201,167,0.15);
  color: #00c9a7;
  border-color: rgba(0,201,167,0.3);
}
.header.scrolled .header-search-btn {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.1);
  color: var(--navy);
}
.header.scrolled .header-search-btn:hover {
  background: rgba(0,201,167,0.12);
  color: var(--teal);
}

@media (max-width: 768px) {
  .search-modal { padding: 6vh 0.75rem 0; }
  .search-modal-inner { border-radius: 12px; }
  .search-footer { display: none; }
  .header-search-btn { width: 34px; height: 34px; }
}

/* ===================================================================
   SCANNER v2 — 追加スタイル
   =================================================================== */

/* 入力パネルヘッダー */
.scanner-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.scanner-panel-note {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.04em;
}

/* 2列スライダーグリッド */
.scan-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.5rem;
}
.scan-item { margin-bottom: 0.75rem; }

/* KPI bar — benchmark marker */
.kpi-bar-bg {
  position: relative;
}
.kpi-bar-bm {
  position: absolute;
  top: -2px;
  width: 2px;
  height: calc(100% + 4px);
  background: rgba(201,168,76,0.7);
  border-radius: 1px;
  pointer-events: none;
  z-index: 2;
}
.kpi-right {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.kpi-delta {
  font-size: 0.7rem;
  font-weight: 700;
}
.kpi-legend {
  font-size: 0.65rem;
  font-weight: 400;
  color: rgba(255,255,255,0.3);
  margin-left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.kpi-legend-bm {
  display: inline-block;
  width: 12px;
  height: 2px;
  background: rgba(201,168,76,0.7);
  border-radius: 1px;
}

/* rec-item layout */
.rec-item-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.rec-severity {
  font-size: 0.65rem;
  font-weight: 700;
  border: 1px solid;
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* リスクメーター */
.risk-meter-section {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
}
.risk-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}
.risk-meter-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.38);
}
.risk-label-text {
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 0.4s;
}
.risk-bar-bg {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.7rem;
}
.risk-bar {
  height: 100%;
  border-radius: 3px;
  transition: background 0.4s;
}
.risk-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.risk-flag {
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid;
  border-radius: 4px;
  padding: 0.12rem 0.5rem;
  letter-spacing: 0.02em;
}

/* デルタバッジ */
.delta-badge {
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 0.35rem;
  letter-spacing: 0.03em;
}

/* 履歴パネル */
.hist-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
}
.hist-header { margin-bottom: 0.75rem; }
.hist-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}
.hist-canvas {
  width: 100%;
  height: 60px;
  display: block;
  margin-bottom: 0.75rem;
}
.hist-entries {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.hist-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
}
.hist-date  { color: rgba(255,255,255,0.4); flex: 1; }
.hist-score { font-weight: 700; font-size: 0.92rem; }
.hist-slash { font-size: 0.65rem; color: rgba(255,255,255,0.3); }

/* Scanner mobile v2 */
@media (max-width: 900px) {
  .scan-items-grid { grid-template-columns: 1fr 1fr; gap: 0.25rem 1rem; }
}
@media (max-width: 600px) {
  .scan-items-grid { grid-template-columns: 1fr; }
  .scan-item { margin-bottom: 0.5rem; }
  /* KPI行：デルタを非表示にして省スペース化 */
  .kpi-delta { display: none; }
  .kpi-name  { font-size: 0.75rem; }
  .kpi-status { font-size: 0.72rem; }
  /* recアクション行：縦積み */
  .rec-item-actions { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .rec-tool-btn { width: 100%; text-align: center; }
  /* リスクメーターの余白調整 */
  .risk-meter-section { padding: 0.8rem; }
  /* 履歴パネルのpadding */
  .hist-panel { padding: 1rem; }
}

/* ===================================================================
   SEARCH v2 — 追加スタイル
   =================================================================== */

/* ハイライト */
mark.sh {
  background: rgba(0,201,167,0.25);
  color: #00c9a7;
  border-radius: 2px;
  padding: 0 1px;
  font-style: normal;
}

/* カテゴリフィルターピル */
.search-cat-filter {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  scrollbar-width: none;
}
.search-cat-filter::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 0.22rem 0.75rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cat-pill span {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0 0.3rem;
  margin-left: 0.25rem;
  font-size: 0.65rem;
}
.cat-pill:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
}
.cat-pill.active {
  background: rgba(0,201,167,0.18);
  border-color: rgba(0,201,167,0.4);
  color: #00c9a7;
}

/* 検索結果 — スニペット */
.sri-meta {
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.sri-cat-badge {
  font-size: 0.66rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  letter-spacing: 0.04em;
}
.sri-title  { font-size: 0.9rem; color: rgba(255,255,255,0.88); line-height: 1.4; }
.sri-snippet {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.38);
  margin-top: 0.2rem;
  line-height: 1.5;
}
.search-result-item.is-selected {
  background: rgba(0,201,167,0.1);
  outline: 1px solid rgba(0,201,167,0.25);
}

/* 最近の検索 */
.search-recent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem 0.25rem;
}
.search-recent-header {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.28);
}
.search-recent-clear {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.28);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.search-recent-clear:hover { color: rgba(255,255,255,0.6); }
.search-recent-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
}
.search-recent-item svg { color: rgba(255,255,255,0.25); flex-shrink: 0; }

/* ===================================================================
   CARD DETAIL DRAWER
   =================================================================== */
.card-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 33, 55, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1090;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.card-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ─── Card Hover Preview ─── */
.card-preview {
  position: fixed;
  z-index: 750;
  width: 270px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(13, 33, 55, 0.14);
  padding: 1rem 1.1rem;
  pointer-events: none;
  display: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.cp-cat-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  color: var(--teal);
}
.cp-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  font-family: 'Noto Serif JP', serif;
}
.cp-lead {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}
.cp-items {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.cp-items li {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}
.cp-items li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}
.cp-hint {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--teal);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--gray-100);
}

.card-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(500px, 100vw);
  height: 100dvh;
  background: var(--white);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.42s cubic-bezier(0.21, 0.51, 0.51, 1);
  box-shadow: -12px 0 48px rgba(13, 33, 55, 0.16);
  outline: none;
}
.card-drawer.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.6rem 1.2rem;
  border-bottom: 1px solid var(--gray-200);
  border-top: 4px solid var(--teal);
  flex-shrink: 0;
  background: var(--white);
}
.drawer-cat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.3rem;
  color: var(--teal);
}
.drawer-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: var(--navy);
  line-height: 1.45;
  font-weight: 700;
}
.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  background: none;
  border: 1px solid transparent;
  flex-shrink: 0;
  margin-top: 0.1rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.drawer-close-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-200);
  color: var(--navy);
}

.drawer-body {
  overflow-y: auto;
  flex: 1;
  padding: 1.6rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.drawer-body .card-detail-inner {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.drawer-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 3rem 0;
}

/* モバイル: ボトムシート */
@media (max-width: 600px) {
  .card-drawer {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 88dvh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -8px 40px rgba(13, 33, 55, 0.18);
  }
  .card-drawer.is-open {
    transform: translateY(0);
  }
  .drawer-header {
    border-top: none;
    border-radius: 20px 20px 0 0;
    padding-top: 1.6rem;
    /* モバイル: タイトル上にアクセントバー */
    position: relative;
  }
  .drawer-header::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
  }
}

/* ─── Drawer Tabs ─── */
.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.drawer-tabs::-webkit-scrollbar { display: none; }
.drawer-tab {
  padding: 0.65rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  white-space: nowrap;
  background: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.drawer-tab.is-active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}
.drawer-tab:hover:not(.is-active) {
  color: var(--navy);
  background: var(--gray-50);
}
.drawer-panel { display: none; }
.drawer-panel.is-active { display: block; }

/* ─── Checklist ─── */
.cl-progress {
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 0.75rem;
}
.cl-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.cl-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.cl-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal);
  transition: color 0.3s;
}
.cl-bar-bg {
  height: 5px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
}
.cl-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-dark));
  border-radius: 3px;
  transition: width 0.35s var(--ease-smooth);
}
.cl-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.85rem 0 0.4rem;
  border-top: 1px solid var(--gray-100);
  margin-top: 0.35rem;
}
.cl-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0.4rem;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}
.cl-item:hover { background: var(--gray-50); }
.cl-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: border-color 0.15s, background 0.15s;
  color: var(--white);
}
.cl-item.is-done .cl-box {
  background: var(--teal);
  border-color: var(--teal);
}
.cl-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
  flex: 1;
  transition: color 0.15s;
}
.cl-item.is-done .cl-text {
  color: var(--gray-400);
  text-decoration: line-through;
  text-decoration-color: var(--gray-200);
}
.cl-hidden-cb { display: none; }
.cl-complete {
  margin-top: 1rem;
  text-align: center;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.9rem 1rem;
  background: rgba(0, 201, 167, 0.07);
  border: 1px solid rgba(0, 201, 167, 0.2);
  border-radius: var(--radius);
}

/* ─── Drawer Tools Tab ─── */
.dt-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}
.dt-tool-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--white);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}
.dt-tool-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--teal);
  transform: translateY(-1px);
}
.dt-tool-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dt-tool-body { flex: 1; min-width: 0; }
.dt-tool-name { font-size: 0.88rem; font-weight: 700; color: var(--navy); }
.dt-tool-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; line-height: 1.5; }
.dt-arrow { color: var(--teal); flex-shrink: 0; }
.dt-related-list { display: flex; flex-direction: column; }
.dt-related-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.dt-related-item:hover { background: var(--gray-50); }
.dt-related-icon { font-size: 1rem; flex-shrink: 0; }
.dt-related-title {
  flex: 1;
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.45;
}
.dt-related-item svg { color: var(--gray-400); flex-shrink: 0; }
.sri-recent-text { font-size: 0.88rem; color: rgba(255,255,255,0.65); }

/* ===================================================================
   NEWS BADGE & BANNER
   =================================================================== */

/* カード右上の NEW バッジ */
.badge-new {
  position: absolute;
  top: -7px;
  right: -7px;
  background: #e74c3c;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(231,76,60,0.45);
  animation: badge-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 20;
  font-family: 'Noto Sans JP', sans-serif;
}
@keyframes badge-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 2px 8px rgba(231,76,60,0.45); }
  50%       { transform: scale(1.12); box-shadow: 0 4px 14px rgba(231,76,60,0.65); }
}

/* ページ上部のニュースバナー */
#news-banner {
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(90deg, #0d2137 0%, #1a3a5c 100%);
  color: var(--white);
  padding: 0.65rem 1.5rem;
  font-size: 0.82rem;
  border-bottom: 2px solid var(--teal);
  position: relative;
  z-index: 999;
}
#news-banner.is-visible { display: flex; }
.news-banner-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #e74c3c;
  flex-shrink: 0;
  animation: badge-pulse 1.8s ease-in-out infinite;
}
.news-banner-text { flex: 1; }
.news-banner-text strong { color: var(--teal); }
.news-banner-close {
  background: none; border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.1rem; cursor: pointer; padding: 0 4px;
  transition: color 0.2s;
}
.news-banner-close:hover { color: #fff; }
@media (max-width: 768px) {
  #news-banner { font-size: 0.75rem; padding: 0.55rem 1rem; gap: 0.5rem; }
  .badge-new { top: -5px; right: -5px; font-size: 8px; padding: 2px 5px; }
}
