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

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --red-50: #fef2f2;
  --red-500: #ef4444;
  --red-700: #b91c1c;
  --green-50: #f0fdf4;
  --green-600: #16a34a;
  --green-700: #15803d;
  --purple-50: #faf5ff;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7e22ce;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

/* ─── Header ─── */

.header {
  text-align: center;
  margin-bottom: 0;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.lo-name {
  margin: 4px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary, #0056b3);
  letter-spacing: 0.04em;
}

.unofficial-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--gray-500);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 3px 12px;
  letter-spacing: 0.02em;
}

/* ─── Tab Navigation ─── */

.tab-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 20px 0 32px;
  background: var(--gray-100);
  border-radius: 10px;
  padding: 4px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
  flex: 1;
  justify-content: center;
}

.tab-btn:hover {
  color: var(--gray-700);
}

.tab-btn.active {
  color: var(--gray-800);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tab-btn svg {
  flex-shrink: 0;
}

.tab-content {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.subtitle {
  margin-bottom: 28px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.7;
}

.secure-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green-700);
  background: var(--green-50);
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

/* ─── ZIP smart filter (報告優先) ─── */

.zip-filter-bar {
  margin: 0 auto 20px;
  max-width: 640px;
  padding: 14px 16px;
  background: #f0f7ff;
  border: 1px solid rgba(0, 86, 179, 0.2);
  border-radius: 10px;
}

.zip-filter-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--gray-800);
  line-height: 1.45;
}

.zip-filter-label input {
  margin-top: 3px;
  flex-shrink: 0;
}

.zip-filter-title {
  font-weight: 700;
}

.zip-filter-help {
  margin: 10px 0 0 28px;
  font-size: 0.78rem;
  color: var(--gray-600);
  line-height: 1.65;
}

/* ─── Alert Box (details/summary で折り畳み) ─── */

.alert-box {
  background: #fffaf5;
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-left: 4px solid #d97706;
  border-radius: 10px;
  padding: 0;
  margin-bottom: 20px;
  overflow: hidden;
}

.alert-box[open] {
  background: #fef2f2;
  border-color: rgba(185, 28, 28, 0.25);
  border-left-color: #b91c1c;
}

.alert-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: #9a3412;
  line-height: 1.5;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.alert-header::-webkit-details-marker { display: none; }
.alert-header::after {
  content: "▸";
  margin-left: auto;
  color: #9a3412;
  font-size: 0.78rem;
  transition: transform 0.15s;
}
.alert-box[open] .alert-header::after {
  transform: rotate(90deg);
  color: #991b1b;
}
.alert-box[open] .alert-header { color: #991b1b; }

.alert-header-icon { font-size: 1rem; flex-shrink: 0; }
.alert-header-sub  { font-size: 0.76rem; font-weight: 500; color: var(--gray-600); }
.alert-box[open] .alert-header-sub { color: #7f1d1d; opacity: 0.8; }

.alert-header:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: 6px;
}

.alert-body {
  padding: 0 18px 16px;
}

.alert-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.alert-body li {
  position: relative;
  padding-left: 18px;
  font-size: 0.8rem;
  color: #7f1d1d;
  line-height: 1.7;
}

.alert-body li::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: 0;
  color: #b91c1c;
  font-weight: 700;
}

.alert-body strong {
  color: #991b1b;
  font-weight: 700;
}

/* ─── Drop Zone ─── */

.drop-zone {
  position: relative;
  border: 2.5px dashed var(--gray-300);
  border-radius: var(--radius);
  background: #fff;
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.drop-zone:hover {
  border-color: var(--blue-500);
  background: var(--blue-50);
}

.drop-zone.drag-over {
  border-color: var(--blue-600);
  background: var(--blue-50);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.drop-zone.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.drop-icon {
  width: 56px;
  height: 56px;
  color: var(--gray-400);
  margin-bottom: 16px;
  transition: color 0.2s;
}

.drop-zone:hover .drop-icon,
.drop-zone.drag-over .drop-icon {
  color: var(--blue-500);
}

.drop-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-700);
}

.drop-hint {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--gray-400);
}

/* ─── Status Area ─── */

.status-area {
  margin-top: 32px;
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3.5px solid var(--gray-200);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-log {
  width: 100%;
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.8;
}

.status-log .log-entry {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 0;
}

.status-log .log-entry::before {
  content: "●";
  font-size: 0.55rem;
  color: var(--blue-500);
  flex-shrink: 0;
  position: relative;
  top: -1px;
}

.status-log .log-entry.done::before {
  content: "✓";
  font-size: 0.8rem;
  color: var(--green-600);
}

.status-log .log-entry.warn::before {
  content: "⚠";
  font-size: 0.75rem;
  color: #d97706;
}

/* ─── Error Area ─── */

.error-area {
  margin-top: 24px;
  background: var(--red-50);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--red-700);
  font-size: 0.9rem;
  line-height: 1.7;
}

.error-area strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

/* ─── Result Area ─── */

.result-area {
  margin-top: 32px;
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.result-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-700);
  margin-bottom: 16px;
}

.result-summary {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 28px;
  line-height: 1.7;
}

.result-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--blue-700);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-accent {
  background: var(--purple-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
  background: var(--purple-700);
  box-shadow: var(--shadow);
}

.btn-reset {
  margin: 32px auto 0;
  display: flex;
  background: transparent;
  color: var(--blue-600);
  font-size: 0.85rem;
  padding: 8px 16px;
}

.btn-reset:hover {
  background: var(--blue-50);
}

/* ─── PDF Download Area ─── */

.pdf-download-area {
  display: contents;
}

.part-list {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.btn-part {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--blue-600);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-part:hover {
  background: var(--blue-50);
  border-color: var(--blue-500);
}

/* ─── Guide Area ─── */

.guide-area {
  margin-top: 24px;
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

/* 補助バリアント：ローカル自動チェックが主役のため、Gems 誘導は控えめに */
.guide-area.guide-subdued {
  margin-top: 16px;
  padding: 20px 22px;
  background: var(--gray-50);
  box-shadow: none;
  border: 1px solid var(--gray-200);
}

.guide-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.guide-area.guide-subdued .guide-heading {
  font-size: 0.95rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  color: var(--gray-700);
}

.guide-heading-label {
  display: inline-block;
  background: var(--gray-200);
  color: var(--gray-700);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.guide-lead {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin: -6px 0 16px;
}

.guide-area.guide-subdued .btn-gems {
  background: linear-gradient(135deg, #4285f4 0%, #886bf2 100%);
  box-shadow: 0 1px 4px rgba(66, 133, 244, 0.2);
  margin-bottom: 0;
}

/* ─── Gems カード（姉妹 Gem 2 本立て） ─── */

.gems-card {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: #fff;
}

.gems-card-rules    { border-left: 4px solid #4285f4; }
.gems-card-business { border-left: 4px solid #16a34a; }

.gems-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.gems-card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.gems-card-badge-rules    { background: #dbeafe; color: #1d4ed8; }
.gems-card-badge-business { background: #dcfce7; color: #15803d; }

.gems-card-badge-new {
  background: #fef3c7;
  color: #a16207;
  border: 1px solid rgba(202, 138, 4, 0.3);
}

.gems-card-desc {
  font-size: 0.78rem;
  color: var(--gray-600);
  line-height: 1.5;
  flex: 1 1 auto;
  min-width: 220px;
}

/* 事業審査 Gem ボタン（緑系グラデで規則財政版と色分け） */
.btn-gems.btn-gems-biz {
  background: linear-gradient(135deg, #16a34a 0%, #0ea5e9 100%);
  box-shadow: 0 1px 4px rgba(22, 163, 74, 0.25);
}

.btn-gems.btn-gems-biz:hover {
  opacity: 0.92;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.35);
}

/* 処理完了後のサブリード */
.result-sublead {
  margin-top: -4px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.7;
  text-align: center;
}
.result-sublead strong { color: var(--blue-700); }

/* Step list */

.step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue-600);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.step-body strong {
  display: block;
  font-size: 0.9rem;
  color: var(--gray-800);
  margin-bottom: 2px;
}

.step-body p {
  font-size: 0.82rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* Prompt section */

.prompt-section {
  margin-bottom: 24px;
}

.prompt-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.prompt-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-left: 3.5px solid var(--purple-500);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 12px;
}

.prompt-box p {
  font-size: 0.85rem;
  color: var(--gray-700);
  line-height: 1.75;
}

.btn-copy-prompt {
  font-size: 0.82rem;
  padding: 8px 18px;
}

/* Gems link button */

.btn-gems {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #4285f4 0%, #886bf2 50%, #d96570 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
  margin-bottom: 24px;
}

.btn-gems:hover {
  opacity: 0.92;
  box-shadow: 0 4px 16px rgba(66, 133, 244, 0.4);
}

.btn-gems:active {
  transform: scale(0.98);
}

.gems-emoji {
  font-size: 1.15rem;
}

.gems-note {
  font-size: 0.78rem;
  color: #92400e;
  line-height: 1.7;
  background: #fffbeb;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  margin-bottom: 6px;
}

/* Tips box */

.tips-box {
  background: #fffbeb;
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 10px;
  padding: 18px 20px;
}

.tips-heading {
  font-size: 0.88rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 10px;
}

.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tips-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.8rem;
  color: #78350f;
  line-height: 1.7;
}

.tips-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: #d97706;
  font-weight: 700;
}

/* ─── How-to Page ─── */

.howto-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.howto-card.important {
  border: 1.5px solid rgba(239, 68, 68, 0.25);
  background: linear-gradient(180deg, var(--red-50) 0%, #fff 40%);
}

.howto-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-200);
}

.howto-card-icon {
  font-size: 1.2rem;
}

.howto-card-lead {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 20px;
}

/* Flow chart */

.flow-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.flow-step {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  position: relative;
}

.flow-step.accent {
  background: var(--blue-50);
  border-color: var(--blue-500);
}

.flow-step-badge {
  flex-shrink: 0;
  padding: 3px 10px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--blue-600);
  color: #fff;
  border-radius: 4px;
  margin-top: 2px;
}

.flow-step.accent .flow-step-badge {
  background: var(--purple-600);
}

.flow-step-emoji {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: -2px;
}

.flow-step-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 3px;
}

.flow-step-desc {
  font-size: 0.82rem;
  color: var(--gray-500);
  line-height: 1.6;
}

.flow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 28px;
  position: relative;
}

.flow-arrow-line {
  width: 2px;
  flex: 1;
  background: var(--blue-500);
}

.flow-arrow-head {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid var(--blue-500);
}

/* Mode switch guide */

.mode-guide {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mode-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.mode-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--red-500);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.mode-step-body p {
  font-size: 0.84rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 10px;
}

/* UI mock elements */

.ui-mock {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ui-mock-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  user-select: none;
}

.ui-mock-btn.inactive {
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
}

.ui-mock-btn.active {
  background: var(--green-50);
  color: var(--green-700);
  border: 1.5px solid var(--green-600);
}

.ui-caret {
  font-size: 0.7rem;
  color: var(--gray-400);
}

.ui-mock-label {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-style: italic;
}

.ui-mock-label.ok {
  color: var(--green-600);
  font-weight: 600;
  font-style: normal;
}

.ui-mock.dropdown {
  justify-content: flex-start;
}

.ui-dropdown-list {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  min-width: 200px;
}

.ui-dropdown-item {
  padding: 9px 16px;
  font-size: 0.8rem;
  color: var(--gray-600);
  cursor: default;
  border-bottom: 1px solid var(--gray-100);
}

.ui-dropdown-item:last-child {
  border-bottom: none;
}

.ui-dropdown-item.selected {
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 700;
}

/* FAQ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
}

.faq-q,
.faq-a {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  font-size: 0.85rem;
  line-height: 1.7;
}

.faq-q {
  font-weight: 600;
  color: var(--gray-800);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

.faq-a {
  color: var(--gray-600);
}

.faq-badge {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--blue-600);
  color: #fff;
  margin-top: 1px;
}

.faq-badge.a {
  background: var(--green-600);
}

/* ─── Manual Page ─── */

.manual {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.manual-section {
  display: flex;
  gap: 16px;
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.manual-section-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue-600);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 2px;
}

.manual-section-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 10px;
}

.manual-section-body p {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 8px;
}

.manual-section-body p:last-child {
  margin-bottom: 0;
}

.manual-diagram {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}

.diagram-node {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
}

.diagram-node.highlight {
  background: var(--blue-50);
  border-color: var(--blue-500);
  color: var(--blue-700);
}

.diagram-arrow {
  color: var(--gray-400);
  font-size: 1.1rem;
}

.manual-note {
  font-size: 0.8rem !important;
  color: var(--gray-400) !important;
  font-style: italic;
}

.manual-ol {
  list-style: none;
  counter-reset: manual-step;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0 4px;
}

.manual-ol li {
  counter-increment: manual-step;
  position: relative;
  padding-left: 32px;
  font-size: 0.84rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.manual-ol li::before {
  content: counter(manual-step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 0.72rem;
  font-weight: 700;
}

.manual-ol li a {
  color: var(--blue-600);
  text-decoration: none;
}

.manual-ol li a:hover {
  text-decoration: underline;
}

.manual-warn {
  color: var(--red-500);
  font-weight: 600;
  font-size: 0.82rem;
}

.manual-ol.flow-ol li::before {
  background: var(--blue-50);
  color: var(--blue-600);
}

/* Manual copy area */

.manual-copy-area {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.manual-copy-desc {
  font-size: 0.84rem;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 18px;
}

.manual-copy-hint {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.8;
  background: var(--blue-50);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 8px;
  padding: 12px 16px;
}

.manual-dl-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 14px;
}

.btn-manual-dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  background: var(--blue-600);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-sm);
  white-space: normal;
  text-align: left;
  line-height: 1.4;
}

.btn-manual-dl:hover {
  background: var(--blue-700);
  box-shadow: var(--shadow);
}

.btn-manual-dl:active {
  transform: scale(0.98);
}

.btn-manual-dl.spec {
  background: var(--gray-700);
}

.btn-manual-dl.spec:hover {
  background: var(--gray-800);
}

.btn-manual-dl svg {
  flex-shrink: 0;
}

.btn-manual-copy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: var(--gray-800);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-md);
  white-space: normal;
  text-align: left;
  line-height: 1.5;
}

.btn-manual-copy:hover {
  background: var(--gray-900);
}

.btn-manual-copy:active {
  transform: scale(0.98);
}

.btn-manual-copy svg {
  flex-shrink: 0;
}

/* ─── Toast ─── */

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gray-900);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ─── Number guide ─── */

.number-guide-page {
  background:
    radial-gradient(circle at 88% 0%, rgba(58, 119, 181, 0.1), transparent 32rem),
    #f4f7fa;
}

.number-guide-container {
  max-width: 960px;
  padding-top: 28px;
}

.number-page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 0 3px;
}

.number-page-back {
  color: #0b5aa5;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.18s, transform 0.18s;
}

.number-page-back:hover {
  color: #073f72;
  transform: translateX(-2px);
}

.number-page-back:focus-visible {
  outline: 3px solid rgba(11, 90, 165, 0.22);
  outline-offset: 3px;
  border-radius: 3px;
}

.number-page-product {
  color: #70849a;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.number-page-footer {
  margin-top: 34px;
}

.number-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.85fr);
  gap: 28px;
  align-items: end;
  padding: 30px;
  color: #f8fbff;
  background:
    radial-gradient(circle at 85% 15%, rgba(101, 163, 255, 0.24), transparent 36%),
    #082b55;
  border-radius: 18px 18px 8px 18px;
  box-shadow: 0 18px 44px rgba(8, 43, 85, 0.18);
}

.number-eyebrow {
  margin-bottom: 8px;
  color: #9bc9ff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.number-hero h2 {
  max-width: 15em;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.22;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.number-hero-copy > p:last-child {
  max-width: 56ch;
  margin-top: 14px;
  color: #d9e8f8;
  font-size: 0.86rem;
  line-height: 1.8;
}

.number-source-note {
  padding: 16px 17px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.number-source-note strong,
.number-source-note span {
  display: block;
}

.number-source-note strong {
  margin-bottom: 5px;
  color: #fff;
  font-size: 0.8rem;
}

.number-source-note span {
  color: #c9daec;
  font-size: 0.72rem;
  line-height: 1.65;
}

.number-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 22px 0 32px;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  overflow: hidden;
}

.number-timeline li {
  position: relative;
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 15px 14px;
}

.number-timeline li + li {
  border-left: 1px solid #dbe4ee;
}

.number-timeline-step {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: #fff;
  background: #0b5aa5;
  border-radius: 6px;
  font: 700 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.number-timeline strong,
.number-timeline li span:last-child {
  display: block;
}

.number-timeline strong {
  color: var(--gray-800);
  font-size: 0.76rem;
}

.number-timeline li span:last-child {
  margin-top: 2px;
  color: var(--gray-500);
  font-size: 0.67rem;
  line-height: 1.45;
}

.number-tool-card {
  margin-top: 24px;
  padding: 27px 28px 30px;
  background: #fff;
  border: 1px solid #dfe6ee;
  border-radius: 8px 18px 18px 18px;
  box-shadow: 0 12px 34px rgba(26, 54, 82, 0.07);
}

.number-tool-file {
  border-top: 4px solid #7890a8;
}

.number-tool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.number-tool-kicker {
  color: #0b5aa5;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.number-tool-head h3 {
  margin-top: 3px;
  color: #16283c;
  font-size: 1.15rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.number-status-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.number-status-badge.neutral { color: #465d73; background: #eaf0f5; }
.number-status-badge.pending { color: #875600; background: #fff1c7; }
.number-status-badge.confirmed { color: #12643a; background: #dff6e9; }
.number-status-badge.error { color: #9d2727; background: #fde6e6; }

.number-tool-lead {
  max-width: 65ch;
  margin-top: 12px;
  color: var(--gray-600);
  font-size: 0.82rem;
  line-height: 1.75;
}

.number-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  max-width: 620px;
  margin-top: 20px;
  padding: 5px;
  background: #eaf0f5;
  border-radius: 9px;
}

.number-mode-btn {
  min-height: 42px;
  padding: 8px 13px;
  color: #526579;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s, transform 0.18s;
}

.number-mode-btn:hover {
  color: #17395c;
  background: rgba(255, 255, 255, 0.55);
}

.number-mode-btn.active {
  color: #0b4f8d;
  background: #fff;
  border-color: #d2dee9;
  box-shadow: 0 3px 12px rgba(25, 58, 91, 0.08);
}

.number-mode-btn:active { transform: translateY(1px); }
.number-mode-btn:focus-visible { outline: 3px solid rgba(11, 90, 165, 0.22); outline-offset: 2px; }

.number-mode-panel {
  margin-top: 4px;
}

.number-mode-note {
  max-width: 72ch;
  margin: -8px 0 18px;
  color: #60758a;
  font-size: 0.71rem;
  line-height: 1.65;
}

.number-pattern {
  display: flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  margin: 20px 0;
  padding: 12px 14px;
  overflow-x: auto;
  color: #17395c;
  background: #edf5fc;
  border-left: 4px solid #0b5aa5;
  border-radius: 3px 8px 8px 3px;
  font-variant-numeric: tabular-nums;
}

.number-pattern code {
  color: inherit;
  font: 700 0.94rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

.compliance-pattern code:not(:first-child) {
  padding-left: 6px;
  border-left: 1px solid #b7cde1;
}

.lom-pattern code + code {
  padding-left: 5px;
  border-left: 1px solid #b7cde1;
}

.standard-pattern code + code {
  padding-left: 5px;
  border-left: 1px solid #b7cde1;
}

.number-anatomy {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  margin: -8px 0 18px;
  overflow: hidden;
  background: #d9e4ee;
  border: 1px solid #d9e4ee;
  border-radius: 9px;
}

.number-anatomy > div {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 12px 11px;
  background: #f8fbfe;
}

.number-anatomy code {
  color: #0b5aa5;
  font: 800 0.86rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.number-anatomy strong {
  color: #24394e;
  font-size: 0.67rem;
}

.number-anatomy span {
  color: #77889a;
  font-size: 0.58rem;
  line-height: 1.4;
}

.number-inline-form > label,
.number-form-grid > label {
  color: #26394d;
  font-size: 0.74rem;
  font-weight: 700;
}

.number-inline-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  margin-top: 6px;
}

.number-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 12px;
  margin-top: 22px;
}

.public-number-grid {
  grid-template-columns: minmax(210px, 1.5fr) 1fr 1fr;
}

.lom-number-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.standard-number-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.number-form-grid label {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.number-inline-controls input,
.number-form-grid input,
.number-form-grid select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  color: #172b40;
  background: #fbfdff;
  border: 1px solid #bfccd9;
  border-radius: 7px;
  font: 600 0.82rem/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.number-inline-controls input:focus,
.number-form-grid input:focus,
.number-form-grid select:focus {
  outline: none;
  background: #fff;
  border-color: #0b5aa5;
  box-shadow: 0 0 0 3px rgba(11, 90, 165, 0.14);
}

.number-form-grid small,
.number-approval-check small {
  display: block;
  margin-top: 4px;
  color: #76879a;
  font-size: 0.63rem;
  font-weight: 500;
  line-height: 1.4;
}

.number-field-help,
.number-feedback {
  margin-top: 7px;
  color: #718096;
  font-size: 0.69rem;
  line-height: 1.55;
}

.number-feedback {
  min-height: 1.1em;
}

.number-feedback.success { color: #147142; }
.number-feedback.error { color: #b12d2d; }

.lom-directory-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding: 13px 15px;
  color: #17395c;
  background: linear-gradient(100deg, #f3f8fd, #eef6ff);
  border: 1px solid #c8dced;
  border-radius: 8px;
  font-size: 0.73rem;
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.lom-directory-entry span { color: #526b82; }
.lom-directory-entry strong { color: #0b5aa5; }

.lom-directory-entry:hover {
  border-color: #82afd4;
  box-shadow: 0 8px 20px rgba(11, 90, 165, 0.1);
  transform: translateY(-1px);
}

/* ─── Nationwide LOM directory ─── */

.lom-directory-container { max-width: 1040px; }

.lom-directory-hero {
  grid-template-columns: minmax(0, 1.55fr) minmax(180px, 0.45fr);
  align-items: center;
  min-height: 250px;
  background:
    linear-gradient(120deg, rgba(3, 16, 33, 0.2), transparent 60%),
    radial-gradient(circle at 82% 18%, rgba(33, 186, 202, 0.27), transparent 25rem),
    #071d39;
}

.lom-directory-hero h1 {
  max-width: 14em;
  color: #fff;
  font-size: clamp(2rem, 5.4vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.lom-directory-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  color: #d6e6f5;
}

.lom-directory-hero-stat > span {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.lom-directory-hero-stat strong {
  color: #fff;
  font: 750 clamp(2.8rem, 8vw, 4.8rem)/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -0.08em;
}

.lom-directory-hero-stat small {
  margin-left: 5px;
  color: #72d5df;
  font: 700 0.78rem/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.lom-directory-hero-stat em {
  margin-top: 4px;
  color: #8faac3;
  font-size: 0.61rem;
  font-style: normal;
}

.lom-directory-search-card {
  position: sticky;
  top: 10px;
  z-index: 10;
  margin-top: 22px;
  padding: 19px 20px 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d9e3ec;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(16, 43, 70, 0.1);
  backdrop-filter: blur(14px);
}

.lom-directory-search-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.lom-directory-search-head h2,
.lom-directory-source h2 {
  margin-top: 2px;
  color: #142b42;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.lom-result-summary {
  color: #5d7287;
  font-size: 0.68rem;
  font-weight: 700;
}

.lom-directory-search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding: 0 12px;
  background: #f8fbfd;
  border: 1px solid #aebfce;
  border-radius: 8px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.lom-directory-search-box:focus-within {
  background: #fff;
  border-color: #087c8b;
  box-shadow: 0 0 0 3px rgba(8, 124, 139, 0.12);
}

.lom-directory-search-box > span {
  color: #087c8b;
  font: 400 1.35rem/1 Georgia, serif;
  transform: rotate(-18deg);
}

.lom-directory-search-box input {
  min-width: 0;
  height: 48px;
  color: #142b42;
  background: transparent;
  border: 0;
  outline: 0;
  font: 650 0.9rem/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lom-directory-search-box input::placeholder { color: #8b9aaa; font-weight: 500; }

.lom-directory-search-box button {
  padding: 5px 7px;
  color: #516a81;
  background: transparent;
  border: 0;
  font-size: 0.66rem;
  font-weight: 700;
  cursor: pointer;
}

.lom-directory-quick {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: #8291a0;
  font-size: 0.61rem;
}

.lom-directory-quick button {
  padding: 4px 8px;
  color: #456279;
  background: #edf3f7;
  border: 1px solid #dce6ed;
  border-radius: 999px;
  font-size: 0.62rem;
  cursor: pointer;
}

.lom-directory-quick button:hover { color: #086d79; border-color: #9ac7cc; }

.lom-directory-results-section {
  margin-top: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(22, 51, 78, 0.06);
}

.lom-directory-table-head,
.lom-directory-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: center;
}

.lom-directory-table-head {
  padding: 10px 18px;
  color: #75889a;
  background: #eef3f7;
  border-bottom: 1px solid #dbe4ec;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.lom-directory-row {
  min-height: 76px;
  padding: 14px 18px;
  border-bottom: 1px solid #ebf0f4;
  transition: background 0.16s;
}

.lom-directory-row:last-child { border-bottom: 0; }
.lom-directory-row:hover { background: #f9fcfd; }

.lom-directory-number strong,
.lom-directory-number span,
.lom-directory-name strong,
.lom-directory-name span { display: block; }

.lom-directory-number strong {
  color: #0b5aa5;
  font: 750 1.28rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
}

.lom-directory-number span,
.lom-directory-name span {
  margin-top: 5px;
  color: #8595a4;
  font-size: 0.59rem;
}

.lom-directory-name strong {
  color: #243a50;
  font-size: 0.78rem;
  line-height: 1.5;
}

.lom-directory-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.lom-directory-actions a,
.lom-directory-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.63rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.lom-directory-actions a {
  color: #fff;
  background: #087c8b;
  border: 1px solid #087c8b;
}

.lom-directory-actions button {
  color: #32516b;
  background: #fff;
  border: 1px solid #becbd6;
}

.lom-directory-actions a:hover { background: #066673; border-color: #066673; }
.lom-directory-actions button:hover { background: #edf4f8; }

.lom-directory-empty {
  padding: 54px 24px;
  color: #566d82;
  text-align: center;
}

.lom-directory-empty strong { color: #2b4258; font-size: 0.9rem; }
.lom-directory-empty p { margin-top: 6px; font-size: 0.68rem; }

.lom-directory-source {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 30px;
  margin-top: 24px;
  padding: 22px 24px;
  background: #f9fbfc;
  border: 1px solid #d6e1e9;
  border-left: 4px solid #087c8b;
  border-radius: 4px 10px 10px 4px;
}

.lom-directory-source-copy p {
  color: #52697f;
  font-size: 0.68rem;
  line-height: 1.75;
}

.lom-directory-source-copy p + p { margin-top: 8px; }
.lom-directory-source-copy a { color: #0b5aa5; font-weight: 700; }
.lom-directory-source-copy code { color: #134775; font-weight: 700; }

.lom-directory-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 100;
  padding: 10px 16px;
  color: #fff;
  background: #102f50;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  box-shadow: 0 12px 32px rgba(5, 22, 40, 0.25);
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.18s, transform 0.18s;
}

.lom-directory-toast.show { opacity: 1; transform: translate(-50%, 0); }

.number-action-btn {
  min-height: 42px;
  padding: 9px 15px;
  color: #fff;
  background: #0b5aa5;
  border: 1px solid #0b5aa5;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s, background 0.18s, border-color 0.18s;
}

.number-action-btn.secondary {
  color: #0b5aa5;
  background: #fff;
}

.number-action-btn:hover { background: #084981; border-color: #084981; }
.number-action-btn.secondary:hover { color: #fff; }
.number-action-btn:active { transform: translateY(1px) scale(0.99); }
.number-action-btn:focus-visible { outline: 3px solid rgba(11, 90, 165, 0.25); outline-offset: 2px; }

.number-approval-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 13px 14px;
  color: #405368;
  background: #f5f8fb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.76rem;
}

.number-approval-check input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: #0b5aa5;
}

.number-result-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 18px;
  color: #fff;
  background: #102f50;
  border-radius: 9px;
}

.number-result-label {
  display: block;
  margin-bottom: 3px;
  color: #a9c5df;
  font-size: 0.66rem;
  font-weight: 700;
}

.number-result-code {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #fff;
  font: 700 clamp(1rem, 3.5vw, 1.35rem)/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.number-result-panel .number-action-btn {
  color: #12385e;
  background: #fff;
  border-color: #fff;
  white-space: nowrap;
}

.number-result-panel .number-action-btn:hover {
  background: #dcecff;
}

.number-reference-details {
  margin-top: 22px;
  border-top: 1px solid #e0e7ef;
}

.number-reference-details summary {
  padding: 16px 2px 2px;
  color: #0b5aa5;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.number-reference-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 14px;
}

.number-reference-grid h4 {
  margin-bottom: 7px;
  color: #334b63;
  font-size: 0.75rem;
}

.number-reference-grid dl > div {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #edf1f5;
  font-size: 0.7rem;
}

.number-reference-grid dt { color: #0b5aa5; font-weight: 700; }
.number-reference-grid dd { color: #526579; }

.number-final-warning {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  margin-top: 24px;
  padding: 17px 19px;
  color: #624a12;
  background: #fff9e8;
  border: 1px solid #ead8a5;
  border-radius: 9px;
}

.number-final-warning strong { font-size: 0.76rem; }
.number-final-warning p { font-size: 0.71rem; line-height: 1.65; }

/* ─── Donation / Support Banner（donate.html と共通のダークトーン） ─── */

.donation-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.55fr);
  gap: 32px;
  align-items: center;
  margin-top: 40px;
  padding: 28px 30px;
  color: #edf3f9;
  background:
    radial-gradient(circle at 92% 0%, rgba(50, 99, 156, 0.28), transparent 25rem),
    radial-gradient(circle at 0% 100%, rgba(36, 64, 101, 0.2), transparent 20rem),
    #06080d;
  border: 1px solid rgba(184, 207, 235, 0.15);
  border-radius: 10px 28px 10px 10px;
  box-shadow: 0 22px 54px rgba(0, 8, 20, 0.22);
  overflow: hidden;
}

.donation-banner-copy {
  min-width: 0;
}

.donation-banner-eyebrow {
  margin-bottom: 7px;
  color: #a8cbf6;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.donation-banner-copy > strong {
  display: block;
  color: #edf3f9;
  font-size: clamp(1.05rem, 2vw, 1.34rem);
  line-height: 1.45;
}

.donation-banner-copy > p:last-child {
  margin-top: 9px;
  color: #c1cbd7;
  font-size: 0.78rem;
  line-height: 1.75;
}

.donation-banner-action {
  display: grid;
  gap: 10px;
}

.donation-banner-action a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  padding: 13px 16px;
  color: #06080d;
  background: #a8cbf6;
  border: 1px solid #a8cbf6;
  border-radius: 7px 15px 7px 7px;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(17, 56, 101, 0.28);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.donation-banner-action a:hover {
  color: #06080d;
  background: #c6def9;
  border-color: #c6def9;
  transform: translateY(-2px);
}

.donation-banner-action a:focus-visible {
  outline: 3px solid #78aef1;
  outline-offset: 4px;
}

.donation-banner-action small {
  color: #9eacbd;
  font-size: 0.66rem;
  line-height: 1.55;
}

/* ─── Footer ─── */

.footer {
  margin-top: 56px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-400);
}

.footer-unofficial {
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--gray-400);
}

/* ─── Utilities ─── */

.hidden {
  display: none !important;
}

/* ─── Responsive ─── */

@media (max-width: 540px) {
  .number-page-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .container {
    padding: 32px 16px 24px;
  }

  .number-guide-container {
    padding-top: 18px;
  }

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

  .tab-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 16px 0 24px;
  }

  .tab-btn {
    font-size: 0.72rem;
    padding: 8px 8px;
    gap: 3px;
  }

  .tab-btn svg {
    width: 14px;
    height: 14px;
  }

  .number-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 20px;
  }

  .lom-directory-hero-stat {
    align-items: flex-start;
    padding: 15px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 0;
  }

  .lom-directory-search-card { top: 4px; padding: 16px; }
  .lom-directory-search-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .lom-directory-quick { flex-wrap: wrap; }
  .lom-directory-table-head { display: none; }
  .lom-directory-row {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    padding: 15px 14px;
  }
  .lom-directory-actions { grid-column: 1 / -1; justify-content: stretch; }
  .lom-directory-actions a,
  .lom-directory-actions button { flex: 1; }
  .lom-directory-source { grid-template-columns: 1fr; gap: 12px; padding: 19px 17px; }

  .number-timeline {
    grid-template-columns: 1fr;
  }

  .number-timeline li + li {
    border-top: 1px solid #dbe4ee;
    border-left: 0;
  }

  .number-tool-card {
    padding: 22px 17px 24px;
  }

  .number-tool-head {
    gap: 10px;
  }

  .number-form-grid,
  .public-number-grid {
    grid-template-columns: 1fr 1fr;
  }

  .lom-number-grid {
    grid-template-columns: 1fr 1fr;
  }

  .standard-number-grid {
    grid-template-columns: 1fr 1fr;
  }

  .number-anatomy {
    grid-template-columns: 1fr 1fr;
  }

  .number-anatomy > div:last-child {
    grid-column: 1 / -1;
  }

  .public-number-grid label:first-child {
    grid-column: 1 / -1;
  }

  .number-result-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .number-reference-grid {
    grid-template-columns: 1fr;
  }

  .number-final-warning {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .flow-step {
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 14px;
  }

  .faq-q,
  .faq-a {
    padding: 12px 14px;
    font-size: 0.82rem;
  }

  .drop-zone {
    padding: 40px 16px;
  }

  .result-buttons {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
    width: 100%;
  }

  .manual-section {
    flex-direction: column;
    gap: 12px;
    padding: 20px 16px;
  }

  .manual-diagram {
    flex-direction: column;
    align-items: flex-start;
  }

  .diagram-arrow {
    transform: rotate(90deg);
    align-self: center;
  }

  .btn-manual-copy {
    padding: 12px 20px;
    font-size: 0.84rem;
  }

  .donation-banner {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 32px;
    padding: 22px 18px;
    border-radius: 8px 22px 8px 8px;
  }

  .donation-banner-action a {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .number-form-grid,
  .public-number-grid,
  .lom-number-grid,
  .standard-number-grid,
  .number-inline-controls {
    grid-template-columns: 1fr;
  }

  .number-anatomy {
    grid-template-columns: 1fr;
  }

  .number-anatomy > div:last-child {
    grid-column: auto;
  }

  .number-mode-switch {
    grid-template-columns: 1fr;
  }

  .public-number-grid label:first-child {
    grid-column: auto;
  }

  .number-tool-head {
    flex-direction: column;
  }

  .lom-directory-entry { align-items: flex-start; flex-direction: column; gap: 3px; }

  .lom-directory-row { grid-template-columns: 72px minmax(0, 1fr); }
}

/* ═══════════════════════════════════════════════
   Rule-based Audit (Phase 1)
   ═══════════════════════════════════════════════ */

.audit-area {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

/* 主役バリアント：処理完了後の「ローカル自動チェック」を目立たせる */
.audit-area.audit-primary {
  margin-top: 20px;
  padding: 24px 26px;
  border: 2px solid var(--blue-600);
  border-radius: 14px;
  background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 50%);
  box-shadow: 0 4px 18px rgba(59, 130, 246, 0.12);
  position: relative;
}

.audit-area.audit-primary::before {
  content: "STEP 2 / 自動チェック";
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--blue-600);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}

.audit-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.audit-area.audit-primary .audit-heading {
  font-size: 1.2rem;
  color: var(--blue-700);
}

.audit-heading-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.audit-heading-badge {
  display: inline-block;
  background: var(--green-50);
  color: var(--green-700);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.audit-loading {
  padding: 12px 0;
  color: var(--gray-500);
  font-size: 0.9rem;
}

.audit-summary {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  border: 1px solid var(--gray-200);
}

.audit-summary-ok   { background: var(--green-50); border-color: #bbf7d0; }
.audit-summary-warn { background: #fefce8;      border-color: #fef08a; }
.audit-summary-ng   { background: var(--red-50); border-color: #fecaca; }

.audit-summary-headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-weight: 700;
}

.audit-summary-status {
  font-size: 1.05rem;
}
.audit-ok  { color: var(--green-700); }
.audit-warn{ color: #b45309; }
.audit-ng  { color: var(--red-700); }

.audit-summary-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-600);
}

.audit-summary-note {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.55;
}

.audit-section {
  margin-top: 16px;
}

.audit-section-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--gray-200);
}

.audit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-check {
  border: 1px solid var(--gray-200);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
}

.audit-check.audit-ng   { border-left-color: var(--red-500); }
.audit-check.audit-warn { border-left-color: #eab308; }
.audit-check.audit-ok   { border-left-color: var(--green-600); }

.audit-check-head {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.audit-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.audit-badge.audit-ng   { background: #fecaca; color: var(--red-700); }
.audit-badge.audit-warn { background: #fef08a; color: #854d0e; }
.audit-badge.audit-ok   { background: #bbf7d0; color: var(--green-700); }

.audit-check-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
}

.audit-check-message {
  font-size: 0.88rem;
  color: var(--gray-700);
  margin: 4px 0;
  line-height: 1.55;
}

.audit-check-evidence,
.audit-check-suggestion,
.audit-check-ref {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-top: 4px;
}

.audit-check-evidence code,
.audit-check-ref code {
  background: var(--gray-100);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.76rem;
}

.audit-check-suggestion {
  color: var(--blue-700);
}

.audit-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-200);
}

.audit-actions .btn {
  font-size: 0.85rem;
  padding: 8px 14px;
}

/* ─── One-click Gems Handoff（柱A） ─── */

.quick-handoff {
  margin: 4px 0 22px;
  padding: 16px;
  background: linear-gradient(135deg, #eef6ff 0%, #f4f0ff 100%);
  border: 2px solid var(--blue-500, #2f6fdb);
  border-radius: 12px;
}

.btn-quick-handoff {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2f6fdb 0%, #5a3fd8 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(47, 111, 219, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.btn-quick-handoff:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(47, 111, 219, 0.45);
}

.btn-quick-handoff:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

.btn-quick-handoff:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.btn-quick-handoff .quick-handoff-emoji {
  font-size: 1.3rem;
}

.btn-quick-handoff .quick-handoff-sub {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 2px;
}

.quick-handoff-note {
  margin: 10px 2px 0;
  font-size: 0.78rem;
  color: var(--gray-600, #5f6b7a);
  line-height: 1.6;
}

.quick-handoff-hint {
  margin-top: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--gray-200, #dde3ea);
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.7;
}

.quick-handoff-hint ol {
  margin: 6px 0 0;
  padding-left: 22px;
}

.quick-handoff-hint li {
  margin: 3px 0;
}

/* ─── Shared page navigation ─── */

.app-page-nav {
  margin-bottom: 20px;
}

.app-page-nav a {
  color: #075fab;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.app-page-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.app-page-nav a:focus-visible {
  outline: 3px solid #f7b731;
  outline-offset: 5px;
  border-radius: 4px;
}

/* ================================================================
   Tool overview home
   ================================================================ */

.tool-home-page {
  background:
    radial-gradient(circle at 82% 2%, rgba(37, 99, 235, 0.09), transparent 28rem),
    #f3f6fa;
  color: #142238;
}

.tool-home-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 44px;
}

.tool-home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.tool-home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #102f58;
  text-decoration: none;
}

.tool-home-brand img {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  box-shadow: 0 6px 16px rgba(16, 47, 88, 0.18);
}

.tool-home-brand span {
  display: grid;
  line-height: 1.25;
}

.tool-home-brand strong {
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

.tool-home-brand small {
  margin-top: 3px;
  color: #6b7c92;
  font-size: 0.7rem;
}

.tool-home-meta {
  color: #64758b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.tool-home-nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tool-home-intro-link {
  color: #0b5aa5;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.tool-home-intro-link:hover {
  color: #073f72;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tool-home-intro-link:focus-visible {
  outline: 3px solid #f7b731;
  outline-offset: 4px;
  border-radius: 4px;
}

.tool-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 48px;
  align-items: end;
  min-height: 430px;
  padding: 66px 68px;
  overflow: hidden;
  position: relative;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 100%) 0 0 / 44px 44px,
    linear-gradient(135deg, #09274c 0%, #123a6d 67%, #165982 100%);
  border-radius: 30px;
  box-shadow: 0 28px 72px rgba(9, 39, 76, 0.18);
}

.tool-home-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -160px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(255,255,255,0.025), 0 0 0 104px rgba(255,255,255,0.02);
  pointer-events: none;
}

.tool-home-hero-copy,
.tool-home-hero-note {
  position: relative;
  z-index: 1;
}

.tool-home-eyebrow,
.tool-home-section-index {
  color: #78c8ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.tool-home-hero h1 {
  max-width: 720px;
  margin-top: 14px;
  font-size: clamp(2.55rem, 5.1vw, 4.85rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.tool-home-hero-copy > p:last-child {
  max-width: 720px;
  margin-top: 28px;
  color: #dce9f7;
  font-size: 1.03rem;
  line-height: 1.9;
}

.tool-home-hero-note {
  display: grid;
  gap: 12px;
  padding: 26px;
  background: rgba(8, 30, 58, 0.58);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}

.tool-home-note-label {
  color: #92d6ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.tool-home-hero-note strong {
  font-size: 1.08rem;
  line-height: 1.55;
}

.tool-home-hero-note a,
.tool-home-support a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
  padding-top: 15px;
  color: #fff;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.tool-home-section {
  padding: 96px 0 30px;
}

.tool-home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.tool-home-section-head h2 {
  margin-top: 6px;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.tool-home-section-head > p {
  max-width: 340px;
  color: #687990;
  font-size: 0.88rem;
  text-align: right;
}

.tool-home-section .tool-home-section-index {
  color: #0e68b2;
}

.tool-home-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 18px;
}

.tool-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr auto;
  gap: 20px;
  min-height: 225px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  color: #13243b;
  background: #fff;
  border: 1px solid #dbe3ed;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(25, 52, 82, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: #9cbad8;
  box-shadow: 0 18px 42px rgba(25, 52, 82, 0.12);
}

.tool-card:focus-visible,
.tool-home-hero a:focus-visible,
.tool-home-support a:focus-visible {
  outline: 4px solid #f7b731;
  outline-offset: 4px;
}

.tool-card-primary {
  grid-row: span 2;
  min-height: 470px;
  color: #fff;
  background: linear-gradient(148deg, #102f58 0%, #104e7a 100%);
  border-color: transparent;
}

.tool-card-primary::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 300px;
  height: 300px;
  background: rgba(77, 190, 255, 0.1);
  border-radius: 50%;
}

.tool-card-number {
  color: #7890aa;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.tool-card-primary .tool-card-number,
.tool-card-primary .tool-card-kicker {
  color: #86d2ff;
}

.tool-card-icon {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin-top: 25px;
  color: #10345c;
  background: #84d5ff;
  border-radius: 18px;
  font-size: 2.15rem;
  font-weight: 900;
  transform: rotate(-3deg);
}

.tool-card-copy {
  grid-column: 1 / -1;
  align-self: end;
  position: relative;
  z-index: 1;
}

.tool-card:not(.tool-card-primary) .tool-card-copy {
  grid-column: 1 / 3;
}

.tool-card-kicker {
  display: block;
  margin-bottom: 7px;
  color: #0d67ae;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tool-card h3 {
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.tool-card-primary h3 {
  font-size: clamp(2rem, 3.5vw, 3rem);
}

.tool-card p {
  margin-top: 12px;
  color: #60728a;
  font-size: 0.9rem;
  line-height: 1.75;
}

.tool-card-primary p {
  max-width: 520px;
  color: #d7e7f5;
  font-size: 0.98rem;
}

.tool-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  color: #afcae0;
  font-size: 0.75rem;
  list-style: none;
}

.tool-card li::before {
  content: "•";
  margin-right: 7px;
  color: #79d0ff;
}

.tool-card-action {
  grid-column: 3;
  align-self: end;
  color: #0c63a7;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.tool-card-primary .tool-card-action {
  grid-column: 1 / -1;
  justify-self: end;
  color: #fff;
}

.tool-card-lom,
.tool-card-builder {
  grid-column: 2;
}

.tool-home-browser-tools {
  margin-top: 74px;
  padding: 48px;
  color: #fff;
  background: #101923;
  border-radius: 24px;
}

.tool-home-section-head-dark .tool-home-section-index {
  color: #69c8e9;
}

.tool-home-section-head-dark > p {
  color: #9dabb9;
}

.browser-tool-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.browser-tool-item {
  display: flex;
  gap: 18px;
  padding: 24px;
  color: #fff;
  background: #182530;
  border: 1px solid #2b3a47;
  border-radius: 16px;
  text-decoration: none;
}

.browser-tool-mark {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  color: #0c2738;
  background: #72d0ed;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 900;
}

.browser-tool-list h3 {
  font-size: 1.05rem;
}

.browser-tool-sequence {
  display: block;
  margin-bottom: 4px;
  color: #72d0ed;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.browser-tool-list p {
  margin-top: 7px;
  color: #afbdc9;
  font-size: 0.82rem;
  line-height: 1.7;
}

.browser-tool-number {
  grid-column: 1 / -1;
  align-items: center;
  position: relative;
  background:
    radial-gradient(circle at 90% 10%, rgba(114, 208, 237, 0.12), transparent 18rem),
    #142a39;
  border-color: #355164;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.browser-tool-number:hover {
  transform: translateY(-2px);
  border-color: #72d0ed;
}

.browser-tool-number:active {
  transform: translateY(0);
}

.browser-tool-number:focus-visible {
  outline: 4px solid #f7b731;
  outline-offset: 4px;
}

.browser-tool-mark-number {
  font-size: 0.76rem;
  letter-spacing: -0.04em;
}

.browser-tool-number > div {
  flex: 1;
  min-width: 0;
}

.browser-tool-number p {
  max-width: 72ch;
}

.browser-tool-link-action {
  align-self: center;
  margin-left: auto;
  color: #92dbf2;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.tool-home-howto {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 18px 22px;
  background: #0a1118;
  border-radius: 14px;
}

.tool-home-howto img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.tool-home-howto p {
  display: grid;
  gap: 3px;
}

.tool-home-howto strong {
  color: #72d0ed;
  font-size: 0.75rem;
}

.tool-home-howto span {
  color: #d8e2ea;
  font-size: 0.83rem;
}

.tool-home-share {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.55fr);
  gap: 44px;
  align-items: center;
  margin-top: 28px;
  padding: 34px 38px;
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(25, 52, 82, 0.06);
}

.tool-home-share .tool-home-section-index {
  color: #0e68b2;
}

.tool-home-share h2 {
  margin-top: 7px;
  color: #142238;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  letter-spacing: -0.025em;
}

.tool-home-share p:not(.tool-home-section-index) {
  max-width: 650px;
  margin-top: 10px;
  color: #60728a;
  font-size: 0.84rem;
  line-height: 1.75;
}

.tool-home-share > a {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  color: #fff;
  background: #0b5aa5;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s;
}

.tool-home-share > a:hover {
  background: #084981;
  transform: translateY(-2px);
}

.tool-home-share > a:active {
  transform: translateY(1px) scale(0.98);
}

.tool-home-share > a:focus-visible {
  outline: 4px solid #f7b731;
  outline-offset: 4px;
}

.tool-home-share > a span {
  font-size: 0.9rem;
  font-weight: 800;
}

.tool-home-share > a small {
  color: #c7e4fb;
  font-size: 0.67rem;
}

.tool-home-support {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 54px;
  align-items: center;
  margin-top: 84px;
  padding: 46px 46px 46px 58px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 0%, rgba(50, 99, 156, 0.3), transparent 30rem),
    radial-gradient(circle at 0% 100%, rgba(36, 64, 101, 0.2), transparent 22rem),
    #06080d;
  border: 1px solid rgba(184, 207, 235, 0.15);
  border-radius: 24px;
  box-shadow: 0 24px 58px rgba(0, 8, 20, 0.2);
  overflow: hidden;
}

.tool-home-support .tool-home-section-index {
  color: #a8cbf6;
}

.tool-home-support h2 {
  margin-top: 9px;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.tool-home-support p:not(.tool-home-section-index) {
  max-width: 640px;
  margin-top: 17px;
  color: #d5e4f0;
  font-size: 0.9rem;
  line-height: 1.8;
}

.tool-home-support .tool-home-support-link {
  justify-content: space-between;
  max-width: 400px;
  margin-top: 22px;
  padding: 14px 16px;
  color: #06080d;
  background: #a8cbf6;
  border: 1px solid #a8cbf6;
  border-radius: 8px 16px 8px 8px;
  box-shadow: 0 12px 28px rgba(17, 56, 101, 0.3);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.tool-home-support .tool-home-support-link:hover {
  color: #06080d;
  background: #c6def9;
  border-color: #c6def9;
  transform: translateY(-2px);
}

.tool-home-support .tool-home-support-link:focus-visible {
  outline-color: #78aef1;
}

.tool-home-support > img {
  width: 100%;
  height: 280px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(0,0,0,0.3);
}

.tool-home-caution {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  margin-top: 24px;
  padding: 25px 30px;
  background: #fff;
  border: 1px solid #dbe3ed;
  border-left: 5px solid #0e68b2;
  border-radius: 14px;
}

.tool-home-caution strong {
  color: #17314e;
  font-size: 0.9rem;
}

.tool-home-caution p {
  color: #64758a;
  font-size: 0.82rem;
}

.tool-home-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 4px 0;
  color: #738297;
  font-size: 0.72rem;
}

@media (max-width: 900px) {
  .tool-home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 52px 44px;
  }

  .tool-home-hero-note {
    max-width: 460px;
  }

  .tool-home-grid {
    grid-template-columns: 1fr;
  }

  .tool-card-primary {
    grid-row: auto;
    min-height: 430px;
  }

  .tool-card-lom,
  .tool-card-builder {
    grid-column: 1;
  }

  .tool-home-support {
    grid-template-columns: 1fr 230px;
  }

  .tool-home-share {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 680px) {
  .tool-home-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 16px;
  }

  .tool-home-nav {
    align-items: flex-start;
  }

  .tool-home-brand small,
  .tool-home-meta,
  .tool-home-intro-link span {
    display: none;
  }

  .tool-home-nav-actions {
    gap: 10px;
  }

  .tool-home-intro-link {
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #dbe4ee;
    border-radius: 7px;
    font-size: 0.68rem;
  }

  .tool-home-brand strong {
    font-size: 0.82rem;
  }

  .tool-home-brand img {
    width: 36px;
    height: 36px;
  }

  .tool-home-hero {
    gap: 34px;
    padding: 40px 26px 28px;
    border-radius: 22px;
  }

  .tool-home-hero h1 {
    font-size: 2.15rem;
    line-height: 1.15;
    letter-spacing: -0.045em;
  }

  .tool-home-hero-copy > p:last-child {
    margin-top: 20px;
    font-size: 0.9rem;
  }

  .tool-home-section {
    padding-top: 68px;
  }

  .tool-home-section-head {
    display: block;
  }

  .tool-home-section-head > p {
    margin-top: 10px;
    text-align: left;
  }

  .tool-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 24px;
  }

  .tool-card-primary {
    min-height: 410px;
  }

  .tool-card-icon {
    margin-top: 8px;
  }

  .tool-card-copy {
    margin-top: auto;
  }

  .tool-card-action {
    align-self: flex-end;
  }

  .tool-home-browser-tools {
    margin-top: 48px;
    padding: 30px 22px;
    border-radius: 20px;
  }

  .browser-tool-list {
    grid-template-columns: 1fr;
  }

  .browser-tool-list article {
    padding: 20px;
  }

  .browser-tool-item {
    padding: 20px;
  }

  .browser-tool-number {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .browser-tool-number > div {
    flex: 1 1 calc(100% - 66px);
  }

  .browser-tool-link-action {
    flex-basis: 100%;
    margin: 4px 0 0 66px;
  }

  .tool-home-howto {
    align-items: flex-start;
  }

  .tool-home-support {
    grid-template-columns: 1fr;
    margin-top: 52px;
    padding: 30px 26px;
  }

  .tool-home-share {
    padding: 26px;
  }

  .tool-home-support > img {
    width: 150px;
    height: 150px;
    grid-row: 1;
  }

  .tool-home-caution {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tool-home-footer {
    display: grid;
    gap: 6px;
  }
}
