.camp-screen > .bar:has(#campMissions) { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
#campMissions { min-height:44px; min-width:44px; margin-left:auto; pointer-events:auto; white-space:normal; }
#campMissions[aria-disabled="true"] { opacity:.75; }

#sheet.j01-window { text-align:left; }
#sheet.j01-window .sheethead { display:grid; grid-template-columns: auto minmax(0,1fr) 44px 44px; gap:4px; padding-inline:7px; }
#sheet.j01-window .sheethead b { overflow-wrap:anywhere; }
#sheet.j01-window .sheethead button { min-height:44px; min-width:44px; }
#sheet.j01-window .sheethead #sheetBack { min-width:44px; }
#sheet.j01-window #j01Help { min-width:44px; color:#f1d18e; }
#sheet.j01-window #sheetTitle { font-size:1.08rem; }
#sheet.j01-window.j01-jobs #sheetBody { overflow:hidden; padding:0; }
#sheet.j01-window #sheetBody { min-height:0; }
.j01-stage {
  position:relative; height:100%; min-height:0; width:100%;
  background:#314738; color:#fff0d5; overflow:hidden;
}
.j01-stage picture,.j01-stage picture img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; image-rendering:pixelated; }
.j01-avisos {
  position:absolute; z-index:1; bottom:8px; left:50%; transform:translateX(-50%);
  width:min(34rem,calc(100% - 16px)); display:flex; justify-content:center; flex-wrap:wrap; gap:5px;
}
.j01-avisos[hidden] { display:none; }
.j01-avisos button { flex:1 1 auto; background:#20382cf2; border-color:#b09158; }
.j01-avisos button b { color:#251d0e; background:#e7c481; border-radius:6px; padding:0 .3em; }
.j01-card {
  position:absolute; right:8px; bottom:8px; width:min(36rem,calc(100% - 16px)); max-height:calc(100% - 16px);
  display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:4px;
  box-sizing:border-box; padding:7px 8px; background:#1b3028; border:1px solid #a58b59; border-radius:8px;
}
.j01-card header { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.j01-card h3 { margin:0; font:700 1.16em/1.12 Georgia,serif; color:#f6d899; overflow-wrap:anywhere; }
.j01-scroll {
  min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain; scrollbar-color:#a78e58 #263c30;
  scrollbar-gutter:stable; padding:2px;
}
.j01-scroll-hint { margin:0; color:#e0ca9c; font-size:.8em; }
.j01-documento { width:min(100%,800px); padding:.5rem; margin:0 auto; box-sizing:border-box; }
.j01-documento[data-j01="quests"] .quest-period { display:flex; flex-wrap:wrap; margin-bottom:.4rem; }
.j01-stage,.j01-documento { font:1rem/1.28 system-ui,sans-serif; }
.j01-stage :is(button,summary),.j01-documento :is(button,summary) {
  min-width:44px; min-height:44px; max-width:100%; font-size:inherit; white-space:normal; overflow-wrap:anywhere;
}
#sheet.j01-window :is(.j01-stage,.j01-documento) :is(button,summary) { min-height:44px; min-width:44px; }
.j01-stage :is(button,summary,.j01-scroll):focus-visible,.j01-documento :is(button,summary):focus-visible {
  outline:2px solid #ffe0a0; outline-offset:-2px;
}
.j01-stage .job,.j01-documento .quest { padding:.48em; min-width:0; overflow-wrap:anywhere; }
.j01-stage .job .jhead,.j01-stage .job .jwho,.j01-stage .job .acts { flex-wrap:wrap; min-width:0; }
.j01-stage .job .jhead b,.j01-stage .job h3 { font-size:1em; }
.j01-stage .job :is(p,small,.fx,.tag,.note),.j01-stage .logrow small,
.j01-documento .quest :is(b,small,.fx,.tag),.j01-documento .journal-head small { font-size:.88em; }
.j01-stage .crew-slots,.j01-stage .crew-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,7em),1fr)); }
.j01-stage .crew-grid { max-height:none; overflow:visible; }
.j01-stage .crew-slot { min-width:0; margin:0; }
.j01-stage .crew-choice { min-width:0; overflow-wrap:anywhere; }
.j01-stage .acts .fx,.j01-documento .fx { display:flex; flex-wrap:wrap; gap:4px; }
.j01-stage .reward,.j01-documento .reward { white-space:normal; }
.j01-stage .logrow { grid-template-columns: min-content minmax(0,1fr); }
.j01-stage .logrow em { grid-column:2; }
.j01-documento .quest { display:flex; gap:.3em; align-items:flex-start; flex-wrap:wrap; }
.j01-documento .quest > div:first-child { flex:1 1 12em; min-width:0; }
.j01-documento .quest .acts { flex:1 0 auto; justify-content:flex-end; }
.j01-documento .journal-head .objective { flex-wrap:wrap; }
.j01-documento .journal-head .objective b { font-size:inherit; overflow-wrap:anywhere; }
.j01-documento .spec summary { display:flex; align-items:center; }
.j01-documento .h3 { font-size: .95em; }
.j01-documento .quest .hbar { height:1.3em; }
.j01-documento .quest .hbar em { font-size:.78em; line-height:1.2; }
dialog#modal[data-j01-modal][open] {
  box-sizing:border-box; width:min(544px,calc(100vw - 14px)); max-width:544px; max-height:calc(100dvh - 14px); margin:auto;
  display:grid; grid-template-rows:minmax(0,1fr) auto auto; overflow:hidden;
  font:1rem/1.25 system-ui,sans-serif; text-align:left; padding:9px 11px;
}
dialog#modal[data-j01-modal] #modalBody { min-height:0; overflow:auto; scrollbar-gutter:stable; scrollbar-color:#ae925c #263c30; }
dialog#modal[data-j01-modal] #modalBody :is(p,h2) { font-size:1em; overflow-wrap:anywhere; }
dialog#modal[data-j01-modal] .modalbuttons { flex-wrap:wrap; max-height:55dvh; overflow:auto; }
dialog#modal[data-j01-modal] button { min-width:44px; min-height:44px; font-size:inherit; white-space:normal; }
dialog#modal[data-j01-modal] .j01-scroll-hint { color:#e0ca9c; font-size:.78em; }
body:has(#modal[data-j01-modal][open]) #sheet.j01-window :is(.j01-card,.j01-documento) { visibility:hidden; }
@media (orientation:portrait) {
  .j01-card { max-height:min(86%,calc(100% - 12px)); }
}
@media (max-width:480px) {
  .j01-stage .job .acts { display:grid; grid-template-columns:minmax(0,1fr); justify-items:start; }
  .j01-stage .job .acts .fx { min-width:0; width:100%; }
}
@media (max-height:380px) and (orientation:landscape) {
  .j01-stage picture img { object-position:center 60%; }
  #sheet.j01-window #sheetTitle { line-height:1.06; }
}
#sheet.j01-window #j01SheetHint { flex:none; padding:4px 10px; background:#1c3028; font-size:.78rem; }
#sheet.j01-window { width:100%; height:100dvh; max-height:100dvh; inset:0; border-radius:0; }
#sheet.j01-window .sheethead #sheetBack[style*="hidden"] { display:none; }
#sheet.j01-window .sheethead #sheetBack { grid-column:1; }
#sheet.j01-window .sheethead #sheetTitle { grid-column:2; grid-row:1; text-transform:none; }
#sheet.j01-window .sheethead #j01Help { grid-column:3; grid-row:1; }
#sheet.j01-window .sheethead #sheetClose { grid-column:4; grid-row:1; }
#sheet.j01-jobs #sheetBody > .journal-scene { height:100%; min-height:0; padding:0; flex:1 1 auto; }

/* Misiones: conservar objetivo, premio y progreso; evitar una fila extra para cada cobro. */
.j01-documento .quest.ready {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.5em;}
.j01-documento .quest.ready .acts {min-width:44px;}
@media (max-width:480px) {
 .j01-documento .quest.ready {grid-template-columns:minmax(0,1fr) auto;}
}
