:root {
  --ink: #1e2320;
  --muted: #778079;
  --line: #dfe2dc;
  --paper: #f4f9fd;
  --card: #fff;
  --accent: #5d55e8;
  --lime: #d7f081;
  --warm: #f2ddcc;
  --shadow: 0 18px 40px #1e232012;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  color: inherit;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #817af455;
  outline-offset: 2px;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 248px;
  border-right: 1px solid var(--line);
  padding: 30px 20px 24px;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-weight: 750;
  letter-spacing: -0.04em;
  font-size: 18px;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.17em;
  color: var(--muted);
  font-weight: 650;
  margin-top: 3px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-size: 17px;
}
.main-nav {
  display: grid;
  gap: 6px;
  margin-top: 65px;
}
.nav-item {
  padding: 13px 12px;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  color: #68716b;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-item span {
  font-size: 19px;
  color: #9aa29c;
}
.nav-item b {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: #aab0aa;
}
.nav-item.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.nav-item.active span {
  color: var(--accent);
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}
.status-dot {
  width: 7px;
  height: 7px;
  background: #79b84c;
  border-radius: 50%;
}
.sidebar-foot button {
  background: none;
  margin-left: auto;
  color: var(--muted);
}
.main {
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 44px;
  justify-content: space-between;
}
.crumb {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 12px;
}
.crumb strong {
  font-weight: 400;
  color: #b5bab4;
}
.crumb span:last-child {
  color: var(--ink);
  font-weight: 600;
}
.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.button {
  border-radius: 7px;
  padding: 11px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.button.primary {
  background: var(--ink);
  color: #fff;
}
.button.primary:hover {
  background: #373e38;
}
.button.outline {
  background: transparent;
  border: 1px solid #cdd2cb;
}
.button.outline:hover {
  background: #fff;
}
.button.quiet {
  background: transparent;
  color: #4f5952;
  padding-inline: 10px;
}
.button.quiet:hover {
  color: var(--accent);
  background: #eeedff;
}
.icon-button {
  background: transparent;
  font-size: 18px;
  color: var(--muted);
  padding: 6px;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--warm);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 750;
}
.view {
  display: none;
  padding: 52px 44px 100px;
}
.view.active {
  display: block;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  max-width: 1100px;
  margin-bottom: 48px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 750;
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(37px, 4vw, 61px);
  line-height: 1.04;
  letter-spacing: -0.065em;
  margin: 15px 0 17px;
}
h1 em,
h2 em {
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.06em;
}
.hero p,
.section-head p {
  color: var(--muted);
  font-size: 13px;
}
.hero-stats {
  display: flex;
  gap: 45px;
  margin-bottom: 4px;
}
.hero-stats div {
  display: grid;
  gap: 4px;
}
.hero-stats strong {
  font-size: clamp(42px, 5vw, 72px);
  line-height: .85;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  display: inline-block;
}
.hero-stats span {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero-stats .photo-count {
  min-width: 170px;
  text-align: right;
}
.hero-stats .count-pop {
  animation: count-pop .52s cubic-bezier(.2,.8,.2,1);
}
.hero-stats .is-searching {
  color: var(--accent);
}
@keyframes count-pop {
  0% { opacity: .45; transform: translateY(7px); }
  100% { opacity: 1; transform: translateY(0); }
}
.workspace {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 38px;
}
.filters {
  border-top: 1px solid var(--ink);
  padding-top: 15px;
}
.filter-heading {
  font-size: 12px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  margin-bottom: 19px;
}
.filter-heading button {
  background: none;
  color: var(--accent);
  font-size: 10px;
}
.filters-done { display: none; }
.search {
  height: 39px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 7px;
  margin-bottom: 28px;
}
.search span {
  font-size: 21px;
  color: var(--muted);
}
.search input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 12px;
  background: transparent;
}
.filter-group {
  display: grid;
  gap: 10px;
  margin: 0 0 27px;
}
.filter-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #929a94;
  font-weight: 750;
  margin-bottom: 2px;
}
.check {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #56605a;
}
.check input {
  accent-color: var(--accent);
}
.check small {
  font-size: 10px;
  color: #a3aaa4;
}
.segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.segmented button {
  background: transparent;
  flex: 1;
  padding: 7px 2px;
  font-size: 9px;
  color: var(--muted);
}
.segmented button.selected {
  background: var(--ink);
  color: #fff;
}
.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ink);
  padding: 13px 0 17px;
  font-size: 12px;
  font-weight: 700;
}
.gallery-toolbar .muted {
  margin-left: 8px;
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
}
.search-status {
  color: var(--accent);
  font-size: 10px;
  font-weight: 650;
  min-height: 1.4em;
}
.view-controls {
  display: flex;
  gap: 3px;
}
.view-controls .active {
  color: var(--ink);
  background: #e3e4dd;
  border-radius: 5px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.gallery.is-searching {
  opacity: .58;
  transition: opacity .2s ease;
}
.asset-card {
  aspect-ratio: 1.08;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #dfe0dc;
  cursor: pointer;
}
.asset-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.asset-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s;
}
.asset-card:hover img {
  transform: scale(1.04);
}
.asset-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #0000 58%, #0005 100%);
  opacity: 0;
  transition: opacity .25s ease;
}
.asset-card:hover::after,
.asset-card:focus-within::after { opacity: 1; }
.card-share {
  position: absolute;
  z-index: 2;
  right: 9px;
  bottom: 9px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: #fffffff0;
  box-shadow: 0 5px 18px #0002;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.asset-card:hover .card-share,
.asset-card:focus-within .card-share {
  opacity: 1;
  transform: translateY(0);
}
.card-share:hover { background: var(--lime); }
.asset-card.portrait {
  aspect-ratio: 0.72;
}
.asset-card .card-check {
  position: absolute;
  top: 9px;
  left: 9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffffe8;
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 12px;
}
.asset-card.selected .card-check {
  background: var(--lime);
  color: var(--ink);
}
.asset-card .heart {
  position: absolute;
  right: 8px;
  top: 7px;
  color: #fff;
  text-shadow: 0 1px 5px #0008;
  font-size: 17px;
}
.asset-card.favorite .heart {
  color: #ffcfca;
}
.asset-card .tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: #1e2320d9;
  color: #fff;
  border-radius: 3px;
  padding: 4px 6px;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.load-more {
  margin: 26px auto 0;
  display: flex;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 25px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: 48px;
  letter-spacing: -0.07em;
  margin: 12px 0 8px;
}
.reels-list,
.jobs-list {
  display: grid;
  gap: 10px;
  max-width: 900px;
}
.empty-state {
  border: 1px dashed #cdd2cb;
  padding: 55px;
  text-align: center;
  color: var(--muted);
  border-radius: 8px;
}
.reel-row,
.job-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.reel-thumb {
  width: 84px;
  aspect-ratio: 1.4;
  border-radius: 4px;
  background: linear-gradient(135deg, #232b29, #66716a);
  display: grid;
  place-items: center;
  color: #d7f081;
  font-size: 22px;
}
.reel-row h3,
.job-row h3 {
  font-size: 14px;
  margin-bottom: 5px;
}
.reel-row p,
.job-row p {
  font-size: 11px;
  color: var(--muted);
}
.row-meta {
  margin-left: auto;
  text-align: right;
  font-size: 10px;
  color: var(--muted);
}
.selection-tray {
  position: fixed;
  z-index: 10;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 15px 35px #0003;
}
.selection-tray > div {
  display: grid;
  gap: 2px;
  margin-right: 9px;
}
.selection-tray strong {
  font-size: 12px;
}
.selection-tray .muted {
  font-size: 10px;
  color: #aeb6ae;
}
.selection-tray .outline {
  color: #fff;
  border-color: #657068;
}
.selection-tray .icon-button {
  color: #aeb6ae;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #151917f7;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  color: #fff;
}
.lightbox-image-wrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 45px;
}
.lightbox-image-wrap img {
  max-width: 100%;
  max-height: calc(100vh - 90px);
  object-fit: contain;
}
.lightbox-image-wrap img.is-loading { opacity: 0; }
.lightbox-image-wrap.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #ffffff35;
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: search-spin .75s linear infinite;
}
.lightbox-close,
.modal-close {
  position: absolute;
  right: 22px;
  top: 17px;
  background: none;
  color: inherit;
  font-size: 29px;
  font-weight: 200;
  z-index: 2;
}
.lightbox-close,
.modal-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  background: #ffffff20;
  color: #fff;
  border-radius: 50%;
  font-size: 33px;
  width: 42px;
  height: 42px;
  line-height: 30px;
}
.lightbox-arrow.prev {
  left: 20px;
}
.lightbox-arrow.next {
  right: 20px;
}
.lightbox-info {
  padding: 90px 30px 30px;
  border-left: 1px solid #ffffff1f;
}
.lightbox-info h3 {
  font-size: 22px;
  margin: 14px 0 7px;
  letter-spacing: -0.04em;
}
.lightbox-info p {
  font-size: 11px;
  color: #b1b9b2;
}
.lightbox-actions {
  display: grid;
  gap: 9px;
  margin-top: 40px;
}
.lightbox-share-callout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 34px;
  padding: 13px;
  border: 1px solid #ffffff1f;
  border-radius: 8px;
  background: #ffffff0a;
}
.lightbox-share-callout > span { color: var(--lime); }
.lightbox-share-callout p { line-height: 1.45; }
.lightbox-share-callout strong { display: block; color: #fff; margin-bottom: 2px; }
.button.share-primary {
  background: var(--lime);
  color: var(--ink);
}
.button.share-primary:hover { background: #e5f7a5; }
.lightbox-actions .outline {
  color: #fff;
  border-color: #69736c;
}
.lightbox-actions .outline:hover,
.lightbox-actions .outline:focus-visible {
  color: #fff;
  background: #ffffff12;
  border-color: #aab3ad;
}
.lightbox-share-status {
  min-height: 18px;
  margin-top: 12px;
  color: var(--lime) !important;
  font-weight: 700;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #15191799;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-card {
  position: relative;
  max-width: 500px;
  width: 100%;
  background: var(--paper);
  border-radius: 10px;
  padding: 37px;
}
.modal-card h2 {
  font-size: 35px;
  letter-spacing: -0.07em;
  margin: 13px 0 8px;
}
.modal-card > p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 27px;
}
.modal-card label {
  display: grid;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 700;
  margin: 16px 0;
}
.modal-card input,
.modal-card textarea,
.modal-card select {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
  padding: 11px;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  resize: vertical;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 28px;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  padding: 20px;
}
.admin-login .login-card {
  max-width: 430px;
  color: var(--ink);
}
.admin-login .login-card .eyebrow,
.admin-login .login-card label { color: var(--muted); }
.admin-login .login-card input {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.admin-login .login-card p { margin-bottom: 24px; }
.share-card {
  display: grid;
  grid-template-columns: minmax(180px, .85fr) 1.15fr;
  gap: 28px;
  max-width: 760px;
  padding: 22px;
}
.share-preview {
  min-height: 310px;
  overflow: hidden;
  border-radius: 7px;
  background: #dfe0dc;
}
.share-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.share-copy {
  align-self: center;
  padding: 20px 34px 20px 4px;
}
.share-copy h2 { margin-top: 12px; }
.share-copy > p { line-height: 1.55; }
.share-actions {
  display: flex;
  gap: 8px;
  margin-top: 25px;
}
.share-confirmation {
  min-height: 1.5em;
  margin-top: 13px !important;
  color: #4f7738 !important;
  font-weight: 650;
}
.share-link-fallback {
  width: 100%;
  margin: 14px 0 2px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 11px;
  font-size: 12px;
}
.login-card {
  max-width: 430px;
  width: 100%;
}
.login-card .eyebrow {
  color: #aeb9ad;
}
.login-card h1 {
  font-size: 53px;
  margin-top: 18px;
}
.login-card p {
  color: #aeb9ad;
  font-size: 13px;
  margin-bottom: 34px;
}
.login-card label {
  display: grid;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aeb9ad;
}
.login-card input {
  margin-bottom: 14px;
  padding: 13px;
  background: #2d3630;
  border: 1px solid #516057;
  border-radius: 5px;
  color: #fff;
}
.login-card .button {
  width: 100%;
}
.login-card small {
  display: block;
  color: #f3a69e;
  margin-top: 12px;
}
.bottom-nav,
#mobile-menu {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  .sidebar {
    display: none;
  }
  .topbar {
    height: 62px;
    padding: 0 18px;
  }
  .top-actions .outline {
    display: none;
  }
  .crumb {
    margin-right: auto;
  }
  .view {
    padding: 30px 18px 95px;
  }
  .hero {
    display: block;
    margin-bottom: 30px;
  }
  .hero-stats {
    margin-top: 27px;
    display: block;
  }
  .hero-stats strong {
    font-size: 46px;
  }
  .hero-stats .photo-count { min-width: 0; text-align: left; }
  .workspace {
    display: block;
  }
  .filters {
    display: none;
  }
  .gallery-toolbar {
    margin-top: 3px;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .asset-card {
    aspect-ratio: 1.03;
  }
  .asset-card.portrait {
    aspect-ratio: 0.72;
  }
  .card-share {
    width: 40px;
    height: 40px;
    opacity: 1;
    transform: none;
  }
  .view-controls {
    display: none;
  }
  .selection-tray {
    width: calc(100% - 24px);
    bottom: 70px;
    padding: 9px 10px 9px 14px;
  }
  .selection-tray > div {
    margin-right: auto;
  }
  .selection-tray .outline {
    display: none;
  }
  .selection-tray .button {
    padding: 10px;
  }
  .lightbox {
    display: block;
    overflow: auto;
  }
  .lightbox-image-wrap {
    height: 66vh;
    padding: 35px 15px 15px;
  }
  .lightbox-image-wrap img {
    max-height: 100%;
    max-width: 100%;
  }
  .lightbox-info {
    border: 0;
    padding: 24px 22px 100px;
  }
  .lightbox-actions {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .lightbox-actions > * { min-width: 0; }
  .lightbox-share-callout { margin-top: 24px; }
  .lightbox-actions > * {
    flex: 1;
  }
  .section-head {
    display: block;
  }
  .section-head .button {
    margin-top: 20px;
  }
  .section-head h2 {
    font-size: 40px;
  }
  .reel-row,
  .job-row {
    padding: 13px;
    gap: 12px;
  }
  .reel-thumb {
    width: 58px;
  }
  .row-meta {
    font-size: 9px;
  }
  .modal-card {
    padding: 30px 22px;
  }
  .share-card {
    display: block;
    max-height: calc(100vh - 24px);
    overflow: auto;
    padding: 12px;
  }
  .share-preview { min-height: 0; aspect-ratio: 1.25; }
  .share-copy { padding: 24px 10px 12px; }
  .share-actions { display: grid; }
  .login-card h1 {
    font-size: 45px;
  }
  .bottom-nav {
    position: fixed;
    z-index: 9;
    bottom: 0;
    left: 0;
    right: 0;
    height: 63px;
    background: #fff;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-around;
  }
  .bottom-nav button {
    background: none;
    flex: 1;
    color: var(--muted);
    font-size: 10px;
    display: grid;
    place-content: center;
    gap: 3px;
  }
  .bottom-nav button span {
    font-size: 18px;
  }
  .bottom-nav button.active {
    color: var(--ink);
    font-weight: 700;
  }
  .filters-done {
    display: inline-block;
    margin-left: 12px;
    padding: 5px 10px;
    border-radius: 99px;
    background: var(--ink) !important;
    color: #fff !important;
  }
}

body:not(.is-admin) .view { padding-bottom: 48px; }
@media (max-width: 850px) {
  body:not(.is-admin) .filters.mobile-open { bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Public media switch, search feedback, video browser, and iframe presentation */
.media-type-switch {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ebeae5;
}
.media-type-switch button {
  min-height: 44px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  background: transparent;
  color: #69716c;
  font-size: 12px;
  font-weight: 750;
}
.media-type-switch button[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 5px 16px #1e232014;
}
.media-type-switch b {
  min-width: 27px;
  padding: 3px 6px;
  border-radius: 99px;
  background: #dfe1da;
  color: #69716c;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.media-type-switch button[aria-selected="true"] b { background: var(--lime); color: var(--ink); }
.media-icon { color: var(--accent); font-size: 17px; }
.media-icon.play { font-size: 11px; }
.search-working {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin: 0 0 14px;
  padding: 13px 15px 16px;
  overflow: hidden;
  border: 1px solid #d9d8f2;
  border-radius: 9px;
  background: #f0efff;
  color: #39348d;
}
.search-working strong,
.search-working div > span { display: block; }
.search-working strong { margin-bottom: 2px; font-size: 11px; }
.search-working div > span { color: #716cb2; font-size: 10px; }
.search-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #bdb9ea;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: search-spin .75s linear infinite;
}
.search-progress-track { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: #dbd9f4; }
.search-progress-track i { display: block; width: 38%; height: 100%; background: var(--accent); animation: search-scan 1.25s ease-in-out infinite; }
@keyframes search-spin { to { transform: rotate(360deg); } }
@keyframes search-scan { 0% { transform: translateX(-110%); } 100% { transform: translateX(365%); } }
.video-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 15px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #eef3e1;
  color: #4f5944;
}
.video-note > span { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; background: var(--lime); font-size: 10px; }
.video-note p { font-size: 10px; line-height: 1.45; }
.video-note strong { color: var(--ink); }
.media-loading { display: flex; min-height: 220px; align-items: center; justify-content: center; gap: 12px; }
.media-loading .search-spinner { flex: 0 0 auto; }
body.is-video-view .workspace { grid-template-columns: minmax(0, 1fr); }
body.is-video-view .filters { display: none !important; }
.video-card { aspect-ratio: 16 / 10; background: linear-gradient(145deg, #252b28, #48534b); }
.video-card video { width: 100%; height: 100%; object-fit: cover; }
.video-card::after { opacity: 1; background: linear-gradient(180deg, #0001 35%, #000b 100%); }
.video-play { position: absolute; z-index: 2; top: 50%; left: 50%; width: 48px; height: 48px; display: grid; place-items: center; transform: translate(-50%, -58%); border: 1px solid #ffffff70; border-radius: 50%; background: #151917b8; color: var(--lime); font-size: 13px; backdrop-filter: blur(8px); }
.video-card-copy { position: absolute; z-index: 2; right: 12px; bottom: 11px; left: 12px; display: grid; gap: 2px; color: #fff; }
.video-card-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.video-card-copy span { color: #d0d5d1; font-size: 8px; }
.lightbox-image-wrap video { max-width: 100%; max-height: calc(100vh - 90px); background: #000; }
body.is-embedded { background: var(--paper); }
body.is-embedded .shell { min-height: 0; }
body.is-embedded .sidebar,
body.is-embedded .topbar,
body.is-embedded .hero,
body.is-embedded .share-gallery { display: none !important; }
body.is-embedded .view { padding: 18px 18px 36px; }
body.is-embedded .archive-searchbar { top: 0; background: var(--paper); }
body.is-embedded .search-hints { margin-bottom: 18px; }
body.is-embedded .media-type-switch { margin-bottom: 12px; }
body.is-embedded .lightbox {
  position: absolute;
  top: var(--embed-lightbox-top, 0);
  right: auto;
  bottom: auto;
  left: 50%;
  width: min(1120px, calc(100% - 36px));
  height: 680px;
  overflow: hidden;
  transform: translateX(-50%);
  border: 1px solid #ffffff24;
  border-radius: 14px;
  box-shadow: 0 28px 80px #10151270;
}
body.is-embedded .lightbox-image-wrap img { max-height: 610px; }
body.is-embedded .lightbox-image-wrap {
  align-items: start;
  align-content: start;
  justify-items: center;
  padding: 22px 38px;
}
body.is-embedded .lightbox-info { overflow: auto; }
body.is-embedded .modal {
  position: absolute;
  top: var(--embed-modal-top, 0);
  right: 0;
  bottom: auto;
  left: 0;
  min-height: 680px;
}

@media (max-width: 850px) {
  .media-type-switch { display: flex; width: 100%; }
  .media-type-switch button { flex: 1; justify-content: center; }
  .search-working { margin-inline: 0; }
  .video-note { align-items: flex-start; }
  .lightbox-image-wrap video { max-height: 100%; max-width: 100%; }
  body.is-embedded .view { padding: 12px 12px 28px; }
  body.is-embedded .archive-searchbar { margin-inline: -12px; padding-inline: 12px; }
  body.is-embedded .bottom-nav { display: none !important; }
  body.is-embedded .lightbox { width: calc(100% - 24px); height: 640px; min-height: 0; }
  body.is-embedded .lightbox-image-wrap { height: 340px; padding: 30px 12px 12px; }
  body.is-embedded .lightbox-info { max-height: 300px; padding: 22px 20px 28px; overflow: auto; }
  body.is-embedded .modal { min-height: 620px; }
}

/* Prompt-first sizzle reel studio */
.reel-heading {
  align-items: center;
  margin-bottom: 22px;
}
.ai-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #c9cdf7;
  border-radius: 99px;
  background: #eeedff;
  color: #4841b8;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  white-space: nowrap;
}
.ai-source-badge i,
.status-pill.rendering i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px #5d55e81a;
}
.reel-studio {
  max-width: 1000px;
  padding: clamp(22px, 4vw, 42px);
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 25px 60px #1e23201c;
}
.studio-intro {
  max-width: 660px;
  margin-bottom: 25px;
}
.studio-step {
  color: var(--lime);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
}
.studio-intro h3 {
  margin: 10px 0 7px;
  font-family: Georgia, serif;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 400;
  letter-spacing: -.045em;
}
.studio-intro p {
  color: #aeb6ae;
  font-size: 12px;
}
.prompt-field {
  display: grid;
  gap: 9px;
}
.prompt-field > span,
.reel-options label > span,
.reel-optional label > span {
  color: #aeb6ae;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.prompt-field textarea {
  width: 100%;
  min-height: 122px;
  padding: 19px 20px;
  resize: vertical;
  border: 1px solid #566159;
  border-radius: 10px;
  outline: 0;
  background: #2a312d;
  color: #fff;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -.015em;
}
.prompt-field textarea::placeholder { color: #929b94; }
.prompt-field textarea:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 4px #d7f08118;
}
.prompt-suggestions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 11px;
  color: #8f9991;
  font-size: 9px;
}
.prompt-suggestions button {
  padding: 7px 10px;
  border: 1px solid #505a53;
  border-radius: 99px;
  background: transparent;
  color: #c9d0ca;
  font-size: 9px;
}
.prompt-suggestions button:hover { border-color: var(--lime); color: var(--lime); }
.reel-source {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 17px;
  padding: 13px 15px;
  border: 1px solid #485149;
  border-radius: 8px;
  background: #252b28;
}
.reel-source.selected-source { border-color: #8c9b58; background: #2c3327; }
.source-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
}
.reel-source strong { display: block; margin-bottom: 3px; font-size: 11px; }
.reel-source p { color: #9fa8a1; font-size: 10px; }
.reel-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.reel-options label,
.reel-optional label { display: grid; gap: 7px; }
.reel-options select,
.reel-optional input {
  width: 100%;
  min-width: 0;
  padding: 11px 10px;
  border: 1px solid #4d5750;
  border-radius: 6px;
  background: #303833;
  color: #fff;
  font-size: 11px;
}
.reel-optional {
  margin-top: 13px;
  color: #aeb6ae;
  font-size: 10px;
}
.reel-optional summary { cursor: pointer; width: max-content; }
.reel-optional label { max-width: 420px; margin-top: 10px; }
.studio-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 27px;
  padding-top: 20px;
  border-top: 1px solid #434c46;
}
.studio-action > div { display: grid; gap: 3px; }
.studio-action strong { font-size: 11px; }
.studio-action > div span { color: #8f9991; font-size: 9px; }
.generate-reel {
  min-width: 170px;
  min-height: 48px;
  background: var(--lime) !important;
  color: var(--ink) !important;
  font-size: 13px;
}
.generate-reel:hover { background: #e5f7a5 !important; }
.reel-progress {
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  background: #303833;
}
.progress-track { height: 3px; margin-bottom: 12px; overflow: hidden; border-radius: 4px; background: #465048; }
.progress-track span { display: block; width: 18%; height: 100%; background: var(--lime); transition: width .35s ease; }
.reel-progress[data-step="plan"] .progress-track span { width: 58%; }
.reel-progress[data-step="render"] .progress-track span { width: 92%; }
.reel-progress[data-step="error"] .progress-track span { width: 100%; background: #f3a69e; }
.reel-progress strong { display: block; margin-bottom: 4px; font-size: 11px; }
.reel-progress p { color: #9fa8a1; font-size: 10px; }
.reel-list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: 900px;
  margin: 48px 0 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}
.reel-list-heading h3 { margin-top: 5px; font-size: 22px; letter-spacing: -.045em; }
.reel-list-heading .button { padding: 8px 12px; }
.reel-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}
.reel-metadata span {
  padding: 6px 8px;
  border-radius: 5px;
  background: #f0f1ed;
  color: #5e6761;
  font-size: 9px;
  font-weight: 650;
}
.storyboard figcaption {
  right: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.storyboard figcaption small { font-size: 7px; opacity: .75; }
.status-pill.rendering {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eeedff;
  color: #4841b8;
}

@media (max-width: 850px) {
  .reel-heading { display: flex; align-items: flex-start; gap: 18px; }
  .reel-heading h2 { font-size: 38px; }
  .ai-source-badge { margin: 4px 0 0 auto; padding: 8px; font-size: 0; }
  .reel-studio { margin: 0 -8px; padding: 24px 17px; border-radius: 12px; }
  .prompt-field textarea { min-height: 145px; padding: 15px; font-size: 16px; }
  .prompt-suggestions { align-items: flex-start; }
  .prompt-suggestions > span { width: 100%; }
  .reel-options { grid-template-columns: 1fr 1fr; gap: 13px 8px; }
  .studio-action { align-items: stretch; flex-direction: column; }
  .generate-reel { width: 100%; }
  .reel-list-heading { margin-top: 37px; }
  .reel-list-heading .button { margin: 0; }
  .reel-metadata { margin-top: 12px; }
  .reel-card-head .button,
  .reel-card-head .status-pill { width: 100%; }
  .reel-card-foot { align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media (max-width: 420px) {
  .reel-heading { display: block; }
  .ai-source-badge { margin-top: 14px; font-size: 9px; }
  .reel-options { grid-template-columns: 1fr; }
  .reel-source { align-items: flex-start; }
  .storyboard { display: flex; overflow-x: auto; padding-bottom: 5px; scroll-snap-type: x mandatory; }
  .storyboard figure { min-width: 92px; scroll-snap-align: start; }
}

/* Archive discovery controls */
.archive-searchbar{position:sticky;top:0;z-index:5;display:flex;gap:10px;align-items:center;background:var(--paper);padding:0 0 12px;border-bottom:1px solid var(--line);margin-bottom:10px}
.search-prominent{height:48px;flex:1;margin:0;border-color:#c8cdc6;box-shadow:0 5px 18px #1e23200a}
.search-prominent input{font-size:14px}
.search-prominent kbd{font-size:10px;color:var(--muted);border:1px solid var(--line);border-radius:4px;padding:4px 6px;white-space:nowrap}
.archive-searchbar .button{height:48px;white-space:nowrap}
.filter-count{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:var(--accent);color:#fff;font-size:10px}
.active-filters{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 8px}.active-filters[hidden]{display:none}
.active-chip{border:1px solid #c9cdf7;background:#eeedff;color:#4841b8;border-radius:99px;padding:6px 9px;font-size:10px}.active-chip span{font-size:14px;margin-left:4px}
.search-hints{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0 0 30px;color:var(--muted);font-size:10px}.search-hints button{background:transparent;border:1px solid var(--line);border-radius:99px;padding:6px 9px;color:#5c655f;font-size:10px}.search-hints button:hover{border-color:var(--accent);color:var(--accent)}
.review-group{border:0;padding:0}.review-group legend{padding:0}
@media (max-width:850px){.archive-searchbar{top:0;margin:0 -18px 10px;padding:0 18px 10px}.search-prominent kbd{display:none}.archive-searchbar .button{padding:10px 11px}.search-hints{margin-bottom:24px}.filters.mobile-open{display:block!important;position:fixed;z-index:12;inset:62px 0 63px;padding:24px 20px;overflow:auto;background:var(--paper)}}

.reel-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 10px 28px #1e232009;
}
.reel-card-head,
.reel-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.reel-card-head h3 {
  margin: 7px 0 5px;
  font-size: 23px;
  letter-spacing: -0.045em;
}
.reel-card-head p,
.reel-card-foot,
.planning-note {
  color: var(--muted);
  font-size: 11px;
}
.storyboard {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
  margin: 20px 0;
}
.storyboard figure {
  position: relative;
  margin: 0;
  aspect-ratio: 0.72;
  overflow: hidden;
  border-radius: 4px;
  background: #e4e5e0;
}
.storyboard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.storyboard figcaption {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 3px 4px;
  border-radius: 3px;
  color: #fff;
  background: #1e2320cc;
  font-size: 8px;
}
.planning-note {
  margin: 20px 0;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: center;
}
.status-pill {
  background: var(--lime);
  border-radius: 99px;
  padding: 8px 11px;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.button[disabled] {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 850px) {
  .filters.mobile-open {
    display: block !important;
    position: fixed;
    z-index: 12;
    inset: 62px 0 63px;
    padding: 24px 20px;
    overflow: auto;
    background: var(--paper);
  }
  .reel-card {
    padding: 17px;
  }
  .reel-card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .storyboard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
