:root {
    --ink: #e7e2d4;
    --muted: #9c967f;
    --bg: rgba(14, 16, 11, 0.92);
    --panel: rgba(12, 14, 10, 0.9);
    --line: rgba(196, 168, 92, 0.42);
    --gold: #e2c15a;
    --head: rgba(46, 40, 24, 0.96);
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1f16;
    font-family: "Segoe UI", Tahoma, sans-serif;
    overflow: hidden;
    color: var(--ink);
}

#ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#topbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 62px;
    background: linear-gradient(180deg, rgba(18, 20, 14, 0.94), rgba(10, 12, 8, 0.88));
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    gap: 12px;
    box-sizing: border-box;
    pointer-events: auto;
    font-size: 13px;
    flex-wrap: wrap;
}

.res-bar {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.res-chip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 8px;
    background: linear-gradient(180deg, rgba(42, 46, 30, 0.95), rgba(22, 24, 16, 0.95));
    border: 1px solid #5a6040;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    min-width: 0;
    overflow: hidden;
}

.res-chip.res-gold { border-color: #8a7a3a; }
.res-chip.res-supplies { border-color: #5a7050; }
.res-chip.res-tick { border-color: #6a7a8a; padding-left: 6px; }

.res-glyph {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #c4b84a;
    opacity: 0.9;
    flex-shrink: 0;
}

.res-supplies .res-glyph { color: #8ab87a; }
.res-pop .res-glyph { color: #9ab0c4; }

.res-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.res-label {
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8670;
}

.res-value {
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #f2ecd8;
    transition: color 0.15s;
}

.res-chip.res-gain .res-value {
    color: #b8e06a;
}

.res-chip.res-gain {
    animation: res-chip-pulse 0.55s ease-out;
}

.res-delta {
    position: absolute;
    right: 8px;
    top: 2px;
    font-size: 11px;
    font-weight: 700;
    color: #b8e06a;
    pointer-events: none;
    animation: res-delta-float 0.85s ease-out forwards;
}

@keyframes res-chip-pulse {
    0% { box-shadow: inset 0 0 0 1px rgba(184, 224, 106, 0.0); transform: scale(1); }
    35% { box-shadow: inset 0 0 0 1px rgba(184, 224, 106, 0.55); transform: scale(1.04); }
    100% { box-shadow: inset 0 0 0 1px rgba(184, 224, 106, 0.0); transform: scale(1); }
}

@keyframes res-delta-float {
    0% { opacity: 0; transform: translateY(6px); }
    20% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

.tick-clock {
    position: relative;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: block;
}

.tick-face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #9ab0c4;
    background: radial-gradient(circle at 40% 35%, #3a4450, #1a2028);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.tick-hand {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 8px;
    margin-left: -1px;
    margin-top: -8px;
    background: #e8e4d9;
    transform-origin: 50% 100%;
    border-radius: 1px;
    transition: transform 0.12s linear;
}

.tick-hub {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    margin: -2px 0 0 -2px;
    border-radius: 50%;
    background: #c4b84a;
}

.res-tick.tick-bounce .tick-clock {
    animation: tick-bounce 0.55s cubic-bezier(0.34, 1.45, 0.64, 1);
}

@keyframes tick-bounce {
    0% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-7px) scale(1.15); }
    55% { transform: translateY(0) scale(0.95); }
    75% { transform: translateY(-3px) scale(1.05); }
    100% { transform: translateY(0) scale(1); }
}

.topbar-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #b8b4a4;
}

.res-stat {
    color: #8ab87a;
    font-variant-numeric: tabular-nums;
}

.res-stat-lost {
    color: #c87868;
}

#status {
    color: #d8d0b8;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#day-clock {
    position: absolute;
    left: 50%;
    top: 6px;
    transform: translateX(-50%);
    width: 168px;
    height: 50px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 4px;
    background: var(--bg);
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    z-index: 3;
    box-sizing: border-box;
}

#day-arc {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 8px;
    height: 14px;
    border-top: 1px solid rgba(226, 193, 90, 0.4);
    border-radius: 80px 80px 0 0;
}

#day-sun {
    position: absolute;
    top: -4px;
    left: 20%;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    border-radius: 50%;
    background: #f2d56a;
    box-shadow: 0 0 8px rgba(242, 213, 106, 0.85);
}

#day-clock.phase-night #day-sun {
    background: #d5e4f8;
    box-shadow: 0 0 8px rgba(213, 228, 248, 0.7);
}

#day-clock.phase-dusk #day-sun,
#day-clock.phase-dawn #day-sun {
    background: #f0a060;
    box-shadow: 0 0 8px rgba(240, 160, 96, 0.75);
}

#day-time {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.08em;
    color: var(--ink);
    line-height: 1;
}

#day-phase {
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 1px;
}

#frontline-bar {
    position: absolute;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 22px;
    background: var(--bg);
    border: 1px solid var(--line);
    pointer-events: none;
    overflow: hidden;
}

#frontline-fill-left {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: rgba(50, 90, 200, 0.55);
    transition: width 0.3s;
}

#frontline-fill-right {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: rgba(200, 60, 50, 0.55);
    transition: width 0.3s;
}

#frontline-label {
    position: relative;
    z-index: 2;
    text-align: center;
    line-height: 22px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

#map-credit {
    position: absolute;
    top: 94px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--muted);
    pointer-events: none;
    white-space: nowrap;
}

#perf-hud {
    position: absolute;
    right: 258px;
    top: 46%;
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--gold);
    pointer-events: none;
    z-index: 12;
}

#map-config {
    position: absolute;
    top: 100px;
    left: 14px;
    width: 240px;
    max-height: calc(100% - 150px);
    overflow: auto;
    background: var(--panel);
    color: var(--ink);
    border: 1px solid var(--line);
    padding: 12px;
    box-sizing: border-box;
    pointer-events: auto;
    z-index: 12;
}

#map-config[hidden] {
    display: none !important;
}

#map-config-back {
    width: 100%;
    margin: 0 0 10px;
    padding: 7px 8px;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line);
    font: inherit;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

#map-config-back:hover {
    color: var(--gold);
    border-color: var(--gold);
}

#map-config h3 {
    margin: 0 0 4px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
}

#map-config-place {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--muted);
}

.map-note {
    margin: -2px 0 8px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--muted);
}

#map-variant-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.map-variant {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 7px 8px;
    background: #2a3124;
    color: var(--ink);
    border: 1px solid var(--line);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    text-align: left;
}

.map-variant span:last-child {
    color: var(--muted);
}

.map-variant.is-on {
    border-color: var(--gold);
    color: var(--gold);
}

.map-variant.is-on span:last-child {
    color: var(--gold);
}

#map-config-place {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--muted);
}

.map-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 8px;
    font-size: 11px;
    color: var(--muted);
}

.map-field input,
.map-field select,
#map-search,
#map-fav-add {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 8px;
    background: #2a3124;
    color: var(--ink);
    border: 1px solid var(--line);
    font: inherit;
    font-size: 12px;
}

.map-row {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    margin-bottom: 8px;
}

.map-row .map-field {
    width: 88px;
    margin: 0;
}

#map-search,
#map-fav-add {
    cursor: pointer;
}

#map-search-hits {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 8px;
}

#map-search-hits[hidden] {
    display: none;
}

.map-hit-note {
    margin: 0;
    font-size: 11px;
    color: var(--muted);
}

.map-hit {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 7px 8px;
    background: #2a3124;
    color: var(--ink);
    border: 1px solid var(--line);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    text-align: left;
}

.map-hit small {
    color: var(--muted);
    font-size: 10px;
}

.map-check {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--ink);
}

#map-fav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

#map-fav-add {
    margin-bottom: 8px;
}

.map-fav {
    display: flex;
    gap: 4px;
}

.map-fav .map-variant {
    flex: 1;
}

.map-fav-drop {
    width: 28px;
    background: #2a3124;
    color: var(--muted);
    border: 1px solid var(--line);
    cursor: pointer;
}

#map-config-stats {
    min-height: 2.4em;
    margin: 8px 0;
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted);
}

#map-config-play {
    width: 100%;
    padding: 8px;
    background: var(--head);
    color: var(--gold);
    border: 1px solid var(--gold);
    font: inherit;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

#sidebar {
    position: absolute;
    top: 76px;
    right: 10px;
    width: max-content;
    max-width: calc(100vw - 260px);
    max-height: calc(100% - 190px);
    background: transparent;
    color: var(--ink);
    border: none;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
    overflow: visible;
}

#build-block,
#recruit-stack {
    pointer-events: auto;
    background: rgba(12, 14, 10, 0.78);
    border: 1px solid var(--line);
    padding: 8px;
    box-sizing: border-box;
}

#build-block {
    max-width: 100%;
}

#build-block h3,
#recruit-stack h3 {
    margin: 0 0 6px;
}

#build-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 6px;
}

#recruit-stack {
    width: 236px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
}

#sidebar h3,
#unit-details h3,
#building-panel h3 {
    margin: 8px 0 4px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
}

.recruit-btn,
.build-btn {
    position: relative;
    overflow: hidden;
    padding: 0;
    text-align: left;
    isolation: isolate;
    background-color: #e7e0d0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    color: #fff6e0;
    border-color: rgba(196, 168, 92, 0.55);
}

.build-btn {
    width: 124px;
    height: 72px;
    flex: 0 0 auto;
}

.recruit-btn {
    width: 100%;
    height: 68px;
}

#btn-build-barracks { background-image: url("menu/building-barracks.jpg"); }
#btn-build-garage { background-image: url("menu/building-garage.jpg"); }
#btn-build-depot { background-image: url("menu/building-depot.jpg"); }
#btn-build-plot_wysoki { background-image: url("menu/building-plot_wysoki.jpg"); }
#btn-build-hesco { background-image: url("menu/building-hesco.jpg"); }
#btn-recruit-strzelcy { background-image: url("menu/unit-strzelcy.jpg"); }
#btn-recruit-mg { background-image: url("menu/unit-mg.jpg"); }
#btn-recruit-p_panc { background-image: url("menu/unit-p_panc.jpg"); }
#btn-recruit-samochod { background-image: url("menu/unit-samochod.jpg"); }
#btn-recruit-czolg { background-image: url("menu/unit-czolg.jpg"); }

.art-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 4px;
    padding: 8px 6px 4px;
    background: linear-gradient(180deg, rgba(8, 10, 6, 0) 0%, rgba(8, 10, 6, 0.12) 62%, rgba(8, 10, 6, 0.34) 100%);
    pointer-events: none;
}

.build-btn .art-caption {
    flex-direction: column;
    align-items: flex-start;
}

.recruit-btn .art-caption {
    flex-direction: row;
    align-items: flex-end;
}

.art-name,
.recruit-btn-label {
    position: relative;
    z-index: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff6e0;
    text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, 0.9);
    line-height: 1.15;
}

.art-cost {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    color: #f0d78a;
    text-shadow: 0 1px 2px #000;
    white-space: nowrap;
}

.recruit-btn.flash-error,
.build-btn.flash-error {
    animation: btn-flash-red 0.55s ease-out;
    box-shadow: 0 0 0 2px #ff3b3b inset;
}

@keyframes btn-flash-red {
    0% { background: #8a2020; color: #fff; }
    35% { background: #d64545; color: #fff; }
    100% { background: #3a4030; color: #e8e4d9; }
}

.recruit-btn-fill {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, rgba(196, 122, 26, 0.15), rgba(196, 122, 26, 0.55));
    z-index: 0;
    transition: height 0.12s linear;
    pointer-events: none;
}

.recruit-btn.producing .recruit-btn-fill {
    background: linear-gradient(180deg, rgba(70, 140, 70, 0.2), rgba(70, 160, 70, 0.65));
}

#sidebar .build-btn:hover,
#sidebar .recruit-btn:hover,
#sidebar .build-btn:active,
#sidebar .recruit-btn:active,
#sidebar .build-btn:focus,
#sidebar .recruit-btn:focus {
    background-color: #e7e0d0;
    border-color: var(--gold);
    box-shadow: inset 0 0 0 1px var(--gold);
    filter: brightness(1.05);
}

#recruit-card {
    position: fixed;
    z-index: 80;
    width: 248px;
    padding: 10px 12px;
    background: rgba(16, 18, 12, 0.97);
    border: 1px solid #c4a24a;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
    color: #e8e4d9;
    pointer-events: none;
}

#recruit-card[hidden] {
    display: none;
}

#rc-art {
    height: 112px;
    margin: -10px -12px 8px;
    background-color: #efe6d4;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 38%;
}

#rc-name {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f0d78a;
    margin-bottom: 8px;
}

#rc-stats {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.rc-stat {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid #5a4e32;
    padding: 5px 6px 6px;
    text-align: center;
}

.rc-stat span {
    display: block;
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a89870;
}

.rc-stat strong {
    display: block;
    margin-top: 2px;
    font-size: 16px;
    color: #fff6d8;
}

#rc-trait {
    font-size: 11px;
    line-height: 1.35;
    color: #d9d0b8;
}

.ud-squad {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #ffe14a;
}

.recruit-btn-count {
    position: absolute;
    top: 4px;
    right: 6px;
    z-index: 2;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #c47a1a;
    color: #111;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

#production-dock {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    pointer-events: none;
    z-index: 15;
    width: min(768px, 92vw);
}

#production-lanes {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
}

.prod-lane {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: min(224px, 36vw);
    pointer-events: none;
}

.prod-deck {
    position: relative;
    width: 100%;
    min-height: 100px;
}

.prod-back-cards {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    pointer-events: none;
    z-index: 1;
}

/* Karty „pod spodem” — wystają w lewo/dół spod aktywnej */
.prod-back-card {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 96px;
    border: 2px solid #6a7050;
    background: linear-gradient(180deg, rgba(40, 44, 28, 0.97), rgba(14, 16, 10, 0.97));
    box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    box-sizing: border-box;
    color: #e8e4d9;
    transform-origin: left bottom;
}

.prod-back-card .back-portrait {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: #222818;
    border: 1px solid #555;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prod-back-card .back-name {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prod-back-card .back-num {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 11px;
    font-weight: 800;
    color: #c4b84a;
}

.prod-lane .prod-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: none;
    pointer-events: auto;
}

.prod-queue-meta {
    font-size: 10px;
    font-weight: 600;
    color: #c4b84a;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.prod-queue-meta[hidden] {
    display: none !important;
}

/* Tooltip budynków (pierwszy snippet) */
.build-btn.has-tip {
    position: relative;
}

.build-btn.has-tip::after {
    content: attr(data-tip);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    padding: 8px 10px;
    background: rgba(16, 18, 12, 0.96);
    border: 1px solid #8a7a4a;
    color: #e8e4d9;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    z-index: 40;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.build-btn.has-tip:hover::after {
    opacity: 1;
}

#build-row .build-btn.has-tip::after {
    right: auto;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%);
    width: 190px;
}

.recruit-btn.recruit-locked,
.build-btn.build-locked,
.build-btn:disabled,
#sidebar .recruit-btn.recruit-locked:hover,
#sidebar .build-btn.build-locked:hover,
#sidebar .build-btn:disabled:hover,
#sidebar .recruit-btn.recruit-locked:active,
#sidebar .build-btn.build-locked:active,
#sidebar .build-btn:disabled:active,
#sidebar .recruit-btn.recruit-locked:focus,
#sidebar .build-btn.build-locked:focus,
#sidebar .build-btn:disabled:focus {
    filter: none;
    opacity: 1;
    cursor: not-allowed;
    background-color: #e7e0d0;
    border-color: rgba(196, 168, 92, 0.28);
    box-shadow: inset 0 0 0 1px rgba(232, 228, 217, 0.2);
}

.recruit-btn.recruit-locked .recruit-btn-fill {
    display: none;
}

.prod-card {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    flex: 0 0 auto;
    background: linear-gradient(180deg, rgba(36, 40, 28, 0.96), rgba(16, 18, 12, 0.96));
    border: 2px solid #8a7a4a;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.55);
    padding: 8px;
    box-sizing: border-box;
    pointer-events: auto;
}

.prod-card.prod-card-enter {
    animation: prod-card-in 0.28s ease-out;
}

.prod-card[hidden] {
    display: none !important;
}

.prod-portrait {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    background: #2a3020;
    border: 1px solid #666;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.prod-portrait.has-art,
.back-portrait.has-art {
    background-color: #efe6d4;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 38%;
}

.prod-portrait::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.18));
    pointer-events: none;
}

.prod-portrait.has-art::after {
    display: none;
}

.prod-swatch {
    width: 36px;
    height: 28px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}

.prod-swatch.strzelcy { width: 12px; height: 28px; background: #3a5cff; }
.prod-swatch.mg { width: 22px; height: 28px; background: #3a5cff; }
.prod-swatch.p_panc {
    width: 0; height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 28px solid #3a5cff;
    background: transparent;
    box-shadow: none;
}
.prod-swatch.samochod { width: 34px; height: 22px; background: #3a5cff; }
.prod-swatch.czolg { width: 40px; height: 26px; background: #3a5cff; }
.prod-portrait.team2 .prod-swatch.strzelcy,
.prod-portrait.team2 .prod-swatch.mg,
.prod-portrait.team2 .prod-swatch.samochod,
.prod-portrait.team2 .prod-swatch.czolg,
.prod-swatch.team2.strzelcy,
.prod-swatch.team2.mg,
.prod-swatch.team2.samochod,
.prod-swatch.team2.czolg { background: #e04040; }
.prod-portrait.team2 .prod-swatch.p_panc,
.prod-swatch.team2.p_panc { border-bottom-color: #e04040; }

.prod-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #e8e4d9;
}

.prod-name {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.prod-sub {
    font-size: 11px;
    color: #9a9378;
}

.prod-time {
    font-size: 18px;
    font-weight: 700;
    color: #f0d78c;
    font-variant-numeric: tabular-nums;
}

.prod-bar {
    margin-top: 4px;
    width: 100%;
    height: 10px;
    background: #1a1a14;
    border: 1px solid #555;
    overflow: hidden;
}

.prod-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6a9a3a, #c4b84a);
    transition: width 0.1s linear;
}

.prod-cancel {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 12px;
    background: #3a3020;
    border: 1px solid #777;
    color: #ccc;
    line-height: 20px;
}

#production-fx-layer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    pointer-events: none;
    overflow: visible;
}

.prod-card-fly {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(320px, 90vw);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(20, 24, 16, 0.92);
    border: 2px solid #6a9a3a;
    padding: 10px;
    box-sizing: border-box;
    color: #e8e4d9;
    animation: prod-fly-out 0.85s ease-in forwards;
}

.prod-card-fly .prod-name {
    font-size: 14px;
}

.prod-card-fly .prod-done {
    color: #8fdf6a;
    font-size: 12px;
    font-weight: 700;
}

@keyframes prod-card-in {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes prod-chip-in {
    from { opacity: 0; transform: translateY(10px) rotate(var(--tilt, 0deg)) translateY(var(--sink, 0px)) scale(0.85); }
    to { opacity: 1; transform: translateY(0) rotate(var(--tilt, 0deg)) translateY(var(--sink, 0px)) scale(1); }
}

@keyframes prod-fly-out {
    0% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    55% { opacity: 0.9; transform: translateX(-50%) translateY(36px) scale(0.96); }
    100% { opacity: 0; transform: translateX(-50%) translateY(90px) scale(0.88); }
}

#building-panel,
#structure-panel {
    position: absolute;
    bottom: 12px;
    right: 516px;
    width: 220px;
    max-height: 340px;
    overflow-y: auto;
    z-index: 25;
    background: var(--panel);
    color: var(--ink);
    border: 1px solid var(--line);
    padding: 12px;
    box-sizing: border-box;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#structure-panel {
    right: 752px;
}

.hp-caption {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: -4px;
}

#activity-banner {
    position: fixed;
    top: 92px;
    right: 14px;
    z-index: 10020;
    pointer-events: none;
    padding: 3px 8px;
    background: rgba(12, 14, 10, 0.82);
    border: 1px solid var(--line);
    color: var(--gold);
    font: 600 11px/1.3 ui-monospace, Menlo, monospace;
    letter-spacing: 0.08em;
}

#activity-banner span {
    display: inline;
    margin: 0;
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
}

#build-version {
    position: fixed;
    top: 68px;
    right: 14px;
    z-index: 10020;
    padding: 3px 8px;
    border: 1px solid var(--line);
    background: rgba(12, 14, 10, 0.82);
    color: var(--gold);
    font: 11px/1.4 ui-monospace, Menlo, monospace;
    letter-spacing: 0.08em;
    pointer-events: none;
}

#sp-hp-track {
    height: 8px;
    background: #2a120f;
    border: 1px solid var(--line);
}

#sp-hp-bar {
    height: 100%;
    width: 0;
    background: #c4a24a;
}

#sp-meta {
    margin: 0;
    white-space: pre-line;
    font-size: 12px;
    color: var(--muted);
}

#sp-prepare {
    padding: 8px;
    background: var(--head);
    color: var(--gold);
    border: 1px solid var(--gold);
    font: inherit;
    cursor: pointer;
}

#bp-art {
    height: 88px;
    background-color: #efe6d4;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 42%;
    border: 1px solid var(--line);
}

#bp-art[hidden] {
    display: none;
}

#bp-queue {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 24px;
}

.queue-chip {
    background: #3a3a2a;
    border: 1px solid #777;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 3px;
    cursor: pointer;
}

#unit-details {
    position: absolute;
    top: 100px;
    left: 0;
    width: 236px;
    max-height: calc(100% - 112px);
    background: var(--panel);
    color: var(--ink);
    border-right: 1px solid var(--line);
    padding: 10px 12px 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: auto;
    overflow-y: auto;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

#unit-details h4 {
    margin: 2px 0 0;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

#ud-main {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

#ud-thumbnail {
    width: 76px;
    height: 56px;
    flex: 0 0 76px;
    background-color: #efe6d4;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 36%;
    border: 1px solid var(--gold);
    border-radius: 2px;
}

#ud-info {
    min-width: 0;
    flex: 1;
}

#ud-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 8px;
    margin-bottom: 2px;
}

#ud-name {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.02em;
    color: var(--ink);
}

.ud-rank {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--gold);
    border: 1px solid var(--line);
    background: var(--head);
    padding: 1px 6px;
}

#ud-hp-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

#ud-hp-container {
    flex: 1;
    height: 8px;
    background: #2a120f;
    border: 1px solid var(--line);
    border-radius: 0;
    overflow: hidden;
}

#ud-hp-bar {
    width: 100%;
    height: 100%;
    background: #c4a24a;
    transition: width 0.2s;
}

#ud-hp-text {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 12px;
    color: var(--gold);
    white-space: nowrap;
}

#ud-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
    color: var(--muted);
}

#ud-stats div {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    border-bottom: 1px solid rgba(196, 168, 92, 0.16);
    padding-bottom: 2px;
}

#ud-stats span {
    color: var(--ink);
}

#ud-stats .ud-stat-wide {
    grid-column: 1 / -1;
}

.ud-conceal {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #8ab87a;
    letter-spacing: 0.02em;
}

.ud-composition {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
    color: var(--gold);
    margin: 2px 0 4px;
    line-height: 1.35;
    font-weight: 600;
}

#ud-specials {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ud-special-btn,
#ud-special-btn {
    position: relative;
    background: #c47a1a;
    color: #111;
    font-weight: bold;
    border: none;
    overflow: hidden;
    padding: 0;
    height: 36px;
    cursor: pointer;
    width: 100%;
}

.ud-special-btn.armed {
    background: #9a2424;
    color: #fff;
    box-shadow: inset 0 0 0 2px #ff6666;
}

.ud-special-btn.armed .ud-special-btn-text {
    color: #fff;
    letter-spacing: 0.04em;
}

.ud-special-btn:disabled,
#ud-special-btn:disabled {
    background: #5a3d10;
    color: #aaa;
    cursor: not-allowed;
}

.ud-special-btn-bg,
#ud-special-btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.ud-special-btn-text,
#ud-special-btn-text {
    position: relative;
    z-index: 2;
    line-height: 36px;
    text-align: center;
    width: 100%;
    font-size: 12px;
}

#ud-others {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ud-type-chip {
    min-width: 0 !important;
    width: 100%;
    box-sizing: border-box;
    padding: 5px 8px !important;
    font-size: 12px !important;
    font-weight: 700;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--ink);
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    background: #241e14 !important;
    border: 1px solid var(--line);
    border-radius: 0;
    height: auto !important;
}

.ud-mini-thumb {
    width: auto;
    height: auto;
    background: #241e14;
    border-radius: 0;
    border: 1px solid var(--line);
    cursor: pointer;
}

.hint {
    font-size: 11px;
    color: #999;
    margin: 4px 0 0;
    line-height: 1.3;
}

.night-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #b8b4a4;
    font-size: 12px;
}

.topbar-meta .night-toggle {
    margin-left: 4px;
}

button {
    padding: 8px;
    background: #2a2e22;
    color: var(--ink);
    border: 1px solid rgba(196, 168, 92, 0.35);
    cursor: pointer;
    font-size: 12px;
}

button:hover {
    background: #3a4030;
    border-color: var(--gold);
}

#minimap {
    position: absolute;
    bottom: 14px;
    right: 258px;
    width: 280px;
    height: 160px;
    background: transparent;
    border: none;
    pointer-events: auto;
    cursor: pointer;
}

#alert-banner {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(160, 40, 30, 0.9);
    color: #fff;
    padding: 8px 16px;
    font-weight: 700;
    pointer-events: none;
}

#game-over-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.go-card {
    background: #1e2418;
    border: 1px solid #6a7050;
    padding: 28px 36px;
    text-align: center;
    color: #e8e4d9;
    min-width: 280px;
}

.go-card h2 {
    margin: 0 0 12px;
}

.go-card button {
    margin-top: 16px;
    padding: 12px 24px;
    font-size: 14px;
}

#game-container {
    width: 100%;
    height: 100%;
}

#game-container.cursor-default,
#game-container.cursor-default canvas {
    cursor: default;
}
#game-container.cursor-select,
#game-container.cursor-select canvas {
    cursor: pointer;
}
#game-container.cursor-move,
#game-container.cursor-move canvas {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><path d='M5 3 L27 15 L16 17 L21 29 L13 29 L9 18 L3 21 Z' fill='%233dff6a' stroke='%23040c06' stroke-width='2.4'/></svg>") 4 3, pointer;
}
#game-container.cursor-attack,
#game-container.cursor-attack canvas {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><circle cx='16' cy='16' r='8' fill='none' stroke='%23ff2a2a' stroke-width='3'/><path d='M16 2 V10 M16 22 V30 M2 16 H10 M22 16 H30' stroke='%23fff' stroke-width='3'/><circle cx='16' cy='16' r='2.2' fill='%23ff2a2a'/></svg>") 16 16, crosshair;
}
#game-container.cursor-enter,
#game-container.cursor-enter canvas {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><path d='M7 28 V8 L16 3 L25 8 V28 Z' fill='%23e7c15a' stroke='%23140e04' stroke-width='2'/><path d='M13 28 V16 H19 V28' fill='%233a2414'/><path d='M16 11 L21 16 L16 16 L16 20 L11 16 Z' fill='%23040c06'/></svg>") 16 28, pointer;
}
#game-container.cursor-no,
#game-container.cursor-no canvas {
    cursor: not-allowed;
}
#game-container.cursor-build-ok,
#game-container.cursor-build-ok canvas {
    cursor: copy;
}
#game-container.cursor-build-bad,
#game-container.cursor-build-bad canvas {
    cursor: not-allowed;
}

#toast-stack {
    position: absolute;
    bottom: 200px;
    left: 12px;
    width: 280px;
    display: flex;
    flex-direction: column-reverse;
    gap: 6px;
    pointer-events: none;
    z-index: 20;
}

.toast {
    background: rgba(20, 24, 16, 0.92);
    border-left: 4px solid #c47a1a;
    color: #e8e4d9;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.35;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    animation: toast-in 0.2s ease-out;
}

.toast.level-error { border-left-color: #d64545; }
.toast.level-warn { border-left-color: #d4a017; }
.toast.level-info { border-left-color: #4a8fd4; }
.toast.level-success { border-left-color: #4caf50; }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

#event-log {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 300px;
    max-height: 180px;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--ink);
    pointer-events: auto;
    z-index: 20;
    display: flex;
    flex-direction: column;
    font-size: 11px;
}

#event-log.collapsed #event-log-body {
    display: none;
}

#event-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    background: var(--head);
    border-bottom: 1px solid var(--line);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
}

#event-log-toggle {
    padding: 2px 8px;
    font-size: 11px;
    background: #333;
}

#event-log-body {
    overflow-y: auto;
    max-height: 150px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.log-line {
    line-height: 1.3;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 2px;
}

.log-line .log-time {
    color: #777;
    margin-right: 6px;
}

.log-line.level-error { color: #ff8a8a; }
.log-line.level-warn { color: #ffd27a; }
.log-line.level-info { color: #a8c8ef; }
.log-line.level-success { color: #9ddd9d; }

#command-rose {
    position: fixed;
    z-index: 46;
    width: 360px;
    height: 400px;
    margin-left: -180px;
    margin-top: -180px;
    pointer-events: none;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
}

#command-rose[hidden] {
    display: none !important;
}

#command-rose-svg {
    width: 360px;
    height: 360px;
    display: block;
}

#command-rose-caption {
    margin-top: -6px;
    text-align: center;
    color: #e7f6ea;
    font: 700 12px/1.35 "Segoe UI", Tahoma, sans-serif;
    text-shadow: 0 1px 2px #000;
}

#gate-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(8, 10, 6, 0.96);
    pointer-events: auto;
}

#gate-screen[hidden] {
    display: none !important;
}

#gate-form {
    width: min(420px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 32px 28px 22px;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

#gate-form h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
}

#gate-form p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 14px;
}

#gate-password {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #2a3124;
    color: var(--ink);
    border: 1px solid var(--line);
    font: inherit;
    font-size: 15px;
}

#gate-password:focus,
#nick-input:focus {
    outline: 1px solid var(--gold);
    border-color: var(--gold);
}

.gate-actions {
    display: flex;
    gap: 8px;
}

#gate-form button {
    flex: 1;
    padding: 10px 16px;
    background: var(--head);
    color: var(--gold);
    border: 1px solid var(--gold);
    font: inherit;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

#gate-form button:hover {
    background: #3a3420;
}

#gate-cancel {
    background: transparent;
    color: var(--muted);
    border-color: var(--line);
}

#gate-error {
    min-height: 1.2em;
    margin: 12px 0 0;
    color: #e07060;
    font-size: 13px;
}

#start-screen {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    overflow: auto;
    background: #070806;
    pointer-events: auto;
}

#start-screen[hidden],
#title-screen[hidden],
#start-lobby[hidden],
#lobby-search[hidden],
#lobby-empty[hidden],
#cancel-host[hidden] {
    display: none !important;
}

#title-screen {
    position: absolute;
    inset: 0;
}

#start-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    display: block;
    object-fit: cover;
    object-position: center 40%;
    border: 0;
    box-shadow: none;
    background: #10140e;
}

#title-copy {
    position: absolute;
    left: 50%;
    top: 11%;
    transform: translateX(-50%);
    z-index: 1;
    width: min(960px, calc(100% - 32px));
    text-align: center;
    pointer-events: none;
}

#title-copy h1 {
    margin: 0;
    padding-left: 0.14em;
    font-size: clamp(52px, 9vw, 108px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: 0.14em;
    color: #f4e6b0;
    text-shadow: 0 2px 0 #1a1408, 0 18px 40px rgba(0, 0, 0, 0.72);
}

#title-sub {
    margin: 10px 0 0;
    padding-left: 0.62em;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.62em;
    text-transform: lowercase;
    color: rgba(226, 193, 90, 0.72);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

#enter-menu {
    pointer-events: auto;
    margin-top: 28px;
    padding: 11px 34px;
    background: rgba(16, 14, 8, 0.42);
    color: var(--gold);
    border: 1px solid rgba(226, 193, 90, 0.85);
    font: inherit;
    font-size: 13px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    cursor: pointer;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

#enter-menu:hover {
    background: rgba(46, 40, 24, 0.78);
}

#start-screen.is-lobby #start-art {
    filter: brightness(0.32) saturate(0.85);
}

#start-screen.is-lobby #title-copy {
    display: none;
}

#start-screen.is-maps {
    left: 268px;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background: rgba(8, 10, 6, 0.28);
}

#start-screen.is-maps #title-screen,
#start-screen.is-maps #start-lobby {
    display: none !important;
}

#start-lobby {
    position: relative;
    z-index: 2;
    width: min(480px, 100%);
    box-sizing: border-box;
    background: rgba(12, 14, 10, 0.94);
    border: 1px solid var(--line);
    padding: 18px 18px 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

#nick-form {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin: 0 0 12px;
    padding: 0;
    background: transparent;
    border: 0;
}

#nick-form label {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

#nick-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    background: #2a3124;
    color: var(--ink);
    border: 1px solid var(--line);
    font: inherit;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
}

#nick-form button,
#host-game,
#cancel-host,
#lobby-list button {
    padding: 8px 16px;
    background: var(--head);
    color: var(--gold);
    border: 1px solid var(--gold);
    font: inherit;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

#nick-form button:hover,
#host-game:hover,
#cancel-host:hover,
#lobby-list button:hover {
    background: #3a3420;
}

#start-hello {
    margin: 0 0 10px;
    min-height: 0;
    color: var(--ink);
    font-size: 14px;
}

#start-hello:empty {
    display: none;
}

.lobby-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

#host-game,
#cancel-host {
    margin: 0;
}

#lobby-search,
#lobby-empty {
    margin: 4px 0 0;
    padding: 16px 10px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
    border: 1px dashed var(--line);
    background: rgba(42, 49, 36, 0.35);
}

#start-lobby h2 {
    margin: 8px 0;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
}

#lobby-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#lobby-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: #2a3124;
    border: 1px solid var(--line);
    font-size: 13px;
}

#lobby-status {
    min-height: 1.2em;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
}
