/* x-share.site AI生成チェッカー */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --fg: #16181d;
  --muted: #667085;
  --line: #e3e6ec;
  --accent: #2563eb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px -12px rgba(16,24,40,.16);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116; --card: #161a21; --fg: #e8eaed; --muted: #98a2b3;
    --line: #262b34; --accent: #60a5fa;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP",
               "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.75; font-size: 15px;
  -webkit-text-size-adjust: 100%;
}
header, main, footer { max-width: 780px; margin: 0 auto; padding: 0 18px; }
header { padding-top: 44px; padding-bottom: 8px; }
h1 { font-size: 27px; margin: 0 0 6px; letter-spacing: -.02em; }
.lead { margin: 0 0 22px; color: var(--muted); }
.lead strong { color: var(--fg); font-weight: 600; }
footer { padding: 34px 18px 56px; text-align: center; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---- 入力 ---- */
.drop {
  border: 2px dashed var(--line); border-radius: 12px; padding: 34px 18px;
  text-align: center; cursor: pointer; color: var(--muted);
  transition: border-color .15s, background .15s, color .15s;
}
.drop:hover, .drop:focus-visible, .drop.over {
  border-color: var(--accent); color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  outline: none;
}
.drop svg { opacity: .7; }
.drop-main { margin: 10px 0 2px; font-weight: 600; color: var(--fg); font-size: 15px; }
.drop.over .drop-main { color: var(--accent); }
.drop-sub { margin: 0; font-size: 13px; }

.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.url-row { display: flex; gap: 8px; }
.url-row input {
  flex: 1; min-width: 0; padding: 11px 13px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--fg); font-family: inherit;
}
.url-row input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.url-row button {
  padding: 11px 20px; font-size: 15px; font-weight: 600; font-family: inherit;
  border: none; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer;
  white-space: nowrap;
}
.url-row button:hover { filter: brightness(1.08); }
.url-row button:disabled { opacity: .5; cursor: default; }

/* ---- 進行中 ---- */
#status { text-align: center; }
#status p { margin: 6px 0 0; }
.spinner {
  width: 26px; height: 26px; margin: 0 auto; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 結果 ---- */
.verdict { border-left: 5px solid var(--vc, var(--muted)); }
.verdict-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.verdict-name { font-size: 22px; font-weight: 700; color: var(--vc); letter-spacing: -.01em; }
.verdict-kind {
  font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--vc) 15%, transparent); color: var(--vc);
}
.verdict-reason { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.meter { margin: 18px 0 4px; }
.meter-bar {
  position: relative; height: 8px; border-radius: 999px; overflow: hidden;
  background: linear-gradient(90deg, #0d9488 0%, #64748b 50%, #dc2626 100%);
  opacity: .28;
}
.meter-wrap { position: relative; }
.meter-pin {
  position: absolute; top: -4px; width: 3px; height: 16px; border-radius: 2px;
  background: var(--fg); transform: translateX(-50%);
  transition: left .4s cubic-bezier(.2,.8,.2,1);
}
.meter-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }

h3.section { font-size: 14px; margin: 24px 0 10px; letter-spacing: .02em; color: var(--muted); font-weight: 600; }

.ev { display: flex; gap: 11px; padding: 13px 0; border-top: 1px solid var(--line); }
.ev:first-of-type { border-top: none; }
.ev-body { flex: 1; min-width: 0; }
.ev-title { font-weight: 600; font-size: 14.5px; margin: 0; }
.ev-detail { margin: 3px 0 0; font-size: 13px; color: var(--muted); word-break: break-word; }
.tier-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 2px 7px;
  border-radius: 6px; height: fit-content; margin-top: 3px; white-space: nowrap;
}
.t1 { background: #fee2e2; color: #b91c1c; }
.t2 { background: #fef3c7; color: #92400e; }
.t3 { background: #e0e7ff; color: #3730a3; }
.dir-real.t1 { background: #d1fae5; color: #065f46; }
@media (prefers-color-scheme: dark) {
  .t1 { background: #451a1a; color: #fca5a5; }
  .t2 { background: #422e06; color: #fcd34d; }
  .t3 { background: #1e1b4b; color: #a5b4fc; }
  .dir-real.t1 { background: #064e3b; color: #6ee7b7; }
}
.dir-mark { font-size: 12px; font-weight: 700; }
.dir-ai { color: #dc2626; }
.dir-real { color: #059669; }

details { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); }
summary:hover { color: var(--fg); }
.kv { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.kv td { padding: 5px 8px 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv td:first-child { color: var(--muted); white-space: nowrap; width: 38%; }
.kv td:last-child { word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

pre.json {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; overflow-x: auto; font-size: 12px; margin-top: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.6;
}
.thumb {
  max-width: 100%; max-height: 260px; border-radius: 10px; margin-top: 12px;
  border: 1px solid var(--line); display: block;
}
.err { color: #dc2626; font-weight: 600; }

/* ---- 説明 ---- */
.explain h2 { font-size: 17px; margin: 0 0 10px; }
.explain p { font-size: 14px; }
.tiers { list-style: none; padding: 0; margin: 16px 0; }
.tiers li { display: flex; gap: 11px; padding: 12px 0; border-top: 1px solid var(--line); }
.tiers b { font-size: 14.5px; }
.tiers p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.caveat {
  background: color-mix(in srgb, #d97706 10%, transparent);
  border-left: 3px solid #d97706; border-radius: 0 8px 8px 0;
  padding: 11px 14px; font-size: 13.5px !important; margin: 16px 0 12px;
}
