/* Zadania od ocalałych: okno rozmowy (E), dziennik (J), tracker i toasty. Krój i ramki jak w rozkładzie jazdy (route.css); złoto #d4a838 = zadania */
#qdlg, #qjournal { position: fixed; inset: 0; z-index: 61; display: none; align-items: center; justify-content: center; background: rgba(8,10,6,.62); backdrop-filter: blur(2px); font-family: Bahnschrift, 'DIN Alternate', 'Segoe UI', sans-serif; color: #d8d2b4; }
#qdlg.on, #qjournal.on { display: flex; }
.qd-box, .qj-box { position: relative; display: flex; flex-direction: column; max-height: 92vh; padding: 18px 22px 20px; background: rgba(22,25,17,.97); border: 1px solid #5a5746; box-shadow: 0 10px 40px rgba(0,0,0,.6); animation: bnIn .3s cubic-bezier(.2,1.2,.4,1) both; }
.qd-box { width: min(560px, 96vw); }
.qj-box { width: min(720px, 96vw); }
.qd-box .win-x, .qj-box .win-x { top: 10px; right: 10px; }

/* rozmowa */
.qd-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding-right: 34px; }
/* ikona roli zleceniodawcy zamiast portretu (ui/quests.js ROLE_ICON) */
.qd-role { width: 46px; height: 46px; flex: none; display: grid; place-items: center; color: #d4c98a; background: #1b1f15; border: 1px solid #6e6a56; }
.qd-role svg { width: 28px; height: 28px; }
/* wskaźnik kroków rozmowy: kropki w prawym górnym rogu, pierwsza = bieżący krok */
.qd-steps-box { margin-left: auto; align-self: center; }
.qd-steps { display: flex; gap: 6px; }
.qd-steps i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid #6e6a56; background: transparent; }
.qd-steps i.on { background: #d4a838; border-color: #d4a838; }
.qd-who h2 { margin: 0; font: 800 17px Bahnschrift, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #e6e0c4; }
.qd-who span { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8a866f; }
.qd-body { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
.qd-card { padding: 12px 14px 12px; background: rgba(10,12,8,.55); border: 1px solid #3c3f30; border-left: 3px solid #d4a838; }
.qd-card.report { border-left-color: #6bbe67; }
.qd-tag { font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #d4a838; }
.qd-tag.ok { color: #8fd36a; }
.qd-card h3 { margin: 3px 0 8px; font: 800 15px Bahnschrift, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #ece6c8; }
.qd-say { margin: 0 0 10px; font: 400 14px/1.5 'Segoe UI', sans-serif; letter-spacing: 0; color: #cfc9ac; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }   /* najwyżej 5 linii tekstu postaci */
.qd-goal { display: flex; gap: 8px; align-items: baseline; padding: 6px 10px; background: rgba(212,168,56,.08); border: 1px solid rgba(212,168,56,.28); font-size: 13px; font-weight: 700; letter-spacing: .04em; color: #efe3b4; }
.qd-goal i { font-style: normal; color: #d4a838; }
.qd-goal.ok { background: rgba(107,190,103,.08); border-color: rgba(107,190,103,.3); } .qd-goal.ok i { color: #8fd36a; }
.qd-meta { margin-top: 5px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8a866f; }
.qd-rew { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; }
.qd-lab { font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #8a866f; margin-right: 2px; }
.qc { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 6px; background: rgba(10,12,8,.65); border: 1px solid #4a4d3a; font: 800 13px Bahnschrift, sans-serif; letter-spacing: .04em; color: #8fd36a; }
.qc img { width: 20px; height: 20px; }
.qc.xp { color: #8fd36a; padding-left: 9px; }
.qc.gain { color: #8fd36a; position: relative; cursor: help; }
.qc.gain:hover .sv-tip { display: flex; }
.qc.item { color: #e6e0c4; border-color: var(--rc, #5a5746); background: color-mix(in srgb, var(--rc, #888) 16%, #12150d); font-weight: 700; }
.qc.item img { width: 24px; height: 24px; margin: -3px 0; }
.qd-btns { display: flex; gap: 10px; margin-top: 12px; }
.qd-btns button, .qj-bot button { padding: 8px 22px; font: 800 12px Bahnschrift, sans-serif; letter-spacing: .16em; color: #e6e0c4; background: rgba(50,58,40,.9); border: 1px solid #6e6a56; cursor: pointer; transition: border-color .12s, background .12s; pointer-events: auto; }
.qd-btns button:hover:not(.off), .qj-bot button:hover { border-color: #d4a838; background: rgba(70,74,44,.95); }
.qd-btns button.pri { border-color: #d4a838; color: #f6e7a8; background: rgba(86,72,24,.7); }
.qd-btns button.pri:hover:not(.off) { background: rgba(120,98,28,.85); }
.qd-btns button.off { opacity: .38; cursor: default; }
.qd-why { margin-top: 10px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: #e0743a; }
.qd-got { padding: 8px 12px; background: rgba(107,190,103,.06); border: 1px solid rgba(107,190,103,.25); }
.qd-idle { margin: 0; font: italic 400 14px/1.5 'Segoe UI', sans-serif; letter-spacing: 0; color: #cfdcc4; text-transform: none; }
.qd-extra { margin-top: 8px; font: 700 12px 'Segoe UI', sans-serif; letter-spacing: .02em; color: #8fd36a; }
.qd-idle { padding: 6px 2px; color: #a8a48a; }

/* dziennik */
.qj-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 12px; padding-right: 34px; flex-wrap: wrap; }
.qj-head h2 { margin: 0; font: 800 15px Bahnschrift, sans-serif; letter-spacing: .24em; text-transform: uppercase; color: #e6e0c4; }
.qj-info { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a8a48a; }
.qj-info b { color: #e6e0c4; }
.qj-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: thin; }
.qj-card { padding: 11px 14px; background: rgba(10,12,8,.55); border: 1px solid #3c3f30; border-left: 3px solid #d4a838; }
.qj-card.ready { border-left-color: #6bbe67; }
.qj-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.qj-top b { font: 800 14px Bahnschrift, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #ece6c8; }
.qj-from { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a866f; }
.qj-st { margin-left: auto; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #d4a838; white-space: nowrap; }
.qj-st.ok { color: #8fd36a; }
.qj-goal { margin-top: 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: #cfc9ac; }
.qj-bar { position: relative; height: 14px; margin-top: 7px; background: rgba(8,10,6,.8); border: 1px solid #4a4d3a; }
.qj-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#e0b83c, #a8821c); transition: width .3s; }
.qj-bar b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 10px Bahnschrift, sans-serif; letter-spacing: .12em; color: #f6efd0; text-shadow: 0 1px 2px #000; }
.qj-card.ready .qj-bar i { background: linear-gradient(#78c874, #3e8a3c); }
.qj-bot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.qj-bot .qd-rew { margin-top: 9px; }
.qj-bot button { padding: 5px 12px; font-size: 10px; letter-spacing: .14em; color: #a8a48a; }
.qj-bot button.sure { border-color: #e0743a; color: #ee8a6a; }
.qj-empty { padding: 26px 10px; text-align: center; font-size: 13px; letter-spacing: .06em; line-height: 1.7; color: #8a866f; }
.qj-legend { display: flex; gap: 16px; align-items: center; margin-top: 12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a866f; flex-wrap: wrap; }
.qj-key { margin-left: auto; }
i.m1, i.m2, b.m1 { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; border: 1.5px solid #e3c244; background: rgba(15,17,11,.9); color: #e3c244; font: 800 11px Bahnschrift, sans-serif; font-style: normal; vertical-align: -3px; }
i.m2 { border-color: #9be07c; color: #9be07c; }
b.m1 { margin: 0 3px; }

/* tracker: pod minimapą po prawej, najwyżej dwa wiersze */
#qtrack { position: absolute; right: 20px; top: var(--mm-bottom); width: 232px; display: none; flex-direction: column; gap: 3px; pointer-events: none; font-family: Bahnschrift, 'Segoe UI', sans-serif; z-index: 39; }
#qtrack.on { display: flex; }
.qt-row { display: flex; flex-direction: column; gap: 1px; padding: 4px 9px 5px; background: rgba(15,17,11,.62); border: 1px solid rgba(110,106,86,.5); border-left: 3px solid #d4a838; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.qt-row.ok { border-left-color: #6bbe67; }
.qt-row b { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #e6e0c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-row span { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #d4a838; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-row.ok span { color: #8fd36a; }
.qt-more { align-self: flex-end; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8a866f; }

/* toasty */
#qtoasts { position: fixed; left: 50%; top: 128px; transform: translateX(-50%); z-index: 45; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; font-family: Bahnschrift, 'DIN Alternate', 'Segoe UI', sans-serif; text-transform: uppercase; }
.qtoast { display: flex; flex-direction: column; align-items: center; min-width: 240px; padding: 7px 24px; background: rgba(14,16,11,.9); border: 1px solid #d4a838; box-shadow: 0 4px 18px rgba(0,0,0,.7); animation: bnIn .3s cubic-bezier(.2,1.2,.4,1) both; transition: opacity .5s; }
.qtoast.out { opacity: 0; }
.qtoast b { font-size: 15px; font-weight: 800; letter-spacing: .16em; color: #f0d878; }
.qtoast span { margin-top: 2px; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: #cfc9ac; }
/* wartości w powiadomieniu w jednej linii: zysk zielono (st-pos), koszt pomarańczowo (st-neg) */
.qtoast .qt-parts { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; justify-content: center; }
.qtoast .qt-parts i { font-style: normal; font-size: 13px; font-weight: 800; letter-spacing: .05em; }
.qtoast .qt-parts em { font-style: normal; color: #6f6b58; }
.qtoast.ok { border-color: #6bbe67; } .qtoast.ok b { color: #8fd36a; }
.qtoast.bad { border-color: #c43b2f; } .qtoast.bad b { color: #f34d3f; }
@media (max-width: 760px) { .qd-box, .qj-box { padding: 14px; } #qtrack { width: 180px; } }
