/* AI Studio — modern dark UI */

.studio-page {
    --st-bg0: #070b14;
    --st-bg1: #0d1524;
    --st-card: rgba(14, 22, 36, 0.88);
    --st-line: rgba(149, 182, 255, 0.14);
    --st-line-strong: rgba(138, 215, 255, 0.34);
    --st-text: #e8eefc;
    --st-muted: #93a4c4;
    --st-accent: #8ad7ff;
    --st-accent-2: #6ef0b0;
    --st-danger: #ff8e9a;
    --st-radius: 20px;
    --st-shadow: 0 24px 60px rgba(2, 8, 18, 0.45);
    background:
        radial-gradient(ellipse 80% 50% at 10% -10%, rgba(138, 215, 255, 0.16), transparent 55%),
        radial-gradient(ellipse 60% 40% at 90% 0%, rgba(110, 240, 176, 0.1), transparent 50%),
        linear-gradient(180deg, var(--st-bg0), #05080f 70%);
    min-height: 100vh;
    color: var(--st-text);
}

.studio-page .page-shell {
    min-height: 100vh;
}

.studio-gate {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 80px);
    padding: 24px;
}

.studio-gate-card {
    width: min(420px, 100%);
    text-align: center;
    padding: 36px 28px;
    border-radius: 24px;
    border: 1px solid var(--st-line);
    background: var(--st-card);
    box-shadow: var(--st-shadow);
}

.studio-gate-card h1 {
    margin: 0 0 8px;
    font-size: 1.4rem;
}

.studio-gate-card p {
    margin: 0;
    color: var(--st-muted);
}

.studio-gate-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.studio-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 16px 48px;
    display: grid;
    gap: 18px;
}

.studio-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.studio-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.studio-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background:
        conic-gradient(from 180deg at 50% 50%, rgba(138, 215, 255, 0.9), rgba(110, 240, 176, 0.75), rgba(168, 140, 255, 0.85), rgba(138, 215, 255, 0.9));
    box-shadow: 0 0 28px rgba(138, 215, 255, 0.28);
}

.studio-title {
    margin: 0;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.studio-sub {
    margin: 4px 0 0;
    color: var(--st-muted);
    font-size: 0.92rem;
}

.studio-wallet-pill {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--st-line);
    background: rgba(10, 16, 28, 0.75);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.studio-wallet-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--st-muted);
    font-weight: 700;
}

.studio-wallet-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--st-accent);
    font-variant-numeric: tabular-nums;
}

.studio-wallet-value--lg {
    font-size: 1.8rem;
    display: block;
    margin-top: 4px;
}

.studio-seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid var(--st-line);
    background: rgba(8, 12, 22, 0.65);
    width: fit-content;
    max-width: 100%;
}

.studio-seg-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--st-muted);
    font: inherit;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.studio-seg-btn:hover {
    color: var(--st-text);
}

.studio-seg-btn.is-active {
    color: #061119;
    background: linear-gradient(135deg, var(--st-accent), var(--st-accent-2));
    box-shadow: 0 8px 22px rgba(110, 240, 176, 0.18);
}

.studio-panel {
    display: none;
}

.studio-panel.is-active {
    display: block;
    animation: studioIn 0.22s ease;
}

@keyframes studioIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.studio-split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 16px;
    align-items: start;
}

.studio-card {
    border-radius: var(--st-radius);
    border: 1px solid var(--st-line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
        var(--st-card);
    box-shadow: var(--st-shadow);
    padding: 18px;
}

.studio-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.studio-card-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.studio-chip {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--st-accent);
    border: 1px solid rgba(138, 215, 255, 0.28);
    background: rgba(138, 215, 255, 0.08);
    border-radius: 999px;
    padding: 5px 10px;
    white-space: nowrap;
}

.studio-field {
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
    min-width: 0;
}

.studio-field[hidden],
#img-res-wrap[hidden],
#vid-aspect-wrap[hidden] {
    display: none !important;
}

.studio-field > span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--st-muted);
}

.studio-field textarea,
.studio-field select,
.studio-field input,
.studio-modal-card input {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--st-line);
    background: rgba(5, 10, 18, 0.72);
    color: var(--st-text);
    padding: 12px 14px;
    font: inherit;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.studio-field textarea:focus,
.studio-field select:focus,
.studio-field input:focus,
.studio-modal-card input:focus {
    outline: none;
    border-color: var(--st-line-strong);
    box-shadow: 0 0 0 3px rgba(138, 215, 255, 0.14);
}

.studio-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}

.studio-drop {
    border-radius: 16px;
    border: 1px dashed rgba(149, 182, 255, 0.28);
    background: rgba(8, 14, 24, 0.45);
    padding: 12px;
    margin-bottom: 14px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.studio-drop.is-dragover {
    border-color: var(--st-accent);
    background: rgba(138, 215, 255, 0.08);
}

.studio-drop-inner {
    display: grid;
    gap: 8px;
}

.studio-drop-inner strong {
    font-size: 0.9rem;
}

.studio-drop-inner > span {
    color: var(--st-muted);
    font-size: 0.85rem;
}

.studio-refs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.studio-ref-item {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--st-line);
    background: #0a101c;
}

.studio-ref-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.studio-ref-item button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.studio-form-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.studio-price-block {
    display: grid;
    gap: 2px;
}

.studio-price-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--st-muted);
    font-weight: 700;
}

.studio-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--st-text);
}

.studio-btn {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}

.studio-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.studio-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.studio-btn--primary {
    color: #061119;
    background: linear-gradient(135deg, var(--st-accent), var(--st-accent-2));
    box-shadow: 0 12px 28px rgba(110, 240, 176, 0.18);
    min-width: 160px;
}

.studio-btn--ghost {
    color: var(--st-text);
    background: rgba(149, 182, 255, 0.08);
    border: 1px solid var(--st-line);
}

.studio-btn-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(6, 17, 25, 0.25);
    border-top-color: #061119;
    animation: studioSpin 0.7s linear infinite;
}

@keyframes studioSpin {
    to { transform: rotate(360deg); }
}

.studio-alert {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 100, 120, 0.1);
    border: 1px solid rgba(255, 100, 120, 0.28);
    color: #ffb4bc;
    font-size: 0.9rem;
}

.studio-stage {
    min-height: 360px;
    border-radius: 16px;
    border: 1px solid rgba(149, 182, 255, 0.1);
    background:
        radial-gradient(circle at 50% 30%, rgba(138, 215, 255, 0.08), transparent 50%),
        rgba(5, 10, 18, 0.55);
    padding: 14px;
    display: grid;
    gap: 12px;
    align-content: start;
}

.studio-stage--tasks {
    max-height: min(70vh, 720px);
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(138, 215, 255, 0.35) transparent;
}

.studio-tasks-list {
    display: grid;
    gap: 12px;
}

.studio-task {
    border-radius: 14px;
    border: 1px solid var(--st-line);
    background: rgba(8, 14, 24, 0.72);
    padding: 12px;
    display: grid;
    gap: 8px;
}

.studio-task[data-status="running"],
.studio-task[data-status="queued"] {
    border-color: rgba(110, 240, 176, 0.28);
    box-shadow: inset 0 0 0 1px rgba(110, 240, 176, 0.06);
}

.studio-task[data-status="failed"] {
    border-color: rgba(255, 100, 120, 0.28);
}

.studio-task-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.studio-task-title {
    font-weight: 800;
    font-size: 0.92rem;
    flex: 1 1 auto;
    min-width: 0;
}

.studio-task-cost {
    color: var(--st-muted);
    font-size: 0.82rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.studio-task-prompt {
    color: var(--st-muted);
    font-size: 0.86rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.studio-task-status {
    font-size: 0.84rem;
    color: var(--st-muted);
}

.studio-task-status.is-running {
    color: var(--st-accent-2);
}

.studio-task-status.is-error {
    color: #ffb0b8;
}

.studio-task-thumbs,
.studio-history-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.studio-task-thumb {
    appearance: none;
    border: 1px solid var(--st-line);
    background: #0a101c;
    padding: 0;
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
    transition: transform 0.12s ease, border-color 0.12s ease;
}

.studio-task-thumb:hover {
    transform: translateY(-1px);
    border-color: var(--st-line-strong);
}

.studio-task-thumb img,
.studio-task-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Cutout tool ---- */
.studio-split--cutout {
    align-items: start;
}

.studio-card--cutout {
    min-width: 0;
}

.cut-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.cut-tool {
    border: 1px solid var(--st-line);
    background: rgba(10, 16, 28, 0.72);
    color: var(--st-text);
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.cut-tool:hover,
.cut-tool.is-active {
    border-color: var(--st-line-strong);
    color: var(--st-accent);
}

.cut-zoom-meta {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--st-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.cut-stage {
    position: relative;
    height: min(62vh, 560px);
    min-height: 280px;
    border: 1px solid var(--st-line);
    border-radius: 16px;
    background:
        linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.03) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.03) 75%);
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
    overflow: hidden;
    margin-bottom: 12px;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
}

.cut-stage.is-panning {
    cursor: grabbing;
}

.cut-canvas-wrap {
    position: absolute;
    left: 0;
    top: 0;
    will-change: transform;
    transform-origin: 0 0;
}

.cut-canvas-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.cut-canvas-wrap canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* events on stage so pan/zoom work everywhere */
}

.cut-regions {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    max-height: 180px;
    overflow: auto;
    position: relative;
    z-index: 2;
}

.cut-regions-empty {
    color: var(--st-muted);
    font-size: 0.85rem;
    padding: 6px 2px;
}

.cut-region-row {
    display: grid;
    grid-template-columns: 12px 22px minmax(0, 1fr) 28px;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(10, 16, 28, 0.45);
}

.cut-region-row.is-selected {
    border-color: var(--st-line-strong);
    background: rgba(138, 215, 255, 0.08);
}

.cut-region-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.cut-region-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--st-muted);
}

.cut-region-label {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--st-line);
    background: rgba(7, 11, 20, 0.92);
    color: var(--st-text);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.88rem;
    line-height: 1.25;
    pointer-events: auto;
    user-select: text;
    -webkit-user-select: text;
    caret-color: var(--st-accent);
}

.cut-region-label:focus {
    outline: none;
    border-color: var(--st-line-strong);
    box-shadow: 0 0 0 2px rgba(138, 215, 255, 0.18);
}

.cut-region-del {
    border: 0;
    background: transparent;
    color: var(--st-muted);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    pointer-events: auto;
}

.cut-region-del:hover {
    color: var(--st-danger);
}

.cut-prompt-box {
    margin: 4px 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px dashed var(--st-line);
    background: rgba(7, 11, 20, 0.55);
}

.cut-prompt-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--st-muted);
    margin-bottom: 6px;
}

.cut-prompt-preview {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--st-accent);
}

.studio-task-thumbs--layers {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
}

.studio-layer-cell {
    display: grid;
    gap: 6px;
}

.studio-task-thumb--layer {
    position: relative;
    aspect-ratio: 1;
    width: 100%;
}

.studio-layer-badge {
    position: absolute;
    left: 6px;
    top: 6px;
    z-index: 1;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #061018;
    background: linear-gradient(135deg, rgba(138, 215, 255, 0.95), rgba(110, 240, 176, 0.9));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.studio-layer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.studio-layer-use {
    border: 1px solid var(--st-line);
    background: rgba(10, 16, 28, 0.72);
    color: var(--st-text);
    border-radius: 8px;
    padding: 4px 6px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
}

.studio-layer-use:hover {
    border-color: var(--st-line-strong);
    color: var(--st-accent);
}

.studio-layer-use--solo {
    color: var(--st-muted);
}

.studio-layer-bar {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.studio-btn--sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 10px;
}

.studio-task-thumb--video::after {
    content: "▶";
    position: absolute;
    inset: auto 6px 6px auto;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 10px;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.studio-stage-empty {
    min-height: 280px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    color: var(--st-muted);
    text-align: center;
}

.studio-stage-empty[hidden] {
    display: none !important;
}

.studio-stage-hint {
    font-size: 0.8rem;
    opacity: 0.8;
}

.studio-stage-orb {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #c8f0ff, #5aa8ff 45%, transparent 70%);
    opacity: 0.75;
    filter: blur(0.2px);
    animation: studioPulse 2.8s ease-in-out infinite;
}

.studio-stage-orb--video {
    background: radial-gradient(circle at 35% 30%, #b8ffd8, #4fbf88 45%, transparent 70%);
}

@keyframes studioPulse {
    0%, 100% { transform: scale(1); opacity: 0.65; }
    50% { transform: scale(1.08); opacity: 0.9; }
}

.studio-result-status {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(138, 215, 255, 0.08);
    border: 1px solid rgba(138, 215, 255, 0.16);
    color: var(--st-muted);
    font-size: 0.92rem;
}

.studio-result-status.is-error {
    background: rgba(255, 100, 120, 0.08);
    border-color: rgba(255, 100, 120, 0.22);
    color: #ffb0b8;
}

.studio-result-status.is-running {
    background: rgba(110, 240, 176, 0.08);
    border-color: rgba(110, 240, 176, 0.22);
}

.studio-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.studio-result-grid a,
.studio-result-grid img,
.studio-result-grid video {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--st-line);
    background: #0a101c;
    display: block;
    aspect-ratio: 1;
    object-fit: cover;
}

.studio-result-grid video {
    aspect-ratio: 16 / 10;
    object-fit: contain;
    background: #000;
}

.studio-history,
.studio-tx-list {
    display: grid;
    gap: 0;
}

.studio-history-item,
.studio-tx-item {
    display: grid;
    gap: 8px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(149, 182, 255, 0.1);
}

.studio-history-item:last-child,
.studio-tx-item:last-child {
    border-bottom: 0;
}

.studio-history-meta,
.studio-tx-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--st-muted);
    font-size: 0.85rem;
}

.studio-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--st-line);
}

.studio-badge--ok {
    color: #8dffc2;
    border-color: rgba(110, 240, 176, 0.3);
    background: rgba(110, 240, 176, 0.1);
}

.studio-badge--fail {
    color: #ffb0b8;
    border-color: rgba(255, 100, 120, 0.3);
    background: rgba(255, 100, 120, 0.1);
}

.studio-badge--run {
    color: var(--st-accent);
    border-color: rgba(138, 215, 255, 0.3);
    background: rgba(138, 215, 255, 0.1);
}

.studio-history-thumbs .studio-task-thumb {
    width: 92px;
    height: 92px;
}

body.studio-lightbox-open {
    overflow: hidden;
}

.studio-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
}

.studio-lightbox[hidden] {
    display: none !important;
}

.studio-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 14, 0.86);
    backdrop-filter: blur(10px);
}

.studio-lightbox-frame {
    position: relative;
    z-index: 1;
    max-width: min(96vw, 1100px);
    max-height: 88vh;
    display: grid;
    gap: 10px;
    justify-items: center;
}

.studio-lightbox-frame img,
.studio-lightbox-frame video {
    max-width: 96vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 16px;
    border: 1px solid rgba(149, 182, 255, 0.18);
    background: #000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.studio-lightbox-meta {
    color: var(--st-muted);
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
}

.studio-lightbox-close {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(8, 14, 24, 0.7);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.studio-lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 14, 24, 0.7);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.studio-lightbox-nav--prev { left: 14px; }
.studio-lightbox-nav--next { right: 14px; }

.studio-lightbox-nav[hidden],
.studio-lightbox-close:hover,
.studio-lightbox-nav:hover {
    border-color: rgba(138, 215, 255, 0.4);
}

.studio-empty {
    color: var(--st-muted);
    padding: 22px 0;
}

.studio-section-title {
    margin: 18px 0 4px;
    font-size: 0.95rem;
    font-weight: 800;
}

.studio-wallet-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 0 4px;
}

.studio-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 16px;
}

.studio-modal[hidden] {
    display: none !important;
}

.studio-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 14, 0.72);
    backdrop-filter: blur(6px);
}

.studio-modal-card {
    position: relative;
    width: min(420px, 100%);
    border-radius: 20px;
    border: 1px solid var(--st-line);
    background: #0d1524;
    padding: 20px;
    display: grid;
    gap: 12px;
    box-shadow: var(--st-shadow);
}

.studio-modal-card h2 {
    margin: 0;
    font-size: 1.15rem;
}

.studio-amount-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.studio-amount-presets button {
    appearance: none;
    border: 1px solid var(--st-line);
    background: rgba(149, 182, 255, 0.06);
    color: var(--st-text);
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.studio-amount-presets button:hover {
    border-color: var(--st-line-strong);
}

.studio-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.studio-topup-pending {
    display: grid;
    gap: 10px;
    padding-top: 4px;
}

.studio-topup-pending a {
    color: var(--st-accent);
    font-weight: 700;
}

@media (max-width: 920px) {
    .studio-split {
        grid-template-columns: 1fr;
    }

    .studio-stage {
        min-height: 260px;
    }
}

@media (max-width: 560px) {
    .studio-grid-2 {
        grid-template-columns: 1fr;
    }

    .studio-wallet-pill {
        width: 100%;
        justify-content: space-between;
    }

    .studio-seg {
        width: 100%;
    }

    .studio-seg-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}
