:root {
  --bg: #f4ede6;
  --bg-deep: #eadfda;
  --panel: rgba(255, 251, 248, 0.5);
  --panel-strong: rgba(255, 252, 250, 0.68);
  --panel-soft: rgba(255, 255, 255, 0.42);
  --ink: #211c1b;
  --muted: #6d6663;
  --line: rgba(79, 61, 54, 0.12);
  --line-strong: rgba(79, 61, 54, 0.2);
  --accent: #6d57ff;
  --accent-strong: #4c33d1;
  --accent-soft: rgba(109, 87, 255, 0.13);
  --accent-deep: #203a4d;
  --accent-olive: #2e5d59;
  --mint: #84f0dc;
  --apricot: #ffcfb1;
  --pearl: #fff7ef;
  --shadow: 0 24px 80px rgba(73, 48, 39, 0.12);
  --shadow-soft: 0 14px 36px rgba(73, 48, 39, 0.08);
  --shadow-card: 0 20px 44px rgba(73, 48, 39, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-display: "Iowan Old Style", "Baskerville", "Times New Roman", "Songti SC", serif;
  --font-body: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 215, 187, 0.7), transparent 26%),
    radial-gradient(circle at 84% 8%, rgba(141, 235, 223, 0.48), transparent 22%),
    radial-gradient(circle at 74% 56%, rgba(165, 176, 255, 0.24), transparent 22%),
    linear-gradient(180deg, #f7f0ea 0%, #efe4db 56%, #e8ddd9 100%);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 42%);
  background-size: 36px 36px, 36px 36px, 100% 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.16), transparent 70%);
  opacity: 0.45;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, 0.78), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  mix-blend-mode: screen;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(24px);
  pointer-events: none;
  opacity: 0.82;
}

.ambient-pearl {
  top: 88px;
  left: 6vw;
  width: min(22vw, 280px);
  height: min(22vw, 280px);
  background: radial-gradient(circle at 30% 30%, rgba(255, 250, 245, 0.94), rgba(255, 214, 184, 0.4) 54%, transparent 76%);
}

.ambient-mint {
  top: 120px;
  right: 8vw;
  width: min(24vw, 330px);
  height: min(24vw, 330px);
  background: radial-gradient(circle at 38% 38%, rgba(152, 252, 230, 0.78), rgba(88, 196, 182, 0.32) 58%, transparent 78%);
}

.ambient-lilac {
  bottom: 14vh;
  right: 14vw;
  width: min(20vw, 260px);
  height: min(20vw, 260px);
  background: radial-gradient(circle at 50% 50%, rgba(177, 153, 255, 0.58), rgba(115, 94, 244, 0.18) 60%, transparent 82%);
}

.ambient-apricot {
  bottom: 10vh;
  left: 10vw;
  width: min(18vw, 220px);
  height: min(18vw, 220px);
  background: radial-gradient(circle at 42% 42%, rgba(255, 214, 190, 0.82), rgba(255, 153, 123, 0.18) 58%, transparent 78%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

img {
  display: block;
  max-width: 100%;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1680px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 30px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.36fr) minmax(340px, 0.74fr);
  gap: 20px;
  margin-bottom: 20px;
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 318px;
  padding: 28px 30px 26px;
  background:
    radial-gradient(circle at 80% 20%, rgba(129, 248, 223, 0.34), transparent 24%),
    radial-gradient(circle at 62% 86%, rgba(165, 176, 255, 0.26), transparent 28%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.58), rgba(255, 248, 244, 0.34));
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.44), transparent 70%);
  filter: blur(8px);
}

.eyebrow,
.section-kicker,
.hero-side-label {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2,
.stat-value,
.entry-title,
.detail-title,
.spotlight-title {
  font-family: var(--font-display);
}

.hero h1 {
  margin: 0;
  max-width: 7ch;
  font-size: clamp(52px, 6vw, 92px);
  line-height: 0.88;
  letter-spacing: 0.015em;
}

.subtitle {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-liquid-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.hero-liquid-pill {
  position: relative;
  display: inline-flex;
  width: 150px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  box-shadow:
    0 22px 28px rgba(121, 96, 86, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -10px 22px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
}

.hero-liquid-pill::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0));
}

.hero-liquid-pill-violet {
  background: linear-gradient(135deg, rgba(136, 116, 255, 0.82), rgba(112, 85, 255, 0.48));
}

.hero-liquid-pill-mint {
  background: linear-gradient(135deg, rgba(142, 245, 228, 0.82), rgba(100, 218, 203, 0.48));
}

.hero-liquid-pill-pearl {
  width: 86px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(242, 233, 226, 0.46));
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.2)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(140%);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 60%);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.24);
  pointer-events: none;
  opacity: 0.9;
}

.hero-side {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px 24px 22px;
  background:
    radial-gradient(circle at 20% 20%, rgba(142, 245, 228, 0.2), transparent 24%),
    radial-gradient(circle at 84% 84%, rgba(160, 171, 255, 0.14), transparent 22%),
    linear-gradient(155deg, rgba(30, 49, 70, 0.9), rgba(44, 68, 92, 0.84)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent);
  color: #f8f3ed;
}

.hero-side .hero-side-label,
.hero-side .hero-side-note {
  color: rgba(248, 243, 237, 0.82);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badges span,
.tag-chip,
.keyword-pill,
.filter-pill,
.mini-chip,
.related-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: #59504d;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hero-badges span {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #fff4ea;
}

.hero-side-note {
  margin: 0;
  line-height: 1.7;
  font-size: 14px;
}

.share-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 36px rgba(10, 18, 28, 0.12);
}

.share-panel-label,
.share-note {
  margin: 0;
}

.share-panel-label {
  color: rgba(248, 243, 237, 0.74);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.share-link {
  color: #fff7ef;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  word-break: break-all;
}

.share-link:hover {
  text-decoration: underline;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-note {
  color: rgba(248, 243, 237, 0.82);
  font-size: 13px;
  line-height: 1.7;
}

body[data-archive-mode="public"] .video-lab,
body[data-archive-mode="public"] .toolbar-actions,
body[data-archive-mode="public"] .form-panel,
body[data-archive-mode="public"] .detail-actions,
body[data-archive-mode="public"] #detailFavoriteButton,
body[data-archive-mode="public"] [data-mode="favorites"],
body[data-archive-mode="public"] .entry-favorite-button,
body[data-archive-mode="public"] .entry-edit-button {
  display: none !important;
}

.hero-side .button.ghost {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #fff7ef;
}

.command-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 18px 20px;
}

.command-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  gap: 14px;
}

.search-box,
.filter-box,
.entry-form label {
  display: grid;
  gap: 8px;
}

.search-box span,
.filter-box span,
.entry-form span {
  font-size: 13px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid rgba(91, 71, 64, 0.12);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.56));
  color: var(--ink);
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 12px 24px rgba(95, 69, 59, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(109, 87, 255, 0.38);
  box-shadow:
    0 0 0 4px rgba(109, 87, 255, 0.1),
    0 18px 30px rgba(109, 87, 255, 0.08);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.toolbar-actions,
.form-actions,
.detail-actions,
.image-upload-row,
.entry-card-actions,
.entry-meta-left {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: linear-gradient(135deg, rgba(117, 100, 255, 0.98), rgba(91, 70, 248, 0.84));
  color: #fff7f3;
  box-shadow: 0 18px 28px rgba(90, 70, 248, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.button.secondary {
  background: linear-gradient(135deg, rgba(39, 73, 93, 0.96), rgba(29, 51, 70, 0.92));
  color: #f6f0eb;
  box-shadow: 0 18px 26px rgba(29, 51, 70, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.button.ghost {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42));
  color: var(--ink);
  box-shadow: 0 14px 26px rgba(73, 48, 39, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.button.danger {
  background: #7e2818;
  color: #fff5f3;
}

.button.tiny {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.button.favorite-on,
.tag-chip.is-active,
.related-pill.is-manual {
  border-color: rgba(183, 79, 47, 0.24);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.upload-button {
  overflow: hidden;
}

.toolbar-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 14px;
  margin-top: 14px;
}

.quick-filter-set {
  display: flex;
  gap: 10px;
  padding: 12px;
}

.chip {
  min-height: 40px;
  padding-inline: 18px;
}

.chip.is-active {
  background: linear-gradient(135deg, rgba(54, 102, 95, 0.96), rgba(39, 76, 71, 0.9));
  color: #fff9f4;
}

.active-filters,
.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 18px;
}

.active-filters {
  flex-wrap: wrap;
}

.filter-pill {
  border-color: rgba(67, 49, 35, 0.09);
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
}

.filter-pill button {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.status-bar {
  color: var(--muted);
  font-size: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38));
}

.status-bar[data-tone="success"] {
  color: #1c5f45;
  border-color: rgba(28, 95, 69, 0.18);
  background: rgba(224, 245, 236, 0.82);
}

.status-bar[data-tone="error"] {
  color: #8e2c11;
  border-color: rgba(142, 44, 17, 0.18);
  background: rgba(255, 236, 231, 0.82);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 20px;
}

.stat-card {
  padding: 18px 20px 20px;
  box-shadow: var(--shadow-card);
}

.stat-card:nth-child(1) {
  background:
    radial-gradient(circle at 88% 18%, rgba(134, 245, 226, 0.26), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34));
}

.stat-card:nth-child(2) {
  background:
    radial-gradient(circle at 84% 18%, rgba(163, 173, 255, 0.3), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34));
}

.stat-card:nth-child(3) {
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 214, 190, 0.34), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34));
}

.stat-card:nth-child(4) {
  background:
    radial-gradient(circle at 84% 18%, rgba(196, 241, 229, 0.28), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34));
}

.stat-card:nth-child(5) {
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 227, 179, 0.32), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34));
}

.stat-card:nth-child(6) {
  background:
    radial-gradient(circle at 84% 18%, rgba(205, 194, 255, 0.32), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34));
}

.stat-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stat-value {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1;
}

.video-lab {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px;
}

.video-lab-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(340px, 0.9fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: start;
}

.video-lab-panel {
  display: grid;
  gap: 14px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.46));
  box-shadow: var(--shadow-card);
}

.video-lab-help {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.video-upload-row,
.video-lab-actions,
.video-facts,
.video-frame-strip,
.video-shot-ideas,
.video-segments-list,
.video-segment-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.video-type-panel {
  display: grid;
  gap: 8px;
}

.video-type-panel span {
  color: var(--muted);
  font-size: 13px;
}

.video-inference-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(67, 49, 35, 0.12);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.56));
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.video-inference-badge[data-confidence="high"] {
  border-color: rgba(28, 95, 69, 0.18);
  background: rgba(224, 245, 236, 0.82);
  color: #1c5f45;
}

.video-inference-badge[data-confidence="medium"] {
  border-color: rgba(183, 136, 47, 0.18);
  background: rgba(255, 246, 226, 0.82);
  color: #9a6418;
}

.video-inference-badge[data-confidence="low"] {
  border-color: rgba(142, 44, 17, 0.18);
  background: rgba(255, 236, 231, 0.82);
  color: #8e2c11;
}

.video-inference-reason {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.video-analysis-status {
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid rgba(67, 49, 35, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42));
  color: var(--muted);
  line-height: 1.65;
}

.video-analysis-status[data-tone="success"] {
  color: #1c5f45;
  border-color: rgba(28, 95, 69, 0.16);
  background: rgba(224, 245, 236, 0.82);
}

.video-analysis-status[data-tone="error"] {
  color: #8e2c11;
  border-color: rgba(142, 44, 17, 0.16);
  background: rgba(255, 236, 231, 0.82);
}

.video-preview-empty,
.video-output-empty {
  min-height: 320px;
}

.video-preview-card,
.video-output-card {
  display: grid;
  gap: 14px;
}

.video-preview-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: #110f0d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.video-fact-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 13px;
}

.video-frame-strip {
  gap: 12px;
}

.video-frame-card {
  display: grid;
  gap: 8px;
  width: min(128px, calc(50% - 6px));
}

.video-frame-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(67, 49, 35, 0.08);
  background: rgba(0, 0, 0, 0.08);
}

.video-frame-time {
  color: var(--muted);
  font-size: 12px;
}

.video-summary-card {
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 84% 22%, rgba(133, 245, 226, 0.18), transparent 22%),
    radial-gradient(circle at 18% 18%, rgba(196, 202, 255, 0.14), transparent 24%),
    linear-gradient(145deg, rgba(34, 59, 75, 0.92), rgba(47, 72, 95, 0.84)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  color: #f8f3ed;
  box-shadow: 0 22px 42px rgba(33, 49, 67, 0.2);
}

.video-summary-label {
  margin: 0 0 10px;
  color: rgba(248, 243, 237, 0.72);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.video-summary-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 0.98;
}

.video-summary-card .detail-summary {
  color: rgba(248, 243, 237, 0.84);
}

.video-keyword-grid,
.video-prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.video-script-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
}

.video-segments-list,
.video-segment-detail-card {
  display: grid;
  gap: 12px;
}

.video-tech-note {
  padding: 12px 14px;
  border: 1px dashed rgba(183, 79, 47, 0.24);
  border-radius: 16px;
  background: rgba(183, 79, 47, 0.06);
  color: var(--muted);
  line-height: 1.65;
}

.video-segment-item {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.54));
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.video-segment-item:hover,
.video-segment-item.is-active {
  border-color: rgba(109, 87, 255, 0.22);
  background:
    radial-gradient(circle at 88% 18%, rgba(136, 245, 227, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 240, 255, 0.7));
  box-shadow: 0 18px 34px rgba(109, 87, 255, 0.12);
  transform: translateY(-2px);
}

.video-segment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.video-segment-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.video-segment-role {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.video-segment-visual-wrap {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(67, 49, 35, 0.1);
  background: linear-gradient(160deg, rgba(32, 54, 47, 0.12), rgba(183, 79, 47, 0.16));
}

.video-segment-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-prompt-block {
  display: grid;
  gap: 8px;
}

.video-prompt-block span {
  color: var(--muted);
  font-size: 13px;
}

.video-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.video-spec-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.56));
  box-shadow: var(--shadow-soft);
}

.video-spec-card span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-spec-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

.video-shot-idea {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.48));
  color: var(--ink);
  line-height: 1.65;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.55fr) minmax(0, 1.12fr) minmax(400px, 0.94fr);
  gap: 20px;
  align-items: start;
}

.rail,
.inspector,
.library-stage {
  display: grid;
  gap: 18px;
}

.rail,
.inspector {
  position: sticky;
  top: 14px;
}

.nav-panel,
.spotlight-panel,
.results-panel,
.detail-panel,
.form-panel,
.batch-panel {
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.search-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.group-nav,
.mini-list {
  display: grid;
  gap: 8px;
}

.group-nav-button,
.mini-list-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.5));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.group-nav-button:hover,
.mini-list-button:hover,
.group-nav-button.is-active {
  border-color: rgba(109, 87, 255, 0.22);
  background:
    radial-gradient(circle at 86% 22%, rgba(132, 240, 220, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(244, 240, 255, 0.68));
  box-shadow: 0 18px 32px rgba(109, 87, 255, 0.1);
  transform: translateY(-2px);
}

.group-nav-name,
.mini-list-title {
  font-size: 14px;
  font-weight: 600;
}

.group-nav-count,
.mini-list-meta,
.file-name {
  font-size: 12px;
  color: var(--muted);
}

.tag-atlas,
.tag-list,
.entry-keywords,
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip,
.keyword-pill,
.related-pill,
.image-zoom-button {
  cursor: pointer;
}

.tag-chip,
.keyword-pill,
.related-pill {
  border: 1px solid var(--line);
}

.tag-chip:hover,
.keyword-pill:hover,
.related-pill:hover,
.entry-link:hover {
  color: var(--accent-strong);
}

.tag-chip:hover,
.keyword-pill:hover,
.related-pill:hover {
  background: linear-gradient(180deg, rgba(244, 240, 255, 0.9), rgba(237, 251, 248, 0.64));
}

.spotlight-empty {
  min-height: 260px;
}

.spotlight-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
  gap: 22px;
}

.spotlight-cover-wrap,
.detail-image-wrap,
.form-image-preview,
.entry-cover {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 16%, rgba(132, 240, 220, 0.24), transparent 22%),
    linear-gradient(160deg, rgba(47, 87, 109, 0.18), rgba(131, 112, 255, 0.12));
  border: 1px solid rgba(67, 49, 35, 0.1);
  box-shadow: var(--shadow-soft);
}

.spotlight-cover-wrap {
  min-height: 320px;
}

.spotlight-cover-wrap::after,
.detail-image-wrap::after,
.entry-cover::after {
  content: "";
  position: absolute;
  inset: auto 10px 10px auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.48), transparent 68%);
  filter: blur(6px);
  pointer-events: none;
}

.spotlight-image,
.detail-image,
.entry-cover-media,
#formImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
}

.image-zoom-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

.spotlight-content {
  display: grid;
  align-content: start;
  gap: 14px;
}

.spotlight-title {
  margin: 0;
  font-size: clamp(38px, 4vw, 56px);
  line-height: 0.92;
}

.spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.results-panel {
  min-height: 62vh;
}

.entry-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.entry-card {
  display: grid;
  gap: 14px;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 84% 16%, rgba(133, 245, 226, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.54));
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.entry-card:hover,
.entry-card.is-selected {
  border-color: rgba(109, 87, 255, 0.22);
  box-shadow: 0 22px 42px rgba(109, 87, 255, 0.12);
  transform: translateY(-3px);
}

.entry-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.entry-card-body {
  display: grid;
  grid-template-columns: minmax(120px, 148px) minmax(0, 1fr);
  gap: 14px;
}

.entry-cover {
  min-height: 120px;
}

.entry-copy {
  display: grid;
  gap: 10px;
  align-content: start;
}

.entry-group {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.entry-title,
.detail-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.04;
}

.entry-summary,
.detail-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.entry-footer,
.detail-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.entry-link {
  color: var(--accent-strong);
  text-decoration: none;
}

.entry-date {
  color: var(--muted);
}

.entry-related-count {
  color: var(--muted);
}

.detail-card {
  display: grid;
  gap: 18px;
}

.detail-image-wrap {
  min-height: 240px;
}

.detail-block {
  display: grid;
  gap: 10px;
}

.detail-block h4,
.detail-section h4 {
  margin: 0;
  font-size: 13px;
  color: var(--accent-strong);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.detail-sections {
  display: grid;
  gap: 12px;
}

.detail-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.54));
  box-shadow: var(--shadow-soft);
}

.detail-section p {
  margin: 8px 0 0;
  line-height: 1.7;
}

.form-panel,
.batch-panel {
  display: grid;
  gap: 8px;
}

.entry-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-image-preview {
  min-height: 180px;
}

.form-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-help {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.batch-help code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(45, 34, 24, 0.08);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 28px 18px;
  border: 1px dashed rgba(91, 71, 64, 0.18);
  border-radius: 22px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.18));
  text-align: center;
  line-height: 1.7;
}

.search-highlight {
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 232, 171, 0.92), rgba(255, 198, 116, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.22);
}

*::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(142, 120, 255, 0.72), rgba(95, 209, 192, 0.64));
  background-clip: padding-box;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 36px;
  background: rgba(16, 16, 16, 0.72);
  backdrop-filter: blur(10px);
}

.image-modal-inner {
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.image-modal-inner img {
  max-width: 100%;
  max-height: calc(88vh - 60px);
  border-radius: 20px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.3);
}

.image-modal-inner p {
  margin: 0;
  color: #f5eee7;
}

.image-modal-close {
  position: absolute;
  top: 22px;
  right: 22px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1480px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .entry-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1320px) {
  .video-lab-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .video-output-panel {
    grid-column: 1 / -1;
  }

  .video-script-grid {
    grid-template-columns: 1fr;
  }

  .workspace-grid {
    grid-template-columns: minmax(220px, 0.48fr) minmax(0, 1fr);
  }

  .inspector {
    grid-column: 1 / -1;
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .detail-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1120px) {
  .hero,
  .command-bar,
  .toolbar-strip,
  .video-lab-grid,
  .video-keyword-grid,
  .video-spec-grid,
  .video-prompt-grid,
  .workspace-grid,
  .command-main,
  .inspector,
  .spotlight-card {
    grid-template-columns: 1fr;
  }

  .rail,
  .inspector {
    position: static;
  }

  .toolbar-strip {
    grid-template-columns: 1fr;
  }

  .search-meta {
    text-align: left;
  }

  .hero-copy {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100vw - 20px, 1600px);
    padding-top: 18px;
  }

  .stats-grid,
  .form-grid.two-up,
  .entry-card-body,
  .entry-list {
    grid-template-columns: 1fr;
  }

  .entry-card-top,
  .entry-footer,
  .detail-footer,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .entry-card-actions,
  .toolbar-actions,
  .form-actions,
  .detail-actions,
  .image-upload-row {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .quick-filter-set {
    flex-wrap: wrap;
  }

  .video-frame-card {
    width: 100%;
  }

  .image-modal {
    padding: 20px;
  }

  .hero-liquid-pill {
    width: 112px;
    height: 44px;
  }
}
