:root {
  --red: #c41e3a;
  --red-dark: #9f1730;
  --dark: #0a0a0a;
  --text: #1a1a1a;
  --text-light: #505050;
  --gray: #7b7b7b;
  --light-gray: #e8e8e8;
  --bg: #fafafa;
  --border: rgba(0, 0, 0, .09);
  --green: #127052;
  --green-bg: #e9f6f1;
  --amber: #8a5800;
  --amber-bg: #fff5df;
  --danger: #a33a3a;
  --danger-bg: #fff0f0;
  --sans: "Noto Sans JP", Arial, sans-serif;
  --en: "Inter", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; font-size: 16px; }
body { margin: 0; color: var(--text); background: #fff; font-family: var(--sans); line-height: 1.85; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #e8a617; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 1000; top: -80px; left: 16px; padding: 10px 16px; border-radius: 8px; color: #fff; background: var(--red); }
.skip-link:focus { top: 16px; }

.header { position: fixed; z-index: 100; top: 0; right: 0; left: 0; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(10,10,10,.94); backdrop-filter: blur(20px); }
.nav { display: flex; max-width: 1200px; height: 60px; margin: 0 auto; padding: 0 32px; align-items: center; justify-content: space-between; }
.nav-brand { color: #fff; font-family: var(--en); font-size: .85rem; font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.nav-brand span { color: var(--red); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: .78rem; }
.nav-links a { color: rgba(255,255,255,.55); font-weight: 500; text-decoration: none; }
.nav-links a:hover, .nav-links .current { color: #fff; }
.nav-toggle { display: none; width: 58px; height: 44px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; color: #fff; background: transparent; font-size: .72rem; font-weight: 700; white-space: nowrap; }

.breadcrumb { padding-top: 60px; background: var(--bg); }
.breadcrumb-inner { display: flex; max-width: 1100px; margin: 0 auto; padding: 17px 32px; align-items: center; gap: 9px; overflow: hidden; color: var(--gray); font-size: .75rem; white-space: nowrap; }
.breadcrumb-inner a { color: var(--gray); text-decoration: none; }
.breadcrumb-inner > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.article-header { padding: 48px 0 60px; background: var(--bg); }
.article-header-inner { max-width: 1100px; margin: 0 auto; padding: 0 32px; }
.article-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; color: var(--gray); font-family: var(--en); font-size: .75rem; flex-wrap: wrap; }
.article-category { display: inline-block; padding: 5px 14px; border-radius: 999px; color: #fff; background: var(--red); font-family: var(--sans); font-size: .7rem; font-weight: 700; text-decoration: none; }
.article-header h1 { max-width: 820px; margin: 0; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.45; letter-spacing: -.03em; }
.article-lead { max-width: 760px; margin: 24px 0 0; color: var(--text-light); font-size: 1rem; line-height: 2; }

.article-summary { color: #fff; background: var(--dark); }
.summary-inner { max-width: 1100px; margin: 0 auto; padding: 34px 32px 38px; }
.summary-label { margin: 0 0 18px; color: var(--red); font-family: var(--en); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.summary-stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.summary-stats div { display: flex; min-height: 80px; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid rgba(255,255,255,.13); text-align: center; }
.summary-stats div:last-child { border-right: 0; }
.summary-stats strong { font: 700 1.8rem/1.2 var(--en); }
.summary-stats span { margin-top: 5px; color: rgba(255,255,255,.55); font-size: .72rem; }

.article-intro, .article-body { width: min(720px, calc(100% - 40px)); margin: 0 auto; }
.article-intro { padding: 64px 0; }
.article-intro > p, .article-body p { margin: 0 0 24px; color: var(--text-light); font-size: .98rem; line-height: 2; }
.editor-note { margin-top: 34px; padding: 23px 25px; border-left: 4px solid var(--red); border-radius: 0 8px 8px 0; background: var(--bg); }
.editor-note strong { font-size: .92rem; }
.editor-note p { margin: 8px 0 0; color: var(--text-light); font-size: .83rem; line-height: 1.85; }
.wide-container { width: min(1100px, calc(100% - 48px)); margin: 0 auto; }

.map-section { padding: 74px 0 82px; border-top: 1px solid var(--border); background: #fff; }
.program-section { padding: 76px 0 92px; background: var(--bg); }
.section-heading { margin-bottom: 28px; }
.section-kicker { margin: 0 0 9px !important; color: var(--red) !important; font: 700 .7rem/1.4 var(--en) !important; letter-spacing: .14em; }
.section-heading h2, .article-body h2 { margin: 0 0 12px; font-size: clamp(1.45rem, 3vw, 1.8rem); line-height: 1.5; }
.section-heading > p:not(.section-kicker) { margin: 0; color: var(--gray); font-size: .86rem; }
.all-prefectures { margin-bottom: 20px; padding: 9px 17px; border: 1px solid var(--dark); border-radius: 999px; color: var(--dark); background: #fff; font-size: .78rem; font-weight: 700; }
.all-prefectures.active { color: #fff; background: var(--dark); }
.prefecture-map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.region-group { padding: 17px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg); }
.region-group h3 { margin: 0 0 11px; color: var(--text); font-size: .82rem; }
.prefecture-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.prefecture-button { display: inline-flex; min-height: 38px; padding: 7px 10px; align-items: center; gap: 7px; border: 1px solid #d5d5d5; border-radius: 8px; color: var(--text-light); background: #fff; font-size: .73rem; }
.prefecture-button .count { display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 999px; color: var(--gray); background: #f0f0f0; font: 700 .65rem var(--en); }
.prefecture-button.has-program { border-color: #d68b98; color: var(--text); font-weight: 700; }
.prefecture-button.has-program .count { color: var(--red); background: #fbecef; }
.prefecture-button.active { border-color: var(--red); color: #fff; background: var(--red); }
.prefecture-button.active .count { color: var(--red); background: #fff; }

.filters { display: grid; grid-template-columns: minmax(250px, 1.45fr) repeat(3, minmax(150px, .85fr)); gap: 13px; align-items: end; padding: 21px; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.filters label { display: block; margin-bottom: 6px; color: var(--text-light); font-size: .7rem; font-weight: 700; }
.filters input, .filters select { width: 100%; min-height: 48px; padding: 9px 12px; border: 1px solid #c9c9c9; border-radius: 8px; color: var(--text); background: #fff; }
.filters input:focus, .filters select:focus { border-color: var(--red); outline: 3px solid rgba(196,30,58,.1); }
.reset-button { grid-column: 1 / -1; justify-self: end; padding: 3px; border: 0; color: var(--red); background: transparent; font-size: .76rem; font-weight: 700; text-decoration: underline; }
.legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin: 16px 0 26px; }
.legend > div { display: flex; padding: 13px; align-items: flex-start; gap: 9px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.legend p { margin: 0; color: var(--gray); font-size: .7rem; line-height: 1.6; }
.legend strong { color: var(--text); }
.bpo-badge { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; border-radius: 999px; font-size: .82rem; font-weight: 800; }
.bpo-badge.possible { color: var(--green); background: var(--green-bg); }
.bpo-badge.confirm { color: var(--amber); background: var(--amber-bg); }
.bpo-badge.unlikely { color: var(--danger); background: var(--danger-bg); }
.bpo-badge.na { color: var(--gray); background: #efefef; }
.selected-prefecture-note { margin: 0 0 17px; padding: 14px 17px; border-left: 3px solid var(--red); color: var(--text-light); background: #fff; font-size: .8rem; }
.selected-prefecture-note .regional-guide-link { display: inline-block; margin-left: 7px; color: var(--red); font-weight: 700; }
.program-list { display: grid; gap: 16px; }
.program-card { padding: 25px; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.card-tags { display: flex; margin-bottom: 9px; gap: 6px; flex-wrap: wrap; }
.tag { padding: 3px 9px; border-radius: 999px; color: var(--gray); background: #f1f1f1; font-size: .64rem; font-weight: 700; }
.tag.status-active { color: var(--green); background: var(--green-bg); }
.tag.status-closed { color: var(--gray); background: #eee; }
.program-card h3 { margin: 0; font-size: 1.1rem; line-height: 1.55; }
.area { margin: 4px 0 0; color: var(--red); font-size: .76rem; font-weight: 700; }
.bpo-judgement { display: flex; min-width: 200px; padding: 10px 12px; align-items: center; gap: 9px; border-radius: 9px; background: var(--bg); }
.bpo-judgement span:last-child { color: var(--gray); font-size: .7rem; line-height: 1.4; }
.bpo-judgement strong { display: block; color: var(--text); font-size: .75rem; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin: 20px 0; padding: 1px; border-radius: 9px; background: var(--light-gray); }
.fact { padding: 13px; background: #fff; }
.fact dt { margin-bottom: 4px; color: var(--gray); font-size: .66rem; font-weight: 700; }
.fact dd { margin: 0; font-size: .78rem; font-weight: 600; line-height: 1.55; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-grid div { padding-top: 13px; border-top: 1px solid var(--light-gray); }
.detail-grid h4 { margin: 0 0 5px; font-size: .73rem; }
.detail-grid p { margin: 0; color: var(--text-light); font-size: .76rem; }
.bpo-reason { grid-column: 1 / -1; padding: 13px !important; border: 0 !important; border-left: 3px solid var(--red) !important; background: var(--bg); }
.card-footer { display: flex; margin-top: 18px; align-items: center; justify-content: space-between; gap: 15px; }
.source-link { color: var(--red); font-size: .78rem; font-weight: 700; }
.checked { color: var(--gray); font-size: .66rem; }
.static-summary { margin-top: 24px; padding: 18px; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.static-summary summary { font-size: .82rem; font-weight: 700; cursor: pointer; }
.static-summary > p { margin: 12px 0; color: var(--gray); font-size: .74rem; }
.table-scroll { overflow-x: auto; border: 1px solid var(--light-gray); border-radius: 8px; }
.static-summary table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: .72rem; line-height: 1.6; }
.static-summary th, .static-summary td { padding: 10px 12px; border-bottom: 1px solid var(--light-gray); text-align: left; vertical-align: top; }
.static-summary thead th { color: var(--text-light); background: var(--bg); white-space: nowrap; }
.static-summary tbody th { font-weight: 600; }
.static-summary tbody tr:last-child th, .static-summary tbody tr:last-child td { border-bottom: 0; }
.static-summary a { color: var(--red); }
.empty-state { padding: 40px 22px; border: 1px dashed #bbb; border-radius: 11px; background: #fff; text-align: center; }
.empty-state h3 { margin: 0 0 8px; }
.empty-state p { max-width: 620px; margin: 0 auto 17px; color: var(--gray); font-size: .82rem; }
.empty-state button { padding: 10px 16px; border: 0; border-radius: 8px; color: #fff; background: var(--dark); }
.noscript { padding: 20px; border: 1px solid var(--border); background: #fff; }

.article-body { padding: 82px 0 96px; }
.article-body section + section { margin-top: 72px; }
.article-body h2 { padding-bottom: 11px; border-bottom: 2px solid var(--red); }
.article-body h3 { margin: 0 0 6px; font-size: .96rem; }
.article-body ul { margin: 0 0 24px 22px; padding: 0; color: var(--text-light); }
.article-body li { margin-bottom: 9px; font-size: .9rem; line-height: 1.9; }
.steps-list { display: grid; margin: 28px 0 0; padding: 0; gap: 11px; list-style: none; }
.steps-list li { display: flex; padding: 20px; gap: 16px; border: 1px solid var(--border); border-radius: 10px; }
.steps-list li > span { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 50%; color: #fff; background: var(--red); font: 700 .85rem var(--en); }
.steps-list p { margin: 0; font-size: .82rem; line-height: 1.8; }
.faq-section details { border-top: 1px solid var(--light-gray); }
.faq-section details:last-child { border-bottom: 1px solid var(--light-gray); }
.faq-section summary { padding: 18px 3px; font-size: .9rem; font-weight: 700; cursor: pointer; }
.faq-section details p { padding: 0 3px 18px; font-size: .84rem; }
.author-profile { display: flex; margin-top: 72px; padding: 27px; align-items: flex-start; gap: 20px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg); }
.author-avatar { display: grid; width: 62px; height: 62px; flex: 0 0 62px; place-items: center; border-radius: 50%; color: #fff; background: var(--red); font: 700 1rem var(--en); }
.author-label { margin: 0 0 3px !important; color: var(--red) !important; font: 700 .68rem var(--en) !important; letter-spacing: .12em; text-transform: uppercase; }
.author-profile h2 { margin: 0 0 5px; padding: 0; border: 0; font-size: 1rem; }
.author-profile p { margin: 0 0 7px; font-size: .78rem; line-height: 1.75; }
.author-profile a { color: var(--red); font-size: .76rem; font-weight: 700; }
.related-section { margin-top: 72px; }
.related-section > p { margin: -2px 0 20px; color: var(--gray); font-size: .78rem; line-height: 1.75; }
.regional-guides .related-grid { grid-template-columns: repeat(3, 1fr); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.related-grid a { display: block; padding: 18px; border: 1px solid var(--border); border-radius: 9px; text-decoration: none; }
.related-grid a:hover { border-color: #d68b98; }
.related-grid span { display: block; margin-bottom: 7px; color: var(--red); font-size: .65rem; font-weight: 700; }
.related-grid strong { display: block; font-size: .82rem; line-height: 1.55; }
.related-grid p { margin: 7px 0 0; color: var(--gray); font-size: .7rem; line-height: 1.6; }
.soft-cta { display: grid; margin-top: 72px; padding: 28px; grid-template-columns: 1fr auto; align-items: center; gap: 28px; border-top: 3px solid var(--red); background: var(--bg); }
.soft-cta-label { margin: 0 0 5px !important; color: var(--red) !important; font-size: .68rem !important; font-weight: 700; }
.soft-cta h2 { margin: 0 0 7px; padding: 0; border: 0; font-size: 1.05rem; }
.soft-cta p { margin: 0; font-size: .76rem; line-height: 1.7; }
.soft-cta > a { display: inline-flex; min-height: 44px; padding: 10px 18px; align-items: center; justify-content: center; border-radius: 999px; color: #fff; background: var(--dark); font-size: .76rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.footer { padding: 46px 32px; color: rgba(255,255,255,.4); background: var(--dark); text-align: center; font-size: .74rem; }
.footer-links { display: flex; margin-bottom: 15px; justify-content: center; gap: 22px; flex-wrap: wrap; }
.footer a { color: rgba(255,255,255,.65); text-decoration: none; }
.footer p { margin: 5px 0; }

@media (max-width: 980px) {
  .prefecture-map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: 1 / -1; }
  .legend { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav { padding: 0 16px; }
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 60px; right: 12px; left: 12px; padding: 12px; gap: 4px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: #111; box-shadow: 0 12px 32px rgba(0,0,0,.35); }
  .nav-links.open { display: grid; }
  .nav-links a { display: flex; min-height: 48px; padding: 0 14px; align-items: center; color: rgba(255,255,255,.86); }
  .breadcrumb-inner { padding-inline: 20px; }
  .article-header { padding: 36px 0 44px; }
  .article-header-inner { padding: 0 20px; }
  .article-header h1 { font-size: 1.7rem; }
  .article-header h1 br { display: none; }
  .article-lead { font-size: .92rem; }
  .summary-inner { padding: 28px 20px; }
  .summary-stats { grid-template-columns: repeat(2, 1fr); }
  .summary-stats div { min-height: 76px; border-bottom: 1px solid rgba(255,255,255,.13); }
  .summary-stats div:nth-child(2) { border-right: 0; }
  .summary-stats div:nth-child(n+3) { border-bottom: 0; }
  .article-intro, .article-body { width: calc(100% - 40px); }
  .article-intro { padding: 48px 0; }
  .map-section, .program-section { padding: 58px 0 64px; }
  .wide-container { width: calc(100% - 32px); }
  .prefecture-map { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; padding: 16px; }
  .search-field, .reset-button { grid-column: auto; }
  .reset-button { justify-self: start; }
  .program-card { padding: 18px; }
  .card-top { flex-direction: column; }
  .bpo-judgement { width: 100%; min-width: 0; }
  .facts { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .bpo-reason { grid-column: auto; }
  .card-footer { align-items: flex-start; flex-direction: column; }
  .article-body { padding: 64px 0 76px; }
  .author-profile { flex-direction: column; }
  .soft-cta { grid-template-columns: 1fr; }
  .soft-cta > a { justify-self: start; white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
