/* Keep board geometry proportional; surrounding text and controls never scale. */
#game.torres2-game {
    position: relative;
    background-color: #cbbba0;
    background-image:
        radial-gradient(ellipse at 44% 40%, rgba(244, 236, 220, .78) 0%, rgba(214, 200, 174, .82) 58%, rgba(184, 166, 135, .9) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='64' viewBox='0 0 120 64'%3E%3Cg fill='none' stroke-width='1'%3E%3Cpath stroke='rgba(78,58,32,0.09)' d='M0 0.5H120M0 32.5H120M60 0V32M0 32V64M120 32V64'/%3E%3Cpath stroke='rgba(255,250,240,0.28)' d='M1 1.5H59M61 1.5H119M1 33.5H119'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 100% 100%, 120px 64px;
    min-height: 100%;
    gap: 12px;
    padding: 8px;
    align-items: start;
}

#game.torres2-game #board {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

#game.torres2-game #playerData {
    flex: 0 0 220px;
    width: 220px;
    margin: 30px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#game.torres2-game .playerData {
    border: 1px solid #78582d;
    border-radius: 6px;
    background: linear-gradient(180deg, #d7b483 0%, #c49863 100%);
    box-shadow: 0 2px 6px rgba(42, 28, 12, .16);
    padding: 5px;
}

#game.torres2-game .playerDataBasic {
    padding: 0;
}

#game.torres2-game .playerDataBasic .basicDesc {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

#game.torres2-game .playerDataBasic .basicDesc>* {
    padding-left: 0;
}

#game.torres2-game .playerDataBasic .basicDesc .symbol,
#game.torres2-game .playerDataBasic .basicDesc>span:not([class]) {
    display: none;
}

#game.torres2-game .torres-player-knight {
    display: inline-flex;
    align-items: center;
    flex: none;
}

#game.torres2-game .torres-player-knight img {
    width: 16px;
    height: 20px;
    object-fit: contain;
    display: block;
}

#game.torres2-game .playerDataBasic div.torres-flag {
    width: 18px;
    flex: none;
    display: inline-block;
}

#game.torres2-game .playerDataBasic .torres-flag .fflag {
    width: 16px;
    padding-top: 68.75%;
    margin: 0;
    display: block;
}

#game.torres2-game .playerInfoLogin {
    overflow-wrap: anywhere;
}

#game.torres2-game .torres-star {
    color: #594100;
    font-size: .8em;
}

#game.torres2-game .torres-player-resources {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

#game.torres2-game .torres-player-resources button {
    background: #dcc092;
    border: 1px solid #9c7849;
    border-radius: 5px;
    min-height: 34px;
    color: #2e2417;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    font-size: 1rem;
    box-shadow: none;
    transition: transform .1s ease, box-shadow .1s ease, background .1s ease;
}

#game.torres2-game .torres-player-resources img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

#game.torres2-game .torres-player-resources button.active {
    background: linear-gradient(180deg, #fffef5 0%, #f8e2a2 100%);
    border-color: #7a5610;
    color: #1f170d;
    box-shadow: 0 0 0 2px #ffd633, 0 2px 5px rgba(45, 28, 8, .38), inset 0 1px 0 #fff;
}

#game.torres2-game .torres-player-resources button.active:hover {
    background: linear-gradient(180deg, #fff 0%, #ffea96 100%);
    border-color: #5c3f08;
    box-shadow: 0 0 0 2.5px #ffe14d, 0 4px 8px rgba(45, 28, 8, .45), inset 0 1px 0 #fff;
    transform: translateY(-1px);
}

#game.torres2-game .torres-player-resources button.active:active {
    transform: translateY(0);
    box-shadow: 0 0 0 2px #ffd633, 0 1px 2px rgba(45, 28, 8, .35), inset 0 1px 2px rgba(0, 0, 0, .12);
}

#game.torres2-game .torres-stacks span {
    white-space: nowrap;
    font-size: .85em;
}

#game.torres2-game .torres-stacks strong {
    font-weight: 700;
}

#game.torres2-game .torres-pile-info {
    border: 0;
    background: transparent;
    text-decoration: underline;
    color: #272116;
    font-size: .8rem;
}

#Torres2 {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    --board-size: 500px;
}

#Torres2 {
    position: relative;
}

#Torres2 .torres-flight {
    z-index: 200;
    aspect-ratio: 1;
    text-align: center;
}

#Torres2 .torres-flight img {
    width: 100%;
    height: auto;
}

#Torres2 .torres-top-bar {
    position: relative;
    z-index: 12;
    width: var(--board-size);
    max-width: 100%;
    min-height: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

#Torres2.torres-mode-3d .torres-top-bar {
    width: var(--board-w-3d, 100%);
}

#Torres2.torres-mode-3d:not(.torres-compact-3d) .torres-top-bar {
    justify-content: flex-end;
}

#Torres2 .torres-phase {
    font-weight: 600;
    color: #392b1a;
}

#Torres2 .torres-phase-3d {
    display: none;
}

#Torres2.torres-mode-3d .torres-phase-2d {
    display: none;
}

#Torres2.torres-mode-3d:not(.torres-compact-3d) .torres-phase {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 12;
}

#Torres2.torres-mode-3d .torres-phase-3d {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 5px 11px 6px 8px;
    background: linear-gradient(180deg, rgba(250, 243, 227, .96) 0%, rgba(227, 206, 168, .95) 100%);
    border: 1.5px solid #7a5a2e;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(42, 28, 12, .22), inset 0 1px 0 rgba(255, 252, 244, .85), inset 0 0 0 2px rgba(186, 142, 62, .18);
    transition: background .45s ease, border-color .45s ease, box-shadow .45s ease;
}

#Torres2.torres-mode-3d .torres-phase-crest {
    width: 28px;
    height: 32px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #523d21 0%, #2f2212 100%);
    border: 1px solid #c99636;
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255, 236, 185, .25);
}

#Torres2.torres-mode-3d .torres-phase-crest-svg {
    width: 22px;
    height: 26px;
    display: block;
}

#Torres2.torres-mode-3d .torres-phase-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

#Torres2.torres-mode-3d .torres-phase-row-main,
#Torres2.torres-mode-3d .torres-phase-row-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#Torres2.torres-mode-3d .torres-phase-title {
    font-family: 'TorresCinzel', Georgia, serif;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.1;
    color: #2d1f0e;
    letter-spacing: .02em;
    white-space: nowrap;
}

#Torres2.torres-mode-3d .torres-phase-seals {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

#Torres2.torres-mode-3d .torres-phase-seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 4px;
    font-family: 'TorresCinzel', Georgia, serif;
    font-size: .64rem;
    font-weight: 700;
    line-height: 1;
    background: rgba(110, 82, 42, .12);
    border: 1px solid rgba(118, 88, 46, .35);
    color: #6e5430;
}

#Torres2.torres-mode-3d .torres-phase-seal.is-done {
    background: rgba(168, 126, 56, .28);
    border-color: #967034;
    color: #4e3818;
}

#Torres2.torres-mode-3d .torres-phase-seal.is-current {
    background: linear-gradient(180deg, #5c4318 0%, #36250b 100%);
    border-color: #d4a13a;
    color: #ffe28a;
    box-shadow: 0 1px 3px rgba(42, 28, 8, .35);
}

#Torres2.torres-mode-3d .torres-phase-round {
    font-family: 'TorresCondensed', system-ui, sans-serif;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.1;
    color: #594122;
    white-space: nowrap;
}

#Torres2.torres-mode-3d .torres-round-pips {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

#Torres2.torres-mode-3d .torres-round-pip {
    width: 13px;
    height: 6px;
    border-radius: 3px;
    border: 1px solid rgba(110, 80, 40, .42);
    background: rgba(96, 70, 36, .14);
}

#Torres2.torres-mode-3d .torres-round-pip.is-done {
    background: #b68434;
    border-color: #7c561b;
}

#Torres2.torres-mode-3d .torres-round-pip.is-current {
    background: linear-gradient(180deg, #ffe37a 0%, #dc9e24 100%);
    border-color: #6e480c;
    box-shadow: 0 0 4px rgba(235, 178, 48, .55);
}

#Torres2.torres-mode-3d .torres-round-pip.is-current.is-final {
    background: linear-gradient(180deg, #ffec99 0%, #e58e1a 100%);
    border-color: #7c3f08;
    box-shadow: 0 0 5px rgba(240, 148, 28, .7);
}

#Torres2.torres-mode-3d.torres-compact-3d .torres-top-bar {
    justify-content: space-between;
}

#Torres2.torres-mode-3d.torres-compact-3d .torres-phase {
    position: static;
}

#Torres2.torres-mode-3d.torres-compact-3d .torres-phase-3d {
    padding: 2px 8px;
    border-radius: 6px;
    gap: 6px;
}

#Torres2.torres-mode-3d.torres-compact-3d .torres-phase-crest,
#Torres2.torres-mode-3d.torres-compact-3d .torres-phase-seals {
    display: none;
}

#Torres2.torres-mode-3d.torres-compact-3d .torres-phase-body {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

#Torres2.torres-mode-3d.torres-compact-3d .torres-phase-title,
#Torres2.torres-mode-3d.torres-compact-3d .torres-phase-round {
    font-size: .78rem;
}

#Torres2.torres-mode-3d.torres-compact-3d .torres-round-pip {
    width: 8px;
    height: 5px;
}

#Torres2 .torres-view-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

#Torres2 .torres-tutorial-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 23px;
    padding: 0 9px;
    border-radius: 999px;
    background: linear-gradient(180deg, #745324 0%, #523915 100%);
    border: 1px solid #b88b45;
    color: #fff8e6;
    font-weight: 700;
    font-size: .75rem;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(42, 28, 12, .22), inset 0 1px 0 rgba(255, 244, 210, .2);
    flex: 0 0 auto;
    cursor: pointer;
}

#Torres2 .torres-tutorial-link:hover,
#Torres2 .torres-tutorial-link:focus-visible {
    background: linear-gradient(180deg, #87612b 0%, #63451b 100%);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 440px) {
    #Torres2 .torres-tutorial-link {
        padding: 0 7px;
    }

    #Torres2 .torres-tutorial-link-lbl {
        display: none;
    }
}

#Torres2 .torres-view-btn {
    padding: 1px 7px;
    font-size: .78rem;
    line-height: 1.25;
    border: 1px solid #73552c;
    background: #ead4a8;
    color: #282014;
    cursor: pointer;
}

#Torres2 .torres-view-btn[aria-pressed="true"] {
    background: #594100;
    color: #fff8e6;
    border-color: #3d2c00;
}

#Torres2 .torres-view-btn:hover {
    background: #f3e2be;
}

#Torres2 .torres-view-btn[aria-pressed="true"]:hover {
    background: #6b4e00;
}

#Torres2 .torres-surface {
    position: relative;
    width: var(--board-size);
    height: var(--board-size);
    max-width: 100%;
    flex: none;
    border-radius: 5px;
    box-shadow: 0 6px 18px rgba(42, 28, 12, .26), 0 0 0 1px rgba(84, 60, 28, .45);
}

#Torres2 .torres-board-inner {
    position: absolute;
    left: 3.6%;
    top: 3.6%;
    width: 92.8%;
    height: 92.8%;
    z-index: 2;
    background: url('../images/board.webp') center / 100% 100% no-repeat;
    box-shadow: 0 0 0 1px rgba(74, 53, 25, .55);
}

#Torres2 .torres-track {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    pointer-events: none;
}

#Torres2 .torres-track-svg {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

#Torres2 .torres-track-num {
    fill: #46341c;
    font-family: 'Fira Sans Condensed', system-ui, sans-serif;
    font-weight: 600;
    user-select: none;
}

#Torres2 .torres-track-target {
    position: absolute;
    box-sizing: border-box;
    border: 1.5px dashed #5c4214;
    box-shadow: inset 0 0 0 1.5px #ffd633;
    background: rgba(255, 224, 92, .28);
    border-radius: 2px;
    pointer-events: none;
    z-index: 5;
}

#Torres2 .torres-track-target.is-leapfrog {
    background: rgba(255, 214, 51, .4);
}

#Torres2 .torres-track-gain {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 0 3px;
    border-radius: 7px;
    background: #3d2a0d;
    color: #ffe88c;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

#Torres2 .torres-track-token {
    position: absolute;
    width: 2.5%;
    height: 2.5%;
    min-width: 10px;
    min-height: 10px;
    transform: translate(-50%, -50%);
    padding: 0;
    border-radius: 50%;
    border: 1.2px solid #1e1408;
    box-shadow: 0 1px 2.5px rgba(0, 0, 0, .45), inset 0 1px 1px rgba(255, 255, 255, .42);
    pointer-events: none;
    cursor: default;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    transition: transform .1s ease, box-shadow .1s ease;
}

#Torres2 .torres-track-token.torres-token-shared {
    width: 1.75%;
    height: 1.75%;
    min-width: 7.5px;
    min-height: 7.5px;
}

#Torres2 .torres-track-token[data-color="0"] {
    background: radial-gradient(circle at 35% 30%, #74beee 0%, #368ac0 58%, #1d5780 100%);
    color: #fff;
}

#Torres2 .torres-track-token[data-color="1"] {
    background: radial-gradient(circle at 35% 30%, #ffd09a 0%, #e99b51 58%, #a65c1a 100%);
    color: #1f1407;
}

#Torres2 .torres-track-token[data-color="2"] {
    background: radial-gradient(circle at 35% 30%, #9ee09e 0%, #65a765 58%, #2e662e 100%);
    color: #0e1f0e;
}

#Torres2 .torres-track-token[data-color="3"] {
    background: radial-gradient(circle at 35% 30%, #7d828c 0%, #424242 58%, #191a1c 100%);
    color: #fff;
}

#Torres2 .torres-track-token .torres-track-lap {
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
}

#Torres2 .torres-track-token.active {
    pointer-events: auto;
    cursor: pointer;
    z-index: 6;
    border-color: #3a2705;
    box-shadow: 0 0 0 2px #ffd633, 0 0 0 4px rgba(82, 59, 16, .88), 0 2px 6px rgba(0, 0, 0, .5);
}

#Torres2 .torres-track-token.active::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: max(100%, 26px);
    height: max(100%, 26px);
    transform: translate(-50%, -50%);
}

#Torres2 .torres-track-token.active:hover {
    transform: translate(-50%, -50%) scale(1.16);
    box-shadow: 0 0 0 2.5px #ffe566, 0 0 0 4.5px #3b290a, 0 3px 8px rgba(0, 0, 0, .55);
}

#Torres2 .torres-track-token.torres-flight {
    pointer-events: none;
    z-index: 200;
}

#Torres2 .torres-canvas-3d {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
    user-select: none;
}

#Torres2.torres-mode-3d .torres-surface {
    width: var(--board-w-3d, 100%);
    height: var(--board-h-3d, var(--board-size));
    background: none;
    box-shadow: none;
    border-radius: 0;
}

#Torres2.torres-mode-3d .torres-board-inner,
#Torres2.torres-mode-3d .torres-track,
#Torres2.torres-mode-3d .torres-grid {
    opacity: 0;
    pointer-events: none;
}

#Torres2.torres-mode-3d .torres-canvas-3d {
    display: block;
}

#Torres2 .torres-grid {
    position: absolute;
    left: 5.66%;
    top: 5.66%;
    width: 88.68%;
    height: 88.68%;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
}

#game.torres2-game .torres-sky-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: var(--night-alpha, 0);
}

#game.torres2-game.torres-night-scene > :not(.torres-sky-canvas) {
    position: relative;
    z-index: 1;
}

#Torres2 .torres-phase {
    transition: color .45s ease, text-shadow .45s ease;
}

#game.torres2-game.torres-night-scene #Torres2:not(.torres-mode-3d) .torres-phase {
    color: #e6ecff;
    text-shadow: 0 1px 4px rgba(4, 8, 22, .9);
}

#game.torres2-game.torres-night-scene #Torres2.torres-mode-3d .torres-phase-3d {
    background: linear-gradient(180deg, rgba(24, 35, 64, .94) 0%, rgba(15, 23, 44, .94) 100%);
    border-color: #8fa4cc;
    box-shadow: 0 4px 14px rgba(4, 8, 22, .62), inset 0 1px 0 rgba(210, 226, 255, .18), inset 0 0 0 2px rgba(201, 150, 54, .2);
}

#game.torres2-game.torres-night-scene #Torres2.torres-mode-3d .torres-phase-crest {
    background: linear-gradient(180deg, #213054 0%, #121b33 100%);
    border-color: #c99636;
}

#game.torres2-game.torres-night-scene #Torres2.torres-mode-3d .torres-phase-title {
    color: #eef3ff;
}

#game.torres2-game.torres-night-scene #Torres2.torres-mode-3d .torres-phase-round {
    color: #b8c7e8;
}

#game.torres2-game.torres-night-scene #Torres2.torres-mode-3d .torres-phase-seal {
    background: rgba(140, 164, 212, .14);
    border-color: rgba(140, 164, 212, .38);
    color: #9cb0d8;
}

#game.torres2-game.torres-night-scene #Torres2.torres-mode-3d .torres-phase-seal.is-done {
    background: rgba(201, 150, 54, .26);
    border-color: #b68434;
    color: #f4d68c;
}

#game.torres2-game.torres-night-scene #Torres2.torres-mode-3d .torres-phase-seal.is-current {
    background: linear-gradient(180deg, #5a4218 0%, #342309 100%);
    border-color: #ffcf66;
    color: #fff0b8;
}

#game.torres2-game.torres-night-scene #Torres2.torres-mode-3d .torres-round-pip {
    border-color: rgba(154, 176, 220, .42);
    background: rgba(140, 164, 212, .16);
}

#game.torres2-game.torres-night-scene #Torres2.torres-mode-3d .torres-round-pip.is-current {
    background: linear-gradient(180deg, #ffe796 0%, #ffcf66 100%);
    border-color: #b57712;
    box-shadow: 0 0 6px rgba(255, 207, 102, .72);
}

#game.torres2-game.torres-night-scene #playerData,
#game.torres2-game.torres-night-scene #Torres2 .torres-hand,
#game.torres2-game.torres-night-scene #Torres2 .torres-ap-badge,
#game.torres2-game.torres-night-scene #Torres2 .torres-advance-btn,
#game.torres2-game.torres-night-scene #Torres2 .torres-view-controls,
#game.torres2-game.torres-night-scene #Torres2 .torres-draw-panel {
    filter: brightness(calc(1 - var(--night-alpha, 0) * 0.36));
}

#Torres2 .torres-night-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(circle at 50% 45%, rgba(16, 26, 56, .62) 0%, rgba(10, 16, 38, .76) 100%);
    opacity: var(--night-alpha, 0);
}

#Torres2.torres-night .torres-track-svg {
    filter: brightness(calc(1 - var(--night-alpha, 0) * 0.42)) saturate(calc(1 - var(--night-alpha, 0) * 0.25));
}

#Torres2.torres-night .torres-track-token {
    filter: brightness(calc(1 - var(--night-alpha, 0) * 0.44));
}

#Torres2.torres-night .torres-piece img {
    filter: brightness(calc(1 - var(--night-alpha, 0) * 0.46)) contrast(1.06);
}

#Torres2 .torres-square {
    position: relative;
    padding: 0;
    min-width: 0;
    min-height: 0;
    border: 1px solid transparent;
    color: #2b2114;
    background: transparent;
    cursor: default;
    touch-action: manipulation;
}

#Torres2 .torres-square:focus:not(:focus-visible) {
    outline: none;
}

#Torres2 .torres-square.torres-tower {
    z-index: calc(2 + var(--tower-h, 0));
}

#Torres2 .torres-square.torres-tower::before {
    content: '';
    position: absolute;
    inset: 3%;
    z-index: 1;
    border-radius: 1px;
    pointer-events: none;
    box-sizing: border-box;
    border: 4px solid;
    border-top-color: #fbf7ef;
    border-left-color: #f0eadc;
    border-right-color: #b6aa93;
    border-bottom-color: #9c8f77;
    background-color: #eae4d7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='64' height='64' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
    transform: translate(calc(var(--tower-lift, 0%) * -1), calc(var(--tower-lift, 0%) * -1));
    box-shadow:
        0 0 0 1px #5f523e,
        1.0px 1.0px 0 #5f523e, 2.2px 2.2px 0 #cfc3a8,
        3.2px 3.2px 0 #5b4e3b, 4.4px 4.4px 0 #c5b89c,
        5.4px 5.4px 0 #544836, 6.6px 6.6px 0 #baad90,
        7.6px 7.6px 0 #4d4231, 8.8px 8.8px 0 #b0a285,
        9.8px 9.8px 0 #463c2d, 11.0px 11.0px 0 #a5977a,
        12.0px 12.0px 0 #403628, 13.2px 13.2px 0 #9b8d70,
        13.8px 13.8px 0 #3a3124, 14.5px 14.5px 0 #908266,
        15.1px 15.1px 0 #342c20, 15.8px 15.8px 0 #86785d,
        16.4px 16.4px 0 #2e271c, 17.0px 17.0px 0 #7c6f55,
        18px 20px 16px rgba(34, 22, 8, .42);
}

#Torres2 .torres-square.torres-tower[data-height="1"]::before {
    box-shadow:
        0 0 0 1px #5f523e,
        0 2px 4px rgba(34, 22, 8, .24);
}

#Torres2 .torres-square.torres-tower[data-height="2"]::before {
    box-shadow:
        0 0 0 1px #5f523e,
        1.0px 1.0px 0 #5f523e, 2.2px 2.2px 0 #cfc3a8,
        3px 5px 7px rgba(34, 22, 8, .28);
}

#Torres2 .torres-square.torres-tower[data-height="3"]::before {
    box-shadow:
        0 0 0 1px #5f523e,
        1.0px 1.0px 0 #5f523e, 2.2px 2.2px 0 #cfc3a8,
        3.2px 3.2px 0 #5b4e3b, 4.4px 4.4px 0 #c5b89c,
        5.5px 7px 9px rgba(34, 22, 8, .31);
}

#Torres2 .torres-square.torres-tower[data-height="4"]::before {
    box-shadow:
        0 0 0 1px #5f523e,
        1.0px 1.0px 0 #5f523e, 2.2px 2.2px 0 #cfc3a8,
        3.2px 3.2px 0 #5b4e3b, 4.4px 4.4px 0 #c5b89c,
        5.4px 5.4px 0 #544836, 6.6px 6.6px 0 #baad90,
        8px 10px 11px rgba(34, 22, 8, .34);
}

#Torres2 .torres-square.torres-tower[data-height="5"]::before {
    box-shadow:
        0 0 0 1px #5f523e,
        1.0px 1.0px 0 #5f523e, 2.2px 2.2px 0 #cfc3a8,
        3.2px 3.2px 0 #5b4e3b, 4.4px 4.4px 0 #c5b89c,
        5.4px 5.4px 0 #544836, 6.6px 6.6px 0 #baad90,
        7.6px 7.6px 0 #4d4231, 8.8px 8.8px 0 #b0a285,
        10px 12px 13px rgba(34, 22, 8, .36);
}

#Torres2 .torres-square.torres-tower[data-height="6"]::before {
    box-shadow:
        0 0 0 1px #5f523e,
        1.0px 1.0px 0 #5f523e, 2.2px 2.2px 0 #cfc3a8,
        3.2px 3.2px 0 #5b4e3b, 4.4px 4.4px 0 #c5b89c,
        5.4px 5.4px 0 #544836, 6.6px 6.6px 0 #baad90,
        7.6px 7.6px 0 #4d4231, 8.8px 8.8px 0 #b0a285,
        9.8px 9.8px 0 #463c2d, 11.0px 11.0px 0 #a5977a,
        12px 14px 14px rgba(34, 22, 8, .38);
}

#Torres2 .torres-square.torres-tower[data-height="7"]::before {
    box-shadow:
        0 0 0 1px #5f523e,
        1.0px 1.0px 0 #5f523e, 2.2px 2.2px 0 #cfc3a8,
        3.2px 3.2px 0 #5b4e3b, 4.4px 4.4px 0 #c5b89c,
        5.4px 5.4px 0 #544836, 6.6px 6.6px 0 #baad90,
        7.6px 7.6px 0 #4d4231, 8.8px 8.8px 0 #b0a285,
        9.8px 9.8px 0 #463c2d, 11.0px 11.0px 0 #a5977a,
        12.0px 12.0px 0 #403628, 13.2px 13.2px 0 #9b8d70,
        14px 16px 15px rgba(34, 22, 8, .40);
}

#Torres2 .torres-square.torres-tower[data-height="8"]::before {
    box-shadow:
        0 0 0 1px #5f523e,
        1.0px 1.0px 0 #5f523e, 2.2px 2.2px 0 #cfc3a8,
        3.2px 3.2px 0 #5b4e3b, 4.4px 4.4px 0 #c5b89c,
        5.4px 5.4px 0 #544836, 6.6px 6.6px 0 #baad90,
        7.6px 7.6px 0 #4d4231, 8.8px 8.8px 0 #b0a285,
        9.8px 9.8px 0 #463c2d, 11.0px 11.0px 0 #a5977a,
        12.0px 12.0px 0 #403628, 13.2px 13.2px 0 #9b8d70,
        13.8px 13.8px 0 #3a3124, 14.5px 14.5px 0 #908266,
        15px 17px 15.5px rgba(34, 22, 8, .41);
}

#Torres2 .torres-square.torres-tower[data-height="9"]::before {
    box-shadow:
        0 0 0 1px #5f523e,
        1.0px 1.0px 0 #5f523e, 2.2px 2.2px 0 #cfc3a8,
        3.2px 3.2px 0 #5b4e3b, 4.4px 4.4px 0 #c5b89c,
        5.4px 5.4px 0 #544836, 6.6px 6.6px 0 #baad90,
        7.6px 7.6px 0 #4d4231, 8.8px 8.8px 0 #b0a285,
        9.8px 9.8px 0 #463c2d, 11.0px 11.0px 0 #a5977a,
        12.0px 12.0px 0 #403628, 13.2px 13.2px 0 #9b8d70,
        13.8px 13.8px 0 #3a3124, 14.5px 14.5px 0 #908266,
        15.1px 15.1px 0 #342c20, 15.8px 15.8px 0 #86785d,
        16px 18px 16px rgba(34, 22, 8, .42);
}

#Torres2.torres-night .torres-square.torres-tower::before {
    background: linear-gradient(145deg, #aba296 0%, #9b9184 60%, #8d8274 100%);
    border-color: #716759;
    box-shadow:
        inset 0 0 0 1px #7c7264,
        inset 0 0 12px rgba(255, 166, 56, calc(var(--night-alpha, 0) * var(--torch-flicker, 1) * 0.72));
}

#Torres2 .torres-torch-glow {
    position: absolute;
    inset: -38%;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(255, 198, 92, .78) 0%, rgba(255, 138, 30, .38) 45%, rgba(255, 96, 10, 0) 74%);
    opacity: calc(var(--night-alpha, 0) * var(--torch-flicker, 1));
}

#Torres2 .torres-height {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    font-size: clamp(14px, 2.3vw, 22px);
    color: #1f170d;
    text-shadow: 0 1px 0 rgba(255, 252, 244, .85);
    transform: translate(calc(var(--tower-lift, 0%) * -1), calc(var(--tower-lift, 0%) * -1));
    pointer-events: none;
}

#Torres2 .torres-piece {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    transform: translate(calc(var(--tower-lift, 0%) * -1), calc(var(--tower-lift, 0%) * -1));
}

#Torres2 .torres-piece img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 1.5px rgba(32, 22, 10, .32));
}

#Torres2 .torres-square.active {
    cursor: pointer;
    background-color: rgba(255, 226, 70, .28);
    box-shadow: inset 0 0 0 2px #523b10, inset 0 0 0 4.5px #ffd633;
}

#Torres2 .torres-square.torres-tower.active {
    background-color: transparent;
    box-shadow: none;
}

#Torres2 .torres-square.torres-tower.active::before {
    background-color: #f7e494;
    border-top-color: #fffce8;
    border-left-color: #fff3b8;
    border-right-color: #cfa426;
    border-bottom-color: #b08614;
    outline: 2px solid #ffd633;
    outline-offset: -1px;
}

#Torres2 .torres-square.active:hover {
    opacity: 1;
    background-color: rgba(255, 236, 115, .58);
    box-shadow: inset 0 0 0 2px #3b290a, inset 0 0 0 5px #ffe566;
}

#Torres2 .torres-square.torres-tower.active:hover {
    background-color: transparent;
    box-shadow: none;
}

#Torres2 .torres-square.torres-tower.active:hover::before {
    background-color: #ffefaa;
    border-top-color: #ffffff;
    border-left-color: #fff8d1;
    border-right-color: #ddb434;
    border-bottom-color: #c2981c;
    outline: 2.5px solid #ffe566;
    outline-offset: -1px;
}

#Torres2 .torres-selected,
#Torres2 .torres-square.torres-selected {
    outline: 3px solid #0b5596;
    outline-offset: -3px;
    box-shadow: inset 0 0 0 5px #fff;
}

#Torres2 .torres-square.torres-tower.torres-selected {
    outline: none;
    box-shadow: none;
}

#Torres2 .torres-square.torres-tower.torres-selected::before {
    outline: 3px solid #0b5596;
    outline-offset: -3px;
    box-shadow: inset 0 0 0 5px #fff, 0 3px 8px rgba(42, 28, 12, .32);
}

#Torres2 .torres-square.torres-log-location {
    outline: 4px solid #bc3b09;
    outline-offset: -4px;
}

#Torres2 .torres-square.torres-tower.torres-log-location {
    outline: none;
}

#Torres2 .torres-square.torres-tower.torres-log-location::before {
    outline: 4px solid #bc3b09;
    outline-offset: -4px;
}

#Torres2 .torres-hand-area {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

#Torres2 .torres-hand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 760px;
    padding: 5px 8px;
    box-sizing: border-box;
    background: rgba(66, 47, 22, .1);
    border: 1px solid rgba(102, 75, 38, .32);
    border-radius: 8px;
    box-shadow: inset 0 2px 5px rgba(38, 25, 10, .14);
}

#Torres2 .torres-card-slot svg {
    display: block;
    width: 100%;
    height: auto;
}

#Torres2 .torres-card {
    position: relative;
    flex: 0 1 8.8%;
    min-width: 32px;
    max-width: 65px;
}

#Torres2 .torres-card-play {
    display: block;
    background: transparent;
    padding: 0;
    border: 0;
    width: 100%;
    cursor: default;
}

#Torres2 .torres-card-play img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
}

#Torres2 .torres-card-play.active {
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 0 0 2px #ffd633, 0 2px 5px rgba(40, 26, 8, .45);
    transition: transform .1s ease, box-shadow .1s ease;
}

#Torres2 .torres-card-play.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 2.5px #ffe359, 0 4px 8px rgba(40, 26, 8, .55);
}

#Torres2 .torres-card-kept .torres-card-play {
    border-color: #c98a12;
    box-shadow: 0 0 0 2.5px #f2c94c, 0 3px 8px rgba(40, 26, 8, .45);
}

#Torres2 .torres-draw-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 30;
    width: max-content;
    max-width: min(540px, calc(var(--game-w, 100%) - 16px));
    max-height: calc(var(--game-h, 100%) - 16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    background: #f6efe0;
    border: 2px solid #6e522b;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(28, 18, 6, .48);
    touch-action: none;
    user-select: none;
}

#Torres2 .torres-draw-panel[hidden] {
    display: none;
}

#Torres2 .torres-draw-panel button {
    touch-action: manipulation;
}

#Torres2 .torres-draw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 12px;
    background: linear-gradient(180deg, #e2c799 0%, #c69864 100%);
    border-bottom: 1px solid #8a683a;
    color: #2b1d0d;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: grab;
}

#Torres2 .torres-draw-panel.torres-dragging,
#Torres2 .torres-draw-panel.torres-dragging .torres-draw-header {
    cursor: grabbing;
}

#Torres2 .torres-draw-grip {
    width: 12px;
    height: 14px;
    flex: none;
    display: block;
    opacity: .85;
}

#Torres2 .torres-draw-body {
    padding: 12px;
    overflow-y: auto;
}

#Torres2 .torres-draw-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

#Torres2 .torres-draw-panel .torres-card {
    flex: 0 0 auto;
    width: 106px;
    min-width: 106px;
    max-width: 106px;
}

#Torres2 .torres-draw-panel .torres-info {
    top: 3px;
    right: 3px;
}

#Torres2 .torres-draw-panel:not(.torres-draw-pick) .torres-draw-list {
    gap: 18px;
}

#Torres2 .torres-draw-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

#Torres2 .torres-draw-item.torres-buttons-left {
    flex-direction: row-reverse;
}

#Torres2 .torres-return-choices {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#Torres2 .torres-return-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    min-height: 36px;
    border: 1.5px solid #715e41;
    border-radius: 7px;
    background: #fffdf6;
    color: #2b1d0d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
}

#Torres2 .torres-return-btn.active {
    cursor: pointer;
    border-color: #d4a017;
    box-shadow: 0 0 0 2px #f2c94c, 0 2px 6px rgba(40, 26, 8, .35);
}

#Torres2 .torres-return-btn.active:hover {
    opacity: 1;
    color: #2b1d0d;
    background: #fff6d6;
    box-shadow: 0 0 0 2.5px #ffe359, 0 4px 8px rgba(40, 26, 8, .48);
}

#Torres2 .torres-deck-slot-icon {
    width: 30px;
    height: 22px;
    flex: none;
    display: block;
}

#Torres2 .torres-info {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 22px;
    min-height: 22px;
    background: #fffbea;
    color: #1b3043;
    border: 1px solid #715e41;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
}

#Torres2 .torres-actions {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

#Torres2 .torres-advance-btn[hidden] {
    display: none;
}

#Torres2 .torres-advance-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 3px 11px;
    border-radius: 999px;
    border: 1.5px solid #9c7849;
    background: #dcc092;
    color: #2e2417;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    touch-action: manipulation;
    transition: transform .1s ease, box-shadow .1s ease, background .1s ease;
}

#Torres2 .torres-advance-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

#Torres2 .torres-advance-btn.active {
    background: linear-gradient(180deg, #fffef5 0%, #f8e2a2 100%);
    border-color: #7a5610;
    color: #1f170d;
    box-shadow: 0 0 0 2px #ffd633, 0 2px 5px rgba(45, 28, 8, .35), inset 0 1px 0 #fff;
}

#Torres2 .torres-advance-btn.active:hover {
    background: linear-gradient(180deg, #fff 0%, #ffea96 100%);
    border-color: #5c3f08;
    box-shadow: 0 0 0 2.5px #ffe14d, 0 4px 8px rgba(45, 28, 8, .45), inset 0 1px 0 #fff;
    transform: translateY(-1px);
}

#Torres2 .torres-advance-btn.active:active {
    transform: translateY(0);
    box-shadow: 0 0 0 2px #ffd633, 0 1px 2px rgba(45, 28, 8, .35), inset 0 1px 2px rgba(0, 0, 0, .12);
}

#Torres2 .torres-ap-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 14px;
    min-height: 34px;
    background: linear-gradient(180deg, #4f3b22 0%, #2f2213 100%);
    border: 1.5px solid #c99636;
    border-radius: 999px;
    box-shadow: 0 2px 7px rgba(34, 22, 8, .28), inset 0 1px 0 rgba(255, 236, 185, .22);
}

#Torres2 .torres-ap-badge.is-empty {
    border-color: #8a7350;
    opacity: .82;
}

#Torres2 .torres-ap-count {
    color: #fff3d1;
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1;
    white-space: nowrap;
    padding-right: 10px;
    border-right: 1px solid rgba(201, 150, 54, .42);
}

#Torres2 .torres-ap-badge.is-empty .torres-ap-count {
    color: #d4c4a8;
}

#Torres2 .torres-ap-pips {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#Torres2 .torres-ap-pip {
    width: 19px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: .24;
    filter: grayscale(.9);
}

#Torres2 .torres-ap-pip img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

#Torres2 .torres-ap-pip.is-filled {
    opacity: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
}

#Torres2 .torres-ap-pip.is-bonus {
    filter: drop-shadow(0 0 4px rgba(255, 218, 92, .85));
}

#game.torres2-game .torres-player-resources button.torres-points-btn {
    cursor: pointer;
}

#game.torres2-game .torres-player-resources button.torres-points-btn:hover {
    background: #e6cd9f;
    border-color: #7c5c32;
}

#game.torres2-game button:not(.active):not(.torres-info):not(.torres-pile-info):not(.torres-points-btn):not(.torres-view-btn):not(.btn) {
    cursor: default;
}

#game.torres2-game button.active,
#game.torres2-game .torres-pile-info,
#game.torres2-game .torres-points-btn,
#game.torres2-game .torres-view-btn {
    cursor: pointer;
}

#game.torres2-game button:focus-visible {
    outline: 3px solid #0759aa;
    outline-offset: 2px;
}

#game.torres2-game.torres-stacked {
    flex-direction: column-reverse;
    gap: 6px;
}

#game.torres2-game.torres-stacked #playerData {
    flex: none;
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

#game.torres2-game.torres-stacked #board {
    width: 100%;
}

#game.torres2-game.torres-stacked .torres-player-resources {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
}

#game.torres2-game.torres-stacked .torres-player-resources img {
    width: 18px;
    height: 22px;
}

#game.torres2-game.torres-stacked .torres-player-resources button {
    min-height: 30px;
    font-size: .8rem;
    gap: 1px;
}

#game.torres2-game.torres-stacked .torres-player-resources button.active {
    box-shadow: 0 0 0 1.5px #ffd633, 0 1px 3px rgba(45, 28, 8, .35), inset 0 1px 0 #fff;
}

.torres-popover {
    width: 92vw;
    max-width: 440px;
}

.torres-popover .popover-body img {
    max-width: 100%;
    width: 140px;
    height: auto;
}

.torres-popover .popover-body h3 {
    font-size: 1rem;
    margin-top: .5em;
}

.torres-popover .torres-piles>div {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.torres-popover .torres-piles img {
    width: 65px;
}

.torres-popover-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.torres-popover-close {
    border: 0;
    background: transparent;
    color: #3d2a0d;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
}

.torres-popover.torres-score-popover {
    width: min(94vw, 520px);
    max-width: 520px;
}

.torres-popover.torres-score-popover .popover-header {
    background: linear-gradient(180deg, #e2c799 0%, #cfb07e 100%);
    border-bottom: 1px solid #9c7849;
    color: #261a0a;
    font-weight: 700;
}

.torres-popover.torres-score-popover .popover-body {
    background: #fbf5e7;
    color: #261a0a;
    padding: 8px 10px;
}

.torres-score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.torres-score-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .84rem;
}

.torres-score-table th,
.torres-score-table td {
    padding: 3px 6px;
    border-bottom: 1px solid rgba(114, 86, 48, .22);
    text-align: right;
    vertical-align: middle;
}

.torres-score-table thead th {
    border-bottom: 1.5px solid #8a683a;
    text-align: center;
    font-weight: 700;
}

.torres-score-table thead th:first-child,
.torres-score-table tbody th,
.torres-score-table tfoot th {
    text-align: left;
    font-weight: 600;
}

.torres-score-breakdown .torres-score-table thead th img {
    width: 14px;
    height: 18px;
    object-fit: contain;
    margin-right: 4px;
    vertical-align: -3px;
}

.torres-score-breakdown .torres-score-table tfoot th,
.torres-score-breakdown .torres-score-table tfoot td {
    border-top: 1.5px solid #8a683a;
    border-bottom: 0;
    font-weight: 800;
}

.torres-score-breakdown .torres-score-table .is-focused {
    background: rgba(223, 180, 99, .24);
}

.torres-score-castles {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(114, 86, 48, .26);
    font-size: .78rem;
}

.torres-score-castle-player {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    padding: 2px 4px;
    border-radius: 4px;
}

.torres-score-castle-player.is-focused {
    background: rgba(223, 180, 99, .22);
}

.torres-score-breakdown .torres-score-castle-player img {
    width: 12px;
    height: 15px;
    object-fit: contain;
    vertical-align: -2px;
}

/* Log selectors deliberately outrank the framework's generic .colorN/.move rules. */
#log .move.color0 {
    background: #368ac0;
    color: #101820;
}

#log .move.color1 {
    background: #e99b51;
    color: #242016;
}

#log .move.color2 {
    background: #65a765;
    color: #102110;
}

#log .move.color3 {
    background: #424242;
    color: #fff;
}

#log .torres-log-coordinate {
    display: inline;
    padding: 0 3px;
    border: 0;
    border-bottom: 1px dotted currentColor;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

#log .torres-log-card {
    display: inline-block;
    position: relative;
    vertical-align: middle;
}

#log .torres-log-card img {
    width: 42px;
    height: auto;
}

#log .torres-log-card .torres-info {
    cursor: pointer;
}

#log .torres-log-card .torres-info {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0 4px;
    font-size: 12px;
    border-radius: 50%;
}

#log .torres-log>img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
}

.containerSetting_chooseColor .torres-knight-piece,
.colorChooser .torres-knight-piece {
    width: 26px;
    height: 30px;
    padding: 0;
    object-fit: contain;
    display: block;
}

#modalColorChooser .chooseColor {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

#modalColorChooser .chooseColor .txtPlayer {
    float: none;
    min-width: 0;
    flex: 1;
    margin: 0;
    padding-top: 10px;
}

#modalColorChooser .custom-select {
    float: none;
    position: relative;
    width: 64px;
    flex: none;
}

#modalColorChooser .select-selected,
#modalColorChooser .select-items>div {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 4px;
    box-sizing: border-box;
}

#modalColorChooser .select-selected {
    padding-right: 20px;
}

@media (max-width: 520px) {
    #Torres2 .torres-draw-body {
        padding: 8px;
    }

    #Torres2 .torres-draw-list {
        gap: 8px;
    }

    #Torres2 .torres-draw-panel .torres-card {
        width: 78px;
        min-width: 78px;
        max-width: 78px;
    }

    #Torres2 .torres-draw-item {
        gap: 7px;
    }

    #Torres2 .torres-return-btn {
        padding: 5px 8px;
        min-height: 34px;
        gap: 5px;
        font-size: 12px;
    }

    #Torres2 .torres-deck-slot-icon {
        width: 24px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    #Torres2 .torres-draw-item.torres-buttons-left {
        flex-direction: row;
    }
}

@media (max-width: 420px) {
    #game.torres2-game {
        padding: 4px;
    }

    #game.torres2-game.torres-stacked .torres-player-resources {
        grid-template-columns: repeat(2, 1fr);
    }

    #Torres2 .torres-ap-badge {
        padding: 3px 10px;
        gap: 7px;
    }

    #Torres2 .torres-ap-count {
        padding-right: 7px;
        font-size: .88rem;
    }

    #Torres2 .torres-ap-pip {
        width: 16px;
        height: 20px;
    }

    #Torres2 .torres-advance-btn {
        min-height: 28px;
        padding: 2px 9px;
        gap: 4px;
        font-size: .84rem;
    }

    #Torres2 .torres-advance-btn img {
        width: 16px;
        height: 16px;
    }
}