/* Shared paper card editor used by the simulator and deckmaker. */
.sim-help[hidden]{display:none}
.sim-help-box{width:min(680px,100%);max-height:88vh;overflow:auto;background:#151925;border:1px solid #3d4560;border-radius:14px;padding:18px 22px;color:#e8e9f0;box-shadow:0 20px 60px #000c}
.sim-help-box header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.sim-help-box h2{font-size:18px;margin:0}
.sim-help-box h3{font-size:14px;margin:14px 0 4px;color:#c9afff}.sim-help-box p{font-size:13.5px;line-height:1.75;margin:0;color:#d5def2}
.sim-help-box kbd{font-size:11px;border:1px solid #3d4560;border-radius:4px;padding:0 5px;background:#0f131d;font-family:inherit}
.paper-box{width:min(860px,100%);max-height:calc(var(--app-h,100vh) - 24px)}
.paper-box header{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.paper-box h2{font-size:18px;margin:0}
.paper-box .help-x{width:32px;height:32px;border-radius:50%;border:1px solid #3d4560;background:#1b2133;color:#fff;cursor:pointer}
.paper-lead{font-size:12.5px;color:#a9b4cc;margin:0 0 10px;line-height:1.6}
.paper-mine{display:flex;gap:6px;margin-bottom:10px}.paper-mine select{flex:1}
.paper-grid{display:grid;grid-template-columns:230px minmax(0,1fr);gap:16px;align-items:start}
.paper-pv{display:flex;flex-direction:column;gap:6px;position:sticky;top:0}
.paper-pv img{width:100%;aspect-ratio:704/1024;border-radius:6px;background:#0f131d}
.paper-file,.paper-pv button,.paper-mine button,.paper-btns button{display:block;text-align:center;padding:7px 10px;border-radius:8px;border:1px solid #333b55;background:#1b2133;color:#e8e9f0;font:inherit;font-size:13px;cursor:pointer}
.paper-btns button.primary{background:#5b4bb7;border-color:#7a69d8}.paper-mine .danger{border-color:#a7707b;background:#30202d;color:#ffd9df}
.paper-btns{justify-content:flex-end;margin-top:12px}
.paper-form,.pf-mon{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px}
.pf-mon{grid-column:1/-1}.pf-mon[hidden],.paper-form [hidden]{display:none!important}
.pf-wide{grid-column:1/-1}
.paper-form label{display:flex;flex-direction:column;gap:3px;font-size:12px;color:#aab5cd}
.paper-form input:not([type=radio]):not([type=checkbox]),.paper-form select,.paper-form textarea,.paper-mine select{background:#0f131d;color:#e8e9f0;border:1px solid #333b55;border-radius:7px;padding:7px 8px;font:inherit;font-size:13.5px}
.paper-form textarea{resize:vertical;line-height:1.55}
.pf-cat{display:flex;gap:6px}.pf-cat label{flex-direction:row;white-space:nowrap;flex:0 0 auto;align-items:center;gap:5px;padding:6px 12px;border:1px solid #333b55;border-radius:8px;font-size:13px;color:#e8e9f0;cursor:pointer}
.pf-cat label:has(input:checked){border-color:#7a69d8;background:#2c2550}
.pf-checks{display:flex;gap:12px;align-items:flex-end;padding-bottom:6px}.pf-checks label{flex-direction:row;align-items:center;gap:5px;font-size:13px;color:#e8e9f0}
.pf-marks span{font-size:12px;color:#aab5cd}.pm-grid{display:grid;grid-template-columns:repeat(3,36px);gap:4px;margin-top:3px}
.pm-grid button{height:32px;border-radius:6px;border:1px solid #333b55;background:#0f131d;color:#8d97b0;font-size:16px;cursor:pointer}.pm-grid button.on{background:#a8352c;border-color:#e0675c;color:#fff}
html.sim-compact .paper-box{padding:10px 14px}

#dmPaperDialog .paper-box{background:#171e29;border:1px solid #405064;border-radius:14px;padding:18px 22px;color:#e9edf5;overflow:auto;max-height:88vh;box-shadow:0 20px 60px #000c}
#dmPaperDialog .paper-btns{display:flex;gap:8px}
@media(max-width:680px){#dmPaperDialog .paper-grid{grid-template-columns:120px minmax(0,1fr)}#dmPaperDialog .paper-box{padding:12px;width:96vw;box-sizing:border-box}}

/* Shared deck-image source buttons: same icon placement and labels in both tools. */
.dm-import-sources .shared-source{display:inline-flex;align-items:center;gap:7px;justify-content:center;white-space:nowrap}
.dm-import-sources .shared-source svg{width:20px;height:20px;flex:none}
.dm-import-sources .shared-source kbd{font:10px inherit;opacity:.7;border:1px solid currentColor;border-radius:3px;padding:1px 3px}

/* The same role colors appear in the simulator deck drawer. */
.sim .dm-role-badges{position:absolute;left:2px;top:2px;display:flex;flex-wrap:wrap;gap:2px;max-width:calc(100% - 23px);pointer-events:none}.sim .dm-role-badges i{font-style:normal;font-size:10px;line-height:14px;width:14px;height:14px;text-align:center;color:#fff;border:1px solid #fff8;border-radius:3px;box-shadow:0 1px 3px #000}.sim .dm-role-badges .role-starter{background:#188564}.sim .dm-role-badges .role-handtrap{background:#2775ac}.sim .dm-role-badges .role-brick{background:#a94755}.sim .dm-role-badges .role-lineA{background:#a48232}.sim .dm-role-badges .role-lineB{background:#744fa1}

.sim .dm-role-badges i[class^="role-line"]{background:#8b6841}
