:root {
    --bg: #050913;
    --panel: rgba(12, 19, 33, .76);
    --panel-strong: rgba(16, 26, 45, .92);
    --line: rgba(132, 177, 236, .18);
    --line-bright: rgba(78, 169, 255, .48);
    --text: #edf4ff;
    --muted: #91a8c6;
    --muted-strong: #c1d0e4;
    --primary: #3b91ff;
    --primary-dark: #1768f2;
    --primary-soft: rgba(59, 145, 255, .16);
    --cyan: #38d5ff;
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, .12);
    --shadow: 0 22px 72px rgba(0, 0, 0, .32);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    height: 100%;
}

body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    color: var(--text);
    background:
        linear-gradient(120deg, rgba(56, 213, 255, .08) 0 1px, transparent 1px 110px),
        linear-gradient(180deg, rgba(12, 27, 48, .34), transparent 260px),
        radial-gradient(circle at 19% -8%, rgba(59, 145, 255, .24), transparent 30%),
        radial-gradient(circle at 92% 8%, rgba(56, 213, 255, .16), transparent 26%),
        linear-gradient(135deg, #050913 0%, #07111f 52%, #040712 100%);
    letter-spacing: 0;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(125, 211, 252, .34) rgba(3, 8, 20, .24);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(3, 8, 20, .24);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    border: 2px solid rgba(3, 8, 20, .42);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(125, 211, 252, .68), rgba(37, 99, 235, .45));
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(147, 226, 255, .82), rgba(59, 145, 255, .62));
}

.user-app-booting .shell {
    opacity: 0;
    pointer-events: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.shell {
    height: 100vh;
    display: grid;
    grid-template-columns: 236px 1fr;
    grid-template-rows: 64px 1fr;
    overflow: hidden;
}

.shell.sidebar-collapsed {
    grid-template-columns: 76px 1fr;
}

.topbar {
    grid-column: 1 / 3;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    background: rgba(5, 9, 17, .68);
    backdrop-filter: blur(22px) saturate(1.25);
    border-bottom: 1px solid rgba(132, 177, 236, .16);
    box-shadow: 0 14px 44px rgba(0, 0, 0, .2);
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(125, 211, 252, .5);
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 700;
    background:
        radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .52), transparent 23%),
        linear-gradient(145deg, rgba(56, 189, 248, .82), rgba(37, 99, 235, .62)),
        rgba(255, 255, 255, .06);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .28),
        0 14px 34px rgba(56, 189, 248, .2);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}

.brand {
    font-size: 14px;
    font-weight: 650;
    letter-spacing: .01em;
}

.subtitle {
    color: var(--muted);
    font-size: 10px;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.sidebar {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 12px;
    background: rgba(6, 12, 23, .66);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(132, 177, 236, .14);
    display: flex;
    flex-direction: column;
    transition: width .18s ease, padding .18s ease;
}

.sidebar-title {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .1em;
    margin: 0 10px 10px;
}

.nav {
    width: 100%;
    height: 40px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted-strong);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-radius: 12px;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 520;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.nav-label {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nav-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-icon,
.collapse-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    display: inline-block;
    position: relative;
    color: currentColor;
}

.nav-icon::before,
.nav-icon::after,
.collapse-icon::before,
.collapse-icon::after {
    content: "";
    position: absolute;
    box-sizing: border-box;
}

.icon-user::before {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 6px;
    border: 1.6px solid currentColor;
    border-radius: 50%;
}

.icon-user::after {
    left: 3px;
    bottom: 2px;
    width: 12px;
    height: 7px;
    border: 1.6px solid currentColor;
    border-radius: 8px 8px 3px 3px;
}

.icon-scene::before {
    inset: 3px 2px;
    border: 1.6px solid currentColor;
    border-radius: 4px;
}

.icon-scene::after {
    left: 5px;
    right: 5px;
    bottom: 5px;
    height: 6px;
    background: linear-gradient(135deg, transparent 0 36%, currentColor 37% 64%, transparent 65%);
}

.icon-object::before {
    left: 3px;
    top: 4px;
    width: 12px;
    height: 10px;
    border: 1.6px solid currentColor;
    border-radius: 3px;
    transform: rotate(-8deg);
}

.icon-object::after {
    left: 6px;
    top: 2px;
    width: 7px;
    height: 7px;
    border-top: 1.6px solid currentColor;
    border-right: 1.6px solid currentColor;
    transform: rotate(8deg);
}

.icon-video::before {
    left: 2px;
    top: 4px;
    width: 11px;
    height: 10px;
    border: 1.6px solid currentColor;
    border-radius: 4px;
}

.icon-video::after {
    right: 1px;
    top: 6px;
    border-left: 6px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.icon-group::before {
    left: 2px;
    top: 6px;
    width: 6px;
    height: 6px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}

.icon-group::after {
    right: 2px;
    top: 3px;
    width: 8px;
    height: 8px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    box-shadow: -6px 8px 0 -4px currentColor, 1px 9px 0 -4px currentColor;
}

.icon-api::before {
    left: 2px;
    top: 7px;
    width: 14px;
    height: 4px;
    border-top: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
}

.icon-api::after {
    left: 4px;
    top: 2px;
    width: 10px;
    height: 14px;
    border-left: 1.6px solid currentColor;
    border-right: 1.6px solid currentColor;
}

.icon-project::before {
    left: 2px;
    top: 4px;
    width: 14px;
    height: 11px;
    border: 1.6px solid currentColor;
    border-radius: 3px;
}

.icon-project::after {
    left: 4px;
    top: 2px;
    width: 6px;
    height: 4px;
    border: 1.6px solid currentColor;
    border-bottom: 0;
    border-radius: 3px 3px 0 0;
}

.icon-detail::before {
    inset: 2px 3px;
    border: 1.6px solid currentColor;
    border-radius: 3px;
}

.icon-detail::after {
    left: 6px;
    top: 6px;
    width: 7px;
    height: 1.6px;
    background: currentColor;
    box-shadow: 0 4px 0 currentColor;
}

.icon-record::before {
    left: 4px;
    top: 2px;
    width: 10px;
    height: 14px;
    border: 1.6px solid currentColor;
    border-radius: 3px;
}

.icon-record::after {
    left: 7px;
    top: 6px;
    width: 4px;
    height: 4px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(-45deg);
}

.icon-user-cost::before {
    left: 2px;
    top: 2px;
    width: 8px;
    height: 8px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}

.icon-user-cost::after,
.icon-group-cost::after {
    right: 1px;
    bottom: 1px;
    width: 8px;
    height: 8px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .04);
}

.icon-group-cost::before {
    left: 1px;
    top: 4px;
    width: 10px;
    height: 8px;
    border-left: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    border-radius: 6px;
}

.nav:hover,
.nav.active {
    background:
        linear-gradient(135deg, rgba(59, 145, 255, .22), rgba(56, 213, 255, .08)),
        rgba(255, 255, 255, .045);
    border-color: rgba(125, 211, 252, .34);
    color: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .12),
        0 10px 28px rgba(37, 99, 235, .12);
}

.nav:hover {
    transform: translateY(-1px);
}

.nav strong {
    min-width: 24px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(59, 145, 255, .14);
    color: #cfe2ff;
    font-size: 11px;
    border: 1px solid rgba(125, 211, 252, .24);
}

.nav-divider {
    height: 1px;
    margin: 10px 8px;
    background: rgba(132, 177, 236, .14);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(132, 177, 236, .14);
}

.sidebar-collapse-btn {
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(148, 190, 236, .2);
    border-radius: 12px;
    padding: 0 12px;
    color: var(--muted-strong);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025));
}

.sidebar-collapse-btn:hover {
    color: #ffffff;
    border-color: rgba(125, 211, 252, .38);
    background:
        linear-gradient(135deg, rgba(56, 213, 255, .1), rgba(59, 130, 246, .06)),
        rgba(255, 255, 255, .04);
}

.collapse-icon::before {
    left: 3px;
    top: 3px;
    width: 12px;
    height: 12px;
    border: 1.6px solid currentColor;
    border-radius: 4px;
}

.collapse-icon::after {
    left: 7px;
    top: 6px;
    width: 5px;
    height: 5px;
    border-left: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg);
}

.shell.sidebar-collapsed .sidebar {
    padding: 18px 10px;
}

.shell.sidebar-collapsed .sidebar-title,
.shell.sidebar-collapsed .nav-text,
.shell.sidebar-collapsed .nav strong {
    display: none;
}

.shell.sidebar-collapsed .nav,
.shell.sidebar-collapsed .sidebar-collapse-btn {
    justify-content: center;
    padding: 0;
}

.shell.sidebar-collapsed .nav-label {
    gap: 0;
}

.shell.sidebar-collapsed .collapse-icon::after {
    left: 5px;
    transform: rotate(225deg);
}

.content {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 22px;
    overflow: auto;
}

body.image-page-active .content {
    overflow: hidden;
}

.hero-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    min-height: 96px;
    border: 1px solid rgba(132, 177, 236, .18);
    border-radius: 16px;
    padding: 18px 22px;
    background:
        linear-gradient(118deg, rgba(56, 213, 255, .12), transparent 34%),
        linear-gradient(135deg, rgba(14, 23, 44, .88), rgba(7, 14, 27, .64)),
        rgba(255, 255, 255, .03);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: 22px;
    margin-bottom: 6px;
    line-height: 1.15;
    font-weight: 650;
}

.hero-panel p {
    color: var(--muted-strong);
    font-size: 13px;
    line-height: 1.55;
}

.eyebrow {
    color: #83d8ff;
    font-size: 10px;
    letter-spacing: .12em;
    margin-bottom: 8px;
    font-weight: 650;
}

.primary,
.ghost,
.danger {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 14px;
    border: 1px solid transparent;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, filter .16s ease;
}

.primary {
    background:
        radial-gradient(circle at 26% 15%, rgba(255, 255, 255, .42), transparent 26%),
        linear-gradient(135deg, rgba(56, 213, 255, .94), rgba(37, 99, 235, .96)),
        rgba(255, 255, 255, .08);
    color: #fff;
    border-color: rgba(191, 219, 254, .5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .32),
        inset 0 -10px 20px rgba(15, 23, 42, .14),
        0 15px 34px rgba(37, 99, 235, .32);
}

.primary:hover {
    background:
        radial-gradient(circle at 26% 15%, rgba(255, 255, 255, .46), transparent 26%),
        linear-gradient(135deg, rgba(103, 232, 249, .98), rgba(59, 130, 246, .98)),
        rgba(255, 255, 255, .1);
    transform: translateY(-1px);
    filter: saturate(1.06);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .36),
        0 18px 42px rgba(37, 99, 235, .42);
}

.primary:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.primary.is-loading,
.ghost.is-loading,
.danger.is-loading {
    gap: 8px;
    opacity: .82;
    cursor: wait;
}

.primary.is-loading::before,
.ghost.is-loading::before,
.danger.is-loading::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, .42);
    border-top-color: rgba(255, 255, 255, .96);
    flex: 0 0 auto;
    animation: buttonSpin .76s linear infinite;
}

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

.ghost {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .035));
    border-color: rgba(148, 190, 236, .24);
    color: #d9e7fb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.ghost:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, .42);
    background:
        linear-gradient(135deg, rgba(56, 213, 255, .12), rgba(59, 130, 246, .08)),
        rgba(255, 255, 255, .06);
}

.danger {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(248, 113, 113, .3);
}

.danger:hover {
    transform: translateY(-1px);
    background: rgba(248, 113, 113, .18);
}

.wide {
    width: 100%;
}

.user-pill,
.auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-pill span {
    font-weight: 560;
    font-size: 13px;
    color: #eaf2ff;
}

.user-group-tag {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid rgba(125, 211, 252, .34);
    border-radius: 999px;
    color: #bfe7ff;
    font-size: 12px;
    font-weight: 620;
    background:
        radial-gradient(circle at 24% 12%, rgba(255, 255, 255, .24), transparent 28%),
        linear-gradient(135deg, rgba(56, 213, 255, .13), rgba(37, 99, 235, .11)),
        rgba(255, 255, 255, .035);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .12),
        0 10px 26px rgba(37, 99, 235, .12);
}

.user-group-tag span,
.user-group-tag strong {
    font-size: 12px;
    line-height: 1;
}

.user-group-tag strong {
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    padding: 0 7px;
    border: 1px solid rgba(125, 211, 252, .28);
    border-radius: 999px;
    color: #9ddcff;
    background: rgba(56, 213, 255, .08);
}

.user-group-tag.leader {
    color: #ffffff;
    border-color: rgba(103, 232, 249, .5);
    background:
        radial-gradient(circle at 24% 12%, rgba(255, 255, 255, .34), transparent 28%),
        linear-gradient(135deg, rgba(56, 213, 255, .32), rgba(59, 130, 246, .24)),
        rgba(255, 255, 255, .04);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .16),
        0 14px 32px rgba(56, 189, 248, .18);
}

.user-group-tag.leader strong {
    color: #06111f;
    border-color: rgba(191, 219, 254, .7);
    background:
        radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .7), transparent 30%),
        linear-gradient(135deg, #7dd3fc, #3b82f6);
    box-shadow: 0 8px 22px rgba(56, 189, 248, .26);
}

.notice {
    padding: 12px 14px;
    border: 1px solid rgba(125, 211, 252, .28);
    background:
        linear-gradient(135deg, rgba(56, 213, 255, .1), rgba(37, 99, 235, .08)),
        rgba(255, 255, 255, .035);
    color: #cfe2ff;
    border-radius: 14px;
    margin-bottom: 14px;
    font-size: 13px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.results-section {
    border: 1px solid rgba(132, 177, 236, .14);
    border-radius: 16px;
    background: rgba(3, 8, 20, .14);
    padding: 16px;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 38px;
    margin-bottom: 14px;
}

.results-header > div:first-child {
    display: flex;
    align-items: center;
    min-height: 32px;
}

.results-title {
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 600;
}

.results-count {
    margin-left: 8px;
    color: #83d8ff;
    font-size: 13px;
    font-weight: 700;
}

.results-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
}

.compact {
    height: 32px;
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.asset-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.asset-list-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 16px;
    border: 1px solid rgba(132, 177, 236, .16);
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(17, 27, 46, .82), rgba(7, 12, 22, .9)),
        rgba(255, 255, 255, .035);
    box-shadow: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.asset-list-card:hover {
    transform: none;
    border-color: rgba(132, 177, 236, .24);
    box-shadow: none;
}

.asset-card-left {
    min-width: 0;
    flex: 1;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.asset-card-index {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(125, 211, 252, .34);
    border-radius: 10px;
    color: #f8fbff;
    font-size: 15px;
    font-weight: 700;
    background:
        radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .34), transparent 28%),
        linear-gradient(145deg, rgba(56, 189, 248, .55), rgba(37, 99, 235, .42));
    box-shadow: 0 12px 28px rgba(37, 99, 235, .2);
}

.asset-card-info {
    min-width: 0;
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(132, 177, 236, .12);
    border-radius: 8px;
    background: rgba(3, 8, 20, .32);
}

.asset-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

.asset-form-group {
    min-width: 0;
    margin-bottom: 10px;
}

.asset-form-group:last-child {
    margin-bottom: 0;
}

.asset-form-label {
    display: block;
    margin: 0 0 6px;
    color: var(--muted-strong);
    font-size: 11.5px;
}

.asset-form-input {
    width: 100%;
    min-height: 36px;
    border: 1px solid rgba(148, 190, 236, .2);
    border-radius: 10px;
    padding: 8px 10px;
    color: #edf4ff;
    background: rgba(3, 8, 20, .42);
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.asset-form-input:focus {
    border-color: rgba(125, 211, 252, .58);
    box-shadow: 0 0 0 4px rgba(56, 213, 255, .1);
    background: rgba(2, 6, 23, .58);
}

.asset-form-textarea {
    min-height: 74px;
    line-height: 1.5;
    resize: vertical;
}

.asset-card-right {
    width: 180px;
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asset-image-preview {
    position: relative;
    height: 180px;
    overflow: hidden;
    border: 1px solid rgba(132, 177, 236, .16);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(12, 20, 36, .92), rgba(56, 189, 248, .1)),
        rgba(255, 255, 255, .04);
}

.asset-preview-image-wrap,
.asset-preview-empty {
    width: 100%;
    height: 100%;
}

.asset-preview-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .22s ease, filter .22s ease;
}

.asset-image-preview:hover .asset-preview-img {
    transform: scale(1.035);
    filter: saturate(1.06);
}

.asset-preview-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #f8fbff;
    font-size: 12px;
    opacity: 0;
    background: rgba(3, 8, 20, .42);
    backdrop-filter: blur(4px);
    transition: opacity .16s ease;
}

.asset-image-preview:hover .asset-preview-overlay {
    opacity: 1;
}

.asset-preview-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(248, 113, 113, .38);
    border-radius: 50%;
    color: #fee2e2;
    background: rgba(127, 29, 29, .72);
    backdrop-filter: blur(10px);
}

.asset-preview-delete svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.asset-preview-empty {
    display: grid;
    place-items: center;
    gap: 10px;
    border: 2px dashed rgba(132, 177, 236, .2);
    border-radius: 12px;
    color: var(--muted-strong);
    font-size: 12px;
    text-align: center;
}

.asset-preview-empty-icon {
    width: 34px;
    height: 26px;
    display: block;
    border: 1px solid rgba(125, 211, 252, .4);
    border-radius: 8px;
    position: relative;
    opacity: .75;
}

.asset-preview-empty-icon::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 6px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(191, 219, 254, .85);
}

.asset-preview-empty-icon::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 6px;
    height: 9px;
    background: linear-gradient(135deg, transparent 0 32%, rgba(56, 213, 255, .7) 33% 66%, rgba(191, 219, 254, .88) 67%);
    clip-path: polygon(0 100%, 34% 42%, 50% 67%, 70% 22%, 100% 100%);
}

.asset-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.asset-action-btn {
    min-height: 32px;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.asset-action-btn:hover {
    transform: translateY(-1px);
}

.asset-action-btn.secondary {
    color: #d9e7fb;
    border-color: rgba(148, 190, 236, .24);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .035));
}

.asset-action-btn.secondary:hover {
    border-color: rgba(125, 211, 252, .42);
    background:
        linear-gradient(135deg, rgba(56, 213, 255, .12), rgba(59, 130, 246, .08)),
        rgba(255, 255, 255, .06);
}

.asset-action-btn.danger {
    color: var(--danger);
    border-color: rgba(248, 113, 113, .3);
    background: var(--danger-soft);
}

.asset-action-btn.danger:hover {
    background: rgba(248, 113, 113, .18);
}

.video-workspace {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(132, 177, 236, .14);
    border-radius: 16px;
    background: rgba(3, 8, 20, .14);
    overflow: hidden;
}

.video-toolbar {
    flex: 0 0 auto;
    min-height: 58px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(132, 177, 236, .14);
    background:
        linear-gradient(135deg, rgba(56, 213, 255, .08), rgba(37, 99, 235, .04)),
        rgba(7, 14, 27, .58);
}

.video-toolbar-group {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.video-toolbar-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-toolbar-main-row {
    min-height: 38px;
}

.video-toolbar-batch-row {
    min-height: 38px;
    justify-content: flex-end;
}

.video-toolbar-title {
    margin-right: auto;
    max-width: 260px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid rgba(125, 211, 252, .22);
    border-radius: 14px;
    color: #f7fbff;
    background:
        linear-gradient(135deg, rgba(56, 213, 255, .12), rgba(37, 99, 235, .08)),
        rgba(3, 8, 20, .42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    font-size: 13px;
    font-weight: 720;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-toolbar-title::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #38d5ff;
    box-shadow: 0 0 14px rgba(56, 213, 255, .72);
}

.video-toolbar-actions,
.toolbar-video-settings,
.toolbar-select-all,
.toolbar-range-control,
.toolbar-audio-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-divider {
    width: 1px;
    height: 28px;
    background: rgba(132, 177, 236, .16);
}

.toolbar-select-all {
    color: var(--muted-strong);
    font-size: 12px;
    margin: 0;
}

.toolbar-select-all input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
}

.toolbar-select-all strong {
    min-width: 20px;
    color: #83d8ff;
}

.toolbar-select,
.shot-setting-select {
    height: 38px;
    min-height: 38px;
    border: 1px solid rgba(148, 190, 236, .22);
    border-radius: 12px;
    padding: 0 10px;
    color: #edf4ff;
    background: rgba(3, 8, 20, .46);
    outline: none;
}

.toolbar-range-control,
.toolbar-audio-toggle {
    height: 38px;
    min-height: 38px;
    border: 1px solid rgba(148, 190, 236, .22);
    border-radius: 12px;
    padding: 0 10px;
    color: #edf4ff;
    background: rgba(3, 8, 20, .46);
    font-size: 12px;
    white-space: nowrap;
    margin: 0;
    box-sizing: border-box;
}

.toolbar-range-control span {
    width: 28px;
    color: #83d8ff;
    font-weight: 700;
}

.toolbar-range-control input {
    width: 88px;
    height: 4px;
    padding: 0;
    margin: 0;
    accent-color: var(--primary);
}

.video-list-container {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-workspace {
    height: 100%;
    min-height: 0;
    flex: 1;
    display: flex;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: hidden;
    padding: 0;
}

.image-creator-panel {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.image-form-column,
.image-output-column {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid rgba(132, 177, 236, .16);
    border-radius: 18px;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(17, 27, 46, .84), rgba(7, 12, 22, .92)),
        rgba(255, 255, 255, .035);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .2);
}

.image-form-column {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

.image-output-column {
    overflow: hidden;
    gap: 0;
}

.image-form-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.image-form-head strong {
    display: block;
    color: #f7fbff;
    font-size: 20px;
    font-weight: 780;
}

.image-mode-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border-radius: 14px;
    background: rgba(3, 8, 20, .38);
}

.image-mode-tabs button {
    height: 34px;
    min-width: 74px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted-strong);
    background: transparent;
    font-size: 14px;
    font-weight: 720;
}

.image-mode-tabs button.active {
    color: #eaf6ff;
    border-color: rgba(125, 211, 252, .28);
    background:
        linear-gradient(135deg, rgba(56, 213, 255, .16), rgba(59, 145, 255, .14)),
        rgba(59, 145, 255, .12);
}

.image-mode-tabs .image-history-tab-btn {
    min-width: 82px;
    margin-left: 8px;
    color: #dbeafe;
    border-color: rgba(132, 177, 236, .18);
    background: rgba(15, 23, 42, .46);
}

.image-mode-tabs .image-history-tab-btn:hover {
    color: #f8fbff;
    border-color: rgba(125, 211, 252, .34);
    background: rgba(30, 41, 59, .62);
}

.image-form-divider {
    flex: 0 0 auto;
    height: 1px;
    margin: 0 0 18px;
    background: rgba(132, 177, 236, .14);
}

.image-form-column > label {
    margin: 14px 0 10px;
    color: var(--muted-strong);
    font-size: 15px;
    font-weight: 720;
}

.image-form-column select,
.image-form-column input,
.image-form-column textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid rgba(148, 190, 236, .22);
    border-radius: 12px;
    color: var(--text);
    background: rgba(3, 8, 20, .46);
    outline: none;
}

.image-form-column select,
.image-form-column input {
    flex: 0 0 48px;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 0 14px;
    line-height: 48px;
}

.image-form-column textarea {
    min-height: 150px;
    max-height: 240px;
    resize: vertical;
    padding: 14px;
    line-height: 1.58;
}

.image-model-select {
    display: block;
    flex: 0 0 48px;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    color: var(--muted-strong) !important;
    font-size: 15px;
    line-height: 48px;
}

.image-form-column select:focus,
.image-form-column input:focus,
.image-form-column textarea:focus {
    border-color: rgba(125, 211, 252, .48);
    box-shadow: 0 0 0 3px rgba(56, 213, 255, .1);
}

.image-param-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 18px;
}

.image-param-block,
.image-param-line {
    min-width: 0;
    display: grid;
    gap: 10px;
    margin: 0;
    color: var(--muted-strong);
    font-size: 15px;
    font-weight: 720;
}

.image-param-block > strong,
.image-param-line > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-choice-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.image-choice-group button {
    height: 42px;
    min-width: 68px;
    padding: 0 14px;
    border: 1px solid rgba(148, 190, 236, .22);
    border-radius: 11px;
    color: var(--muted-strong);
    background: rgba(3, 8, 20, .42);
    font-size: 14px;
    font-weight: 720;
}

.image-choice-group button.active {
    border-color: rgba(125, 211, 252, .52);
    color: #83d8ff;
    background:
        linear-gradient(135deg, rgba(56, 213, 255, .14), rgba(59, 145, 255, .12)),
        rgba(3, 8, 20, .42);
}

.image-param-check {
    height: 42px;
    display: flex !important;
    align-items: center;
    gap: 8px;
    align-self: end;
    padding: 0 14px;
    border: 1px solid rgba(148, 190, 236, .22);
    border-radius: 11px;
    color: var(--muted-strong);
    background: rgba(3, 8, 20, .42);
    font-size: 14px;
    font-weight: 720;
}

.image-param-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

.image-reference-box {
    position: relative;
    display: grid;
    gap: 10px;
    cursor: pointer;
}

.image-reference-section > label {
    display: block;
    margin: 20px 0 10px;
    color: var(--muted-strong);
    font-size: 15px;
    font-weight: 720;
}

.image-reference-section > label span {
    color: var(--muted);
    font-size: 13px;
}

.image-reference-box input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.image-reference-upload {
    min-height: 188px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 1px dashed rgba(148, 190, 236, .28);
    border-radius: 12px;
    color: var(--muted);
    background: rgba(3, 8, 20, .36);
    text-align: center;
}

.image-reference-upload strong {
    font-size: 15px;
    font-weight: 650;
}

.image-reference-upload small {
    font-size: 12px;
}

.image-upload-icon {
    width: 34px;
    height: 34px;
    position: relative;
    display: inline-block;
    color: var(--muted-strong);
}

.image-upload-icon::before {
    content: "";
    position: absolute;
    left: 7px;
    right: 7px;
    bottom: 4px;
    height: 12px;
    border: 4px solid currentColor;
    border-top: 0;
    border-radius: 0 0 7px 7px;
}

.image-upload-icon::after {
    content: "";
    position: absolute;
    left: 15px;
    top: 4px;
    width: 4px;
    height: 22px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: -7px 7px 0 -2px currentColor, 7px 7px 0 -2px currentColor;
}

.image-generate-wide {
    width: 100%;
    height: 52px;
    margin-top: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 760;
}

.image-reference-preview {
    width: 100%;
    height: 188px;
    border: 1px solid rgba(125, 211, 252, .32);
    border-radius: 12px;
    background: rgba(3, 8, 20, .42);
    overflow: hidden;
}

.image-reference-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.image-history-list {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    padding-right: 0;
}

.image-history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(132, 177, 236, .18);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(12, 21, 38, .94), rgba(5, 10, 21, .94)),
        rgba(255, 255, 255, .025);
    overflow: hidden;
    table-layout: fixed;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.image-history-table th,
.image-history-table td {
    height: 72px;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(132, 177, 236, .12);
    color: var(--muted-strong);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-history-table th:nth-child(1),
.image-history-table td:nth-child(1),
.image-history-table th:nth-child(2),
.image-history-table td:nth-child(2) {
    min-width: 0;
}

.image-history-table td:nth-child(1),
.image-history-table td:nth-child(2) {
    color: #d7e5f8;
    font-weight: 680;
}

.image-history-table th {
    height: 46px;
    color: #a9bdd8;
    background:
        linear-gradient(180deg, rgba(13, 23, 40, .92), rgba(5, 10, 20, .74));
    font-size: 12px;
    font-weight: 760;
    letter-spacing: .02em;
}

.image-history-table tbody tr:hover td {
    background: rgba(56, 213, 255, .045);
}

.image-history-table tbody tr:last-child td {
    border-bottom: 0;
}

.image-history-table th:nth-child(1),
.image-history-table td:nth-child(1) {
    width: 190px;
}

.image-history-table th:nth-child(2),
.image-history-table td:nth-child(2) {
    width: 180px;
}

.image-history-table th:nth-child(3),
.image-history-table td:nth-child(3) {
    width: 110px;
}

.image-history-table th:nth-child(4),
.image-history-table td:nth-child(4) {
    width: 140px;
    text-align: center;
}

.image-history-preview-cell {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.image-history-thumb {
    width: 86px;
    height: 54px;
    display: inline-block;
    border: 1px solid rgba(125, 211, 252, .18);
    border-radius: 10px;
    color: var(--muted);
    background:
        linear-gradient(135deg, rgba(12, 20, 36, .92), rgba(56, 189, 248, .08)),
        rgba(3, 8, 20, .42);
    overflow: hidden;
    vertical-align: middle;
}

.image-history-thumb-inner {
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
}

.image-history-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center center;
}

.image-history-thumb.is-empty {
    display: inline-grid;
    place-items: center;
    font-weight: 720;
}

.image-history-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 52px;
    padding-top: 14px;
}

.image-history-pager span {
    min-width: 76px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    color: var(--muted);
    text-align: center;
    font-size: 15px;
    font-weight: 700;
}

.image-history-pager .compact {
    min-width: 104px;
    height: 40px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 760;
}

.image-status {
    flex: 0 0 auto;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 720;
}

.image-status-pending {
    color: #facc15;
    background: rgba(250, 204, 21, .12);
}

.image-status-running {
    color: #83d8ff;
    background: rgba(56, 213, 255, .12);
}

.image-status-success {
    color: #86efac;
    background: rgba(34, 197, 94, .12);
}

.image-status-failed,
.image-status-cancelled {
    color: #fca5a5;
    background: rgba(248, 113, 113, .13);
}

.image-empty-state {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    min-height: 96px;
    border: 1px dashed rgba(132, 177, 236, .18);
    border-radius: 12px;
    color: var(--muted);
    background: rgba(3, 8, 20, .18);
}

.image-output-preview {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
    overflow: hidden;
}

.image-output-empty {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(132, 177, 236, .16);
    border-radius: 12px;
    color: var(--muted);
    background:
        radial-gradient(circle at 50% 42%, rgba(56, 213, 255, .08), transparent 32%),
        linear-gradient(135deg, rgba(12, 20, 36, .72), rgba(3, 8, 20, .38)),
        rgba(3, 8, 20, .28);
    text-align: center;
    overflow: hidden;
}

.image-output-empty::before {
    content: "";
    position: absolute;
    inset: 26px;
    border-radius: 14px;
    pointer-events: none;
}

.image-output-empty-card {
    position: relative;
    z-index: 1;
    width: min(320px, calc(100% - 48px));
    min-height: 168px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    padding: 28px 26px;
    border: 1px solid rgba(125, 211, 252, .16);
    border-radius: 16px;
    background: rgba(3, 8, 20, .34);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 18px 42px rgba(0, 0, 0, .2);
}

.image-output-empty-card .upload-icon {
    width: 42px;
    height: 42px;
    opacity: .95;
}

.image-output-empty-card strong {
    color: #eaf6ff;
    font-size: 16px;
    font-weight: 760;
}

.image-output-empty-card small {
    max-width: 240px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.image-output-empty.is-running {
    gap: 12px;
    align-content: center;
    color: #83d8ff;
}

.image-output-empty.is-running::before {
    display: none;
}

.image-output-image-wrap {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    border: 1px solid rgba(125, 211, 252, .22);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(12, 20, 36, .92), rgba(56, 189, 248, .08)),
        rgba(3, 8, 20, .42);
    overflow: hidden;
}

.image-output-image-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
}

.image-output-image-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center center;
}

.image-output-delete,
.image-output-download {
    opacity: 0;
    transition: opacity .16s ease, transform .16s ease, background .16s ease;
}

.image-output-download {
    position: absolute;
    top: 8px;
    right: 42px;
    z-index: 2;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(74, 222, 128, .42);
    border-radius: 50%;
    color: #dcfce7;
    background: rgba(20, 83, 45, .76);
    backdrop-filter: blur(10px);
}

.image-output-download svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.image-output-image-wrap:hover .image-output-delete,
.image-output-image-wrap:hover .image-output-download {
    opacity: 1;
}

.image-output-view {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    cursor: pointer;
}

.image-output-view span {
    min-width: 86px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 0 14px;
    border: 1px solid rgba(248, 251, 255, .22);
    border-radius: 999px;
    background: rgba(3, 8, 20, .46);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .24);
}

.image-output-image-wrap:hover .image-output-view {
    opacity: 1;
}

.image-history-modal-card {
    width: min(900px, calc(100vw - 44px));
    max-height: min(720px, calc(100vh - 44px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-color: rgba(125, 211, 252, .24);
    background:
        linear-gradient(180deg, rgba(18, 32, 54, .98), rgba(5, 10, 21, .98)),
        rgba(255, 255, 255, .035);
}

.image-history-modal-card .modal-head {
    padding: 24px 52px;
    border-bottom: 1px solid rgba(132, 177, 236, .16);
    background:
        linear-gradient(135deg, rgba(56, 213, 255, .08), rgba(37, 99, 235, .04)),
        rgba(7, 14, 27, .58);
}

.image-history-modal-card .modal-head h2 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.image-history-modal-card .modal-head h2 span {
    min-width: 30px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #83d8ff;
    background: rgba(56, 213, 255, .12);
    font-size: 12px;
    font-weight: 720;
}

.image-history-modal-card .image-history-list {
    margin: 36px auto 0;
    padding: 0 0 30px;
    overflow-y: auto;
}

.image-history-modal-card .image-empty-state {
    width: min(760px, calc(100% - 72px));
    margin: 36px auto 30px;
}

.image-history-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 10px;
    color: var(--text);
}

.image-history-title strong {
    font-size: 15px;
    font-weight: 760;
}

.image-history-title span {
    min-width: 30px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #83d8ff;
    background: rgba(56, 213, 255, .12);
    font-weight: 720;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
    gap: 18px;
    align-items: start;
}

.project-card {
    position: relative;
    aspect-ratio: 3 / 4;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid rgba(132, 177, 236, .15);
    border-radius: 14px;
    background:
        radial-gradient(circle at 50% 20%, rgba(59, 145, 255, .13), transparent 42%),
        linear-gradient(180deg, rgba(39, 49, 66, .86), rgba(14, 19, 30, .94)),
        rgba(255, 255, 255, .035);
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: rgba(125, 211, 252, .44);
    background:
        radial-gradient(circle at 50% 20%, rgba(56, 213, 255, .17), transparent 44%),
        linear-gradient(180deg, rgba(47, 59, 78, .9), rgba(13, 18, 29, .96)),
        rgba(255, 255, 255, .04);
    box-shadow: 0 20px 46px rgba(0, 0, 0, .26), 0 0 0 1px rgba(56, 213, 255, .08);
}

.project-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 48%;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(4, 8, 17, .46));
}

.project-card-menu {
    position: absolute;
    z-index: 3;
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
}

.project-card-menu-left {
    left: 12px;
    top: 10px;
}

.project-card-menu-left::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(237, 244, 255, .92);
    box-shadow: 0 7px 0 rgba(237, 244, 255, .92), 0 14px 0 rgba(237, 244, 255, .92);
}

.project-card-menu-right {
    right: 12px;
    top: 10px;
}

.project-card-menu-right::before,
.project-card-menu-right::after {
    content: "";
    position: absolute;
    right: 4px;
    height: 2px;
    border-radius: 999px;
    background: rgba(237, 244, 255, .92);
}

.project-card-menu-right::before {
    top: 7px;
    width: 17px;
    box-shadow: 0 7px 0 rgba(237, 244, 255, .92);
}

.project-card-menu-right::after {
    top: 21px;
    width: 12px;
}

.project-create-card {
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--muted-strong);
    border: 1px dashed rgba(125, 211, 252, .42);
    background:
        radial-gradient(circle at 50% 36%, rgba(56, 213, 255, .12), transparent 40%),
        linear-gradient(180deg, rgba(13, 22, 37, .78), rgba(5, 9, 17, .94)),
        rgba(255, 255, 255, .025);
}

.project-create-card .project-card-menu-left {
    left: 14px;
    top: 12px;
}

.project-create-card:hover {
    border-color: rgba(125, 211, 252, .72);
    box-shadow: 0 24px 60px rgba(37, 99, 235, .18), 0 0 0 1px rgba(56, 213, 255, .12);
}

.project-create-folder {
    width: 72px;
    height: 52px;
    position: relative;
    border: 3px solid rgba(237, 244, 255, .9);
    border-radius: 9px;
}

.project-create-folder::before {
    content: "";
    position: absolute;
    left: 7px;
    top: -13px;
    width: 28px;
    height: 16px;
    border: 3px solid rgba(237, 244, 255, .9);
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
    background: rgba(5, 9, 17, .72);
}

.project-create-plus {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    transform: translate(-50%, -50%);
}

.project-create-plus::before,
.project-create-plus::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: #eaf2ff;
    transform: translate(-50%, -50%);
}

.project-create-plus::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.project-create-card strong {
    color: #eaf2ff;
    font-size: 12.5px;
    font-weight: 720;
}

.project-folder-visual {
    position: relative;
    z-index: 1;
    width: 76px;
    height: 56px;
    align-self: center;
    margin: 18px 0 8px;
}

.project-folder-back,
.project-folder-front {
    position: absolute;
    display: block;
    background:
        radial-gradient(circle at 26% 18%, rgba(255, 255, 255, .24), transparent 30%),
        linear-gradient(180deg, rgba(56, 213, 255, .82), rgba(37, 99, 235, .66));
    box-shadow: 0 18px 38px rgba(37, 99, 235, .28);
}

.project-folder-back {
    left: 12px;
    top: 0;
    width: 52px;
    height: 37px;
    border-radius: 8px 8px 7px 7px;
}

.project-folder-back::before {
    content: "";
    position: absolute;
    left: 0;
    top: -11px;
    width: 22px;
    height: 14px;
    border-radius: 7px 7px 0 0;
    background: inherit;
}

.project-folder-front {
    left: 0;
    right: 0;
    bottom: 0;
    height: 42px;
    border-radius: 8px 8px 12px 12px;
    transform: perspective(120px) rotateX(-8deg);
}

.project-card-head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    text-align: left;
}

.project-card-head > div {
    min-width: 0;
    width: 100%;
}

.project-card h3 {
    margin: 0 0 4px;
    color: #f7fbff;
    font-size: 13.5px;
    font-weight: 680;
    line-height: 1.35;
    max-height: 1.35em;
    display: -webkit-box;
    overflow: hidden;
    word-break: break-all;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.project-card p {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.45;
    min-width: 0;
    line-clamp: 1;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.project-delete-btn {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    border: 1px solid rgba(248, 113, 113, .28);
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--danger);
    background: var(--danger-soft);
    font-size: 11px;
}

.project-meta-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}

.project-meta-grid span {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 7px;
    border: 1px solid rgba(132, 177, 236, .12);
    border-radius: 10px;
    color: var(--muted);
    background: rgba(3, 8, 20, .24);
    font-size: 10.5px;
}

.project-meta-grid strong {
    overflow: hidden;
    color: #eaf2ff;
    font-size: 11.5px;
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-status-row {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.project-status-row > span {
    color: #83d8ff;
    font-size: 11.5px;
    font-weight: 620;
}

.project-status-row > strong {
    color: var(--muted);
    font-size: 11px;
    font-weight: 620;
}

.shot-card {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 44px 220px minmax(72px, auto);
    grid-template-areas:
        "toolbar"
        "body"
        "refs";
    gap: 12px;
    align-items: stretch;
    padding: 14px;
    border: 1px solid rgba(132, 177, 236, .16);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(17, 27, 46, .82), rgba(7, 12, 22, .9)),
        rgba(255, 255, 255, .035);
}

.shot-card.selected {
    border-color: rgba(125, 211, 252, .48);
    box-shadow: 0 0 0 1px rgba(56, 213, 255, .12), 0 16px 42px rgba(37, 99, 235, .12);
}

.shot-header {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 38px;
    gap: 8px;
    padding: 0 2px;
    border: 0;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
    margin: 0;
}

.shot-checkbox {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
}

.shot-number {
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding-top: 0;
}

.shot-number-badge {
    width: 34px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(125, 211, 252, .34);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 720;
    background:
        radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .38), transparent 28%),
        linear-gradient(145deg, rgba(56, 189, 248, .72), rgba(37, 99, 235, .52));
    box-shadow: 0 8px 18px rgba(37, 99, 235, .16);
}

.shot-code-label {
    width: auto;
    min-width: 88px;
    height: 38px;
    min-height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border: 1px solid rgba(125, 211, 252, .2);
    border-radius: 14px;
    color: rgba(226, 241, 255, .9);
    background:
        linear-gradient(180deg, rgba(6, 13, 28, .9), rgba(3, 8, 20, .88));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
    font-size: 12.5px;
    font-weight: 720;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    box-sizing: border-box;
    margin: 0;
}

.shot-content,
.shot-preview,
.shot-actions {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.shot-body {
    grid-area: body;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 520px) 126px;
    grid-template-areas: "content preview actions";
    gap: 14px;
    align-items: stretch;
    height: 220px;
}

.shot-content {
    grid-area: content;
    align-self: stretch;
}

.shot-actions {
    grid-area: actions;
    height: 220px;
    display: flex;
    gap: 12px;
    justify-content: stretch;
}

.shot-preview {
    grid-area: preview;
}

.shot-description-head {
    grid-area: toolbar;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.shot-description-head .asset-form-label {
    flex: 0 0 auto;
    margin: 0;
}

.shot-description-wrap {
    position: relative;
    height: 220px;
    min-height: 220px;
    max-height: 220px;
    display: flex;
}

.director-polish-btn {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    min-width: 104px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid rgba(56, 213, 255, .48);
    border-radius: 12px;
    color: #dff8ff;
    background:
        linear-gradient(180deg, rgba(11, 24, 43, .96), rgba(4, 10, 22, .92)),
        rgba(56, 189, 248, .1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 24px rgba(14, 165, 233, .12);
    font-size: 13px;
    font-weight: 760;
    letter-spacing: 0;
    white-space: nowrap;
}

.director-polish-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, .72);
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(14, 165, 233, .24), rgba(37, 99, 235, .18)),
        rgba(4, 10, 22, .92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 12px 28px rgba(14, 165, 233, .18);
}

.shot-description {
    min-height: 220px;
    max-height: 220px;
    overflow-y: auto;
    line-height: 1.58;
}

.rich-shot-description {
    width: 100%;
    flex: 1 1 auto;
    padding: 12px 13px 62px;
    border: 1px solid rgba(132, 177, 236, .18);
    border-radius: 13px;
    color: var(--text);
    background: rgba(5, 11, 22, .62);
    outline: none;
    white-space: pre-wrap;
    word-break: break-word;
    scrollbar-gutter: stable;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
}

.rich-shot-description *,
.rich-shot-description span:not(.rich-ref-token) {
    color: inherit !important;
    font: inherit !important;
    background: transparent !important;
}

.rich-shot-description:focus {
    border-color: rgba(125, 211, 252, .46);
    box-shadow: 0 0 0 3px rgba(56, 213, 255, .1);
}

.rich-shot-description:empty::before {
    content: attr(data-placeholder);
    color: rgba(169, 187, 213, .56);
}

.rich-ref-token {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 3px;
    min-height: 25px;
    padding: 0 9px;
    border: 1px solid currentColor;
    border-radius: 999px;
    line-height: 1;
    font-size: .95em;
    font-weight: 760;
    vertical-align: baseline;
    user-select: none;
}

.shot-meta-row {
    grid-area: refs;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    min-height: 72px;
    padding-top: 2px;
    gap: 6px;
}

.shot-references {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.reference-tags-container {
    min-height: 30px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.ref-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    padding: 0 7px;
    border: 1px solid rgba(132, 177, 236, .2);
    border-radius: 7px;
    font-size: 11.5px;
    line-height: 1;
    white-space: nowrap;
}

.ref-tag small {
    color: currentColor;
    opacity: .72;
    font-size: 10px;
}

.ref-tag-char {
    color: #93c5fd;
    background: rgba(59, 130, 246, .12);
    border-color: rgba(59, 130, 246, .28);
}

.ref-tag-scene {
    color: #86efac;
    background: rgba(34, 197, 94, .11);
    border-color: rgba(34, 197, 94, .26);
}

.ref-tag-obj {
    color: #fca5a5;
    background: rgba(239, 68, 68, .11);
    border-color: rgba(239, 68, 68, .28);
}

.ref-tag-remove,
.ref-add-btn {
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 6px;
}

.ref-tag-remove {
    width: 16px;
    height: 16px;
    border: 0;
    color: inherit;
    background: rgba(255, 255, 255, .08);
}

.ref-add-btn {
    width: 26px;
    height: 26px;
    border: 1px dashed rgba(148, 190, 236, .28);
    color: var(--muted-strong);
    background: rgba(3, 8, 20, .34);
}

.ref-tag-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.shot-video-settings {
    justify-content: flex-start;
}

.ref-add-btn:hover {
    color: #83d8ff;
    border-color: rgba(125, 211, 252, .5);
}

.ref-add-btn svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.video-preview-box,
.generating-state {
    width: 100%;
    height: 220px;
    min-height: 220px;
    aspect-ratio: auto;
    display: grid;
    place-items: center;
    border: 2px dashed rgba(132, 177, 236, .22);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(12, 20, 36, .9), rgba(56, 189, 248, .08)),
        rgba(255, 255, 255, .035);
    overflow: hidden;
}

.video-preview-box.has-video {
    border-style: solid;
    border-color: rgba(125, 211, 252, .42);
    position: relative;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, .96), rgba(3, 8, 20, .92)),
        #020617;
}

.video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    object-position: center center;
    background: #020617;
    outline: none;
}

.video-preview-icon {
    width: 42px;
    height: 32px;
    position: relative;
    border: 1px solid rgba(125, 211, 252, .42);
    border-radius: 9px;
    opacity: .78;
}

.video-preview-icon::after {
    content: "";
    position: absolute;
    left: 16px;
    top: 9px;
    border-left: 11px solid rgba(191, 219, 254, .9);
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

.generating-state {
    gap: 12px;
    color: #83d8ff;
}

.generating-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(59, 145, 255, .2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.generating-text {
    font-size: 12px;
    font-weight: 600;
}

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

.shot-video-settings {
    display: flex;
    align-items: center;
    align-self: center;
    height: 38px;
    flex-wrap: nowrap;
    gap: 8px;
    width: auto;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.shot-video-settings .shot-setting-select {
    width: 84px;
    height: 38px;
    min-height: 38px;
    border: 1px solid rgba(148, 190, 236, .22);
    border-radius: 14px;
    padding: 0 34px 0 14px;
    font-size: 12px;
    line-height: 38px;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    background:
        linear-gradient(45deg, transparent 50%, rgba(226, 241, 255, .88) 50%) calc(100% - 18px) 16px / 6px 6px no-repeat,
        linear-gradient(135deg, rgba(226, 241, 255, .88) 50%, transparent 50%) calc(100% - 14px) 16px / 6px 6px no-repeat,
        linear-gradient(180deg, rgba(6, 13, 28, .9), rgba(3, 8, 20, .88));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
    outline: none;
    vertical-align: top;
}

.shot-video-settings .shot-setting-select:nth-child(2) {
    width: 94px;
}

.shot-video-settings .shot-setting-select:nth-child(4) {
    width: 84px;
}

.shot-duration-control,
.shot-audio-toggle {
    height: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    align-self: center;
    border: 1px solid rgba(148, 190, 236, .22);
    border-radius: 14px;
    padding: 0 12px;
    color: #edf4ff;
    background:
        linear-gradient(180deg, rgba(6, 13, 28, .9), rgba(3, 8, 20, .88));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
    font-size: 12px;
    white-space: nowrap;
    line-height: 1;
    box-sizing: border-box;
    vertical-align: top;
    margin: 0;
}

.shot-duration-control {
    width: 150px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 8px;
    padding: 0 12px;
}

.shot-duration-control span {
    width: auto;
    color: #83d8ff;
    font-weight: 700;
    text-align: left;
}

.shot-duration-control input {
    width: 100%;
    height: 4px;
    padding: 0;
    margin: 0;
    accent-color: var(--primary);
    appearance: none;
    -webkit-appearance: none;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(59, 145, 255, .72), rgba(125, 211, 252, .48));
    outline: none;
}

.shot-duration-control input::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .28);
}

.shot-duration-control input::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    margin-top: -7px;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #2f80ff);
    box-shadow: 0 0 0 3px rgba(59, 145, 255, .13), 0 4px 10px rgba(37, 99, 235, .28);
}

.shot-duration-control input::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .28);
}

.shot-duration-control input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #2f80ff);
    box-shadow: 0 0 0 3px rgba(59, 145, 255, .13), 0 4px 10px rgba(37, 99, 235, .28);
}

.shot-audio-toggle {
    gap: 8px;
    padding: 0 12px;
}

.toolbar-audio-toggle input,
.shot-audio-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    place-items: center;
    border: 0px solid rgba(237, 244, 255, .9);
    border-radius: 3px;
    background: rgba(255, 255, 255, .92);
    box-shadow: inset 0 0 0 2px rgba(3, 8, 20, .08);
}

.toolbar-audio-toggle input:checked,
.shot-audio-toggle input:checked {
    border-color: rgba(125, 211, 252, .86);
    background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.toolbar-audio-toggle input:checked::after,
.shot-audio-toggle input:checked::after {
    content: "";
    width: 7px;
    height: 4px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

.shot-actions {
    align-items: stretch;
}

.shot-actions .compact {
    width: 100%;
}

.icon-only {
    color: var(--muted-strong);
}

@media (max-width: 1680px) {
    .image-creator-panel {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 18px;
    }

    .shot-body {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 420px) 112px;
        gap: 12px;
    }

    .shot-number-badge {
        width: 34px;
        height: 28px;
    }

    .shot-description-head {
        display: flex;
        align-items: center;
        gap: 10px;
        height: 44px;
    }

    .shot-video-settings {
        min-width: 0;
        justify-content: flex-start;
    }

}

@media (max-width: 1420px) {
    .image-creator-panel {
        grid-template-columns: 1fr;
    }

    .shot-body {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 340px) 104px;
        align-items: start;
        gap: 12px;
    }

    .shot-actions {
        display: flex;
    }

    .shot-actions .compact {
        min-height: 34px;
    }

    .video-preview-box,
    .generating-state,
    .shot-description,
    .shot-description-wrap {
        height: 210px;
        min-height: 210px;
        max-height: 210px;
    }
}

.video-empty-state {
    min-height: 300px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: var(--muted-strong);
    text-align: center;
}

.video-empty-icon {
    width: 54px;
    height: 38px;
    border: 1px solid rgba(125, 211, 252, .28);
    border-radius: 12px;
    position: relative;
    opacity: .7;
}

.video-empty-icon::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 10px;
    border-left: 13px solid rgba(125, 211, 252, .72);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.video-empty-text {
    color: #eaf2ff;
    font-weight: 650;
}

.video-empty-hint {
    color: var(--muted);
    font-size: 12px;
}

.character-grid {
    grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
    align-items: start;
    gap: 18px;
}

.character-grid-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(132, 177, 236, .18);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(17, 27, 46, .82), rgba(7, 12, 22, .9)),
        rgba(255, 255, 255, .035);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .22);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease, filter .18s ease;
}

.character-grid-card:hover {
    transform: translateY(-4px);
    border-color: rgba(125, 211, 252, .46);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .32), 0 0 0 1px rgba(56, 213, 255, .08);
    filter: saturate(1.03);
}

.character-grid-card.create-card {
    border: 1px dashed rgba(125, 211, 252, .42);
    background:
        radial-gradient(circle at 50% 36%, rgba(56, 213, 255, .12), transparent 40%),
        linear-gradient(180deg, rgba(13, 22, 37, .78), rgba(5, 9, 17, .94)),
        rgba(255, 255, 255, .025);
}

.character-grid-card.create-card:hover {
    border-color: rgba(125, 211, 252, .72);
    box-shadow: 0 24px 60px rgba(37, 99, 235, .18), 0 0 0 1px rgba(56, 213, 255, .12);
}

.grid-card-image {
    position: relative;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(12, 20, 36, .92), rgba(37, 99, 235, .15)),
        #07101f;
}

.character-grid-card.create-card .grid-card-image {
    background: transparent;
}

.character-grid-card.create-card .grid-card-image::after {
    opacity: 0;
}

.character-grid-card.create-card::after {
    content: "";
    min-height: 58px;
    display: block;
    background: rgba(7, 13, 24, .38);
    border-top: 1px solid rgba(132, 177, 236, .1);
}

.grid-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 25%),
        linear-gradient(0deg, rgba(4, 8, 17, .18), transparent 42%);
    opacity: .65;
}

.grid-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .22s ease, filter .22s ease;
}

.character-grid-card:hover .grid-card-image img {
    transform: scale(1.035);
    filter: saturate(1.08) contrast(1.02);
}

.create-character-content,
.no-character-image {
    display: grid;
    place-items: center;
    gap: 9px;
    color: var(--muted-strong);
    font-size: 12px;
    text-align: center;
}

.create-character-content strong,
.no-character-image strong {
    font-size: 12.5px;
    font-weight: 720;
}

.create-character-folder {
    position: relative;
    width: 72px;
    height: 52px;
    border: 3px solid rgba(237, 244, 255, .9);
    border-radius: 9px;
}

.create-character-folder::before {
    content: "";
    position: absolute;
    left: 7px;
    top: -13px;
    width: 28px;
    height: 16px;
    border: 3px solid rgba(237, 244, 255, .9);
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
    background: rgba(5, 9, 17, .72);
}

.create-character-plus {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    transform: translate(-50%, -50%);
}

.create-character-plus::before,
.create-character-plus::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: #ffffff;
    transform: translate(-50%, -50%);
}

.create-character-plus::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.no-character-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, .24);
    background:
        radial-gradient(circle at center 32%, rgba(143, 163, 191, .78) 0 17%, transparent 18%),
        radial-gradient(ellipse at center 76%, rgba(143, 163, 191, .46) 0 32%, transparent 33%),
        rgba(255, 255, 255, .04);
    opacity: .7;
}

.grid-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity .16s ease, transform .16s ease;
}

.character-grid-card:hover .grid-card-actions {
    opacity: 1;
    transform: translateY(0);
}

.grid-card-btn {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(191, 219, 254, .36);
    border-radius: 50%;
    color: #f8fbff;
    background:
        radial-gradient(circle at 30% 18%, rgba(255, 255, 255, .28), transparent 28%),
        linear-gradient(145deg, rgba(15, 23, 42, .42), rgba(56, 189, 248, .18), rgba(37, 99, 235, .24)),
        rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 24px rgba(0, 0, 0, .28);
}

.grid-card-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, .68);
    background:
        radial-gradient(circle at 30% 18%, rgba(255, 255, 255, .34), transparent 28%),
        linear-gradient(145deg, rgba(56, 189, 248, .5), rgba(37, 99, 235, .36)),
        rgba(255, 255, 255, .16);
}

.grid-card-btn.danger-btn {
    border-color: rgba(248, 113, 113, .36);
    color: #fee2e2;
}

.grid-card-btn.danger-btn:hover {
    background: rgba(127, 29, 29, .62);
    border-color: rgba(248, 113, 113, .56);
}

.grid-card-btn svg,
.grid-card-audio-indicator svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.grid-card-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    max-width: calc(100% - 68px);
    border-radius: 999px;
    padding: 4px 8px;
    border: 1px solid rgba(125, 211, 252, .36);
    color: #dbeafe;
    background: rgba(8, 16, 30, .72);
    backdrop-filter: blur(12px);
    font-size: 10.5px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-card-real-badge {
    position: absolute;
    left: 0;
    top: 10px;
    z-index: 2;
    min-width: 48px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px 0 11px;
    border: 1px solid rgba(191, 219, 254, .36);
    border-left: 0;
    border-radius: 0 999px 999px 0;
    color: #f8fbff;
    background:
        linear-gradient(135deg, rgba(56, 189, 248, .88), rgba(37, 99, 235, .82)),
        rgba(8, 16, 30, .72);
    box-shadow: 0 8px 22px rgba(14, 165, 233, .24), inset 0 1px 0 rgba(255, 255, 255, .28);
    backdrop-filter: blur(12px);
    font-size: 11px;
    font-weight: 760;
    line-height: 1;
}

.grid-card-real-badge.is-active {
    border-color: rgba(191, 219, 254, .36);
    color: #f8fbff;
    background:
        linear-gradient(135deg, rgba(56, 189, 248, .88), rgba(37, 99, 235, .82)),
        rgba(8, 16, 30, .72);
    box-shadow: 0 8px 22px rgba(14, 165, 233, .24), inset 0 1px 0 rgba(255, 255, 255, .28);
}

.grid-card-real-badge.is-pending {
    border-color: rgba(251, 191, 36, .42);
    color: #fff7d6;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, .88), rgba(180, 83, 9, .82)),
        rgba(8, 16, 30, .72);
    box-shadow: 0 8px 22px rgba(245, 158, 11, .2), inset 0 1px 0 rgba(255, 255, 255, .24);
}

.grid-card-real-badge.is-rejected,
.grid-card-real-badge.is-failed {
    border-color: rgba(248, 113, 113, .42);
    color: #fff1f2;
    background:
        linear-gradient(135deg, rgba(248, 113, 113, .88), rgba(185, 28, 28, .84)),
        rgba(8, 16, 30, .72);
    box-shadow: 0 8px 22px rgba(239, 68, 68, .2), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.grid-card-footer {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 11px;
    background: rgba(7, 13, 24, .58);
    border-top: 1px solid rgba(132, 177, 236, .14);
}

.grid-card-text {
    min-width: 0;
}

.grid-card-name {
    overflow: hidden;
    color: #f7fbff;
    font-size: 13px;
    font-weight: 620;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-card-desc {
    margin-top: 4px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-card-audio-indicator {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #c9f2ff;
    border: 1px solid rgba(125, 211, 252, .28);
    background: rgba(56, 213, 255, .1);
}

.card {
    background:
        linear-gradient(180deg, rgba(17, 27, 46, .82), rgba(8, 13, 24, .9)),
        rgba(255, 255, 255, .04);
    border: 1px solid rgba(132, 177, 236, .18);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .25);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(125, 211, 252, .42);
    box-shadow: 0 24px 62px rgba(0, 0, 0, .32);
}

.thumb {
    aspect-ratio: 16 / 9;
    background:
        linear-gradient(135deg, rgba(12, 20, 36, .92), rgba(56, 189, 248, .12)),
        rgba(255, 255, 255, .04);
    display: grid;
    place-items: center;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 14px;
}

.card-title {
    font-weight: 650;
    margin-bottom: 8px;
    color: #f7fbff;
    font-size: 15px;
}

.meta {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    min-height: 42px;
}

audio {
    width: 100%;
    margin-top: 10px;
    filter: invert(1) hue-rotate(180deg);
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 14px 14px;
}

.file-btn {
    position: relative;
    overflow: hidden;
}

.file-btn input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.empty {
    padding: 52px 16px;
    text-align: center;
    color: var(--muted-strong);
    border: 1px dashed rgba(96, 165, 250, .26);
    border-radius: 14px;
    font-size: 13px;
    background: rgba(255, 255, 255, .035);
}

.results-empty {
    min-height: 174px;
    display: grid;
    place-items: center;
    margin-top: 8px;
    border-color: rgba(59, 145, 255, .34);
    background: rgba(3, 8, 20, .22);
    font-weight: 600;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(3, 7, 18, .66);
    backdrop-filter: blur(18px) saturate(1.18);
    display: grid;
    place-items: center;
    padding: 18px;
}

.modal-card {
    position: relative;
    z-index: 5001;
    width: min(720px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    background:
        linear-gradient(180deg, rgba(18, 30, 52, .96), rgba(7, 12, 22, .96)),
        rgba(255, 255, 255, .04);
    border: 1px solid rgba(125, 211, 252, .24);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 255, 255, .08);
    scrollbar-width: thin;
    scrollbar-color: rgba(125, 211, 252, .34) rgba(3, 8, 20, .24);
}

.modal-card::-webkit-scrollbar {
    width: 8px;
}

.modal-card::-webkit-scrollbar-track {
    background: rgba(3, 8, 20, .24);
    border-radius: 999px;
}

.modal-card::-webkit-scrollbar-thumb {
    border: 2px solid rgba(3, 8, 20, .42);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(125, 211, 252, .68), rgba(37, 99, 235, .45));
}

.modal-card > :not(.modal-head):not(.modal-footer) {
    margin-left: 18px;
    margin-right: 18px;
}

.modal-card > input,
.modal-card > textarea,
.modal-card > select {
    width: calc(100% - 36px);
}

.modal-card > label:first-of-type,
.modal-card > input:first-of-type,
.modal-card > textarea:first-of-type,
.modal-card > .admin-form-grid:first-of-type,
.modal-card > .project-modal-body:first-of-type,
.modal-card > .asset-modal-body:first-of-type,
.modal-card > .picker-list:first-of-type,
.modal-card > .history-list:first-of-type {
    margin-top: 18px;
}

.modal-card > .project-modal-body,
.modal-card > .asset-modal-body,
.modal-card > .auth-modal-body,
.modal-card > .character-modal-layout {
    margin-left: 0;
    margin-right: 0;
}

.auth-modal-card {
    width: min(420px, calc(100vw - 32px));
    overflow: hidden;
}

.auth-modal-card .modal-head {
    margin: 0;
}

.auth-modal-body {
    padding: 18px 18px 0;
}

.auth-modal-body label {
    margin: 0 0 7px;
}

.auth-modal-body label:not(:first-child) {
    margin-top: 14px;
}

.auth-modal-body input {
    width: 100%;
    min-height: 42px;
    border-radius: 13px;
}

.captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 10px;
    align-items: center;
}

.captcha-row input {
    text-align: center;
    font-size: 16px;
    font-weight: 720;
    letter-spacing: 0;
}

.captcha-image {
    width: 132px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(125, 211, 252, .25);
    border-radius: 13px;
    background: rgba(8, 18, 34, .7);
    cursor: pointer;
    overflow: hidden;
}

.captcha-image img {
    width: 132px;
    height: 44px;
    display: block;
}

.auth-modal-body .error {
    margin: 12px 0 0;
}

.auth-modal-footer {
    margin-top: 16px;
}

.auth-modal-footer .primary {
    min-height: 42px;
}

.character-modal-card {
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 36px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.asset-modal-card {
    width: min(560px, 100%);
    overflow: hidden;
}

.asset-modal-card .modal-head {
    margin: 0;
}

.asset-modal-body {
    padding: 18px;
}

.asset-modal-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.asset-modal-field {
    min-width: 0;
}

.asset-modal-card label {
    margin-top: 0;
}

.asset-modal-card textarea {
    min-height: 128px;
    line-height: 1.55;
}

.asset-modal-card .error {
    margin: 0 18px;
}

.asset-modal-card .modal-footer {
    margin-top: 0;
}

.project-modal-card {
    width: min(520px, 100%);
    overflow: hidden;
}

.project-modal-card .modal-head {
    margin: 0;
}

.project-modal-card .modal-head h2 {
    font-size: 17px;
}

.project-modal-body {
    padding: 18px;
}

.project-modal-body label {
    margin: 0 0 6px;
}

.project-modal-body input,
.project-modal-body select,
.project-modal-body textarea {
    width: 100%;
    border-radius: 10px;
}

.project-modal-body input,
.project-modal-body select {
    height: 42px;
}

.project-modal-body select {
    border: 1px solid rgba(148, 190, 236, .2);
    padding: 0 11px;
    color: #edf4ff;
    background: rgba(3, 8, 20, .42);
    outline: none;
}

.project-modal-body textarea {
    min-height: 112px;
    line-height: 1.55;
}

.project-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 12px;
    align-items: end;
}

.project-title-row > div {
    min-width: 0;
}

.project-cover-upload {
    position: relative;
    height: 128px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px dashed rgba(125, 211, 252, .32);
    border-radius: 12px;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, .56), rgba(56, 189, 248, .09)),
        rgba(255, 255, 255, .035);
    cursor: pointer;
}

.project-cover-upload:hover {
    border-color: rgba(125, 211, 252, .56);
}

.project-cover-upload input {
    display: none;
}

.project-cover-placeholder {
    display: grid;
    place-items: center;
    gap: 6px;
    color: var(--muted-strong);
    text-align: center;
}

.project-cover-placeholder strong {
    color: #eaf2ff;
    font-size: 12.5px;
    font-weight: 580;
}

.project-cover-placeholder small {
    color: var(--muted);
    font-size: 11.5px;
}

.project-cover-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-modal-card .error {
    margin: 0 18px;
}

.project-modal-card .modal-footer {
    margin-top: 0;
}

.picker-modal-card {
    width: min(520px, 100%);
    overflow: hidden;
}

.picker-modal-card .modal-head {
    margin: 0;
}

.picker-list {
    max-height: 440px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.picker-item {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(132, 177, 236, .16);
    border-radius: 10px;
    padding: 11px 12px;
    color: var(--text);
    background: rgba(3, 8, 20, .3);
    text-align: left;
    transition: border-color .16s ease, background .16s ease;
}

.picker-item:hover,
.picker-item.selected {
    border-color: rgba(125, 211, 252, .5);
    background: rgba(59, 145, 255, .1);
}

.picker-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, .24);
    border-radius: 10px;
    color: #83d8ff;
    background: rgba(56, 213, 255, .08);
}

.picker-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.picker-info {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 4px;
}

.picker-info strong,
.picker-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.picker-info strong {
    font-size: 13px;
    font-weight: 620;
}

.picker-info small {
    color: var(--muted);
    font-size: 11.5px;
}

.picker-check {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(148, 190, 236, .32);
    border-radius: 5px;
}

.picker-item.selected .picker-check {
    border-color: rgba(125, 211, 252, .8);
    background:
        linear-gradient(135deg, rgba(56, 213, 255, .95), rgba(37, 99, 235, .9));
    box-shadow: inset 0 0 0 4px rgba(3, 8, 20, .7);
}

.picker-empty {
    margin: 16px;
}

.picker-modal-card .modal-footer {
    margin-top: 0;
}

.history-list {
    max-height: 460px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.history-row {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.4fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(132, 177, 236, .14);
    border-radius: 10px;
    background: rgba(3, 8, 20, .28);
}

.history-row.current {
    border-color: rgba(125, 211, 252, .45);
    background: rgba(59, 145, 255, .09);
}

.history-row strong {
    display: block;
    color: #f7fbff;
    font-size: 13px;
    margin-bottom: 4px;
}

.history-row span,
.history-row-meta {
    color: var(--muted);
    font-size: 12px;
}

.history-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-row-actions {
    display: flex;
    justify-content: flex-end;
}

.current-version {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(125, 211, 252, .28);
    border-radius: 999px;
    color: #83d8ff !important;
    background: rgba(56, 213, 255, .08);
    font-weight: 620;
}

.history-unavailable {
    color: var(--muted) !important;
    font-size: 12px;
}

.history-empty {
    margin: 16px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    margin: 0 0 14px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(132, 177, 236, .14);
    background:
        linear-gradient(135deg, rgba(56, 213, 255, .1), rgba(37, 99, 235, .055)),
        rgba(255, 255, 255, .025);
}

.modal-head h2 {
    color: #f7fbff;
    font-size: 18px;
    font-weight: 650;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(148, 190, 236, .24);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035));
    color: #cbd5e1;
    border-radius: 999px;
    font-size: 22px;
    line-height: 1;
}

label {
    display: block;
    font-size: 12px;
    color: var(--muted-strong);
    margin: 12px 0 6px;
}

input,
textarea {
    width: 100%;
    border: 1px solid rgba(148, 190, 236, .2);
    border-radius: 11px;
    padding: 9px 11px;
    color: #edf4ff;
    background: rgba(3, 8, 20, .42);
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input:focus,
textarea:focus {
    border-color: rgba(125, 211, 252, .62);
    box-shadow: 0 0 0 4px rgba(56, 213, 255, .12);
    background: rgba(2, 6, 23, .58);
}

textarea {
    resize: vertical;
}

.required {
    color: #f87171;
}

.character-modal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 288px;
    gap: 16px;
    padding: 18px 18px 0;
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(125, 211, 252, .34) rgba(3, 8, 20, .24);
}

.character-modal-layout::-webkit-scrollbar {
    width: 8px;
}

.character-modal-layout::-webkit-scrollbar-track {
    background: rgba(3, 8, 20, .24);
    border-radius: 999px;
}

.character-modal-layout::-webkit-scrollbar-thumb {
    border: 2px solid rgba(3, 8, 20, .42);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(125, 211, 252, .68), rgba(37, 99, 235, .45));
}

.character-modal-main,
.character-modal-side {
    min-width: 0;
}

.character-modal-main {
    display: grid;
    align-content: start;
    gap: 14px;
}

.character-modal-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: start;
    position: sticky;
    top: 0;
}

.character-field {
    min-width: 0;
}

.character-modal-layout label {
    display: block;
    margin: 0 0 7px;
}

.switch-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--muted-strong);
    font-size: 11.5px;
    font-weight: 650;
    cursor: pointer;
    user-select: none;
}

.switch-control input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.switch-track {
    position: relative;
    width: 42px;
    height: 22px;
    flex: 0 0 42px;
    border: 1px solid rgba(148, 190, 236, .28);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, .82), rgba(3, 8, 20, .9));
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .32);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.switch-knob {
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .92), rgba(191, 219, 254, .92) 48%, rgba(96, 165, 250, .82));
    box-shadow: 0 4px 12px rgba(0, 0, 0, .34);
    transition: transform .18s ease, background .18s ease;
}

.switch-control input:checked + .switch-track {
    border-color: rgba(125, 211, 252, .68);
    background:
        linear-gradient(135deg, rgba(56, 189, 248, .72), rgba(37, 99, 235, .82));
    box-shadow: 0 0 0 3px rgba(56, 213, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.switch-control input:checked + .switch-track .switch-knob {
    transform: translateX(20px);
    background:
        radial-gradient(circle at 34% 28%, #ffffff, #e0f2fe 48%, #93c5fd);
}

.switch-label {
    white-space: nowrap;
}

.switch-state {
    width: 25px;
    color: rgba(148, 163, 184, .9);
    font-size: 10.5px;
    letter-spacing: 0;
    text-align: left;
}

.switch-control input:checked ~ .switch-state {
    color: #7dd3fc;
}

.switch-control.is-disabled {
    cursor: not-allowed;
    opacity: .66;
}

.switch-control.is-disabled .switch-track,
.switch-control.is-disabled .switch-label,
.switch-control.is-disabled .switch-state {
    pointer-events: none;
}

.modal-footer-switch {
    margin-right: 10px;
}

.modal-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.character-modal-layout input,
.character-modal-layout textarea {
    width: 100%;
}

.character-modal-layout textarea {
    min-height: 136px;
    resize: vertical;
}

.character-upload-area,
.character-audio-area {
    position: relative;
    border: 1px dashed rgba(125, 211, 252, .32);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, .56), rgba(56, 189, 248, .09)),
        rgba(255, 255, 255, .035);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.character-upload-area:hover,
.character-audio-area:hover {
    border-color: rgba(125, 211, 252, .58);
    background:
        linear-gradient(145deg, rgba(56, 213, 255, .13), rgba(37, 99, 235, .08), rgba(15, 23, 42, .58)),
        rgba(255, 255, 255, .045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.character-upload-area input,
.character-audio-area input {
    display: none;
}

.character-upload-area {
    min-height: 230px;
    overflow: hidden;
}

.character-modal-side .character-upload-area {
    flex: 0 0 auto;
    height: 300px;
    min-height: 300px;
    max-height: 300px;
}

.upload-placeholder,
.upload-preview,
.audio-placeholder,
.audio-preview {
    width: 100%;
    height: 100%;
}

.upload-placeholder {
    min-height: 230px;
    display: grid;
    place-items: center;
    gap: 7px;
    padding: 18px;
    color: var(--muted-strong);
    text-align: center;
}

.character-modal-side .upload-placeholder,
.character-modal-side .upload-preview {
    height: 300px;
    min-height: 300px;
    max-height: 300px;
}

.character-modal-side .upload-preview img {
    height: 300px;
}

.upload-placeholder strong,
.audio-placeholder strong {
    color: #eaf2ff;
    font-size: 12.5px;
    font-weight: 580;
}

.upload-placeholder small,
.audio-placeholder small,
.form-tip {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.5;
}

.upload-icon {
    display: block;
    width: 30px;
    height: 30px;
    opacity: .72;
    position: relative;
}

.upload-icon-image {
    border: 1px solid rgba(125, 211, 252, .58);
    border-radius: 7px;
}

.upload-icon-image::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(191, 219, 254, .85);
}

.upload-icon-image::after {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    bottom: 6px;
    height: 11px;
    background: linear-gradient(135deg, transparent 0 32%, rgba(56, 213, 255, .72) 33% 66%, rgba(191, 219, 254, .9) 67%);
    clip-path: polygon(0 100%, 32% 42%, 49% 68%, 68% 20%, 100% 100%);
}

.upload-icon-audio::before,
.upload-icon-audio::after {
    content: "";
    position: absolute;
    background: rgba(191, 219, 254, .84);
}

.upload-icon-audio::before {
    left: 9px;
    top: 5px;
    width: 3px;
    height: 18px;
    border-radius: 999px;
    box-shadow: 10px -3px 0 rgba(96, 165, 250, .76);
}

.upload-icon-audio::after {
    left: 4px;
    bottom: 3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    box-shadow: 10px -2px 0 rgba(96, 165, 250, .76);
}

.upload-preview {
    position: relative;
    min-height: 230px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(56, 213, 255, .08), transparent 42%),
        rgba(3, 8, 20, .34);
}

.upload-preview img {
    display: block;
    width: 100%;
    height: 230px;
    object-fit: contain;
    border-radius: 14px;
}

.btn-remove-upload {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(248, 113, 113, .38);
    border-radius: 50%;
    color: #fee2e2;
    background: rgba(127, 29, 29, .7);
    backdrop-filter: blur(10px);
    line-height: 1;
    font-size: 18px;
}

.upload-preview .btn-remove-upload {
    position: absolute;
    right: 8px;
    top: 8px;
}

.character-audio-area {
    min-height: 82px;
}

.audio-placeholder {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px;
    text-align: left;
}

.audio-preview {
    padding: 12px;
}

.audio-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #eaf2ff;
    font-size: 12px;
}

.audio-info span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audio-preview audio {
    height: 32px;
    margin: 0;
}

.audio-trim-panel {
    min-height: 82px;
    margin-top: 0;
    padding: 10px 12px;
    border: 1px solid rgba(125, 211, 252, .24);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(8, 16, 30, .92), rgba(13, 25, 48, .82)),
        rgba(255, 255, 255, .035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 16px 34px rgba(0, 0, 0, .16);
}

.audio-trim-head,
.audio-trim-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.audio-trim-head strong {
    display: block;
    color: #eaf2ff;
    font-size: 11.5px;
    font-weight: 680;
}

.audio-trim-head span {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 10.5px;
}

.audio-trim-player {
    display: none;
}

.audio-trim-control {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
    margin: 8px 0 8px;
    color: var(--muted-strong);
    font-size: 11.5px;
}

.audio-trim-actions {
    justify-content: flex-end;
    margin-top: 0;
}

.audio-trim-actions .ghost,
.audio-trim-actions .primary {
    min-height: 28px;
    padding: 6px 10px;
    font-size: 11px;
}

.audio-trim-head .btn-remove-upload {
    flex: 0 0 auto;
}

.audio-trim-range-wrap {
    position: relative;
    display: grid;
    align-items: center;
    min-height: 30px;
    padding: 6px 8px;
    border: 1px solid rgba(56, 189, 248, .18);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(10, 28, 48, .94), rgba(5, 15, 30, .92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 24px rgba(14, 165, 233, .08);
}

.audio-trim-range-wrap::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    top: 50%;
    height: 6px;
    border: 1px solid rgba(226, 232, 240, .52);
    border-radius: 999px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, .16);
}

.audio-trim-range {
    position: relative;
    z-index: 4;
    grid-area: 1 / 1;
    width: 100%;
    height: 18px;
    margin: 0;
    background: transparent;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
}

.audio-trim-window {
    position: absolute;
    left: calc(12px + (100% - 24px) * var(--trim-left, 0) / 100);
    top: 50%;
    z-index: 2;
    width: calc((100% - 24px) * var(--trim-width, 0) / 100);
    height: 6px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(56, 189, 248, .9), rgba(37, 99, 235, .78));
    box-shadow: 0 0 16px rgba(56, 189, 248, .2);
    pointer-events: none;
}

.audio-trim-range::-webkit-slider-runnable-track {
    height: 6px;
    background: transparent;
}

.audio-trim-range::-webkit-slider-thumb {
    width: 16px;
    height: 22px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    background: linear-gradient(180deg, #7dd3fc, #1d4ed8);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, .12), 0 8px 18px rgba(37, 99, 235, .38);
    cursor: ew-resize;
    pointer-events: auto;
    -webkit-appearance: none;
}

.audio-trim-range::-moz-range-track {
    height: 6px;
    background: transparent;
}

.audio-trim-range::-moz-range-thumb {
    width: 16px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    background: linear-gradient(180deg, #7dd3fc, #1d4ed8);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, .12), 0 8px 18px rgba(37, 99, 235, .38);
    cursor: ew-resize;
    pointer-events: auto;
}

.audio-trim-range-start::-webkit-slider-thumb {
    background: linear-gradient(180deg, #67e8f9, #0284c7);
}

.audio-trim-range-end::-webkit-slider-thumb {
    background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.audio-trim-control strong {
    color: #dbeafe;
    font-size: 11px;
    font-weight: 680;
    text-align: center;
}

.form-tip {
    margin-top: 10px;
    padding: 9px 11px;
    border: 1px solid rgba(125, 211, 252, .2);
    border-radius: 12px;
    background: rgba(56, 213, 255, .07);
}

.character-modal-card .form-tip {
    flex: 0 0 auto;
    margin-left: 18px;
    margin-right: 18px;
}

.character-modal-card .modal-head {
    flex: 0 0 auto;
}

.character-modal-card .error {
    flex: 0 0 auto;
    margin-left: 18px;
    margin-right: 18px;
}

.modal-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    padding: 16px 18px 18px;
    border-top: 1px solid rgba(132, 177, 236, .12);
    background: rgba(3, 8, 20, .16);
}

.character-modal-card .modal-footer {
    margin-top: 18px;
}

.error {
    color: var(--danger);
    min-height: 20px;
    margin: 10px 0;
    font-size: 12px;
}

.toast {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 1200;
    transform: translateX(-50%);
    max-width: min(520px, calc(100vw - 32px));
    background: rgba(10, 18, 32, .94);
    border: 1px solid rgba(125, 211, 252, .28);
    color: #fff;
    padding: 11px 16px;
    border-radius: 999px;
    font-size: 13px;
    text-align: center;
    line-height: 1.45;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(16px) saturate(1.18);
}

.hide {
    display: none !important;
}

@media (max-width: 760px) {
    .shell {
        height: 100vh;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
    }

    .shell.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .topbar {
        grid-column: 1;
        grid-row: 1;
        flex-wrap: wrap;
        height: auto;
        gap: 12px;
        padding: 14px;
    }

    .sidebar {
        grid-column: 1;
        grid-row: 2;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 12px;
    }

    .sidebar-title {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    .nav {
        min-width: 132px;
    }

    .shell.sidebar-collapsed .nav-text,
    .shell.sidebar-collapsed .nav strong {
        display: inline-grid;
    }

    .nav-divider {
        width: 1px;
        min-width: 1px;
        height: 28px;
        margin: 0 2px;
    }

    .content {
        grid-column: 1;
        grid-row: 3;
        min-height: 0;
        padding: 16px;
    }

    .hero-panel {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
        min-height: auto;
    }

    .results-section {
        padding: 12px;
    }

    .results-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .results-actions {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .video-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .video-toolbar-group {
        align-items: flex-start;
        flex-direction: column;
    }

    .video-toolbar-row {
        width: 100%;
        flex-wrap: wrap;
    }

    .video-toolbar-batch-row {
        justify-content: flex-start;
    }

    .video-toolbar-title {
        margin-right: 0;
    }

    .video-toolbar-actions,
    .toolbar-video-settings {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .history-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .history-row-actions {
        justify-content: flex-start;
    }

    .toolbar-divider {
        width: 100%;
        height: 1px;
    }

    .shot-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "toolbar"
            "body"
            "refs";
        gap: 14px;
        padding: 13px;
    }

    .image-workspace {
        border-radius: 14px;
    }

    .image-form-column,
    .image-output-column {
        padding: 14px;
    }

    .image-form-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .image-form-head .primary {
        width: 100%;
    }

    .image-history-list {
        width: 100%;
    }

    .shot-body {
        grid-template-columns: 1fr;
        grid-template-areas:
            "content"
            "preview"
            "actions";
        height: auto;
        gap: 14px;
    }

    .shot-actions {
        height: auto;
    }

    .shot-header {
        flex: 0 0 auto;
        align-items: center;
    }

    .shot-checkbox {
        width: 18px;
        height: 18px;
    }

    .shot-number {
        flex-direction: row;
        align-items: center;
        padding-top: 0;
    }

    .shot-code-label {
        width: auto;
        min-width: 86px;
        height: 38px;
    }

    .shot-number-badge {
        width: 34px;
        height: 28px;
        border-radius: 10px;
        font-size: 13px;
    }

    .shot-meta-row {
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: stretch;
    }

    .shot-references {
        min-width: 0;
    }

    .shot-description-head {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        height: auto;
        overflow: visible;
    }

    .director-polish-btn {
        width: auto;
        min-width: 104px;
    }

    .shot-video-settings {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shot-video-settings .shot-setting-select,
    .shot-video-settings .shot-setting-select:nth-child(2),
    .shot-video-settings .shot-setting-select:nth-child(4),
    .shot-duration-control,
    .shot-audio-toggle {
        width: 100%;
    }

    .shot-duration-control input {
        width: 100%;
        min-width: 0;
    }

    .shot-description,
    .shot-description-wrap {
        height: 240px;
        min-height: 240px;
        max-height: 240px;
    }

    .video-preview-box,
    .generating-state {
        height: auto;
        min-height: 180px;
        aspect-ratio: 16 / 9;
    }

    h1 {
        font-size: 22px;
    }

    .asset-list-card {
        flex-direction: column;
        gap: 12px;
        padding: 13px;
    }

    .asset-card-left {
        width: 100%;
        gap: 10px;
    }

    .asset-card-index {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 12px;
    }

    .asset-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .asset-card-right {
        width: 100%;
        flex-basis: auto;
    }

    .asset-image-preview {
        height: 180px;
    }

    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
        gap: 12px;
    }

    .grid-card-footer {
        min-height: 54px;
        padding: 9px;
    }

    .character-grid-card.create-card::after {
        min-height: 54px;
    }

    .grid-card-actions {
        opacity: 1;
        transform: none;
    }

    .character-modal-card {
        width: min(100%, 520px);
        height: auto;
        max-height: calc(100vh - 28px);
    }

    .character-modal-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .character-modal-side {
        position: static;
    }

    .character-modal-side .character-upload-area,
    .character-modal-side .upload-placeholder,
    .character-modal-side .upload-preview {
        height: 220px;
        min-height: 220px;
        max-height: 220px;
    }

    .character-modal-side .upload-preview img {
        height: 220px;
    }

    .asset-modal-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .project-title-row {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .modal-footer-switch {
        justify-content: center;
        margin-right: 0;
    }

    .modal-footer-actions {
        width: 100%;
        flex-direction: column-reverse;
    }

    .modal-footer .primary,
    .modal-footer .ghost {
        width: 100%;
    }
}
