/* Kodeks wyprawy w zeszycie (ui/codex.js, N14): cztery działy, lista po lewej, karta po prawej. Nieodkryte wpisy przygaszone. */
.cd-root { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1; font-family: Bahnschrift, 'Segoe UI', sans-serif; color: #d8e0c0; }
.cd-secs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cd-secs button { background: rgba(255,255,255,.04); border: 1px solid rgba(216,224,192,.18); color: #d8e0c0; padding: 5px 10px; font: inherit; letter-spacing: .05em; cursor: pointer; }
.cd-secs button.on { border-color: #e3c244; color: #e3c244; }
.cd-count { margin-left: auto; font-size: 12px; opacity: .7; }
.cd-body { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 14px; min-height: 0; flex: 1; }
.cd-list { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; max-height: 52vh; padding-right: 4px; }
.cd-list button { text-align: left; background: transparent; border: 0; border-left: 2px solid transparent; color: #d8e0c0; padding: 5px 8px; font: inherit; cursor: pointer; }
.cd-list button.cur { border-left-color: #e3c244; background: rgba(227,194,68,.08); }
.cd-list button.un { opacity: .45; }
.cd-boss { font-style: normal; font-size: 10px; color: #e0453d; letter-spacing: .08em; margin-left: 4px; }
.cd-card { overflow-y: auto; max-height: 52vh; min-width: 0; }
.cd-card h3 { margin: 4px 0 6px; font-size: 18px; color: #e3c244; letter-spacing: .04em; }
.cd-art { display: block; width: 100%; max-width: 220px; height: auto; margin-bottom: 6px; background: rgba(0,0,0,.25); }
.cd-desc { font-size: 13px; line-height: 1.4; margin: 4px 0 8px; }
.cd-row { display: flex; gap: 8px; font-size: 13px; line-height: 1.35; margin: 3px 0; }
.cd-row em { font-style: normal; min-width: 92px; color: #9be07c; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; padding-top: 2px; }
.cd-foot { font-size: 12px; opacity: .7; margin-top: 6px; }
.cd-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 8px; }
.cd-stats div { display: flex; flex-direction: column; border-bottom: 1px solid rgba(216,224,192,.12); padding-bottom: 4px; }
.cd-stats em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.cd-stats b { font-size: 16px; color: #e3c244; }
.cd-traits { margin: 6px 0 0 16px; padding: 0; font-size: 13px; line-height: 1.4; }
@media (max-width: 760px) { .cd-body { grid-template-columns: 1fr; } .cd-list { max-height: 22vh; } }
/* CODEX2: ikony cech stwora (żywioł, słabość, strefa, pora) z dymkiem po najechaniu */
.cd-icons { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.ci { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 5px; border: 1px solid rgba(216,224,192,.22); border-radius: 3px; background: rgba(255,255,255,.04); color: #d8e0c0; cursor: help; outline: none; }
.ci:hover, .ci:focus { border-color: #e3c244; }
.ci svg { display: block; }
.ci svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ci svg path[fill="currentColor"] { fill: currentColor; stroke: none; }
.ci-fx { color: #e89a4a; }
.ci-wk { color: #9be07c; }
.ci-time { color: #9fb7e0; }
.ci-zone { font-size: 11px; letter-spacing: .04em; color: #e3c244; text-transform: uppercase; }
.ci:hover .sv-tip, .ci:focus .sv-tip { display: flex; }
/* dymek kodeksu: bazowy wygląd (sv-tip z services.css nie zawsze jest załadowany) */
.ci .sv-tip, .cd-desc .sv-tip { display: none; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 5; flex-direction: column; gap: 3px; min-width: 120px; padding: 7px 10px; white-space: nowrap; background: rgba(14,16,10,.98); border: 1px solid rgba(227,194,68,.5); color: #e8ecd0; font-size: 12px; font-weight: 400; letter-spacing: 0; text-align: left; }
.cd-desc { position: relative; }
.cd-desc .sv-tip b { color: #e3c244; font-weight: 600; }
/* karta w przewijanym kontenerze: dymek otwiera się w dół i w prawo od ikony, nie ucina się i nie zakrywa nazwy */
.cd-icons .ci .sv-tip, .cd-desc .sv-tip { top: calc(100% + 6px); bottom: auto; left: 0; transform: none; }
/* CODEX2b: siatka kafli zamiast listy napisów (bestiariusz, miejsca, arsenał); karta po prawej */
.cd-body { grid-template-columns: minmax(0, 1fr) minmax(220px, 30%); }
.cd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; align-content: start; max-height: 56vh; padding: 2px 6px 2px 2px; }
.cd-list button.cd-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1 / 1; min-width: 0; padding: 4px; background: rgba(255,255,255,.03); border: 1px solid rgba(216,224,192,.16); color: #d8e0c0; font: inherit; cursor: pointer; }
.cd-list button.cd-tile:hover { border-color: rgba(227,194,68,.6); }
.cd-list button.cd-tile.cur { border-color: #e3c244; background: rgba(227,194,68,.1); }
.cd-list button.cd-tile.boss { border: 2px solid #d9b13a; box-shadow: inset 0 0 0 1px rgba(0,0,0,.55); }
.cd-tile-art { display: block; width: 100%; max-width: 84px; height: auto; }
.cd-tile-art.sil { filter: brightness(0) opacity(.75); }
.cd-tile .sv-tip, .cd-tile .sv-tip { display: none; position: absolute; top: calc(100% + 6px); left: 0; bottom: auto; transform: none; z-index: 6; flex-direction: column; min-width: 120px; padding: 6px 9px; white-space: nowrap; background: rgba(14,16,10,.98); border: 1px solid rgba(227,194,68,.5); color: #e8ecd0; font-size: 12px; font-weight: 400; text-align: left; }
.cd-tile:hover .sv-tip { display: flex; }
.cd-n { position: absolute; top: 3px; right: 5px; font-style: normal; font-size: 11px; color: #e3c244; }
.cd-q { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-style: normal; font-size: 24px; color: #9aa08a; }
.cd-tile.un .cd-q { display: flex; }
.cd-tile.un .cd-n { display: none; }
.cd-grp { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-bottom: 4px; border-bottom: 1px solid rgba(216,224,192,.18); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #9be07c; }
.cd-grp:first-child { margin-top: 0; }
.cd-grp i { display: inline-flex; width: 16px; height: 16px; }
.cd-grp svg { width: 16px; height: 16px; }
.cd-grp svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cd-grp svg path[fill="currentColor"] { fill: currentColor; stroke: none; }
.cd-grp b { margin-left: auto; font-weight: 400; opacity: .7; }
