#cc-animation {
  --bg: var(--paper); --panel: var(--surface); --accent: var(--blue); --accent-ink: var(--paper);
  --pick: var(--blue); --chip: var(--surface-2); --chip-on: var(--ink); --chip-on-ink: var(--paper);
  --ph1: var(--surface); --ph2: var(--surface-2); font-size: 15px; padding-block: 30px 36px;
}
#cc-animation header.top { padding: 20px 16px 8px; max-width: 1400px; margin: 0 auto; }
#cc-animation header.top h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: .02em; }
#cc-animation header.top p { margin: 0; color: var(--muted); font-size: 13px; max-width: 72ch; }
#cc-animation .stats { max-width: 1400px; margin: 10px auto 0; padding: 0 16px; display: flex; flex-wrap: wrap; gap: 10px; }
#cc-animation .stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; min-width: 120px; }
#cc-animation .stat b { font-size: 26px; line-height: 1.1; display: block; }
#cc-animation .stat span { font-size: 12px; color: var(--muted); }
#cc-animation .stat.total b { color: var(--accent); }
#cc-animation .warn { max-width: 1368px; margin: 8px 16px; padding: 10px 14px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; font-size: 14px; }
#cc-animation .bar { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); margin-top: 8px; }
#cc-animation .bar-in { max-width: 1400px; margin: 0 auto; padding: 10px 16px; display: grid; gap: 8px; }
#cc-animation .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#cc-animation .row .lbl { color: var(--muted); font-size: 12px; min-width: 3em; }
#cc-animation .chip { border: 1px solid var(--line); background: var(--chip); color: var(--ink); border-radius: 999px; padding: 2px 11px; font: inherit; font-size: 13px; cursor: pointer; }
#cc-animation .chip[aria-pressed="true"] { background: var(--chip-on); color: var(--chip-on-ink); border-color: var(--chip-on); }
#cc-animation .chip small { color: inherit; opacity: .7; margin-left: 4px; }
#cc-animation .chip i { font-style: normal; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 6px; margin-left: 5px; font-size: 11px; }
#cc-animation .snote { color: var(--muted); font-size: 12.5px; margin: 0; }
#cc-animation input[type="search"] { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 14px; width: min(300px, 100%); }
#cc-animation .spacer { flex: 1; }
#cc-animation .count { font-size: 13px; color: var(--muted); }
#cc-animation .count b { color: var(--pick); font-size: 15px; }
#cc-animation button.act { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
#cc-animation button.act.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#cc-animation button:focus-visible, #cc-animation input:focus-visible, #cc-animation summary:focus-visible, #cc-animation a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#cc-animation #grid { max-width: 1400px; margin: 0 auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
#cc-animation .empty { grid-column: 1 / -1; color: var(--muted); padding: 40px 0; text-align: center; }
#cc-animation .card { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
#cc-animation .card.picked { border-color: var(--pick); }
#cc-animation .shot { position: relative; background: #000; aspect-ratio: 16 / 9; }
#cc-animation .shot img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
#cc-animation .ph { width: 100%; height: 100%; background: repeating-linear-gradient(135deg, var(--ph1) 0 14px, var(--ph2) 14px 28px); display: grid; place-content: center; text-align: center; padding: 8px 12px; color: var(--ink); }
#cc-animation .ph .pid { font-size: 34px; font-weight: 800; letter-spacing: .02em; line-height: 1.1; }
#cc-animation .ph .pnm { font-size: 15px; margin-top: 2px; }
#cc-animation .ph .pno { font-size: 11px; color: var(--muted); margin-top: 6px; }
#cc-animation .pick { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; align-items: center; background: rgba(0,0,0,.62); color: #fff; padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 13px; cursor: pointer; user-select: none; }
#cc-animation .pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
#cc-animation .card.picked .pick { background: var(--accent); color: var(--accent-ink); }
#cc-animation .sid { position: absolute; right: 8px; top: 8px; background: rgba(0,0,0,.62); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
#cc-animation .body { padding: 12px 14px 14px; display: grid; gap: 6px; align-content: start; flex: 1; }
#cc-animation .body h3 { margin: 0; font-size: 17px; line-height: 1.3; }
#cc-animation .body h3 .id { color: var(--accent); margin-right: 6px; font-size: 14px; }
#cc-animation .body h3 small { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
#cc-animation .fit { margin: 0; font-size: 13.5px; font-weight: 600; }
#cc-animation .tags { display: flex; flex-wrap: wrap; gap: 4px; }
#cc-animation .tags span { background: var(--chip); border-radius: 4px; padding: 0 7px; font-size: 12px; color: var(--muted); }
#cc-animation .desc { margin: 0; font-size: 13.5px; opacity: .9; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#cc-animation details { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
#cc-animation summary { cursor: pointer; font-size: 13px; color: var(--accent); }
#cc-animation .detail-in { display: grid; gap: 10px; padding-top: 8px; font-size: 13px; }
#cc-animation .detail-in h4 { margin: 0 0 2px; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
#cc-animation .detail-in p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#cc-animation .detail-in a { color: var(--accent); }
#cc-animation .detail-in code { font: 12px/1.5 ui-monospace, Consolas, monospace; background: var(--chip); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
#cc-animation .ptabs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#cc-animation .overlay { position: fixed; inset: 0; background: rgba(0,0,0,.86); display: none; z-index: 20; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; }
#cc-animation .overlay.on { display: flex; }
#cc-animation .overlay img { max-width: min(1400px, 100%); max-height: 76vh; border-radius: 6px; background: #000; }
#cc-animation .overlay .cap { color: #eee; text-align: center; max-width: 80ch; font-size: 14px; }
#cc-animation .overlay .ctl { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
#cc-animation .dialog { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; z-index: 30; align-items: center; justify-content: center; padding: 16px; }
#cc-animation .dialog.on { display: flex; }
#cc-animation .dialog .box { background: var(--panel); color: var(--ink); border-radius: 12px; padding: 16px; width: min(760px, 100%); max-height: 88vh; display: grid; gap: 10px; grid-template-rows: auto 1fr auto; }
#cc-animation .dialog h2 { margin: 0; font-size: 17px; }
#cc-animation .dialog textarea { width: 100%; min-height: 300px; resize: vertical; font: 13px/1.6 ui-monospace, Consolas, monospace; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
#cc-animation header.top, #cc-animation .stats, #cc-animation .bar-in, #cc-animation #grid { padding-inline: 0; }
#cc-animation header.top { padding-top: 0; }
#cc-animation header.top h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: 0; }
#cc-animation .stats { margin-top: 12px; }
#cc-animation .stat { min-width: 0; border-radius: 7px; }
#cc-animation .stat b { font-size: 22px; }
#cc-animation .bar { margin-top: 16px; }
#cc-animation .bar-in { padding-block: 12px; }
#cc-animation .snote:empty { display: none; }
#cc-animation .warn { margin: 12px 0; }
#cc-animation #grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
#cc-animation .card { min-width: 0; border-width: 1px; border-radius: 9px; }
#cc-animation .card.picked { box-shadow: inset 0 0 0 1px var(--pick); }
#cc-animation .shot-open { display: block; width: 100%; height: 100%; border: 0; background: transparent; padding: 0; }
#cc-animation .shot-open:focus-visible { outline-offset: -4px; }
#cc-animation .body h3, #cc-animation .fit, #cc-animation .cap { overflow-wrap: anywhere; }
#cc-animation .overlay { z-index: 50; }
#cc-animation .dialog { z-index: 51; }
#cc-animation .overlay img { max-height: 70vh; object-fit: contain; }
#cc-animation .dialog .box { overflow: auto; }
#cc-animation .dialog textarea { min-height: min(300px, 45vh); }
#cc-animation .picker-notice { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
#cc-animation .picker-notice a { color: var(--blue); }
#cc-animation #grid:has(.full-prompt[open]) { align-items: start; }
#cc-animation .body, #cc-animation .detail-in, #cc-animation .full-prompt { min-width: 0; }
#cc-animation .full-prompt-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
#cc-animation .full-prompt-status { color: var(--muted); font-size: 12px; }
#cc-animation .full-prompt-text { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); font: inherit; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  #cc-animation .bar { position: static; }
  #cc-animation .row .spacer { flex-basis: 100%; height: 0; }
  #cc-animation #q { width: 100%; }
  #cc-animation .stat { padding: 7px 10px; }
}
