@import url("/static/admin.css");

.client-shell { min-height: 100vh; display: flex; flex-direction: column; }
.user-pill {
  font-size: 13px; color: var(--muted); padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.08); border-radius: 999px;
}

/* —— Landing page sign-in section —— */
.landing-signin {
  max-width: 420px;
  margin: 0 auto;
  padding: 0 32px 80px;
  text-align: center;
}
.landing-signin .ma-title { font-size: 1.6rem; }
.landing-signin code {
  font-size: 0.85em;
  background: rgba(255,255,255,.08);
  padding: 2px 6px;
  border-radius: 4px;
}
.features code {
  font-size: 0.85em;
  background: rgba(255,255,255,.06);
  padding: 2px 6px;
  border-radius: 4px;
}

/* —— Manifest Anything sign-in page —— */
.login-page { background: #000; }
.login-page .footer { display: none; }

.ma-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(79, 140, 255, .08), transparent 60%),
              #000;
}
.ma-login-inner {
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.ma-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.ma-logo { display: block; width: 36px; height: 36px; }
.ma-logo svg { width: 100%; height: 100%; display: block; }
.ma-brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.ma-title {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}
.ma-subtitle {
  margin: 0 0 24px;
  font-size: 0.95rem;
  color: #8b95a8;
}
.ma-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
}
.ma-notice-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: #6b7a90;
}
.ma-notice p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #8b95a8;
}
.ma-form-card {
  text-align: left;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(18, 18, 22, .95);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .45);
}
.ma-form { display: flex; flex-direction: column; gap: 18px; }
.ma-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #c8d0dc;
  margin-bottom: 8px;
}
.ma-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ma-field-row label { margin-bottom: 0; }
.ma-forgot {
  font-size: 0.8rem;
  color: #4f8cff;
  text-decoration: none;
}
.ma-forgot:hover { text-decoration: underline; }
.ma-input-wrap { position: relative; }
.ma-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #5c6778;
  pointer-events: none;
}
.ma-input-wrap input {
  width: 100%;
  padding: 13px 14px 13px 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ma-input-wrap input::placeholder { color: #5c6778; }
.ma-input-wrap input:focus {
  border-color: rgba(79, 140, 255, .5);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, .12);
}
.ma-submit {
  width: 100%;
  margin-top: 4px;
  padding: 14px 20px;
  border: 0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #3b82f6 0%, #f59e0b 100%);
  box-shadow: 0 8px 24px rgba(59, 130, 246, .25);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.ma-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(59, 130, 246, .35);
}
.ma-submit:disabled { opacity: .65; cursor: wait; transform: none; }
.ma-footer-link {
  margin: 22px 0 0;
  font-size: 0.9rem;
  color: #8b95a8;
}
.ma-footer-link a {
  color: #4f8cff;
  text-decoration: none;
  font-weight: 500;
}
.ma-footer-link a:hover { text-decoration: underline; }

.login-page .alert {
  text-align: left;
  margin-bottom: 16px;
}

.alert.warn {
  background: rgba(255, 193, 7, .08); border: 1px solid rgba(255, 193, 7, .25);
  color: #ffd76a; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px;
}
.alert.error {
  background: rgba(255, 80, 80, .1); border: 1px solid rgba(255, 80, 80, .3);
  color: #ffb4b4; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px;
}
.alert.ok {
  background: rgba(46, 204, 113, .1); border: 1px solid rgba(46, 204, 113, .3);
  color: #9be7b5; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px;
}

.client-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav-tab {
  padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
  color: var(--muted); text-decoration: none; border: 1px solid transparent;
}
.nav-tab:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-tab.is-active {
  color: #fff; background: rgba(79, 140, 255, .12); border-color: rgba(79, 140, 255, .25);
}
.nav-tab-credits .credit-pill { margin-left: 6px; }
.section-title { font-size: 1.15rem; margin: 0 0 16px; color: #cdd6e3; }

/* —— Generation studio —— */
.gen-studio { max-width: 1060px; margin: 0 auto; padding: 8px 0 56px; }
.gen-hero { text-align: center; margin-bottom: 20px; }
.gen-eyebrow {
  margin: 0 0 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: #6b7a90;
}
.gen-title {
  margin: 0 0 12px; font-size: clamp(1.6rem, 4vw, 2.35rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.15; color: #fff;
}
.gen-title span {
  background: linear-gradient(90deg, #3b82f6 0%, #f59e0b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gen-sub { margin: 0 0 14px; color: #8b95a8; font-size: 0.95rem; max-width: 520px; margin-inline: auto; }
.gen-hero-showcase {
  margin: 0 auto 20px; max-width: 100%;
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 24px 56px rgba(0, 0, 0, .42);
  background: rgba(8, 10, 16, .6);
}
.gen-hero-showcase img {
  display: block; width: 100%; height: auto;
}

.gen-form .panel {
  background: rgba(14, 16, 22, .95);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 18px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, .35);
}

.gen-composer {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
@media (max-width: 820px) {
  .gen-composer { grid-template-columns: 1fr; }
}

.gen-attach {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 16px 10px; margin: 0;
  border-right: 1px solid rgba(255, 255, 255, .07);
  background: rgba(0, 0, 0, .25); cursor: pointer;
  transition: background .15s;
}
.gen-attach:hover, .gen-attach.is-active { background: rgba(79, 140, 255, .08); }
.gen-attach-icon {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; border: 1px dashed rgba(255, 255, 255, .2);
  font-size: 1.25rem; color: #8b95a8;
}
.gen-attach-label { font-size: 11px; color: #8b95a8; text-transform: uppercase; letter-spacing: .06em; }
.gen-attach.has-file .gen-attach-icon { border-style: solid; border-color: rgba(79, 140, 255, .45); color: #8eb8ff; }

.gen-compose-main { display: flex; flex-direction: column; padding: 16px 18px 14px; min-width: 0; }
.gen-prompt {
  flex: 1; width: 100%; min-height: 100px; resize: vertical;
  border: 0; background: transparent; color: #eef2f7;
  font: inherit; font-size: 1rem; line-height: 1.55; outline: none;
}
.gen-prompt::placeholder { color: #5c6778; }
.gen-asset-meta { margin: 6px 0 0; font-size: 12px; color: #8eb8ff; }

.gen-compose-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .06);
  flex-wrap: wrap;
}
.gen-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; flex: 1; min-width: 0;
}
.gen-control {
  display: flex; flex-direction: column; gap: 5px; margin: 0; min-width: 0;
}
.gen-control--compact { flex: 0 0 auto; }
.gen-control--compact .gen-control-box { min-width: 88px; }
.gen-control--wide { flex: 1 1 140px; max-width: 200px; }
.gen-control:not(.gen-control--compact):not(.gen-control--wide):not(.gen-control--engine) {
  flex: 1 1 150px; max-width: 180px;
}
.gen-control--engine {
  flex: 1 1 260px; max-width: 360px;
}
.gen-engine-row {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.gen-control-box--engine {
  flex: 1; min-width: 0;
}
.gen-engine-pill {
  flex-shrink: 0; padding: 6px 10px;
  font-size: 10px; font-weight: 800; letter-spacing: .06em; line-height: 1;
  border-radius: 999px; white-space: nowrap;
}
.gen-engine-pill.is-audio {
  color: #6ee7b7; border: 1px solid rgba(16, 185, 129, .35);
  background: rgba(16, 185, 129, .1);
}
.gen-engine-pill.is-video-only {
  color: #94a3b8; border: 1px solid rgba(148, 163, 184, .3);
  background: rgba(148, 163, 184, .08);
}
.gen-control-label {
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #6b7a90; padding-left: 2px;
}
.gen-control-box {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 0 10px 0 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .11);
  background: rgba(8, 10, 16, .85);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.gen-control:hover .gen-control-box,
.gen-control:focus-within .gen-control-box {
  border-color: rgba(79, 140, 255, .35);
  background: rgba(79, 140, 255, .06);
  box-shadow: 0 0 0 2px rgba(79, 140, 255, .08);
}
.gen-control-icon {
  width: 14px; height: 14px; flex-shrink: 0; color: #5c7cfa;
  opacity: .85;
}
.gen-control-select {
  flex: 1; min-width: 0; width: 100%;
  border: 0; background: transparent; color: #f0f4fa;
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 22px 8px 0; cursor: pointer; color-scheme: dark;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b95a8' d='M1.5 1.5 6 6l4.5-4.5' stroke='%238b95a8' stroke-width='1.2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center;
}
.gen-control-select option { background: #111820; color: #eef2f7; font-weight: 500; }
.gen-control-select:disabled { opacity: .45; cursor: not-allowed; }
.gen-model-hint {
  margin: 10px 0 0; padding: 8px 12px; font-size: 12px; line-height: 1.4;
  color: #c8d4e8; border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, .2);
  background: rgba(245, 158, 11, .06);
}
.gen-engine-info {
  margin: 10px 0 0; padding: 10px 12px; border-radius: 8px;
  border: 1px solid rgba(79, 140, 255, .18);
  background: rgba(79, 140, 255, .04);
}
.gen-engine-helper {
  margin: 0; font-size: 12px; line-height: 1.45; color: #b8c5d8;
}

.gen-submit {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; flex-shrink: 0; padding: 10px 16px; margin: 0;
  border: 0; border-radius: 10px; cursor: pointer; color: #fff;
  background: linear-gradient(90deg, #3b82f6 0%, #f59e0b 100%);
  box-shadow: 0 4px 16px rgba(59, 130, 246, .22);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
@media (max-width: 620px) {
  .gen-compose-footer { flex-direction: column; align-items: stretch; }
  .gen-submit { width: 100%; padding: 12px 16px; }
}
.gen-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(59, 130, 246, .32);
}
.gen-submit:disabled { opacity: .6; cursor: wait; transform: none; }
.gen-submit-label {
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.gen-submit-cost { font-size: 10px; opacity: .92; line-height: 1.2; }
.gen-submit-cost strong { font-size: 12px; font-weight: 700; }

.gen-advanced { margin-top: 14px; padding: 0; overflow: hidden; }
.gen-advanced-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; cursor: pointer; list-style: none;
  transition: background .15s, color .15s;
}
.gen-advanced-summary:hover { background: rgba(255, 255, 255, .03); }
.gen-advanced-summary-text {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.gen-advanced-summary-text strong {
  font-size: 14px; font-weight: 600; color: #e8edf5;
}
.gen-advanced-hint { font-size: 12px; font-weight: 400; color: #6b7a90; }
.gen-advanced-chevron {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .25);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%238b95a8' stroke-width='1.5' d='M1.5 1.5 6 6l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
  transition: transform .2s, border-color .15s;
}
.gen-advanced[open] .gen-advanced-chevron {
  transform: rotate(180deg);
  border-color: rgba(79, 140, 255, .35);
}
.gen-advanced summary::-webkit-details-marker { display: none; }
.gen-advanced-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px;
  padding: 0 18px 18px; border-top: 1px solid rgba(255, 255, 255, .06);
}
@media (max-width: 700px) { .gen-advanced-grid { grid-template-columns: 1fr; } }
.gen-advanced-grid label span {
  display: block; font-size: 12px; color: #8b95a8; margin-bottom: 6px;
}
.gen-advanced-grid input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .3);
  color: #eef2f7; font: inherit;
}
.gen-status { text-align: center; margin-top: 14px; font-size: 14px; min-height: 1.25em; }

.cutscene-panel { padding: 24px; }
.cutscene-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .cutscene-grid { grid-template-columns: 1fr; } }
.cutscene-col h2 { font-size: 1rem; margin: 0 0 8px; }
.cutscene-col h2:not(:first-child) { margin-top: 20px; }
.cutscene-form label { display: block; margin-bottom: 12px; }
.cutscene-form label span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.cutscene-form input, .cutscene-form textarea, .cutscene-form select,
.client-select {
  width: 100%; padding: 10px 36px 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14); background-color: #111820; color: #eef2f7;
  color-scheme: dark; font: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b9cb3' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.cutscene-form select option, .client-select option {
  background-color: #111820; color: #eef2f7;
}
.cutscene-form select:focus, .client-select:focus {
  outline: none; border-color: rgba(79, 140, 255, .45);
  box-shadow: 0 0 0 2px rgba(79, 140, 255, .15);
}
.file-drop {
  display: grid; place-items: center; min-height: 120px; padding: 16px;
  border: 1px dashed rgba(255,255,255,.15); border-radius: 12px; cursor: pointer;
}
.file-drop input { display: none; }
.cutscene-actions { margin-top: 20px; align-items: center; }
.cutscene-results { margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); }
.cutscene-results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cutscene-duration-note { margin: 0 0 16px; }
.cutscene-results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 900px) { .cutscene-results-grid { grid-template-columns: 1fr; } }
.panel.inner { padding: 16px; background: rgba(0,0,0,.2); border-radius: 12px; }
.prompt-panel .prompt-scroll {
  max-height: 220px; overflow: auto; margin: 0 0 12px; white-space: pre-wrap;
  font-size: 13px; line-height: 1.5;
}
.shot-list { margin: 0; padding-left: 18px; max-height: 260px; overflow: auto; }
.shot-list li { margin-bottom: 10px; }

.video-hero {
  padding: 20px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(79,140,255,.08) 0%, rgba(0,0,0,.35) 100%);
  border: 1px solid rgba(79,140,255,.2);
}
.video-hero-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.video-hero-head h3 { margin: 0 0 4px; font-size: 1.05rem; }
.video-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.video-stage {
  display: flex; align-items: center; justify-content: center;
  width: 100%; max-width: 960px; margin: 0 auto;
  aspect-ratio: 16 / 9; max-height: min(54vh, 520px);
  background: #05070a; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.video-stage.is-vertical { aspect-ratio: 9 / 16; max-width: 360px; }
.video-stage.is-square { aspect-ratio: 1 / 1; max-width: 480px; }
.cutscene-video {
  width: 100%; height: 100%; object-fit: contain; display: block; background: #000;
}
.status-pill {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px;
  background: rgba(255,255,255,.08); color: var(--muted);
}
.status-pill.generating { background: rgba(79,140,255,.15); color: #8eb8ff; }
.status-pill.succeeded { background: rgba(46,204,113,.15); color: #9be7b5; }
.status-pill.failed { background: rgba(255,80,80,.15); color: #ffb4b4; }
.trailer-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.trailer-card {
  display: block; padding: 16px; border-radius: 12px; text-decoration: none; color: inherit;
  border: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.2);
}
.trailer-card strong { display: block; margin-bottom: 6px; }
.trailer-card span { font-size: 13px; color: var(--muted); }
.credit-pill {
  display: inline-block; margin-left: 4px; padding: 2px 8px; border-radius: 999px;
  background: rgba(212, 168, 83, .2); color: #f0c96e; font-size: 12px; font-weight: 600;
}

.credits-balance {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  flex-wrap: wrap; margin-bottom: 28px; padding: 20px 24px;
  background: var(--panel); border: 1px solid rgba(255,255,255,.08); border-radius: 14px;
}
.balance-label { display: block; font-size: 13px; color: var(--muted); }
.balance-value { font-size: 2.4rem; font-weight: 700; color: #f39c12; line-height: 1.1; }
.balance-unit { font-size: 14px; color: var(--muted); }
.rate-box { text-align: right; font-size: 14px; color: var(--muted); }
.rate-box strong { display: block; color: var(--text); font-size: 1.1rem; }
.tiny { font-size: 12px; }

.pack-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.pack-card {
  position: relative; text-align: center; padding: 24px 16px 18px;
  background: linear-gradient(180deg, #141820 0%, #0d1016 100%);
  border: 1px solid rgba(255,255,255,.08); border-radius: 16px;
}
.pack-card.best { border-color: rgba(243, 156, 18, .45); box-shadow: 0 0 0 1px rgba(243, 156, 18, .15); }
.pack-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, #3498db, #f39c12); color: #fff; font-size: 11px;
  font-weight: 700; padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.pack-icon { font-size: 28px; margin-bottom: 8px; }
.pack-card h2 { margin: 0 0 8px; font-size: 1rem; }
.pack-credits { margin: 0; font-size: 2rem; font-weight: 800; color: #fff; line-height: 1; }
.pack-credits-label { margin: 4px 0 12px; font-size: 12px; color: var(--muted); }
.pack-price { margin: 0; font-size: 1.5rem; font-weight: 700; color: #f39c12; }
.pack-rate { margin: 4px 0 16px; font-size: 12px; color: var(--muted); }
.btn-buy {
  width: 100%; padding: 12px; border: 0; border-radius: 10px; font-weight: 700; cursor: pointer;
  background: linear-gradient(90deg, #2980b9, #f39c12); color: #fff;
}
.pack-disclaimer { margin: 12px 0 0; font-size: 10px; color: #667; line-height: 1.4; }

.client-studio-panel { margin-bottom: 28px; }
.studio-panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 16px;
}
.studio-panel-head h2 { margin: 0 0 4px; }
.studio-thumb {
  width: 56px; height: 56px; border-radius: 12px; object-fit: cover;
  border: 1px solid rgba(255,255,255,.1);
}
.studio-frame-wrap {
  border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.1);
  background: #0b0f14; min-height: 520px;
}
.studio-frame {
  width: 100%; height: 520px; border: 0; display: block;
}
.card.is-trying {
  outline: 2px solid rgba(79, 140, 255, .55);
  outline-offset: 2px;
}

.building-panel { text-align: center; padding: 32px 24px; }
.building-visual { position: relative; display: inline-block; margin-bottom: 20px; }
.building-portrait {
  width: 120px; height: 120px; border-radius: 20px; object-fit: cover;
  border: 2px solid rgba(255,255,255,.12);
}
.building-spinner {
  position: absolute; inset: -8px; border-radius: 24px;
  border: 3px solid rgba(79, 140, 255, .2);
  border-top-color: #4f8cff;
  animation: ma-spin 1s linear infinite;
}
@keyframes ma-spin { to { transform: rotate(360deg); } }
.building-status { font-size: 1.1rem; font-weight: 600; margin: 0 0 8px; }
.building-detail { margin: 0; max-width: 420px; margin-inline: auto; }
.card .meta.building { color: #4f8cff; }

/* —— Create avatar —— */
.basics-layout {
  display: grid;
  grid-template-columns: 1fr min(280px, 38%);
  gap: 24px;
  align-items: start;
}
@media (max-width: 720px) {
  .basics-layout { grid-template-columns: 1fr; }
  .portrait-preview-box { max-width: 280px; }
}
.basics-fields label { display: block; margin-bottom: 12px; }
.portrait-preview-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 240px; padding: 16px;
  border-radius: 14px; border: 1px dashed rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .3);
}
.portrait-preview-img {
  width: 100%; max-height: 320px; object-fit: cover;
  border-radius: 12px; display: block;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}
.portrait-preview-img.hidden { display: none; }
.portrait-preview-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; color: #6b7a90; padding: 24px 12px;
}
.portrait-preview-placeholder.hidden { display: none; }
.portrait-preview-icon {
  width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 50%; font-size: 24px;
  border: 1px dashed rgba(255, 255, 255, .15); color: #5c6778;
}
.portrait-preview-label { font-size: 13px; line-height: 1.4; max-width: 160px; }

/* —— Generation library —— */
.library-note { margin: 0 0 16px; }
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.library-card {
  overflow: hidden; padding: 0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px; background: rgba(0, 0, 0, .25);
}
.library-thumb {
  aspect-ratio: 16 / 9; background: #05070a;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.library-video {
  width: 100%; height: 100%; object-fit: contain; display: block; background: #000;
}
.library-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; height: 100%; padding: 16px; text-align: center;
}
.library-preview { margin: 0; font-size: 12px; color: #8b95a8; line-height: 1.45; }
.library-meta { padding: 14px 16px 16px; }
.library-meta h3 {
  margin: 0 0 6px; font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.library-sub { margin: 0 0 12px; font-size: 12px; }
.library-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.library-empty {
  text-align: center; padding: 48px 24px; max-width: 480px; margin: 0 auto;
}
.library-empty h2 { margin: 0 0 8px; font-size: 1.2rem; }
.library-empty p { margin: 0 0 20px; }
.btn-small { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.card-body .row { flex-wrap: wrap; gap: 8px; }
.btn-meeting { white-space: nowrap; }

/* —— Meeting modal —— */
.meeting-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.meeting-modal[hidden] { display: none !important; }
.meeting-modal-backdrop {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .72);
}
.meeting-modal-panel {
  position: relative; z-index: 1; width: min(560px, 100%);
  max-height: min(92vh, 760px); overflow: auto; padding: 22px 22px 20px;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(14, 16, 22, .98); box-shadow: 0 28px 80px rgba(0, 0, 0, .55);
}
.meeting-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.meeting-modal-head h2 { margin: 0 0 4px; font-size: 1.2rem; }
.meeting-modal-close {
  border: 0; background: transparent; color: #8b95a8;
  font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.meeting-modal-close:hover { color: #fff; }
.meeting-instructions { margin: 0 0 14px; font-size: 13px; line-height: 1.5; }
.meeting-field { display: block; margin-bottom: 12px; }
.meeting-field span {
  display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600;
  color: #8b95a8; text-transform: uppercase; letter-spacing: .05em;
}
.meeting-field input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(0, 0, 0, .35);
  color: #eef2f7; font: inherit; font-size: 14px;
}
.meeting-field input:focus {
  outline: none; border-color: rgba(79, 140, 255, .45);
  box-shadow: 0 0 0 2px rgba(79, 140, 255, .12);
}
.meeting-status-bar {
  display: flex; align-items: center; gap: 10px; margin: 12px 0;
  padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .35);
  font-size: 13px;
}
.meeting-status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: #6b7a90;
}
.meeting-status-dot.is-working { background: #f59e0b; animation: meeting-pulse 1s ease-in-out infinite; }
.meeting-status-dot.is-active { background: #34d399; }
.meeting-status-dot.is-error { background: #f87171; }
.meeting-status-dot.is-ended { background: #6b7a90; }
@keyframes meeting-pulse {
  0%, 100% { opacity: 1; } 50% { opacity: .35; }
}
.meeting-log {
  margin: 0 0 12px; padding: 10px 12px; max-height: 140px; overflow: auto;
  border-radius: 10px; background: rgba(0, 0, 0, .35);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px; line-height: 1.5; color: #8b95a8; white-space: pre-wrap;
}
.meeting-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
