/* css/gen.css — dedicated studio chrome */

html, body {
  height: 100%;
}

body.gen-body {
  overflow: hidden;
}

.gen-app {
  display: flex;
  height: 100dvh;
  min-height: 100dvh;
  background: #0d1117;
}

.gen-app,
.gen-app * {
  box-sizing: border-box;
}

.gen-rail {
  display: flex;
  flex-direction: column;
  width: min(22.5rem, 100%);
  flex-shrink: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 12, 20, 0.92);
  padding: 0.85rem 1rem 0.8rem;
  min-height: 0;
  overflow: hidden;
}

.gen-rail-scroll {
  flex: 1;
  min-height: 0;
  overflow: hidden auto;
  display: flex;
  flex-direction: column;
}

.gen-brand {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0.05rem 0 0.75rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
  line-height: 1.05;
  flex-shrink: 0;
}

.gen-brand__name {
  background-image: linear-gradient(to right, #a5b4fc, #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.gen-brand__test {
  margin-left: 0.2rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
}

.gen-test-banner {
  margin: -0.35rem 0 0.75rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.65rem;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: #fde68a;
  font-size: 0.72rem;
  line-height: 1.4;
}

.gen-brand__gen {
  background-image: linear-gradient(to right, #fb7185, #ef4444 55%, #be123c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.gen-nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.gen-nav__group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.gen-nav__title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 0.35rem;
}

.gen-nav__btn {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #94a3b8;
  border-radius: 0.7rem;
  padding: 0.4rem 0.65rem;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  overflow: hidden;
}

.gen-nav__btn:hover:not(:disabled) {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.08);
}

.gen-nav__btn.is-on {
  color: #f8fafc;
  background: rgba(99, 102, 241, 0.16);
}

.gen-nav__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.gen-field {
  margin-bottom: 0.55rem;
}

.gen-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gen-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.gen-rail .gen-nav__title,
.gen-rail .gen-label {
  width: max-content;
  max-width: 100%;
  color: transparent;
  background-image: linear-gradient(to right, #a5b4fc, #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gen-input,
.gen-select,
.gen-textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: rgba(10, 15, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.5rem 0.7rem;
  color: #f8fafc;
}

.gen-textarea {
  min-height: 2.75rem;
  resize: none;
  line-height: 1.5;
}

.gen-input:focus,
.gen-select:focus,
.gen-textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.gen-select {
  cursor: pointer;
}

.gen-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
}

.gen-row > * {
  min-width: 0;
}

#seed {
  appearance: textfield;
  -moz-appearance: textfield;
}

#seed::-webkit-outer-spin-button,
#seed::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.gen-source {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.gen-source-clear {
  appearance: none;
  border: 0;
  background: transparent;
  color: #94a3b8;
  padding: 0;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.gen-source-clear:hover { color: #fecaca; }

.gen-source-clear.hidden { display: none; }

.gen-drop {
  display: grid;
  place-items: center;
  gap: 0.25rem;
  width: 100%;
  min-height: 3.6rem;
  max-height: 4.6rem;
  padding: 0.4rem;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 0.85rem;
  background: rgba(10, 15, 30, 0.55);
  cursor: pointer;
  overflow: hidden;
}

.gen-drop.is-on {
  border-color: #818cf8;
  border-style: solid;
}

.gen-drop img {
  display: block;
  max-height: 3.5rem;
  max-width: 100%;
  border-radius: 0.55rem;
  object-fit: contain;
  cursor: zoom-in;
}

.gen-drop img.hidden {
  display: none;
}

.gen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 0;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.gen-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.gen-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gen-btn-row {
  display: flex;
  gap: 0.5rem;
}

.gen-btn-row .gen-btn,
.gen-btn-row .gen-btn-danger {
  width: auto;
  flex: 1;
}

.gen-btn-reuse {
  background: linear-gradient(135deg, #4ade80, #22c55e 55%, #15803d);
  color: #052e16;
}

.outpost-reuse {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #4ade80, #22c55e 55%, #15803d);
  color: #052e16;
  font-weight: 700;
  cursor: pointer;
}

.outpost-reuse:hover:not(:disabled) {
  filter: brightness(1.06);
}

.outpost-reuse:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gen-btn-pin.is-pinned {
  border-color: rgba(251, 191, 36, 0.55);
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
}

.gen-btn-ghost {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.gen-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.25);
  color: #fecaca;
  font-weight: 700;
  cursor: pointer;
}

.gen-btn-danger:hover:not(:disabled) {
  background: rgba(185, 28, 28, 0.45);
}

.gen-btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gen-meta {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

.gen-status {
  min-height: 1.1rem;
  margin: 0.2rem 0 0.35rem;
}

.gen-rail-actions {
  flex-shrink: 0;
  padding-top: 0.45rem;
  overflow: hidden;
}

.gen-model {
  justify-content: space-between;
  gap: 0.55rem;
  align-items: baseline;
  padding-top: 0.32rem;
  padding-bottom: 0.32rem;
}

.gen-model__name,
.gen-model__price {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gen-model__name {
  min-width: 0;
  flex: 1 1 auto;
}

.gen-model__price {
  flex: 0 1 auto;
  max-width: 58%;
  font-weight: 500;
  font-size: 0.75rem;
  color: #94a3b8;
}

.gen-model.is-on .gen-model__price {
  color: #c7d2fe;
}

.gen-rail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-shrink: 0;
  padding-top: 0.55rem;
  margin-top: 0.35rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.gen-rail-foot-links a,
.gen-rail-foot-links .gen-policy-link {
  color: #94a3b8;
  font-size: 0.78rem;
  text-decoration: none;
}

.gen-rail-foot-links a:hover,
.gen-rail-foot-links .gen-policy-link:hover {
  color: #e2e8f0;
}

#gen-auth a {
  display: grid;
  place-items: center;
  text-decoration: none;
}

#gen-auth img,
#gen-auth .default-avatar {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(165, 180, 252, 0.45);
  font-size: 0.7rem;
}

.gen-canvas {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 18% 0%, rgba(165, 180, 252, 0.06), transparent 28%),
    #0b1018;
}

.gen-stage {
  position: relative;
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1.25rem 0.5rem;
}

.gen-stage-frame {
  position: absolute;
  inset: 1.1rem 1.25rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gen-stage img,
.gen-stage video {
  display: block;
  box-sizing: border-box;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.4rem;
}

.gen-stage img {
  cursor: zoom-in;
}

.gen-stage > img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 2.5rem);
  max-height: calc(100% - 1.6rem);
}

.gen-empty {
  text-align: center;
  color: #475569;
  font-size: 0.95rem;
}

.gen-guest {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.4rem;
  background: rgba(11, 16, 24, 0.78);
  backdrop-filter: blur(10px);
  text-align: center;
}

.gen-guest.hidden {
  display: none !important;
}

.gen-guest__title {
  margin: 0 0 1.15rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.gen-guest__lead {
  background-image: linear-gradient(to right, #a5b4fc, #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.gen-guest__gen {
  background-image: linear-gradient(to right, #fb7185, #ef4444 55%, #be123c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.gen-guest__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(16.5rem, 100%);
}

.gen-guest__actions .gen-btn {
  width: 100%;
  padding: 0.75rem 1rem;
}

.gen-rail-login {
  color: #c7d2fe;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.gen-rail-login:hover {
  color: #fff;
}

.gen-live {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0.5rem;
}

.gen-live__frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(32rem, 86%);
  max-height: calc(100% - 4.6rem);
  aspect-ratio: var(--aspect, 1 / 1);
  border-radius: 0.55rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(99, 102, 241, 0.16), transparent 58%),
    #070b14;
  border: 1px solid rgba(165, 180, 252, 0.2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.gen-live__wash {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  background: linear-gradient(
    108deg,
    transparent 28%,
    rgba(165, 180, 252, 0.04) 42%,
    rgba(216, 180, 254, 0.1) 50%,
    rgba(165, 180, 252, 0.04) 58%,
    transparent 72%
  );
  background-size: 220% 100%;
  animation: gen-wash 2.3s ease-in-out infinite;
}

.gen-live__orbit {
  position: relative;
  z-index: 1;
  width: 4.35rem;
  height: 4.35rem;
}

.gen-live__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.gen-live__ring--outer {
  border-top-color: #c7d2fe;
  border-right-color: rgba(165, 180, 252, 0.28);
  filter: drop-shadow(0 0 7px rgba(165, 180, 252, 0.55));
  animation: gen-spin 1.15s linear infinite;
}

.gen-live__ring--inner {
  inset: 0.72rem;
  border-bottom-color: #e9d5ff;
  border-left-color: rgba(216, 180, 254, 0.35);
  filter: drop-shadow(0 0 6px rgba(216, 180, 254, 0.5));
  animation: gen-spin-rev 1.6s linear infinite;
}

.gen-live__spin {
  position: absolute;
  inset: 0;
  animation: gen-spin 1.15s linear infinite;
}

.gen-live__bead {
  position: absolute;
  top: -0.2rem;
  left: 50%;
  width: 0.48rem;
  height: 0.48rem;
  margin-left: -0.24rem;
  border-radius: 50%;
  background: #eef2ff;
  box-shadow: 0 0 12px 3px rgba(165, 180, 252, 0.75);
}

@keyframes gen-spin {
  to { transform: rotate(360deg); }
}

@keyframes gen-spin-rev {
  to { transform: rotate(-360deg); }
}

@keyframes gen-wash {
  from { background-position: 130% 0; }
  to { background-position: -30% 0; }
}

.gen-live__phase {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 700;
}

.gen-live__time {
  margin: -0.35rem 0 0;
  color: #64748b;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.gen-live__bar {
  width: min(18rem, 70%);
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.gen-live__bar span {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  transition: width 0.2s linear;
}

.gen-live--fail .gen-live__frame {
  display: grid;
  place-items: center;
  min-height: 10rem;
  aspect-ratio: auto;
  width: min(28rem, 86%);
  background: rgba(127, 29, 29, 0.18);
  border-color: rgba(248, 113, 113, 0.35);
}

.gen-live--fail .gen-live__phase { color: #fecaca; }
.gen-live--fail .gen-live__time { color: #fca5a5; max-width: 28rem; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .gen-live__wash,
  .gen-live__ring--outer,
  .gen-live__ring--inner,
  .gen-live__spin { animation: none; }
}

.gen-rail-user {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.gen-rail-credits {
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
}

.gen-rail-credits:hover { color: #fff; }

.gen-canvas-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex: 0 0 auto;
  padding: 0.7rem 1.1rem 0.95rem;
  background: #0b1018;
  position: relative;
  z-index: 4;
}

.gen-canvas-bar .gen-meta {
  min-width: 0;
}

.gen-canvas-bar.is-on {
  display: flex;
}

.gen-prompt-dock {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: 0.35rem 1.25rem 0.85rem;
  background: #0b1018;
}

.gen-composer {
  width: min(46rem, 100%);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1.35rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
  padding: 0.7rem 0.85rem 0.55rem;
}

.gen-composer__input {
  display: block;
  width: 100%;
  min-height: 2.6rem;
  max-height: 7.5rem;
  resize: none;
  overflow-y: auto;
  border: 0;
  background: transparent;
  color: #f8fafc;
  caret-color: #f8fafc;
  -webkit-text-fill-color: #f8fafc;
  opacity: 1;
  font: inherit;
  line-height: 1.45;
  padding: 0.15rem 0.25rem 0.35rem;
  user-select: text;
  -webkit-user-select: text;
  pointer-events: auto;
}

.gen-composer.is-open .gen-composer__input {
  min-height: 14rem;
  max-height: 42vh;
}

.gen-composer__input:focus {
  outline: none;
}

.gen-composer__input::placeholder {
  color: #64748b;
  -webkit-text-fill-color: #64748b;
  opacity: 1;
}

.gen-composer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.gen-composer__counts {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
}

.gen-composer__tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.gen-composer__expand {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.6rem;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.gen-composer__expand:hover,
.gen-composer.is-open .gen-composer__expand {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.12);
}

.gen-composer__expand svg {
  width: 1.05rem;
  height: 1.05rem;
}

.gen-composer__go {
  width: auto;
  padding: 0.55rem 0.95rem;
  border-radius: 0.8rem;
  font-size: 0.85rem;
}

.gen-film-shell {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #0b1018;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  position: relative;
  z-index: 4;
}

.gen-film-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.15rem 1rem 0;
}

.gen-film-bar:not(:has(.gen-film-toggle:not([hidden]))) {
  display: none;
}

.gen-film-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  padding: 0.22rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: #cbd5e1;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.gen-film-toggle:hover {
  border-color: #818cf8;
  color: #f8fafc;
  background: rgba(99, 102, 241, 0.18);
}

.gen-film-toggle[hidden] {
  display: none !important;
}

.gen-film {
  --film-thumb: 4.2rem;
  --film-gap: 0.35rem;
  --film-rows: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--film-thumb));
  grid-auto-rows: var(--film-thumb);
  justify-content: start;
  align-content: start;
  gap: var(--film-gap);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 0 0 auto;
  height: calc(var(--film-thumb) + 0.55rem + 0.9rem);
  padding: 0.55rem 1rem 0.9rem;
  background: #0b1018;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.gen-film.is-animating {
  transition: height 0.42s cubic-bezier(0.22, 1, 0.32, 1);
}

.gen-film::-webkit-scrollbar {
  width: 8px;
}

.gen-film::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.gen-film:empty {
  height: 1.45rem;
  padding: 0.55rem 1rem 0.9rem;
  overflow: hidden;
}

.gen-film:empty,
.gen-film .gen-meta {
  grid-template-columns: 1fr;
}

.gen-thumb {
  position: relative;
  display: block;
  border-radius: 0.4rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: #0b1220;
  cursor: pointer;
  padding: 0;
}

.gen-thumb img,
.gen-thumb video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.gen-thumb__actions {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.15rem;
  padding: 0.15rem;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.72), transparent 70%);
  opacity: 1;
}

@media (hover: hover) {
  .gen-thumb__actions { opacity: 0; }
  .gen-thumb:hover .gen-thumb__actions,
  .gen-thumb:focus-within .gen-thumb__actions { opacity: 1; }
}

.gen-icon-btn {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  cursor: pointer;
}

.gen-icon-btn:hover { background: #312e81; }
.gen-icon-btn.is-danger:hover { background: #7f1d1d; color: #fecaca; }
.gen-icon-btn svg { width: 0.7rem; height: 0.7rem; }

.gen-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 0.75rem;
  background: rgba(2, 6, 23, 0.92);
  cursor: zoom-out;
}

.gen-lightbox.open { display: grid; }

.gen-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  cursor: default;
}

.gen-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  border: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
}

.gen-confirm {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  background: rgba(2, 6, 23, 0.72);
  padding: 1.25rem;
}

.gen-confirm.open { display: grid; }

.gen-confirm__box {
  width: min(26rem, 100%);
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1.1rem;
  padding: 1.35rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.gen-confirm__box p {
  color: #cbd5e1;
  margin: 0 0 1.1rem;
  line-height: 1.5;
}

.gen-policy-box {
  width: min(34rem, 100%);
  max-height: min(78vh, 40rem);
  overflow: auto;
}

.gen-policy-box h2 {
  margin: 0 0 0.75rem;
  color: #f8fafc;
  font-size: 1.15rem;
  font-weight: 800;
}

.gen-policy-box h3 {
  margin: 1rem 0 0.4rem;
  color: #a5b4fc;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gen-policy-box ul {
  margin: 0 0 0.35rem;
  padding-left: 1.1rem;
  color: #cbd5e1;
  line-height: 1.55;
  font-size: 0.88rem;
}

.gen-policy-box li { margin: 0.28rem 0; }

.gen-policy-link {
  border: 0;
  background: none;
  padding: 0;
  color: #a5b4fc;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.gen-policy-link:hover { color: #e9d5ff; }

.gen-live .gen-policy-link { margin-top: 0.15rem; }

.gen-rail-foot-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#studio {
  min-height: 0;
  overflow: hidden;
}

.gen-gate {
  padding: 0.4rem 0 0.2rem;
}

#gen-auth .gen-rail-login {
  display: inline;
}

.gen-wallet {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.gen-wallet[hidden],
.hidden {
  display: none !important;
}

.gen-packs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.gen-pack {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
}

.gen-pack:hover:not(:disabled) {
  border-color: #818cf8;
  background: rgba(99, 102, 241, 0.18);
}

.gen-custom {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.gen-custom .gen-input { max-width: 6.5rem; padding: 0.5rem 0.65rem; }
.gen-custom .gen-btn { width: auto; padding: 0.5rem 0.75rem; font-size: 0.8rem; }

.gen-rail-toggle {
  display: none;
}

.gen-inspect {
  width: 19.25rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 12, 20, 0.92);
  padding: 0.9rem 1rem 1rem;
}

.gen-inspect.hidden {
  display: none;
}

.gen-inspect__title {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background-image: linear-gradient(to right, #a5b4fc, #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.gen-inspect__empty {
  margin: 0;
  color: #475569;
  font-size: 0.85rem;
  line-height: 1.5;
}

.gen-inspect__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.gen-inspect__body.hidden {
  display: none;
}

.gen-inspect__prompt-wrap {
  position: relative;
  background: rgba(10, 15, 30, 0.72);
  border: 1px solid rgba(165, 180, 252, 0.16);
  border-radius: 0.9rem;
  padding: 0.7rem 0.75rem 2.15rem;
  margin-bottom: 0.35rem;
}

.gen-inspect__prompt {
  margin: 0.35rem 0 0;
  max-height: 9.25rem;
  overflow: auto;
  color: #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.gen-inspect__copy {
  position: absolute;
  right: 0.45rem;
  bottom: 0.4rem;
  border: 0;
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.gen-inspect__copy:hover {
  background: rgba(99, 102, 241, 0.32);
  color: #eef2ff;
}

.gen-inspect__share {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.15rem 0 0.7rem;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.gen-inspect__share.hidden {
  display: none;
}

.gen-thumb.is-pinned {
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.7);
}

.gen-thumb.is-pinned .gen-thumb-pin {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.28);
}

.gen-inspect__rows {
  margin: 0;
  overflow: auto;
  min-height: 0;
}

.gen-inspect__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.58rem 0.05rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.gen-inspect__row dt {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.gen-inspect__row dd {
  margin: 0;
  text-align: right;
  color: #f1f5f9;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  body.gen-body { overflow: auto; }
  .gen-app {
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
  }
  .gen-rail {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    max-height: none;
    overflow: hidden;
  }
  .gen-canvas {
    min-height: 70dvh;
    height: 70dvh;
    overflow: hidden;
  }
  .gen-stage { min-height: 0; }
  .gen-prompt-dock { padding: 0 0.75rem 0.75rem; }
  .gen-composer.is-open .gen-composer__input { min-height: 10rem; max-height: 32vh; }
  .gen-inspect {
    width: 100%;
    border-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    max-height: 46vh;
  }
}
