/* ============ Shorty — Kive-style dark UI ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0a;
  --panel: #161616;
  --panel-2: #1f1f1f;
  --border: #2a2a2a;
  --text: #f2f2f2;
  --muted: #8a8a8a;
  --accent: #EA3325;
  --accent-soft: rgba(234, 51, 37, .10);
  --accent-ink: #fff;
  --radius: 14px;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Inter", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

/* ============ Top nav ============ */
.topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(10,10,10,.85);
  backdrop-filter: blur(18px);
}
.logo { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 20px; letter-spacing: -.5px; }
.logo-mark { width: 30px; height: 30px; display: block; }
.nav-center { display: flex; gap: 4px; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-pill {
  padding: 9px 18px; border-radius: 999px; font-size: 15px; color: #cfcfcf;
  transition: background .15s, color .15s;
}
.nav-pill:hover { background: #1d1d1d; color: #fff; }
.nav-pill.active { background: #2a2a2a; color: #fff; }
.beta { background: #fff; color: #000; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; vertical-align: 2px; margin-left: 4px; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.icon-btn { font-size: 16px; opacity: .8; }
.upgrade-btn {
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px;
  padding: 9px 18px; border-radius: 999px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s, background .15s;
}
.upgrade-btn:hover { transform: translateY(-1px); background: #ff4033; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #333; display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.auth-trigger {
  background: #f3f3f3; color: #111; font-size: 14px; font-weight: 750;
  padding: 10px 18px; border-radius: 999px; transition: transform .15s, background .15s;
}
.auth-trigger:hover { transform: translateY(-1px); background: var(--accent); }
.auth-avatar { border: 0; }

@media (max-width: 1100px) {
  .nav-center { position: static; transform: none; }
  .topnav { gap: 10px; }
  .nav-pill { padding: 8px 12px; font-size: 14px; }
  .icon-btn { display: none; }
}
@media (max-width: 760px) {
  .topnav { padding: 11px 14px; }
  .nav-center { display: flex; }
  .nav-pill { padding: 8px 10px; font-size: 12.5px; }
  .upgrade-btn { padding: 8px 11px; font-size: 12px; }
  .icon-btn { display: none; }
  .auth-trigger { padding: 9px 12px; font-size: 12px; }
  .logo-word { display: none; }
}

/* ============ Bring-your-own-reference ============ */
body.reference-open { overflow: hidden; }
.reference-overlay {
  position: fixed; inset: 0; z-index: 190; display: grid; place-items: center;
  overflow-y: auto; padding: 18px; background: rgba(0,0,0,.78); backdrop-filter: blur(10px);
  animation: auth-fade .18s ease-out;
}
.reference-lab {
  width: min(880px, 100%);
  display: flex; flex-direction: column; gap: 26px;
  margin: auto; padding: clamp(30px, 4vw, 46px);
  overflow: hidden; position: relative; border: 1px solid #262626; border-radius: 30px;
  box-shadow: 0 30px 100px rgba(0,0,0,.72); animation: auth-rise .25s ease-out;
  background:
    radial-gradient(circle at 95% -10%, rgba(234,51,37,.24), transparent 36%),
    radial-gradient(circle at -5% 120%, rgba(91,75,255,.13), transparent 35%),
    #111;
}
.reference-lab::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px; mask-image: linear-gradient(to right, #000, transparent 70%);
}
.reference-lab-head, .reference-form { position: relative; z-index: 1; }
.lab-kicker {
  display: flex; align-items: center; gap: 9px; margin-bottom: 12px;
  color: #a7a7a7; font: 11px var(--mono); letter-spacing: 1.4px; text-transform: uppercase;
}
.lab-kicker span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(234,51,37,.12); }
.reference-lab-head h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -1px; line-height: 1.05; }
.reference-form {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; padding: 16px;
  border: 1px solid #303030; border-radius: 22px; background: rgba(8,8,8,.72);
  box-shadow: 0 26px 70px rgba(0,0,0,.36); backdrop-filter: blur(16px);
}
.reference-drop {
  min-height: 356px; position: relative; display: grid; place-items: center; overflow: hidden;
  border: 1.5px dashed #3b3b3b; border-radius: 15px; background: #151515; cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}
.reference-drop:hover, .reference-drop.drag { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.reference-drop video { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.reference-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 34%; z-index: 3; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, transparent, rgba(234,51,37,.16) 38%, rgba(255,126,108,.85) 50%, rgba(234,51,37,.16) 62%, transparent);
  mix-blend-mode: screen;
}
.reference-drop.scanning { border-color: var(--accent); }
.reference-drop.scanning .reference-scan { opacity: 1; animation: reference-scan-sweep 2.1s ease-in-out infinite; }
@keyframes reference-scan-sweep {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(295%); }
  100% { transform: translateY(-100%); }
}
.reference-drop::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent 38%);
}
.reference-drop-empty { display: flex; flex-direction: column; align-items: center; padding: 22px; text-align: center; }
.reference-drop-empty b { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 15px; background: #242424; color: var(--accent); font-size: 25px; }
.reference-drop-empty strong { color: #e9e9e9; font-size: 14px; }
.reference-drop-empty small { max-width: 135px; margin-top: 7px; color: #707070; font-size: 11px; line-height: 1.5; }
.reference-file-badge {
  position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 10px;
  overflow: hidden; padding: 8px 9px; border-radius: 8px; background: rgba(0,0,0,.72);
  color: #ddd; font: 9.5px var(--mono); text-overflow: ellipsis; white-space: nowrap; backdrop-filter: blur(7px);
}
.reference-controls { min-width: 0; display: flex; flex-direction: column; padding: 10px 4px 5px 0; }
.reference-controls > label { color: #bdbdbd; font-size: 12px; font-weight: 700; line-height: 1.35; }
.reference-controls textarea {
  width: 100%; min-height: 96px; resize: vertical; margin: 9px 0 12px; padding: 13px 14px;
  border: 1px solid #313131; border-radius: 12px; outline: none; background: #111; color: #eee;
  font: 13px/1.5 inherit; transition: border-color .15s, box-shadow .15s;
}
.reference-controls textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.reference-controls textarea::placeholder { color: #595959; }
.reference-analyze { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; border-radius: 12px; }
.reference-analyze i { font-style: normal; font-size: 19px; }
.reference-analyze:disabled { filter: grayscale(.4); }
.analysis-steps { margin-top: 18px; display: flex; flex-direction: column; gap: 9px; list-style: none; }
.analysis-steps li {
  display: flex; align-items: center; gap: 10px;
  color: #5c5c5c; font: 11.5px var(--mono); letter-spacing: .3px; transition: color .25s;
}
.analysis-steps li i {
  flex: none; width: 15px; height: 15px; border-radius: 50%; position: relative;
  border: 1.5px solid #3a3a3a; transition: border-color .25s, background .25s;
}
.analysis-steps li.active { color: #e9e9e9; }
.analysis-steps li.active i {
  border-color: #3a3a3a; border-top-color: var(--accent);
  animation: step-spin .7s linear infinite;
}
.analysis-steps li.done { color: #9a9a9a; }
.analysis-steps li.done i { border-color: var(--accent); background: var(--accent); }
.analysis-steps li.done i::after {
  content: ""; position: absolute; left: 4px; top: 1.5px; width: 4px; height: 7px;
  border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.analysis-steps li.failed { color: #ff8b82; }
.analysis-steps li.failed i { border-color: #ff8b82; animation: none; }
.analysis-steps li.failed i::after {
  content: "✕"; position: absolute; inset: 0; display: grid; place-items: center;
  color: #ff8b82; font-size: 8px;
}
@keyframes step-spin { to { transform: rotate(360deg); } }
.analysis-error { margin-top: 12px; color: #ff8b82; font-size: 11.5px; line-height: 1.5; }
@media (max-width: 640px) {
  .reference-overlay { padding: 10px; }
  .reference-lab { padding: 26px 18px; border-radius: 22px; }
  .reference-form { grid-template-columns: 1fr; padding: 12px; }
  .reference-drop { min-height: 310px; }
  .reference-controls { padding: 5px 1px 1px; }
}

/* ============ Pricing ============ */
.pricing-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 52% -20%, rgba(234, 51, 37, .10), transparent 37rem),
    #0a0a0a;
}

.pricing-nav {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 28px;
  background: transparent;
  backdrop-filter: none;
}

.pricing-app-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111;
  background: #f3f3f3;
  padding: 10px 17px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  transition: transform .15s, background .15s;
}

.pricing-app-link:hover { transform: translateY(-1px); background: #fff; }

.pricing-page {
  width: min(1124px, calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0 56px;
}

.pricing-hero { max-width: 690px; margin-bottom: 42px; }
.pricing-kicker {
  color: #ff5b4f;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 14px;
}
.pricing-hero h1 {
  color: #fff;
  font-size: clamp(42px, 6vw, 70px);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 800;
}
.pricing-hero > p:last-child {
  margin-top: 18px;
  color: #8f8f8f;
  font-size: 16px;
  line-height: 1.55;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.pricing-card {
  --card-accent: #efefef;
  position: relative;
  display: flex;
  min-height: 515px;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  background:
    linear-gradient(155deg, rgba(255,255,255,.055), transparent 48%),
    #171717;
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}

.pricing-card::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -125px;
  top: -150px;
  border-radius: 50%;
  background: var(--card-accent);
  opacity: .06;
  filter: blur(10px);
}

.pricing-card-creator {
  --card-accent: #ff4336;
  border-color: rgba(234, 51, 37, .40);
  background:
    linear-gradient(155deg, rgba(234, 51, 37, .18), rgba(234, 51, 37, .025) 58%),
    #181414;
}

.pricing-card-pro {
  --card-accent: #ff9c92;
  background:
    linear-gradient(155deg, rgba(139, 39, 32, .17), transparent 56%),
    #171515;
}

.plan-header { min-height: 86px; }
.plan-header h2 {
  position: relative;
  color: #fff;
  font-size: 25px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -.04em;
  font-weight: 850;
}
.plan-header p {
  margin-top: 10px;
  max-width: 29ch;
  color: #888;
  font-size: 13px;
  line-height: 1.45;
}

.plan-allowance {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-height: 92px;
  padding: 19px 18px;
  border: 1px solid rgba(255,255,255,.045);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
}
.plan-allowance strong {
  color: #fff;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -.05em;
}
.plan-allowance span {
  max-width: 110px;
  color: #aaa;
  font-size: 13px;
  line-height: 1.35;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 25px 2px 17px;
}
.plan-price strong {
  color: #fff;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -.05em;
}
.plan-price strong span { font-size: 21px; vertical-align: 8px; margin-right: 2px; }
.plan-price > span { color: #888; font-size: 12px; }

.plan-cta {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.plan-cta:hover { transform: translateY(-2px); }
.plan-cta-light { color: #111; background: #f4f4f4; }
.plan-cta-light:hover { background: #fff; box-shadow: 0 9px 25px rgba(0,0,0,.25); }
.plan-cta-red { color: #fff; background: var(--accent); }
.plan-cta-red:hover { background: #ff4033; box-shadow: 0 9px 28px rgba(234, 51, 37, .22); }

.plan-features {
  display: grid;
  gap: 11px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.075);
  list-style: none;
}
.plan-features li {
  position: relative;
  padding-left: 22px;
  color: #c3c3c3;
  font-size: 13px;
  line-height: 1.35;
}
.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #ff6257;
  font-weight: 850;
}

.pricing-note {
  margin-top: 23px;
  color: #696969;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 860px) {
  .pricing-page { padding-top: 54px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card { min-height: 0; }
  .plan-header { min-height: 0; margin-bottom: 22px; }
}

@media (max-width: 520px) {
  .pricing-nav { padding: 15px 18px; }
  .pricing-nav .logo-word { display: inline; }
  .pricing-app-link { padding: 9px 13px; font-size: 12px; }
  .pricing-page { width: min(100% - 28px, 1124px); padding: 42px 0 38px; }
  .pricing-hero { margin-bottom: 30px; }
  .pricing-hero h1 { font-size: 43px; }
  .pricing-hero > p:last-child { font-size: 14px; }
  .pricing-card { padding: 19px; border-radius: 18px; }
}

/* ============ Discovery hero ============ */
.discovery-hero {
  text-align: center;
  padding: 54px 28px 26px;
}
.hero-title {
  font-size: clamp(52px, 9vw, 118px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: .95;
  color: var(--accent);
  text-transform: uppercase;
}
.hero-sub {
  margin-top: 14px;
  font-size: 17px;
  color: var(--muted);
}
body.recreating .discovery-hero { display: none; }

/* ============ MCP page ============ */
.mcp-page { max-width: 880px; margin: 0 auto; padding: 60px 28px 90px; }
.mcp-page.hidden { display: none; }
.mcp-eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 2px; color: var(--accent); text-align: center;
}
.mcp-hero { text-align: center; }
.mcp-title {
  margin-top: 14px;
  font-size: clamp(40px, 6.5vw, 76px);
  font-weight: 900; letter-spacing: -1.5px; line-height: .98;
  text-transform: uppercase;
}
.mcp-sub { margin: 16px auto 0; max-width: 560px; font-size: 17px; color: var(--muted); line-height: 1.5; }

.mcp-setup {
  margin-top: 48px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 22px; padding: 26px;
}
.mcp-tabs { display: flex; gap: 8px; }
.mcp-tab {
  padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--muted); background: var(--panel-2);
}
.mcp-tab.active { background: #fff; color: #000; }
.mcp-agents { display: flex; gap: 8px; margin-top: 14px; }
.mcp-agent {
  padding: 7px 16px; border-radius: 999px; font-size: 13px;
  color: var(--muted); border: 1px solid var(--border);
}
.mcp-agent.active { color: #fff; border-color: #555; background: var(--panel-2); }

.mcp-steps { list-style: none; margin-top: 28px; display: grid; gap: 26px; }
.mcp-steps li { display: flex; gap: 18px; align-items: flex-start; }
.mcp-step-num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--panel-2);
  font-family: var(--mono); font-size: 14px; font-weight: 700;
}
.mcp-steps h3 { font-size: 17px; letter-spacing: -.2px; }
.mcp-steps p { margin-top: 5px; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.mcp-url {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 10px;
  background: #0e0e0e; border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 14px;
}
.mcp-url code { font-family: var(--mono); font-size: 13.5px; color: var(--accent); }
.mcp-url button { font-size: 15px; color: #bbb; }
.mcp-url button:hover { color: #fff; }

.mcp-toolkit { margin-top: 70px; }
.mcp-tools {
  margin-top: 24px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px;
}
.mcp-tool {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px;
}
.mcp-tool h3 { font-family: var(--mono); font-size: 13.5px; color: var(--accent); }
.mcp-tool p { margin-top: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.mcp-cta { margin-top: 80px; text-align: center; }
.mcp-cta h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -.8px; }
.mcp-cta p { margin: 12px auto 22px; max-width: 480px; color: var(--muted); font-size: 15.5px; line-height: 1.5; }

/* ============ Footer ============ */
.site-footer { margin-top: 80px; }
.footer-hero {
  background: var(--accent);
  color: #0a0a0a;
  padding: 70px 40px 44px;
}
.footer-hero h2 {
  font-size: clamp(30px, 4.6vw, 56px);
  font-weight: 800; letter-spacing: -1px; line-height: 1.08;
  text-transform: uppercase;
}
.footer-meta {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 30px; flex-wrap: wrap;
  margin-top: 90px;
}
.footer-contact a {
  color: #0a0a0a; font-size: 14.5px; font-weight: 600; text-decoration: none;
}
.footer-contact a:hover { text-decoration: underline; }
.footer-contact p { margin-top: 10px; font-size: 14.5px; line-height: 1.45; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a {
  color: #0a0a0a; font-size: 15px; font-weight: 600; text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
  padding: 22px 40px;
  font-size: 13px; color: var(--muted);
}
.footer-bottom nav { display: flex; gap: 24px; }
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }
body.recreating .site-footer { display: none; }

/* ============ Category bar ============ */
.catbar {
  display: flex; gap: 30px; align-items: center;
  padding: 18px 28px 12px; overflow-x: auto; scrollbar-width: none;
}
.catbar::-webkit-scrollbar { display: none; }
.cat {
  font-size: 24px; font-weight: 600; letter-spacing: -.5px;
  color: #6f6f6f; white-space: nowrap; padding-bottom: 4px;
  transition: color .15s;
}
.cat:hover { color: #bbb; }
.cat.active { color: #fff; text-decoration: underline; text-underline-offset: 8px; }

@media (max-width: 760px) {
  .catbar { gap: 22px; padding: 14px 14px 12px; }
  .cat { font-size: 19px; }
}

/* ============ Masonry grid ============ */
.grid-wrap { padding: 16px 16px 40px; }
.masonry {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-flow: row dense;
  grid-auto-rows: 1px;
  column-gap: 14px;
  align-items: start;
}
.card {
  position: relative; margin-bottom: 0;
  border-radius: 10px; overflow: hidden; cursor: pointer;
  background: var(--panel);
}
@media (max-width: 1360px) { .masonry { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .masonry { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .grid-wrap { padding-inline: 10px; }
  .masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
}
@media (max-width: 480px) { .masonry { grid-template-columns: 1fr; } }
.reference-card {
  min-height: 520px;
  border: 1px solid rgba(255, 99, 85, .5);
  border-radius: 20px;
  background: #1b0e0e;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .18),
    inset 0 0 60px rgba(234, 51, 37, .22),
    0 14px 42px rgba(0, 0, 0, .48);
  outline: none;
}
.reference-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 8% 105%, rgba(255, 66, 49, .94) 0%, rgba(212, 35, 25, .55) 29%, transparent 64%),
    radial-gradient(ellipse at 106% 70%, rgba(255, 78, 64, .56) 0%, rgba(112, 19, 24, .34) 37%, transparent 65%),
    radial-gradient(circle at 45% 30%, rgba(178, 28, 22, .3) 0%, transparent 52%),
    linear-gradient(145deg, #35100e 0%, #1b1012 48%, #260e12 100%);
}
.reference-visual::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(23, 4, 3, .02) 20%, rgba(25, 5, 5, .14) 47%, rgba(22, 4, 5, .88) 78%),
    linear-gradient(110deg, rgba(255, 80, 64, .3), transparent 58%);
  pointer-events: none;
}
.reference-visual::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 128%;
  height: 64%;
  left: -38%;
  bottom: -31%;
  border-radius: 50%;
  background: rgba(255, 60, 45, .68);
  filter: blur(72px);
  pointer-events: none;
}
.reference-image-frame {
  position: absolute;
  z-index: 1;
  width: 81%;
  height: 69%;
  top: -1%;
  right: -3%;
  overflow: hidden;
  border: 1px solid rgba(255, 145, 133, .48);
  border-radius: 22px;
  background: #b8c4d5;
  box-shadow:
    -14px 22px 50px rgba(28, 0, 0, .62),
    0 0 34px rgba(234, 51, 37, .2);
  transform: rotate(3.5deg);
  transition: transform .35s ease;
}
.reference-image-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 34%;
  filter: saturate(.9) contrast(1.04);
}
.reference-card:hover .reference-image-frame { transform: rotate(1.5deg) scale(1.025); }
.reference-card-copy {
  position: absolute;
  z-index: 3;
  left: 22px;
  right: 22px;
  bottom: 84px;
}
.reference-card-kicker {
  display: inline-flex;
  margin-bottom: 9px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(8, 8, 8, .46);
  color: #ff766b;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.reference-card h2 {
  max-width: 9ch;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: .92;
  text-transform: uppercase;
}
.reference-card h2 span { color: #ff493d; text-shadow: 0 0 28px rgba(234, 51, 37, .32); }
.reference-card-copy p {
  max-width: 28ch;
  margin-top: 10px;
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
  line-height: 1.42;
}
.create-reference-btn {
  position: absolute;
  z-index: 4;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f8f8f5 54%, #ededE8 100%);
  box-shadow:
    0 4px 0 #b9bfbe,
    0 11px 24px rgba(20, 2, 1, .4),
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(0, 0, 0, .06);
  color: #151515;
  font-size: 14px;
  font-weight: 850;
  transform: translateY(0);
  transition: transform .12s ease, background .15s ease, box-shadow .12s ease;
  will-change: transform, box-shadow;
}
.create-reference-btn span { color: var(--accent); font-size: 20px; }
.reference-card:hover .create-reference-btn {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #fff 0%, #fbfbf8 54%, #f1f1ed 100%);
  box-shadow:
    0 5px 0 #b9bfbe,
    0 13px 27px rgba(20, 2, 1, .43),
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(0, 0, 0, .05);
}
.create-reference-btn:active {
  transform: translateY(4px) !important;
  box-shadow:
    0 0 0 #b9bfbe,
    0 5px 10px rgba(20, 2, 1, .3),
    inset 0 1px 2px rgba(0, 0, 0, .08);
}
.card-media {
  width: 100%; display: block; position: relative; overflow: hidden;
}
.card-media .bg {
  position: absolute; inset: -12%;
  background-size: 200% 200%;
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: scale(1) translate(0,0); background-position: 0% 0%; }
  100% { transform: scale(1.12) translate(2%,3%); background-position: 100% 100%; }
}
.card-media .glyph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 64px; opacity: .9; text-shadow: 0 8px 40px rgba(0,0,0,.45);
}
.card-meta {
  position: absolute; left: 10px; bottom: 10px; right: 10px;
  display: flex; align-items: center; gap: 8px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .2s, transform .2s;
}
.card:hover .card-meta { opacity: 1; transform: none; }
.meta-chip {
  background: rgba(0,0,0,.72); backdrop-filter: blur(6px);
  border-radius: 8px; padding: 7px 10px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .8px;
  text-transform: uppercase; line-height: 1.5; color: #eee;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.meta-chip .sub { color: #9f9f9f; display: block; }
.card-hover {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.25); opacity: 0; transition: opacity .2s;
}
.card:hover .card-hover { opacity: 1; }
.recreate-btn {
  background: rgba(20,20,20,.85); backdrop-filter: blur(8px);
  color: #fff; font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  transition: transform .15s, background .15s;
}
.recreate-btn:hover { transform: scale(1.05); background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.dur-chip {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,.6); border-radius: 6px; padding: 3px 8px;
  font-family: var(--mono); font-size: 11px;
}

/* pill chip (used by the upload step's music button) */
.pb-chip {
  background: #2b2b2b; border-radius: 999px; padding: 9px 15px;
  font-size: 13.5px; color: #ddd;
}

/* ============ Recreate page ============ */
.recreate-page {
  position: relative;
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: 10px 16px 80px;
}
.recreate-page.hidden { display: none; }
body.recreating .grid-wrap,
body.recreating .catbar,
body.recreating .discovery-hero { display: none; }
.sheet-close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%;
  background: #262626; color: #ccc; font-size: 14px;
}
.sheet-body { padding: 30px 34px 34px; }

/* --- shared sheet layout --- */
.sheet-grid { display: grid; grid-template-columns: 300px 1fr; gap: 30px; }
@media (max-width: 800px) { .sheet-grid { grid-template-columns: 1fr; } }
.ref-preview {
  aspect-ratio: 9/16; border-radius: 14px; overflow: hidden; position: relative;
}
.ref-preview .bg { position: absolute; inset: -12%; background-size: 200% 200%; animation: drift 14s ease-in-out infinite alternate; }
.ref-preview .glyph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 84px; }
.ref-preview-video { width: 100%; height: 100%; object-fit: cover; background: #111; }
.ref-preview .meta-chip { position: absolute; left: 12px; right: 12px; bottom: 12px; }
.sheet-body h2 { font-size: 26px; letter-spacing: -.5px; margin-bottom: 6px; }
.sheet-body .sub-line { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }
.steps-indicator { display: flex; gap: 8px; margin-bottom: 22px; }
.step-dot {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; background: #222; color: #777;
}
.step-dot.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.step-dot.done { background: #321614; color: #ff8b82; }

/* style spec */
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spec-item {
  background: #1c1c1c; border: 1px solid #2a2a2a; border-radius: 12px; padding: 14px;
}
.spec-item .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: #7c7c7c; margin-bottom: 6px; }
.spec-item .v { font-size: 14.5px; line-height: 1.45; }
.spec-item .v em { color: var(--accent); font-style: normal; }
.spec-captions { padding-bottom: 12px; }
.caption-preview {
  position: relative; height: 82px; overflow: hidden; border-radius: 9px;
  display: flex; align-items: flex-end; justify-content: center;
  background:
    linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.58)),
    var(--caption-bg);
  isolation: isolate;
}
.caption-preview::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 68% 28%, rgba(255,255,255,.16), transparent 28%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.055) 3px 4px);
}
.caption-demo-line {
  width: 100%; min-height: 48px; padding: 8px 10px 13px;
  display: flex; align-items: flex-end; justify-content: center; gap: 5px;
  text-align: center;
}
.caption-demo-word {
  display: inline-block; color: #fff; font-size: 15px; line-height: 1;
  font-weight: 900; letter-spacing: .25px; text-transform: uppercase;
  text-shadow: 0 2px 7px rgba(0,0,0,.9);
}
.caption-style-karaoke .caption-demo-word,
.caption-style-rounded .caption-demo-word,
.caption-style-impact .caption-demo-word,
.caption-style-lyric .caption-demo-word {
  animation: captionWordPop 2.2s ease-in-out infinite;
  animation-delay: calc(var(--word-index) * .55s);
}
@keyframes captionWordPop {
  0%, 20% { color: #ff3b30; transform: translateY(-2px) scale(1.15) rotate(-1deg); }
  27%, 100% { color: #fff; transform: none; }
}
.caption-style-rounded .caption-demo-word {
  font-family: "Arial Rounded MT Bold", -apple-system, sans-serif;
  letter-spacing: -.3px;
  text-shadow: 0 3px 0 rgba(0,0,0,.7), 0 5px 12px rgba(0,0,0,.8);
}
.caption-style-label .caption-demo-line { align-items: center; padding-bottom: 12px; }
.caption-style-label .caption-demo-word {
  padding: 5px 8px; border: 1px solid rgba(255,255,255,.7); border-radius: 3px;
  font-size: 10px; letter-spacing: 2px; animation: captionSoftFade 2.6s ease-in-out infinite;
}
@keyframes captionSoftFade { 0%, 100% { opacity: .35; } 35%, 72% { opacity: 1; } }
.caption-style-impact .caption-demo-word {
  font-family: Impact, Haettenschweiler, sans-serif; font-size: 17px;
  letter-spacing: .8px; transform: scaleX(.86);
}
.caption-style-mono .caption-demo-line { justify-content: flex-start; padding: 8px 10px 10px; }
.caption-style-mono .caption-demo-word {
  font: 700 10px var(--mono); letter-spacing: .4px; text-transform: lowercase;
  padding: 4px 0; color: #f4f4f4;
}
.caption-style-handwritten .caption-demo-word,
.caption-style-poetic .caption-demo-word {
  font-family: "Bradley Hand", "Comic Sans MS", cursive; font-size: 18px;
  font-weight: 500; text-transform: lowercase; letter-spacing: .2px;
  animation: captionSoftFade 3s ease-in-out infinite;
}
.caption-style-recipe .caption-demo-word {
  padding: 5px 6px; border-radius: 5px; background: rgba(0,0,0,.64);
  font-size: 11px;
}
.caption-style-recipe .caption-demo-word:first-child {
  width: 25px; height: 25px; padding: 7px 0 0; border-radius: 50%; background: #ff3b30;
}
.caption-style-lyric .caption-demo-word { text-shadow: 0 0 9px #ec4899, 0 2px 7px #000; }
.caption-style-one-word .caption-demo-line,
.caption-style-countdown .caption-demo-line { display: grid; place-items: center; padding-bottom: 10px; }
.caption-style-one-word .caption-demo-word,
.caption-style-countdown .caption-demo-word {
  grid-area: 1 / 1; opacity: 0; font-size: 23px;
  animation: captionOneWord 2.8s ease-in-out infinite;
  animation-delay: calc(var(--word-index) * .7s);
}
@keyframes captionOneWord {
  0%, 20% { opacity: 1; transform: scale(1.08); }
  26%, 100% { opacity: 0; transform: scale(.88); }
}
.caption-style-stamp .caption-demo-line { align-items: center; }
.caption-style-stamp .caption-demo-word {
  padding: 6px 10px; border: 3px solid #ff3b30; color: #ff554b;
  font-size: 17px; letter-spacing: 2px; transform: rotate(-7deg);
  animation: captionStamp .9s steps(2) infinite;
}
@keyframes captionStamp { 50% { transform: rotate(-4deg) scale(1.08); } }
.caption-style-tag .caption-demo-word {
  padding: 5px 7px; border-radius: 999px; background: rgba(255,255,255,.88);
  color: #171717; font-size: 9px; text-shadow: none;
  animation: captionSoftFade 2.4s ease-in-out infinite;
}
.caption-style-countdown .caption-demo-word { font-size: 29px; color: #fff; }
.caption-style-countdown .caption-demo-word:last-child { color: #ff3b30; }
.caption-style-list .caption-demo-line { gap: 4px; }
.caption-style-list .caption-demo-word { font-size: 12px; }
.caption-style-list .caption-demo-word:first-child {
  width: 23px; height: 23px; padding-top: 6px; margin-right: 2px;
  border-radius: 50%; background: #ff3b30;
}
.caption-style-meme { align-items: flex-start; }
.caption-style-meme .caption-demo-line { align-items: flex-start; padding-top: 11px; }
.caption-style-meme .caption-demo-word {
  font-family: Impact, Haettenschweiler, sans-serif; font-size: 16px; letter-spacing: .6px;
  -webkit-text-stroke: 1px #000; paint-order: stroke fill;
}
.caption-style-none { align-items: center; }
.caption-none-mark {
  color: rgba(255,255,255,.55); font: 700 9px var(--mono);
  letter-spacing: 2px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
}
.spec-grade { padding-bottom: 12px; }
.grade-preview {
  height: 82px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden; border-radius: 9px; border: 1px solid rgba(255,255,255,.08);
}
.grade-swatch {
  position: relative; min-width: 0; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 9px 8px; background: var(--swatch); color: #fff;
}
.grade-swatch::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,.64));
}
.grade-swatch span, .grade-swatch b { position: relative; z-index: 1; }
.grade-swatch span {
  overflow: hidden; color: rgba(255,255,255,.72); font: 7.5px var(--mono);
  letter-spacing: .65px; text-overflow: ellipsis; text-transform: uppercase;
}
.grade-swatch b {
  margin-top: 3px; font: 700 9px var(--mono); letter-spacing: .2px;
  text-shadow: 0 1px 4px rgba(0,0,0,.65);
}
@media (prefers-reduced-motion: reduce) {
  .caption-preview * { animation: none !important; }
  .caption-style-one-word .caption-demo-word,
  .caption-style-countdown .caption-demo-word { opacity: 0; }
  .caption-style-one-word .caption-demo-word:first-child,
  .caption-style-countdown .caption-demo-word:first-child { opacity: 1; }
}
.structure-bar { display: flex; gap: 6px; margin-top: 14px; }
.structure-seg {
  flex: 1; border-radius: 8px; padding: 10px 8px; text-align: center;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase;
  background: #222; color: #aaa;
}
.structure-seg b { display: block; color: #fff; font-size: 12px; margin-bottom: 2px; }
.cta-row { display: flex; gap: 10px; margin-top: 24px; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15.5px;
  padding: 14px 26px; border-radius: 999px;
}
.btn-primary:disabled { opacity: .35; cursor: not-allowed; }
.btn-ghost {
  background: #242424; color: #ddd; font-size: 15.5px;
  padding: 14px 26px; border-radius: 999px;
}

/* upload */
.dropzone {
  border: 2px dashed #3a3a3a; border-radius: 16px;
  padding: 44px 20px; text-align: center; color: #9a9a9a;
  transition: border-color .15s, background .15s; cursor: pointer;
}
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .big { font-size: 34px; margin-bottom: 10px; }
.dropzone b { color: #fff; }
.file-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.file-thumb {
  width: 92px; height: 128px; border-radius: 10px; overflow: hidden;
  background: #222; position: relative; border: 1px solid #333;
}
.file-thumb video { width: 100%; height: 100%; object-fit: cover; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.remove-file, .remove-footage {
  position: absolute; top: 7px; right: 7px; z-index: 2;
  width: 27px; height: 27px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(0,0,0,.72); color: #fff; font-size: 11px;
}
.file-thumb .name {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-family: var(--mono); font-size: 8.5px; padding: 4px 5px;
  background: rgba(0,0,0,.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.music-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.music-row label { font-size: 14px; color: #bbb; }

/* footage library */
.footage-page {
  min-height: calc(100vh - 62px); display: grid; grid-template-columns: 248px minmax(0, 1fr);
  border-top: 1px solid #202020; background: #0d0f10;
}
.footage-sidebar {
  position: sticky; top: 62px; align-self: start; height: calc(100vh - 62px); overflow-y: auto;
  padding: 28px 18px; border-right: 1px solid #242627; background: #111314;
}
.footage-search {
  height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 12px;
  border: 1px solid #282a2b; border-radius: 11px; background: #1a1c1d; color: #777;
}
.footage-search:focus-within { border-color: #4a4d4e; }
.footage-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: #eee; font-size: 13px; }
.footage-search input::placeholder { color: #747778; }
.asset-nav { margin-top: 20px; }
.asset-nav-item {
  width: 100%; min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 11px;
  border-radius: 9px; color: #858889; font-size: 13px; text-align: left; transition: background .15s, color .15s;
}
.asset-nav-item:hover { background: #191b1c; color: #d8dada; }
.asset-nav-item.active { background: #242627; color: #f6f6f6; font-weight: 700; }
.asset-nav-item > span { width: 16px; color: #9a9d9e; text-align: center; }
.asset-nav-item b { min-width: 25px; margin-left: auto; padding: 3px 7px; border-radius: 7px; background: #1d1f20; color: #8d9091; font: 10px var(--mono); text-align: center; }
.asset-nav-item.active b { background: #17191a; color: #d5d7d8; }
.asset-sidebar-section { margin-top: 30px; }
.asset-sidebar-section > p, .asset-section-title p { margin: 0 0 9px 6px; color: #66696a; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.asset-section-title { display: flex; align-items: center; justify-content: space-between; }
.asset-section-title button { width: 26px; height: 26px; color: #858889; font-size: 18px; }
.folder-item > span { color: #ff7469; }
.footage-content { min-width: 0; padding: 38px 38px 100px; }
.footage-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.footage-head .eyebrow { color: var(--accent); font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 7px; }
.footage-head h1 { font-size: clamp(34px, 4vw, 52px); letter-spacing: -2.5px; line-height: .95; }
.footage-head-actions { display: flex; align-items: center; gap: 12px; }
.footage-size { height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid #292c2d; border-radius: 11px; background: #17191a; color: #8e9192; }
.footage-size input { width: 104px; accent-color: var(--accent); }
.library-dropzone {
  min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1.5px dashed #343738; border-radius: 18px; background: #121415; color: #777;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s, min-height .2s;
}
.library-dropzone:hover, .library-dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.library-dropzone.compact { display: none; }
.library-dropzone .big { color: var(--accent); font-size: 34px; }
.library-dropzone h2 { color: #eee; font-size: 20px; margin: 8px 0; }
.footage-toolbar { display: flex; justify-content: space-between; padding: 0 2px 18px; color: #777; font-family: var(--mono); font-size: 11px; }
.footage-toolbar button { color: #ff8585; }
.footage-groups { --thumb-size: 220px; }
.footage-date-group { margin-bottom: 34px; padding: 22px; border: 1px solid #202324; border-radius: 18px; background: #111314; }
.footage-date-head { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.footage-date-head input, .footage-select { width: 18px; height: 18px; accent-color: var(--accent); }
.footage-date-head h2 { font-size: 17px; letter-spacing: -.2px; }
.footage-date-head span { margin-left: auto; color: #66696a; font: 10px var(--mono); }
.footage-empty { padding: 70px 20px; border: 1px dashed #2f3233; border-radius: 16px; color: #747778; text-align: center; }
.footage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--thumb-size)), 1fr)); gap: 14px; }
.footage-card { position: relative; overflow: hidden; border: 1px solid #292c2d; border-radius: 14px; background: #17191a; transition: border-color .15s, transform .15s; }
.footage-card:hover { border-color: #4a4d4e; transform: translateY(-2px); }
.footage-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.footage-card video, .footage-card img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #050505; }
.footage-select { position: absolute; z-index: 3; top: 10px; left: 10px; }
.footage-type { position: absolute; z-index: 2; left: 10px; bottom: 49px; padding: 4px 7px; border-radius: 6px; background: rgba(0,0,0,.7); color: #ddd; font: 9px var(--mono); text-transform: uppercase; }
.footage-card .remove-footage { opacity: 0; transition: opacity .15s; }
.footage-card:hover .remove-footage { opacity: 1; }
.footage-meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 13px; }
.footage-meta strong { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.footage-meta span { color: #777; flex-shrink: 0; font-family: var(--mono); font-size: 10px; }
.footage-next { position: sticky; bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 28px; padding: 14px 16px 14px 22px; border: 1px solid #343434; border-radius: 18px; background: rgba(24,24,24,.9); backdrop-filter: blur(16px); }
.footage-next span { color: #aaa; }
@media (max-width: 850px) {
  .footage-page { grid-template-columns: 205px minmax(0, 1fr); }
  .footage-content { padding: 30px 24px 90px; }
  .footage-size { display: none; }
}
@media (max-width: 650px) {
  .footage-page { display: block; }
  .footage-sidebar { position: static; width: 100%; height: auto; padding: 18px; border-right: 0; border-bottom: 1px solid #242627; }
  .asset-nav, .asset-sidebar-section { margin-top: 12px; }
  .footage-folders { display: none; }
  .footage-content { padding: 26px 16px 80px; }
  .footage-head { align-items: flex-start; }
  .footage-head h1 { letter-spacing: -2px; }
  .footage-head .eyebrow { display: none; }
  .footage-head-actions .btn-primary { padding: 11px 15px; font-size: 13px; }
  .footage-date-group { padding: 16px; }
  .footage-next { align-items: stretch; flex-direction: column; }
}

/* pipeline */
.pipeline { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.pipe-step { display: flex; gap: 14px; align-items: flex-start; }
.pipe-rail { display: flex; flex-direction: column; align-items: center; }
.pipe-dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: #222; color: #666; font-size: 13px; flex-shrink: 0;
}
.pipe-line { width: 2px; flex: 1; min-height: 26px; background: #2a2a2a; }
.pipe-step.running .pipe-dot { background: var(--accent); color: var(--accent-ink); animation: pulse 1.2s ease-in-out infinite; }
.pipe-step.done .pipe-dot { background: #321614; color: #ff8b82; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(234,51,37,.16); } }
.pipe-text { padding-bottom: 22px; }
.pipe-text .t { font-size: 15.5px; font-weight: 600; color: #888; }
.pipe-step.running .pipe-text .t, .pipe-step.done .pipe-text .t { color: #fff; }
.pipe-text .log {
  font-family: var(--mono); font-size: 11.5px; color: #7a7a7a; margin-top: 5px; line-height: 1.7;
  white-space: pre-line;
}
.missing-note {
  margin-top: 6px; background: #241f0e; border: 1px solid #4a4013;
  border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #e8d98a;
}
.missing-note b { color: var(--accent); }
.milestone-kicker { margin-bottom: 10px; color: var(--accent); font: 10px var(--mono); letter-spacing: 1.4px; }
.milestone-pipeline { margin-top: 24px; }
.pipe-step.ready .pipe-dot { background: var(--accent); color: white; box-shadow: 0 0 0 6px rgba(234,51,37,.12); }
.pipe-step.ready .pipe-text .t { color: #fff; }
.milestone-note {
  margin-top: 4px; padding: 13px 14px; border: 1px solid #333; border-radius: 11px;
  background: #191919; color: #909090; font-size: 12px; line-height: 1.55;
}
.sheet-body code { color: #ddd; font: 11px var(--mono); }

/* ============ Program monitor (frames jump while editing) ============ */
.monitor { background: #000; }
.monitor video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: filter .25s, transform .12s;
}
.mon-flash {
  position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none;
}
.mon-flash.on { animation: cutFlash .18s ease-out; }
@keyframes cutFlash { 0% { opacity: .35; } 100% { opacity: 0; } }
.mon-scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.08) 3px 4px);
}
.mon-badge {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px;
  color: #ff3b30; background: rgba(0,0,0,.65); border-radius: 6px; padding: 4px 8px;
  animation: recBlink 1.1s steps(2) infinite;
}
@keyframes recBlink { 50% { opacity: .45; } }
.mon-clipname {
  position: absolute; top: 12px; right: 12px; max-width: 55%;
  font-family: var(--mono); font-size: 9.5px; color: #ccc;
  background: rgba(0,0,0,.65); border-radius: 6px; padding: 4px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============ Fake editor timeline ============ */
.editor-tl {
  margin-top: 26px; border: 1px solid #2b2b2b; border-radius: 14px;
  background: #111; overflow: hidden;
  font-family: var(--mono);
}
.tl-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; background: #181818; border-bottom: 1px solid #262626;
}
.tl-tools { display: flex; gap: 14px; align-items: center; color: #777; font-size: 13px; }
.tl-tools .hot { color: var(--accent); }
.tl-zoombar {
  width: 70px; height: 3px; background: #333; border-radius: 2px; display: inline-block; position: relative;
}
.tl-zoombar i { position: absolute; left: 0; top: 0; bottom: 0; width: 40%; background: #888; border-radius: 2px; transition: width .3s; }
.tl-tc { font-size: 13px; letter-spacing: 1.5px; color: var(--accent); }
.tl-body { position: relative; padding-bottom: 8px; }
.tl-ruler {
  position: relative; height: 20px; margin-left: 52px;
  background: repeating-linear-gradient(90deg, #333 0 1px, transparent 1px 6.6%);
  border-bottom: 1px solid #222;
}
.tl-tick { position: absolute; top: 3px; font-size: 9px; color: #666; padding-left: 4px; }
.tl-track { display: flex; align-items: stretch; height: 30px; margin-top: 5px; }
.tl-label {
  width: 52px; flex-shrink: 0; display: grid; place-items: center;
  font-size: 10px; color: #666; border-right: 1px solid #222;
}
.tl-lane { position: relative; flex: 1; background: #171717; border-radius: 4px; overflow: hidden; }
.tl-clip {
  position: absolute; top: 3px; bottom: 3px; border-radius: 4px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 80%, #fff 10%), var(--c));
  border: 1px solid rgba(255,255,255,.25);
  font-size: 8.5px; color: rgba(0,0,0,.75); font-weight: 700;
  padding: 2px 4px; overflow: hidden; white-space: nowrap;
  transform-origin: left center; animation: clipIn .16s ease;
}
@keyframes clipIn { from { transform: scaleX(.1); opacity: 0; } }
.tl-clip.selected { outline: 2px solid #fff; animation: selBlink .25s steps(2) 2; }
@keyframes selBlink { 50% { outline-color: transparent; } }
.tl-clip.cutting::after {
  content: ""; position: absolute; top: -2px; bottom: -2px; left: 50%;
  width: 2px; background: #fff; animation: selBlink .2s steps(2) infinite;
}
.tl-cap { color: #111; }
.tl-broll { filter: saturate(.6); }
.tl-wave {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(0,0,0,.25) 6px 9px),
    linear-gradient(180deg, transparent 0 25%, var(--c) 25% 75%, transparent 75%),
    color-mix(in srgb, var(--c) 40%, #111);
}
.tl-playhead {
  position: absolute; top: 0; bottom: 0; left: 52px; width: 1.5px;
  background: #ff3b30; z-index: 5; pointer-events: none;
}
.tl-ph-head {
  position: absolute; top: 0; left: -5px;
  border: 6px solid transparent; border-top: 8px solid #ff3b30;
}

/* output */
.out-player {
  aspect-ratio: 9/16; border-radius: 16px; overflow: hidden; position: relative;
  background: #000; border: 1px solid #2e2e2e;
}
.out-player video, .out-player .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.captions {
  position: absolute; left: 0; right: 0; bottom: 18%;
  text-align: center; pointer-events: none;
}
.captions .word {
  display: inline-block; font-weight: 900; font-size: 26px; margin: 0 3px;
  color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.8);
  text-transform: uppercase; letter-spacing: .5px;
}
.captions .word.hot { color: var(--accent); transform: scale(1.18) rotate(-2deg); }
.out-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.7); border-radius: 8px; padding: 5px 10px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1px; color: #ff8b82;
}
.revision-box { margin-top: 18px; display: flex; gap: 8px; }
.revision-box input {
  flex: 1; background: #202020; border: 1px solid #303030; border-radius: 999px;
  padding: 13px 18px; color: var(--text); font-size: 14.5px; outline: none;
}
.revision-box button { flex-shrink: 0; }
.render-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.render-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #1c1c1c; border: 1px solid #2a2a2a; border-radius: 10px; padding: 11px 14px;
  font-family: var(--mono); font-size: 12.5px; color: #ccc;
}
.render-item .dl { color: var(--accent); cursor: pointer; }

/* empty grid msg */
.empty-msg { color: #666; padding: 60px; text-align: center; font-size: 15px; }

/* ============ Auth modal ============ */
body.auth-open { overflow: hidden; }
.hidden { display: none !important; }
.auth-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  padding: 18px; background: rgba(0,0,0,.78); backdrop-filter: blur(10px);
  animation: auth-fade .18s ease-out;
}
@keyframes auth-fade { from { opacity: 0; } }
.auth-modal {
  position: relative; width: min(1180px, 100%); min-height: 680px;
  display: grid; grid-template-columns: 1.03fr 1fr; overflow: hidden;
  background: #121415; border: 1px solid #292c2d; border-radius: 30px;
  box-shadow: 0 30px 100px rgba(0,0,0,.72); animation: auth-rise .25s ease-out;
}
@keyframes auth-rise { from { transform: translateY(14px) scale(.985); opacity: .6; } }
.auth-close {
  position: absolute; top: 24px; right: 24px; z-index: 3; width: 42px; height: 42px;
  border-radius: 50%; background: #202324; border: 1px solid #303334; color: #fff; font-size: 17px;
}
.auth-showcase {
  position: relative; overflow: hidden; margin: 10px; border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(5,6,7,.02) 42%, rgba(5,6,7,.28) 63%, rgba(5,6,7,.94) 100%),
    url("assets/login-hero-editorial-v2.jpg") center 42% / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.auth-showcase::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 88% 28%, rgba(234,51,37,.14), transparent 34%);
}
.showcase-copy { position: absolute; z-index: 2; left: 30px; right: 30px; bottom: 28px; color: white; text-shadow: 0 2px 22px rgba(0,0,0,.72); }
.showcase-copy h2 { font-size: 38px; line-height: .95; letter-spacing: -2px; margin: 16px 0 10px; }
.showcase-copy p { font-size: 14px; max-width: 390px; opacity: .82; }
.showcase-chips { display: flex; gap: 7px; }
.showcase-chips span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: rgba(10,10,10,.58); backdrop-filter: blur(12px); font-size: 12px; font-weight: 650; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 72px 76px 36px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 17px; font-weight: 800; margin-bottom: 34px; }
.auth-brand img { width: 33px; height: 33px; }
.auth-panel h1 { text-align: center; font-size: 39px; letter-spacing: -1.7px; margin-bottom: 9px; }
.auth-subtitle { color: #909293; text-align: center; font-size: 16px; margin-bottom: 38px; }
.auth-google, .magic-form button {
  width: 100%; min-height: 58px; border: 1px solid #343738; border-radius: 14px;
  background: #151718; color: #fff; font-size: 16px; font-weight: 700; transition: border-color .15s, background .15s;
}
.auth-google { display: flex; align-items: center; justify-content: center; gap: 12px; }
.auth-google svg { width: 23px; height: 23px; }
.auth-google:hover { border-color: #646768; background: #1b1e1f; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; color: #747778; font-size: 11px; font-weight: 750; letter-spacing: 1.5px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #303334; }
.magic-form label { display: block; color: #b6b8b9; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.magic-form input { width: 100%; height: 54px; border: 1px solid #343738; border-radius: 13px; padding: 0 16px; background: #0f1112; color: #fff; outline: none; font-size: 16px; margin-bottom: 12px; }
.magic-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.magic-form button { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.auth-google:disabled, .magic-form button:disabled { opacity: .55; cursor: wait; }
.auth-message { min-height: 20px; color: #ff8b82; text-align: center; font-size: 13px; margin-top: 13px; }
.auth-message.error { color: #ff7f7f; }
.auth-terms { margin-top: auto; padding-top: 30px; text-align: center; color: #67696a; font-size: 11.5px; line-height: 1.55; }
.auth-terms a { color: #929495; }
.auth-success { text-align: center; }
.auth-success .mail-icon { margin: 0 auto 24px; width: 65px; height: 65px; display: grid; place-items: center; border-radius: 20px; background: var(--accent); color: var(--accent-ink); font-size: 27px; font-weight: 900; }
.auth-success p { color: #8f9293; line-height: 1.6; margin: 14px 0 28px; }
.auth-success strong { color: #fff; }
.auth-success button { color: var(--accent); font-weight: 700; }
@media (max-width: 850px) {
  .auth-modal { grid-template-columns: 1fr; min-height: 0; max-width: 560px; }
  .auth-showcase { display: none; }
  .auth-panel { min-height: 650px; padding: 70px 40px 28px; }
}
@media (max-width: 520px) {
  .auth-overlay { padding: 0; }
  .auth-modal { min-height: 100dvh; border-radius: 0; border: 0; }
  .auth-panel { padding: 68px 24px 24px; }
  .auth-panel h1 { font-size: 32px; }
  .auth-close { top: 16px; right: 16px; }
}
