/* IG ライブ DM 管理画面（analytics.ee-l.design と同じトーン。inline style を使わない＝CSP の style-src に 'unsafe-inline' を入れない） */
body { background: #f0f2f5; font-size: 0.9rem; }
.lv-nav .navbar-brand { font-size: 1rem; letter-spacing: -0.3px; }

.stat-card { border: none; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); background: #fff; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.stat-card .value-sm { font-size: 1.25rem; }
.stat-card .label { color: #6c757d; font-size: 0.75rem; letter-spacing: 0.5px; }
.table th { font-size: 0.75rem; color: #6c757d; border-top: none; white-space: nowrap; }
.filter-bar { background: #fff; border-radius: 10px; padding: 1rem 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 1.25rem; }
.chart-box { position: relative; height: 300px; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: #eee; flex-shrink: 0; }
.url-cell { max-width: 360px; }
.utm-term { font-size: 0.85rem; }
.login-wrap { max-width: 420px; padding-top: 12vh; }
.dm-preview { white-space: pre-wrap; word-break: break-all; background: #f8f9fa; font-size: 0.85rem; min-height: 3rem; }
.variant-table { font-size: 0.8rem; max-width: 560px; }
.lv-notice { position: fixed; right: 1rem; bottom: 1rem; z-index: 2000; max-width: 90vw; }

.badge-provisional { background: #fff3cd; color: #8a6100; border: 1px solid #f0d58a; }
.status-scheduled { background: #e7f1ff; color: #1d4ed8; }
.status-live { background: #dc3545; color: #fff; }
.status-ended { background: #6c757d; color: #fff; }
.status-closed { background: #343a40; color: #fff; }

/* ===== 配信中コンソール（スマホ優先・1 カラム） ===== */
.console-body { background: #f6f7f9; }
.console { max-width: 720px; margin: 0 auto; padding-bottom: 4rem; }
.console-header { position: sticky; top: 0; z-index: 1030; background: #1a1d23; color: #fff; padding: 0.6rem 0.9rem calc(0.5rem); padding-top: max(0.6rem, env(safe-area-inset-top)); }
.status-pill { border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 0.8rem; font-weight: 700; background: #3a3f4b; white-space: nowrap; }
.status-pill[data-status="live"] { background: #dc3545; animation: lv-blink 1.2s ease-in-out infinite; }
.status-pill[data-status="ended"], .status-pill[data-status="closed"] { background: #6c757d; }
@keyframes lv-blink { 50% { opacity: 0.45; } }
.dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #6c757d; vertical-align: middle; }
.dot-green { background: #22c55e; }
.dot-yellow { background: #facc15; }
.dot-red { background: #ef4444; }
.dot-gray { background: #6c757d; }

.console-arm { padding: 0.75rem 0.9rem 0.25rem; }
.arm-toggle { width: 100%; border: none; border-radius: 14px; padding: 0.9rem; display: flex; flex-direction: column; align-items: center; background: #e5e7eb; color: #374151; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.arm-toggle[data-armed="1"] { background: #dc3545; color: #fff; }
.arm-toggle:disabled { opacity: 0.6; }
.arm-label { font-size: 1.15rem; font-weight: 700; }
.arm-sub { font-size: 0.75rem; opacity: 0.85; }

.console-counters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; padding: 0.5rem 0.9rem; }
.counter { background: #fff; border-radius: 10px; text-align: center; padding: 0.4rem 0.2rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.counter .n { font-weight: 700; font-size: 1.05rem; }
.counter .l { font-size: 0.65rem; color: #6c757d; }

.console-offers { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.25rem 0.9rem 0.5rem; scrollbar-width: thin; }
.offer-chip { display: flex; align-items: center; gap: 0.5rem; background: #fff; border-radius: 10px; padding: 0.4rem 0.5rem; min-width: 230px; max-width: 280px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.offer-chip.inactive { opacity: 0.5; }
.offer-chip img { width: 38px; height: 38px; object-fit: cover; border-radius: 6px; }
.offer-chip .offer-text { min-width: 0; flex: 1; }
.offer-chip .kw { font-weight: 700; }

.console-filters { position: sticky; top: 4.6rem; z-index: 1020; display: flex; gap: 0.4rem; padding: 0.4rem 0.9rem; background: #f6f7f9; overflow-x: auto; }
.chip { border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; padding: 0.25rem 0.8rem; font-size: 0.8rem; white-space: nowrap; }
.chip.active { background: #1a1d23; color: #fff; border-color: #1a1d23; }

.new-bar { position: sticky; top: 7rem; z-index: 1025; display: block; margin: 0.25rem auto; border: none; border-radius: 999px; background: #2563eb; color: #fff; padding: 0.35rem 1rem; font-size: 0.85rem; box-shadow: 0 2px 6px rgba(0,0,0,.2); }

.comment-list { padding: 0 0.9rem; }
.comment { background: #fff; border-radius: 10px; padding: 0.55rem 0.7rem; margin-bottom: 0.45rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.comment.hit { background: #fffbea; border-left: 4px solid #f59e0b; }
.comment.starred { box-shadow: 0 0 0 2px #fbbf24 inset; }
.comment-head { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; }
.comment-head .user { font-weight: 700; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.comment-head .time { color: #6c757d; font-variant-numeric: tabular-nums; }
.comment-head .badges { margin-left: auto; }
.comment-head .star { border: none; background: none; font-size: 1.1rem; line-height: 1; color: #f59e0b; padding: 0 0.2rem; }
.comment-text { font-size: 0.95rem; white-space: pre-wrap; word-break: break-word; margin: 0.15rem 0; }
.comment-text mark { background: #fde68a; padding: 0 0.1rem; border-radius: 3px; }
.comment-actions { display: flex; gap: 0.4rem; justify-content: flex-end; }
.comment-actions .btn { padding: 0.1rem 0.6rem; font-size: 0.75rem; }
.dm-form { margin-top: 0.4rem; }
@media (min-width: 768px) {
  .console-filters { top: 4.8rem; }
}
