:root[data-theme] .ah-shell .pc-layout {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
}

:root[data-theme] .ah-shell .pc-form {
    display: grid;
    gap: 22px;
    margin: 0;
    padding: 24px;
    background: var(--ah-surface);
    border: 1px solid var(--ah-line);
    border-radius: var(--ah-radius-card);
    box-shadow: none;
}

:root[data-theme] .ah-shell .pc-form .photo-generator-content,
:root[data-theme] .ah-shell .pc-form .photo-generator-content.is-hidden {
    display: block !important;
    padding: 0;
    margin: 0;
    background: none;
    border: 0;
}

:root[data-theme] .ah-shell .pc-form .photo-generator-body,
:root[data-theme] .ah-shell .pc-form .photo-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
    background: none;
    border: 0;
    box-shadow: none;
}

.ah-status[hidden] {
    display: none;
}

:root[data-theme] .ah-shell .pc-form .photo-model-select-hidden {
    display: none !important;
}

.pc-model {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--ah-line);
    border-radius: 16px;
    background: var(--ah-surface);
}

.pc-model-thumb {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ah-deep);
    color: #fff;
    font: 600 24px/1 var(--ah-font-display);
}

:root[data-theme] .ah-shell .pc-model-thumb .photo-model-card-media {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    margin: 0;
    border-radius: 0;
}

:root[data-theme] .ah-shell .pc-model-thumb .model-cover-blank span {
    font-size: 24px;
}

:root[data-theme] .ah-shell .pc-model-thumb img {
    position: static;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
    filter: none;
    transform: none;
}

.pc-model-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

:root[data-theme] .ah-shell .pc-model-name {
    font: 800 15px/1.25 var(--ah-font-ui);
    color: var(--ah-ink);
}

.pc-model-name.is-recommended::after {
    content: attr(data-badge);
    display: inline-block;
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(11, 107, 96, 0.1);
    color: var(--ah-success);
    font: 700 11px/1.2 var(--ah-font-ui);
    vertical-align: 2px;
}

.pc-model-desc {
    font: 500 12px/1.4 var(--ah-font-ui);
    color: var(--ah-muted);
}

.pc-model-desc:empty {
    display: none;
}

:root[data-theme] .ah-shell .pc-model-change,
:root[data-theme] .ah-shell .pc-model-change.is-hidden {
    display: inline-flex !important;
    min-height: 38px;
    padding: 0 16px;
}

.pc-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font: 500 12px/1.4 var(--ah-font-ui);
    color: var(--ah-muted);
}

.pc-quick:empty {
    display: none;
}

:root[data-theme] .ah-shell .ah-linkbtn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ah-accent);
    font: 700 12px/1.4 var(--ah-font-ui);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    box-shadow: none;
}

:root[data-theme] .ah-shell .pc-modes {
    display: grid;
    margin: 0;
}

:root[data-theme] .ah-shell .pc-modes .photo-model-variant {
    min-height: 38px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ah-muted);
    font: 600 13px/1.1 var(--ah-font-ui);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

:root[data-theme] .ah-shell .pc-modes .photo-model-variant.is-active {
    background: var(--ah-surface);
    color: var(--ah-ink);
    box-shadow: 0 1px 2px rgba(21, 24, 51, 0.08), 0 2px 8px rgba(21, 24, 51, 0.06);
}

:root[data-theme] .ah-shell .pc-form .photo-prompt-field {
    padding: 12px 14px 10px;
}

:root[data-theme] .ah-shell .pc-form .photo-prompt-field .photo-ai-prompt-btn {
    position: static;
    inset: auto;
    transform: none;
}

:root[data-theme] .ah-shell .pc-form .photo-prompt-field textarea {
    min-height: 88px;
}

:root[data-theme] .ah-shell .pc-form .photo-prompt-tools:not(:has(:not(.hidden))) {
    display: none;
}

:root[data-theme] .ah-shell .pc-form .photo-form-row {
    display: grid;
    gap: 16px;
    margin: 0;
}

:root[data-theme] .ah-shell .pc-form .photo-model-functions {
    padding: 0;
    margin: 0;
    background: none;
    border: 0;
    box-shadow: none;
}

:root[data-theme] .ah-shell .pc-form .photo-model-functions.hidden {
    display: none;
}

:root[data-theme] .ah-shell .pc-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 18px 16px;
}

:root[data-theme] .ah-shell .pc-inputs .pc-field-wide {
    grid-column: 1 / -1;
}

:root[data-theme] .ah-shell .pc-form .photo-form-field {
    display: grid;
    gap: 10px;
    min-width: 0;
    margin: 0;
}

:root[data-theme] .ah-shell .pc-form .settings-label,
:root[data-theme] .ah-shell .pc-form .photo-boolean-label {
    margin: 0;
    font: 700 13px/1.2 var(--ah-font-ui);
    color: var(--ah-ink-2);
    text-transform: none;
    letter-spacing: 0;
}

:root[data-theme] .ah-shell .pc-form .photo-field-hint,
:root[data-theme] .ah-shell .pc-form .photo-upload-hint {
    font: 500 12px/1.4 var(--ah-font-ui);
    color: var(--ah-muted);
}

:root[data-theme] .ah-shell .pc-form .photo-form-field select,
:root[data-theme] .ah-shell .pc-form .photo-form-field input[type="text"],
:root[data-theme] .ah-shell .pc-form .photo-form-field input[type="number"] {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font: 600 14px/1 var(--ah-font-ui);
}

:root[data-theme] .ah-shell .pc-form .photo-form-field select {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151833' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

:root[data-theme] .ah-shell .pc-form select.pc-ratio-source {
    display: none;
}

.pc-ratios {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

:root[data-theme] .ah-shell .pc-ratio {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 6px;
    min-width: 64px;
    min-height: 64px;
    padding: 8px 10px;
    border: 1px solid var(--ah-line);
    border-radius: 12px;
    background: var(--ah-surface);
    color: var(--ah-ink);
    font: 700 12px/1 var(--ah-font-ui);
    cursor: pointer;
    box-shadow: none;
}

:root[data-theme] .ah-shell .pc-ratio:hover {
    border-color: var(--ah-accent);
}

:root[data-theme] .ah-shell .pc-ratio.is-active {
    border-color: var(--ah-accent);
    background: var(--ah-accent-soft);
    color: var(--ah-accent);
}

.pc-ratio-shape {
    display: block;
    border: 2px solid currentColor;
    border-radius: 3px;
    opacity: 0.75;
}

:root[data-theme] .ah-shell .pc-form .photo-option-buttons {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 2px;
    padding: 4px;
    border-radius: var(--ah-radius-control);
    background: var(--ah-sunken);
}

:root[data-theme] .ah-shell .pc-form .photo-option-btn {
    min-height: 36px;
    padding: 0 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ah-muted);
    font: 600 13px/1 var(--ah-font-ui);
    box-shadow: none;
    white-space: nowrap;
}

:root[data-theme] .ah-shell .pc-form .photo-option-btn.is-active {
    background: var(--ah-surface);
    color: var(--ah-ink);
    box-shadow: 0 1px 2px rgba(21, 24, 51, 0.08), 0 2px 8px rgba(21, 24, 51, 0.06);
}

:root[data-theme] .ah-shell .pc-form .photo-boolean-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}

:root[data-theme] .ah-shell .pc-form .photo-boolean-checkbox {
    order: -1;
    width: 20px;
    height: 20px;
    accent-color: var(--ah-accent);
}

:root[data-theme] .ah-shell .pc-form .photo-upload {
    display: grid;
    gap: 10px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}

:root[data-theme] .ah-shell .pc-form .photo-upload-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

:root[data-theme] .ah-shell .pc-form .photo-upload-clear {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ah-muted);
    font: 600 12px/1 var(--ah-font-ui);
    cursor: pointer;
    box-shadow: none;
}

:root[data-theme] .ah-shell .pc-form .photo-upload-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

:root[data-theme] .ah-shell .pc-form .photo-upload-list:empty {
    display: none;
}

:root[data-theme] .ah-shell .pc-form .photo-upload-list img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
}

:root[data-theme] .ah-shell .pc-form .photo-upload-add {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 12px 16px;
    border: 1.5px dashed var(--ah-line-strong);
    border-radius: 14px;
    background: var(--ah-soft);
    color: var(--ah-muted);
    font: 600 13px/1.3 var(--ah-font-ui);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

:root[data-theme] .ah-shell .pc-form .photo-upload-add:hover {
    border-color: var(--ah-accent);
    color: var(--ah-accent);
}

:root[data-theme] .ah-shell .pc-form .photo-upload-add input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

:root[data-theme] .ah-shell .pc-form .photo-upload-add span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

:root[data-theme] .ah-shell .pc-form .photo-upload-add .ah-ico {
    width: 18px;
    height: 18px;
}

:root[data-theme] .ah-shell .pc-form .ah-submitbar :is(#photoGenerateBtn, #videoGenerateBtn) {
    display: inline-flex !important;
    justify-content: center !important;
    width: auto;
    min-width: 168px;
    margin: 0;
}

:root[data-theme] .ah-shell .pc-form .ah-submitbar :is(#photoGenerateBtn, #videoGenerateBtn) .ah-price {
    margin-left: 4px;
}

:root[data-theme] .ah-shell .pc-form .photo-status:empty {
    display: none;
}

:root[data-theme] .ah-shell .pc-form .photo-status {
    margin: 0;
    font: 600 13px/1.4 var(--ah-font-ui);
    color: var(--ah-muted);
}

.pc-side {
    display: grid;
    gap: 20px;
    min-width: 0;
    position: sticky;
    top: 132px;
}

:root[data-theme] .ah-shell .pc-result {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 20px;
    background: var(--ah-surface);
    border: 1px solid var(--ah-line);
    border-radius: var(--ah-radius-card);
    box-shadow: none;
}

:root[data-theme] .ah-shell .pc-result .pc-result-head {
    margin: 0;
}

:root[data-theme] .ah-shell .pc-result :is(#photoBackToFormBtn, #videoBackToFormBtn) {
    display: none !important;
}

.pc-stage {
    position: relative;
    display: grid;
    min-height: 300px;
    border-radius: 16px;
    background: var(--ah-soft);
    overflow: hidden;
}

.pc-stage > .photo-result {
    align-self: center;
    width: 100%;
}

.pc-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.pc-result-actions[hidden] {
    display: none;
}

.pc-result-actions .ah-btn {
    gap: 6px;
}

.pc-result-actions .ah-ico {
    width: 15px;
    height: 15px;
}

:root[data-theme] .ah-shell .pc-result-actions .pc-result-accent {
    color: var(--ah-accent);
}

:is(#photoResult, #videoResult) :is([data-photo-generated="1"], [data-video-generated="1"]) :is(.song-actions, .song-info, .photo-result-carousel-title, .photo-result-carousel-sub) {
    display: none !important;
}

:is(#photoResult, #videoResult) :is([data-photo-generated="1"], [data-video-generated="1"]) .song-card {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

:is(#photoResult, #videoResult) :is([data-photo-generated="1"], [data-video-generated="1"]) .song-cover {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    max-height: none !important;
    aspect-ratio: auto !important;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;
}

#photoResult [data-photo-generated="1"] .song-cover img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(560px, 70vh);
    object-fit: contain;
    cursor: zoom-in;
}

.pc-stage-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 24px;
    border: 1.5px dashed var(--ah-line-strong);
    border-radius: 16px;
    color: var(--ah-muted);
    font: 600 14px/1.4 var(--ah-font-ui);
    text-align: center;
}

.pc-stage-empty[hidden] {
    display: none;
}

:root[data-theme] .ah-shell .pc-stage-empty.has-example {
    position: relative;
    align-items: flex-end;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--ah-line);
    background: var(--ah-deep);
}

.pc-stage-empty.has-example > :is(img, video) {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-stage-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(21, 24, 51, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.pc-stage-note {
    position: relative;
    width: 100%;
    padding: 36px 16px 14px;
    background: linear-gradient(180deg, transparent, rgba(21, 24, 51, 0.78));
    color: #fff;
}

:root[data-theme] .ah-shell .vc-stage-empty.has-example {
    justify-content: flex-end;
    gap: 0;
}

.pc-stage-empty.has-example .vc-play {
    display: none;
}

.pc-stage-empty.has-example > video {
    cursor: pointer;
}

.pc-stage-empty.has-example:has(> img) {
    cursor: zoom-in;
}

.pc-stage-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(12, 14, 32, 0.62);
    color: #fff;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, background-color 0.15s ease, transform 0.15s ease;
}

.pc-stage-empty:not(.is-playing) .pc-stage-play:hover {
    background: rgba(12, 14, 32, 0.8);
    transform: translate(-50%, -50%) scale(1.05);
}

.pc-stage-play svg {
    width: 26px;
    height: 26px;
}

.pc-stage-empty.is-playing .pc-stage-play {
    top: 10px;
    left: auto;
    right: 10px;
    width: 40px;
    height: 40px;
    transform: none;
}

.pc-stage-empty.is-playing .pc-stage-play svg {
    width: 18px;
    height: 18px;
}

:root[data-theme] .ah-shell .pc-stage .photo-result {
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
}

:root[data-theme] .ah-shell .pc-stage .photo-result:empty,
:root[data-theme] .ah-shell .pc-stage .photo-model-example-card {
    display: none;
}

:root[data-theme] .ah-shell .pc-stage .photo-result img {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
}

:root[data-theme] .ah-shell .pc-stage .photo-generate-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 245, 250, 0.92);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

:root[data-theme] .ah-shell .pc-stage .photo-generate-overlay.is-hidden {
    display: none;
}

:root[data-theme] .ah-shell .pc-stage .photo-generate-card {
    width: min(280px, 90%);
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    color: var(--ah-ink);
    text-align: center;
}

:root[data-theme] .ah-shell .pc-stage .photo-generate-title {
    color: var(--ah-ink);
    font: 800 15px/1.3 var(--ah-font-ui);
}

:root[data-theme] .ah-shell .pc-stage .photo-generate-subtitle {
    color: var(--ah-muted);
    font: 500 13px/1.4 var(--ah-font-ui);
}

:root[data-theme] .ah-shell .pc-stage .photo-generate-progress {
    height: 6px;
    margin-top: 14px;
    border-radius: 3px;
    background: var(--ah-line);
    overflow: hidden;
}

:root[data-theme] .ah-shell .pc-stage .photo-generate-progress-bar {
    height: 100%;
    background: var(--ah-accent);
}

:root[data-theme] .ah-shell .pc-stage .photo-generate-spinner {
    border-color: rgba(75, 59, 214, 0.18);
    border-top-color: var(--ah-accent);
}

.pc-mine {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.pc-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

:root[data-theme] .ah-shell .pc-tile {
    position: relative;
    display: block;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, hsl(var(--thumb-h, 245) 45% 62%), hsl(calc(var(--thumb-h, 245) + 40) 50% 38%));
    cursor: pointer;
    box-shadow: none;
}

.pc-tile.is-skeleton {
    background: linear-gradient(90deg, var(--ah-sunken) 0%, var(--ah-soft) 50%, var(--ah-sunken) 100%);
    background-size: 200% 100%;
    animation: ah-shimmer 1.2s linear infinite;
}

.pc-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pc-tile-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 8px 6px;
    background: linear-gradient(180deg, rgba(21, 24, 51, 0) 0%, rgba(21, 24, 51, 0.7) 100%);
    color: #fff;
    font: 700 11px/1.2 var(--ah-font-ui);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pc-grid-empty {
    grid-column: 1 / -1;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) {
    display: none;
}

:root[data-theme] .ah-shell.pc-picker-open :is(#photoModelPicker, #videoModelPicker) {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 24px;
    background: rgba(21, 24, 51, 0.55);
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.ah-shell.pc-picker-open {
    overflow: hidden;
}

.ah-modal-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(1040px, 100%);
    max-height: min(820px, calc(100vh - 48px));
    background: var(--ah-surface);
    border: 1px solid var(--ah-line);
    border-radius: var(--ah-radius-card);
    box-shadow: 0 24px 60px rgba(21, 24, 51, 0.22);
    overflow: hidden;
}

:root[data-theme] .ah-shell .ah-modal-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ah-line);
}

:root[data-theme] .ah-shell .ah-modal-head h2 {
    margin: 0;
    color: var(--ah-ink);
    font: 600 20px/1.2 var(--ah-font-display);
}

.pc-picker-search {
    max-width: 360px;
    justify-self: end;
    width: 100%;
}

:root[data-theme] .ah-shell #pcPickerClose {
    width: 40px;
    height: 40px;
    font-size: 22px;
    line-height: 1;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-picker-body {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 20px 24px 24px;
    overflow: auto;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-filter-list {
    display: contents;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 10px 12px;
    text-align: left;
    color: var(--ah-ink);
    cursor: pointer;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-card.is-current {
    border-color: var(--ah-accent);
    box-shadow: 0 0 0 3px rgba(75, 59, 214, 0.15);
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-card-media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    margin: 0;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-card-title {
    margin: 2px 0 0;
    color: var(--ah-ink);
    font: 800 14px/1.25 var(--ah-font-ui);
}

.pc-card-desc {
    min-height: 30px;
    font: 500 12px/1.3 var(--ah-font-ui);
    color: var(--ah-muted);
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-tag {
    padding: 4px 8px;
    border: 0;
    border-radius: 999px;
    background: var(--ah-sunken);
    color: var(--ah-ink-2);
    font: 700 10px/1 var(--ah-font-ui);
    text-transform: none;
    letter-spacing: 0;
}

.pc-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--ah-line);
    font: 600 12px/1 var(--ah-font-ui);
    color: var(--ah-muted);
}

.pc-card-foot strong {
    color: var(--ah-ink);
    font-weight: 800;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-picker-body {
    grid-template-columns: minmax(0, 1fr);
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-filter-panel,
:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-filter-list {
    flex-direction: row;
    border: 0;
    background: none;
    padding: 0;
    box-shadow: none !important;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-filter-btn,
:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) :is(#photoModelFilterClear, #videoModelFilterClear) {
    width: auto;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid var(--ah-line);
    border-radius: var(--ah-radius-chip);
    background: var(--ah-surface);
    color: var(--ah-ink);
    font: 600 13px/1 var(--ah-font-ui);
    box-shadow: none;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-filter-btn.is-active,
:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) :is(#photoModelFilterClear, #videoModelFilterClear).is-active {
    background: var(--ah-accent);
    border-color: var(--ah-accent);
    color: #fff;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) :is(#photoModelGrid, #videoModelGrid) .photo-model-card,
:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) :is(#photoModelGrid, #videoModelGrid) .photo-model-card:focus,
:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) :is(#photoModelGrid, #videoModelGrid) .photo-model-card:active {
    min-height: 0 !important;
    justify-content: flex-start;
    background: var(--ah-surface) !important;
    border: 1px solid var(--ah-line) !important;
    box-shadow: none !important;
    isolation: auto;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) :is(#photoModelGrid, #videoModelGrid) .photo-model-card:hover {
    background: var(--ah-surface) !important;
    border-color: var(--ah-accent) !important;
    box-shadow: none !important;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) :is(#photoModelGrid, #videoModelGrid) .photo-model-card.is-current {
    border-color: var(--ah-accent) !important;
    box-shadow: 0 0 0 3px rgba(75, 59, 214, 0.15) !important;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-card-media {
    position: relative;
    inset: auto;
    z-index: 0;
    flex: none;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker, .pc-model-thumb) .photo-model-card-media::after,
:root[data-theme] .ah-shell :is(.pc-form, .sidebar-panel)::before {
    content: none;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-card-media.model-cover-blank {
    display: flex;
    align-items: center;
    justify-content: center;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-card-media.model-cover-blank span {
    position: static;
    font-size: 34px;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-filter-btn[data-filter] {
    background: var(--ah-surface) !important;
    border-color: var(--ah-line) !important;
    color: var(--ah-ink) !important;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-filter-btn[data-filter].is-active {
    background: var(--ah-accent) !important;
    border-color: var(--ah-accent) !important;
    color: #fff !important;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-card .photo-model-card-title {
    text-shadow: none;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-tag {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

:root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-empty {
    grid-column: 1 / -1;
    padding: 32px;
    color: var(--ah-muted);
    text-align: center;
}

.vc-tasks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

:root[data-theme] .ah-shell .vc-task {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 10px;
    min-height: 76px;
    padding: 14px;
    border: 1px solid var(--ah-line);
    border-radius: 14px;
    background: var(--ah-surface);
    color: var(--ah-ink);
    font: 700 13px/1.25 var(--ah-font-ui);
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

:root[data-theme] .ah-shell .vc-task:hover {
    border-color: var(--ah-accent);
}

:root[data-theme] .ah-shell .vc-task.is-active {
    border: 2px solid var(--ah-accent);
    padding: 13px;
    background: var(--ah-accent-soft);
}

.vc-task .ah-ico {
    width: 18px;
    height: 18px;
    color: var(--ah-ink);
}

.vc-model {
    grid-template-columns: 64px minmax(0, 1fr) minmax(0, 240px);
    grid-template-areas:
        "thumb main version"
        "change change version";
    row-gap: 12px;
}

.vc-model:not(.has-version) {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-areas:
        "thumb main"
        "change change";
}

.vc-range-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.vc-range-value {
    color: var(--ah-ink);
    font-weight: 700;
}

.vc-model .pc-model-thumb { grid-area: thumb; }
.vc-model .pc-model-main { grid-area: main; }

.vc-version {
    grid-area: version;
    display: grid;
    gap: 6px;
    align-self: start;
    min-width: 0;
}

.vc-version[hidden] {
    display: none;
}

:root[data-theme] .ah-shell .vc-version .ah-select {
    height: 42px;
    font-size: 13px;
}

:root[data-theme] .ah-shell .vc-model .pc-model-change {
    grid-area: change;
    justify-self: start;
}

:root[data-theme] .ah-shell .pc-form .photo-form.vc-flow {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px 16px;
}

:root[data-theme] .ah-shell .vc-flow > * {
    grid-column: 1 / -1;
}

:root[data-theme] .ah-shell .vc-flow .vc-inputs-wrap,
:root[data-theme] .ah-shell .vc-flow .vc-inputs,
:root[data-theme] .ah-shell .vc-flow .vc-size {
    display: contents;
}

:root[data-theme] .ah-shell .vc-flow .vc-inputs-wrap.hidden,
:root[data-theme] .ah-shell .vc-flow .vc-size.hidden {
    display: none;
}

:root[data-theme] .ah-shell .vc-flow .photo-form-field {
    grid-column: 1 / -1;
    order: 5;
}

.vc-frames-title { order: 1; }
:root[data-theme] .ah-shell .vc-flow .pc-field-upload { order: 2; grid-column: span 3; }
:root[data-theme] .ah-shell .vc-flow .pc-field-upload.pc-field-media,
:root[data-theme] .ah-shell .vc-flow .pc-field-upload.pc-field-solo { grid-column: 1 / -1; }
.vc-prompt { order: 3; }
:root[data-theme] .ah-shell .vc-flow .vc-size .photo-form-field { order: 4; }
:root[data-theme] .ah-shell .vc-flow .pc-field-options { grid-column: span 3; }
:root[data-theme] .ah-shell .vc-flow .pc-field-bool { order: 6; }
.vc-pro-toggle { order: 7; }
:root[data-theme] .ah-shell .vc-flow .vc-pro { order: 8; display: none; }
:root[data-theme] .ah-shell .vc-form.is-pro-open .vc-flow .vc-pro { display: grid; }
.vc-submit { order: 9; }
.vc-status,
.vc-open-result { order: 10; }

.vc-frames-title[hidden],
.vc-pro-toggle[hidden] {
    display: none;
}

:root[data-theme] .ah-shell .vc-flow .pc-field-upload .photo-upload-add {
    min-height: 96px;
}

:root[data-theme] .ah-shell .vc-flow .pc-field-bool .photo-boolean-row {
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid var(--ah-line);
    border-radius: 14px;
}

:root[data-theme] .ah-shell .vc-flow input[type="range"] {
    width: 100%;
    accent-color: var(--ah-accent);
}

:root[data-theme] .ah-shell .vc-pro-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 16px 0 0;
    border: 0;
    border-top: 1px solid var(--ah-line);
    border-radius: 0;
    background: none;
    color: var(--ah-ink);
    font: 700 14px/1.3 var(--ah-font-ui);
    text-align: left;
    cursor: pointer;
    box-shadow: none;
}

.vc-pro-toggle::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid var(--ah-ink);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    transition: transform 0.15s ease;
}

.vc-pro-toggle[aria-expanded="true"]::before {
    transform: rotate(90deg);
}

.vc-stage {
    justify-items: center;
    background: none;
}

.vc-stage-empty {
    flex-direction: column;
    gap: 14px;
    width: min(240px, 100%);
    aspect-ratio: 9 / 16;
    min-height: 0;
    border: 0;
    background: var(--ah-deep);
    color: rgba(255, 255, 255, 0.72);
}

.vc-play {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23151833'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") no-repeat 55% center / 22px;
}

:root[data-theme] .ah-shell .vc-stage .photo-result video {
    display: block;
    max-width: 100%;
    max-height: 520px;
    margin: 0 auto;
    border-radius: 12px;
    background: #000;
}

.vc-list {
    display: grid;
    gap: 6px;
}

.vc-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 8px;
    border-radius: 14px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.vc-row:hover,
.vc-row:focus-visible {
    background: var(--ah-soft);
    outline: none;
}

.vc-row.is-busy {
    background: var(--ah-accent-soft);
    cursor: default;
}

.vc-row.is-skeleton {
    background: linear-gradient(90deg, var(--ah-sunken) 0%, var(--ah-soft) 50%, var(--ah-sunken) 100%);
    background-size: 200% 100%;
    animation: ah-shimmer 1.2s linear infinite;
}

.vc-row-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, hsl(var(--thumb-h, 245) 40% 46%), hsl(calc(var(--thumb-h, 245) + 40) 45% 30%));
    color: rgba(255, 255, 255, 0.85);
}

.vc-row-thumb .ah-ico {
    width: 18px;
    height: 18px;
}

.vc-row-thumb--busy {
    background: var(--ah-tint-3);
    position: relative;
}

.vc-row-thumb--busy::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid rgba(75, 59, 214, 0.25);
    border-top-color: var(--ah-accent);
    border-radius: 50%;
    animation: ah-spin 0.9s linear infinite;
}

.vc-row-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.vc-row-title {
    font: 700 14px/1.25 var(--ah-font-ui);
    color: var(--ah-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vc-row-meta {
    font: 500 12px/1.3 var(--ah-font-ui);
    color: var(--ah-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vc-row-meta .ah-status {
    margin-right: 6px;
}

.vc-row-sub {
    font: 500 12px/1.3 var(--ah-font-ui);
    color: var(--ah-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

.vc-row.is-failed {
    background: var(--ah-danger-soft);
    cursor: default;
}

.vc-row.is-failed .vc-row-title {
    color: var(--ah-danger, #D33A3A);
}

.vc-row.is-failed .vc-row-meta {
    color: var(--ah-danger, #D33A3A);
    white-space: normal;
    overflow: visible;
}

.vc-row.is-failed .ah-linkbtn {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.vc-row-thumb--failed {
    background: var(--ah-danger-soft-2);
    color: var(--ah-danger, #D33A3A);
}

.vc-row.is-failed .ah-icon-btn {
    color: var(--ah-muted);
}

.pc-task-notes {
    display: grid;
    grid-column: 1 / -1;
    gap: 8px;
}

:root[data-theme] .ah-shell .photo-error-overlay {
    background: rgba(21, 24, 51, 0.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

:root[data-theme] .ah-shell .photo-error-card {
    width: min(420px, calc(100vw - 32px));
    padding: 24px;
    background: var(--ah-surface);
    color: var(--ah-ink);
    border: 1px solid var(--ah-line);
    border-radius: var(--ah-radius-card);
    box-shadow: 0 24px 60px rgba(21, 24, 51, 0.22);
    text-align: left;
}

:root[data-theme] .ah-shell .photo-error-title {
    color: var(--ah-danger);
    font: 600 18px/1.25 var(--ah-font-display);
}

:root[data-theme] .ah-shell .photo-error-message,
:root[data-theme] .ah-shell .photo-error-hints {
    color: var(--ah-muted);
    font: 500 14px/1.5 var(--ah-font-ui);
}

:root[data-theme] .ah-shell .photo-error-hints-title {
    color: var(--ah-ink);
    font-weight: 700;
}

:root[data-theme] .ah-shell .photo-error-close-btn {
    width: 100%;
    min-height: 46px;
    margin-top: 16px;
    border: 0;
    border-radius: var(--ah-radius-control);
    background: var(--ah-accent);
    color: #fff;
    font: 800 14px/1 var(--ah-font-ui);
}

@media (max-width: 1100px) {
    :root[data-theme] .ah-shell .pc-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .pc-side {
        position: static;
    }

    :root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    :root[data-theme] .ah-shell .pc-form,
    :root[data-theme] .ah-shell .pc-result,
    .pc-mine {
        padding: 16px;
    }

    .pc-model {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .pc-model-thumb {
        width: 52px;
        height: 52px;
    }

    :root[data-theme] .ah-shell .pc-model-change {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .pc-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vc-tasks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vc-task:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .vc-model {
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-areas:
            "thumb main"
            "version version"
            "change change";
    }

    :root[data-theme] .ah-shell .vc-model .pc-model-change {
        justify-self: stretch;
    }

    :root[data-theme] .ah-shell .vc-flow .pc-field-upload,
    :root[data-theme] .ah-shell .vc-flow .pc-field-options {
        grid-column: 1 / -1;
    }

    .pc-stage,
    .pc-stage-empty {
        min-height: 220px;
    }

    :root[data-theme] .ah-shell.pc-picker-open :is(#photoModelPicker, #videoModelPicker) {
        align-items: stretch;
        padding: 0;
    }

    .ah-modal-card {
        max-height: none;
        height: 100%;
        border-radius: 0;
    }

    :root[data-theme] .ah-shell .ah-modal-head {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 16px;
    }

    .pc-picker-search {
        grid-column: 1 / -1;
        grid-row: 2;
        max-width: none;
    }

    :root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-picker-body {
        padding: 16px;
    }

    :root[data-theme] .ah-shell .ah-modal-head h2 {
        font-size: 18px;
    }

    :root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-filter-panel {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    :root[data-theme] .ah-shell :is(#photoModelPicker, #videoModelPicker) .photo-model-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    :root[data-theme] .ah-shell .pc-form .ah-submitbar {
        flex-direction: column;
        align-items: stretch;
    }

    :root[data-theme] .ah-shell .pc-form .ah-submitbar :is(#photoGenerateBtn, #videoGenerateBtn) {
        width: 100%;
    }
}

:root[data-theme] .ah-shell .pc-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--ah-sunken);
    color: var(--ah-muted);
    font: 700 11px/1 var(--ah-font-ui);
    cursor: help;
    vertical-align: middle;
}

:root[data-theme] .ah-shell .pc-tip::before {
    content: '';
    position: absolute;
    inset: -13px;
}

:root[data-theme] .ah-shell .pc-tip::after {
    content: attr(data-tip);
    position: absolute;
    z-index: 30;
    left: 50%;
    bottom: calc(100% + 8px);
    width: max-content;
    max-width: min(280px, 70vw);
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--ah-ink);
    color: var(--ah-surface);
    font: 500 12px/1.4 var(--ah-font-ui);
    text-align: left;
    white-space: normal;
    box-shadow: var(--ah-shadow);
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

:root[data-theme] .ah-shell .pc-tip:hover,
:root[data-theme] .ah-shell .pc-tip:focus-visible,
:root[data-theme] .ah-shell .pc-tip.is-open {
    background: var(--ah-accent-soft);
    color: var(--ah-accent);
    outline: none;
}

:root[data-theme] .ah-shell .pc-tip:hover::after,
:root[data-theme] .ah-shell .pc-tip:focus-visible::after,
:root[data-theme] .ah-shell .pc-tip.is-open::after {
    opacity: 1;
}

.pc-viewer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    background: rgba(12, 14, 32, 0.92);
}

.pc-viewer[hidden] {
    display: none;
}

body.pc-viewer-open {
    overflow: hidden;
}

.pc-viewer-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding: 24px;
    pointer-events: none;
}

.pc-viewer-media > :is(img, video) {
    max-width: 100%;
    max-height: calc(100vh - 48px);
    border-radius: 12px;
    object-fit: contain;
    pointer-events: auto;
}

.pc-viewer-media.is-video {
    position: relative;
}

.pc-viewer-media.is-video video {
    cursor: pointer;
}

.pc-viewer-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(12, 14, 32, 0.62);
    color: #fff;
    cursor: pointer;
    pointer-events: auto;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.pc-viewer-play:hover {
    background: rgba(12, 14, 32, 0.78);
    transform: translate(-50%, -50%) scale(1.05);
}

.pc-viewer-play svg {
    width: 30px;
    height: 30px;
    margin-left: 3px;
}

.pc-viewer-media.is-playing .pc-viewer-play {
    opacity: 0;
    pointer-events: none;
}

.pc-viewer-missing {
    padding: 40px 24px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.72);
}

.pc-viewer-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    padding: 20px;
    overflow-y: auto;
    background: var(--ah-surface);
    color: var(--ah-ink);
}

.pc-viewer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pc-viewer-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ah-muted);
}

.pc-viewer-prompt {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.pc-viewer-meta {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px 0;
    border-top: 1px solid var(--ah-line);
    border-bottom: 1px solid var(--ah-line);
}

.pc-viewer-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.pc-viewer-meta dt {
    color: var(--ah-muted);
}

.pc-viewer-meta dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.pc-viewer-actions {
    display: grid;
    gap: 8px;
}

.pc-viewer-actions .ah-btn {
    justify-content: center;
    width: 100%;
    min-height: 44px;
}

@media (max-width: 760px) {
    .pc-viewer {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .pc-viewer-media {
        padding: 12px;
    }

    .pc-viewer-media > :is(img, video) {
        max-height: 100%;
    }

    .pc-viewer-side {
        max-height: 55vh;
        padding: 16px;
        border-radius: 16px 16px 0 0;
    }
}

.vc-input-hint {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ah-muted);
}

.has-duration-btns .vc-range-value {
    display: none;
}

.vc-duration-btns {
    display: flex;
    flex-wrap: wrap;
}

.vc-duration-btns.is-presets {
    margin-top: 10px;
}

.vc-duration-btns.is-presets .photo-option-btn {
    min-width: 56px;
}

.vc-pro-toggle[hidden] {
    display: none !important;
}

.pc-mine-picker {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(12, 14, 32, 0.6);
}

.pc-mine-picker[hidden] {
    display: none;
}

.pc-mine-picker-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(720px, 100%);
    max-height: min(640px, 100%);
    padding: 20px;
    border-radius: 16px;
    background: var(--ah-surface);
    overflow: hidden;
}

.pc-mine-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 17px;
}

.pc-mine-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
}

:root[data-theme] .ah-shell .pc-mine-picker-grid .pc-tile {
    height: auto;
}

:root[data-theme] .ah-shell .pc-mine-picker-grid .pc-tile.is-broken {
    display: none;
}

.pc-mine-picker-grid .pc-tile.is-busy {
    opacity: 0.5;
    pointer-events: none;
}

.pc-mine-picker-grid .pc-grid-empty {
    grid-column: 1 / -1;
}

.photo-upload-head .pc-from-mine {
    margin-left: auto;
    margin-right: 10px;
}

@media (max-width: 760px) {
    .pc-mine-picker {
        align-items: flex-end;
        padding: 0;
    }

    .pc-mine-picker-box {
        max-height: 80vh;
        border-radius: 16px 16px 0 0;
    }

    .pc-mine-picker-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
