/* Okienko decyzji przy akcji (gra/widok/dymek.js; makieta wersji 2, plansze Przetarg, Budowa, Rynek). Tło kremowe (.pergamin), strzałka w stronę stołu, rynku albo przeprawy. */
.dymek { position: absolute; z-index: 7; width: 360px; max-width: calc(100vw - 32px); max-height: calc(100% - 90px); overflow: visible; padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 10px; font-family: var(--f-body); }
.dymek[hidden] { display: none; }
.dymek.wchodzi { animation: dymek-wejscie .22s var(--ease, ease-out); }
@keyframes dymek-wejscie { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dymek.wchodzi { animation: none; } }
/* strzałka: kwadrat obrócony o 45°, w kolorze pergaminu, z obwódką */
.dymek::after { content: ""; position: absolute; top: calc(var(--sy, 40px) - 11px); width: 20px; height: 20px; background: var(--perg-2); border: 1px solid #3a240f; box-shadow: inset 0 0 0 3px #c99a56; transform: rotate(45deg); }
.dymek[data-strona="l"]::after { right: -11px; border-left: 0; border-bottom: 0; }
.dymek[data-strona="p"]::after { left: -11px; border-right: 0; border-top: 0; }
.dymek[data-strona="brak"]::after { display: none; }
.dymek .et { font: 800 11px/1.1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--perg-et); }
.dy-opis { margin: 0; font-size: 13px; line-height: 1.35; color: var(--perg-ink); }
.dy-opis small { color: var(--perg-et); }
.dymek .ruch-kom { margin: 0; font-size: 12.5px; color: #a3311d; font-weight: 700; }
.dy-przyciski { display: flex; gap: 10px; }
.dy-przyciski .przycisk { min-height: 42px; font-size: 15px; padding: 0 16px; }
.dy-przyciski .przycisk.glowny { flex: 1; }
.dymek .przycisk kbd, .koniec-bud kbd { font: 800 11px/1 var(--f-body); padding: 3px 5px; border: 0; border-radius: 5px; background: rgba(0, 0, 0, .18); color: inherit; margin-left: 6px; }
.dymek .przycisk:disabled { filter: grayscale(.7); opacity: .55; cursor: not-allowed; transform: none; }
/* przycisk ciemny (stal) także na pergaminie: Pasuję, Anuluj, Nic */
.przycisk.ciemny, .stal .pergamin .przycisk.ciemny { color: var(--krem); background: linear-gradient(180deg, #5d6b75, #36424a); border-color: #0e1316; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -3px 0 rgba(0, 0, 0, .28), 0 2px 0 #0b0f12, 0 4px 8px rgba(0, 0, 0, .4); }
.przycisk.ciemny:hover { background: linear-gradient(180deg, #6a7883, #3e4b54); }
.przycisk.szeroki { width: 100%; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.przycisk.maly { min-height: 26px; padding: 2px 8px; font-size: 13px; display: inline-flex; align-items: center; gap: 3px; }
.dy-link { align-self: center; border: 0; background: none; padding: 0; color: var(--perg-et); font: 700 12px/1 var(--f-body); text-decoration: underline; cursor: pointer; }

/* przetarg: karta po lewej, monety po prawej */
.dy-oferta { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.dy-karta { display: block; width: 132px; }
.dy-karta > svg { display: block; width: 100%; height: auto; } /* karta zawsze w szerokości kolumny (telefon: 96 px), nie wchodzi na monety i nagłówek */
.dy-prawa { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dy-monety { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 8px; justify-items: center; }
.moneta-of { border: 0; background: none; padding: 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 50%; transition: transform .12s; }
.moneta-of:hover { transform: translateY(-2px); }
.moneta-of:focus-visible { outline: 3px solid var(--akcent-jasny); outline-offset: 2px; }
.moneta-of .mon { position: relative; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; }
.moneta-of .mon .tlo { position: absolute; inset: 1px; }
.moneta-of .mon b { position: relative; font-size: 19px; }
.moneta-of small { font: 800 12px/1 var(--f-body); color: var(--perg-et); }
.moneta-of.wybrana .mon { box-shadow: 0 0 0 3px var(--perg-1), 0 0 0 5px var(--braz-ciemny), 0 0 16px 4px rgba(255, 190, 60, .75); transform: scale(1.08); }
.moneta-of.wybrana small { color: var(--perg-ink); margin-top: 5px; } /* pod obwódką wybranej monety, nie pod nią */

/* budowa: nagłówek z rodzajem przeprawy i płytką wymaganej długości, lista skutków */
.dymek[data-strona] .dy-gora { display: flex; align-items: center; gap: 10px; }
.dy-tyt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dy-tyt b { font-size: 22px; line-height: 1; color: var(--perg-ink); }
.dy-tyt small { font-size: 11.5px; color: var(--perg-et); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dy-wym { display: flex; align-items: center; gap: 6px; text-align: right; }
.dy-wym small { font: 700 11px/1.1 var(--f-body); color: var(--perg-et); }
.plytka { position: relative; width: 36px; height: 36px; display: grid; place-items: center; }
.plytka .tlo { position: absolute; inset: 0; }
.plytka b { position: relative; font-size: 17px; }
.dy-ok { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; background: rgba(76, 150, 84, .16); box-shadow: inset 0 0 0 1px rgba(60, 120, 66, .45); color: #24502a; font: 700 13px/1.2 var(--f-body); }
.dy-lista { display: flex; flex-direction: column; }
.dy-w { display: flex; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px dashed rgba(122, 79, 34, .3); font-size: 13.5px; color: var(--perg-ink); }
.dy-w:last-child { border-bottom: 0; }
.dy-t { flex: 1; font-weight: 700; }
.dy-l { display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-display); font-weight: 700; white-space: nowrap; }
.dy-l b { font-size: 16px; color: #2d6a33; }
.dy-l em { font-style: normal; font-size: 12px; color: var(--perg-et); }

/* surowce: liczniki −/+, koszt, razem, ręka */
.dy-naglowek { display: flex; justify-content: space-between; align-items: baseline; }
.dy-naglowek small { font: 700 11px/1 var(--f-body); color: var(--perg-et); }
.dy-sur { display: grid; grid-template-columns: 34px auto 1fr; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px dashed rgba(122, 79, 34, .3); }
.licznik { display: inline-flex; align-items: center; gap: 8px; }
.licznik .liczba-g { font-size: 20px; min-width: 18px; text-align: center; }
.okr { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #3a2412; background: linear-gradient(180deg, #fff8e6, #e9d6ad); border: 1px solid #6e4a22; box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 #cdb27e, 0 2px 0 #6e4a22; padding: 0; }
.okr:disabled { opacity: .4; cursor: not-allowed; }
.okr:focus-visible { outline: 3px solid var(--akcent-jasny); outline-offset: 2px; }
.dy-koszt { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-family: var(--f-display); color: var(--perg-ink); }
.dy-koszt b { font-size: 17px; line-height: 1; display: inline-flex; align-items: center; gap: 3px; }
.dy-koszt > .ik2 { display: none; }
.dy-koszt small { font: 700 11px/1.1 var(--f-body); color: var(--perg-et); }
.dy-razem { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding-top: 2px; }
.dy-razem > span { display: flex; flex-direction: column; gap: 5px; }
.dy-razem .w { display: inline-flex; align-items: center; gap: 4px; font: 800 17px/1 var(--f-display); color: var(--perg-ink); white-space: nowrap; }
.dy-razem .w small { font-size: 12px; color: var(--perg-et); }
.dy-razem .liczba-g { font-size: 22px; }
.dy-razem .mag { align-items: flex-end; }
.dy-reka { display: flex; flex-direction: column; gap: 3px; padding: 7px 9px; border-radius: 8px; background: rgba(122, 79, 34, .08); box-shadow: inset 0 0 0 1px rgba(122, 79, 34, .25); }
.dy-reka-w { display: flex; align-items: center; gap: 6px; font: 700 12.5px/1.2 var(--f-body); color: #a3311d; }
.dy-reka-w.ok { color: #2d6a33; }
.dy-reka-w > span:nth-child(2) { flex: 1; color: var(--perg-ink); }
.dy-reka-w .sur-l { display: inline-flex; align-items: center; gap: 2px; font-family: var(--f-display); }
.dy-oddaj { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font: 700 11.5px/1 var(--f-body); color: var(--perg-et); }

/* rynek: żetony w planie zakupu uniesione ze złotą obwódką, licznik „−n” */
.stal .rynek-w .pola i.pelne.kupuje { box-shadow: 0 0 0 2px var(--zloto-2), 0 0 8px rgba(255, 190, 60, .7); transform: translateY(-2px); }
.stal .rynek-w .ile-r .minus { display: block; font: 800 11px/1 var(--f-body); font-style: normal; color: var(--zloto-1); margin-top: 2px; }

/* „Koniec budowy” jako osobny przycisk nad paskiem gracza (makieta „Budowa”) */
.koniec-bud { position: absolute; z-index: 6; right: calc(var(--m, 8px) + 56px); bottom: calc(var(--h-gracz) + 2 * var(--m, 8px) + 8px); }
.koniec-bud[hidden] { display: none; }
.przycisk.duzy { min-height: 46px; padding: 0 20px; font-size: 16px; }
.gracz.zw ~ .koniec-bud { bottom: calc(var(--gracz-zw, 52px) + 2 * var(--m, 8px) + 8px); }
/* H (wszystko schowane): sama mapa, bez okienka decyzji */
.nowy.wszystko-schowane .dymek, .nowy.wszystko-schowane .koniec-bud { opacity: 0; pointer-events: none; }
