.studio-app {
  background: #0B0C10;
  color: #E8E9EE;
  min-height: 100vh;
}
.studio-app .bg-blobs, .studio-app .bg-grid { display: none; }

.studio-nav {
  background: rgba(12,13,18,.88) !important;
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(16px);
}
.studio-nav.scrolled { background: rgba(12,13,18,.94) !important; box-shadow: none; }
.studio-nav .brand-text { color: #fff; }
.studio-nav .nav-links a { color: rgba(255,255,255,.62); }
.studio-nav .nav-links a:hover, .studio-nav .nav-links a.is-on { color: #FFC93C; }
.studio-nav .nav-links a::after { background: #FFC93C; }
.studio-nav .hamburger { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.studio-nav .hamburger span { background: #fff; }

.studio-app-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  min-height: calc(100vh - 72px);
  padding-top: 72px;
}

.rail {
  border-right: 1px solid rgba(255,255,255,.06);
  background: #101218;
  padding: 18px 16px 28px;
  overflow: auto;
  max-height: calc(100vh - 72px);
}
.rail-card + .rail-card { margin-top: 16px; }
.rail-card h3 {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.42); margin-bottom: 12px; font-weight: 600;
}

.drop {
  border: 1px dashed rgba(255,255,255,.16); border-radius: 14px; padding: 22px 14px;
  text-align: center; cursor: pointer; background: #161821; transition: .2s;
}
.drop:hover, .drop.over { border-color: #FFC93C; background: #1C1A14; }
.drop svg { width: 26px; height: 26px; color: #FFC93C; margin-bottom: 8px; }
.drop b { display: block; font-family: Outfit, sans-serif; font-size: 14px; margin-bottom: 3px; }
.drop span { font-size: 12px; color: rgba(255,255,255,.45); }
.drop-actions { display: flex; gap: 8px; margin-top: 10px; }
.mini-btn {
  flex: 1; padding: 8px 10px; border-radius: 99px; border: 1px solid rgba(255,255,255,.12);
  background: #181A22; color: #E8E9EE; font-size: 12px; font-weight: 600;
}
.mini-btn:hover { border-color: #FFC93C; color: #FFC93C; }

.thumbs { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.thumbs[hidden] { display: none; }
.thumb {
  width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex: none;
  border: 1px solid rgba(255,255,255,.1);
  background:
    linear-gradient(45deg, #1a1c24 25%, transparent 25%) 0 0/10px 10px,
    linear-gradient(-45deg, #1a1c24 25%, transparent 25%) 0 0/10px 10px, #12141a;
}
.thumb img, .thumb canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb-label { font-size: 11px; color: rgba(255,255,255,.45); line-height: 1.45; }
.thumb-label b { display: block; color: #fff; font-size: 12px; font-family: Outfit, sans-serif; }

.segment { display: flex; gap: 6px; }
.segment button {
  flex: 1; padding: 9px 6px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1);
  background: #181A22; color: rgba(255,255,255,.7); font-size: 11.5px; font-weight: 600;
}
.segment button.active { background: #fff; border-color: #fff; color: #111; }

.field { margin-top: 13px; }
.field[hidden] { display: none; }
.field-top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.field-top label { font-size: 12.5px; color: rgba(255,255,255,.78); }
.field-top output { font-size: 12px; font-weight: 700; color: #FFC93C; font-family: Outfit, sans-serif; }
input[type=range] {
  width: 100%; -webkit-appearance: none; appearance: none; height: 3px; border-radius: 99px;
  background: linear-gradient(90deg, #C8F06C, #FFC93C); outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid #FFC93C; cursor: pointer;
}

.checks { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.check {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.1); font-size: 12px; cursor: pointer; color: rgba(255,255,255,.72);
}
.check[hidden] { display: none; }
.check input { accent-color: #FFC93C; }

.gen-btn {
  width: 100%; margin-top: 16px; padding: 13px 16px; border: 0; border-radius: 12px;
  font-family: Outfit, sans-serif; font-size: 15px; font-weight: 700; color: #111;
  background: linear-gradient(90deg, #C8F06C 0%, #FFE08A 55%, #FF8A4C 100%);
  cursor: pointer; box-shadow: 0 8px 28px rgba(200,240,108,.18);
}
.gen-btn:hover { filter: brightness(1.05); }
.gen-btn.dirty { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(200,240,108,.18); } }

.colors { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.colors[hidden] { display: none; }
.swatch {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent;
  box-shadow: 0 0 0 1px rgba(255,255,255,.2); cursor: pointer;
}
.swatch.active { border-color: #fff; transform: scale(1.1); }

.stage { display: flex; flex-direction: column; min-width: 0; background: #08090D; }
.view-wrap {
  position: relative; flex: 1; min-height: 560px;
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(80,90,120,.18), transparent 62%),
    #0A0B10;
}
.view-wrap::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 70%);
}
#view { position: relative; z-index: 1; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#view:active { cursor: grabbing; }

.ov-stats {
  position: absolute; z-index: 4; top: 16px; left: 16px;
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  font-size: 11px; color: rgba(255,255,255,.5); letter-spacing: .02em;
}
.ov-stats b { color: #fff; font-weight: 600; margin-left: 5px; font-family: Outfit, sans-serif; }
.ov-print {
  padding: 3px 8px; border-radius: 99px; border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.55);
}
.ov-print.ok { color: #8EE6A8; border-color: rgba(142,230,168,.35); }

.view-empty {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  text-align: center; color: rgba(255,255,255,.45); pointer-events: none;
}
.view-empty[hidden] { display: none; }
.view-empty b { display: block; font-family: Outfit, sans-serif; font-size: 22px; color: #fff; margin-bottom: 8px; }
.view-empty em { color: #C8F06C; font-style: normal; }

.progress {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center;
  background: rgba(8,9,13,.72); backdrop-filter: blur(4px); color: #fff;
}
.progress[hidden] { display: none; }
.spinner {
  width: 40px; height: 40px; margin: 0 auto 12px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.12); border-top-color: #C8F06C;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.view-tools { position: absolute; z-index: 4; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 8px; }
.tool-btn {
  width: 36px; height: 36px; border-radius: 10px; color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
}
.tool-btn:hover, .tool-btn.active { background: #FFC93C; border-color: #FFC93C; color: #111; }
.view-hint {
  position: absolute; z-index: 4; left: 50%; bottom: 16px; transform: translateX(-50%);
  font-size: 11px; color: rgba(255,255,255,.4);
  background: rgba(0,0,0,.35); padding: 6px 12px; border-radius: 99px;
}

.stage-bar { padding: 14px 18px 8px; border-top: 1px solid rgba(255,255,255,.06); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-cell { background: #12141A; border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 10px 12px; }
.stat-cell b { display: block; font-family: Outfit, sans-serif; font-size: 16px; color: #fff; }
.stat-cell span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.export { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.export .btn { flex: 1; min-width: 120px; }
.studio-app .btn-ghost { color: #fff; border-color: rgba(255,255,255,.16); }

.fineprint { margin: 8px 18px 18px; font-size: 12px; color: rgba(255,255,255,.38); line-height: 1.6; }
.warnbox {
  margin: 10px 18px 0; padding: 12px 14px; border-radius: 10px;
  background: #2A220E; border: 1px solid rgba(255,201,60,.25); color: #F0D78A; font-size: 13px;
}
.warnbox[hidden] { display: none; }

.studio-foot {
  display: flex; justify-content: space-between; padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,.06); color: rgba(255,255,255,.35); font-size: 12px;
}
.studio-foot a { color: rgba(255,255,255,.55); }

.studio-app .mobile-menu { background: #101218; }
.studio-app .mobile-menu a { color: #E8E9EE; }

@media (max-width: 1000px) {
  .studio-app-grid { grid-template-columns: 1fr; }
  .rail { max-height: none; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .view-wrap { min-height: 420px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
