/* Key guide – tuned for dense cards and existing dark publication typography */
.dmz-keys{scroll-margin-top:145px}
.dmz-keys .section-head p{max-width:82ch;line-height:1.65}
.dmz-key-warning{border-left:3px solid #d5b676;padding:15px 18px;background:#d5b67610;margin:18px 0 25px;line-height:1.65;color:#d8dbe4}
.dmz-key-form{display:grid;grid-template-columns:minmax(210px,2fr) minmax(145px,1fr) minmax(145px,1fr) minmax(118px,.85fr) minmax(118px,.85fr);gap:12px;align-items:end}
.dmz-key-form>label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:750;letter-spacing:.01em}
.dmz-key-form input[type=search],.dmz-key-form select{width:100%;max-width:100%;background:#181f2c;border:1px solid #576078;padding:12px;color:#f5f6fc;border-radius:7px;min-height:45px;font:inherit}
.dmz-key-form .dmz-key-owned-filter{flex-direction:row;align-items:center;min-height:45px;white-space:normal}
.dmz-key-owned-filter input{width:18px;height:18px;accent-color:#bba9f8}
.dmz-key-summary{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:16px 0 20px}
.dmz-key-summary .dmz-key-sort{display:flex;gap:8px;align-items:center;font-weight:650;font-size:.83rem;color:#e0e5f2}
.dmz-key-sort select{min-height:42px;max-width:100%;background:#181f2c;color:#f5f6fc;border:1px solid #576078;border-radius:7px;padding:8px 10px;font:inherit}
@media(max-width:660px){.dmz-key-summary .dmz-key-sort{width:100%;justify-content:space-between}.dmz-key-sort select{font-size:16px}}
.dmz-key-summary button,.dmz-key-actions button{background:#222a3c;color:#eee;border:1px solid #535d73;border-radius:6px;padding:10px 12px;font:inherit;cursor:pointer;min-height:40px}
.dmz-key-summary button:hover,.dmz-key-actions button:hover{border-color:#c5aeed;color:#fff}
.dmz-key-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.dmz-key-card{background:#171d2a;border:1px solid #343f52;padding:19px 20px;border-radius:9px;min-width:0;scroll-margin-top:180px;box-shadow:0 8px 18px #0001}
.dmz-key-card[hidden]{display:none}
.dmz-key-card.dmz-key-is-owned{border-color:#bca4e8}
.dmz-key-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:9px;flex-wrap:wrap}
.dmz-key-card h3{font-size:1.24rem;margin:5px 0 14px;line-height:1.25;overflow-wrap:anywhere}
.dmz-key-evidence{font-size:10px;text-transform:uppercase;letter-spacing:.07em;padding:7px 9px;background:#2d3346;border-radius:4px;color:#e1cb9d}
.dmz-key-card dl{margin:13px 0;display:grid;gap:11px}
.dmz-key-card dl div{border-top:1px solid #ffffff15;padding-top:9px}
.dmz-key-card dt{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:#bcb0e3;font-weight:800}
.dmz-key-card dd{margin:4px 0 0;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.dmz-key-where{font-size:13px;line-height:1.55;margin:0}
.dmz-key-actions{display:flex;gap:7px;flex-wrap:wrap;margin:16px 0}
.dmz-key-actions button:first-child{background:#bfa4f1;color:#111526;border-color:transparent;font-weight:700}
.dmz-key-sources{font-size:11px;color:#adb5c5;display:flex;gap:12px;flex-wrap:wrap}
.dmz-key-empty{border:1px solid #747b8e;padding:20px;background:#171d2a}
.dmz-key-guide{margin:34px 0 8px;background:#1a2130;border-left:3px solid #c3a6ea;padding:20px 26px}
.dmz-key-guide ol{padding-left:21px;line-height:1.7}
@media(max-width:1000px){.dmz-key-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:660px){.dmz-key-grid{grid-template-columns:1fr}.dmz-key-form{grid-template-columns:1fr}.dmz-key-card{padding:16px}.dmz-key-guide{padding:18px}.dmz-keys{scroll-margin-top:105px}}
@media(prefers-reduced-motion:reduce){.dmz-keys *{scroll-behavior:auto!important}}


/* Scan ten concise records first; expand source-labelled evidence on demand. */
.dmz-key-card{padding:16px 19px}
.dmz-key-card h3{margin:5px 0 10px;font-size:1.12rem}
.dmz-key-card .dmz-key-where{margin:0 0 12px}
.dmz-key-details{border-block:1px solid #ffffff20;margin-top:9px}
.dmz-key-details summary{cursor:pointer;padding:13px 3px;color:#e0ccff;font-size:13px;font-weight:750;list-style-position:inside}
.dmz-key-details summary:hover,.dmz-key-details summary:focus-visible{color:#fff}
.dmz-key-details[open] summary{border-bottom:1px solid #ffffff20}
.dmz-key-details dl{padding:5px 2px}
.dmz-key-details .dmz-key-sources{padding-bottom:12px}
.dmz-key-actions{margin:13px 0 5px}
.dmz-key-more{display:block;margin:20px auto 0;padding:14px 24px;min-height:46px;background:#252c40;border:1px solid #9a83bd;border-radius:7px;color:#fff;font-weight:750;cursor:pointer}
.dmz-key-more[hidden]{display:none}
.dmz-key-more:hover,.dmz-key-more:focus-visible{border-color:#d4bfff;background:#303953}

/* Readable key directory: distinguish useful reference labels from unverified item art. */
.dmz-key-icon{display:inline-grid;place-items:center;width:31px;height:31px;border-radius:8px;background:#463a2a;border:1px solid #c7a66a;color:#ffddb1;font-size:1.14rem;margin-right:8px;vertical-align:middle}
.dmz-key-card-head .eyebrow{font-size:.69rem;line-height:1.5;letter-spacing:.02em}
.dmz-key-card h3{font-size:clamp(1.06rem,1.5vw,1.25rem);line-height:1.35;letter-spacing:-.015em}
.dmz-key-where{max-width:65ch;font-size:.89rem!important;line-height:1.6!important}
.dmz-key-card .dmz-key-evidence{font-weight:650;text-transform:none;letter-spacing:normal;line-height:1.35;border:1px solid #87745f}
.dmz-key-actions button{min-height:44px}
.dmz-key-details summary{font-size:.89rem;line-height:1.4;padding:14px 5px}
.dmz-key-details summary:focus-visible,.dmz-key-actions button:focus-visible,.dmz-key-more:focus-visible{outline:3px solid #bc9dff;outline-offset:2px}
@media(max-width:660px){.dmz-key-grid{gap:12px}.dmz-key-card{padding:16px}.dmz-key-form input[type=search],.dmz-key-form select{font-size:16px}.dmz-key-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.dmz-key-actions button:first-child{grid-column:1/-1}}


/* Portable Hājīn key stash controls: collapsed by default, keyboard/touch accessible. */
.dmz-stash-backup{border:1px solid #56647d;border-radius:9px;background:#131c2b;margin:0 0 20px;max-width:960px}
.dmz-stash-backup>summary{padding:13px 16px;min-height:45px;cursor:pointer;color:#e8dafb;font-weight:730}
.dmz-stash-backup>summary:focus-visible{outline:3px solid #bc9dff;outline-offset:2px}
.dmz-stash-backup[open]>summary{border-bottom:1px solid #56647d}
.dmz-stash-backup-body{display:grid;gap:9px;padding:15px 16px 18px}
.dmz-stash-backup-body p{margin:0 0 6px;line-height:1.55}
.dmz-stash-backup-body label{font-size:.87rem;font-weight:750}
.dmz-stash-backup-body textarea{box-sizing:border-box;width:100%;max-width:100%;min-height:72px;resize:vertical;border:1px solid #65748e;background:#0b1422;color:#eff1f8;padding:11px;border-radius:6px;font:13px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace}
.dmz-stash-backup-body textarea:focus-visible{outline:2px solid #d0b8ff;outline-offset:2px}
.dmz-stash-action{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:8px}
.dmz-stash-action button{min-height:44px;background:#2d3450;color:#f6f1ff;border:1px solid #9d8dbd;border-radius:6px;padding:10px 14px;font:inherit;font-weight:700;cursor:pointer}
.dmz-stash-action button:hover{background:#43395c}
.dmz-stash-action button:focus-visible{outline:3px solid #d0b8ff;outline-offset:2px}
.dmz-stash-action button:disabled{opacity:.5;cursor:not-allowed}
#dmzStashStatus{font-size:.84rem;line-height:1.5;color:#d5e5ff}
@media(max-width:660px){.dmz-stash-backup{max-width:100%}.dmz-stash-backup-body{padding:12px}.dmz-stash-action button{width:100%}}

/* Research-list export; never exposes player stash state. */
.dmz-key-export{margin:0 0 18px;border:1px solid #47526a;border-radius:9px;padding:12px 16px;background:#151b27}
.dmz-key-export>summary{cursor:pointer;font-weight:750;color:#e5d9fa}
.dmz-key-export>p{line-height:1.55;max-width:80ch;color:#bfc9d9}
.dmz-key-export>label{display:block;margin:12px 0 6px;font-size:.82rem;font-weight:700}
.dmz-key-export textarea{width:100%;max-width:100%;box-sizing:border-box;min-height:116px;background:#0c1320;color:#f0f2fc;border:1px solid #576078;border-radius:7px;padding:12px;line-height:1.5;font:inherit;resize:vertical}
.dmz-key-export button{min-height:44px;background:#242b3f;color:#f4f0ff;border:1px solid #6a6183;border-radius:7px;padding:10px 13px;cursor:pointer;font:inherit}
.dmz-key-export button:disabled{opacity:.5;cursor:not-allowed}
.dmz-key-export button:focus-visible,.dmz-key-export summary:focus-visible,.dmz-key-export textarea:focus-visible{outline:2px solid #e1c5ff;outline-offset:3px}
.dmz-key-export>span{display:block;margin:9px 0}
