.tg-modal-dialog {
    --tg-ink: #1e1e1e;
    --tg-body: #2e2e2e;
    --tg-mute: #6c757d;
    --tg-line: #e6e6e6;
    --tg-soft: #eef1f4;
    --tg-paper: #ffffff;
    --tg-board: #f4f6fb;
    --tg-signal: #1482fa;
    --tg-signal-deep: #0b5ed7;
    --tg-signal-soft: #eef6ff;
    --tg-draft: #b8860b;
    --tg-draft-tint: rgba(184, 134, 11, 0.14);
    --tg-radius: 18px;
    --tg-ease: cubic-bezier(0.16, 1, 0.3, 1);
    max-width: min(720px, calc(100vw - 32px));
    width: 100%;
    transition: max-width 0.4s var(--tg-ease);
    font-family: RocheSans, Tahoma, Geneva, Verdana, sans-serif;
    color: var(--tg-body);
}

.tg-modal-dialog.has-tasks {
    max-width: min(1180px, calc(100vw - 24px));
}

.tg-modal-dialog .modal-content {
    border: 0;
    border-radius: var(--tg-radius);
    overflow: hidden;
    background: var(--tg-paper);
    color: var(--tg-body);
    padding: 0;
    box-shadow: 0 24px 80px rgba(30, 30, 30, 0.16);
}

.tg-layout {
    position: relative;
    display: flex;
    min-height: min(72vh, 680px);
    max-height: min(88vh, 860px);
    overflow: hidden;
}

.tg-chat,
.tg-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

.tg-chat {
    position: relative;
    flex: 1 1 auto;
    padding: 28px 28px 22px;
}

.tg-layout[data-mode="welcome"] .tg-chat {
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.tg-layout[data-mode="thread"] .tg-chat {
    padding: 18px 18px 16px;
    overflow: hidden;
}

.tg-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--tg-mute);
    cursor: pointer;
}

.tg-close:hover,
.tg-close:focus-visible {
    background: var(--tg-board);
    color: var(--tg-ink);
    outline: none;
}

.tg-layout.has-tasks .tg-close {
    background: #fff;
}

.tg-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 22px;
    max-width: 440px;
}

.tg-layout[data-mode="thread"] .tg-welcome,
.tg-layout[data-mode="thread"] .tg-suggestions {
    display: none;
}

.tg-orb {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
}

.tg-orb svg {
    width: 100%;
    height: 100%;
}

.tg-orb-shift {
    animation: tg-orb-drift 7s ease-in-out infinite;
    transform-origin: 100px 100px;
}

.tg-welcome h2 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    background: linear-gradient(90deg, var(--tg-signal-deep), var(--tg-signal) 55%, #4aa3ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tg-welcome p {
    margin: 8px 0 0;
    color: var(--tg-mute);
    font-size: 0.95rem;
    line-height: 1.45;
}

.tg-thread {
    flex: 1;
    min-height: 0;
    display: none;
}

.tg-layout[data-mode="thread"] .tg-thread {
    display: flex;
    flex-direction: column;
    margin: 8px 0 12px;
}

.tg-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 8px 4px;
}

.tg-message {
    max-width: min(86%, 520px);
    padding: 0.7rem 0.9rem;
    border-radius: 16px;
    line-height: 1.45;
    font-size: 0.92rem;
}

.tg-message-text {
    white-space: pre-wrap;
}

.tg-msg-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tg-msg-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
}

.tg-msg-file span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-message--user {
    align-self: flex-end;
    background: var(--tg-signal-soft);
    color: #134489;
    border-bottom-right-radius: 6px;
}

.tg-message--assistant {
    align-self: flex-start;
    background: var(--tg-board);
    color: var(--tg-ink);
    border-bottom-left-radius: 6px;
}

.tg-message--error {
    align-self: stretch;
    max-width: 100%;
    background: #fff1f1;
    color: #9b1c1c;
}

.tg-typing {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 0.9rem;
    border-radius: 16px;
    border-bottom-left-radius: 6px;
    background: var(--tg-board);
    color: var(--tg-mute);
    font-size: 0.82rem;
}

.tg-typing-dots {
    display: inline-flex;
    gap: 4px;
}

.tg-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tg-signal);
    animation: tg-dot 1s ease-in-out infinite;
}

.tg-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.tg-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

.tg-composer {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    border: 1px solid var(--tg-line);
    border-radius: 16px;
    background: var(--tg-paper);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.tg-composer.is-dragover {
    border-color: var(--tg-signal);
    background: var(--tg-signal-soft);
}

.tg-layout[data-mode="thread"] .tg-composer {
    max-width: none;
    margin: 0;
}

.tg-composer textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    max-height: 160px;
    margin: 0;
    padding: 14px 16px 8px;
    border: 0;
    resize: none;
    outline: none;
    background: transparent;
    color: var(--tg-ink);
    font: inherit;
    font-size: 1rem;
    line-height: 1.4;
}

.tg-composer textarea::placeholder {
    color: #9aa3ad;
}

.tg-file-list {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0 16px 8px;
    list-style: none;
}

.tg-file-list:not(:empty) {
    display: flex;
}

.tg-file-list li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--tg-line);
    border-radius: 8px;
    background: var(--tg-board);
    color: var(--tg-body);
    font-size: 0.75rem;
}

.tg-file-list li span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-file-list li.tg-file--video {
    background: #e8f1ff;
    border-color: rgba(20, 130, 250, 0.22);
    color: #134489;
}

.tg-msg-file--video {
    background: #d7e8ff;
    color: #134489;
}

.tg-file-list button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tg-mute);
    cursor: pointer;
}

.tg-file-list button:hover {
    color: var(--tg-ink);
}

.tg-composer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px 10px 12px;
}

.tg-composer-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tg-epic-picker {
    position: relative;
    min-width: 0;
}

.tg-epic {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 180px;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: var(--tg-board);
    color: var(--tg-body);
    font: inherit;
    font-size: 0.8rem;
    line-height: 1.3;
    text-align: left;
    appearance: none;
    cursor: pointer;
}

.tg-epic:hover:not(:disabled),
.tg-epic:focus-visible {
    background: #eef2f8;
    outline: none;
}

.tg-epic.is-filled {
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(20, 130, 250, 0.18);
}

.tg-epic-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-epic > .fa-chevron-down {
    margin-left: auto;
    flex: 0 0 auto;
    color: var(--tg-mute);
    font-size: 10px;
}

.tg-epic:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tg-parent-menu.task-link-picker-user-menu {
    --task-line: var(--ph-line, #e6e6e6);
    z-index: 2000;
    min-width: 220px;
    max-height: 240px;
    overflow: auto;
    padding: 6px;
    border: 1px solid var(--ph-line, #e6e6e6);
    border-radius: 12px;
    background: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 16px 36px -12px rgba(30, 30, 30, 0.18);
    font-family: RocheSans, Tahoma, Geneva, Verdana, sans-serif;
    color: var(--task-ink, #2e2e2e);
}

.tg-parent-menu .task-link-picker-user-search {
    display: block;
    width: 100%;
    min-height: 36px;
    margin-bottom: 4px;
    padding: 0 10px;
    border: 1px solid var(--ph-line, #e6e6e6);
    border-radius: 8px;
    background: #f7f7f7;
    color: var(--task-ink, #2e2e2e);
    font-size: 13px;
}

.tg-parent-menu .task-link-picker-user-search:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(20, 130, 250, 0.22);
}

.tg-parent-menu .task-link-picker-user-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 36px;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--task-ink, #2e2e2e);
    font-size: 13px;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.tg-parent-menu .task-link-picker-user-option:hover,
.tg-parent-menu .task-link-picker-user-option.is-active {
    background: #f4f6fb;
}

.tg-parent-menu .task-link-picker-user-option:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 130, 250, 0.22);
}

.tg-parent-menu .task-link-picker-user-option-empty {
    color: var(--task-muted, #6c757d);
}

.tg-parent-menu .task-link-picker-user-option-name {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-parent-menu .task-link-picker-user-option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    font-size: 12px;
}

.tg-parent-menu .task-link-picker-user-option-check {
    flex: 0 0 auto;
    color: var(--task-primary, #1482FA);
    font-size: 0.7rem;
    opacity: 0;
}

.tg-parent-menu .task-link-picker-user-option.is-active .task-link-picker-user-option-check {
    opacity: 1;
}

.tg-parent-menu .task-link-picker-user-empty {
    margin: 0;
    padding: 10px 8px;
    color: var(--task-muted, #6c757d);
    font-size: 12px;
    text-align: center;
}

#taskGenerationModal.is-parent-picker-open {
    overflow: visible;
}

.tg-modal-dialog.is-picker-open .modal-content,
.tg-modal-dialog.is-picker-open .tg-layout,
.tg-modal-dialog.is-picker-open .tg-chat {
    overflow: visible;
}

.tg-upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--tg-mute);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.tg-upload:hover:not(:disabled),
.tg-upload:focus-visible {
    background: var(--tg-board);
    color: var(--tg-ink);
    outline: none;
}

.tg-upload:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.tg-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--tg-board);
    color: #9aa3ad;
    cursor: not-allowed;
}

.tg-send.is-ready {
    background: var(--tg-signal);
    color: #fff;
    cursor: pointer;
}

.tg-send.is-ready:hover {
    background: var(--tg-signal-deep);
}

.tg-send:disabled {
    cursor: not-allowed;
}

.tg-suggestions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 560px;
    margin-top: 14px;
}

.tg-suggestions[hidden] {
    display: none;
}

.tg-suggest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.tg-suggest {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 84px;
    padding: 14px 10px;
    border: 1px solid var(--tg-line);
    border-radius: 14px;
    background: var(--tg-paper);
    color: var(--tg-body);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.tg-suggest i {
    color: var(--tg-mute);
    font-size: 1.05rem;
    transition: color 0.15s ease;
}

.tg-suggest:hover,
.tg-suggest:focus-visible {
    border-color: #c8dcff;
    background: var(--tg-signal-soft);
    outline: none;
    transform: translateY(-1px);
}

.tg-suggest:hover i,
.tg-suggest:focus-visible i,
.tg-suggest.is-active i {
    color: var(--tg-signal);
}

.tg-suggest.is-active {
    border-color: #b9d4ff;
    background: var(--tg-signal-soft);
    color: var(--tg-signal-deep);
    box-shadow: 0 1px 0 rgba(20, 130, 250, 0.12);
    transform: none;
}

.tg-suggest-panel {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.28s var(--tg-ease), opacity 0.2s ease;
}

.tg-suggestions.is-open .tg-suggest-panel {
    grid-template-rows: 1fr;
    opacity: 1;
}

.tg-suggest-panel-inner {
    min-height: 0;
    overflow: hidden;
}

.tg-suggest-panel-card {
    border: 1px solid var(--tg-line);
    border-radius: 14px;
    background: var(--tg-paper);
    overflow: hidden;
}

.tg-suggest-panel-title {
    margin: 0;
    padding: 11px 14px;
    border-bottom: 1px solid var(--tg-line);
    color: var(--tg-ink);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.tg-suggest-list {
    display: flex;
    flex-direction: column;
}

.tg-suggest-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 11px 14px;
    border: 0;
    border-top: 1px solid var(--tg-line);
    background: transparent;
    color: var(--tg-body);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.tg-suggest-item:first-child {
    border-top: 0;
}

.tg-suggest-item i {
    margin-top: 2px;
    color: var(--tg-signal);
    font-size: 0.85rem;
}

.tg-suggest-item:hover,
.tg-suggest-item:focus-visible {
    background: var(--tg-board);
    outline: none;
}

.tg-suggestions.is-open .tg-suggest-item {
    animation: tg-suggest-in 0.28s var(--tg-ease) both;
}

.tg-suggestions.is-open .tg-suggest-item:nth-child(2) { animation-delay: 0.04s; }
.tg-suggestions.is-open .tg-suggest-item:nth-child(3) { animation-delay: 0.08s; }
.tg-suggestions.is-open .tg-suggest-item:nth-child(4) { animation-delay: 0.12s; }
.tg-suggestions.is-open .tg-suggest-item:nth-child(5) { animation-delay: 0.16s; }

@keyframes tg-suggest-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.tg-error {
    width: 100%;
    max-width: 560px;
    margin: 10px 0 0;
    color: var(--task-danger, #dc2626);
    font-size: 0.8rem;
}

.tg-sidebar {
    display: none;
    flex: 0 0 380px;
    width: 380px;
    background: var(--tg-board);
    border-left: 1px solid var(--tg-line);
}

.tg-layout.has-tasks .tg-sidebar {
    display: flex;
    animation: tg-rail-in 0.4s var(--tg-ease);
}

.tg-sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 16px 10px;
}

.tg-layout.has-tasks .tg-sidebar-head {
    padding-right: 48px;
}

.tg-sidebar-head h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tg-ink);
}

.tg-sidebar-head p {
    margin: 4px 0 0;
    color: var(--tg-mute);
    font-size: 0.75rem;
    line-height: 1.35;
}

.tg-preview-count {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff;
    color: var(--tg-mute);
    font-size: 0.75rem;
    font-weight: 650;
}

.tg-preview {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 12px 12px;
}

.tg-kcard {
    background: #fff;
    border: 1px solid var(--tg-line);
    border-radius: 0.75rem;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.05);
    cursor: pointer;
}

.tg-kcard.has-type-fill {
    background-image: linear-gradient(to bottom right, #f3f3f3, var(--tg-card-type-tint));
}

.tg-kcard.is-expanded {
    cursor: default;
    box-shadow: 0 0 0 2px rgba(20, 130, 250, 0.28), 0 10px 16px rgba(30, 30, 30, 0.08);
}

.tg-kcard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.tg-kcard-identity {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.tg-kcard-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tg-signal);
    font-size: 0.78rem;
}

.tg-kcard-id {
    color: var(--tg-mute);
    font-size: 0.78rem;
    font-weight: 600;
}

.tg-kcard-draft {
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--tg-draft-tint);
    color: var(--tg-draft);
    font-size: 11px;
    font-weight: 600;
}

.tg-kcard-title {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
}

.tg-kcard-priority {
    display: inline-flex;
    width: 14px;
    margin: 0.2em 0.2em 0 0;
    font-size: 0.78rem;
    line-height: 1;
}

.tg-kcard-priority.is-blocker { color: #c9372c; }
.tg-kcard-priority.is-high { color: #e8590c; }
.tg-kcard-priority.is-medium { color: #ca8a04; }
.tg-kcard-priority.is-low { color: #64748b; }

.tg-kcard-title-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.3;
    padding: 0;
}

.tg-kcard-title-input:focus {
    outline: none;
}

.tg-kcard-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--tg-mute);
    font-size: 0.75rem;
}

.tg-kcard-due,
.tg-kcard-effort {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tg-kcard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.65rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--tg-line);
    color: var(--tg-mute);
    font-size: 0.72rem;
}

.tg-kcard-more {
    margin-left: auto;
    color: var(--tg-signal);
    font-weight: 600;
}

.tg-kcard-more::after {
    content: 'править';
}

.tg-kcard.is-expanded .tg-kcard-more::after {
    content: 'свернуть';
}

.tg-kcard-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-kcard-stat i {
    color: var(--tg-signal);
}

.tg-kcard .assignee-chips {
    display: inline-flex;
    align-items: center;
}

.tg-kcard .assignee-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 600;
    font-size: 0.7rem;
    border: 1px solid #fff;
}

.tg-kcard .assignee-chips .assignee-chip + .assignee-chip {
    margin-left: -6px;
}

.tg-kcard-editor {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--tg-line);
}

.tg-kcard.is-expanded .tg-kcard-editor {
    display: flex;
}

.tg-kcard-editor select,
.tg-kcard-editor textarea,
.tg-kcard-editor input {
    width: 100%;
    border: 1px solid var(--tg-line);
    border-radius: 8px;
    background: #fff;
    color: var(--tg-body);
    font: inherit;
    font-size: 0.8rem;
    padding: 6px 8px;
}

.tg-kcard-editor textarea {
    min-height: 72px;
    resize: vertical;
}

.tg-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tg-sidebar-foot {
    padding: 10px 16px 16px;
}

.tg-apply {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    background: var(--tg-signal);
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 650;
    cursor: pointer;
}

.tg-apply:hover:not(:disabled) {
    background: var(--tg-signal-deep);
}

.tg-apply:disabled {
    background: #d7dbe0;
    color: #8b939c;
    cursor: not-allowed;
}

.task-tracker-cta-secondary {
    background: #fff;
    color: var(--task-charcoal, #1e1e1e);
    border: 1px solid #d7dbe0;
}

.task-tracker-cta.task-tracker-cta-secondary:hover {
    background: var(--task-primary);
}

@keyframes tg-orb-drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(6px, -8px) rotate(300deg); }
}

@keyframes tg-dot {
    0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}

@keyframes tg-rail-in {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 900px) {
    .tg-modal-dialog,
    .tg-modal-dialog.has-tasks {
        max-width: calc(100vw - 16px);
    }

    .tg-layout {
        flex-direction: column;
        max-height: min(92vh, 920px);
    }

    .tg-sidebar {
        flex-basis: auto;
        width: 100%;
        border-left: 0;
        border-top: 1px solid var(--tg-line);
        max-height: 42vh;
    }

    .tg-suggestions {
        max-width: none;
    }

    .tg-suggest-grid {
        grid-template-columns: 1fr;
    }

    .tg-welcome h2 {
        font-size: 1.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tg-orb-shift,
    .tg-typing-dots span,
    .tg-layout.has-tasks .tg-sidebar {
        animation: none;
    }

    .tg-modal-dialog,
    .tg-suggest,
    .tg-suggest-panel {
        transition: none;
    }

    .tg-suggestions.is-open .tg-suggest-item {
        animation: none;
    }
}
