:root {
  --bg-base: #070c17;
  --bg-surface: #0d1526;
  --bg-card: #111d33;
  --bg-card-hover: #162040;
  --bg-input: #0a1220;

  --border: #1e2d4a;
  --border-active: #00d4ff;

  --text-primary: #e8edf5;
  --text-secondary: #9fb0ca;
  --text-muted: #526480;

  --accent: #00d4ff;
  --accent-strong: #0099ff;
  --accent-dim: rgba(0, 212, 255, 0.12);

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gold: #f5c842;

  --required: #ef4444;
  --required-dim: rgba(239, 68, 68, 0.12);
  --required-border: rgba(239, 68, 68, 0.35);

  --optional: #64748b;
  --optional-dim: rgba(100, 116, 139, 0.12);
  --optional-border: rgba(100, 116, 139, 0.3);

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.28);
  --shadow-accent: 0 0 24px rgba(0, 212, 255, 0.22);

  --color-l1: #f5c842;
  --color-l2: #00d4ff;
  --color-l3: #8b5cf6;
  --color-l4: #22c55e;
  --color-l5: #f59e0b;
  --color-l6: #ef4444;
  --color-l7: #64748b;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --max-width: 1180px;

  --font-body: "Noto Sans JP", sans-serif;
  --font-mono: "DM Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
}

.container,
.main-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.main-content {
  padding: 40px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.card,
.analysis-form,
.result-card,
.share-gauge-card,
.loading-inner,
.privacy-notice,
.safe-ai-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

h1, h2, h3, h4 { margin: 0; line-height: 1.35; }
h1 { font-size: 2.2rem; font-weight: 800; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(7, 12, 23, 0.88);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-block { display: flex; align-items: center; gap: 14px; }
.logo-icon { width: 42px; height: 42px; color: var(--accent); flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; }

.logo-main {
  font-size: 1.15rem;
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
}

.logo-sub { font-size: 0.72rem; color: var(--text-secondary); }

.header-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.nav-badge {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.68rem;
  font-family: var(--font-mono);
}

.nav-badge.powered {
  color: var(--gold);
  border-color: rgba(245, 200, 66, 0.25);
  background: rgba(245, 200, 66, 0.08);
}

.hero-section { position: relative; }

.hero-inner {
  position: relative;
  overflow: hidden;
  padding: 52px 44px;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 212, 255, 0.15);
  background:
    radial-gradient(circle at top right, rgba(0,212,255,0.12), transparent 28%),
    linear-gradient(180deg, #101b31 0%, #0b1424 100%);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.03);
}

.hero-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent 40%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  background: rgba(0,212,255,0.08);
  color: var(--accent);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  margin-bottom: 22px;
}

.hero-title {
  max-width: 800px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-description {
  max-width: 700px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.9;
}

.privacy-notice {
  padding: 18px 20px;
  border: 1px solid rgba(245, 200, 66, 0.16);
  background:
    linear-gradient(180deg, rgba(245, 200, 66, 0.08), rgba(245, 200, 66, 0.03));
}

.privacy-notice-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
}

.privacy-notice-text {
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.9;
}

.privacy-notice-list,
.privacy-list {
  margin-top: 12px;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.privacy-notice-list li,
.privacy-list li { margin-bottom: 6px; }

.safe-ai-card { padding: 20px 22px; }

.safe-ai-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.safe-ai-item {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}

.safe-ai-label {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.safe-ai-value {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.share-ladder { display: flex; flex-direction: column; gap: 8px; }

.ladder-item {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ladder-item:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: rgba(0, 212, 255, 0.25);
}

.ladder-threshold {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
}

.ladder-info { min-width: 0; }
.ladder-name { font-size: 0.92rem; font-weight: 700; }
.ladder-desc { margin-top: 4px; font-size: 0.75rem; color: var(--text-secondary); }

.ladder-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  font-size: 0.65rem;
  font-family: var(--font-mono);
}

.analysis-form { padding: 32px; }

/* ============================================
   入力凡例
============================================ */
.form-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 24px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.legend-text { line-height: 1.4; }

/* ============================================
   必須/任意 バッジ
============================================ */
.badge-required {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--required);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.badge-optional {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--optional-dim);
  color: var(--text-secondary);
  border: 1px solid var(--optional-border);
  font-size: 0.62rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ============================================
   必須/任意ブロック
============================================ */
.form-section-block {
  position: relative;
  margin-bottom: 28px;
  padding: 22px 22px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.form-section-block.required-block {
  border-color: var(--required-border);
  background:
    linear-gradient(180deg, rgba(239, 68, 68, 0.06), rgba(239, 68, 68, 0.015));
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.06) inset;
}

.form-section-block.required-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--required), rgba(239, 68, 68, 0.4));
}

.form-section-block.optional-block {
  border-color: var(--optional-border);
  background:
    linear-gradient(180deg, rgba(100, 116, 139, 0.05), rgba(100, 116, 139, 0.01));
}

.form-section-block.optional-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--optional), rgba(100, 116, 139, 0.3));
}

.block-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.block-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.62rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
}

.block-badge.required {
  background: var(--required);
  color: #fff;
}

.block-badge.optional {
  background: var(--optional-dim);
  color: var(--text-secondary);
  border: 1px solid var(--optional-border);
}

.block-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.block-subtitle {
  width: 100%;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.form-group { display: flex; flex-direction: column; }
.form-group--wide { grid-column: 1 / -1; }

label,
.form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
}

.form-hint {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

input,
textarea,
.form-input {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-family: var(--font-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder,
textarea::placeholder,
.form-input::placeholder { color: var(--text-muted); }

input:focus,
textarea:focus,
.form-input:focus {
  outline: none;
  border-color: var(--border-active);
  box-shadow: var(--shadow-accent);
  background: rgba(10, 18, 32, 0.96);
}

.form-input--required {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.03);
}

.form-input--required:focus {
  border-color: var(--required);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
  background: rgba(239, 68, 68, 0.05);
}

.form-input--required:valid {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.03);
}

textarea { resize: vertical; min-height: 120px; }

.input-with-unit { position: relative; }
.input-with-unit input { padding-right: 42px; }

.unit-label {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.share-preview {
  margin-top: 8px;
  min-height: 20px;
  font-size: 0.78rem;
  color: var(--accent);
}

.input-guide {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.7;
}

.input-guide.safe { color: var(--success); }

button { font-family: var(--font-body); }

.form-actions {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.btn-analyze, button { cursor: pointer; }

.btn-analyze {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 16px 28px;
  border: none;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(0, 153, 255, 0.25);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-analyze:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 153, 255, 0.35);
}

.btn-analyze:active { transform: translateY(0); }
.btn-analyze:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-analyze::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-analyze:hover::before { opacity: 1; }

.btn-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  font-size: 0.65rem;
  font-family: var(--font-mono);
}

.form-note {
  text-align: center;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.loading-inner {
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

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

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 320px;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.loading-step.active { color: var(--accent); }
.loading-step.done { color: var(--success); }

.result-section { animation: fadeUp 0.35s ease; }

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

.result-meta {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.share-gauge-card { padding: 28px; margin-bottom: 24px; }

.gauge-label-top {
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.gauge-bar-wrap { position: relative; }

.gauge-bar {
  position: relative;
  height: 34px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.gauge-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0088ff, #00d4ff);
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gauge-markers { position: absolute; inset: 0; pointer-events: none; }

.gauge-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.15);
  transform: translateX(-50%);
}

.gauge-marker-label {
  position: absolute;
  top: -18px;
  transform: translateX(-50%);
  font-size: 0.58rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
}

.gauge-info {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.gauge-stat-label { font-size: 0.72rem; color: var(--text-muted); }

.gauge-stat-value {
  font-size: 1.1rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.classification-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.class-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.75rem;
}

.class-badge-key { color: var(--text-muted); font-family: var(--font-mono); }
.class-badge-val { color: var(--text-primary); font-weight: 700; }

.result-tabs {
  display: flex;
  gap: 6px;
  padding: 6px 6px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab-btn:hover { color: var(--text-secondary); background: var(--bg-card-hover); }

.tab-btn.active {
  color: var(--accent);
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--bg-base);
  margin-bottom: -1px;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.result-card {
  padding: 30px;
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  line-height: 1.85;
}

.result-card h2 {
  margin-top: 28px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
}

.result-card h2:first-child { margin-top: 0; }

.result-card h3 {
  margin-top: 18px;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.95rem;
}

.result-card p,
.result-card li { color: var(--text-secondary); font-size: 0.9rem; }

.result-card strong { color: var(--text-primary); }
.result-card ul,
.result-card ol { padding-left: 20px; }

.result-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}

.result-card th,
.result-card td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.result-card th {
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.result-card td { color: var(--text-secondary); font-size: 0.84rem; }

.result-card blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.result-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.error-banner {
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.1);
  color: #ff8f8f;
  font-size: 0.84rem;
  line-height: 1.8;
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  padding: 28px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.footer-tech {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-tech span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.footer-tech span::before {
  content: "◆ ";
  color: var(--accent);
  opacity: 0.45;
}

.hidden { display: none !important; }
.text-center { text-align: center; }

::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-strong); }

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type="number"] { -moz-appearance: textfield; }

@media (max-width: 1080px) {
  .safe-ai-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group--wide { grid-column: auto; }
  .gauge-info { grid-template-columns: 1fr; }
  .result-actions { flex-direction: column; }
}

@media (max-width: 680px) {
  .main-content { padding: 24px 16px 60px; gap: 40px; }
  .header-inner { flex-direction: column; align-items: flex-start; }

  .analysis-form,
  .result-card,
  .share-gauge-card,
  .loading-inner,
  .hero-inner,
  .privacy-notice,
  .safe-ai-card { padding: 20px 16px; }

  .form-section-block { padding: 18px 16px 20px; }

  .btn-analyze { font-size: 0.92rem; padding: 15px 18px; }
  .section-title { font-size: 1.2rem; }

  .result-tabs {
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius);
  }

  .tab-btn.active {
    border: none;
    margin-bottom: 0;
    background: var(--accent-dim);
  }

  .ladder-item { grid-template-columns: 90px 1fr; }
  .ladder-tag { display: none; }
  .hero-title { font-size: 1.2rem; }
  .hero-description { font-size: 0.92rem; }
  .safe-ai-grid { grid-template-columns: 1fr; }

  .form-legend { flex-direction: column; gap: 10px; }
}

/* B-1: 年商クイック入力プリセット */
.sales-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.sales-preset-btn {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  font-family: var(--font-mono);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.sales-preset-btn:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.sales-preset-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

/* B-2: リアルタイムプレビューゲージ */
.live-gauge-card {
  margin-bottom: 24px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 212, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(0, 212, 255, 0.06), rgba(0, 212, 255, 0.015));
  box-shadow: var(--shadow-card);
  animation: fadeUp 0.3s ease;
}

.live-gauge-label {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.live-gauge-info {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

/* B-3: サマリーヒーロー */
.summary-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 24px;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 212, 255, 0.2);
  background:
    radial-gradient(circle at top right, rgba(0,212,255,0.1), transparent 35%),
    linear-gradient(180deg, #101b31 0%, #0b1424 100%);
  box-shadow: var(--shadow-card);
}

.summary-hero-item {
  flex: 1 1 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
}

.summary-hero-key {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.summary-hero-val {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
}

.summary-hero-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border);
}

/* A-3: やるべきことTOP3 */
.action-top3 {
  margin-bottom: 24px;
}

.action-top3:empty { display: none; }

.action-top3-title {
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 800;
}

.action-top3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.action-top3-item {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.action-top3-item:hover {
  border-color: rgba(245, 200, 66, 0.4);
  transform: translateY(-2px);
}

.action-top3-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(245, 200, 66, 0.14);
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.9rem;
}

.action-top3-text {
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.6;
}

/* A-1 / A-2: インサイトカード */
.insight-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.insight-row:empty { display: none; }

.insight-card {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.insight-card-label {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-bottom: 10px;
}

.insight-card-value {
  font-size: 1.7rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.2;
  margin-bottom: 6px;
}

.insight-card-sub {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* A-5: 3年シミュレーション */
.simulation-card {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.sim-title {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.sim-note {
  color: var(--text-muted);
  font-size: 0.74rem;
  margin-bottom: 18px;
}

.sim-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sim-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 14px;
  align-items: center;
}

.sim-row-year {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.sim-row-bar-wrap {
  height: 22px;
  border-radius: 999px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  overflow: hidden;
}

.sim-row-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sim-row-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.sim-row-level {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.sim-row-sales {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* A-4: 匿名ベンチマーク */
.benchmark-card {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.benchmark-title {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.benchmark-item {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}

.benchmark-key {
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-bottom: 8px;
}

.benchmark-val {
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.benchmark-note {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

@media (max-width: 920px) {
  .action-top3-grid { grid-template-columns: 1fr; }
  .insight-row { grid-template-columns: 1fr; }
  .benchmark-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-hero-divider { display: none; }
  .summary-hero-item { flex: 1 1 45%; }
}

@media (max-width: 680px) {
  .summary-hero,
  .simulation-card,
  .benchmark-card,
  .insight-card,
  .live-gauge-card { padding: 18px 16px; }

  .summary-hero-val { font-size: 1.4rem; }
  .benchmark-grid { grid-template-columns: 1fr; }
  .sim-row { grid-template-columns: 56px 1fr; }
  .sim-row-meta { grid-column: 1 / -1; justify-content: flex-start; }
}

/* B-5: 印刷 / PDF用スタイル */
@media print {
  body { background: #fff; color: #000; }
  body::before { display: none; }

  .site-header,
  .hero-section,
  .safe-ai-card,
  .share-ladder-section,
  .form-section,
  .loading-section,
  .result-tabs,
  .result-actions,
  .site-footer,
  #privacyNotice,
  .feedback-card,
  .live-gauge-card { display: none !important; }

  .main-content { padding: 0; gap: 16px; display: block; }

  .result-section { display: block !important; animation: none; }

  .tab-content { display: block !important; }

  .summary-hero,
  .action-top3-item,
  .insight-card,
  .simulation-card,
  .benchmark-card,
  .share-gauge-card,
  .result-card,
  .class-badge {
    background: #fff !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    color: #000 !important;
  }

  .summary-hero-val,
  .insight-card-value,
  .benchmark-val,
  .gauge-stat-value { color: #000 !important; }

  .result-card h2 { color: #0066aa !important; }
  .result-card p,
  .result-card li,
  .action-top3-text,
  .benchmark-key { color: #222 !important; }
}

.help-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--optional-dim);
  border: 1px solid var(--optional-border);
  color: var(--text-secondary);
  font-size: 0.62rem;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: help;
  flex-shrink: 0;
}

.help-tip:hover,
.help-tip:focus {
  outline: none;
  border-color: var(--border-active);
  color: var(--accent);
  background: var(--accent-dim);
}

.help-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 240px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-hover);
  border: 1px solid var(--border-active);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 400;
  font-family: var(--font-body);
  line-height: 1.6;
  white-space: normal;
  text-align: left;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}

.help-tip:hover::after,
.help-tip:focus::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 680px) {
  .help-tip::after {
    width: 200px;
    left: auto;
    right: -8px;
    transform: translateY(4px);
  }
  .help-tip:hover::after,
  .help-tip:focus::after {
    transform: translateY(0);
  }
}

.btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.14);
  color: #ff8f8f;
  font-size: 0.78rem;
  font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-retry:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.55);
  transform: translateY(-1px);
}

/* ============================================
   フィードバックUI
============================================ */
.feedback-card {
  margin-top: 24px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(0, 212, 255, 0.06), rgba(0, 212, 255, 0.015));
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: var(--shadow-card);
  animation: fadeUp 0.3s ease;
}

.feedback-title {
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.feedback-sub {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.feedback-btns {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 700;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.feedback-btn:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.feedback-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.feedback-comment {
  width: 100%;
  min-height: 60px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.86rem;
  font-family: var(--font-body);
  resize: vertical;
}

.feedback-comment:focus {
  outline: none;
  border-color: var(--border-active);
  box-shadow: var(--shadow-accent);
}

.feedback-status {
  min-height: 20px;
  font-size: 0.8rem;
  line-height: 1.6;
}

.feedback-done {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--success);
  font-size: 0.86rem;
  font-weight: 700;
}
