/* ==========================================================================
   Hufan Studio — logged-in application
   ========================================================================== */

body.app { background: #fff; }
.app-shell { display: grid; grid-template-columns: var(--sb-w, 236px) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; transition: grid-template-columns 320ms var(--ease-out); }
.app-shell.is-collapsed { --sb-w: 68px; }

/* ------------------------------------------------------------------ Sidebar */
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 14px; padding: 14px 12px 12px; background: #fbfbfb; border-right: 1px solid var(--line); overflow: hidden; z-index: 20; }
.sb-top { display: flex; align-items: center; justify-content: space-between; height: 36px; padding-left: 6px; }
.sb-logo { display: inline-flex; border-radius: 8px; }
.sb-collapse { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--faint); transition: all var(--t) var(--ease); }
.sb-collapse:hover { background: rgba(0,0,0,0.05); color: var(--ink); }
.sb-new { justify-content: flex-start; gap: 10px; padding: 0 12px; height: 40px; }
.sb-new .kbd { margin-left: auto; background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.14); color: rgba(255,255,255,0.7); }
.sb-nav { display: grid; gap: 1px; }
.sb-item { position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 9px; font-size: 14px; color: var(--ink-2); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); white-space: nowrap; }
.sb-item .i { color: var(--muted); transition: color var(--t-fast) var(--ease); }
.sb-item:hover { background: rgba(0,0,0,0.04); color: var(--ink); }
.sb-item.is-active { background: rgba(0,0,0,0.06); color: var(--ink); font-weight: 500; }
.sb-item.is-active .i { color: var(--ink); }
.sb-item .sb-badge { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-item .sb-live { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: live 1.8s var(--ease) infinite; }
.sb-sep { height: 1px; background: var(--line); margin: 10px 6px; }
.sb-bottom { margin-top: auto; display: grid; gap: 6px; }
.sb-credits { padding: 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; gap: 8px; }
.sb-credits .row { justify-content: space-between; font-size: 12.5px; }
.sb-credits b { font-weight: 500; font-variant-numeric: tabular-nums; }
.sb-user { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 11px; text-align: left; transition: background-color var(--t-fast) var(--ease); }
.sb-user:hover { background: rgba(0,0,0,0.04); }
.sb-user .who { min-width: 0; flex: 1; display: grid; }
.sb-user .who b { font-size: 13.5px; font-weight: 500; }
.sb-user .who span { font-size: 12px; color: var(--muted); }
.sb-user .i { color: var(--faint); }
.sb-label { transition: opacity 200ms var(--ease); }
.app-shell.is-collapsed .sb-label, .app-shell.is-collapsed .sb-credits, .app-shell.is-collapsed .sb-user .who, .app-shell.is-collapsed .sb-user > .i, .app-shell.is-collapsed .sb-new .kbd, .app-shell.is-collapsed .sb-badge, .app-shell.is-collapsed .logo-word { display: none; }
.app-shell.is-collapsed .sb-top { flex-direction: column; height: auto; gap: 8px; padding-left: 0; }
.app-shell.is-collapsed .sb-new { justify-content: center; padding: 0; }
.app-shell.is-collapsed .sb-item { justify-content: center; padding: 0; }
.app-shell.is-collapsed .sb-user { justify-content: center; padding: 6px 0; }
.app-shell:not(.is-collapsed) .sb-item[data-tip]::after { display: none; }

/* ------------------------------------------------------------------ Main */
.main { min-width: 0; position: relative; }
.page { max-width: 1320px; margin: 0 auto; padding: 44px 48px 96px; animation: pageIn 420ms var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-narrow { max-width: 980px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-title { font-size: 32px; letter-spacing: -0.035em; line-height: 1.1; font-weight: 500; }
.page-sub { font-size: 14.5px; color: var(--muted); margin-top: 6px; }
.sec { margin-top: 56px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.sec-title { font-size: 17px; font-weight: 500; letter-spacing: -0.015em; }
.sec-link { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; transition: color var(--t) var(--ease); }
.sec-link:hover { color: var(--ink); }
.sec-link .i { width: 14px; height: 14px; }

.m-top { display: none; }
.bottom-nav { display: none; }

/* ------------------------------------------------------------------ Home */
.home { max-width: 1120px; }
.home-head { display: grid; gap: 10px; margin: 24px 0 26px; }
.home-title { font-size: 34px; letter-spacing: -0.038em; line-height: 1.1; font-weight: 500; }

.composer { position: relative; background: #fff; border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 24px 50px -32px rgba(0,0,0,0.3); transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.composer:focus-within { border-color: rgba(0,0,0,0.24); box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 24px 50px -32px rgba(0,0,0,0.3), 0 0 0 5px rgba(17,17,17,0.04); }
.composer.is-drag { border-color: var(--ink); box-shadow: 0 0 0 5px rgba(17,17,17,0.06); }
.composer-body { display: flex; gap: 14px; padding: 16px 16px 6px; }
.composer-upload { flex: none; width: 76px; height: 76px; border-radius: 13px; border: 1px dashed var(--line-3); background: var(--s1); display: grid; place-content: center; justify-items: center; gap: 4px; font-size: 12px; color: var(--muted); transition: all var(--t) var(--ease); position: relative; overflow: hidden; }
.composer-upload:hover { border-color: var(--ink); color: var(--ink); background: #fff; }
.composer-upload img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.composer-upload .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 6px; background: rgba(255,255,255,0.92); display: grid; place-items: center; color: var(--ink); z-index: 2; }
.composer-upload .x .i { width: 12px; height: 12px; }
.composer textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: transparent; font-size: 17px; line-height: 1.5; letter-spacing: -0.01em; min-height: 120px; padding: 4px 2px; color: var(--ink); }
.composer textarea::placeholder { color: var(--faint); }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px 12px 16px; flex-wrap: wrap; }
.composer-foot .row { gap: 6px; flex-wrap: wrap; }
.chip-btn { height: 32px; padding: 0 11px; border-radius: 9px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ink-2); border: 1px solid var(--line); background: #fff; transition: all var(--t) var(--ease); white-space: nowrap; }
.chip-btn:hover { border-color: var(--line-3); color: var(--ink); }
.chip-btn .i { width: 15px; height: 15px; color: var(--muted); }
.chip-btn img { width: 20px; height: 20px; border-radius: 5px; object-fit: cover; margin-left: -4px; }
.chip-btn.is-set { background: var(--s2); border-color: transparent; }
.composer-director { margin: 0 16px 14px; }

.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.quick-btn { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px 0 12px; border-radius: 11px; background: var(--s2); font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: background-color var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.quick-btn:hover { background: var(--s4); color: var(--ink); }
.quick-btn:active { transform: translateY(1px); }
.quick-btn .i { width: 17px; height: 17px; color: var(--muted); }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 176px; gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-products { grid-auto-columns: 200px; }
.tile { display: grid; gap: 9px; cursor: pointer; }
.tile .media { border-radius: 14px; }
.tile-title { font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.tile-meta { font-size: 12px; color: var(--muted); margin-top: -6px; }
.tile .media-actions { opacity: 0; }
.tile:hover .media-actions, .tile:focus-within .media-actions { opacity: 1; transform: none; }
.add-tile { display: grid; place-content: center; justify-items: center; gap: 8px; border-radius: 14px; border: 1px dashed var(--line-3); color: var(--muted); font-size: 13px; transition: all var(--t) var(--ease); background: var(--s1); }
.add-tile:hover { border-color: var(--ink); color: var(--ink); background: #fff; }
.add-tile .ic { width: 36px; height: 36px; border-radius: 10px; background: #fff; display: grid; place-items: center; box-shadow: var(--sh-1); }

.product-card { display: grid; gap: 10px; cursor: pointer; }
.product-card .pimg { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--s3); }
.product-card .pimg img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.product-card:hover .pimg img { transform: scale(1.03); }
.product-card .pmeta { display: grid; gap: 1px; }
.product-card .pmeta b { font-size: 13.5px; font-weight: 500; }
.product-card .pmeta span { font-size: 12px; color: var(--muted); }
.product-card .tag { position: absolute; left: 8px; bottom: 8px; }

/* ------------------------------------------------------------------ Studio (three areas) */
.studio { --lp: 348px; --rp: 296px; display: grid; grid-template-columns: var(--lp) minmax(0, 1fr) var(--rp); height: 100vh; height: 100dvh; transition: grid-template-columns 360ms var(--ease-out); }
.studio.rp-closed { --rp: 0px; }
.st-left, .st-right { display: flex; flex-direction: column; min-height: 0; background: #fff; }
.st-left { border-right: 1px solid var(--line); }
.st-right { border-left: 1px solid var(--line); overflow: hidden; }
.st-right-inner { width: var(--rp-w, 296px); min-width: 296px; height: 100%; overflow-y: auto; display: flex; flex-direction: column; }
.studio.rp-closed .st-right { border-left-color: transparent; }
.st-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 18px 24px; display: grid; gap: 22px; align-content: start; }
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px 0; }
.st-title { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.st-foot { padding: 14px 18px 16px; border-top: 1px solid var(--line); background: #fff; display: grid; gap: 8px; }
.st-foot .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.st-group { display: grid; gap: 10px; }
.st-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.st-label .hint { font-weight: 400; color: var(--faint); font-size: 12px; }

.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.type-btn { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 11px; border-radius: 11px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 500; color: var(--muted); text-align: left; transition: all var(--t) var(--ease); }
.type-btn .i { width: 17px; height: 17px; }
.type-btn:hover { color: var(--ink); border-color: var(--line-3); }
.type-btn.is-active { color: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 0.5px var(--ink); }
/* Image modes: small tiles, so long names never wrap */
.mode-tiles { gap: 8px; }
.mode-tile { display: grid; justify-items: start; align-content: start; gap: 1px; height: auto; padding: 11px 12px 10px; white-space: nowrap; min-width: 0; }
.mode-tile .i { width: 17px; height: 17px; margin-bottom: 7px; }
.mode-tile b { font-weight: 500; font-size: 13px; line-height: 1.25; color: inherit; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mode-tile span { font-size: 11.5px; line-height: 1.3; color: var(--faint); font-weight: 400; }
.mode-tile.is-active span { color: var(--muted); }

.prompt-box { position: relative; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.prompt-box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(17,17,17,0.05); }
.prompt-box textarea { display: block; width: 100%; min-height: 168px; max-height: 360px; border: 0; outline: 0; resize: vertical; background: transparent; padding: 14px 14px 6px; font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.prompt-box textarea::placeholder { color: var(--faint); }
.prompt-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 8px 10px; }
.prompt-count { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.improve-btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink); background: var(--s3); transition: all var(--t) var(--ease); }
.improve-btn:hover { background: var(--s4); }
.improve-btn .i { width: 15px; height: 15px; color: var(--accent); }
.improve-btn.is-busy .i { animation: breathe 1s var(--ease) infinite; }

.director-card { display: grid; gap: 12px; padding: 14px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); animation: riseSm 400ms var(--ease-out) both; }
.director-card .dc-head { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 500; }
.director-card .dc-mark { width: 22px; height: 22px; border-radius: 7px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.director-card .dc-mark .i { width: 13px; height: 13px; }
.director-card .dc-msg { font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.director-card .dc-prompt { font-size: 12.5px; line-height: 1.6; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); max-height: 180px; overflow: auto; }
.director-card .dc-prompt mark { background: var(--accent-soft); color: var(--ink); border-radius: 3px; padding: 0 1px; }
.director-card .dc-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.checks { display: grid; gap: 6px; }
.check-row { display: flex; gap: 10px; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); font-size: 12.5px; line-height: 1.45; color: var(--ink-2); animation: riseSm 360ms var(--ease-out) both; }
.check-row .i { flex: none; width: 15px; height: 15px; margin-top: 1px; color: #b7791f; }
.check-row b { font-weight: 500; color: var(--ink); display: block; }
.check-row .fix { margin-left: auto; align-self: center; font-size: 12px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-3); white-space: nowrap; }
.check-ok { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.check-ok .i { width: 15px; height: 15px; color: #2f9e5b; }

.refs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ref-slot { position: relative; display: grid; gap: 6px; text-align: left; }
.ref-box { position: relative; aspect-ratio: 1; border-radius: 12px; border: 1px dashed var(--line-3); background: var(--s1); display: grid; place-items: center; color: var(--faint); overflow: hidden; transition: all var(--t) var(--ease); cursor: pointer; }
.ref-box:hover, .ref-box.is-drag { border-color: var(--ink); color: var(--ink); background: #fff; }
.ref-box.is-drag { border-style: solid; box-shadow: 0 0 0 4px rgba(17,17,17,0.05); }
.ref-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ref-box.has-img { border-style: solid; border-color: transparent; }
.ref-box .x { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,0.94); color: var(--ink); display: grid; place-items: center; opacity: 0; transition: opacity var(--t) var(--ease); z-index: 2; }
.ref-box .x .i { width: 12px; height: 12px; }
.ref-box:hover .x { opacity: 1; }
.ref-box .lk { position: absolute; left: 5px; bottom: 5px; z-index: 2; }
.ref-name { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; line-height: 1.3; }
.ref-name b { font-weight: 500; color: var(--ink-2); }
.ref-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-note { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.ref-note .i { flex: none; margin-top: 1px; color: #2f9e5b; }
@media (hover: none) { .ref-box .x { opacity: 1; } }

.lock-list { display: grid; gap: 2px; }
.lock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.lock-row:last-child { border-bottom: 0; }
.lock-row .l { display: inline-flex; align-items: center; gap: 9px; }
.lock-row .l .i { width: 15px; height: 15px; color: var(--muted); }

.analysis { display: grid; border-top: 1px solid var(--line); }
.an-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); animation: riseSm 420ms var(--ease-out) both; }
.an-row .status { font-weight: 500; font-size: 12.5px; }
.suggest { display: grid; gap: 10px; padding: 12px; border-radius: 13px; background: var(--s1); border: 1px solid var(--line); animation: riseSm 420ms var(--ease-out) both; }
.suggest p { font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.suggest .h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
.suggest .h .i { width: 14px; height: 14px; color: var(--accent); }

.scene-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Center */
.st-center { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--canvas); }
.st-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; padding: 0 14px 0 20px; flex: none; }
.st-bar .title-input { border: 0; background: transparent; font-size: 14px; font-weight: 500; color: var(--ink); padding: 6px 8px; margin-left: -8px; border-radius: 8px; outline: none; min-width: 60px; max-width: 320px; transition: background-color var(--t) var(--ease); }
.st-bar .title-input:hover { background: rgba(0,0,0,0.04); }
.st-bar .title-input:focus { background: #fff; box-shadow: 0 0 0 1px var(--line-2); }
.st-bar .saved { font-size: 12px; color: var(--faint); }
.bar-btn { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); transition: all var(--t) var(--ease); }
.bar-btn:hover { background: rgba(0,0,0,0.05); color: var(--ink); }
.bar-btn.is-on { color: var(--ink); background: rgba(0,0,0,0.05); }
.st-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px 32px 12px; position: relative; }
.frame { position: relative; border-radius: 18px; overflow: hidden; background: #ebe7e1; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05); transition: width 420ms var(--ease-out), height 420ms var(--ease-out), box-shadow var(--t) var(--ease); isolation: isolate; }
.frame.has-result { box-shadow: 0 2px 6px rgba(0,0,0,0.05), 0 40px 80px -40px rgba(0,0,0,0.4); background: #111; }
.frame > .media { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; background: #111; }
.frame > .media > video { opacity: 1; }
.frame-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; padding: 24px; color: var(--muted); animation: fadeIn 400ms var(--ease) both; }
.frame-empty .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; border: 1px solid rgba(0,0,0,0.08); color: var(--faint); margin-bottom: 4px; }
.frame-empty b { font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.frame-empty span { font-size: 12.5px; max-width: 220px; line-height: 1.5; }
.frame-drop { position: absolute; inset: 14px; border-radius: 14px; border: 1.5px dashed rgba(0,0,0,0.18); display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 20px; color: var(--muted); font-size: 13px; transition: all var(--t) var(--ease); cursor: pointer; }
.frame-drop:hover, .frame-drop.is-drag { border-color: var(--ink); color: var(--ink); background: rgba(255,255,255,0.4); }
.frame-drop b { font-size: 15px; font-weight: 500; color: var(--ink); }
.frame-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.frame-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame-scan { position: absolute; inset: 0; pointer-events: none; }
.frame-scan::before { content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.35)); border-bottom: 1.5px solid rgba(255,255,255,0.9); animation: scanDown 1.7s var(--ease-in-out) infinite; }
@keyframes scanDown { from { top: -30%; } to { top: 100%; } }
.frame-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.35) 1px, transparent 1px); background-size: 33.34% 33.34%; pointer-events: none; }
.frame-chip { position: absolute; left: 12px; top: 12px; z-index: 3; }

.gen { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; color: var(--ink); }
.gen-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 70% at 30% 20%, #f2eee8 0%, #e7e2da 60%, #ddd6cc 100%); }
.gen-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(22px) saturate(0.9); opacity: 0.55; transform: scale(1.1); }
.gen-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0) 70%); background-size: 250% 100%; animation: shimmer 2.8s linear infinite; }
.gen-line { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(0,0,0,0.08); }
.gen-line i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); background: var(--ink); transition: width 300ms linear; }
.gen-line i::after { content: ""; position: absolute; right: 0; top: -1px; width: 40px; height: 4px; background: linear-gradient(90deg, rgba(17,17,17,0), rgba(17,17,17,0.9)); filter: blur(2px); }
.gen-steps { display: grid; gap: 7px; }
.gen-step { display: flex; align-items: center; gap: 9px; font-size: 13px; color: rgba(17,17,17,0.35); transition: color 300ms var(--ease); }
.gen-step .d { width: 14px; height: 14px; display: grid; place-items: center; flex: none; }
.gen-step .d::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.gen-step.is-done { color: rgba(17,17,17,0.55); }
.gen-step.is-done .d::before { display: none; }
.gen-step.is-done .d .i { width: 13px; height: 13px; }
.gen-step.is-now { color: var(--ink); font-weight: 500; }
.gen-step.is-now .d::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: breathe 1.2s var(--ease) infinite; }
.gen-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 12px; color: rgba(17,17,17,0.6); font-variant-numeric: tabular-nums; }
.gen-foot button { font-size: 12px; font-weight: 500; color: var(--ink); padding: 4px 8px; border-radius: 7px; background: rgba(255,255,255,0.6); }
.gen-foot button:hover { background: #fff; }
.gen-pct { font-size: 40px; letter-spacing: -0.04em; font-weight: 500; line-height: 1; margin-bottom: 14px; font-variant-numeric: tabular-nums; }

.vctl { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 26px 12px 10px; display: flex; align-items: center; gap: 8px; background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0)); opacity: 0; transition: opacity var(--t) var(--ease); color: #fff; }
.frame:hover .vctl, .frame:focus-within .vctl { opacity: 1; }
.vctl button { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; transition: background-color var(--t) var(--ease); }
.vctl button:hover { background: rgba(255,255,255,0.16); }
.vctl .i { width: 16px; height: 16px; }
.vctl .scrub { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.3); position: relative; cursor: pointer; }
.vctl .scrub i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); background: #fff; border-radius: 3px; }
.frame-tags { position: absolute; left: 12px; top: 12px; z-index: 3; display: flex; gap: 6px; }

.st-under { flex: none; display: grid; justify-items: center; gap: 12px; padding: 0 20px 16px; }
.toolbar { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 13px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 0 0 1px rgba(0,0,0,0.04); animation: riseSm 400ms var(--ease-out) both; }
.tb-btn { height: 34px; padding: 0 11px; border-radius: 9px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ink-2); transition: all var(--t-fast) var(--ease); white-space: nowrap; }
.tb-btn .i { width: 16px; height: 16px; color: var(--muted); }
.tb-btn:hover { background: var(--s3); color: var(--ink); }
.tb-btn:hover .i { color: var(--ink); }
.tb-btn:active { transform: translateY(1px); }
.tb-btn.is-on .i { color: var(--accent); fill: var(--accent); }
.tb-icon { width: 34px; padding: 0; justify-content: center; }
.tb-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.strip { display: flex; align-items: center; gap: 8px; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.strip::-webkit-scrollbar { display: none; }
.strip-label { font-size: 11.5px; color: var(--faint); white-space: nowrap; margin-right: 4px; }
.strip-item { position: relative; width: 40px; height: 56px; border-radius: 8px; overflow: hidden; flex: none; opacity: 0.6; transition: opacity var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease); background: var(--s4); }
.strip-item:hover { opacity: 1; transform: translateY(-1px); }
.strip-item.is-active { opacity: 1; box-shadow: 0 0 0 2px var(--canvas), 0 0 0 3.5px var(--ink); }
.strip-item img { width: 100%; height: 100%; object-fit: cover; }
.strip-item.is-pending { display: grid; place-items: center; }
.strip-item.is-pending::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,0.15); border-top-color: var(--ink); animation: spin 800ms linear infinite; }

/* Right panel settings */
.set-group { display: grid; gap: 9px; }
.set-label { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.set-label .v { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg-set { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; gap: 2px; border-radius: 10px; background: var(--s3); }
.seg-set button { height: 30px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 5px; transition: all var(--t) var(--ease); }
.seg-set button .i { width: 14px; height: 14px; }
.seg-set button:hover { color: var(--ink); }
.seg-set button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 0 0 0.5px rgba(0,0,0,0.06); }
.adv { border-top: 1px solid var(--line); padding-top: 4px; }
.adv > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 12px 0 8px; font-size: 13px; font-weight: 500; }
.adv > summary::-webkit-details-marker { display: none; }
.adv > summary .i { transition: transform var(--t) var(--ease); color: var(--muted); }
.adv[open] > summary .i { transform: rotate(180deg); }
.adv-body { display: grid; gap: 18px; padding: 6px 0 4px; animation: riseSm 300ms var(--ease-out) both; }
.slider-row { display: grid; gap: 4px; }
.frame-guides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fg-slot { aspect-ratio: 9 / 12; border-radius: 10px; border: 1px dashed var(--line-3); display: grid; place-content: center; justify-items: center; gap: 4px; font-size: 11.5px; color: var(--faint); background: var(--s1); cursor: pointer; transition: all var(--t) var(--ease); position: relative; overflow: hidden; }
.fg-slot:hover { border-color: var(--ink); color: var(--ink); }
.fg-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fg-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cost { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--s1); font-size: 12.5px; }
.cost .row { justify-content: space-between; }
.cost .row span:first-child { color: var(--muted); }
.cost .total { padding-top: 6px; border-top: 1px solid var(--line); font-weight: 500; }

.gen-btn { height: 48px; font-size: 14.5px; }
.gen-btn .cr { margin-left: auto; font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,0.6); font-variant-numeric: tabular-nums; }
.gen-btn .lbl { display: inline-flex; align-items: center; gap: 8px; }

.m-settings-btn { display: none; }

/* Generation dock (continues while you browse) */
.gen-dock { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 300px; display: grid; gap: 8px; }
.dock-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px 10px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-3); position: relative; overflow: hidden; animation: riseSm 360ms var(--ease-out) both; cursor: pointer; }
.dock-thumb { width: 36px; height: 48px; border-radius: 8px; background: var(--s3); overflow: hidden; flex: none; position: relative; }
.dock-thumb img { width: 100%; height: 100%; object-fit: cover; filter: blur(3px); opacity: 0.8; }
.dock-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 70%); background-size: 250% 100%; animation: shimmer 2s linear infinite; }
.dock-txt { min-width: 0; flex: 1; display: grid; gap: 1px; }
.dock-txt b { font-size: 13px; font-weight: 500; }
.dock-txt span { font-size: 12px; color: var(--muted); }
.dock-item .progress-line { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 0; }
.dock-item .progress-line > i { background: var(--accent); }

/* ------------------------------------------------------------------ Library grids */
.toolbar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.toolbar-row .input-wrap { width: 280px; }
.toolbar-row .spacer { flex: 1; }
.view-toggle { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--s3); gap: 2px; }
.view-toggle button { width: 32px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); transition: all var(--t) var(--ease); }
.view-toggle button .i { width: 16px; height: 16px; }
.view-toggle button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 26px 16px; align-items: start; }
.lib-card { display: grid; gap: 10px; cursor: pointer; animation: riseSm 420ms var(--ease-out) both; animation-delay: calc(var(--n, 0) * 30ms); }
.lib-card .media { border-radius: 14px; transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.lib-card:hover .media { box-shadow: var(--sh-2); transform: translateY(-2px); }
.lib-card:hover .media-actions, .lib-card:focus-within .media-actions { opacity: 1; transform: none; }
.lib-card .lc-title { font-size: 13.5px; font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-card .lc-meta { font-size: 12px; color: var(--muted); margin-top: -7px; display: flex; gap: 6px; align-items: center; }
.lib-card .lc-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ghost); }
.lib-card .fav-mark { position: absolute; left: 10px; top: 10px; z-index: 2; width: 24px; height: 24px; border-radius: 7px; background: rgba(255,255,255,0.92); color: var(--accent); display: grid; place-items: center; }
.lib-card .fav-mark .i { width: 13px; height: 13px; fill: currentColor; }
.lib-card .dur { position: absolute; right: 10px; bottom: 10px; z-index: 2; }
.lib-thumb { width: 40px; height: 56px; border-radius: 7px; object-fit: cover; background: var(--s3); display: block; }
.lib-thumb.sq { height: 50px; }
.list-title { display: grid; gap: 2px; min-width: 0; max-width: 420px; }
.list-title b { font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-title span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: inline-flex; gap: 2px; opacity: 0.6; transition: opacity var(--t) var(--ease); }
tr:hover .row-actions { opacity: 1; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); transition: all var(--t-fast) var(--ease); }
.icon-btn:hover { background: var(--s3); color: var(--ink); }
.icon-btn .i { width: 16px; height: 16px; }
.icon-btn.is-on { color: var(--accent); }
.icon-btn.is-on .i { fill: currentColor; }

.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 80px 20px; color: var(--muted); }
.empty .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--s3); display: grid; place-items: center; color: var(--faint); }
.empty b { font-size: 16px; font-weight: 500; color: var(--ink); }
.empty p { font-size: 13.5px; max-width: 320px; }

/* Detail preview (light) */
.detail { display: grid; grid-template-columns: auto 340px; max-height: calc(100dvh - 48px); }
.detail-media { background: #111; display: grid; place-items: center; padding: 0; position: relative; }
.detail-media video, .detail-media img { display: block; max-height: calc(100dvh - 48px); width: auto; max-width: min(56vw, 720px); object-fit: contain; background: #111; }
.detail-media.is-v video { height: min(calc(100dvh - 48px), 820px); aspect-ratio: 9 / 16; object-fit: cover; }
.detail-info { display: flex; flex-direction: column; gap: 18px; padding: 22px; overflow-y: auto; }
.detail-info .k { font-size: 12px; color: var(--faint); }
.detail-info h3 { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.detail-prompt { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); padding: 12px 14px; background: var(--s1); border-radius: 12px; border: 1px solid var(--line); }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.spec-grid div { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.spec-grid div span { display: block; font-size: 11.5px; color: var(--faint); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.modal-wide { width: auto; max-width: calc(100vw - 48px); overflow: hidden; }

/* ------------------------------------------------------------------ Assets */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; height: 40px; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; transition: color var(--t) var(--ease); }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); font-weight: 500; }
.tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: var(--ink); }
.tab .n { font-size: 12px; color: var(--faint); font-weight: 400; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 26px 16px; }
.creator-card { display: grid; gap: 10px; cursor: pointer; }
.creator-card .cimg { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--s3); }
.creator-card .cimg img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.creator-card:hover .cimg img { transform: scale(1.03); }
.creator-card .locks { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 4px; }
.creator-card b { font-size: 13.5px; font-weight: 500; }
.creator-card span.note { font-size: 12px; color: var(--muted); margin-top: -8px; }
.ref-card { display: grid; gap: 8px; }
.ref-card .rimg { aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--s3); position: relative; }
.ref-card .rimg img { width: 100%; height: 100%; object-fit: cover; }
.ref-card span { font-size: 12.5px; color: var(--ink-2); }
.brand { display: grid; gap: 40px; }
.brand-sec h3 { font-size: 15px; font-weight: 500; margin-bottom: 12px; }
.logo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.logo-tile { aspect-ratio: 16 / 9; border-radius: 14px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 26px; letter-spacing: -0.02em; font-weight: 500; position: relative; }
.logo-tile.dark { background: #161616; color: #f4efe7; border-color: transparent; }
.logo-tile span.cap { position: absolute; left: 12px; bottom: 10px; font-size: 11.5px; font-weight: 400; letter-spacing: 0; color: var(--faint); }
.logo-tile.dark span.cap { color: rgba(255,255,255,0.45); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.swatch { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.swatch i { display: block; height: 76px; }
.swatch div { padding: 10px 12px; display: grid; gap: 1px; font-size: 12.5px; }
.swatch div span { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.font-rows { display: grid; gap: 10px; }
.font-row { display: flex; align-items: baseline; gap: 24px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; }
.font-row .aa { font-size: 38px; letter-spacing: -0.03em; width: 80px; }
.rules { display: grid; gap: 0; border-top: 1px solid var(--line); }
.rule { display: flex; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.rule .i { color: var(--muted); }
.rule input { flex: 1; border: 0; outline: 0; font-size: 14px; background: transparent; }
.rule .icon-btn { opacity: 0; }
.rule:hover .icon-btn { opacity: 1; }

.gallery { display: grid; gap: 8px; }
.gallery-main { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--s3); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gallery-thumbs button { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--s3); opacity: 0.7; transition: opacity var(--t) var(--ease), box-shadow var(--t) var(--ease); position: relative; }
.gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs button.is-active { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs .add { border: 1px dashed var(--line-3); display: grid; place-items: center; color: var(--muted); background: var(--s1); opacity: 1; }
.gallery-thumbs .add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.upload-grid .ug { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--s3); }
.upload-grid .ug img { width: 100%; height: 100%; object-fit: cover; }
.upload-grid .ug .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 6px; background: rgba(255,255,255,0.92); display: grid; place-items: center; }
.upload-grid .ug .x .i { width: 11px; height: 11px; }

/* ------------------------------------------------------------------ Templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 16px; }
.tpl-card { display: grid; gap: 10px; animation: riseSm 420ms var(--ease-out) both; animation-delay: calc(var(--n, 0) * 35ms); }
.tpl-card .media { border-radius: 14px; }
.tpl-card .tpl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tpl-card b { font-size: 14px; font-weight: 500; display: block; }
.tpl-card .tpl-meta { font-size: 12px; color: var(--muted); }
.tpl-card .shots { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: flex; gap: 3px; }
.tpl-card .shots i { width: 16px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.55); }
.tpl-card .shots i:first-child { background: #fff; }

/* ------------------------------------------------------------------ Usage / billing / settings */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.stat { padding: 18px 20px; display: grid; gap: 6px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .k { font-size: 12.5px; color: var(--muted); }
.stat .v { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 4px; }
.stat .meter { margin-top: 4px; }
.stat .d { font-size: 12px; color: var(--muted); }
.panel { border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: #fff; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-title { font-size: 15px; font-weight: 500; }
.panel-sub { font-size: 12.5px; color: var(--muted); }
.plan-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; flex-wrap: wrap; }
.plan-card .pc-name { font-size: 22px; font-weight: 500; letter-spacing: -0.025em; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pack { padding: 18px; border-radius: 14px; border: 1px solid var(--line); display: grid; gap: 4px; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.pack:hover { border-color: var(--line-3); box-shadow: var(--sh-1); }
.pack .amt { font-size: 22px; font-weight: 500; letter-spacing: -0.025em; }
.pack .btn { margin-top: 10px; }
.pay-row { display: flex; align-items: center; gap: 14px; }
.card-mark { width: 44px; height: 30px; border-radius: 6px; background: #1a1f36; color: #fff; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; display: grid; place-items: center; }
.settings { display: grid; gap: 0; }
.set-sec { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding: 30px 0; border-top: 1px solid var(--line); }
.set-sec:first-child { border-top: 0; padding-top: 6px; }
.set-sec h3 { font-size: 15px; font-weight: 500; }
.set-sec p.d { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.set-fields { display: grid; gap: 16px; max-width: 520px; }
.set-fields .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.member { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.member:last-child { border-bottom: 0; }
.member .who { flex: 1; min-width: 0; display: grid; }
.member .who span { font-size: 12px; color: var(--muted); }

.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { font-size: 11px; fill: var(--faint); font-variant-numeric: tabular-nums; }
.chart .grid line { stroke: rgba(0,0,0,0.06); stroke-width: 1; shape-rendering: crispEdges; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; padding: 8px 10px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.45; box-shadow: var(--sh-2); white-space: nowrap; opacity: 0; transform: translate(-50%, calc(-100% - 10px)); transition: opacity 120ms var(--ease); font-variant-numeric: tabular-nums; }
.chart-tip.is-on { opacity: 1; }
.chart-tip b { font-weight: 500; }
.chart-tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }

/* Before / after (shared with landing) */
.ba { position: relative; border-radius: 16px; overflow: hidden; cursor: ew-resize; user-select: none; -webkit-user-select: none; touch-action: pan-y; --x: 50%; background: var(--s3); }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--x); width: 0; z-index: 4; }
.ba-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.12), 0 0 12px rgba(0,0,0,0.15); }
.ba-handle span { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: var(--sh-2); display: grid; grid-auto-flow: column; place-content: center; }
.ba-handle span .i { width: 13px; height: 13px; margin: 0 -2px; }
.ba-tag { position: absolute; top: 12px; z-index: 5; font-size: 11.5px; font-weight: 500; color: var(--ink); padding: 4px 8px; border-radius: 7px; background: rgba(255,255,255,0.9); pointer-events: none; }
.ba-tag-l { left: 12px; }
.ba-tag-r { right: 12px; }
.ba-warp { filter: url(#hufanWarp); }
.fix-mark { position: absolute; z-index: 3; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 6px; pointer-events: none; animation: fadeIn 400ms var(--ease) both; }
.fix-mark i { display: block; width: 80px; height: 80px; border-radius: 50%; border: 1.5px dashed #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.1); }
.fix-mark em { font-style: normal; font-size: 11px; font-weight: 500; background: #fff; color: var(--ink); padding: 3px 8px; border-radius: 6px; box-shadow: var(--sh-1); }

/* Image studio grid */
.img-results { display: grid; gap: 12px; }
.img-results.n1 { grid-template-columns: 1fr; }
.img-results.n2 { grid-template-columns: 1fr 1fr; }
.img-results.n4 { grid-template-columns: 1fr 1fr; }
.img-res { position: relative; border-radius: 14px; overflow: hidden; background: #ddd8d0; cursor: pointer; transition: box-shadow var(--t) var(--ease); animation: fadeIn 500ms var(--ease) both; }
.img-res img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-res.is-active { box-shadow: 0 0 0 2px var(--canvas), 0 0 0 3.5px var(--ink); }
.img-res .media-actions { opacity: 0; }
.img-res:hover .media-actions { opacity: 1; transform: none; }
.img-canvas { position: relative; width: 100%; height: 100%; }
.mask-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; z-index: 3; }
.brush-cursor { position: absolute; z-index: 4; pointer-events: none; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.25); transform: translate(-50%, -50%); }

/* ------------------------------------------------------------------ New creation modal */
.nc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nc-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--line); text-align: left; transition: all var(--t) var(--ease); }
.nc-opt:hover { border-color: var(--line-3); background: var(--s1); }
.nc-opt .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--s3); display: grid; place-items: center; flex: none; }
.nc-opt b { display: block; font-size: 14px; font-weight: 500; }
.nc-opt span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

.picker-list { display: grid; gap: 4px; max-height: 360px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.picker-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-align: left; transition: background-color var(--t-fast) var(--ease); }
.picker-item:hover { background: var(--s3); }
.picker-item img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; }
.picker-item b { display: block; font-size: 13.5px; font-weight: 500; }
.picker-item span { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ Responsive */
@media (max-width: 1280px) {
  .studio { --lp: 320px; --rp: 272px; }
  .st-right-inner { min-width: 272px; }
}
@media (max-width: 1100px) {
  .app-shell { --sb-w: 68px; }
  .app-shell .sb-label, .app-shell .sb-credits, .app-shell .sb-user .who, .app-shell .sb-user > .i, .app-shell .sb-new .kbd, .app-shell .sb-badge, .app-shell .logo-word, .sb-collapse { display: none; }
  .app-shell .sb-new { justify-content: center; padding: 0; }
  .app-shell .sb-item { justify-content: center; padding: 0; }
  .app-shell .sb-user { justify-content: center; }
  .app-shell .sb-top { justify-content: center; padding: 0; }
  .app-shell .sb-item[data-tip]:hover::after, .app-shell .sb-item[data-tip]:focus-visible::after { display: block; }
  .studio { --rp: 0px; }
  .studio.rp-open-force { --rp: 272px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .set-sec { grid-template-columns: 1fr; gap: 16px; }
  .page { padding: 36px 32px 96px; }
}
@media (max-width: 860px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .m-top { display: flex; position: sticky; top: 0; z-index: 30; height: 56px; align-items: center; justify-content: space-between; padding: 0 16px; background: rgba(255,255,255,0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .m-top .credits { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(64px + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom); background: rgba(255,255,255,0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bn-item { display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--faint); padding: 6px 0; }
  .bn-item .i { width: 21px; height: 21px; }
  .bn-item.is-active { color: var(--ink); }
  .bn-create { justify-self: center; display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--ink); }
  .bn-create span.c { width: 52px; height: 40px; border-radius: 14px; background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(0,0,0,0.45); transition: transform var(--t-fast) var(--ease); }
  .bn-create:active span.c { transform: scale(0.96); }
  .bn-create .i { width: 22px; height: 22px; }
  .main { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .page { padding: 22px 16px 40px; }
  .page-title { font-size: 26px; }
  .home-title { font-size: 28px; }
  .home-head { margin-top: 6px; }
  .composer-body { padding: 12px 12px 4px; gap: 10px; }
  .composer-upload { width: 56px; height: 56px; }
  .composer textarea { font-size: 16px; min-height: 96px; }
  .composer-foot { padding: 8px 10px 10px; }
  .composer-foot > .row:last-child { width: 100%; }
  .composer-foot > .row:last-child .btn-primary { flex: 1; }
  .rail { grid-auto-columns: 140px; }
  .rail-products { grid-auto-columns: 160px; }
  .gen-dock { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; }

  /* Video studio: preview on top, prompt below, settings in a sheet, sticky generate */
  .studio { display: flex; flex-direction: column; height: auto; min-height: calc(100dvh - 56px); }
  .st-center { order: -1; height: 56vh; min-height: 360px; }
  .st-bar { height: 48px; padding: 0 8px 0 14px; }
  .st-bar [data-toggle-rp] { display: none; }
  .st-stage { padding: 4px 16px 8px; }
  .st-under { padding: 0 12px 10px; }
  .tb-btn .tb-l { display: none; }
  .tb-btn { width: 34px; padding: 0; justify-content: center; }
  .st-left { border-right: 0; }
  .st-left .st-scroll { overflow: visible; padding: 16px 16px 20px; }
  .st-left .st-head { display: none; }
  .st-right { display: none; }
  .st-foot { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 20; box-shadow: 0 -10px 30px -20px rgba(0,0,0,0.25); }
  .m-settings-btn { display: flex; }
  .st-foot .meta { display: none; }
  .detail { grid-template-columns: 1fr; max-height: none; }
  .detail-media video, .detail-media img { max-width: 100%; max-height: 60dvh; }
  .detail-media.is-v video { height: 60dvh; }
  .modal-wide { max-height: calc(100dvh - 24px); overflow-y: auto; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .packs { grid-template-columns: 1fr; }
  .nc-grid { grid-template-columns: 1fr; }
  .toolbar-row .input-wrap { width: 100%; order: -1; }
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
  .asset-grid, .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
  .set-fields .two { grid-template-columns: 1fr; }
}

/* Horizontal bars (charts.js) */
.hbars { display: grid; gap: 14px; }
.hbar { display: grid; gap: 7px; }
.hbar-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); }
.hbar-top b { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); }
.hbar-top em { font-style: normal; font-weight: 400; color: var(--faint); margin-left: 4px; }
.hbar-track { height: 6px; border-radius: 6px; background: var(--s3); overflow: hidden; }
.hbar-track i { display: block; height: 100%; background: var(--ink); border-radius: 6px; transition: width 700ms var(--ease-out); }

/* Result toolbar folds to icons when the preview column is narrow */
.st-under { container-type: inline-size; }
@container (max-width: 660px) {
  .tb-btn .tb-l { display: none; }
  .tb-btn { width: 34px; padding: 0; justify-content: center; }
}

/* ------------------------------------------------------------------ Model picker */
.mp-trigger {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 8px; text-align: left;
  background: #fff; border: 1px solid var(--line-2); border-radius: 12px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.mp-trigger:hover { border-color: rgba(0, 0, 0, 0.22); box-shadow: var(--sh-1); }
.mp-trigger:active { transform: translateY(1px); }
.mp-trigger > .i { flex: none; color: var(--muted); }
.mp-t { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.mp-t b { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-t span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-group .mp-trigger + .xs { display: block; margin-top: 6px; line-height: 1.45; }

.mp-pop { display: grid; }
.mp-head { display: grid; gap: 2px; padding: 14px 16px 6px; }
.mp-head b { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.mp-head span { font-size: 12.5px; color: var(--muted); }
.mp-list { display: grid; gap: 2px; padding: 4px 6px 6px; }
.mp-item {
  position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px; border-radius: 12px; text-align: left;
  transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.mp-item:hover, .mp-item:focus-visible { background: var(--s2); outline: none; }
.mp-item.is-active { background: var(--s2); box-shadow: inset 0 0 0 1px var(--line-2); }
.mp-item[disabled] { opacity: 0.5; cursor: not-allowed; }
.mp-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.mp-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.mp-name b { font-size: 14.5px; font-weight: 600; letter-spacing: -0.015em; }
.mp-co { font-size: 12.5px; color: var(--muted); }
.mp-prev { align-self: center; font-size: 10.5px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); padding: 1px 6px; border-radius: 5px; }
.mp-tag { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.mp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.mp-badge { font-size: 11px; line-height: 18px; color: var(--muted); background: var(--s3); padding: 0 7px; border-radius: 6px; }
.mp-rate { margin-left: auto; padding-left: 6px; font-size: 12px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mp-check { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 10px; border-radius: 50%; background: var(--ink); color: #fff; opacity: 0; transform: scale(0.8); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease-out); }
.mp-check .i { width: 12px; height: 12px; }
.mp-item.is-active .mp-check { opacity: 1; transform: none; }
.mp-foot { display: flex; gap: 8px; align-items: flex-start; margin: 2px 12px 12px; padding: 10px 12px; border-radius: 10px; background: var(--s1); font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.mp-foot .i { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.sheet .mp-head { padding: 0 2px 10px; }
.sheet .mp-list { padding: 0; }
.sheet .mp-foot { margin: 10px 0 0; }

/* Logos inside existing components */
.chip-model { padding-left: 8px; }
.chip-btn .brand-logo img { width: 100%; height: 100%; margin: 0; border-radius: 0; object-fit: contain; }
.chip-model .i-xs { width: 12px; height: 12px; margin-right: -3px; }
.tag-model { display: inline-flex; align-items: center; gap: 5px; }
.tag-model .brand-logo.xs { width: 14px; height: 14px; padding: 1.5px; border-radius: 4px; background: #fff; }
.spec-grid .model-cell { display: inline-flex; font-size: 13px; color: inherit; }
.spec-grid .model-cell .brand-logo { display: inline-grid; }
.spec-grid .model-cell > span:not(.brand-logo) { display: inline; font-size: 12px; }
.cost .model-cell { justify-content: flex-end; }

/* Live generation: OpenAI reports no progress while drawing, so the bar just keeps moving */
.gen-line.is-indet i { width: 32% !important; animation: indet 1.4s var(--ease-in-out) infinite; }
.gen-failed .ico { color: #b3261e; background: #fdf3f2; }
.gen-failed > span:not(.ico) { max-width: 340px; }

/* ------------------------------------------------------------------ Live generation view (Images) */
.ld { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; padding: 14px; color: var(--ink); overflow: hidden; border-radius: inherit; isolation: isolate; container-type: size; }
.ld-canvas { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #f3f1ee; }
.ld-thumb { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(28px) saturate(0.9); opacity: 0.45; }
.ld-blob { position: absolute; border-radius: 50%; filter: blur(42px); will-change: transform; }
.ld-blob.b1 { width: 72%; height: 62%; left: -16%; top: -12%; background: #fff; animation: ldDrift1 14s var(--ease-in-out) infinite alternate; }
.ld-blob.b2 { width: 62%; height: 56%; right: -22%; top: 24%; background: #e6ddd1; animation: ldDrift2 17s var(--ease-in-out) infinite alternate; }
.ld-blob.b3 { width: 56%; height: 46%; left: 14%; bottom: -16%; background: rgba(239, 90, 42, 0.16); animation: ldDrift3 12s var(--ease-in-out) infinite alternate; }
@keyframes ldDrift1 { to { transform: translate(22%, 18%) scale(1.15); } }
@keyframes ldDrift2 { to { transform: translate(-26%, -12%) scale(0.9); } }
@keyframes ldDrift3 { to { transform: translate(18%, -22%) scale(1.2); } }
.ld-sweep { position: absolute; inset: -20%; background: linear-gradient(105deg, rgba(255,255,255,0) 40%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 60%); transform: translateX(-60%); animation: ldSweep 3.4s var(--ease-in-out) infinite; }
@keyframes ldSweep { to { transform: translateX(60%); } }
.ld-grain { position: absolute; inset: 0; opacity: 0.16; mix-blend-mode: multiply; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }

.ld-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.ld-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ld-chip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; flex: none; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(255, 255, 255, 0.85); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ld-chip .brand-logo.xs { width: 14px; height: 14px; }
.ld-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: live 1.6s var(--ease) infinite; }

.ld-center { align-self: center; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 6px; text-align: center; min-width: 0; }
.ld-orb { position: relative; width: 68px; height: 68px; margin-bottom: 8px; display: grid; place-items: center; }
.ld-orb::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.06); }
.ld-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 1.6s linear infinite; }
.ld-ring circle { fill: none; stroke-width: 2.5; }
.ld-ring .trk { stroke: rgba(17, 17, 17, 0.08); }
.ld-ring .arc { stroke: var(--ink); stroke-linecap: round; stroke-dasharray: 44 200; transition: stroke 300ms var(--ease); }
.ld-orb .brand-logo.ld-logo { position: relative; width: 26px; height: 26px; border: 0; border-radius: 0; background: transparent; }
.ld-orb .brand-logo.ld-logo img { width: 100%; height: 100%; }
.ld[data-status="pending"] .ld-ring, .ld[data-status="validating"] .ld-ring { animation-duration: 2.6s; }
.ld[data-status="pending"] .ld-ring .arc { stroke: rgba(17, 17, 17, 0.35); }
.ld-time { display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.ld-time b { font-size: clamp(30px, 13cqw, 52px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; }
.ld-time span { font-size: 13px; color: var(--muted); }
.ld-stage { max-width: 100%; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; text-wrap: balance; }
.ld-stage.is-in { animation: riseSm 420ms var(--ease-out) both; }
.ld-eta { font-size: 12px; color: var(--muted); }

.ld-bottom { display: grid; gap: 10px; }
.ld-prompt { justify-self: center; max-width: 420px; text-align: center; font-size: 12.5px; line-height: 1.45; color: rgba(17, 17, 17, 0.55); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ld-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.ld-step { display: grid; gap: 6px; font-size: 11px; color: rgba(17, 17, 17, 0.4); transition: color 300ms var(--ease); }
.ld-step i { position: relative; display: block; height: 3px; border-radius: 3px; background: rgba(17, 17, 17, 0.1); overflow: hidden; transition: background-color 400ms var(--ease); }
.ld-step.is-done { color: rgba(17, 17, 17, 0.6); }
.ld-step.is-done i { background: var(--ink); }
.ld-step.is-now { color: var(--ink); font-weight: 500; }
.ld-step.is-now i::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; border-radius: inherit; background: var(--accent); animation: indet 1.4s var(--ease-in-out) infinite; }
.ld-cancel { justify-self: center; padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--ink-2); background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.06); transition: background-color var(--t) var(--ease); }
.ld-cancel:hover { background: #fff; }
@container (max-height: 400px) { .ld-prompt, .ld-eta { display: none; } .ld-orb { width: 54px; height: 54px; margin-bottom: 2px; } .ld-orb .brand-logo.ld-logo { width: 20px; height: 20px; } }
@container (max-width: 260px) { .ld-step span { display: none; } .ld-top .ld-chip:first-child { flex: 0 1 auto; } }
@container (max-width: 200px) { .ld { padding: 10px; } .ld-live { display: none; } .ld-stage { font-size: 13px; } .ld-orb { width: 54px; height: 54px; margin-bottom: 2px; } .ld-orb .brand-logo.ld-logo { width: 20px; height: 20px; } .ld-steps { gap: 4px; } }

/* The finished image develops in: blurred to sharp */
.img-res.is-new img { animation: ldDevelop 1100ms var(--ease-out) both; animation-delay: calc(var(--n, 0) * 90ms); }
@keyframes ldDevelop { from { opacity: 0; filter: blur(22px) saturate(0.6); transform: scale(1.04); } 55% { opacity: 1; } to { opacity: 1; filter: none; transform: none; } }

/* ------------------------------------------------------------------ Product + creator steps (Images) */
.pf-step .st-label { display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.pf-step .st-label .hint { margin-left: auto; }
.pf-n { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 10.5px; font-weight: 600; background: var(--s3); color: var(--muted); transition: background-color var(--t) var(--ease), color var(--t) var(--ease); }
.pf-step.is-done .pf-n { background: var(--ink); color: #fff; }
.pf-step.is-attn { animation: pfAttn 900ms var(--ease-out); border-radius: 12px; }
@keyframes pfAttn { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 90, 42, 0); } 30% { box-shadow: 0 0 0 4px rgba(239, 90, 42, 0.18); } }
.pf-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px dashed var(--line-3); border-radius: 14px; background: var(--s1); cursor: pointer; transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease); }
.pf-drop:hover { border-color: var(--ink); background: #fff; }
.pf-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pf-drop.is-busy { opacity: 0.6; pointer-events: none; }
.ref-box.is-busy { opacity: 0.6; pointer-events: none; }
/* "What is in this photo?" choice when a photo is added for an image */
.as-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.as-choice button { display: grid; justify-items: start; gap: 3px; padding: 16px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.as-choice button:hover, .as-choice button:focus-visible { border-color: var(--ink); box-shadow: inset 0 0 0 0.5px var(--ink); }
.as-choice .i { width: 20px; height: 20px; margin-bottom: 8px; color: var(--ink); }
.as-choice b { font-size: 14px; font-weight: 500; color: var(--ink); }
.as-choice span { font-size: 12px; line-height: 1.4; color: var(--muted); }
@media (max-width: 420px) { .as-choice { grid-template-columns: 1fr; } }
.pf-drop-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #fff; box-shadow: var(--sh-1); color: var(--ink); }
.pf-drop-t { display: grid; gap: 2px; min-width: 0; }
.pf-drop-t b { font-size: 13.5px; font-weight: 500; }
.pf-drop-t span { font-size: 11.5px; color: var(--muted); }
.pf-alt { justify-self: start; margin-top: 6px; }
.pf-card { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pf-card img { flex: none; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--s2); }
.pf-card-t { flex: 1; display: grid; gap: 2px; min-width: 0; }
.pf-card-t b { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-card-t span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-muted { font-size: 12.5px; color: var(--muted); padding: 10px 12px; border-radius: 12px; background: var(--s1); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-chip { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); background: #fff; border: 1px solid var(--line-2); transition: background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease); }
.pf-chip:hover { border-color: rgba(0, 0, 0, 0.25); }
.pf-chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pf-sum { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); }
.pf-sum-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.pf-sum-h .i { color: #2f9e5b; }
.pf-sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.pf-sum-row span { color: var(--muted); }
.pf-sum-row b { font-weight: 500; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-sum-row.is-missing b { color: #b3261e; }
.pf-result-meta { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 8px; font-size: 12px; color: var(--muted); text-align: center; }
.pf-result-meta .i { color: #2f9e5b; flex: none; }


/* ---------- Plan & billing, EVC Plus checkout, payment status ---------- */
/* Same tokens, cards, inputs and buttons as the rest of the Studio */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--muted); transition: color var(--t) var(--ease); }
.back-link:hover { color: var(--ink); }
.btn.is-static { pointer-events: none; color: var(--muted); box-shadow: none; }
.bill-note { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.bill-note:hover { border-color: var(--line-3); box-shadow: var(--sh-1); }
.bill-note .grow { display: grid; gap: 2px; min-width: 0; }
.bill-note b { font-size: 14px; font-weight: 500; color: var(--ink); }
.bill-note .grow > span { font-size: 12.5px; color: var(--muted); }
.bill-note .link { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.bill-note.is-bad { background: #fdf6f5; border-color: rgba(179, 38, 30, 0.18); }
.bill-note.is-bad > .i { flex: none; color: #b3261e; }
.bill-stats { grid-template-columns: 1fr 1fr 1.25fr; }
.bill-stats .stat { align-content: start; }
.lim-row { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.meter.is-full > i { background: #c9372c; }
.bill-plans-head { align-items: center; }
.page .plans { box-shadow: none; }
.page .plan { padding: 24px 20px 26px; gap: 18px; }
.page .plan-price .amt { font-size: 38px; }
.page .plan-bill { margin-top: -10px; }

.co { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.co-steps { display: grid; gap: 16px; min-width: 0; }
.co-step { display: grid; gap: 16px; padding: 22px; }
.co-step-h { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.co-step-h b { font-weight: 500; }
.co-step-h .pf-n { width: 22px; height: 22px; font-size: 11.5px; background: var(--ink); color: #fff; }
.co-pay { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--s1); }
.co-line { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.co-line:first-child { border-top: 0; }
.co-line .k { font-size: 12.5px; color: var(--muted); }
.co-line .v { display: grid; gap: 2px; min-width: 0; }
.co-line .v b { font-size: 15px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.co-line .v b.mono { font-size: 14.5px; }
.co-dial { grid-template-columns: 128px minmax(0, 1fr) auto auto; }
.co-call { display: none; }
@media (hover: none) and (pointer: coarse) { .co-call { display: inline-flex; } .co-dial .co-copy { display: none; } }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix > span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-2); border-right: 0; border-radius: 11px 0 0 11px; background: var(--s2); font-size: 14px; color: var(--muted); }
.input-prefix .input { border-radius: 0 11px 11px 0; }
.co-safe { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.co-safe .i { flex: none; margin-top: 2px; }
.co-sum { position: sticky; top: 20px; display: grid; gap: 16px; padding: 22px; }
.co-plan { display: grid; gap: 2px; }
.co-plan b { font-size: 24px; font-weight: 500; letter-spacing: -0.025em; }
.co-plan span { font-size: 13px; color: var(--muted); }
.co-cycle { display: grid; grid-template-columns: 1fr 1fr; width: 100%; background: var(--s4); }
.co-cycle button { padding: 0 8px; font-size: 12.5px; }
.co-rows { display: grid; gap: 10px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.co-rows > div { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.co-rows dt { color: var(--muted); flex: none; }
.co-rows dd { margin: 0; text-align: right; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.co-total b { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.co-state { display: grid; justify-items: start; gap: 10px; padding: 28px; }
.co-state > .i { width: 22px; height: 22px; color: var(--muted); }
.co-state b { font-size: 16px; font-weight: 500; }
.co-state p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.55; color: var(--muted); max-width: 440px; }

.pay-card { max-width: 560px; margin: 8px auto 0; padding: 36px 32px 30px; border: 1px solid var(--line); border-radius: 20px; background: #fff; display: grid; justify-items: center; text-align: center; gap: 10px; animation: pageIn 420ms var(--ease-out) both; }
.pay-ic { position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 50%; background: var(--s2); color: var(--ink); }
.pay-ic .i { width: 26px; height: 26px; }
.pay-card.is-pending .pay-ic::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); animation: spin 1.4s linear infinite; }
.pay-card.is-approved .pay-ic { background: #eaf6ef; color: #2f9e5b; }
.pay-card.is-rejected .pay-ic { background: #fdf0ef; color: #b3261e; }
.pay-title { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.025em; }
.pay-sub { margin: 0; max-width: 420px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.pay-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin: 14px 0 4px; padding: 0; }
.pay-steps li { display: grid; justify-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); position: relative; }
.pay-steps li > span { display: grid; gap: 2px; }
.pay-steps li i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-3); background: #fff; color: #fff; z-index: 1; }
.pay-steps li:not(:first-child)::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 1.5px; background: var(--line-2); }
.pay-steps li.is-done { color: var(--ink-2); }
.pay-steps li.is-done i { background: var(--ink); border-color: var(--ink); }
.pay-steps li.is-done::before, .pay-steps li.is-now::before { background: var(--ink) !important; }
.pay-steps li.is-now { color: var(--ink); font-weight: 500; }
.pay-steps li.is-now i { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(239, 90, 42, 0.12); animation: live 1.8s var(--ease) infinite; }
.pay-rows { width: 100%; margin-top: 12px; text-align: left; }
.pay-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }

@media (max-width: 1100px) {
  .page .plans { grid-template-columns: repeat(2, 1fr); }
  .page .plan:nth-child(3) { border-left: 0; }
  .page .plan:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .co { grid-template-columns: 1fr; }
  .co-sum { position: static; order: -1; }
}
@media (max-width: 640px) {
  .page .plans { grid-template-columns: 1fr; }
  .page .plan { border-left: 0; border-top: 1px solid var(--line); }
  .page .plan:first-child { border-top: 0; }
  .bill-stats { grid-template-columns: 1fr; }
  .bill-stats .stat { border-left: 0; border-top: 1px solid var(--line); }
  .bill-stats .stat:first-child { border-top: 0; }
  .bill-plans-head { flex-wrap: wrap; gap: 12px; }
  .co-line, .co-dial { grid-template-columns: minmax(0, 1fr) auto; }
  .co-line .k { grid-column: 1 / -1; }
  .co-step, .co-sum { padding: 18px; }
  .pay-card { padding: 28px 18px 24px; }
  .pay-rows > div { flex-direction: column; gap: 2px; }
  .pay-rows dd { text-align: left; }
}

/* ---------- Profile ---------- */
.pf-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.pf-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.pf-avatar.avatar-lg { width: 64px; height: 64px; font-size: 22px; flex: none; }
.pf-who { display: grid; gap: 4px; min-width: 0; }
.pf-who h1 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.pf-who p { margin: 0; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.pf-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 6px; }
.pf-bal { display: grid; justify-items: end; gap: 4px; flex: none; text-align: right; }
.pf-bal .k { font-size: 12.5px; color: var(--muted); }
.pf-bal b { font-size: 38px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.pf-bal .d { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.pf-tabs { margin: 22px 0 22px; }
.pf-tabs .tab { background: none; border: 0; cursor: pointer; }
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.pf-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-card { display: grid; align-content: start; gap: 10px; }
.pf-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.pf-big { font-size: 30px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; color: var(--ink); }
.pf-card .btn { justify-self: start; }
.pf-sub { display: grid; gap: 14px; }
.pf-big-note { font-size: 18px; letter-spacing: -0.02em; color: var(--muted); font-weight: 400; }
.pf-trial-use { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--s1); }
.pf-sub-acts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.pf-sub-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.pf-sub-note .i { flex: none; margin-top: 2px; }
.pf-renew { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 16px 18px; border: 1px solid rgba(211, 139, 18, 0.35); border-radius: 16px; background: #fffaf0; }
.pf-renew-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(211, 139, 18, 0.12); color: #9a6408; }
.pf-renew .grow { display: grid; gap: 2px; min-width: 0; }
.pf-renew b { font-size: 14.5px; font-weight: 500; }
.pf-renew .grow span { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.pf-renew .btn { flex: none; }
.co-consent { align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.co-consent input { flex: none; margin-top: 2px; }
.co-consent b { font-weight: 500; color: var(--ink); }
.co-consent.is-invalid { border-color: #b3261e; box-shadow: 0 0 0 4px rgba(179,38,30,0.08); }
@media (max-width: 640px) {
  .pf-renew { flex-wrap: wrap; }
  .pf-renew .btn { width: 100%; justify-content: center; }
  .pf-sub-acts .btn { flex: 1 1 auto; justify-content: center; }
}
.pf-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pf-price { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--s1); }
.pf-price .grow { display: grid; gap: 1px; min-width: 0; }
.pf-price b { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.pf-price .grow span { font-size: 12px; color: var(--muted); }
.pf-price-v { font-size: 13.5px; font-weight: 500; white-space: nowrap; color: var(--ink); }
.pf-price.is-off { opacity: 0.55; }
.pf-gens { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.pf-gen { display: grid; gap: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; text-align: left; cursor: pointer; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease); }
.pf-gen:hover { border-color: var(--line-3); box-shadow: var(--sh-1); transform: translateY(-1px); }
.pf-gen-media { display: grid; place-items: center; aspect-ratio: 4 / 5; background: var(--s2); color: var(--faint); overflow: hidden; }
.pf-gen-media img, .pf-gen-media video { width: 100%; height: 100%; object-fit: cover; }
.pf-gen-meta { display: grid; gap: 6px; padding: 10px 12px 12px; font-size: 12.5px; }
.pf-gen-meta .model-cell { font-size: 12.5px; font-weight: 500; color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pf-gen-meta .status { font-size: 12px; }
.pf-empty { padding: 44px 20px; border: 1px solid var(--line); border-radius: 16px; }
.pf-packs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pf-pack { display: grid; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.pf-pack:hover { border-color: var(--line-3); }
.pf-pack.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 0.5px var(--ink); }
.pf-pack b { font-size: 14px; font-weight: 500; color: var(--ink); }
.pf-pack span { font-size: 12px; color: var(--muted); }
.co-packs .pf-pack { padding: 10px; }
.pf-totals { grid-template-columns: repeat(4, 1fr); margin-top: 14px; }
.pf-ledger td { vertical-align: top; }
.pf-ledger .mono { font-size: 11px; }
@media (max-width: 900px) {
  .pf-grid { grid-template-columns: 1fr 1fr; }
  .pf-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .pf-totals { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .pf-hero { flex-direction: column; align-items: stretch; padding: 20px; gap: 18px; }
  .pf-avatar.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
  .pf-who h1 { font-size: 20px; }
  .pf-bal { justify-items: start; text-align: left; padding-top: 16px; border-top: 1px solid var(--line); grid-template-columns: 1fr auto; align-items: end; }
  .pf-bal .k { grid-column: 1 / -1; }
  .pf-bal b { font-size: 32px; }
  .pf-bal .d { grid-column: 1; margin: 0; }
  .pf-bal .btn { grid-column: 2; grid-row: 2 / span 2; }
  .pf-grid, .pf-grid-2, .pf-prices { grid-template-columns: 1fr; }
  .pf-gens { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pf-tabs { margin: 16px 0; gap: 18px; }
  .pf-totals .stat:nth-child(odd) { border-left: 0; }
}
.margin-good { color: #1f7a45; font-weight: 500; }

/* Phones: history tables become stacked rows instead of scrolling sideways */
@media (max-width: 640px) {
  .pf-grid-2 .pf-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-wrap:has(.stack-sm) { overflow: visible; }
  .stack-sm thead { display: none; }
  .stack-sm, .stack-sm tbody { display: block; }
  .stack-sm tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .stack-sm tr:last-child { border-bottom: 0; }
  .stack-sm td { display: block; padding: 0; border: 0; min-width: 0; }
  .pf-ledger td:nth-child(2) { grid-column: 1; grid-row: 1; font-weight: 500; color: var(--ink); }
  .pf-ledger td:nth-child(3) { grid-column: 1; grid-row: 2; }
  .pf-ledger td:nth-child(1) { grid-column: 1; grid-row: 3; font-size: 12px; color: var(--muted); }
  .pf-ledger td:nth-child(1) div { display: inline; margin-left: 4px; }
  .pf-ledger td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
  .pf-ledger td:nth-child(5) { grid-column: 2; grid-row: 2 / span 2; align-self: end; text-align: right; font-size: 12.5px; }
  .pay-hist td:nth-child(2) { grid-column: 1; grid-row: 1; font-weight: 500; color: var(--ink); }
  .pay-hist td:nth-child(3) { grid-column: 1; grid-row: 2; }
  .pay-hist td:nth-child(4) { grid-column: 1; grid-row: 3; }
  .pay-hist td:nth-child(1) { grid-column: 1; grid-row: 4; font-size: 12px; color: var(--muted); }
  .pay-hist td:nth-child(5) { grid-column: 2; grid-row: 1; text-align: right; font-weight: 500; }
  .pay-hist td:nth-child(6) { grid-column: 2; grid-row: 2 / span 3; align-self: end; text-align: right; }
}

.pf-verified { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 11.5px; font-weight: 500; color: #2f9e5b; white-space: nowrap; }
.pf-verified .i { width: 12px; height: 12px; }
.pf-about { padding-top: 0; border-top: 0; }
@media (max-width: 640px) { .pf-about > div { flex-direction: column; gap: 2px; } .pf-about dd { text-align: left; } }
