/* TimeGuard touch authentication presentation.
 * Width sizes the shared components; data-tg-presentation selects touch interaction.
 * The Design System uses .tg-touch-auth-specimen for isolated, non-operational examples.
 */

.tg-auth-shell[data-tg-presentation="touch"],
.tg-touch-auth-specimen {
    --tg-touch-auth-surface: var(--tg-color-surface, var(--tg-surface));
    --tg-touch-auth-surface-muted: var(--tg-color-surface-muted, var(--tg-surface-secondary));
    --tg-touch-auth-text-strong: var(--tg-color-text-strong, var(--tg-text-primary));
    --tg-touch-auth-text: var(--tg-color-text, var(--tg-text-secondary));
    --tg-touch-auth-muted: var(--tg-color-muted, var(--tg-text-muted));
    --tg-touch-auth-border: var(--tg-color-border, var(--tg-border));
    --tg-touch-auth-input: var(--tg-input-bg, var(--tg-color-surface, var(--tg-surface)));
    --tg-touch-auth-input-text: var(--tg-input-text, var(--tg-color-text, var(--tg-text-secondary)));
    --tg-touch-auth-primary: var(--tg-color-primary, var(--tg-primary));
    --tg-touch-auth-focus: var(--tg-color-focus, var(--tg-focus));
    --tg-touch-auth-focus-ring: var(--tg-focus-ring, 0 0 0 3px rgba(38, 132, 199, 0.22));
    --tg-touch-auth-shadow: var(--tg-shadow-raised, var(--tg-shadow));
    --tg-touch-auth-transition-fast: var(--tg-transition-fast, var(--tg-transition));
    --tg-touch-auth-transition-base: var(--tg-transition-base, var(--tg-transition));
    --tg-touch-auth-warning: var(--tg-color-warning, #ce850e);
    --tg-touch-auth-brand-surface: var(--tg-color-primary, var(--tg-primary));
    --tg-touch-auth-brand-foreground: var(--tg-color-on-primary, #ffffff);
    --tg-touch-auth-key-surface: var(--tg-color-surface-muted, var(--tg-surface-secondary));
    color: var(--tg-touch-auth-text);
}

html[data-tg-theme="dark"] .tg-touch-auth-specimen {
    --tg-touch-auth-warning: var(--tg-color-warning, #efbd63);
}

.tg-auth-shell[data-tg-presentation="touch"] *,
.tg-auth-shell[data-tg-presentation="touch"] *::before,
.tg-auth-shell[data-tg-presentation="touch"] *::after,
.tg-touch-auth-specimen *,
.tg-touch-auth-specimen *::before,
.tg-touch-auth-specimen *::after {
    box-sizing: border-box;
}

.tg-auth-shell[data-tg-presentation="touch"] {
    min-height: 100svh;
    min-height: 100dvh;
    padding: 0;
    align-items: stretch;
    color: var(--tg-touch-auth-text);
    background: var(--tg-touch-auth-surface);
    overflow: visible;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-card {
    width: 100%;
    min-height: 100svh;
    min-height: 100dvh;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    color: var(--tg-touch-auth-text);
    background: var(--tg-touch-auth-surface);
    box-shadow: none;
    animation: tg-touch-auth-enter var(--tg-touch-auth-transition-base) both;
}

.tg-touch-auth-specimen.tg-auth-card {
    width: min(100%, 34rem);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--tg-touch-auth-border);
    border-radius: clamp(var(--tg-radius-card), 2.5vw, 1rem);
    color: var(--tg-touch-auth-text);
    background: var(--tg-touch-auth-surface);
    box-shadow: var(--tg-touch-auth-shadow);
    animation: tg-touch-auth-enter var(--tg-touch-auth-transition-base) both;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-content {
    display: grid;
    min-height: 100svh;
    min-height: 100dvh;
    padding: 0;
    grid-template-rows: auto 1fr auto;
    align-items: start;
}

.tg-touch-auth-specimen .tg-auth-content {
    display: grid;
    padding: 0;
    align-items: start;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-brand,
.tg-touch-auth-specimen .tg-auth-brand {
    display: flex;
    width: 100%;
    flex-direction: column;
    margin: 0;
    padding-block: max(1rem, env(safe-area-inset-top)) clamp(1.25rem, 4vw, 1.75rem);
    padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
    gap: clamp(0.25rem, 1.5vw, 0.5rem);
    align-items: center;
    color: var(--tg-touch-auth-brand-foreground);
    background: var(--tg-touch-auth-brand-surface);
    border-end-start-radius: 50% 1.75rem;
    border-end-end-radius: 50% 1.75rem;
    text-align: center;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-brand-mark,
.tg-touch-auth-specimen .tg-auth-brand-mark {
    grid-row: auto;
    grid-column: auto;
    width: clamp(6rem, 25vw, 7.5rem);
    max-width: none;
    height: auto;
    margin: 0;
    align-self: auto;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-product,
.tg-touch-auth-specimen .tg-auth-product {
    margin: 0;
    grid-row: auto;
    grid-column: auto;
    align-self: auto;
    color: var(--tg-touch-auth-brand-foreground);
    font-size: clamp(1.5rem, 6.5vw, 1.875rem);
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-tagline,
.tg-touch-auth-specimen .tg-auth-tagline {
    grid-row: auto;
    grid-column: auto;
    align-self: auto;
    margin: 0;
    color: var(--tg-touch-auth-brand-foreground);
    font-size: var(--tg-font-size-sm);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-step-header,
.tg-touch-auth-specimen .tg-auth-step-header {
    margin: 0;
    margin-block-end: clamp(0.875rem, 3vw, 1.25rem);
    text-align: start;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-step-header .tg-status-badge,
.tg-touch-auth-specimen .tg-auth-step-header .tg-status-badge {
    margin-block-end: 0.5rem;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-title,
.tg-touch-auth-specimen .tg-auth-title {
    margin: 0;
    color: var(--tg-touch-auth-text-strong);
    font-size: clamp(1.05rem, 4.5vw, 1.3rem);
    font-weight: 700;
    line-height: 1.25;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-instruction,
.tg-touch-auth-specimen .tg-auth-instruction {
    max-width: 46ch;
    margin: 0.45rem 0 0;
    color: var(--tg-touch-auth-text);
    font-size: clamp(0.8rem, 3.2vw, 0.92rem);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-form,
.tg-touch-auth-specimen .tg-auth-form {
    margin: 0;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-form fieldset,
.tg-touch-auth-specimen fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-field,
.tg-touch-auth-specimen .tg-field {
    min-width: 0;
    margin-block-end: 1rem;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-form-label,
.tg-touch-auth-specimen .tg-form-label {
    display: block;
    margin: 0 0 0.3rem;
    color: var(--tg-touch-auth-text-strong);
    font-size: var(--tg-font-size-sm);
    font-weight: 700;
    line-height: 1.35;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-help-text,
.tg-touch-auth-specimen .tg-help-text {
    display: block;
    margin: 0.3rem 0 0;
    color: var(--tg-touch-auth-muted);
    font-size: var(--tg-font-size-xs);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-input,
.tg-touch-auth-specimen .tg-input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 0.48rem 0.68rem;
    border: 1px solid var(--tg-touch-auth-border);
    border-radius: var(--tg-radius-sm);
    color: var(--tg-touch-auth-input-text);
    background: var(--tg-touch-auth-input);
    font: inherit;
    font-size: max(1rem, 16px);
    line-height: 1.25;
    transition: border-color var(--tg-touch-auth-transition-fast), box-shadow var(--tg-touch-auth-transition-fast), background-color var(--tg-touch-auth-transition-fast);
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-input:focus,
.tg-auth-shell[data-tg-presentation="touch"] .tg-input:focus-visible,
.tg-touch-auth-specimen .tg-input:focus,
.tg-touch-auth-specimen .tg-input:focus-visible {
    outline: 0;
    border-color: var(--tg-touch-auth-focus);
    box-shadow: var(--tg-touch-auth-focus-ring);
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-input:disabled,
.tg-auth-shell[data-tg-presentation="touch"] .tg-input[readonly],
.tg-touch-auth-specimen .tg-input:disabled,
.tg-touch-auth-specimen .tg-input[readonly] {
    color: var(--tg-touch-auth-muted);
    background: var(--tg-touch-auth-surface-muted);
    cursor: not-allowed;
    opacity: 1;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-phone-input .iti__selected-flag {
    min-height: 52px;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-actions,
.tg-touch-auth-specimen .tg-auth-actions {
    display: grid;
    margin-block-start: 1rem;
    gap: 0.75rem;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-btn-block,
.tg-touch-auth-specimen .tg-btn-block {
    width: 100%;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-actions .tg-btn,
.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-resend .tg-btn,
.tg-touch-auth-specimen .tg-auth-actions .tg-btn,
.tg-touch-auth-specimen .tg-auth-resend .tg-btn {
    min-height: 52px;
    padding-block: 0.75rem;
    white-space: normal;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-resend .tg-btn,
.tg-touch-auth-specimen .tg-auth-resend .tg-btn {
    border-color: transparent;
    color: var(--tg-touch-auth-primary);
    background: transparent;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-otp-group,
.tg-touch-auth-specimen .tg-otp-group {
    display: grid;
    width: 100%;
    direction: ltr;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(0.2rem, 1.4vw, 0.55rem);
    min-width: 0;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-otp-input,
.tg-touch-auth-specimen .tg-otp-input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    height: clamp(3rem, 13vw, 3.25rem);
    aspect-ratio: auto;
    padding: 0;
    border: 1px solid var(--tg-touch-auth-border);
    border-radius: var(--tg-radius-sm);
    color: var(--tg-touch-auth-text-strong);
    background: var(--tg-touch-auth-input);
    font-family: var(--tg-font-family);
    font-size: clamp(1.1rem, 5vw, 1.5rem);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    caret-color: var(--tg-touch-auth-primary);
    transition: border-color var(--tg-touch-auth-transition-fast), box-shadow var(--tg-touch-auth-transition-fast), background-color var(--tg-touch-auth-transition-fast);
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-otp-input:focus,
.tg-auth-shell[data-tg-presentation="touch"] .tg-otp-input:focus-visible,
.tg-touch-auth-specimen .tg-otp-input:focus,
.tg-touch-auth-specimen .tg-otp-input:focus-visible {
    outline: 0;
    border-color: var(--tg-touch-auth-focus);
    box-shadow: var(--tg-touch-auth-focus-ring);
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-otp-input:disabled,
.tg-auth-shell[data-tg-presentation="touch"] .tg-otp-input[readonly],
.tg-touch-auth-specimen .tg-otp-input:disabled,
.tg-touch-auth-specimen .tg-otp-input[readonly] {
    color: var(--tg-touch-auth-muted);
    background: var(--tg-touch-auth-surface-muted);
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-resend,
.tg-touch-auth-specimen .tg-auth-resend {
    display: flex;
    min-width: 0;
    min-height: 48px;
    margin-block-start: 0.75rem;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    color: var(--tg-touch-auth-muted);
    font-size: var(--tg-font-size-sm);
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-development-otp,
.tg-touch-auth-specimen .tg-auth-development-otp {
    margin: 0;
    margin-block-end: 1rem;
    padding: 0.75rem;
    border: 1px dashed var(--tg-touch-auth-warning);
    border-radius: var(--tg-radius-sm);
    background: var(--tg-touch-auth-surface-muted);
    text-align: center;
    overflow-wrap: anywhere;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-development-label,
.tg-touch-auth-specimen .tg-auth-development-label {
    margin: 0;
    color: var(--tg-touch-auth-text-strong);
    font-size: var(--tg-font-size-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-development-copy,
.tg-touch-auth-specimen .tg-auth-development-copy {
    margin: 0.3rem 0 0.65rem;
    color: var(--tg-touch-auth-muted);
    font-size: var(--tg-font-size-xs);
    line-height: 1.5;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-code,
.tg-touch-auth-specimen .tg-auth-code {
    display: inline-flex;
    width: fit-content;
    direction: ltr;
    max-width: 100%;
    min-height: 44px;
    padding: 0.65rem 1.15rem;
    border: 1px dashed var(--tg-touch-auth-border);
    border-radius: var(--tg-radius-sm);
    align-items: center;
    justify-content: center;
    color: var(--tg-touch-auth-text-strong);
    background: var(--tg-touch-auth-surface-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-footer,
.tg-touch-auth-specimen .tg-auth-footer {
    margin: 0;
    color: var(--tg-touch-auth-muted);
    font-size: var(--tg-font-size-xs);
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
}

.tg-ds-touch-auth-grid {
    display: grid;
    margin-block-start: var(--tg-space-5, 1.5rem);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
    gap: var(--tg-space-4, 1rem);
    align-items: start;
}

.tg-touch-auth-specimen {
    min-width: 0;
}

.tg-touch-auth-specimen-compact .tg-touch-auth-state {
    padding: clamp(1rem, 4vw, 1.5rem);
}

.tg-touch-auth-specimen .tg-touch-auth-state + .tg-touch-auth-state {
    margin-block-start: 0;
    border-block-start: 1px solid var(--tg-touch-auth-border);
}

.tg-touch-auth-specimen .tg-auth-development-otp {
    text-align: center;
}

.tg-touch-auth-keypad[hidden] {
    display: none !important;
}

.tg-touch-auth-workspace {
    display: contents;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-touch-auth-workspace {
    display: block;
    width: min(100%, 28rem);
    margin-inline: auto;
    padding-block: clamp(1.5rem, 4vh, 2rem) clamp(1rem, 3vh, 1.5rem);
    padding-inline: clamp(1.25rem, 5vw, 1.75rem);
    align-self: start;
}

.tg-auth-shell[data-tg-presentation="touch"] .tg-auth-footer {
    width: min(100%, 34rem);
    margin-inline: auto;
    padding-block: 0.25rem max(1rem, env(safe-area-inset-bottom));
    padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
}

.tg-touch-auth-keypad {
    min-width: 0;
    padding: 0;
    border: 0;
}

.tg-touch-auth-keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.55rem, 1vw, 0.8rem);
}

.tg-touch-auth-key {
    min-width: 0;
    min-height: 56px;
    padding: 0.65rem 0.35rem;
    border: 1px solid var(--tg-touch-auth-border);
    border-radius: clamp(0.7rem, 1.1vw, 0.95rem);
    color: var(--tg-touch-auth-text-strong);
    background: var(--tg-touch-auth-key-surface);
    box-shadow: 0 0.2rem 0.6rem rgba(9, 38, 59, 0.08);
    font: inherit;
    font-size: clamp(1rem, 1.7vw, 1.3rem);
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform var(--tg-touch-auth-transition-fast), border-color var(--tg-touch-auth-transition-fast), background-color var(--tg-touch-auth-transition-fast), box-shadow var(--tg-touch-auth-transition-fast);
}

.tg-touch-auth-key:hover {
    border-color: var(--tg-touch-auth-primary);
}

.tg-touch-auth-key:focus-visible {
    outline: 0;
    border-color: var(--tg-touch-auth-focus);
    box-shadow: var(--tg-touch-auth-focus-ring);
}

.tg-touch-auth-key:active,
.tg-touch-auth-key.is-pressed {
    transform: scale(0.96);
    background: var(--tg-touch-auth-surface);
}

.tg-touch-auth-key:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.tg-touch-auth-key-action {
    font-size: clamp(0.72rem, 1vw, 0.88rem);
    overflow-wrap: anywhere;
}

.tg-touch-auth-specimen-wide {
    width: min(100%, 72rem) !important;
    grid-column: 1 / -1;
    container-type: inline-size;
}

.tg-touch-auth-specimen-wide .tg-auth-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: clamp(1rem, 2vw, 2rem);
}

.tg-touch-auth-specimen-wide .tg-auth-brand,
.tg-touch-auth-specimen-wide .tg-auth-footer {
    grid-column: 1 / -1;
}

.tg-touch-auth-specimen-wide .tg-touch-auth-workspace {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: clamp(1rem, 2vw, 2rem);
    align-items: center;
}

@media (min-width: 1024px) {
    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-card {
        width: 100%;
        border-radius: 0;
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-content {
        grid-template-rows: auto 1fr auto;
        align-items: stretch;
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-brand {
        display: grid;
        grid-row: 1;
        grid-template-columns: clamp(6.5rem, 9vw, 8rem) minmax(0, auto);
        width: 100%;
        padding-block: max(1.25rem, env(safe-area-inset-top)) clamp(1.75rem, 3vw, 2.5rem);
        padding-inline: max(2rem, env(safe-area-inset-left)) max(2rem, env(safe-area-inset-right));
        justify-content: center;
        column-gap: clamp(1rem, 2vw, 1.5rem);
        border-end-start-radius: 50% clamp(1.5rem, 3vw, 2.5rem);
        border-end-end-radius: 50% clamp(1.5rem, 3vw, 2.5rem);
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-brand-mark {
        grid-row: 1 / 3;
        width: 100%;
        max-width: 8rem;
        filter: drop-shadow(0 0.7rem 1.2rem rgba(0, 0, 0, 0.2));
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-brand .tg-auth-product {
        align-self: end;
        font-size: clamp(1.75rem, 2.6vw, 2.35rem);
        line-height: 1.05;
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-brand .tg-auth-tagline {
        max-width: 22ch;
        margin-block-start: 0.15rem;
        align-self: start;
        font-size: clamp(0.92rem, 1.25vw, 1.05rem);
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-touch-auth-workspace {
        grid-row: 2;
        display: grid;
        width: min(100%, 70rem);
        grid-template-columns: minmax(0, 1.08fr) minmax(15rem, 0.92fr);
        margin-inline: auto;
        padding-block: clamp(1.25rem, 2.5vw, 2.5rem);
        padding-inline: max(clamp(1.25rem, 3vw, 2.75rem), env(safe-area-inset-left)) max(clamp(1.25rem, 3vw, 2.75rem), env(safe-area-inset-right));
        gap: clamp(1.25rem, 3vw, 3rem);
        align-items: center;
    }

    .tg-auth-shell[data-tg-presentation="touch"] [data-auth-step] {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        padding: 0;
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-touch-auth-keypad {
        grid-column: 2;
        grid-row: 1;
        padding: 0;
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-footer {
        grid-row: 3;
        width: min(100%, 70rem);
        padding-block: 0.25rem max(1rem, env(safe-area-inset-bottom));
        padding-inline: max(1.25rem, env(safe-area-inset-left)) max(1.25rem, env(safe-area-inset-right));
    }
}

@container (min-width: 52rem) {
    .tg-touch-auth-specimen-wide .tg-auth-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        align-items: stretch;
    }

    .tg-touch-auth-specimen-wide .tg-auth-brand {
        display: grid;
        grid-row: 1;
        grid-template-columns: clamp(5.5rem, 10cqi, 7rem) minmax(0, auto);
        padding: clamp(1rem, 2.5cqi, 1.75rem) clamp(1.25rem, 4cqi, 3rem) clamp(1.5rem, 3cqi, 2.25rem);
        justify-content: center;
        column-gap: clamp(0.85rem, 2cqi, 1.35rem);
        border-end-start-radius: 50% clamp(1.25rem, 3cqi, 2rem);
        border-end-end-radius: 50% clamp(1.25rem, 3cqi, 2rem);
        text-align: start;
    }

    .tg-touch-auth-specimen-wide .tg-auth-brand-mark {
        grid-row: 1 / 3;
        width: 100%;
        max-width: 7rem;
        filter: drop-shadow(0 0.7rem 1.2rem rgba(0, 0, 0, 0.2));
    }

    .tg-touch-auth-specimen-wide .tg-auth-brand .tg-auth-product {
        align-self: end;
        font-size: clamp(1.65rem, 3.3cqi, 2.2rem);
        line-height: 1.05;
    }

    .tg-touch-auth-specimen-wide .tg-auth-brand .tg-auth-tagline {
        max-width: 22ch;
        align-self: start;
        font-size: clamp(0.9rem, 1.5cqi, 1rem);
    }

    .tg-touch-auth-specimen-wide .tg-touch-auth-workspace {
        grid-row: 2;
        grid-template-columns: minmax(0, 1.08fr) minmax(14rem, 0.92fr);
        padding: clamp(1.5rem, 3cqi, 2.5rem);
        gap: clamp(1rem, 2.4cqi, 2rem);
        align-items: center;
    }
}

@keyframes tg-touch-auth-enter {
    from {
        opacity: 0;
        transform: translateY(0.35rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 359.98px) {
    .tg-auth-shell[data-tg-presentation="touch"] .tg-otp-group,
    .tg-touch-auth-specimen .tg-otp-group {
        gap: 0.15rem;
    }
}

@media (max-width: 1023.98px) and (max-height: 600px) {
    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-brand {
        padding-block: max(0.6rem, env(safe-area-inset-top)) 0.8rem;
        gap: 0.15rem;
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-brand-mark {
        width: clamp(4.5rem, 18vw, 5rem);
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-product {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-step-header {
        margin-block-end: 0.75rem;
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-touch-auth-workspace {
        align-self: start;
        padding-block-start: 0.875rem;
    }
}

@media (max-width: 1023.98px) and (max-height: 480px) and (orientation: landscape) {
    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-brand {
        display: grid;
        grid-template-columns: 4.5rem minmax(0, auto);
        grid-template-rows: auto auto;
        justify-content: center;
        column-gap: 0.75rem;
        padding-block: max(0.5rem, env(safe-area-inset-top)) 0.65rem;
        text-align: start;
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-brand-mark {
        grid-row: 1 / 3;
        width: 4.5rem;
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-product {
        align-self: end;
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-tagline {
        align-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tg-auth-shell[data-tg-presentation="touch"] .tg-auth-card,
    .tg-touch-auth-specimen.tg-auth-card {
        animation: none;
    }

    .tg-auth-shell[data-tg-presentation="touch"] .tg-input,
    .tg-auth-shell[data-tg-presentation="touch"] .tg-otp-input,
    .tg-auth-shell[data-tg-presentation="touch"] .tg-btn,
    .tg-auth-shell[data-tg-presentation="touch"] .tg-touch-auth-key,
    .tg-touch-auth-specimen .tg-input,
    .tg-touch-auth-specimen .tg-otp-input,
    .tg-touch-auth-specimen .tg-btn,
    .tg-touch-auth-specimen .tg-touch-auth-key {
        transition: none;
    }

    .tg-touch-auth-key:active,
    .tg-touch-auth-key.is-pressed {
        transform: none;
    }
}
