/* Prisma: light studio UI built from the brand mark (sunrise orange-pink, plum, electric blue-teal). */
:root {
  --bg: #F5F4F8; --panel: #FFFFFF; --panel2: #F0EEF4; --line: #E4E1EA; --ink: #111318; --muted: #5F6270;
  --sun: linear-gradient(135deg, #FFD54A 0%, #FF8A42 45%, #FF2D7A 100%);
  --sea: linear-gradient(135deg, #3646FF 0%, #258CFF 55%, #16D6C3 100%);
  --pink: #D9145C; --accent-text: #C8104F; --link: #2B3BDB; --sun-btn: linear-gradient(135deg, #C9420C 0%, #D9145C 55%, #A50E4A 100%); --orange: #FF8A42; --plum: #5C2D91; --blue: #3646FF; --teal: #16D6C3; --gold: #FFD54A;
  --on-ink: #fff; --danger: #C62828; --ok: #0E6E48; --radius: 14px;
  --shadow: 0 1px 2px #1113180d, 0 6px 20px #11131812;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); }
h1 { font-size: 24px; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 16px; margin: 0; letter-spacing: -0.01em; }
h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; font-weight: 700; }
.muted { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.small { font-size: 12px; }
.hidden { display: none !important; }
button, select, input, textarea { font: inherit; color: var(--ink); }
button, .btn { border: 0; border-radius: 10px; padding: 8px 13px; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--ink); color: var(--on-ink); }
button:hover, .btn:hover { filter: brightness(1.1); }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
button.ghost { background: var(--panel); color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
button.ghost:hover { background: var(--panel2); filter: none; }
button.primary, .btn.primary { background: var(--sun-btn); color: #fff; font-size: 15px; padding: 10px 18px; box-shadow: 0 4px 14px #ff2d7a40; }
button.small { padding: 5px 10px; font-size: 12px; }
button.wide { width: 100%; }
select, .search, .name-input, textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
textarea { width: 100%; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.5; }
input[type=range] { accent-color: var(--pink); width: 100%; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.row.end { justify-content: flex-end; }
.inline { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.hint { color: var(--muted); margin: 6px 0; font-size: 12px; line-height: 1.45; }
.seg { display: inline-flex; background: var(--panel2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { background: transparent; color: var(--muted); font-weight: 600; padding: 6px 12px; border-radius: 8px; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px #11131822; }
.seg.wide { display: flex; } .seg.wide button { flex: 1; }
.seg.small button { font-size: 12px; padding: 4px 9px; }

/* header */
.top { height: 60px; display: flex; align-items: center; gap: 24px; padding: 0 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-icon { width: 34px; height: 34px; }
.brand-word { height: 30px; margin-top: 2px; }
.views { display: flex; gap: 4px; }
.views button { background: transparent; color: var(--muted); font-weight: 600; padding: 8px 14px; }
.views button.on { background: var(--panel2); color: var(--ink); }
.count { white-space: nowrap; font-size: 11px; background: var(--pink); color: #fff; border-radius: 999px; padding: 1px 7px; }
.count:empty { display: none; }
.top-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.pill { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: var(--panel2); white-space: nowrap; font-weight: 600; }
.pill.ok { background: #e3f6ec; color: var(--ok); }
.pill.bad { background: #fde8e8; color: var(--danger); }

/* studio layout */
.view { height: calc(100vh - 60px); }
.studio { display: grid; grid-template-columns: 400px minmax(0, 1fr) 380px; }
.col { overflow: auto; padding: 16px 18px 40px; min-width: 0; }
.ing-col { background: var(--panel); border-right: 1px solid var(--line); display: grid; grid-template-columns: 72px minmax(0, 1fr); padding: 0; overflow: hidden; }
.rail { background: var(--panel2); border-right: 1px solid var(--line); overflow-y: auto; padding: 8px 6px 30px; display: flex; flex-direction: column; gap: 2px; }
.rail button { position: relative; flex-direction: column; gap: 2px; background: transparent; color: var(--muted); padding: 7px 2px 6px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.rail button .ic { font-size: 20px; line-height: 1; }
.rail button .ct { position: absolute; top: 3px; right: 5px; background: var(--pink); color: #fff; border-radius: 999px; font-size: 9px; padding: 0 5px; line-height: 15px; }
.rail button:hover { background: var(--panel); filter: none; color: var(--ink); }
.rail button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 4px #11131822; }
.rail button.tool:not(.on) .lb { color: var(--plum); }
.rail-step { font-size: 8.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: center; line-height: 1.15; padding: 8px 0 3px; margin-top: 4px; border-top: 1px solid var(--line); }
.rail-step:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.panel { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.panel-head { padding: 14px 14px 6px; border-bottom: 1px solid var(--line); }
.panel-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.panel .cards, .tool-panel { overflow-y: auto; flex: 1; padding: 10px 14px 20px; margin: 0; align-content: start; }
.panel-foot { display: flex; gap: 6px; padding: 8px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sub-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.sub-tabs:empty { display: none; }
.sub-tabs button { background: transparent; border: 1px solid var(--line); color: var(--ink); font-weight: 500; padding: 3px 9px; font-size: 12px; border-radius: 999px; }
.sub-tabs button .n { color: var(--muted); font-size: 10px; }
.sub-tabs button.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.sub-tabs button.on .n { color: #fff9; }
.card-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; margin-top: 6px; }
.linkish { background: none; color: var(--link); padding: 0; font-weight: 600; }
.linkish:hover { text-decoration: underline; filter: none; }
.empty-hint { grid-column: 1 / -1; padding: 20px 4px; }
.out-col { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.col-title { margin-bottom: 10px; }
.search { width: 100%; }
.group-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 4px; }
.group-tabs button { background: var(--panel2); color: var(--ink); font-weight: 500; padding: 5px 9px; font-size: 12px; border-radius: 999px; }
.group-tabs button .ct { background: var(--pink); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 6px; }
.group-tabs button.on { background: var(--ink); color: var(--on-ink); }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 12px; }
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card.in { outline: 3px solid var(--pink); outline-offset: -1px; }
.card .pic { aspect-ratio: 1; background: #000; position: relative; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .tag { position: absolute; left: 5px; bottom: 5px; font-size: 9px; padding: 1px 5px; border-radius: 5px; background: #000a; color: #fff; }
.card .tag.ai { background: var(--sun); }
.card .check { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #ffffffd9; color: #111318; font-weight: 800; }
.card.in .check { background: var(--pink); color: #fff; }
.card .mk { position: absolute; top: 5px; left: 5px; padding: 2px 7px; font-size: 10px; background: #000c; color: #fff; border-radius: 6px; opacity: 0; }
.card:hover .mk, .card .mk:focus-visible { opacity: 1; }
.card .nm { padding: 6px 8px 8px; font-size: 12px; font-weight: 600; line-height: 1.25; }
.card .nm .rn { display: block; font-weight: 400; color: var(--muted); font-size: 11px; margin-top: 1px; }
.card .dots { display: flex; gap: 3px; padding: 0 8px 8px; margin-top: -3px; }
.card .dots i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px #0002; }
.card .mk { padding: 2px 6px; font-size: 12px; }
.card .del { position: absolute; top: 34px; right: 5px; width: 24px; height: 24px; padding: 0; border-radius: 50%; background: #000b; color: #fff; opacity: 0; }
.card:hover .del { opacity: 1; }
/* tool panels */
.tp-block { margin-bottom: 16px; }
.tp-block h4 { margin: 0 0 8px; font-size: 13px; }
.combo-strip, .mini-strip { display: flex; border-radius: 8px; overflow: hidden; height: 26px; box-shadow: inset 0 0 0 1px #0001; }
.combo-strip i, .mini-strip i { flex: 1; }
.mini-strip { height: 12px; width: 54px; border-radius: 4px; flex: none; }
.active-combo { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-weight: 600; font-size: 12px; }
.harmonies { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.harm { background: var(--panel2); color: var(--ink); font-weight: 500; font-size: 12px; justify-content: flex-start; padding: 6px 8px; }
.harm.on { outline: 2px solid var(--pink); background: var(--panel); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.sw { position: relative; width: 40px; height: 40px; border-radius: 10px; box-shadow: inset 0 0 0 1px #0002; cursor: pointer; display: block; }
.sw input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.sw .x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; padding: 0; border-radius: 50%; font-size: 11px; display: none; }
.sw:hover .x { display: flex; }
.sw.add { background: var(--panel2); color: var(--muted); font-size: 18px; }
.base-pick { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line); }
.base-pick input { width: 200%; height: 200%; margin: -50%; border: 0; cursor: pointer; }
.name-small { flex: 1; min-width: 90px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.combo-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; padding: 5px 4px; border-radius: 10px; font-size: 12px; }
.combo-row .combo-strip { height: 22px; }
.combo-row.on { background: #ff2d7a14; }
.combo-row .cn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-row button.small { padding: 3px 8px; }
.tone-preview { width: 100%; border-radius: 12px; display: block; }
.zone-ramp { display: flex; height: 16px; border-radius: 6px; overflow: hidden; margin-top: 6px; }
.zone-ramp i { flex: 1; }
.chips-row { display: flex; flex-wrap: wrap; gap: 5px; }
.chipbtn { background: var(--panel2); color: var(--ink); font-weight: 500; font-size: 12px; padding: 5px 10px; border-radius: 999px; }
.zone { display: grid; grid-template-columns: minmax(0, 1fr) 30px 86px 22px; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.zone:has(.ends) { grid-template-columns: minmax(0, 1fr) 34px 70px 38px 22px; }
.zone .zl { display: flex; flex-direction: column; line-height: 1.25; font-size: 12px; }
.zone .zsw { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 0 1px #0003; cursor: pointer; }
.zone .zsw input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.zone .ends { font-size: 10px; color: var(--muted); text-align: center; }
.zone .rel { background: transparent; color: var(--muted); padding: 0; visibility: hidden; }
.zone.over .rel { visibility: visible; }
.zone.over .zl b { color: var(--accent-text); }
.el-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.el-card { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--panel); }
.el-card:hover { box-shadow: var(--shadow); }
.el-card.on { outline: 3px solid var(--pink); outline-offset: -1px; }
.el-pic { aspect-ratio: 16 / 10; background: var(--panel2); position: relative; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.el-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.el-pic.auto img { filter: saturate(.75); opacity: .85; }
.el-pic .tag { position: absolute; left: 4px; bottom: 4px; font-size: 9px; padding: 1px 5px; border-radius: 5px; color: #fff; background: var(--sun); }
.el-card .nm { font-size: 11px; font-weight: 600; padding: 4px 6px 5px; line-height: 1.2; }
.el-card .mk { position: absolute; top: 4px; right: 4px; padding: 1px 5px; font-size: 11px; background: #000b; border-radius: 6px; opacity: 0; }
.el-card:hover .mk { opacity: 1; }
.el-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; align-items: center; }
.el-chiphead { width: 100%; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #888); margin-top: 4px; }
.el-chips .el-chip { position: relative; color: var(--ink); font-size: 12px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); cursor: pointer; }
.el-chips .el-chip.on { background: var(--ink); color: var(--on-ink); border-color: transparent; }
.el-dot { position: absolute; top: 1px; right: 1px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
/* bowl extras, explore, recent */
.bowl-extras { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; max-width: 640px; }
.xchip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 8px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow); }
.xchip img { width: 32px; height: 20px; border-radius: 5px; object-fit: cover; }
.xchip button { background: var(--panel2); color: var(--ink); width: 20px; height: 20px; padding: 0; border-radius: 50%; font-size: 12px; }
.explore-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.small-select { padding: 4px 8px; font-size: 12px; }
.adv-label.dim { opacity: .4; }
.recent { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rthumb { position: relative; padding: 0; background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 10; }
.rthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rthumb .fav { position: absolute; top: 2px; right: 4px; color: var(--gold); text-shadow: 0 1px 2px #000; }
.row.between { justify-content: space-between; margin-top: 0; }
.recent-block h3 { margin: 0; }
.gal-where { margin: -6px 0 14px; }

/* mixing bowl */
.mix-col { padding: 16px 28px 60px; }
.mix-head { display: flex; gap: 8px; align-items: center; }
.name-input { flex: 1; font-size: 20px; font-weight: 700; border-color: transparent; background: transparent; letter-spacing: -0.01em; }
.name-input:hover, .name-input:focus { border-color: var(--line); background: var(--panel); }
.bowl-wrap { display: flex; flex-direction: column; align-items: center; margin-top: 8px; }
.bowl { position: relative; width: min(560px, 100%, calc(100vh - 290px)); min-width: 320px; aspect-ratio: 1; user-select: none; touch-action: none; }
.bowl-paint { position: absolute; inset: 4%; border-radius: 50%; filter: blur(10px) saturate(1.1); opacity: .9; transition: background .4s; }
.bowl-rim { position: absolute; inset: 4%; border-radius: 50%; border: 10px solid #ffffffb3; box-shadow: inset 0 0 40px #0003, 0 20px 50px #11131826; pointer-events: none; }
.bowl-core { position: absolute; inset: 31%; border-radius: 50%; overflow: hidden; border: 6px solid #fff; box-shadow: 0 8px 30px #11131840; background: #000; }
.bowl-core canvas, .bowl-core img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bowl-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34%; text-align: center; color: #fff; font-weight: 600; text-shadow: 0 1px 3px #000; pointer-events: none; font-size: 13px; }
.chip { position: absolute; width: 74px; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; cursor: grab; transition: left .32s cubic-bezier(.2, .8, .2, 1), top .32s cubic-bezier(.2, .8, .2, 1), opacity .17s, transform .17s; z-index: 2; touch-action: none; outline: none; }
.chip.dragging { transition: none; cursor: grabbing; z-index: 5; }
.chip .ball { transition: transform .15s, box-shadow .15s; }
.chip:hover .ball, .chip:focus-visible .ball { transform: scale(1.07); box-shadow: 0 8px 22px #11131855; }
.chip.dragging .ball { transform: scale(1.14); box-shadow: 0 14px 30px #11131866; }
.chip.gone { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
/* strength ring around each picture: fuller ring = stronger */
.chip .ring { position: absolute; top: -5px; left: 50%; width: 74px; height: 74px; margin-left: -37px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--pink) calc(var(--w) * 1%), #ffffff55 0); -webkit-mask: radial-gradient(circle, transparent 33px, #000 34px); mask: radial-gradient(circle, transparent 33px, #000 34px); transition: transform .15s; }
.chip:hover .ring, .chip:focus-visible .ring { transform: scale(1.07); }
.chip.dragging .ring { transform: scale(1.14); }
.chip.out .ring { background: var(--danger); }
.chip .cact { position: absolute; top: -8px; width: 24px; height: 24px; border-radius: 50%; padding: 0; display: grid; place-items: center; font-size: 12px; line-height: 1; border: 2px solid #fff; background: var(--ink); color: var(--on-ink); box-shadow: 0 2px 8px #11131850; opacity: 0; transform: scale(.7); transition: opacity .12s, transform .12s; cursor: pointer; z-index: 3; }
.chip .cx { right: -2px; background: var(--danger); color: #fff; }
.chip .cswap { left: -2px; }
.chip:hover .cact, .chip:focus-within .cact { opacity: 1; transform: scale(1); }
.chip.dragging .cact { opacity: 0; }
.chip .cact:hover { transform: scale(1.15); }
.chip.dragging .lbl { background: var(--ink); color: var(--on-ink); font-size: 12px; }
.chip.dragging .lbl .w { color: #fff; font-size: 14px; }
@media (hover: none) { .chip .cact { opacity: 1; transform: scale(.9); } }
/* guide rings while dragging */
.bowl-guides { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1; }
.bowl.drag .bowl-guides { opacity: 1; }
.guide { position: absolute; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); border: 2px dashed #ffffffcc; }
.guide span { position: absolute; left: 50%; top: -11px; transform: translateX(-50%); background: #111318cc; color: #fff; font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.g-in { width: 60%; height: 60%; }
.g-out { width: 92%; height: 92%; border-style: dotted; }
.g-remove { width: 106%; height: 106%; border-color: transparent; }
.g-remove span { top: auto; bottom: -12px; background: var(--danger); opacity: .55; }
.bowl.removing .g-remove { border: 3px solid var(--danger); box-shadow: 0 0 0 9999px #d9145c14; }
.bowl.removing .g-remove span { opacity: 1; }
/* swap menu */
.bowl-wrap { position: relative; }
.swap-pop { position: absolute; z-index: 20; width: 300px; max-height: min(560px, 80vh); overflow-y: auto; background: var(--panel); color: var(--ink); border-radius: 14px; box-shadow: 0 18px 50px #11131840; padding: 12px; display: flex; flex-direction: column; gap: 6px; animation: popin .14s ease-out; }
@keyframes popin { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.swap-pop p { margin: 0; }
.sw-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sw-list, .sw-ai { display: flex; flex-direction: column; gap: 4px; }
.sw-head { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.sw-opt { all: unset; box-sizing: border-box; display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; cursor: pointer; }
.sw-opt:hover, .sw-opt:focus-visible { background: var(--panel2); }
.sw-pic { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; background: #000; border: 2px solid #fff; box-shadow: 0 1px 4px #11131830; }
.sw-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sw-txt { display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; }
.sw-foot { display: flex; gap: 6px; justify-content: space-between; margin-top: 4px; }
.toast-undo { margin-left: 10px; background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 8px; padding: 2px 10px; font-weight: 700; cursor: pointer; }
.chip .ball { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 4px solid #fff; box-shadow: 0 4px 14px #11131840; background: #000; }
.chip .ball img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.chip .lbl { margin-top: 3px; background: #fff; border-radius: 8px; padding: 2px 6px; font-size: 10px; font-weight: 600; text-align: center; box-shadow: 0 1px 4px #11131820; max-width: 100px; line-height: 1.2; }
.chip .w { color: var(--accent-text); }
.chip.out .ball { border-color: var(--danger); opacity: .5; }
.chip.out .lbl { background: var(--danger); color: #fff; }
.bowl-hint { color: var(--muted); font-size: 12px; text-align: center; max-width: 520px; margin: 6px 0 0; line-height: 1.5; }
.makes { max-width: 640px; margin: 18px auto 0; }
.palette-strip { display: flex; height: 22px; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.palette-strip span { flex: 1; cursor: pointer; }
.summary { margin: 12px 0 0; line-height: 1.55; font-size: 14px; }
.notes { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.note { font-size: 12px; background: #efeaff; color: #3b2470; padding: 7px 10px; border-radius: 8px; }

/* variations */
.variations { margin-top: 14px; background: var(--panel); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.var-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.var-controls { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.adv-label { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.adv-scale { display: flex; gap: 6px; align-items: center; font-weight: 400; }
.adv-scale input { width: 120px; }
.status { font-size: 12px; color: var(--muted); min-height: 1em; }
.status.err { color: var(--danger); }
.variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 8px; }
.variant { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); display: flex; flex-direction: column; }
.variant.sel { outline: 3px solid var(--blue); outline-offset: -1px; }
.variant .vimg { aspect-ratio: 16 / 9; background: var(--panel2); position: relative; cursor: pointer; }
.variant .vimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.variant .vbody { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.variant .vtitle { font-size: 12px; font-weight: 700; }
.changes { display: flex; flex-wrap: wrap; gap: 4px; }
.changes span { font-size: 10px; background: var(--panel2); padding: 2px 6px; border-radius: 6px; }
.variant .row { margin-top: 0; }
.spin { position: absolute; inset: 0; display: grid; place-items: center; }
.spin::after { content: ""; width: 30px; height: 30px; border-radius: 50%; border: 3px solid #0002; border-top-color: var(--pink); animation: spin 1s linear infinite; }
.verr { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; color: var(--danger); font-size: 11px; text-align: center; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin::after { animation: none; } .chip, .card { transition: none; } }

/* right column */
.result-frame { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; cursor: zoom-in; }
.result-frame canvas, .result-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.caption { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.block select { width: 100%; margin-bottom: 6px; }
.refs { display: flex; flex-wrap: wrap; gap: 8px; }
.ref { width: 104px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; font-size: 11px; position: relative; }
.ref img { width: 100%; height: 76px; object-fit: cover; border-radius: 6px; display: block; }
.ref select { width: 100%; margin: 4px 0 0; padding: 2px; font-size: 11px; }
.ref .x { position: absolute; top: 2px; right: 2px; padding: 0 7px; background: #000b; color: #fff; }
.drop { display: block; border: 2px dashed var(--line); border-radius: 12px; padding: 14px; text-align: center; color: var(--muted); cursor: pointer; margin-top: 8px; }
.drop.over { border-color: var(--pink); color: var(--ink); }
details.sub summary { cursor: pointer; font-weight: 600; color: var(--link); margin-top: 10px; }
#promptTabs { margin: 10px 0 8px; }
.palette-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.palette-opts label { font-size: 12px; color: var(--muted); }
.tune-group { margin: 14px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--plum); font-weight: 700; }
.tune { display: grid; grid-template-columns: 120px 1fr 40px 18px; gap: 8px; align-items: center; font-size: 12px; padding: 2px 0; }
.tune .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.tune.over label { color: var(--accent-text); font-weight: 600; }
.tune .rel { background: none; color: var(--muted); padding: 0; visibility: hidden; }
.tune.over .rel { visibility: visible; }

/* gallery & styles */
.gallery, .styles { overflow: auto; padding: 22px 28px 60px; }
.gal-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.gal-head .search { width: 340px; }
.gal-grid { columns: 4 260px; column-gap: 14px; }
.gcard { break-inside: avoid; margin-bottom: 14px; background: var(--panel); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.gcard img { width: 100%; display: block; }
.gcard .gmeta { padding: 8px 10px 10px; }
.gcard .gname { font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; gap: 6px; }
.gcard .fav { color: var(--orange); }
.gcard .gdate { color: var(--muted); font-size: 11px; }
.mini { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.mini span { font-size: 10px; background: var(--panel2); border-radius: 5px; padding: 1px 5px; }
.empty { color: var(--muted); padding: 30px; border: 2px dashed var(--line); border-radius: 14px; text-align: center; line-height: 1.6; }
.modal { position: fixed; inset: 0; background: #11131899; display: grid; place-items: center; z-index: 40; padding: 20px; }
.modal-card { background: var(--panel); border-radius: 16px; padding: 22px; width: min(520px, 100%); box-shadow: var(--shadow); }
.gm-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 12px; line-height: 1.5; margin: 16px 0 20px; }
.detail-card { position: relative; background: var(--panel); border-radius: 16px; width: min(1200px, 100%); max-height: calc(100vh - 40px); display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); overflow: hidden; }
.detail-img { background: #000; display: grid; place-items: center; }
.detail-img img { max-width: 100%; max-height: calc(100vh - 40px); display: block; }
.detail-meta { padding: 20px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.detail-meta pre { white-space: pre-wrap; font-size: 12px; background: var(--panel2); padding: 10px; border-radius: 8px; max-height: 240px; overflow: auto; margin: 0; }
.recipe-list { display: flex; flex-direction: column; gap: 4px; }
.recipe-list > div { display: grid; grid-template-columns: 1fr 90px 46px; gap: 8px; align-items: center; font-size: 12px; }
.bar { height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--sun); }
.close { position: absolute; top: 10px; right: 10px; background: #000a; color: #fff; width: 32px; height: 32px; padding: 0; border-radius: 50%; font-size: 18px; z-index: 2; }
.blend { background: var(--panel); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; box-shadow: var(--shadow); max-width: 640px; }
.blend select { flex: 1; min-width: 0; }
.lib-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.lib-card { display: grid; grid-template-columns: 120px 1fr; gap: 12px; background: var(--panel); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }
.lib-card .thumb { width: 120px; height: 90px; border-radius: 8px; object-fit: cover; background: var(--panel2); }
.lib-card .nm { font-weight: 700; }
.lib-card .pal { display: flex; gap: 2px; margin: 4px 0; }
.lib-card .pal span { width: 18px; height: 10px; border-radius: 2px; }
code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 9px 15px; border-radius: 10px; z-index: 50; }
.lightbox { position: fixed; inset: 0; background: #000e; display: flex; align-items: center; justify-content: center; z-index: 60; cursor: zoom-out; }
.lightbox img { max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; object-fit: contain; }
.lb-cap { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: #000a; color: #fff; padding: 4px 12px; border-radius: 999px; font-size: 13px; }
.result-frame { cursor: zoom-in; }

@media (max-width: 1250px) {
  .studio { grid-template-columns: 360px minmax(0, 1fr); }
  .ing-col { height: calc(100vh - 60px); position: sticky; top: 60px; }
  .out-col { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .view { height: auto; }
  .col { overflow: visible; }
}
@media (max-width: 760px) {
  .studio { grid-template-columns: 1fr; }
  .ing-col { height: 75vh; position: static; }
  .detail-card { grid-template-columns: 1fr; }
  .top { gap: 10px; } .brand-word { display: none; }
}

@media (max-width: 720px) {
  .top { height: auto; flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .top-right { margin-left: 0; width: 100%; }
  .top-right select { flex: 1; min-width: 0; }
  .brand-word { display: none; }
}

.strip-btn { padding: 0; background: none; display: block; width: 100%; }
.cmp { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 13px; cursor: pointer; }
.combo-row .x { padding: 3px 7px; }
.harm { overflow: hidden; white-space: nowrap; }
.cards { grid-auto-rows: max-content; }
.card .pic, .el-pic { flex: none; }
.panel .cards { min-height: 0; }
.row .combo-strip { width: 140px; flex: none; }
.mix-head button { white-space: nowrap; }
.mix-head { flex-wrap: wrap; } .name-input { min-width: 160px; }

/* moods */
.wheel-block { display: flex; flex-direction: column; align-items: center; }
.mood-wheel { width: 100%; max-width: 280px; aspect-ratio: 1; }
.wheel-caption { width: 100%; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; font-size: 13px; }
.wheel-caption .pv { margin-left: 6px; font-size: 11px; background: var(--pink); color: #fff; border-radius: 999px; padding: 1px 7px; }
.mood-map { position: relative; aspect-ratio: 1; border-radius: 14px; background:
  radial-gradient(circle at 85% 15%, #ffd23f55, transparent 45%), radial-gradient(circle at 15% 15%, #d0000040, transparent 45%),
  radial-gradient(circle at 15% 85%, #3e4a6155, transparent 45%), radial-gradient(circle at 85% 85%, #8fb9a855, transparent 45%), var(--panel2); }
.mood-map::before, .mood-map::after { content: ''; position: absolute; background: #11131814; }
.mood-map::before { left: 50%; top: 6%; bottom: 6%; width: 1px; }
.mood-map::after { top: 50%; left: 4%; right: 4%; height: 1px; }
.mood-map .ax { position: absolute; font-size: 10px; color: var(--ink); background: var(--panel); padding: 1px 6px; box-shadow: 0 1px 3px #0002; border-radius: 6px; text-transform: uppercase; letter-spacing: .06em; }
.ax-top { top: 4px; left: 50%; transform: translateX(-50%); } .ax-bottom { bottom: 4px; left: 50%; transform: translateX(-50%); }
.ax-left { left: 6px; top: 50%; transform: translateY(-50%); } .ax-right { right: 6px; top: 50%; transform: translateY(-50%); }
.mdot { position: absolute; transform: translate(-50%, -50%); background: none; padding: 0; flex-direction: column; gap: 1px; color: var(--ink); z-index: 1; }
.mdot .sw3 { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 2px 6px #0004; }
.mdot .lbl { font-size: 9.5px; font-weight: 600; white-space: nowrap; background: #ffffffcc; border-radius: 6px; padding: 0 3px; }
.mdot:hover, .mdot:focus-visible { z-index: 3; filter: none; } .mdot:hover .sw3 { transform: scale(1.25); }
.mdot.on .sw3 { box-shadow: 0 0 0 3px var(--pink), 0 2px 6px #0004; }
.mood-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mood-card { border: 1px solid var(--line); border-radius: 10px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; background: var(--panel); }
.mood-card:hover { box-shadow: var(--shadow); }
.mood-card.on { outline: 3px solid var(--pink); outline-offset: -1px; }
.mood-card .mc-top { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.mood-card .mc-top b { flex: 1; }
.mood-card .combo-strip { height: 16px; }
.mood-card .mc-words { font-size: 10.5px; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* gallery picks */
.gcard { position: relative; }
.gcard.sel { outline: 3px solid var(--blue); }
.gpick { position: absolute; top: 8px; left: 8px; z-index: 2; background: #ffffffd9; border-radius: 6px; padding: 3px 4px; display: flex; opacity: 0; }
.gcard:hover .gpick, .gcard.sel .gpick { opacity: 1; }
.gpick input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.gpal { margin: 4px 0; width: 100% !important; height: 8px !important; }

/* viewer */
body.noscroll { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 40; background: #0b0c10f5; color: #eee; display: grid; grid-template-rows: auto minmax(0, 1fr) 92px; }
.v-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.v-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.v-title b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-title span { font-size: 12px; color: #aab; }
.v-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.vbtn { background: #ffffff14; color: #eee; border: 1px solid #ffffff22; font-weight: 500; padding: 6px 11px; font-size: 13px; }
.vbtn.on { background: #fff; color: #111318; }
.v-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 0; }
.v-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 12px; }
.v-img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px #000a; }
.v-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 72px; font-size: 40px; line-height: 1; background: #ffffff1a; color: #fff; border-radius: 12px; }
.v-arrow:hover { background: #ffffff33; }
.v-arrow.left { left: 16px; } .v-arrow.right { right: 16px; }
.v-stage.cmp { display: grid; gap: 10px; padding: 0 12px 6px; align-items: stretch; }
.v-stage.cmp.n2 { grid-template-columns: 1fr 1fr; } .v-stage.cmp.n3 { grid-template-columns: 1fr 1fr 1fr; }
.v-stage.cmp.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; } .v-stage.cmp.n1 { grid-template-columns: 1fr; }
.v-panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; gap: 4px; }
.v-panel img { flex: 1; min-height: 0; width: 100%; object-fit: contain; cursor: zoom-in; }
.v-cap { display: flex; align-items: center; gap: 6px; font-size: 12px; flex-wrap: wrap; }
.v-cap .x { margin-left: auto; background: #ffffff1a; color: #fff; width: 22px; height: 22px; padding: 0; border-radius: 50%; }
.v-side { width: 360px; background: var(--panel); color: var(--ink); overflow-y: auto; padding: 14px 16px 30px; display: flex; flex-direction: column; gap: 12px; border-radius: 12px 0 0 0; }
.v-side h3 { margin: 0 0 6px; }
.v-side .dp { margin: 0; line-height: 1.45; font-size: 13px; }
.v-side pre { white-space: pre-wrap; font-size: 11px; background: var(--panel2); padding: 10px; border-radius: 8px; max-height: 260px; overflow: auto; margin: 0; }
.v-strip { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; align-items: center; background: #00000055; }
.v-thumb { position: relative; flex: none; width: 112px; height: 70px; padding: 0; border-radius: 8px; overflow: hidden; background: #000; opacity: .6; border: 2px solid transparent; }
.v-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v-thumb:hover { opacity: .9; filter: none; }
.v-thumb.on { opacity: 1; border-color: #fff; }
.v-thumb.picked { opacity: 1; border-color: var(--pink); }
.v-thumb .pk { position: absolute; top: 3px; left: 3px; background: var(--pink); color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 11px; display: grid; place-items: center; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.cmp-table th, .cmp-table td { padding: 4px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp-table td:first-child { color: var(--muted); width: 32%; }
.cmp-table tr.diff td { background: #ff2d7a10; }
.cmp-table tr.diff td:first-child { color: var(--accent-text); font-weight: 600; }
.cmp-table .mini-strip { width: 100%; }
@media (max-width: 900px) { .v-body { grid-template-columns: 1fr; } .v-side { position: absolute; right: 0; top: 56px; bottom: 92px; width: min(360px, 90vw); box-shadow: -10px 0 30px #0008; } }

.mdot { width: 30px; height: 30px; }
.mdot .sw3 { position: absolute; inset: 4px; width: auto; height: auto; }
.mdot .em { position: relative; font-size: 13px; line-height: 1; }
.mdot .lbl { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); display: none; }
.mdot:hover .lbl, .mdot:focus-visible .lbl, .mdot.on .lbl { display: block; }
.viewer { background: #0b0c10; }

/* ---------- age groups ---------- */
.age-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.age-pick select { font-size: 13px; padding: 5px 8px; border-radius: 8px; }
.age-list { display: flex; flex-direction: column; gap: 8px; }
.age-card { border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; background: var(--panel); }
.age-card:hover { box-shadow: var(--shadow); }
.age-card.on { outline: 3px solid var(--pink); outline-offset: -1px; }
.age-card .ag-top { display: flex; align-items: center; gap: 6px; }
.age-card .ag-top .em { font-size: 20px; }
.age-card .ag-top b { font-size: 14px; }
.age-card .ag-top .ages { flex: 1; color: var(--muted); font-size: 12px; }
.age-card .ag-like { font-size: 11.5px; color: var(--muted); }
.age-card .ag-why { font-size: 12px; line-height: 1.4; margin: 0; }
.age-card .ag-pals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.age-card .ag-pal { display: flex; flex-direction: column; gap: 3px; padding: 4px; background: var(--panel2); color: var(--ink); font-size: 10.5px; font-weight: 500; border-radius: 8px; text-align: left; }
.age-card .ag-pal .mini-strip { height: 12px; }
.age-card .ag-looks { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 11px; }
.age-card .ag-looks .chipbtn { font-size: 11px; padding: 3px 8px; }
.age-card .ag-looks .chipbtn.in { background: var(--pink); color: #fff; }
.age-card .ag-moods { font-size: 11px; }
.card .fit { position: absolute; left: 5px; top: 34px; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; pointer-events: auto; }
.card .fit.ok { background: #e7f7ea; color: #1d6b33; }
.card .fit.no { background: #fdecea; color: #9b2c22; }
.card.unfit .pic { opacity: 0.45; filter: saturate(0.5); }
.mdot.blocked { opacity: 0.35; }
.mood-card .mc-age { font-size: 10.5px; color: var(--muted); }
.mood-card .mc-age.no { color: #b23a2e; font-weight: 600; }

/* ---------- parts ---------- */
.part-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.part-chip { background: var(--panel2); color: var(--ink); font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 999px; position: relative; }
.part-chip.on { background: var(--ink); color: var(--on-ink); }
.part-chip.set::after { content: ''; position: absolute; top: 2px; right: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.part-chip.link { background: none; color: var(--link); }
.part-attr { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.part-attr .pa-label { font-size: 12px; font-weight: 600; }
.part-attr .pa-opts { display: flex; flex-wrap: wrap; gap: 4px; }
.part-attr .pa-opts button { background: var(--panel2); color: var(--ink); font-size: 11.5px; font-weight: 500; padding: 4px 8px; border-radius: 8px; }
.part-attr .pa-opts button.on { background: var(--pink); color: #fff; }
.part-note { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; margin-top: 8px; }
.part-note textarea { font: inherit; font-weight: 400; font-size: 12px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.part-say { font-size: 12px; margin: 4px 0; line-height: 1.4; }

/* ---------- a saved style as a base ---------- */
.style-detail { display: flex; flex-direction: column; gap: 12px; }
.sd-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sd-head h2 { font-size: 22px; }
.sd-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.sd-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sd-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: var(--panel2); cursor: zoom-in; display: grid; place-items: center; color: var(--muted); }
.sd-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.sd-strip img { height: 72px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; cursor: pointer; flex: none; }
.sd-side { background: var(--panel); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.sd-side h3 { margin: 6px 0 2px; }
.sd-side textarea { font: inherit; font-size: 12px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.sd-actions { display: flex; flex-direction: column; gap: 6px; }
.sd-actions button { text-align: left; }
.lib-card .thumb { cursor: pointer; }
@media (max-width: 900px) { .sd-body { grid-template-columns: 1fr; } }

/* ---------- what this look says, character colours ---------- */
.read-out p { margin: 6px 0; font-size: 13px; line-height: 1.45; }
.read-feels { display: flex; flex-wrap: wrap; gap: 4px; }
.read-feels span { background: var(--panel2); border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 600; }
.role-row { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; }
.role-row .rr-top { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 8px; font-size: 12px; }
.role-row .rr-why { font-size: 11px; color: var(--muted); line-height: 1.35; }

/* ---------- v0.9 themes ---------- */
:root[data-theme=dark] { --bg: #0E0F14; --panel: #171920; --panel2: #21242D; --line: #2C303B; --ink: #ECEDF2; --muted: #A0A6B4; --on-ink: #111318; --link: #9DB0FF; --plum: #C9A6FF; --blue: #7F95FF; --shadow: 0 1px 2px #0008, 0 10px 30px #0009; color-scheme: dark; }
:root[data-theme=studio] { --bg: #2A2C30; --panel: #34363B; --panel2: #3E4046; --line: #4A4D54; --ink: #F0F0F2; --muted: #BDC0C7; --on-ink: #1C1D20; --link: #A9BAFF; --plum: #D2B4FF; --blue: #8FA3FF; --shadow: 0 1px 2px #0006, 0 8px 24px #0007; color-scheme: dark; }
:root[data-theme=paper] { --bg: #F2ECDF; --panel: #FBF8F1; --panel2: #EEE6D6; --line: #E0D5C0; --ink: #2A241C; --muted: #665B4A; }
:root[data-theme=dark] .note, :root[data-theme=studio] .note { background: #2b2346; color: #d9ccff; }
:root[data-theme=dark] .chip .lbl, :root[data-theme=studio] .chip .lbl { background: var(--panel); color: var(--ink); }
:root[data-theme=dark] .mdot .lbl, :root[data-theme=studio] .mdot .lbl { background: #0009; color: #fff; }
:root[data-theme=dark] .brand-word, :root[data-theme=studio] .brand-word, :root[data-theme=dark] .ph-word, :root[data-theme=studio] .ph-word { filter: brightness(0) invert(1); }
:root[data-theme=dark] .pill.ok, :root[data-theme=studio] .pill.ok { background: #123a29; color: #6fe0aa; }
:root[data-theme=dark] .pill.bad, :root[data-theme=studio] .pill.bad { background: #43191a; color: #ff9a9a; }
:root[data-theme=dark] .card .fit.ok, :root[data-theme=studio] .card .fit.ok { background: #123a29; color: #8fe8b7; }
:root[data-theme=dark] .card .fit.no, :root[data-theme=studio] .card .fit.no { background: #43191a; color: #ffb0a8; }
body.compact { font-size: 13px; }
body.compact .block, body.compact .pd-card { padding: 10px 12px; }
body.compact .cards { gap: 6px; }
body.no-hints .hint, body.no-hints .bowl-hint, body.no-hints .step-tip { display: none; }
body.icons-mono .rail .ic, body.icons-mono .steps .sl, body.icons-mono .build-opt .bi { filter: grayscale(1) contrast(1.15); }
body.icons-none .rail .ic { display: none; }
body.icons-none .rail button { min-height: 38px; }
.rail .ic.svg { display: grid; place-items: center; height: 22px; }

/* ---------- header ---------- */
.brand-word { height: 28px; margin: 0; }
.proj-pill { background: var(--panel2); color: var(--ink); font-weight: 650; font-size: 13.5px; padding: 5px 12px 5px 12px; border-radius: 10px; max-width: 280px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cap car" "name car"; column-gap: 8px; text-align: left; line-height: 1.15; border: 1px solid var(--line); }
.proj-pill .pp-cap { grid-area: cap; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.proj-pill .pp-name { grid-area: name; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-pill .pp-car { grid-area: car; align-self: center; color: var(--muted); font-size: 11px; }
.proj-pill.none .pp-name { color: var(--muted); font-weight: 500; }
.icon-btn { background: transparent; color: var(--muted); font-size: 17px; width: 36px; height: 36px; padding: 0; border-radius: 10px; }
.icon-btn:hover { background: var(--panel2); color: var(--ink); filter: none; }

/* ---------- focus mode ---------- */
body.focus .top, body.focus .steps-wrap, body.focus .out-col > .block, body.focus .out-col > details { display: none; }
body.focus .view { height: 100vh; }
.exit-focus { position: fixed; top: 12px; right: 14px; z-index: 30; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow); }

/* ---------- guided steps ---------- */
.steps-wrap { margin-bottom: 10px; }
.steps { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--panel2); border-radius: 12px; scrollbar-width: none; }
.steps .step { flex: 1 0 auto; background: transparent; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 10px; border-radius: 9px; gap: 6px; white-space: nowrap; }
.steps .step .n { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; background: var(--line); color: var(--ink); }
.steps .step:hover { background: var(--panel); color: var(--ink); filter: none; }
.steps .step.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px #11131822; }
.steps .step.on .n { background: var(--pink); color: #fff; }
.step-tip { margin: 6px 4px 0; }
.surprise { display: inline-flex; align-items: stretch; }
.surprise button { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.surprise select { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; font-size: 12px; padding: 4px 6px; }

/* ---------- panels: calmer, more focused ---------- */
.panel-head { position: sticky; top: 0; z-index: 3; background: var(--panel); }
.block { border-radius: var(--radius); }
.rail button.on { position: relative; }
.rail button.on::before { content: ''; position: absolute; left: -6px; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: var(--pink); }
.result .actions { flex-wrap: wrap; }
.result .actions #buildBtn { background: var(--sun-btn); color: #fff; }

/* ---------- projects ---------- */
.projects { overflow-y: auto; padding: 28px clamp(16px, 4vw, 48px) 60px; }
.proj-home { max-width: 1180px; margin: 0 auto; }
.ph-hero { text-align: center; margin: 10px 0 26px; }
.ph-word { height: 44px; margin-bottom: 14px; }
.ph-hero h1 { font-size: 30px; }
.ph-starts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.start-card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.start-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--sun); }
.start-card.free::before { background: var(--sea); }
.start-card .sc-ic { font-size: 30px; }
.start-card p { margin: 0; line-height: 1.5; }
.start-card .primary { align-self: flex-start; }
.story-text { font-family: inherit; font-size: 14px; line-height: 1.55; }
.ph-list-head { margin-top: 34px; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 10px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pcard.cur { border-color: var(--pink); }
.pcard img, .pc-empty { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--panel2); }
.pc-empty { display: grid; place-items: center; font-size: 40px; }
.pc-meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.pc-name { font-weight: 700; display: flex; gap: 6px; align-items: center; }
.pc-cur { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--pink); color: #fff; border-radius: 999px; padding: 1px 7px; }
.pc-log { font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-detail { max-width: 1320px; margin: 0 auto; }
.pd-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pd-name { font-size: 20px; font-weight: 700; min-width: 260px; }
.pd-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pd-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.pd-main, .pd-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pd-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.pd-card > h2 { margin-bottom: 6px; }
.pd-card h3.mt, .mt { margin-top: 16px; }
.logline { font-size: 15px; line-height: 1.5; margin: 6px 0 12px; }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.dir-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel2); }
.dir-card.on { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink); }
.dir-card canvas { width: 100%; display: block; aspect-ratio: 16 / 9; }
.dc-body { padding: 10px 12px 12px; }
.dc-body p { margin: 4px 0 8px; line-height: 1.4; }
.deep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.deep-col { display: flex; flex-direction: column; gap: 8px; }
.cast-row { background: var(--panel2); border-radius: 12px; padding: 9px 10px; display: flex; flex-direction: column; gap: 5px; }
.cast-row .cr-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.cast-row button { align-self: flex-start; }
.place-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--panel2); border-radius: 10px; padding: 7px 10px; font-size: 13px; }
.el-row { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; font-size: 13px; }
.el-row select { min-width: 0; }
.sp-out { font-size: 11.5px; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.asset { background: var(--panel2); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.asset img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: zoom-in; background: #000; }
.asset .row { margin-top: 0; gap: 4px; }
.pd-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pd-pics img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; cursor: pointer; }

/* ---------- build on a picture ---------- */
.build-card { max-width: 640px; width: 100%; }
.bm-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.bm-head img { width: 132px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: #000; flex: none; }
.build-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.build-opt { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: var(--panel2); color: var(--ink); border: 1px solid var(--line); padding: 10px 12px; border-radius: 12px; font-weight: 500; }
.build-opt:hover { border-color: var(--pink); filter: none; }
.build-opt .bi { font-size: 22px; }

/* ---------- settings ---------- */
.settings-card { max-width: 520px; width: 100%; }
.set-row { margin-top: 16px; }
.accents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.accent { background-blend-mode: normal; height: 46px; border-radius: 12px; align-items: flex-end; justify-content: flex-start; padding: 6px 9px; font-size: 12px; color: #fff; border: 2px solid transparent; text-shadow: 0 1px 2px #0006; }
.accent.on { border-color: var(--ink); }

@media (max-width: 900px) {
  .ph-starts, .pd-body { grid-template-columns: 1fr; }
  .proj-pill { max-width: 160px; }
}
.proj-home .ph-list-head { margin-top: 36px; }
.deep-col > button, .deep-col .row button { align-self: flex-start; }
.asset-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.steps .step { flex: 1 1 auto; justify-content: center; }
.mix-head { flex-wrap: wrap; } .mix-head .name-input { flex: 1 1 200px; min-width: 180px; }
.steps .step { padding: 6px 7px; gap: 5px; }

/* ---------- voice input ---------- */
.voice-wrap { position: relative; display: block; width: 100%; --wave: var(--pink); --wave-dim: color-mix(in srgb, var(--muted) 45%, transparent); }
.voice-wrap > textarea { padding-right: 46px; width: 100%; display: block; }
.mic-btn { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; padding: 0; border-radius: 50%; background: var(--panel2); color: var(--ink); border: 1px solid var(--line); z-index: 2; }
.mic-btn:hover { background: var(--pink); color: #fff; filter: none; border-color: transparent; }
.mic-btn.rec { background: #D32F2F; color: #fff; border-color: transparent; animation: micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 #D32F2F66; } 50% { box-shadow: 0 0 0 8px #D32F2F00; } }
.voice-bar { position: absolute; left: 6px; right: 46px; bottom: 6px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 2; }
.voice-bar .wave { flex: 1; height: 28px; min-width: 60px; }
.voice-bar .vtime { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 700; color: var(--ink); }
.voice-bar .vlabel { font-size: 11.5px; color: var(--muted); max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-bar .vstop { padding: 4px 10px; font-size: 12px; background: #D32F2F; color: #fff; }
.voice-bar .vcancel { padding: 0; width: 24px; height: 24px; border-radius: 50%; background: transparent; color: var(--muted); font-size: 13px; }
.voice-wrap[data-mode=busy] .vstop, .voice-wrap[data-mode=done] .vstop, .voice-wrap[data-mode=busy] .vcancel { display: none; }
.voice-wrap[data-mode=done] .voice-bar { left: auto; width: min(70%, 520px); }
.voice-wrap[data-mode=done] .voice-bar .wave { display: none; }
.voice-wrap[data-mode=done] .vlabel { max-width: none; color: var(--ink); }
.voice-wrap.flash > textarea { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 35%, transparent); transition: box-shadow .3s; }

/* ---------- story room ---------- */
.room { display: flex; flex-direction: column; gap: 14px; }
.room h4 { margin: 14px 0 8px; font-size: 14px; }
.room-steps { display: flex; gap: 4px; background: var(--panel2); border-radius: 999px; padding: 3px; }
.room-steps span { font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 10px; border-radius: 999px; white-space: pre; }
.room-steps span.on { background: var(--pink); color: #fff; }
.room-steps span.done { color: var(--ink); }
.tell { display: flex; flex-direction: column; gap: 8px; }
.think-live { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; background: var(--panel2); }
.tl-head { display: flex; align-items: center; gap: 8px; }
.spin-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pink); animation: micPulse 1s infinite, blink 1s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.tl-text { white-space: pre-wrap; font-size: 12px; line-height: 1.5; color: var(--muted); max-height: 220px; overflow: auto; margin: 6px 0 0; font-family: ui-monospace, Menlo, monospace; }
.understood { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--panel); }
.understood.ok { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.st-title { font-size: 22px; margin: 4px 0; }
.st-full p { line-height: 1.55; margin: 6px 0; }
.st-full summary, .how summary { cursor: pointer; color: var(--link); font-weight: 600; font-size: 13px; margin: 6px 0; }
.beats { margin: 10px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.beats li b { margin-right: 6px; }
.beats li span { line-height: 1.45; }
.st-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 8px; }
.cast-line { margin: 3px 0; line-height: 1.4; }
.questions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.questions h3 { width: 100%; margin: 0; }
.questions .q { background: var(--panel2); color: var(--ink); font-weight: 500; font-size: 13px; border: 1px dashed var(--line); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.opt-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.opt-card.on { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink); }
.opt-sw { display: flex; height: 44px; }
.opt-sw i { flex: 1; cursor: copy; }
.opt-body { padding: 8px 10px 10px; }
.opt-body p { margin: 4px 0 2px; line-height: 1.4; }
.opt-body .row { margin-top: 6px; }
.opt-pic { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; cursor: zoom-in; background: #000; }
.opt-pic.busy, .opt-pic.err { display: grid; place-items: center; align-content: center; gap: 6px; background: var(--panel2); color: var(--muted); cursor: default; padding: 8px; text-align: center; }
.char-rows { display: flex; flex-direction: column; gap: 12px; }
.char-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; align-items: start; }
.cr-who { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.fx-row { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.fx-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fx-pics .opt-pic { border-radius: 10px; }
.picks-bar { position: sticky; bottom: 0; z-index: 4; margin-top: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.picks-bar .pb-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.picks-bar .pb-list span { background: var(--panel2); border-radius: 999px; padding: 2px 9px; }
.picks-bar .opt-pic { border-radius: 10px; max-width: 520px; margin-top: 6px; }
.room-chat { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.room-chat .msg { display: flex; }
.room-chat .msg.user { justify-content: flex-end; }
.room-chat .bubble { max-width: 78%; padding: 9px 12px; border-radius: 14px; line-height: 1.5; background: var(--panel2); white-space: pre-wrap; }
.room-chat .msg.user .bubble { background: var(--pink); color: #fff; border-bottom-right-radius: 4px; }
.room-chat .msg.ai .bubble { border-bottom-left-radius: 4px; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbtn { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); font-weight: 500; font-size: 12px; padding: 5px 10px; border-radius: 999px; }
.chipbtn:hover { border-color: var(--pink); filter: none; }
.say { display: flex; gap: 8px; align-items: flex-end; }
.say .voice-wrap { flex: 1; }
.say textarea { font-family: inherit; font-size: 14px; }
@media (max-width: 900px) { .char-row { grid-template-columns: 1fr; } }
.mini-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--pink); animation: spin360 .8s linear infinite; }
@keyframes spin360 { to { transform: rotate(360deg); } }
.told summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
.told p { white-space: pre-wrap; line-height: 1.5; margin: 6px 0; color: var(--muted); font-style: italic; }

/* v0.11 step board: options for the current step, tried and painted in the centre */
.step-board { margin-top: 14px; background: var(--panel); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.sb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.sb-head h3 { margin: 0; font-size: 18px; }
.sb-head .hint { margin: 4px 0 0; }
.sb-sec { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; scroll-margin-top: 70px; }
.sb-sec h4 { margin: 0; font-size: 15px; }
.sb-sec > .hint { margin: 4px 0 8px; }
.sb-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.opt-pic.sketch { cursor: default; background: var(--panel2); }
canvas.opt-pic { height: auto; }
.sb-pic { position: relative; }
.sb-old { position: absolute; left: 6px; top: 6px; background: #111318cc; color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.sb-card .opt-sw { height: 26px; }
.sb-card .opt-body b { font-size: 14px; }
.sb-card .opt-body p { color: var(--muted); font-size: 12.5px; }
.sb-card button.pinned { border-color: var(--pink); color: var(--accent-text); }
details.sb-rows { margin: 6px 0 2px; }
details.sb-rows summary { cursor: pointer; color: var(--link); font-size: 12.5px; font-weight: 600; }
details.sec-rows { margin: 0 0 10px; }
table.chg { border-collapse: collapse; font-size: 12.5px; margin-top: 4px; }
table.chg th { text-align: left; color: var(--muted); font-weight: 600; padding: 2px 10px 2px 0; vertical-align: top; white-space: nowrap; }
table.chg td { padding: 2px 0; }
.skin-ramp { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 10px; }
.skin-ramp .sr { display: flex; align-items: center; gap: 3px; font-size: 12px; }
.skin-ramp .sr b { margin-right: 4px; }
.skin-ramp .sr i { width: 22px; height: 22px; border-radius: 50%; cursor: copy; border: 1px solid #0002; }
.xchip.linky { cursor: pointer; }
.xchip.linky:hover { border-color: var(--pink); }
.bible-sec { background: var(--panel2); border-radius: 12px; padding: 14px; border-top: none; }
.bible-pins { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bible-pins img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.bible-card { width: min(1100px, 100%); height: min(92vh, 1000px); display: flex; flex-direction: column; gap: 10px; }
.bible-card h2 { margin: 0; }
.bible-frame { flex: 1; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
a.button-link { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 10px; background: var(--panel2); color: var(--link); font-weight: 600; font-size: 13px; text-decoration: none; }
@media (max-width: 700px) { .sb-head { flex-direction: column; } .bible-card { height: 94vh; padding: 14px; } }
.sb-head h3 { text-transform: none; letter-spacing: 0; color: var(--ink); }

/* ---------- v0.12: palette spectrum, palette library, prompt viewer, restyle, settings tabs ---------- */
.spec-block .spec-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 112px; align-items: center; gap: 8px; margin: 6px 0; }
.spec-row .sl { font-size: 12px; text-align: right; }
.spec-row .sr { font-size: 12px; }
.spec-row input[type=range] { width: 100%; }
.spec-out { margin: 10px 0 8px; }
.combo-strip.big { height: 44px; border-radius: 10px; }
.spec-words { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.spec-words b { color: var(--ink); }
.chipbtn.on { background: var(--pink); color: #fff; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.uses { font-size: 11px; color: var(--muted); }
@media (max-width: 520px) { .spec-block .spec-row { grid-template-columns: 1fr 1fr; } .spec-row input[type=range] { grid-column: 1 / -1; grid-row: 2; } .spec-row .sl { text-align: left; } .spec-row .sr { text-align: right; } }

.var-controls .small-select { max-width: 170px; }
.prompt-card { width: min(820px, 100%); max-height: calc(100vh - 40px); overflow: auto; }
.prompt-card h3 { margin: 16px 0 6px; }
.pm-pre { white-space: pre-wrap; background: var(--panel2); border-radius: 10px; padding: 12px; font-size: 12.5px; line-height: 1.5; max-height: 260px; overflow: auto; margin: 0 0 6px; }
.pm-thumb { max-height: 140px; border-radius: 10px; display: block; }
.prompt-card input[type=text] { flex: 1; min-width: 160px; }

.restyle-card { width: min(900px, 100%); max-height: calc(100vh - 40px); overflow: auto; }
.restyle-card h3 { margin: 16px 0 6px; }
.restyle-card textarea { width: 100%; }
.rs-pair { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rs-pair figure { margin: 0; width: 220px; max-width: 100%; }
.rs-pair figure img { width: 100%; height: 160px; object-fit: contain; background: var(--panel2); border-radius: 10px; display: block; cursor: pointer; }
.rs-pair figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rs-plus { font-size: 26px; color: var(--muted); font-weight: 700; }
.rs-drop { cursor: pointer; }
.rs-drop.empty > span { display: grid; place-items: center; height: 160px; border: 2px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; }
.rs-drop.empty:hover > span { border-color: var(--pink); color: var(--ink); }

.settings-card { max-width: 860px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
#settingsBody { overflow: auto; min-height: 0; padding-right: 4px; }
.set-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; position: sticky; top: 0; background: var(--panel); padding-bottom: 8px; z-index: 1; }
.set-tabs button { background: var(--panel2); color: var(--ink); font-weight: 500; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.set-tabs button.on { background: var(--pink); color: #fff; }
.set-pane select { max-width: 100%; }
.subj-row, .subj-new { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.subj-row.def { border-color: var(--pink); }
.subj-row textarea, .subj-new textarea, .subj-new input, .subj-row input[type=text] { width: 100%; }
.subj-new h3 { margin: 0; }
button.danger { color: var(--danger); }
.kb { border-bottom: 1px solid var(--line); padding: 8px 0; }
.kb summary { cursor: pointer; }
.kb-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; max-height: 340px; overflow: auto; }
.kb-item { font-size: 13px; line-height: 1.4; }
.kb-item .mini-strip { display: inline-flex; vertical-align: middle; margin-right: 6px; }
.admin-table { border-collapse: collapse; margin: 6px 0 10px; font-size: 13px; }
.admin-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 3px 14px 3px 0; vertical-align: top; white-space: nowrap; }
.admin-table td { padding: 3px 0; word-break: break-all; }

/* v0.14: live views and the live options wall */
.lens-seg { display: flex; margin-bottom: 8px; }
.lens-seg button { flex: 1 1 auto; padding: 6px 6px; font-size: 12px; white-space: nowrap; }
.lens-seg button:disabled { opacity: .45; cursor: default; }
.mine-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.mine-bar.hidden { display: none; }
.mine-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.mine-amt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 120px; color: var(--muted); }
.wall-rows { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.wchip { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); padding: 4px 9px; font-size: 12px; font-weight: 600; border-radius: 999px; }
.wchip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.wall-row { margin-bottom: 14px; }
.wall-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.wall-head .linkish { margin-left: auto; }
.wall-str button { padding: 3px 8px; font-size: 11px; }
.wall-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.wtile { display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 3px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; font-weight: 500; text-align: left; }
.wtile:hover, .wtile:focus-visible { border-color: var(--blue); }
.wtile.on { border: 2px solid var(--pink); padding: 2px; }
.wtile canvas { width: 100%; aspect-ratio: 16 / 10; border-radius: 7px; display: block; background: var(--panel2); }
.wlabel { font-size: 11px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.wpal { display: flex; height: 5px; border-radius: 3px; overflow: hidden; margin: 0 2px 2px; }
.wpal i { flex: 1; }
.live-prompt-text { margin: 0; max-height: 150px; overflow: auto; white-space: pre-wrap; word-break: break-word; font: 12px/1.45 ui-monospace, Menlo, monospace; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; transition: border-color .15s; }
.live-prompt-text.previewing { border-color: var(--blue); }

/* lockup: the Prisma wordmark with "by MAST STUDIOS" underneath, left-aligned, as on StoryBase */
.brand-lock { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1; color: var(--ink); }
.brand-lock .brand-word { height: 36px; margin: -4px 0 -3px; }
.brand-by { font-size: 9.5px; letter-spacing: .06em; margin-left: 4px; white-space: nowrap; font-weight: 400; opacity: .85; }
.brand-by b { font-weight: 800; font-size: 11px; letter-spacing: .04em; }
@media (max-width: 760px) { .brand-by { display: none; } }

/* the big preview stays pinned at the top of the right panel while you scroll and hover the options below */
.stage { position: sticky; top: -16px; z-index: 5; background: var(--panel); margin: -16px -18px 0; padding: 16px 18px 8px; box-shadow: 0 6px 10px -8px #11131840; }
.result-frame { position: relative; }
.stage-badge { position: absolute; left: 8px; top: 8px; background: #111318D9; color: #fff; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; pointer-events: none; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-badge.hidden { display: none; }
@media (max-width: 1100px) { .stage { top: 0; margin: 0; padding: 8px 0; } }
.scene-pick { display: flex; align-items: center; gap: 3px; margin: -2px 0 8px; flex-wrap: wrap; }
.scene-pick.hidden { display: none; }
.scene-pick .muted { margin-right: 4px; }
.scn { background: var(--panel2); border: 1px solid var(--line); color: var(--ink); padding: 3px 7px; font-size: 15px; border-radius: 8px; line-height: 1.2; }
.scn.on { border: 2px solid var(--pink); padding: 2px 6px; background: var(--panel); }
.scn.peek { border-color: var(--blue); }
.scn-name { margin-left: auto; font-size: 12px; }

/* v0.15: projects library */
.ph-lib-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 6px 0 14px; }
.ph-lib-head > div { flex: 1 1 260px; }
.ph-lib-head h1 { margin: 0 0 2px; }
.ph-lib-head .search { width: auto; flex: 0 1 280px; }
.proj-starts { margin-bottom: 22px; }
.proj-starts.hidden { display: none; }
.pc-cover { display: grid; aspect-ratio: 16 / 9; gap: 2px; background: var(--panel2); overflow: hidden; }
.pc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: auto; min-height: 0; }
.pc-cover.n2 { grid-template-columns: 1fr 1fr; }
.pc-cover.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.pc-cover.n3 img:first-child { grid-row: span 2; }
.pc-cover.n4 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.pc-cover.n4 img:first-child { grid-row: span 3; }
.pc-pal { display: flex; height: 6px; }
.pc-pal i { flex: 1; }
.pc-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.pc-foot { margin-top: 4px; }
.proj-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
/* header project switcher */
.proj-switch { position: fixed; z-index: 60; width: 300px; max-height: 70vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px #11131833; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.ps-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 4px 6px 6px; }
.ps-item { display: flex; align-items: center; gap: 10px; background: transparent; color: var(--ink); font-weight: 500; justify-content: flex-start; padding: 6px; border-radius: 10px; text-align: left; }
.ps-item:hover, .ps-item:focus-visible { background: var(--panel2); }
.ps-item.on { background: var(--panel2); }
.ps-item img, .ps-ph { width: 56px; height: 34px; object-fit: cover; border-radius: 6px; flex: none; display: grid; place-items: center; background: var(--panel2); }
.ps-nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-foot { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
/* save look modal */
.kit-card { display: flex; flex-direction: column; gap: 8px; }
.kit-card h3 { margin: 6px 0 0; }
.kit-preview img { width: 100%; border-radius: 10px; display: block; }
.kit-swatch { display: flex; height: 64px; border-radius: 10px; overflow: hidden; }
.kit-swatch span { flex: 1; }
.kit-card select { width: 100%; }
/* phones: the build steps scroll sideways inside their own strip instead of widening the page */
.steps-wrap { min-width: 0; max-width: 100%; }
.steps { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
@media (max-width: 760px) { .studio { grid-template-columns: minmax(0, 1fr) !important; } .studio > .col { min-width: 0; } }
#exploreSeg { flex-wrap: wrap; max-width: 100%; }
.rs-look { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.rs-look summary { cursor: pointer; font-size: 13px; }
.rs-look p { margin: 8px 0 0; white-space: pre-wrap; }
.explore-pick { margin-top: 8px; }
.explore-pick:empty { display: none; }
.pick-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.pick-grid .wtile:not(.on):not(.mine) { opacity: 0.72; }
.pick-grid .wtile:not(.on):not(.mine):hover { opacity: 1; }
.pick-grid .wtile.mine { border-style: dashed; }
.queue { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.queue .changes { flex: 1; min-width: 0; }
.qchip { display: inline-flex; align-items: center; gap: 4px; }
.qx { background: none; border: 0; padding: 0 2px; color: var(--muted); font-size: 12px; cursor: pointer; }
.qx:hover { color: var(--pink); }
#exploreSeg button[data-count]:not([data-count=""])::after { content: attr(data-count); margin-left: 5px; padding: 0 6px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 700; }
.sd-sketch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.sd-sketch figure { margin: 0; }
.sd-sketch canvas { width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; display: block; background: var(--panel2); }
.sd-prompt summary { cursor: pointer; font-weight: 600; margin: 8px 0; }

/* Style Wheel: the frozen bowl of a saved picture or style */
.style-wheel { position: relative; width: min(520px, 100%); aspect-ratio: 1; margin: 0 auto; user-select: none; container-type: inline-size; }
.style-wheel .bowl-core.clickable { cursor: zoom-in; }
.style-wheel .swchip { position: absolute; width: 17cqw; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; z-index: 2; pointer-events: auto; }
.style-wheel .swchip .ball { width: 12cqw; height: 12cqw; border-radius: 50%; overflow: hidden; border: 3px solid #fff; box-shadow: 0 4px 14px #11131840; background: #000; }
.style-wheel .swchip .ball img { width: 100%; height: 100%; object-fit: cover; display: block; }
.style-wheel .swchip .lbl { margin-top: 3px; background: #fff; color: #16181D; border-radius: 8px; padding: 2px 6px; font-size: clamp(8px, 2cqw, 11px); font-weight: 600; text-align: center; box-shadow: 0 1px 4px #11131820; line-height: 1.2; }
.style-wheel .swchip .w { color: var(--accent-text); }
.style-wheel.small .wchip .lbl { font-size: 8px; padding: 1px 4px; }
.wheel-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.wheel-actions button { font-size: 13px; }
.v-wheel { width: 100%; height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 12px 56px 20px; }
.v-wheel h2 { color: #fff; margin: 0 0 30px; font-size: 18px; }
.v-wheel .style-wheel { width: min(560px, 100%, calc(100vh - 300px)); }
.v-sidewheel .wheel-btn { all: unset; display: block; width: 100%; cursor: zoom-in; }
.v-sidewheel .style-wheel { width: 100%; }
.v-sidewheel .wheel-actions button { font-size: 12px; padding: 5px 8px; }
.sd-wheel { background: var(--panel); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.sd-wheel h3 { margin: 0 0 6px; }

.bowl-hint.live { color: var(--ink); font-weight: 600; }
.bowl-hint.warn { color: var(--danger); }
/* Picture / Style Wheel switch over the viewer stage, and wheels that open live in the Studio */
.v-seg { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 4; background: #1E2026e6; box-shadow: 0 4px 16px #0006; }
.v-seg button { color: #E7E8EE; }
.v-seg button.on { background: #fff; color: #16181D; }
.v-stage .v-wheel { padding-top: 60px; }
.style-wheel.openable { cursor: pointer; border-radius: 50%; }
.style-wheel.openable .bowl-rim { transition: box-shadow .2s; }
.style-wheel.openable:hover .bowl-rim, .style-wheel.openable:focus-visible .bowl-rim { box-shadow: inset 0 0 40px #0003, 0 0 0 4px var(--pink), 0 20px 50px #11131826; }
.age-fit { margin: 6px 0 2px; padding: 7px 12px; border-radius: 10px; background: var(--panel2); font-size: 13px; color: var(--ink); }

/* v0.25: which variation a picture is, on the picture and at the top of its details */
.v-badge { position: absolute; left: 22px; top: 12px; z-index: 3; background: #111318E0; color: #fff; font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 999px; pointer-events: none; box-shadow: 0 4px 14px #0006; max-width: calc(50% - 300px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-badge.var { background: #111318E0; font-size: 13px; }
.v-variation { padding: 10px 12px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.vv-main { display: flex; align-items: baseline; gap: 8px; font-size: 18px; }
.vv-kind { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vv-facts { margin: 0; }

/* v0.26: renders keep going in the background, with a bar at the top and a note when they are done */
.job-bar { position: fixed; inset: 0 0 auto 0; z-index: 90; pointer-events: none; }
.job-bar.hidden { display: none; }
.jb-track { height: 4px; background: #E8336D22; }
.jb-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pink, #E8336D), var(--plum, #8B5CF6)); transition: width .5s linear; border-radius: 0 3px 3px 0; }
.jb-pill { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); background: #111318E8; color: #fff; font-size: 13px; font-weight: 600; padding: 5px 14px; border-radius: 999px; box-shadow: 0 6px 18px #0005; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; pointer-events: auto; cursor: default; }
.job-note { position: fixed; right: 18px; bottom: 18px; z-index: 91; display: flex; align-items: center; gap: 10px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow, 0 10px 30px #0003); max-width: min(440px, calc(100vw - 36px)); animation: jnIn .25s ease-out; }
@keyframes jnIn { from { transform: translateY(14px); opacity: 0; } }
.jn-pic { display: flex; padding: 0; background: none; border: 0; cursor: pointer; }
.jn-pic img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; margin-left: -18px; border: 2px solid var(--panel); }
.jn-pic img:first-child { margin-left: 0; }
.jn-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.jn-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#galleryCount.has-new { animation: newPulse 1.6s ease-in-out infinite; }
@keyframes newPulse { 50% { box-shadow: 0 0 0 5px #E8336D40; } }
.gcard.is-new { outline: 3px solid var(--pink, #E8336D); outline-offset: 2px; }
.gcard.is-new::after { content: 'New'; position: absolute; top: 8px; right: 8px; background: var(--pink, #E8336D); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.rs-busy { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); font-size: 13px; }
.rs-busy button { margin-left: auto; white-space: nowrap; }
/* what a restyle was made from */
.lineage h3 { margin-bottom: 6px; }
.ln-row { display: flex; align-items: flex-start; gap: 6px; }
.ln-fig { margin: 0; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; position: relative; }
.ln-fig img, .ln-none { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.ln-fig.click img { cursor: zoom-in; }
.ln-style img { box-shadow: 0 0 0 2px var(--pink, #E8336D); }
.ln-wheel { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; padding: 0; background: #111318D9; color: #fff; font-size: 15px; line-height: 1; }
.ln-fig figcaption { font-size: 11.5px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.ln-op { font-size: 20px; font-weight: 700; color: var(--muted); align-self: center; margin-top: -18px; }
.lineage.big { margin: 18px auto 0; width: min(460px, 100%); }
.lineage.big figcaption, .lineage.big .ln-op, .lineage.big h3 { color: #C9CCD6; }
.lineage.big .ln-fig img { border-color: #ffffff22; }
body:has(#viewer:not(.hidden)) .jb-pill { top: auto; bottom: 112px; }

/* v0.27: How it was built, as a third view next to Picture and Style Wheel */
.built-view { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 70px 12px 12px; color: #E7E8EE; }
.bv-row { display: flex; align-items: center; justify-content: center; gap: 18px; width: 100%; max-width: 1400px; }
.bv-card { margin: 0; flex: 1 1 0; min-width: 0; max-width: 460px; display: flex; flex-direction: column; gap: 10px; }
.bv-card > img, .bv-card > .bv-none { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #0006; border-radius: 12px; box-shadow: 0 10px 40px #000a; }
.bv-card.result { flex-grow: 1.35; max-width: 620px; }
.bv-card.result > img { box-shadow: 0 0 0 3px var(--pink, #E8336D), 0 10px 40px #000a; }
.bv-card.wheel .style-wheel { width: 100%; max-width: 360px; }
.bv-card.click { cursor: pointer; }
.bv-card.click > img:hover { filter: brightness(1.08); }
.bv-card figcaption { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.bv-card figcaption b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #9EA3B0; }
.bv-card figcaption span { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.bv-none { display: grid; place-items: center; padding: 20px; text-align: center; color: #9EA3B0; font-size: 14px; border: 2px dashed #ffffff30; box-shadow: none !important; }
.bv-op { font-size: 44px; font-weight: 300; color: #C9CCD6; flex: none; }
.bv-note { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 13px; color: #9EA3B0; margin: 0; }
.bv-note .linkish { color: #A9BAFF; }
@media (max-width: 900px) { .bv-row { flex-direction: column; } .bv-op { font-size: 28px; } .built-view { justify-content: flex-start; overflow: auto; } }
/* v0.28: the style (wheel + its picture) framed together, then + my picture = result */
.bv-style { flex: 2 1 0; min-width: 0; max-width: 760px; display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: #ffffff0d; border: 1px solid #ffffff1f; }
.bv-style .bv-card { flex: 1 1 0; }
.bv-card.wheel > .style-wheel { width: 100%; max-width: 300px; margin: 0 auto; }
.bv-row { align-items: center; }
/* v0.29: restyle methods side by side, keep colours natural */
.nat-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; user-select: none; }
.nat-toggle:has(input:checked) { border-color: var(--pink, #E8336D); background: #E8336D14; }
.nat-slot { display: flex; justify-content: center; margin-top: 6px; }
.rs-method { align-items: center; gap: 8px; flex-wrap: wrap; }
.rs-compare h3 { margin: 4px 0 8px; }
.rs-cmp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rs-cmp-row figure { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 12px; border: 2px solid transparent; }
.rs-cmp-row figure.on { border-color: var(--pink, #E8336D); }
.rs-cmp-row img { width: 100%; max-height: 300px; object-fit: contain; background: #0001; border-radius: 8px; cursor: zoom-in; }
.rs-cmp-row .spin { height: 200px; }
.rs-cmp-row figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
/* v0.29: tweak a picture's wheel and compare old and new with a split slider */
.tweak-btn { margin-top: 10px; background: #fff; color: #16181D; font-weight: 700; border-radius: 999px; padding: 8px 16px; }
.tweak { position: absolute; inset: 56px 12px 8px; display: grid; grid-template-columns: minmax(280px, 340px) 1fr; gap: 16px; color: #E7E8EE; }
.tw-controls { overflow: auto; padding: 14px; border-radius: 14px; background: #ffffff0d; border: 1px solid #ffffff1f; display: flex; flex-direction: column; gap: 10px; }
.tw-controls h3 { margin: 0; color: #fff; }
.tw-controls h4 { margin: 4px 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #9EA3B0; }
.tw-controls .muted { color: #9EA3B0; }
.tw-row { display: grid; grid-template-columns: 1fr 110px 44px; gap: 8px; align-items: center; font-size: 12.5px; }
.tw-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-row.set span { color: #FF9EBB; }
.tw-row b { text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }
.tw-diff { font-size: 12.5px; color: #C9CCD6; padding: 8px 10px; border-radius: 8px; background: #0005; }
.tw-controls .nat-toggle { background: transparent; color: #E7E8EE; border-color: #ffffff30; align-self: flex-start; }
.tw-view { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.tw-single { position: relative; max-width: 100%; max-height: 100%; }
.tw-single img, .split img { display: block; max-width: 100%; max-height: calc(100vh - 260px); object-fit: contain; border-radius: 8px; }
.tw-busy { position: absolute; inset: auto 0 12px 0; margin: auto; width: max-content; display: flex; gap: 8px; align-items: center; background: #111318E0; padding: 8px 14px; border-radius: 999px; font-weight: 600; }
.split { position: relative; --x: 50%; cursor: ew-resize; user-select: none; touch-action: none; max-width: 100%; }
.split .sp-b { position: absolute; inset: 0; width: 100%; height: 100%; clip-path: inset(0 0 0 var(--x)); }
.sp-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; background: #fff; transform: translateX(-1px); box-shadow: 0 0 8px #0008; pointer-events: none; }
.sp-line span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff; color: #16181D; border-radius: 999px; padding: 4px 8px; font-weight: 800; font-size: 13px; }
.sp-lab { position: absolute; top: 10px; background: #111318D9; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; pointer-events: none; }
.sp-lab.l { left: 10px; } .sp-lab.r { right: 10px; }
.tw-hint { color: #9EA3B0; margin: 0; }
@media (max-width: 900px) { .tweak { grid-template-columns: 1fr; overflow: auto; } }
/* v0.30: picture to Style Wheel */
.nat-slot { gap: 8px; flex-wrap: wrap; align-items: center; }
.pw-card { width: min(860px, 100%); display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 40px); overflow: auto; }
.pw-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.pw-row figure { margin: 0; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.pw-row figure > img { width: 100%; max-height: 340px; object-fit: contain; border-radius: 10px; background: #0001; }
.pw-row .style-wheel { width: 100%; max-width: 340px; }
.pw-row figcaption { font-size: 12.5px; color: var(--muted); text-align: center; }
.pw-wait { display: flex; gap: 10px; align-items: center; justify-content: center; font-weight: 600; }
.pw-read p { margin: 4px 0; }
@media (max-width: 700px) { .pw-row { grid-template-columns: 1fr; } }
/* editor (v0.31): tool rail and options | picture | layers and what changes */
.viewer.editing .v-arrow, .viewer.editing .v-seg { display: none; }
.ed2 { position: absolute; inset: 8px 12px; display: grid; grid-template-columns: minmax(250px, 290px) 1fr minmax(290px, 330px); gap: 14px; color: #E7E8EE; min-height: 0; }
.ed-left, .ed-right { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.ed-tools-panel { display: grid; grid-template-columns: 64px 1fr; gap: 10px; min-height: 0; }
.ed-rail { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 14px; background: #ffffff0d; border: 1px solid #ffffff1f; align-self: start; }
.ed-tool { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border-radius: 10px; background: transparent; color: #C9CCD6; border: 0; cursor: pointer; }
.ed-tool .ti { font-size: 19px; line-height: 1; }
.ed-tool .tl { font-size: 10px; line-height: 1.1; text-align: center; }
.ed-tool:hover { background: #ffffff14; color: #fff; }
.ed-tool.on { background: #fff; color: #16181D; }
.ed-opts, .ed-layers, .ed-compose { padding: 12px; border-radius: 14px; background: #ffffff0d; border: 1px solid #ffffff1f; display: flex; flex-direction: column; gap: 9px; }
.ed2 h4 { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #9EA3B0; }
.ed2 .muted { color: #9EA3B0; }
.ed2 p { margin: 0; }
.ed2 .tw-row { grid-template-columns: 92px 1fr 36px; }
.ed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ed-check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #C9CCD6; cursor: pointer; }
.ed-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #C9CCD6; }
.ed-note.err, .ed-err { color: #ff8a9b; }
.ed-mode.seg, .ed-var.seg { background: #ffffff14; align-self: flex-start; }
.ed-mode.seg button, .ed-var.seg button { color: #C9CCD6; padding: 5px 8px; font-size: 12px; white-space: nowrap; }
.ed-mode.seg button.on, .ed-var.seg button.on { background: #fff; color: #16181D; }
.ed-models { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; border: 1px dashed #ffffff40; }
.ed-range { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 6px; align-items: center; }
.ed-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-chip { background: #ffffff10; color: #E7E8EE; border: 1px solid #ffffff2a; border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.ed-chip:hover { border-color: #ffffff70; }
.ed-chip.on { background: #ff2d55; border-color: #ff2d55; color: #fff; }
.ed-chip i { font-style: normal; color: #9EA3B0; font-size: 11px; }
.ed-center { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.ed-status { min-height: 18px; font-size: 12.5px; color: #C9CCD6; display: flex; align-items: center; gap: 6px; }
.ed-view { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.ed-pic { position: relative; max-width: 100%; max-height: 100%; user-select: none; display: flex; }
.ed-img { display: block; max-width: 100%; max-height: calc(100vh - 200px); object-fit: contain; border-radius: 8px; }
.ed-mask { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; border-radius: 8px; }
.ed-view .split img { max-height: calc(100vh - 200px); }
.ed-stepbar:empty { display: none; }
.ed-steps { display: flex; gap: 8px; align-items: center; overflow-x: auto; max-width: 100%; padding: 2px; }
.ed-step { position: relative; width: 58px; height: 58px; padding: 0; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: #000; cursor: pointer; flex: none; }
.ed-step img { width: 100%; height: 100%; object-fit: cover; }
.ed-step span { position: absolute; left: 2px; bottom: 2px; background: #000b; color: #fff; font-size: 10px; padding: 0 4px; border-radius: 4px; }
.ed-step.on { border-color: #fff; }
.ed-head { display: flex; align-items: center; gap: 8px; }
.ed-head .small { flex: 1; }
.ed-lrows { display: flex; flex-direction: column; gap: 4px; max-height: 38vh; overflow: auto; }
.ed-layer { display: grid; grid-template-columns: auto auto 1fr repeat(5, auto); align-items: center; gap: 4px; padding: 5px 6px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; }
.ed-layer:hover { background: #ffffff0a; }
.ed-layer.on { background: #ffffff14; border-color: #ffffff40; }
.ed-layer.off .ed-lmain { opacity: .55; }
.ed-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.ed-lmain { display: flex; flex-direction: column; min-width: 0; }
.ed-lname { background: transparent; border: 1px solid transparent; color: #fff; font: inherit; font-weight: 600; font-size: 13px; padding: 1px 3px; border-radius: 5px; min-width: 0; width: 100%; }
.ed-lname:focus { border-color: #ffffff50; background: #0004; outline: none; }
.ed-lmain .small { font-size: 11px; padding-left: 3px; }
.ed-ib { background: transparent; border: 0; color: #C9CCD6; cursor: pointer; padding: 3px 4px; border-radius: 6px; font-size: 13px; }
.ed-ib:hover:not(:disabled) { background: #ffffff1a; color: #fff; }
.ed-ib:disabled { opacity: .35; cursor: default; }
.ed-empty { padding: 4px 2px; }
.ed-compose textarea { width: 100%; box-sizing: border-box; resize: vertical; background: #0003; color: #fff; border: 1px solid #ffffff30; border-radius: 8px; padding: 8px; font: inherit; font-size: 13px; }
.ed-dials summary { cursor: pointer; font-size: 13px; color: #E7E8EE; margin-bottom: 6px; }
.ed-dials .tw-row.set b { color: #ff9fb1; }
.ed-go { width: 100%; padding: 11px; font-size: 15px; }
.ed-done { align-self: flex-end; color: #E7E8EE; border-color: #ffffff30; }
.ed-choices { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; height: 100%; }
.ed-cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 0; flex: 1; width: 100%; }
.ed-cgrid figure { margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; min-height: 0; }
.ed-cgrid img { max-width: 100%; max-height: calc(100vh - 260px); object-fit: contain; border-radius: 8px; }
@media (max-width: 1100px) { .ed2 { grid-template-columns: 1fr; overflow: auto; } .ed-left, .ed-right { overflow: visible; } }
/* project library (v0.31) */
.lib-styles { flex-wrap: wrap; margin: 6px 0 4px; }
.lib-styles button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lib-styles .n { font-size: 11px; font-weight: 600; background: var(--panel2); color: var(--muted); border-radius: 999px; padding: 0 6px; }
.lib-styles button.on .n { background: var(--accent, #ff2d55); color: #fff; }
.lib-add { color: var(--muted); }
.lib-ver { display: inline-flex; align-items: center; gap: 4px; }
.shelves { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.shelf-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.shelf-head h3 { margin: 0; font-size: 14px; }
.shelf-head .linkish { margin-left: auto; }
.shelf-head .linkish + .linkish { margin-left: 8px; }
.shelf-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.asset-card { flex: none; width: 148px; display: flex; flex-direction: column; gap: 4px; }
.ac-img { position: relative; padding: 0; border: 0; background: var(--panel2); border-radius: 10px; overflow: hidden; height: 112px; cursor: pointer; }
.ac-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ac-img:hover img { transform: scale(1.04); }
.ac-ver { position: absolute; right: 5px; top: 5px; background: #000b; color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.ac-ver.from { right: auto; left: 5px; }
.ac-name { font: inherit; font-size: 12.5px; font-weight: 600; border: 1px solid transparent; background: transparent; color: var(--ink); padding: 2px 4px; border-radius: 6px; min-width: 0; }
.ac-name:hover, .ac-name:focus { border-color: var(--line, #8884); outline: none; }
.ac-shelf { font-size: 11.5px; padding: 2px 4px; border-radius: 6px; color: var(--muted); }
.scene-card { max-width: 860px; width: calc(100vw - 32px); }
.scene-card h3 { margin: 12px 0 6px; font-size: 13px; }
.scene-card textarea { width: 100%; box-sizing: border-box; }
.sc-pick { flex: none; width: 120px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--panel2); cursor: pointer; display: flex; flex-direction: column; }
.sc-pick img { width: 100%; height: 84px; object-fit: cover; }
.sc-pick span { font-size: 11.5px; padding: 3px 6px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-pick.on { border-color: var(--accent, #ff2d55); box-shadow: 0 0 0 3px #ff2d5533; }
.hist-list { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow: auto; }
.hist-row { display: grid; grid-template-columns: 18px 1fr auto; gap: 6px; align-items: baseline; font-size: 12.5px; }
.hist-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-a { font-weight: 700; text-align: center; }
.hist-a.created { color: #2fa36b; } .hist-a.deleted { color: #d6455d; } .hist-a.changed { color: #c58b14; }
.ap { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line, #8883); }
.ap h4 { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ap-grid .ap-name { grid-column: 1 / -1; font: inherit; font-weight: 600; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line, #8884); background: transparent; color: var(--ink); }
.ap-grid select { font-size: 12px; min-width: 0; }
.ap-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ap-fig { width: 72px; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.ap-fig img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; }
.ap-fig span { font-size: 10.5px; color: var(--muted); text-align: left; }
/* audit fixes (v0.31) */
.views button { white-space: nowrap; }
.top { gap: 14px; min-width: 0; }
.top-right { min-width: 0; }
#modelSelect { max-width: 300px; min-width: 120px; text-overflow: ellipsis; }
@media (max-width: 1400px) { #modelSelect { max-width: 220px; } }
.proj-pill { min-width: 96px; max-width: 200px; }
.v-title { flex: 0 1 280px; }
.v-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.v-actions::-webkit-scrollbar { display: none; }
.vbtn { white-space: nowrap; }
.bm-head img { background: var(--panel2); }
.is-waiting { opacity: .55; }
.gwhat { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -2px; }
.ap-lin > div + div { margin-top: 8px; }
@media (max-width: 760px) {
  .viewer .v-top { flex-wrap: wrap; gap: 6px; }
  .v-title { flex: 1 1 100%; }
  .v-actions { width: 100%; justify-content: flex-start; }
  .v-body { grid-template-columns: 1fr; position: relative; }
  .v-side { width: auto; position: absolute; left: 0; right: 0; bottom: 0; max-height: 55vh; border-radius: 16px 16px 0 0; z-index: 6; box-shadow: 0 -8px 30px #0008; }
  .v-seg { top: 6px; }
}
.gen-float { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 30; padding: 12px 22px; font-size: 15px; border-radius: 999px; box-shadow: 0 8px 26px #0005; }
@media (max-width: 760px) { .v-badge { display: none; } }
body.noscroll .gen-float { display: none; }
/* editor: the left panel always fits (v0.31.1) */
.ed2 { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(290px, 340px); }
.ed-left { overflow-x: hidden; }
.ed-tools-panel { grid-template-columns: 64px minmax(0, 1fr); }
.ed-opts { min-width: 0; overflow-wrap: anywhere; }
.ed-mode.seg { display: flex; flex-wrap: wrap; align-self: stretch; }
.ed-mode.seg button { flex: 1 1 auto; }
.ed-models button { white-space: normal; }
@media (max-width: 1100px) { .ed2 { grid-template-columns: 1fr; } }
.ed-chead { justify-content: space-between; }
.ed-voice { background: #ff2d55; color: #fff; border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 12.5px; cursor: pointer; box-shadow: 0 2px 10px #ff2d5555; }
.ed-voice:hover { filter: brightness(1.1); }
.ed-compose .voice-wrap { --wave: #ff5c7c; --wave-dim: #ffffff40; }
.ed-compose .voice-bar { background: #0006; border-color: #ffffff30; color: #fff; }
.ed-compose .voice-bar .vtime { color: #fff; } .ed-compose .voice-bar .vlabel { color: #C9CCD6; }
.ed-plan { border: 1px solid #ffffff35; background: #ffffff0f; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.ep-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ep-scope { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #ff2d55; color: #fff; }
.ep-scope.whole { background: #0a84ff; } .ep-scope.outside { background: #bf5af2; }
.ep-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.ep-q { color: #ffd60a; }
.ed-gos .ed-go { flex: 1; }
.ed-compose .voice-wrap[data-mode=rec] textarea, .ed-compose .voice-wrap[data-mode=busy] textarea { min-height: 112px; }
.ed-compose .voice-bar { height: 64px; flex-wrap: wrap; row-gap: 2px; right: 6px; }
.ed-compose .voice-bar .wave { flex: 1 1 100%; height: 34px; order: -1; }
.ed-compose .voice-bar .vlabel { flex: 1; max-width: none; }

/* v0.32.1: version pill and the banner shown when the window and the server disagree */
.ver-pill { opacity: .7; font-variant-numeric: tabular-nums; }
.ver-pill:empty { display: none; }
.ver-banner { position: sticky; top: 0; z-index: 9999; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 16px; background: #FFE8A3; color: #3A2E00; font-size: 14px; }

/* v0.33: clearer selection tools */
.ed-band { display: flex; flex-direction: column; gap: 4px; }
.ed-hist { width: 100%; height: 44px; border-radius: 6px; background: #00000040; }
.ed-band .tw-row { grid-template-columns: 70px 1fr 0; }
.ed-live { color: #FFC2D4; min-height: 1em; margin: 0; }
.ed-live:empty { display: none; }
.ed-modebox { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px solid #ffffff1a; }
.ed-modebox .ed-mode.seg { flex-direction: column; align-items: stretch; }
.ed-modebox .ed-mode.seg button { text-align: left; white-space: normal; }
.ed-mode.seg button:disabled { opacity: .4; cursor: default; }

/* v0.34: active project beside the logo, a divider before the tabs */
.top .proj-pill { margin-left: -6px; }
.top .views { padding-left: 18px; border-left: 1px solid var(--line); }
.proj-switch .ps-sub { margin: -2px 12px 6px; font-size: 12px; color: var(--muted); }
.proj-switch .ps-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; text-align: left; }
.proj-switch .ps-meta { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.proj-switch .ps-foot { flex-wrap: wrap; }
/* v0.34: library card actions and uploads on the shelves */
.ac-acts { display: flex; gap: 4px; flex-wrap: wrap; }
.ac-acts { flex-wrap: nowrap; }
.ac-acts button { font-size: 11px; padding: 3px 6px; flex: 1; white-space: nowrap; border-radius: 7px; background: var(--panel2); color: var(--ink); font-weight: 600; }
.ac-acts button:hover { background: var(--accent, #E5245E); color: #fff; }
.ac-ver.up { left: 5px; right: auto; background: #1F6FEB; }
.up-btn { cursor: pointer; }
.plib-card.over { outline: 2px dashed var(--accent, #E5245E); outline-offset: -6px; }
/* v0.34: you, sign-in and the Admin view */
.user-btn { width: 34px; height: 34px; border-radius: 50%; padding: 0; display: grid; place-items: center; background: var(--panel2); color: var(--ink); font-weight: 800; font-size: 12.5px; border: 1px solid var(--line); }
.user-menu { position: fixed; z-index: 60; min-width: 240px; max-width: 300px; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 12px 40px #0003; }
.user-menu button { justify-content: flex-start; }
.role-badge { align-self: flex-start; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: var(--panel2); }
.role-badge.owner { background: #E5245E22; color: #C21850; } .role-badge.admin { background: #1F6FEB22; color: #1F6FEB; }
.signin { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); padding: 16px; }
.si-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 20px 60px #0002; }
.si-card h1 { margin: 4px 0 0; font-size: 22px; }
.si-logo { height: 28px; align-self: flex-start; }
.si-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.si-f input { font: inherit; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.si-err { color: #C21850; font-size: 13px; min-height: 1em; margin: 0; }
.server-mode .gal-where { display: none; }
.admin-body { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; display: flex; flex-direction: column; gap: 14px; }
.adm-head h1 { margin: 0; }
.adm-tabs { align-self: flex-start; }
.adm-panel { display: flex; flex-direction: column; gap: 12px; }
.adm-table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.adm-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.adm-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13.5px; }
.adm-table tr.off td { opacity: .55; }
.adm-row-acts { white-space: nowrap; text-align: right; }
.adm-add { display: grid; grid-template-columns: 1fr 1.3fr auto 1.6fr auto; gap: 8px; }
.adm-add input, .adm-add select, .adm-proj select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); min-width: 0; }
.adm-note { padding: 10px 14px; border-radius: 12px; background: #FFF4D6; color: #4A3A00; font-size: 13.5px; }
.adm-note.ok { background: #E3F6EA; color: #0F4D2A; }
.adm-pw { font-size: 15px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #fff; }
.adm-warn { color: #B26A00; }
.adm-roles { margin: 0; padding-left: 18px; }
.adm-proj, .adm-card { padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.adm-proj h3, .adm-card h3 { margin: 0; }
.adm-members { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-mem { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--panel2); font-size: 13px; font-weight: 600; }
.adm-mem select { padding: 3px 6px; font-size: 12px; }
@media (max-width: 760px) { .adm-add { grid-template-columns: 1fr; } .adm-table th:nth-child(3), .adm-table td:nth-child(3), .adm-table th:nth-child(5), .adm-table td:nth-child(5) { display: none; } }

/* v0.35.2 hover card on Style Wheel ingredients */
.ing-tip { position: fixed; z-index: 60; width: 340px; max-width: calc(100vw - 16px); background: var(--panel, #fff); color: var(--ink, #222); border: 1px solid var(--line, #ddd); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 10px 12px; font-size: 13px; pointer-events: none; }
.ing-tip .it-head b { font-size: 14px; }
.ing-tip .it-what { margin: 4px 0 8px; line-height: 1.35; }
.ing-tip .it-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; opacity: .6; margin: 6px 0 3px; }
.ing-tip .it-dial { display: grid; grid-template-columns: 104px 40px 1fr; gap: 6px; align-items: center; margin: 3px 0; }
.ing-tip .it-l { font-weight: 600; font-size: 12px; }
.ing-tip .it-bar { height: 6px; border-radius: 3px; background: rgba(128,128,128,.2); overflow: hidden; }
.ing-tip .it-bar i { display: block; height: 100%; background: var(--pink); }
.ing-tip .it-w { font-size: 12px; line-height: 1.25; }
.ing-tip .it-w em { font-style: normal; opacity: .65; }
.ing-tip .it-w em.ok { color: var(--ok); opacity: 1; }
.ing-tip .it-sw { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.ing-tip .it-sw .it-sub { margin: 0 6px 0 0; }
.ing-tip .it-sw i { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,.15); }
.ing-tip .it-foot { margin: 8px 0 0; }
/* v0.35.3 kind icon on each Style Wheel picture */
.kind-ic { position: absolute; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px #11131840; line-height: 1; pointer-events: auto; z-index: 2; }
.chip .kind-ic { top: 42px; left: -6px; width: 26px; height: 26px; font-size: 15px; }
.chip.dragging .kind-ic { opacity: 0; }
.style-wheel .swchip .kind-ic { top: 9cqw; left: 1.5cqw; width: 4.2cqw; height: 4.2cqw; font-size: 2.4cqw; }
/* v0.36 Picture to Style Wheel breakdown */
.pw-break { margin: 8px 0; display: grid; gap: 3px; }
.pw-break .it-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
.pw-ing { font-size: 13px; padding: 3px 8px; border-radius: 8px; background: var(--panel2); }
.pw-ing .pw-ic { display: inline-block; width: 20px; }
.pw-ing.hit { box-shadow: inset 3px 0 0 var(--ok); }
.pw-ing.extra { box-shadow: inset 3px 0 0 var(--orange); }
.pw-ing.missed { box-shadow: inset 3px 0 0 var(--danger); opacity: .8; }
.pw-ing em { font-style: normal; color: var(--muted); }
/* v0.37 Style my picture: start card, style board, Studio bar */
.start-card.apply::before { background: linear-gradient(135deg, var(--plum), var(--pink)); }
.ap-pick { align-self: flex-start; display: flex; align-items: center; gap: 8px; }
.ap-pick.has img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.ap-board .ap-top { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin-top: 8px; }
.ap-base { margin: 0; }
.ap-base img { width: 100%; border-radius: 12px; display: block; box-shadow: var(--shadow); }
.ap-base figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ap-opts { display: flex; flex-direction: column; gap: 8px; }
.ap-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ap-row > b { min-width: 92px; font-size: 13px; }
.ap-film select { max-width: 340px; }
.ap-film .ap-filmwhy { width: 100%; margin: 0 0 0 98px; }
.ap-row .search { flex: 1; min-width: 200px; }
.ap-ask label { font-size: 13px; margin-right: 12px; }
.ap-tog { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; cursor: pointer; }
.ap-tog input { margin: 0; }
.ap-tog.on { background: var(--panel2); border-color: var(--ink); font-weight: 600; }
.ap-strip { display: flex; gap: 14px; overflow-x: auto; padding: 12px 2px 8px; scroll-snap-type: x proximity; margin-top: 10px; }
.ap-card { flex: 0 0 270px; scroll-snap-align: start; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.ap-card.busy { outline: 2px dashed var(--pink); }
.ap-card .ap-wheel .style-wheel { width: 100%; }
.ap-card .ap-name .name-input { width: 100%; font-weight: 700; font-size: 15px; }
.ap-card p { margin: 0; }
.ap-outs { display: flex; flex-direction: column; gap: 6px; }
.ap-outs img { cursor: zoom-in; border-radius: 8px; }
.ap-outs .ap-latest { width: 100%; max-height: 200px; object-fit: cover; box-shadow: var(--shadow); }
.ap-thumbs { display: flex; gap: 6px; overflow-x: auto; }
.ap-thumbs img { flex: 0 0 64px; width: 64px; height: 48px; object-fit: cover; }
.ap-pending { margin-top: 14px; padding: 12px; border-radius: 16px; background: var(--panel2); border: 1px dashed var(--ink); }
.ap-pending h3 { margin: 0; font-size: 15px; }
.ap-pickcard { cursor: pointer; opacity: .62; transition: opacity .15s; }
.ap-pickcard.on { opacity: 1; outline: 2px solid var(--ink); }
.ap-check { display: inline-flex; align-items: center; gap: 6px; }
.ap-check input { width: 18px; height: 18px; margin: 0; }
.ap-more { padding: 8px 10px; border-radius: 12px; background: var(--panel2); }
.ap-painted { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.ap-painted h3 { margin: 0 0 2px; }
.ap-prow { margin-top: 12px; }
.ap-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 6px; }
.ap-pgrid figure { margin: 0; }
.ap-pgrid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; cursor: zoom-in; display: block; box-shadow: var(--shadow); }
.ap-pgrid figcaption { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.ap-pgrid figure:nth-child(1 of figure) img { outline: 2px solid var(--line); }
.ap-wait { aspect-ratio: 4 / 3; border-radius: 10px; border: 2px dashed var(--pink); display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.ap-add { align-items: center; justify-content: center; text-align: center; color: var(--ink); border-style: dashed; cursor: pointer; font-weight: 400; }
.ap-add > span:first-child { font-size: 34px; }
.apply-bar { position: sticky; top: 6px; z-index: 15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 8px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.apply-bar img { width: 48px; height: 36px; object-fit: cover; border-radius: 6px; }
.apply-bar > span { flex: 1; min-width: 200px; font-size: 13px; }
@media (max-width: 900px) { .ap-board .ap-top { grid-template-columns: 1fr; } }

/* viewer: before / after over your own picture */
.v-stage > .split { width: 100%; height: 100%; }
.v-stage > .split img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.v-stage > .split .sp-a { position: static; display: block; }
.v-splitbtn { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 3; background: #111318D9; color: #fff; border: 1px solid #fff5; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; cursor: pointer; }
.v-splitbtn.on { background: #fff; color: #16181D; }
.v-stage > .split .sp-lab { top: auto; bottom: 18px; }
.ap-vers { display: flex; flex-direction: column; gap: 4px; }
.ap-vers .seg { flex-wrap: wrap; align-self: flex-start; }
.ap-vers .seg button { padding: 3px 10px; font-size: 12.5px; }
.ap-vers p { font-size: 12px; }
.ap-unpainted { border: 1px dashed var(--line); border-radius: 8px; padding: 18px 8px; text-align: center; }
.ap-th { position: relative; flex: 0 0 64px; padding: 0; border: 0; background: none; cursor: zoom-in; }
.ap-th img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; display: block; }
.ap-th span { position: absolute; left: 3px; bottom: 3px; background: #111318D9; color: #fff; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 6px; }
.ap-vers .linkish { color: var(--muted); font-weight: 400; margin-left: 6px; }

/* reload button: quiet normally, lit when a newer version is installed */
.reload-btn.new { width: auto; white-space: nowrap; padding: 0 12px; color: #3A2E00; background: #FFD84D; font-size: 13px; font-weight: 700; box-shadow: 0 0 0 0 #FFD84D; animation: newver 1.8s ease-out infinite; }
@keyframes newver { 0% { box-shadow: 0 0 0 0 #FFD84Dcc; } 100% { box-shadow: 0 0 0 10px #FFD84D00; } }
@media (prefers-reduced-motion: reduce) { .reload-btn.new { animation: none; } }
/* film look bar above the Style Wheel */
.film-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); position: relative; z-index: 2; }
.film-bar > b { font-size: 13px; }
.film-bar .film-select { max-width: 300px; }
.film-chip { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; padding: 2px 4px 2px 9px; border-radius: 999px; background: var(--panel2); color: var(--ink); }
.film-chip button { font-size: 14px; padding: 0 4px; }
.film-bar .film-name { margin-left: auto; font-size: 12px; display: inline-flex; gap: 4px; align-items: center; color: var(--muted); }
/* element treatments picked for a wheel, along its bottom edge (names only when the wheel is big enough) */
.sw-els { position: absolute; left: 12%; right: 12%; bottom: 1%; display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; z-index: 3; }
.sw-el { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 1px 6px 1px 1px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); white-space: nowrap; box-shadow: var(--shadow); }
.sw-el img { width: 26px; height: 17px; border-radius: 999px; object-fit: cover; }
.sw-el .nm { display: none; }
@container (min-width: 360px) { .sw-el .nm { display: inline; } }
/* film look picker: a grid of pictures */
.fp-card-wrap { width: min(1100px, 100%); max-height: 88vh; display: flex; flex-direction: column; gap: 8px; }
.fp-head { display: flex; gap: 10px; align-items: center; }
.fp-head h2 { margin: 0; white-space: nowrap; font-size: 18px; }
.fp-head .search { flex: 1; }
.fp-body { overflow-y: auto; padding-right: 4px; }
.fp-group h3 { font-size: 14px; margin: 12px 0 6px; }
.fp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.fp-card { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 0 0 6px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); color: var(--ink); cursor: pointer; }
.fp-card:hover { box-shadow: var(--shadow); }
.fp-card.on { outline: 3px solid var(--pink); outline-offset: -1px; }
.fp-card b, .fp-card .small { padding: 0 6px; line-height: 1.2; }
.fp-card b { font-size: 12px; }
.fp-pic { position: relative; aspect-ratio: 1; background: var(--panel2); }
.fp-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fp-tag { position: absolute; left: 4px; bottom: 4px; font-size: 9px; padding: 1px 5px; border-radius: 6px; background: #000a; color: #fff; }
.fp-card-wrap { position: relative; }
.fp-cam { position: absolute; right: 4px; top: 4px; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 0; background: #000a; color: #fff; font-size: 14px; line-height: 28px; cursor: pointer; opacity: .75; }
.fp-cam:hover, .fp-cam:focus-visible { opacity: 1; }
.fp-still { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); width: min(520px, calc(100% - 24px)); background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.fp-still.drag { outline: 3px dashed var(--pink); }
.fp-still h3 { margin: 0; font-size: 15px; }
.fp-still .row { gap: 6px; flex-wrap: wrap; }
.fp-still .row .search { flex: 1; min-width: 180px; }
.fp-still-row { display: flex; gap: 12px; align-items: flex-start; }
.fp-still-pic { width: 110px; flex: none; border-radius: 10px; overflow: hidden; }
.fp-still ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.fp-status:empty { display: none; }
.ap-filmpic img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; vertical-align: middle; }
@media (max-width: 600px) { .fp-head { flex-wrap: wrap; } }

/* My styles folders */
.lib-folders { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.lib-folder-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lib-folder-row button { background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-weight: 500; padding: 4px 11px; font-size: 13px; border-radius: 999px; }
.lib-folder-row button.on { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.lib-folder-row button .n { margin-left: 6px; font-size: 11px; opacity: .7; }
.lib-folder-row button.ghost { border-style: dashed; }
.lib-folder-tools { margin-top: 2px; }
.lib-move { max-width: 150px; }
.lib-pick { width: min(560px, 100%); max-height: 85vh; display: flex; flex-direction: column; gap: 10px; }
.lib-pick h2 { margin: 0; font-size: 18px; }
.lib-pick-list { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.lib-pick-row { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 8px; cursor: pointer; }
.lib-pick-row:hover { background: var(--panel2); }
.lib-pick-row img, .lib-pick-blank { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; background: var(--panel2); flex: none; }
.pc-acts { display: inline-flex; gap: 2px; align-items: center; }
.pc-acts .icon-only { padding: 3px 6px; }
.film-kitn { font-size: 11px; opacity: .7; }
.ap-filmkit { display: block; margin-top: 2px; }
.build-seg { display: inline-flex; gap: 6px; align-items: center; }
.build-seg .seg button { padding: 3px 10px; font-size: 12px; }
/* Trash in Settings */
.trash-list { display: flex; flex-direction: column; gap: 6px; }
.trash-row { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.trash-row img, .trash-blank { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; background: var(--panel2); flex: none; display: grid; place-items: center; }
.trash-meta { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ap-hidden { color: var(--plum); margin: 4px 0; }

/* a style card's failed paint: inside its own card (it once used .verr, which is absolutely placed, and floated to the top of the board) */
.ap-err { color: var(--danger); margin: 6px 0 0; }

/* before / after: the line is picked up (follows the mouse until the next click) */
.split.held { cursor: col-resize; }
.split.held .sp-line span { transform: translate(-50%, -50%) scale(1.25); box-shadow: 0 0 0 3px var(--accent, #e33); }

/* restyle dialog: finished line */
.rs-done { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ok, #2a9d5c) 18%, transparent); font-weight: 600; }
/* AI prompt check: what the AI changed in the rules prompt */
.pm-diff { max-height: 340px; }
.pm-diff .df-gone { color: var(--muted); text-decoration: line-through; background: color-mix(in srgb, #d9534f 12%, transparent); }
.pm-diff .df-new { background: color-mix(in srgb, #3fa86b 16%, transparent); }
