@font-face {
    font-family: 'Silkscreen';
    src: url('/fonts/Silkscreen-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Silkscreen';
    src: url('/fonts/Silkscreen-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

#tr-world {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    image-rendering: pixelated;
}

.tr-page {
    --tr-a: #4a5fc4;
    --tr-b: #2b3a8c;
    --tr-c: #1b2466;
    --tr-edge: #0a0f33;
    --tr-line: rgba(160, 182, 245, 0.35);
    --tr-slot: rgba(32, 44, 120, 0.85);
    --tr-fg: #ffffff;
    --tr-fg2: #c9d4ff;
    --tr-gold: #ffd94a;
    --tr-green: #7be86a;
    position: relative;
    isolation: isolate;
}

.tr-font {
    font-family: 'Silkscreen', ui-monospace, monospace;
    letter-spacing: 0.04em;
}

.tr-text {
    color: var(--tr-fg);
    text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000, 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

.tr-text2 {
    color: var(--tr-fg2);
}

.tr-gold {
    color: var(--tr-gold);
}

.tr-green {
    color: var(--tr-green);
}

.tr-panel {
    position: relative;
    margin: 3px;
    color: var(--tr-fg);
    background: linear-gradient(180deg, var(--tr-a) 0%, var(--tr-b) 38%, var(--tr-c) 100%);
    border: 3px solid var(--tr-edge);
    border-radius: 12px;
    box-shadow: inset 0 0 0 2px var(--tr-line), 0 6px 0 rgba(0, 0, 0, 0.35);
}

.tr-panel--dim {
    background: linear-gradient(180deg, rgba(40, 52, 130, 0.94) 0%, rgba(24, 32, 90, 0.96) 100%);
}

.tr-parch {
    position: relative;
    margin: 3px;
    color: #2a1a08;
    background: linear-gradient(180deg, #e8d3a0 0%, #d5b678 100%);
    border: 3px solid #3a2410;
    border-radius: 10px;
    box-shadow: inset 0 0 0 2px rgba(255, 244, 210, 0.55), 0 6px 0 rgba(0, 0, 0, 0.35);
}

.tr-parch p {
    color: #3a2410;
}

.tr-title {
    font-weight: 900;
    color: #ffffff;
    text-shadow: 3px 0 0 #000, -3px 0 0 #000, 0 3px 0 #000, 0 -3px 0 #000, 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 5px 0 #000;
}

.tr-title em {
    font-style: normal;
    color: var(--tr-gold);
}

.tr-h3 {
    font-weight: 800;
    color: var(--tr-fg);
    text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000;
}

.tr-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3rem;
    padding: 0 1.5rem;
    margin: 3px;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1;
    color: #ffffff;
    text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000;
    background: linear-gradient(180deg, #5a72dc 0%, #3548a8 100%);
    border: 3px solid var(--tr-edge);
    border-radius: 10px;
    box-shadow: inset 0 0 0 2px rgba(190, 205, 255, 0.4), 0 4px 0 rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.08s steps(2), filter 0.08s steps(2);
    text-align: center;
}

.tr-btn:hover {
    filter: brightness(1.18);
}

.tr-btn:active {
    transform: translateY(3px);
    box-shadow: inset 0 0 0 2px rgba(190, 205, 255, 0.4), 0 1px 0 rgba(0, 0, 0, 0.4);
}

.tr-btn--green {
    background: linear-gradient(180deg, #52c04a 0%, #2c8a2c 100%);
}

.tr-btn--gold {
    color: #2a1a00;
    text-shadow: none;
    background: linear-gradient(180deg, #ffd94a 0%, #d99a14 100%);
    box-shadow: inset 0 0 0 2px rgba(255, 246, 190, 0.7), 0 4px 0 rgba(0, 0, 0, 0.4);
}

.tr-btn--ghost {
    background: rgba(10, 15, 51, 0.62);
}

.tr-btn--sm {
    min-height: 2.4rem;
    padding: 0 1rem;
    font-size: 0.82rem;
}

.tr-btn--block {
    display: flex;
    width: calc(100% - 6px);
}

.tr-link {
    color: var(--tr-gold);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 2px;
}

.tr-link:hover {
    text-decoration-style: dashed;
}

.tr-slot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 4.5rem;
    height: 4.5rem;
    background: var(--tr-slot);
    border: 2px solid rgba(190, 205, 255, 0.55);
    border-radius: 6px;
    box-shadow: inset 0 0 0 2px rgba(10, 15, 51, 0.55);
}

.tr-slot--sm {
    width: 3.25rem;
    height: 3.25rem;
}

.tr-slot--lg {
    width: 6rem;
    height: 6rem;
}

.tr-ico {
    display: inline-block;
    flex-shrink: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    image-rendering: pixelated;
}

.tr-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    margin: 2px;
    font-family: 'Silkscreen', ui-monospace, monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    color: #ffffff;
    background: #2a3380;
    border: 2px solid var(--tr-edge);
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(190, 205, 255, 0.4);
}

.tr-tag--green {
    background: #2c8a2c;
}

.tr-tag--gold {
    background: #d99a14;
    color: #2a1a00;
}

.tr-tag--red {
    background: #b3261e;
}

.tr-tag--purple {
    background: #6a2fa0;
}

.tr-hud {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.tr-hud__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    direction: ltr;
}

.tr-hearts {
    display: grid;
    grid-template-columns: repeat(10, auto);
    gap: 0;
    justify-content: start;
}

.tr-stars {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tr-hotbar {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 4px;
    direction: ltr;
}

.tr-hotbar__slot {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tr-slot);
    border: 2px solid rgba(190, 205, 255, 0.55);
    border-radius: 6px;
    box-shadow: inset 0 0 0 2px rgba(10, 15, 51, 0.55);
}

.tr-hotbar__slot.is-active {
    border-color: var(--tr-gold);
    box-shadow: inset 0 0 0 2px rgba(10, 15, 51, 0.55), 0 0 0 2px #000;
}

.tr-hotbar__num {
    position: absolute;
    top: 1px;
    left: 4px;
    font-family: 'Silkscreen', ui-monospace, monospace;
    font-size: 0.6rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 1px 1px 0 #000;
}

.tr-hotbar__slot::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 1px 1px 0 #000;
    background: rgba(12, 16, 60, 0.96);
    border: 2px solid #000;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    direction: rtl;
}

.tr-hotbar__slot:hover::after,
.tr-hotbar__slot:focus-visible::after {
    opacity: 1;
}

/* روی دستگاه لمسی tooltip با تپ از #lx-tip (landing-lx.js) می‌آید؛
   :hover شبیه‌سازی‌شده‌ی مرورگر نباید نسخه‌ی CSS را هم نشان دهد */
@media (hover: none) {
    .tr-hotbar__slot:hover::after,
    .tr-hotbar__slot:focus-visible::after {
        opacity: 0;
    }
}

.tr-card {
    transition: transform 0.12s steps(3);
}

.tr-card:hover {
    transform: translateY(-4px);
}

.tr-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.tr-list li > .tr-ico {
    margin-top: 0.3rem;
}

.tr-bar {
    position: relative;
    height: 1.1rem;
    overflow: hidden;
    background: #0c1030;
    border: 2px solid #000;
    border-radius: 6px;
    margin: 3px;
}

.tr-bar__fill {
    position: absolute;
    inset: 2px;
    border-radius: 3px;
    transform-origin: right center;
    background: linear-gradient(180deg, #ff6a5e 0%, #c4231a 100%);
}

.tr-bar__fill--blue {
    background: linear-gradient(180deg, #7aa4ff 0%, #2f55d8 100%);
}

.tr-range {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 1.9rem;
    background: transparent;
    cursor: pointer;
    margin: 0.4rem 0 0;
}

.tr-range::-webkit-slider-runnable-track {
    height: 1.1rem;
    background: linear-gradient(to left, #ffd94a var(--pl-range-fill, 0%), #0c1030 var(--pl-range-fill, 0%));
    box-shadow: 0 0 0 3px #000, inset 0 0 0 2px rgba(10, 15, 51, 0.55);
    border: 0;
    border-radius: 0;
}

.tr-range::-moz-range-track {
    height: 1.1rem;
    background: #0c1030;
    box-shadow: 0 0 0 3px #000, inset 0 0 0 2px rgba(10, 15, 51, 0.55);
    border: 0;
    border-radius: 0;
}

.tr-range::-moz-range-progress {
    height: 1.1rem;
    background: #ffd94a;
    border-radius: 0;
}

.tr-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.2rem;
    height: 1.9rem;
    margin-top: -0.4rem;
    border: 0;
    border-radius: 0;
    background: #5a72dc;
    box-shadow: 0 0 0 3px #000, inset 0 0 0 2px rgba(190, 205, 255, 0.55);
}

.tr-range::-moz-range-thumb {
    width: 1.2rem;
    height: 1.9rem;
    border: 0;
    border-radius: 0;
    background: #5a72dc;
    box-shadow: 0 0 0 3px #000, inset 0 0 0 2px rgba(190, 205, 255, 0.55);
}

.tr-range:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 6px;
}

.tr-faq {
    margin-top: 0.75rem;
}

.tr-faq__q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1.3rem;
    text-align: right;
    font-weight: 800;
    line-height: 1.9;
    color: #ffffff;
    text-shadow: 1px 1px 0 #000;
    cursor: pointer;
    border-radius: 9px;
}

.tr-faq__q:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tr-faq__a {
    padding: 0 1.3rem 1.2rem;
    line-height: 2.05;
    color: var(--tr-fg2);
}

.tr-faq__sign {
    flex-shrink: 0;
    width: 1.7rem;
    height: 1.7rem;
    position: relative;
    background: var(--tr-slot);
    border: 2px solid rgba(190, 205, 255, 0.55);
    border-radius: 6px;
}

.tr-faq__sign::before,
.tr-faq__sign::after {
    content: '';
    position: absolute;
    background: #ffffff;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.tr-faq__sign::before {
    width: 0.8rem;
    height: 3px;
}

.tr-faq__sign::after {
    width: 3px;
    height: 0.8rem;
    transition: transform 0.12s steps(3);
}

.tr-faq__q[aria-expanded='true'] .tr-faq__sign::after {
    transform: translate(-50%, -50%) scaleY(0);
}

.tr-sm-only {
    display: none;
}

@media (min-width: 640px) {
    .tr-sm-only {
        display: inline-block;
    }
}

.tr-mob {
    display: none;
    position: absolute;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    image-rendering: pixelated;
    z-index: 2;
}

@media (min-width: 640px) {
    .tr-mob {
        display: block;
    }
}

.tr-bob {
    animation: trBob 2.4s steps(6) infinite;
}

@keyframes trBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.tr-blink {
    animation: trBlink 0.9s steps(2) infinite;
}

@keyframes trBlink {
    0% { opacity: 1; }
    100% { opacity: 0.25; }
}

.tr-page :focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .tr-hotbar {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
    }

    .tr-hotbar__slot::after {
        display: none;
    }

    .tr-hotbar__num {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tr-bob,
    .tr-blink {
        animation: none;
    }

    .tr-card,
    .tr-btn,
    .tr-painting {
        transition: none;
    }
}

.tr-painting {
    position: relative;
    width: min(100%, 17rem);
    margin: 2.1rem auto 1.5rem;
    transform: rotate(1.5deg);
    transform-origin: 50% -1.6rem;
    transition: transform 0.6s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.tr-painting::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -1.75rem;
    width: 62%;
    height: 1.9rem;
    transform: translateX(-50%);
    background: linear-gradient(to top right, transparent calc(50% - 1.5px), #5a3a17 calc(50% - 1.5px), #5a3a17 calc(50% + 1.5px), transparent calc(50% + 1.5px)) left / 50% 100% no-repeat, linear-gradient(to top left, transparent calc(50% - 1.5px), #5a3a17 calc(50% - 1.5px), #5a3a17 calc(50% + 1.5px), transparent calc(50% + 1.5px)) right / 50% 100% no-repeat;
}

.tr-painting::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -2.1rem;
    width: 12px;
    height: 12px;
    transform: translateX(-50%);
    border-radius: 3px;
    background: var(--tr-gold);
    box-shadow: 0 0 0 2px #2a1a08;
}

.tr-painting__frame {
    padding: 10px;
    border-radius: 6px;
    background: linear-gradient(145deg, #a8733a, #6b4219 55%, #4a2c10);
    box-shadow: 0 0 0 3px #2a1a08, inset 0 0 0 2px rgba(255, 217, 74, 0.35), 0 16px 28px rgba(42, 26, 8, 0.4);
}

.tr-painting__frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 0 0 3px #2a1a08;
}

.tr-painting figcaption {
    margin-top: 0.8rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #2a1a08;
}

div:has(> .tr-painting) {
    display: flow-root;
}

.tr-painting:hover {
    transform: rotate(-1deg);
}

@media (min-width: 640px) {
    .tr-painting {
        float: left;
        margin: 2.1rem 1.75rem 1rem 0;
    }
}

@media (max-width: 639px) {
    .flex-wrap > .tr-btn { flex: 1 1 auto; }
}
