:root {
    --tg-bg: var(--tg-theme-bg-color, #ffffff);
    --tg-text: var(--tg-theme-text-color, #000000);
    --tg-hint: var(--tg-theme-hint-color, #808080);
    --tg-secondary-bg: var(--tg-theme-secondary-bg-color, #f3f4f6);
    --tg-button: var(--tg-theme-button-color, #7937e3);
    --tg-button-text: var(--tg-theme-button-text-color, #ffffff);
    --tg-separator: var(--tg-theme-section-separator-color, rgba(128, 128, 128, 0.35));

    --bg: var(--tg-secondary-bg);
    --surface: var(--tg-bg);
    --text: var(--tg-text);
    --muted: var(--tg-hint);
    --line: var(--tg-separator);

    --green-bg: #daffd5;
    --green-text: #059f00;

    --risk-red: #ff0000;
    --risk-yellow: #eab308;
    --risk-green: #22c55e;

    --alert-bg: #ffdfe3;
    --alert-text: #de0004;

    --action: var(--tg-button);
    --shadow: 0 0 15px rgba(0, 0, 0, 0.15);
    --border-color: var(--tg-separator);
    --brand-soft: rgba(121, 55, 227, 0.12);
    --btn-radius: 8px;
    --btn-border: var(--line);
    --btn-border-accent: #c9b8ef;
    --btn-bg: var(--tg-bg);
    --btn-bg-hover: var(--tg-secondary-bg);
    --btn-bg-active: var(--tg-secondary-bg);
    --btn-text: var(--tg-text);
    --btn-muted: var(--tg-hint);
    --btn-accent: var(--tg-button);
    --btn-accent-hover: #6f30d5;
    --btn-accent-active: #5f24bf;
    --btn-focus: rgba(121, 55, 227, 0.22);
    --btn-danger: #e53935;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    display: flex;
    justify-content: center;
    padding: 24px 12px calc(var(--cta-safe-space, 236px) + 24px);
}

.container {
    width: min(440px, 100%);
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 8px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-5 {
    margin-top: 20px;
}

.mb-8 {
    margin-bottom: 32px;
}

.text-sm {
    font-size: 14px;
}

.text-hint {
    color: var(--tg-hint);
}

.text-error {
    color: var(--risk-red);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.subtitle {
    font-size: 15px;
    line-height: 1.4;
    color: var(--tg-hint);
}

.header-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tg-hint);
    opacity: 0.6;
}

.input-wrapper {
    position: relative;
}

.input-field {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--tg-bg);
    color: var(--tg-text);
    padding: 11px 106px 11px 12px;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.2px;
    outline: none;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-field::placeholder {
    color: var(--muted);
    opacity: 1;
    letter-spacing: normal;
}

.input-field:focus {
    border-color: var(--btn-border-accent);
    box-shadow: 0 0 0 2px rgba(121, 55, 227, 0.12);
    background: var(--btn-bg);
}

.input-field.error {
    border-color: var(--risk-red);
}

.input-field.error::placeholder {
    color: var(--risk-red);
    opacity: 1;
}

.input-actions {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 2px;
}

.icon-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--btn-border);
    border-radius: var(--btn-radius);
    background: var(--btn-bg);
    color: var(--btn-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.08s ease;
    position: relative;
    overflow: hidden;
}

.icon-btn:hover {
    border-color: var(--btn-border-accent);
    background: var(--btn-bg-hover);
}

.icon-btn:active {
    background: var(--btn-bg-active);
    color: var(--btn-accent);
    transform: translateY(1px);
}

.icon-btn.is-keyboard-open {
    color: var(--btn-accent);
    border-color: var(--btn-border-accent);
}

.icon-btn.is-keyboard-open::after {
    content: '';
    position: absolute;
    left: -3px;
    right: -3px;
    top: 50%;
    height: 2px;
    background: currentColor;
    transform: rotate(-26deg);
    opacity: 0.9;
    pointer-events: none;
}

.paste-btn {
    height: 28px;
    border: 1px solid var(--btn-border);
    border-radius: var(--btn-radius);
    background: var(--btn-bg);
    color: var(--btn-accent);
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.08s ease;
}

.paste-btn:hover {
    border-color: var(--btn-border-accent);
    background: var(--btn-bg-hover);
}

.paste-btn:active {
    background: var(--btn-bg-active);
    transform: translateY(1px);
}

.error-slot {
    display: none;
    line-height: 1.3;
}

.error-slot.visible {
    display: block;
}

.btn {
    width: 100%;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: var(--btn-radius);
    font-size: 15px;
    font-weight: 500;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.55;
    pointer-events: none;
}

.btn-primary {
    background: var(--btn-accent);
    color: var(--tg-button-text);
    border-color: var(--btn-accent);
}

.btn-primary:hover {
    background: var(--btn-accent-hover);
    border-color: var(--btn-accent-hover);
}

.btn-primary:active {
    background: var(--btn-accent-active);
    border-color: var(--btn-accent-active);
}

.btn-secondary {
    background: var(--btn-bg);
    color: var(--btn-text);
    border: 1px solid var(--btn-border);
}

.btn-secondary:hover {
    border-color: var(--btn-border-accent);
    background: var(--btn-bg-hover);
}

.btn-secondary:active {
    background: var(--btn-bg-active);
}

.btn-collapsible {
    overflow: hidden;
    max-height: 52px;
    opacity: 1;
    transition: max-height 0.28s ease, opacity 0.24s ease, transform 0.24s ease, margin 0.24s ease, padding 0.24s ease, border-width 0.24s ease;
}

.btn-collapsible.is-hidden {
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    pointer-events: none;
}

.btn-collapsible.is-gone {
    display: none !important;
}

.cta-stack {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    width: min(394px, calc(100% - 24px));
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    box-shadow: var(--shadow);
    z-index: 50;
}

.loader-block {
    padding: 32px 0;
}

.loader-icon {
    color: var(--action);
    margin-bottom: 12px;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.canvas {
    width: min(394px, 100vw);
    margin: 0 auto;
    position: relative;
}

.content-346 {
    width: 346px;
    margin-left: auto;
    margin-right: auto;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 24px;
    height: 18px;
    min-width: 137px;
    padding: 0 8px;
    gap: 6px;
    border-radius: 10px;
    background: var(--line);
    color: var(--muted);
    font-size: 9px;
    line-height: 1;
}

.status-pill--green {
    background: var(--green-bg);
    color: var(--green-text);
}

.status-pill--yellow {
    background: rgba(234, 179, 8, 0.2);
    color: #a16207;
}

.status-pill--red {
    background: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.status-pill--neutral,
.status-pill--loading {
    background: var(--line);
    color: var(--muted);
}

.status-pill-logo {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' rx='12' fill='%231f2937'/%3E%3Ctext x='12' y='15' font-size='9' text-anchor='middle' fill='white' font-family='Arial'%3ERP%3C/text%3E%3C/svg%3E");
}

.status-pill-text {
    white-space: nowrap;
}

.company-name {
    margin: 16px 24px 0;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 500;
}

.meta {
    margin-left: 24px;
    width: 320px;
    font-size: 12px;
    line-height: 1.9;
    font-weight: 400;
}

.meta.light {
    font-weight: 300;
}

.result-card {
    width: 346px;
    margin: 22px auto 0;
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.risk-head {
    display: grid;
    grid-template-columns: 8px 1fr auto;
    gap: 9px;
    align-items: center;
    padding: 10px 12px 9px 8px;
    background: rgba(255, 12, 12, 0.11);
}

.risk-mark {
    width: 8px;
    height: 30px;
    border-radius: 6px;
    background: var(--risk-red);
}

.risk-head h2 {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--text);
}

#risk-level-text {
    text-transform: lowercase;
    color: var(--text);
}

.risk-head small {
    font-size: 12px;
    line-height: 1;
    font-weight: 400;
    color: var(--muted);
}

.risk-summary-block {
    padding: 16px 24px 0;
    margin-bottom: 16px;
}

.summary-title {
    font-size: 12px;
    line-height: 1.4;
    font-weight: 400;
    color: var(--muted);
    margin-bottom: 10px;
}

.risk-details {
    list-style: none;
    margin: 0;
    padding: 0;
}

#risk-details li.risk-entry-title {
    margin-top: 14px;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 400;
}

#risk-details li.risk-entry-title strong {
    font-weight: 400;
}

#risk-details li.risk-entry-title:first-child {
    margin-top: 0;
}

#risk-details li.risk-entry-text {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.55;
    font-weight: 300;
}

#risk-details li.risk-entry-text + li.risk-entry-title {
    margin-top: 16px;
}

.risk-last-updated {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
}

.result-subsection {
    margin-top: 14px;
    padding: 14px 24px 0;
    border-top: 1px solid var(--line);
}

#result-history-details li.history-entry-title {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
}

#result-history-details {
    margin: 0 0 16px;
    padding: 0;
}

#result-history-details li.history-entry-title:first-child {
    margin-top: 0;
}

#result-history-details li.history-entry-date {
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.4;
    color: var(--muted);
}

.result-card-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 346px;
    margin: 22px auto 0;
    padding: 0;
}

.result-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.save-btn {
    flex: 1;
    min-height: 48px;
    border: 1px solid var(--btn-border);
    border-radius: var(--btn-radius);
    background: var(--btn-bg);
    color: var(--btn-text);
    font: 500 15px/1.2 Roboto, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.08s ease;
}

.save-btn:hover {
    border-color: var(--btn-border-accent);
    background: var(--btn-bg-hover);
}

.save-btn:active {
    background: var(--btn-bg-active);
    transform: translateY(1px);
}

.btn-icon {
    width: 48px;
    height: 48px;
    border: 1px solid var(--btn-border);
    border-radius: var(--btn-radius);
    background: var(--btn-bg);
    color: var(--btn-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.08s ease;
}

.btn-icon:hover {
    border-color: var(--btn-border-accent);
    background: var(--btn-bg-hover);
}

.btn-icon:active {
    background: var(--btn-bg-active);
    transform: translateY(1px);
}

.btn-share-accent {
    color: var(--btn-accent);
}

.summary-report-btn {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--btn-border);
    border-radius: var(--btn-radius);
    background: var(--btn-bg);
    color: var(--btn-text);
    font: 500 15px/1.2 Roboto, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.08s ease;
}

.summary-report-btn:hover {
    border-color: var(--btn-border-accent);
    background: var(--btn-bg-hover);
}

.summary-report-btn:active {
    background: var(--btn-bg-active);
    transform: translateY(1px);
}

.summary-report-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    border-color: var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-muted);
}

.pdf-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 20px;
    padding: 0 6px;
    border-radius: 4px;
    background: #e53935;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.risk-icon {
    display: none;
}

.director-block {
    margin-top: 24px;
}

.alert-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--alert-bg);
    color: var(--alert-text);
    font-size: 9px;
    line-height: 1.2;
    text-align: right;
}

.details-block {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}


.flat-section {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.flat-section--director {
    padding-bottom: 0;
    border-bottom: 0;
}

.flat-section-title {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
    color: var(--text);
}

.flat-section-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

 .flat-expandable {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--tg-secondary-bg);
    overflow: hidden;
}

.flat-expandable-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    user-select: none;
}

.flat-expandable-summary::-webkit-details-marker {
    display: none;
}

.flat-expandable-summary-text {
    font-size: 12px;
    line-height: 1.4;
    color: var(--btn-accent);
    font-weight: 500;
}

.flat-expandable-summary-icon {
    font-size: 12px;
    line-height: 1;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.flat-expandable[open] .flat-expandable-summary-icon {
    transform: rotate(180deg);
}

.flat-expandable-list {
    list-style: none;
    margin: 0;
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flat-expandable-item {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
    word-break: break-word;
}

.flat-line {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    word-break: break-word;
}

.flat-line--label {
    margin-top: 4px;
    font-weight: 600;
}

.flat-line--muted {
    color: var(--muted);
}

.flat-line--alert {
    color: var(--alert-text);
}

.flat-line--link {
    color: var(--btn-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.flat-group-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
}

.row {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
    display: grid;
    gap: 6px;
}

.compact {
    line-height: 1.45;
}

.structured-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
}

.structured-pending {
    border-style: dashed;
}

.structured-pending-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--muted);
}

.loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    display: inline-block;
    animation: spin 1s linear infinite;
}

.structured-title {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 8px;
}

.structured-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.structured-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    background: var(--surface);
}

.structured-item-title {
    font-size: 11px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--muted);
}

.structured-item-main {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 500;
}

.structured-meta {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted);
    word-break: break-word;
}

.structured-alert {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--alert-text);
}

.structured-list {
    margin: 6px 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--text);
}

.list-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
}

.lists-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.list-item {
    position: relative;
    background: var(--tg-bg);
    border-radius: 12px;
    padding: 16px 16px 16px 20px;
    min-height: 72px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.list-item:active {
    transform: scale(0.98);
}

.list-indicator {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 40px;
    border-radius: 4px;
}

.list-content {
    padding-left: 12px;
    overflow: hidden;
    width: 100%;
}

.list-title {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.list-delete-btn {
    flex-shrink: 0;
    margin-left: 10px;
    border: 1px solid rgba(229, 57, 53, 0.45);
    background: var(--btn-bg);
    color: var(--btn-danger);
    border-radius: var(--btn-radius);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.08s ease;
}

.list-delete-btn:hover {
    border-color: var(--btn-danger);
    background: rgba(229, 57, 53, 0.12);
}

.list-delete-btn:active {
    background: rgba(229, 57, 53, 0.2);
    transform: translateY(1px);
}

.btn-action {
    flex: 1;
    padding: 10px 12px;
    border-radius: var(--btn-radius);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--btn-border);
    cursor: pointer;
    background: var(--btn-bg);
    color: var(--btn-text);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.08s ease;
}

.btn-action:hover {
    border-color: var(--btn-border-accent);
    background: var(--btn-bg-hover);
}

.btn-action:active {
    background: var(--btn-bg-active);
    transform: translateY(1px);
}

.btn-clear-history {
    flex: none;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--btn-accent);
    border-color: var(--btn-accent);
}

.btn-clear-history:hover,
.btn-edit-favs:hover {
    border-color: var(--btn-accent-hover);
    background: var(--btn-bg-hover);
}

.btn-clear-history:active,
.btn-edit-favs:active {
    border-color: var(--btn-accent-active);
    background: var(--btn-bg-active);
}

.btn-edit-favs {
    flex: none;
    min-width: 88px;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--btn-accent);
    border-color: var(--btn-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-edit-favs.is-active {
    background: var(--btn-bg-active);
    border-color: var(--btn-accent);
}

button:focus-visible {
    outline: 2px solid var(--btn-focus);
    outline-offset: 2px;
}

.empty-state {
    text-align: center;
    padding: 24px;
    background: var(--tg-bg);
    border-radius: 12px;
    color: var(--tg-hint);
    font-size: 14px;
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiet-toast {
    position: fixed;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 86px);
    transform: translateX(-50%) translateY(8px);
    background: rgba(17, 24, 39, 0.88);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 80;
}

.quiet-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (prefers-color-scheme: dark) {
    :root {
        --tg-bg: #1e1f24;
        --tg-text: #f4f6fb;
        --tg-hint: #a8afc0;
        --tg-secondary-bg: #16181d;
        --tg-button: #8e63ff;
        --tg-button-text: #ffffff;
        --tg-separator: rgba(168, 175, 192, 0.28);
        --btn-border-accent: #7d64bd;
        --btn-accent-hover: #9b74ff;
        --btn-accent-active: #7f54ef;
        --btn-focus: rgba(142, 99, 255, 0.36);
        --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    }

    .quiet-toast {
        background: rgba(12, 14, 18, 0.92);
        color: #f4f6fb;
    }
}

@media (max-width: 393px) {
    .canvas {
        width: calc(100vw - 24px);
    }

    .content-346,
    .result-card {
        width: calc(100vw - 48px);
    }

    .meta {
        width: calc(100vw - 74px);
    }

    .result-card-actions {
        width: calc(100vw - 48px);
    }

    .alert-pill {
        white-space: normal;
    }
}
