:root {
  /* MorphMimic-style: light theme, orange accent */
  --accent:          #3d5a96;
  --coral:           #e8798c;
  --gold:            #f2b36b;
  --gradient:        linear-gradient(90deg, #3d5a96 0%, #7a6fb8 52%, #e8798c 100%);
  --accent-hover:    #2e4a7d;
  --accent-subtle:   rgba(61,90,150,0.10);
  --primary-color:   #3d5a96;
  --primary-hover:   #2e4a7d;
  --secondary-color: #64748b;
  --text-primary:    #1a1a1a;
  --text-secondary:  #64748b;
  --text-light:      #94a3b8;
  --background-primary:   #f7f8fb;
  --background-secondary: #ffffff;
  --background-accent:    #eef1f7;
  --border-color:    #e2e2e2;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 2px 8px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.08);
  --border-radius:    12px;
  --border-radius-lg: 20px;
  --transition: all 0.2s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Nunito Sans', 'Segoe UI', -apple-system, sans-serif;
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  background: var(--background-primary);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-color); text-decoration: none; }
a:hover { color: var(--primary-hover); }

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Hero: dark background ── */
.hero {
  background: linear-gradient(180deg, #131a36 0%, #262c52 42%, #4c3d68 68%, #8a5578 86%, #c07485 96%, #d98f7d 100%);
  border-bottom: none;
  padding: 56px 0 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.7rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  line-height: 1.2;
  background: linear-gradient(90deg, #c3d0f5 0%, #f3c8c0 60%, #f8d9a8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .subtitle {
  font-size: 1.12rem;
  color: #d9ddf0;
  font-weight: 400;
  margin: 0 auto 22px;
  max-width: 760px;
}
.authors { font-size: 0.95rem; margin-bottom: 6px; color: #cfd5ea; }
.authors sup { font-size: 0.7em; color: #aaa; }
.affiliations { font-size: 0.88rem; color: #aeb6d4; margin-bottom: 20px; }
.links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 8px;
  font-weight: 600; font-size: 0.92rem;
  background: #3d3d3d; color: #fff;
  border: 1px solid #555;
  transition: var(--transition);
}
.button:hover { background: var(--coral); border-color: var(--coral); color: #fff; }
.button.gradient { background: var(--gradient); border: none; color: #fff; }
.button.secondary { background: #3d3d3d; color: #ccc; border-color: #555; }
.button.secondary:hover { color: #fff; border-color: var(--accent); background: var(--accent); }

/* ── Sections ── */
.section { padding: 56px 0; background: var(--background-primary); }
.section.alt { background: var(--background-secondary); }
.section h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.0rem; font-weight: 700; letter-spacing: 0;
  margin: 0 0 6px; text-align: center; color: var(--text-primary);
}
.section .underline {
  width: 40px; height: 3px; background: var(--accent);
  border-radius: 2px; margin: 0 auto 20px;
}
.section h3 { font-family: 'Fraunces', Georgia, serif; font-size: 1.15rem; font-weight: 600; margin: 22px 0 8px; }
.lead, .section-lead {
  font-size: 1rem; color: var(--text-secondary);
  text-align: justify; max-width: 700px;
  margin: 0 auto 26px; line-height: 1.75;
}
a.orange { color: var(--accent); text-decoration: none; }
a.orange:hover { text-decoration: underline; }

/* ── Video cards (grid) ── */
.video-grid { display: grid; gap: 20px; margin-top: 24px; }
.video-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.video-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.video-card {
  background: var(--background-secondary);
  border-radius: var(--border-radius); box-shadow: var(--shadow-md);
  overflow: hidden; margin: 0;
}
.video-card video { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.video-card figcaption {
  text-align: center; padding: 6px 12px 10px;
  font-size: 0.88rem; color: var(--text-secondary);
}
/* also keep old .video-frame for teaser */
.video-frame {
  position: relative; border-radius: var(--border-radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); background: #0f172a; margin: 0 auto;
}
.video-frame video, .video-frame img { display: block; width: 100%; height: auto; }
.video-caption, .figure-caption {
  font-size: 0.88rem; color: var(--text-secondary); text-align: center; margin-top: 10px;
}

/* ── Clips panel ── */
.clips-panel {
  display: flex; gap: 0; margin-top: 24px;
  background: var(--background-secondary);
  border-radius: var(--border-radius-lg); box-shadow: var(--shadow-md); overflow: hidden;
}
.clips-list { width: 260px; flex-shrink: 0; padding: 20px 0; border-right: 1px solid var(--border-color); }
.clips-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--text-light); text-transform: uppercase;
  padding: 0 16px 10px;
}
.clip-btn {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 9px 16px;
  border: none; background: none; border-left: 3px solid transparent;
  font-size: 0.9rem; color: var(--text-primary); cursor: pointer; text-align: left;
}
.clip-btn:hover { background: var(--background-accent); }
.clip-btn.active {
  background: var(--accent-subtle); font-weight: 600;
  border-left-color: var(--accent);
  padding-left: 13px;
}
.clip-dur { color: var(--text-light); font-size: 0.85rem; }
.clips-player { flex: 1; padding: 16px; display: flex; flex-direction: column; }
.clips-player video { width: 100%; border-radius: 8px; background: #000; }
.clips-controls {
  display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap;
}
.clips-pill {
  padding: 4px 14px; border-radius: 6px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border-color); background: var(--background-accent); color: var(--text-secondary);
}
.clips-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.clips-caption { font-size: 0.83rem; color: var(--text-secondary); margin-top: 6px; }
.clips-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.clips-footer button {
  padding: 5px 12px; border-radius: 6px; font-size: 0.82rem; font-weight: 500;
  border: 1px solid var(--border-color); background: var(--background-secondary);
  color: var(--text-secondary); cursor: pointer;
}
.clips-footer button:hover { border-color: var(--accent); color: var(--accent); }

/* ── Figure frame grid ── */
.figure-card {
  background: var(--background-secondary); border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md); padding: 28px; margin: 24px 0;
}
.figure-scroll { overflow-x: auto; }
.frame-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.frame-label {
  font-size: 0.78rem; font-weight: 600; width: 68px; flex-shrink: 0;
  color: var(--text-secondary);
}
.frame-row img { height: 90px; border-radius: 6px; }
.figure-caption { font-size: 0.88rem; color: var(--text-primary); margin-top: 12px; line-height: 1.65; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; margin: 16px auto 8px; max-width: 860px; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; background: var(--background-secondary); }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--border-color); text-align: center; }
th { background: var(--background-accent); font-weight: 650; }
td.left, th.left { text-align: left; }
tr.ours td { font-weight: 700; }
tr:hover td { background: var(--background-accent); }
.table-caption { font-size: 0.88rem; color: var(--text-secondary); margin: 8px 0 0; }
mark { background: rgba(232,121,140,0.16); padding: 0 4px; border-radius: 4px; }

/* ── Stat cards ── */
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--background-secondary); border: 1px solid var(--border-color);
  border-radius: var(--border-radius); padding: 20px 22px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }
.stat { font-family: 'Fraunces', Georgia, serif; font-size: 1.8rem; font-weight: 800;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── BibTeX ── */
pre.bibtex {
  background: var(--background-accent); border: 1px solid var(--border-color);
  border-radius: var(--border-radius); padding: 16px 18px; overflow-x: auto;
  font-size: 0.85rem; line-height: 1.55;
}

/* ── Footer ── */
.footer { padding: 28px 0 40px; border-top: 1px solid var(--border-color); color: var(--text-light); font-size: 0.85rem; text-align: center; }

/* ── Nav ── */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,0.93); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-color); }
.nav .container-wide { display: flex; justify-content: center; gap: 26px; padding-top: 12px; padding-bottom: 12px; font-size: 0.92rem; font-weight: 550; }
.nav a { color: var(--text-secondary); }
.nav a:hover { color: var(--accent); }

/* Repository names in the public credits must wrap on narrow screens. */
#credits a { overflow-wrap: anywhere; word-break: normal; }
#abstract a { overflow-wrap: anywhere; }

/* ── Back to top ── */
#back-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px; background: var(--accent);
  border-radius: 50%; color: #fff; font-size: 1.2rem;
  border: none; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
#back-top.visible { opacity: 1; pointer-events: auto; }

/* ── Placeholder ── */
.placeholder {
  border: 2px dashed var(--border-color); border-radius: var(--border-radius);
  padding: 46px 18px; text-align: center; color: var(--text-light); font-size: 0.9rem;
}

/* ── Responsive ── */
@media (max-width: 780px) {
  .hero h1 { font-size: 1.8rem; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .video-grid.cols-2, .video-grid.cols-3 { grid-template-columns: 1fr; }
  .nav .container-wide { justify-content: flex-start; gap: 14px; font-size: 0.85rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav a { flex: 0 0 auto; white-space: nowrap; }
  .clips-panel { flex-direction: column; }
  .clips-list { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
}


/* Disabled buttons and film */
.button.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.film-card .film { width: 100%; display: block; border-radius: 12px; background: #fff; }
.bibtex-actions { display: flex; justify-content: flex-end; margin-bottom: 8px; }


/* Kickers, loop diagram, stat strip, FAQ (SuperMimic-inspired) */
.kicker { text-align:center; font-size:.72rem; font-weight:800; letter-spacing:.16em;
  text-transform:uppercase; color: var(--coral); margin-bottom: 4px; }
.loop-card { background: var(--background-secondary); border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md); padding: 22px; margin: 18px 0 26px; }
.loop { display:flex; align-items:stretch; gap:10px; }
.loop-step { flex:1; background:#f7f8fa; border:1px solid var(--border-color);
  border-radius:12px; padding:14px; }
.loop-step strong { display:block; margin: 6px 0 4px; color: var(--text-primary); }
.loop-step p { margin:0; font-size:.85rem; color: var(--text-secondary); line-height:1.5; }
.loop-num { display:inline-flex; width:22px; height:22px; border-radius:50%;
  background:var(--accent); color:#fff; font-size:.75rem; font-weight:700;
  align-items:center; justify-content:center; }
.loop-arrow { align-self:center; color: var(--text-light); font-weight:700; }
.stat-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin: 22px 0; }
.stat-cell { background: var(--background-secondary); border:1px solid var(--border-color);
  border-radius:12px; padding:14px 16px; text-align:center; box-shadow: var(--shadow-sm); }
.stat-cell .big { font-family:'Fraunces', Georgia, serif; font-size:1.7rem; font-weight:800;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-cell .small { font-size:.8rem; color: var(--text-secondary); margin-top:2px; line-height:1.4; }
details.faq { background: var(--background-secondary); border:1px solid var(--border-color);
  border-radius:12px; padding: 12px 16px; margin: 10px 0; }
details.faq summary { cursor:pointer; font-weight:600; color: var(--text-primary); }
details.faq p { margin: 10px 0 2px; font-size:.92rem; color: var(--text-secondary); line-height:1.65; }
@media (max-width:780px){ .loop{flex-direction:column;} .loop-arrow{transform:rotate(90deg);} .stat-strip{grid-template-columns:repeat(2,1fr);} }


/* Dynamic twilight sky (pure CSS, honours reduced motion) */
.hero { position: relative; overflow: hidden; }
.hero > .container { position: relative; z-index: 3; }
.hero::after {
  content:""; position:absolute; inset:0; z-index:2; pointer-events:none;
  background: linear-gradient(180deg, rgba(10,14,32,.35) 0%, rgba(10,14,32,0) 40%, rgba(10,14,32,.25) 100%);
}
.sky-stars {
  position:absolute; inset:0; z-index:1; pointer-events:none;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1px 1px at 27% 9%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1.4px 1.4px at 44% 22%, rgba(255,245,235,.85), transparent 60%),
    radial-gradient(1px 1px at 58% 12%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.3px 1.3px at 73% 20%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1px 1px at 86% 10%, rgba(255,255,255,.65), transparent 60%),
    radial-gradient(1px 1px at 66% 30%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1px 1px at 35% 32%, rgba(255,255,255,.45), transparent 60%);
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity:.55; } to { opacity:1; } }
.sky-clouds {
  position:absolute; inset:-25% -30%; z-index:1; pointer-events:none;
  background:
    radial-gradient(ellipse 42% 16% at 22% 62%, rgba(255,182,193,.30), transparent 70%),
    radial-gradient(ellipse 36% 13% at 68% 48%, rgba(196,170,235,.28), transparent 70%),
    radial-gradient(ellipse 30% 11% at 45% 76%, rgba(255,214,170,.18), transparent 70%),
    radial-gradient(ellipse 26% 10% at 84% 66%, rgba(255,200,210,.14), transparent 70%);
  filter: blur(34px);
  animation: cloudDrift 90s ease-in-out infinite alternate;
}
@keyframes cloudDrift {
  from { transform: translateX(-4%) translateY(0); }
  to   { transform: translateX(5%)  translateY(-2.5%); }
}
.sky-glow {
  position:absolute; left:50%; bottom:-38%; width:70%; height:75%; z-index:1;
  transform: translateX(-50%); pointer-events:none;
  background: radial-gradient(circle, rgba(255,178,140,.45) 0%, rgba(255,140,130,.18) 45%, transparent 70%);
  filter: blur(56px);
  animation: sunPulse 12s ease-in-out infinite alternate;
}
@keyframes sunPulse { from { opacity:.65; } to { opacity:1; } }
@media (prefers-reduced-motion: reduce) {
  .sky-stars, .sky-clouds, .sky-glow { animation: none; }
}


/* Hero sky footage (Pexels loop); CSS gradient remains as fallback */
.hero { background: linear-gradient(180deg, #131a36 0%, #262c52 42%, #4c3d68 68%, #8a5578 86%, #c07485 96%, #d98f7d 100%); }
.hero-video {
  position:absolute; inset:0; width:100%; height:100%;
  object-fit: cover; z-index:0; pointer-events:none;
}
.hero .sky-stars, .hero .sky-clouds, .hero .sky-glow { display:none; }
.hero::after {
  background: linear-gradient(180deg, rgba(9,12,28,.58) 0%, rgba(9,12,28,.30) 45%, rgba(9,12,28,.52) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .hero-video { display:none; }
  .hero .sky-stars { display:block; animation:none; }
}


/* Hero light theme: for white-background robot footage (swap instructions in index.html) */
.hero.hero-light { background: #ffffff; }
.hero.hero-light::after {
  background: linear-gradient(180deg, rgba(255,255,255,.58) 0%, rgba(255,255,255,.30) 45%, rgba(255,255,255,.72) 100%);
}
.hero.hero-light h1 {
  background: linear-gradient(90deg, #22304f 0%, #6d4a6b 55%, #b0555f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero.hero-light .subtitle { color: #3f4a63; }
.hero.hero-light .authors { color: #4a5470; }
.hero.hero-light .affiliations { color: #6a7288; }
.hero.hero-light .button { background: #243052; border-color: #243052; color: #fff; }
.hero.hero-light .button:hover { background: var(--coral); border-color: var(--coral); }
.hero.hero-light .button.secondary { background: #ffffff; color: #243052; border: 1px solid #d8dce8; }
.hero.hero-light .button.secondary:hover { color: var(--coral); border-color: var(--coral); }

/* Gallery filters */
.gallery-controls { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin: 22px 0 6px; }
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-light); font-weight: 700; }
.filter-pill { border: 1px solid var(--border-color); background: var(--background-secondary); color: var(--text-secondary); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 0.86rem; cursor: pointer; }
.filter-pill:hover { border-color: var(--accent); color: var(--accent); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.gallery-count { margin-left: auto; font-size: 0.82rem; color: var(--text-light); }
.gallery-empty { grid-column: 1 / -1; text-align: center; color: var(--text-light); padding: 30px 0; }

/* Gallery v2 (clips panel) */
.clips-panel { margin-top: 18px; }
.clips-list { width: 300px; overflow-y: auto; max-height: 460px; }
.clip-btn { gap: 12px; line-height: 1.35; }
.clip-name { flex: 1; }
.clip-robot { font-weight: 600; }
.clip-dur { white-space: nowrap; margin-left: 8px; }
.clips-player { padding: 18px; }
.clips-screen { background: #0f172a; border-radius: 10px; overflow: hidden; }
.clips-screen video { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: contain; background: #0f172a; }
.clips-controls { margin-top: 12px; }
.clip-play {
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 0.95rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.clip-play:hover { background: var(--accent-hover); }
.clip-restart {
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 0.86rem;
  border: 1px solid var(--border-color); background: var(--background-secondary);
  color: var(--text-secondary);
}
.clip-restart:hover { border-color: var(--accent); color: var(--accent); }
.clips-pills { margin-left: auto; display: flex; border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; }
.clips-pills .clips-pill { border: none; border-radius: 0; background: var(--background-secondary); padding: 8px 16px; }
.clips-pills .clips-pill + .clips-pill { border-left: 1px solid var(--border-color); }
.clips-pills .clips-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.clips-pills .clips-pill:disabled { opacity: 0.35; cursor: default; }
.clips-caption { margin-top: 10px; font-size: 0.85rem; color: var(--text-secondary); }
.clips-empty { padding: 10px 16px; font-size: 0.86rem; color: var(--text-light); }
.gallery-footer { margin-top: 14px; font-size: 0.8rem; color: var(--text-light); }
@media (max-width: 860px) {
  .clips-panel { flex-direction: column; }
  .clips-list { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); max-height: 260px; }
}

/* Gallery v2 polish: single-line clip rows */
.clip-btn { padding: 10px 16px; font-size: 0.88rem; }
.clip-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clips-list { width: 360px; max-height: none; }

/* ── Gallery v3: studio panel ── */
.gallery-section { background: linear-gradient(180deg, #f6f8fc 0%, #eef1f7 55%, #f6f8fc 100%); position: relative; overflow: hidden; }
.gallery-section::before { content: ""; position: absolute; left: 8%; right: 8%; top: -30%; height: 55%; background: radial-gradient(closest-side, rgba(61,90,150,0.10), transparent 72%); pointer-events: none; }
.gallery-section > .container-wide { position: relative; }
.gallery-lead { max-width: 760px; }
.gallery-controls { display: flex; gap: 16px; align-items: center; margin: 26px 0 18px; flex-wrap: wrap; }
.filter-label { font-size: 0.66rem; letter-spacing: 0.15em; text-transform: uppercase; color: #8a94a6; font-weight: 800; margin-right: 2px; }
.filter-pill { -webkit-appearance: none; appearance: none; border: 1px solid rgba(23,37,84,0.10); background: rgba(255,255,255,0.72); color: #4a5568; border-radius: 999px; padding: 7px 15px; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; box-shadow: 0 1px 1px rgba(15,23,42,0.03); transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.filter-pill:hover { background: #fff; color: var(--accent); border-color: rgba(61,90,150,0.35); transform: translateY(-1px); }
.filter-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 6px 14px -6px rgba(61,90,150,0.6); }
.gallery-count { margin-left: auto; font-size: 0.8rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
.clips-panel { display: grid; grid-template-columns: 320px 1fr; border-radius: 24px; overflow: hidden; background: linear-gradient(180deg, #ffffff, #fbfcfe); border: 1px solid rgba(23,37,84,0.08); box-shadow: 0 30px 60px -30px rgba(23,37,84,0.35), 0 4px 14px rgba(23,37,84,0.05); }
.clips-rail { background: linear-gradient(180deg, #f7f9fc, #f2f5fa); border-right: 1px solid rgba(23,37,84,0.06); padding: 22px 0 16px; display: flex; flex-direction: column; }
.clips-label { font-size: 0.64rem; letter-spacing: 0.16em; color: #94a3b8; font-weight: 800; padding: 0 22px 12px; }
#clipList { display: flex; flex-direction: column; gap: 2px; padding: 0 10px 4px; overflow-y: auto; max-height: 540px; }
.clip-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; background: transparent; border-radius: 12px; cursor: pointer; text-align: left; color: #243044; position: relative; transition: background .16s ease, box-shadow .16s ease; }
.clip-btn:hover { background: rgba(255,255,255,0.85); box-shadow: 0 2px 8px rgba(15,23,42,0.06); }
.clip-btn.active { background: #fff; box-shadow: 0 8px 20px -12px rgba(23,37,84,0.35), 0 1px 2px rgba(15,23,42,0.06); }
.clip-btn.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); }
.clip-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.clip-title { font-family: 'Fraunces', Georgia, serif; font-size: 1rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-dash { color: #98a2b3; font-weight: 400; }
.clip-meta { font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; color: #94a3b8; font-weight: 700; }
.clip-dur { font-size: 0.78rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
.clips-stage { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.clips-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: radial-gradient(120% 120% at 20% 0%, #ffffff 0%, #eef2f8 55%, #e3e9f2 100%); box-shadow: inset 0 0 0 1px rgba(23,37,84,0.05), inset 0 24px 48px -36px rgba(23,37,84,0.3); }
.clips-screen video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; }
.clips-badge { position: absolute; left: 14px; top: 14px; font-size: 0.58rem; letter-spacing: 0.16em; font-weight: 800; color: #fff; background: rgba(15,23,42,0.5); padding: 5px 9px; border-radius: 6px; backdrop-filter: blur(6px); }
.clips-controls { display: flex; align-items: center; gap: 12px; }
.clip-restart { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(23,37,84,0.12); background: #fff; color: #475569; font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(15,23,42,0.04); transition: color .16s ease, border-color .16s ease, transform .16s ease; }
.clip-restart:hover { color: var(--accent); border-color: rgba(61,90,150,0.4); transform: translateY(-1px); }
.restart-icon { font-size: 1rem; }
.clips-pills { margin-left: auto; display: flex; padding: 3px; border-radius: 999px; background: #eef1f7; box-shadow: inset 0 1px 2px rgba(15,23,42,0.06); }
.clips-pills .clips-pill { -webkit-appearance: none; appearance: none; border: 0; border-radius: 999px; background: transparent; color: #64748b; padding: 7px 16px; font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: background .16s ease, color .16s ease, box-shadow .16s ease; }
.clips-pills .clips-pill.active { background: #fff; color: var(--accent); box-shadow: 0 1px 3px rgba(15,23,42,0.12); }
.clips-pills .clips-pill:disabled { opacity: 0.35; cursor: default; }
.clips-caption { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 0.92rem; color: #334155; }
.cap-robot { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 1.03rem; color: #1e293b; }
.cap-sep { color: #cbd5e1; }
.cap-task, .cap-policy { font-weight: 600; color: #475569; }
.cap-success { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--accent); }
.gallery-footer { margin-top: 16px; font-size: 0.78rem; color: #94a3b8; }
.clips-empty { padding: 10px 16px; font-size: 0.86rem; color: #94a3b8; }
@media (max-width: 900px) {
  .clips-panel { grid-template-columns: 1fr; }
  .clips-rail { border-right: 0; border-bottom: 1px solid rgba(23,37,84,0.06); }
  #clipList { max-height: 240px; }
}
