/* AIから来た人は検索から来た人よりよく読む？（/ai-vs-search/）。日英共通。
   上に書き出し方の3行とドロップ枠、その下に「AI と検索」を左右に並べた3指標、合計の根拠と注記、見せる1枚（1600×900）と要約 */
[hidden] { display: none !important; }
.av { --a-line: var(--hairline, #e5e7eb); --a-soft: var(--ink-soft, #4b5563); --a-ink: var(--ink, #1f2937); --a-acc: var(--accent, #b45309); --a-acc-bg: #fff7ed;
  border: 1px solid var(--a-line); background: var(--panel, #fff); margin-bottom: 8px; }

/* 入力 */
.av-in { padding: 18px 18px 14px; border-bottom: 1px solid var(--a-line); }
.av-how { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: av; display: grid; gap: 6px; }
.av-how li { counter-increment: av; position: relative; padding-left: 34px; font-size: 14px; line-height: 1.6; color: var(--a-ink); }
.av-how li::before { content: counter(av); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--a-ink); color: #fff; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.av-drop { position: relative; display: grid; justify-items: center; gap: 4px; padding: 22px 16px 20px; border: 1.5px dashed var(--hairline-strong, #cbd5e1); background: #fafaf9;
  text-align: center; cursor: pointer; transition: border-color .12s, background-color .12s; }
.av-drop:hover, .av-drop.is-over { border-color: var(--a-acc); background: var(--a-acc-bg); }
.av-drop:focus-within { outline: 2px solid var(--a-acc); outline-offset: 2px; }
.av-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.av-drop-icon { position: relative; width: 34px; height: 40px; border: 2px solid var(--a-ink); border-radius: 2px; background:
  linear-gradient(var(--a-ink), var(--a-ink)) 5px 11px / 20px 2px no-repeat, linear-gradient(var(--a-ink), var(--a-ink)) 5px 18px / 20px 2px no-repeat,
  linear-gradient(var(--a-acc), var(--a-acc)) 5px 25px / 12px 2px no-repeat, #fff; }
.av-drop-main { font-size: 16px; font-weight: 700; color: var(--a-ink); }
.av-drop-sub { font-size: 13px; color: var(--a-soft); }
.av-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.av-lock { font-size: 13px; color: var(--a-soft); }
.av-lock::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #15803d; vertical-align: 1px; }
.av-paste { margin-top: 10px; font-size: 14px; }
.av-paste summary { cursor: pointer; color: var(--a-soft); }
.av-text { display: block; width: 100%; min-height: 120px; margin-top: 8px; padding: 10px; border: 1px solid var(--hairline-strong, #d1d5db); font-family: var(--mono); font-size: 12px; line-height: 1.5; resize: vertical; box-sizing: border-box; }

.av-btn { min-height: 44px; padding: 0 16px; border: 1px solid var(--a-ink); background: #fff; color: var(--a-ink); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform .08s ease, background-color .12s; }
.av-btn:hover { background: #f3f4f6; }
.av-btn:active { transform: scale(.97); }
.av-btn.is-main { background: var(--a-ink); color: #fff; }
.av-btn.is-main:hover { background: #111827; }
.av-btn:focus-visible { outline: 2px solid var(--a-acc); outline-offset: 2px; }

/* 結果 */
.av-out { padding: 16px 18px 18px; }
.av-src { margin: 0 0 10px; font-size: 13px; color: var(--a-soft); }
.av-err { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--ng, #c03434); background: #fef2f2; font-size: 14px; line-height: 1.6; }
.av[data-state="error"] .av-head, .av[data-state="error"] .av-cols, .av[data-state="error"] .av-rows,
.av[data-state="error"] .av-basis, .av[data-state="error"] .av-notes, .av[data-state="error"] .av-detail { opacity: .35; }
.av[data-state="busy"] .av-out > :not(.av-src) { opacity: .5; }
.av-head { position: relative; padding-right: 64px; }
.av-period { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--a-soft); }
.av-lead { margin: 4px 0 14px; font-size: clamp(20px, 3.2vw, 28px); font-weight: 700; line-height: 1.45; color: var(--a-ink); }
.av-lead b { color: var(--a-acc); font-size: 1.25em; font-family: var(--mono); font-weight: 500; letter-spacing: -.01em; }
.av[data-state="low"] .av-lead b, .av[data-state="zero"] .av-lead b { color: var(--a-ink); }
.av-ms { position: absolute; top: 0; right: 0; font-family: var(--mono); font-size: 11px; color: #9ca3af; }

.av-cols, .av-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr); column-gap: 16px; }
.av-cols p { margin: 0; padding-top: 8px; border-top: 4px solid var(--a-ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.av-cols .is-ai { border-top-color: var(--a-acc); }
.av-cols .is-search { grid-column: 3; }
.av-cols b { font-size: 17px; }
.av-cols span { font-size: 13px; color: var(--a-soft); }
.av-cols em { flex-basis: 100%; font-style: normal; font-family: var(--mono); font-size: 13px; color: var(--a-soft); }
.av[data-state="low"] .av-cols .is-ai em, .av[data-state="zero"] .av-cols .is-ai em { color: var(--a-acc); font-weight: 500; }

.av-rows { margin-top: 6px; }
.av-row { align-items: end; padding: 12px 0 14px; border-bottom: 1px solid var(--a-line); }
.av-row-h { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 4px; }
.av-row-h b { font-size: 14px; }
.av-row-h span { font-size: 12px; color: var(--a-soft); }
.av-side { display: grid; gap: 6px; min-width: 0; }
.av-v { font-family: var(--mono); font-size: clamp(22px, 4.4vw, 36px); font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--a-ink); white-space: nowrap; }
.av-meter { display: block; height: 8px; background: rgba(31, 41, 55, .07); }
.av-meter b { display: block; height: 100%; background: var(--a-ink); transform-origin: left center; transition: transform .3s ease; }
.av-side.is-ai .av-meter b { background: var(--a-acc); }
.av-x { display: grid; justify-items: center; align-self: center; gap: 0; text-align: center; }
.av-x span { font-size: 11px; color: var(--a-soft); }
.av-x b { font-family: var(--mono); font-size: clamp(20px, 3.6vw, 28px); font-weight: 500; color: var(--a-soft); }
.av-x.is-up b { color: var(--a-acc); }
.av-x.is-down b { color: var(--a-ink); }

.av-basis { margin: 12px 0 0; font-size: 13px; line-height: 1.6; color: var(--a-soft); }
.av-basis[data-basis="read"] { padding: 8px 10px; border-left: 3px solid var(--a-acc); background: var(--a-acc-bg); color: var(--a-ink); }
.av-notes { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.av-notes li { padding-left: 14px; position: relative; font-size: 13px; line-height: 1.65; color: var(--a-ink); }
.av-notes li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 2px; background: var(--a-soft); }
.av-notes li.is-key { font-weight: 700; }
.av-notes li.is-key::before { background: var(--a-acc); }
.av-notes li.is-fine { color: var(--a-soft); }
.av-detail { margin-top: 12px; font-size: 14px; }
.av-detail summary { cursor: pointer; color: var(--a-soft); }
.av-table-wrap { overflow-x: auto; margin-top: 8px; }
.av-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.av-table th, .av-table td { padding: 7px 8px; border-bottom: 1px solid var(--a-line); text-align: right; white-space: nowrap; }
.av-table th:first-child { text-align: left; font-weight: 500; color: var(--a-soft); white-space: normal; }
.av-table thead th { font-weight: 700; color: var(--a-ink); }
.av-table td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.av-other { margin: 8px 0 0; font-size: 12px; color: var(--a-soft); }

/* 見せる1枚 */
.av-share { padding: 16px 18px 18px; border-top: 1px solid var(--a-line); }
.av-h { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.av-share canvas { display: block; width: 100%; height: auto; border: 1px solid var(--a-line); }
.av-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.av-msg { font-size: 13px; color: #15803d; }
.av-summary { display: block; width: 100%; min-height: 150px; margin-top: 10px; padding: 10px; border: 1px solid var(--a-line); background: #fafaf9; font: inherit; font-size: 12.5px; line-height: 1.6; color: var(--a-ink); resize: vertical; box-sizing: border-box; }

/* 次の導線 */
.av-next { padding: 16px 18px 18px; border-top: 1px solid var(--a-line); }
.av-next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--a-line); }
.av-next-grid a { display: grid; gap: 4px; padding: 14px; color: var(--a-ink); text-decoration: none; border-left: 1px solid var(--a-line); transition: background-color .12s; }
.av-next-grid a:first-child { border-left: 0; }
.av-next-grid a:hover { background: #fafaf9; }
.av-next-grid a:last-child b { color: var(--a-acc); }
.av-next-grid b { font-size: 15px; }
.av-next-grid b::after { content: " →"; }
.av-next-grid span { font-size: 13px; color: var(--a-soft); line-height: 1.5; }
.av-about-h { margin: 22px 0 8px; font-size: 16px; }
.av-about-h:first-of-type { margin-top: 4px; }

@media (max-width: 640px) {
  .av-in, .av-out, .av-share, .av-next { padding-left: 14px; padding-right: 14px; }
  .av-cols, .av-row { grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr); column-gap: 8px; }
  .av-cols b { font-size: 15px; }
  .av-next-grid { grid-template-columns: 1fr; }
  .av-next-grid a { border-left: 0; border-top: 1px solid var(--a-line); }
  .av-next-grid a:first-child { border-top: 0; }
  .av-head { padding-right: 0; }
  .av-ms { position: static; display: block; text-align: right; }
}
@media (prefers-reduced-motion: reduce) {
  .av-meter b, .av-btn, .av-drop, .av-next-grid a { transition: none; }
}
