/* 「AIに頼む」（6段目）：発表者ビューの小さなパネルと、編集画面の右パネル上段。白×黄・既存の部品に合わせる */
.ai-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#c8ccc8;margin-right:7px;vertical-align:1px}
#ai-open[data-state=wait] .ai-dot{background:var(--yellow);box-shadow:0 0 0 3px #ffd60a55}
#ai-open[data-state=review] .ai-dot{background:#26a65b;box-shadow:0 0 0 3px #26a65b44}
#ai-open[data-state=failed] .ai-dot{background:#d8473d}
#ai-open[data-mac=off]:not([data-state=wait]):not([data-state=review]):not([data-state=failed]) .ai-dot{background:#e2a43a}
.ai-pop{position:fixed;top:72px;right:16px;z-index:60;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 96px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 14px 40px #1c1d2030;padding:16px 18px 18px;display:flex;flex-direction:column;gap:10px}
.ai-head{display:flex;justify-content:space-between;align-items:center}.ai-head h2{margin:0;font-size:17px}
.ai-x{padding:4px 10px;border-radius:10px;border-color:transparent;background:transparent}
.ai-mac{margin:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;font-size:13px;font-weight:650;color:#286a37}
.ai-mac i{width:9px;height:9px;border-radius:50%;background:#26a65b;flex:none;align-self:center}
.ai-mac[data-online=false]{color:#8a5a00}.ai-mac[data-online=false] i{background:#e2a43a}
.ai-mac small{flex-basis:100%;font-weight:500;color:var(--muted);font-size:12.5px;line-height:1.5}
.ai-body{display:flex;flex-direction:column;gap:10px;min-width:0}
.ai-target{margin:0;font-size:13.5px;color:var(--muted)}.ai-target b{color:var(--ink);font-weight:700}
.ai-pop textarea,.ed-ai textarea{width:100%;border:1px solid var(--line);border-radius:14px;padding:10px 13px;background:#fffef7;color:var(--ink);font-size:15px;line-height:1.5;resize:none}
.ai-row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.ai-hint{font-size:12.5px;color:var(--muted);line-height:1.45}
.ai-err{margin:0;font-size:13.5px;color:#a3261c;font-weight:650;line-height:1.5}
.ai-notice{margin:0;font-size:13px;color:#6b4a00;background:#fff1d6;border-radius:10px;padding:8px 11px;line-height:1.5}
.ai-wait{display:flex;gap:14px;align-items:flex-start}
.ai-wait strong{font-size:17px}.ai-wait #ai-secs{margin-left:10px;font-size:15px;color:var(--muted);font-variant-numeric:tabular-nums}
.ai-spin{flex:none;width:22px;height:22px;margin-top:2px;border-radius:50%;border:3px solid #ffe97a;border-top-color:#c9a400;animation:ai-spin 1s linear infinite}
@keyframes ai-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.ai-spin{animation-duration:4s}}
.ai-sub{margin:4px 0 0;font-size:13.5px;color:var(--muted);line-height:1.5}
.ai-later{border-top:1px solid var(--line);padding-top:10px;display:flex;flex-direction:column;gap:8px;align-items:flex-start}.ai-later p{margin:0;font-size:13.5px;line-height:1.5}
.ai-review-head{margin:0;font-size:15px}.ai-reason{margin:0;font-size:14.5px;line-height:1.55}
.ai-compare{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ai-compare figure{margin:0;display:flex;flex-direction:column;gap:5px;min-width:0}
.ai-compare figcaption{font-size:12.5px;font-weight:700;color:var(--muted);text-align:center}
.ai-thumb{aspect-ratio:16/9;width:100%;border:1px solid var(--line);border-radius:8px;background:#fff;pointer-events:none}
.ai-actions{display:flex;justify-content:flex-end;gap:10px}
.ai-fail,.ai-done{margin:0;font-size:14.5px;line-height:1.6}.ai-fail b{color:#a3261c}
/* 編集画面：右パネルの上段（設定タブのとき） */
.ed-ai{padding:16px 18px 14px;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:9px;flex:none;background:#fff}
.ed-ai h2{font-size:16px;margin:0}.ed-ai .ai-target{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ed-ai .ai-state{display:flex;align-items:flex-start;gap:7px;font-size:13px;color:var(--muted);min-width:0;line-height:1.45}
.ed-ai .ai-state i{flex:none;width:9px;height:9px;margin-top:5px;border-radius:50%;background:#c8ccc8}
.ed-ai .ai-state[data-state=idle] i{display:none}
.ed-ai .ai-state[data-state=wait] i{background:var(--yellow);box-shadow:0 0 0 3px #ffd60a55}
.ed-ai .ai-state[data-state=review] i{background:#26a65b}.ed-ai .ai-state[data-state=review]{color:#286a37;font-weight:650}
.ed-ai .ai-state[data-state=failed] i{background:#d8473d}.ed-ai .ai-state[data-state=failed]{color:#a3261c;font-weight:650}
.ed-ai .ai-row .primary{flex:none}.ed-ai .ai-mac{color:#8a5a00;font-weight:500;line-height:1.5;display:block}
.ai-row .primary,.ai-actions button,.ai-later button{white-space:nowrap;max-width:none}
