body.dm { overflow: hidden; }
#app { height: 100vh; display: flex; flex-direction: column; }
.dm-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(#1a1714, #151210); flex: 0 0 auto; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 900; color: var(--gold2); font-size: 16px; white-space: nowrap; }
.brand .logo { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(240,192,64,.3)); }
.camp-name { background: transparent; border: 1px solid transparent; color: var(--text); font: 600 15px var(--font); padding: 5px 8px; border-radius: 6px; min-width: 120px; width: 280px; }
.camp-name:hover, .camp-name:focus { border-color: var(--line2); outline: none; background: #110f0d; }
.obs-dot { width: 9px; height: 9px; border-radius: 50%; background: #555; display: inline-block; }
.obs-dot.on { background: var(--good); box-shadow: 0 0 8px var(--good); }
.obs-dot.wait { background: var(--gold); animation: blink 1s infinite; }
.obs-dot.err { background: var(--bad); }
@keyframes blink { 50% { opacity: .3; } }
.obs-btn span:nth-child(2) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.obs-live:not(.on) { display: none; }
.obs-live.on { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: #fff; background: #c02828; padding: 1px 6px; border-radius: 4px; animation: blink 1.4s infinite; }
.conn { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); flex: 0 0 auto; }
.conn.on { background: var(--good); box-shadow: 0 0 8px var(--good); }

.dm-body { flex: 1; display: grid; grid-template-columns: 330px 1fr 380px; min-height: 0; }
.dm-left, .dm-right { background: var(--panel); min-height: 0; display: flex; flex-direction: column; }
.dm-left { border-right: 1px solid var(--line); }
.dm-right { border-left: 1px solid var(--line); overflow: auto; }
@media (max-width: 1250px) { .dm-body { grid-template-columns: 290px 1fr 330px; } }

.tabs { display: flex; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.tab { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 4px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--gold2); border-bottom-color: var(--gold); }
.tab-body { flex: 1; overflow: auto; padding: 12px; }
.tab-top { margin-bottom: 8px; }
.hint.pad { margin-bottom: 10px; }
.hint { font-size: 12px; color: var(--dim); }
.small { font-size: 11px; }
.sec { font-size: 12px; color: var(--gold); margin: 14px 0 8px; }
.sec small { font-family: var(--font); color: var(--dim); font-weight: 400; }
code { background: #0c0a09; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-size: 12px; color: #e8c890; word-break: break-all; }

/* jugadores */
.silent { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.pcard { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s; }
.pcard:hover { border-color: var(--line2); }
.pc-h { display: flex; align-items: center; gap: 7px; }
.pc-dot { width: 8px; height: 8px; border-radius: 50%; background: #555; flex: 0 0 auto; display: inline-block; }
.pc-dot.on { background: var(--good); box-shadow: 0 0 6px var(--good); }
.pc-color { width: 4px; height: 18px; border-radius: 2px; }
.pc-name { flex: 1; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-bag { font-size: 11px; color: var(--dim); }
.pc-bag.open { color: var(--gold); }
.pc-row { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.pc-gold b { color: #ffd75a; font-size: 15px; }
.gold-amt { width: 64px; padding: 3px 6px; text-align: center; }
.pc-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.stash { background: #12100e; border: 1px dashed var(--line2); border-radius: 6px; padding: 8px; }

/* catálogo */
.give-strip { position: sticky; top: -12px; z-index: 3; background: var(--panel); padding: 6px 0 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.give-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.give-chip { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; border: 1px dashed var(--line2); border-left: 3px solid var(--pc); background: var(--panel2); font-size: 12px; flex: 1 1 120px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.lib-item {
  background: color-mix(in srgb, var(--ic) 16%, var(--panel2)); border: 1px solid var(--line); border-bottom: 2px solid var(--rc);
  border-radius: 8px; padding: 8px 4px 6px; text-align: center; cursor: grab; user-select: none; touch-action: none;
}
.lib-item:hover { border-color: var(--gold); }
.li-ico { height: 32px; display: flex; align-items: center; justify-content: center; }
.li-ico .icon-img { width: 32px; height: 32px; }
.li-name { font-size: 11px; font-weight: 600; line-height: 1.2; margin-top: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.li-meta { font-size: 10px; color: var(--dim); margin-top: 2px; }
.item-ed { display: grid; grid-template-columns: 180px 1fr; gap: 16px; }
.ie-left { display: flex; flex-direction: column; align-items: center; gap: 8px; background: #12100e; border-radius: 8px; padding: 14px; border: 1px solid var(--line); }
.item-prev { min-height: 100px; display: flex; align-items: center; justify-content: center; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 10px; }
.emo { background: none; border: 1px solid transparent; border-radius: 6px; font-size: 18px; padding: 2px 4px; cursor: pointer; }
.emo:hover { border-color: var(--line2); background: var(--panel3); }

/* media */
.now-box { background: #12100e; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.now-box b { word-break: break-all; }
.now-box .row { margin-top: 4px; }
.drop-up { border: 2px dashed var(--line2); border-radius: 10px; padding: 14px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: center; font-size: 12px; }
.drop-up.over { border-color: var(--good); background: rgba(95,191,106,.06); }
.mfile { display: flex; align-items: center; gap: 8px; padding: 5px; border-radius: 6px; }
.mfile:hover { background: var(--panel2); }
.mthumb { width: 38px; height: 38px; border-radius: 4px; object-fit: cover; flex: 0 0 auto; background: #000; }
.mthumb.ic { display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--panel3); }
.mname { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-btns { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; max-width: 170px; }

/* registro */
.log { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.log-l { display: flex; gap: 8px; padding: 3px 4px; border-radius: 4px; }
.log-l:hover { background: var(--panel2); }
.lt { color: var(--dim); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.log-l.k-error .lx { color: #ff8a7a; } .log-l.k-dice .lx { color: #e8dcc8; } .log-l.k-node .lx { color: var(--gold2); font-weight: 600; }
.log-l.k-trade .lx { color: #9cc8ff; } .log-l.k-gold .lx { color: #ffd75a; } .log-l.k-action .lx { color: var(--muted); }

/* lienzo del árbol */
.dm-center { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
#tree { position: absolute; inset: 0; }
.tree {
  overflow: hidden; cursor: default;
  background-color: #0d0b0a;
  background-image: radial-gradient(circle, rgba(255,255,255,.07) 1.2px, transparent 1.3px);
}
.tree.panning { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.edge { fill: none; stroke: #4a4036; stroke-width: 2.5; }
.edge.walked { stroke: var(--gold); stroke-width: 3.5; filter: drop-shadow(0 0 4px rgba(212,166,74,.5)); }
.edge.skipped { stroke-dasharray: 6 6; opacity: .5; }
.edge-label {
  position: absolute; transform: translate(-50%, -50%); background: #1a1714; border: 1px solid var(--line2); color: var(--muted);
  font-size: 11px; padding: 2px 8px; border-radius: 99px; white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.edge-label.walked { color: var(--gold2); border-color: var(--gold); }
.tree.animating .tnode, .tree.animating .edge-label { transition: left .4s cubic-bezier(.4,0,.2,1), top .4s cubic-bezier(.4,0,.2,1); }

.tnode {
  position: absolute; width: 250px; background: linear-gradient(180deg, #221d18, #1a1613); border: 1px solid #3a322a;
  border-top: 3px solid var(--tc); border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.45); cursor: pointer; user-select: none;
  transition: box-shadow .15s, border-color .15s, opacity .2s;
}
.tnode.appear { animation: nodeIn .35s cubic-bezier(.2,.9,.3,1.3); }
@keyframes nodeIn { from { transform: scale(.6) translateX(-30px); opacity: 0; } }
.tnode:hover { border-color: #5a4c3e; border-top-color: var(--tc); }
.tnode.selected { box-shadow: 0 0 0 2px var(--gold), 0 8px 24px rgba(0,0,0,.6); }
.tnode.active { box-shadow: 0 0 0 2px var(--tc), 0 0 28px color-mix(in srgb, var(--tc) 55%, transparent); }
.tnode.active.selected { box-shadow: 0 0 0 2px var(--gold), 0 0 28px color-mix(in srgb, var(--tc) 55%, transparent); }
.tnode.st-done { opacity: .78; }
.tnode.st-skipped { opacity: .45; }
.tnode.st-skipped .tn-title { text-decoration: line-through; }
.tn-head { display: flex; align-items: center; gap: 7px; padding: 8px 10px 4px; }
.tn-ico { font-size: 16px; }
.tn-title { flex: 1; font-weight: 700; font-size: 14px; line-height: 1.25; color: #f4ead8; }
.tn-live { font-size: 9px; font-weight: 800; letter-spacing: .1em; color: #1a1208; background: var(--tc); padding: 2px 6px; border-radius: 99px; animation: blink 1.6s infinite; }
.tn-st { color: var(--good); font-weight: 700; }
.tn-body { padding: 0 10px 6px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.tn-acts { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 8px 8px; }
.chip {
  font-size: 11px; padding: 3px 8px; border-radius: 99px; border: 1px solid #4a4036; background: #2a241e; cursor: pointer; color: #e8dcc8;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip:hover { border-color: var(--gold); background: #3a3024; }
.chip.auto { border-color: color-mix(in srgb, var(--gold) 50%, #4a4036); }
.tn-foot { display: flex; gap: 8px; padding: 5px 10px; border-top: 1px solid #2e2720; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.tn-foot .tn-stat { margin-left: auto; }
.tn-add, .tn-tog {
  position: absolute; top: 10px; height: 24px; border-radius: 12px; border: 1px solid var(--line2); background: #2a241e; color: var(--text);
  cursor: pointer; font-weight: 700; font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.tn-add { right: -13px; width: 24px; opacity: 0; transition: opacity .15s; }
.tnode:hover .tn-add, .tnode.selected .tn-add { opacity: 1; }
.tn-add:hover { background: var(--gold); color: #1a1208; }
.tn-tog { right: -13px; top: 40px; min-width: 24px; padding: 0 6px; font-size: 11px; }
.tn-tog.closed { background: var(--tc); color: #1a1208; border-color: var(--tc); right: -30px; top: 10px; }
.tnode:hover .tn-tog.closed { right: -30px; }
.tnode:not(:hover) .tn-tog:not(.closed) { opacity: .0; }

.tree-ui { position: absolute; z-index: 10; }
.toolbar { left: 12px; top: 12px; display: flex; gap: 4px; align-items: center; background: rgba(20,17,15,.92); border: 1px solid var(--line); border-radius: 10px; padding: 5px; box-shadow: var(--shadow); }
.zoom { font-size: 12px; color: var(--muted); min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.help { left: 12px; top: 58px; font-size: 12px; color: var(--muted); background: rgba(20,17,15,.96); border: 1px solid var(--line); padding: 8px 12px; border-radius: 8px; pointer-events: none; display: none; line-height: 1.7; box-shadow: var(--shadow); }
.help.show { display: block; }
.help b { color: var(--gold2); font-weight: 600; }
.rolls-dock {
  right: 12px; bottom: 12px; width: 400px; max-height: 55%; overflow: auto; background: rgba(22,19,16,.96); border: 1px solid var(--line2);
  border-radius: 12px; box-shadow: var(--shadow); padding: 8px;
}
.rolls-dock.closed { max-height: none; }
.trades-dock { right: 12px; top: 12px; width: 440px; max-height: 42%; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.trades-dock:not(:empty) { background: rgba(22,19,16,.96); border: 1px solid var(--line2); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
.dock-h { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.dock-t { background: none; border: 0; color: var(--gold2); font-family: var(--display); font-weight: 700; font-size: 14px; cursor: pointer; padding: 2px 4px; display: flex; gap: 6px; align-items: center; }
.badge { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 6px; font-family: var(--font); }
.roll-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-top: 8px; }
.roll-card.done { border-color: #3f6a45; }
.rc-h { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.rc-row { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 2px 0; }
.rc-res b { font-size: 15px; }
.rc-res.ok { color: var(--good); } .rc-res.ko { color: var(--bad); }
.mini { font-size: 10px; font-weight: 800; padding: 0 5px; border-radius: 4px; }
.mini.adv { background: var(--gold); color: #1a1208; } .mini.dis { background: var(--bad); color: #fff; }
.rc-group { margin-top: 6px; text-align: center; font-weight: 800; letter-spacing: .08em; font-size: 12px; padding: 4px; border-radius: 6px; }
.rc-group.ok { background: rgba(95,191,106,.15); color: var(--good); } .rc-group.ko { background: rgba(214,80,80,.15); color: var(--bad); }
.req-card { display: flex; align-items: center; gap: 6px; background: #1d2633; border: 1px solid #3a5a80; border-radius: 8px; padding: 8px; font-size: 13px; }
.req-card span { flex: 1; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }

/* inspector */
.ins-head { padding: 14px 16px 0; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--tc, var(--gold)) 14%, transparent), transparent); position: sticky; top: 0; z-index: 2; backdrop-filter: blur(4px); background-color: rgba(26,23,20,.92); }
.ins-type { font-size: 10px; letter-spacing: .2em; color: var(--tc, var(--gold)); font-weight: 800; }
.ins-title { font-size: 20px; margin: 4px 0 10px; color: #fff; line-height: 1.2; word-break: break-word; }
.ins-tabs { display: flex; gap: 2px; }
.tabbtn { background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 12px; cursor: pointer; color: var(--muted); font-weight: 600; }
.tabbtn.on { color: var(--gold2); border-bottom-color: var(--gold); }
.ins-body { padding: 14px 16px 30px; }
.ins-status { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.live { color: var(--tc); font-weight: 800; letter-spacing: .1em; font-size: 12px; animation: blink 1.6s infinite; margin-right: 6px; }
.ins-img { position: relative; margin-bottom: 10px; }
.ins-img img { width: 100%; border-radius: 8px; display: block; border: 1px solid var(--line); }
.ins-img .btn { position: absolute; right: 6px; bottom: 6px; }
.md { font-size: 14px; line-height: 1.6; color: #e2d8c6; }
.md p { margin: 0 0 4px; }
.md h3, .md h4, .md h5 { color: var(--gold2); margin: 8px 0 4px; font-size: 15px; }
.md ul { margin: 4px 0 6px; padding-left: 18px; }
.md b { color: #fff; }
.md .sp { height: 6px; }
.ins-sec { font-size: 12px; color: var(--gold); margin: 18px 0 8px; letter-spacing: .06em; }
.ins-sec small { font-family: var(--font); color: var(--dim); font-weight: 400; letter-spacing: 0; }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.act-btn { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 8px; border: 1px solid var(--line2); background: linear-gradient(#2a241e, #221d18); cursor: pointer; text-align: left; font-weight: 600; font-size: 13px; position: relative; }
.act-btn:hover { border-color: var(--gold); background: linear-gradient(#3a3024, #2a241e); }
.act-btn:active { transform: scale(.98); }
.act-btn .ai { font-size: 18px; }
.act-btn .al { flex: 1; line-height: 1.2; }
.act-btn .aa { position: absolute; top: 3px; right: 6px; font-size: 10px; }
.choices { display: flex; flex-direction: column; gap: 6px; }
.choice {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line2); cursor: pointer; text-align: left;
  background: linear-gradient(90deg, rgba(212,166,74,.08), transparent); width: 100%;
}
.choice:hover { border-color: var(--gold); background: linear-gradient(90deg, rgba(212,166,74,.18), transparent); }
.ch-edge { color: var(--muted); font-style: italic; font-size: 12px; max-width: 45%; }
.ch-arrow { color: var(--gold); }
.ch-title { flex: 1; font-weight: 700; }
.choice.st-done { opacity: .7; } .choice.st-skipped { opacity: .45; }
.back { margin-top: 14px; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 0; font-size: 13px; }
.back:hover { color: var(--gold2); }
.ov-active { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ov-empty { text-align: center; padding: 20px 0; }
.ov-tips ul { padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.ov-tips b { color: var(--text); }

.notes { min-height: 160px; font-size: 13px; }
.acts-ed { display: flex; flex-direction: column; gap: 8px; }
.act-ed { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.act-ed .inp { padding: 5px 7px; font-size: 13px; }
.act-ed select.k { flex: 1; }
.act-params { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.chk.auto { font-size: 12px; color: var(--gold); white-space: nowrap; }
.vol { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.vol input { flex: 1; accent-color: var(--gold); }
.media-field .inp { flex: 1; }
.ins-danger { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); }

/* menú contextual */
.ctx { position: fixed; z-index: 3000; background: #1f1b17; border: 1px solid var(--line2); border-radius: 8px; padding: 4px; box-shadow: var(--shadow); min-width: 200px; animation: pop .1s; }
.ctx button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 5px; cursor: pointer; font-size: 13px; }
.ctx button:hover { background: var(--panel3); }
.ctx button.danger { color: #ff8a7a; }
.ctx .sep { height: 1px; background: var(--line); margin: 4px 0; }

/* diálogo de tirada */
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; flex-wrap: wrap; }
.seg button { background: #151210; border: 0; padding: 6px 10px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: linear-gradient(#b8863a, #8e6326); color: #1a1208; }
.rolld .row .field { min-width: 120px; }
.inp.dc { font-size: 18px; font-weight: 700; text-align: center; }
.rd-ph { display: flex; align-items: center; gap: 6px; margin: 12px 0 6px; font-weight: 700; color: var(--gold); }
.rd-players { display: flex; flex-direction: column; gap: 6px; }
.rd-p { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); opacity: .55; flex-wrap: wrap; }
.rd-p.on { opacity: 1; border-color: var(--line2); }
.rd-p .seg button { padding: 4px 8px; }
.inp.bonus { width: 60px; padding: 4px; text-align: center; }
.insp-b { font-size: 12px; color: var(--gold2); }

/* inventario DM */
.dm-inv .inv-info { display: flex; gap: 6px; margin-bottom: 10px; align-items: center; }
.dm-inv .inv-info b { color: #ffd75a; }
.grid-scroll { overflow: auto; max-width: 100%; }

/* ajustes y overlays */
.settings .row .field { min-width: 0; }
.obs-detect { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line2); margin-bottom: 10px; }
.obs-detect .btn { flex: 0 0 auto; }
.obs-manual { margin-bottom: 8px; }
.obs-manual summary { cursor: pointer; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.obs-manual summary:hover { color: var(--text); }
.obs-status {font-size: 12px; padding: 6px 10px; border-radius: 6px; background: #12100e; border: 1px solid var(--line); margin-top: 8px; color: var(--muted); }
.obs-status.ok { color: var(--good); border-color: #3f6a45; }
.obs-status.err { color: #ff8a7a; border-color: #7a3030; }
.ov-row { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; background: var(--panel2); margin-bottom: 6px; }
.ov-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
a.btn { text-decoration: none; }
.fatal { max-width: 520px; margin: 15vh auto; text-align: center; padding: 20px; }
.fatal h1 { font-size: 60px; }
.fatal h2 { color: var(--gold2); margin: 10px 0; }

/* =====================================================================================
   ASPECTO DE JUEGO + ÁRBOL VERTICAL
   ===================================================================================== */
.dm-head { background: linear-gradient(#1a140f, #0e0b09); border-bottom: 0; box-shadow: 0 2px 0 #2a2119, 0 6px 18px rgba(0,0,0,.6); }
.brand { letter-spacing: .14em; text-transform: uppercase; font-size: 15px; color: #d8c49a; }
.camp-name { font-family: var(--display); letter-spacing: .06em; color: #e8d8b8; }
.dm-left, .dm-right { background: rgba(14,11,9,.94); border-color: #2a2119 !important; }
.tabs { border-bottom: 1px solid #2a2119; }
.tab { font-family: var(--display); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: #7d6d55; }
.tab.on { color: #ecd9a8; border-bottom-color: #a8854a; }
.pcard, .slot, .roll-card { background: #120f0c; border-color: #2a2119; border-radius: 2px; }
.pc-cls { font-family: var(--font); font-weight: 400; font-size: 12px; color: #9a8a6c; }
.tree { background-color: rgba(8,7,6,.55); background-image: radial-gradient(circle, rgba(220,190,140,.07) 1.2px, transparent 1.3px); }
.toolbar, .rolls-dock, .trades-dock:not(:empty) { background: rgba(14,11,9,.95); border-color: #3a2f24; border-radius: 2px; }
.ins-head { background-color: rgba(16,13,10,.96); }
.ins-title { font-size: 22px; color: #f3e6c8; }
.md { font-size: 15px; }
.choice { border-radius: 2px; border-color: #3a2f24; }
.act-btn { border-radius: 2px; background: linear-gradient(#211a14, #17120e); border-color: #3a2f24; font-family: var(--display); letter-spacing: .03em; }

/* tarjetas del árbol (de arriba abajo) */
.tnode {
  width: 240px; border-radius: 3px; border: 1px solid #3a2f24; border-top: 3px solid var(--tc);
  background: linear-gradient(180deg, #1e1813, #14100c); box-shadow: 0 10px 24px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.6);
}
.tnode .tn-img { height: 92px; background-size: cover; background-position: center; border-bottom: 1px solid #2a2119; filter: saturate(.9) brightness(.9); }
.tnode .tn-head { padding: 9px 11px 4px; }
.tnode .tn-title { font-family: var(--display); font-size: 15px; letter-spacing: .02em; }
.tnode .tn-live { background: var(--tc); color: #140f08; }
.tnode .tn-body { font-size: 13px; color: #a39580; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tnode .chip { border-radius: 2px; font-size: 12px; background: #231c15; border-color: #3a2f24; }
.tnode .chip.obs { border-color: #6a5530; color: #f0d79a; }
.tnode .tn-foot {
  position: absolute; left: 0; right: 0; bottom: -14px; display: flex; justify-content: center; gap: 6px; border: 0; padding: 0;
  text-transform: none; letter-spacing: 0;
}
.tnode .tn-add, .tnode .tn-tog { position: static; height: 26px; min-width: 26px; border-radius: 13px; opacity: 1; background: #1c1610; border: 1px solid #4b3f31; color: #e8d8b8; padding: 0 8px; font-size: 13px; }
.tnode .tn-add { opacity: 0; }
.tnode:hover .tn-add, .tnode.selected .tn-add { opacity: 1; }
.tnode .tn-add:hover { background: #a8854a; color: #140f08; }
.tnode .tn-tog.closed { background: var(--tc); color: #140f08; border-color: var(--tc); }
.tnode:not(:hover) .tn-tog:not(.closed) { opacity: 1; }
.tnode .tn-acts { padding-bottom: 16px; }
.tnode:not(:has(.tn-acts)) { padding-bottom: 12px; }
.edge { stroke: #4a3c2e; }

/* material de OBS en cada escena */
.mat { display: flex; flex-direction: column; gap: 8px; }
.mat-row { background: #120f0c; border: 1px solid #2a2119; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.mat-h { display: flex; align-items: center; gap: 8px; }
.mat-h b { color: #ecd9a8; font-family: var(--display); }
.mat-h .btn { margin-left: auto; }
.mat-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #0b0908; border: 1px dashed #4b3f31; color: #a39580; cursor: pointer; text-align: left; }
.mat-file.set { border-style: solid; border-color: #6a5530; color: #f0e0bc; }
.mat-file:hover { border-color: #a8854a; }
.mf-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg.mini button { padding: 3px 10px; }
.mat-sum { background: #120f0c; border: 1px solid #2a2119; padding: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #d8c8a8; }
.mat-sum .btn { align-self: flex-start; margin-top: 6px; }

/* selector de archivos */
.fc { display: flex; flex-direction: column; gap: 12px; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 46vh; overflow: auto; }
.fc-item { background: #0d0b09; border: 1px solid #2a2119; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: #cbbd9f; }
.fc-item:hover { border-color: #a8854a; }
.fc-item img { width: 100%; height: 80px; object-fit: cover; }
.fc-ic { height: 80px; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.fc-n { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-path { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid #2a2119; padding-top: 10px; }

/* pestaña OBS */
.obs-off { text-align: center; padding: 30px 10px; color: #a39580; }
.obs-now { display: flex; align-items: center; gap: 8px; padding: 10px; background: #120f0c; border: 1px solid #2a2119; }
.obs-now b { font-family: var(--display); color: #f0dca8; }
.slot { padding: 8px 10px; margin-bottom: 6px; display: flex; flex-direction: column; gap: 4px; border: 1px solid #3a2f24; }
.slot-h { display: flex; align-items: center; gap: 6px; }
.slot-h b { font-family: var(--display); color: #f0dca8; }
.slot-v { font-size: 13px; color: #a39580; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .btn { align-self: flex-start; }
.scene { display: flex; align-items: center; gap: 6px; padding: 7px 6px; border-bottom: 1px solid #221b14; }
.scene.live .sc-n { color: #f0dca8; }
.sc-tog { background: none; border: 0; color: #7d6d55; cursor: pointer; width: 18px; }
.sc-n { font-family: var(--display); letter-spacing: .04em; cursor: pointer; }
.pill.live { background: #6a1f1f; border-color: #a03030; color: #fff; }
.src-list { padding: 2px 0 8px; }
.src { display: flex; align-items: center; gap: 6px; padding: 4px 6px; font-size: 13px; color: #cbbd9f; }
.src:hover { background: #15110d; }
.src.off { color: #6f6455; }
.eye { background: none; border: 0; cursor: pointer; width: 22px; color: #cbbd9f; font-size: 13px; }
.src.off .eye { color: #5a4f42; }
.src-n { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-v { flex: 1; font-size: 11px; color: #6f6455; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.pin { margin-left: auto; background: none; border: 1px solid transparent; border-radius: 3px; cursor: pointer; filter: grayscale(1) opacity(.45); }
.pin:hover { filter: none; border-color: #4b3f31; }
.pin.on { filter: none; cursor: default; }

/* --- tamaños grandes: panel del DM --- */
.dm-body { grid-template-columns: 380px 1fr 440px; }
@media (max-width: 1400px) { .dm-body { grid-template-columns: 340px 1fr 400px; } }
.dm-head { padding: 10px 16px; gap: 12px; }
.brand { font-size: 18px; } .brand .logo { width: 34px; height: 34px; }
.camp-name { font-size: 18px; width: 320px; }
.tab { font-size: 15px; padding: 14px 4px; }
.tab-body { padding: 14px; }
.sec { font-size: 15px; }
.pc-name { font-size: 18px; } .pc-cls { font-size: 14px; } .pc-row { font-size: 16px; } .pc-gold b { font-size: 19px; }
.pc-bag { font-size: 14px; }
.gold-amt { width: 76px; }
.li-name { font-size: 14px; } .li-meta { font-size: 13px; } .lib-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.give-chip { font-size: 15px; padding: 10px 12px; }
.mname { font-size: 15px; }
.toolbar { padding: 6px; gap: 6px; }
.zoom { font-size: 15px; min-width: 52px; }
.help { font-size: 15px; }
.tnode { width: 240px; }
.tnode .tn-title { font-size: 17px; }
.tnode .tn-body { font-size: 15px; }
.tnode .chip { font-size: 14px; padding: 4px 10px; }
.edge-label { font-size: 14px; padding: 3px 10px; }
.ins-type { font-size: 13px; }
.ins-title { font-size: 26px; }
.tabbtn { font-size: 16px; padding: 8px 14px; }
.ins-body { padding: 16px 18px 40px; }
.md { font-size: 18px; line-height: 1.6; }
.md h3, .md h4, .md h5 { font-size: 19px; }
.ins-sec { font-size: 15px; margin: 22px 0 10px; }
.act-btn { font-size: 16px; padding: 12px; } .act-btn .ai { font-size: 22px; }
.choice { padding: 12px 14px; font-size: 17px; } .ch-edge { font-size: 15px; }
.live { font-size: 15px; }
.back { font-size: 16px; }
.rolls-dock { width: 460px; } .dock-t { font-size: 17px; } .rc-row { font-size: 16px; } .rc-res b { font-size: 19px; } .rc-group { font-size: 15px; }
.trades-dock { width: 480px; }
.req-card { font-size: 16px; }
.ctx button { font-size: 16px; padding: 9px 12px; } .ctx { min-width: 240px; }
.mat-h b, .slot-h b { font-size: 16px; } .slot-v { font-size: 15px; }
.src { font-size: 15px; padding: 6px; } .src-v { font-size: 13px; } .eye { font-size: 15px; width: 26px; }
.sc-n { font-size: 16px; }
.obs-now { font-size: 16px; }
.mat-sum { font-size: 16px; }
.fc-n { font-size: 14px; }
.log-l { font-size: 15px; }
.rd-p { font-size: 16px; }
.obs-btn span:nth-child(2) { max-width: 260px; }
.tab { font-size: 14px; letter-spacing: .06em; }
.ov-tips ul { font-size: 16px; }
.ov-active .muted { font-size: 15px; }

/* --- conectar escenas --- */
.tnode .tn-link { position: static; height: 26px; min-width: 26px; border-radius: 13px; background: #1c1610; border: 1px solid #4b3f31; color: #e8d8b8; cursor: grab; font-size: 14px; opacity: 0; padding: 0 7px; }
.tnode:hover .tn-link, .tnode.selected .tn-link { opacity: 1; }
.tnode .tn-link:hover { background: #3a6a45; border-color: #7fd08a; color: #fff; }
.tree.linking, .tree.linking * { cursor: crosshair !important; }
.link-line { fill: none; stroke: #e0c070; stroke-width: 3; stroke-dasharray: 8 6; filter: drop-shadow(0 0 4px rgba(224,192,112,.6)); }
.tnode.link-src { box-shadow: 0 0 0 2px #e0c070, 0 0 24px rgba(224,192,112,.4); }
.tnode.link-ok { box-shadow: 0 0 0 3px #7fd08a, 0 0 28px rgba(127,208,138,.5) !important; }
.tnode.link-bad { box-shadow: 0 0 0 3px #d65050, 0 0 28px rgba(214,80,80,.45) !important; }
.tree.picking .tnode { cursor: copy; }
.tree.picking .tnode:hover { box-shadow: 0 0 0 3px #7fd08a, 0 0 28px rgba(127,208,138,.5); }
.pick-banner { left: 50%; top: 70px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: rgba(14,11,9,.97); border: 1px solid #7fd08a; color: #e8f5e8; font-family: var(--display); font-size: 17px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }

/* --- Bolsa de cada jugador (monedas) y equipo en su mochila --- */
.pc-purse { gap: 8px; }
.coin-pick { display: flex; gap: 3px; flex-wrap: wrap; }
.coin-pick-b { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px 1px 1px; background: #0d0b09; border: 1px solid #2c251e; color: #cbbd9f; cursor: pointer; font-size: 13px; }
.coin-pick-b img { width: 22px; height: 22px; object-fit: contain; }
.coin-pick-b.on { border-color: #c09a55; background: #1c160f; color: #fff0cf; }
.dm-inv-body { display: flex; gap: 18px; align-items: flex-start; }
.doll-wrap.dm { transform: scale(.82); transform-origin: top left; margin: 0 -54px -82px 0; }
.give-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; }

/* --- Tiradas de los jugadores: fichas que le saltan al DM --- */
.roll-stack { position: fixed; right: 18px; top: 70px; z-index: 1500; width: 340px; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.roll-card { pointer-events: auto; cursor: pointer; padding: 10px 12px 8px; background: linear-gradient(180deg, #1c1712, #0f0c09);
  border: 1px solid #5a4a36; border-left: 4px solid var(--pc); box-shadow: 0 14px 36px rgba(0,0,0,.75); animation: rcIn .35s ease-out;
  transition: opacity .3s, transform .3s; }
.roll-card.out { opacity: 0; transform: translateX(40px); }
.rc-head { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #e9d3a0; margin-bottom: 4px; }
.rc-head b { font-family: var(--display); font-size: 16px; }
.rc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 8px var(--pc); }
.rc-what { color: #8c7b60; font-size: 13px; }
.rc-body .rf { padding: 2px 0; }
.rc-body .rf-total { font-size: 44px; }
.rc-body .rf.big .rf-total { font-size: 54px; }
.rc-coin { display: flex; align-items: center; gap: 14px; }
.rc-coin img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.8)); }
.rc-coin small { display: block; color: #a99670; font-size: 13px; }
.rc-coin b { font-family: var(--display); font-weight: 900; font-size: 34px; letter-spacing: .14em; color: #ffd75a; text-transform: uppercase; }
@keyframes rcIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

/* --- Cabecera de una tienda (fondo, emblema, nombre, tipo y botones) --- */
.shop-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 10px 12px;
  background-size: cover; background-position: center 40%; border: 1px solid #5a4a36; box-shadow: inset 0 0 30px rgba(0,0,0,.6); }
.shop-head-emb { width: 64px; height: 64px; object-fit: contain; grid-row: 1 / span 2; filter: drop-shadow(0 0 8px rgba(0,0,0,.9)); }
.shop-head-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.shop-head-name { background: none; border: 0; padding: 0; text-align: left; cursor: text; font-family: var(--display); font-weight: 900; font-size: 20px; color: #ffe8b4;
  text-shadow: 0 2px 6px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-head-kind .sel { width: 180px; }
.shop-head-live { display: inline-flex; align-items: center; gap: 6px; color: #8fe08a; font-size: 12px; }
.shop-head-live img { width: 18px; height: 18px; }
.shop-head-btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.shop-head-btns .emo-ic { width: 18px; height: 18px; }
/* --- Ventana de comercio del DM: catálogo / alijo / tiendas a la izquierda, el trato a la derecha --- */
.modal.trade-modal { width: min(1240px, 96vw); max-width: none; }
.tm { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr); gap: 18px; align-items: start; }
.tm-browser { max-height: 72vh; overflow: auto; padding-right: 6px; }
.tm-h { font-family: var(--display); font-size: 15px; color: #e9d3a0; margin-bottom: 6px; display: flex; align-items: baseline; gap: 10px; }
.tm-h small { font-family: var(--font); font-size: 12px; color: #7d6d55; }
.tm-trade { position: sticky; top: 0; }
.tr-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: rgba(0,0,0,.3); border: 1px solid #2c251e; }
.tr-row-n { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); color: #ecd3a0; }
.modal.ib-modal { width: min(980px, 94vw); max-width: none; }
.modal.ib-modal .ib-grid { max-height: 62vh; overflow: auto; }
@media (max-width: 900px) { .tm { grid-template-columns: 1fr; } }
/* --- Tirada privada del DM: una mesa con dados 3D --- */
.priv-roll { position: fixed; left: 50%; bottom: 20px; translate: -50% 0; z-index: 1400; width: min(520px, 94vw); padding: 12px 14px 12px;
  background: linear-gradient(180deg, #1c1712, #0d0a08); border: 1px solid #6b5a40; box-shadow: 0 20px 60px rgba(0,0,0,.8); animation: rcIn .3s ease-out; }
.priv-roll.flash { box-shadow: 0 0 0 2px #c9a45a, 0 20px 60px rgba(0,0,0,.8); }
.pr-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pr-h img { width: 26px; height: 26px; }
.pr-h b { font-family: var(--display); font-size: 17px; color: #ffe8b4; letter-spacing: .06em; }
.pr-h small { color: #7d6d55; }
.pr-dice { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 8px; }
.pr-dice .die-slot { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0a0908;
  border: 1px solid #2c251e; color: #7d6d55; cursor: pointer; padding: 4px; }
.pr-dice .die-slot:hover { border-color: #6b5a40; color: #cbb68c; }
.pr-dice .die-slot.on { border-color: #b8862e; color: #f0e0bc; box-shadow: inset 0 0 12px rgba(184,134,46,.35); }
.pr-dice .die-svg { width: 60%; height: 60%; }
.pr-dice .die-l { font-family: var(--display); font-size: 11px; font-weight: 700; }
.pr-dice .cnt { position: absolute; top: 2px; right: 4px; font-size: 12px; color: #f0c868; }
.pr-tray { position: relative; width: 100%; aspect-ratio: 5 / 3; background: radial-gradient(ellipse at 50% 45%, rgba(70,52,36,.35), transparent 70%), linear-gradient(180deg, #17120e, #0d0a08);
  box-shadow: inset 0 0 50px rgba(0,0,0,.95), inset 0 0 0 1px #2c251e; }
.pr-tray .tray { width: 100%; height: 100%; display: block; cursor: grab; }
.pr-tray .tray-res { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 2; }
.pr-tray .tray-res.show { background: radial-gradient(ellipse at 50% 50%, rgba(8,6,4,.86) 0%, rgba(8,6,4,.6) 55%, rgba(8,6,4,.2) 100%); animation: rfFade .35s ease-out; }
.pr-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #a99670; font-size: 13px; }
.pr-mod { width: 54px; }
.rf-chip.mod { clip-path: none; border-radius: 50%; background: linear-gradient(160deg, #2a3a46, #10161c); color: #bfe0ff; }
.pr-open .emo-ic { width: 18px; height: 18px; }
@keyframes rfFade { from { opacity: 0; } to { opacity: 1; } }

/* --- «Pedir tirada»: cuadrícula con iconos, dificultad de un clic y jugadores como tarjetas --- */
.modal.rq-modal { width: min(1120px, 96vw); max-width: none; }
.rq { display: flex; flex-direction: column; gap: 12px; }
.rq-sec { min-width: 0; }
.rq-h { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: #8c7b60; border-bottom: 1px solid #2c251e; padding-bottom: 4px; margin-bottom: 7px; }
.rq-grid { display: grid; gap: 5px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.rq-grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rq-grid.skills { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.rq-c { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 8px;
  padding: 5px 10px 5px 4px; min-height: 44px; text-align: left; cursor: pointer; background: #0c0a09; border: 1px solid #241e18; color: #cbbd9f;
  transition: border-color .12s, background .12s, box-shadow .12s; }
.rq-c img { grid-row: 1 / span 2; width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.9)); }
.rq-c span { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-c small { font-size: 11px; color: #7d6d55; }
.rq-c:hover { border-color: #6b5a40; color: #f0e0bc; }
.rq-c.on { border-color: #c9a45a; background: linear-gradient(90deg, #2a2016, #120e0a); color: #fff3d6; box-shadow: 0 0 12px rgba(220,170,80,.3); }
.rq-c.on small { color: #c9a24f; }
.rq-grid.six .rq-c { grid-template-columns: 1fr; grid-template-rows: auto; justify-items: center; text-align: center; padding: 8px 4px; }
.rq-grid.six .rq-c img { grid-row: auto; width: 46px; height: 46px; }
.rq-row2 { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
.rq-free { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rq-dice { display: flex; gap: 4px; }
.rq-die { width: 50px; height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: #0a0908;
  border: 1px solid #2c251e; color: #7d6d55; cursor: pointer; }
.rq-die .rq-die-svg { width: 24px; height: 24px; display: block; }
.rq-die .rq-die-svg svg { width: 100%; height: 100%; }
.rq-die b { font-family: var(--display); font-size: 11px; }
.rq-die:hover { border-color: #6b5a40; color: #cbb68c; }
.rq-die.on { border-color: #c9a45a; color: #fff0cf; box-shadow: inset 0 0 12px rgba(201,164,90,.35); }
.rq-count { display: inline-flex; align-items: center; gap: 6px; color: #a99670; font-size: 13px; }
.rq-count .num-step { width: 104px; }
.rq-dcrow { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.rq-dcs { display: flex; gap: 4px; flex-wrap: wrap; }
.rq-dcb { min-width: 74px; padding: 5px 8px; display: flex; flex-direction: column; align-items: center; background: #0c0a09; border: 1px solid #2c251e; color: #cbbd9f; cursor: pointer; }
.rq-dcb b { font-family: var(--display); font-size: 22px; line-height: 1; color: #f0dfb8; }
.rq-dcb small { font-size: 11px; color: #7d6d55; }
.rq-dcb:hover { border-color: #6b5a40; }
.rq-dcb.on { border-color: #c9a45a; background: linear-gradient(180deg, #2a2016, #120e0a); box-shadow: 0 0 12px rgba(220,170,80,.3); }
.rq-dcb.on b { color: #ffd75a; }
.rq-dcman { display: inline-flex; align-items: center; gap: 6px; color: #a99670; font-size: 13px; }
.rq-dcman .num-step { width: 110px; }
.rq-opts { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.rq-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.rq-p { display: flex; flex-direction: column; gap: 5px; padding: 8px 10px; background: #0c0a09; border: 1px solid #241e18; border-left: 4px solid #3a3026; cursor: pointer; opacity: .6;
  transition: opacity .12s, border-color .12s; }
.rq-p.on { opacity: 1; border-color: #5a4a36; border-left-color: var(--pc); background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 10%, #120e0a), #0c0a09); }
.rq-p-top { display: flex; align-items: center; gap: 7px; font-size: 15px; color: #f0e0bc; }
.rq-p-top b { font-family: var(--display); }
.rq-tick { width: 18px; height: 18px; display: inline-grid; place-content: center; border: 1px solid #6b5a40; color: #ffd75a; font-size: 12px; }
.rq-p-sub { font-size: 12px; color: #7d6d55; }
.rq-adv { display: flex; gap: 2px; }
.rq-adv button { flex: 1; padding: 3px 4px; font-size: 12px; background: #0a0908; border: 1px solid #2c251e; color: #8c7b60; cursor: pointer; }
.rq-adv button.on.adv-adv { border-color: #6fbf6a; color: #bff0b8; background: #13200f; }
.rq-adv button.on.adv-dis { border-color: #c0503a; color: #ffb4a8; background: #241010; }
.rq-adv button.on.adv-none { border-color: #6b5a40; color: #f0e0bc; }
.rq-bonus { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #8c7b60; }
.rq-bonus .num-step { width: 100px; }
.rq-title { max-width: 520px; }
.rq-sum { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; padding: 8px 12px; border: 1px solid #3a3026; background: rgba(0,0,0,.35); }
.rq-sum-what { font-family: var(--display); font-weight: 900; font-size: 22px; color: #ffe8b4; }
.rq-sum-dc { font-family: var(--display); font-size: 16px; color: #ffd75a; padding: 1px 10px; border: 1px solid #6b5a40; }
@media (max-width: 900px) { .rq-grid.six { grid-template-columns: repeat(3, 1fr); } .rq-row2 { grid-template-columns: 1fr; } }

.pc-bag.gone { color: #ff8f80; font-style: italic; }

/* fichas de las tiradas de los jugadores: pequeñas, abajo a la izquierda del lienzo */
.tree-ui.roll-stack { position: absolute; left: 12px; bottom: 12px; right: auto; top: auto; width: 230px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; z-index: 12; pointer-events: none; }
.roll-stack .roll-card { padding: 5px 8px 4px; border-left-width: 3px; box-shadow: 0 6px 18px rgba(0,0,0,.6); }
.roll-stack .rc-head { font-size: 12px; gap: 6px; margin-bottom: 0; }
.roll-stack .rc-head b { font-size: 13px; }
.roll-stack .rc-what { font-size: 11px; }
.roll-stack .rc-dot { width: 8px; height: 8px; }
.roll-stack .rc-body { zoom: .6; }
.roll-stack .rc-coin img { width: 52px; height: 52px; }

/* --- Tiradas de los jugadores: botón «Limpiar» debajo de las fichas --- */
.roll-stack.empty { display: none; }
.roll-stack .rs-cards { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.roll-stack .rs-clear { pointer-events: auto; align-self: flex-start; font-size: 11px; padding: 2px 10px; opacity: .8; }
.roll-stack .rs-clear:hover { opacity: 1; }
.mute-rolls.on { border-color: #c0503a; color: #ffb4a8; background: #241010; }
.mute-rolls .emo-ic { opacity: .85; }

/* --- estados, robos y regateo --- */
.pc-conds { gap: 4px; align-items: center; }
.cond-badge { width: 22px; height: 22px; object-fit: contain; filter: drop-shadow(0 0 3px rgba(220,80,60,.5)); }
.cond-txt { font-size: 11px; color: #ff8f80; }
.rq-p-top .cond-badge { width: 18px; height: 18px; }
.modal.cond-modal { width: min(900px, 96vw); max-width: none; }
.cond-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.cond-opt { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 6px 8px;
  background: #0c0a09; border: 1px solid #241e18; color: #cbbd9f; cursor: pointer; opacity: .75; }
.cond-opt img { grid-row: 1 / span 2; width: 44px; height: 44px; object-fit: contain; }
.cond-opt b { font-family: var(--display); font-size: 15px; color: #f0e0bc; }
.cond-opt small { font-size: 11px; line-height: 1.3; color: #7d6d55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cond-opt:hover { border-color: #6b5a40; opacity: 1; }
.cond-opt.on { opacity: 1; border-color: #c0503a; background: linear-gradient(90deg, #2a1410, #0c0a09); box-shadow: 0 0 12px rgba(220,80,60,.25); }
.cond-opt.stealth.on { border-color: #3fa89a; background: linear-gradient(90deg, #0f2421, #0c0a09); box-shadow: 0 0 12px rgba(60,180,160,.25); }
.pc-basket { gap: 6px; align-items: center; }
.pc-basket b { color: #f0dfb8; font-weight: 600; }
.theft { display: grid; grid-template-columns: 34px 1fr; gap: 4px 8px; align-items: center; margin: 6px 8px; padding: 6px 8px;
  border: 1px solid #7a3326; background: linear-gradient(90deg, rgba(60,18,12,.85), rgba(16,12,9,.9)); animation: pop .2s; }
.th-ic { width: 34px; height: 34px; object-fit: contain; grid-row: 1 / span 2; }
.th-txt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.th-txt b { font-family: var(--display); color: #ffd2c4; }
.th-txt small { color: #a99670; }
.th-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #8fe0d2; border: 1px solid #2f6f66; padding: 0 6px; }
.th-tag img { width: 14px; height: 14px; }
.th-res { font-size: 12px; color: #cbbd9f; }
.th-res.ok { color: #8fe08a; } .th-res.ko { color: #ff8f80; }
.th-btns { grid-column: 2; display: flex; gap: 4px; flex-wrap: wrap; }
.tm-rolls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tm-roll { font-size: 13px; color: #a99670; padding: 2px 8px; border: 1px solid #2c251e; }
.tm-roll b { font-family: var(--display); color: #f0dfb8; }
.tm-roll.ok { border-color: #3f6a45; } .tm-roll.ok b { color: #8fe08a; }
.tm-roll.ko { border-color: #7a3326; } .tm-roll.ko b { color: #ff8f80; }

.modal.td-modal { width: min(620px, 96vw); max-width: none; }
.td { display: flex; flex-direction: column; gap: 10px; }
.td-head { display: flex; gap: 12px; align-items: center; }
.td-head > img { width: 56px; height: 56px; object-fit: contain; }
.td-head b { display: block; font-family: var(--display); font-size: 20px; color: #ffd2c4; }
.td-head small { color: #a99670; }
.td-conds { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.td-cond { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #ff8f80; border: 1px solid #5a2a22; padding: 1px 6px 1px 2px; }
.td-cond.stealth { color: #8fe0d2; border-color: #2f6f66; }
.td-adv button { padding: 8px; font-size: 14px; }

.rq-cond-hint { font-size: 12px; color: #ffb4a8; line-height: 1.3; }
.cond-opt.exh { cursor: default; }
.exh-btns { grid-column: 2; display: flex; gap: 4px; margin-top: 4px; }
.exh-badge { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: #ff8f80; }
.exh-badge img { width: 20px; height: 20px; object-fit: contain; }

.pc-res { gap: 6px; align-items: center; flex-wrap: wrap; }

.pc-hp { gap: 6px; align-items: center; }
.use-box { margin-top: 8px; padding-top: 6px; border-top: 1px solid #2c251e; display: flex; flex-direction: column; gap: 6px; }
.use-conds { display: flex; flex-wrap: wrap; gap: 4px; }
.use-cond { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; font-size: 12px; background: #0c0a09; border: 1px solid #241e18; color: #a99670; cursor: pointer; }
.use-cond img { width: 20px; height: 20px; object-fit: contain; }
.use-cond.on { border-color: #c9a45a; color: #fff0cf; background: #1c160f; }

.hd-chip em { font-style: normal; font-size: 10px; color: #c8a35e; margin-right: 3px; }
.pc-hp .ac-badge { margin-right: 6px; }
.pr-h .dice-gear { margin-right: 4px; }

/* tarjetas de jugador: nada se sale de su fila */
.pcard { min-width: 0; overflow: hidden; }
.pc-row { flex-wrap: wrap; min-width: 0; row-gap: 5px; }
.pc-h { min-width: 0; }
.pc-id { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.pc-id .pc-name, .pc-id .pc-cls { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-hp { flex-wrap: nowrap; }
.pc-hp .hpb { flex: 1; min-width: 0; }
.pc-hp .hpb-txt { white-space: nowrap; }
.pc-acts { flex-wrap: nowrap; gap: 5px; }
.pc-acts > .btn { flex: 1 1 0; min-width: 0; padding-left: 4px; padding-right: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-res .pw-strip { flex-wrap: wrap; min-width: 0; }
.pc-purse .coin-pick { min-width: 0; }
.pc-btns > .btn { flex: 1 1 auto; }
.tab-top { flex-wrap: wrap; row-gap: 6px; }
.tab-rest { gap: 6px; margin: -2px 0 8px; padding: 6px 8px; border: 1px solid #2a2119; background: #0f0c0a; }

/* riesgo de la tirada */
.rq-risks { display: flex; flex-wrap: wrap; gap: 5px; }
.rq-risk { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; background: #0d0b09; border: 1px solid #2c251e; color: #cbbd9f; cursor: pointer; font-size: 13px; }
.rq-risk img { width: 22px; height: 22px; object-fit: contain; }
.rq-risk:hover { border-color: #6b5a40; }
.rq-risk.on { border-color: #b98ad0; background: #1c1420; color: #f3e2ff; box-shadow: 0 0 10px rgba(185,138,208,.25); }
.rq-trait-hint { font-size: 12px; color: #9fd08a; margin-top: 3px; }
.rc-luck { display: inline-flex; align-items: center; gap: 3px; color: #9fd08a; font-size: 12px; }
.rc-luck img { width: 16px; height: 16px; object-fit: contain; }

.gem-painter { padding: 8px 10px; margin: 6px 0; border: 1px solid #5a3a2a; background: #170f0b; font-size: 13px; color: #cbbd9f; }
.gem-painter b { color: #e09a7a; }
.gem-painter.on { border-color: #3f5a33; background: #0f150c; }
.gem-painter.on b { color: #9fd08a; }

/* la cara del jugador en su tarjeta */
.pc-face { position: relative; flex: none; width: 48px; height: 48px; border: 2px solid; border-radius: 3px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 38%, #3a2d1f, #0d0a07 75%) center / cover no-repeat; box-shadow: 0 2px 6px rgba(0,0,0,.6), inset 0 0 8px rgba(0,0,0,.6); }
.pc-face.has { background-size: cover, cover; background-position: center, center; }
.pc-face-l { font-family: var(--display, Cinzel, Georgia, serif); font-size: 20px; color: #e8cf98; text-shadow: 0 1px 2px #000; }
.pc-face.has .pc-face-l { display: none; }
.pc-face .pc-dot { position: absolute; right: -4px; bottom: -4px; width: 10px; height: 10px; border: 2px solid #120f0c; }
.pc-h { gap: 10px; }

/* ficha del personaje (DM) */
.sheet2 { display: flex; flex-direction: column; gap: 10px; }
.sh-head { display: flex; align-items: center; gap: 16px; padding: 10px 12px; background: linear-gradient(90deg, rgba(200,163,94,.08), transparent 70%); border: 1px solid #2a2119; }
.sh-face { flex: none; width: 84px; height: 84px; border: 2px solid #c8a35e; border-radius: 4px; display: grid; place-items: center; background: radial-gradient(circle at 50% 38%, #3a2d1f, #0d0a07 75%) center / cover no-repeat; box-shadow: 0 4px 12px rgba(0,0,0,.6); }
.sh-face.has { background-size: cover, cover; }
.sh-face span { font-family: var(--display); font-size: 34px; color: #e8cf98; }
.sh-face.has span { display: none; }
.sh-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sh-name { font-family: var(--display); font-size: 22px; font-weight: 700; padding: 5px 10px; }
.sh-who { color: #a99670; font-size: 13px; }
.sh-cols { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-col { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #120f0c; box-shadow: 0 0 0 1px #3a3128; cursor: pointer; padding: 0; }
.sh-col:hover { box-shadow: 0 0 0 1px #c8a35e; }
.sh-col.on { box-shadow: 0 0 0 2px #f0d79a, 0 0 8px rgba(240,215,154,.5); }
.sh-sec { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; font-family: var(--display); color: #e0b860; font-size: 14px; letter-spacing: .05em; border-bottom: 1px solid #2a2119; padding-bottom: 3px; }
.sh-sec small { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font); color: #7d6f58; font-size: 11px; letter-spacing: 0; text-transform: none; }
.sh-game { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sh-num { display: flex; flex-direction: column; gap: 5px; padding: 8px 10px; background: #0f0c0a; border: 1px solid #2a2119; color: #a99670; font-size: 12px; }
.sh-num .inp { width: 100%; text-align: center; }
.sh-bag-in { display: flex; align-items: center; gap: 6px; }
.sh-bag-in b { color: #7d6f58; }
.sh-abs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.sh-ab { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 6px; background: #0f0c0a; border: 1px solid #2a2119; }
.sh-ab-h { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sh-ab-h img { width: 30px; height: 30px; object-fit: contain; }
.sh-ab-h b { font-size: 12px; color: #e0b860; font-family: var(--display); letter-spacing: .03em; }
.sh-ab-score { width: 100%; text-align: center; font-size: 17px; font-weight: 700; }
.sh-ab-mod { font-family: var(--display); font-size: 20px; color: #f3e2b8; line-height: 1; }
.sh-save { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 3px 7px; background: #120e0b; border: 1px solid #2f2820; color: #7d6f58; cursor: pointer; font-size: 11px; }
.sh-save b { color: #a99670; font-size: 13px; }
.sh-save:hover { border-color: #6b5a40; }
.sh-save.on { border-color: #c8a35e; background: #1f180f; color: #f0d79a; box-shadow: inset 0 0 8px rgba(200,163,94,.2); }
.sh-save.on b { color: #ffe8b0; }
.sh-skills { column-count: 3; column-gap: 8px; }
.sh-skg { display: flex; flex-direction: column; gap: 3px; padding: 6px; margin-bottom: 8px; background: #0f0c0a; border: 1px solid #2a2119; break-inside: avoid; }
.sh-skg-h { display: flex; align-items: center; gap: 6px; color: #e0b860; font-family: var(--display); font-size: 12px; padding: 0 2px 3px; border-bottom: 1px solid #241d16; }
.sh-skg-h img { width: 18px; height: 18px; object-fit: contain; }
.sh-sk { display: flex; align-items: center; gap: 7px; padding: 4px 6px; background: none; border: 1px solid transparent; color: #b9a988; cursor: pointer; text-align: left; font-size: 13px; }
.sh-sk:hover { border-color: #3a3128; background: #15110d; }
.sh-sk img { width: 20px; height: 20px; object-fit: contain; opacity: .8; }
.sh-sk-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-sk b { min-width: 26px; text-align: right; color: #d8c69c; }
.sh-sk.l1, .sh-sk.l2 { color: #f0e2c0; }
.sh-sk.l1 b, .sh-sk.l2 b { color: #ffe8b0; }
.sh-mark { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #6b5a40; }
.sh-sk.l1 .sh-mark, .sh-mark.l1 { background: #c8a35e; border-color: #c8a35e; }
.sh-sk.l2 .sh-mark, .sh-mark.l2 { background: #ffe08a; border-color: #ffe08a; border-radius: 1px; transform: rotate(45deg) scale(.9); box-shadow: 0 0 6px rgba(255,224,138,.6); }
.sh-sec small .sh-mark { margin-left: 6px; }
.sh-notes { width: 100%; resize: vertical; }
@media (max-width: 760px) { .sh-abs { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sh-game { grid-template-columns: minmax(0, 1fr); } .sh-skills { column-count: 1; } }

/* --- Palabras clave y fichas del glosario (las mismas que ven los jugadores) --- */
.gl { text-decoration: underline dotted rgba(214,180,110,.75); text-underline-offset: 3px; text-decoration-thickness: 1.5px; cursor: help; }
.gl:hover { color: #ffe3a6; text-decoration-color: #ffd27a; }
.gl.gl-box { text-decoration: none; cursor: pointer; }
.gl.gl-box:hover { color: inherit; }
.gl-panel { position: fixed; z-index: 10000; max-width: 380px; padding: 12px 15px 13px; background: linear-gradient(180deg, #1d1813, #110e0b); border: 1px solid #7a6240; box-shadow: 0 10px 34px rgba(0,0,0,.75), inset 0 0 0 1px rgba(0,0,0,.6); color: #ddd0b4; font-size: 15px; line-height: 1.45; }
.gl-panel .gl-h { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 17px; color: #f3dfae; margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid #3a2f22; }
.gl-panel .gl-h img { width: 30px; height: 30px; object-fit: contain; }
.gl-panel .gl-b { white-space: pre-line; }
.gl-panel .gl { color: #f6d58f; }

/* --- Acción «Pedir tirada» del árbol: lo que se ajusta es lo que se pide --- */
.ra { display: flex; flex-direction: column; gap: 12px; }
.ra-h { display: flex; align-items: baseline; gap: 6px; font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: #8c7b60; border-bottom: 1px solid #2c251e; padding-bottom: 3px; margin-bottom: 6px; }
.ra-h small { font-family: var(--font); letter-spacing: 0; text-transform: none; font-weight: 400; color: #6d5f4a; }
.ra-kinds { display: grid; grid-template-columns: 1.4fr 1.1fr 1.1fr 1fr .8fr; gap: 2px; margin-bottom: 6px; }
.ra-kind { padding: 6px 1px; font-size: 11.5px; font-weight: 600; background: #0c0a09; border: 1px solid #2c251e; color: #9c8b6c; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-kind.on { border-color: #c9a45a; color: #fff3d6; background: linear-gradient(180deg, #2a2016, #120e0a); box-shadow: 0 0 10px rgba(220,170,80,.25); }
.ra-grid { display: grid; gap: 3px; }
.ra-grid.ab { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ra-grid.sk { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ra-c { display: flex; align-items: center; gap: 6px; padding: 3px 6px 3px 3px; min-width: 0; background: #0c0a09; border: 1px solid #241e18; color: #cbbd9f; cursor: pointer; text-align: left; font-size: 12.5px; }
.ra-c img { width: 26px; height: 26px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 2px 3px rgba(0,0,0,.9)); }
.ra-c span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ra-c small { font-size: 10px; color: #6d5f4a; letter-spacing: .05em; }
.ra-grid.ab .ra-c { flex-direction: column; gap: 3px; padding: 7px 2px 5px; text-align: center; }
.ra-grid.ab .ra-c img { width: 38px; height: 38px; }
.ra-grid.ab .ra-c span { flex: none; max-width: 100%; }
.ra-c.on { border-color: #c9a45a; background: linear-gradient(90deg, #2a2016, #120e0a); color: #fff3d6; box-shadow: 0 0 10px rgba(220,170,80,.25); }
.ra-c.on small { color: #c9a24f; }
.ra-c:hover, .ra-kind:hover, .ra-dc:hover, .ra-die:hover, .ra-risk:hover, .ra-seg button:hover, .ra-pc:hover { border-color: #6b5a40; color: #f0e0bc; }
.ra-dice { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; }
.ra-die { width: 40px; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: #0a0908; border: 1px solid #2c251e; color: #7d6d55; cursor: pointer; }
.ra-die .ra-die-svg { width: 22px; height: 22px; display: block; }
.ra-die .ra-die-svg svg { width: 100%; height: 100%; }
.ra-die b { font-family: var(--display); font-size: 11px; }
.ra-die.on { border-color: #c9a45a; color: #fff0cf; box-shadow: inset 0 0 12px rgba(201,164,90,.35); }
.ra-count, .ra-other { display: inline-flex; align-items: center; gap: 6px; color: #a99670; font-size: 12.5px; }
.ra-count .num-step, .ra-other .num-step { width: 100px; }
.ra-other { margin-top: 5px; }
.ra-dcs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.ra-dc { display: flex; flex-direction: column; align-items: center; padding: 4px 1px 3px; background: #0c0a09; border: 1px solid #2c251e; color: #cbbd9f; cursor: pointer; min-width: 0; }
.ra-dc b { font-family: var(--display); font-size: 19px; line-height: 1; color: #f0dfb8; }
.ra-dc small { font-size: 10px; color: #7d6d55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ra-dc.on { border-color: #c9a45a; background: linear-gradient(180deg, #2a2016, #120e0a); box-shadow: 0 0 10px rgba(220,170,80,.3); }
.ra-dc.on b { color: #ffd75a; }
.ra-opts { display: flex; flex-direction: column; gap: 5px; margin-top: 7px; font-size: 12.5px; color: #b9a988; }
.ra-opts .chk { font-size: 12.5px; }
.ra-risks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; }
.ra-risk { aspect-ratio: 1; padding: 3px; background: #0c0a09; border: 1px solid #2c251e; cursor: pointer; display: grid; place-items: center; color: #8c7b60; font-size: 10px; min-width: 0; }
.ra-risk img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 2px #000); }
.ra-risk.on { border-color: #c0503a; background: #241010; box-shadow: 0 0 8px rgba(220,80,60,.35); color: #ffb4a8; }
.ra-risk-name { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-family: var(--display); font-size: 14px; color: #ffb4a8; }
.ra-risk-name img { width: 22px; height: 22px; object-fit: contain; }
.ra-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; }
.ra-seg.mt { margin-top: 6px; }
.ra-seg button { padding: 6px 4px; font-size: 12px; font-weight: 600; background: #0c0a09; border: 1px solid #2c251e; color: #9c8b6c; cursor: pointer; }
.ra-seg button.on { border-color: #c9a45a; color: #fff3d6; background: linear-gradient(180deg, #2a2016, #120e0a); }
.ra-seg button.on.adv { border-color: #6fbf6a; color: #bff0b8; background: #13200f; }
.ra-seg button.on.dis { border-color: #c0503a; color: #ffb4a8; background: #241010; }
.ra-pcs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.ra-pc { padding: 3px 9px; border: 1px solid #2c251e; border-left: 3px solid var(--pc); background: #0c0a09; color: #8c7b60; cursor: pointer; font-size: 12.5px; }
.ra-pc.on { color: #f0e0bc; border-color: #5a4a36; border-left-color: var(--pc); background: color-mix(in srgb, var(--pc) 16%, #0c0a09); }
.ra-title { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #8c7b60; }
.ra-sum { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid #5a4a36; background: linear-gradient(90deg, rgba(201,164,90,.13), rgba(0,0,0,.3)); }
.ra-sum img { width: 40px; height: 40px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 2px 3px #000); }
.ra-sum-h { font-family: var(--display); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: #c9a24f; margin-bottom: 2px; }
.ra-sum-t { font-size: 13.5px; color: #f0e0bc; line-height: 1.4; }
/* el botón de la escena enseña qué pide */
.act-btn.roll img.ai { width: 30px; height: 30px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 2px 3px #000); }
.act-btn.roll .al small { display: block; margin-top: 2px; font-family: var(--font); font-weight: 400; font-size: 11px; letter-spacing: 0; color: var(--muted); }

/* --- Efectos activos en la tarjeta del jugador --- */
.pc-fx { align-items: flex-start; }
.pc-fx > .small { padding-top: 6px; }
.pc-fx .fx-list { flex: 1; }

/* --- Cerca del grupo: PNJ junto al grupo fuera de combate (ventana flotante) y los PNJ de cada escena --- */
.near-head-btn img { width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; }
.near-head-btn .near-n { margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #3a2b18; color: #f0c868; font-size: 12px; line-height: 18px; display: inline-block; text-align: center; }
.near-head-btn .near-n:empty { display: none; }
.near-head-btn.pend { border-color: #c9a35e; box-shadow: 0 0 12px rgba(240,200,104,.35); }
.nr-win { position: fixed; right: 18px; top: 70px; z-index: 950; width: 440px; max-height: calc(100vh - 90px); display: none; flex-direction: column;
  background: linear-gradient(180deg, #1b1611, #0e0b08); border: 1px solid #6b5a40; box-shadow: 0 16px 48px rgba(0,0,0,.85), inset 0 0 0 1px rgba(200,163,94,.08); color: #ddd0b4; }
.nr-win.show { display: flex; animation: pop .14s; }
.nr-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 9px 10px 9px 12px; border-bottom: 1px solid #3a2e21; background: linear-gradient(rgba(212,166,74,.08), transparent); cursor: grab; user-select: none; }
.nr-hic { width: 30px; height: 30px; filter: drop-shadow(0 2px 4px #000); }
.nr-ht { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nr-ht b { font-family: var(--display); font-size: 17px; color: #f0dcae; letter-spacing: .03em; }
.nr-ht small { color: #9c8a6c; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-hb { flex-basis: 100%; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.nr-close, .nr-x { background: none; border: 1px solid transparent; color: #a99670; font-size: 20px; line-height: 1; width: 28px; height: 28px; cursor: pointer; flex: none; }
.nr-close:hover, .nr-x:hover { color: #f3c0a0; border-color: #6a3a2a; background: #1e0f0b; }
.nr-list { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; scrollbar-color: #4a3a28 transparent; }
.nr-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px; text-align: center; color: #a99670; }
.nr-empty img { width: 48px; height: 48px; opacity: .45; }
.nr-empty p { margin: 0; }
.nr-gone { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; font-size: 13px; color: #a99670; border: 1px dashed #3a3024; }
.nr-card { display: flex; flex-direction: column; gap: 6px; padding: 7px 8px; background: linear-gradient(90deg, #15100c, #0f0c09); border: 1px solid #2a2119; }
.nr-card.hostile { border-left: 3px solid #a0402e; }
.nr-card.fight { opacity: .72; }
.nr-card.pend { border-color: #c9a35e; }
.nr-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.nr-tok { width: 30px; height: 30px; border-radius: 50%; background: #3a1a14 center / cover no-repeat; border: 2px solid #6b5a40; box-shadow: 0 2px 5px #000;
  display: inline-grid; place-items: center; flex: none; }
.nr-tok b { font-family: var(--display); font-size: 14px; color: #f0dcae; }
.nr-tok.big { width: 50px; height: 50px; }
.nr-tok.big b { font-size: 21px; }
.nr-tok.huge { width: 92px; height: 92px; border-width: 3px; }
.nr-tok.huge b { font-size: 36px; }
.nr-card.hostile .nr-tok, .nr-srow.hostile .nr-tok, .nr-sum-c.hostile .nr-tok { border-color: #a0402e; box-shadow: 0 0 8px rgba(200,70,50,.4), 0 2px 5px #000; }
.nr-mid { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.nr-name { background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.nr-id { display: flex; flex-direction: column; min-width: 0; }
.nr-id b { font-family: var(--display); font-size: 16px; color: #f0e2c2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-name:hover .nr-id b { color: #ffd98a; }
.nr-id small { color: #9c8a6c; font-size: 12px; }
.nr-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nr-dist { display: inline-flex; align-items: center; border: 1px solid #3a2f24; background: #0b0907; }
.nr-dist button { width: 24px; height: 26px; background: #15110d; border: 0; color: #e8d3a6; font-size: 16px; cursor: pointer; }
.nr-dist button:hover { background: #2a2016; color: #ffd98a; }
.nr-dist > span { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 0 4px; line-height: 1.05; }
.nr-dist b { font-size: 13px; color: #f0dcae; }
.nr-dist small { font-size: 10px; color: #8c7b60; letter-spacing: .04em; }
.nr-tg { padding: 3px 8px; font-size: 12px; }
.nr-tg i { width: 10px; height: 10px; }
.nr-tag { font-size: 12px; color: #f0c868; border: 1px solid #6a5236; padding: 2px 8px; }
.nr-fx { padding-left: 2px; }
.nr-pend { display: flex; align-items: center; gap: 6px; padding: 5px 7px; font-size: 13px; color: #e6d3a8; background: rgba(201,163,94,.08); border: 1px dashed #8a6a3a; }
.nr-pend span { flex: 1; min-width: 0; }
.nr-pend b { color: #ffd98a; }
.nr-bst-host { position: fixed; inset: 0; z-index: 990; }
/* los PNJ de una escena (panel derecho) */
.nr-scene { display: flex; flex-direction: column; gap: 6px; }
.nr-srow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 6px; padding: 5px 6px; background: #120e0b; border: 1px solid #2a2119; }
.nr-sid { display: flex; flex-direction: column; min-width: 0; }
.nr-sid b { font-size: 14px; color: #f0e2c2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-sid small { font-size: 11px; color: #9c8a6c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-srow .nr-dist > span { min-width: 46px; }
.nr-add { gap: 6px; flex-wrap: wrap; }
.nr-ic { width: 18px; height: 18px; vertical-align: -4px; margin-right: 6px; }
.nr-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.nr-sum-c { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; background: #120e0b; border: 1px solid #2a2119; font-size: 13px; color: #e6d3a8; }
/* el editor de un PNJ */
.nr-modal { max-width: 640px; }
.nr-ed { display: flex; flex-direction: column; gap: 8px; }
.nr-ed-top { display: flex; gap: 16px; align-items: center; }
.nr-face { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; color: #a99670; font: inherit; }
.nr-face:hover small { color: #ffd98a; }
.nr-ed-id { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.nr-ed-id .field { width: 100%; }
.nr-ed-sec { font-family: var(--display); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #a99670; margin-top: 6px; }
.nr-ed-sec small { text-transform: none; letter-spacing: 0; color: #7d6d55; }
.nr-types { display: flex; flex-wrap: wrap; gap: 4px; }
.nr-type { padding: 4px 10px; background: #110d0a; border: 1px solid #2f261c; color: #bfae8d; cursor: pointer; font: inherit; font-size: 13px; }
.nr-type:hover { border-color: #6a5236; color: #ead8b2; }
.nr-type.on { background: linear-gradient(#3a2b18, #241a0f); border-color: #c9a35e; color: #f6e4bb; }
.nr-seg { align-self: flex-start; }
.nr-beast { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; background: #0d0b09; border: 1px solid #2c251e; }
.nr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; }
.nr-f { margin: 0; }
.nr-f .inp { width: 100%; }
.nr-ed-row { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
