/* The two studios (edit + generate): a three-column desktop workspace. */
.studio-top { padding-bottom: 18px; }
.studio-top.page-top { padding-top: calc(var(--nav-h) + 22px); }
.studio-head { width: min(1680px, 100% - 40px); margin-inline: auto; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.studio-title { font-size: 30px; }
.studio-head p { color: var(--muted); font-size: 15px; }
.studio { position: relative; isolation: isolate; }
.studio::before { content: ""; position: absolute; inset: -140px 0 auto 0; height: 520px; z-index: -1; background: radial-gradient(40% 60% at 22% 30%, rgba(255, 122, 79, .13), transparent 70%), radial-gradient(40% 60% at 78% 20%, rgba(138, 108, 255, .14), transparent 70%); pointer-events: none; }
.studio-grid { width: min(1680px, 100% - 40px); margin-inline: auto; display: grid; grid-template-columns: 288px minmax(0, 1fr) 408px; gap: 16px; height: clamp(620px, calc(100vh - var(--nav-h) - 96px), 920px); }
.studio[data-mode="generate"] .studio-grid { grid-template-columns: 400px minmax(0, 1fr) 190px; }
.panel { display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 16px; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(24, 24, 31, .92), rgba(15, 15, 19, .92)); box-shadow: 0 0 0 1px var(--line) inset, 0 30px 80px -40px rgba(0, 0, 0, .9); backdrop-filter: blur(20px); }
.slot-label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.note { display: flex; gap: 8px; align-items: flex-start; margin-top: auto; font-size: 12.5px; line-height: 1.45; color: var(--faint); }
.note .ic { width: 14px; height: 14px; margin-top: 2px; flex: none; color: var(--ok); }

/* ----- photo slots */
.slot { position: relative; }
.drop { position: relative; width: 100%; aspect-ratio: 4 / 5; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 18px; text-align: center; border-radius: 18px; color: var(--soft); background: rgba(255, 244, 230, .025); transition: background .25s, transform .3s var(--ease-out); isolation: isolate; }
.drop { border: 1.5px dashed var(--line-3); }
.drop:hover, .drag .drop { border-color: transparent; }
.drop::before { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; background: none; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s; z-index: -1; }
.drop:hover, .drag .drop { background: rgba(255, 150, 110, .07); }
.drop:hover::before, .drag .drop::before { background: conic-gradient(from var(--beam), #ffc46b, #ff7a4f, #f0489b, #8a6cff, #ffc46b); animation: beam 3s linear infinite; opacity: 1; }
.drop .ic { width: 44px; height: 44px; padding: 11px; border-radius: 14px; color: var(--amber); background: var(--grad-soft); box-shadow: 0 0 0 1px var(--line-2) inset; margin-bottom: 8px; transition: transform .4s var(--spring); }
.drop:hover .ic { transform: translateY(-4px) scale(1.06); }
.drop b { font-size: 15.5px; font-weight: 600; color: var(--text); }
.drop small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.drop em { font-style: normal; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 6px; }
.slot-ref .drop { aspect-ratio: 5 / 3; }
.slot-preview { position: relative; border-radius: 18px; overflow: hidden; background: var(--ink-3); box-shadow: 0 0 0 1px var(--line-2) inset; animation: pop-in .5s var(--spring); }
@keyframes pop-in { from { opacity: 0; transform: scale(.92); } }
.slot-preview img { width: 100%; max-height: 300px; object-fit: contain; background: #000; }
.slot-ref .slot-preview img { max-height: 170px; }
.slot-act { position: absolute; inset: auto 8px 8px 8px; display: flex; gap: 6px; justify-content: center; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s var(--ease-out); }
.slot-preview:hover .slot-act, .slot-preview:focus-within .slot-act { opacity: 1; transform: none; }
.slot-act button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(8, 8, 10, .78); backdrop-filter: blur(10px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .16) inset; }
.slot-act button:hover { background: #fff; color: #0b0b0d; }
.slot-act .ic { width: 14px; height: 14px; }

/* ----- stage */
.stage-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
.stage { position: relative; flex: 1; min-height: 0; border-radius: var(--r-xl); overflow: hidden; isolation: isolate; display: grid; place-items: center; background-color: #0b0b0e; background-image: radial-gradient(rgba(255, 244, 230, .07) 1px, transparent 1px); background-size: 22px 22px; box-shadow: 0 0 0 1px var(--line) inset; }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: 0 0 120px 30px rgba(0, 0, 0, .55) inset; z-index: 5; }
.stage.drag { box-shadow: 0 0 0 2px var(--coral) inset; }
.stage-empty, .stage-view, .stage-fx { position: absolute; inset: 0; display: grid; place-items: center; padding: 26px; }
.stage-empty { text-align: center; }
.empty-card { display: grid; justify-items: center; gap: 12px; max-width: 420px; animation: pop-in .6s var(--ease-out); }
.empty-card .big-ic { width: 76px; height: 76px; padding: 20px; border-radius: 24px; color: var(--amber); background: var(--grad-soft); box-shadow: 0 0 0 1px var(--line-2) inset, 0 30px 60px -20px rgba(255, 122, 79, .5); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.empty-card h2 { font-family: var(--serif); font-size: 30px; font-weight: 480; letter-spacing: -.025em; }
.empty-card p { color: var(--muted); font-size: 15px; }
/* the selected template's example, shown until a photo is added */
.stage-empty, .stage-view { display: flex; align-items: center; justify-content: center; }
.example { position: relative; height: 100%; min-height: 0; aspect-ratio: 3 / 4; max-width: 100%; animation: pop-in .5s var(--ease-out); }
.example .ba, .example .thumb { position: absolute; inset: 0; border-radius: 22px; box-shadow: 0 0 0 1px var(--line-2), 0 50px 100px -40px #000; }
.example .thumb img { width: 100%; height: 100%; object-fit: cover; }
.example-cap { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: rgba(8, 8, 10, .72); backdrop-filter: blur(12px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .16) inset; pointer-events: none; }
.example-cap i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.stage-view img.solo { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 18px; box-shadow: 0 0 0 1px var(--line-2), 0 50px 100px -40px #000; }
.stage-view .frame { position: relative; max-width: 100%; max-height: 100%; height: 100%; display: grid; place-items: center; }
.stage-view .ba { max-height: 100%; max-width: 100%; border-radius: 18px; box-shadow: 0 0 0 1px var(--line-2), 0 50px 100px -40px #000; }
.stage-view .ba img { display: block; }
/* the reveal when a render lands: a wipe with a glowing edge, then a soft flash */
.reveal { animation: reveal 1.25s var(--ease-out) both; }
@keyframes reveal { 0% { clip-path: inset(0 100% 0 0); filter: brightness(1.9) saturate(1.3); } 70% { filter: brightness(1.15); } 100% { clip-path: inset(0 0 0 0); filter: none; } }
.reveal-line { position: absolute; top: 4%; bottom: 4%; width: 3px; left: 0; background: #fff; box-shadow: 0 0 40px 10px rgba(255, 180, 120, .9), 0 0 120px 30px rgba(240, 72, 155, .5); border-radius: 3px; z-index: 6; pointer-events: none; animation: reveal-line 1.25s var(--ease-out) both; }
@keyframes reveal-line { 0% { left: 0; opacity: 1; } 85% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.peek { position: absolute; left: 16px; bottom: 16px; z-index: 6; width: 92px; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5), 0 20px 40px -10px #000; cursor: zoom-in; transition: transform .35s var(--spring); }
.peek:hover { transform: scale(1.06); }
.peek img { width: 100%; display: block; }
.peek span { position: absolute; inset: auto 0 0 0; padding: 10px 6px 4px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-align: center; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); }
.stage-view.peeking img.solo { opacity: 0; } .stage-view .under { position: absolute; inset: 26px; display: grid; place-items: center; opacity: 0; transition: opacity .2s; pointer-events: none; }
.stage-view .under img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 18px; }
.stage-view.peeking .under { opacity: 1; }
.demo-badge { position: absolute; top: 12px; left: 12px; z-index: 7; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: #1a1206; background: var(--amber); }

/* ----- rendering effect: the photo "develops" under a scanning beam with drifting sparks */
.stage-fx { padding: 0; z-index: 4; background: #07070a; overflow: hidden; }
.stage-fx::before { content: ""; position: absolute; inset: -6%; background: var(--src, none) center / cover no-repeat; filter: blur(22px) saturate(.55) brightness(.5); animation: breathe 5s ease-in-out infinite; }
.stage-fx.no-src::before { background: radial-gradient(50% 50% at 30% 30%, rgba(255, 122, 79, .5), transparent 70%), radial-gradient(50% 50% at 70% 60%, rgba(138, 108, 255, .5), transparent 70%), radial-gradient(40% 40% at 50% 90%, rgba(240, 72, 155, .45), transparent 70%); filter: blur(50px); animation: breathe 5s ease-in-out infinite, drift 14s ease-in-out infinite alternate; }
@keyframes breathe { 50% { transform: scale(1.08); } }
@keyframes drift { to { rotate: 25deg; } }
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; }
.fx-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: linear-gradient(180deg, transparent calc(var(--beam-y, 50%) - 26%), #000 var(--beam-y, 50%), transparent calc(var(--beam-y, 50%) + 4%)); mask-image: linear-gradient(180deg, transparent calc(var(--beam-y, 50%) - 26%), #000 var(--beam-y, 50%), transparent calc(var(--beam-y, 50%) + 4%)); animation: beam-y 3.4s var(--ease) infinite; }
.fx-beam { position: absolute; left: 0; right: 0; top: var(--beam-y, 50%); height: 2px; background: linear-gradient(90deg, transparent, #fff 20%, #ffd9a8 50%, #fff 80%, transparent); box-shadow: 0 0 30px 6px rgba(255, 170, 110, .8), 0 0 90px 20px rgba(240, 72, 155, .45); animation: beam-y 3.4s var(--ease) infinite; }
@property --beam-y { syntax: "<percentage>"; initial-value: 0%; inherits: true; }
@keyframes beam-y { 0% { --beam-y: -4%; } 100% { --beam-y: 104%; } }
.fx-hud { position: relative; z-index: 2; display: grid; justify-items: center; gap: 6px; padding: 28px 34px 24px; border-radius: 28px; background: rgba(10, 10, 14, .62); backdrop-filter: blur(22px) saturate(1.4); box-shadow: 0 0 0 1px rgba(255, 255, 255, .13) inset, 0 40px 90px -30px #000; min-width: 260px; text-align: center; }
.ring { width: 112px; height: 112px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring-bg { stroke: rgba(255, 255, 255, .1); }
.ring-fg { stroke: url(#rg); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .5s var(--ease); filter: drop-shadow(0 0 8px rgba(255, 122, 79, .8)); }
.fx-hud b { position: absolute; top: 28px; height: 112px; display: grid; place-items: center; font-family: var(--serif); font-size: 30px; font-weight: 480; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
#stage-msg { margin-top: 8px; font-size: 15.5px; font-weight: 600; min-height: 1.5em; transition: opacity .3s; }
#stage-eta { font-size: 12.5px; color: var(--muted); min-height: 1.4em; }
.fx-hud .btn { margin-top: 10px; }

/* ----- result bar */
.stage-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px 10px 16px; border-radius: 18px; background: rgba(20, 20, 26, .9); box-shadow: 0 0 0 1px var(--line) inset; animation: rise .5s var(--ease-out); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.ai-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); }
.ai-tag .ic { width: 14px; height: 14px; }
.bar-note { font-size: 13px; color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-act { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }

/* ----- template picker */
.p-pick { padding: 12px; gap: 10px; }
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: rgba(255, 244, 230, .05); }
.tabs button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color .25s; }
.tabs button[aria-selected="true"] { color: #0b0b0d; }
.tabs .ic { width: 16px; height: 16px; }
.tab-ink { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--text); transition: transform .4s var(--spring); }
.tabs[data-on="prompt"] .tab-ink { transform: translateX(100%); }
.tab-body { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1; position: relative; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; background: rgba(255, 244, 230, .05); box-shadow: 0 0 0 1px var(--line) inset; color: var(--muted); transition: box-shadow .2s; }
.search:focus-within { box-shadow: 0 0 0 1px var(--line-3) inset; color: var(--text); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 14px; }
.search input::placeholder { color: var(--faint); }
.search .ic { width: 16px; height: 16px; }
.cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 26px 2px 2px; margin: -2px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); scroll-behavior: smooth; }
.cats::-webkit-scrollbar { display: none; }
.cats .chip { flex: none; }
.tips ul { display: grid; gap: 8px; }
.tips li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; color: var(--muted); }
.tips .ic { width: 14px; height: 14px; margin-top: 2px; flex: none; color: var(--amber); }
.p-in .note { margin-top: auto; }
.p-studio .nav-in { width: min(1680px, 100% - 40px); }
.cats .chip { height: 30px; padding: 0 11px; font-size: 12.5px; }
.t-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: start; padding: 2px 4px 8px 2px; margin-right: -6px; scrollbar-width: thin; scrollbar-color: var(--ink-4) transparent; }
.t-grid h3 { grid-column: 1 / -1; position: sticky; top: -2px; z-index: 3; margin: 8px 0 0; padding: 8px 2px 6px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: linear-gradient(180deg, #131318 70%, transparent); }
.t-item { position: relative; display: grid; gap: 5px; text-align: left; border-radius: 13px; transition: transform .3s var(--ease-out); }
.t-item .thumb { aspect-ratio: 3 / 4; border-radius: 12px; box-shadow: 0 0 0 1px var(--line) inset; }
.t-item .thumb img { transition: transform .6s var(--ease-out); }
.t-item:hover .thumb img { transform: scale(1.07); }
.t-item .thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 1px var(--line) inset; pointer-events: none; transition: box-shadow .2s; }
.t-item:hover .thumb::after { box-shadow: 0 0 0 1.5px var(--line-3) inset; }
.t-item[aria-pressed="true"] .thumb::after { box-shadow: 0 0 0 2.5px var(--coral) inset, 0 0 0 4px rgba(8, 8, 10, .6) inset; }
.t-item[aria-pressed="true"] .thumb::before { content: ""; position: absolute; right: 6px; top: 6px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.500 4.500L19 7.500'/%3E%3C/svg%3E") center / 13px no-repeat; animation: pop-in .35s var(--spring); }
.t-item span.nm { font-size: 11.5px; line-height: 1.25; color: var(--soft); padding: 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-item .ph { font-size: 13px; padding: 8px; } .t-item .ph small { display: none; }
.t-item .two { position: absolute; left: 6px; top: 6px; z-index: 2; padding: 3px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; background: rgba(8, 8, 10, .75); backdrop-filter: blur(8px); }
.t-none { grid-column: 1 / -1; padding: 30px 10px; text-align: center; color: var(--muted); font-size: 14px; }
textarea { width: 100%; resize: none; padding: 14px; border-radius: 14px; border: 0; outline: 0; background: rgba(255, 244, 230, .05); box-shadow: 0 0 0 1px var(--line) inset; font-size: 15px; line-height: 1.5; transition: box-shadow .2s, background .2s; }
textarea:focus { box-shadow: 0 0 0 1px var(--line-3) inset, 0 0 0 4px rgba(255, 122, 79, .12); background: rgba(255, 244, 230, .07); }
textarea::placeholder { color: var(--faint); }
.count { align-self: flex-end; margin-top: -4px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.sugs { display: flex; flex-wrap: wrap; gap: 6px; overflow-y: auto; }
.sugs .chip { height: 32px; font-size: 12.5px; }
.go { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.picked { display: flex; gap: 12px; align-items: center; animation: rise .35s var(--ease-out); }
.picked-thumb { width: 44px; aspect-ratio: 3 / 4; border-radius: 9px; flex: none; }
.picked-thumb .ph { font-size: 0; padding: 0; }
.picked small { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.picked b { font-size: 15px; font-weight: 600; line-height: 1.25; }
.opts { display: grid; gap: 8px; animation: rise .35s var(--ease-out); }
.opts .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.opts .chip { height: 30px; padding: 0 11px; font-size: 12.5px; }
.opts input { width: 100%; height: 40px; padding: 0 12px; border-radius: 12px; border: 0; outline: 0; background: rgba(255, 244, 230, .05); box-shadow: 0 0 0 1px var(--line) inset; font-size: 14px; }
.opts input:focus { box-shadow: 0 0 0 1px var(--line-3) inset; }
.go-btn { width: 100%; --bh: 54px; font-size: 16.5px; }
.go-btn.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.quota { text-align: center; font-size: 12px; color: var(--faint); min-height: 1.4em; }

/* ----- generate composer */
.p-compose { gap: 18px; overflow-y: auto; scrollbar-width: thin; }
.field { display: grid; position: relative; }
.p-compose textarea { min-height: 150px; font-family: var(--serif); font-size: 18px; line-height: 1.4; }
.p-compose .count { position: absolute; right: 10px; bottom: 8px; margin: 0; }
.aspects { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.aspects button { display: grid; justify-items: center; align-content: end; gap: 6px; height: 62px; padding: 6px 0; border-radius: 12px; font-size: 11.5px; font-weight: 600; color: var(--muted); background: rgba(255, 244, 230, .04); box-shadow: 0 0 0 1px var(--line) inset; transition: color .2s, background .2s, box-shadow .2s, transform .25s var(--spring); }
.aspects button i { display: block; border: 1.5px solid currentColor; border-radius: 3px; height: 24px; aspect-ratio: var(--ar); max-width: 30px; }
.aspects button:hover { color: var(--text); }
.aspects button[aria-checked="true"] { color: var(--text); background: rgba(255, 122, 79, .14); box-shadow: 0 0 0 1.5px var(--coral) inset; transform: translateY(-2px); }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.styles button { display: flex; align-items: center; gap: 8px; min-height: 40px; line-height: 1.2; padding: 4px 10px; border-radius: 12px; font-size: 12.5px; font-weight: 600; color: var(--soft); text-align: left; background: rgba(255, 244, 230, .04); box-shadow: 0 0 0 1px var(--line) inset; transition: color .2s, background .2s, box-shadow .2s; }
.styles button i { width: 18px; height: 18px; border-radius: 6px; flex: none; background: linear-gradient(135deg, hsl(var(--h) 85% 62%), hsl(calc(var(--h) + 60) 80% 48%)); }
.styles button:hover { color: var(--text); background: rgba(255, 244, 230, .08); }
.styles button[aria-checked="true"] { color: var(--text); background: rgba(255, 122, 79, .14); box-shadow: 0 0 0 1.5px var(--coral) inset; }
.p-compose .go { margin-top: auto; }
.frame-ghost { height: min(100%, 560px); max-width: 100%; aspect-ratio: var(--ar, 3 / 4); border-radius: 22px; display: grid; place-items: center; text-align: center; padding: 20px; border: 1.5px dashed var(--line-2); background: rgba(255, 244, 230, .02); transition: aspect-ratio .5s var(--ease-out); }
.p-hist { padding: 14px; }
.hist { flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 8px; align-content: start; scrollbar-width: thin; }
.hist button { border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line) inset; animation: pop-in .5s var(--spring); position: relative; }
.hist button[aria-current="true"] { box-shadow: 0 0 0 2px var(--coral); }
.hist img { width: 100%; display: block; }
.hist-empty { font-size: 12.5px; color: var(--faint); text-align: center; padding: 20px 4px; line-height: 1.4; }

@media (max-width: 1180px) {
  .studio-grid, .studio[data-mode="generate"] .studio-grid { grid-template-columns: minmax(0, 1fr); height: auto; }
  .panel, .stage-col { min-width: 0; }
  .p-pick { order: 2; } .stage-col { order: 3; } .bar-act { margin-left: 0; }
  .aspects { grid-template-columns: repeat(4, 1fr); } .styles { grid-template-columns: repeat(2, 1fr); }
  .stage { min-height: 520px; }
  .p-in { flex-direction: row; flex-wrap: wrap; } .p-in .slot { flex: 1; min-width: 220px; } .drop { aspect-ratio: 16 / 9; }
  .t-grid { max-height: 460px; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .p-hist .hist { grid-auto-flow: column; grid-auto-columns: 110px; overflow-x: auto; }
}
