:root {
    color-scheme: light;
    font-family: Arial, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    background: #fff;
    color: #101014;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    overflow: hidden;
    background: #fff;
}

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

button {
    cursor: pointer;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    transition: grid-template-columns 180ms ease;
}

.sidebar-backdrop {
    display: none;
}

.shell.sidebar-collapsed {
    grid-template-columns: 56px minmax(0, 1fr);
}

.sidebar {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100vh;
    min-width: 0;
    padding: 14px 10px 12px;
    overflow: hidden;
    border-right: 1px solid #e8e8eb;
    background: #f7f7f8;
}

.sidebar-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 16px;
}

.logo-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid #e0e0e3;
    border-radius: 11px;
    background: #fff;
    color: #101014;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.logo-mark svg {
    width: 20px;
    height: 20px;
    display: block;
}

.icon-only {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #111;
}

.icon-only:hover,
.feature-item:hover {
    background: #eeeeef;
}

.collapse-btn {
    transition: background 140ms ease, opacity 140ms ease;
}

.collapse-icon {
    width: 15px;
    height: 15px;
    display: block;
    border: 1.5px solid #111;
    border-radius: 3px;
    position: relative;
}

.collapse-icon::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 5px;
    width: 1.5px;
    background: #111;
}

.primary-feature-nav {
    display: grid;
    align-content: start;
    gap: 9px;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 4px 12px 0;
}

.primary-feature-nav::-webkit-scrollbar,
.chat-panel::-webkit-scrollbar {
    width: 8px;
}

.primary-feature-nav::-webkit-scrollbar-thumb,
.chat-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #d0d0d3;
}

.feature-group {
    min-width: 0;
    border-radius: 14px;
}

.chat-actions {
    display: grid;
    gap: 6px;
    margin-bottom: 2px;
}

.chat-action-btn {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 11px;
    padding: 8px 10px;
    background: transparent;
    color: #111;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
}

.chat-action-btn:hover {
    background: #eeeeef;
}

.chat-action-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    background: #f3f3f5;
    color: #111;
}

.chat-action-icon svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}

.search-overlay {
    position: fixed;
    z-index: 60;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.45);
}

.search-dialog {
    width: min(680px, calc(100vw - 48px));
    height: min(442px, calc(100vh - 92px));
    display: grid;
    grid-template-rows: 72px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #d7d7db;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 26px 78px rgba(0, 0, 0, 0.18);
}

.search-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #ececef;
    padding: 0 16px 0 22px;
}

.search-head input {
    width: 100%;
    height: 48px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111;
    font-size: 16px;
}

.search-head input::placeholder {
    color: #8c8c91;
}

.search-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8c8c91;
    font-size: 26px;
    line-height: 1;
}

.search-close:hover {
    background: #f3f3f4;
    color: #111;
}

.search-results {
    min-height: 0;
    overflow-y: auto;
    padding: 8px;
}

.search-result-row {
    width: 100%;
    min-height: 44px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    background: transparent;
    color: #111;
    text-align: left;
}

.search-result-row:hover,
.search-new-chat {
    background: #f4f4f5;
}

.search-result-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: #111;
}

.search-result-icon svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.search-result-row strong,
.search-result-row small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-row strong {
    font-size: 14px;
    font-weight: 700;
}

.search-result-row small {
    margin-top: 2px;
    color: #7c7c82;
    font-size: 12px;
}

.search-empty {
    padding: 18px 14px;
    color: #8c8c91;
    font-size: 14px;
}

.feature-group summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: #111;
    cursor: pointer;
    list-style: none;
    font-size: 14px;
    font-weight: 800;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.feature-group summary::-webkit-details-marker {
    display: none;
}

.feature-group summary:hover,
.feature-group[open] summary {
    background: #fff;
    border-color: #ececef;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.feature-group summary::after {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    margin-left: auto;
    border-right: 1.5px solid #8a8a90;
    border-bottom: 1.5px solid #8a8a90;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 160ms ease;
}

.feature-group:not([open]) summary::after {
    transform: rotate(-45deg);
}

.group-index {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    background: #f3f3f5;
    color: #111;
}

.group-index svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}

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

.feature-list {
    display: grid;
    gap: 2px;
    padding: 7px 0 8px;
}

.feature-item {
    width: calc(100% - 18px);
    margin-inline: auto;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #111;
    text-align: left;
    font-size: 14px;
    overflow: hidden;
    white-space: nowrap;
    transition: background 140ms ease;
}

.feature-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.feature-item.active {
    background: #e9e9ec;
    font-weight: 800;
}

.standalone-feature {
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    gap: 10px;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-weight: 800;
    text-align: left;
}

.standalone-feature:hover,
.standalone-feature.active {
    background: #fff;
    border-color: #ececef;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.account-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    margin-top: 10px;
    padding: 13px;
    border: 1px solid #e5e5e8;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
}

.account-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.account-head strong {
    display: block;
    overflow: hidden;
    color: #111;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-head small {
    display: block;
    margin-top: 2px;
    color: #7b7b82;
    font-size: 12px;
}

.avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #111, #3a3a3d);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.license-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.license-form input {
    width: 100%;
    min-width: 0;
    height: 38px;
    border: 1px solid #e1e1e4;
    border-radius: 13px;
    padding: 0 12px;
    background: #f7f7f8;
    color: #111;
    outline: 0;
    font-size: 13px;
}

.license-form input:focus {
    border-color: #111;
    background: #fff;
}

.license-form button {
    height: 38px;
    border: 0;
    border-radius: 13px;
    padding: 0 14px;
    background: #111;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.logout-btn {
    width: 100%;
    height: 34px;
    border: 0;
    border-radius: 12px;
    background: #f1f1f3;
    color: #4f4f55;
    font-size: 12px;
}

.logout-btn:hover {
    background: #e8e8eb;
    color: #111;
}

.license-info {
    display: grid;
    gap: 4px;
    min-height: 36px;
    padding: 9px 10px;
    border-radius: 13px;
    background: #f7f7f8;
    color: #74747b;
    font-size: 12px;
    line-height: 1.45;
}

.workspace {
    position: relative;
    display: grid;
    grid-template-rows: 58px minmax(0, 1fr) auto;
    min-width: 0;
    height: 100vh;
    background: #fff;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px 0 34px;
}

.top-left {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mobile-menu,
.mobile-top-actions {
    display: none;
}

.mobile-menu span,
.mobile-menu span::before,
.mobile-menu span::after {
    width: 16px;
    height: 1.5px;
    display: block;
    border-radius: 999px;
    background: #111;
    content: "";
}

.mobile-menu span {
    position: relative;
}

.mobile-menu span::before,
.mobile-menu span::after {
    position: absolute;
    left: 0;
}

.mobile-menu span::before {
    top: -5px;
}

.mobile-menu span::after {
    top: 5px;
}

.model-switch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: min(680px, 72vw);
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #111;
    font-size: 20px;
    font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
}

.model-switch-chevron {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-right: 1.5px solid #777;
    border-bottom: 1.5px solid #777;
    transform: rotate(45deg) translateY(-2px);
}

.model-switch:not(.has-menu) .model-switch-chevron {
    display: none;
}

.model-switch span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-switch:hover,
.ghost-link:hover {
    background: #f3f3f4;
}

.chevron {
    color: #7d7d82;
    font-size: 16px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-menu {
    position: absolute;
    z-index: 12;
    top: calc(100% + 8px);
    left: 0;
    width: min(314px, calc(100vw - 28px));
    max-height: min(520px, calc(100vh - 82px));
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #dedee2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
}

.model-option {
    width: 100%;
    min-height: 50px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 11px;
    padding: 8px 10px;
    background: transparent;
    color: #111;
    text-align: left;
}

.model-option:hover {
    background: #f4f4f5;
}

.model-option strong,
.model-option small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-option strong {
    font-size: 14px;
    font-weight: 500;
}

.model-option small {
    margin-top: 3px;
    color: #85858b;
    font-size: 12px;
}

.model-check {
    color: #111;
    font-size: 17px;
    text-align: center;
}

.ghost-link {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    color: #111;
    text-decoration: none;
    font-size: 14px;
}

.chat-panel {
    position: relative;
    min-height: 0;
    overflow-y: auto;
    padding: 30px 32px 150px;
}

.paper-mode .chat-panel {
    padding: 0;
}

.drawing-mode .chat-panel {
    padding: 0;
}

.drawing-hub {
    min-height: 100%;
    background: #fff;
}

.draw-workbench {
    min-height: 100%;
    display: grid;
    grid-template-columns: 324px minmax(0, 1fr);
}

.draw-controls {
    display: grid;
    align-content: start;
    gap: 14px;
    min-height: 100%;
    padding: 18px 16px 20px;
    border-right: 1px solid #ececf0;
    background: #fbfbfc;
}

.draw-field {
    display: grid;
    gap: 8px;
}

.draw-field label,
.draw-label-row label {
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.draw-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.draw-label-row small {
    color: #a1a5af;
    font-size: 12px;
}

.draw-model-card {
    min-height: 62px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border: 1px solid #dfe1e7;
    border-radius: 13px;
    padding: 10px 12px;
    background: #f8f8fa;
    color: #111;
    text-align: left;
}

.draw-model-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #e7f7f2;
    color: #16a985;
}

.draw-model-icon svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.draw-model-card strong,
.draw-model-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.draw-model-card strong {
    font-size: 14px;
}

.draw-model-card small {
    margin-top: 3px;
    color: #7a8190;
    font-size: 12px;
}

.segmented,
.ratio-grid,
.count-row {
    display: grid;
    gap: 6px;
}

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

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

.count-row {
    grid-template-columns: repeat(4, 38px);
}

.segmented button,
.ratio-grid button,
.count-row button {
    height: 36px;
    border: 1px solid #dfe1e7;
    border-radius: 9px;
    background: #fff;
    color: #333842;
    font-size: 13px;
}

.segmented button.active,
.ratio-grid button.active,
.count-row button.active {
    border-color: #cfd2da;
    background: #f1f1f3;
    color: #111;
    font-weight: 800;
}

.draw-field textarea,
.draw-field input {
    width: 100%;
    border: 1px solid #dfe1e7;
    border-radius: 13px;
    background: #f7f7f8;
    color: #111;
    outline: 0;
}

.draw-field textarea {
    min-height: 112px;
    padding: 14px;
    resize: vertical;
    line-height: 1.45;
}

.draw-field input {
    height: 58px;
    padding: 0 14px;
}

.draw-field textarea::placeholder,
.draw-field input::placeholder {
    color: #a0a4ad;
}

.draw-submit {
    height: 46px;
    align-self: end;
    margin-top: 8px;
    border: 0;
    border-radius: 12px;
    background: #c7b6ff;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(143, 119, 230, 0.22);
}

.draw-main {
    min-width: 0;
    padding: 36px 32px 44px;
    overflow: auto;
}

.draw-hero h1 {
    margin: 0;
    width: fit-content;
    background: linear-gradient(100deg, #a855f7 0%, #e879f9 48%, #fb7185 100%);
    color: transparent;
    font-size: clamp(42px, 6vw, 64px);
    line-height: 1;
    -webkit-background-clip: text;
    background-clip: text;
}

.draw-hero p {
    margin: 12px 0 28px;
    color: #72798a;
    font-size: 16px;
}

.draw-prompt-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.draw-prompt-title > span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff;
}

.draw-prompt-title svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.draw-prompt-title strong,
.draw-prompt-title small {
    display: block;
}

.draw-prompt-title strong {
    color: #111;
    font-size: 18px;
}

.draw-prompt-title small {
    margin-top: 2px;
    color: #8a8f99;
    font-size: 12px;
}

.draw-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.draw-filter-row button {
    height: 34px;
    border: 1px solid #e0e2e7;
    border-radius: 999px;
    padding: 0 14px;
    background: #f7f7f8;
    color: #5f6572;
    font-size: 13px;
}

.draw-filter-row button.active {
    border-color: #111;
    background: #111;
    color: #fff;
    font-weight: 800;
}

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

.inspiration-card {
    overflow: hidden;
    display: grid;
    border: 1px solid #e4e5ea;
    border-radius: 12px;
    background: #fff;
    color: #111;
    text-align: left;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.inspiration-card:hover {
    transform: translateY(-2px);
    border-color: #d3d6de;
    box-shadow: 0 14px 30px rgba(18, 18, 22, 0.1);
}

.inspiration-thumb {
    display: block;
    min-height: 190px;
}

.inspiration-info {
    display: grid;
    gap: 4px;
    padding: 12px 14px 14px;
}

.inspiration-info strong {
    font-size: 14px;
}

.inspiration-info small {
    color: #7d8492;
    font-size: 12px;
}

.paper-hub {
    min-height: 100%;
    width: 100%;
    background: #fff;
}

.paper-hub-inner {
    width: min(760px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0 42px;
}

.paper-hub-head {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    gap: 16px;
    padding: 6px 0 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.paper-hub-head h1 {
    margin: 0;
    color: #111;
    font-size: 24px;
    line-height: 1.2;
}

.paper-hub-head p {
    margin: 4px 0 0;
    color: #9a9aa1;
    font-size: 13px;
}

.paper-flow-strip {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #e7e7eb;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfbfc, #f5f5f7);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.03);
}

.paper-flow-strip span {
    min-width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #343741;
    font-size: 14px;
    font-weight: 800;
}

.paper-flow-strip svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.paper-flow-strip small {
    min-width: 0;
    overflow: hidden;
    color: #8d9099;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.paper-section-list {
    display: grid;
    gap: 24px;
    padding-top: 18px;
}

.paper-section {
    display: grid;
    gap: 12px;
}

.paper-section-title {
    display: grid;
    grid-template-columns: auto minmax(88px, auto) 1fr;
    align-items: center;
    gap: 9px;
    color: #7d7f87;
    font-size: 14px;
    font-weight: 700;
}

.paper-section-title span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a8a8ad;
}

.paper-section-title::after {
    content: "";
    height: 1px;
    background: #ececef;
}

.paper-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: 12px;
}

.paper-tool-card {
    min-height: 132px;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
    border: 1px solid #ececf0;
    border-radius: 12px;
    padding: 16px 12px 14px;
    background: #fff;
    color: #111;
    text-align: center;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.paper-tool-card:hover {
    transform: translateY(-2px);
    border-color: #d9d9de;
    background: #fcfcfd;
    box-shadow: 0 12px 28px rgba(18, 18, 22, 0.08);
}

.paper-card-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f1f2f4;
    color: #9a9fab;
}

.paper-card-icon svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.paper-tool-card strong {
    max-width: 100%;
    color: #17171a;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: normal;
}

.paper-tool-card small {
    max-width: 100%;
    color: #a0a2ab;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: normal;
}

.welcome {
    position: absolute;
    left: 50%;
    top: 34%;
    transform: translate(-50%, -50%);
    width: min(720px, calc(100% - 48px));
    text-align: center;
    pointer-events: none;
}

.welcome-kicker {
    margin-bottom: 12px;
    color: #8a8a90;
    font-size: 14px;
}

.welcome h1 {
    margin: 0;
    color: #000;
    font-size: 30px;
    font-weight: 500;
    letter-spacing: 0;
}

.messages {
    display: grid;
    gap: 22px;
    width: min(770px, calc(100% - 48px));
    margin: 0 auto;
}

.messages:not(:empty) + .status {
    margin-top: 18px;
}

.bubble {
    max-width: 78%;
    padding: 12px 16px;
    border-radius: 19px;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}

.assistant {
    max-width: 100%;
    padding: 0;
    color: #111;
    background: transparent;
}

.assistant-text {
    margin: 0 0 12px;
}

.assistant-image {
    margin: 12px 0;
    width: min(720px, 100%);
}

.assistant-image img {
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 16px;
    background: #f6f6f7;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
}

.user {
    justify-self: end;
    color: #fff;
    background: #000;
}

.status {
    width: min(770px, calc(100% - 48px));
    min-height: 22px;
    margin: 0 auto;
    color: #777;
    font-size: 14px;
}

.composer {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 4;
    width: min(770px, calc(100% - 48px));
    transform: translateX(-50%);
    padding-bottom: 8px;
}

.composer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    min-height: 58px;
    padding: 6px 8px 6px 18px;
    border: 1px solid #d9d9dc;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.045);
}

.composer textarea {
    width: 100%;
    max-height: 140px;
    min-height: 28px;
    padding: 5px 4px;
    border: 0;
    outline: 0;
    resize: none;
    color: #111;
    background: transparent;
    line-height: 1.5;
    overflow-y: auto;
}

.composer textarea::placeholder {
    color: #8c8c91;
}

.composer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.round-tool,
.send-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
}

.round-tool {
    background: #f4f4f5;
    color: #111;
    font-size: 23px;
    line-height: 1;
}

.round-tool input {
    display: none;
}

.send-btn {
    background: #9b9b9f;
    color: #fff;
    font-size: 15px;
    cursor: default;
    opacity: 1;
    transition: background 140ms ease, transform 140ms ease;
}

.send-btn.is-ready {
    background: #000;
    cursor: pointer;
}

.send-btn.is-ready:hover {
    transform: translateY(-1px);
}

.send-btn:disabled {
    pointer-events: none;
}

.send-btn .icon {
    width: 20px;
    height: 20px;
    display: block;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.composer-actions select,
.chip-btn {
    height: 34px;
    border: 0;
    border-radius: 17px;
    background: #f4f4f5;
    color: #222;
    padding: 0 12px;
    font-size: 13px;
}

.composer-actions select {
    appearance: none;
    padding-right: 28px;
    background-image: linear-gradient(45deg, transparent 50%, #555 50%), linear-gradient(135deg, #555 50%, transparent 50%);
    background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.chip-btn {
    display: none;
}

.composer.simple-mode .chip-btn {
    display: inline-flex;
    align-items: center;
}

.simple-hint {
    grid-column: 1 / -1;
    margin: 4px 6px 6px 0;
    color: #777;
    font-size: 13px;
}

.hidden {
    display: none;
}

.composer-foot {
    padding-top: 7px;
    color: #666;
    text-align: center;
    font-size: 12px;
}

.shell.sidebar-collapsed .sidebar {
    padding-inline: 8px;
}

.shell.sidebar-collapsed .sidebar-top {
    justify-content: center;
    padding-inline: 0;
}

.shell.sidebar-collapsed .chat-action-btn span:not(.chat-action-icon),
.shell.sidebar-collapsed .feature-list,
.shell.sidebar-collapsed .group-name,
.shell.sidebar-collapsed .account-head div,
.shell.sidebar-collapsed .license-form,
.shell.sidebar-collapsed .license-info {
    display: none;
}

.shell.sidebar-collapsed .logo-mark {
    display: grid;
}

.shell.sidebar-collapsed .collapse-btn {
    position: absolute;
    top: 0;
    left: 50%;
    opacity: 0;
    transform: translateX(-50%);
}

.shell.sidebar-collapsed .sidebar-top:hover .collapse-btn,
.shell.sidebar-collapsed .collapse-btn:focus-visible {
    opacity: 1;
}

.shell.sidebar-collapsed .sidebar-top:hover .logo-mark,
.shell.sidebar-collapsed .sidebar-top:focus-within .logo-mark {
    opacity: 0;
}

.shell.sidebar-collapsed .feature-nav {
    gap: 4px;
}

.shell.sidebar-collapsed .chat-action-btn {
    justify-content: center;
    padding-inline: 0;
}

.shell.sidebar-collapsed .feature-group summary {
    justify-content: center;
    padding-inline: 0;
}

.shell.sidebar-collapsed .standalone-feature {
    justify-content: center;
    padding-inline: 0;
}

.shell.sidebar-collapsed .feature-group summary::after {
    display: none;
}

.shell.sidebar-collapsed .account-card {
    justify-items: center;
    padding: 10px 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 860px) {
    body {
        overflow: hidden;
    }

    .shell {
        display: block;
        min-height: 100dvh;
    }

    .sidebar {
        position: fixed;
        z-index: 30;
        inset: 0 auto 0 0;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        width: min(82vw, 310px);
        height: 100dvh;
        max-height: none;
        padding: 14px 12px 12px;
        border-right: 1px solid #e7e7ea;
        border-bottom: 0;
        box-shadow: 18px 0 44px rgba(0, 0, 0, 0.14);
        transform: translateX(-104%);
        transition: transform 220ms ease;
    }

    .shell.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 20;
        inset: 0;
        display: block;
        border: 0;
        background: rgba(0, 0, 0, 0);
        opacity: 0;
        pointer-events: none;
        transition: background 220ms ease, opacity 220ms ease;
    }

    .shell.sidebar-open .sidebar-backdrop {
        background: rgba(0, 0, 0, 0.22);
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-top {
        justify-content: space-between;
        padding-inline: 4px;
    }

    .shell.sidebar-collapsed .logo-mark,
    .logo-mark {
        display: grid;
    }

    .shell.sidebar-collapsed .feature-list,
    .feature-list {
        display: grid;
    }

    .shell.sidebar-collapsed .group-name,
    .group-name {
        display: block;
    }

    .shell.sidebar-collapsed .account-head div,
    .account-head div {
        display: block;
        min-width: 0;
    }

    .shell.sidebar-collapsed .license-form,
    .license-form {
        display: grid;
    }

    .shell.sidebar-collapsed .license-info,
    .license-info {
        display: grid;
    }

    .shell.sidebar-collapsed .feature-group summary,
    .feature-group summary {
        justify-content: flex-start;
        padding-inline: 10px;
    }

    .shell.sidebar-collapsed .feature-group summary::after,
    .feature-group summary::after {
        display: block;
    }

    .workspace {
        height: 100dvh;
        grid-template-rows: 52px minmax(0, 1fr) auto;
    }

    .topbar {
        height: 52px;
        padding: 0 14px;
        border-bottom: 0;
    }

    .mobile-menu {
        display: grid;
    }

    .mobile-top-actions {
        display: flex;
        align-items: center;
        gap: 18px;
        color: #111;
        font-size: 20px;
        line-height: 1;
    }

    .model-switch {
        max-width: calc(100vw - 132px);
        font-size: 17px;
        font-family: Arial, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
        font-weight: 600;
    }

    .welcome {
        top: 48%;
        width: calc(100% - 32px);
    }

    .welcome-kicker {
        display: none;
    }

    .welcome h1 {
        font-size: 27px;
    }

    .chat-panel {
        padding: 18px 14px 124px;
    }

    .drawing-mode .chat-panel,
    .paper-mode .chat-panel {
        padding: 0;
    }

    .draw-workbench {
        grid-template-columns: 1fr;
    }

    .draw-controls {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid #ececf0;
    }

    .draw-main {
        padding: 28px 16px 34px;
    }

    .draw-hero h1 {
        font-size: 42px;
    }

    .messages,
    .status {
        width: 100%;
    }

    .bubble {
        max-width: 88%;
    }

    .composer {
        width: calc(100% - 24px);
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .composer-inner {
        grid-template-columns: auto 1fr auto;
        gap: 8px;
        min-height: 52px;
        padding: 7px 8px 7px 10px;
        border-radius: 26px;
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
    }

    .composer-actions {
        display: contents;
    }

    .composer-actions select,
    .chip-btn {
        display: none;
    }

    .round-tool,
    .send-btn {
        width: 36px;
        height: 36px;
    }

    .round-tool {
        grid-column: 1;
        grid-row: 1;
    }

    .composer textarea {
        grid-column: 2;
        grid-row: 1;
        min-height: 28px;
        padding: 4px 0;
    }

    .send-btn {
        grid-column: 3;
        grid-row: 1;
    }

    .simple-hint {
        display: none;
    }

    .composer-foot {
        display: none;
    }

    .account-card {
        gap: 10px;
        margin-top: 12px;
        padding: 12px;
        border-radius: 16px;
    }

    .account-head {
        align-items: center;
    }

    .license-form {
        grid-template-columns: minmax(0, 1fr) 54px;
        gap: 8px;
    }

    .license-form input,
    .license-form button {
        height: 38px;
    }

    .license-form button {
        padding: 0;
    }

    .license-info {
        min-height: 34px;
        padding: 8px 10px;
    }
}

@media (max-width: 420px) {
    .top-actions .icon-only {
        display: none;
    }

    .model-switch {
        max-width: calc(100vw - 86px);
    }

    .composer-actions {
        flex-wrap: wrap;
    }

    .composer-actions select,
    .chip-btn {
        flex: 1;
    }
}
