:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #333333;
  --muted: #666666;
  --line: #d1d5db;
  --primary: oklch(24% 0.07 262.881);
  --primary-light: oklch(44% 0.13 262.881);
  --primary-surface: oklch(24% 0.07 262.881);
  /* ブランド色（紺・アクション色と同一系統） */
  --brand: #1e40af;
  --brand-dark: #17348f;
  /* セクション交互背景用の極薄ティント */
  --tint: #edf4fc;
  /* アクション色（押してほしいボタン専用。紺系） */
  --action: #1e40af;
  --action-hover: #17348f;
  --action-text: #ffffff;
  /* 数値強調・蛍光マーカー */
  --em: #e7380d;
  --marker: #ffe73f;
  --cta: #1e40af;
  --cta-hover: #17348f;
  --cta-text: #fff;
  --success: #16a34a;
  --merit-bg: #f0fdf4;
  --merit-border: #86efac;
  --merit-text: #14532d;
  --demerit-bg: #fef2f2;
  --demerit-border: #fca5a5;
  --demerit-text: #991b1b;
  --badge-bg: #e9f1fc;
  --badge-text: var(--brand);
  --badge-border: #cfdef7;
  --font-sans: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP',
    'Meiryo', sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-light);
}

/* ========== Site Header ========== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo-image {
  display: block;
  width: 238px;
  max-width: 52vw;
  height: auto;
}

.site-header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-header-link {
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.site-header-link--nav {
  color: var(--brand);
  padding: 9px 18px;
  background: #fff;
  border: 1px solid #b6c7e4;
  border-radius: 999px;
}

.site-header-link--nav:hover {
  color: var(--brand-dark);
  background: var(--tint);
  border-color: var(--brand);
}

.site-header-link--cta {
  color: var(--action-text);
  padding: 10px 20px;
  background: var(--action);
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.14);
}

.site-header-link--cta:hover {
  background: var(--action-hover);
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.14);
}

.site-header-mobile-search {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  color: var(--brand);
  text-decoration: none;
  border-radius: 999px;
}

.site-header-mobile-search svg {
  display: block;
  width: 32px;
  height: 32px;
}

.mobile-area-check-cta {
  display: none;
}

/* ========== Site Footer ========== */

.site-footer {
  margin-top: 12px;
  padding: 32px 24px;
  background: #13286e;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer-links a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}

.site-footer-links a:hover {
  color: #fff;
}

/* ========== Legal Pages ========== */

.legal-page .page-header {
  margin-bottom: 24px;
}

.legal-date {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.legal-date--bottom {
  margin: 16px 0 0;
  text-align: right;
}

.legal-section {
  margin-top: 0;
  padding: 0 24px 22px;
  background: var(--card);
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.legal-page .page-header + .legal-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}

.legal-page .legal-section + .legal-section {
  margin-top: 0;
  padding-top: 24px;
}

.legal-page .legal-section:last-child {
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}

.legal-page .page-header + .legal-section:last-child {
  border-radius: var(--radius);
}

.legal-section p {
  margin: 0;
  color: var(--text);
  line-height: 1.9;
}

.legal-section p + p {
  margin-top: 10px;
}

.legal-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.9;
}

.legal-definition-list {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.legal-definition-list > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.legal-definition-list > div:first-child {
  border-top: none;
}

.legal-definition-list dt,
.legal-definition-list dd {
  margin: 0;
  padding: 12px 14px;
}

.legal-definition-list dt {
  color: var(--muted);
  font-weight: 700;
  background: #f8fafc;
}

.legal-definition-list dd {
  color: var(--text);
  background: #fff;
}

.legal-info-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin: 0;
}

.legal-info-list--compact {
  max-width: 720px;
}

.legal-info-list > div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
  padding: 4px 0;
}

.legal-info-list dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.8;
}

.legal-info-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ========== About Page ========== */

.about-page {
  max-width: 980px;
  padding-top: 32px;
}

.about-page .breadcrumbs {
  margin-bottom: 16px;
}

.about-page .page-header {
  margin-bottom: 30px;
  padding: 0 2px;
}

.about-page .page-header h1 {
  margin-bottom: 12px;
  font-size: 1.75rem;
  line-height: 1.35;
}

.about-page .lead {
  max-width: none;
  color: #374151;
  font-size: 0.96rem;
  line-height: 1.9;
}

.about-page .legal-section,
.legal-page.about-page .page-header + .legal-section,
.legal-page.about-page .legal-section + .legal-section,
.legal-page.about-page .legal-section:last-child,
.legal-page.about-page .page-header + .legal-section:last-child {
  margin-top: 20px;
  padding: 30px 32px;
  background: #fff;
  border: 1px solid #d7dce3;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.about-page .page-header + .legal-section {
  margin-top: 0;
}

.about-page .section-title {
  margin-bottom: 18px;
  color: #111827;
  font-size: 1.12rem;
  line-height: 1.45;
}

.about-page .legal-section p,
.about-page .legal-list,
.about-page .legal-info-list dd {
  color: #2f3744;
  font-size: 0.95rem;
  line-height: 1.95;
}

.about-page .legal-section p + p {
  margin-top: 14px;
}

.about-page .legal-info-list {
  gap: 0;
  margin-top: 22px;
  border-top: 1px solid #e5e7eb;
}

.about-page .legal-info-list > div {
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding: 15px 0;
  border-bottom: 1px solid #e5e7eb;
}

.about-page .legal-info-list dt {
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.9;
}

.about-page .legal-list {
  padding-left: 18px;
}

.about-page .legal-list li + li {
  margin-top: 5px;
}

/* ========== Page Layout ========== */

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.page-header {
  margin-bottom: 20px;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
}

.breadcrumbs {
  margin-bottom: 12px;
}

.breadcrumbs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.breadcrumbs-item {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs-item + .breadcrumbs-item::before {
  content: '>';
  margin: 0 4px;
  color: #999;
}

.breadcrumbs-item a {
  color: var(--primary-light);
  text-decoration: none;
}

.breadcrumbs-item a:hover {
  text-decoration: underline;
}

.breadcrumbs-item [aria-current='page'] {
  color: var(--text);
  font-weight: 600;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ========== Section ========== */

.section {
  margin-top: 32px;
}

.section.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.results-count {
  margin: 0;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--muted);
}

.section.results-filter-section {
  margin-top: 32px;
}

.results-filter {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 20px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.results-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.results-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  min-width: 64px;
}

.results-filter-tabs {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.results-filter-tab {
  appearance: none;
  border: 1px solid #93abd6;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.results-filter-tab:hover {
  background: var(--tint);
  border-color: var(--brand);
}

.results-filter-tab.is-active {
  background: var(--cta);
  border-color: var(--cta);
  color: var(--cta-text);
}

.results-filter-select {
  min-width: 220px;
  max-width: 100%;
  appearance: auto;
  border: 1px solid #93abd6;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.results-filter-select:focus {
  outline: 2px solid rgba(30, 64, 175, 0.25);
  border-color: var(--brand);
}

.results-filter-combobox {
  position: relative;
  width: min(360px, 100%);
}

.results-filter-combobox-toggle {
  appearance: none;
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #93abd6;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.results-filter-combobox-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-filter-combobox-toggle svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--ink);
}

.results-filter-combobox-toggle:focus {
  outline: 2px solid rgba(30, 64, 175, 0.25);
  border-color: var(--brand);
}

.results-filter-combobox-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--badge-border);
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.results-filter-combobox-search {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 9px;
}

.results-filter-combobox-search:focus {
  outline: 2px solid oklch(54.6% 0.245 262.881 / 0.22);
  border-color: var(--cta);
}

.results-filter-combobox-options {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
}

.results-filter-combobox-options li + li {
  margin-top: 2px;
}

.results-filter-combobox-option {
  appearance: none;
  width: 100%;
  display: block;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.results-filter-combobox-option:hover,
.results-filter-combobox-option:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.05);
}

.results-filter-combobox-option.is-selected {
  background: var(--cta);
  color: var(--cta-text);
}

.results-filter-combobox-empty {
  margin: 8px 0 2px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.is-filter-hidden {
  display: none !important;
}

.spec-item.is-filter-empty dd::before {
  content: "—";
  color: var(--muted);
  font-weight: 600;
}

.spec-item.is-filter-empty .fee-entry {
  display: none !important;
}

.section-title {
  margin: 0 0 16px;
  padding: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  border-left: none;
  background: none;
  letter-spacing: -0.01em;
}

/* ========== Service Group Summary ========== */

.service-group-summary {
  margin-top: 24px;
}

.service-group-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.service-group-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.service-group-card.is-available {
  border-color: var(--merit-border);
  background: #f0fdf4;
}

.service-group-card.is-needs_check {
  border-color: #fde68a;
  background: #fefce8;
}

.service-group-status {
  display: flex;
  align-items: center;
}

.service-group-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.service-group-icon.is-available {
  color: #fff;
  background: var(--success);
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
}

.service-group-icon.is-needs_check {
  color: #fff;
  background: #f59e0b;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.service-group-icon.is-unavailable {
  color: #9ca3af;
  background: #f3f4f6;
  border: 1px solid var(--line);
}

.service-group-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.service-group-label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.service-group-description {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.service-group-availability {
  margin: 4px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
}

.service-group-availability.is-available {
  color: #166534;
}

.service-group-availability.is-needs_check {
  color: #b45309;
}

.service-group-availability.is-unavailable {
  color: #9ca3af;
}

.service-group-services {
  list-style: none;
  margin: 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.service-group-card.is-available .service-group-services {
  border-top-color: #dcfce7;
}

.service-group-services li {
  display: inline-flex;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border-radius: 999px;
}

.service-group-services li.is-available {
  color: #166534;
  background: #dcfce7;
}

.service-group-services li.is-needs_check {
  color: #92400e;
  background: #fef3c7;
}

.service-group-services li.is-unavailable {
  color: #6b7280;
  background: #f3f4f6;
}

.service-group-services li.service-group-more {
  background: none;
  color: var(--primary-light);
  font-size: 0.68rem;
  padding: 2px 4px;
}

.service-group-note {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 767px) {
  .service-group-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .service-group-card {
    padding: 14px 12px;
    gap: 10px;
  }

  .service-group-label {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .service-group-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Result List ========== */

.compare-results {
  margin-top: 16px;
}

.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

/* ========== Result Card ========== */

.result-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 24px 26px;
  border: 1px solid #dbe4f2;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 2px 10px rgba(19, 40, 110, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.result-card.has-open-popover {
  z-index: 40;
}

.detail-card.has-open-popover {
  position: relative;
  z-index: 40;
}

.result-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.result-card.is-needs-check {
  border-color: #f4c77d;
  border-left: 4px solid #f59e0b;
  background: #fffaf0;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.08);
}

.result-card.is-needs-check:hover {
  box-shadow: 0 6px 18px rgba(180, 83, 9, 0.14);
}

/* Head */

.result-head {
  display: grid;
  gap: 8px;
}

.service-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
  color: var(--text);
}

.service-name a {
  color: var(--brand);
  text-decoration: none;
}

.service-name a:hover {
  text-decoration: underline;
}

.result-availability-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #92400e;
}

.result-availability-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid #f4c77d;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

.result-availability-text {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
}

.service-provider {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.825rem;
}

.service-provider .label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #eee;
  padding: 2px 8px;
  border-radius: 999px;
}

.service-provider .value {
  font-weight: 600;
  color: var(--text);
}

.service-type {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Badges */

.badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--badge-text);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 999px;
}

.badge--with-info {
  position: relative;
  gap: 6px;
  padding-right: 6px;
}

.benefit-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--badge-text);
  cursor: pointer;
}

.benefit-info-button:hover,
.benefit-info-button:focus-visible {
  background: rgba(26, 39, 68, 0.12);
}

.benefit-info-button:focus-visible {
  outline: 2px solid rgba(26, 39, 68, 0.25);
  outline-offset: 1px;
}

.benefit-info-button svg {
  width: 16px;
  height: 16px;
}

.benefit-info-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  display: none;
  width: min(320px, calc(100vw - 40px));
  padding: 10px 12px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

.benefit-info-popover.is-open {
  display: block;
}

.benefit-info-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 18px;
  width: 10px;
  height: 10px;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  transform: rotate(45deg);
}

.benefit-info-popover p {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.7;
}

.fee-entry-info {
  display: inline-flex;
  align-items: center;
}

.fee-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--badge-text);
  cursor: pointer;
}

.fee-info-button:hover,
.fee-info-button:focus-visible {
  background: rgba(26, 39, 68, 0.12);
}

.fee-info-button:focus-visible {
  outline: 2px solid rgba(26, 39, 68, 0.25);
  outline-offset: 1px;
}

.fee-info-button svg {
  width: 15px;
  height: 15px;
}

.fee-info-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  left: 0;
  display: none;
  width: min(360px, calc(100vw - 40px));
  padding: 10px 12px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  white-space: normal;
}

.fee-info-popover.is-open {
  display: block;
}

.fee-info-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 18px;
  width: 10px;
  height: 10px;
  background: var(--card);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  transform: rotate(45deg);
}

.fee-info-popover-text {
  display: block;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.7;
}

/* Body */

.result-body {
  display: grid;
  gap: 22px;
}

.spec-section {
  display: grid;
  gap: 12px;
}

.spec-section-title {
  margin: 0;
  padding: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  border-bottom: 1px solid #e6ecf6;
}

.spec-grid {
  margin: 0;
  display: grid;
  gap: 12px 16px;
}

.spec-grid--monthly,
.spec-grid--basic {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.spec-grid--other {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-card .spec-grid--other .spec-item[data-fee-section="cancellation"] {
  grid-column: span 2;
}

.result-card .spec-grid--other .spec-item[data-fee-section="cancellation"] dd {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.result-card .spec-grid--other .spec-item[data-fee-section="cancellation"] .fee-entry {
  min-width: 0;
}

.result-card .spec-grid--other .spec-item[data-fee-section="cancellation"] .fee-entry + .fee-entry {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.spec-grid .spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.spec-grid .spec-item--span-2 {
  grid-column: span 2;
}

.result-card .spec-grid--monthly .spec-item.spec-item--multi-fee {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
}

.result-card .spec-grid--monthly .spec-item.spec-item--multi-fee-wide {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.spec-grid--monthly .spec-item--multi-fee dt {
  grid-column: 1 / -1;
}

.spec-grid--monthly .spec-item--multi-fee dd {
  display: contents;
}

.spec-grid--monthly .spec-item--multi-fee .fee-entry {
  min-width: 0;
}

.spec-grid--monthly .spec-item--multi-fee .fee-entry + .fee-entry {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.result-card.is-low-speed-monthly-fees-collapsed:not(.is-low-speed-monthly-fees-open) .spec-grid--monthly .spec-item[data-monthly-fee-collapsed="true"] {
  display: none;
}

.result-card:not(.is-construction-fees-open) .spec-item[data-fee-section="construction"] .fee-entry[data-construction-fee-collapsed="true"] {
  display: none;
}

.monthly-fee-toggle,
.construction-fee-toggle {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 2px 0 0;
  padding: 7px 12px;
  border: 1px solid #c9d6ee;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.monthly-fee-toggle::after,
.construction-fee-toggle::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1;
}

.monthly-fee-toggle:hover,
.construction-fee-toggle:hover {
  border-color: var(--brand);
  background: var(--tint);
}

.result-card.is-low-speed-monthly-fees-open .monthly-fee-toggle::after {
  content: "-";
}

.result-card.is-construction-fees-open .construction-fee-toggle::after {
  content: "-";
}

.spec-grid .spec-item--description dd {
  display: block;
  line-height: 1.75;
}

.spec-grid dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.spec-grid dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* Legacy combined grid (still used by show page) */

.key-specs {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.key-specs .spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.key-specs .spec-item--wide {
  grid-column: 1 / -1;
}

.key-specs .spec-item--span-2 {
  grid-column: span 2;
}

.key-specs .spec-item--wide dd {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: flex-start;
}

.key-specs .spec-item--wide .fee-entry {
  flex: 0 1 auto;
  min-width: 0;
}

.key-specs .spec-item--wide .fee-entry + .fee-entry {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.key-specs .spec-item--description dd {
  display: block;
  line-height: 1.75;
}

.key-specs dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.key-specs dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.real-speed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  line-height: 1.35;
}

.real-speed-table th,
.real-speed-table td {
  padding: 3px 0;
  border-bottom: 1px solid #e8eef8;
  vertical-align: top;
}

.real-speed-table tr:last-child th,
.real-speed-table tr:last-child td {
  border-bottom: none;
}

.real-speed-table th {
  width: 45%;
  padding-right: 8px;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.real-speed-table td {
  color: var(--text);
  font-weight: 700;
  text-align: right;
}

.fee-entry {
  display: block;
  position: relative;
}

.fee-entry.has-open-popover {
  z-index: 50;
}

.fee-entry + .fee-entry {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e8eef8;
}

.fee-entry-tag {
  display: inline-block;
  margin-right: 4px;
  margin-bottom: 4px;
  padding: 1px 8px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #55688c;
  background: #edf2fa;
  border-radius: 999px;
}

.monthly-fee-speed-content .fee-entry-tag,
.spec-grid--monthly .fee-entry-tag,
.spec-item[data-fee-section="construction"] .fee-entry-tag {
  display: block;
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  margin-right: 0;
  margin-bottom: 6px;
  padding: 4px 9px;
  border-radius: 8px;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: normal;
}

.fee-entry-main {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.fee-entry-main--with-info {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  width: fit-content;
}

.fee-entry-main-text {
  min-width: 0;
}

.fee-entry-detail,
.fee-entry-comment {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.45;
}

/* Monthly fee section (show page) */

.monthly-fee-section {
  margin: 0 0 20px;
}

.monthly-fee-section-title {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.monthly-fee-groups {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.monthly-fee-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.015);
}

.monthly-fee-group-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.monthly-fee-speed-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: start;
}

.monthly-fee-speed {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.monthly-fee-speed-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.monthly-fee-speed-content {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* Highlights */

.highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.highlights li {
  position: relative;
  padding-left: 14px;
  font-size: 0.825rem;
  color: var(--muted);
}

.highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

/* Merit / Demerit */

.merit {
  margin: 0;
  padding: 14px 18px;
  font-size: 0.825rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--merit-text);
  background: var(--merit-bg);
  border: 1px solid #d5ecdc;
  border-radius: 10px;
}

.merit strong {
  font-weight: 700;
}

.demerit {
  margin: 0;
  padding: 14px 18px;
  font-size: 0.825rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--demerit-text);
  background: var(--demerit-bg);
  border: 1px solid #f5dcdc;
  border-radius: 10px;
}

.demerit strong {
  font-weight: 700;
}

.merit + .demerit {
  margin-top: 8px;
}

/* Actions */

.result-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 4px;
  border-top: 1px solid #e6ecf6;
}

.result-actions .button {
  padding: 10px 24px;
  font-size: 0.85rem;
}

a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--action-text);
  background: var(--action);
  border: none;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.14);
  transition: all 0.2s ease;
}

a.button:hover {
  background: var(--action-hover);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
  transform: translateY(1px);
}

a.button:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}

/* ========== Availability Banner ========== */

.availability-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--merit-bg);
  border: 1px solid var(--merit-border);
  border-left: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.availability-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 50%;
  color: var(--success);
  border: 1px solid var(--merit-border);
}

.availability-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.availability-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #166534;
}

.availability-text {
  font-size: 1rem;
  font-weight: 700;
  color: #14532d;
}

.availability-note {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

/* 対応回線が未登録のエリア向けのニュートラル配色 */
.availability-banner.is-unsupported {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.availability-banner.is-unsupported .availability-icon {
  color: #64748b;
  border-color: #cbd5e1;
}

.availability-banner.is-unsupported .availability-label,
.availability-banner.is-unsupported .availability-text {
  color: #334155;
}

@media (max-width: 480px) {
  .availability-banner {
    flex-direction: column;
    text-align: center;
  }

  .availability-text {
    font-size: 0.9rem;
  }
}

/* ========== Area Check Result Page ========== */

.area-check-result-page {
  min-height: calc(100vh - 180px);
  background: var(--tint);
  color: var(--text);
}

.area-check-result-inner {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.area-check-result-hero {
  padding: 42px 0 28px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.area-check-result-eyebrow {
  margin: 0 0 8px;
  color: var(--cta);
  font-size: 0.78rem;
  font-weight: 700;
}

.area-check-result-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  line-height: 1.3;
}

.area-check-result-lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.area-check-result-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 20px;
  padding: 28px 0 40px;
  align-items: start;
}

.area-check-result-target,
.area-check-result-services,
.area-check-result-note {
  background: #ffffff;
  border: 1px solid #dbe4f2;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(19, 40, 110, 0.06);
}

.area-check-result-target {
  padding: 20px;
}

.area-check-result-target h2,
.area-check-result-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}

.area-check-result-target-list {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.area-check-result-target-list div {
  display: grid;
  gap: 5px;
}

.area-check-result-target-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.area-check-result-target-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.7;
}

.area-check-result-services {
  padding: 20px;
}

.area-check-result-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.area-check-result-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.area-check-result-service-list {
  list-style: none;
  display: grid;
  gap: 16px;
  margin: 16px 0 0;
  padding: 0;
}

.area-check-result-service-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid #dbe4f2;
  border-left: 4px solid #94a3b8;
  border-radius: 12px;
  background: #ffffff;
}

.area-check-result-service-card.is-available {
  border-left-color: #16a34a;
}

.area-check-result-service-card.is-unavailable {
  border-left-color: #ef4444;
}

.area-check-result-service-card.is-unconfirmed {
  border-left-color: #f59e0b;
}

.area-check-result-service-card.is-undetermined {
  border-left-color: #64748b;
}

.area-check-result-service-main {
  min-width: 0;
}

.area-check-result-service-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.area-check-result-service-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
}

.area-check-result-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
}

.area-check-result-service-card.is-available .area-check-result-status {
  background: #dcfce7;
  color: #166534;
}

.area-check-result-service-card.is-unavailable .area-check-result-status {
  background: #fee2e2;
  color: #991b1b;
}

.area-check-result-service-card.is-undetermined .area-check-result-status {
  background: #e2e8f0;
  color: #334155;
}

.area-check-result-service-group {
  display: inline-flex;
  align-items: center;
  margin: 8px 0 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
}

.area-check-result-service-message {
  margin: 9px 0 0;
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.7;
}

.area-check-result-service-action {
  display: flex;
  justify-content: flex-end;
}

.area-check-result-apply-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--action);
  color: var(--action-text);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.14);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.area-check-result-apply-button:hover {
  background: var(--action-hover);
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
}

.area-check-result-apply-button:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}

.area-check-result-apply-button .cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
}

.area-check-result-apply-button .cta-arrow svg {
  display: block;
  width: 1.1em;
  height: 1.1em;
}

.area-check-result-apply-button:hover .cta-arrow {
  transform: translateX(3px);
}

.area-check-result-no-link {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.area-check-result-note {
  margin-bottom: 44px;
  padding: 16px 20px;
}

.area-check-result-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

@media (max-width: 760px) {
  .area-check-result-hero {
    padding: 32px 0 22px;
  }

  .area-check-result-grid {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }

  .area-check-result-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .area-check-result-service-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .area-check-result-service-action {
    justify-content: stretch;
  }

  .area-check-result-apply-button {
    width: 100%;
  }
}

/* ========== Service Detail (Show Page) ========== */

.service-detail {
  margin-top: 24px;
}

.detail-card {
  background: var(--card);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  overflow: visible;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.detail-header {
  padding: 20px 24px;
  background: #eef2f7;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}

.detail-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.availability {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.825rem;
  color: var(--muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
}

.detail-body {
  padding: 24px;
}

.spec-group-title {
  margin: 0 0 12px;
  padding: 0 0 8px;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--muted);
  border-left: none;
  border-bottom: 2px solid var(--line);
}

.spec-group-title:not(:first-child) {
  margin-top: 24px;
}

.key-specs--detail {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.key-specs--detail .spec-item--real-speed {
  grid-column: span 2;
  min-width: 0;
}

.key-specs--detail .spec-item--benefits {
  grid-column: span 2;
}

.merit-demerit-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-actions {
  margin-top: 20px;
  padding-top: 20px;
}

a.button-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--action-text);
  background: var(--action);
  border: none;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.16);
  transition: all 0.2s ease;
}

a.button-cta:hover {
  background: var(--action-hover);
  transform: translateY(1px);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.16);
}

a.button-cta:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}

.cta-text {
  letter-spacing: 0.02em;
}

.cta-arrow {
  flex: 0 0 auto;
  line-height: 0;
  transition: transform 0.15s ease;
}

a.button-cta span.cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
}

a.button-cta span.cta-arrow svg,
a.button-cta svg.cta-arrow {
  display: block;
  width: 1.2em;
  height: 1.2em;
}

a.button-cta:hover .cta-arrow {
  transform: translateX(3px);
}

/* ========== Municipality List ========== */

.municipality-services {
  margin-top: 32px;
}

.available-area-prefecture-button {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.available-area-prefecture-button span {
  min-width: 0;
}

.available-area-prefecture-button::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--primary-light);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.available-area-prefecture-button:hover {
  color: var(--primary);
  background: #eef2f7;
  border-color: rgba(44, 82, 130, 0.22);
  box-shadow: var(--shadow-md);
}

.available-area-prefecture-button:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
}

.available-area-prefecture-button[aria-expanded="true"]::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.municipality-filter {
  display: grid;
  grid-template-columns: minmax(220px, 360px) auto 1fr;
  align-items: end;
  gap: 10px 12px;
  margin: 0 0 16px;
}

.municipality-filter-label {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.municipality-filter-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.municipality-filter-input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.14);
}

.municipality-filter-clear {
  min-height: 44px;
  padding: 0 16px;
  color: var(--primary-light);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.municipality-filter-clear:hover {
  color: var(--primary);
  background: #eef2f7;
}

.municipality-filter-count {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

.municipality-filter-empty {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.municipality-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.other-services-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.other-services-list li {
  display: flex;
}

.municipality-list li[hidden] {
  display: none;
}

.other-services-list a {
  width: 100%;
}

.municipality-list li {
  margin: 0;
}

.municipality-list a,
.municipality-list .municipality-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  background: var(--card);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.municipality-list a {
  transition: all 0.2s ease;
}

.municipality-list .municipality-text {
  color: var(--text);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(209, 213, 219, 0.72);
  box-shadow: none;
  cursor: default;
}

.municipality-list a:hover {
  color: var(--brand-dark);
  background: var(--tint);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.available-area-prefecture-list {
  display: grid;
  gap: 20px;
}

.available-area-prefecture {
  scroll-margin-top: 72px;
}

.available-area-prefecture-header {
  margin: 0 0 10px;
}

.available-area-prefecture .municipality-list[hidden] {
  display: none;
}

.available-area-prefecture-cta {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.available-area-prefecture-cta[hidden] {
  display: none;
}

.available-area-prefecture-cta a.button-cta {
  max-width: 420px;
}

.available-area-prefecture-title {
  margin: 0;
  width: 100%;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.available-area-empty {
  margin: 0;
  padding: 16px 18px;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.ten-giga-prefecture-link {
  gap: 8px;
}

.ten-giga-count {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  color: var(--brand-dark);
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
}

.region-prefectures a:hover .ten-giga-count {
  color: #fff;
  background: rgba(255, 255, 255, 0.25);
}

.ten-giga-area-list {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.ten-giga-area-link {
  flex-direction: column;
  gap: 5px;
  min-height: 62px;
}

.ten-giga-area-name {
  text-align: center;
}

.ten-giga-area-status {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.ten-giga-area-link.is-supported .ten-giga-area-status {
  color: #15803d;
}

.ten-giga-area-link.is-unsupported {
  color: var(--text);
}

.ten-giga-service-list {
  margin-top: 12px;
}

.ten-giga-service-list .ten-giga-service-item {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
  background: var(--card);
  border: 1px solid var(--line);
}

/* ========== Hero Section ========== */

.hero {
  text-align: center;
  padding: 48px 32px 44px;
  background: var(--tint);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

#shared-address-search-hero {
  scroll-margin-top: 80px;
}

.hero--embedded {
  margin: 56px 0 48px;
  background: linear-gradient(135deg, #244cc4 0%, var(--brand) 45%, #152f7f 100%);
}

.hero--embedded::before,
.hero--embedded::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.hero--embedded::before {
  width: 340px;
  height: 340px;
  top: -170px;
  left: -110px;
}

.hero--embedded::after {
  width: 420px;
  height: 420px;
  right: -150px;
  bottom: -240px;
}

.hero.hero--embedded h1 {
  color: #fff;
}

.hero--embedded .hero-marker {
  color: #fff;
  background: none;
}

.hero--embedded .hero-lead {
  color: rgba(255, 255, 255, 0.88);
}

.hero--embedded .search-hint {
  color: rgba(255, 255, 255, 0.78);
}

.hero--embedded .search-form-inner:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45), 0 6px 20px rgba(0, 0, 0, 0.18);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 3.2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.45;
  position: relative;
}

.hero-marker {
  display: inline-block;
  padding: 0 2px;
  background: linear-gradient(transparent 62%, var(--marker) 62%);
}

.hero-lead {
  margin: 0 0 26px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  position: relative;
}

.search-form {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}

.search-form--compact {
  max-width: 100%;
}

.search-form-inner {
  display: flex;
  gap: 6px;
  width: 100%;
  padding: 6px;
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(30, 80, 160, 0.16);
  transition: box-shadow 0.2s ease;
}

.search-form--compact .search-form-inner {
  border: 1px solid #dadce0;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.12);
}

.search-form--compact .search-form-inner:hover {
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.16);
}

.search-form-inner:focus-within {
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.32), 0 6px 20px rgba(30, 80, 160, 0.16);
}

.search-form--compact .search-form-inner:focus-within {
  border-color: #c4cbd8;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.2);
}

/* コンパクト版は縦を詰める（モバイルは共通の1行仕様を使うためデスクトップのみ） */
@media (min-width: 768px) {
  .search-form--compact .search-form-inner {
    padding: 4px 6px;
  }

  .search-form--compact .search-input {
    height: 42px;
    min-height: 42px;
    line-height: 42px;
  }

  .search-form--compact .search-button {
    height: 42px;
    min-height: 42px;
    padding: 0 28px;
    font-size: 1rem;
  }
}

.search-input {
  display: block;
  flex: 1;
  width: 100%;
  height: 52px;
  min-height: 52px;
  padding: 0 20px;
  font-size: 1rem;
  line-height: 52px;
  color: var(--text);
  background: #fff;
  border: none;
  border-radius: 999px;
  appearance: none;
}

.search-form--compact .search-input {
  border: none;
}

.search-input:focus {
  outline: none;
}

.search-input::placeholder {
  color: #aaa;
}

.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 52px;
  min-height: 52px;
  padding: 0 32px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--action-text);
  background: var(--action);
  border: none;
  border-radius: 999px;
  appearance: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-button-icon {
  display: none;
  width: 20px;
  height: 20px;
}

.search-button:hover {
  background: var(--action-hover);
}

.search-hint {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  position: relative;
}

.search-form--compact .search-hint {
  color: var(--muted);
}

/* ========== Stats Grid ========== */

.stats-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: none;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 24px 12px 20px;
  background: var(--card);
  border: 2px solid #bfd0ea;
  border-radius: 12px;
}

.stat-number {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

/* ========== Service Grid ========== */

.service-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.service-mini-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--card);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.service-mini-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-mini-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.service-mini-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.service-mini-badges .badge {
  font-size: 0.6rem;
  padding: 1px 5px;
}

/* ========== Region List ========== */

.region-list {
  display: grid;
  gap: 12px;
  background: none;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.region-group {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.region-label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  padding: 12px 14px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.region-prefectures {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.region-prefectures li {
  margin: 0;
}

.region-prefectures a,
.region-prefectures .region-prefecture-name {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--brand);
  border-radius: 999px;
  background: var(--tint);
}

.region-prefectures a {
  text-decoration: none;
  transition: all 0.2s ease;
}

.region-prefectures .region-prefecture-name {
  color: var(--text);
}

.region-prefectures a:hover {
  color: #fff;
  background: var(--brand);
}

.prefecture-link--disabled {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #b0b0b0;
  background: #f3f4f6;
  border-radius: 999px;
}

/* ========== Steps Grid ========== */

.steps-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: none;
}

.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 20px 26px;
  background: var(--card);
  border: 2px solid #bfd0ea;
  border-radius: 12px;
  text-align: center;
  box-shadow: none;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
  box-shadow: none;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.step-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ========== Search Results ========== */

.search-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 16px;
}

.search-results-heading .section-title {
  margin: 0;
}

.search-results-prefecture-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.search-results-prefecture-filter select {
  min-width: 128px;
  max-width: 100%;
  min-height: 38px;
  padding: 7px 32px 7px 12px;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  background: #fff;
  border: 1px solid #93abd6;
  border-radius: 8px;
  cursor: pointer;
}

.search-results-prefecture-filter select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}

.search-results-list {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  grid-auto-rows: 1fr;
}

.search-results-list li {
  min-width: 0;
}

.search-results-list a {
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  height: 100%;
  min-height: 64px;
  padding: 12px 38px 12px 16px;
  text-align: left;
}

.search-results-list a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #6d87d0;
  border-right: 2px solid #6d87d0;
  transform: translateY(-50%) rotate(45deg);
}

.search-results-list .search-result-name {
  word-break: keep-all;
}

.search-results-list .search-result-meta {
  min-width: 0;
}

.station-search-results-list {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.station-search-results-list .search-result-meta {
  line-height: 1.45;
}

.search-result-name {
  font-weight: 700;
  color: var(--text);
}

.search-result-meta {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ========== Responsive: Hero & New Sections ========== */

@media (max-width: 767px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .hero {
    padding: 32px 20px 28px;
    border-radius: 16px;
  }

  .hero--embedded {
    margin: 36px 0 32px;
  }

  .hero h1 {
    font-size: 1.35rem;
  }

  .area-check-cta-inner {
    padding: 36px 20px;
  }

  /* 紺バナーの円形装飾はスマホでは小さめにする */
  .area-check-cta-inner::before,
  .hero--embedded::before {
    width: 150px;
    height: 150px;
    top: -75px;
    left: -50px;
  }

  .area-check-cta-inner::after,
  .hero--embedded::after {
    width: 190px;
    height: 190px;
    right: -70px;
    bottom: -110px;
  }

  .area-check-cta-title {
    font-size: 1.3rem;
  }

  .area-check-cta-inner a.button-cta {
    min-height: 58px;
    padding: 12px 16px;
    font-size: 1rem;
  }

  .search-results-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-results-prefecture-filter,
  .search-results-prefecture-filter select {
    width: 100%;
  }

  .search-results-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-results-list .search-result-name {
    flex: initial;
    min-width: 0;
    word-break: normal;
  }

  .station-search-results-list {
    grid-template-columns: 1fr;
  }

  /* スマホの検索フォームは1行のまま、ボタンをアイコン化する */
  .search-form-inner {
    gap: 6px;
    padding: 5px;
  }

  .search-input {
    min-width: 0;
    height: 46px;
    min-height: 46px;
    padding: 0 14px;
    font-size: 16px;
    line-height: 46px;
  }

  .search-button {
    width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 50%;
  }

  .search-button-label {
    display: none;
  }

  .search-button-icon {
    display: block;
    width: 26px;
    height: 26px;
  }

  .stats-grid {
    gap: 8px;
  }

  .stat-item {
    padding: 14px 8px;
  }

  .stat-number {
    font-size: 1.2rem;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .region-group {
    grid-template-columns: 1fr;
  }

  .region-label {
    padding: 8px 14px;
    justify-content: flex-start;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .step-card {
    flex-direction: row;
    text-align: left;
    padding: 16px 18px;
    gap: 14px;
  }

  .step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .site-header-inner {
    padding: 0 16px;
  }

  .site-header-nav {
    display: none;
  }

  .site-header-mobile-search {
    display: inline-flex;
  }

  .mobile-area-check-cta {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 16px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 360px;
    min-height: 50px;
    margin: 0 auto;
    padding: 0 22px;
    color: var(--action-text);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    background: var(--action);
    border-radius: 999px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.16), 0 8px 20px rgba(0, 0, 0, 0.2);
  }
}

/* ========== Notes Section ========== */

.notes {
  list-style: none;
  margin: 0;
  padding: 16px 20px;
  display: grid;
  gap: 6px;
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.notes li {
  position: relative;
  padding-left: 16px;
  font-size: 0.82rem;
  color: var(--text);
}

.notes li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: bold;
}

/* ========== Record Table ========== */

.record-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.record-table th,
.record-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e5e5;
  text-align: left;
  font-size: 0.825rem;
  vertical-align: top;
}

.record-table thead th {
  background: #f1f3f7;
  color: var(--muted);
  font-weight: 600;
}

.record-table tbody tr:last-child td {
  border-bottom: none;
}

/* ========== Responsive ========== */

@media (max-width: 1024px) {
  .result-card .spec-grid--basic .spec-item--real-speed {
    grid-column: span 2;
  }
}

@media (min-width: 768px) {
  .result-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'head actions'
      'body body';
    align-items: start;
    gap: 14px 20px;
  }

  .result-head {
    grid-area: head;
    min-width: 0;
  }

  .result-body {
    grid-area: body;
    min-width: 0;
  }

  .result-actions {
    grid-area: actions;
    border-top: none;
    padding-top: 0;
    align-self: center;
    justify-content: flex-end;
  }

  .other-services-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .page {
    padding: 20px 16px 40px;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }

  .section.sort-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .municipality-filter {
    grid-template-columns: 1fr auto;
  }

  .municipality-filter-label {
    grid-column: 1 / -1;
  }

  .municipality-filter-count {
    grid-column: 1 / -1;
    margin-bottom: 0;
    text-align: left;
  }

  .key-specs {
    grid-template-columns: repeat(2, 1fr);
  }

  .spec-grid--monthly,
  .spec-grid--basic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-card .spec-grid--monthly .spec-item[data-spec-group="detached"] {
    grid-column: 1;
  }

  .result-card .spec-grid--monthly .spec-item[data-spec-group="mansion"] {
    grid-column: 2;
  }

  .result-card .spec-grid--monthly .spec-item.spec-item--multi-fee {
    grid-column: 1 / -1;
  }

  .result-card .spec-grid--monthly .spec-item.spec-item--multi-fee-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-card .spec-grid--monthly .spec-item--multi-fee + .spec-item[data-spec-group="mansion"]:not(.spec-item--multi-fee) {
    grid-column: 1;
  }

  .result-card .spec-grid--basic .spec-item[data-fee-section="construction"] {
    grid-column: 1 / -1;
  }

  .result-card .spec-grid--basic .spec-item[data-fee-section="construction"] dd {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .result-card .spec-grid--basic .spec-item[data-fee-section="construction"] .fee-entry {
    min-width: 0;
  }

  .result-card .spec-grid--basic .spec-item[data-fee-section="construction"] .fee-entry + .fee-entry {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  .result-actions {
    border-top: none;
  }

  a.button-cta span.cta-arrow,
  a.button-cta svg.cta-arrow {
    display: none;
  }

  .spec-grid--other {
    grid-template-columns: 1fr;
  }

  .result-card .spec-grid--other .spec-item[data-fee-section="cancellation"] {
    grid-column: auto;
  }

  .result-card .spec-grid--other .spec-item[data-fee-section="cancellation"] dd {
    grid-template-columns: 1fr;
  }
}

/* ========== Auth (Devise Session) ========== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: #091223;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px 24px;
  border: 1px solid #223352;
  border-radius: 4px;
  background: #0e1a30;
}

.auth-header h1 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #f8fbff;
}

.auth-header p {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: #9fb0cc;
}

.auth-form {
  margin-top: 20px;
  display: grid;
  gap: 14px;
}

.auth-field {
  margin: 0;
}

.auth-label {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #d5e2f7;
}

.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #314769;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #e8effb;
  background: #081326;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--cta);
  box-shadow: 0 0 0 3px oklch(54.6% 0.245 262.881 / 0.22);
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.auth-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--cta);
}

.auth-remember-label {
  font-size: 0.9rem;
  color: #c9d7ec;
}

.auth-submit {
  margin-top: 4px;
  width: 100%;
  height: 44px;
  border: 1px solid var(--cta-hover);
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: var(--cta);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.auth-submit:hover {
  background: var(--cta-hover);
  border-color: #b45309;
}

.auth-submit:active {
  background: #b45309;
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-links {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.auth-links p {
  margin: 0;
}

.auth-links a {
  color: #fbbf24;
  font-size: 0.88rem;
  text-decoration: none;
}

.auth-links a:hover {
  color: #fcd34d;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-card #error_explanation {
  margin-top: 0;
  margin-bottom: 12px;
  border-color: #7f1d1d;
  background: #3f1212;
}

.auth-card #error_explanation h2 {
  color: #fecaca;
}

.auth-card #error_explanation ul {
  color: #fca5a5;
}

#error_explanation {
  margin-top: 16px;
  margin-bottom: 6px;
  padding: 12px 14px;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  background: #fef2f2;
}

#error_explanation h2 {
  margin: 0;
  font-size: 0.85rem;
  color: #b91c1c;
}

#error_explanation ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #991b1b;
  font-size: 0.83rem;
}

/* ========== Admin Console ========== */

.admin-console {
  --admin-bg: #091223;
  --admin-surface: #0e1a30;
  --admin-surface-2: #101f3a;
  --admin-border: #223352;
  --admin-border-strong: #2f4a73;
  --admin-text: #e8effb;
  --admin-muted: #9fb0cc;
  --admin-accent: #2563eb;
  --admin-accent-hover: #1d4ed8;
  --admin-accent-soft: #152a52;

  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: var(--admin-bg);
  color: var(--admin-text);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100vh;
  max-height: 100vh;
  padding: 20px 16px;
  border-right: 1px solid var(--admin-border);
  background: var(--admin-surface);
  overflow-y: auto;
}

.admin-brand {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-brand-eyebrow {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--admin-muted);
}

.admin-brand-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--admin-text);
}

.admin-nav {
  display: grid;
  gap: 6px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: #c9d7ec;
  border: 1px solid transparent;
  background: transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.admin-nav-link:hover {
  color: var(--admin-text);
  border-color: var(--admin-border-strong);
  background: var(--admin-surface-2);
}

.admin-nav-link.is-active {
  color: #eaf2ff;
  border-color: var(--admin-accent);
  background: var(--admin-accent-soft);
}

.admin-nav-link.is-disabled {
  color: #6c7f9d;
  border-color: var(--admin-border);
  cursor: not-allowed;
}

.admin-sidebar-spacer {
  flex: 1;
}

.admin-sidebar-footer form {
  margin: 0;
}

.admin-current-admin {
  margin: 8px 0 0;
  color: var(--admin-muted);
  font-size: 0.72rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-align: center;
}

.admin-logout {
  width: 100%;
  height: 40px;
  border: 1px solid var(--admin-border-strong);
  border-radius: 4px;
  background: #111f39;
  color: #d5e2f7;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-logout:hover {
  background: #142749;
  border-color: #3b5e92;
}

.admin-main {
  min-width: 0;
  padding: 24px 28px 32px;
}

.admin-main-header {
  margin-bottom: 14px;
}

.admin-main-header h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--admin-text);
}

.admin-main-subtitle {
  margin: 8px 0 0;
  font-size: 0.93rem;
  color: var(--admin-muted);
}

.admin-panel {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  background: var(--admin-surface);
}

.admin-flash {
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-flash--notice {
  color: #bfdbfe;
  background: #10213e;
  border: 1px solid #284a7a;
}

.admin-flash--alert {
  color: #fecaca;
  background: #3f1212;
  border: 1px solid #7f1d1d;
}

.admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-service-actions {
  display: grid;
  gap: 6px;
  min-width: 5rem;
}

.admin-service-actions .admin-back-link {
  white-space: nowrap;
}

.admin-service-url-list {
  display: grid;
  gap: 8px;
}

.admin-service-url-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 6px;
}

.admin-service-url-label {
  color: var(--admin-muted);
  font-weight: 700;
  white-space: nowrap;
}

.admin-service-url-list .admin-back-link {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-services-table-panel {
  overflow-x: auto;
}

.admin-services-table {
  min-width: 2040px;
}

.admin-services-table th:nth-child(7),
.admin-services-table td:nth-child(7) {
  min-width: 420px;
}

.admin-services-table th:nth-child(8),
.admin-services-table td:nth-child(8) {
  min-width: 420px;
}

.admin-service-affiliate-urls-panel {
  overflow-x: auto;
}

.admin-service-affiliate-urls-table {
  min-width: 760px;
}

.admin-service-affiliate-urls-table th:nth-child(1),
.admin-service-affiliate-urls-table td:nth-child(1) {
  width: 100px;
}

.admin-service-affiliate-urls-table th:nth-child(2),
.admin-service-affiliate-urls-table td:nth-child(2) {
  width: 260px;
}

.admin-service-affiliate-url-form {
  margin: 0;
}

.admin-service-affiliate-url-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-service-affiliate-url-field .admin-input {
  min-width: 320px;
}

.admin-service-affiliate-url-submit {
  flex: 0 0 auto;
  min-width: 84px;
}

.admin-service-affiliate-url-error {
  margin: 6px 0 0;
  color: #fca5a5;
  font-size: 0.78rem;
}

.admin-service-url-checked-heading,
.admin-service-url-checked-cell {
  min-width: 88px;
  text-align: center;
  white-space: nowrap;
}

.admin-url-checked-toggle {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #52627a;
  border-radius: 4px;
  color: transparent;
  background: #0b1629;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.admin-url-checked-toggle:hover {
  border-color: #7f93b1;
  background: #12213a;
}

.admin-url-checked-toggle.is-checked {
  border-color: #22c55e;
  color: #dcfce7;
  background: #166534;
}

.admin-url-checked-toggle:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.admin-url-checked-toggle:disabled {
  cursor: wait;
  opacity: 0.55;
}

.admin-url-checked-icon {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.admin-result-mail-action {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.admin-result-mail-action[hidden] {
  display: none;
}

.admin-result-mail-form {
  margin: 0;
}

.admin-result-mail-button {
  min-height: 48px;
  border: 1px solid #16a34a;
  border-radius: 4px;
  padding: 0 28px;
  color: #ecfdf5;
  background: #15803d;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-result-mail-button:hover {
  border-color: #22c55e;
  background: #166534;
}

.admin-result-mail-button:focus-visible {
  outline: 2px solid #86efac;
  outline-offset: 2px;
}

.admin-filter-state {
  color: var(--admin-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-filter-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-service-search-form {
  flex: 1 0 100%;
  align-items: end;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--admin-border);
}

.admin-service-result-count {
  margin: 12px 4px 0;
  color: var(--admin-muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: right;
}

.admin-service-result-count strong {
  margin: 0 3px;
  color: var(--admin-text);
  font-size: 1rem;
}

.admin-filter-field {
  display: grid;
  gap: 6px;
}

.admin-service-name-filter {
  width: min(360px, 100%);
}

.admin-analytics-service-filter {
  width: 280px;
}

.admin-filter-label {
  color: var(--admin-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-filter-select {
  width: auto;
  min-width: 170px;
  height: 36px;
  border: 1px solid #314769;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 0.88rem;
  color: var(--admin-text);
  background: #081326;
}

.admin-filter-submit {
  height: 36px;
  border: 1px solid #1d4ed8;
  border-radius: 4px;
  padding: 0 14px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fbff;
  background: var(--admin-accent);
  cursor: pointer;
}

.admin-filter-submit:hover {
  background: var(--admin-accent-hover);
}

/* ========== Reusable Searchable Select ========== */

.searchable-select {
  --searchable-select-bg: #fff;
  --searchable-select-panel: #fff;
  --searchable-select-border: #cbd5e1;
  --searchable-select-text: #172033;
  --searchable-select-muted: #64748b;
  --searchable-select-active: #e0ecff;
  position: relative;
  width: 100%;
  color: var(--searchable-select-text);
}

.admin-console .searchable-select {
  --searchable-select-bg: #081326;
  --searchable-select-panel: #0e1a30;
  --searchable-select-border: #314769;
  --searchable-select-text: var(--admin-text);
  --searchable-select-muted: var(--admin-muted);
  --searchable-select-active: var(--admin-accent-soft);
}

.searchable-select-toggle,
.searchable-select-search {
  width: 100%;
  height: 36px;
  border: 1px solid var(--searchable-select-border);
  border-radius: 4px;
  color: var(--searchable-select-text);
  background: var(--searchable-select-bg);
  font: inherit;
  font-size: 0.88rem;
}

.searchable-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  text-align: left;
  cursor: pointer;
}

.searchable-select-current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchable-select-arrow {
  flex: 0 0 auto;
  color: var(--searchable-select-muted);
  font-size: 0.65rem;
}

.searchable-select.is-open .searchable-select-arrow {
  transform: rotate(180deg);
}

.searchable-select-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--searchable-select-border);
  border-radius: 4px;
  background: var(--searchable-select-panel);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.searchable-select-search {
  padding: 0 10px;
}

.searchable-select-search:focus,
.searchable-select-toggle:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
}

.searchable-select-options {
  max-height: 260px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
}

.searchable-select-option {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 3px;
  padding: 7px 9px;
  color: var(--searchable-select-text);
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}

.searchable-select-option:hover,
.searchable-select-option.is-active {
  background: var(--searchable-select-active);
}

.searchable-select-option.is-selected {
  color: #93c5fd;
  font-weight: 700;
}

.searchable-select-empty {
  margin: 8px 0 0;
  padding: 8px;
  color: var(--searchable-select-muted);
  font-size: 0.84rem;
}

.admin-console a.button {
  background: var(--admin-accent);
  border-radius: 4px;
}

.admin-console a.button:hover {
  background: var(--admin-accent-hover);
}

.admin-empty {
  margin: 0;
  padding: 16px 18px;
  color: var(--admin-muted);
  border: 1px dashed var(--admin-border-strong);
  border-radius: 4px;
  background: #111f39;
}

.admin-console .record-table {
  border: 1px solid var(--admin-border);
  box-shadow: none;
  background: var(--admin-surface);
}

.admin-console .record-table thead th {
  background: var(--admin-surface-2);
  color: var(--admin-muted);
  border-bottom: 1px solid var(--admin-border);
}

.admin-console .record-table th,
.admin-console .record-table td {
  border-bottom: 1px solid rgba(47, 74, 115, 0.58);
}

.admin-console .record-table td {
  color: var(--admin-text);
}

.admin-console .record-table tbody tr:hover td {
  background: #142749;
}

.admin-section-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #d8e5fb;
}

.admin-section-actions {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 12px;
}

.admin-panel--detail {
  padding: 16px;
}

.admin-detail-table {
  border: 1px solid var(--admin-border-strong);
  border-radius: 4px;
  background: #0b1730;
}

.admin-detail-table tr:nth-child(odd) th,
.admin-detail-table tr:nth-child(odd) td {
  background: #0f1e3b;
}

.admin-detail-table tr:hover th,
.admin-detail-table tr:hover td {
  background: #1a3158;
}

.admin-detail-table th,
.admin-console .admin-detail-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #2a4168;
  font-size: 0.97rem;
  vertical-align: middle;
}

.admin-detail-table th {
  width: 36%;
  min-width: 250px;
  color: #d5e2f7;
  font-weight: 700;
  line-height: 1.7;
}

.admin-console .admin-detail-table th {
  vertical-align: middle !important;
}

.admin-console .admin-detail-table td {
  color: #f5f8ff;
  line-height: 1.7;
}

.admin-area-check-services-table {
  width: 100%;
  table-layout: fixed;
}

.admin-area-check-services-table th {
  width: auto;
  min-width: 0;
}

.admin-console .admin-area-check-services-table th,
.admin-console .admin-area-check-services-table td {
  padding: 12px 14px;
  overflow-wrap: anywhere;
}

.admin-area-check-services-table__display-id {
  width: 96px;
}

.admin-area-check-services-table__service-name {
  width: 25%;
}

.admin-area-check-services-table__group {
  width: 150px;
}

.admin-area-check-services-table__english-name {
  width: 23%;
}

.admin-area-check-services-table__area-check {
  width: 170px;
}

.admin-area-check-services-table__availability {
  width: 430px;
}

.admin-mail-log-table {
  width: 100%;
  table-layout: fixed;
}

.admin-mail-log-table th {
  width: auto;
  min-width: 0;
}

.admin-console .admin-mail-log-table th,
.admin-console .admin-mail-log-table td {
  padding: 12px 14px;
  overflow-wrap: anywhere;
  word-break: normal;
}

.admin-mail-log-table__id {
  width: 5%;
}

.admin-mail-log-table__request-id {
  width: 7%;
}

.admin-mail-log-table__sent-at {
  width: 13%;
}

.admin-mail-log-table__recipient {
  width: 21%;
}

.admin-mail-log-table__subject {
  width: 24%;
}

.admin-mail-log-table__mailgun-message-id {
  width: 23%;
}

.admin-mail-log-table__action {
  width: 7%;
}

.admin-mail-log-table td:last-child {
  text-align: center;
}

.admin-copy-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 100%;
}

.admin-copy-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-copy-button {
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 32px;
  border: 1px solid #2f5f9f;
  border-radius: 4px;
  padding: 0 12px;
  color: #bfdbfe;
  background: #10284d;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-copy-button:hover {
  border-color: #60a5fa;
  background: #153766;
}

.admin-copy-button:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.admin-copy-button.is-copied {
  border-color: #22c55e;
  color: #dcfce7;
  background: #14532d;
}

.admin-copy-button.is-error {
  border-color: #ef4444;
  color: #fee2e2;
  background: #7f1d1d;
}

.admin-ntt-availability-mode {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  border: 1px solid #2a4168;
  border-radius: 4px;
  padding: 12px 14px;
  background: #0c1a34;
}

.admin-ntt-availability-mode.is-individual {
  border-color: #3b82f6;
  background: #10284d;
}

.admin-ntt-availability-mode__content {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
}

.admin-ntt-availability-mode__label {
  color: #f5f8ff;
  font-size: 0.9rem;
}

.admin-ntt-availability-mode__description {
  color: #aebfdd;
  font-size: 0.8rem;
  line-height: 1.5;
}

.admin-ntt-availability-mode__button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid #3b82f6;
  border-radius: 4px;
  padding: 0 14px;
  color: #dbeafe;
  background: #153766;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.admin-ntt-availability-mode__button:hover:not(:disabled) {
  border-color: #60a5fa;
  color: #f8fbff;
  background: #1d4ed8;
}

.admin-ntt-availability-mode__button:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.admin-ntt-availability-mode__button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.admin-availability-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid #2a4168;
  border-radius: 4px;
  background: #0c1a34;
}

.admin-availability-button {
  min-width: 76px;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 0 10px;
  color: #aebfdd;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.admin-availability-button:hover:not(:disabled) {
  border-color: #3b82f6;
  color: #dbeafe;
  background: #10284d;
}

.admin-availability-button:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.admin-availability-button.is-active {
  border-color: #60a5fa;
  color: #f8fbff;
  background: #1d4ed8;
}

.admin-availability-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.admin-availability-control.is-disabled {
  opacity: 0.48;
}

.admin-availability-control.is-disabled .admin-availability-button:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.admin-availability-control.is-error {
  border-color: #ef4444;
}

.admin-availability-field {
  display: grid;
  gap: 7px;
  justify-items: start;
}

.admin-availability-note {
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid #314769;
  border-radius: 4px;
  color: var(--admin-text);
  background: #081326;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
}

.admin-availability-note:disabled {
  border-color: #25354f;
  color: #7c8aa0;
  -webkit-text-fill-color: #7c8aa0;
  background: #0b1220;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.65;
  resize: none;
}

.admin-availability-note:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.admin-availability-note-error {
  margin: -1px 0 0;
  color: #fca5a5;
  font-size: 0.78rem;
  line-height: 1.5;
}

.admin-memo-form {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-memo-textarea {
  min-height: 96px;
}

.admin-memo-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-memo-item {
  border: 1px solid #2a4168;
  border-radius: 4px;
  padding: 12px 14px;
  background: #0f1e3b;
}

.admin-memo-time {
  display: block;
  margin-bottom: 6px;
  color: #93a4c4;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-memo-body {
  color: #f5f8ff;
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-mail-log-body {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  color: #f5f8ff;
  background: #071326;
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-mail-log-body a {
  color: #7dd3fc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-mail-log-body a:hover {
  color: #bae6fd;
}

.admin-contact-mail-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  border-bottom: 1px solid var(--admin-border-strong);
}

.admin-contact-mail-tab {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  color: var(--admin-muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.admin-contact-mail-tab:hover {
  color: var(--admin-text);
  background: var(--admin-surface-2);
}

.admin-contact-mail-tab.is-active {
  border-color: var(--admin-border-strong);
  color: #eaf2ff;
  background: var(--admin-surface);
}

.admin-contact-mail-list-header,
.admin-contact-mail-reply-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-contact-mail-list-header .admin-section-title {
  margin-bottom: 0;
}

.admin-contact-mail-count,
.admin-contact-mail-page,
.admin-contact-mail-help {
  margin: 0;
  color: var(--admin-muted);
  font-size: 0.84rem;
}

.admin-contact-mail-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  margin-top: 14px;
}

.admin-contact-mail-table th:nth-child(1) {
  width: 160px;
}

.admin-contact-mail-table th:nth-child(2) {
  width: 28%;
}

.admin-contact-mail-table th:nth-child(4) {
  width: 86px;
}

.admin-contact-mail-table th,
.admin-contact-mail-table td {
  overflow-wrap: anywhere;
}

.admin-contact-mail-name,
.admin-contact-mail-address {
  display: block;
}

.admin-contact-mail-name {
  font-weight: 700;
}

.admin-contact-mail-address {
  margin-top: 2px;
  color: var(--admin-muted);
}

.admin-contact-mail-detail {
  margin-bottom: 20px;
}

.admin-contact-mail-detail th {
  width: 220px;
  min-width: 220px;
}

.admin-contact-mail-message-id {
  overflow-wrap: anywhere;
}

.admin-contact-mail-body-title {
  margin-top: 0;
}

.admin-contact-mail-body,
.admin-contact-mail-reply-body {
  margin: 0;
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  color: #f5f8ff;
  background: #071326;
  font-family: inherit;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-contact-mail-body {
  min-height: 180px;
  padding: 18px;
  font-size: 0.94rem;
}

.admin-contact-mail-replies {
  display: grid;
  gap: 12px;
}

.admin-contact-mail-reply {
  padding: 14px;
  border: 1px solid var(--admin-border-strong);
  border-radius: 4px;
  background: #0f1e3b;
}

.admin-contact-mail-reply-meta {
  color: var(--admin-muted);
  font-size: 0.82rem;
}

.admin-contact-mail-reply-subject {
  margin: 10px 0 8px;
  color: var(--admin-text);
  font-weight: 700;
}

.admin-contact-mail-reply-body {
  max-height: 260px;
  padding: 12px;
  overflow-y: auto;
  font-size: 0.88rem;
}

.admin-contact-mail-compose-body {
  min-height: 320px;
}

.admin-contact-mail-help {
  line-height: 1.6;
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.admin-status-badge.is-available {
  color: #d1fae5;
  border-color: #14532d;
  background: #064e3b;
}

.admin-status-badge.is-unavailable {
  color: #e2e8f0;
  border-color: #334155;
  background: #1e293b;
}

.admin-form {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  background: var(--admin-surface);
}

.admin-console #error_explanation {
  margin: 0;
  border-color: #7f1d1d;
  background: #3f1212;
}

.admin-console #error_explanation h2 {
  color: #fecaca;
}

.admin-console #error_explanation ul {
  color: #fca5a5;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-field {
  margin: 0;
}

.admin-field--full {
  grid-column: 1 / -1;
}

/* Margin top utility classes. */
.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 0.75rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}

.admin-label {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #d5e2f7;
}

.admin-input,
.admin-textarea {
  width: 100%;
  border: 1px solid #314769;
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--admin-text);
  background: #081326;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-input {
  height: 44px;
  padding: 0 12px;
}

.admin-textarea {
  min-height: 96px;
  padding: 10px 12px;
  line-height: 1.5;
}

.admin-input:focus,
.admin-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.admin-fieldset {
  margin: 0;
  border: 1px solid #314769;
  border-radius: 4px;
  background: #0b1529;
  padding: 16px;
}

.admin-fieldset-title {
  margin: 0;
  padding: 0 6px;
  color: #d5e2f7;
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-top: 8px;
}

.admin-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--admin-accent);
}

.admin-check-label {
  font-size: 0.9rem;
  color: #d9e6fa;
}

.admin-benefit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #1d4ed8;
  background: #102a4f;
  color: #dbeafe;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}

.admin-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-submit {
  min-width: 180px;
  height: 42px;
  border: 1px solid #1d4ed8;
  border-radius: 4px;
  padding: 0 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fbff;
  background: var(--admin-accent);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-submit:hover {
  background: var(--admin-accent-hover);
  border-color: #1e40af;
}

.admin-submit:active {
  background: #1e40af;
}

.admin-row-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 34px;
  border: 1px solid #2f5f9f;
  border-radius: 4px;
  padding: 0 14px;
  color: #dbeafe;
  background: #10284d;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-row-button:hover {
  border-color: #60a5fa;
  color: #f8fbff;
  background: #153766;
  text-decoration: none;
}

.admin-row-button:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.admin-back-link {
  color: #93c5fd;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.admin-back-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-analytics-filter {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-analytics-filter .admin-filter-label {
  display: grid;
  gap: 6px;
}

.admin-filter-input {
  width: 150px;
  height: 36px;
  border: 1px solid #314769;
  border-radius: 4px;
  padding: 0 10px;
  color: var(--admin-text);
  background: #081326;
  font: inherit;
  font-size: 0.88rem;
}

.admin-analytics-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.admin-secondary-link,
.admin-csv-link,
.admin-pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #314769;
  border-radius: 4px;
  padding: 0 12px;
  color: #bfdbfe;
  background: #10213e;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.admin-csv-link {
  border-color: #15803d;
  color: #dcfce7;
  background: #14532d;
}

.admin-secondary-link:hover,
.admin-csv-link:hover,
.admin-pagination-link:hover {
  color: #fff;
  filter: brightness(1.15);
}

.admin-analytics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.admin-summary-card {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  background: var(--admin-surface);
}

.admin-summary-label,
.admin-summary-value {
  margin: 0;
}

.admin-summary-label {
  color: var(--admin-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-summary-value {
  margin-top: 6px;
  color: #f8fbff;
  font-size: 1.7rem;
  font-weight: 700;
}

.admin-summary-note {
  margin: 4px 0 0;
  color: var(--admin-muted);
  font-size: 0.78rem;
}

.admin-analytics-breakdowns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-breakdown-panel {
  min-width: 0;
}

.admin-breakdown-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.admin-breakdown-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(47, 74, 115, 0.58);
}

.admin-breakdown-list > div:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.admin-breakdown-list dt {
  min-width: 0;
  color: #c9d7ec;
  overflow-wrap: anywhere;
}

.admin-breakdown-list dd {
  margin: 0;
  color: #f8fbff;
  font-weight: 700;
}

.admin-analytics-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-analytics-list-header .admin-section-title {
  margin: 0;
}

.admin-table-scroll {
  overflow-x: auto;
}

.admin-click-events-table {
  min-width: 1360px;
}

.admin-click-events-table th,
.admin-click-events-table td {
  padding: 11px 12px;
  font-size: 0.82rem;
  vertical-align: top;
}

.admin-click-events-table th:nth-child(1) {
  width: 150px;
}

.admin-click-events-table th:nth-child(2) {
  width: 120px;
}

.admin-click-events-table th:nth-child(3) {
  width: 190px;
}

.admin-click-events-table th:nth-child(4) {
  width: 150px;
}

.admin-click-events-table th:nth-child(5) {
  width: 190px;
}

.admin-click-events-table th:nth-child(6) {
  width: 130px;
}

.admin-click-events-table th:nth-child(7) {
  width: 230px;
}

.admin-table-note {
  display: block;
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.admin-table-link {
  color: #93c5fd;
  overflow-wrap: anywhere;
}

.admin-event-details {
  position: relative;
}

.admin-event-details summary {
  color: #93c5fd;
  cursor: pointer;
  font-weight: 700;
}

.admin-event-details__close {
  display: none;
}

.admin-event-details[open] .admin-event-details__open {
  display: none;
}

.admin-event-details[open] .admin-event-details__close {
  display: inline;
}

.admin-event-link-popover {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: 520px;
  max-width: calc(100vw - 64px);
  padding: 12px;
  border: 1px solid var(--admin-border-strong);
  border-radius: 4px;
  color: var(--admin-text);
  background: #071326;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  overflow-wrap: anywhere;
}

.admin-event-link-details {
  position: relative;
}

.admin-event-link-toggle {
  padding: 0;
  border: 0;
  color: #93c5fd;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.admin-event-link-toggle__close {
  display: none;
}

.admin-event-link-details.is-open .admin-event-link-toggle__open {
  display: none;
}

.admin-event-link-details.is-open .admin-event-link-toggle__close {
  display: inline;
}

.admin-event-link-details:hover .admin-event-link-popover,
.admin-event-link-details.is-open .admin-event-link-popover {
  display: block;
}

.admin-event-details dl {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  width: 360px;
  max-height: 320px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--admin-border-strong);
  border-radius: 4px;
  background: #071326;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
}

.admin-event-details dt {
  margin-top: 8px;
  color: var(--admin-muted);
  font-weight: 700;
}

.admin-event-details dt:first-child {
  margin-top: 0;
}

.admin-event-details dd {
  margin: 2px 0 0;
  color: var(--admin-text);
  overflow-wrap: anywhere;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--admin-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

@media (max-width: 1024px) {
  .admin-console {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    gap: 16px;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--admin-border);
    padding: 16px;
    z-index: 10;
  }

  .admin-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .admin-nav-link {
    white-space: nowrap;
  }

  .admin-sidebar-spacer {
    display: none;
  }

  .admin-main {
    padding: 20px 16px 28px;
  }

  .admin-analytics-summary,
  .admin-analytics-breakdowns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .admin-form-grid,
  .admin-check-grid {
    grid-template-columns: 1fr;
  }

  .admin-detail-table,
  .admin-detail-table tbody,
  .admin-detail-table tr,
  .admin-detail-table th,
  .admin-detail-table td {
    display: block;
    width: 100%;
  }

  .admin-detail-table tr {
    border-bottom: 1px solid #2a4168;
  }

  .admin-detail-table tr:last-child {
    border-bottom: none;
  }

  .admin-detail-table th,
  .admin-console .admin-detail-table td {
    min-width: 0;
    border: none;
    padding: 10px 12px;
  }

  .admin-detail-table th {
    padding-bottom: 0;
    font-size: 0.8rem;
    color: #aebfdd;
  }

  .admin-console .admin-detail-table td {
    padding-top: 6px;
    font-size: 0.9rem;
  }

  .admin-copy-field {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .admin-availability-control {
    flex-wrap: wrap;
  }

  .admin-ntt-availability-mode {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-ntt-availability-mode__button {
    width: 100%;
  }

  .admin-panel {
    padding: 16px;
  }

  .admin-analytics-summary,
  .admin-analytics-breakdowns {
    grid-template-columns: 1fr;
  }

  .admin-analytics-filter,
  .admin-analytics-filter label,
  .admin-filter-input,
  .admin-analytics-filter .admin-filter-select {
    width: 100%;
  }

  .admin-analytics-filter-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .admin-analytics-list-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-form {
    padding: 16px;
  }

  .admin-contact-mail-tabs {
    overflow-x: auto;
  }

  .admin-contact-mail-tab {
    white-space: nowrap;
  }

  .admin-contact-mail-detail th {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 20px 12px;
  }

  .auth-card {
    padding: 22px 16px;
    border-radius: 4px;
  }
}

/* ========== Area Check CTA ========== */

.area-check-cta {
  margin-top: 32px;
}

.area-check-cta-inner {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 52px 24px;
  background: linear-gradient(135deg, #244cc4 0%, var(--brand) 45%, #152f7f 100%);
  border-radius: 20px;
  text-align: center;
}

.area-check-cta-inner::before,
.area-check-cta-inner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.area-check-cta-inner::before {
  width: 340px;
  height: 340px;
  top: -170px;
  left: -110px;
}

.area-check-cta-inner::after {
  width: 420px;
  height: 420px;
  right: -150px;
  bottom: -240px;
}

.area-check-cta-title {
  position: relative;
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
}

.area-check-cta-description {
  position: relative;
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
}

.area-check-cta-inner a.button-cta {
  position: relative;
  width: auto;
  min-width: min(460px, 100%);
  min-height: 68px;
  margin-top: 10px;
  font-size: 1.25rem;
  color: var(--brand);
  background: #fff;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
}

.area-check-cta-inner a.button-cta:hover {
  color: var(--brand-dark);
  background: #eef3ff;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}

.area-check-cta-inner a.button-cta:active {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.28);
}

/* ========== Area Check Form ========== */

.area-check-form {
  display: grid;
  gap: 20px;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.area-check-form .field_with_errors {
  display: contents;
}

.area-check-error-summary {
  padding: 12px 14px;
  border: 1px solid #f0a8a0;
  border-radius: var(--radius-sm);
  color: #9f1c14;
  background: #fff5f4;
}

.area-check-error-summary p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.6;
}

.area-check-error-summary-message {
  margin-top: 4px !important;
}

.area-check-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.area-check-field-error {
  margin: 0;
  color: #b42318;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
}

.area-check-field.is-invalid > .area-check-label {
  color: #9f1c14;
}

.area-check-field[hidden] {
  display: none !important;
}

.area-check-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.area-check-required,
.area-check-optional {
  font-size: 0.8rem;
  font-weight: 700;
}

.area-check-required {
  color: #ff2d7a;
}

.area-check-optional {
  color: #2563eb;
}

.area-check-input,
.area-check-select,
.area-check-textarea {
  width: 100%;
  border: 1px solid #93abd6;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.area-check-input,
.area-check-select {
  height: 46px;
  padding: 0 14px;
}

.area-check-select {
  appearance: auto;
}

.area-check-input--short,
.area-check-select--short {
  max-width: 320px;
}

.area-check-postal-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.area-check-postal-code-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary-light);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}

.area-check-postal-code-link-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.area-check-postal-code-link:hover {
  color: var(--cta-hover);
}

.area-check-postal-code-link:hover .area-check-postal-code-link-text {
  text-decoration-thickness: 2px;
}

.area-check-postal-code-link:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 3px;
  border-radius: 2px;
}

.area-check-postal-code-link-icon {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.area-check-textarea {
  padding: 10px 14px;
  line-height: 1.6;
  resize: vertical;
}

.area-check-input:focus,
.area-check-select:focus,
.area-check-textarea:focus {
  outline: none;
  border-color: var(--cta);
  box-shadow: 0 0 0 3px oklch(54.6% 0.245 262.881 / 0.16);
}

.area-check-input.is-invalid,
.area-check-select.is-invalid {
  border-color: #dc4c41;
  background: #fffafa;
}

.area-check-input.is-invalid:focus,
.area-check-select.is-invalid:focus {
  border-color: #c9372c;
  box-shadow: 0 0 0 3px rgba(201, 55, 44, 0.16);
}

.area-check-input::placeholder,
.area-check-textarea::placeholder {
  color: #aaa;
}

.area-check-radio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.area-check-radio-grid.is-invalid,
.area-check-services.is-invalid {
  border-radius: var(--radius-sm);
  outline: 2px solid rgba(220, 76, 65, 0.62);
  outline-offset: 4px;
  background: #fffafa;
}

.area-check-radio-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 16px;
  border: 1px solid var(--badge-border);
  border-radius: 8px;
  background: #f9fbfe;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.area-check-radio-item:hover {
  border-color: #93abd6;
}

.area-check-radio-item:has(input[type="radio"]:checked) {
  border-color: transparent;
  background: #cfdef7;
}

.area-check-radio-item:has(input[type="radio"]:focus-visible) {
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.16);
}

.area-check-radio-item input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--cta);
  flex-shrink: 0;
}

.area-check-radio-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.area-check-services {
  display: grid;
  gap: 16px;
}

.area-check-service-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.area-check-group-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--badge-border);
}

.area-check-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px 12px;
}

.area-check-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.area-check-checkbox-item:hover {
  background: var(--bg);
}

.area-check-checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--cta);
  flex-shrink: 0;
}

.area-check-service-name {
  font-size: 0.875rem;
  color: var(--text);
}

.area-check-agreement {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--badge-border);
  border-radius: var(--radius-sm);
  background: var(--tint);
}

.area-check-agreement.is-invalid {
  border-color: #dc4c41;
  background: #fff5f4;
  box-shadow: 0 0 0 1px rgba(220, 76, 65, 0.16);
}

.area-check-agreement-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}

.area-check-agreement-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--cta);
  flex-shrink: 0;
}

.area-check-agreement-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.area-check-form-actions {
  padding-top: 4px;
}

.area-check-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--action-text);
  background: var(--action);
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.16);
  transition: all 0.2s ease;
}

.area-check-submit .cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
}

.area-check-submit .cta-arrow svg {
  display: block;
  width: 100%;
  height: 100%;
}

.area-check-submit:hover .cta-arrow {
  transform: translateX(3px);
}

.area-check-submit.is-loading .cta-arrow {
  display: none;
}

.area-check-submit-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: area-check-submit-spin 0.75s linear infinite;
}

.area-check-submit.is-loading .area-check-submit-spinner {
  display: inline-block;
}

.area-check-submit:hover {
  background: var(--action-hover);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.16);
  transform: translateY(1px);
}

.area-check-submit:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}

.area-check-submit:disabled,
.area-check-submit.is-loading {
  opacity: 0.72;
  cursor: wait;
}

.area-check-submit:disabled:hover,
.area-check-submit.is-loading:hover {
  background: var(--cta);
  box-shadow: 0 4px 14px oklch(54.6% 0.245 262.881 / 0.26);
  transform: none;
}

@keyframes area-check-submit-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========== Area Check Complete ========== */

.area-check-complete {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.area-check-complete-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: #dcfce7;
  border-radius: 50%;
  color: var(--success);
}

.area-check-complete-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.area-check-complete-message {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 767px) {
  .area-check-form {
    padding: 18px 16px;
  }

  .area-check-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .area-check-radio-grid {
    grid-template-columns: 1fr;
  }

  .area-check-cta-inner {
    padding: 24px 18px;
  }

  .legal-section {
    padding: 18px 16px;
  }

  .legal-definition-list > div {
    grid-template-columns: 1fr;
  }

  .legal-definition-list dt {
    padding-bottom: 4px;
  }

  .legal-definition-list dd {
    padding-top: 4px;
  }

  .legal-info-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .about-page {
    padding: 22px 14px 40px;
  }

  .about-page .page-header {
    margin-bottom: 22px;
  }

  .about-page .page-header h1 {
    font-size: 1.45rem;
  }

  .about-page .lead {
    font-size: 0.9rem;
    line-height: 1.85;
  }

  .about-page .legal-section,
  .legal-page.about-page .page-header + .legal-section,
  .legal-page.about-page .legal-section + .legal-section,
  .legal-page.about-page .legal-section:last-child,
  .legal-page.about-page .page-header + .legal-section:last-child {
    margin-top: 16px;
    padding: 22px 18px;
    border-radius: 10px;
  }

  .about-page .page-header + .legal-section {
    margin-top: 0;
  }

  .about-page .section-title {
    margin-bottom: 14px;
    font-size: 1.02rem;
  }

  .about-page .legal-section p,
  .about-page .legal-list,
  .about-page .legal-info-list dd {
    font-size: 0.88rem;
    line-height: 1.9;
  }

  .about-page .legal-info-list {
    margin-top: 18px;
  }

  .about-page .legal-info-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 13px 0;
  }

  .about-page .legal-info-list dt {
    font-size: 0.82rem;
  }
}

/* ========== Top Page (Home) ========== */

body:has(.top-page) {
  background: #fff;
}

body:has(.top-page) .site-footer {
  margin-top: 0;
}

.top-page .page {
  padding: 0 24px;
}

/* ヒーローは main.top-page 直下で全幅に広げる */
.top-page .hero {
  border-radius: 0;
  padding: 64px 24px 72px;
}

.top-page .section {
  margin-top: 0;
  padding: 64px 0;
}

.top-page .section-title {
  margin-bottom: 28px;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  text-align: center;
}

/* セクション交互背景（コンテナ内から左右いっぱいまで帯を伸ばす） */
.top-page .section--tint {
  background: var(--tint);
  box-shadow: 0 0 0 100vmax var(--tint);
  clip-path: inset(0 -100vmax);
}

.top-page .stats-section {
  padding: 56px 0 64px;
}

.top-page .stats-grid {
  gap: 20px;
}

/* 回線リンクは白帯上なので薄影ではなく枠線で区切る */
.top-page .municipality-list a {
  border: 1px solid #93abd6;
  box-shadow: none;
}

.top-page .municipality-list a:hover {
  border-color: var(--brand);
  box-shadow: none;
  transform: none;
}

.top-page .area-check-cta {
  padding-top: 8px;
  background: var(--tint);
  box-shadow: 0 0 0 100vmax var(--tint);
  clip-path: inset(0 -100vmax);
}

@media (min-width: 900px) {
  .top-page .other-services-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .top-page .steps-grid {
    gap: 28px;
  }

  .top-page .step-card {
    position: relative;
  }

  .top-page .step-card:not(:last-child)::after {
    content: "→";
    position: absolute;
    top: 50%;
    right: -21px;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.15rem;
  }
}

@media (max-width: 767px) {
  .top-page .page {
    padding: 0 16px;
  }

  .top-page .hero {
    padding: 44px 20px 48px;
  }

  .top-page .section {
    padding: 44px 0;
  }

  .top-page .section-title {
    margin-bottom: 20px;
  }

  .top-page .stats-section {
    padding: 36px 0 44px;
  }

  .top-page .stats-grid {
    gap: 8px;
  }
}

/* ========== Listing Page (services index, TOP準拠) ========== */

body:has(.listing-page) {
  background: #fff;
}

/* 一括エリア判定依頼・受付完了・判定結果・規約等の静的ページはページ全体をティント背景で統一する */
body:has(.area-check-request-page),
body:has(.area-check-complete-page),
body:has(.area-check-result-page),
body:has(.legal-page) {
  background: var(--tint);
}

body:has(.listing-page) .site-footer,
body:has(.area-check-result-page) .site-footer {
  margin-top: 0;
}

.listing-page .page-header h1 {
  font-size: 1.6rem;
}

.listing-page .section-title {
  font-size: 1.25rem;
  margin-bottom: 18px;
}

.listing-page .research-band {
  margin-top: 20px;
}

.listing-page .research-band .search-form--compact {
  max-width: 720px;
  margin: 0;
}

/* フィルタ〜検索結果一覧をティント帯に載せる */
.listing-page .results-band {
  margin-top: 40px;
  padding: 16px 0 48px;
  background: var(--tint);
  box-shadow: 0 0 0 100vmax var(--tint);
  clip-path: inset(0 -100vmax);
}

.listing-page .results-band + .section {
  margin-top: 56px;
}

/* 白地に載るカード類は薄影ではなく枠線で区切る */
.listing-page .municipality-list a {
  border: 1px solid #93abd6;
  box-shadow: none;
}

.listing-page .municipality-list a:hover {
  border-color: var(--brand);
  box-shadow: none;
  transform: none;
}

.listing-page .notes {
  border: 1px solid #b6c7e4;
  box-shadow: none;
}

/* サービス詳細ページ（白地）向けの調整 */
.listing-page .availability-banner {
  border-left: 1px solid var(--merit-border);
  box-shadow: none;
}

.listing-page .availability-banner.is-unsupported {
  border-left-color: #cbd5e1;
}

.listing-page .detail-card {
  border: 1px solid #dbe4f2;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(19, 40, 110, 0.06);
}

.listing-page .detail-header {
  background: var(--brand);
  border-bottom: none;
  border-radius: 15px 15px 0 0;
}

.listing-page .detail-title {
  color: #fff;
}

@media (max-width: 767px) {
  .listing-page .results-band {
    margin-top: 32px;
    padding: 8px 0 36px;
  }

  .listing-page .results-band + .section {
    margin-top: 44px;
  }
}
