/* 広告表現チェックのデモ専用。../../style.css（統合サイト共通）を先に読み、足りない分だけ書く。 */

.wrap.wide { max-width: 64rem; }
[hidden] { display: none !important; }

/* 常時の帯（スクロールしても上に残す） */
.demo-band {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--warn-bg);
  border-bottom: 2px solid var(--warn-line);
}
.demo-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}
.demo-band-text { margin: 0; flex: 1 1 18rem; font-size: 0.9rem; line-height: 1.55; }
.demo-band-actions { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.reset-status { font-size: 0.85rem; min-width: 4.5em; }

/* ボタンの種類 */
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 0.4rem 1rem;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }

.demo-source { color: var(--muted); }

/* タブ */
.tabs-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
.tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--line); min-width: max-content; }
.tab {
  background: transparent;
  color: var(--fg);
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}
.tab[aria-selected="true"] { background: var(--soft); border-color: var(--line); color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.tab[disabled] { opacity: 0.5; }

.steps { padding-left: 1.5rem; margin: 0 0 1rem; color: var(--muted); }

/* 見本カード */
.cards { display: grid; grid-template-columns: 1fr; gap: 0.75rem; margin: 0 0 1rem; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  display: block;
  width: 100%;
  text-align: left;
  font-weight: 400;
  background: var(--bg);
  color: var(--fg);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  line-height: 1.6;
}
.card:hover { border-color: var(--accent); }
.card[aria-pressed="true"] { border-color: var(--accent); background: var(--pr-bg); }
.card .card-title { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.card .card-meta, .card .card-set { display: block; font-size: 0.85rem; color: var(--muted); }
.card .card-head { display: block; margin-top: 0.4rem; font-size: 0.9rem; border-left: 3px solid var(--line); padding-left: 0.6rem; }
.card .card-head span { display: block; }
.card .card-chosen { font-weight: 700; color: var(--accent); }

textarea[readonly] { background: var(--soft); resize: vertical; }

/* デモの説明の札（製品の出力とは見た目で分ける） */
.demo-note {
  border: 2px dashed var(--muted);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  margin: 0 0 1rem;
  background: transparent;
}
.demo-note > :last-child { margin-bottom: 0; }
.demo-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--muted);
  border-radius: 3px;
  padding: 0 0.4rem;
  margin-right: 0.5rem;
  color: var(--muted);
  vertical-align: 0.1em;
}

/* 結果 */
.result-block h3 { margin-top: 1.5rem; }
.meta-line { font-size: 0.9rem; color: var(--muted); margin: 0 0 0.5rem; }
.doc-box { border: 2px solid var(--line); border-radius: 6px; padding: 0.6rem 0.9rem; margin: 0 0 1rem; }
.doc-box h3 { margin-top: 0; }
.body-text {
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  margin: 0 0 1rem;
  background: var(--bg);
  line-height: 2;
}
.mk {
  background: #ffe9a8;
  color: #1f2328;
  border-radius: 3px;
  padding: 0 0.1em;
  border-bottom: 2px solid #b27a00;
  cursor: pointer;
}
.mk.pri-A { background: #ffd3cf; border-bottom-color: #b3261e; }
.mk.pri-B { background: #ffe9a8; border-bottom-color: #b27a00; }
.mk.pri-C { background: #dfe9f7; border-bottom-color: #1d5fa8; }
.mk:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.mk-tag {
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.15em;
  padding: 0 0.3em;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: #fff;
  color: #1f2328;
  white-space: nowrap;
}
.legend { font-size: 0.875rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 0.75rem; }
.pri-chip {
  display: inline-block;
  min-width: 1.6em;
  text-align: center;
  font-weight: 700;
  border: 1px solid var(--muted);
  border-radius: 3px;
  padding: 0 0.3em;
}
.list-btn {
  background: transparent;
  color: var(--accent);
  border: 0;
  padding: 0;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
}
details.finding { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 0.6rem; padding: 0.4rem 0.8rem; }
details.finding > summary { cursor: pointer; font-weight: 600; }
details.finding[open] > summary { margin-bottom: 0.5rem; }
details.finding h4 { margin: 0.8rem 0 0.25rem; font-size: 0.95rem; }
details.finding ul { margin-bottom: 0.5rem; }
.ref-meta { font-size: 0.85rem; color: var(--muted); }
.compare-box { border: 1px solid var(--line); border-radius: 6px; padding: 0.6rem 0.9rem; margin: 1rem 0; }

/* 画面 3 の左右 */
.cols { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 720px) { .cols { grid-template-columns: 1fr 1fr; } }
.cols > section { min-width: 0; }
.change-list { padding-left: 1.2rem; }
.change-list li { margin-bottom: 0.9rem; }
.op { font-weight: 700; }

/* 画面 4 */
.print-area { border: 2px solid var(--line); border-radius: 6px; padding: 1rem; margin-top: 1rem; }
.print-area h2 { margin-top: 0; }
.print-text { white-space: pre-wrap; }
.print-area table { font-size: 0.85rem; }
.print-area td ul { padding-left: 1.1rem; margin: 0; }
.pm { font-weight: 700; }

/* 画面 5 */
.api-cols { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 720px) { .api-cols { grid-template-columns: 1fr 1fr; } }
.api-cols > div { min-width: 0; }
pre.json {
  overflow: auto;
  max-height: 32rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  line-height: 1.5;
  /* 日本語の等幅フォントは \ を ¥ で描くので、欧文の等幅フォントを先に置く（JSON の \n が ¥n に見えた。adc-v8a.4） */
  font-family: Consolas, "Cascadia Mono", Menlo, "DejaVu Sans Mono", monospace;
  white-space: pre;
  overflow-wrap: normal;
}

/* 印刷: 結果の部分だけを A4 縦・複数ページで出す */
@page { size: A4 portrait; margin: 14mm; }
@media print {
  .no-print, .tabs-wrap, .demo-source, .site-header, .site-footer, .draft-banner, .screen:not(#screen-4), h1 { display: none !important; }
  .demo-band { position: static; background: none; border: 0; border-bottom: 1px solid #000; }
  .demo-band-text { font-size: 10pt; }
  body { font-size: 10.5pt; line-height: 1.6; background: #fff; color: #000; }
  .wrap, .wrap.wide { max-width: none; padding: 0; }
  main { padding: 0; }
  #screen-4:not([hidden]) { display: block !important; }
  .print-area { border: 0; padding: 0; }
  .print-area table { font-size: 10pt; width: 100%; table-layout: fixed; }
  .print-area .table-wrap { overflow: visible; }
  .print-area thead { display: table-header-group; }
  .print-area tr { break-inside: avoid; page-break-inside: avoid; }
  .print-area td, .print-area th { overflow-wrap: anywhere; }
  .print-area a { color: #000; text-decoration: none; }
  .print-text { font-size: 10.5pt; }
  /* 指摘の表は 1 件を全幅のブロックにする（7 列だと 1 件が何ページにもまたがった。adc-v8a.4） */
  .print-area .stack-print table, .print-area .stack-print tbody,
  .print-area .stack-print tr, .print-area .stack-print td { display: block; width: auto; }
  .print-area .stack-print thead { display: none; }
  .print-area .stack-print tr { border: 1px solid #000; margin: 0 0 8pt; padding: 4pt 6pt; break-inside: avoid; page-break-inside: avoid; }
  .print-area .stack-print td { border: 0; padding: 2pt 0; }
  .print-area .stack-print td::before { content: attr(data-label) "："; font-weight: bold; }
}
