/* Kwatera Łajdaka and Cmentarz */

.quarter { display: flex; flex-direction: column; gap: 1rem; }
.q-hero {
  position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
  min-height: 190px; padding: 1.4rem 1.6rem; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2);
  background:
    linear-gradient(90deg, rgba(8, 10, 7, 0.94) 0%, rgba(8, 10, 7, 0.7) 45%, rgba(8, 10, 7, 0.35) 100%),
    linear-gradient(0deg, rgba(8, 10, 7, 0.9), transparent 60%),
    url('/assets/map-kalduhr.jpg') 57% 50.5% / 380% auto no-repeat;
}
.q-hero-text { position: relative; z-index: 1; max-width: 680px; }
.q-hero h2 { font-size: 3.6rem; line-height: 0.95; margin: 0.2rem 0 0.3rem; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8); }
.q-tag { color: var(--bone2); font-style: italic; margin: 0; }
.q-hero > .btn { position: relative; z-index: 1; }
.field.inv-light { background: rgba(0, 0, 0, 0.45); }
.field.inv-light.big { font-family: var(--display); font-size: 2.6rem; padding: 0 0.4rem; }
.q-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.q-lore { background: linear-gradient(180deg, rgba(233, 224, 199, 0.035), rgba(233, 224, 199, 0.015)); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.6rem 1.4rem; }
.q-sec + .q-sec { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.q-sec h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0; font-size: 1.7rem; color: var(--gold-hi); margin-bottom: 0.35rem; }
.q-sec p { font-size: 1.08rem; line-height: 1.55; color: var(--bone); margin: 0 0 0.6rem; max-width: 68ch; text-wrap: pretty; }
.q-lore .q-sec:first-child p:first-of-type::first-letter { font-family: var(--display); float: left; font-size: 3.6rem; line-height: 0.85; padding: 0.3rem 0.5rem 0 0; color: var(--gold); }
.q-sec-tools { display: flex; gap: 0.25rem; align-items: center; margin-bottom: 0.3rem; }
.q-sec-title-field { font-family: var(--display); font-size: 1.4rem; }
.q-boards { position: sticky; top: 0; display: grid; gap: 0.6rem; }
.q-seg { display: flex; }
.q-seg button { flex: 1; padding: 0.45rem 0.5rem; font-size: 0.98rem; }
.q-count { display: inline-block; min-width: 1.4em; margin-left: 0.25rem; padding: 0 0.3rem; border-radius: 99px; background: rgba(0, 0, 0, 0.3); font-size: 0.8rem; }
.q-seg button.on .q-count { background: rgba(26, 20, 6, 0.25); }
.q-board { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.8rem; }
.q-add { display: grid; gap: 0.35rem; margin: 0.4rem 0 0.7rem; }
.q-add .btn { justify-self: end; }
.q-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.q-item { border: 1px solid var(--line); border-left: 3px solid var(--gold-lo); border-radius: 8px; padding: 0.45rem 0.6rem 0.35rem; background: rgba(0, 0, 0, 0.22); }
.q-item.is-hidden { opacity: 0.55; border-style: dashed; }
.q-item.st-true { border-left-color: var(--gold-hi); }
.q-item.st-false { border-left-color: #5a5444; }
.q-item.st-false .q-title, .q-item.st-false .q-text { text-decoration: line-through; text-decoration-color: rgba(207, 83, 57, 0.7); color: var(--dim); }
.q-item-head { display: flex; gap: 0.4rem; align-items: center; }
.q-title { font-weight: 600; font-size: 1.05rem; flex: 1; min-width: 0; }
.field.q-title { padding: 0.1rem 0.3rem; background: transparent; border-color: transparent; }
.field.q-text { background: transparent; border-color: transparent; padding: 0.1rem 0.3rem; color: var(--bone2); }
.field.q-title:hover, .field.q-text:hover, .field.q-title:focus, .field.q-text:focus { border-color: var(--line2); background: rgba(0, 0, 0, 0.3); }
p.q-text { margin: 0.15rem 0.3rem; color: var(--bone2); white-space: pre-wrap; }
.q-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--muted); font-family: var(--caps); font-weight: 700; padding-left: 0.3rem; }
.q-actions { display: flex; gap: 2px; }
.badge, select.rel, select.status { font-family: var(--caps); font-weight: 700; font-size: 0.8rem; border-radius: 99px; padding: 0.05rem 0.55rem; border: 1px solid; white-space: nowrap; }
select.rel, select.status { width: auto; padding-right: 1.5rem; background-position: calc(100% - 13px) 55%, calc(100% - 8px) 55%; }
.rel-ally { color: #b9d79a; border-color: rgba(143, 207, 106, 0.45); }
.rel-neutral { color: var(--bone2); border-color: var(--line2); }
.rel-hostile { color: #f0a38f; border-color: rgba(207, 83, 57, 0.55); }
.st-unknown.badge, select.st-unknown { color: var(--dim); border-color: var(--line2); }
.st-true.badge, select.st-true { color: var(--gold-hi); border-color: var(--gold-lo); }
.st-false.badge, select.st-false { color: #e7907b; border-color: rgba(207, 83, 57, 0.5); }

/* Cmentarz */
.cemetery { display: flex; flex-direction: column; }
.graves { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem 1.2rem; align-items: start; }
.grave { display: grid; gap: 0.6rem; }
.stone {
  position: relative; isolation: isolate; text-align: center; padding: 2.2rem 1.2rem 1.1rem; color: #ddd8c8;
  border-radius: 48% 48% 10px 10px / 26% 26% 10px 10px;
  background:
    radial-gradient(ellipse 70% 40% at 10% 100%, rgba(110, 130, 70, 0.35), transparent 70%),
    radial-gradient(ellipse 50% 30% at 95% 95%, rgba(110, 130, 70, 0.22), transparent 70%),
    linear-gradient(180deg, #55574e 0%, #3d3f37 55%, #2b2c26 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08), inset 0 -12px 24px rgba(0, 0, 0, 0.35), 0 22px 30px -18px #000;
  border: 1px solid #23241f;
}
.stone::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: url('/assets/grain.jpg') center / 300px; mix-blend-mode: overlay; opacity: 0.25; pointer-events: none; z-index: -1; }
.stone > * { position: relative; }
.stone h3, .stone p { text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7), 0 -1px 0 rgba(255, 255, 255, 0.06); }
.stone-mark { display: block; width: 22px; height: 30px; margin: 0 auto 0.4rem; background: linear-gradient(#c9c3b0, #c9c3b0) center / 3px 100% no-repeat, linear-gradient(#c9c3b0, #c9c3b0) center 30% / 18px 3px no-repeat; opacity: 0.75; }
.stone-portrait { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; filter: grayscale(1) contrast(1.1); border: 2px solid #23241f; margin: 0 auto 0.3rem; display: block; }
.stone-name { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; font-size: 2.2rem; color: #ece7d6; line-height: 1; }
.stone-role { font-family: var(--caps); font-weight: 700; letter-spacing: 0.05em; font-size: 0.9rem; color: #bdb7a4; margin: 0.25rem 0; }
.stone-date { font-size: 0.88rem; color: #a9a391; margin: 0; }
.stone-cause { margin: 0.5rem auto 0.3rem; display: inline-block; font-family: var(--caps); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.04em; color: #e9b8a8; border-top: 1px solid rgba(0, 0, 0, 0.35); border-bottom: 1px solid rgba(255, 255, 255, 0.06); padding: 0.15rem 0.5rem; }
.stone-epitaph { font-style: italic; font-size: 1.05rem; color: #e4dfcd; margin: 0.4rem 0; }
.field.stone-epitaph { text-align: center; background: rgba(0, 0, 0, 0.15); border-color: transparent; color: #e4dfcd; resize: none; }
.field.stone-epitaph:hover, .field.stone-epitaph:focus { border-color: rgba(255, 255, 255, 0.15); }
.stone-player { font-size: 0.85rem; color: #a9a391; margin: 0.35rem 0 0; }
.stone-stats { display: flex; justify-content: center; gap: 0.8rem; margin-top: 0.5rem; font-family: var(--caps); font-weight: 700; font-size: 0.82rem; color: #bdb7a4; }
.last-words, .memorials { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0.5rem 0.7rem; }
.lbl-sm { display: block; font-family: var(--caps); font-weight: 700; letter-spacing: 0.06em; font-size: 0.82rem; color: var(--gold); margin-bottom: 0.2rem; }
.last-words q { font-style: italic; color: var(--bone); }
.memorials ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.memorials li { border-left: 2px solid var(--line2); padding-left: 0.5rem; }
.memorials li p { margin: 0; }
.memorials li span { display: flex; align-items: center; gap: 0.3rem; }
.mem-add { display: flex; gap: 0.3rem; margin-top: 0.4rem; }
.revive { justify-self: center; }
.cem-empty { margin: 4rem auto; text-align: center; display: grid; justify-items: center; gap: 0.3rem; color: var(--bone2); }
.stone.ghost { width: 140px; height: 170px; padding: 0; opacity: 0.35; margin-bottom: 0.8rem; }
.grave-bar { background: rgba(60, 62, 55, 0.4); border-color: #4a4c44; }

/* 7 main tabs: tighten top bar on narrower screens */
@media (max-width: 2100px) { .main-tabs .tab { padding: 0.4rem 0.7rem; font-size: 0.98rem; } }
@media (max-width: 1750px) { .main-tabs .tab { padding: 0.35rem 0.5rem; font-size: 0.92rem; } .safety-wrap .btn { font-size: 0; gap: 0; } .safety-wrap .btn svg { width: 18px; } }

