/* TLT Arcade: Desk Work v0.4.0 - 2026-08-09 - Proprietary */
.tlt-dw,
.tlt-dw * {
    box-sizing: border-box;
}

.tlt-dw {
    --dw-black: #070908;
    --dw-deep: #0a0d0b;
    --dw-forest: #071d17;
    --dw-cream: #f4efe6;
    --dw-warm: #f7ead6;
    --dw-orange: #f26a1b;
    --dw-orange-hot: #ff8b45;
    --dw-gold: #e1b457;
    --dw-green: #8dbb73;
    --dw-blue: #61aee6;
    --dw-red: #e35f5f;
    --dw-teal: #6fa7a0;
    --dw-line: rgba(244, 239, 230, 0.17);
    width: 100%;
    color: var(--dw-cream);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.35;
    isolation: isolate;
}

.tlt-dw [hidden] {
    display: none !important;
}

.tlt-dw button,
.tlt-dw input {
    font: inherit;
}

.tlt-dw button {
    color: inherit;
}

.tlt-dw button:focus-visible,
.tlt-dw input:focus-visible,
.tlt-dw canvas:focus-visible {
    outline: 3px solid var(--dw-gold);
    outline-offset: 3px;
}

.tlt-dw__shell {
    position: relative;
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(14px, 2vw, 24px);
    overflow: hidden;
    border: 1px solid rgba(244, 239, 230, 0.14);
    border-radius: 24px;
    background:
        radial-gradient(circle at 14% 12%, rgba(225, 180, 87, 0.1), transparent 30%),
        radial-gradient(circle at 88% 22%, rgba(97, 174, 230, 0.08), transparent 31%),
        linear-gradient(145deg, #10100d 0%, #060806 52%, #08120e 100%);
    box-shadow:
        0 34px 80px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tlt-dw__shell::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.13;
    pointer-events: none;
    content: "";
    background-image:
        repeating-linear-gradient(93deg, transparent 0 22px, rgba(255, 255, 255, 0.025) 23px),
        repeating-linear-gradient(1deg, transparent 0 16px, rgba(0, 0, 0, 0.16) 17px);
    mix-blend-mode: screen;
}

.tlt-dw__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 13px;
}

.tlt-dw__title-group {
    min-width: 0;
}

.tlt-dw__eyebrow,
.tlt-dw__card-kicker,
.tlt-dw__section-head p,
.tlt-dw__assignment p {
    margin: 0;
    color: var(--dw-orange-hot);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.tlt-dw__header h2 {
    margin: 2px 0 0;
    color: var(--dw-cream);
    font-family: Impact, "Arial Narrow Bold", "Arial Narrow", sans-serif;
    font-size: clamp(3.2rem, 7vw, 6.4rem);
    font-weight: 900;
    letter-spacing: 0.025em;
    line-height: 0.88;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(225, 180, 87, 0.11);
    white-space: nowrap;
}

.tlt-dw__lede {
    max-width: 650px;
    margin: 9px 0 0;
    color: rgba(244, 239, 230, 0.72);
    font-size: clamp(0.9rem, 1.6vw, 1.06rem);
    font-weight: 650;
}

.tlt-dw__utility {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.tlt-dw__icon-btn {
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--dw-line);
    border-radius: 10px;
    background: rgba(244, 239, 230, 0.045);
    color: rgba(244, 239, 230, 0.76);
    cursor: pointer;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.tlt-dw__icon-btn:hover {
    border-color: rgba(244, 239, 230, 0.34);
    background: rgba(244, 239, 230, 0.075);
    color: var(--dw-cream);
}

.tlt-dw__scoreboard {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-bottom: 9px;
    border: 1px solid var(--dw-line);
    border-radius: 13px;
    background: var(--dw-line);
}

.tlt-dw__scoreboard > div {
    display: flex;
    min-width: 0;
    min-height: 52px;
    flex-direction: column;
    justify-content: center;
    padding: 7px 12px;
    background: rgba(4, 9, 7, 0.93);
}

.tlt-dw__scoreboard span {
    color: rgba(244, 239, 230, 0.48);
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.tlt-dw__scoreboard strong {
    overflow: hidden;
    color: var(--dw-warm);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: clamp(0.88rem, 2vw, 1.12rem);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tlt-dw__assignment {
    display: grid;
    grid-template-columns: minmax(160px, 0.35fr) minmax(260px, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-width: 0;
    margin-bottom: 9px;
    padding: 9px 12px;
    border: 1px solid rgba(225, 180, 87, 0.22);
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(225, 180, 87, 0.08), rgba(9, 16, 13, 0.78) 42%);
}

.tlt-dw__assignment h3 {
    margin: 1px 0 0;
    color: var(--dw-cream);
    font-family: "Arial Narrow", Impact, sans-serif;
    font-size: 0.94rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.tlt-dw__assignment > span {
    min-width: 0;
    overflow: hidden;
    color: rgba(244, 239, 230, 0.62);
    font-size: 0.72rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tlt-dw__periods {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tlt-dw__period {
    width: 9px;
    height: 9px;
    border: 1px solid rgba(244, 239, 230, 0.24);
    border-radius: 50%;
    background: rgba(244, 239, 230, 0.04);
}

.tlt-dw__period.is-current {
    border-color: var(--dw-gold);
    background: var(--dw-gold);
    box-shadow: 0 0 10px rgba(225, 180, 87, 0.56);
}

.tlt-dw__period.is-done {
    border-color: rgba(111, 167, 160, 0.72);
    background: rgba(111, 167, 160, 0.52);
}

.tlt-dw__stage-wrap {
    position: relative;
    width: 100%;
    min-height: 460px;
    overflow: hidden;
    border: 1px solid rgba(244, 239, 230, 0.19);
    border-radius: 18px;
    aspect-ratio: 16 / 9;
    background: #090c0a;
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.52),
        0 18px 34px rgba(0, 0, 0, 0.28);
}

.tlt-dw__canvas {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    cursor: crosshair;
    touch-action: none;
}

.tlt-dw__stage-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.18), transparent 20%, transparent 74%, rgba(0, 0, 0, 0.36)),
        radial-gradient(ellipse at center, transparent 54%, rgba(0, 0, 0, 0.38) 100%);
}

.tlt-dw__start-card,
.tlt-dw__finish {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: min(510px, calc(100% - 32px));
    padding: clamp(18px, 3vw, 30px);
    transform: translate(-50%, -50%);
    border: 1px solid rgba(244, 239, 230, 0.25);
    border-radius: 18px;
    background: rgba(6, 9, 7, 0.92);
    box-shadow:
        0 22px 62px rgba(0, 0, 0, 0.62),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
    backdrop-filter: blur(12px);
}

.tlt-dw__start-card h3,
.tlt-dw__finish h3,
.tlt-dw__dialog h3 {
    margin: 5px 0 8px;
    color: var(--dw-cream);
    font-family: Impact, "Arial Narrow Bold", "Arial Narrow", sans-serif;
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
}

.tlt-dw__start-card > p:not(.tlt-dw__card-kicker),
.tlt-dw__finish > p:not(.tlt-dw__card-kicker) {
    margin: 0 auto 17px;
    color: rgba(244, 239, 230, 0.7);
    font-size: 0.86rem;
}

.tlt-dw__receipt {
    display: flex;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 9px 13px;
    border: 1px solid rgba(244, 239, 230, 0.17);
    border-radius: 11px;
    background: rgba(5, 11, 9, 0.9);
    box-shadow: 0 9px 24px rgba(0, 0, 0, 0.28);
}

.tlt-dw__receipt strong {
    flex: 0 0 auto;
    color: var(--dw-orange-hot);
    font-family: "Arial Narrow", sans-serif;
    font-size: 0.75rem;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.tlt-dw__receipt span {
    min-width: 0;
    color: rgba(244, 239, 230, 0.72);
    font-size: 0.72rem;
    font-weight: 650;
}

.tlt-dw__receipt.is-hit {
    animation: tlt-dw-receipt 280ms ease-out;
}

.tlt-dw__controls {
    margin-top: 8px;
    padding: 13px;
    border: 1px solid var(--dw-line);
    border-radius: 14px;
    background: rgba(9, 16, 13, 0.8);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.tlt-dw__section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.tlt-dw__section-head > div > span {
    display: block;
    margin-top: 2px;
    color: rgba(244, 239, 230, 0.5);
    font-size: 0.62rem;
    font-weight: 650;
}

.tlt-dw__section-head > strong {
    color: rgba(244, 239, 230, 0.62);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.63rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.tlt-dw__control-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(150px, 0.55fr);
    align-items: end;
    gap: 10px;
}

.tlt-dw__control-grid label {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.tlt-dw__control-grid label > span {
    color: rgba(244, 239, 230, 0.55);
    font-size: 0.59rem;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.tlt-dw__control-grid input[type="range"] {
    width: 100%;
    accent-color: var(--dw-gold);
    cursor: pointer;
}

.tlt-dw__primary {
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid var(--dw-orange);
    border-radius: 9px;
    background: linear-gradient(180deg, var(--dw-orange-hot), var(--dw-orange));
    color: #1a0c05 !important;
    box-shadow: 0 8px 24px rgba(242, 106, 27, 0.18);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 150ms ease, filter 150ms ease, opacity 150ms ease;
}

.tlt-dw__primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.tlt-dw button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
    transform: none;
}

.tlt-dw__target-key {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, auto));
    justify-content: center;
    gap: 6px 15px;
    padding: 11px 6px 0;
    color: rgba(244, 239, 230, 0.45);
    font-size: 0.58rem;
    font-weight: 700;
}

.tlt-dw__target-key span {
    min-width: 0;
    white-space: nowrap;
}

.tlt-dw__target-key b {
    color: var(--dw-gold);
    font-family: "SFMono-Regular", Consolas, monospace;
}

.tlt-dw__dialog {
    width: min(560px, calc(100vw - 28px));
    max-height: min(720px, calc(100dvh - 28px));
    padding: 0;
    overflow: auto;
    border: 1px solid rgba(244, 239, 230, 0.25);
    border-radius: 18px;
    background: #08100d;
    color: var(--dw-cream);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.7);
}

.tlt-dw__dialog::backdrop {
    background: rgba(1, 3, 2, 0.76);
    backdrop-filter: blur(5px);
}

.tlt-dw__dialog-inner {
    padding: clamp(20px, 4vw, 34px);
}

.tlt-dw__dialog ol {
    display: grid;
    gap: 8px;
    margin: 17px 0;
    padding-left: 1.25rem;
    color: rgba(244, 239, 230, 0.72);
    font-size: 0.86rem;
}

.tlt-dw__dialog p:not(.tlt-dw__card-kicker) {
    color: rgba(244, 239, 230, 0.68);
    font-size: 0.82rem;
}

@keyframes tlt-dw-receipt {
    0% { transform: translateY(4px); border-color: rgba(242, 106, 27, 0.75); }
    100% { transform: translateY(0); border-color: rgba(244, 239, 230, 0.17); }
}

@media (max-width: 920px) {
    .tlt-dw__target-key {
        grid-template-columns: repeat(3, minmax(0, auto));
    }
}

@media (max-width: 780px) {
    .tlt-dw__shell {
        padding: 12px 12px calc(104px + env(safe-area-inset-bottom));
        border-radius: 18px;
    }

    .tlt-dw__header {
        align-items: flex-end;
        gap: 10px;
    }

    .tlt-dw__header h2 {
        font-size: clamp(3rem, 14vw, 4.6rem);
    }

    .tlt-dw__lede {
        max-width: 440px;
        font-size: 0.82rem;
    }

    .tlt-dw__utility {
        flex-direction: column;
        gap: 5px;
    }

    .tlt-dw__icon-btn {
        min-height: 36px;
        padding: 7px 9px;
        font-size: 0.56rem;
    }

    .tlt-dw__scoreboard {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .tlt-dw__scoreboard > div {
        min-height: 46px;
        padding: 5px 6px;
    }

    .tlt-dw__scoreboard span {
        font-size: 0.47rem;
        letter-spacing: 0.07em;
    }

    .tlt-dw__scoreboard strong {
        font-size: 0.78rem;
    }

    .tlt-dw__assignment {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 4px 10px;
        padding: 8px 10px;
    }

    .tlt-dw__assignment > span {
        font-size: 0.61rem;
        white-space: normal;
    }

    .tlt-dw__periods {
        grid-column: 1 / -1;
    }

    .tlt-dw__period {
        width: 100%;
        height: 4px;
        border-radius: 999px;
    }

    .tlt-dw__stage-wrap {
        min-height: clamp(480px, 125vw, 620px);
        aspect-ratio: 4 / 5;
        border-radius: 14px;
    }

    .tlt-dw__receipt {
        min-height: 45px;
        gap: 8px;
        padding: 7px 9px;
    }

    .tlt-dw__receipt strong {
        font-size: 0.63rem;
    }

    .tlt-dw__receipt span {
        font-size: 0.61rem;
    }

    .tlt-dw__control-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tlt-dw__kick {
        grid-column: 1 / -1;
    }
}

@media (max-width: 460px) {
    .tlt-dw__shell {
        padding: 9px 9px calc(100px + env(safe-area-inset-bottom));
        border-radius: 14px;
    }

    .tlt-dw__eyebrow {
        font-size: 0.56rem;
    }

    .tlt-dw__header h2 {
        font-size: clamp(2.65rem, 14vw, 3.65rem);
    }

    .tlt-dw__lede {
        margin-top: 5px;
        font-size: 0.7rem;
        line-height: 1.25;
    }

    .tlt-dw__icon-btn {
        min-height: 32px;
        padding: 5px 7px;
        font-size: 0.49rem;
    }

    .tlt-dw__scoreboard {
        margin-bottom: 7px;
    }

    .tlt-dw__scoreboard > div {
        min-height: 43px;
        padding: 4px;
        text-align: center;
    }

    .tlt-dw__scoreboard span {
        font-size: 0.42rem;
        letter-spacing: 0.035em;
    }

    .tlt-dw__scoreboard strong {
        font-size: 0.7rem;
    }

    .tlt-dw__assignment h3 {
        font-size: 0.77rem;
    }

    .tlt-dw__assignment p {
        font-size: 0.52rem;
    }

    .tlt-dw__assignment > span {
        font-size: 0.56rem;
        line-height: 1.2;
    }

    .tlt-dw__stage-wrap {
        min-height: 465px;
    }

    .tlt-dw__start-card,
    .tlt-dw__finish {
        width: calc(100% - 22px);
        padding: 17px 14px;
    }

    .tlt-dw__start-card h3,
    .tlt-dw__finish h3 {
        font-size: 1.62rem;
    }

    .tlt-dw__start-card > p:not(.tlt-dw__card-kicker),
    .tlt-dw__finish > p:not(.tlt-dw__card-kicker) {
        font-size: 0.74rem;
    }

    .tlt-dw__receipt {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .tlt-dw__controls {
        padding: 10px;
    }

    .tlt-dw__section-head {
        align-items: flex-start;
        gap: 8px;
    }

    .tlt-dw__section-head > div > span {
        display: none;
    }

    .tlt-dw__section-head > strong {
        max-width: 56%;
        overflow: hidden;
        font-size: 0.54rem;
        text-overflow: ellipsis;
    }

    .tlt-dw__control-grid {
        gap: 8px;
    }

    .tlt-dw__primary {
        min-height: 44px;
        font-size: 0.64rem;
    }

    .tlt-dw__target-key {
        grid-template-columns: repeat(2, minmax(0, auto));
        justify-content: start;
        gap: 5px 12px;
        padding-top: 10px;
        font-size: 0.53rem;
    }
}

@media (max-width: 340px) {
    .tlt-dw__header h2 {
        font-size: 2.45rem;
    }

    .tlt-dw__icon-btn {
        padding-inline: 5px;
    }

    .tlt-dw__scoreboard span {
        font-size: 0.39rem;
    }

    .tlt-dw__stage-wrap {
        min-height: 440px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tlt-dw *,
    .tlt-dw *::before,
    .tlt-dw *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
