/* promptarium studio (Oct 2026), loaded after app.css. One app, two pages:
   explore (/)     the scene with the prompt box in it, then a Pinterest-style grid of real prompts and what they made
   create (/create) the prompt box as a side panel, next to everything you've made (a bottom dock on phones) */

:root { --side: 372px; }

/* ---------- top bar: every target looks and feels like a button */
.top { grid-template-columns: 1fr auto 1fr; gap: 20px; background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.top.solid { background: rgba(8, 8, 10, .84); border-color: var(--line); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); }
.views { justify-self: center; display: flex; gap: 2px; padding: 3px; border-radius: 13px; background: rgba(12, 12, 14, .55); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.view-tab { height: 32px; display: inline-flex; align-items: center; gap: 7px; padding: 0 15px; border-radius: 10px; font-size: 13.5px; font-weight: 650; font-stretch: 108%; color: var(--text-2); transition: background .16s var(--ease), color .16s; }
.view-tab:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.view-tab.on, .view-tab.on:hover { background: var(--text); color: var(--bg); }
.view-tab .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 700; display: none; place-items: center; background: var(--safe); color: #fff; }
.view-tab .n.busy { display: inline-grid; }
.top-right { gap: 8px; }
.btn-nav { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); font-size: 13.5px; font-weight: 650; font-stretch: 106%; color: var(--text); white-space: nowrap; transition: background .15s, border-color .15s, transform .12s var(--ease); }
.btn-nav:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .24); }
.btn-nav:active { transform: scale(.97); }
.btn-nav.light { background: var(--text); border-color: transparent; color: var(--bg); }
.btn-nav.light:hover { background: #fff; }
.top .bal { height: 40px; margin-left: 0; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.top .me { width: 40px; height: 40px; margin-left: 0; }

/* the scene */
.hero { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: min(78vh, 760px); padding: 0 16px 34px; overflow: hidden; }
@supports (min-height: 1svh) { .hero { min-height: min(78svh, 760px); } }
/* the library has no scene, but the prompt box lives in it, so it collapses instead of disappearing */
body.view-library .hero { min-height: 0; height: 0; padding: 0; overflow: visible; }
body.view-library .hero-bg, body.view-library .hero-shade, body.view-library .hero .grain { display: none; }
body.view-library .hero-slot { min-height: 0 !important; height: 0; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; transform: scale(1.03); transition: transform 2.4s var(--ease); }
body.ready .hero-bg { transform: none; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(8, 8, 10, .55) 0%, rgba(8, 8, 10, 0) 22%, rgba(8, 8, 10, 0) 52%, rgba(8, 8, 10, .62) 82%, var(--bg) 100%); }
.hero .grain { position: absolute; inset: 0; z-index: 1; opacity: .14; pointer-events: none; background: url(/img/grain.png); mix-blend-mode: overlay; }
/* no z-index here: the docked box must stack against the whole page, not inside the scene */
.hero-slot { position: relative; width: min(860px, 100%); }

/* the prompt box: in the scene, or docked at the bottom */
.dock { position: relative; inset: auto; z-index: 40; display: block; padding: 0; pointer-events: auto; }
.dock .composer { width: 100%; }
body.docked .dock { position: fixed; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
body.docked .dock .composer { width: min(860px, 100%); pointer-events: auto; }
body.docked .dock.arrive .composer { animation: dock-in .42s var(--ease) both; }
@keyframes dock-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* section heads + search */
main { position: relative; z-index: 2; }
.sec-h { margin: 0; font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; font-stretch: 122%; letter-spacing: -.04em; line-height: 1; text-transform: lowercase; }
.sec-n { font-size: 13px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; transition: color .15s; }
a.sec-n:hover { color: var(--text); }
.find { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, .055); color: var(--text-3); transition: background .15s, box-shadow .15s; }
.find:focus-within { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--line-2); }
.find input { width: 200px; height: 100%; border: 0; padding: 0; background: none; font-size: 13.5px; color: var(--text); outline: none; }
.find input::placeholder { color: var(--text-3); }
.find input::-webkit-search-cancel-button { display: none; }

/* explore */
.explore { padding: 8px var(--pad) 220px; }
body.view-library .explore { display: none; }
.x-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.x-title { display: flex; align-items: baseline; gap: 14px; }
.x-tools { display: flex; align-items: center; gap: 10px; }
.x-chips { display: flex; gap: 6px; margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.x-chips::-webkit-scrollbar { display: none; }
.xchip { flex: none; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; font-stretch: 104%; color: var(--text-2); transition: background .15s, color .15s, border-color .15s; }
.xchip:hover { color: var(--text); border-color: rgba(255, 255, 255, .26); }
.xchip.on { background: var(--text); color: var(--bg); border-color: transparent; }
.x-grid { position: relative; min-height: 60vh; }
.x-empty { margin: 12vh 0 0; text-align: center; color: var(--text-3); }
.x-empty a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.x-more { height: 1px; }
.x-end { display: flex; width: fit-content; margin: 34px auto 0; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 650; color: var(--text-2); transition: color .15s, border-color .15s; }
.x-end:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }

/* a card: the picture; on hover, who made it and recreate */
/* content-visibility: cards far off screen aren't drawn and their pictures can be dropped from memory,
   so a long scroll doesn't starve the browser into blank tiles */
.ecard { position: absolute; left: 0; top: 0; overflow: hidden; border-radius: 16px; background: #121215; cursor: zoom-in; content-visibility: auto; transition: transform .45s var(--ease); }
.x-grid.big .ecard { transition: none; }
.ecard img, .ecard .ec-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ecard img { opacity: 0; transition: opacity .5s var(--ease); }
.ecard img.on { opacity: 1; }
.ecard .ec-clip { opacity: 0; transition: opacity .25s; }
.ecard .ec-clip.on { opacity: 1; }
.ec-veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .74) 0%, rgba(0, 0, 0, .2) 40%, rgba(0, 0, 0, 0) 62%); opacity: 0; transition: opacity .22s var(--ease); }
.ec-model { position: absolute; left: 10px; top: 10px; height: 24px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 8px; background: rgba(10, 10, 12, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 11.5px; font-weight: 650; font-stretch: 104%; color: rgba(255, 255, 255, .92); opacity: 0; transition: opacity .2s; }
.ec-dur { position: absolute; right: 11px; top: 11px; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); font-variant-numeric: tabular-nums; transition: opacity .2s; }
.ec-foot { position: absolute; left: 12px; right: 12px; bottom: 12px; opacity: 0; transform: translateY(5px); transition: opacity .22s var(--ease), transform .22s var(--ease); pointer-events: none; }
.ec-title { margin: 0 96px 2px 0; font-size: 13.5px; font-weight: 650; line-height: 1.3; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ec-by { margin: 0 96px 0 0; font-size: 12px; color: rgba(255, 255, 255, .62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-go { position: absolute; right: 10px; bottom: 10px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 700; font-stretch: 106%; opacity: 0; transform: translateY(5px); transition: opacity .22s var(--ease), transform .22s var(--ease), background .15s; }
.ec-go:hover { background: #fff; }
.ecard:hover .ec-veil, .ecard:focus-within .ec-veil, .ecard:hover .ec-model, .ecard:focus-within .ec-model { opacity: 1; }
.ecard:hover .ec-foot, .ecard:hover .ec-go, .ecard:focus-within .ec-foot, .ecard:focus-within .ec-go { opacity: 1; transform: none; }
.ecard:hover .ec-dur { opacity: 0; }
@media (hover: none) {
  .ec-go { opacity: 1; transform: none; height: 30px; padding: 0 12px; font-size: 12.5px; }
}

/* ---------- create: your library, with the prompt box beside it */
.library { display: none; padding: calc(var(--top) + 26px) var(--pad) 220px; }
body.view-library .library { display: block; }
.none { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 440px; margin: 16vh auto 0; text-align: center; font-size: 14px; line-height: 1.5; color: var(--text-3); }
.none-h { font-size: 24px; font-weight: 800; font-stretch: 116%; letter-spacing: -.025em; line-height: 1.1; color: var(--text); }
.none-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }

@media (min-width: 900px) {
  body.view-library .library { padding: calc(var(--top) + 26px) var(--pad) 80px calc(var(--side) + var(--pad)); }
  body.view-library.docked .dock { position: fixed; top: var(--top); bottom: 0; left: 0; right: auto; width: var(--side); display: block; padding: 16px 16px 20px; overflow-y: auto; pointer-events: auto; background: #0b0b0d; border-right: 1px solid var(--line); scrollbar-width: thin; }
  body.view-library.docked .dock .composer { width: 100%; }
  body.view-library .dock.arrive .composer { animation: none; }
  /* the same prompt box, laid out as a column: mode, model, references, prompt, settings, generate */
  body.view-library .composer { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 8px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.view-library .composer:focus-within { border-color: transparent; }
  body.view-library .composer .c-bar, body.view-library .composer .c-chips, body.view-library .composer .c-field { display: contents; }
  body.view-library .composer .seg { grid-column: 1 / -1; order: 1; padding: 4px; border-radius: 13px; }
  body.view-library .composer .seg button { flex: 1; height: 36px; font-size: 14px; }
  body.view-library .composer .chip { order: 5; height: 56px; display: flex; flex-wrap: wrap; align-content: center; column-gap: 6px; row-gap: 1px; text-align: left; padding: 0 12px; border-radius: 12px; background: rgba(255, 255, 255, .045); border: 1px solid var(--line); color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; }
  body.view-library .composer .chip::before { flex-basis: 100%; font-size: 11px; font-weight: 600; font-stretch: 100%; color: var(--text-3); }
  body.view-library .composer .chip:hover, body.view-library .composer .chip[aria-expanded='true'] { background: rgba(255, 255, 255, .08); border-color: var(--line-2); }
  body.view-library .composer .chip.fixed { color: var(--text-2); }
  body.view-library .composer .chip.fixed:hover { background: rgba(255, 255, 255, .045); border-color: var(--line); }
  body.view-library .composer .chip[data-k='model'] { grid-column: 1 / -1; order: 2; height: 62px; font-size: 16px; }
  body.view-library .composer .chip[data-k='model'] .chip-name { max-width: 270px; }
  body.view-library .composer .chip[data-k='model'] svg { margin-left: auto; }
  body.view-library .composer .chip[data-k='model']::before { content: 'Model'; }
  body.view-library .composer .chip[data-k='aspect']::before { content: 'Aspect ratio'; }
  body.view-library .composer .chip[data-k='resolution']::before { content: 'Resolution'; }
  body.view-library .composer .chip[data-k='quality']::before { content: 'Quality'; }
  body.view-library .composer .chip[data-k='count']::before { content: 'How many'; }
  body.view-library .composer .chip[data-k='look']::before { content: 'Look'; }
  body.view-library .composer .chip[data-k='duration']::before { content: 'Length'; }
  body.view-library .composer .chip[data-k='audio']::before { content: 'Audio'; }
  body.view-library .composer .chip[data-k='camera']::before { content: 'Camera move'; }
  body.view-library .composer .c-refs { grid-column: 1 / -1; order: 3; padding: 0; }
  body.view-library .composer .c-add { grid-column: 1 / -1; order: 3; width: auto; height: 52px; margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, .18); font-size: 13px; font-weight: 600; font-stretch: 104%; }
  body.view-library .composer .c-add::after { content: 'Add reference images'; }
  body.view-library .composer .c-add:hover { border-color: rgba(255, 255, 255, .36); background: rgba(255, 255, 255, .03); }
  body.view-library .composer textarea { grid-column: 1 / -1; order: 4; min-height: 150px; max-height: 340px; padding: 13px 14px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font-size: 15px; }
  body.view-library .composer textarea:focus { border-color: rgba(255, 255, 255, .26); background: rgba(255, 255, 255, .055); }
  body.view-library .composer .go { grid-column: 1 / -1; order: 6; height: 52px; margin: 6px 0 0; justify-content: center; border-radius: 14px; font-size: 15px; }
  body.view-library .composer .slot-hint { flex-basis: 100%; padding: 2px 0 0; }
}
.lib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.lib-tools { display: flex; align-items: center; gap: 10px; }
.lib-head .tabs { display: flex; }
.lib-head .tab { align-items: center; }
.lib-head .tab .n { margin-left: 6px; }
.wall { padding: 0; }
.tile { border-radius: 16px; }
.none { margin: 14vh 0 0; }

/* one prompt, big */
.xviewer { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; }
.xviewer[hidden] { display: none; }
.xv-scrim { position: absolute; inset: 0; background: rgba(4, 4, 5, .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .2s var(--ease); }
.xv-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 400px; width: min(1240px, 100%); height: min(820px, 100%); border-radius: 24px; overflow: hidden; background: #0d0d10; border: 1px solid var(--line); box-shadow: 0 40px 120px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(10px) scale(.99); transition: opacity .22s var(--ease), transform .3s var(--ease); }
.xviewer.on .xv-scrim { opacity: 1; }
.xviewer.on .xv-panel { opacity: 1; transform: none; }
.xv-stage { position: relative; display: grid; place-items: center; min-height: 0; background: #000; }
.xv-media { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.xv-side { display: flex; flex-direction: column; min-height: 0; padding: 18px 20px 20px; border-left: 1px solid var(--line); overflow: auto; }
.xv-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.xv-model { height: 26px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 8px; background: var(--fill); font-size: 12px; font-weight: 650; color: var(--text-2); }
.xv-nav { display: flex; gap: 2px; }
.xv-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); transition: background .15s, color .15s; }
.xv-btn:hover:not(:disabled) { background: var(--fill); color: var(--text); }
.xv-btn:disabled { opacity: .3; }
.xv-title { margin: 0 0 6px; font-size: 22px; font-weight: 800; font-stretch: 112%; letter-spacing: -.02em; line-height: 1.15; }
.xv-by { margin: 0 0 16px; font-size: 13px; color: var(--text-3); }
.xv-by a { color: var(--text); font-weight: 600; }
.xv-by a:hover { text-decoration: underline; text-underline-offset: 2px; }
.xv-prompt { flex: 1 1 auto; min-height: 120px; margin: 0; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font: 400 13px/1.6 'Geist Mono', ui-monospace, monospace; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; }
.xv-skel { display: block; height: 12px; margin: 6px 0 10px; border-radius: 6px; background: rgba(255, 255, 255, .07); }
.xv-skel.short { width: 62%; }
.xv-acts { display: flex; gap: 8px; margin-top: 14px; }
.xv-acts .btn { flex: 1; justify-content: center; }
.xv-facts { margin: 12px 0 0; font-size: 12px; color: var(--text-3); }

/* footer, under the explore grid */
.foot { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 26px var(--pad) 150px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
body.view-library .foot { display: none; }
.foot .brand .wm { font-size: 17px; }
.foot .brand .mark { width: 22px; height: 22px; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot nav a { color: var(--text-3); transition: color .15s; }
.foot nav a:hover { color: var(--text); }

@media (max-width: 900px) {
  .xv-panel { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; height: 100%; border-radius: 20px; }
  .xv-side { border-left: 0; border-top: 1px solid var(--line); max-height: 48vh; }
  .find input { width: 140px; }
}
@media (max-width: 720px) {
  .top { grid-template-columns: auto 1fr auto; gap: 8px; }
  .views { justify-self: center; }
  .view-tab { padding: 0 10px; font-size: 13px; }
  .hide-sm { display: none !important; }
  .top-right { gap: 6px; }
  .view-tab { height: 30px; padding: 0 9px; font-size: 12.5px; }
  .btn-nav { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
  .top .bal, .top .me { height: 36px; }
  .top .me { width: 36px; }
  .hero { min-height: 64vh; padding: 0 8px 14px; }
  .x-head { align-items: stretch; flex-direction: column; gap: 12px; }
  .x-tools { justify-content: space-between; }
  .x-tools .find { flex: 1; }
  .find input { width: 100%; }
  .lib-head { flex-direction: column; align-items: stretch; }
  .lib-tools { justify-content: space-between; }
  body.docked .dock { bottom: 8px; padding: 0 8px; }
  .xviewer { padding: 8px; }
}
@media (max-width: 460px) {
  .brand .wm { display: none; }
  .lib-head .tab[data-f='liked'] { display: none; }
}
