/* Googleフォーム アンケート分析ツール - Web UI
   デジタル庁ダッシュボードデザインテンプレート Blue パレットを適用
   参照: https://www.digital.go.jp/resources/dashboard-guidebook
   テーマJSON: /static/design/CustomThemeBlueDefault_2026.json
   （出典: digital-go-jp/policy-dashboard-assets） */

:root {
  /* Background */
  --bg: #ffffff;
  --surface: #ffffff;
  --control: #f5f5f7;
  --highlight: #0017c1;

  /* Text */
  --text: #000000;
  --text-body: #333333;
  --label: #626264;
  --muted: #666666;

  /* Blue palette (Digital Agency Dashboard Template Blue) */
  --blue-1200: #000060;
  --blue-900: #0017c1;
  --blue-600: #3460fb;
  --blue-400: #7096f8;
  --blue-200: #c5d7fb;
  --blue-50: #e8f1fe;

  --primary: var(--blue-900);
  --primary-dark: var(--blue-1200);
  --primary-hover: var(--blue-600);
  --accent: var(--blue-900);

  --border: #999999;
  --border-soft: #cccccc;
  --gridline: #e6e6e6;
  --focus-yellow: #ffc700;

  --success: #197a4b;
  --error: #ce0000;
  --error-bg: #fdeeee;
  --info-bg: var(--blue-50);

  --shadow: none;
  --radius: 8px;
  --ad-bg: #f2f2f2;
  --ad-border: #d8d8d8;
  --font: "Noto Sans JP", "Noto Sans", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --line: 1.75;

  /* Chart series (theme dataColors) */
  --chart-1: #0017c1;
  --chart-2: #3460fb;
  --chart-3: #7096f8;
  --chart-4: #c5d7fb;
  --chart-5: #e8f1fe;
  --chart-neg: #fe3939;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-body);
  line-height: var(--line);
}

a { color: var(--primary); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { color: var(--primary-hover); }
a:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--focus-yellow);
}

.site-header {
  background: #fff;
  color: var(--text);
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border-soft);
}

.site-header .inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.logo-title {
  display: block;
  color: var(--text);
  font-weight: 700;
}
.logo-sub,
.logo span:not(.logo-title) {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8rem;
  display: block;
}
.nav a {
  color: var(--text);
  margin-left: 1rem;
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15rem;
}
.nav a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
  text-decoration: none;
}
.nav a[aria-current="page"] {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--control);
}
.lang-switch__icon {
  width: 1rem;
  height: 1rem;
  margin: 0 0.25rem 0 0.45rem;
  color: var(--label);
}
.lang-switch button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--label);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
}
.lang-switch button.is-active {
  background: var(--primary);
  color: #fff;
}
.lang-switch button:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--focus-yellow);
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  flex-shrink: 0;
}
.icon--lg {
  width: 1.75rem;
  height: 1.75rem;
}
.icon--xl {
  width: 2.5rem;
  height: 2.5rem;
}
.icon-badge {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-badge--step {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 2.75rem;
  height: 2.75rem;
}
.btn .icon {
  width: 1.05rem;
  height: 1.05rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.5rem;
}
.section-title h2 {
  margin: 0;
}

.layout {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1.25rem;
  align-items: start;
}

.layout.analysis-mode {
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
  padding: 0.75rem 1rem 2rem;
}

.layout.analysis-mode .sidebar-ads,
.layout.analysis-mode .ad-banner,
.layout.analysis-mode #hero,
.layout.analysis-mode #tools,
.layout.analysis-mode #how-to,
.layout.analysis-mode #ai-guide-section,
.layout.analysis-mode #upload-section,
.layout.analysis-mode #faq {
  display: none;
}

.layout.analysis-mode .main-content {
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.layout.analysis-mode .card {
  padding: 1.25rem 1.5rem;
}

.layout.analysis-mode .table-wrap {
  max-width: 100%;
}

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar-ads { order: 2; }
  .layout.analysis-mode .sidebar-ads { display: none; }
}

.ad-slot {
  background: var(--ad-bg);
  border: 1px dashed var(--ad-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
  overflow: hidden;
  min-height: 90px;
}

.ad-banner { max-width: 1600px; margin: 1rem auto 0; padding: 0 1.25rem; }
.ad-banner .ad-slot { min-height: 90px; max-height: 120px; }
.ad-sidebar .ad-slot { min-height: 250px; margin-bottom: 1rem; }
.ad-incontent { margin: 1.5rem 0; }
.ad-incontent .ad-slot { min-height: 100px; }

.card {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: none;
  border: 1px solid var(--border-soft);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: 1.5rem;
}

.card h2 { margin: 0 0 0.5rem; font-size: 1.2rem; color: var(--text); }
.card .subtitle { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }

.hero {
  text-align: left;
  padding: 1.5rem 0 0.5rem;
  margin-bottom: 1rem;
}
.hero--compact {
  max-width: 48rem;
}
.hero-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--label);
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  margin: 0 0 0.75rem;
  color: var(--text);
  font-weight: 700;
  line-height: 1.4;
  border-left: 4px solid var(--primary);
  padding-left: 0.75rem;
}
.hero-lead,
.hero p {
  color: var(--text-body);
  max-width: 44rem;
  margin: 0 0 1.25rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.25rem;
}

.card--flush {
  border: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0.5rem;
}
#upload-section {
  margin-top: 0.35rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 1.1rem 1.1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.tool-card:hover {
  border-color: var(--blue-600);
  background: var(--blue-50);
  text-decoration: none;
}
.tool-card:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--focus-yellow);
}
.tool-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.tool-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.4;
}
.tool-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.feature {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 0.75rem;
  font-size: 0.85rem;
  text-align: left;
}

.faq-list {
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.faq-item {
  margin: 0;
  padding: 0;
}
.faq-item dt {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
}
.faq-item dd {
  margin: 0;
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.75;
}
.upload-sample-links a {
  font-weight: 500;
}

.how-to-section .dads-steps--wide {
  margin-top: 1rem;
}
.how-to-cta {
  margin: 1.25rem 0 0;
}

.sidebar-quick h2 {
  font-size: 1rem;
}
.sidebar-quick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.sidebar-quick-list a {
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.sidebar-quick-list a:hover {
  border-bottom-color: var(--primary);
}

.design-credit {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}
.design-credit a { color: var(--muted); }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: #f0f7fc;
}

.upload-zone input { display: none; }
.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--blue-200);
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--primary);
}
.upload-icon .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.tab {
  padding: 0.6rem 1rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
}

.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--muted); }
select, button.btn { font-family: inherit; font-size: 0.9rem; }

select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}
.btn:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--focus-yellow);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; text-decoration: none; }
.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: #f2f2f2; text-decoration: none; }
.btn-accent {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-accent:hover { background: var(--blue-50); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.metric { background: var(--blue-50); border-radius: 8px; padding: 0.75rem; text-align: center; }
.metric .value { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.metric .label { font-size: 0.75rem; color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 1rem 0; -webkit-overflow-scrolling: touch; }
table.data-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 0.85rem; }
table.data-table th, table.data-table td { border: 1px solid var(--border); padding: 0.5rem 0.65rem; text-align: right; }
table.data-table th:first-child, table.data-table td:first-child { text-align: left; }
table.data-table thead { background: #eef3f8; }

table.data-table td.cell-high {
  background: #ececec;
  font-weight: 700;
  text-decoration: underline;
  color: #111;
}
table.data-table td.cell-low {
  background: #f7f7f7;
  font-style: italic;
  color: #555;
}
table.data-table.apa-table {
  font-family: "Times New Roman", "Yu Mincho", serif;
  border-collapse: collapse;
}
table.data-table.apa-table thead th {
  border-top: 2px solid #000;
  border-bottom: 1px solid #000;
  background: #fff;
}
table.data-table.apa-table tbody tr:last-child td {
  border-bottom: 2px solid #000;
}
.option-editor {
  min-width: 180px;
}
.opt-pair {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 3px;
}
.opt-pair .opt-val {
  width: 48px;
  padding: 0.25rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.78rem;
  text-align: center;
}
.opt-pair .opt-eq {
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
}
.opt-pair .opt-lbl {
  flex: 1;
  min-width: 60px;
  padding: 0.25rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.78rem;
}
.opt-del {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f5f5f5;
  color: #c00;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}
.opt-del:hover { background: #fdecea; }
.opt-add {
  width: 100%;
  padding: 0.2rem;
  border: 1px dashed var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.opt-add:hover { background: #f0f7fc; }

/* --- 欠損値モード --- */
.schema-missing {
  font-size: 0.78rem;
  padding: 0.2rem 0.3rem;
  min-width: 100px;
}
.schema-condition-cell {
  min-width: 260px;
  max-width: 340px;
}
.schema-condition-cell select {
  width: 100%;
  min-width: 160px;
  padding: 0.25rem 0.35rem;
  font-size: 0.78rem;
}
.condition-join-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
}
.condition-join-row label {
  font-size: 0.7rem;
  color: var(--muted);
  margin: 0;
}
.condition-rules {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.condition-rule {
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 6px;
  background: #fafcfe;
}
.condition-rule-head {
  display: flex;
  gap: 4px;
  align-items: center;
}
.condition-rule-remove {
  flex: 0 0 auto;
  border: 1px solid #d0d7e2;
  background: #fff;
  color: #64748b;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  line-height: 1;
}
.condition-rule-remove:hover:not(:disabled) {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #f0c4c4;
}
.condition-rule-remove:disabled {
  opacity: 0.35;
  cursor: default;
}
.condition-rule-add {
  margin-top: 6px;
  border: 1px dashed #9bb6d0;
  background: #f5f9fc;
  color: #1e5a8a;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  cursor: pointer;
  width: 100%;
}
.condition-rule-add:hover {
  background: #eaf3fa;
}
.condition-values-wrap {
  margin-top: 6px;
}
.condition-values {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.condition-values.empty {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}
.condition-chip {
  border: 1px solid #c5d3e0;
  background: #f7fafc;
  color: #334155;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  cursor: pointer;
  line-height: 1.3;
}
.condition-chip:hover {
  background: #eef5fb;
  border-color: #9bb6d0;
}
.condition-chip.active {
  background: #1f6f9f;
  border-color: #1f6f9f;
  color: #fff;
  font-weight: 600;
}

/* --- 合算グループエディタ --- */
.group-editor { min-width: 200px; }
.grp-pair {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}
.grp-pair .grp-vals {
  width: 80px;
  padding: 0.25rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.78rem;
}
.grp-pair .grp-lbl {
  flex: 1;
  min-width: 70px;
  padding: 0.25rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.78rem;
}
.grp-add {
  width: 100%;
  padding: 0.2rem;
  border: 1px dashed var(--border);
  border-radius: 4px;
  background: transparent;
  color: #38a169;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.grp-add:hover { background: #f0fcf5; }

.face-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  margin: 0.2rem;
  background: #f0f3f6;
  border-radius: 6px;
  font-size: 0.85rem;
}
.face-order-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
}
.face-order-row {
  display: flex;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.face-order-index {
  min-width: 1.2rem;
  font-weight: 700;
  color: var(--muted);
}
.face-order-label {
  flex: 1;
}
.face-order-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 4px;
  width: 1.6rem;
  height: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.face-order-btn:hover {
  background: #e8eef4;
}
.type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border: 1px solid #888;
  border-radius: 3px;
  color: #333;
}
.question-header {
  background: #e8e8e8;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-bottom: none;
  margin-top: 1rem;
}
.simple-tab-block .table-wrap {
  margin-bottom: 1.25rem;
}
.simple-table thead th {
  background: #e8e8e8;
  text-align: center;
}
.simple-table td:nth-child(2),
.simple-table td:nth-child(3),
.simple-table th:nth-child(2),
.simple-table th:nth-child(3) {
  text-align: right;
}
table.data-table th.option-header {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  min-width: 2.2em;
  max-width: 3em;
  padding: 0.6rem 0.35rem;
  vertical-align: bottom;
}
table.data-table .highlight-legend {
  caption-side: bottom;
  text-align: left;
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 0.5rem;
}
#report-chart img,
#freq-chart img,
#cross-chart img {
  max-width: 100%;
  height: auto;
}

.chart-wrap { text-align: center; margin: 1rem 0; }
.chart-wrap img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); }
.headline { font-size: 1.05rem; font-weight: 600; color: var(--primary-dark); margin: 0.5rem 0; }

.status-bar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.status-bar.visible { display: flex; }
.status-bar__body { flex: 1; min-width: 0; }
.status-bar__body #status-text { display: block; margin-bottom: 0.45rem; font-weight: 700; color: var(--text); }

.progress-track {
  width: 100%;
  height: 0.5rem;
  background: #e8e8e8;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  width: 40%;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  animation: progress-slide 1.2s ease-in-out infinite;
}
@keyframes progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(26, 26, 26, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.processing-overlay.hidden { display: none !important; }
.processing-overlay__panel {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.processing-overlay__panel p {
  margin: 1rem 0 0.75rem;
  font-weight: 700;
  color: var(--text);
}
.processing-overlay__hint {
  margin: 0.85rem 0 0 !important;
  font-weight: 400 !important;
  font-size: 0.85rem;
  color: var(--muted) !important;
}

body.is-processing {
  overflow: hidden;
}

.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid #ffbbbb; }
.alert-info { background: var(--info-bg); color: var(--blue-1200); border: 1px solid var(--blue-200); }
.hidden { display: none !important; }

.checkbox-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
}

.checkbox-list label {
  font-weight: 400;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.25rem 0;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.35;
}

.select-toolbar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0.35rem 0 0.4rem;
}

.btn-sm {
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
  border-radius: 6px;
}

.item-col {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82em;
}

.item-lab {
  color: var(--text);
}

.site-footer {
  max-width: 1600px;
  margin: 2rem auto;
  padding: 1.75rem 1.5rem 2.5rem;
  text-align: left;
  color: var(--text-body);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
  background: #fff;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem 2rem;
}

.site-footer h2 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  color: var(--text);
}

.site-footer p,
.site-footer address {
  margin: 0 0 0.45rem;
  font-style: normal;
  line-height: 1.7;
  color: var(--muted);
}

.site-footer .cite-box {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--primary);
  background: #f8f8fb;
  color: var(--text-body);
}

.site-footer .cite-url {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 700;
  word-break: break-all;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.dads-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.dads-steps li {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
}

.dads-steps .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
.dads-steps .step-num .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.dads-steps .step-body {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.7;
}
.dads-steps .step-body strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text);
  font-size: 1rem;
}

.legal-page {
  max-width: 42rem;
  margin: 2rem auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.legal-page h1 {
  border-left: 4px solid var(--primary);
  padding-left: 0.75rem;
}

/* ---------- 文書ページ（運営情報・プライバシー） ----------
   Digital Agency: 明確な階層・コントラスト・フォーカス
   Toyota: 余白と情報の整理、迷いのない導線
   Apple: 読みやすい行長・大きな余白・1セクション1テーマ
*/
.page-doc {
  background: #fff;
  min-height: 100vh;
}

.page-doc .site-header .logo span {
  display: block;
}

.page-doc .nav a[aria-current="page"] {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.doc-wrap {
  width: min(100% - 2.5rem, 42rem);
  margin: 0 auto;
  padding: 1.5rem 0 3.5rem;
}

.doc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  color: var(--label);
}
.doc-breadcrumb a {
  color: var(--label);
  text-decoration: none;
}
.doc-breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.doc-article {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.25rem 0 1rem;
}

.doc-header {
  margin-bottom: 2rem;
  padding-bottom: 0;
  border-bottom: none;
}

.doc-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.doc-header h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 3.5vw, 2.05rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  border: none;
  padding: 0;
}

.doc-updated {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--label);
}

.doc-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-body);
  font-weight: 400;
}

.doc-toc {
  background: var(--blue-50);
  border: none;
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 0 0 2rem;
}
.doc-toc__title {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--blue-1200);
}
.doc-toc ol {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.4rem;
}
.doc-toc a {
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 500;
}
.doc-toc a:hover {
  text-decoration: underline;
}

.doc-section {
  margin: 0 0 2.25rem;
  padding: 0;
}
.doc-section:last-child {
  margin-bottom: 0;
}

.doc-section h2 {
  margin: 0 0 0.85rem;
  padding-top: 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
  scroll-margin-top: 1.25rem;
}

.doc-subheading {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.doc-section p,
.doc-section li {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-body);
}

.doc-section p {
  margin: 0 0 1rem;
}
.doc-section p:last-child {
  margin-bottom: 0;
}

.doc-list {
  margin: 0;
  padding-left: 1.35rem;
  display: grid;
  gap: 0.55rem;
}
.doc-list li {
  padding-left: 0.15rem;
}

.doc-address {
  font-style: normal;
  margin: 0.35rem 0 1rem;
  line-height: 1.85;
  color: var(--text-body);
}

.doc-meta {
  margin: 1.25rem 0 0;
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}
.doc-meta__row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--gridline);
}
.doc-meta__row:first-child {
  border-top: none;
  padding-top: 0;
}
.doc-meta dt {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--label);
  line-height: 1.6;
}
.doc-meta dd {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text);
  word-break: break-word;
}

.doc-callout {
  margin: 0.75rem 0 0;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  background: var(--blue-50);
  border-left: 4px solid var(--primary);
}
.doc-callout--soft {
  background: var(--control);
  border-left-color: var(--blue-600);
}
.doc-callout__title {
  margin: 0 0 0.45rem !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  line-height: 1.5 !important;
}
.doc-callout p {
  margin: 0 0 0.65rem;
}
.doc-callout p:last-child {
  margin-bottom: 0;
}
.doc-callout__url {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 700;
  font-size: 0.98rem;
  word-break: break-all;
}

.doc-code {
  margin: 0;
  padding: 1rem 1.1rem;
  background: var(--control);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  font-family: ui-monospace, "Cascadia Code", "Source Han Code JP", Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  overflow-x: auto;
}

.doc-next {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem !important;
}

.doc-footer-copy {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .doc-wrap {
    width: min(100% - 1.5rem, 42rem);
    padding-top: 1rem;
  }
  .doc-article {
    padding: 0.25rem 0 1rem;
    border-radius: 0;
  }
  .doc-meta__row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.9rem 1rem;
  }
  .doc-lead {
    font-size: 1rem;
    line-height: 1.8;
  }
}

.schema-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }

table.schema-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
table.schema-table th, table.schema-table td { border: 1px solid var(--border); padding: 0.4rem 0.5rem; vertical-align: middle; }
table.schema-table thead { background: #eef3f8; position: sticky; top: 0; }
table.schema-table input[type="text"] { width: 100%; min-width: 120px; padding: 0.35rem; border: 1px solid var(--border); border-radius: 4px; }
table.schema-table select { width: 100%; min-width: 130px; padding: 0.35rem; font-size: 0.82rem; }
table.schema-table .col-header { font-family: monospace; font-size: 0.78rem; color: var(--primary-dark); white-space: nowrap; }
#schema-table-wrap { max-height: calc(100vh - 230px); overflow: auto; }

.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.25rem;
  border-radius: 50%;
  background: #d8e6f3;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
  cursor: help;
  position: relative;
  vertical-align: middle;
  user-select: none;
}

.info-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 260px;
  white-space: normal;
  padding: 0.55rem 0.7rem;
  background: #1a2332;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.45;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 60;
}

/* 右端の列では左寄せにして見切れを防ぐ */
.info-tip.tip-left::after {
  left: auto;
  right: 0;
  transform: none;
}

.info-tip:hover::after,
.info-tip:focus::after {
  opacity: 1;
  visibility: visible;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-accent:hover { background: var(--blue-50); }

table.combined-table td .cell-count {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.3;
}
table.combined-table td .cell-pct {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}
table.combined-table td.cell-high .cell-pct,
table.combined-table td.cell-low .cell-pct {
  color: inherit;
}

/* 任意クロス APA風（実数/比率の上下段） */
table.apa-pair-table {
  font-family: "Yu Gothic", "Hiragino Sans", sans-serif;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.78rem;
  line-height: 1.35;
  width: max-content;
  min-width: 100%;
}
table.apa-pair-table thead th {
  border: 1px solid #999;
  border-top: 2px solid #000;
  background: #fff;
  font-weight: 700;
  padding: 0.4rem 0.45rem;
  text-align: center;
  vertical-align: middle;
}
table.apa-pair-table thead tr.apa-option-row th {
  border-bottom: 2px solid #000;
}
table.apa-pair-table th.apa-cross-head {
  white-space: normal;
  max-width: 42em;
  font-size: 0.8rem;
  text-align: left;
  padding: 0.5rem 0.65rem;
}
table.apa-pair-table th.apa-corner {
  white-space: nowrap;
  font-size: 0.75rem;
}
table.apa-pair-table th.option-header {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: normal;
  max-height: 12em;
  min-width: 2.2em;
  font-weight: 500;
  font-size: 0.72rem;
  vertical-align: bottom;
}
table.apa-pair-table tbody td,
table.apa-pair-table tbody th {
  border: 1px dotted #bbb;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 0.2rem 0.45rem;
  vertical-align: middle;
}
table.apa-pair-table tbody tr.row-pct td,
table.apa-pair-table tbody tr.row-pct th {
  background: #F2F2F2;
}
table.apa-pair-table tbody td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.apa-pair-table tbody tr:last-child td,
table.apa-pair-table tbody tr:last-child th {
  border-bottom: 2px solid #000;
}
table.apa-pair-table th.section-label {
  text-align: center;
  vertical-align: middle;
  font-weight: 700;
  white-space: normal;
  padding: 0.35rem 0.5rem;
  min-width: 5em;
  max-width: 10em;
  background: #F2F2F2;
  color: #1a2332;
}
table.apa-pair-table th.section-overall {
  background: #fff;
}
table.apa-pair-table th.category-label {
  text-align: left;
  font-weight: 600;
  white-space: pre-line;
  max-width: 16em;
  background: #fff;
}
table.apa-pair-table tr.row-pct th.category-label {
  background: #F2F2F2;
}
table.apa-pair-table td.col-n,
table.apa-pair-table thead th.col-n {
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
}
table.apa-pair-table td.cell-high {
  font-weight: 700;
  text-decoration: underline;
}
table.apa-pair-table td.cell-low {
  font-style: italic;
}

table.open-text-table td.open-text-answer {
  text-align: left;
  white-space: pre-wrap;
  max-width: 48em;
}
.open-text-card .question-header {
  margin-bottom: 0.25rem;
}

table.merged-faces-table {
  font-family: "Times New Roman", "Yu Mincho", serif;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.78rem;
  line-height: 1.35;
  width: max-content;
  min-width: 100%;
}
table.merged-faces-table thead th {
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  background: #f3f6f9;
  font-weight: 700;
  padding: 0.35rem 0.5rem;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}
table.merged-faces-table tbody td,
table.merged-faces-table tbody th {
  border: none;
  border-bottom: 1px solid #ddd;
  padding: 0.22rem 0.5rem;
  background: #fff;
  vertical-align: middle;
}
table.merged-faces-table tbody td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.merged-faces-table tbody tr:last-child td,
table.merged-faces-table tbody tr:last-child th {
  border-bottom: 2px solid #000;
}
table.merged-faces-table th.section-label {
  text-align: center;
  vertical-align: middle;
  font-weight: 700;
  white-space: normal;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  padding: 0.35rem 0.55rem;
  border-right: 1px solid #bbb;
  border-left: 1px solid #bbb;
  min-width: 4.5em;
  max-width: 7em;
  background: #F2F2F2;
  color: #1a2332;
}
table.merged-faces-table th.section-overall {
  background: #fff;
  border-right: 1px solid #bbb;
}
table.merged-faces-table th.category-label {
  text-align: left;
  font-weight: 500;
  white-space: pre-line;
  max-width: 14em;
}
table.merged-faces-table tr.row-pct td,
table.merged-faces-table tr.row-pct th {
  background: #F2F2F2;
}
table.merged-faces-table tr.row-pct th.section-label {
  background: #F2F2F2;
}
table.merged-faces-table td.col-n,
table.merged-faces-table thead th.col-n {
  text-align: right;
  font-weight: 600;
  min-width: 4.5em;
}
table.merged-faces-table tr.section-first td,
table.merged-faces-table tr.section-first th {
  border-top: 1.5px solid #333;
}
table.merged-faces-table tr.section-last td,
table.merged-faces-table tr.section-last th {
  border-bottom: 1.5px solid #999;
}
table.merged-faces-table tr.section-spacer td {
  border: none;
  height: 0.65rem;
  padding: 0;
  background: transparent;
}
table.merged-faces-table tr.row-overall th,
table.merged-faces-table tr.row-overall td {
  font-weight: 700;
  background: #fafbfc;
}
table.merged-faces-table td.cell-high {
  background: #fff;
  color: #000;
  font-weight: 700;
  text-decoration: underline;
}
table.merged-faces-table td.cell-low {
  background: #fff;
  color: #888;
  font-style: italic;
}
table.merged-faces-table .highlight-legend {
  caption-side: bottom;
  text-align: left;
  font-size: 0.7rem;
  color: #555;
  padding-top: 0.35rem;
  font-family: var(--font);
}

.dnd-cross-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.4fr);
  gap: 1rem;
  align-items: stretch;
  max-height: min(70vh, 640px);
}
@media (max-width: 900px) {
  .dnd-cross-layout {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .dnd-pool-panel,
  .dnd-combos-panel {
    max-height: min(50vh, 420px);
  }
}
.dnd-pool-panel,
.dnd-combos-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(70vh, 640px);
}
.dnd-combos-toolbar {
  justify-content: space-between;
  flex-shrink: 0;
  margin-bottom: 0.4rem;
}
.dnd-pool {
  flex: 1 1 auto;
  max-height: none;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  background: #f7fafc;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 120px;
  align-content: flex-start;
}
.dnd-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid #9bb6d0;
  background: #fff;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  cursor: grab;
  max-width: 100%;
  line-height: 1.3;
  user-select: none;
}
.dnd-chip:active { cursor: grabbing; }
.dnd-chip.is-face {
  border-color: #2d8f6f;
  background: #f1faf6;
}
.dnd-chip .chip-x {
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0 0.1rem;
}
.dnd-combos {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
  scroll-behavior: smooth;
}
.dnd-combo-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  background: #fff;
}
.dnd-combo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.dnd-dropzone {
  min-height: 52px;
  border: 1.5px dashed #9bb6d0;
  border-radius: 8px;
  padding: 0.4rem;
  background: #fafcfe;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.dnd-dropzone.drag-over {
  border-color: var(--primary);
  background: #e8f2fa;
}
.dnd-dropzone-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.2rem;
}
.dnd-drop-hint {
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.25rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  border: 1px solid var(--border-soft);
  padding: 2rem 1.75rem;
  min-width: 320px;
  max-width: 440px;
  width: min(440px, calc(100vw - 2rem));
  text-align: center;
  position: relative;
}
.modal-box--download { max-width: 480px; }
.modal-close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
}
.modal-close-btn:hover { color: #333; }
.modal-spinner-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 0;
}
.modal-spinner-area .spinner {
  width: 36px;
  height: 36px;
  border-width: 3px;
}
.modal-spinner-area p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}
.modal-ready-area { padding: 0.5rem 0; }
.modal-ready-area.hidden { display: none; }
.modal-done-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin: 0 0 0.5rem;
  font-weight: 700;
}
.modal-ready-area p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
}
.modal-ad-caption {
  font-size: 0.8rem !important;
  color: var(--muted) !important;
  margin: 0 0 0.5rem !important;
}
.modal-ad-slot {
  margin: 0.5rem 0 1rem;
  min-height: 100px;
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius);
  background: #f8f8fb;
  overflow: hidden;
  padding: 0.35rem;
}
.modal-download-btn {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
}

.ai-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.ai-prompt-box {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: #f8fafc;
}

.ai-prompt-box pre {
  margin: 0.5rem 0 0;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 420px;
  overflow: auto;
}
