:root {
  color-scheme: light;
  --ink: #1b1a1f;
  --ink-muted: #6e6a75;
  --ink-soft: #9b96a2;
  --accent: #a78bfa;
  --accent-strong: #8b5cf6;
  --accent-deep: #6d4fd1;
  --blue: #cfe8f0;
  --blue-ink: #3d8ba1;
  --paper: #fbfaf8;
  --surface: #fff;
  --line: #ece9e4;
  --line-strong: #e0dcd5;
  --deep: #221f2b;
  --pill: 999px;
  --radius: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 18px 44px rgba(27, 26, 31, .08);
  --shadow-lg: 0 28px 70px rgba(27, 26, 31, .16);
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--paper); font-size: 14px; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.app-frame { min-height: 100vh; }
.topbar { height: 84px; position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 230px minmax(200px, 1fr) auto; align-items: center; gap: 34px; padding: 0 clamp(20px, 3vw, 44px); border-bottom: 1px solid var(--line); background: rgba(251, 250, 248, .92); backdrop-filter: blur(16px); }
.wordmark { display: inline-flex; align-items: baseline; width: max-content; color: var(--ink); font: 800 23px/1 "Manrope", sans-serif; letter-spacing: -.035em; }
.wordmark::after { content: "."; }
.topbar-search { width: min(400px, 100%); height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface); color: var(--ink-soft); }
.topbar-search > span { font-size: 19px; line-height: 1; }
.topbar-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.nav-profile { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.nav-profile-copy { display: grid; gap: 2px; }
.nav-profile-copy small { color: var(--ink-soft); font-size: 11px; font-weight: 500; }
.user-avatar { width: 38px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--accent); color: #fff; font: 800 13px "Manrope", sans-serif; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.top-credit { min-height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; }
.mobile-menu-button { display: none; }

.workspace { width: min(1480px, 100%); min-height: calc(100vh - 84px); margin: 0 auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { min-height: calc(100vh - 84px); position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; padding: 34px 18px 24px; border-right: 1px solid var(--line); background: rgba(251, 250, 248, .72); }
.sidebar-label { margin: 0 0 14px 14px; color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.primary-nav, .admin-nav { display: grid; gap: 5px; }
.primary-nav a, .admin-nav a { min-height: 46px; display: flex; align-items: center; gap: 13px; padding: 0 16px; border-radius: var(--pill); color: var(--ink-muted); font-size: 13.5px; font-weight: 600; transition: background .16s ease, color .16s ease; }
.primary-nav a:hover, .admin-nav a:hover { background: var(--accent); color: #fff; }
.primary-nav a.active, .admin-nav a.active { background: var(--accent); color: #fff; font-weight: 700; }
.nav-icon { width: 20px; display: inline-grid; place-items: center; color: var(--ink-soft); font-size: 17px; }
.primary-nav a:hover .nav-icon, .admin-nav a:hover .nav-icon, .active .nav-icon { color: #fff; }
.admin-nav { margin-top: 32px; }
.sidebar-bottom { margin-top: auto; }
.storage-note { display: grid; gap: 10px; margin: 0 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.storage-icon { width: 32px; aspect-ratio: 1; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: var(--blue-ink); font-size: 16px; }
.storage-note strong, .storage-note small { display: block; }
.storage-note strong { font-size: 12px; }
.storage-note small { margin-top: 3px; color: var(--ink-soft); font-size: 11px; }
.signout-button { width: 100%; min-height: 40px; margin-bottom: 14px; padding: 0 16px; border: 0; border-radius: var(--pill); background: transparent; color: var(--ink-muted); text-align: left; font-size: 13px; font-weight: 700; transition: background .16s ease, color .16s ease; }
.signout-button:hover { background: var(--accent); color: #fff; }
.signout-button span { margin-right: 8px; }
.sidebar-version { display: block; padding-left: 16px; color: var(--ink-soft); font-size: 8.5px; font-weight: 700; letter-spacing: .08em; }
.mobile-nav-backdrop { display: none; }

.main-content { min-width: 0; padding: clamp(28px, 4vw, 52px) clamp(20px, 4vw, 56px) 88px; }
.page-shell { width: min(1120px, 100%); margin: 0 auto; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.page-kicker { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: var(--ink-muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.page-kicker::before { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); content: ""; }
.page-heading h1, .auth-copy h1 { margin: 0; color: var(--ink); font: 800 clamp(30px, 3.6vw, 44px)/1.08 "Manrope", sans-serif; letter-spacing: -.035em; }
.page-heading > div > p:last-child { max-width: 62ch; margin: 12px 0 0; color: var(--ink-muted); font-size: 14px; line-height: 1.65; }
.page-heading-actions { display: flex; align-items: center; gap: 10px; }
.eyebrow { color: var(--ink-muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 26px; border: 1px solid transparent; border-radius: var(--pill); background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease; }
.button:hover { transform: translateY(-1px); background: var(--accent-strong); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-soft { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.button-soft:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.button-quiet { min-height: 40px; padding: 0 18px; border-color: transparent; background: transparent; color: var(--ink-muted); }
.button-quiet:hover { background: var(--accent); color: #fff; }
.button-danger { background: #d9483b; color: #fff; }
.button-danger:hover { background: #bf3a2e; }
.icon-button { width: 38px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 15px; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.icon-button:hover { border-color: var(--accent); background: var(--accent); color: #fff; }

.surface { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.hero-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); align-items: center; gap: clamp(28px, 4vw, 60px); padding: clamp(20px, 3vw, 40px) 0 clamp(36px, 4vw, 56px); border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); }
.hero-copy { position: relative; z-index: 1; }
.hero-label { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; color: var(--ink-muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.hero-label::before { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); content: ""; }
.hero-copy h1 { max-width: 15ch; margin: 0; color: var(--ink); font: 800 clamp(38px, 5.2vw, 62px)/1.02 "Manrope", sans-serif; letter-spacing: -.04em; }
.hero-copy h1 span { color: var(--accent); }
.hero-copy > p { max-width: 46ch; margin: 20px 0 0; color: var(--ink-muted); font-size: 16px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-copy > p.hero-note { margin: 16px 0 0; color: var(--ink-soft); font-size: 12.5px; }
.hero-art { position: relative; overflow: hidden; aspect-ratio: 4 / 3.4; border-radius: var(--radius); background: var(--accent); box-shadow: var(--shadow); }
.hero-art img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: center 38%; }
.hero-art-note { position: absolute; z-index: 1; right: 16px; bottom: 16px; padding: 9px 16px; border-radius: var(--pill); background: rgba(255, 255, 255, .94); color: var(--ink); font-size: 11.5px; font-weight: 700; }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 32px 0 clamp(40px, 5vw, 64px); }
.stat-block { display: flex; align-items: center; gap: 14px; padding: 6px 28px; border-left: 1px solid var(--line); }
.stat-block:first-child { padding-left: 0; border-left: 0; }
.stat-mark { width: 38px; aspect-ratio: 1; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 16px; }
.stat-block:nth-child(2) .stat-mark { background: var(--blue); color: var(--blue-ink); }
.stat-block:nth-child(3) .stat-mark { background: var(--accent-deep); color: #fff; }
.stat-block > div > span, .stat-block strong { display: block; }
.stat-block > div > span { color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.stat-block strong { margin-top: 6px; color: var(--ink); font: 800 20px "Manrope", sans-serif; letter-spacing: -.02em; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.section-heading h2 { margin: 0; font: 800 22px "Manrope", sans-serif; letter-spacing: -.025em; }
.section-heading p { margin: 6px 0 0; color: var(--ink-muted); font-size: 13px; }
.section-heading .text-link { color: var(--accent-deep); font-size: 12.5px; font-weight: 700; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.photo-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.photo-card-media { position: relative; aspect-ratio: 4 / 4.7; overflow: hidden; background: var(--line); }
.photo-card-media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.photo-card:hover .photo-card-media > img { transform: scale(1.025); }
.photo-card-tag { position: absolute; top: 14px; left: 14px; padding: 7px 13px; border-radius: var(--pill); background: rgba(255, 255, 255, .94); color: var(--ink); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.photo-card-actions { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.photo-card-actions .icon-button { width: 34px; border-color: transparent; background: rgba(255, 255, 255, .94); }
.photo-card-body { padding: 18px; }
.photo-owner { display: flex; align-items: center; gap: 10px; }
.photo-owner .user-avatar { width: 32px; font-size: 11px; }
.photo-owner strong, .photo-owner small { display: block; }
.photo-owner strong { font-size: 13px; }
.photo-owner small { margin-top: 2px; color: var(--ink-soft); font-size: 11.5px; }
.photo-caption { margin: 14px 0 0; color: var(--ink-muted); font-size: 13.5px; line-height: 1.6; }
.photo-card-footer { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.inline-action { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--ink-muted); font-size: 12.5px; }
.inline-action:hover, .inline-action.is-active { color: var(--accent-deep); }
.inline-action.is-active { font-weight: 700; }
.inline-action:last-child { margin-left: auto; color: var(--accent-deep); font-weight: 700; }

.feed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 24px; }
.segmented-control { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface); }
.segmented-control button { min-height: 34px; padding: 0 16px; border: 0; border-radius: var(--pill); background: transparent; color: var(--ink-muted); font-size: 12.5px; font-weight: 700; transition: background .16s ease, color .16s ease; }
.segmented-control button:hover { background: var(--accent); color: #fff; }
.segmented-control button.active { background: var(--accent); color: #fff; }
.search-small { width: min(260px, 45vw); min-height: 42px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface); font-size: 13px; }
.album-grid, .shoot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.album-card, .shoot-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.album-collage { height: 190px; display: grid; grid-template-columns: 1.15fr .85fr; grid-template-rows: 1fr 1fr; gap: 3px; overflow: hidden; background: var(--line); }
.album-collage img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.album-collage img:first-child { grid-row: span 2; }
.album-cover { max-height: 420px; margin: 0 0 28px; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.album-cover img { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.album-empty { height: 190px; display: grid; place-items: center; background: var(--accent); color: #fff; font: 800 44px "Manrope", sans-serif; }
.album-card-body, .shoot-card-body { padding: 20px; }
.album-card-title, .shoot-card-title { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.album-card-title h3, .shoot-card-title h3 { margin: 0; font: 800 17px "Manrope", sans-serif; letter-spacing: -.02em; }
.album-card-body p, .shoot-card-body p { margin: 8px 0 0; color: var(--ink-muted); font-size: 13px; line-height: 1.6; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.shoot-card-art { height: 160px; position: relative; overflow: hidden; background: var(--accent); }
.shoot-card-art img { width: 100%; height: 100%; object-fit: cover; }
.shoot-status { position: absolute; z-index: 1; right: 12px; bottom: 12px; padding: 7px 13px; border-radius: var(--pill); background: rgba(255, 255, 255, .94); color: var(--ink); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.shoot-card-buttons { display: flex; gap: 8px; margin-top: 16px; }
.shoot-card-buttons .button { min-height: 38px; padding: 0 16px; font-size: 12px; }
.shoot-feed-details { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: -14px 0 26px; padding: 14px 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink-muted); font-size: 13px; }
.shoot-feed-details-label { color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.shoot-feed-details strong { color: var(--ink); font-size: 14px; }
.shoot-feed-location { padding-left: 16px; border-left: 1px solid var(--line); color: var(--ink-soft); }
.studio-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 24px; }
.studio-filters .search-small { flex: 1 1 240px; }
.studio-filters select { min-height: 42px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface); color: var(--ink); font-size: 13px; }
.studio-folder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.studio-folder-card { overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.studio-folder-card:hover, .studio-folder-card:focus-visible { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); outline: none; }
.studio-folder-card > img, .studio-folder-placeholder { display: grid; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.studio-folder-placeholder { place-items: center; color: var(--accent); font-size: 38px; }
.studio-folder-card-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; }
.studio-folder-card-info strong { color: var(--ink); font: 800 15px "Manrope", sans-serif; letter-spacing: -.015em; text-transform: capitalize; }
.studio-folder-card-info small { color: var(--ink-soft); font-size: 11.5px; white-space: nowrap; }
.studio-item-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.studio-item-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.studio-item-image { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.studio-item-info { padding: 18px; }
.studio-item-category { color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.studio-item-info h2 { overflow: hidden; margin: 8px 0 0; color: var(--ink); font: 800 15px "Manrope", sans-serif; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.studio-item-info p { overflow: hidden; margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.studio-item-actions { display: flex; gap: 8px; margin-top: 16px; }
.studio-item-actions .button { min-height: 38px; flex: 1; padding: 0 14px; font-size: 12px; }
.studio-upload-preview { display: grid; justify-items: start; gap: 8px; margin: -4px 0 18px; color: var(--ink-muted); font-size: 12.5px; }
.studio-upload-preview img { display: block; width: min(100%, 260px); max-height: 220px; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--line); object-fit: contain; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, .65fr); align-items: start; gap: 20px; }
.form-panel, .side-panel { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.form-panel h2, .side-panel h3 { margin: 0 0 8px; font: 800 19px "Manrope", sans-serif; letter-spacing: -.025em; }
.form-intro { margin: 0 0 24px; color: var(--ink-muted); font-size: 13px; line-height: 1.65; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { color: var(--ink); font-size: 12.5px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; min-height: 46px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); outline: 0; background: var(--surface); color: var(--ink); font-size: 13.5px; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.65; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(167, 139, 250, .22); }
.field-help { color: var(--ink-soft); font-size: 11.5px; line-height: 1.55; }
/* Starter prompts in the create-photoshoot form (the agent's golden briefs).
   Two columns on a desktop modal, one on a phone; capped height so a long
   corpus never pushes the actual fields below the fold. */
.starter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 236px; overflow-y: auto; padding: 2px; }
.starter-card { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.starter-card:hover { border-color: var(--accent); }
.starter-card.is-selected { border-color: var(--accent); background: rgba(167, 139, 250, .12); }
.starter-card strong { font: 700 12.5px "Manrope", sans-serif; }
.starter-card span { color: var(--ink-muted); font-size: 11px; font-weight: 600; }
.starter-card small { color: var(--ink-soft); font-size: 11px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reference-list { display: grid; gap: 10px; margin-bottom: 16px; }
.reference-item { display: grid; grid-template-columns: 60px minmax(0, 1fr) 38px; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.reference-item img { width: 60px; aspect-ratio: 1; border-radius: var(--radius-sm); object-fit: cover; }
.reference-item input { min-width: 0; min-height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0 14px; font-size: 13px; }
.activity-inputs { display: grid; gap: 9px; }
.activity-row { display: flex; gap: 9px; }
.activity-row input { flex: 1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.side-tip { margin-top: 18px; padding: 18px; border-radius: var(--radius-md); background: var(--blue); color: #235f70; font-size: 12.5px; line-height: 1.65; }
.side-tip strong { display: block; margin-bottom: 6px; color: #1b4c5a; }
.side-steps { display: grid; gap: 16px; margin-top: 20px; }
.side-step { display: grid; grid-template-columns: 26px 1fr; gap: 12px; color: var(--ink-muted); font-size: 12px; line-height: 1.6; }
.side-step b { width: 26px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; }

.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
.profile-photo-row { display: flex; align-items: center; gap: 18px; margin: 0 0 22px; }
.profile-photo { width: 84px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border: 3px solid var(--line); border-radius: 50%; background: var(--accent); color: #fff; font: 800 24px "Manrope", sans-serif; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-field { min-width: 0; }
.profile-photo-field input { border: 0; min-height: auto; padding: 0; font-size: 12.5px; }
.profile-summary { align-self: start; padding: 26px; border-radius: var(--radius); background: var(--deep); color: #fff; }
.profile-summary .button-quiet { color: rgba(255, 255, 255, .72); }
.profile-summary .button-quiet:hover { background: var(--accent); color: #fff; }
.profile-summary .profile-photo { width: 72px; border: 2px solid rgba(255, 255, 255, .35); }
.profile-summary h2 { margin: 18px 0 5px; font: 800 21px "Manrope", sans-serif; letter-spacing: -.025em; overflow-wrap: anywhere; }
.profile-summary > p { margin: 0; color: rgba(255, 255, 255, .7); font-size: 12.5px; overflow-wrap: anywhere; }
.profile-summary > p:has(.button) { margin-top: 20px; }
.profile-summary .button { width: 100%; }
.profile-bio { margin-top: 12px !important; line-height: 1.6; }
.profile-credit { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .19); font-size: 12.5px; }
.profile-credit strong { color: var(--accent); font: 800 24px "Manrope", sans-serif; letter-spacing: -.02em; }

.dashboard-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.dashboard-stat { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.dashboard-stat > span { display: block; color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.dashboard-stat > strong { display: block; margin-top: 12px; color: var(--ink); font: 800 34px "Manrope", sans-serif; letter-spacing: -.035em; }
.dashboard-stat > small { display: block; margin-top: 8px; color: var(--ink-soft); font-size: 11.5px; }
.dashboard-credit-stat { border-color: var(--deep); background: var(--deep); }
.dashboard-credit-stat > span, .dashboard-credit-stat > small { color: rgba(255, 255, 255, .72); }
.dashboard-credit-stat > strong { color: var(--accent); }
.dashboard-generation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.dashboard-generation-grid > .form-panel:first-child { grid-column: 1 / -1; }
.dashboard-job { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.dashboard-job:last-child { border-bottom: 0; }
.dashboard-job-copy { min-width: 0; }
.dashboard-job-copy strong, .dashboard-job-copy small { display: block; }
.dashboard-job-copy strong { color: var(--ink); font-size: 13.5px; }
.dashboard-job-copy small, .dashboard-job-copy p { margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.dashboard-job-copy p { overflow-wrap: anywhere; }
.job-status { flex: 0 0 auto; padding: 6px 13px; border-radius: var(--pill); background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.job-status-queued, .job-status-running { background: var(--accent); color: #fff; }
.job-status-completed { background: var(--blue); color: var(--blue-ink); }
.job-status-failed { background: #d9483b; color: #fff; }
.dashboard-footnote { margin: 18px 2px 0; color: var(--ink-soft); font-size: 11.5px; line-height: 1.6; }
.credits-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .82fr); align-items: start; gap: 20px; }
.balance-panel { padding: 30px; border-radius: var(--radius); background: var(--deep); color: #fff; }
.balance-panel span { color: rgba(255, 255, 255, .68); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.balance-panel strong { display: block; margin-top: 12px; color: var(--accent); font: 800 44px "Manrope", sans-serif; letter-spacing: -.04em; }
.ledger-list { display: grid; }
.ledger-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row strong, .ledger-row small { display: block; }
.ledger-row strong { font-size: 13.5px; }
.ledger-row small { margin-top: 6px; color: var(--ink-soft); font-size: 11.5px; }
.ledger-amount { font-size: 14px; font-weight: 700; }
.ledger-amount.positive { color: var(--blue-ink); }
.ledger-amount.negative { color: #bf3a2e; }
.package-list { display: grid; gap: 12px; margin-top: 18px; }
.package-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.package-card strong { display: block; font-size: 14px; }
.package-card small { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 11.5px; }
.package-price { color: var(--ink); font: 800 16px "Manrope", sans-serif; letter-spacing: -.02em; }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { min-width: 120px; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.admin-table th { color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.admin-table td strong, .admin-table td small { display: block; }
.admin-table td small { margin-top: 5px; color: var(--ink-soft); font-size: 11.5px; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.admin-stat { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.admin-stat span { display: block; color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.admin-stat strong { display: block; margin-top: 10px; font: 800 28px "Manrope", sans-serif; letter-spacing: -.035em; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }

.auth-layout { min-height: min(660px, calc(100vh - 170px)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.auth-visual { min-height: 520px; height: 100%; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--deep); box-shadow: var(--shadow); }
.auth-visual img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.auth-visual::after { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(34, 31, 43, .8), rgba(34, 31, 43, .02) 70%); content: ""; }
.auth-visual-copy { position: absolute; z-index: 1; right: 34px; bottom: 34px; left: 34px; color: #fff; }
.auth-visual-copy p { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.auth-visual-copy p::before { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); content: ""; }
.auth-visual-copy h2 { max-width: 18ch; margin: 0; font: 800 clamp(28px, 3vw, 38px)/1.08 "Manrope", sans-serif; letter-spacing: -.035em; }
.auth-copy { align-self: center; padding: clamp(20px, 3vw, 40px) 0; }
.auth-copy h1 { font-size: clamp(30px, 3.4vw, 42px); }
.auth-copy > p { margin: 14px 0 28px; color: var(--ink-muted); font-size: 14px; line-height: 1.65; }
.auth-copy form { display: grid; gap: 0; }
.auth-copy .button { width: 100%; margin-top: 8px; }
.auth-switch { margin-top: 20px !important; text-align: center; }
.auth-switch button { border: 0; background: transparent; color: var(--accent-deep); font-size: 13px; font-weight: 700; }
.form-error { margin: 0 0 16px; color: #bf3a2e; font-size: 12.5px; line-height: 1.55; }

.empty-state { padding: 56px 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); text-align: center; }
.empty-state-mark { width: 56px; aspect-ratio: 1; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 24px; }
.empty-state h2, .empty-state h3 { margin: 0; font: 800 22px "Manrope", sans-serif; letter-spacing: -.025em; }
.empty-state p { max-width: 44ch; margin: 12px auto 22px; color: var(--ink-muted); font-size: 13.5px; line-height: 1.65; }
.skeleton { min-height: 180px; border-radius: var(--radius); background: linear-gradient(100deg, var(--line) 15%, var(--paper) 35%, var(--line) 55%); background-size: 220% 100%; animation: shimmer 1.2s ease-in-out infinite; }
@keyframes shimmer { to { background-position-x: -220%; } }
.loading-state { padding: 32px; color: var(--ink-muted); font-size: 13.5px; }
.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 90; display: grid; gap: 10px; }
.toast { max-width: min(400px, calc(100vw - 32px)); padding: 15px 22px; border-radius: var(--pill); background: var(--deep); box-shadow: var(--shadow-lg); color: #fff; font-size: 13px; animation: toast-in .18s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } }
.modal-backdrop { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 20px; background: rgba(27, 26, 31, .45); backdrop-filter: blur(4px); }
.modal { width: min(560px, 100%); max-height: min(88vh, 850px); overflow-y: auto; padding: 30px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); }
.modal.modal-wide { width: min(920px, 100%); }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.modal-header h2 { margin: 0; font: 800 22px "Manrope", sans-serif; letter-spacing: -.03em; }
.modal-header p { margin: 8px 0 0; color: var(--ink-muted); font-size: 13px; line-height: 1.6; }
.modal-image { width: 100%; max-height: 62vh; object-fit: contain; border-radius: var(--radius-md); background: var(--paper); }
.demo-image-preview { margin: -4px 0 18px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper); }
.demo-image-preview img { display: block; width: 100%; max-height: 280px; object-fit: contain; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.check-row { display: flex; align-items: start; gap: 10px; color: var(--ink-muted); font-size: 12.5px; line-height: 1.5; }
.check-row input { accent-color: var(--accent); }

@media (min-width: 1450px) {
  .main-content { padding-right: 64px; padding-left: 64px; }
}
@media (max-width: 1080px) {
  .topbar { grid-template-columns: 200px minmax(170px, 1fr) auto; gap: 18px; }
  .workspace { grid-template-columns: 200px minmax(0, 1fr); }
  .sidebar { padding-right: 12px; padding-left: 12px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .album-grid, .shoot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-folder-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-panel { grid-template-columns: 1fr; gap: 32px; }
  .hero-copy h1 { max-width: 20ch; }
  .hero-art { aspect-ratio: 16 / 9; }
  .auth-layout { min-height: auto; grid-template-columns: 1fr; }
  .auth-visual { min-height: 300px; }
}
@media (max-width: 760px) {
  .topbar { height: 68px; grid-template-columns: 1fr auto; gap: 10px; padding: 0 18px; }
  .wordmark { font-size: 21px; }
  .topbar-search { display: none; }
  .top-actions { gap: 8px; }
  .nav-profile-copy, .top-credit { display: none; }
  .mobile-menu-button { width: 40px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 18px; }
  .workspace { min-height: calc(100vh - 68px); display: block; }
  .sidebar { width: min(300px, 84vw); min-height: calc(100vh - 68px); position: fixed; z-index: 40; top: 68px; left: 0; background: var(--paper); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 12px 0 28px rgba(27, 26, 31, .1); }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-nav-backdrop.is-open { position: fixed; z-index: 35; inset: 68px 0 0; display: block; border: 0; background: rgba(27, 26, 31, .3); }
  .main-content { padding: 28px 18px 64px; }
  .hero-copy h1 { font-size: clamp(34px, 8vw, 46px); }
  .hero-copy > p { font-size: 15px; }
  .hero-art { aspect-ratio: 4 / 3; }
  .stat-strip { grid-template-columns: 1fr; margin: 28px 0 40px; }
  .stat-block { padding: 16px 0; border-left: 0; border-top: 1px solid var(--line); }
  .stat-block:first-child { padding-top: 0; border-top: 0; }
  .form-layout, .profile-layout, .credits-grid { grid-template-columns: 1fr; }
  .profile-summary { order: -1; }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-generation-grid { grid-template-columns: 1fr; }
  .dashboard-generation-grid > .form-panel:first-child { grid-column: auto; }
  .auth-visual { min-height: 240px; }
  .auth-copy { padding: 8px 0 0; }
}
@media (max-width: 520px) {
  .main-content { padding-right: 14px; padding-left: 14px; }
  .starter-grid { grid-template-columns: 1fr; max-height: 200px; }
  .page-heading { align-items: start; flex-direction: column; gap: 18px; }
  .page-heading h1 { font-size: 30px; }
  .page-heading-actions { width: 100%; }
  .page-heading-actions .button { flex: 1; }
  .hero-actions .button { flex: 1 1 auto; }
  .photo-grid { grid-template-columns: 1fr; gap: 16px; }
  .photo-card-media { aspect-ratio: 4 / 4.2; }
  .album-grid, .shoot-grid { grid-template-columns: 1fr; }
  .studio-folder-grid { grid-template-columns: 1fr; }
  .studio-item-grid { grid-template-columns: 1fr; }
  .album-collage { height: 200px; }
  .shoot-card-art { height: 180px; }
  .feed-toolbar { align-items: stretch; flex-direction: column; }
  .segmented-control { width: max-content; max-width: 100%; }
  .search-small { width: 100%; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-panel, .side-panel { padding: 20px; }
  .admin-stat-grid { gap: 12px; }
  .admin-stat { padding: 18px; }
  .admin-stat strong { font-size: 24px; }
  .dashboard-stat { padding: 18px; }
  .dashboard-stat > strong { font-size: 28px; }
  .topbar { padding: 0 14px; }
  .top-actions .button { min-height: 40px; padding: 0 16px; font-size: 12px; }
  .top-actions .button-quiet { display: none; }
  .photo-card-footer { gap: 12px; }
  .modal { padding: 22px; }
  .modal-actions .button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Live generation stream: each card is inserted as its photo is persisted. */
.feed-stream-pending {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 13px;
}
.feed-stream-spinner {
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent-deep);
  border-radius: 50%;
  animation: feed-stream-spin .8s linear infinite;
}
.feed-stream-note { margin: 14px 0 0; color: var(--ink-muted); font-size: 13px; }
@keyframes feed-stream-spin { to { transform: rotate(360deg); } }
