#chart-chat-view {
    position: fixed;
    inset: 0;
    padding-left: var(--sidebar-w, 0px);
    display: none;
    z-index: 15;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 18%, rgba(255, 180, 70, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 80% 12%, rgba(50, 80, 160, 0.14) 0%, transparent 42%),
        radial-gradient(ellipse at 50% 85%, rgba(20, 32, 54, 0.55) 0%, transparent 55%),
        linear-gradient(180deg, #030508 0%, #020406 45%, #020304 100%);
}
#chart-chat-view.visible {
    display: block;
}
/* ::before removed — canvas starfield (chart-chat-starfield.js) handles animated stars */
#chart-chat-view::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, rgba(255, 170, 60, 0.08) 0%, transparent 60%);
    filter: blur(48px);
    opacity: 0.8;
}

.chart-chat-shell {
    position: relative;
    z-index: 1;
    width: min(1040px, calc(100% - 48px));
    height: 100%;
    margin: 0 auto;
    /* Align with the 44px header gear cluster for consistent top rhythm. */
    padding: calc(var(--chart-actions-top) + 11px) 0 calc(28px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.chart-chat-topbar {
    width: min(860px, 100%);
    margin: 0 auto;
    text-align: center;
    padding-top: 0;
    transition: opacity 240ms ease, transform 240ms ease;
}
.chart-chat-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
/* Whenever the ⓘ flyout is visible (click, hover, focus, or tooltip hover — see houseOfPlanets.html),
   stack the top bar above later siblings (.chart-chat-empty / composer) so the flyout clears the
   invocation bar and backdrop stacking contexts. */
#chart-chat-view .chart-chat-topbar:has(#chart-chat-title-wrap.chart-chat-tooltip-open),
#chart-chat-view .chart-chat-topbar:has(#chart-chat-info-btn:hover),
#chart-chat-view .chart-chat-topbar:has(#chart-chat-info-btn:focus-visible),
#chart-chat-view .chart-chat-topbar:has(#chart-chat-tooltip:hover) {
    position: relative;
    z-index: 3;
}

.chart-chat-continue-prev--link {
    margin: 8px auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: rgba(226, 232, 240, 0.78);
    cursor: pointer;
    text-decoration: none;
}
.chart-chat-continue-prev--link:hover {
    color: rgba(248, 250, 252, 0.92);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}
.chart-chat-continue-prev--link:disabled {
    cursor: wait;
    opacity: 0.7;
    text-decoration: none;
}
/* Same title scale as Foundational Pattern (.chart-viz-title-inner / .chart-viz-title-text in houseOfPlanets.html). */
#chart-chat-title-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 6px;
    position: relative;
    font-size: clamp(13px, 2.1vw, 17px);
    pointer-events: auto;
}
#chart-chat-info-btn {
    vertical-align: middle;
    top: auto;
    margin-left: 0.08em;
}

.chart-chat-page-title {
    font-family: 'Cinzel', serif;
    font-size: 1em;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: none;
    color: var(--chart-text-eyebrow);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
    margin: 0;
}
.chart-chat-page-subtitle {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--chart-text-context);
    line-height: 1.45;
}
.chart-chat-status {
    margin-top: 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--chart-text-dim);
}
.chart-chat-status.chart-chat-status--hidden {
    display: none;
    margin: 0;
}
.chart-chat-context {
    display: none !important;
}
.chart-chat-support {
    width: 100%;
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.chart-chat-support > [hidden] {
    display: none !important;
}
.chart-chat-error {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px auto 0;
    padding: 14px 16px;
    width: min(760px, 100%);
    border-radius: 18px;
    border: 1px solid rgba(248, 113, 113, 0.22);
    background: rgba(35, 12, 18, 0.62);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}
.chart-chat-error.visible {
    display: flex;
}
.chart-chat-error-text {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(254, 226, 226, 0.9);
}
.chart-chat-error button {
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(254, 242, 242, 0.92);
    border-radius: 9999px;
    padding: 10px 14px;
    font-size: 12px;
    cursor: pointer;
}
.chart-chat-error button:hover {
    border-color: rgba(248, 113, 113, 0.32);
    background: rgba(248, 113, 113, 0.12);
}
.chart-chat-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    color: var(--chart-text-subtle);
    font-size: 12px;
}
.chart-chat-loading.visible {
    display: flex;
}
.chart-chat-loading-dots,
.chart-chat-thinking-dots {
    display: inline-flex;
    gap: 4px;
}
.chart-chat-loading-dots span,
.chart-chat-thinking-dots span {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: rgba(251, 191, 36, 0.68);
    animation: chatPulse 1.2s ease-in-out infinite;
}
.chart-chat-loading-dots span:nth-child(2),
.chart-chat-thinking-dots span:nth-child(2) {
    animation-delay: 0.16s;
}
.chart-chat-loading-dots span:nth-child(3),
.chart-chat-thinking-dots span:nth-child(3) {
    animation-delay: 0.32s;
}
@keyframes chatPulse {
    0%, 80%, 100% { transform: scale(0.75); opacity: 0.42; }
    40% { transform: scale(1); opacity: 1; }
}

.chart-chat-empty {
    flex: 1;
    display: none;
    min-height: 0;
}
#chart-chat-view.is-empty .chart-chat-empty {
    display: grid;
    align-items: stretch;
}
#chart-chat-view.is-empty .chart-chat-topbar {
    opacity: 0.92;
    transform: translateY(0);
}
.chart-chat-empty-inner {
    --chart-chat-empty-stage-max: 1120px;
    --chart-chat-empty-composer-max: 860px;
    width: min(var(--chart-chat-empty-stage-max), calc(100% - clamp(48px, 8vw, 180px)));
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: min-content;
    align-items: start;
    align-content: center;
    row-gap: clamp(16px, 2.8vh, 28px);
    column-gap: clamp(10px, 2vw, 28px);
    text-align: left;
    margin-top: 0;
    min-height: 100%;
}

#chart-chat-view.is-empty .chart-chat-empty-inner {
    align-items: start;
}

.chart-chat-suggestions {
    inline-size: max-content;
    max-inline-size: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chart-chat-suggestions-top {
    grid-column: 1 / -1;
    justify-self: center;
    inline-size: min(100%, var(--chart-chat-empty-composer-max));
    align-items: flex-end;
}
.chart-chat-suggestions-bottom {
    grid-column: 1 / -1;
    justify-self: center;
    inline-size: min(100%, var(--chart-chat-empty-composer-max));
    align-items: flex-start;
}

#chart-chat-view.is-empty .chart-chat-suggestions-top .chart-chat-suggestion-btn {
    align-self: flex-end;
    text-align: left;
}
#chart-chat-view.is-empty .chart-chat-suggestions-bottom .chart-chat-suggestion-btn {
    align-self: flex-start;
    text-align: left;
}

.chart-chat-invocation-row {
    justify-content: center;
}
.chart-chat-suggestion-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    inline-size: max-content;
    max-inline-size: 100%;
    box-sizing: border-box;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 13, 22, 0.28);
    border-radius: 16px;
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.35;
    color: rgba(248, 250, 252, 0.92);
    cursor: pointer;
    transition: transform 120ms ease, border-color 160ms ease, background 160ms ease;
}
.chart-chat-suggestion-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.08);
}

.chart-chat-suggestion-btn--faded {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    pointer-events: none;
    filter: blur(1px);
    transition: opacity 320ms ease, transform 360ms ease, filter 360ms ease;
}
.chart-chat-suggestion-btn:disabled {
    cursor: wait;
    opacity: 0.7;
}

.chart-chat-invocation-row {
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}
.chart-chat-invocation-row .chart-chat-composer-shell {
    flex: 1 1 100%;
    min-width: 0;
}
.chart-chat-continue-prev {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(248, 250, 252, 0.92);
    border-radius: 18px;
    padding: 13px 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 120ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
    white-space: nowrap;
}
.chart-chat-continue-prev:hover {
    transform: translateY(-1px);
    border-color: rgba(251, 191, 36, 0.32);
    background: rgba(251, 191, 36, 0.10);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}
.chart-chat-continue-prev:disabled {
    cursor: wait;
    opacity: 0.7;
}
.chart-chat-support .chart-chat-continue-prev {
    flex: 0 0 auto;
    margin: 0;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: rgba(226, 232, 240, 0.78);
    white-space: normal;
}
.chart-chat-support .chart-chat-continue-prev:hover {
    transform: none;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: rgba(248, 250, 252, 0.92);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}
.chart-chat-support .chart-chat-continue-prev:disabled {
    text-decoration: none;
}

.chart-chat-checking-subtitle {
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    pointer-events: none;
    cursor: default;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    color: rgba(148, 163, 184, 0.88);
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    animation: chartChatBlink 1.1s ease-in-out infinite;
}

@media (min-width: 1024px) {
    #mobile-section-chart-subtitle {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    #mobile-section-chart-subtitle {
        display: none !important;
    }
}

@keyframes chartChatBlink {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}
.chart-chat-invocation-copy {
    max-width: 640px;
}
.chart-chat-invocation-title {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
    color: rgba(248, 250, 252, 0.95);
    text-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}
.chart-chat-invocation-subtitle {
    margin: 14px auto 0;
    max-width: 540px;
    font-size: 15px;
    line-height: 1.75;
    color: var(--chart-text-context);
}
#chart-chat-view.is-empty .chart-chat-composer-bar {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, var(--chart-chat-empty-composer-max));
}
.chart-chat-invocation-shell {
    min-height: 0;
    padding-top: 12px;
    padding-bottom: 14px;
}
#chart-chat-view.is-empty .chart-chat-footer-note {
    text-align: center;
}

.chart-chat-conversation {
    flex: 1;
    min-height: 0;
    display: none;
    flex-direction: column;
    gap: 18px;
    padding-top: 14px;
}
#chart-chat-view.is-conversation .chart-chat-conversation {
    display: flex;
}
#chart-chat-view.is-conversation .chart-chat-topbar {
    padding-top: 0;
}
.chart-chat-transcript {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 0 12px;
    scroll-behavior: smooth;
}
.chart-chat-thread {
    width: min(860px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 16px;
}
.chart-chat-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chart-chat-message.user {
    align-items: flex-end;
}
.chart-chat-message.assistant,
.chart-chat-message.thinking {
    align-items: flex-start;
}
.chart-chat-message-meta {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: none;
    color: var(--chart-text-meta);
    padding: 0 2px;
}
.chart-chat-message-card {
    max-width: min(100%, 720px);
    border-radius: 24px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.30);
}
.chart-chat-message.assistant .chart-chat-message-card,
.chart-chat-message.thinking .chart-chat-message-card {
    background: rgba(8, 13, 22, 0.10);
    border-color: rgba(255, 255, 255, 0.08);
}
.chart-chat-message.user .chart-chat-message-card {
    max-width: min(100%, 620px);
    background: rgba(201, 168, 76, 0.07);
    border-color: rgba(201, 168, 76, 0.16);
}
.chart-chat-message-body {
    font-size: 15px;
    line-height: 1.85;
    color: rgba(241, 245, 249, 0.94);
    white-space: pre-wrap;
    word-break: break-word;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
.chart-chat-message.user .chart-chat-message-body {
    color: rgba(241, 245, 249, 0.92);
}
.chart-chat-markdown {
    display: grid;
    gap: 0.9rem;
    white-space: normal;
    color: inherit;
}
.chart-chat-markdown > :first-child {
    margin-top: 0;
}
.chart-chat-markdown > :last-child {
    margin-bottom: 0;
}
.chart-chat-markdown h2,
.chart-chat-markdown h3 {
    margin: 0;
    font-family: inherit;
    font-weight: 600;
    line-height: 1.45;
    color: rgba(241, 245, 249, 0.96);
    letter-spacing: 0.01em;
}
.chart-chat-markdown h2 {
    font-size: 1.03rem;
}
.chart-chat-markdown h3 {
    font-size: 0.97rem;
    color: rgba(226, 232, 240, 0.92);
}
#identity-layer-view .il-section-content .chart-chat-markdown {
    gap: 0.6rem;
}
#identity-layer-view .il-section-content .chart-chat-markdown,
#identity-layer-view .il-section-content .chart-chat-markdown p,
#identity-layer-view .il-section-content .chart-chat-markdown blockquote,
#identity-layer-view .il-section-content .chart-chat-markdown ul,
#identity-layer-view .il-section-content .chart-chat-markdown ol,
#identity-layer-view .il-section-content .chart-chat-markdown li,
#identity-layer-view .il-section-content .chart-chat-markdown table,
#identity-layer-view .il-section-content .chart-chat-markdown th,
#identity-layer-view .il-section-content .chart-chat-markdown td {
    font-size: 13px;
    line-height: 1.65;
    color: #cbd5e1;
}
#identity-layer-view .il-section-content .chart-chat-markdown strong,
#identity-layer-view .il-section-content .chart-chat-markdown b,
#identity-layer-view .il-section-content .chart-chat-markdown-label {
    font-weight: 700;
    color: rgba(255, 248, 235, 0.98);
}
/* Identity Layer — amber bullet override for markdown list items */
#identity-layer-view .il-section-content .chart-chat-markdown ul {
    list-style: none;
    padding-left: 14px;
}
#identity-layer-view .il-section-content .chart-chat-markdown li {
    position: relative;
    padding-left: 2px;
}
#identity-layer-view .il-section-content .chart-chat-markdown li::before {
    content: '•';
    position: absolute;
    left: -14px;
    color: #d97706;
    line-height: 1.65;
}
.chart-chat-markdown p,
.chart-chat-markdown blockquote,
.chart-chat-markdown ul,
.chart-chat-markdown ol,
.chart-chat-markdown table {
    margin: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}
.chart-chat-markdown li {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}
.chart-chat-markdown ul,
.chart-chat-markdown ol {
    padding-left: 1.25rem;
}
.chart-chat-markdown li + li {
    margin-top: 0.4rem;
}
.chart-chat-markdown strong,
.chart-chat-markdown b {
    font-weight: 700;
    color: rgba(255, 248, 235, 0.98);
}
.chart-chat-markdown-label {
    color: rgba(255, 248, 235, 0.98);
    font-weight: 700;
    letter-spacing: 0.01em;
}
.chart-chat-markdown em {
    font-style: italic;
    color: rgba(226, 232, 240, 0.92);
}
.chart-chat-markdown code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.92em;
    padding: 0.12rem 0.38rem;
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 243, 214, 0.95);
}
.chart-chat-markdown blockquote {
    padding: 0.15rem 0 0.15rem 1rem;
    border-left: 2px solid rgba(251, 191, 36, 0.5);
    color: rgba(226, 232, 240, 0.82);
}
.chart-chat-markdown-table-wrap {
    overflow-x: auto;
    margin: 0.1rem -0.1rem;
    padding-bottom: 0.15rem;
}
.chart-chat-markdown table {
    width: 100%;
    min-width: 320px;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.95em;
    line-height: 1.55;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
}
.chart-chat-markdown th,
.chart-chat-markdown td {
    padding: 0.7rem 0.8rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.chart-chat-markdown thead {
    background: rgba(251, 191, 36, 0.08);
}
.chart-chat-markdown th {
    font-size: 0.82em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 244, 214, 0.92);
}
.chart-chat-markdown tbody tr:last-child td {
    border-bottom: none;
}
.chart-chat-thinking-copy {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--chart-text-context);
    font-size: 14px;
}

.chart-chat-composer-bar {
    width: min(860px, 100%);
    margin: 0 auto;
}
.chart-chat-composer-shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px 10px;
    background: rgba(8, 13, 22, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
}
.chart-chat-composer-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 180, 70, 0.24), rgba(255, 255, 255, 0.04));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.chart-chat-composer-shell textarea {
    flex: 1;
    display: block;
    resize: none;
    border: none;
    outline: none;
    background: transparent;
    color: rgba(248, 250, 252, 0.96);
    font: inherit;
    line-height: 1.45;
    min-height: calc(1.45em + 8px);
    max-height: none;
    padding: 4px 0;
    overflow-y: hidden;
    scrollbar-width: thin;
}
.chart-chat-composer-shell textarea::placeholder {
    color: rgba(148, 163, 184, 0.74);
}
.chart-chat-submit {
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.92);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 10px 28px rgba(217, 119, 6, 0.25);
    position: relative;
    display: grid;
    place-items: center;
}
.chart-chat-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.32);
}
.chart-chat-submit:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
    box-shadow: none;
}

.chart-chat-submit::after {
    content: '→';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 16px;
    opacity: 1;
    transition: transform 140ms ease, opacity 140ms ease;
    pointer-events: none;
    text-shadow: 0 0 18px rgba(251, 191, 36, 0.55);
    color: rgba(255, 255, 255, 0.92);
}

.chart-chat-composer-shell:focus-within .chart-chat-submit {
    box-shadow:
        0 10px 28px rgba(217, 119, 6, 0.25),
        0 0 0 1px rgba(251, 191, 36, 0.32),
        0 0 32px rgba(251, 191, 36, 0.18);
}
.chart-chat-composer-shell:focus-within .chart-chat-submit::after {
    transform: translateX(1px);
}

#chart-chat-view.is-conversation .chart-chat-shell,
#chart-chat-view.is-conversation .chart-chat-conversation,
#chart-chat-view.is-conversation .chart-chat-transcript {
    min-height: 0;
}

/* Mobile-first: reserve top/bottom space and keep transcript as the scroll window. */
@media (max-width: 1023px) {
    #chart-chat-view.is-conversation .chart-chat-shell {
        display: grid;
        grid-template-rows: minmax(min-content, auto) 1fr;
        gap: 8px;
        padding-top: calc(var(--mobile-header-content-top) + var(--mobile-header-row-height) + 2px);
    }

    #chart-chat-view.is-conversation .chart-chat-topbar {
        padding-top: 0;
    }

    #chart-chat-view.is-conversation .chart-chat-conversation {
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 10px;
        padding-top: 0;
    }

    #chart-chat-view.is-conversation .chart-chat-transcript {
        padding: 0 0 4px;
    }

    /* Guardrail for short screens: keep composer from crowding transcript. */
    @media (max-height: 700px) {
        .chart-chat-composer-shell {
            padding: 12px 12px 13px;
        }
    }
}
.chart-chat-footer-note {
    margin-top: 10px;
    padding: 0 4px;
    font-size: 11px;
    color: rgba(148, 163, 184, 0.62);
    text-align: left;
}

#chart-chat-view.is-empty .chart-chat-conversation {
    display: none;
}
#chart-chat-view.is-empty .chart-chat-loading {
    justify-content: center;
}

@media (max-width: 1023px) {
    .chart-chat-shell {
        width: calc(100% - 22px);
        padding-top: calc(var(--mobile-header-content-top) + var(--mobile-header-row-height) + 2px);
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
    #chart-chat-title-wrap {
        font-size: 12px;
    }
    #chart-chat-title-wrap .chart-chat-page-title {
        letter-spacing: 0.04em;
    }
    .chart-chat-header {
        gap: 4px;
    }
    .chart-chat-topbar {
        padding-top: 0;
    }
    .chart-chat-support {
        min-height: 0;
    }
    .chart-chat-checking-subtitle,
    .chart-chat-support .chart-chat-continue-prev {
        font-size: 11px;
        line-height: 1.25;
    }
    .chart-chat-support .chart-chat-continue-prev {
        color: rgba(203, 213, 225, 0.72);
    }
    .chart-chat-page-subtitle {
        font-size: 13px;
        padding: 0 8px;
    }
    .chart-chat-status {
        font-size: 10px;
    }
    .chart-chat-invocation-title {
        font-size: clamp(24px, 8vw, 34px);
    }
    .chart-chat-invocation-subtitle {
        font-size: 14px;
        line-height: 1.65;
    }
    .chart-chat-message-card {
        border-radius: 20px;
        padding: 16px 16px 17px;
    }
    .chart-chat-message.user .chart-chat-message-card,
    .chart-chat-message.assistant .chart-chat-message-card,
    .chart-chat-message.thinking .chart-chat-message-card {
        max-width: 100%;
    }
    .chart-chat-message-body {
        font-size: 14px;
        line-height: 1.75;
    }
    .chart-chat-markdown ul,
    .chart-chat-markdown ol {
        padding-left: 1.1rem;
    }
    .chart-chat-markdown th,
    .chart-chat-markdown td {
        padding: 0.65rem 0.7rem;
    }
    .chart-chat-error {
        flex-direction: column;
        align-items: flex-start;
    }
    .chart-chat-composer-shell {
        gap: 12px;
        padding: 10px 12px 10px;
        border-radius: 22px;
    }
    .chart-chat-composer-shell textarea {
        min-height: calc(1.45em + 8px);
    }
    .chart-chat-submit {
        width: 44px;
        height: 44px;
        min-width: 44px;
        padding: 0;
        border-radius: 16px;
        letter-spacing: 0.10em;
    }

    .chart-chat-invocation-row {
        gap: 12px;
    }
    .chart-chat-composer-bar {
        width: 100%;
    }
    .chart-chat-invocation-row .chart-chat-composer-shell {
        flex: 1 1 100%;
        min-width: 0;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .chart-chat-empty-inner {
        --chart-chat-empty-stage-max: 840px;
        --chart-chat-empty-composer-max: 720px;
        width: min(var(--chart-chat-empty-stage-max), calc(100% - 40px));
        grid-template-columns: repeat(8, minmax(0, 1fr));
        row-gap: clamp(14px, 2.4vh, 18px);
        column-gap: 12px;
        margin-top: 0;
        padding-top: 0;
    }
    .chart-chat-suggestions {
        gap: 8px;
    }
    .chart-chat-suggestions-top {
        grid-column: 2 / -1;
        justify-self: end;
        align-items: flex-end;
    }
    .chart-chat-suggestions-bottom {
        grid-column: 1 / 8;
        justify-self: start;
        align-items: flex-start;
    }
    #chart-chat-view.is-empty .chart-chat-suggestions-top .chart-chat-suggestion-btn {
        align-self: flex-end;
        width: fit-content;
        max-width: 100%;
        text-align: left;
    }
    #chart-chat-view.is-empty .chart-chat-suggestions-bottom .chart-chat-suggestion-btn {
        align-self: flex-start;
        width: fit-content;
        max-width: 100%;
        text-align: left;
    }
    #chart-chat-view.is-empty .chart-chat-composer-bar {
        grid-column: 1 / -1;
        justify-self: center;
    }
    .chart-chat-suggestion-btn {
        width: fit-content;
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .chart-chat-empty-inner {
        --chart-chat-empty-stage-max: 100%;
        --chart-chat-empty-composer-max: 100%;
        width: min(var(--chart-chat-empty-stage-max), 100%);
        grid-template-columns: repeat(8, minmax(0, 1fr));
        row-gap: 14px;
        column-gap: 8px;
        margin-top: 0;
        padding-top: 0;
        text-align: left;
    }
    .chart-chat-suggestions {
        gap: 8px;
    }
    .chart-chat-suggestions-top {
        grid-column: 2 / -1;
        justify-self: end;
        align-items: flex-end;
    }
    .chart-chat-suggestions-bottom {
        grid-column: 1 / 8;
        justify-self: start;
        align-items: flex-start;
    }
    #chart-chat-view.is-empty .chart-chat-suggestions-top .chart-chat-suggestion-btn {
        align-self: flex-end;
        width: fit-content;
        max-width: 100%;
        text-align: left;
    }
    #chart-chat-view.is-empty .chart-chat-suggestions-bottom .chart-chat-suggestion-btn {
        align-self: flex-start;
        width: fit-content;
        max-width: 100%;
        text-align: left;
    }
    #chart-chat-view.is-empty .chart-chat-composer-bar {
        grid-column: 1 / -1;
        width: 100%;
    }
    .chart-chat-suggestion-btn {
        inline-size: max-content;
        max-inline-size: 100%;
    }
}

@media (min-width: 1600px) {
    .chart-chat-empty-inner {
        --chart-chat-empty-stage-max: 1360px;
        --chart-chat-empty-composer-max: 940px;
        width: min(var(--chart-chat-empty-stage-max), calc(100% - clamp(96px, 10vw, 260px)));
        row-gap: clamp(20px, 3.2vh, 34px);
    }
    #chart-chat-view.is-empty .chart-chat-composer-bar {
        grid-column: 1 / -1;
    }
}
