/* =========================================================================
   Magic Studio. Atelier design system
   Editorial-luxury content studio for an AI creator agency.
   Dark, warm, gold-on-near-black. No build step.
   ========================================================================= */

:root {
  /* Surfaces: warm near-black, layered */
  --bg: #0a0a0c;
  --bg-2: #0f0f12;
  --surface: #141417;
  --surface-2: #1a1a1f;
  --surface-3: #212127;
  --raised: #2a2a31;

  /* Hairlines */
  --line: rgba(247, 248, 251, 0.08);
  --line-2: rgba(247, 248, 251, 0.14);
  --line-gold: rgba(255, 45, 142, 0.30);

  /* Ink */
  --cream: #f7f8fb;
  --text: #e8e9f0;
  --muted: #a4a6b2;   /* AA ~7.6:1 on cards */
  --faint: #8b8d99;   /* AA ~5.6:1 on cards, ~4.5:1 on raised */

  /* Signature gold */
  --gold: #ff2d8e;
  --gold-soft: #ff66ac;
  --gold-deep: #d4116b;
  --gold-glow: rgba(255, 45, 142, 0.22);

  /* Glam + semantics */
  --rose: #e892a0;
  --green: #84d6a4;
  --amber: #f0c14b;
  --red: #e8796b;
  --blue: #8fb6e0;

  /* Radius */
  --r-xs: 8px;
  --r-sm: 11px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  /* Type */
  --display: "Bricolage Grotesque", "Hanken Grotesk", sans-serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.30);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.65);
  --shadow-gold: 0 18px 40px -16px rgba(255, 45, 142, 0.28);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --rail: 264px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 86% -12%, rgba(255, 45, 142, 0.12), transparent 58%),
    radial-gradient(900px 720px at -8% 112%, rgba(232, 146, 160, 0.06), transparent 55%),
    radial-gradient(700px 500px at 50% 50%, rgba(255, 255, 255, 0.012), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Film grain atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(255, 45, 142, 0.28); color: var(--cream); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(247, 248, 251, 0.10);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(247, 248, 251, 0.2); background-clip: padding-box; }

button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; background: none; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; }

/* =========================================================================
   App shell
   ========================================================================= */
.app {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---- Sidebar -------------------------------------------------------- */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 17, 11, 0.72), rgba(11, 10, 8, 0.5));
  backdrop-filter: blur(8px);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 4px;
  margin-bottom: 22px;
}
.sigil {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--gold-soft), var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 8px 22px -6px var(--gold-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  flex: none;
}
.sigil svg { width: 21px; height: 21px; display: block; }
.brand .wordmark { display: block; font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--cream); line-height: 1; }
.brand .tagline { display: block; margin-top: 4px; font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--faint); }

.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.workspace:hover { border-color: var(--line-2); background: rgba(255, 255, 255, 0.045); }
.workspace .ws-avatar {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--rose), var(--gold-deep));
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #2a0a14;
}
.workspace .ws-meta { flex: 1; min-width: 0; text-align: left; }
.workspace .ws-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace .ws-plan { font-size: 10.5px; color: var(--faint); letter-spacing: 0.04em; }
.workspace .chev { color: var(--faint); }

.nav { display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.nav-label { padding: 14px 12px 6px; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition: color 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.nav-item .count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--faint); padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); }
.nav-item .count.alert { color: #2a0a14; background: var(--amber); font-weight: 700; box-shadow: 0 0 10px rgba(240, 193, 75, 0.35); }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-item.active {
  color: var(--cream);
  background: linear-gradient(100deg, rgba(255, 45, 142, 0.18), rgba(255, 45, 142, 0.05));
}
.nav-item.active svg { opacity: 1; color: var(--gold); }
.nav-item.active::before {
  content: ""; position: absolute; left: -4px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 999px; background: var(--gold); box-shadow: 0 0 12px var(--gold);
}
.nav-item.active .count { color: var(--gold-soft); background: rgba(255, 45, 142, 0.14); }

/* Credits meter at the bottom of the rail */
.rail-credits {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(160deg, rgba(255, 45, 142, 0.08), rgba(255, 255, 255, 0.015));
}
.rail-credits .rc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rail-credits .rc-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.rail-credits .rc-engine { font-size: 10px; color: var(--faint); font-family: var(--mono); }
.rail-credits .rc-value { font-family: var(--display); font-size: 27px; font-weight: 600; color: var(--cream); line-height: 1; letter-spacing: -0.02em; }
.rail-credits .rc-value small { font-family: var(--sans); font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; letter-spacing: 0; }
.meter { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin: 10px 0 4px; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft)); box-shadow: 0 0 10px var(--gold-glow); }
.rail-credits .rc-sub { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }

.rail-user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 12px 6px 2px; border-top: 1px solid var(--line); }
.rail-user .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep)); display: grid; place-items: center; font-weight: 700; color: #2a0a14; font-size: 13px; flex: none; box-shadow: 0 0 0 1px rgba(247, 248, 251, 0.12); }
.rail-user .ru-meta { flex: 1; min-width: 0; }
.rail-user .ru-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.rail-user .ru-role { font-size: 10.5px; color: var(--faint); }
.rail-user .ru-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* =========================================================================
   Topbar
   ========================================================================= */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 30px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 10, 8, 0.86), rgba(11, 10, 8, 0.55));
  backdrop-filter: blur(14px) saturate(1.1);
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  max-width: 900px;
  padding: 9px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.search:hover { border-color: var(--line-gold); background: rgba(255, 255, 255, 0.055); }
.search:focus-within { border-color: var(--line-gold); background: rgba(255, 255, 255, 0.06); }
.search svg { width: 16px; height: 16px; flex: none; }
.search input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-size: 13px; }
.search input::placeholder { color: var(--faint); }
.search .kbd { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; background: rgba(255, 255, 255, 0.04); }

.top-spacer { flex: 1; }

.status-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px; color: var(--muted);
}
.status-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-chip.gold { color: var(--gold-soft); border-color: var(--line-gold); background: rgba(255, 45, 142, 0.08); }
.status-chip.gold .dot { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.status-chip.warn { color: var(--amber); border-color: rgba(240, 193, 75, 0.30); background: rgba(240, 193, 75, 0.08); }
.status-chip.warn .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.status-chip b { font-family: var(--mono); color: var(--text); font-weight: 600; }

.icon-btn {
  position: relative;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.icon-btn:hover { color: var(--cream); border-color: var(--line-2); background: rgba(255, 255, 255, 0.05); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .badge { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--rose); color: #2a0f14; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: transform 0.16s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.2s var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { transform: translateY(-1px); border-color: var(--line-2); background: rgba(255, 255, 255, 0.07); }
.btn:active { transform: translateY(0); }
.btn.gold {
  border-color: transparent; color: #2a0a14;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  box-shadow: var(--shadow-gold);
  font-weight: 700;
}
.btn.gold:hover { box-shadow: 0 22px 48px -16px rgba(255, 45, 142, 0.42); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; }

/* =========================================================================
   Views
   ========================================================================= */
.view { display: none; padding: 30px 30px 60px; }
.view.active { display: block; animation: viewIn 0.5s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* staggered children on view enter */
.view.active .stagger > * { animation: rise 0.6s var(--ease) both; }
.view.active .stagger > *:nth-child(1) { animation-delay: 0.02s; }
.view.active .stagger > *:nth-child(2) { animation-delay: 0.08s; }
.view.active .stagger > *:nth-child(3) { animation-delay: 0.14s; }
.view.active .stagger > *:nth-child(4) { animation-delay: 0.20s; }
.view.active .stagger > *:nth-child(5) { animation-delay: 0.26s; }
.view.active .stagger > *:nth-child(6) { animation-delay: 0.32s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-actions { margin-top: 6px; }
.page-kicker { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; font-weight: 600; }
.page-title { font-family: var(--display); font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.04; color: var(--cream); }
.page-title em { font-style: normal; color: var(--gold-soft); font-weight: 700; }
.page-sub { margin-top: 12px; color: var(--muted); font-size: 14.5px; max-width: 52ch; }
.page-sub.lead { color: var(--text); font-size: 16.5px; line-height: 1.45; max-width: 58ch; }
.page-sub.lead b { color: var(--gold-soft); font-weight: 700; }
.page-actions { display: flex; gap: 10px; flex: none; }

/* ---- Cards --------------------------------------------------------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  box-shadow: var(--shadow-sm);
}
.card.pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h3 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.card-head .link { font-size: 12.5px; color: var(--gold); font-weight: 600; display: inline-flex; gap: 5px; align-items: center; }
.card-head .link svg { width: 13px; height: 13px; }
.card-head .meta { font-size: 12px; color: var(--faint); }

/* ---- Stat tiles ---------------------------------------------------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat {
  position: relative; overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008));
}
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, var(--gold-glow), transparent 70%); opacity: 0; transition: opacity 0.3s var(--ease); }
.stat:hover::after { opacity: 1; }
.stat .s-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.stat .s-label svg { width: 15px; height: 15px; color: var(--gold); }
.stat .s-value { font-family: var(--display); font-size: 40px; font-weight: 600; line-height: 0.95; letter-spacing: -0.03em; color: var(--cream); font-variant-numeric: tabular-nums; }
.stat .s-foot { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-family: var(--mono); font-size: 11.5px; padding: 2px 7px; border-radius: 999px; }
.trend.up { color: var(--green); background: rgba(132, 214, 164, 0.14); }
.trend.down { color: var(--red); background: rgba(232, 121, 107, 0.14); }
.trend.warn { color: var(--amber); background: rgba(240, 193, 75, 0.14); }
.trend.flat { color: var(--muted); background: rgba(255, 255, 255, 0.06); }

/* ---- Layout grids -------------------------------------------------- */
.col { display: flex; flex-direction: column; gap: 18px; }

/* ---- Overview: 2-zone (nav | content) ----------------------------- */
.home-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.status-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

/* quick-create action row (under the KPI strip) */
.action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.action {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 15px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text); font-size: 13px; font-weight: 600; text-align: left;
  transition: transform 0.16s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.action .plus { color: var(--gold); font-weight: 700; font-size: 15px; line-height: 1; }
.action:hover { transform: translateY(-2px); border-color: var(--line-gold); background: rgba(255, 45, 142, 0.07); }

/* needs-your-eye review queue (right rail) */
.queue-list { display: flex; flex-direction: column; }
.qrow { display: grid; grid-template-columns: 38px 1fr 32px; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid var(--line); }
.qrow:first-child { border-top: none; padding-top: 2px; }
.qthumb { width: 38px; height: 38px; border-radius: 9px; background-size: cover; background-position: center top; border: 1px solid var(--line-2); }
.qmeta { min-width: 0; }
.qmeta .qn { font-size: 13px; font-weight: 600; color: var(--text); }
.qmeta .qs { font-size: 11px; color: var(--faint); font-family: var(--mono); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qapprove { width: 32px; height: 32px; border-radius: 9px; border: 1px solid transparent; background: rgba(132, 214, 164, 0.16); color: var(--green); display: grid; place-items: center; transition: all 0.16s var(--ease); }
.qapprove svg { width: 15px; height: 15px; }
.qapprove:hover { background: var(--green); color: #0c1f15; }
.qmore { margin-top: 12px; width: 100%; height: 34px; border: 1px solid var(--line-2); border-radius: 9px; background: rgba(255, 255, 255, 0.02); font-size: 12px; font-weight: 600; color: var(--muted); transition: border-color 0.16s var(--ease), color 0.16s var(--ease); }
.qmore:hover { border-color: var(--line-gold); color: var(--gold-soft); }

/* ---- Gallery (centerpiece imagery) -------------------------------- */
.gallery { display: grid; grid-template-columns: 1.5fr 1fr 1fr; grid-template-rows: 168px 168px; gap: 12px; }
.shot {
  position: relative; overflow: hidden; border-radius: var(--r);
  border: 1px solid var(--line-2);
  background-size: cover;
  background-position: var(--shot-focal, center 28%);
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease);
  cursor: pointer;
}
.shot.feature { grid-row: span 2; background-position: var(--shot-feature-focal, var(--shot-focal, center 20%)); }
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 6, 4, 0.06) 0%, transparent 34%, rgba(8, 6, 4, 0.28) 66%, rgba(8, 6, 4, 0.88) 100%);
}
.shot:hover { transform: scale(1.012); border-color: var(--line-gold); }
.shot:hover .shot-meta { transform: translateY(-2px); }
.shot-tag { position: absolute; top: 11px; left: 11px; z-index: 2; white-space: nowrap; font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: rgba(12, 9, 6, 0.62); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.12); color: var(--cream); }
.shot-meta { position: absolute; left: 13px; right: 13px; bottom: 12px; z-index: 2; transition: transform 0.3s var(--ease); }
.shot-meta .sm-name { font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--cream); text-shadow: 0 2px 12px rgba(0,0,0,0.65); }
.shot-meta .sm-sub { font-size: 11.5px; color: rgba(247, 248, 251, 0.76); margin-top: 1px; text-shadow: 0 2px 10px rgba(0,0,0,0.62); }
.shot.feature .shot-meta .sm-name { font-size: 22px; }

/* GPT Image 2 portrait assets are 9:16, while many dashboard tiles are landscape.
   These focal points keep faces in frame instead of letting cover-crops default to sky or empty studio. */
[style*="profile-gianna-gptimage2"] {
  --shot-feature-focal: center 24%;
  --shot-focal: center 30%;
  --review-focal: center 30%;
  --creator-focal: center 28%;
  --ref-focal: center 30%;
}
[style*="profile-emily-gptimage2"] {
  --shot-focal: center 43%;
  --review-focal: center 40%;
  --creator-focal: center 38%;
  --ref-focal: center 38%;
}
[style*="profile-jasmine-gptimage2"] {
  --shot-focal: center 31%;
  --review-focal: center 30%;
  --creator-focal: center 29%;
  --ref-focal: center 30%;
}
[style*="profile-laura-gptimage2"] {
  --shot-focal: center 8%;
  --review-focal: center 9%;
  --creator-focal: center 9%;
  --ref-focal: center 12%;
}
[style*="profile-gabriela-gptimage2"] {
  --shot-focal: center 8%;
  --review-focal: center 9%;
  --creator-focal: center 9%;
  --ref-focal: center 12%;
}
[style*="profile-yoony-gptimage2"] {
  --shot-focal: center 46%;
  --review-focal: center 43%;
  --creator-focal: center 43%;
  --ref-focal: center 42%;
}

/* ---- Batch list ---------------------------------------------------- */
.row-list { display: flex; flex-direction: column; }
.brow {
  display: grid; grid-template-columns: 52px 1fr 150px 108px auto; align-items: center; gap: 16px;
  padding: 13px 8px;
  border-top: 1px solid var(--line);
  transition: background 0.18s var(--ease);
}
.brow:first-child { border-top: none; }
.brow:hover { background: rgba(255, 255, 255, 0.022); }
.brow .bthumb { position: relative; width: 52px; height: 52px; border-radius: 10px; border: 1px solid var(--line-2); background-size: cover; background-position: center 22%; flex: none; }
.brow .bthumb .bcount { position: absolute; right: 3px; bottom: 3px; min-width: 16px; height: 16px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid var(--line-gold); background: rgba(12, 9, 6, 0.78); backdrop-filter: blur(4px); color: var(--gold-soft); font-family: var(--mono); font-size: 9.5px; font-weight: 700; line-height: 1; }
.brow .bmain .bt { font-size: 13.5px; font-weight: 600; color: var(--text); }
.brow .bmain .bs { font-size: 12px; color: var(--muted); margin-top: 3px; }
.brow .bmain .bs .bid { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-right: 8px; }
.bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft)); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; letter-spacing: 0.02em; }
.tag .d { width: 6px; height: 6px; border-radius: 50%; }
.tag.review { color: var(--amber); background: rgba(240, 193, 75, 0.12); } .tag.review .d { background: var(--amber); }
.tag.approved { color: var(--green); background: rgba(132, 214, 164, 0.12); } .tag.approved .d { background: var(--green); }
.tag.ready { color: var(--gold-soft); background: rgba(255, 45, 142, 0.14); } .tag.ready .d { background: var(--gold); }
.tag.running { color: var(--blue); background: rgba(143, 182, 224, 0.12); } .tag.running .d { background: var(--blue); animation: pulse 1.4s ease-in-out infinite; }
.tag.draft { color: var(--muted); background: rgba(255, 255, 255, 0.06); } .tag.draft .d { background: var(--muted); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.brow .bact { display: flex; gap: 6px; }
.mini { height: 30px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 8px; background: rgba(255, 255, 255, 0.03); font-size: 12px; font-weight: 600; color: var(--text); transition: border-color 0.18s var(--ease), background 0.18s var(--ease), filter 0.18s var(--ease); }
.mini:hover { border-color: var(--line-gold); background: rgba(255, 45, 142, 0.08); color: var(--gold-soft); }
/* primary CTA — appears only where the user has a real next move (Review / Export) */
.mini.primary { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #2a0a14; }
.mini.primary:hover { filter: brightness(1.06); border-color: var(--gold-soft); background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #2a0a14; }

/* progress column: recency caption + adaptive bar (gold = generating, neutral = settled) */
.brow .bact { justify-self: end; }
.brow .bprog { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.brow .bpcap { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.02em; color: var(--faint); }
.brow .barwrap { display: flex; align-items: center; gap: 8px; }
.brow .barwrap .bar { flex: 1; }
.brow .bpct { flex: none; min-width: 30px; text-align: right; font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--gold-soft); }
/* settled (100% generated): soft full gold, no shimmer — the pill carries the lifecycle state */
.brow .bar.done > span { background: rgba(255, 45, 142, 0.40); }

.card-head h3 .hcount { margin-left: 7px; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--faint); }

/* ---- Spend breakdown ---------------------------------------------- */
.spend-list { display: flex; flex-direction: column; gap: 13px; }
.spend-row { display: grid; grid-template-columns: 80px 1fr 52px; align-items: center; gap: 12px; font-size: 12.5px; }
.spend-row .sl { color: var(--muted); }
.spend-row .sv { text-align: right; font-family: var(--mono); color: var(--text); font-size: 12px; }
.track { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.track > span { display: block; height: 100%; border-radius: inherit; }

/* ---- Pipeline funnel ---------------------------------------------- */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.fstage { display: flex; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, 0.02); transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.fstage:hover { border-color: var(--line-2); background: rgba(255, 255, 255, 0.035); }
.fstage .fi { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.fstage .fi svg { width: 18px; height: 18px; }
.fstage.s1 .fi { background: rgba(240, 193, 75, 0.14); color: var(--amber); }
.fstage.s2 .fi { background: rgba(132, 214, 164, 0.14); color: var(--green); }
.fstage.s3 .fi { background: rgba(255, 45, 142, 0.16); color: var(--gold); }
.fstage .fm { flex: 1; }
.fstage .fm .fn { font-size: 13px; font-weight: 600; color: var(--text); }
.fstage .fm .fd { font-size: 11.5px; color: var(--faint); margin-top: 1px; }
.fstage .fc { font-family: var(--display); font-size: 26px; font-weight: 600; color: var(--cream); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---- Engines / integration rows ----------------------------------- */
.kv { display: flex; flex-direction: column; }
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--line); }
.kv-row:first-child { border-top: none; }
.kv-row .kl { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); font-weight: 500; }
.kv-row .kl .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); color: var(--gold-soft); flex: none; }
.kv-row .kl .ico svg { width: 15px; height: 15px; }
.kv-row .kl small { display: block; font-size: 11px; color: var(--faint); font-weight: 400; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.state .d { width: 7px; height: 7px; border-radius: 50%; }
.state.ok { color: var(--green); } .state.ok .d { background: var(--green); box-shadow: 0 0 8px var(--green); }
.state.warn { color: var(--amber); } .state.warn .d { background: var(--amber); }
.state.off { color: var(--faint); } .state.off .d { background: var(--faint); }
.state.link { color: var(--gold); cursor: pointer; }

/* =========================================================================
   Studio view
   ========================================================================= */
/* Studio is a launcher: six vertical feature tiles, each opening its own page. */
.studio { display: flex; flex-direction: column; gap: 14px; }
.launcher { display: flex; flex-direction: column; gap: 13px; }
.mode-group { display: flex; flex-direction: column; gap: 8px; }
.group-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); font-weight: 600; }

.mode-grid {
  counter-reset: studio-mode;
  display: grid;
  /* One row of 6, scaled to the smaller of width-share vs. height-budget so the
     whole Studio fits one viewport with no scrollbar; centered when height-capped. */
  grid-template-columns: repeat(6, min(calc((100% - 60px) / 6), max(120px, calc((100dvh - 390px) * 9 / 16))));
  justify-content: center;
  gap: 12px;
}
.mode {
  position: relative; overflow: hidden; text-align: left;
  aspect-ratio: 9 / 16;
  padding: 13px 14px;
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background:
    radial-gradient(520px 260px at 82% 8%, rgba(255, 45, 142, 0.12), transparent 54%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.006));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
  transition: transform 0.18s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.mode::before {
  counter-increment: studio-mode;
  content: counter(studio-mode, decimal-leading-zero);
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 29px;
  height: 25px;
  padding: 0 7px;
  border: 1px solid var(--line-gold);
  border-radius: 8px;
  background: rgba(19, 22, 12, 0.82);
  color: var(--gold-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 22px rgba(255, 45, 142, 0.12);
}
.mode::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(13, 11, 8, 0.58) 0%, rgba(13, 11, 8, 0.05) 28%, rgba(13, 11, 8, 0.20) 58%, rgba(13, 11, 8, 0.96) 100%),
    linear-gradient(90deg, rgba(13, 11, 8, 0.70) 0%, rgba(13, 11, 8, 0.12) 48%, rgba(13, 11, 8, 0.48) 100%),
    var(--mode-art);
  background-size: cover;
  background-position: var(--mode-pos, center center);
  filter: saturate(0.84) contrast(1.08);
  opacity: 0.96;
  transform: scale(1.02);
  transition: opacity 0.24s var(--ease), transform 0.35s var(--ease), filter 0.24s var(--ease);
}
.mode::selection { background: transparent; }
.mode > * { position: relative; z-index: 2; }
.mode:hover { transform: translateY(-4px); border-color: var(--line-gold); box-shadow: var(--shadow), 0 0 28px rgba(255, 45, 142, 0.09); }
.mode:hover::after { opacity: 1; transform: scale(1.06); filter: saturate(0.96) contrast(1.1); }
.mode.active::after { opacity: 1; }
.mode .micon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(19, 22, 12, 0.55); backdrop-filter: blur(4px); color: var(--gold); border: 1px solid var(--line-gold); box-shadow: 0 0 18px rgba(255, 45, 142, 0.08); }
.mode .micon svg { width: 16px; height: 16px; }
.mode .mt { max-width: 12ch; padding-right: 24px; font-size: clamp(15px, 1.15vw, 18px); font-weight: 800; color: var(--cream); margin-top: auto; line-height: 1.1; letter-spacing: 0; text-transform: uppercase; text-shadow: 0 2px 18px rgba(0,0,0,0.72); text-wrap: balance; }
.mode .md { max-width: 24ch; font-size: 11.5px; color: rgba(247, 248, 251,0.78); margin-top: 7px; line-height: 1.36; text-shadow: 0 2px 14px rgba(0,0,0,0.66); }
.mode .mgo { position: static; margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; width: fit-content; font-size: 12px; font-weight: 800; color: var(--gold); transition: color 0.18s var(--ease); }
.mode .mgo svg {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 30px;
  height: 30px;
  padding: 7px;
  border-radius: 50%;
  color: #2a0a14;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 10px 28px rgba(255, 45, 142, 0.26);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.mode:hover .mgo, .mode.active .mgo { color: var(--gold-soft); }
.mode:hover .mgo svg, .mode.active .mgo svg { transform: translateX(3px); box-shadow: 0 12px 32px rgba(255, 45, 142, 0.34); }
.mode.active {
  border-color: var(--gold);
  background:
    radial-gradient(600px 280px at 16% 0%, rgba(255, 45, 142, 0.18), transparent 54%),
    linear-gradient(160deg, rgba(255, 45, 142, 0.13), rgba(255, 255, 255, 0.016));
  box-shadow: inset 0 0 0 1px rgba(255, 45, 142, 0.22), var(--shadow-gold), 0 0 32px rgba(255, 45, 142, 0.12);
}
.mode.active .micon { background: var(--gold); color: #2a0a14; }
.mode.active::after { opacity: 0.86; }
.mode .mflag { position: absolute; top: 47px; right: 13px; z-index: 3; display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-soft); padding: 3px 7px; border-radius: 999px; background: rgba(19, 22, 12, 0.7); backdrop-filter: blur(4px); border: 1px solid var(--line-gold); }
.mode-daily { --mode-pos: 66% center; }
.mode-image { --mode-pos: 78% center; }
.mode-carousel { --mode-pos: 72% center; }
.mode-recreate { --mode-pos: 80% center; }
.mode-reel { --mode-pos: 82% center; }
.mode-video { --mode-pos: 84% center; }

.studio-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255,255,255,0.032), rgba(255,255,255,0.01));
}
.studio-proof span { display: block; min-width: 0; }
.studio-proof b { display: block; color: var(--cream); font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.studio-proof small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.35; margin-top: 3px; }

/* Focused feature page opened from a Studio tile */
.feature-head .back-link { margin-bottom: 12px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; width: fit-content; padding: 0; border: 0; background: none; font-size: 12px; font-weight: 800; color: var(--gold); }
.back-link svg { width: 15px; height: 15px; }
.feature-layout { display: grid; grid-template-columns: minmax(250px, 0.42fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.feature-preview {
  position: sticky;
  top: 96px;
  min-height: 520px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid var(--line-gold);
  border-radius: var(--r-xl);
  background:
    linear-gradient(180deg, rgba(13, 11, 8, 0.42), rgba(13, 11, 8, 0.08) 42%, rgba(13, 11, 8, 0.92)),
    var(--feature-art);
  background-size: cover;
  background-position: var(--feature-pos, center center);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,0.035);
}
.feature-preview::after { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 260px at 85% 20%, rgba(255, 45, 142,0.18), transparent 58%); pointer-events: none; }
.feature-num { position: absolute; top: 18px; right: 18px; z-index: 2; min-width: 42px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-gold); border-radius: 10px; background: rgba(19, 22, 12, 0.78); color: var(--gold-soft); font-family: var(--mono); font-size: 14px; font-weight: 800; }
.feature-label { position: absolute; left: 18px; bottom: 18px; z-index: 2; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-soft); }
.feature-work { min-width: 0; }

/* Edit & Tools — lighter than create cards, signals the hierarchy */
.tool-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tool { display: inline-flex; align-items: center; gap: 12px; min-width: 280px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, 0.02); transition: transform 0.18s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease); }
.tool:hover { transform: translateY(-2px); border-color: var(--line-gold); background: rgba(255, 45, 142, 0.06); }
.tool .ticon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.04); color: var(--muted); border: 1px solid var(--line); flex: none; }
.tool .ticon svg { width: 16px; height: 16px; }
.tool .tn { font-size: 13px; font-weight: 700; color: var(--cream); display: block; }
.tool .ts { font-size: 11px; color: var(--muted); margin-top: 1px; display: block; }
.tool .tgo { margin-left: auto; color: var(--gold); opacity: 0; transform: translateX(-3px); transition: opacity 0.18s var(--ease), transform 0.18s var(--ease); }
.tool .tgo svg { width: 15px; height: 15px; display: block; }
.tool:hover .tgo, .tool.active .tgo { opacity: 1; transform: none; }
.tool.active { border-color: var(--gold); background: rgba(255, 45, 142, 0.08); }
.tool.active .ticon { background: var(--gold); color: #2a0a14; border-color: var(--gold); }

/* Composer — the production surface, one full-width card */
.composer { padding: 13px 16px; }
.composer .c-creator { display: flex; align-items: center; gap: 12px; }
.composer .c-creator .ph { width: 40px; height: 40px; border-radius: 11px; background-size: cover; background-position: center top; border: 1px solid var(--line-gold); flex: none; }
.composer .c-creator .cn { font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--cream); }
.composer .c-creator .cs { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.composer .c-creator .swap { margin-left: auto; }
.composer .c-refs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 9px 0; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.composer .c-refs-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.composer .c-refs .link { margin-left: auto; }
.composer .c-mode-tag { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 11px; }
.composer.awaiting .c-mode-tag { color: var(--faint); }
.composer.awaiting .prompt-box { opacity: 0.55; }
/* prompt beside settings: composer height is max(prompt, settings), not the sum */
.composer .c-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 20px; align-items: stretch; }
.composer .c-prompt { display: flex; flex-direction: column; }
.composer .c-prompt .field-label { margin: 0 0 8px; }
.prompt-box { width: 100%; flex: 1; min-height: 92px; resize: vertical; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--r); background: rgba(0, 0, 0, 0.22); color: var(--text); font-size: 13.5px; line-height: 1.5; }
.prompt-box::placeholder { color: var(--faint); }
.prompt-box:focus { outline: none; border-color: var(--gold); }
.field-label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 13px 0 8px; font-weight: 600; }
/* settings wrap into columns inside their half so short modes stay ~2 rows */
#composerFields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 16px; align-items: start; }
#composerFields .field { min-width: 0; }
#composerFields .field.wide { grid-column: 1 / -1; }
#composerFields .field .field-label { margin: 0 0 7px; }
.opt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.opt {
  padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 255, 255, 0.025); font-size: 12px; font-weight: 600; color: var(--muted);
  font-family: var(--mono);
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease), background 0.16s var(--ease);
}
.opt:hover { color: var(--text); border-color: var(--line-2); }
.opt.on { color: #2a0a14; background: var(--gold); border-color: var(--gold); }
.ref-anchors { display: flex; gap: 8px; flex-wrap: wrap; }
.anchor { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-xs); background: rgba(255, 255, 255, 0.025); font-size: 12px; color: var(--text); }
.anchor .ad { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.anchor.mute { color: var(--faint); } .anchor.mute .ad { background: var(--faint); }
.composer .c-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.composer .c-cost { font-size: 12px; color: var(--muted); } .composer .c-cost b { font-family: var(--mono); color: var(--gold-soft); }
.btn.gold:disabled { opacity: 0.4; box-shadow: none; cursor: not-allowed; filter: grayscale(0.35); }

/* ---- Studio: fit the create surface in a single viewport ---------- */
#view-studio { padding-bottom: 24px; }
#view-studio .page-head { margin-bottom: 12px; }
#view-studio .page-kicker { margin-bottom: 6px; }
#view-studio .page-title { font-size: clamp(24px, 2.6vw, 30px); }
#view-studio .page-sub { font-size: 12.5px; margin-top: 6px; max-width: 72ch; }

/* =========================================================================
   Review view
   ========================================================================= */
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rcard { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease); }
.rcard:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.rcard .rimg { position: relative; height: 280px; background-size: cover; background-position: var(--review-focal, center 28%); }
.rcard .rimg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,6,4,0.28) 0%, transparent 28%, transparent 62%, rgba(8,6,4,0.62)); }
.rcard .rtop { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; }
.rcard .rbadge { font-size: 10.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: rgba(12,9,6,0.6); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.12); color: var(--cream); letter-spacing: 0.04em; }
.rcard .rbody { padding: 15px; }
.rcard .rname { font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--cream); }
.rcard .rmeta { font-size: 11.5px; color: var(--faint); margin-top: 3px; font-family: var(--mono); }
.rcard .ractions { display: grid; grid-template-columns: 1fr 1fr 36px; gap: 8px; margin-top: 14px; }
.ract { height: 36px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.03); font-size: 12.5px; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.16s var(--ease); }
.ract svg { width: 15px; height: 15px; }
.ract.approve { border-color: transparent; background: rgba(132,214,164,0.16); color: var(--green); }
.ract.approve:hover { background: var(--green); color: #0c1f15; }
.ract.reject:hover { border-color: var(--red); color: var(--red); }
.ract.more:hover { border-color: var(--line-gold); color: var(--gold); }
.ract.gold { border-color: transparent; background: rgba(255, 45, 142, 0.16); color: var(--gold-soft); }
.ract.gold:hover { background: var(--gold); color: #2a0a14; }

/* Library filter bar: two dimensions (type + creator) side by side */
.lib-filters { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; margin-bottom: 22px; }
.filter-group { display: flex; align-items: center; gap: 10px; min-width: 0; }
.filter-group .seg { flex-wrap: wrap; }
.filter-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 600; flex: none; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.025); }
.seg button { height: 30px; padding: 0 15px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: transparent; transition: all 0.16s var(--ease); }
.seg button .c { font-family: var(--mono); font-size: 11px; opacity: 0.7; margin-left: 5px; }
.seg button:hover { color: var(--text); }
.seg button.on { color: #2a0a14; background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep)); }

/* =========================================================================
   Roster view
   ========================================================================= */
.roster-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.creator { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease); }
.creator:hover { transform: translateY(-4px); border-color: var(--line-gold); box-shadow: var(--shadow); }
.creator .chero { position: relative; height: 230px; background-size: cover; background-position: var(--creator-focal, center 24%); }
.creator .chero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8,6,4,0.4) 66%, rgba(8,6,4,0.92)); }
.creator .chero .clive { position: absolute; top: 13px; left: 13px; z-index: 2; }
.creator .chero .cname { position: absolute; left: 16px; bottom: 13px; z-index: 2; }
.creator .chero .cname .n { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--cream); line-height: 1; }
.creator .chero .cname .h { font-size: 11.5px; color: rgba(247, 248, 251,0.72); margin-top: 5px; display: flex; align-items: center; gap: 6px; }
.creator .cbody { padding: 16px; }
.creator .canchors { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.03); color: var(--muted); }
.chip.on { color: var(--gold-soft); border-color: var(--line-gold); background: rgba(255, 45, 142,0.10); }
.chip .cd { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.creator .cstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.creator .cstat { text-align: center; }
.creator .cstat b { display: block; font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--cream); }
.creator .cstat span { font-size: 10.5px; color: var(--faint); letter-spacing: 0.06em; text-transform: uppercase; }
.creator .cfoot { display: flex; gap: 8px; }
.creator .cfoot .btn { flex: 1; }

/* =========================================================================
   Library / Exports / Activity (lighter, intentional)
   ========================================================================= */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.ref { position: relative; overflow: hidden; aspect-ratio: 4/5; border-radius: var(--r); border: 1px solid var(--line-2); background-size: cover; background-position: var(--ref-focal, center 28%); transition: transform 0.2s var(--ease), border-color 0.2s var(--ease); }
.ref:hover { transform: scale(1.015); border-color: var(--line-gold); }
.ref::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(8,6,4,0.85)); }
.ref .rl { position: absolute; left: 11px; bottom: 10px; z-index: 2; }
.ref .rl .rn { font-size: 12.5px; font-weight: 600; color: var(--cream); }
.ref .rl .rt { font-size: 10.5px; color: rgba(247, 248, 251,0.66); margin-top: 1px; }
.ref .rkind { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 7px; border-radius: 999px; background: rgba(12,9,6,0.6); backdrop-filter: blur(6px); color: var(--gold-soft); border: 1px solid var(--line-gold); }

.exp-table { width: 100%; }
.exp-row { display: grid; grid-template-columns: 36px 1.6fr 1fr 1fr 110px 96px; align-items: center; gap: 14px; padding: 14px 8px; border-top: 1px solid var(--line); font-size: 13px; }
.exp-row:first-child { border-top: none; }
.exp-row:hover { background: rgba(255,255,255,0.02); }
.exp-row.head { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 6px 8px; }
.exp-row.head:hover { background: none; }
.exp-row .efolder { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 45, 142,0.10); color: var(--gold); }
.exp-row .efolder svg { width: 17px; height: 17px; }
.exp-row .et { font-weight: 600; color: var(--text); }
.exp-row .es { color: var(--muted); font-family: var(--mono); font-size: 12px; }

.feed { display: flex; flex-direction: column; }
.fitem { display: grid; grid-template-columns: 36px 1fr auto; gap: 13px; padding: 14px 4px; border-top: 1px solid var(--line); }
.fitem:first-child { border-top: none; }
.fitem .fav { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,0.04); color: var(--gold-soft); }
.fitem .fav svg { width: 16px; height: 16px; }
.fitem .fc .ft { font-size: 13px; color: var(--text); }
.fitem .fc .ft b { color: var(--cream); font-weight: 600; }
.fitem .fc .ft .gold { color: var(--gold-soft); font-weight: 600; }
.fitem .fc .fm { font-size: 11.5px; color: var(--faint); margin-top: 2px; font-family: var(--mono); }
.fitem .fwhen { font-size: 11.5px; color: var(--faint); white-space: nowrap; }

/* =========================================================================
   Toasts
   ========================================================================= */
.toast-wrap { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px 13px 13px;
  border: 1px solid var(--line-gold); border-radius: 16px;
  background: linear-gradient(165deg, rgba(42, 35, 22, 0.97), rgba(20, 17, 11, 0.97));
  box-shadow: var(--shadow); backdrop-filter: blur(12px);
  max-width: 340px; animation: toastIn 0.36s var(--ease) both;
}
.toast.out { animation: toastOut 0.3s var(--ease) both; }
.toast .ti { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep)); color: #2a0a14; }
.toast .ti svg { width: 16px; height: 16px; }
.toast .tt { font-size: 13px; font-weight: 700; color: var(--cream); }
.toast .ts { font-size: 11.5px; color: var(--muted); margin-top: 1px; font-family: var(--mono); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1240px) {
  .mode-grid { grid-template-columns: repeat(4, 1fr); }
  .studio-proof { grid-template-columns: repeat(2, 1fr); }
  .review-grid, .roster-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  :root { --rail: 0px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .main { grid-column: 1; width: 100%; }
  .sidebar { display: none; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .status-row { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .shot.feature { grid-row: auto; grid-column: span 2; min-height: 220px; }
  .review-grid, .roster-grid { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-layout { grid-template-columns: 1fr; }
  .feature-preview { position: relative; top: auto; width: min(360px, 100%); min-height: 0; margin: 0 auto; }
  .composer .c-grid { grid-template-columns: 1fr; }
  .view { padding: 22px 16px 50px; }
  .topbar { padding: 14px 16px; gap: 10px; }
  .top-spacer, .topbar .status-chip, .search .kbd { display: none; }
  .search { width: auto; flex: 1; min-width: 0; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-actions { margin-top: 16px; flex-wrap: wrap; }
  .stat .s-value { font-size: 32px; }
}
@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery { grid-template-columns: 1fr; }
  .shot.feature { grid-column: auto; }
  .seg { width: 100%; overflow-x: auto; }
  .btn .add-label, .btn.gold span { white-space: nowrap; }
  .mode-grid { grid-template-columns: repeat(2, 1fr); }
  .mode { padding: 14px; }
  .mode .mt { font-size: 20px; max-width: 13ch; }
  .mode .md { font-size: 13px; max-width: 27ch; }
  .mode .mgo { font-size: 14px; }
  .mode .mgo svg { width: 38px; height: 38px; }
  .studio-proof { grid-template-columns: 1fr; }
  .tool { min-width: 0; flex: 1 1 100%; }
}

/* =========================================================================
   Command palette (⌘K)
   ========================================================================= */
.kbd-inline { font-family: var(--mono); font-size: 0.82em; color: var(--gold-soft); border: 1px solid var(--line-gold); border-radius: 5px; padding: 1px 5px; background: rgba(255, 45, 142, 0.08); }
.cmdk-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 20px 20px; background: rgba(8, 6, 3, 0.62); backdrop-filter: blur(5px); opacity: 0; pointer-events: none; transition: opacity 0.16s var(--ease); }
.cmdk-overlay.open { opacity: 1; pointer-events: auto; }
.cmdk { width: min(580px, 100%); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; transform: translateY(-10px) scale(0.99); transition: transform 0.2s var(--ease); }
.cmdk-overlay.open .cmdk { transform: none; }
.cmdk-input-row { display: flex; align-items: center; gap: 11px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.cmdk-input-row svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.cmdk-input-row .kbd { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 7px; background: rgba(255, 255, 255, 0.04); flex: none; }
.cmdk-input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-size: 15px; font-family: var(--sans); }
.cmdk-input::placeholder { color: var(--faint); }
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: 8px; }
.cmdk-group-label { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 11px 10px 6px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 11px; cursor: pointer; }
.cmdk-item .ci { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--muted); flex: none; }
.cmdk-item .ci svg { width: 15px; height: 15px; }
.cmdk-item .cl { font-size: 13.5px; color: var(--text); font-weight: 500; }
.cmdk-item .csub { font-size: 11.5px; color: var(--faint); }
.cmdk-item .ck { margin-left: auto; font-size: 10.5px; color: var(--faint); font-family: var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.cmdk-item.sel { background: rgba(255, 45, 142, 0.12); }
.cmdk-item.sel .ci { border-color: var(--gold); color: var(--gold); background: rgba(255, 45, 142, 0.1); }
.cmdk-item.sel .ck { color: var(--gold-soft); }
.cmdk-empty { padding: 28px 16px; text-align: center; color: var(--faint); font-size: 13px; }

/* =========================================================================
   Carousel card — self-demonstrating slideshow (fan -> zoom -> cycle, looping)
   Contained in the card's overflow:hidden; animates only transform/opacity.
   High-res 9:16 portraits as slides so they stay crisp. Reduced-motion = static.
   ========================================================================= */
.mode-carousel .mfilm { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.mode-carousel .mfilm::after {
  content: ""; position: absolute; inset: 0; z-index: 6;
  background: linear-gradient(180deg, rgba(13,11,8,0.5) 0%, rgba(13,11,8,0.04) 24%, rgba(13,11,8,0) 44%, rgba(13,11,8,0.5) 70%, rgba(13,11,8,0.96) 100%);
}
.mode-carousel .mslide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 26%;
  border-radius: inherit;
  opacity: 0;
  transform: scale(1.05) translateX(7%);
  transition: opacity 0.8s var(--ease), transform 1.6s var(--ease);
  will-change: transform, opacity;
}
.mode-carousel .mslide.is-active { opacity: 1; transform: scale(1) translateX(0); z-index: 3; }
.mode-carousel .mslide.is-prev   { opacity: 0; transform: scale(1.02) translateX(-7%); z-index: 2; }

/* Fan / "rainbow" overview: slides arc out as a contained stack of cards */
.mode-carousel.is-fan .mslide {
  opacity: 1; z-index: 3;
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(0,0,0,0.6), 0 0 0 1px rgba(247, 248, 251,0.12);
  transition: transform 0.9s var(--ease), opacity 0.55s var(--ease);
}
.mode-carousel.is-fan .mslide:nth-child(1) { transform: rotate(-15deg) translate(-30%, -2%) scale(0.55); z-index: 1; }
.mode-carousel.is-fan .mslide:nth-child(2) { transform: rotate(-6deg)  translate(-11%, -7%) scale(0.62); z-index: 2; }
.mode-carousel.is-fan .mslide:nth-child(3) { transform: rotate(6deg)   translate(11%, -7%)  scale(0.62); z-index: 2; }
.mode-carousel.is-fan .mslide:nth-child(4) { transform: rotate(15deg)  translate(30%, -2%)  scale(0.55); z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .mode-carousel .mslide { transition: none; }
  .mode-carousel .mslide.is-active { opacity: 1; transform: none; }
}
