.tg-file-tool-section {
    background: #f8f8f6;
}

.tg-file-tool-heading {
    align-items: end;
}

.tg-file-tool-heading > p {
    max-width: 40rem;
    margin: 0;
    color: var(--tg007-muted);
}

.tg-file-tool-status {
    margin: 0 0 1.25rem;
    padding: .9rem 1rem;
    border: 1px solid #c8d5df;
    background: #eef4f8;
    color: #29485f;
    font-weight: 600;
}

.tg-file-tool-status[hidden] {
    display: none !important;
}

.tg-file-tool-status-error {
    border-color: #d8bcbc;
    background: #fbefef;
    color: #7a3333;
}

.tg-file-tool-status-success {
    border-color: #b9d0c0;
    background: #eef7f0;
    color: #2f5f3d;
}

.tg-file-tool-status-progress {
    display: grid;
    gap: .2rem;
}

.tg-file-tool-status a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tg-file-queue-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--tg007-line);
    background: #fff;
}

.tg-file-queue-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: .91rem;
}

.tg-file-queue-table th,
.tg-file-queue-table td {
    padding: .9rem .85rem;
    border-bottom: 1px solid var(--tg007-line);
    vertical-align: top;
    text-align: left;
}

.tg-file-queue-table th {
    color: #425461;
    background: #edf1f4;
    font-family: "Space Grotesk", sans-serif;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.tg-file-queue-table tbody tr:last-child td {
    border-bottom: 0;
}

.tg-file-queue-table tbody tr:hover {
    background: #fafbfb;
}

.tg-file-queue-table td strong {
    display: block;
    color: #1d2d39;
    font-family: "Space Grotesk", sans-serif;
    font-size: .98rem;
}

.tg-file-queue-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: .35rem;
    font-size: .78rem;
}

.tg-file-queue-inline-actions a,
.tg-file-queue-text-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tg007-blue-dark);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.tg-file-queue-inline-actions a:hover,
.tg-file-queue-inline-actions a:focus-visible,
.tg-file-queue-text-button:hover,
.tg-file-queue-text-button:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tg-file-queue-actions-head,
.tg-file-queue-actions {
    text-align: right !important;
}

.tg-file-queue-actions {
    white-space: nowrap;
}

.tg-file-queue-action {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-left: .3rem;
    padding: .42rem .65rem;
    border: 1px solid #b9c7d1;
    background: #fff;
    color: #2e536e;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
}

.tg-file-queue-action:hover,
.tg-file-queue-action:focus-visible {
    border-color: #6f91a9;
    background: #eff4f7;
}

.tg-file-queue-action-danger {
    border-color: #d3b4b4;
    color: #884242;
}

.tg-file-queue-action-danger:hover,
.tg-file-queue-action-danger:focus-visible {
    border-color: #b97d7d;
    background: #fbf0f0;
}

.tg-file-queue-action:disabled {
    opacity: .5;
    cursor: wait;
}

.tg-file-queue-muted {
    color: #9aa5ad;
}

.tg-file-tool-dialog {
    width: min(760px, calc(100vw - 32px));
    max-height: min(82vh, 820px);
    padding: 0;
    border: 1px solid #b8c5ce;
    border-radius: 4px;
    background: #fff;
    color: var(--tg007-text);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.tg-file-tool-dialog::backdrop {
    background: rgba(11, 16, 20, .7);
}

.tg-file-tool-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid #d7e0e6;
    background: #eef2f5;
}

.tg-file-tool-dialog-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.tg-file-tool-dialog-head button {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #b8c5ce;
    background: #fff;
    color: #344957;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.tg-file-tool-dialog-body {
    max-height: 65vh;
    overflow-y: auto;
    padding: 1.15rem 1.25rem 1.35rem;
}

.tg-file-tool-dialog-body > :first-child {
    margin-top: 0;
}

.tg-file-tool-dialog-body > :last-child {
    margin-bottom: 0;
}

.tg-file-queue-edit-dialog {
    width: min(880px, calc(100vw - 24px));
    height: min(86vh, 900px);
}

.tg-file-queue-edit-dialog iframe {
    display: block;
    width: 100%;
    height: calc(100% - 57px);
    border: 0;
    background: #f8f8f6;
}

.tg-file-submit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
    gap: 2rem;
    align-items: start;
}

.tg-file-submit-main,
.tg-file-tool-panel,
.tg-file-tool-access {
    border: 1px solid var(--tg007-line);
    background: #fff;
}

.tg-file-submit-main {
    padding: 1.6rem;
}

.tg-file-submit-sidebar {
    display: grid;
    gap: 1.25rem;
}

.tg-file-tool-panel {
    padding: 1.25rem;
}

.tg-file-tool-panel h2,
.tg-file-tool-access h2 {
    margin: .25rem 0 .65rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.35rem;
}

.tg-file-tool-panel p,
.tg-file-tool-access p {
    color: var(--tg007-muted);
}

.tg-file-tool-access {
    max-width: 760px;
    margin-inline: auto;
    padding: 2rem;
    text-align: center;
}

.tg-file-tool-access-warning {
    border-top: 4px solid #a47b3c;
}

.tg-file-tool-access-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.2rem;
}

.tg-file-submit-form {
    display: grid;
    gap: 1.25rem;
}

.tg-file-submit-form.is-submitting {
    opacity: .55;
    pointer-events: none;
}

.tg-file-form-section {
    padding: 1.15rem;
    border: 1px solid #d8e0e6;
    background: #f8fafb;
}

fieldset.tg-file-form-section {
    min-width: 0;
}

.tg-file-form-section legend {
    float: none;
    width: auto;
    margin: 0 0 .8rem;
    padding: 0;
    color: #233744;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.tg-file-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.15rem;
}

.tg-file-field {
    display: grid;
    gap: .4rem;
}

.tg-file-field-wide {
    grid-column: 1 / -1;
}

.tg-file-field label,
.tg-file-source-section > legend {
    color: #2c3f4c;
}

.tg-file-field label {
    font-size: .86rem;
    font-weight: 700;
}

.tg-file-field label span,
.tg-file-form-section legend span {
    color: #8b4545;
}

.tg-file-field input,
.tg-file-field select,
.tg-file-field textarea,
.tg-queue-edit-field input,
.tg-queue-edit-field select,
.tg-queue-edit-field textarea {
    width: 100%;
    min-height: 44px;
    padding: .68rem .75rem;
    border: 1px solid #bdc9d1;
    border-radius: 3px;
    background: #fff;
    color: #1d2730;
    font: inherit;
}

.tg-file-field textarea,
.tg-queue-edit-field textarea {
    min-height: 150px;
    resize: vertical;
}

.tg-file-field input:focus,
.tg-file-field select:focus,
.tg-file-field textarea:focus,
.tg-queue-edit-field input:focus,
.tg-queue-edit-field select:focus,
.tg-queue-edit-field textarea:focus {
    outline: 3px solid rgba(47, 110, 165, .18);
    border-color: #6b93b0;
}

.tg-file-field small {
    color: var(--tg007-muted);
    font-size: .78rem;
}

.tg-file-source-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.4rem;
    margin-bottom: 1rem;
}

.tg-file-source-options label,
.tg-file-checkbox {
    display: inline-flex;
    align-items: flex-start;
    gap: .5rem;
    color: #334a5a;
    font-size: .88rem;
    font-weight: 650;
}

.tg-file-source-options input,
.tg-file-checkbox input {
    margin-top: .24rem;
}

.tg-file-upload-control,
.tg-file-screenshot-form {
    display: grid;
    gap: .65rem;
}

.tg-file-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 54px;
    padding: .75rem .9rem;
    border: 1px dashed #8da5b6;
    background: #fff;
    color: #2d536d;
    cursor: pointer;
}

.tg-file-picker:hover,
.tg-file-picker:focus-within {
    border-color: #4f7e9d;
    background: #f2f7fa;
}

.tg-file-picker span {
    font-weight: 750;
}

.tg-file-picker small {
    color: var(--tg007-muted);
}

.tg-file-upload-control > input[type="file"],
.tg-file-screenshot-form > input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.tg-file-picker-name {
    color: var(--tg007-muted);
    font-size: .8rem;
}

.tg-file-submission-options {
    background: #fff;
}

.tg-file-submit-button {
    justify-self: start;
    min-width: 220px;
}

.tg-file-submit-frame {
    position: absolute;
    width: 1px;
    height: 1px;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.tg-file-screenshot-preview {
    display: grid;
    place-items: center;
    min-height: 150px;
    margin: 1rem 0;
    border: 1px solid #d6dfe5;
    background: #f4f7f9;
    color: #7b8892;
    text-align: center;
}

.tg-file-screenshot-preview img {
    display: block;
    width: 100%;
    max-height: 230px;
    object-fit: contain;
    background: #fff;
}

.tg-file-screenshot-preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: .6rem .7rem;
    border-top: 1px solid #d6dfe5;
    background: #fff;
    color: #3b6348;
    font-size: .78rem;
    font-weight: 700;
}

.tg-file-screenshot-preview-meta button {
    border: 0;
    background: transparent;
    color: #8a4141;
    font: inherit;
    cursor: pointer;
}

.tg-file-rules-panel ol {
    margin: .9rem 0 1rem;
    padding-left: 1.2rem;
    color: #485b68;
}

.tg-file-rules-panel li + li {
    margin-top: .48rem;
}

/* Standalone queue editor loaded inside the native dialog iframe. */
body.tg-queue-edit-body {
    margin: 0;
    background: #f8f8f6;
    color: #1d2730;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tg-queue-edit-shell {
    padding: 1rem;
}

.tg-queue-edit-intro {
    margin-bottom: 1rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid #d8e0e6;
}

.tg-queue-edit-intro h1 {
    margin: 0 0 .25rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.35rem;
}

.tg-queue-edit-intro p {
    margin: 0;
    color: #677581;
    font-size: .84rem;
}

.tg-queue-edit-form {
    display: grid;
    gap: 1rem;
}

.tg-queue-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem 1rem;
}

.tg-queue-edit-field {
    display: grid;
    gap: .35rem;
}

.tg-queue-edit-field-wide {
    grid-column: 1 / -1;
}

.tg-queue-edit-field label,
.tg-queue-edit-checkbox {
    color: #334a5a;
    font-size: .82rem;
    font-weight: 700;
}

.tg-queue-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    padding-top: .25rem;
}

.tg-queue-edit-button {
    min-height: 42px;
    padding: .65rem .9rem;
    border: 1px solid #8ca6b8;
    background: #fff;
    color: #2f5873;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.tg-queue-edit-button-primary {
    border-color: #315f80;
    background: #315f80;
    color: #fff;
}

.tg-queue-edit-alert {
    margin-bottom: 1rem;
    padding: .8rem .9rem;
    border: 1px solid #d8bcbc;
    background: #fbefef;
    color: #7a3333;
}

.tg-queue-edit-success {
    display: grid;
    place-items: center;
    min-height: 280px;
    padding: 2rem;
    text-align: center;
}

.tg-queue-edit-success h1 {
    margin: 0 0 .5rem;
    font-family: "Space Grotesk", sans-serif;
}

@media (max-width: 980px) {
    .tg-file-submit-layout {
        grid-template-columns: 1fr;
    }

    .tg-file-submit-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .tg-file-queue-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .tg-file-queue-table,
    .tg-file-queue-table tbody,
    .tg-file-queue-table tr,
    .tg-file-queue-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .tg-file-queue-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .tg-file-queue-table tr {
        margin-bottom: .9rem;
        border: 1px solid var(--tg007-line);
        background: #fff;
    }

    .tg-file-queue-table td {
        display: grid;
        grid-template-columns: minmax(90px, 32%) 1fr;
        gap: .75rem;
        padding: .72rem .8rem;
        text-align: left !important;
        white-space: normal;
    }

    .tg-file-queue-table td::before {
        content: attr(data-label);
        color: #647581;
        font-size: .72rem;
        font-weight: 750;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .tg-file-queue-actions .tg-file-queue-action:first-of-type {
        margin-left: 0;
    }

    .tg-file-form-grid,
    .tg-queue-edit-grid,
    .tg-file-submit-sidebar {
        grid-template-columns: 1fr;
    }

    .tg-file-field-wide,
    .tg-queue-edit-field-wide {
        grid-column: auto;
    }

    .tg-file-submit-main {
        padding: 1rem;
    }

    .tg-file-picker {
        align-items: flex-start;
        flex-direction: column;
        gap: .2rem;
    }
}

@media (max-width: 520px) {
    .tg-file-queue-table td {
        grid-template-columns: 1fr;
        gap: .25rem;
    }

    .tg-file-tool-dialog,
    .tg-file-queue-edit-dialog {
        width: calc(100vw - 12px);
    }

    .tg-file-submit-button {
        width: 100%;
        justify-content: center;
    }
}

/* Build 0145 — compact Files-family queue and submission modernization. */
.tg-modern-hero--file-tools {
    padding-block: clamp(1rem, 2vw, 1.6rem);
}

.tg-modern-hero--file-tools .tg-modern-hero-grid {
    gap: 1.25rem;
}

.tg-file-tool-section {
    padding-block: clamp(1.25rem, 2vw, 2rem);
}

.tg-file-tool-heading {
    margin-bottom: .85rem;
}

.tg-file-tool-heading h2 {
    margin-bottom: 0;
}

.tg-file-tool-status {
    margin-bottom: .8rem;
    padding: .7rem .8rem;
    font-size: .86rem;
}

.tg-file-tool-status a,
.tg-file-rules-panel a {
    text-decoration: none;
}

.tg-file-tool-status a:hover,
.tg-file-tool-status a:focus-visible,
.tg-file-rules-panel a:hover,
.tg-file-rules-panel a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tg-file-queue-list {
    display: grid;
    gap: .55rem;
}

.tg-file-queue-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    padding: .8rem .9rem;
    border: 1px solid var(--tg007-line);
    background: #fff;
}

.tg-file-queue-card:hover {
    border-color: #c4d0d8;
    background: #fbfcfc;
}

.tg-file-queue-card-main {
    min-width: 0;
}

.tg-file-queue-card-kickers {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .28rem;
}

.tg-file-queue-badge,
.tg-file-queue-id {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: .15rem .42rem;
    border: 1px solid #ccd7df;
    background: #f1f5f7;
    color: #516875;
    font-size: .67rem;
    font-weight: 750;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.tg-file-queue-badge-own {
    border-color: #b9cfbd;
    background: #eef6ef;
    color: #41664a;
}

.tg-file-queue-id {
    border-color: transparent;
    background: transparent;
    color: #87949c;
    padding-inline: .2rem;
}

.tg-file-queue-card h3 {
    margin: 0;
    color: #1d2d39;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    line-height: 1.25;
}

.tg-file-queue-summary {
    max-width: 72rem;
    margin: .2rem 0 0;
    color: #526571;
    font-size: .84rem;
    line-height: 1.4;
}

.tg-file-queue-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .24rem .85rem;
    margin-top: .48rem;
    color: #657681;
    font-size: .73rem;
}

.tg-file-queue-meta span {
    display: inline-flex;
    gap: .28rem;
}

.tg-file-queue-meta strong {
    color: #41535f;
    font-weight: 750;
}

.tg-file-queue-card-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-direction: column;
    gap: .55rem;
    min-width: 150px;
}

.tg-file-queue-card-actions .tg-file-queue-inline-actions {
    justify-content: flex-end;
    margin-top: 0;
}

.tg-file-queue-buttons {
    display: flex;
    justify-content: flex-end;
    gap: .35rem;
}

.tg-file-queue-action {
    min-height: 30px;
    margin-left: 0;
    padding: .32rem .58rem;
    font-size: .73rem;
}

.tg-file-submit-layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 1rem;
}

.tg-file-submit-main {
    padding: 1rem;
}

.tg-file-submit-sidebar {
    gap: .75rem;
}

.tg-file-tool-panel {
    padding: .9rem;
}

.tg-file-tool-panel h2,
.tg-file-tool-access h2 {
    margin: .15rem 0 .4rem;
    font-size: 1.08rem;
}

.tg-file-tool-panel p,
.tg-file-tool-access p {
    margin-block: .35rem;
    font-size: .82rem;
    line-height: 1.45;
}

.tg-file-submit-form {
    gap: .7rem;
}

.tg-file-form-section {
    padding: .8rem;
}

.tg-file-form-section legend {
    margin-bottom: .55rem;
    font-size: .9rem;
}

.tg-file-form-grid {
    gap: .65rem .8rem;
}

.tg-file-field {
    gap: .25rem;
}

.tg-file-field label {
    font-size: .78rem;
}

.tg-file-field input,
.tg-file-field select,
.tg-file-field textarea,
.tg-queue-edit-field input,
.tg-queue-edit-field select,
.tg-queue-edit-field textarea,
.tg-queue-edit-reject textarea {
    min-height: 38px;
    padding: .5rem .58rem;
    font-size: .86rem;
}

.tg-file-field textarea,
.tg-queue-edit-field textarea {
    min-height: 112px;
}

.tg-file-source-options {
    gap: .7rem 1.1rem;
    margin-bottom: .65rem;
}

.tg-file-source-options label,
.tg-file-checkbox {
    font-size: .81rem;
}

.tg-file-submission-options small {
    display: block;
    margin-top: .45rem;
    color: var(--tg007-muted);
    font-size: .73rem;
    line-height: 1.4;
}

.tg-file-picker {
    min-height: 44px;
    padding: .55rem .7rem;
    font-size: .82rem;
}

.tg-file-screenshot-preview {
    min-height: 105px;
    margin: .65rem 0;
}

.tg-file-rules-panel ol {
    margin: .55rem 0 .65rem;
    padding-left: 1.05rem;
    font-size: .76rem;
    line-height: 1.4;
}

.tg-file-rules-panel li + li {
    margin-top: .3rem;
}

.tg-queue-edit-shell {
    padding: .8rem;
}

.tg-queue-edit-intro {
    margin-bottom: .7rem;
    padding-bottom: .6rem;
}

.tg-queue-edit-form {
    gap: .7rem;
}

.tg-queue-edit-grid {
    gap: .6rem .75rem;
}

.tg-queue-edit-note {
    margin: 0;
    padding: .6rem .7rem;
    border: 1px solid #d7e0e6;
    background: #f3f6f8;
    color: #566874;
    font-size: .76rem;
    line-height: 1.45;
}

.tg-queue-edit-reject {
    display: grid;
    gap: .35rem;
    padding: .7rem;
    border: 1px solid #ddc2c2;
    background: #fcf6f6;
}

.tg-queue-edit-reject label {
    color: #784242;
    font-size: .78rem;
    font-weight: 750;
}

.tg-queue-edit-reject textarea {
    width: 100%;
    min-height: 78px;
    resize: vertical;
    border: 1px solid #cfaeae;
    background: #fff;
    color: #2f2525;
    font: inherit;
}

.tg-queue-edit-button {
    min-height: 36px;
    padding: .48rem .7rem;
    font-size: .82rem;
}

.tg-queue-edit-button-danger {
    border-color: #ad6a6a;
    background: #fff5f5;
    color: #823d3d;
}

.tg-queue-edit-button-danger:hover,
.tg-queue-edit-button-danger:focus-visible {
    background: #f7e8e8;
}

@media (max-width: 760px) {
    .tg-file-queue-card {
        grid-template-columns: 1fr;
        gap: .7rem;
    }

    .tg-file-queue-card-actions {
        align-items: flex-start;
        min-width: 0;
    }

    .tg-file-queue-card-actions .tg-file-queue-inline-actions,
    .tg-file-queue-buttons {
        justify-content: flex-start;
    }
}

/* Build 0147 — Submit a File workflow + compact Files-family modernization. */
.tg-modern-hero--file-submit {
    padding-block: clamp(.9rem, 1.7vw, 1.35rem);
}

.tg-file-submit-section {
    background: #f5f5f2;
}

.tg-file-submit-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .7rem;
    padding: .55rem .7rem;
    border: 1px solid #d7e0e5;
    background: #fff;
    color: #556a77;
    font-size: .78rem;
}

.tg-file-submit-context > div {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .25rem .55rem;
}

.tg-file-submit-context strong {
    color: #29485d;
}

.tg-file-submit-context a {
    flex: 0 0 auto;
    color: #2f6ea5;
    text-decoration: none;
}

.tg-file-submit-context a:hover,
.tg-file-submit-context a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tg-file-submit-form {
    gap: .7rem;
}

.tg-file-submit-form.is-submitting {
    opacity: .72;
}

.tg-file-submit-layout {
    grid-template-columns: minmax(0, 1fr) minmax(235px, 285px);
    gap: .75rem;
}

.tg-file-submit-main {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--tg007-line);
    background: #fff;
}

.tg-file-submit-block {
    margin: 0;
    padding: .85rem .95rem;
    border: 0;
    border-bottom: 1px solid #e0e6ea;
    background: #fff;
}

.tg-file-submit-block:last-child {
    border-bottom: 0;
}

fieldset.tg-file-submit-block {
    min-width: 0;
}

.tg-file-submit-block-head,
.tg-file-submit-side-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: .8rem;
    margin-bottom: .65rem;
}

.tg-file-submit-block-head h2,
.tg-file-submit-side-head h2 {
    margin: .08rem 0 0;
    color: #1d2d39;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.02rem;
    line-height: 1.2;
}

.tg-file-submit-block-head > small {
    flex: 0 0 auto;
    color: #778691;
    font-size: .7rem;
}

.tg-file-submit-block-head > small span {
    color: #8b4545;
}

.tg-file-submit-block .tg-file-form-grid {
    gap: .55rem .7rem;
}

.tg-file-submit-block .tg-file-field {
    gap: .2rem;
}

.tg-file-submit-block .tg-file-field label {
    font-size: .74rem;
}

.tg-file-submit-block .tg-file-field input,
.tg-file-submit-block .tg-file-field select,
.tg-file-submit-block .tg-file-field textarea {
    min-height: 36px;
    padding: .45rem .55rem;
    border-color: #c8d2d9;
    border-radius: 2px;
    font-size: .82rem;
}

.tg-file-submit-block .tg-file-field textarea {
    min-height: 94px;
    line-height: 1.45;
}

.tg-file-source-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
    margin-bottom: .55rem;
}

.tg-file-source-choice {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    min-width: 0;
    padding: .55rem .6rem;
    border: 1px solid #d3dde3;
    background: #f8fafb;
    color: #334a59;
    cursor: pointer;
}

.tg-file-source-choice:has(input:checked) {
    border-color: #7ca5c1;
    background: #f0f6fa;
    box-shadow: inset 3px 0 0 #2f78aa;
}

.tg-file-source-choice input {
    flex: 0 0 auto;
    margin-top: .16rem;
}

.tg-file-source-choice span {
    min-width: 0;
}

.tg-file-source-choice strong,
.tg-file-source-choice small {
    display: block;
}

.tg-file-source-choice strong {
    color: #263c4b;
    font-size: .78rem;
}

.tg-file-source-choice small {
    margin-top: .08rem;
    color: #73828c;
    font-size: .68rem;
    line-height: 1.35;
}

.tg-file-picker-compact {
    min-height: 38px;
    padding: .45rem .58rem;
    border-color: #9fb3c0;
    font-size: .76rem;
}

.tg-file-picker-compact small {
    font-size: .67rem;
}

.tg-file-hidden-input,
.tg-file-upload-control > input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.tg-file-update-block {
    padding-block: .68rem;
    background: #fbfcfc;
}

.tg-file-update-checkbox {
    align-items: flex-start;
    margin: 0;
}

.tg-file-update-checkbox > span,
.tg-file-update-checkbox strong,
.tg-file-update-checkbox small {
    display: block;
}

.tg-file-update-checkbox strong {
    color: #314956;
    font-size: .76rem;
}

.tg-file-update-checkbox small {
    margin-top: .08rem;
    color: #74838d;
    font-size: .68rem;
    font-weight: 500;
    line-height: 1.35;
}

.tg-file-submit-sidebar {
    gap: .55rem;
}

.tg-file-submit-sidebar .tg-file-tool-panel {
    padding: .72rem;
    border-color: #d7e0e5;
}

.tg-file-submit-sidebar .tg-file-tool-panel h2 {
    font-size: .94rem;
}

.tg-file-submit-sidebar .tg-file-tool-panel p {
    margin: .3rem 0;
    font-size: .73rem;
    line-height: 1.4;
}

.tg-file-screenshot-preview {
    min-height: 96px;
    margin: .5rem 0;
    overflow: hidden;
    background: #f4f7f8;
}

.tg-file-screenshot-preview.is-empty {
    color: #839099;
    font-size: .72rem;
}

.tg-file-screenshot-preview img {
    width: 100%;
    max-height: 175px;
    object-fit: contain;
    background: #eef2f4;
}

.tg-file-screenshot-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .35rem;
}

.tg-file-screenshot-selection .tg-file-picker-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .68rem;
}

.tg-file-screenshot-selection button {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8a4c4c;
    font: inherit;
    font-size: .68rem;
    font-weight: 700;
    cursor: pointer;
}

.tg-file-screenshot-selection button:hover,
.tg-file-screenshot-selection button:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tg-file-queue-mini-count {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    margin: .18rem 0;
}

.tg-file-queue-mini-count strong {
    color: #235f8b;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.45rem;
    line-height: 1;
}

.tg-file-queue-mini-count span {
    color: #6d7d87;
    font-size: .68rem;
}

.tg-file-queue-mini .tg-text-link {
    font-size: .71rem;
    text-decoration: none;
}

.tg-file-rules-panel {
    display: block;
}

.tg-file-rules-panel summary {
    position: relative;
    padding-right: 1.1rem;
    color: #304a5b;
    font-family: "Space Grotesk", sans-serif;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.tg-file-rules-panel summary::-webkit-details-marker {
    display: none;
}

.tg-file-rules-panel summary::after {
    content: '+';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    color: #718692;
    font-size: 1rem;
}

.tg-file-rules-panel[open] summary::after {
    content: '–';
}

.tg-file-rules-panel ol {
    margin: .55rem 0 .45rem;
    padding-left: 1rem;
    font-size: .69rem;
    line-height: 1.38;
}

.tg-file-rules-panel li + li {
    margin-top: .22rem;
}

.tg-file-submit-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .65rem .75rem;
    border: 1px solid var(--tg007-line);
    background: #fff;
}

.tg-file-submit-actions p {
    max-width: 760px;
    margin: 0;
    color: #71808a;
    font-size: .7rem;
    line-height: 1.4;
}

.tg-file-submit-button {
    flex: 0 0 auto;
    min-width: 160px;
    min-height: 36px;
    justify-content: center;
    padding: .45rem .72rem;
    font-size: .76rem;
}

.tg-file-submit-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 240px);
    align-items: center;
    gap: .75rem;
}

.tg-file-submit-progress > div:first-child {
    display: grid;
    gap: .1rem;
}

.tg-file-submit-progress span {
    font-size: .72rem;
}

.tg-file-submit-progress-track {
    height: 6px;
    overflow: hidden;
    background: rgba(47, 110, 165, .14);
}

.tg-file-submit-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    background: #2f78aa;
    transition: width .15s linear;
}

@media (max-width: 980px) {
    .tg-file-submit-layout {
        grid-template-columns: 1fr;
    }

    .tg-file-submit-sidebar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .tg-file-submit-context,
    .tg-file-submit-actions,
    .tg-file-submit-block-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .tg-file-submit-context {
        gap: .35rem;
    }

    .tg-file-submit-sidebar,
    .tg-file-source-choice-grid {
        grid-template-columns: 1fr;
    }

    .tg-file-submit-progress {
        grid-template-columns: 1fr;
    }

    .tg-file-submit-actions .tg-file-submit-button {
        width: 100%;
    }
}
