﻿.navtx-ai-image-entry {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 650;
    width: 104px;
    height: 104px;
    display: grid;
    place-items: center;
    border-radius: 26px;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .16);
    backdrop-filter: blur(16px);
    transition: transform .18s ease, box-shadow .18s ease;
}

.navtx-ai-image-entry:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 46px rgba(15, 23, 42, .22);
}

.navtx-ai-image-entry img {
    width: 86px;
    height: 86px;
    border-radius: 22px;
    object-fit: cover;
}

.ai-image-page {
    height: calc(100dvh - 74px);
    min-height: 680px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 22px clamp(24px, 5.6vw, 112px) 152px;
    background: #f5f6f8;
    color: #20242d;
    box-sizing: border-box;
    overflow: hidden;
}

.ai-image-page:not(.is-generating-view) {
    height: auto;
    min-height: calc(100dvh - 74px);
    overflow: visible;
}

.ai-image-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(100%, 1620px);
    margin: 0 auto 20px;
}

.ai-image-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #20242d;
}

.ai-image-brand img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
}

.ai-image-brand strong {
    font-size: 30px;
    font-weight: 500;
    letter-spacing: 0;
}

.ai-image-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ai-image-actions button {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 16px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
    color: #3d4655;
    font-size: 14px;
    cursor: pointer;
}

.ai-image-actions button.is-signed {
    color: #5f6f82;
    background: #f8fafc;
}

.ai-ico {
    width: 16px;
    height: 16px;
    display: inline-block;
    position: relative;
    flex: 0 0 auto;
    box-sizing: border-box;
    color: currentColor;
}

.ai-ico:before,
.ai-ico:after {
    content: "";
    position: absolute;
    box-sizing: border-box;
}

.ai-ico-chat {
    border: 1.7px solid currentColor;
    border-radius: 9px;
}

.ai-ico-chat:after {
    left: 3px;
    bottom: -4px;
    width: 6px;
    height: 6px;
    border-left: 1.7px solid currentColor;
    border-bottom: 1.7px solid currentColor;
    transform: rotate(-18deg);
    background: inherit;
}

.ai-ico-work,
.ai-ico-template {
    border: 1.7px solid currentColor;
    border-radius: 3px;
}

.ai-ico-work:before,
.ai-ico-template:before {
    left: 3px;
    bottom: 3px;
    width: 9px;
    height: 6px;
    border-left: 1.7px solid currentColor;
    border-bottom: 1.7px solid currentColor;
    transform: skew(-18deg);
}

.ai-ico-work:after,
.ai-ico-template:after {
    right: 3px;
    top: 3px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
}

.ai-ico-help {
    border: 1.7px solid currentColor;
    border-radius: 50%;
}

.ai-ico-help:before {
    left: 6px;
    top: 3px;
    width: 4px;
    height: 5px;
    border: 1.6px solid currentColor;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
}

.ai-ico-help:after {
    left: 7px;
    bottom: 3px;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: currentColor;
}

.ai-ico-calendar {
    border: 1.7px solid currentColor;
    border-radius: 4px;
}

.ai-ico-calendar:before {
    left: 3px;
    right: 3px;
    top: 4px;
    height: 1.7px;
    background: currentColor;
}

.ai-ico-calendar:after {
    left: 5px;
    top: -3px;
    width: 6px;
    height: 5px;
    border-left: 1.7px solid currentColor;
    border-right: 1.7px solid currentColor;
}

.ai-ico-user {
    border: 1.7px solid currentColor;
    border-radius: 50%;
}

.ai-ico-user:before {
    left: 5px;
    top: 3px;
    width: 4px;
    height: 4px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
}

.ai-ico-user:after {
    left: 3px;
    bottom: 3px;
    width: 8px;
    height: 4px;
    border: 1.5px solid currentColor;
    border-radius: 8px 8px 0 0;
    border-bottom: 0;
}

.ai-image-actions span {
    color: #9aa2ad;
    font-size: 14px;
}

.ai-image-masonry {
    width: min(100%, 1620px);
    margin: 0 auto;
    column-count: 5;
    column-gap: 18px;
    max-height: calc(100dvh - 240px);
    overflow: auto;
    padding: 2px 2px 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(132, 145, 164, .32) transparent;
}

.ai-image-page:not(.is-generating-view) .ai-image-masonry {
    max-height: none;
    overflow: visible;
}

.ai-image-template-more {
    width: min(100%, 1620px);
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px auto 0;
    color: #a0a9b5;
    font-size: 13px;
}

.ai-image-template-more.is-error {
    color: #d15c5c;
}

.ai-image-template-more.is-done {
    color: #b5bdc8;
}

.ai-image-masonry.is-loading {
    opacity: .78;
}

.ai-image-workspace[hidden],
.ai-image-template-view[hidden] {
    display: none !important;
}

.ai-image-result-head {
    margin-bottom: 14px;
}

.ai-image-stage {
    width: min(100%, 1280px);
    height: calc(100dvh - 244px);
    min-height: 420px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 26px;
    align-items: stretch;
}

.ai-image-side {
    min-height: 0;
    padding: 16px;
    border: 1px solid rgba(228, 232, 238, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .64);
    overflow: hidden;
}

.ai-image-page.is-generating-view .ai-image-stage {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 1120px);
}

.ai-image-page.is-generating-view .ai-image-side {
    display: none;
}

.ai-image-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.ai-image-side-head strong {
    color: #303744;
    font-size: 15px;
    font-weight: 500;
}

.ai-image-side-head button {
    border: 0;
    background: transparent;
    color: #9aa3ae;
    font-size: 12px;
    cursor: pointer;
}

.ai-image-side-list {
    max-height: calc(100% - 34px);
    display: grid;
    gap: 10px;
    overflow-y: auto;
}

.ai-image-side-list p {
    margin: 12px 0 0;
    color: #a0a8b3;
    font-size: 13px;
    line-height: 1.7;
}

.ai-image-side-list button {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 4px 10px;
    align-items: center;
    width: 100%;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    text-align: left;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.ai-image-side-list button:hover {
    transform: translateY(-1px);
    border-color: #dbe7f8;
    background: #fff;
}

.ai-image-side-list img {
    grid-row: 1 / span 2;
    width: 58px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.ai-image-side-list span,
.ai-image-side-list small {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ai-image-side-list span {
    color: #536071;
    font-size: 13px;
}

.ai-image-side-list small {
    color: #a3acb8;
    font-size: 12px;
}

.ai-image-conversation {
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 2px 4px 14px;
    color: #8b94a3;
    overflow: auto;
    scroll-behavior: smooth;
}

.ai-image-session-time {
    margin: 0 0 12px;
    text-align: center;
    color: #a6adb8;
    font-size: 14px;
}

.ai-image-empty-tip {
    text-align: center;
    color: #b1b8c3;
}

.ai-image-message {
    display: grid;
    gap: 16px;
    margin-bottom: 22px;
}

.ai-image-page.is-generating-view .ai-image-message {
    justify-items: center;
}

.ai-image-page.is-generating-view .ai-image-done,
.ai-image-page.is-generating-view .ai-image-thinking,
.ai-image-page.is-generating-view .ai-image-error {
    order: -1;
}

.ai-image-user-bubble {
    justify-self: end;
    max-width: min(680px, 78%);
    padding: 13px 18px;
    border-radius: 20px;
    background: #eef0f3;
    color: #727b88;
    font-size: 15px;
    line-height: 1.5;
}

.ai-image-thinking,
.ai-image-done,
.ai-image-error {
    width: min(520px, 100%);
    color: #8c95a3;
}

.ai-image-page.is-generating-view .ai-image-thinking,
.ai-image-page.is-generating-view .ai-image-done,
.ai-image-page.is-generating-view .ai-image-error {
    width: min(760px, 100%);
}

.ai-image-step-head,
.ai-image-done-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.ai-image-step-head span {
    height: 26px;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border: 1px solid #e3e8ef;
    border-radius: 13px;
    background: #fff;
    color: #7b8491;
    font-size: 12px;
}

.ai-image-thinking small,
.ai-image-done small {
    display: block;
    margin-bottom: 0;
    color: #aab1bb;
    font-size: 13px;
}

.ai-image-thinking strong {
    display: block;
    margin-bottom: 10px;
    color: #6f7886;
    font-size: 18px;
    font-weight: 500;
}

.ai-image-thinking p,
.ai-image-done p {
    margin: 5px 0;
    font-size: 14px;
}

.ai-image-loading-card {
    position: relative;
    width: min(320px, 100%);
    aspect-ratio: 1;
    margin-top: 18px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 36% 42%, rgba(145, 153, 164, .34) 0 2px, transparent 3px) 0 0 / 18px 18px,
        linear-gradient(135deg, rgba(255,255,255,.92), rgba(238,242,247,.68));
    box-shadow: 0 20px 54px rgba(90, 103, 121, .12);
    overflow: hidden;
    animation: aiPulse 1.2s ease-in-out infinite alternate;
}

.ai-image-loading-card i {
    width: 82px;
    height: 82px;
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    border: 1px solid rgba(120, 131, 145, .22);
    border-top-color: rgba(84, 103, 130, .76);
    transform: translate(-50%, -50%);
    animation: aiSpin 1.1s linear infinite;
}

@keyframes aiPulse {
    from { opacity: .48; }
    to { opacity: .9; }
}

@keyframes aiSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.ai-image-done-meta span {
    height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 14px;
    background: #eaf8f0;
    color: #16834c;
    font-size: 13px;
}

.ai-image-done-meta span:before {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: #21b66f;
}

.ai-image-done figure {
    position: relative;
    width: min(520px, 100%);
    max-height: clamp(300px, calc(100dvh - 500px), 520px);
    margin: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 16px;
    background: #e8edf4;
    box-shadow: 0 18px 50px rgba(18, 24, 35, .12);
}

.ai-image-done figure img {
    width: auto;
    max-width: 100%;
    max-height: clamp(300px, calc(100dvh - 500px), 520px);
    display: block;
    object-fit: contain;
}

.ai-image-page.is-generating-view .ai-image-done figure {
    width: min(760px, 100%);
}

.ai-image-page.is-generating-view .ai-image-done p {
    text-align: center;
    font-size: 12px;
}

.ai-image-done figcaption {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.ai-image-done figcaption a,
.ai-image-done figcaption button {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, .56);
    border-radius: 20px;
    background: rgba(255, 255, 255, .84);
    color: #2c323b;
    font-size: 14px;
    cursor: pointer;
    pointer-events: auto;
    backdrop-filter: blur(14px);
    transition: transform .2s ease, background .2s ease;
}

.ai-image-done figcaption a:hover,
.ai-image-done figcaption button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .94);
}

.ai-image-error {
    padding: 18px 22px;
    border-radius: 16px;
    background: #fff2f2;
    color: #d84444;
}

.ai-image-template-card {
    position: relative;
    width: 100%;
    display: inline-block;
    break-inside: avoid;
    min-height: 0;
    margin: 0 0 18px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    background: #e8edf4;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.ai-image-template-card img {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}

.ai-image-template-card.is-tall {
    min-height: 0;
}

.ai-image-template-card.is-tall img {
    min-height: 0;
    aspect-ratio: auto;
}

.ai-image-template-card:hover img {
    transform: scale(1.045);
}

.ai-image-template-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .58));
}

.ai-image-template-card span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 17px;
    z-index: 1;
    color: #fff;
    font-size: 15px;
    line-height: 1.4;
    text-align: left;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.ai-image-template-preview {
    position: fixed;
    inset: 0;
    z-index: 920;
    display: grid;
    place-items: center;
    padding: 24px;
}

.ai-image-template-preview[hidden] {
    display: none !important;
}

.ai-image-template-preview-bg {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 30, .46);
    backdrop-filter: blur(14px);
}

.ai-image-template-preview-card {
    position: relative;
    z-index: 1;
    width: min(380px, calc(100vw - 34px));
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 28px 80px rgba(14, 20, 30, .28);
}

.ai-image-template-preview-close {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(80, 84, 92, .72);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.ai-image-template-preview-media {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: #eef2f7;
}

.ai-image-template-preview-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ai-image-template-preview-media:after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.72));
}

.ai-image-template-preview-body {
    display: grid;
    gap: 12px;
    padding: 20px 24px 22px;
    text-align: center;
}

.ai-image-template-preview-body h3 {
    margin: 0;
    color: #232a36;
    font-size: 20px;
    font-weight: 500;
}

.ai-image-template-preview-body p {
    max-height: 88px;
    margin: 0;
    overflow: auto;
    color: #7b8493;
    font-size: 13px;
    line-height: 1.8;
}

.ai-image-template-preview-body button {
    width: 100%;
    height: 48px;
    margin-top: 4px;
    border: 0;
    border-radius: 24px;
    background: #050505;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}

.ai-image-template-preview-body button:hover {
    background: #16181d;
}

.ai-image-template-preview-body button:active {
    transform: translateY(1px);
}

.ai-image-composer {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 740;
    width: min(1090px, calc(100vw - 60px));
    min-height: 118px;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 9px;
    padding: 18px 68px 18px 22px;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 28px;
    background:
        radial-gradient(circle at 78% 20%, rgba(235, 224, 188, .5), transparent 34%),
        linear-gradient(120deg, rgba(255, 255, 255, .9), rgba(234, 243, 255, .82), rgba(246, 238, 226, .82));
    box-shadow: 0 20px 54px rgba(36, 47, 66, .20), inset 0 1px 0 rgba(255, 255, 255, .76);
    backdrop-filter: blur(28px) saturate(120%);
    transform: translateX(-50%);
}

.ai-image-composer textarea {
    width: 100%;
    height: 38px;
    min-height: 38px;
    max-height: 74px;
    resize: none;
    border: 0;
    outline: 0;
    background: transparent;
    color: #303745;
    font-size: 16px;
    line-height: 1.6;
}

.ai-image-storage-note {
    margin: -5px 0 0;
    color: #a0a8b4;
    font-size: 12px;
    line-height: 1.3;
}

.ai-image-composer-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ai-image-reference-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
}

.ai-image-reference-list span {
    height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 210px;
    padding: 0 9px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .74);
    color: #707a88;
    font-size: 12px;
}

.ai-image-reference-list i {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #e8f1ff;
    color: #3386ff;
    font-style: normal;
}

.ai-image-reference-list button {
    border: 0;
    background: transparent;
    color: #9aa3ad;
    cursor: pointer;
}

.ai-image-composer-tools button:not(.ai-image-submit),
.ai-image-composer-tools em {
    height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border: 1px solid rgba(224, 230, 238, .78);
    border-radius: 18px;
    background: rgba(255, 255, 255, .76);
    color: #5f6674;
    font-size: 13px;
    font-style: normal;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.ai-image-submit {
    position: absolute;
    right: 18px;
    top: 50%;
    margin-left: 0;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #91a96f, #c0caa4);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: 0 10px 24px rgba(126, 147, 96, .28);
    transition: transform .18s ease, box-shadow .18s ease;
}

.ai-image-submit:hover {
    transform: translateY(-50%) translateY(-1px);
    box-shadow: 0 14px 30px rgba(126, 147, 96, .34);
}

.ai-image-submit:active {
    transform: translateY(-50%) scale(.97);
}

.ai-image-composer.is-loading .ai-image-submit {
    opacity: .75;
    pointer-events: none;
}

.ai-image-result {
    position: fixed;
    right: 28px;
    bottom: 164px;
    z-index: 745;
    width: min(420px, calc(100vw - 40px));
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(15, 23, 42, .18);
}

.ai-image-result img {
    width: 100%;
    border-radius: 14px;
    display: block;
}

.ai-image-result p {
    margin: 10px 0 0;
    color: #566174;
    font-size: 13px;
}

.ai-image-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, .52);
}

.ai-image-ratio-pop {
    position: fixed;
    inset: 0;
    z-index: 910;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(0, 0, 0, .36);
    backdrop-filter: blur(8px);
}

.ai-image-ratio-pop[hidden] {
    display: none !important;
}

.ai-image-ratio-panel {
    position: relative;
    width: min(430px, 100%);
    padding: 18px 20px 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 70px rgba(20, 27, 38, .28);
}

.ai-image-ratio-panel h3 {
    margin: 0 0 18px;
    text-align: center;
    color: #737b88;
    font-size: 18px;
    font-weight: 500;
}

.ai-image-ratio-panel p {
    margin: 0 0 12px;
    color: #9aa2ad;
    font-size: 13px;
}

.ai-image-ratio-close {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #b1b7c0;
    font-size: 26px;
    cursor: pointer;
}

.ai-image-ratio-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ai-image-ratio-grid button {
    min-height: 40px;
    border: 1px solid #e4e8ee;
    border-radius: 12px;
    background: #fff;
    color: #7b8490;
    cursor: pointer;
}

.ai-image-ratio-grid button.is-active {
    border-color: #9dccff;
    background: #eef7ff;
    color: #3a8cff;
}

.ai-image-ratio-grid strong,
.ai-image-ratio-grid span {
    display: block;
    line-height: 1.15;
}

.ai-image-ratio-grid strong {
    font-size: 14px;
    font-weight: 500;
}

.ai-image-ratio-grid span {
    font-size: 12px;
}

.ai-image-ratio-current {
    display: flex;
    justify-content: space-between;
    margin: 28px 14px 30px;
    color: #8d95a0;
    font-size: 14px;
}

.ai-image-ratio-current strong {
    font-weight: 500;
}

.ai-image-ratio-confirm {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 22px;
    background: #050505;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}

.ai-image-modal.is-open {
    display: flex;
}

.ai-image-dialog {
    position: relative;
    width: min(920px, 100%);
    min-height: 300px;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 26px 80px rgba(0, 0, 0, .34);
}

.ai-image-dialog[data-ai-dialog-type="checkin"] {
    width: min(380px, calc(100vw - 28px));
    min-height: 0;
    border-radius: 10px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .24);
}

.ai-image-close {
    position: absolute;
    right: 12px;
    top: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .88);
    font-size: 28px;
    cursor: pointer;
}

.ai-image-dialog-head {
    height: 128px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: #fff;
    background: linear-gradient(135deg, #4dbdff, #2f8ff0);
}

.ai-image-dialog-head.is-orange {
    background: linear-gradient(135deg, #ffad59, #ff7035);
}

.ai-image-dialog-head.is-light {
    color: #1684ff;
    background: radial-gradient(circle at 94% 0, rgba(197, 231, 255, .82) 0 22%, transparent 23%),
        radial-gradient(circle at 0 100%, rgba(194, 232, 255, .66) 0 46%, transparent 47%),
        linear-gradient(135deg, #eef8ff, #d8eeff);
}

.ai-image-dialog-head i {
    width: 26px;
    height: 26px;
    font-style: normal;
}

.ai-image-dialog-head strong {
    font-size: 18px;
    font-weight: 500;
}

.ai-image-dialog-body {
    padding: 26px 32px 34px;
    color: #606775;
    font-size: 15px;
    line-height: 2;
}

.ai-image-dialog[data-ai-dialog-type="checkin"] .ai-image-dialog-head {
    height: 116px;
    gap: 8px;
}

.ai-image-dialog[data-ai-dialog-type="checkin"] .ai-image-close {
    color: #63adff;
}

.ai-image-dialog[data-ai-dialog-type="checkin"] .ai-image-dialog-head i {
    width: 28px;
    height: 28px;
}

.ai-image-dialog[data-ai-dialog-type="checkin"] .ai-image-dialog-head strong {
    font-size: 16px;
}

.ai-image-dialog[data-ai-dialog-type="checkin"] .ai-image-dialog-body {
    padding: 16px 14px 18px;
    line-height: 1.45;
}

.ai-image-login-tip {
    display: grid;
    justify-items: start;
    gap: 10px;
    line-height: 1.7;
}

.ai-image-login-tip strong {
    color: #334155;
    font-size: 17px;
    font-weight: 500;
}

.ai-image-login-tip p {
    margin: 0;
    color: #748094;
}

.ai-image-login-tip a {
    height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0 18px;
    border-radius: 18px;
    color: #fff;
    background: #2f8ff0;
}

.ai-checkin-panel {
    display: grid;
    gap: 14px;
    line-height: 1.45;
}

.ai-checkin-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #697386;
    font-size: 13px;
}

.ai-checkin-user span,
.ai-checkin-user em {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-style: normal;
}

.ai-checkin-user i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #55d6a7, #6aa8ff);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .72);
}

.ai-checkin-user b {
    color: #3c8cff;
}

.ai-checkin-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ai-checkin-stats div {
    min-height: 66px;
    padding: 12px;
    border-radius: 9px;
    background: #f7f7f8;
    box-sizing: border-box;
}

.ai-checkin-stats small,
.ai-checkin-stats em {
    display: block;
    color: #9aa4b2;
    font-size: 13px;
    font-style: normal;
}

.ai-checkin-stats strong {
    margin-right: 5px;
    color: #4c5667;
    font-size: 22px;
    font-weight: 500;
}

.ai-checkin-today {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(52, 98, 155, .06);
}

.ai-checkin-today strong,
.ai-checkin-week strong {
    display: block;
    color: #657184;
    font-size: 14px;
    font-weight: 500;
}

.ai-checkin-today em {
    display: block;
    margin-top: 4px;
    color: #4d8cff;
    font-size: 13px;
    font-style: normal;
}

.ai-checkin-today button {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 17px;
    background: #eaf4ff;
    color: #318cff;
    cursor: pointer;
}

.ai-checkin-today button:disabled {
    background: #f3f8ff;
    color: #4b91ff;
    cursor: default;
}

.ai-checkin-week {
    display: grid;
    gap: 10px;
}

.ai-checkin-week > div {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}

.ai-checkin-week span {
    min-width: 0;
    min-height: 72px;
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 7px 2px 6px;
    border-radius: 6px;
    background: #eaf8ee;
    color: #2eaa57;
    font-size: 11px;
    box-sizing: border-box;
}

.ai-checkin-week span:nth-child(n+2) {
    background: #eef9ee;
}

.ai-checkin-week span:nth-child(n+3) {
    background: #f8eafb;
    color: #d948d7;
}

.ai-checkin-week span.is-active {
    box-shadow: inset 0 0 0 2px rgba(67, 144, 255, .28);
}

.ai-checkin-week b,
.ai-checkin-week em,
.ai-checkin-week small {
    line-height: 1;
    font-style: normal;
}

.ai-checkin-week b:before {
    content: "绉?;
    margin-right: 2px;
}

.ai-checkin-week em:before {
    content: "缁?;
    margin-right: 2px;
}

.ai-image-record-list {
    display: grid;
    gap: 12px;
}

.ai-image-record-item {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #edf1f5;
    border-radius: 10px;
}

.ai-image-record-item button {
    border: 0;
    background: transparent;
    color: #8b95a3;
    cursor: pointer;
}

.ai-image-record-item img {
    width: 60px;
    height: 60px;
    border-radius: 9px;
    object-fit: cover;
}

.ai-image-record-item strong,
.ai-image-record-item span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ai-image-work-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.ai-image-work-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 16px;
}

.ai-image-work-card {
    border: 0;
    padding: 0;
    background: transparent;
    color: #606b7b;
    text-align: left;
    cursor: pointer;
}

.ai-image-work-card span {
    display: block;
    margin-top: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media (max-width: 1100px) {
    .ai-image-masonry {
        column-count: 3;
    }
}

@media (max-width: 760px) {
    .navtx-ai-image-entry {
        width: 56px;
        height: 56px;
        left: 14px;
        bottom: 84px;
        border-radius: 16px;
    }

    .navtx-ai-image-entry img {
        width: 42px;
        height: 42px;
    }

    .ai-image-page {
        width: auto;
        height: auto;
        min-height: calc(100dvh - 64px);
        margin-left: 0;
        padding: 20px 14px 170px;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .ai-image-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 18px;
    }

    .ai-image-brand strong {
        font-size: 24px;
    }

    .ai-image-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .ai-image-actions button {
        height: 34px;
        padding: 0 10px;
        font-size: 12px;
    }

    .ai-image-conversation {
        height: auto;
        min-height: 420px;
        padding-bottom: 12px;
        overflow: visible;
    }

    .ai-image-stage {
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ai-image-side {
        order: 2;
        padding: 12px;
        border-radius: 16px;
    }

    .ai-image-page.is-generating-view .ai-image-side {
        display: none;
    }

    .ai-image-side-list {
        max-height: 168px;
        grid-auto-flow: column;
        grid-auto-columns: 168px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .ai-image-side-list button {
        grid-template-columns: 56px minmax(0, 1fr);
        min-width: 168px;
    }

    .ai-image-session-time {
        margin-bottom: 36px;
    }

    .ai-image-user-bubble {
        max-width: 78%;
        font-size: 14px;
    }

    .ai-image-thinking,
    .ai-image-done,
    .ai-image-error {
        width: 100%;
    }

    .ai-image-done > em {
        margin: 0 0 12px;
    }

    .ai-image-done figure,
    .ai-image-done figure img {
        max-height: 42dvh;
    }

    .ai-image-loading-card {
        width: 100%;
    }

    .ai-image-masonry {
        column-count: 2;
        column-gap: 10px;
        max-height: none;
        overflow: visible;
    }

    .ai-image-template-card {
        margin-bottom: 10px;
        border-radius: 16px;
    }

    .ai-image-template-card img,
    .ai-image-template-card.is-tall img {
        min-height: 0;
        aspect-ratio: auto;
    }

    .ai-image-template-card.is-tall {
        min-height: 0;
    }

    .ai-image-template-preview {
        padding: 16px;
    }

    .ai-image-template-preview-card {
        width: min(360px, calc(100vw - 28px));
        border-radius: 22px;
    }

    .ai-image-template-preview-media {
        height: 210px;
    }

    .ai-image-template-preview-body {
        padding: 18px 20px 20px;
    }

    .ai-image-template-preview-body h3 {
        font-size: 18px;
    }

    .ai-image-composer {
        width: calc(100vw - 22px);
        bottom: 12px;
        min-height: 128px;
        padding: 14px 58px 14px 14px;
        border-radius: 22px;
    }

    .ai-image-storage-note {
        font-size: 11px;
    }

    .ai-image-composer-tools {
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .ai-image-composer-tools button:not(.ai-image-submit),
    .ai-image-composer-tools em {
        flex: 0 0 auto;
        height: 32px;
        padding: 0 10px;
        font-size: 12px;
    }

    .ai-image-submit {
        position: absolute;
        right: 12px;
        top: 50%;
        flex: 0 0 40px;
        width: 42px;
        height: 42px;
    }

    .ai-image-reference-list {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .ai-image-result {
        left: 14px;
        right: 14px;
        bottom: 158px;
        width: auto;
    }

    .ai-image-dialog {
        max-height: calc(100dvh - 36px);
        overflow-y: auto;
    }

    .ai-image-modal {
        padding: 14px;
    }

    .ai-image-dialog[data-ai-dialog-type="checkin"] {
        width: min(380px, 100%);
    }

    .ai-image-dialog[data-ai-dialog-type="checkin"] .ai-image-dialog-head {
        height: 112px;
    }

    .ai-image-dialog[data-ai-dialog-type="checkin"] .ai-image-dialog-body {
        padding: 14px 12px 16px;
    }

    .ai-checkin-panel {
        gap: 12px;
    }

    .ai-checkin-user {
        font-size: 12px;
    }

    .ai-checkin-stats div {
        min-height: 64px;
        padding: 10px;
    }

    .ai-checkin-stats strong {
        font-size: 20px;
    }

    .ai-checkin-today {
        align-items: flex-start;
        padding: 12px;
    }

    .ai-checkin-today button {
        height: 32px;
        padding: 0 12px;
        font-size: 12px;
    }

    .ai-checkin-week > div {
        gap: 4px;
    }

    .ai-checkin-week span {
        min-height: 66px;
        padding: 6px 1px 5px;
        font-size: 10px;
    }

    .ai-image-work-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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