/* NOCTIS — Demônio: A Queda, ficha editável de personagem */
.entry-path{display:flex;width:min(440px,92vw);gap:5px;margin:10px auto 18px}
.entry-path button{flex:1;padding:10px 7px;background:#151c1a;color:#9b9d95;border:1px solid #3b4641;font:10px 'IBM Plex Mono',monospace;letter-spacing:1px;cursor:pointer}
.entry-path button.entry-path-active{background:#312d25;color:#e9c991;border-color:#98754f}
.entry-view .join-card.hidden{display:none!important}
.entry-view .join-card select{border:1px solid #455049;background:#1c2321;color:#eee3d2;padding:12px;width:100%}
.demon-roster{display:flex;flex-direction:column;gap:6px;margin:0 0 4px}
.demon-roster.hidden,.demon-roster-heading.hidden{display:none!important}
.d-roster-row{display:flex;align-items:center;justify-content:space-between;gap:4px;background:#232c29;border:1px solid #414944;padding:7px;border-radius:4px}
.d-roster-row span{min-width:0;overflow-wrap:anywhere;color:#ded5c5;font-size:11px}
.d-roster-row button{padding:6px;border:1px solid transparent;font:9px 'IBM Plex Mono',monospace;cursor:pointer}
.d-status-open{color:#addbc0;background:#233f32;border-color:#51836a!important}
.d-status-closed{color:#e9b6b0;background:#432b2c;border-color:#9b5a57!important}
.d-sheet-window{position:fixed;z-index:650;top:5vh;left:6vw;width:min(1280px,88vw);height:min(89vh,900px);min-width:min(480px,94vw);min-height:320px;resize:both;overflow:hidden;display:flex;flex-direction:column;background:#e6dfca;border:1px solid #b29d73;box-shadow:0 26px 90px #000c;color:#292d29;font-family:Georgia,'Times New Roman',serif}
.d-sheet-window.hidden{display:none!important}
.d-sheet-titlebar{height:45px;flex:none;display:flex;justify-content:space-between;align-items:center;padding:0 13px;background:linear-gradient(90deg,#141d1a,#28332c);color:#efd5a5;cursor:move;user-select:none;font:700 12px 'IBM Plex Mono',monospace;letter-spacing:.9px}
.d-sheet-titlebar small{font-weight:400;color:#a6b3a5;font-size:9px;margin-left:6px}
.d-sheet-titlebar>span:last-child{display:flex;align-items:center;gap:13px}
#d-sheet-status{font-size:9px;color:#b8c6b9}
.d-sheet-titlebar button{border:1px solid #5a635b;background:#232d28;color:#e9dfcc;font:24px Arial;width:30px;height:28px;cursor:pointer}
.d-sheet-tabs{display:flex;flex:none;overflow-x:auto;background:#30352e;scrollbar-width:thin}
.d-sheet-tabs button{flex:1;min-width:95px;background:transparent;border:0;border-right:1px solid #555c50;color:#d0c6ad;cursor:pointer;padding:12px 8px;font:700 11px 'IBM Plex Mono',monospace;letter-spacing:.7px}
.d-sheet-tabs button.active{color:#211e16;background:#d9c39a;border-bottom:3px solid #786038}
.d-sheet-body{flex:1;min-height:0;overflow:auto;padding:17px 21px 26px;background:repeating-linear-gradient(100deg,transparent 0px,transparent 28px,#7b70530b 29px),#e6dfca;scrollbar-color:#938a70 transparent}
.d-sheet-footer{flex:none;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 14px;background:#242d26;color:#b5b89e;font:9px 'IBM Plex Mono',monospace}
.d-sheet-footer button{background:#566049;color:#fff1d8;border:1px solid #87856c;padding:7px 10px;cursor:pointer;font-size:9px}
.d-sheet-body h3{margin:0 0 14px;font:700 17px Georgia,serif;border-bottom:2px solid #5c624e;letter-spacing:1px;padding-bottom:7px;color:#28352d}
.d-sheet-body h4{margin:0 0 10px;text-align:center;color:#596247;font:700 13px Georgia,serif;letter-spacing:1px}
.d-card{background:#f0e9d8d9;border:1px solid #b9ac8f;box-shadow:0 3px 13px #473d2510;padding:17px 17px 18px;margin:0 0 16px}
.d-general-head{display:grid;grid-template-columns:230px 132px 1fr;gap:20px;margin-bottom:17px;padding:17px;background:#302e29;color:#f4e9d9;align-items:center}
.d-game-logo{width:100%;max-height:142px;object-fit:contain;background:#f0e9d8;border:2px solid #6e5b47}
.d-avatar button{width:124px;height:130px;overflow:hidden;background:#453e30;border:1px solid #bcad8c;color:#ead1a6;cursor:pointer;font:11px 'IBM Plex Mono',monospace}
.d-avatar img{width:100%;height:100%;object-fit:cover}
.d-header-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.d-sheet-body label{min-width:0;font:10px 'IBM Plex Mono',monospace;color:#5a5648;display:flex;flex-direction:column;gap:5px}
.d-general-head label{color:#ddc8a6}
.d-sheet-body input:not([type="checkbox"]):not([type="file"]),.d-sheet-body textarea,.d-sheet-body select{min-width:0;box-sizing:border-box;font:13px Georgia,serif;background:#fffbef;border:1px solid #b8ac93;color:#292d26;border-radius:0;padding:7px 8px;width:100%;outline-color:#6e8a5a}
.d-sheet-body textarea{resize:vertical;line-height:1.5}
.d-sheet-body input[type="number"]{max-width:95px}
.d-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.d-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.d-three>div{min-width:0}
.d-trait-row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:4px 0;min-height:27px;border-bottom:1px dotted #bbb09a;font:12px Georgia,serif}
.d-trait-row>span{flex:1;min-width:0;overflow-wrap:anywhere}
.d-dots{display:flex;align-items:center;gap:2px;flex:none}
.d-dot{border:0;background:transparent;color:#787c6c;padding:1px;font:19px/1 Georgia,serif;width:19px;height:23px;cursor:pointer}
.d-dot.filled{color:#111912}
.d-dot.slash{border:1px solid #656755;width:17px;height:17px;margin-right:2px;font-size:17px;line-height:11px;color:#262c21;background:#faf7ec}
.d-dot.slash.filled{background:#ddd1b2}
.d-custom input{max-width:140px!important;flex:1!important;font-size:12px!important}
.d-custom>button,.d-new-custom button,.d-presets button,.d-weapon-head button{border:1px solid #a69b83;background:#e5dac1;color:#424638;padding:4px 7px;cursor:pointer}
.d-new-custom{display:flex;gap:5px;margin-top:9px}
.d-new-custom button{width:32px;font-size:16px}
.d-add-official{width:100%;margin-top:5px;background:transparent;color:#555e49;border:1px dashed #b3a88b;padding:5px;font:10px Georgia,serif;cursor:pointer}
.d-roll-row{display:grid;grid-template-columns:1.2fr 1fr 1.3fr;gap:12px}
.d-roll-options{display:flex;gap:16px;flex-wrap:wrap;margin:14px 0}
.d-roll-options label{display:flex;flex-direction:row;align-items:center;color:#323930;font-size:11px}
.d-actions{display:flex;gap:10px;margin:10px 0}
.d-sheet-body button:not(.d-dot){cursor:pointer}
.d-actions button,.d-primary{border:1px solid #75856c;color:#f3e9d4;background:#354d3b;padding:9px 15px;font:700 11px 'IBM Plex Mono',monospace;letter-spacing:.4px}
.d-actions button:not(.d-primary){background:#ebdebf;color:#414935}
.d-presets>div{display:flex;gap:9px;align-items:center;border-top:1px solid #bcb099;padding:8px 0}
.d-presets>div>span{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.d-presets small{font:10px Georgia,serif;color:#605f50}
.d-choice-row{display:flex;gap:8px;align-items:center;padding:4px 0;border-bottom:1px dotted #b3ab94}
.d-choice-row select{flex:1;min-width:0!important;width:auto!important;padding:5px!important;font-size:12px!important}
.d-choice-row .d-dot{width:18px}
.d-small-label{color:#5c604e;font:9px 'IBM Plex Mono',monospace;letter-spacing:.5px;margin:10px 0 3px}
.d-merits{margin-top:20px;padding-top:17px;border-top:1px solid #aaa084}
.d-merit{display:grid;grid-template-columns:1fr 64px;gap:7px;margin:7px 0}
.d-merit input:last-child{text-align:center}
.d-health-list{max-width:480px}.d-health-row{display:grid;grid-template-columns:1fr 48px 44px;gap:10px;align-items:center;padding:9px;border-bottom:1px solid #c0b59c}
.d-health-row em{font-size:12px}.d-health-state{height:30px;border:1px solid #424f45;background:#f8f3e5;color:#171e18;font:24px Georgia,serif}
.d-penalty{margin-top:18px;display:flex!important;align-items:center;gap:14px!important}
.d-penalty input{width:60px!important}
.d-hint{margin:13px 0 0;color:#656652;font-size:12px;line-height:1.55}
.d-combat-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.d-stat-value{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:5px 0 15px;font:13px Georgia,serif}
.d-stat-value strong{font:700 20px Georgia,serif;color:#1f422c;border:1px solid #b5ab90;padding:4px 9px}
.d-modifier{display:flex;align-items:center;gap:12px;margin:11px 0 16px}
.d-modifier button{border:1px solid #707a64;background:#dce3cc;font-size:20px;width:32px;height:32px}
.d-modifier b{min-width:25px;text-align:center}
.d-weapon{border:1px solid #c0b69b;padding:12px;margin-bottom:12px;background:#e9e1cc}
.d-weapon-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.d-weapon-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.d-checkbox{display:flex!important;flex-direction:row!important;align-items:center;gap:6px!important}
.d-armor-table{display:flex;flex-direction:column;gap:5px}
.d-table-header,.d-armor-row{display:grid;grid-template-columns:1fr 95px 150px;gap:8px}
.d-table-header{font:10px 'IBM Plex Mono',monospace;color:#555c4e}
.d-sheet-small{color:#c3b69d;font-size:10px;padding:4px}
@media(max-width:1280px){.d-general-head{grid-template-columns:180px 105px 1fr;gap:11px}.d-avatar button{width:100px;height:115px}.d-header-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.d-sheet-body{padding:12px}.d-three{gap:10px}.d-card{padding:12px}}
@media(max-width:860px){.d-sheet-window{top:3vh;left:2vw;width:96vw;height:90vh;min-width:0}.d-general-head{grid-template-columns:130px 100px 1fr}.d-three{grid-template-columns:1fr}.d-trait-row>span{max-width:60%}.d-dots{gap:6px}.d-roll-row,.d-weapon-grid{grid-template-columns:1fr 1fr}.d-combat-grid{grid-template-columns:1fr}}
@media(max-width:600px){.d-general-head{grid-template-columns:1fr 105px}.d-game-logo{max-width:230px}.d-header-grid{grid-column:1/-1;grid-template-columns:1fr 1fr}.d-two,.d-roll-row,.d-weapon-grid{grid-template-columns:1fr}.d-armor-row,.d-table-header{grid-template-columns:1fr 60px 90px}.d-sheet-tabs button{min-width:90px}.d-sheet-titlebar small{display:none}.d-dots{gap:3px}}

.access-restore{display:flex;flex-direction:column;gap:6px;font-size:10px;color:#c7b593}.access-restore input{font-size:10px;color:#bdc4b5}#active-room-code{color:#b7ab8e;font:10px monospace}.d-weapon-grid label small{color:#536148;font:10px monospace;margin-top:4px}

/* NOCTIS 0.4.1 — regressão corrigida: decoração não bloqueia o seletor inicial. */
.entry-view::before { pointer-events: none !important; }
.entry-view .entry-path { position: relative; z-index: 3; }
.entry-view .entry-path button { position: relative; pointer-events: auto; }

/* NOCTIS 0.4.3 — acesso compartilhado com o narrador */
.d-roster-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:5px}
.d-roster-row .d-roster-open{background:#c4a576;color:#241e18;border:1px solid #8d7147;font-size:9px;font-weight:700}
.d-roster-row.d-roster-selected{border-color:#b79559;background:#31332b}
.d-roster-row button{white-space:nowrap}
.d-sheet-footer-actions{display:flex;gap:7px}
@media(max-width:500px){.d-roster-row{grid-template-columns:minmax(0,1fr) 1fr;row-gap:7px}.d-roster-row span{grid-column:1/-1}.d-roster-row button{min-width:0}}

/* NOCTIS 0.4.4 — acervo privativo do narrador */
.d-library-intro{display:flex;justify-content:space-between;align-items:center;gap:7px;color:#e0cfaa;font-size:10px;font-weight:700;letter-spacing:.08em;padding:6px 1px 2px}
.d-library-intro span{background:#313932;border-radius:12px;padding:2px 7px;color:#d4e1d3}
.d-library-create{display:grid;gap:5px;border:1px solid #41473b;background:#191f1d;padding:8px;border-radius:5px}
.d-library-create input,.d-library-filters input,.d-library-filters select{min-width:0;width:100%;background:#111716;border:1px solid #4a514b;color:#eee0c8;padding:8px;font-size:11px;border-radius:3px;box-sizing:border-box}
.d-library-create-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.d-library-create-actions button{font-family:inherit;font-size:10px;line-height:1.35;background:#435b46;color:#f4f7eb;border:1px solid #73886b;border-radius:3px;cursor:pointer;padding:9px 5px}
.d-library-create-actions button:last-child{background:#323b43;border-color:#596877}
.d-library-create-actions button:hover{filter:brightness(1.16)}
.d-library-filters{display:grid;gap:5px;grid-template-columns:1fr;margin-top:5px}
.d-library-results{display:flex;flex-direction:column;gap:6px;max-height:min(45vh,560px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:#526054 #1e2523;padding:2px}
.d-library-count{font:10px 'IBM Plex Mono',monospace;color:#a8aa9f;margin:2px 0 4px;line-height:1.5}
.d-library-results .d-roster-row{display:flex;flex-direction:column;align-items:stretch!important;gap:5px;min-width:0;padding:8px!important}
.d-roster-details{min-width:0;display:flex;flex-direction:column;gap:2px}
.d-roster-details strong{font-size:12px;color:#efe6d2;overflow-wrap:anywhere;line-height:1.35}
.d-roster-details small{color:#aab4ac;overflow-wrap:anywhere;font-size:9px}
.d-roster-npc{border-left:3px solid #6e935a!important}
.d-roster-draft{border-left:3px solid #a78b55!important}
.d-roster-actions{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
.d-roster-actions button{padding:5px!important;font-size:9px!important;white-space:normal!important;line-height:1.2;background:#2e3933;color:#d8e4d9;border:1px solid #4b5e52!important}
.d-roster-actions .d-roster-open{background:#d0ac68;color:#29251d;border-color:#8e713d!important;font-weight:700}
.d-roster-actions .d-delete-character{margin-left:auto;background:#462925;color:#f4c6bd;border-color:#7d4e43!important;font-size:16px!important;line-height:1;padding:3px 8px!important}
.d-library-more{background:#2d3530;border:1px solid #697465;color:#d6c7a6;padding:9px;cursor:pointer;font-size:10px}
@media(max-width:1050px){.d-library-results{max-height:300px}.d-library-create-actions{grid-template-columns:1fr}}

#d-sheet-library{width:auto;min-width:70px;font:700 10px 'IBM Plex Mono',monospace;padding:0 9px;letter-spacing:0;cursor:pointer}

/* NOCTIS 0.4.5 — Demônio: A Queda · ouro envelhecido / pergaminho */
.d-sheet-window{
  border:2px solid #9f762f;
  background:#d9c39a;
  box-shadow:0 0 0 3px #2c2013,0 28px 90px #000e, inset 0 0 18px #9d783245;
}
.d-sheet-titlebar{
  background:linear-gradient(95deg,#16140f,#453017 47%,#221b12 100%);
  border-bottom:1px solid #af8745;
  color:#f4d99b;
}
.d-sheet-titlebar small,#d-sheet-status{color:#d9b975}
.d-sheet-titlebar button{background:#352718;color:#f7deb1;border:1px solid #99733a;border-radius:3px}
#d-sheet-collapse{width:auto;min-width:83px;padding:0 9px;font:700 10px 'IBM Plex Mono',monospace;letter-spacing:.25px}
.d-sheet-tabs{background:#332718;border-bottom:2px solid #946b33}
.d-sheet-tabs button{color:#d9be90;border-color:#6d502c}
.d-sheet-tabs button.active{background:#e5c786;color:#322516;border-bottom:3px solid #8b601f}
.d-sheet-body{
  background-color:#dfcda5;
  background-image:linear-gradient(105deg,rgba(255,249,227,.54),rgba(183,136,54,.11)),url('/assets/demon-filigree.svg'),repeating-linear-gradient(0deg,transparent 0,transparent 20px,#7b561808 21px);
  background-size:auto, min(50%,520px) auto,auto;
  background-position:center,right 4vw top 170px,center;
  background-repeat:no-repeat,repeat-y,repeat;
  color:#2f251b;
  scrollbar-color:#9c7c46 #e9d9b8;
}
.d-card{
  background:linear-gradient(145deg,rgba(255,249,227,.94),rgba(236,216,175,.91));
  border:1px solid #ad8d55;
  border-left:3px solid #9d773b;
  box-shadow:0 3px 0 #bda16a38, 0 10px 25px #58421a18;
  border-radius:4px;
}
.d-sheet-body h3{color:#50391e;border-bottom:1px solid #9a7031;letter-spacing:1.5px}
.d-sheet-body h3::before{content:'◆';font-size:10px;color:#ac7830;padding-right:12px}
.d-sheet-body h4{color:#704e21}
.d-general-head{background:radial-gradient(circle at 24% 40%,#6c4b20 0%,#352617 65%,#20180f 100%);border:1px solid #bb8b3a;box-shadow:inset 0 0 38px #06040055}
.d-game-logo{background:#f6e6c5;border:2px solid #b38742;border-radius:3px}
.d-sheet-body input:not([type="checkbox"]):not([type="file"]),.d-sheet-body textarea,.d-sheet-body select{background:#fff9e9;border-color:#ad8e58;color:#3c3021;outline-color:#b7812e;border-radius:3px}
.d-sheet-body label{color:#73562f}
.d-trait-row,.d-choice-row{border-bottom:1px dotted #a78d60}
.d-trait-row{min-height:34px;padding:3px 0}
.d-dots{gap:3px}
.d-dot{width:25px;height:28px;font-size:25px;line-height:1;padding:0;display:inline-flex;align-items:center;justify-content:center;color:#866e45;text-shadow:0 1px #fff6}
.d-dot.filled{color:#151410}
.d-choice-row .d-dot{width:23px}
.d-dot.slash{font-size:20px;width:20px;height:21px;background:#fff7e4;color:#3c311f;border-color:#aa8e5f}
.d-dot.slash.filled{background:#e5c991}
.d-roll-options label{color:#493723}
.d-actions button,.d-primary{background:#65461d!important;border:1px solid #b48a44!important;color:#f7e9cc!important;border-radius:3px}
.d-actions button:not(.d-primary){background:#eed5a4!important;color:#4c361b!important}
.d-weapon{background:#f1e3c5;border-color:#bd9e60}
.d-health-row{border-color:#bfa270}
.d-stat-value strong{color:#604017;border-color:#bda16b}
.d-pool-track{margin:10px 0 14px;overflow-x:auto;padding-bottom:2px}
.d-pool-track .d-dots{width:max-content}
.d-combat-grid{grid-template-columns:minmax(0,1.08fr) minmax(300px,.92fr);gap:18px}
.d-damage-controls{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.d-damage-controls>div{min-width:0}
.d-damage-stepper{display:flex;align-items:stretch;gap:0;margin-top:7px;height:40px}
.d-damage-stepper button{flex:0 0 38px;font-size:22px;line-height:1;background:#e7d2aa;border:1px solid #a98751;color:#5f421d}
.d-damage-stepper input{min-width:0;max-width:none!important;flex:1;text-align:center;border-radius:0!important}
.d-damage-options{display:grid;gap:8px;align-items:start}
.d-damage-options label{display:flex;flex-direction:row;align-items:center;gap:8px}
.d-damage-roll{display:block;width:100%;margin-top:13px}
.d-sheet-footer{background:#2e2519;color:#cfb98c;border-top:1px solid #98743b}
.d-sheet-footer button{background:#5a4224;border-color:#b18c52}
.d-sheet-window.d-collapsed{height:45px!important;min-height:45px!important;resize:none!important;overflow:hidden!important;max-height:45px}
.d-sheet-window.d-collapsed>.d-sheet-tabs,.d-sheet-window.d-collapsed>.d-sheet-body,.d-sheet-window.d-collapsed>.d-sheet-footer{display:none!important}
@media (max-width:1150px){.d-dot{width:23px;height:27px;font-size:23px}.d-dots{gap:1px}.d-choice-row .d-dot{width:21px}}
@media (max-width:860px){.d-combat-grid{grid-template-columns:1fr}.d-dot{width:26px;height:30px;font-size:26px}.d-three{grid-template-columns:1fr}.d-card{padding:14px}}
@media (max-width:540px){.d-damage-controls{grid-template-columns:1fr 1fr;gap:6px}.d-damage-stepper button{flex-basis:31px}.d-dot{width:23px;font-size:23px}}

/* NOCTIS 0.4.6 · Demônio: A Queda · tratamento editorial inspirado no template anexado */
.d-sheet-body{background-color:#d9c49b!important;background-image:linear-gradient(115deg,#f2dfb9ad,#dcc28f97),url('/assets/demon-parchment.jpg')!important;background-size:cover,540px auto!important;background-repeat:no-repeat,repeat!important;background-blend-mode:normal,multiply!important}
.d-sheet-body::selection{background:#b49250;color:#21180e}
.d-card{background:linear-gradient(160deg,#fffaeacb,#ead6b3cc)!important;border:1px solid #9c7741!important;border-top:3px double #8f632a!important;border-left:4px solid #a07937!important;border-radius:8px!important;box-shadow:inset 0 0 0 1px #fff8e58a,0 9px 30px #50331125!important}
.d-card-header{display:flex;gap:12px;justify-content:space-between;align-items:center;border-bottom:1px solid #b59a6b;margin-bottom:12px;padding-bottom:7px}
.d-card-header h3{border:0!important;margin:0!important;padding:0!important;font-variant:small-caps;font-size:20px!important}
.d-collapse-section{font:700 10px 'IBM Plex Mono',monospace;background:#5a4025;border:1px solid #b89556;color:#fbecd0;padding:6px 10px;border-radius:4px;min-width:90px;cursor:pointer}
.d-collapse-section:hover{background:#775323}
.d-section-folded>.d-card-header{margin-bottom:0;border:0;padding-bottom:0}
.d-section-folded .d-section-content{display:none}
.d-conditions .d-condition{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0;padding:12px 5px;background:#efe1c159;border:1px solid #c4a976}
.d-conditions .d-condition h4{text-align:center!important;min-height:26px}
.d-conditions .d-pool-track{display:flex;justify-content:center;margin:7px 0 10px;width:100%;overflow-x:auto}
.d-condition .d-dots{justify-content:center}
.d-dots{gap:0px!important}
.d-dot:not(.slash){width:27px!important;height:29px!important;font-size:30px!important;line-height:1!important;flex-shrink:0}
.d-dot.slash{width:21px!important;height:21px!important}
.d-trait-row{gap:5px!important;min-height:31px!important;padding:2px 0!important}
.d-trait-row>span{flex:0 1 35%;font-size:12px;line-height:1.12}
.d-trait-row .d-trait-note{flex:1 1 54px!important;width:54px!important;min-width:42px!important;max-width:100px!important;font-size:11px!important;padding:3px 5px!important;height:28px}
.d-trait-row>.d-dots{flex:0 0 auto}
.d-quick-entry{display:grid!important;grid-template-columns:minmax(150px,1.7fr) auto auto 112px 86px 32px;gap:7px!important;align-items:center!important;padding:11px 4px!important}
.d-quick-summary{display:flex;flex-direction:column;gap:4px;min-width:0}
.d-quick-summary strong,.d-quick-summary small{overflow-wrap:anywhere}
.d-quick-check{font-size:10px!important;flex-direction:row!important;gap:5px!important;align-items:center!important;white-space:nowrap}
.d-quick-check input{accent-color:#8d692f}
.d-quick-diff{display:flex;flex-direction:column;gap:2px;align-items:center}
.d-quick-diff small{font:9px 'IBM Plex Mono',monospace}
.d-inline-stepper{display:flex;gap:0;justify-content:center;align-items:center;border:1px solid #ac8e5e;background:#f9ebcc;border-radius:5px;height:30px;max-width:126px}
.d-inline-stepper button{border:0;background:#ead2a6;color:#5d411e;width:26px;height:28px;font-size:17px;line-height:1;flex:none}
.d-inline-stepper strong{flex:1;text-align:center;min-width:20px;color:#4a341c;font:700 13px 'IBM Plex Mono',monospace}
.d-presets .d-primary{padding:7px 8px!important}
.d-apoc-head,.d-apoc-row{display:grid;grid-template-columns: minmax(0,1.3fr) minmax(0,1.8fr) 64px;gap:7px;align-items:center;margin-bottom:6px}
.d-apoc-head{font:700 10px 'IBM Plex Mono',monospace;color:#71501f}
.d-apoc-row input{min-width:0!important;max-width:none!important}
.d-base-box{min-width:48px;text-align:center}
.d-combat-grid{grid-template-columns:minmax(0,.9fr) minmax(260px,1.1fr)!important}
.d-armament-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.d-weapon-entry{padding:10px 10px 12px;margin-bottom:10px;background:#f4e2c6a8;border:1px solid #bea06b;border-left:3px solid #8f713f;border-radius:6px}
.d-weapon-entry>strong{display:inline-block;margin-bottom:4px;color:#725121;font:11px Georgia,serif}
.d-weapon-entry>input{margin-bottom:6px}
.d-weapon-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:end}
.d-weapon-fields label{font-size:9px!important}
.d-weapon-fields label .d-inline-stepper{width:100%}
.d-weapon-fields>.d-primary{padding:9px 4px!important;min-height:34px}
.d-weapon-fields label.d-checkbox{align-items:center!important;align-self:center!important;font-size:11px!important}
.d-health-row{min-height:42px}
.d-library-create-actions{margin-top:8px}
.d-recent-wrap{padding:8px 0 10px;border-bottom:1px solid #4c544a}
.d-recent-label{font:700 9px 'IBM Plex Mono',monospace;color:#cebc8c;letter-spacing:0.5px}
.d-recent-npcs{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px;font-size:10px;color:#a2a797}
.d-recent-npcs button{padding:5px 7px;background:#364335;border:1px solid #70836b;color:#f0e5c9;border-radius:4px;font-size:10px;cursor:pointer}
.d-library-intro{letter-spacing:1px}
@media(max-width:1250px){.d-quick-entry{grid-template-columns: minmax(145px,1fr) auto auto 112px;gap:8px}.d-quick-entry>.d-primary{grid-column:3}.d-quick-entry>button:last-child{grid-column:4}.d-armament-columns{grid-template-columns:1fr}.d-weapon-fields{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:950px){.d-three{grid-template-columns:1fr!important}.d-armament-columns{grid-template-columns:1fr}.d-trait-row>span{flex:0 1 42%}.d-conditions{display:grid!important}.d-quick-entry{grid-template-columns:repeat(2,minmax(0,1fr))}.d-quick-summary{grid-column:1/-1}.d-weapon-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.d-apoc-head,.d-apoc-row{grid-template-columns:1fr 1fr 52px;gap:3px}.d-conditions{grid-template-columns:1fr!important}.d-quick-entry{grid-template-columns:1fr 1fr}.d-trait-row .d-trait-note{max-width:70px!important}.d-dot:not(.slash){width:24px!important;height:25px!important;font-size:25px!important}}

.d-card-heading{display:flex;align-items:center;gap:12px;min-width:0}
.d-card-heading>.d-base-box{font:700 17px Georgia,serif;color:#57391e;background:#ebd09a;border:1px solid #a77a3b;border-radius:5px;min-width:38px;height:31px;display:flex;align-items:center;justify-content:center}

/* NOCTIS 0.4.7 — revisão de ergonomia, Virtudes/Condições e Ferramentas da Danação */
.d-sheet-tabs button{flex:1 0 auto;min-width:100px}
.d-sheet-tabs button[data-tab="danacao"]{min-width:228px}
.d-dots{display:inline-flex;gap:0!important;align-items:center;justify-content:center;white-space:nowrap;flex-shrink:0}
.d-dot:not(.slash){width:21px!important;min-width:21px!important;height:24px!important;font-size:24px!important;line-height:1!important;padding:0!important}
.d-dot.slash{width:21px!important;min-width:21px!important;height:24px!important;font-size:19px!important;margin:0!important;line-height:1!important;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box}
.d-trait-row{gap:4px!important;min-height:28px!important;padding:2px 0!important}
.d-trait-row .d-trait-note{height:25px!important;font-size:11px!important;min-width:38px!important}
.d-trait-row>span{flex:1 1 34%;max-width:none!important;overflow-wrap:anywhere;line-height:1.16}
.d-choice-row{gap:5px!important;min-height:30px;padding:2px 0}
.d-choice-row>.d-dots{margin-left:auto}
.d-custom{display:grid;grid-template-columns:minmax(72px,1fr) minmax(52px,.6fr) auto 22px;align-items:center;gap:4px}
.d-custom>input,.d-custom>.d-trait-note{width:100%!important;max-width:none!important;min-width:0!important;flex:auto!important}
.d-custom>button{height:24px;padding:0 5px}
.d-virtue-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto;min-height:33px!important}
.d-virtue-row>span{font:13px Georgia,serif}
.d-general-roll{display:flex;align-items:end;gap:10px;flex-wrap:wrap;border:1px solid #b99a60;background:#f2e1bf90;border-radius:5px;margin-top:13px;padding:10px;justify-content:center}
.d-general-roll select{flex:1 1 150px;max-width:340px;height:34px!important}
.d-general-roll>div{display:flex;flex-direction:column;align-items:center;gap:3px}
.d-general-roll small{font:700 9px 'IBM Plex Mono',monospace;color:#6b4a21}
.d-general-roll .d-inline-stepper{min-width:110px}
.d-general-roll>.d-primary{height:34px!important;align-self:flex-end;white-space:nowrap}
.d-conditions{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
.d-conditions .d-condition{padding:12px 5px!important;overflow:hidden}
.d-conditions .d-pool-track{overflow:visible!important;padding:0!important;margin:4px 0 8px!important;min-height:25px;align-items:center}
.d-conditions .d-condition .d-dots{width:auto;justify-content:center}
.d-conditions .d-condition h4{min-height:24px!important;margin-bottom:4px!important}
.d-condition-roll{width:100%;box-sizing:border-box}
.d-damnation-list,.d-ritual-list{display:flex;flex-direction:column;gap:10px}
.d-damnation-row{display:grid;align-items:start;gap:10px;padding:11px;background:linear-gradient(110deg,#f7e9ceef,#f0dab7e0);border:1px solid #baa06d;border-left:3px solid #92733f;border-radius:5px}
.d-damnation-row.d-three-fields{grid-template-columns:23px repeat(3,minmax(0,1fr))}
.d-damnation-row.d-two-fields{grid-template-columns:23px minmax(0,1fr) minmax(0,2.1fr)}
.d-row-number{font:700 14px Georgia,serif;color:#75501e;margin-top:21px}
.d-damnation-cell{display:flex;flex-direction:column;gap:5px;min-width:0}
.d-damnation-cell small{font:700 10px 'IBM Plex Mono',monospace;color:#74552b;line-height:1.4}
.d-damnation-cell textarea{min-height:46px;max-width:100%;width:100%;resize:vertical}
.d-damnation-cell input{width:100%;box-sizing:border-box}
.d-ritual-entry{padding:14px;border:1px solid #ae8c54;border-left:4px solid #92713c;border-radius:6px;background:linear-gradient(140deg,#faeecded,#e9d4aeec);box-shadow:0 3px 13px #65452315}
.d-ritual-entry>h4{text-align:left;margin:0 0 12px;border-bottom:1px solid #bc9f67;padding-bottom:7px;font:700 15px Georgia,serif}
.d-ritual-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 15px}
.d-secondary-item{display:flex;gap:5px;margin:0 0 4px;align-items:center}
.d-secondary-item input{flex:1;min-width:0}
.d-secondary-item button{flex:none;width:30px;height:30px;background:#e3c28e;color:#633b26;border:1px solid #a78351;font-size:18px;border-radius:4px}
.d-damnation-add{background:#e5cb9f;border:1px dashed #987342;color:#5e401e;padding:6px 9px;font:700 10px 'IBM Plex Mono',monospace;border-radius:4px;align-self:start;width:fit-content;max-width:100%}
.d-legacy-ritual{margin-top:15px;border:1px dashed #977d56;padding:12px}
.d-legacy-ritual textarea{min-height:90px}
@media(max-width:1070px){.d-dot:not(.slash),.d-dot.slash{width:19px!important;min-width:19px!important;height:22px!important}.d-dot:not(.slash){font-size:22px!important}.d-conditions{grid-template-columns:1fr!important}.d-damnation-row.d-three-fields{grid-template-columns:23px repeat(2,minmax(0,1fr))}.d-damnation-row.d-three-fields>.d-damnation-cell:last-child{grid-column:2 / -1}}
@media(max-width:720px){.d-ritual-fields{grid-template-columns:1fr}.d-damnation-row.d-three-fields,.d-damnation-row.d-two-fields{grid-template-columns:22px minmax(0,1fr)}.d-damnation-row.d-three-fields>.d-damnation-cell:last-child{grid-column:auto}.d-damnation-row .d-damnation-cell{grid-column:2}.d-conditions .d-pool-track{overflow:auto!important}.d-custom{grid-template-columns:minmax(65px,1fr) minmax(40px,.7fr) auto 22px}}
@media(max-width:460px){.d-dot:not(.slash),.d-dot.slash{width:18px!important;min-width:18px!important;height:20px!important}.d-dot:not(.slash){font-size:20px!important}.d-general-roll select{flex-basis:100%}.d-card-header h3{font-size:17px!important}}


/* 0.5.3.1 — Correção de alinhamento e controles da ficha online.
   A tela de conexão usa estilos globais próprios: não carregá-los junto da ficha.
   Fixamos aqui dimensões independentemente dos estilos do navegador. */
.d-sheet-window{color-scheme:light}
.d-sheet-titlebar>span:last-child{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:0;flex-shrink:0}
.d-sheet-titlebar #d-sheet-close{
  display:inline-flex;align-items:center;justify-content:center;
  width:33px;min-width:33px;max-width:33px;height:33px;min-height:33px;
  padding:0;margin:0;line-height:1;font:26px/1 Arial,sans-serif;
  text-align:center;vertical-align:middle;flex:none;box-sizing:border-box;
}
.d-sheet-titlebar #d-sheet-collapse,.d-sheet-titlebar #d-sheet-library{
  display:inline-flex;align-items:center;justify-content:center;
  height:31px;line-height:1.2;margin:0;flex-shrink:0;
}
.d-sheet-body .d-health-row{
  display:grid;grid-template-columns:minmax(0,1fr) 42px 38px;
  column-gap:10px;align-items:center;box-sizing:border-box;
}
.d-sheet-body .d-health-row em{justify-self:center;text-align:center;width:42px;line-height:1.2}
.d-sheet-body button.d-health-state{
  display:inline-flex;align-items:center;justify-content:center;
  justify-self:center;align-self:center;
  width:34px;height:34px;min-width:34px;min-height:34px;
  padding:0!important;margin:0;box-sizing:border-box;
  font:25px/1 Georgia,serif;text-align:center;vertical-align:middle;
  background:#fff9eb;border:1px solid #806c4f;color:#241e15;border-radius:3px;
}
.d-sheet-body input[type="checkbox"]{
  appearance:none;-webkit-appearance:none;
  display:inline-grid;place-content:center;
  width:18px;min-width:18px;max-width:18px;
  height:18px;min-height:18px;max-height:18px;
  margin:0;padding:0!important;flex:0 0 18px;
  border:1.5px solid #8a6b38;border-radius:3px;
  background:#fff5df;color:#fffdf7;vertical-align:middle;
  box-shadow:inset 0 1px 2px #65492320;cursor:pointer;
}
.d-sheet-body input[type="checkbox"]:checked{background:#886526;border-color:#6a4a1b}
.d-sheet-body input[type="checkbox"]:checked::before{content:'✓';font:700 14px/1 Arial,sans-serif;color:#fff8df}
.d-sheet-body input[type="checkbox"]:focus-visible{outline:2px solid #ab752d;outline-offset:2px}
.d-sheet-body .d-roll-options,.d-sheet-body .d-damage-options{align-items:center;justify-content:flex-start;gap:14px}
.d-sheet-body .d-roll-options label,.d-sheet-body .d-damage-options label{
  display:inline-flex!important;flex-direction:row!important;
  align-items:center!important;justify-content:flex-start;
  gap:7px!important;margin:0;min-height:24px;white-space:nowrap;
  color:#493723;font-size:11px;
}
.d-sheet-body .d-inline-stepper{
  display:inline-flex;align-items:stretch;justify-content:center;
  min-height:30px;max-height:30px;height:30px;
  overflow:hidden;box-sizing:border-box;
}
.d-sheet-body .d-inline-stepper button{
  display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 28px;width:28px;min-width:28px;height:28px;
  padding:0!important;margin:0!important;border:0;
  font:700 18px/1 Arial,sans-serif;text-align:center;box-sizing:border-box;
}
.d-sheet-body .d-inline-stepper strong{
  display:inline-flex;align-items:center;justify-content:center;
  margin:0;padding:0 4px;text-align:center;line-height:1;
  min-width:26px;font-size:13px;
}
.d-sheet-body .d-modifier{align-items:center}
.d-sheet-body .d-modifier button{
  display:inline-flex;align-items:center;justify-content:center;
  padding:0!important;line-height:1;margin:0;
}
.d-sheet-body .d-damage-stepper button{
  display:inline-flex;align-items:center;justify-content:center;
  padding:0!important;margin:0;font:700 20px/1 Arial,sans-serif;
}
.d-sheet-body .d-secondary-item button{
  display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;min-width:30px;min-height:30px;
  padding:0!important;margin:0;
  font:24px/1 Arial,sans-serif;text-align:center;
}
.d-sheet-body .d-strength-field{display:flex;flex-direction:column;min-width:0;gap:5px;color:#73562f;font:9px 'IBM Plex Mono',monospace;align-self:end}
.d-sheet-body .d-strength-control{display:flex;align-items:stretch;gap:3px;width:100%;height:33px}
.d-sheet-body .d-strength-control output{
  display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 34px;min-width:34px;height:33px;
  background:#fff5e0;border:1px solid #ad8e58;color:#3c3021;
  font:700 16px Georgia,serif;border-radius:4px;
}
.d-sheet-body .d-strength-control button{
  display:inline-flex;align-items:center;justify-content:center;
  flex:1;min-width:0;height:33px;padding:0 4px!important;
  border:1px solid #987845;border-radius:4px;
  background:#eadabc;color:#654b2b;font:700 10px 'IBM Plex Mono',monospace;
  white-space:nowrap;box-sizing:border-box;
}
.d-sheet-body .d-strength-control button[aria-pressed="true"]{
  background:#5c7146;color:#fff6dc;border-color:#4a5e37;
}
@media(max-width:650px){
 .d-sheet-titlebar>span:last-child{gap:4px}
 .d-sheet-titlebar #d-sheet-close{width:30px;min-width:30px;max-width:30px;height:30px;min-height:30px}
 .d-sheet-body .d-health-row{grid-template-columns:minmax(0,1fr) 37px 36px;gap:5px}
 .d-sheet-body .d-roll-options,.d-sheet-body .d-damage-options{gap:10px}
}

/* NOCTIS 0.5.6 — Relacionamento: 12 registros, três colunas × quatro linhas. */
.d-relationships-help{font:12px/1.6 Georgia,serif;color:#61543e;margin:0 0 15px}
.d-relationships-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.d-relationship-card{min-width:0;display:flex;flex-direction:column;gap:11px;padding:14px;background:#ede2c8;border:1px solid #ad9568;box-shadow:inset 0 0 0 2px #f8f0db,inset 0 0 0 3px #b9a47877}
.d-relationship-heading{display:flex;align-items:center;gap:8px;font:700 11px 'IBM Plex Mono',monospace;letter-spacing:1.3px;color:#725225}
.d-relationship-heading:after{content:'';height:1px;flex:1;background:linear-gradient(90deg,#b29b6d,transparent)}
.d-relationship-card label{font-size:10px;gap:5px}
.d-relationship-card textarea{min-height:104px}
.d-roster-details .d-roster-creator{font:10px/1.3 'IBM Plex Mono',monospace;color:#c6ad82;overflow-wrap:anywhere;margin-top:3px}
@media(max-width:1000px){.d-relationships-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.d-relationships-grid{grid-template-columns:1fr}}


/* NOCTIS 0.5.7 — precisão de layout: Relacionamento, Danação e Combate. */
.d-relationships-grid .d-relationship-card{min-width:0;justify-content:flex-start}
.d-relationships-grid .d-relationship-card label{flex:1;min-width:0}
.d-relationships-grid .d-relationship-card textarea{width:100%;min-height:155px;box-sizing:border-box;resize:vertical}
.d-relationships-grid .d-relationship-heading span{font:700 13px Georgia,serif;letter-spacing:.8px}
/* Os três campos do Pacto têm altura equivalente à área de Dons. */
.d-sheet-body .d-pact-row .d-damnation-cell input,
.d-sheet-body .d-pact-row .d-damnation-cell textarea{width:100%;min-height:66px;height:66px;box-sizing:border-box;resize:vertical}
/* Os oito campos dos Rituais, incluindo Custo e Tempo, começam com igual altura. */
.d-sheet-body .d-ritual-entry .d-ritual-fields>.d-damnation-cell>input,
.d-sheet-body .d-ritual-entry .d-ritual-fields>.d-damnation-cell>textarea{min-height:74px;height:74px;width:100%;box-sizing:border-box}
/* Localização tem a mesma área inicial de Descrição. */
.d-sheet-body .d-bastion-row>.d-damnation-cell>input,
.d-sheet-body .d-bastion-row>.d-damnation-cell>textarea{min-height:78px;height:78px;width:100%;box-sizing:border-box}
.d-sheet-body .d-bastion-row{grid-template-columns:23px minmax(0,1fr) minmax(0,1fr)}
/* Vitalidade acompanha a altura acumulada de Iniciativa + Dano + Absorção. */
.d-sheet-body .d-combat-grid{align-items:stretch!important}
.d-sheet-body .d-combat-left,.d-sheet-body .d-combat-right{min-width:0}
.d-sheet-body .d-combat-right{display:flex;flex-direction:column}
.d-sheet-body .d-combat-right>.d-card{display:flex;flex-direction:column;flex:1;min-height:100%;box-sizing:border-box}
.d-sheet-body .d-combat-right .d-health-list{display:grid;grid-template-rows:repeat(7,minmax(0,1fr));flex:1;max-width:none;width:100%}
.d-sheet-body .d-combat-right .d-health-row{align-content:center;min-height:42px}
/* Equilibrar as cinco linhas dos dois tipos de arma, mantendo campos adicionais de fogo. */
.d-sheet-body .d-armament-columns{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.d-sheet-body .d-armament-columns>div{min-width:0}
.d-sheet-body .d-armament-columns .d-weapon-entry{min-height:254px;display:flex;flex-direction:column;box-sizing:border-box}
.d-sheet-body .d-armament-columns .d-weapon-entry>.d-weapon-fields{flex:1;align-content:end}
@media(max-width:1250px){
 .d-sheet-body .d-armament-columns{grid-template-columns:1fr}
 .d-sheet-body .d-armament-columns .d-weapon-entry{min-height:0}
}
@media(max-width:860px){
 .d-sheet-body .d-combat-right>.d-card{min-height:0}
}
@media(max-width:720px){
 .d-sheet-body .d-bastion-row{grid-template-columns:22px minmax(0,1fr)}
 .d-sheet-body .d-bastion-row .d-damnation-cell{grid-column:2}
}
/* Garantir campos simétricos de Pacto em larguras intermediárias. */
@media(min-width:721px){
 .d-sheet-body .d-pact-row{grid-template-columns:23px repeat(3,minmax(0,1fr))}
 .d-sheet-body .d-pact-row>.d-damnation-cell:last-child{grid-column:auto}
}
@media(min-width:1251px){
 .d-sheet-body .d-armament-columns .d-weapon-entry{height:346px;min-height:346px}
}
