/* Studio screens (Generate, Library, Characters, Voices, Asset Bank): floating glass composer, pill controls, masonry feed */
.nav-label { margin: 14px 12px 4px; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.nav-label:first-child { margin-top: 0; }

.st { max-width: 1240px; }
.st-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 6px 0 26px; }
.st-head h1 { font: 700 clamp(30px, 3.6vw, 46px)/1.05 var(--display); letter-spacing: -.02em; margin: 8px 0 0; }
.st-head p { color: var(--text-2); margin: 10px 0 0; max-width: 620px; }
.st-eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); }
.st-eyebrow::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: var(--grad); }

/* composer: glass card with a slowly turning gradient edge */
@property --st-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.st-composer {
  position: relative; border-radius: 26px; padding: 18px 18px 14px; margin-bottom: 38px;
  background: linear-gradient(180deg, rgba(16, 26, 60, .78), rgba(8, 14, 36, .86)) padding-box,
    conic-gradient(from var(--st-a), rgba(34, 211, 238, .7), rgba(47, 123, 255, .15), rgba(139, 92, 246, .7), rgba(47, 123, 255, .15), rgba(34, 211, 238, .7)) border-box;
  border: 1px solid transparent; backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -30px rgba(47, 123, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: st-spin 12s linear infinite;
}
@keyframes st-spin { to { --st-a: 360deg; } }
@media (prefers-reduced-motion: reduce) { .st-composer { animation: none; } .st-shimmer { animation: none !important; } }
.st-composer textarea {
  width: 100%; border: 0; outline: 0; resize: vertical; min-height: 96px; margin: 14px 0 10px; padding: 4px 6px;
  background: transparent; font: 400 18px/1.55 var(--font); color: var(--text);
}
.st-composer textarea::placeholder { color: rgba(182, 195, 230, .45); }

.st-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(4, 8, 23, .55); border: 1px solid var(--line); }
.st-seg.wrap { flex-wrap: wrap; }
.st-seg button {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 10px; border: 0; cursor: pointer;
  background: transparent; color: var(--text-2); font-weight: 500; transition: .15s;
}
.st-seg button svg { width: 15px; height: 15px; }
.st-seg button:hover { color: var(--text); }
.st-seg button.on { background: rgba(47, 123, 255, .22); color: #fff; box-shadow: inset 0 0 0 1px rgba(91, 155, 255, .45); }
.st-seg i { font-style: normal; font: 500 11px var(--mono); color: var(--muted); }

.st-refs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.st-ref { position: relative; width: 58px; height: 58px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: rgba(4, 8, 23, .5); display: grid; place-items: center; }
.st-ref img { width: 100%; height: 100%; object-fit: cover; }
.st-ref button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .65); cursor: pointer; }
.st-ref button svg { width: 11px; height: 11px; }
.st-ref.add { width: auto; padding: 0 14px; gap: 6px; grid-auto-flow: column; color: var(--text-2); border-style: dashed; cursor: pointer; font-size: 13px; }
.st-ref.add:hover { color: #fff; border-color: var(--cyan); }
.st-ref.add svg { width: 15px; height: 15px; }

.st-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.st-prov { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(4, 8, 23, .55); border: 1px solid var(--line); }
.st-prov button { border: 0; background: transparent; color: var(--text-2); padding: 6px 13px; border-radius: 999px; cursor: pointer; font-weight: 500; font-size: 13px; }
.st-prov button.on { background: var(--grad); color: #fff; }
.st-pill { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 0 12px; height: 34px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(20, 34, 78, .45); font-size: 13px; }
.st-pill:hover { border-color: rgba(91, 155, 255, .6); }
.st-pill span { color: var(--muted); font-size: 11.5px; }
.st-pill select { border: 0; outline: 0; background: transparent; color: var(--text); font-weight: 500; padding: 6px 4px; cursor: pointer; max-width: 190px; }
.st-pill select option { background: var(--panel-solid); }
.st-pill:focus-within { box-shadow: 0 0 0 2px rgba(34, 211, 238, .45); }
.st-go {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; font: 600 14px var(--font); white-space: nowrap; box-shadow: 0 10px 30px -8px rgba(47, 123, 255, .8); transition: .15s;
}
.st-go svg { width: 16px; height: 16px; }
.st-go:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.1); }
.st-go:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.st-hint { margin: 10px 4px 0; font-size: 12.5px; color: var(--amber); }
.st-hint svg { width: 14px; height: 14px; vertical-align: -2px; }

.st-sec { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.st-sec h2 { font: 600 18px var(--display); margin: 0; }
.st-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; color: var(--cyan); cursor: pointer; font-size: 13px; font-weight: 500; }
.st-link svg { width: 14px; height: 14px; }
.st-link:hover { color: #fff; }
.st-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.st-search { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(4, 8, 23, .5); min-width: 260px; }
.st-search svg { width: 15px; height: 15px; color: var(--muted); }
.st-search input { border: 0; outline: 0; background: transparent; flex: 1; }

/* masonry feed */
.st-masonry { columns: 4 240px; column-gap: 16px; }
.st-masonry:has(> .st-empty) { columns: 1; }
.st-card { break-inside: avoid; margin-bottom: 16px; border-radius: 18px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s; }
.st-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .8); }
.st-media { position: relative; background: #050a1c; }
.st-media img, .st-media video { display: block; width: 100%; height: auto; }
.st-kind { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; text-transform: capitalize; background: rgba(4, 8, 23, .7); backdrop-filter: blur(6px); }
.st-kind svg { width: 12px; height: 12px; }
.st-hover { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: .15s; }
.st-card:hover .st-hover, .st-tile:hover .st-hover, .st-hover:focus-within { opacity: 1; }
.st-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; border: 0; cursor: pointer; color: #fff; background: rgba(4, 8, 23, .72); backdrop-filter: blur(6px); }
.st-ic svg { width: 15px; height: 15px; }
.st-ic:hover { background: var(--blue); }
.st-ic.danger:hover { background: var(--rose); }
.st-cap { padding: 12px 14px 13px; }
.st-cap p { margin: 0 0 8px; font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); }
.st-shimmer, .st-failed { display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; padding: 16px; min-height: 120px; max-height: 420px; }
.st-shimmer { color: var(--text-2); background: linear-gradient(110deg, rgba(20, 34, 78, .5) 30%, rgba(47, 123, 255, .28) 50%, rgba(20, 34, 78, .5) 70%); background-size: 250% 100%; animation: st-sheen 1.6s linear infinite; }
.st-shimmer span { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; }
.st-shimmer svg { width: 16px; height: 16px; color: var(--cyan); }
@keyframes st-sheen { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.st-failed { color: var(--rose); background: rgba(251, 113, 133, .06); }
.st-failed svg { width: 22px; height: 22px; }
.st-failed small { color: var(--muted); font-size: 11.5px; }
.st-audio { display: flex; align-items: center; gap: 10px; padding: 34px 14px 14px; }
.st-audio svg { width: 22px; height: 22px; color: var(--cyan); flex: none; }
.st-audio audio { width: 100%; height: 36px; }
.st-empty { break-inside: avoid; grid-column: 1 / -1; display: grid; place-items: center; gap: 4px; padding: 48px; border-radius: 18px; border: 1px dashed var(--line-2); color: var(--muted); text-align: center; }
.st-empty svg { width: 28px; height: 28px; color: var(--blue-2); }

/* asset bank */
.st-drop { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px; margin-bottom: 22px; border-radius: 18px; border: 1.5px dashed var(--line-2); color: var(--text-2); cursor: pointer; transition: .15s; background: rgba(4, 8, 23, .35); }
.st-drop svg { width: 18px; height: 18px; color: var(--cyan); }
.st-drop:hover, .st-drop.over { border-color: var(--cyan); background: rgba(34, 211, 238, .06); color: #fff; }
.st-drop.sm { padding: 12px; margin: 0; font-size: 13px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.st-tile { margin: 0; border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: .2s; }
.st-tile:hover { border-color: var(--line-2); transform: translateY(-2px); }
.st-tile-media { position: relative; aspect-ratio: 1; background: #050a1c; display: grid; place-items: center; }
.st-tile-media img, .st-tile-media video { width: 100%; height: 100%; object-fit: cover; }
.st-tile-media .st-audio { padding: 14px; width: 100%; flex-direction: column; }
.st-filebox svg { width: 34px; height: 34px; color: var(--muted); }
.st-tile figcaption { padding: 10px 12px; display: grid; gap: 2px; }
.st-tile figcaption b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-tile figcaption small { color: var(--muted); font-size: 11.5px; }

/* voices */
.st-voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.st-voice { display: grid; gap: 12px; padding: 18px; border-radius: 20px; border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 0% 0%, hsla(var(--h), 85%, 60%, .16), transparent 60%), var(--panel); }
.st-voice-top { display: flex; align-items: center; gap: 12px; }
.st-voice-top h3 { margin: 0; font: 600 16px var(--display); }
.st-voice-top small { color: var(--muted); font-size: 12px; }
.st-orb { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 700 17px var(--display);
  background: conic-gradient(from 200deg, hsl(var(--h), 85%, 62%), hsl(calc(var(--h) + 60), 85%, 58%), hsl(var(--h), 85%, 62%)); box-shadow: 0 0 22px hsla(var(--h), 85%, 60%, .45); }
.st-voice p { margin: 0; font-size: 13px; color: var(--text-2); }
.st-voice audio { width: 100%; height: 36px; }
.st-row { display: flex; align-items: center; gap: 6px; }

/* reference picker */
.st-picker { width: min(760px, 92vw); }
.st-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; max-height: 56vh; overflow: auto; padding: 2px; }
.st-pick-grid button { position: relative; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: #050a1c; cursor: pointer; aspect-ratio: 3/4; }
.st-pick-grid img { width: 100%; height: 100%; object-fit: cover; }
.st-pick-grid span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 11px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); text-transform: capitalize; }
.st-pick-grid button.on { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .25); }

@media (max-width: 720px) {
  .st-head { flex-direction: column; align-items: flex-start; }
  .st-bar .spacer { display: none; }
  .st-go { width: 100%; justify-content: center; }
  .st-search { min-width: 0; width: 100%; }
}
