.back-bar {
    display: flex;
    padding: 16px 16px 0;
    text-align: left;
}

.back-button {
    display: inline-block;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888;
    text-decoration: none;
    border: 1px solid #333;
    transition: color 0.1s, border-color 0.1s;
}

.back-button:hover {
    color: #00ff80;
    border-color: #00ff80;
}

.sgpt-intro {
    margin: 0;
    padding: 0 16px 16px;
    color: #888;
}

.sgpt-intro strong {
    color: #ccc;
}

.sgpt-intro code {
    padding: 1px 6px;
    border: 1px solid #333;
    background: #141414;
    color: #ccc;
    font-family: inherit;
    font-size: 13px;
}

.sgpt-main {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    gap: 0;
    overflow-x: hidden;
}

body.sgpt-page {
    height: 100%;
    overflow: hidden;
}

.sgpt-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px 16px;
    flex: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 16px;
    border: none;
    border-bottom: 1px solid #333;
    text-align: left;
}

.sgpt-header .back-bar {
    padding: 0;
}

.sgpt-header h1 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sgpt-header .sgpt-intro {
    flex: 1 1 240px;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: 12px;
}

.sgpt-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    border: none;
    text-align: left;
}

.sgpt-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    font-size: 12px;
    letter-spacing: 1px;
    color: #888;
}

.sgpt-dot {
    flex: none;
    width: 8px;
    height: 8px;
    background: #555;
}

.sgpt-dot.is-online {
    background: #00ff80;
    box-shadow: 0 0 8px rgba(0, 255, 128, 0.6);
}

.sgpt-dot.is-offline {
    background: #ff0040;
    box-shadow: 0 0 8px rgba(255, 0, 64, 0.6);
}

.sgpt-dot.is-checking {
    background: #ffd23f;
    box-shadow: 0 0 8px rgba(255, 210, 63, 0.5);
}

.sgpt-status-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sgpt-retry {
    flex: none;
    padding: 5px 10px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
    background: transparent;
    border: 1px solid #333;
    cursor: pointer;
    transition: color 0.1s, border-color 0.1s;
}

.sgpt-retry:hover {
    color: #00ff80;
    border-color: #00ff80;
}

.sgpt-retry[hidden] {
    display: none;
}

.sgpt-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.sgpt-modal[hidden] {
    display: none;
}

.sgpt-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.sgpt-modal-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
    border: 1px solid #333;
    background: #0f0f0f;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.sgpt-modal-close {
    flex: none;
    width: 28px;
    height: 28px;
    padding: 0;
    font-family: inherit;
    font-size: 18px;
    line-height: 1;
    color: #888;
    background: transparent;
    border: 1px solid #333;
    cursor: pointer;
    transition: color 0.1s, border-color 0.1s;
}

.sgpt-modal-close:hover {
    color: #ff0040;
    border-color: #ff0040;
}

body.sgpt-modal-open {
    overflow: hidden;
}

.sgpt-new-image {
    margin-top: 8px;
}

.sgpt-gate-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.sgpt-gate-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ccc;
}

.sgpt-gate-text {
    margin: 0 0 12px;
    font-size: 13px;
    color: #888;
}

.sgpt-captcha {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 240px;
    max-width: 100%;
    min-height: 84px !important;
    height: auto !important;
    box-sizing: border-box;
    border: 1px solid #333;
    background: #141414;
    overflow: hidden;
}

.sgpt-captcha svg,
.sgpt-captcha img {
    display: block;
    width: 100%;
    height: auto;
}

.sgpt-captcha-form {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.sgpt-captcha-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 16px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 16px;
    color: #ccc;
    background: #141414;
    border: 1px solid #333;
    outline: none;
    transition: border-color 0.1s;
}

.sgpt-captcha-input:focus {
    border-color: #00ff80;
}

.sgpt-gate-error {
    margin: 8px 0 0;
    min-height: 1.2em;
    font-size: 12px;
    color: #ff0040;
}

.sgpt-chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #0f0f0f;
    border-bottom: 1px solid #333;
}

.sgpt-empty {
    margin: auto;
    color: #666;
    font-size: 13px;
    text-align: center;
}

.sgpt-msg {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 85%;
    align-self: flex-start;
}

.sgpt-msg.is-user {
    align-self: flex-end;
}

.sgpt-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sgpt-msg.is-user .sgpt-meta {
    justify-content: flex-end;
}

.sgpt-delete {
    flex: none;
    padding: 1px 6px;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.4;
    color: #666;
    background: transparent;
    border: 1px solid #333;
    cursor: pointer;
    transition: color 0.1s, border-color 0.1s;
}

.sgpt-delete:hover {
    color: #ff0040;
    border-color: #ff0040;
}

.sgpt-chat.is-busy .sgpt-delete {
    display: none;
}

.sgpt-role {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
}

.sgpt-msg.is-user .sgpt-role {
    align-self: flex-end;
}

.sgpt-bubble {
    padding: 12px 16px;
    border: 1px solid #333;
    background: #141414;
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.sgpt-msg.is-user .sgpt-bubble {
    border-color: #555;
    background: #191919;
    color: #fff;
}

.sgpt-msg.is-assistant .sgpt-bubble {
    border-color: rgba(0, 255, 128, 0.35);
}

.sgpt-msg.is-error .sgpt-bubble {
    border-color: #ff0040;
    color: #ff7a96;
}

.sgpt-msg.is-typing .sgpt-bubble {
    color: #888;
    animation: sgpt-pulse 1s ease-in-out infinite;
}

@keyframes sgpt-pulse {
    0%, 100% {
        opacity: 0.45;
    }
    50% {
        opacity: 1;
    }
}

.sgpt-reasoning {
    margin: 0 0 8px;
    padding: 6px 10px;
    border: 1px dashed #333;
    background: #101010;
}

.sgpt-reasoning summary {
    list-style: none;
    cursor: pointer;
    font-size: 11px;
    letter-spacing: 1px;
    color: #888;
    user-select: none;
}

.sgpt-reasoning summary::-webkit-details-marker {
    display: none;
}

.sgpt-reasoning summary:hover,
.sgpt-reasoning[open] summary {
    color: #00ff80;
}

.sgpt-reasoning-text {
    margin: 6px 0 0;
    max-height: 220px;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.5;
    color: #777;
    white-space: pre-wrap;
    word-break: break-word;
}

.sgpt-reasoning-live {
    margin: 0 0 8px;
    padding: 8px 10px;
    border: 1px dashed #333;
    background: #101010;
}

.sgpt-reasoning-live[hidden] {
    display: none;
}

.sgpt-reasoning-label {
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
}

.sgpt-reasoning-live .sgpt-reasoning-text {
    margin: 0;
}

.sgpt-bubble.sgpt-md,
.sgpt-reasoning-text.sgpt-md {
    white-space: normal;
}

.sgpt-md > :first-child {
    margin-top: 0;
}

.sgpt-md > :last-child {
    margin-bottom: 0;
}

.sgpt-md p {
    margin: 0 0 8px;
}

.sgpt-md h1,
.sgpt-md h2,
.sgpt-md h3,
.sgpt-md h4,
.sgpt-md h5,
.sgpt-md h6 {
    margin: 12px 0 6px;
    line-height: 1.3;
    color: #ccc;
}

.sgpt-md h1 {
    font-size: 20px;
}

.sgpt-md h2 {
    font-size: 18px;
}

.sgpt-md h3 {
    font-size: 16px;
}

.sgpt-md h4,
.sgpt-md h5,
.sgpt-md h6 {
    font-size: 14px;
}

.sgpt-md ul,
.sgpt-md ol {
    margin: 0 0 8px;
    padding-left: 1.4em;
}

.sgpt-md li {
    margin: 2px 0;
}

.sgpt-md li > p {
    margin: 0;
}

.sgpt-md a {
    color: #00ff80;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sgpt-md strong {
    color: #ffffff;
}

.sgpt-md code {
    padding: 1px 4px;
    border: 1px solid #2a2a2a;
    background: #0a0a0a;
    font-family: inherit;
    font-size: 0.92em;
}

.sgpt-md pre {
    margin: 0 0 8px;
    padding: 10px 12px;
    overflow-x: auto;
    border: 1px solid #2a2a2a;
    background: #0a0a0a;
}

.sgpt-md pre code {
    padding: 0;
    border: 0;
    background: transparent;
}

.sgpt-md blockquote {
    margin: 0 0 8px;
    padding: 4px 12px;
    border-left: 3px solid #333;
    color: #999;
}

.sgpt-md hr {
    margin: 12px 0;
    border: 0;
    border-top: 1px solid #333;
}

.sgpt-md table {
    width: 100%;
    margin: 0 0 8px;
    border-collapse: collapse;
}

.sgpt-md th,
.sgpt-md td {
    padding: 5px 8px;
    border: 1px solid #333;
    text-align: left;
    vertical-align: top;
}

.sgpt-md th {
    background: #141414;
    color: #ccc;
}

.sgpt-md img {
    max-width: 100%;
    height: auto;
}

.sgpt-md .katex-display {
    margin: 8px 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.sgpt-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.sgpt-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border: 1px solid #2a2a2a;
    border-radius: 999px;
    background: #1a1a1a;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.5px;
    color: #bbb;
    white-space: nowrap;
}

.sgpt-stat-icon {
    display: inline-flex;
    align-items: center;
    color: #888;
}

.sgpt-stat-icon svg {
    display: block;
}

.sgpt-form {
    display: flex;
    flex: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 16px;
    padding: 16px;
}

.sgpt-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 46px;
    max-height: 140px;
    padding: 12px 16px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    color: #ccc;
    background: #141414;
    border: 1px solid #333;
    outline: none;
    resize: none;
    transition: border-color 0.1s;
}

.sgpt-input::placeholder {
    color: #666;
}

.sgpt-input:focus {
    border-color: #00ff80;
}

.sgpt-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sgpt-send {
    flex: none;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #111;
    background: #fff;
    border: 1px solid #fff;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s, color 0.1s, opacity 0.1s;
}

.sgpt-send:hover:not(:disabled) {
    background: #00ff80;
    border-color: #00ff80;
    color: #111;
}

.sgpt-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sgpt-hint {
    flex: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0 16px 16px;
    font-size: 12px;
    color: #666;
    overflow-wrap: anywhere;
}

.sgpt-settings-open {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: auto;
    padding: 0;
    color: #888;
    background: transparent;
    border: 1px solid #333;
    cursor: pointer;
    transition: color 0.1s, border-color 0.1s;
}

.sgpt-settings-open:hover {
    color: #00ff80;
    border-color: #00ff80;
}

.sgpt-settings-open svg {
    display: block;
}

.sgpt-settings-card {
    width: min(560px, 100%);
}

.sgpt-settings-tabs {
    display: flex;
    gap: 0;
    margin: 8px 0 4px;
    border-bottom: 1px solid #333;
}

.sgpt-settings-tab {
    padding: 8px 12px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.1s, border-color 0.1s;
}

.sgpt-settings-tab:hover {
    color: #ccc;
}

.sgpt-settings-tab.is-active {
    color: #00ff80;
    border-bottom-color: #00ff80;
}

.sgpt-settings-panel[hidden] {
    display: none;
}

.sgpt-settings-modules {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    margin-top: 4px;
}

.sgpt-settings-module {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #2a2a2a;
    background: #141414;
    font-size: 12px;
    color: #aaa;
    cursor: pointer;
}

.sgpt-settings-module input {
    flex: none;
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #00ff80;
}

.sgpt-settings-module span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sgpt-settings-label {
    display: block;
    margin: 12px 0 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
}

.sgpt-settings-prompt {
    width: 100%;
    min-height: 190px;
    box-sizing: border-box;
    padding: 12px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    color: #ccc;
    background: #141414;
    border: 1px solid #333;
    outline: none;
    resize: vertical;
}

.sgpt-settings-prompt:focus {
    border-color: #00ff80;
}

.sgpt-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.sgpt-settings-row .sgpt-settings-label {
    margin: 0;
}

.sgpt-settings-value {
    font-size: 12px;
    font-weight: 700;
    color: #00ff80;
    font-variant-numeric: tabular-nums;
}

.sgpt-settings-range {
    width: 100%;
    margin: 8px 0 4px;
    accent-color: #00ff80;
}

.sgpt-settings-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 0;
    font-size: 13px;
    color: #ccc;
    cursor: pointer;
}

.sgpt-settings-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #00ff80;
}

.sgpt-settings-hint {
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: #666;
}

.sgpt-memories-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 8px;
}

.sgpt-memories-usage {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
    font-variant-numeric: tabular-nums;
}

.sgpt-memories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 330px;
    overflow-y: auto;
    padding-right: 4px;
}

.sgpt-memories-empty {
    padding: 16px 8px;
    border: 1px dashed #2a2a2a;
    color: #666;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.sgpt-memory-item {
    border: 1px solid #333;
    background: #141414;
}

.sgpt-memory-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid #2a2a2a;
}

.sgpt-memory-key {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    color: #ccc;
    font-size: 12px;
    font-weight: 700;
}

.sgpt-memory-meta {
    flex: none;
    color: #666;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sgpt-memory-delete {
    flex: none;
    width: 22px;
    height: 22px;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    line-height: 1;
    color: #666;
    background: transparent;
    border: 1px solid #333;
    cursor: pointer;
}

.sgpt-memory-delete:hover {
    color: #ff0040;
    border-color: #ff0040;
}

.sgpt-memory-value {
    margin: 0;
    padding: 8px;
    max-height: 130px;
    overflow: auto;
    color: #999;
    font-family: inherit;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.sgpt-memories-status {
    margin: 8px 0 0;
    min-height: 1.2em;
    font-size: 11px;
    color: #888;
}

.sgpt-memories-status.is-error {
    color: #ff7a96;
}

.sgpt-settings-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #333;
}

.sgpt-settings-spacer {
    flex: 1 1 auto;
}

.sgpt-settings-save {
    padding: 7px 14px;
    font-size: 10px;
}

.sgpt-msg.has-tools {
    max-width: 95%;
}

.sgpt-msg.has-painting {
    max-width: 100%;
}

.sgpt-painting {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin-top: 4px;
    border: 1px solid #333;
    background: #0a0a0a;
}

.sgpt-msg.has-before {
    max-width: 95%;
}

.sgpt-before-answer,
.sgpt-tool-details {
    margin: 2px 0;
    border: 1px dashed #333;
    background: #101010;
}

.sgpt-msg.has-before > .sgpt-before-answer {
    margin: 0 0 8px;
}

.sgpt-before-answer summary {
    list-style: none;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 11px;
    letter-spacing: 1px;
    color: #888;
    user-select: none;
}

.sgpt-before-answer summary::-webkit-details-marker {
    display: none;
}

.sgpt-before-answer summary:hover,
.sgpt-before-answer[open] summary {
    color: #00ff80;
}

.sgpt-before-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 10px 10px;
}

.sgpt-before-body .sgpt-tool-details {
    margin: 0;
}

.sgpt-before-label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #666;
}

.sgpt-before-text {
    font-size: 12px;
    line-height: 1.5;
    color: #888;
    overflow-wrap: anywhere;
}

.sgpt-before-message .sgpt-before-text {
    color: #aaa;
}

.sgpt-tool-details summary {
    list-style: none;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 11px;
    letter-spacing: 1px;
    color: #888;
    user-select: none;
}

.sgpt-tool-details summary::-webkit-details-marker {
    display: none;
}

.sgpt-tool-details summary:hover,
.sgpt-tool-details[open] summary {
    color: #00ff80;
}

.sgpt-tool-details-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 10px 10px;
}

.sgpt-tool-details .sgpt-tool-block {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.sgpt-tool-details .sgpt-tool-block + .sgpt-tool-block {
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px dashed #2a2a2a;
}

.sgpt-tool-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 2px 0;
    padding: 8px 10px;
    border: 1px dashed #2a2a2a;
    background: #101010;
    max-width: 100%;
    box-sizing: border-box;
}

.sgpt-tool-block.is-result {
    width: 100%;
    border-style: solid;
    border-color: #333;
}

.sgpt-tool-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sgpt-tool-name {
    color: #666;
}

.sgpt-tool-kind {
    color: #00ff80;
}

.sgpt-tool-block.is-result .sgpt-tool-name {
    color: #888;
}

.sgpt-tool-code {
    margin: 0;
    padding: 8px 10px;
    max-height: 260px;
    overflow: auto;
    box-sizing: border-box;
    border: 1px solid #2a2a2a;
    background: #0a0a0a;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.5;
    color: #bbb;
    white-space: pre;
}

@media (prefers-reduced-motion: reduce) {
    .sgpt-msg.is-typing .sgpt-bubble {
        animation: none;
    }
}

@media (max-width: 768px) {
    .sgpt-header .sgpt-intro {
        display: none;
    }

    .sgpt-status-text {
        flex: 1 1 calc(100% - 24px);
    }

    .sgpt-status .sgpt-retry {
        flex: 1 1 auto;
    }

    .sgpt-form,
    .sgpt-captcha-form {
        flex-direction: column;
    }

    .sgpt-input {
        width: 100%;
    }

    .sgpt-send {
        width: 100%;
    }

    .sgpt-settings-actions .sgpt-send {
        width: auto;
    }

    .sgpt-settings-modules {
        grid-template-columns: 1fr;
    }

    .sgpt-memories-head {
        flex-wrap: wrap;
    }

    .sgpt-msg {
        max-width: 92%;
    }

    .sgpt-msg.has-tools,
    .sgpt-msg.has-before,
    .sgpt-msg.has-painting {
        max-width: 100%;
    }
}
