/* 動画ライブラリー（土台は h3-manager/assets/style.css） */

.toolbox { min-width: 190px; display: flex; flex-direction: column; gap: 8px; }
.toolbox .run-link { margin-top: 0; min-height: 36px; }
.toolbox small { color: var(--muted); font-size: 12px; text-align: right; }

/* ── 容量 ───────────────────────── */
.capbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.cap { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.cap.warn { border-color: #e5a3a3; background: #fff8f7; }
.cap.total { background: #f3f5ff; border-color: #c6cbef; }
.cap-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 7px; }
.cap-top span { color: var(--muted); font-size: 12px; font-weight: 700; }
.cap-top strong { font-size: 17px; color: var(--accent); white-space: nowrap; }
.cap small { color: var(--muted); font-size: 11.5px; }
.bar { height: 7px; background: #e8ebef; border-radius: 999px; overflow: hidden; margin-bottom: 5px; }
.bar div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.cap.warn .bar div { background: linear-gradient(90deg, #b4232b, #e08e3c); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 700; color: #fff; font-size: 11px; white-space: nowrap; }
.b-com { background: #1d2186; } .b-poco { background: #2f7d4f; } .b-galleria { background: #8a6d1f; }

/* ── タブ ───────────────────────── */
.tabs { display: flex; gap: 4px; margin-bottom: -1px; position: relative; z-index: 1; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border: 1px solid var(--line);
       border-bottom: 0; border-radius: 8px 8px 0 0; background: #eceff3; color: var(--muted);
       text-decoration: none; font-weight: 700; font-size: 15px; }
.tab span { background: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; color: var(--muted); }
.tab.on { background: #fff; color: var(--accent); }
.tab.on span { background: var(--accent); color: #fff; }
.tabs + .panel { border-top-left-radius: 0; }

/* ── フィルタ ───────────────────── */
.filterbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 16px; align-items: center; }
.filterbar > div > span { color: var(--muted); font-size: 12px; margin-right: 2px; }
.chip { display: inline-block; padding: 4px 12px; margin-left: 4px; border: 1px solid var(--line); border-radius: 999px;
        background: #fff; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.lead { margin-bottom: 14px; }

/* ── 作品カード ─────────────────── */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden;
        display: flex; flex-direction: column; min-width: 0; }
.card:hover { box-shadow: 0 2px 10px rgba(31,35,40,.10); }

.thumb { display: block; position: relative; aspect-ratio: 16/9; background: #10124b; overflow: hidden; }
.thumb video, .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; background: #10124b; border-radius: 0; }
.thumb.has-img { background: #0b0c2c; }
.thumb.has-img .play { background: rgba(16,18,75,.5); opacity: .9; }
.thumb.has-img:hover img { transform: scale(1.04); }
.thumb img { transition: transform .25s ease; }
.thumb-title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
               color: #fff; font-size: 26px; font-weight: 800; letter-spacing: 0; opacity: .92; }
.thumb .play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%;
               background: rgba(16,18,75,.62); color: #fff; font-size: 17px; display: flex; align-items: center;
               justify-content: center; padding-left: 3px; pointer-events: none; }
.thumb:hover .play { background: var(--gold); color: #10124b; }

.card-body { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.card-meta .size { margin-left: auto; font-weight: 700; color: var(--text); }
.card-act { display: flex; align-items: center; gap: 8px; margin-top: auto; flex-wrap: wrap; }

.btn-line { display: inline-flex; align-items: center; min-height: 30px; padding: 0 14px; border: 1px solid var(--accent);
            border-radius: 6px; color: var(--accent); background: #fff; font-weight: 700; font-size: 13px; text-decoration: none; }
.btn-line:hover { background: var(--accent); color: #fff; }
.btn-del { min-height: 30px; padding: 0 10px; font-size: 12.5px; font-weight: 700; background: #fff;
           border: 1px solid var(--line); border-radius: 6px; color: var(--muted); cursor: pointer; }
.btn-del:hover { background: #b4232b; border-color: #b4232b; color: #fff; }
.card-act .del { margin: 0 0 0 auto; }

.drop { position: relative; }
.drop summary { cursor: pointer; list-style: none; color: var(--muted); font-size: 12.5px; font-weight: 700;
                border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; background: #fff; }
.drop summary::-webkit-details-marker { display: none; }
.drop[open] summary { color: var(--accent); border-color: var(--accent); }
.drop-body { position: absolute; z-index: 5; left: 0; top: calc(100% + 4px); width: min(340px, 78vw);
             background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
             box-shadow: 0 6px 18px rgba(31,35,40,.16); }
.drop-body table { font-size: 12.5px; }
.drop-body td { padding: 5px 3px; border-bottom: 1px solid #eef1f4; }
.fname { overflow-wrap: anywhere; }
.fsize { white-space: nowrap; color: var(--muted); text-align: right; }
.fdel { width: 34px; text-align: right; }
.fdel form { margin: 0; }
button.x { min-height: 22px; padding: 0 7px; font-size: 12px; background: #fff; border: 1px solid var(--line);
           border-radius: 4px; color: var(--muted); }
button.x:hover { background: #b4232b; border-color: #b4232b; color: #fff; }

/* ── 素材テーブル ───────────────── */
.bulkbar { display: flex; align-items: center; gap: 14px; padding: 10px 12px; background: #f6f8fa;
           border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ck { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; margin: 0; }
.ck input { width: auto; margin: 0; }
.scraptable td, .scraptable th { vertical-align: middle; }
.scraptable .c1 { width: 34px; }
.scraptable .c1 input { width: auto; margin: 0; }
.scraptable .num { text-align: right; white-space: nowrap; color: var(--muted); font-size: 13px; }
.scraptable .num.strong { color: var(--text); font-weight: 700; }
.scraptable small { color: var(--muted); }
.scraptable tr:hover td { background: #fafbfc; }

@media (max-width: 780px) {
  .toolbox { flex-direction: row; flex-wrap: wrap; }
  .toolbox small { text-align: left; width: 100%; }
  .tab { padding: 9px 13px; font-size: 14px; }
}
