
.account-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.account-tabs button {
    color: #245fae;
    background: #f4f8ff;
    border: 1px solid #d4e4fb;
    box-shadow: none;
}

.account-tabs button.is-active {
    color: #fff;
    background: var(--primary);
}

.account-panel form {
    display: grid;
    gap: 10px;
}

.account-panel label {
    display: grid;
    gap: 5px;
    color: #31425a;
    font-weight: 750;
}

.account-panel input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 11px;
}

.account-message {
    margin: 0 0 12px;
    padding: 9px 10px;
    border-radius: var(--radius);
    color: #0f6b4d;
    background: #eafaf3;
    border: 1px solid #bfead8;
    font-weight: 700;
}

.account-message.is-error {
    color: #a82432;
    background: #fff0f2;
    border-color: #ffd0d6;
}

.account-divider {
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 800;
}

.account-divider::before,
.account-divider::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: var(--border);
}

.google-login-slot {
    min-height: 42px;
    display: grid;
    justify-items: center;
}

.profile-main {
    width: min(100%, 1240px);
    margin: 0 auto;
    padding: 18px;
    display: grid;
    gap: 16px;
}

.profile-alert {
    padding: 10px 12px;
    border-radius: var(--radius);
    color: #0f6b4d;
    background: #eafaf3;
    border: 1px solid #bfead8;
    font-weight: 750;
}

.profile-alert.error {
    color: #a82432;
    background: #fff0f2;
    border-color: #ffd0d6;
}

.profile-alert.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease;
}

.profile-hero {
    padding: 18px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.profile-avatar-large {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #256fd9, #13a67a);
    font-size: 34px;
    font-weight: 850;
}

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

.profile-hero h1 {
    margin: 0 0 4px;
    font-family: var(--font-heading);
    font-size: 1.45rem;
}

.profile-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 0 0 4px;
}

.profile-name-row h1 {
    margin: 0;
}

.profile-name-row .profile-package-badge {
    padding: 4px 10px;
    border: 1px solid rgba(210, 42, 42, .28);
    border-radius: 999px;
    color: #d22a2a;
    background: #fff1f1;
    font-size: .86rem;
    font-weight: 850;
    line-height: 1.2;
}

.profile-hero p,
.profile-hero span,
.profile-section-head p {
    margin: 0;
    color: var(--muted);
}

.profile-logout-form {
    margin: 0;
}

.profile-tabs {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-tabs a {
    min-height: 42px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #245fae;
    background: #f5f9ff;
    border: 1px solid rgba(37, 111, 217, .18);
    border-radius: var(--radius);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 850;
}

.profile-tabs a.is-active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.profile-tab-panel[hidden] {
    display: none !important;
}

.profile-account-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.profile-card,
.profile-frames-section {
    padding: 18px;
}

.profile-card h2,
.profile-frames-section h2 {
    margin: 0 0 12px;
    font-family: var(--font-heading);
    font-size: 1.08rem;
}

.profile-card form,
.profile-frame-form {
    display: grid;
    gap: 10px;
}

.profile-inline-upload {
    grid-template-columns: minmax(170px, 1fr) minmax(150px, .8fr) minmax(190px, 1fr) 86px auto;
    align-items: end;
}

.profile-card label,
.profile-frame-form label {
    display: grid;
    gap: 5px;
    color: #31425a;
    font-weight: 750;
}

.profile-card input,
.profile-card textarea,
.profile-frame-form input,
.profile-frame-form textarea,
.profile-frame-form select {
    width: 100%;
    padding: 9px 11px;
}

.profile-section-head {
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.profile-section-head > span {
    color: #245fae;
    font-weight: 850;
}

.profile-frame-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-frame-card {
    min-width: 0;
    padding: 10px;
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    grid-template-areas:
        "thumb content"
        "actions content";
    align-items: start;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-muted);
}

.profile-frame-card.is-focused {
    border-color: rgba(37, 111, 217, .72);
    background: #f3f8ff;
    box-shadow: 0 0 0 3px rgba(37, 111, 217, .16), 0 18px 36px rgba(18, 35, 57, .12);
}

.profile-frame-content {
    grid-area: content;
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 8px;
}

.profile-frame-thumb {
    grid-area: thumb;
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid #d9e3ee;
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.profile-frame-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.profile-detail-open {
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.profile-detail-open:hover,
.profile-detail-open:focus-visible {
    border-color: rgba(37, 111, 217, .48);
    box-shadow: 0 12px 26px rgba(18, 35, 57, .12);
    outline: none;
    transform: translateY(-1px);
}

.profile-frame-thumb .profile-use-badge,
.profile-frame-thumb .profile-download-badge,
.profile-frame-thumb > span:not(.profile-download-badge):not(.profile-use-badge) {
    position: absolute;
    left: 6px;
    bottom: 6px;
    padding: 3px 6px;
    border-radius: 999px;
    color: #fff;
    background: rgba(18, 35, 57, .72);
    font-size: 11px;
    font-weight: 850;
}

.profile-frame-thumb .profile-download-badge {
    left: auto;
    right: 6px;
}

.profile-frame-meta {
    display: grid;
    align-content: start;
    gap: 5px;
}

.profile-frame-meta strong,
.profile-frame-meta small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-frame-meta small,
.profile-stat-row span {
    color: var(--muted);
}

.profile-stat-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-copy-link,
.profile-share-link,
.profile-download-link,
.profile-edit-actions button {
    min-height: 32px;
    padding: 6px 9px;
    font-size: .84rem;
}

.profile-share-link {
    color: #245fae;
    background: #edf5ff;
    box-shadow: none;
}

.profile-download-link {
    width: 34px;
    min-width: 34px;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(26, 176, 119, .22);
    border-radius: var(--radius);
    color: #0f7b59;
    background: #eafaf3;
    text-decoration: none;
    box-shadow: none;
}

.profile-download-link:hover {
    color: #fff;
    background: var(--success);
}

.profile-download-link svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-delete-form {
    display: none;
}

.profile-danger {
    width: 100%;
    background: var(--danger);
}

.profile-frame-form {
    margin-top: -2px;
    gap: 7px;
}

.profile-frame-form label {
    gap: 4px;
    font-size: .92rem;
}

.profile-frame-form input,
.profile-frame-form textarea,
.profile-frame-form select {
    min-height: 36px;
    padding: 7px 9px;
    font-size: .92rem;
}

.profile-frame-form textarea {
    min-height: 58px;
}

.profile-edit-actions {
    grid-area: actions;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-self: start;
}

.profile-frame-file-picker {
    position: relative;
    min-height: 44px;
    padding: 7px 10px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px !important;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: #31425a;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
}

.profile-frame-file-picker:hover,
.profile-frame-file-picker:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 111, 217, .12);
}

.profile-frame-file-picker input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.profile-frame-file-picker > span {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.1;
}

.profile-frame-file-picker > strong {
    min-width: 0;
    overflow: hidden;
    color: #245fae;
    font-size: .92rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-frame-file-preview {
    position: relative;
    width: 78px;
    height: 78px;
    padding: 4px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.profile-frame-file-preview[hidden] {
    display: none !important;
}

.profile-frame-file-preview img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

.profile-frame-file-preview span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.profile-qr-thumb {
    background:
        linear-gradient(90deg, rgba(37,111,217,.08) 1px, transparent 1px),
        linear-gradient(rgba(37,111,217,.08) 1px, transparent 1px),
        #fff;
    background-size: 20px 20px;
}

.profile-detail-lock {
    overflow: hidden;
}

.profile-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    padding: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 22, 36, .52);
    backdrop-filter: blur(6px);
}

.profile-detail-modal.is-open {
    display: flex;
}

.profile-detail-dialog {
    position: relative;
    width: min(820px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 18px;
    overflow: auto;
    border: 1px solid rgba(217, 227, 238, .95);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(18, 35, 57, .28);
}

.profile-detail-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 34px;
    min-height: 34px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    background: #fff;
    box-shadow: none;
}

.profile-detail-media {
    position: relative;
    min-height: 260px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(37,111,217,.06) 1px, transparent 1px),
        linear-gradient(rgba(37,111,217,.06) 1px, transparent 1px),
        #fff;
    background-size: 18px 18px;
}

.profile-detail-media img {
    width: 100%;
    height: 100%;
    max-height: 340px;
    display: block;
    object-fit: contain;
}

.profile-detail-media span {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff;
    background: rgba(18, 35, 57, .76);
    font-size: .78rem;
    font-weight: 850;
}

.profile-detail-body {
    min-width: 0;
    padding: 8px 34px 8px 0;
    display: grid;
    align-content: start;
    gap: 12px;
}

.profile-detail-body > p:first-child {
    margin: 0;
    color: #245fae;
    font-size: .82rem;
    font-weight: 850;
    text-transform: uppercase;
}

.profile-detail-body h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.32rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.profile-detail-body > p:not(:first-child) {
    margin: 0;
    color: var(--muted);
    font-weight: 750;
}

.profile-detail-created {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-muted);
}

.profile-detail-created span,
.profile-detail-note span,
.profile-detail-stat span,
.profile-detail-stat small {
    color: var(--muted);
}

.profile-detail-created strong {
    color: var(--text);
    font-size: .96rem;
    text-align: right;
}

.profile-detail-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-detail-stat {
    min-width: 0;
    padding: 12px;
    display: grid;
    gap: 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

.profile-detail-stat strong {
    color: var(--text);
    font-size: 1.45rem;
    line-height: 1;
}

.profile-detail-stat span,
.profile-detail-stat small {
    min-width: 0;
    font-size: .82rem;
    line-height: 1.2;
}

.profile-detail-note {
    padding: 12px;
    display: grid;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-muted);
}

.profile-detail-note span {
    font-size: .82rem;
    font-weight: 850;
}

.profile-detail-note p {
    margin: 0;
    max-height: 120px;
    overflow: auto;
    color: var(--text);
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.profile-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 28px;
    color: var(--muted);
    text-align: center;
    font-weight: 750;
}

.profile-pagination {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.profile-pagination a {
    min-width: 36px;
    min-height: 36px;
    padding: 7px 10px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: #245fae;
    background: #fff;
    text-decoration: none;
    font-weight: 850;
}

.profile-pagination a.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.container {
    width: min(100%, 1520px);
    min-height: calc(100vh - var(--header-height));
    margin: 0 auto;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.home-workspace {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(480px, 1.16fr) minmax(380px, .84fr);
    align-items: start;
    gap: 16px;
}

.app-panel,
.left,
.right,
.resize-panel,
.cartoon-panel {
    border: 1px solid rgba(217, 228, 240, .94);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.left,
.right,
.resize-panel {
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 18px;
}

.left {
    grid-column: 1;
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.recommended-frame-strip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 122px;
    padding: 10px 12px;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(circle at 8% 20%, rgba(255, 216, 142, .24), transparent 32%),
        linear-gradient(135deg, rgba(255,255,255,.78), rgba(239,246,255,.66));
}

.recommended-frame-copy h3 {
    margin: 0;
    color: #1858b5;
    font-size: calc(var(--font-size-heading) + 3px);
    line-height: 1.18;
}

.recommended-frame-window {
    min-width: 0;
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
}

.recommended-frame-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 40px) / 5);
    align-items: center;
    gap: 10px;
    transition: transform .22s ease;
    will-change: transform;
}

.recommended-frame-list .frame-item {
    min-height: 0;
    min-width: 0;
    padding: 4px;
}

.recommended-frame-list .frame-thumb {
    border-radius: 8px;
}

.recommended-frame-controls {
    position: absolute;
    inset-block: 0;
    inset-inline: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 2px;
}

.recommended-frame-nav {
    width: 22px;
    height: 22px;
    border: 1px solid rgba(37, 111, 217, .26);
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    color: #256fd9;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(37, 111, 217, .14);
    pointer-events: auto;
    cursor: pointer;
}

.recommended-frame-nav:disabled {
    opacity: .38;
    cursor: default;
    box-shadow: none;
}

.right {
    grid-column: 1;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.68)),
        url('../img/center-bg.jpg') center / cover;
}

.resize-panel {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.home-quick-access {
    width: 100%;
    margin-top: 2px;
}

.home-quick-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.home-quick-access-item {
    min-width: 0;
    min-height: 72px;
    padding: 10px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 9px;
    border: 1px solid #dbe6f3;
    border-radius: 10px;
    color: #1c3554;
    background: linear-gradient(180deg, #fff, #f7faff);
    text-align: left;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(36, 72, 114, .06);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.home-quick-access-item:hover,
.home-quick-access-item:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(37, 111, 217, .55);
    color: #1858b5;
    box-shadow: 0 10px 22px rgba(37, 111, 217, .13);
    outline: none;
}

.home-quick-access-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(37, 111, 217, .14);
    border-radius: 10px;
    color: #256fd9;
    background: #edf5ff;
}

.home-quick-access-icon svg,
.home-quick-access-empty svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-quick-access-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.home-quick-access-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.home-quick-access-label {
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    display: -webkit-box;
    overflow: hidden;
    color: inherit;
    font-size: .86rem;
    font-weight: 800;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-quick-access-copy small {
    overflow: hidden;
    color: #78899f;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-quick-access-arrow {
    color: #8fa4bf;
    font-size: 1.25rem;
    line-height: 1;
    transition: transform .16s ease, color .16s ease;
}

.home-quick-access-item:hover .home-quick-access-arrow,
.home-quick-access-item:focus-visible .home-quick-access-arrow {
    color: #256fd9;
    transform: translateX(2px);
}

.home-quick-access-empty {
    min-height: 190px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px dashed #c9d9ec;
    border-radius: 10px;
    color: #60738d;
    background: #f8fbff;
    text-align: center;
}

.home-quick-access-empty > span {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #256fd9;
    background: #eaf3ff;
}

.home-quick-access-empty strong {
    color: #24364d;
}

.home-quick-access-empty small {
    max-width: 300px;
    line-height: 1.45;
}

.cartoon-panel,
.home-feature-panel {
    width: 100%;
    min-width: 0;
    margin: 18px 0 0;
    padding: 16px;
}

.cartoon-panel {
    background: #fffaf3;
    box-shadow: none;
    border-color: #f4dfc5;
}

.home-latest-frame-panel {
    display: grid;
    gap: 12px;
    border: 1px solid #d9e7f7;
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.92)),
        radial-gradient(circle at 12% 0%, rgba(37, 111, 217, .12), transparent 36%);
    box-shadow: none;
}

.home-latest-frame-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cartoon-panel h3 {
    color: var(--warning);
}

.home-latest-frame-head h3 {
    margin: 0;
    color: #1858b5;
}

.home-latest-frame-head a {
    min-height: 34px;
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9e7f7;
    border-radius: 8px;
    color: var(--primary);
    background: #fff;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

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

.home-latest-frame-grid .frame-item {
    min-height: 0;
}

.home-latest-frame-grid .frame-thumb {
    border-radius: 9px;
}

.home-latest-frame-note,
.home-latest-frame-empty {
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.45;
}

.home-latest-frame-empty {
    padding: 14px;
    border: 1px dashed #c9dbef;
    border-radius: 10px;
    background: #fff;
    font-weight: 800;
}

.home-media-feature-panel {
    display: grid;
    gap: 12px;
    border: 1px solid #f0ddc3;
    border-radius: var(--radius);
    background: #fffaf3;
    box-shadow: none;
}

.home-media-feature-panel h3 {
    margin: 0;
    color: var(--warning);
}

.home-feature-media-stage {
    width: 100%;
    max-height: 560px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid rgba(244, 223, 197, .95);
    border-radius: 10px;
    background: #fff;
}

.home-feature-media-stage img,
.home-feature-media-stage video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.home-feature-video-trigger {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #eef5ff, #fff7ec);
    cursor: pointer;
}

.home-feature-video-trigger img {
    transition: transform .18s ease, filter .18s ease;
}

.home-feature-video-trigger:hover img,
.home-feature-video-trigger:focus-visible img {
    transform: scale(1.025);
    filter: saturate(1.05);
}

.home-feature-video-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 18px;
    color: #2f4b72;
    font-weight: 900;
    text-align: center;
}

.home-feature-play-badge {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 62px;
    height: 62px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 111, 217, .92);
    color: #fff;
    box-shadow: 0 16px 35px rgba(20, 57, 104, .28);
}

.home-feature-play-badge svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.home-feature-video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(13, 28, 48, .72);
    backdrop-filter: blur(8px);
}

.home-feature-video-modal.is-open {
    display: grid;
}

.home-feature-video-dialog {
    position: relative;
    width: min(960px, 100%);
    max-height: calc(100vh - 48px);
    padding: 16px;
    display: grid;
    gap: 12px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(9, 22, 42, .3);
}

.home-feature-video-dialog h3 {
    margin: 0;
    padding-right: 48px;
    color: #173d73;
}

.home-feature-video-dialog video {
    width: 100%;
    max-height: calc(100vh - 150px);
    display: block;
    border-radius: 10px;
    background: #050b14;
}

.home-feature-video-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid #d9e7f7;
    border-radius: 10px;
    background: #fff;
    color: #203753;
}

.home-feature-video-close svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    stroke-width: 2.4;
    fill: none;
}

#photoUploadForm,
#frameUploadForm,
#resizeUploadForm,
#cartoonUploadForm {
    display: grid;
    gap: 10px;
}

.cartoon-controls,
.cartoon-field {
    display: grid;
    gap: 6px;
}

.cartoon-output-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 10px;
    align-items: end;
}

.cartoon-style-options {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.cartoon-style-options legend {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    color: #405168;
    font-size: .86rem;
    font-weight: 750;
}

.cartoon-style-options label {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.cartoon-style-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cartoon-style-options span {
    min-height: 40px;
    border: 1px solid #dce7f4;
    border-radius: 8px;
    display: grid;
    place-items: center;
    padding: 8px 6px;
    background: #fff;
    color: #31435b;
    font-size: .92rem;
    font-weight: 800;
    text-align: center;
    transition: border-color .16s ease, box-shadow .16s ease, color .16s ease, background .16s ease;
}

.cartoon-style-options input:checked + span {
    border-color: var(--primary);
    background: #eef5ff;
    color: var(--primary);
    box-shadow: 0 0 0 3px rgba(58, 112, 215, .13);
}

.cartoon-style-options input:focus-visible + span {
    outline: 2px solid rgba(58, 112, 215, .55);
    outline-offset: 2px;
}

.cartoon-field > span {
    color: #405168;
    font-size: .86rem;
    font-weight: 750;
}

.cartoon-field > span b {
    float: right;
    color: var(--primary);
    font-weight: 800;
}

.cartoon-field select,
.cartoon-field input[type="number"] {
    width: 100%;
}

.cartoon-field input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.cartoon-field input[type="range"]:disabled {
    cursor: not-allowed;
    opacity: .52;
}
