*{box-sizing:border-box;margin:0;padding:0;user-select:none;-webkit-user-select:none;touch-action:auto}
html,body{width:100%;height:100%;overflow:hidden;font-family:var(--bd-font-ui,Arial,Helvetica,sans-serif);background:var(--bd-bg);color:var(--bd-text)}
#gameRoot{position:relative;width:100vw;height:100dvh;overflow:hidden;background:var(--bd-bg)}
canvas{position:absolute;inset:0;width:100%;height:100%;display:block;background:#1f2937}
.hudTop{position:absolute;top:env(safe-area-inset-top,0);left:0;right:0;display:flex;gap:8px;align-items:center;padding:8px 10px;background:linear-gradient(to bottom,var(--bd-panel),var(--bd-bg-secondary));backdrop-filter:blur(6px);z-index:var(--rrm-z-hud);overflow-x:auto}
.pill,.iconPill{white-space:nowrap;padding:7px 10px;border-radius:999px;background:var(--bd-surface);border:1px solid color-mix(in srgb,var(--bd-border-soft) 50%,transparent);font-size:clamp(11px,2.4vw,14px)}
.iconPill{display:flex;align-items:center;justify-content:center;gap:5px;min-width:46px;height:38px;padding:6px 9px;font-weight:700}
.iconPill .ico{font-size:18px;line-height:1}
.iconPill .num{font-size:13px;line-height:1}
.iconPill.selectedPawn{min-width:42px}
.iconOnly{width:42px;height:42px;display:flex;align-items:center;justify-content:center;padding:0;font-size:20px}
.iconOnly.active{background:var(--bd-accent-active);border-color:var(--bd-warning)}
.iconOnly .smallText{font-size:11px;font-weight:700}
.hudBottom{position:absolute;left:0;right:0;bottom:env(safe-area-inset-bottom,0);display:flex;gap:8px;align-items:flex-end;justify-content:space-between;padding:9px 10px;background:linear-gradient(to top,var(--bd-panel),var(--bd-bg-secondary));backdrop-filter:blur(6px);z-index:var(--rrm-z-hud)}
.buttons{display:flex;gap:7px;overflow-x:auto;max-width:100%}
select{background:var(--bd-surface);color:var(--bd-text);border:1px solid var(--bd-border-soft);border-radius:8px;padding:3px}
button{border:1px solid color-mix(in srgb,var(--bd-border-soft) 64%,transparent);background:var(--bd-surface);color:var(--bd-text);border-radius:12px;padding:9px 11px;font-size:clamp(11px,2.8vw,14px);cursor:pointer;white-space:nowrap}
button.active{background:var(--bd-accent-active);border-color:var(--bd-warning)}
.panel{width:min(94vw,430px);background:var(--bd-panel);border:1px solid var(--bd-border-soft);border-radius:14px;padding:10px;z-index:var(--rrm-z-panel);box-shadow:var(--bd-shadow-panel)}
.buildMenu{z-index:var(--rrm-z-panel);background:var(--bd-panel);border:1px solid var(--bd-border-soft);border-radius:14px;padding:10px;display:none;min-width:220px;box-shadow:var(--bd-shadow-panel)}
.buildMenu h3{font-size:14px;margin-bottom:8px}
.buildSection{font-size:12px;opacity:.8;margin-bottom:6px}
.buildOptions{display:flex;gap:8px;flex-wrap:wrap}
.panel h3{font-size:14px;margin-bottom:8px}
table{width:100%;border-collapse:collapse;font-size:12px}
th,td{padding:6px 5px;border-bottom:1px solid color-mix(in srgb,var(--bd-border-soft) 10%,transparent);text-align:center}
.needBar{width:54px;height:7px;border-radius:999px;background:var(--bd-bar-track);overflow:hidden;margin:auto}
.needFill{height:100%;background:var(--bd-success);border-radius:999px}
.needFill.warn{background:var(--bd-warning)}
.needFill.danger{background:var(--bd-danger)}
th:first-child,td:first-child{text-align:left}
input[type=checkbox]{width:18px;height:18px}
/* P10.24.70 UI-F — canonical scroll gesture policy.
   Scroll may begin over any non-control content. Direct input controls keep
   their gesture so taps, toggles and dropdowns are never interpreted as page scroll. */
button,select,input,textarea,[role="button"],[role="checkbox"],[role="combobox"]{touch-action:none}
.help{opacity:.85;font-size:12px;max-width:42vw;text-align:right}
@media(max-width:760px){.panel{width:auto;}.help{display:none}.hudBottom{padding-bottom:12px}.buttons{width:100%}.gameVersionLabel{display:flex!important;font-size:11px;padding:4px 7px;margin-left:4px}}

.sidePanel{





  background:color-mix(in srgb,var(--bd-panel) 94%,transparent);
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 58%,transparent);
  border-radius:16px;
  padding:10px;
  z-index:var(--rrm-z-panel);

  box-shadow:var(--bd-shadow-panel);
  backdrop-filter:blur(8px);
  display:none;
}
.sidePanel.open{display:block}
.sidePanelHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.sidePanelTitle{
  font-weight:700;
  font-size:14px;
}
.panelTabs{
  display:flex;
  gap:6px;
  margin-bottom:10px;
}
.panelTabs button{
  flex:1;
  min-width:42px;
  padding:8px 6px;
  border-radius:10px;
}
.panelSection{
  margin-bottom:10px;
  padding:9px;
  border-radius:12px;
  background:color-mix(in srgb,var(--bd-panel) 78%,transparent);
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 10%,transparent);
  font-size:12px;
}
.panelSection b{
  display:block;
  margin-bottom:6px;
  font-size:13px;
}
.statRow{
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:3px 0;
  border-bottom:1px solid color-mix(in srgb,var(--bd-border-soft) 22%,transparent);
}
.statRow:last-child{border-bottom:0}
.statBar{
  height:7px;
  background:rgba(0,0,0,.35);
  border-radius:999px;
  overflow:hidden;
  margin-top:4px;
}
.statFill{
  height:100%;
  background:var(--bd-success);
}
.statFill.warn{background:var(--bd-warning)}
.statFill.danger{background:var(--bd-danger)}
.logLine{
  padding:5px 0;
  border-bottom:1px solid color-mix(in srgb,var(--bd-border-soft) 8%,transparent);
  opacity:.9;
}
@media(max-width:760px){
  .sidePanel{






  }
}


/* Step 50.1 popup/layout fixes */
.buildMenu,
.workPanel,
.sidePanel{



}

.buildMenu{
}

@media(max-width:760px){
  .buildMenu,
  #stockPanel,
  #craftPanel,
  #schedulePanel,
  #balancePanel,
  #productionPanel{
    left: 8px !important;
    right: 8px !important;
    bottom: 78px !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: 46vh !important;
    overflow-y: auto !important;
  }

  .workPanel{




  }

  .sidePanel{





  }

  .hudTop{
    max-width: calc(100vw - 16px);
    overflow-x: auto;
  }

  .hudBottom{
    max-width: calc(100vw - 16px);
    overflow-x: auto;
    white-space: nowrap;
  }
}


/* Step v8 stronger UI fix */
.buildMenu,
.workPanel,
.sidePanel{



}

@media(max-width:900px){
  .buildMenu,
  .workPanel,
  .sidePanel,
  #stockPanel,
  #craftPanel,
  #schedulePanel,
  #balancePanel,
  #productionPanel{
    position:fixed !important;
    left:8px !important;
    right:8px !important;
    top:auto !important;
    bottom:82px !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    max-height:50vh !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    z-index:var(--rrm-z-modal) !important;
  }

  .sidePanel{
  }

  .hudTop{
    left:8px !important;
    right:8px !important;
    max-width:calc(100vw - 16px) !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    flex-wrap:nowrap !important;
  }

  .hudBottom{
    left:8px !important;
    right:8px !important;
    bottom:8px !important;
    max-width:calc(100vw - 16px) !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    white-space:nowrap !important;
    flex-wrap:nowrap !important;
  }

  .panelSection{
    font-size:12px !important;
  }
}


/* v9: correção forte do popup de tarefas */
.workPanel{









  z-index:var(--rrm-z-modal) !important;
}

.workPanel table{
  width: 100% !important;
  min-width: 620px !important;
  border-collapse: collapse !important;
}

.workPanel th,
.workPanel td{
  white-space: nowrap !important;
  padding: 4px 6px !important;
}

@media(max-width:760px){
  .workPanel{






  }

  .workPanel table{
    min-width: 620px !important;
  }
}


#buildMenu .iconOnly{
  min-width:48px !important;
  min-height:38px !important;
  font-size:20px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}
#productionPanel{
  z-index:var(--rrm-z-modal) !important;
}


/* v14 object context popup */
.objectPopup{






  z-index:var(--rrm-z-modal);
  background:color-mix(in srgb,var(--bd-panel) 96%,transparent);
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 64%,transparent);
  border-radius:16px;
  padding:10px;
  color:#fff;
  box-shadow:0 14px 32px rgba(0,0,0,.38);
  backdrop-filter:blur(8px);
}
.objectPopupHeader{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.objectActionRow{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}
.objectActionRow button{
  padding:7px 9px;
  font-size:12px;
}
.objectInfoLine{
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:4px 0;
  border-bottom:1px solid color-mix(in srgb,var(--bd-border-soft) 26%,transparent);
  font-size:12px;
}
.objectInfoLine:last-child{border-bottom:0}
.recipeButton{
  width:100%;
  text-align:left;
  margin-top:5px;
}
@media(max-width:760px){
  .objectPopup{





  }
}
#betterBedBtn{font-size:16px!important;}

/* v23 research */
#researchPanel{


  z-index:var(--rrm-z-modal) !important;
}
.researchCard{
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 50%,transparent);
  background:color-mix(in srgb,var(--bd-panel) 82%,transparent);
  border-radius:12px;
  padding:8px;
  margin:7px 0;
}
.researchCard.done{
  border-color:rgba(34,197,94,.45);
}
.researchCard button{
  margin-top:6px;
}

/* v24 events */
#eventsPanel{


  z-index:var(--rrm-z-modal) !important;
}
.eventCard{
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 50%,transparent);
  background:color-mix(in srgb,var(--bd-panel) 82%,transparent);
  border-radius:12px;
  padding:8px;
  margin:7px 0;
}
.eventPositive{border-color:rgba(34,197,94,.45)}
.eventNegative{border-color:rgba(248,113,113,.45)}
.eventNeutral{border-color:rgba(96,165,250,.45)}

/* v27 story/background */
#storyPanel{


  z-index:var(--rrm-z-modal) !important;
}
.storyBlock{
  border:1px solid var(--rrm-modern-line-soft,color-mix(in srgb,var(--bd-border-soft) 50%,transparent));
  background:var(--rrm-modern-card,color-mix(in srgb,var(--bd-panel) 88%,transparent));
  color:var(--rrm-modern-text,var(--bd-text));
  border-radius:14px;
  padding:10px;
  margin:8px 0;
  line-height:1.45;
}
.storyBlock b{color:var(--rrm-modern-gold-2,var(--bd-title))}
.storyBlock small,.storyBlock .logLine{color:var(--rrm-modern-muted,var(--bd-text-muted))}
.survivorCard{
  border:1px solid var(--rrm-modern-line-soft,rgba(96,165,250,.30));
  background:var(--rrm-modern-card-2,color-mix(in srgb,var(--bd-surface) 75%,transparent));
  color:var(--rrm-modern-text,var(--bd-text));
  border-radius:12px;
  padding:8px;
  margin:7px 0;
}

/* v28 start/save screen */
.startScreen{
  position:fixed;
  inset:0;
  z-index:var(--rrm-z-screen);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(251,191,36,.28), transparent 23%),
    linear-gradient(180deg, var(--bd-panel) 0%, var(--bd-surface) 45%, var(--bd-panel) 100%);
  color:var(--rrm-modern-text,var(--bd-text));
}
.startScreen.hidden{display:none}
.startArt{
  position:absolute;
  inset:0;
  opacity:.95;
  pointer-events:none;
}
.startSun{
  position:absolute;
  width:220px;
  height:220px;
  border-radius:50%;
  left:50%;
  top:10%;
  transform:translateX(-50%);
  background:radial-gradient(circle, rgba(252,211,77,.75), rgba(249,115,22,.28) 48%, transparent 70%);
  filter:blur(.2px);
}
.startRuins:before,
.startRuins:after{
  content:"";
  position:absolute;
  bottom:16%;
  width:160px;
  height:260px;
  background:linear-gradient(180deg, rgba(71,85,105,.75), color-mix(in srgb,var(--bd-panel) 90%,transparent));
  clip-path:polygon(0 18%, 25% 10%, 28% 0, 50% 22%, 70% 15%, 100% 32%, 100% 100%, 0 100%);
  box-shadow:0 0 30px rgba(0,0,0,.4);
}
.startRuins:before{left:8%;transform:rotate(-4deg)}
.startRuins:after{right:7%;height:210px;transform:rotate(5deg)}
.startBunker{
  position:absolute;
  left:50%;
  bottom:10%;
  width:min(760px, 88vw);
  height:190px;
  transform:translateX(-50%);
  background:
    linear-gradient(180deg, rgba(100,116,139,.55), color-mix(in srgb,var(--bd-surface) 95%,transparent)),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255,255,255,.035) 35px 38px);
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 48%,transparent);
  border-radius:180px 180px 24px 24px;
  box-shadow:0 -20px 80px color-mix(in srgb,var(--bd-panel) 80%,transparent), inset 0 8px 18px color-mix(in srgb,var(--bd-border-soft) 26%,transparent);
}
.startBunker:after{
  content:"";
  position:absolute;
  left:50%;
  bottom:0;
  width:120px;
  height:130px;
  transform:translateX(-50%);
  background:linear-gradient(180deg, color-mix(in srgb,var(--bd-panel) 20%,transparent), rgba(2,6,23,.95));
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 42%,transparent);
  border-radius:52px 52px 0 0;
}
.startCard{
  position:relative;
  width:min(560px, calc(100vw - 28px));
  padding:26px;
  border-radius:24px;
  background:color-mix(in srgb,var(--bd-panel) 82%,transparent);
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 58%,transparent);
  box-shadow:0 24px 90px rgba(0,0,0,.55);
  backdrop-filter:blur(8px);
  text-align:left;
}
.startKicker{
  color:var(--rrm-modern-gold-2,var(--bd-title));
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:12px;
  font-weight:700;
}
.startCard h1{
  margin:6px 0 10px;
  font-size:42px;
  line-height:1;
}
.startCard p{
  color:var(--bd-text-muted);
  line-height:1.5;
  margin:0 0 18px;
}
.startActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.startBtn{
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 70%,transparent);
  border-radius:14px;
  padding:12px 16px;
  background:rgba(30,41,59,.94);
  color:var(--rrm-modern-text,var(--bd-text));
  cursor:pointer;
  font-weight:700;
}
.startBtn.primary{
  background:linear-gradient(180deg,var(--bd-warning),#b45309);
  border-color:rgba(253,230,138,.6);
}
.startBtn:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.startSaveInfo{
  margin-top:12px;
  color:var(--bd-info);
  font-size:12px;
}
#savePanel{


  z-index:var(--rrm-z-modal) !important;
}
#savePanel button{
  margin:4px 4px 4px 0;
}

/* v29 visitors/trade */
#visitorsPanel{


  z-index:var(--rrm-z-modal) !important;
}
.visitorCard{
  border:1px solid rgba(96,165,250,.30);
  background:rgba(15,23,42,.86);
  border-radius:14px;
  padding:10px;
  margin:8px 0;
}
.visitorCard.refugee{border-color:rgba(34,197,94,.35)}
.visitorCard.trader{border-color:rgba(250,204,21,.38)}
.visitorActions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}
.visitorActions button{margin:0}
.tradeLine{
  font-size:12px;
  color:var(--bd-text-muted);
  margin-top:4px;
}

/* v29.5 debug colono 0 */
#debugPanel{


  z-index:var(--rrm-z-debug-overlay) !important;
  background:rgba(2,6,23,.94) !important;
}
#debugSummary{
  font-size:12px;
  line-height:1.45;
  padding:8px;
  border-radius:10px;
  background:rgba(15,23,42,.86);
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 36%,transparent);
  margin-bottom:8px;
}
#debugLog{
  white-space:pre-wrap;
  font-size:11px;
  line-height:1.35;
  background:rgba(0,0,0,.28);
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 36%,transparent);
  border-radius:10px;
  padding:8px;
  max-height:48vh;
  overflow:auto;
}

#farmPanel{z-index:var(--rrm-z-modal)!important}
#farmPanel button.active{outline:2px solid var(--bd-warning);background:rgba(250,204,21,.18)}

.newGameOptions{
  display:grid;
  gap:10px;
  margin:12px 0;
  padding:10px;
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 42%,transparent);
  border-radius:14px;
  background:color-mix(in srgb,var(--bd-panel) 58%,transparent);
}
.newGameOptions label{display:grid;gap:4px;font-size:12px;color:#dbeafe}
.newGameOptions select,.newGameOptions input{
  width:100%;
  padding:8px;
  border-radius:10px;
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 48%,transparent);
  background:rgba(2,6,23,.85);
  color:#e5e7eb;
}
.startGrid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.eventAlert{



  z-index:var(--rrm-z-critical-alert);
  background:color-mix(in srgb,var(--bd-panel) 96%,transparent);
  color:#e5e7eb;
  border:1px solid rgba(250,204,21,.42);
  box-shadow:0 20px 60px rgba(0,0,0,.45);
  border-radius:16px;
  padding:12px;
}
.eventAlertTitle{font-weight:800;color:var(--bd-warning);margin-bottom:4px}
.eventAlertDesc{font-size:13px;color:var(--bd-text-muted);margin-bottom:10px}
.eventAlertActions{display:flex;gap:8px;justify-content:flex-end}
.eventAlertActions button{padding:7px 10px;border-radius:10px}
#pauseBtn.paused{outline:2px solid var(--bd-warning);background:rgba(250,204,21,.20)}

.scheduleGrid{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-top:8px}
.scheduleSlot{border:1px solid color-mix(in srgb,var(--bd-border-soft) 48%,transparent);border-radius:10px;padding:6px 4px;font-size:11px;text-align:center;cursor:pointer;user-select:none}
.scheduleSlot.work{background:rgba(59,130,246,.22);color:#bfdbfe}
.scheduleSlot.free{background:rgba(34,197,94,.20);color:#bbf7d0}
.scheduleSlot.sleep{background:rgba(139,92,246,.24);color:#ddd6fe}
.scheduleLegend{font-size:11px;color:var(--bd-text-muted);margin-top:8px;grid-column:1/-1}

#speedBtn.fast{
  outline:2px solid #38bdf8;
  background:rgba(56,189,248,.20);
}


/* v41.27 - Title screen and map setup */
.titleScreen{
  background:var(--bd-bg) url("../assets/INTRO_06_A_SAIDA.png?v=R4-intro-20260907-v1") center center / cover no-repeat !important;
  align-items:stretch !important;
  justify-content:flex-start !important;
}
.titleOverlay{
  position:absolute;
  inset:0;
  z-index:1;
  background:
    linear-gradient(90deg, rgba(3,7,5,.30) 0%, transparent 28%, transparent 70%, rgba(3,7,5,.24) 100%),
    linear-gradient(180deg, rgba(0,0,0,.12), transparent 27%, transparent 72%, rgba(0,0,0,.18));
  pointer-events:none;
}
.titleUi{
  position:absolute;
  inset:0;
  z-index:2;
  width:auto;
  min-height:0;
  display:block;
  padding:0;
  color:var(--rrm-modern-text,var(--bd-text));
}
.titleBrand{
  position:absolute;
  top:calc(18px + env(safe-area-inset-top,0px));
  left:calc(18px + env(safe-area-inset-left,0px));
  z-index:3;
  display:flex;
  align-items:center;
  gap:12px;
  max-width:min(390px,44vw);
  padding:8px 18px 8px 13px;
  border-left:3px solid #d8bc7a;
  border-top:1px solid rgba(235,218,176,.38);
  border-bottom:1px solid rgba(235,218,176,.26);
  background:linear-gradient(90deg,rgba(9,12,10,.90),rgba(9,12,10,.56));
  box-shadow:0 4px 14px rgba(0,0,0,.36);
  backdrop-filter:blur(4px);
}
.titleBrandMark{
  width:22px;
  height:22px;
  flex:0 0 22px;
  display:grid;
  place-items:center;
  border:1px solid #d8bc7a;
  color:#d8bc7a;
  transform:rotate(45deg);
}
.titleBrandMark::after{
  content:"";
  width:7px;
  height:7px;
  border:1px solid currentColor;
}
.titleBrandCopy{display:flex;flex-direction:column;min-width:0;}
.titleBrandName{
  color:#f2ead8;
  font:900 clamp(16px,2.1vw,26px)/1 Georgia,"Times New Roman",serif;
  letter-spacing:.075em;
  white-space:nowrap;
  text-shadow:0 2px 5px rgba(0,0,0,.8);
}
.titleBrandWorld{
  margin-top:4px;
  color:#ddcfaa;
  font-size:clamp(8px,.75vw,10px);
  line-height:1;
  letter-spacing:.28em;
  white-space:nowrap;
}
.titleLogo{
  margin-bottom:28px;
  text-shadow:0 7px 18px rgba(0,0,0,.75);
}
.logoMain{
  font-family:Georgia, "Times New Roman", serif;
  font-weight:900;
  text-transform:uppercase;
  font-size:clamp(46px, 7vw, 96px);
  line-height:.82;
  letter-spacing:.025em;
  color:#efe6d4;
  -webkit-text-stroke:1px rgba(49,33,22,.7);
  filter:drop-shadow(0 6px 2px rgba(0,0,0,.52));
}
.logoSub{
  display:inline-block;
  margin-top:18px;
  padding:6px 18px;
  font-family:Georgia, "Times New Roman", serif;
  font-size:clamp(18px, 2.5vw, 34px);
  letter-spacing:.32em;
  text-transform:uppercase;
  color:#ead7b4;
  border-top:2px solid rgba(203,169,105,.75);
  border-bottom:2px solid rgba(203,169,105,.75);
  text-shadow:0 3px 8px rgba(0,0,0,.85);
}
.titleMenu{
  width:min(420px, 88vw);
  margin:0;
  padding:16px;
  border-radius:12px;
  background:rgba(19,25,28,.64);
  border:1px solid rgba(215,180,112,.34);
  box-shadow:0 14px 40px rgba(0,0,0,.55), inset 0 0 0 1px color-mix(in srgb,var(--bd-border-soft) 26%,transparent);
  backdrop-filter:blur(3px);
}
.titleBtn{
  width:100%;
  height:58px;
  margin:7px 0;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:18px;
  padding:0 22px;
  border:1px solid rgba(215,180,112,.42);
  border-radius:4px;
  background:linear-gradient(180deg, rgba(55,62,64,.92), rgba(25,31,34,.94));
  color:#f4ead8;
  font-family:Georgia, "Times New Roman", serif;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
  text-align:left;
  font-size:18px;
  box-shadow:inset 0 0 0 1px rgba(236,216,173,.16), 0 5px 12px rgba(0,0,0,.36);
}
.titleBtn.primary{
  background:linear-gradient(180deg, rgba(73,84,86,.96), rgba(31,38,40,.96));
}
.titleBtn:hover:not(:disabled){
  filter:brightness(1.12);
  transform:translateY(-1px);
}
.titleBtn:disabled{
  opacity:.42;
}
.btnIcon{
  width:42px;
  font-size:24px;
  text-align:center;
}
.titleMotto{
  margin-top:18px;
  width:min(420px, 88vw);
  text-align:center;
  color:#d8c8aa;
  font-family:Georgia, "Times New Roman", serif;
  letter-spacing:.18em;
  font-size:12px;
  text-shadow:0 2px 8px rgba(0,0,0,.9);
}
.titleSaveInfo{
  margin-top:10px;
  margin-left:0;
  width:100%;
  color:#f4ead8;
  background:rgba(0,0,0,.38);
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 50%,transparent);
}

.mapSetupScreen{
  position:fixed;
  inset:0;
  z-index:var(--rrm-z-screen);
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--bd-bg) url("../assets/intro_screen.png") center center / cover no-repeat;
  color:var(--rrm-modern-text,var(--bd-text));
}
.mapSetupScreen.hidden{display:none}
.mapSetupBackdrop{
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(3,7,18,.82), rgba(3,7,18,.50), rgba(3,7,18,.72));
  backdrop-filter:blur(2px);
}
.mapSetupCard{
  position:relative;
  z-index:2;
  width:min(680px, calc(100vw - 24px));
  max-height:calc(100vh - 28px);
  overflow:auto;
  padding:26px;
  border-radius:18px;
  background:rgba(16,23,25,.88);
  border:1px solid color-mix(in srgb,var(--bd-border) 55%,transparent);
  box-shadow:0 20px 70px rgba(0,0,0,.62), inset 0 0 0 1px color-mix(in srgb,var(--bd-border-soft) 22%,transparent);
}
.mapSetupCard h1{
  margin:6px 0 8px;
  font-family:Georgia, "Times New Roman", serif;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#efe6d4;
}
.mapSetupCard p{
  color:var(--bd-text-muted);
  line-height:1.5;
}
.mapBackBtn{
  float:right;
  border:1px solid rgba(214,179,113,.45);
  background:rgba(15,23,42,.75);
  color:var(--rrm-modern-text,var(--bd-text));
  border-radius:10px;
  padding:8px 12px;
}
.mapSetupSummary{
  margin:14px 0 12px;
  padding:12px;
  border-radius:12px;
  background:rgba(0,0,0,.25);
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 38%,transparent);
  color:#d7e0e5;
  font-size:13px;
}
.mapSetupOptions label{
  color:#e5e7eb;
}
.mapSetupOptions select,
.mapSetupOptions input{
  background:var(--bd-panel);
  border:1px solid color-mix(in srgb,var(--bd-border) 46%,transparent);
  color:var(--rrm-modern-text,var(--bd-text));
}

/* CAN-UI-001 — title-menu presentation only; existing button IDs and actions stay authoritative. */
.titleUiCompact{
  position:absolute!important;
  inset:0!important;
  width:auto!important;
  max-width:none!important;
  height:auto!important;
  min-height:0!important;
  display:block!important;
  padding:0!important;
}
.titleMenuCompact{
  position:absolute!important;
  top:50%!important;
  right:calc(clamp(16px,4vw,68px) + env(safe-area-inset-right,0px))!important;
  bottom:auto!important;
  left:auto!important;
  transform:translateY(-50%)!important;
  display:flex;
  flex-direction:column;
  gap:0;
  box-sizing:border-box!important;
  width:min(204px,calc(100vw - 24px))!important;
  max-width:calc(100vw - 24px)!important;
  margin:0!important;
  padding:8px 9px 7px!important;
  border:1px solid rgba(204,178,117,.86)!important;
  border-left:3px solid rgba(216,188,122,.95)!important;
  border-radius:0!important;
  background:rgba(7,9,7,.94)!important;
  box-shadow:0 5px 14px rgba(0,0,0,.46)!important;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
#startScreen .titleMenuCompact .titleBtn{
  box-sizing:border-box!important;
  min-width:0!important;
  min-height:0!important;
  height:39px!important;
  margin:0!important;
  padding:0 10px!important;
  gap:0!important;
  border:0!important;
  border-bottom:1px solid rgba(218,202,163,.2)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#e5e0d3!important;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:clamp(10px,.82vw,12px)!important;
  font-weight:700!important;
  letter-spacing:.025em!important;
  line-height:1.15!important;
  text-shadow:none!important;
  white-space:nowrap;
  transition:background-color .14s ease,color .14s ease,filter .14s ease;
}
#startScreen .titleMenuCompact .titleBtn.primary{
  margin-bottom:1px!important;
  border:1px solid rgba(242,222,164,.95)!important;
  background:linear-gradient(180deg,#ead69b 0%,#d1b66d 100%)!important;
  color:#282214!important;
}
#startScreen .titleMenuCompact .titleBtn:not(.primary):hover:not(:disabled){
  background:rgba(220,202,157,.08)!important;
  color:#f1e8d3!important;
  filter:none;
  transform:none;
}
#startScreen .titleMenuCompact .titleBtn.primary:hover:not(:disabled){
  background:linear-gradient(180deg,#f1e1b2 0%,#ddc47b 100%)!important;
  filter:none;
  transform:none;
}
#startScreen .titleMenuCompact .titleBtn:last-of-type{
  border-bottom:0!important;
}
#startScreen .titleMenuCompact .btnIcon{
  display:none!important;
  width:0!important;
  flex:0 0 0!important;
}
#startScreen .titleMenuCompact .btnIcon .uiSpriteIcon{
  display:none!important;
}
#startScreen .titleMenuCompact .titleBtn > .uiSpriteIcon{
  display:none!important;
}
.titleSaveInfoCompact{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:6px 1px 0!important;
  border:0!important;
  border-top:1px solid rgba(235,224,191,.18)!important;
  background:transparent!important;
  box-shadow:none!important;
  color:rgba(225,216,195,.82)!important;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:10px!important;
  line-height:1.2;
  text-align:left!important;
}
#startScreen .titleMenuCompact .titleSaveInfoCompact{
  display:none!important;
}
@media (max-width:860px) and (orientation:landscape), (pointer:coarse) and (orientation:landscape){
  .titleScreen{background-position:center 58%!important;}
  .titleBrand{
    top:calc(10px + env(safe-area-inset-top,0px));
    left:calc(12px + env(safe-area-inset-left,0px));
    padding:6px 12px 6px 10px;
    gap:9px;
  }
  .titleBrandMark{width:18px;height:18px;flex-basis:18px;}
  .titleBrandName{font-size:clamp(14px,2.4vw,22px);}
  .titleBrandWorld{font-size:8px;}
  .titleMenuCompact{
    right:calc(12px + env(safe-area-inset-right,0px))!important;
    width:min(204px,calc(100vw - 24px))!important;
    max-width:calc(100vw - 24px)!important;
    padding:8px 9px 7px!important;
  }
}

/* v42.3 Work Priorities */
#workPanel table{border-collapse:collapse;width:100%;font-size:13px;min-width:780px}
#workPanel th,#workPanel td{padding:6px;border-bottom:1px solid var(--rrm-modern-line-soft,color-mix(in srgb,var(--bd-border-soft) 42%,transparent));text-align:center;vertical-align:middle}
#workPanel .wpName{text-align:left;min-width:118px;position:sticky;left:0;background:rgba(16,18,14,.94);z-index:2}
#workPanel .wpProf{font-size:11px;opacity:.75;margin-top:2px;font-weight:400}
.wpHint{font-size:12px;opacity:.9;margin:6px 0 10px 0;padding:8px;border-radius:10px;background:rgba(255,255,255,.07)}
.wpCell{min-width:64px}
.wpCell.off{opacity:.45}
.wpCell.on{background:color-mix(in srgb,var(--bd-border-soft) 22%,transparent)}
.wpToggle{display:flex;gap:4px;align-items:center;justify-content:center;margin-bottom:4px;cursor:pointer}
.wpToggle input{width:15px;height:15px}
.wpCell select{width:46px;border-radius:7px;padding:2px;background:#1d241b;color:#f5f5e8;border:1px solid color-mix(in srgb,var(--bd-border-soft) 70%,transparent)}
.wpCell select:disabled{opacity:.5}
.wpSmallBtn{border-radius:8px;padding:4px 7px;cursor:pointer}
@media(max-width:900px){#workPanel table{min-width:760px;font-size:12px}#workPanel th,#workPanel td{padding:5px}.wpCell{min-width:58px}}

.wpCell{min-width:58px}
.wpCell.off{opacity:.75}
.wpCell.on{background:color-mix(in srgb,var(--bd-border-soft) 18%,transparent)}
.wpPrioBox{
  width:34px;
  height:30px;
  border-radius:7px;
  border:1px solid rgba(255,255,255,.25);
  background:color-mix(in srgb,var(--bd-border-soft) 34%,transparent);
  color:#f7f2dc;
  font-weight:800;
  font-size:14px;
  cursor:pointer;
}
.wpCell.off .wpPrioBox{background:rgba(0,0,0,.18);color:transparent}
.wpPrioBox:hover{background:color-mix(in srgb,var(--bd-border-soft) 64%,transparent)}
.wpSmallBtn{border:1px solid color-mix(in srgb,var(--bd-border-soft) 70%,transparent);background:color-mix(in srgb,var(--bd-border-soft) 34%,transparent);color:#f7f2dc;border-radius:8px;padding:4px 7px;cursor:pointer}
@media(max-width:900px){#workPanel table{min-width:760px;font-size:12px}#workPanel th,#workPanel td{padding:5px}.wpCell{min-width:52px}.wpPrioBox{width:30px;height:28px}}

/* v57 - barra superior compacta */
.compactHudTop{
  justify-content:center;
  gap:8px;
  flex-wrap:nowrap;
  overflow-x:auto;
  scrollbar-width:none;
  border:1px solid var(--ui-gold)!important;
}
.compactHudTop::-webkit-scrollbar{display:none}
.compactHudTop .iconPill{flex:0 0 auto;white-space:nowrap}
.compactHudTop .iconOnly{flex:0 0 auto}
@media(max-width:760px){
  .compactHudTop{justify-content:flex-start;padding:6px 8px;gap:6px}
  .compactHudTop .iconPill{min-height:34px;padding:5px 8px;font-size:12px}
  .compactHudTop .iconOnly{width:38px;height:34px;min-width:38px;font-size:12px}
}

/* v60 - Fullscreen/PWA mobile */
.widePill{gap:5px;white-space:nowrap;}
.widePill .sep{opacity:.55;font-weight:700;}
.fullscreen-active #gameRoot{position:fixed;inset:0;width:100vw;height:100vh;overflow:hidden;background:var(--bd-panel);}
.fullscreen-active .hudTop{padding-top:calc(8px + env(safe-area-inset-top,0px));}
.fullscreen-active .hudBottom{padding-bottom:calc(9px + env(safe-area-inset-bottom,0px));}
.fullscreen-hint::after{pointer-events:none;content:"Toque no botão ⛶ novamente ou instale como app para tela cheia completa.";position:fixed;left:50%;top:18px;transform:translateX(-50%);z-index:var(--rrm-z-tooltip);background:color-mix(in srgb,var(--bd-panel) 96%,transparent);color:var(--rrm-modern-text,var(--bd-text));border:1px solid color-mix(in srgb,var(--bd-border-soft) 70%,transparent);border-radius:12px;padding:10px 14px;font:600 13px system-ui;box-shadow:var(--bd-shadow-panel);max-width:min(92vw,420px);text-align:center;}
@media(max-width:760px){
  .compactHudTop{gap:6px;}
  .compactHudTop .iconPill{min-height:38px;}
  .compactHudTop .widePill{max-width:45vw;overflow:hidden;text-overflow:ellipsis;}
  #fullscreenBtn{display:inline-flex;}
}

/* v61 - fullscreen desde o menu e HUD inferior fixo */
body.fullscreen-active,
body.fullscreen-active html{
  width:100vw;
  height:100vh;
  overflow:hidden;
  background:var(--bd-panel);
}
.fullscreen-active #gameRoot{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100dvh !important;
  overflow:hidden !important;
}
.fullscreen-active .startScreen,
.fullscreen-active .mapSetupScreen{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100dvh !important;
}
.fullscreen-active .hudBottom{
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  position:fixed !important;
  left:0 !important;
  right:0 !important;
  bottom:env(safe-area-inset-bottom,0px) !important;
  z-index:var(--rrm-z-hud) !important;
}
@media (max-width:860px), (pointer:coarse){
  .fullscreen-active .hudBottom{
    left:6px !important;
    right:6px !important;
    bottom:calc(6px + env(safe-area-inset-bottom,0px)) !important;
  }
  .fullscreen-active .mobileMenuBtn{
    display:flex !important;
    bottom:calc(68px + env(safe-area-inset-bottom,0px)) !important;
  }
}

/* v62 - UI mobile/fullscreen fixes that must override older rules */
#gameRoot{width:100vw;height:100dvh;overflow:hidden;}
.hudTop.compactHudTop{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:nowrap;overflow-x:auto;z-index:var(--rrm-z-hud);}
.hudTop.compactHudTop .iconOnly{width:34px;height:31px;min-width:34px;min-height:31px;font-size:12px;padding:0;}
.hudTop.compactHudTop .iconPill{min-height:31px;padding:4px 7px;font-size:12px;}
#topZoomIn,#topZoomOut{display:inline-flex;align-items:center;justify-content:center;font-weight:900;}
.hudBottom{z-index:var(--rrm-z-hud);}
.hudBottom .buttons .iconOnly{transform:scale(.9);transform-origin:center;}
button,.iconOnly,.titleBtn,.startBtn{font-size:90%;}
body.fullscreen-active #gameRoot{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;overflow:hidden!important;background:var(--bd-panel)!important;}
body.fullscreen-active .hudTop{position:fixed!important;top:env(safe-area-inset-top,0px)!important;left:6px!important;right:6px!important;z-index:var(--rrm-z-hud)!important;}
body.fullscreen-active .hudBottom{display:flex!important;visibility:visible!important;opacity:1!important;position:fixed!important;left:6px!important;right:6px!important;bottom:calc(6px + env(safe-area-inset-bottom,0px))!important;z-index:var(--rrm-z-hud)!important;}
body.fullscreen-active .hudBottom .buttons{display:flex!important;visibility:visible!important;opacity:1!important;}
body.fullscreen-active .startScreen,body.fullscreen-active .mapSetupScreen{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;}
@media(max-width:860px),(pointer:coarse){
  .hudTop.compactHudTop{justify-content:flex-start;padding:5px 6px!important;gap:4px!important;}
  .hudTop.compactHudTop .iconOnly{width:34px!important;height:31px!important;min-width:34px!important;min-height:31px!important;font-size:12px!important;border-radius:11px!important;}
  .hudTop.compactHudTop .iconPill{height:31px!important;min-height:31px!important;padding:4px 6px!important;font-size:11px!important;border-radius:11px!important;}
  .hudTop.compactHudTop .widePill{max-width:48vw;}
  .hudBottom .buttons{grid-template-columns:repeat(7,minmax(36px,1fr))!important;gap:4px!important;}
  .hudBottom .buttons .iconOnly{height:41px!important;min-height:41px!important;min-width:38px!important;font-size:16px!important;}
  .titleBtn,.startBtn{min-height:42px!important;padding:8px 11px!important;}
}


/* v63 - real mobile fullscreen viewport fix */
:root{
  --app-height: 100dvh;
  --topbar-height: 44px;
  --bottombar-height: 58px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
html,body{height:100%;min-height:100%;overflow:hidden;}
#gameRoot{height:var(--app-height)!important;min-height:var(--app-height)!important;max-height:var(--app-height)!important;}
body.fullscreen-active #gameRoot{
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:var(--app-height)!important;
  min-height:var(--app-height)!important;
  max-height:var(--app-height)!important;
  overflow:hidden!important;
}
body.fullscreen-active canvas,
#game{
  width:100vw!important;
  height:var(--app-height)!important;
}
body.fullscreen-active .hudTop{
  position:fixed!important;
  top:var(--safe-top)!important;
  left:6px!important;
  right:6px!important;
  height:auto!important;
  max-height:var(--topbar-height)!important;
  z-index:var(--rrm-z-hud)!important;
  border:1px solid var(--ui-gold)!important;
}
body.fullscreen-active .hudBottom{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  position:fixed!important;
  left:6px!important;
  right:6px!important;
  bottom:calc(6px + var(--safe-bottom))!important;
  z-index:var(--rrm-z-hud)!important;
  max-height:var(--bottombar-height)!important;
}
body.fullscreen-active .buildMenu,
body.fullscreen-active .panel,
body.fullscreen-active .objectPopup,
body.fullscreen-active #workPanel{
  z-index:var(--rrm-z-modal)!important;



}
body.fullscreen-active .buildMenu,
body.fullscreen-active #workPanel{




}
body.fullscreen-active .panel:not(#workPanel){




}
body.fullscreen-active .objectPopup{



}
#infoBtn{display:inline-flex;align-items:center;justify-content:center;}
@media(max-width:860px),(pointer:coarse){
  .hudTop.compactHudTop .iconOnly{width:32px!important;height:29px!important;min-width:32px!important;min-height:29px!important;font-size:11px!important;}
  .hudTop.compactHudTop .iconPill{height:29px!important;min-height:29px!important;font-size:11px!important;}
  .hudBottom .buttons .iconOnly{height:38px!important;min-height:38px!important;min-width:35px!important;font-size:15px!important;}
}

/* v64 - fullscreen viewport final fix + UI font -2px */
:root{
  --app-height: 100dvh;
  --vvh: 1dvh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --topbar-height: 42px;
  --bottombar-height: 54px;
}
html, body{
  width:100vw!important;
  height:var(--app-height)!important;
  min-height:var(--app-height)!important;
  max-height:var(--app-height)!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
#gameRoot{
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:var(--app-height)!important;
  min-height:var(--app-height)!important;
  max-height:var(--app-height)!important;
  overflow:hidden!important;
}
body.fullscreen-active #gameRoot,
body.mobile-fullscreen-layout #gameRoot{
  position:fixed!important;
  inset:0!important;
  height:var(--app-height)!important;
  min-height:var(--app-height)!important;
  max-height:var(--app-height)!important;
}
body.fullscreen-active canvas,
body.mobile-fullscreen-layout canvas{
  position:absolute!important;
  inset:0!important;
  width:100vw!important;
  height:var(--app-height)!important;
}
body.fullscreen-active .hudTop,
body.mobile-fullscreen-layout .hudTop{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  position:fixed!important;
  top:calc(4px + var(--safe-top))!important;
  left:6px!important;
  right:6px!important;
  z-index:var(--rrm-z-hud)!important;
  max-height:var(--topbar-height)!important;
}
body.fullscreen-active .hudBottom,
body.mobile-fullscreen-layout .hudBottom{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  position:fixed!important;
  left:6px!important;
  right:6px!important;
  bottom:calc(6px + var(--safe-bottom))!important;
  z-index:var(--rrm-z-hud)!important;
  max-height:var(--bottombar-height)!important;
  transform:none!important;
}
body.fullscreen-active .hudBottom .buttons,
body.mobile-fullscreen-layout .hudBottom .buttons{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
}
body.fullscreen-active .buildMenu,
body.fullscreen-active .panel,
body.fullscreen-active .objectPopup,
body.fullscreen-active #workPanel,
body.mobile-fullscreen-layout .buildMenu,
body.mobile-fullscreen-layout .panel,
body.mobile-fullscreen-layout .objectPopup,
body.mobile-fullscreen-layout #workPanel{
  z-index:var(--rrm-z-modal)!important;
  visibility:visible;



}
body.fullscreen-active .buildMenu,
body.fullscreen-active #workPanel,
body.mobile-fullscreen-layout .buildMenu,
body.mobile-fullscreen-layout #workPanel{




}
body.fullscreen-active .panel:not(#workPanel),
body.mobile-fullscreen-layout .panel:not(#workPanel){




}
body.fullscreen-active .objectPopup,
body.mobile-fullscreen-layout .objectPopup{




}
body.fullscreen-active .startScreen,
body.fullscreen-active .mapSetupScreen,
body.mobile-fullscreen-layout .startScreen,
body.mobile-fullscreen-layout .mapSetupScreen{
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:var(--app-height)!important;
  min-height:var(--app-height)!important;
  max-height:var(--app-height)!important;
}
/* redução geral de textos em aproximadamente 2 pontos */
body{font-size:12px!important;}
button,.pill,.iconPill,.panel,.buildMenu,table,th,td,.help,.eventAlertDesc,.objectInfoLine,.wpHint,.scheduleSlot,.newGameOptions label{font-size:calc(1em - 2px)!important;}
.titleBtn,.startBtn{font-size:16px!important;}
.titleUi h1,.titleScreen h1{font-size:clamp(34px,6vw,78px)!important;}
.iconOnly{font-size:calc(1em + 2px)!important;}
.hudTop.compactHudTop .iconOnly{width:32px!important;height:29px!important;min-width:32px!important;min-height:29px!important;}
.hudBottom .buttons .iconOnly{width:38px!important;height:38px!important;min-width:35px!important;min-height:36px!important;}


/* v68 definitive UI/fullscreen override */
:root{
  --app-height: 100dvh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --topbar-height: 42px;
  --bottombar-height: 54px;
}
html,body{width:100vw!important;height:var(--app-height)!important;margin:0!important;overflow:hidden!important;overscroll-behavior:none!important;font-size:12px!important;}
#gameRoot{position:fixed!important;inset:0!important;width:100vw!important;height:var(--app-height)!important;overflow:hidden!important;background:var(--bd-panel)!important;}
#game{position:absolute!important;inset:0!important;width:100vw!important;height:var(--app-height)!important;z-index:1!important;}
.hudTop.compactHudTop{position:fixed!important;top:calc(4px + var(--safe-top))!important;left:6px!important;right:6px!important;z-index:var(--rrm-z-hud)!important;display:flex!important;visibility:visible!important;opacity:1!important;align-items:center!important;gap:4px!important;max-height:var(--topbar-height)!important;overflow-x:auto!important;}
.hudTop.compactHudTop .iconOnly{width:32px!important;height:29px!important;min-width:32px!important;min-height:29px!important;font-size:11px!important;padding:0!important;}
.hudTop.compactHudTop .iconPill{height:29px!important;min-height:29px!important;padding:3px 6px!important;font-size:11px!important;}
#zoomIn,#zoomOut,#infoBtn{display:inline-flex!important;align-items:center!important;justify-content:center!important;}
.hudBottom{position:fixed!important;left:6px!important;right:6px!important;bottom:calc(6px + var(--safe-bottom))!important;z-index:var(--rrm-z-hud)!important;display:flex!important;visibility:visible!important;opacity:1!important;max-height:var(--bottombar-height)!important;}
.hudBottom .buttons{display:flex!important;visibility:visible!important;opacity:1!important;gap:4px!important;overflow-x:auto!important;}
.hudBottom .buttons .iconOnly{width:38px!important;height:36px!important;min-width:36px!important;min-height:36px!important;font-size:14px!important;}
.buildMenu,.panel,.objectPopup,#workPanel,#sidePanel{z-index:var(--rrm-z-modal)!important;}
.eventAlert{z-index:var(--rrm-z-critical-alert)!important;}
.mobileDrawer{z-index:var(--rrm-z-drawer)!important;}
.mobileMenuBtn{z-index:var(--rrm-z-hud)!important;}
.buildMenu,#workPanel{bottom:calc(var(--bottombar-height) + var(--safe-bottom) + 12px)!important;}
.panel:not(#workPanel),#sidePanel{left:8px!important;}
.objectPopup{bottom:calc(var(--bottombar-height) + var(--safe-bottom) + 12px)!important;}
button,.iconOnly,.titleBtn,.startBtn,.panel,.buildMenu,table,th,td,.help,.eventAlertDesc,.objectInfoLine,.wpHint,.scheduleSlot,.newGameOptions label{font-size:calc(1em - 2px)!important;}
.titleBtn,.startBtn{font-size:14px!important;}
body.fullscreen-active .hudBottom,body.mobile-fullscreen-layout .hudBottom{display:flex!important;visibility:visible!important;opacity:1!important;z-index:var(--rrm-z-hud)!important;}
body.fullscreen-active .hudTop,body.mobile-fullscreen-layout .hudTop{display:flex!important;visibility:visible!important;opacity:1!important;z-index:var(--rrm-z-hud)!important;}

/* v69 - square action buttons + smaller text buttons */
:root{
  --ui-square-btn: 34px;
  --ui-square-btn-mobile: 36px;
}

/* Botões de ícone: quadrados e consistentes entre topbar, barra inferior e popups */
.iconOnly,
.hudTop.compactHudTop .iconOnly,
.hudBottom .buttons .iconOnly,
.panel .iconOnly,
.buildMenu .iconOnly,
.objectPopup .iconOnly,
.sidePanel .iconOnly,
.workPanel .iconOnly,
#workPanel .iconOnly,
#stockPanel .iconOnly,
#craftPanel .iconOnly,
#farmPanel .iconOnly,
#productionPanel .iconOnly,
#researchPanel .iconOnly,
#eventsPanel .iconOnly,
#storyPanel .iconOnly,
#savePanel .iconOnly,
#visitorsPanel .iconOnly,
#debugPanel .iconOnly{
  width:var(--ui-square-btn)!important;
  height:var(--ui-square-btn)!important;
  min-width:var(--ui-square-btn)!important;
  min-height:var(--ui-square-btn)!important;
  max-width:var(--ui-square-btn)!important;
  max-height:var(--ui-square-btn)!important;
  padding:0!important;
  border-radius:10px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  aspect-ratio:1/1!important;
  font-size:13px!important;
  line-height:1!important;
  flex:0 0 var(--ui-square-btn)!important;
}

/* A barra inferior não estica mais os botões horizontalmente */
.hudBottom .buttons{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
}
.hudBottom .buttons .iconOnly{
  width:var(--ui-square-btn)!important;
  flex:0 0 var(--ui-square-btn)!important;
}

/* Botões com texto continuam retangulares, mas com fonte menor */
,
.titleBtn,
.startBtn,
.recipeButton,
.objectActionRow button,
.eventAlertActions button,
.panelTabs button,
.mobileDrawerGrid button{
  font-size:10px!important;
  line-height:1.15!important;
}

select,input,textarea,label,.panel,.buildMenu,.objectPopup,.sidePanel,.workPanel,table,th,td,.statRow,.objectInfoLine,.recipeButton,.logLine{
  font-size:10px!important;
}

.popupCloseX{
  width:var(--ui-square-btn)!important;
  height:var(--ui-square-btn)!important;
  min-width:var(--ui-square-btn)!important;
  min-height:var(--ui-square-btn)!important;
  max-width:var(--ui-square-btn)!important;
  max-height:var(--ui-square-btn)!important;
  border-radius:10px!important;
  font-size:18px!important;
  line-height:1!important;
}

@media (max-width: 860px), (pointer: coarse){
  .iconOnly,
  .hudTop.compactHudTop .iconOnly,
  .hudBottom .buttons .iconOnly,
  .panel .iconOnly,
  .buildMenu .iconOnly,
  .objectPopup .iconOnly,
  .sidePanel .iconOnly,
  .workPanel .iconOnly,
  #workPanel .iconOnly,
  #stockPanel .iconOnly,
  #craftPanel .iconOnly,
  #farmPanel .iconOnly,
  #productionPanel .iconOnly,
  #researchPanel .iconOnly,
  #eventsPanel .iconOnly,
  #storyPanel .iconOnly,
  #savePanel .iconOnly,
  #visitorsPanel .iconOnly,
  #debugPanel .iconOnly{
    width:var(--ui-square-btn-mobile)!important;
    height:var(--ui-square-btn-mobile)!important;
    min-width:var(--ui-square-btn-mobile)!important;
    min-height:var(--ui-square-btn-mobile)!important;
    max-width:var(--ui-square-btn-mobile)!important;
    max-height:var(--ui-square-btn-mobile)!important;
    flex:0 0 var(--ui-square-btn-mobile)!important;
    font-size:14px!important;
    border-radius:10px!important;
  }
  .hudBottom .buttons{
    display:flex!important;
    grid-template-columns:none!important;
    justify-content:flex-start!important;
    align-items:center!important;
    overflow-x:auto!important;
    gap:5px!important;
  }
  .popupCloseX{
    width:var(--ui-square-btn-mobile)!important;
    height:var(--ui-square-btn-mobile)!important;
    min-width:var(--ui-square-btn-mobile)!important;
    min-height:var(--ui-square-btn-mobile)!important;
    max-width:var(--ui-square-btn-mobile)!important;
    max-height:var(--ui-square-btn-mobile)!important;
    font-size:18px!important;
  }
  button:not(.iconOnly):not(.popupCloseX):not([data-bd-quantity-delta]):not([data-bd-quantity-bound]):not([data-bd-kbd-char]):not([data-bd-kbd-action]):not([data-bd-kbd-layout]):not(#mobileDrawer button),
  .titleBtn,
  .startBtn,
  .recipeButton,
  .objectActionRow button,
  .eventAlertActions button,
  .panelTabs button{
    font-size:10px!important;
    min-height:44px!important;
  }
}


/* v72: a barra inferior só aparece dentro da partida. */
body:not(.game-active) .hudBottom{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body.game-active .hudBottom{
  display:flex!important;
}


/* v73 - painel de prioridades simplificado */
#workPanel{
}
#workPanel .wpTableWrap,
.wpTableWrap{
  max-height:calc(var(--app-height, 100vh) - var(--topbar-height, 44px) - var(--bottombar-height, 58px) - var(--safe-top, 0px) - var(--safe-bottom, 0px) - 130px)!important;
  overflow:auto!important;
  -webkit-overflow-scrolling:touch!important;
  border-radius:10px!important;
}
#workPanel table{
  min-width:620px!important;
}
#workPanel thead th{
  position:sticky!important;
  top:0!important;
  z-index:4!important;
  background:rgba(16,18,14,.98)!important;
}
#workPanel .wpName{
  min-width:104px!important;
}
#workPanel .needBar,
#workPanel .needFill{
  display:none!important;
}
.wpCell{
  min-width:var(--ui-square-btn, 34px)!important;
  width:var(--ui-square-btn, 34px)!important;
  padding:3px!important;
}
.wpPrioBox{
  width:var(--ui-square-btn, 34px)!important;
  height:var(--ui-square-btn, 34px)!important;
  min-width:var(--ui-square-btn, 34px)!important;
  min-height:var(--ui-square-btn, 34px)!important;
  max-width:var(--ui-square-btn, 34px)!important;
  max-height:var(--ui-square-btn, 34px)!important;
  padding:0!important;
  border-radius:10px!important;
  font-size:13px!important;
  line-height:1!important;
}
#workPanel th,
#workPanel td{
  padding:4px!important;
}
@media (max-width:860px), (pointer:coarse){
  #workPanel .wpTableWrap,
  .wpTableWrap{
    max-height:calc(var(--app-height, 100vh) - var(--topbar-height, 44px) - var(--bottombar-height, 58px) - var(--safe-top, 0px) - var(--safe-bottom, 0px) - 118px)!important;
  }
  #workPanel table{
    min-width:590px!important;
  }
  .wpCell{
    min-width:var(--ui-square-btn-mobile, 36px)!important;
    width:var(--ui-square-btn-mobile, 36px)!important;
  }
  .wpPrioBox{
    width:var(--ui-square-btn-mobile, 36px)!important;
    height:var(--ui-square-btn-mobile, 36px)!important;
    min-width:var(--ui-square-btn-mobile, 36px)!important;
    min-height:var(--ui-square-btn-mobile, 36px)!important;
    max-width:var(--ui-square-btn-mobile, 36px)!important;
    max-height:var(--ui-square-btn-mobile, 36px)!important;
  }
}


/* v74 - controles do menu flutuante movidos para barra inferior */
.mobileMenuBtn,.mobileDrawer{display:none!important;visibility:hidden!important;pointer-events:none!important;}
.hudBottom .buttons{overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch!important;}
#saveBottomBtn{display:inline-flex!important;}

/* v74 - rolagem vertical robusta no popup de tarefas */
#workPanel{display:none;flex-direction:column!important;}
#workPanel[style*="display: block"],#workPanel.open{display:flex!important;}
#workPanel h3,#workPanel .wpHint{flex:0 0 auto!important;}
#workPanel .wpTableWrap,.wpTableWrap{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:auto!important;
  overscroll-behavior:contain!important;
  touch-action:pan-x pan-y!important;
  -webkit-overflow-scrolling:touch!important;
  max-height:calc(var(--app-height, 100vh) - var(--topbar-height, 44px) - var(--bottombar-height, 58px) - var(--safe-top, 0px) - var(--safe-bottom, 0px) - 128px)!important;
}
#workPanel table{width:max-content!important;border-collapse:collapse!important;}
#workPanel tbody{overflow:visible!important;}
@media (orientation: landscape) and (max-height: 520px){
  #workPanel .wpTableWrap,.wpTableWrap{max-height:calc(100vh - 154px)!important;}
}

/* v75 - popup close de-dup + fullscreen map setup scroll */
body.fullscreen-active .mapSetupScreen,
body.mobile-fullscreen-layout .mapSetupScreen,
.mapSetupScreen{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  align-items:flex-start!important;
  justify-content:center!important;
  padding:calc(10px + var(--safe-top, 0px)) 8px calc(18px + var(--safe-bottom, 0px))!important;
  box-sizing:border-box!important;
  touch-action:pan-y!important;
}
body.fullscreen-active .mapSetupCard,
body.mobile-fullscreen-layout .mapSetupCard,
.mapSetupCard{
  max-height:none!important;
  overflow:visible!important;
  margin:0 auto!important;
  box-sizing:border-box!important;
  padding:18px!important;
}
body.fullscreen-active .mapSetupScreen.hidden,
body.mobile-fullscreen-layout .mapSetupScreen.hidden,
.mapSetupScreen.hidden{
  display:none!important;
}
.popupCloseX + .popupCloseX{display:none!important;}

.cropProgress{height:10px;border:1px solid color-mix(in srgb,var(--bd-border-soft) 70%,transparent);background:rgba(0,0,0,.25);border-radius:999px;overflow:hidden}
.cropProgress>div{height:100%;background:linear-gradient(90deg,#84cc16,var(--bd-warning));border-radius:999px}


/* v85 - stockpile popup simplificado e margem direita para rolagem */
.panel, .buildMenu, .objectPopup, #workPanel, #sidePanel, .eventAlert, .mobileDrawer {
  box-sizing: border-box !important;
  padding-right: max(20px, env(safe-area-inset-right)) !important;
  scrollbar-gutter: stable !important;
}
.panelSection, .objectActionRow, .stockRulesBody, #stockPanel label {
  box-sizing: border-box !important;
}
#stockPanel {

}


/* v94 - rolagem real no setup do mapa em mobile */
.mapSetupScreen, .mapSetupScreen *{
  touch-action:pan-y!important;
}
.mapSetupScreen{
  height:100dvh!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
}
.mapSetupCard{
  flex:0 0 auto!important;
  margin-top:12px!important;
  margin-bottom:24px!important;
}


/* v103 - scroll vertical global em popups/painéis */
.scrollablePopup,
.panel,
.buildMenu,
.objectPopup,
.sidePanel,
#sidePanel,
#workPanel,
#productionPanel,
#balancePanel,
#stockPanel,
#craftPanel,
#researchPanel,
#eventsPanel,
#storyPanel,
#savePanel,
#visitorsPanel,
#debugPanel,
#farmPanel,
#schedulePopup,
.eventAlert,
.mobileDrawer{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
  max-height:calc(var(--app-height, 100dvh) - var(--topbar-height, 44px) - var(--bottombar-height, 58px) - var(--safe-top, 0px) - var(--safe-bottom, 0px) - 34px)!important;
  box-sizing:border-box!important;
}
#workPanel{}
#workPanel .wpTableWrap{overflow-y:auto!important;overflow-x:auto!important;touch-action:pan-x pan-y!important;}
#sidePanel{display:flex;flex-direction:column;}
#panelContent{min-height:0;overflow:visible!important;}
#debugLog{max-height:45vh;overflow:auto!important;-webkit-overflow-scrolling:touch!important;}
.mapSetupScreen{height:100dvh!important;max-height:100dvh!important;overflow-y:auto!important;overflow-x:hidden!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important;}
.mapSetupCard{max-height:none!important;overflow:visible!important;}

/* v105 - estado correto do painel lateral */
#sidePanel:not(.open){display:none!important;}
#sidePanel.open{display:flex!important;flex-direction:column!important;}
#sidePanel .sidePanelHeader{flex:0 0 auto;}
#sidePanel .panelTabs{flex:0 0 auto;}
#sidePanel #panelContent{flex:1 1 auto;min-height:0;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;}

/* v106 - scroll real no painel do colono */
#sidePanel.open{
  display:flex!important;
  flex-direction:column!important;




}
#sidePanel.open #panelContent{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
  padding-bottom:18px!important;
}
#sidePanel.open #panelContent,
#sidePanel.open #panelContent *{
  touch-action:pan-y!important;
}
#sidePanel.open .sidePanelHeader,
#sidePanel.open .panelTabs{
  flex:0 0 auto!important;
}


/* v107 - correção leve de popups: remove efeitos agressivos do v106 e evita travamentos */
#sidePanel:not(.open){display:none!important;}
#sidePanel.open{
  display:flex!important;
  flex-direction:column!important;



}
#sidePanel .sidePanelHeader,
#sidePanel .panelTabs{flex:0 0 auto!important;}
#sidePanel.open #panelContent{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
  padding-bottom:18px!important;
}
#sidePanel.open #panelContent button,
#sidePanel.open #panelContent select,
#sidePanel.open #panelContent input,
#sidePanel.open #panelContent label{touch-action:manipulation!important;}
#sidePanel.open #panelContent div,
#sidePanel.open #panelContent p,
#sidePanel.open #panelContent span,
#sidePanel.open #panelContent table,
#sidePanel.open #panelContent tbody,
#sidePanel.open #panelContent tr,
#sidePanel.open #panelContent td,
#sidePanel.open #panelContent th{touch-action:pan-y!important;}


/* v134 UI fix - remove duplicated bottom save button */
#saveBottomBtn{display:none!important;}

/* v135 unified medieval UI theme */
:root{
  --ui-gold: color-mix(in srgb,var(--bd-border) 68%,transparent);
  --ui-bg-dark: rgba(19,25,28,.82);
  --ui-bg-btn-top: rgba(55,62,64,.96);
  --ui-bg-btn-bottom: rgba(25,31,34,.98);
  --ui-text: #f4ead8;
}

.topbar,
.hudBottom,
.panel,
.modalContent,
.window,
.dialog{
  background:var(--ui-bg-dark)!important;
  border:1px solid var(--ui-gold)!important;
  box-shadow:0 14px 40px rgba(0,0,0,.55), inset 0 0 0 1px color-mix(in srgb,var(--bd-border-soft) 22%,transparent)!important;
  backdrop-filter:blur(3px);
}

button,
.iconOnly,
.panel button,
.hudBottom button,
.topbar button{
  background:linear-gradient(180deg,var(--ui-bg-btn-top),var(--ui-bg-btn-bottom))!important;
  border:1px solid var(--ui-gold)!important;
  color:var(--ui-text)!important;
  border-radius:5px!important;
  font-family:Georgia,"Times New Roman",serif!important;
  font-weight:700!important;
  letter-spacing:.04em;
  text-shadow:0 1px 2px rgba(0,0,0,.65);
}

button:hover,
.iconOnly:hover{
  filter:brightness(1.08);
}

button.active,
.iconOnly.active{
  background:linear-gradient(180deg, rgba(133,92,39,.96), rgba(74,49,16,.98))!important;
  border-color:rgba(244,211,94,.88)!important;
}

.panelTitle,
.panelHeader,
.topbar,
.hudBottom{
  color:#ead7b4!important;
}

/* v217 - sprites editáveis para botões, abas e receitas */
button,
.iconOnly,
.panel button,
.hudBottom button,
.topbar button{
  letter-spacing:0!important;
}

button[data-ui-sprite]::before{
  content:none!important;
  display:none!important;
}

/* Gameplay controls with sprite icons align their labels to the far edge. */
button.hasUiSpriteIcon:not(#startScreen button){
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px;
}

button.hasUiSpriteIcon:not(#startScreen button):not(.iconOnly):not(.rrmPanelClose):not(.popupCloseX):not(.pm-close):not(.wpClose):not(.scheduleCloseBtn):not(.settingsCloseBtn):not(#scheduleCloseBtnP102502):not(#settingsBackBtn):not(#saveHistoryCloseBtn),
button.hasUiSpriteIcon.rrmModernHudButton:not(#startScreen button):not(.rrmPanelClose):not(.popupCloseX):not(.pm-close):not(.wpClose):not(.scheduleCloseBtn):not(.settingsCloseBtn):not(#scheduleCloseBtnP102502):not(#settingsBackBtn):not(#saveHistoryCloseBtn){
  justify-content:space-between!important;
  text-align:right!important;
}

button.hasUiSpriteIcon:not(.iconOnly) > :is(.btnIcon,.buttonIcon,.actionIcon):empty,
button.hasUiSpriteIcon.rrmModernHudButton > :is(.btnIcon,.buttonIcon,.actionIcon):empty{
  display:none!important;
}

button.hasUiSpriteIcon:not(#startScreen button):not(.iconOnly):not(.rrmBuildCard):not(.rrmPanelClose):not(.popupCloseX):not(.pm-close):not(.wpClose):not(.scheduleCloseBtn):not(.settingsCloseBtn):not(#scheduleCloseBtnP102502):not(#settingsBackBtn):not(#saveHistoryCloseBtn) > :not(.uiSpriteIcon):not(:empty),
button.hasUiSpriteIcon.rrmModernHudButton:not(#startScreen button):not(.rrmBuildCard):not(.rrmPanelClose):not(.popupCloseX):not(.pm-close):not(.wpClose):not(.scheduleCloseBtn):not(.settingsCloseBtn):not(#scheduleCloseBtnP102502):not(#settingsBackBtn):not(#saveHistoryCloseBtn) > :not(.uiSpriteIcon):not(:empty){
  min-width:0!important;
  margin-left:auto!important;
  text-align:right!important;
}

button.uiSpriteSuppressed .uiSpriteIcon{
  display:none!important;
}

.uiSpriteIcon{
  display:inline-block;
  width:18px;
  height:18px;
  flex:0 0 18px;
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  pointer-events:none;
}

.iconOnly[data-ui-sprite]:not(#speedBtn):not([data-theme-command-icon]),
.panelTabs button[data-ui-sprite]{
  background-image:var(--ui-sprite-url)!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:68% 68%!important;
  color:transparent!important;
  text-shadow:none!important;
  overflow:hidden;
}

.iconOnly.hasUiSpriteIcon.uiSpriteOnly,
.panelTabs button.hasUiSpriteIcon.uiSpriteOnly{
  gap:0!important;
  color:transparent!important;
  font-size:0!important;
  text-shadow:none!important;
}

.iconOnly.hasUiSpriteIcon.uiSpriteOnly .uiSpriteIcon,
.panelTabs button.hasUiSpriteIcon.uiSpriteOnly .uiSpriteIcon{
  width:68%;
  height:68%;
  flex-basis:68%;
}

#speedBtn.hasUiSpriteIcon{
  min-width:52px!important;
  padding:0 8px!important;
  gap:6px!important;
  font-size:12px!important;
  font-weight:800!important;
  color:var(--bd-text)!important;
  justify-content:space-between!important;
  text-align:right!important;
}

#speedBtn.hasUiSpriteIcon .uiSpriteIcon{
  width:16px!important;
  height:16px!important;
  flex:0 0 16px!important;
}

.panelTabs button[data-ui-sprite]{
  min-width:42px;
}

#speedBtn.uiSpriteSuppressed,
#mealMinus.uiSpriteSuppressed,
#mealPlus.uiSpriteSuppressed,
#stockPriorityDown.uiSpriteSuppressed,
#stockPriorityUp.uiSpriteSuppressed{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  font-weight:800!important;
  letter-spacing:0!important;
  background-image:none!important;
}

.wpPrioBox.uiSpriteSuppressed{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:color-mix(in srgb,var(--bd-border-soft) 34%,transparent)!important;
  border:1px solid rgba(255,255,255,.25)!important;
  color:#f7f2dc!important;
  font-weight:800!important;
  letter-spacing:0!important;
}

.recipeSprite{
  display:inline-block;
  width:18px;
  height:18px;
  margin-right:5px;
  vertical-align:-4px;
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
}

/* v240 - popups contextuais com largura fixa e compacta */
:root{
  --object-popup-width: 340px;
  --info-popup-width: 340px;
}

#objectPopup.objectPopup,
body.fullscreen-active #objectPopup.objectPopup,
body.mobile-fullscreen-layout #objectPopup.objectPopup{



}

#sidePanel.sidePanel,
#sidePanel.sidePanel.open,
body.fullscreen-active #sidePanel.sidePanel,
body.mobile-fullscreen-layout #sidePanel.sidePanel{



}

@media (min-width: 761px) and (pointer: fine){
  #objectPopup.objectPopup{





  }

  #sidePanel.sidePanel,
  #sidePanel.sidePanel.open{





  }
}

.gameVersionLabel{flex:0 0 auto;align-self:center;margin-left:8px;padding:5px 9px;border-radius:999px;background:rgba(250,204,21,.16);border:1px solid rgba(250,204,21,.45);color:var(--rrm-modern-gold-2,var(--bd-title));font-size:12px;font-weight:800;letter-spacing:.02em;white-space:nowrap;box-shadow:0 2px 10px rgba(0,0,0,.22)}
.mobileVersionLabel{display:none}


/* P1.4 - version label locked inside bottombar on desktop and mobile */
.hudBottom #gameVersionLabel.gameVersionLabel{
  display:flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;
  min-width:42px!important;
  height:28px!important;
  margin-left:6px!important;
  padding:3px 8px!important;
  border-radius:999px!important;
  background:rgba(250,204,21,.18)!important;
  border:1px solid rgba(250,204,21,.55)!important;
  color:var(--bd-title)!important;
  font-size:11px!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:.02em!important;
  white-space:nowrap!important;
  position:static!important;
  right:auto!important;
  bottom:auto!important;
  z-index:auto!important;
}
@media (max-width:860px), (pointer:coarse){
  .hudBottom{align-items:center!important;}
  .hudBottom .buttons{flex:1 1 auto!important;min-width:0!important;}
  .hudBottom #gameVersionLabel.gameVersionLabel{
    display:flex!important;
    min-width:38px!important;
    height:24px!important;
    margin-left:4px!important;
    padding:2px 6px!important;
    font-size:10px!important;
    position:static!important;
  }
  #gameVersionLabelMobile{display:none!important;}
}

/* P1.5 - animal care panel */
.animalBarP15{height:8px;border-radius:999px;background:color-mix(in srgb,var(--bd-panel) 65%,transparent);border:1px solid color-mix(in srgb,var(--bd-border-soft) 50%,transparent);overflow:hidden;margin:4px 0 8px 0}
.animalBarP15>div{height:100%;border-radius:999px;background:linear-gradient(90deg,var(--bd-danger),var(--bd-warning),var(--bd-success))}

/* P2.5 - Popup compacto: duas informações por linha quando houver espaço */
#objectPopup .compactInfoGridP25,
#objectPopupBody{
  --popup-info-gap: 6px;
}
#objectPopup .compactInfoGridP25{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: var(--popup-info-gap);
  margin: 4px 0 8px 0;
}
#objectPopup .objectInfoLine{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:8px;
  min-width:0;
  padding:5px 7px;
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 34%,transparent);
  background:var(--rrm-modern-card,color-mix(in srgb,var(--bd-panel) 30%,transparent));
  border-radius:8px;
  box-sizing:border-box;
}
#objectPopup .objectInfoLine span:first-child{flex:1 1 0;min-width:0;opacity:.76;white-space:normal;overflow-wrap:anywhere;line-height:1.25;}
#objectPopup .objectInfoLine span:last-child{flex:1 1 0;min-width:0;text-align:right;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;line-height:1.25;}
#objectPopupBody > .objectInfoLine{width:calc(50% - 3px);display:inline-flex;margin:0 3px 6px 0;vertical-align:top;}
#objectPopup .animalBarP15{clear:both;}
#objectPopup .objectActionRow{clear:both;}
#objectPopup .compactButtonsP25{display:flex;flex-wrap:wrap;gap:6px;}
#objectPopup .compactButtonsP25 button{flex:1 1 calc(50% - 6px);min-width:120px;}
.enemyObjectPopupP570 #objectPopupBody > .objectInfoLine{width:100%;display:flex;margin-right:0;}
.enemyPopupP570{display:block;min-width:0;}
.enemyHeroP570{
  display:grid;
  grid-template-columns:74px minmax(0,1fr);
  gap:10px;
  align-items:center;
  clear:both;
  margin:2px 0 10px 0;
  padding:8px;
  border:1px solid rgba(248,113,113,.24);
  background:linear-gradient(135deg,rgba(127,29,29,.38),rgba(15,23,42,.50));
  border-radius:8px;
}
.enemyPortraitP570{
  width:74px;
  height:74px;
  border-radius:8px;
  border:1px solid rgba(248,250,252,.18);
  background-color:rgba(2,6,23,.48);
  background-position:center;
  background-repeat:no-repeat;
  background-size:contain;
  box-shadow:inset 0 -18px 20px rgba(0,0,0,.20);
}
.enemyHeroTextP570{min-width:0;display:flex;flex-direction:column;gap:5px;}
.enemyHeroTextP570 b{
  color:var(--rrm-modern-text,var(--bd-text));
  font-size:15px;
  line-height:1.15;
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
overflow-wrap:anywhere;}
.enemyHeroTextP570 span{color:var(--rrm-modern-gold-2,var(--bd-title));font-size:12px;font-weight:800;}
.enemyHealthP570{
  height:8px;
  width:100%;
  border-radius:999px;
  overflow:hidden;
  border:1px solid rgba(248,250,252,.14);
  background:rgba(15,23,42,.72);
}
.enemyHealthP570>div{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,var(--bd-danger),var(--bd-warning),#84cc16);
}
.enemyQuickP570{clear:both;}
.enemyDetailsP570{clear:both;}
@media (max-width:420px){
  #objectPopup .compactInfoGridP25{grid-template-columns:1fr;}
  #objectPopupBody > .objectInfoLine{width:100%;display:flex;margin-right:0;}
  #objectPopup .compactButtonsP25 button{flex-basis:100%;}
  .enemyHeroP570{grid-template-columns:62px minmax(0,1fr);}
  .enemyPortraitP570{width:62px;height:62px;}
}

/* v271 - clareza dos popups: resumo primeiro, detalhes dobraveis */
.popupClarityP271 .objectPopupHeader{
  position:sticky;
  top:0;
  z-index:2;
  margin:-10px -10px 10px -10px;
  padding:10px;
  background:linear-gradient(180deg,var(--rrm-modern-panel-2,var(--bd-panel)),var(--rrm-modern-panel,var(--bd-panel)));
  border-bottom:1px solid var(--rrm-modern-line-soft,color-mix(in srgb,var(--bd-border-soft) 42%,transparent));
}
.popupClarityP271 #objectPopupTitle{
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
  min-width:0;
overflow-wrap:anywhere;}
.popupQuickGridP271,
.popupDetailsGridP271{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  margin:4px 0 8px 0;
}
.popupQuickGridP271 .objectInfoLine{
  min-height:44px;
  align-items:flex-start!important;
  flex-direction:column;
  justify-content:center!important;
  gap:2px!important;
  background:var(--rrm-modern-card-2,color-mix(in srgb,var(--bd-surface) 58%,transparent))!important;
  border-color:var(--rrm-modern-line-soft,color-mix(in srgb,var(--bd-border-soft) 36%,transparent))!important;
}
.popupQuickGridP271 .objectInfoLine span:first-child{
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--rrm-modern-gold-2,#a7f3d0);
  opacity:.95!important;
}
.popupQuickGridP271 .objectInfoLine span:last-child{
  width:100%;
  text-align:left!important;
  white-space:normal!important;
  color:var(--rrm-modern-text,var(--bd-text));
  font-weight:800;
}
.popupDetailsGridP271 .objectInfoLine{
  background:var(--rrm-modern-card,rgba(15,23,42,.34))!important;
}
.popupDisclosureP271{
  clear:both;
  border:1px solid var(--rrm-modern-line-soft,color-mix(in srgb,var(--bd-border-soft) 42%,transparent));
  background:var(--rrm-modern-card,color-mix(in srgb,var(--bd-panel) 30%,transparent));
  border-radius:8px;
  margin:7px 0;
  overflow:hidden;
}
.popupDisclosureP271 summary{
  cursor:pointer;
  list-style:none;
  padding:8px 9px;
  color:var(--rrm-modern-gold-2,var(--bd-title));
  font-size:12px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.popupDisclosureP271 summary::-webkit-details-marker{display:none;}
.popupDisclosureP271 summary::after{
  content:"+";
  width:18px;
  height:18px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:color-mix(in srgb,var(--rrm-modern-gold-2,var(--bd-title)) 16%,transparent);
  color:var(--rrm-modern-gold-2,var(--bd-title));
}
.popupDisclosureP271[open] summary::after{content:"-";}
.popupDisclosureBodyP271{
  padding:0 8px 8px 8px;
}
.popupActionBarP271{
  position:sticky;
  bottom:0;
  z-index:1;
  padding-top:8px;
  background:linear-gradient(180deg,transparent,var(--rrm-modern-panel,var(--bd-panel)) 28%);
}
.popupActionBarP271 button,
.popupRecipeP271{
  border-radius:8px!important;
}
.popupClarityPanelP271{
  border-radius:10px!important;
}
.popupClarityPanelP271 h3{
  position:sticky;
  top:-10px;
  z-index:1;
  margin:-10px -10px 8px -10px!important;
  padding:10px 46px 9px 10px;
  background:linear-gradient(180deg,var(--rrm-modern-panel-2,var(--bd-panel)),var(--rrm-modern-panel,var(--bd-panel)));
  border-bottom:1px solid var(--rrm-modern-line-soft,color-mix(in srgb,var(--bd-border-soft) 42%,transparent));
}
.popupClarityPanelP271 .panelSection,
.popupClarityPanelP271 .visitorCard,
.popupClarityPanelP271 .eventCard{
  border-radius:8px!important;
  background:var(--rrm-modern-card,color-mix(in srgb,var(--bd-panel) 42%,transparent))!important;
}
@media (max-width:420px){
  .popupQuickGridP271,
  .popupDetailsGridP271{grid-template-columns:1fr;}
  .popupQuickGridP271 .objectInfoLine{min-height:40px;}
}

/* P2.10 - inspector compacto */
.aiInspectorP210{border:1px solid color-mix(in srgb,var(--bd-border-soft) 50%,transparent);background:rgba(30,38,44,.55)}
.compactInfoRowP210{display:grid;grid-template-columns: minmax(92px, 42%) 1fr;gap:8px;align-items:center;line-height:1.25;margin:3px 0}
.compactInfoRowP210 span:last-child{text-align:right;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;}
@media (min-width:520px){.aiInspectorP210{font-size:.94em}.compactInfoRowP210{grid-template-columns:minmax(110px,38%) 1fr}}

/* P2.11 - pasture/animal species dropdowns */
.pastureSelectorP211 select,.animalSpeciesSelectorP211 select{width:100%;margin-top:6px;padding:8px 10px;border-radius:8px;border:1px solid color-mix(in srgb,var(--bd-border-soft) 70%,transparent);background:rgba(16,24,20,.92);color:#f3f1df;font-size:13px;}
.pastureSelectorP211 .hintText,.animalSpeciesSelectorP211 .hintText{font-size:11px;opacity:.75;margin-top:4px;line-height:1.25;}
.pasturePanelP211,.animalPanelP211{grid-template-columns:1fr 1fr;}
@media(max-width:720px){.pastureSelectorP211 select,.animalSpeciesSelectorP211 select{font-size:12px;padding:7px 8px}.pasturePanelP211,.animalPanelP211{grid-template-columns:1fr 1fr;}}

/* v276 - UI and scroll polish */
:root{
  --ui-scroll-thumb:color-mix(in srgb,var(--bd-border) 55%,transparent);
  --ui-scroll-track:rgba(15,23,42,.22);
  --ui-panel-final-bg:color-mix(in srgb,var(--bd-panel) 96%,transparent);
  --ui-panel-final-border:rgba(214,179,113,.24);
  --ui-panel-final-max:calc(var(--app-height, 100dvh) - var(--topbar-height, 44px) - var(--bottombar-height, 58px) - var(--safe-top, 0px) - var(--safe-bottom, 0px) - 38px);
}

.panel,
.buildMenu,
.objectPopup,
#sidePanel,
#workPanel,
#productionPanel,
#balancePanel,
#stockPanel,
#craftPanel,
#researchPanel,
#eventsPanel,
#storyPanel,
#savePanel,
#visitorsPanel,
#debugPanel,
#farmPanel,
#schedulePopup,
.eventAlert,
.mobileDrawer{
  border-radius:10px!important;
  border-color:var(--ui-panel-final-border)!important;
  background:var(--ui-panel-final-bg)!important;
  box-shadow:0 16px 34px rgba(0,0,0,.36)!important;
  scrollbar-width:thin!important;
  scrollbar-color:var(--ui-scroll-thumb) var(--ui-scroll-track)!important;
  scrollbar-gutter:stable!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
}

.panel::-webkit-scrollbar,
.buildMenu::-webkit-scrollbar,
.objectPopup::-webkit-scrollbar,
#sidePanel::-webkit-scrollbar,
#workPanel::-webkit-scrollbar,
#productionPanel::-webkit-scrollbar,
#balancePanel::-webkit-scrollbar,
#stockPanel::-webkit-scrollbar,
#craftPanel::-webkit-scrollbar,
#researchPanel::-webkit-scrollbar,
#eventsPanel::-webkit-scrollbar,
#storyPanel::-webkit-scrollbar,
#savePanel::-webkit-scrollbar,
#visitorsPanel::-webkit-scrollbar,
#debugPanel::-webkit-scrollbar,
#farmPanel::-webkit-scrollbar,
#schedulePopup::-webkit-scrollbar,
#panelContent::-webkit-scrollbar,
#objectPopupBody::-webkit-scrollbar,
.wpTableWrap::-webkit-scrollbar{
  width:8px!important;
  height:8px!important;
}

.panel::-webkit-scrollbar-thumb,
.buildMenu::-webkit-scrollbar-thumb,
.objectPopup::-webkit-scrollbar-thumb,
#sidePanel::-webkit-scrollbar-thumb,
#workPanel::-webkit-scrollbar-thumb,
#productionPanel::-webkit-scrollbar-thumb,
#balancePanel::-webkit-scrollbar-thumb,
#stockPanel::-webkit-scrollbar-thumb,
#craftPanel::-webkit-scrollbar-thumb,
#researchPanel::-webkit-scrollbar-thumb,
#eventsPanel::-webkit-scrollbar-thumb,
#storyPanel::-webkit-scrollbar-thumb,
#savePanel::-webkit-scrollbar-thumb,
#visitorsPanel::-webkit-scrollbar-thumb,
#debugPanel::-webkit-scrollbar-thumb,
#farmPanel::-webkit-scrollbar-thumb,
#schedulePopup::-webkit-scrollbar-thumb,
#panelContent::-webkit-scrollbar-thumb,
#objectPopupBody::-webkit-scrollbar-thumb,
.wpTableWrap::-webkit-scrollbar-thumb{
  background:var(--ui-scroll-thumb)!important;
  border-radius:999px!important;
  border:2px solid transparent!important;
  background-clip:padding-box!important;
}

.panel::-webkit-scrollbar-track,
.buildMenu::-webkit-scrollbar-track,
.objectPopup::-webkit-scrollbar-track,
#sidePanel::-webkit-scrollbar-track,
#workPanel::-webkit-scrollbar-track,
#productionPanel::-webkit-scrollbar-track,
#balancePanel::-webkit-scrollbar-track,
#stockPanel::-webkit-scrollbar-track,
#craftPanel::-webkit-scrollbar-track,
#researchPanel::-webkit-scrollbar-track,
#eventsPanel::-webkit-scrollbar-track,
#storyPanel::-webkit-scrollbar-track,
#savePanel::-webkit-scrollbar-track,
#visitorsPanel::-webkit-scrollbar-track,
#debugPanel::-webkit-scrollbar-track,
#farmPanel::-webkit-scrollbar-track,
#schedulePopup::-webkit-scrollbar-track,
#panelContent::-webkit-scrollbar-track,
#objectPopupBody::-webkit-scrollbar-track,
.wpTableWrap::-webkit-scrollbar-track{
  background:var(--ui-scroll-track)!important;
}

.buildMenu,
.panel:not(#workPanel),
#productionPanel,
#balancePanel,
#stockPanel,
#craftPanel,
#researchPanel,
#eventsPanel,
#storyPanel,
#savePanel,
#visitorsPanel,
#debugPanel,
#farmPanel,
#schedulePopup{


}

.buildMenu>h3,
.panel:not(#workPanel)>h3,
.popupClarityPanelP271>h3{
  position:sticky!important;
  top:-10px!important;
  z-index:4!important;
  margin:-10px -10px 8px -10px!important;
  padding:10px 46px 9px 10px!important;
  background:linear-gradient(180deg,var(--rrm-modern-panel-2,var(--bd-panel)),var(--rrm-modern-panel,var(--bd-panel)))!important;
  border-bottom:1px solid var(--rrm-modern-line-soft,color-mix(in srgb,var(--bd-border) 26%,transparent))!important;
}

#sidePanel.sidePanel,
#sidePanel.sidePanel.open{
  padding:0!important;

}

#sidePanel .sidePanelHeader{
  flex:0 0 auto!important;
  margin:0!important;
  padding:10px!important;
  background:linear-gradient(180deg,var(--rrm-modern-panel-2,var(--bd-panel)),var(--rrm-modern-panel,var(--bd-panel)))!important;
  border-bottom:1px solid var(--rrm-modern-line-soft,color-mix(in srgb,var(--bd-border) 26%,transparent))!important;
  position:sticky!important;
  top:0!important;
  z-index:4!important;
}

#sidePanel .panelTabs{
  flex:0 0 auto!important;
  margin:0!important;
  padding:8px 10px!important;
  gap:6px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:none!important;
  background:var(--rrm-modern-card,color-mix(in srgb,var(--bd-panel) 58%,transparent))!important;
}

#sidePanel .panelTabs::-webkit-scrollbar{display:none!important;}

#sidePanel #panelContent{
  flex:1 1 auto!important;
  min-height:0!important;
  padding:10px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-width:thin!important;
  scrollbar-color:var(--ui-scroll-thumb) var(--ui-scroll-track)!important;
}

#objectPopup.objectPopup{

}

#objectPopup.objectPopupOpenV276{
  display:flex!important;
  flex-direction:column!important;
  padding:0!important;
}

#objectPopup.objectPopupOpenV276 .objectPopupHeader{
  flex:0 0 auto!important;
  margin:0!important;
  padding:10px!important;
  background:linear-gradient(180deg,var(--rrm-modern-panel-2,var(--bd-panel)),var(--rrm-modern-panel,var(--bd-panel)))!important;
  border-bottom:1px solid var(--rrm-modern-line-soft,color-mix(in srgb,var(--bd-border) 26%,transparent))!important;
  position:sticky!important;
  top:0!important;
  z-index:5!important;
}

#objectPopup.objectPopupOpenV276 #objectPopupBody{
  flex:1 1 auto!important;
  min-height:0!important;
  padding:10px 10px 12px 10px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  touch-action:pan-y!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:thin!important;
  scrollbar-color:var(--ui-scroll-thumb) var(--ui-scroll-track)!important;
}

#objectPopup.objectPopupOpenV276 .popupActionBarP271{
  margin:8px -2px 0 -2px!important;
  padding:8px 0 0 0!important;
}

.panelSection,
.researchCard,
.eventCard,
.visitorCard,
.recipeButton{
  border-radius:8px!important;
}

.panelSection,
.researchCard,
.eventCard,
.visitorCard{
  margin:6px 0!important;
  padding:8px!important;
}

.recipeButton,
.objectActionRow button,
.eventAlertActions button{
  min-height:32px!important;
  padding:7px 9px!important;
  white-space:normal!important;
}

.objectInfoLine,
.statRow,
.logLine{
  line-height:1.25!important;
}

#workPanel{
  border-radius:10px!important;
}

#workPanel .wpHeader{
  background:linear-gradient(180deg,var(--rrm-modern-panel-2,var(--bd-panel)),var(--rrm-modern-panel,var(--bd-panel)))!important;
  border-bottom:1px solid var(--rrm-modern-line-soft,color-mix(in srgb,var(--bd-border) 26%,transparent))!important;
  margin:-10px -10px 8px -10px!important;
  padding:9px 10px!important;
}

#workPanel .wpTableWrap{
  border-radius:8px!important;
  border:1px solid rgba(214,179,113,.16)!important;
  background:color-mix(in srgb,var(--bd-panel) 30%,transparent)!important;
  scrollbar-width:thin!important;
  scrollbar-color:var(--ui-scroll-thumb) var(--ui-scroll-track)!important;
}

@media (min-width:861px) and (pointer:fine){
  .buildMenu,
  #productionPanel,
  #balancePanel,
  #stockPanel,
  #craftPanel,
  #researchPanel,
  #eventsPanel,
  #storyPanel,
  #savePanel,
  #visitorsPanel,
  #farmPanel{





  }

  #productionPanel{
  }

  #researchPanel,
  #eventsPanel,
  #stockPanel,
  #craftPanel,
  #balancePanel,
  #visitorsPanel,
  #farmPanel{

  }

  #debugPanel{





  }

  #schedulePopup{





  }

  .buildMenu .buildOptions{
    display:grid!important;
    grid-template-columns:repeat(auto-fill, minmax(42px, 1fr))!important;
    gap:7px!important;
  }

  .buildMenu .buildOptions .iconOnly,
  .buildMenu .buildOptions > button{
    width:100%!important;
    min-width:0!important;
  }
}

/* P3.10 - Mobile Popup UX Control Fix: bottom sheets mobile com controles clicáveis */
#rrmPopupBackdropP38{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.22);
  z-index:var(--rrm-z-modal-backdrop);
  pointer-events:auto;
  touch-action:none;
}

@media (max-width:760px), (pointer:coarse) and (max-width:920px){
  body.rrmPopupOpenP38{
    overflow:hidden!important;
    overscroll-behavior:none!important;
    touch-action:auto!important;
  }

  .rrmMobileSheetP38[style*="display: none"],
  #objectPopup.rrmMobileSheetP38[style*="display: none"],
  #sidePanel.rrmMobileSheetP38[style*="display: none"],
  #workPanel.rrmMobileSheetP38[style*="display: none"]{
    display:none!important;
    pointer-events:none!important;
  }

  .rrmMobileSheetP38,
  #objectPopup.rrmMobileSheetP38,
  #sidePanel.rrmMobileSheetP38,
  #workPanel.rrmMobileSheetP38,
  #buildMenu.rrmMobileSheetP38,
  #stockPanel.rrmMobileSheetP38,
  #craftPanel.rrmMobileSheetP38,
  #researchPanel.rrmMobileSheetP38,
  #eventsPanel.rrmMobileSheetP38,
  #storyPanel.rrmMobileSheetP38,
  #savePanel.rrmMobileSheetP38,
  #visitorsPanel.rrmMobileSheetP38,
  #farmPanel.rrmMobileSheetP38,
  #balancePanel.rrmMobileSheetP38,
  #productionPanel.rrmMobileSheetP38,
  #debugPanel.rrmMobileSheetP38,
  #schedulePopup.rrmMobileSheetP38{
    position:fixed!important;
    left:0!important;
    right:0!important;
    top:auto!important;
    bottom:0!important;
    width:100vw!important;
    min-width:0!important;
    max-width:100vw!important;
    height:min(84dvh, calc(var(--app-height, 100dvh) - var(--safe-top, 0px) - 24px))!important;
    max-height:min(84dvh, calc(var(--app-height, 100dvh) - var(--safe-top, 0px) - 24px))!important;
    margin:0!important;
    border-radius:20px 20px 0 0!important;
    border-left:1px solid color-mix(in srgb,var(--bd-border-soft) 54%,transparent)!important;
    border-right:1px solid color-mix(in srgb,var(--bd-border-soft) 54%,transparent)!important;
    border-top:1px solid color-mix(in srgb,var(--bd-border-soft) 70%,transparent)!important;
    box-shadow:0 -18px 50px rgba(0,0,0,.55)!important;
    box-sizing:border-box!important;
    padding:8px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left))!important;
    z-index:var(--rrm-z-modal)!important;
    pointer-events:auto!important;
    overflow:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-y!important;
  }

  #objectPopup.rrmMobileSheetP38,
  #sidePanel.rrmMobileSheetP38,
  #workPanel.rrmMobileSheetP38{
    display:flex!important;
    flex-direction:column!important;
  }

  .rrmSheetGripP38{
    flex:0 0 auto!important;
    width:46px!important;
    height:4px!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.32)!important;
    margin:0 auto 6px!important;
    pointer-events:none!important;
  }

  .rrmMobileSheetP38 *{
    pointer-events:auto;
  }

  .rrmMobileSheetP38 .objectPopupHeader,
  .rrmMobileSheetP38 .sidePanelHeader,
  .rrmMobileSheetP38 .wpHeader{
    position:sticky!important;
    top:0!important;
    z-index:3!important;
    flex:0 0 auto!important;
    min-height:36px!important;
    max-height:52px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    padding:2px 0 6px!important;
    margin:0!important;
    background:inherit!important;
  }

  .rrmMobileSheetP38 h2:first-child,
  .rrmMobileSheetP38 h3:first-child{
    min-height:0!important;
    max-height:none!important;
    display:block!important;
    padding:0!important;
    margin:0 0 8px!important;
    line-height:1.2!important;
  }

  .rrmMobileSheetP38 #objectPopupTitle,
  .rrmMobileSheetP38 .wpHeader h3,
  .rrmMobileSheetP38 .sidePanelHeader h3{
    font-size:16px!important;
    line-height:1.15!important;
    margin:0!important;
    min-height:0!important;
  }

  .rrmMobileSheetP38 #objectPopupBody,
  .rrmMobileSheetP38 #panelContent,
  .rrmMobileSheetP38 .wpTableWrap,
  .rrmMobileSheetP38 .rrmMobileScrollP38,
  .rrmMobileSheetP38 .stockRulesBody,
  .rrmMobileSheetP38 .tradeStockpileBodyP35,
  .rrmMobileSheetP38 .tradePostBodyP35{
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
    touch-action:pan-y!important;
    padding-bottom:18px!important;
  }

  #workPanel.rrmMobileSheetP38 .wpTableWrap{
    overflow-x:auto!important;
    overflow-y:auto!important;
    touch-action:pan-x pan-y!important;
  }

  .rrmMobileSheetP38 button:not(.iconOnly):not(.wpPrioBox),
  .rrmMobileSheetP38 input,
  .rrmMobileSheetP38 select,
  .rrmMobileSheetP38 textarea,
  .rrmMobileSheetP38 .objectActionRow button,
  .rrmMobileSheetP38 .tradeActionBtnP35{
    min-height:42px!important;
    font-size:15px!important;
    border-radius:12px!important;
  }

  .rrmMobileSheetP38 .iconOnly,
  .rrmMobileSheetP38 .popupCloseX,
  .rrmMobileSheetP38 #objectPopupClose,
  .rrmMobileSheetP38 #sideCloseBtn,
  .rrmMobileSheetP38 #wpClose{
    min-width:38px!important;
    min-height:38px!important;
    width:38px!important;
    height:38px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:11px!important;
  }

  .rrmMobileSheetP38 .objectActionRow,
  .rrmMobileSheetP38 .objectActions,
  .rrmMobileSheetP38 .popupActions,
  .rrmMobileSheetP38 .tradeFooterP35,
  .rrmMobileSheetP38 .stockFooter{
    position:sticky!important;
    bottom:0!important;
    z-index:4!important;
    background:inherit!important;
    padding-top:8px!important;
    padding-bottom:4px!important;
  }

  .rrmMobileSheetP38 .wpPrioBox,
  .rrmMobileSheetP38 button[data-wp-cycle]{
    min-width:40px!important;
    min-height:40px!important;
    touch-action:manipulation!important;
  }

  .rrmMobileSheetP38 button,
  .rrmMobileSheetP38 input,
  .rrmMobileSheetP38 select,
  .rrmMobileSheetP38 textarea,
  .rrmMobileSheetP38 label,
  .rrmMobileSheetP38 [role="button"],
  .rrmMobileSheetP38 [onclick],
  .rrmMobileSheetP38 [data-action],
  .rrmMobileSheetP38 .wpPrioBox{
    pointer-events:auto!important;
    touch-action:manipulation!important;
    -webkit-user-select:none;
    user-select:none;
  }

  .rrmMobileSheetP38 select,
  .rrmMobileSheetP38 input,
  .rrmMobileSheetP38 textarea{
    -webkit-user-select:text;
    user-select:text;
  }

}

/* P4.21 - Tela de configurações */
.settingsScreen{
  position:fixed;
  inset:0;
  z-index:var(--rrm-z-screen);
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--bd-bg) url("../assets/intro_screen.png") center center / cover no-repeat;
  color:var(--rrm-modern-text,var(--bd-text));
}
.settingsScreen.hidden{display:none!important;}
.settingsBackdrop{
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(3,7,18,.86), rgba(3,7,18,.56), rgba(3,7,18,.78));
  backdrop-filter:blur(2px);
}
.settingsCard{
  position:relative;
  z-index:2;
  width:min(820px, calc(100vw - 24px));
  max-height:calc(100dvh - 28px);
  overflow:auto;
  padding:26px;
  border-radius:18px;
  background:rgba(16,23,25,.90);
  border:1px solid color-mix(in srgb,var(--bd-border) 55%,transparent);
  box-shadow:0 20px 70px rgba(0,0,0,.62), inset 0 0 0 1px color-mix(in srgb,var(--bd-border-soft) 22%,transparent);
}
.settingsCard h1{
  margin:6px 0 8px;
  font-family:Georgia, "Times New Roman", serif;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#efe6d4;
}
.settingsCard p{color:var(--bd-text-muted);margin:0 0 14px;line-height:1.45;}
.settingsSection{
  margin:14px 0;
  padding:14px;
  border-radius:16px;
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 42%,transparent);
  background:color-mix(in srgb,var(--bd-panel) 55%,transparent);
}
.settingsSection h2{
  margin:0 0 10px;
  font-size:15px;
  color:var(--rrm-modern-text,var(--bd-text));
  letter-spacing:.04em;
  text-transform:uppercase;
}
.settingsGrid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:12px;
  align-items:end;
}
.settingsGrid label,
.settingsCheckRow{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:13px;
  color:#dbeafe;
}
.settingsCheckRow{
  flex-direction:row;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(15,23,42,.70);
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 36%,transparent);
}
.settingsCheckRow input{width:18px;height:18px;accent-color:var(--bd-accent);}
.settingsGrid select,
.settingsGrid input[type="range"]{
  width:100%;
}
.settingsGrid select{
  border-radius:10px;
  border:1px solid color-mix(in srgb,var(--bd-border) 46%,transparent);
  background:var(--bd-panel);
  color:var(--rrm-modern-text,var(--bd-text));
  padding:9px 10px;
}
.settingsWideRow{grid-column:1/-1;}
.settingsRangeLine{display:flex;gap:12px;align-items:center;}
.settingsRangeLine input{flex:1;accent-color:var(--bd-accent);}
.settingsRangeLine span{min-width:48px;text-align:right;color:var(--rrm-modern-gold-2,var(--bd-title));font-weight:700;}
.settingsHint{margin-top:9px;color:var(--bd-text-muted);font-size:12px;}
.settingsActions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px;}
.settingsStatus{margin-top:10px;color:#bfdbfe;font-size:13px;}
body.rrmUiScale_compact{--rrm-ui-scale:0.94;}
body.rrmUiScale_normal{--rrm-ui-scale:1;}
body.rrmUiScale_large{--rrm-ui-scale:1.08;}
body.rrmUiScale_compact .buildMenu,
body.rrmUiScale_compact .objectPopup,
body.rrmUiScale_compact .sidePanel{font-size:13px;}
body.rrmUiScale_large .buildMenu,
body.rrmUiScale_large .objectPopup,
body.rrmUiScale_large .sidePanel{font-size:15px;}
body.rrmVisual_performance canvas{image-rendering:pixelated;}
body.rrmVisual_quality canvas{image-rendering:auto;}


/* P4.21.1 - Correção de scroll da tela de configurações */
.settingsScreen.settingsScrollReadyP4211{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
  overscroll-behavior:contain!important;
}
.settingsCard.settingsCardScrollReadyP4211{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
  overscroll-behavior:contain!important;
  min-height:0!important;
}
.settingsCard.settingsCardScrollReadyP4211 select,
.settingsCard.settingsCardScrollReadyP4211 input,
.settingsCard.settingsCardScrollReadyP4211 button,
.settingsCard.settingsCardScrollReadyP4211 label{
  touch-action:manipulation!important;
}
.settingsCard.settingsCardScrollReadyP4211 input[type="range"]{
  touch-action:pan-x!important;
}


/* P4.21.2 - Research popup internal layout */
#researchPanel.rrmResearchPanelP4212{
}
#researchList.rrmResearchListP4212{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:0;
}
#researchList .rrmResearchSectionP4212{
  border:1px solid var(--rrm-modern-line-soft,color-mix(in srgb,var(--bd-border-soft) 42%,transparent));
  border-radius:14px;
  background:rgba(15,23,42,.46);
  padding:10px;
  margin:0 0 8px 0;
  box-sizing:border-box;
}
#researchList .rrmResearchSummaryP4212{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
  gap:8px;
  align-items:stretch;
}
#researchList .rrmResearchSummaryP4212 > b{
  grid-column:1 / -1;
}
#researchList .researchCard.rrmResearchCardP4212{
  margin:8px 0 0 0 !important;
  border:1px solid color-mix(in srgb,var(--bd-border-soft) 54%,transparent);
  border-radius:14px;
  background:rgba(2,6,23,.34);
  padding:10px;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(132px, 1fr));
  gap:7px;
  align-items:stretch;
  overflow:visible;
}
#researchList .researchCard.rrmResearchCardP4212 > b,
#researchList .researchCard.rrmResearchCardP4212 > small,
#researchList .researchCard.rrmResearchCardP4212 > .logLine,
#researchList .researchCard.rrmResearchCardP4212 > .rrmResearchInlineActionsP4212{
  grid-column:1 / -1;
}
#researchList .researchCard.rrmResearchCardP4212 > br{display:none;}
#researchList .rrmResearchStatRowP4212{
  display:flex !important;
  flex-direction:row !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:8px !important;
  padding:7px 8px !important;
  margin:0 !important;
  min-height:34px !important;
  border-radius:10px !important;
  background:rgba(255,255,255,.055) !important;
  border:1px solid rgba(255,255,255,.075) !important;
  box-sizing:border-box !important;
  white-space:normal !important;
  overflow:visible !important;
}
#researchList .rrmResearchStatRowP4212 span{
  overflow:visible !important;
  text-overflow:clip !important;
  white-space:normal !important;
  line-height:1.22 !important;
  min-width:0 !important;
}
#researchList .rrmResearchStatRowP4212 span:first-child{
  flex:0 0 auto;
  max-width:48%;
  color:var(--bd-text-muted);
  font-weight:700;
}
#researchList .rrmResearchStatRowP4212 span:last-child{
  flex:1 1 auto;
  text-align:right;
  overflow-wrap:anywhere;
}
#researchList .rrmResearchTinyP4212{min-width:118px;}
#researchList .rrmResearchCompactP4212{min-width:148px;}
#researchList .rrmResearchWideP4212{grid-column:1 / -1;}
#researchList .rrmResearchInlineActionsP4212,
#researchList .objectActionRow{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:7px !important;
  align-items:center !important;
  justify-content:flex-start !important;
}
#researchList .rrmResearchButtonP4212,
#researchList button{
  width:auto !important;
  max-width:100% !important;
  min-height:34px !important;
  padding:7px 10px !important;
  font-size:13px !important;
  white-space:normal !important;
}
@media (max-width: 860px), (pointer: coarse){
  #researchPanel.rrmResearchPanelP4212{




    display:flex;
    flex-direction:column;

  }
  #researchPanel.rrmResearchPanelP4212 h3{
    flex:0 0 auto;
    margin:0 0 8px 0;
  }
  #researchList.rrmResearchListP4212{
    flex:1 1 auto;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y;
    padding-bottom:8px;
  }
  #researchList .rrmResearchSectionP4212{
    padding:9px;
  }
  #researchList .researchCard.rrmResearchCardP4212{
    grid-template-columns:repeat(auto-fit, minmax(136px, 1fr));
    gap:7px;
  }
  #researchList .rrmResearchCardLongP4212{
    grid-template-columns:1fr;
  }
  #researchList .rrmResearchTinyP4212{min-width:112px;}
  #researchList .rrmResearchCompactP4212{min-width:136px;}
}
@media (max-width: 420px){
  #researchList .researchCard.rrmResearchCardP4212{
    grid-template-columns:repeat(auto-fit, minmax(126px, 1fr));
  }
  #researchList .rrmResearchStatRowP4212{
    gap:6px !important;
    padding:7px !important;
  }
  #researchList .rrmResearchWideP4212{
    grid-column:1 / -1;
  }
}


/* P4.21.13 - desktop/telas grandes: popups com 50% do width */
@media (min-width:1024px) and (pointer:fine){
  body.rrmDesktopHalfPopupsP42113 .panel,
  body.rrmDesktopHalfPopupsP42113 .buildMenu,
  body.rrmDesktopHalfPopupsP42113 .objectPopup,
  body.rrmDesktopHalfPopupsP42113 #sidePanel,
  body.rrmDesktopHalfPopupsP42113 #workPanel,
  body.rrmDesktopHalfPopupsP42113 #productionPanel,
  body.rrmDesktopHalfPopupsP42113 #balancePanel,
  body.rrmDesktopHalfPopupsP42113 #stockPanel,
  body.rrmDesktopHalfPopupsP42113 #craftPanel,
  body.rrmDesktopHalfPopupsP42113 #researchPanel,
  body.rrmDesktopHalfPopupsP42113 #eventsPanel,
  body.rrmDesktopHalfPopupsP42113 #storyPanel,
  body.rrmDesktopHalfPopupsP42113 #savePanel,
  body.rrmDesktopHalfPopupsP42113 #visitorsPanel,
  body.rrmDesktopHalfPopupsP42113 #debugPanel,
  body.rrmDesktopHalfPopupsP42113 #farmPanel,
  body.rrmDesktopHalfPopupsP42113 #schedulePopup,
  body.rrmDesktopHalfPopupsP42113 #recreationPanel,
  body.rrmDesktopHalfPopupsP42113 #researchGatePanelP417{



  }
  body.rrmDesktopHalfPopupsP42113 #sidePanel.open,
  body.rrmDesktopHalfPopupsP42113 #sidePanel.sidePanel.open{



  }
  body.rrmDesktopHalfPopupsP42113 #objectPopup.objectPopup{




  }
  body.rrmDesktopHalfPopupsP42113 #buildMenu.buildMenu,
  body.rrmDesktopHalfPopupsP42113 .buildMenu#buildMenu{


  }
}

/* P5.51 — Coluna de colono compacta + agenda por relógio. */
#workPanel .wpName{
  min-width:160px!important;
}
#workPanel .wpColonistHead{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:6px!important;
  min-width:148px!important;
}
#workPanel .wpColonistName{
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:normal!important;
overflow-wrap:anywhere;}
#workPanel .wpScheduleBtn{
  flex:0 0 28px!important;
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  min-height:28px!important;
  padding:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:8px!important;
  line-height:1!important;
  font-size:15px!important;
}
@media (max-width:860px), (pointer:coarse){
  #workPanel .wpName{min-width:170px!important;}
  #workPanel .wpColonistHead{min-width:158px!important;}
  #workPanel .wpScheduleBtn{flex-basis:32px!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;font-size:16px!important;}
}


/* ===== Beyond Dawn canonical game input — P10.24.68 UI-D ===== */
.bdGameTextField{width:100%;min-height:42px;padding:9px 11px;text-align:left;border:1px solid var(--bd-border-soft);border-radius:8px;background:var(--bd-surface);color:var(--bd-text);font:inherit;cursor:pointer;box-shadow:var(--bd-shadow-button)}
.bdGameTextField.is-empty [data-bd-text-display]{color:var(--bd-text-muted)}.bdGameTextField:focus-visible,.bdQuantitySelector button:focus-visible,.bdGameKeyboard button:focus-visible{outline:2px solid var(--bd-focus);outline-offset:2px}
.bdQuantitySelector{display:inline-grid;grid-template-columns:auto minmax(48px,auto) auto;align-items:stretch;gap:4px;max-width:100%;vertical-align:middle}
.bdQuantitySelector>button,.bdQuantityShortcuts>button{min-width:32px;min-height:32px;padding:3px 7px;border:1px solid var(--bd-border-soft);border-radius:7px;background:var(--bd-surface);color:var(--bd-text);font-size:12px;font-weight:900;touch-action:none;user-select:none;-webkit-user-select:none;box-shadow:var(--bd-shadow-button)}
.bdQuantitySelector button:active{background:var(--bd-accent-active)}.bdQuantitySelector button:disabled{opacity:.38;cursor:not-allowed}.bdQuantityShortcuts{grid-column:1/-1;display:flex;justify-content:center;gap:4px}.bdQuantityShortcuts>button{font-size:9px;letter-spacing:.02em;flex:1 1 auto}
.bdQuantitySelector>output{min-width:58px;display:grid;place-items:center;padding:5px 10px;border:1px solid var(--bd-border);border-radius:8px;background:var(--bd-panel-alt);color:var(--bd-text);font-weight:900;font-variant-numeric:tabular-nums}
 .bdGameKeyboardOverlay{box-sizing:border-box;position:fixed;inset:0;z-index:var(--rrm-z-game-keyboard);display:flex;align-items:center;justify-content:center;padding:max(12px,var(--rrm-safe-top)) max(12px,env(safe-area-inset-right,0px)) max(12px,var(--rrm-safe-bottom)) max(12px,env(safe-area-inset-left,0px));background:var(--bd-overlay);backdrop-filter:blur(5px)}
.bdGameKeyboardOverlay[hidden]{display:none!important}
#bdGameKeyboardOverlay .bdGameKeyboard{box-sizing:border-box;width:min(600px,100%);max-width:100%;max-height:100%;overflow:auto;overscroll-behavior:contain;padding:14px;border:1px solid var(--bd-border);border-radius:16px;background:linear-gradient(180deg,var(--bd-panel-alt),var(--bd-panel));box-shadow:var(--bd-shadow-popup);color:var(--bd-text);--bd-key-gap:12px}
.bdGameKeyboard header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:7px 9px 13px}.bdGameKeyboard header small{display:block;color:var(--bd-text-muted);font-weight:800}.bdGameKeyboard header strong{display:block;min-height:31px;margin-top:3px;color:var(--bd-text);font-size:clamp(18px,4vw,26px);overflow-wrap:anywhere}.bdGameKeyboard header strong.is-empty:after{content:"│";opacity:.6}.bdGameKeyboard header span{color:var(--bd-accent);font-size:11px;font-weight:900}

#bdGameKeyboardOverlay .bdGameKeyboardGrid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:var(--bd-key-gap);padding:2px}
#bdGameKeyboardOverlay .bdGameKeyboardGrid.numeric{grid-template-columns:repeat(8,minmax(0,1fr))}
#bdGameKeyboardOverlay .bdGameKeyboardGrid.accents{grid-template-columns:repeat(6,minmax(0,1fr))}
#bdGameKeyboardOverlay .bdGameKeyboard button{box-sizing:border-box!important;position:relative!important;inset:auto!important;display:grid!important;place-items:center;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:44px!important;max-height:none!important;margin:0!important;padding:5px 2px!important;border:1px solid var(--bd-border-soft);border-radius:9px!important;background:var(--bd-surface);color:var(--bd-text);font-size:15px!important;line-height:1.1!important;font-weight:900;white-space:normal!important;overflow-wrap:anywhere;transform:none!important;touch-action:manipulation;box-shadow:var(--bd-shadow-button)}
#bdGameKeyboardOverlay .bdGameKeyboard button:active{background:var(--bd-accent-active)}
#bdGameKeyboardOverlay .bdGameKeyboardControlRow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,2fr) minmax(0,1fr);gap:var(--bd-key-gap);margin-top:12px;padding:2px}
#bdGameKeyboardOverlay .bdGameKeyboardActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--bd-key-gap);margin-top:16px;padding:2px}
#bdGameKeyboardOverlay .bdGameKeyboardActions button{min-height:46px!important}
#bdGameKeyboardOverlay .bdGameKeyboardActions .primary{border-color:var(--bd-accent);background:var(--bd-accent);color:var(--bd-selection-text)}
@media(max-width:720px),(pointer:coarse){#bdGameKeyboardOverlay .bdGameKeyboard{padding:10px;--bd-key-gap:10px}#bdGameKeyboardOverlay .bdGameKeyboard button{min-height:max(44px,var(--rrm-touch-target))!important;font-size:13px!important}.bdGameTextField{min-height:var(--rrm-touch-target)}.bdQuantitySelector{gap:4px}.bdQuantitySelector>button,.bdQuantityShortcuts>button{min-width:var(--rrm-touch-target);min-height:var(--rrm-touch-target);padding:4px 7px}.bdQuantitySelector>output{min-width:52px;padding:5px 7px}}
@media(max-width:500px){#bdGameKeyboardOverlay .bdGameKeyboardGrid{grid-template-columns:repeat(6,minmax(0,1fr))}#bdGameKeyboardOverlay .bdGameKeyboardGrid.numeric{grid-template-columns:repeat(6,minmax(0,1fr))}#bdGameKeyboardOverlay .bdGameKeyboardGrid.accents{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:360px){#bdGameKeyboardOverlay .bdGameKeyboardGrid,#bdGameKeyboardOverlay .bdGameKeyboardGrid.numeric,#bdGameKeyboardOverlay .bdGameKeyboardGrid.accents{grid-template-columns:repeat(5,minmax(0,1fr))}#bdGameKeyboardOverlay .bdGameKeyboardControlRow{grid-template-columns:repeat(3,minmax(0,1fr))}#bdGameKeyboardOverlay .bdGameKeyboardControlRow .wide{grid-column:span 2}}
/* Short landscape: allow vertical scrolling instead of shrinking keys or collapsing gaps. */
@media(max-height:420px){.bdGameKeyboardOverlay{padding:max(4px,var(--rrm-safe-top)) max(8px,env(safe-area-inset-right,0px)) max(4px,var(--rrm-safe-bottom)) max(8px,env(safe-area-inset-left,0px))}#bdGameKeyboardOverlay .bdGameKeyboard{padding:8px}.bdGameKeyboard header{gap:6px;padding:2px 6px 4px}.bdGameKeyboard header strong{min-height:24px;margin-top:0;font-size:18px;line-height:1.1}}

/* P10.24.69 UI-E — canonical DebugSection. Rendered only when runtime debug is enabled. */
.rrmDebugSectionP102469{margin:10px 0;border:1px solid var(--bd-border,var(--border));border-radius:8px;background:var(--bd-surface-secondary,var(--panel2));color:var(--bd-text-primary,var(--text));}
.rrmDebugSectionP102469>summary{cursor:pointer;padding:8px 10px;font-weight:700;color:var(--bd-text-secondary,var(--muted));}
.rrmDebugSectionBodyP102469{padding:0 10px 10px;}
.rrmDebugOnlyLineP102469{opacity:.82;font-size:.92em;}

/* P10.24.70 UI-F — migrated static feature presentation (no runtime <style> injection) */
/* UI-F migrated feature CSS: expedition */
.rrmExpeditionSiteCanvas{position:static!important;inset:auto!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;width:100%!important;max-width:620px!important;height:auto!important;max-height:none!important;display:block!important;border:1px solid var(--bd-border-soft);background:var(--bd-panel-alt);margin:8px 0;border-radius:6px;image-rendering:pixelated;box-sizing:border-box}
body.mobile-fullscreen-layout #objectPopupBody .rrmExpeditionSiteCanvas,body.fullscreen-active #objectPopupBody .rrmExpeditionSiteCanvas{position:static!important;inset:auto!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important}
.rrmExpeditionLegend{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.rrmExpeditionLegend span{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:var(--bd-text-muted)}
.rrmExpeditionSwatch{width:10px;height:10px;border:1px solid var(--bd-border-soft);display:inline-block}
.rrmExpeditionOffer{border:1px solid color-mix(in srgb,var(--bd-border-soft) 54%,transparent);border-radius:6px;padding:6px;margin:5px 0;background:color-mix(in srgb,var(--bd-surface) 48%,transparent)}
.rrmExpeditionCard .objectActionRow{gap:4px;flex-wrap:wrap}
@media(max-width:540px),(pointer:coarse){#objectPopupBody .rrmExpeditionSiteCanvas{width:100%!important;max-width:100%!important;height:auto!important;margin:7px 0!important}#objectPopupBody .rrmExpeditionLegend{gap:5px;margin:7px 0 2px!important}#objectPopupBody .rrmExpeditionLegend span{font-size:10px!important;line-height:1.1!important}.rrmExpeditionOffer{padding:8px!important}}
@media(max-height:520px){#objectPopupBody.rrmExpeditionSiteBodyP410{display:grid!important;grid-template-columns:minmax(300px,1fr) minmax(210px,300px)!important;grid-auto-rows:min-content!important;align-items:start!important;gap:6px!important;overflow-y:auto!important;padding:6px!important}.rrmExpeditionSiteSummaryP410{grid-column:1!important;grid-row:1 / span 2!important;min-width:0!important;margin:0!important;padding:6px!important;overflow:hidden!important}.rrmExpeditionSiteSummaryP410>b,.rrmExpeditionSiteSummaryP410>.statRow{display:none!important}.rrmExpeditionSiteReadP410{grid-column:2!important;grid-row:1!important;margin:0!important;padding:6px!important;max-height:none!important;overflow:visible!important}.rrmExpeditionSiteActionsP410{grid-column:2!important;grid-row:2!important;margin:0!important;padding:6px!important}.rrmExpeditionSiteActionsP410 .logLine{font-size:10px!important;line-height:1.18!important;padding:0 0 5px!important}.rrmExpeditionSiteActionsP410 .objectActionRow{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}.rrmExpeditionSiteActionsP410 .objectActionRow button{min-height:38px!important;font-size:12px!important;padding:6px!important}#objectPopupBody .rrmExpeditionSiteCanvas{position:static!important;inset:auto!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;width:auto!important;height:min(52dvh,210px)!important;max-width:100%!important;margin:0 auto 5px!important}.rrmExpeditionLegend{justify-content:center!important;margin:4px 0 0!important}.rrmExpeditionLegend span{font-size:9px!important}}

/* P10.26 — active enemy raids are a playable map; the initial site preview stays compact. */
#objectPopup.rrmExpeditionSitePopupP410[data-p626-raid-map="true"]{
  position:fixed!important;inset:2dvh 2dvw!important;width:auto!important;height:auto!important;
  min-width:0!important;max-width:none!important;max-height:none!important;margin:0!important;
  overflow:hidden!important;z-index:var(--rrm-z-modal,90000)!important;
}
#objectPopup.rrmExpeditionSitePopupP410[data-p626-raid-map="true"] .objectPopupHeader{flex:0 0 auto!important;}
#objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"]{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(270px,330px)!important;
  grid-template-rows:minmax(0,1fr)!important;gap:10px!important;min-height:0!important;
  overflow:hidden!important;padding:10px!important;touch-action:pan-y!important;
}
#objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteSummaryP410{
  grid-column:1!important;grid-row:1!important;display:flex!important;flex-direction:column!important;
  min-width:0!important;min-height:0!important;overflow:hidden!important;margin:0!important;padding:8px!important;
}
#objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteSummaryP410>b,
#objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteSummaryP410>.statRow,
#objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteReadP410{display:none!important;}
#objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteCanvas{
  width:100%!important;max-width:none!important;height:auto!important;max-height:calc(94dvh - 115px)!important;
  flex:0 1 auto!important;align-self:center!important;margin:0 auto!important;object-fit:contain!important;
  touch-action:none!important;cursor:crosshair!important;
}
#objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionLegend{flex:0 0 auto!important;margin:5px 0 0!important;justify-content:center!important;}
#objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteActionsP410{
  grid-column:2!important;grid-row:1!important;min-width:0!important;min-height:0!important;
  overflow:auto!important;overscroll-behavior:contain!important;margin:0!important;padding:10px!important;
}
#objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteActionsP410 .objectActionRow{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;
}
#objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmRaidCommandsP626 button{min-height:42px!important;white-space:normal!important;}
@media(max-width:900px),(pointer:coarse){
  #objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"]{
    grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) minmax(170px,32dvh)!important;gap:6px!important;padding:6px!important;
  }
  #objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteSummaryP410{grid-column:1!important;grid-row:1!important;padding:4px!important;}
  #objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteCanvas{max-height:calc(65dvh - 72px)!important;}
  #objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteActionsP410{grid-column:1!important;grid-row:2!important;padding:7px!important;}
  #objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteActionsP410 .objectActionRow{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-height:560px){
  #objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"]{
    grid-template-columns:minmax(0,1fr) minmax(220px,34vw)!important;grid-template-rows:minmax(0,1fr)!important;
  }
  #objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteSummaryP410{grid-column:1!important;grid-row:1!important;}
  #objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteCanvas{max-height:calc(90dvh - 48px)!important;}
  #objectPopupBody.rrmExpeditionSiteBodyP410[data-p626-raid-map="true"] .rrmExpeditionSiteActionsP410{grid-column:2!important;grid-row:1!important;}
}
/* UI-F migrated feature CSS: trading */
.tradingPostPanelP35{border-color:rgba(250,204,21,.35)!important;background:rgba(120,53,15,.18)!important}.tradeOffer button,.visitorCard button{margin:2px}.rrmReserveRowP102440{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:10px;align-items:center;margin:8px 0}.rrmReserveRowP102440 small{display:block;opacity:.78}.rrmTradeQuantityActionP102437{display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.rrmTradeDemandP102444{margin:8px 0;padding:7px;border:1px solid rgba(214,181,91,.25);border-radius:8px}
/* UI-F migrated feature CSS: restspot */
#restSpotBtn{position:relative;}
#restSpotBtn .restSpotIconP43910{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-weight:900;font-size:13px;letter-spacing:-1px;line-height:1;color:#dbeafe;text-shadow:0 1px 0 #172554,0 0 4px rgba(59,130,246,.55);}
#restSpotBtn.active{box-shadow:0 0 0 2px rgba(147,197,253,.75), inset 0 0 0 1px rgba(255,255,255,.18);}
/* UI-F migrated feature CSS: world */
#objectPopupBody.rrmNarrativeMapBodyP622{overflow-y:auto!important;padding:8px!important}
.rrmNarrativeMapBodyP622,.rrmCaravanJourneyBodyP624{display:flex;flex-direction:column;gap:8px}.rrmNarrativeMapBodyP622>.objectActionRow,.rrmCaravanJourneyBodyP624>.objectActionRow{position:sticky;bottom:-8px;z-index:4;margin-top:auto;padding:10px 0 2px;background:linear-gradient(180deg,rgba(17,24,39,0),rgba(17,24,39,.97) 34%)}
.rrmNarrativeStatsP629{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:0!important;padding:7px!important}.rrmNarrativeStatP629{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:7px;padding:7px 9px;border:1px solid rgba(148,163,184,.25);border-radius:7px;background:rgba(15,23,42,.38)}.rrmNarrativeStatP629 span{min-width:0;font-size:9px;line-height:1.15;white-space:normal;overflow:visible;text-overflow:clip;opacity:.84;overflow-wrap:anywhere;}.rrmNarrativeStatP629 strong{flex:0 0 auto;font-size:12px;color:var(--bd-title)}
@media(max-width:900px){.rrmNarrativeStatsP629{grid-template-columns:repeat(3,minmax(0,1fr))}}
.rrmWorldLocationGridP622,.rrmActiveCaravanGridP622{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
.rrmWorldLocationCardP622,.rrmActiveCaravanP622{min-width:0;border:1px solid rgba(148,163,184,.32);border-radius:8px;background:rgba(15,23,42,.72);padding:6px;overflow:hidden}
.rrmWorldLocationCardP622.centralMarket{border-color:rgba(250,204,21,.72);box-shadow:inset 0 0 0 1px rgba(250,204,21,.15)}
.rrmLocationPreviewP622{position:relative;height:82px;border-radius:7px;overflow:hidden;background-size:36px 36px;background-position:center bottom;image-rendering:pixelated;margin-bottom:5px;border:1px solid rgba(255,255,255,.05);box-shadow:inset 0 -20px 30px rgba(15,23,42,.35)}
.rrmLocSkyP622{position:absolute;inset:0;background:linear-gradient(180deg,rgba(125,168,217,.30),rgba(255,255,255,0) 58%);pointer-events:none}
.rrmLocPathP622{position:absolute;left:-12%;right:-12%;bottom:-6px;height:30px;border-radius:50% 50% 0 0/100% 100% 0 0;background:linear-gradient(180deg,rgba(194,160,102,.72),rgba(120,84,42,.84));opacity:.62;transform:rotate(-3deg);pointer-events:none}
.rrmLocationPreviewP622 img{position:absolute;width:40px;height:40px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 2px 2px rgba(0,0,0,.48))}
.rrmLocationPreviewP622 .p622hero{left:7%;bottom:2%}.rrmLocationPreviewP622 .p622mid{left:33%;bottom:14%}.rrmLocationPreviewP622 .p622accent{right:7%;bottom:4%}.rrmLocationPreviewP622 .p622support{right:30%;bottom:15%}
.rrmLocationPreviewP622.pattern1 .p622hero{left:18%;bottom:5%}.rrmLocationPreviewP622.pattern1 .p622mid{left:57%;bottom:6%}.rrmLocationPreviewP622.pattern1 .p622accent{right:34%;bottom:17%}.rrmLocationPreviewP622.pattern1 .p622support{right:8%;bottom:8%}
.rrmLocationPreviewP622.pattern2 .p622hero{left:8%;bottom:13%}.rrmLocationPreviewP622.pattern2 .p622mid{left:44%;bottom:3%}.rrmLocationPreviewP622.pattern2 .p622accent{right:8%;bottom:13%}.rrmLocationPreviewP622.pattern2 .p622support{right:40%;bottom:16%}
.rrmLocationPreviewP622.type-central_market .rrmLocPathP622,.rrmLocationPreviewP622.type-trade_route .rrmLocPathP622{background:linear-gradient(180deg,rgba(198,166,116,.82),rgba(124,88,45,.92));opacity:.78}
.rrmLocationPreviewP622.type-bandit_camp .rrmLocSkyP622{background:linear-gradient(180deg,rgba(248,113,113,.16),rgba(0,0,0,0) 55%)}
.rrmLocationTitleP622{font-weight:800;font-size:12px;white-space:normal;overflow:visible;text-overflow:clip;text-align:center;overflow-wrap:anywhere;}
.rrmLocationMetaP622,.rrmLocationGoodsP622{font-size:9px;line-height:1.15;text-align:center;white-space:normal;overflow:visible;text-overflow:clip;opacity:.86;overflow-wrap:anywhere;}
.rrmCaravanControlsP622{display:grid;grid-template-columns:1fr 1fr 48px;gap:3px;margin-top:5px;align-items:center}
.rrmCaravanControlsP622 select,.rrmCaravanControlsP622 input{min-width:0;width:100%!important;height:28px!important;font-size:9px!important;padding:2px!important}
.rrmHorseToggleP622{grid-column:1 / span 3;display:flex;align-items:center;justify-content:center;gap:5px;font-size:9px;min-height:24px;padding:2px 6px;border:1px solid rgba(148,163,184,.28);border-radius:6px;background:rgba(15,23,42,.32)}
.rrmHorseToggleP622 input{appearance:auto!important;-webkit-appearance:checkbox!important;width:16px!important;height:16px!important;min-width:16px!important;margin:0!important;accent-color:#d6b55b!important}
.rrmHorseToggleP622.ready{border-color:rgba(214,181,91,.62);color:#fef3c7}.rrmHorseToggleP622.unavailable{opacity:.66;color:var(--bd-text-muted)}.rrmHorseToggleP622.unavailable input{opacity:.55}
.rrmCreateCaravanP622{width:100%!important;min-height:30px!important;font-size:10px!important;padding:4px!important;margin-top:3px}
.rrmActiveCaravanP622 small,.rrmHistoryCaravanP622 small{display:block;font-size:9px;opacity:.84}.rrmHorseLineP622{display:flex;align-items:center;gap:4px;font-size:9px}.rrmHorseLineP622 img{width:30px;height:30px;image-rendering:pixelated}.rrmActiveCargoP622{font-size:9px}.rrmActiveCaravanP622 button{width:100%;min-height:28px;font-size:9px}
.rrmHistoryGridP622{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.rrmHistoryCaravanP622{border:1px solid rgba(148,163,184,.2);padding:5px;border-radius:6px;min-width:0}
.rrmLocationReadyP623{display:grid;gap:2px;margin:5px 0;font-size:8px;line-height:1.2;opacity:.88}.rrmLocationReadyP623 span{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;}
#objectPopupBody.rrmCaravanComposerBodyP623{overflow-y:auto!important;padding:8px!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important}
.rrmComposerHeaderP623{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 9px;margin-bottom:7px;border:1px solid rgba(148,163,184,.24);border-radius:8px;background:rgba(15,23,42,.42)}
.rrmComposerHeaderP623>div:first-child{min-width:0}.rrmComposerHeaderP623 b,.rrmComposerHeaderP623 small{display:block}.rrmComposerHeaderP623 small{font-size:10px;opacity:.78}
.rrmComposerSummaryP623{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}.rrmComposerSummaryP623 span{padding:4px 7px;border:1px solid rgba(148,163,184,.30);border-radius:999px;background:rgba(15,23,42,.58);font-size:10px;white-space:nowrap}
.rrmComposerGridP623{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:stretch;min-height:0}
.rrmComposerSectionP623{margin:0!important;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.rrmComposerSectionTitleP623{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;flex:0 0 auto}.rrmComposerSectionTitleP623 b,.rrmComposerSectionTitleP623 small{display:block}.rrmComposerSectionTitleP623 small{font-size:9px;opacity:.72}.rrmComposerSectionTitleP623 button{min-height:27px!important;padding:3px 7px!important;font-size:9px!important}
.rrmComposerPawnListP623,.rrmComposerCargoListP623{display:grid;gap:4px;max-height:none;min-height:0;overflow-y:visible!important;overflow-x:visible!important;padding-right:3px;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;scrollbar-gutter:stable;scrollbar-width:thin}.rrmComposerPawnListP623>* ,.rrmComposerCargoListP623>*{min-width:0}
.rrmComposerPawnP623{display:grid;grid-template-columns:18px 42px minmax(0,1fr) auto;align-items:center;gap:6px;padding:5px;border:1px solid rgba(148,163,184,.24);border-radius:7px;background:rgba(15,23,42,.34);cursor:pointer;touch-action:pan-y!important}.rrmComposerPawnP623 span,.rrmComposerPawnP623 b,.rrmComposerPawnP623 small,.rrmComposerPawnP623 strong,.rrmComposerPawnP623 img,.rrmComposerPawnFallbackP623{touch-action:pan-y!important}
.rrmComposerPawnP623:hover{border-color:rgba(214,181,91,.48)}.rrmComposerPawnP623:has(input:checked){border-color:rgba(250,204,21,.72);background:rgba(120,53,15,.24)}
.rrmComposerPawnP623 input{appearance:auto!important;-webkit-appearance:checkbox!important;width:16px!important;height:16px!important;margin:0!important;accent-color:#d6b55b!important;touch-action:manipulation!important}
.rrmComposerPawnP623 img,.rrmComposerPawnFallbackP623{width:40px;height:40px;object-fit:contain;image-rendering:pixelated;display:grid;place-items:center;font-size:24px}
.rrmComposerPawnInfoP623{min-width:0}.rrmComposerPawnInfoP623 b,.rrmComposerPawnInfoP623 small{display:block;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;}.rrmComposerPawnInfoP623 b{font-size:11px}.rrmComposerPawnInfoP623 small{font-size:8.5px;opacity:.76}.rrmComposerPawnP623 strong{font-size:10px;white-space:nowrap}
.rrmComposerCargoP623{display:grid;grid-template-columns:minmax(0,1fr) 76px 46px;gap:5px;align-items:center;padding:6px;border:1px solid rgba(148,163,184,.22);border-radius:7px;background:rgba(15,23,42,.31)}
.rrmComposerCargoP623 span{min-width:0}.rrmComposerCargoP623 b,.rrmComposerCargoP623 small{display:block;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;}.rrmComposerCargoP623 b{font-size:10px}.rrmComposerCargoP623 small{font-size:8px;opacity:.72}
.rrmComposerCargoP623 input{width:100%!important;min-width:0!important;height:30px!important;font-size:10px!important;padding:3px 5px!important}.rrmComposerCargoP623 button{min-height:30px!important;padding:3px!important;font-size:8px!important}
.rrmComposerFooterPanelP623{margin-top:8px!important}.rrmComposerFooterPanelP623 .rrmHorseToggleP622{grid-column:auto}.rrmComposerActionsP623{justify-content:flex-end}.rrmComposerActionsP623 button{min-width:150px}.rrmComposerConfirmP623{border-color:rgba(250,204,21,.72)!important}.rrmComposerMessageP623{min-height:18px;font-size:10px;padding:3px 0}.rrmComposerMessageP623.error{color:#fecaca}.rrmComposerMessageP623.working{color:var(--bd-title)}
.rrmActiveCaravanP622{cursor:pointer;transition:border-color .15s ease,transform .15s ease,background .15s ease}.rrmActiveCaravanP622:hover,.rrmActiveCaravanP622:focus{border-color:rgba(250,204,21,.72);background:rgba(48,38,26,.82);outline:none;transform:translateY(-1px)}
.rrmActiveCaravanHeadP624{display:flex;align-items:center;justify-content:space-between;gap:6px}.rrmActiveCaravanHeadP624 b{min-width:0;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;}.rrmActiveCaravanHeadP624 span{font-size:9px;color:var(--bd-title)}.rrmActiveCaravanProgressP624{height:5px!important;margin:5px 0!important}.rrmActiveCaravanHintP624{text-align:center;font-size:8px;color:var(--bd-title);opacity:.82;margin-top:4px}
#objectPopupBody.rrmCaravanJourneyBodyP624{overflow-y:auto!important;padding:8px!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
.rrmJourneyHeroP624{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:8px;align-items:start}.rrmJourneyCanvasWrapP624{position:relative;min-width:0;width:100%;height:360px;border:1px solid rgba(214,181,91,.42);border-radius:9px;background:#253247;overflow:hidden;padding:0;box-sizing:border-box}.rrmJourneyCanvasWrapP624 canvas{display:block;width:100%;height:100%;min-height:0;border-radius:6px;image-rendering:pixelated;touch-action:pan-y;box-sizing:border-box}.rrmJourneyCanvasLegendP624{position:absolute;left:12px;right:12px;bottom:9px;display:flex;justify-content:space-between;pointer-events:none}.rrmJourneyCanvasLegendP624 span{padding:2px 6px;border-radius:999px;background:rgba(15,23,42,.78);font-size:8px;color:var(--bd-text)}
.rrmJourneyStatsP624{border:1px solid rgba(148,163,184,.28);border-radius:8px;background:rgba(15,23,42,.62);padding:7px;min-width:0}.rrmJourneyStatsP624 .statRow{gap:8px}.rrmJourneyStatsP624 strong{text-align:right;font-size:10px}.rrmJourneyProgressP624{height:8px!important;margin:6px 0 8px!important}
.rrmJourneyInfoGridP624{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-top:8px}.rrmJourneySectionP624{margin:0!important;min-width:0;overflow:hidden}.rrmJourneyMemberListP624,.rrmJourneyCargoListP624{display:grid;gap:4px;max-height:none;overflow-y:visible;padding-right:3px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.rrmJourneyPawnP624{display:grid;grid-template-columns:40px minmax(0,1fr);gap:7px;align-items:center;padding:5px;border:1px solid rgba(148,163,184,.22);border-radius:7px;background:rgba(15,23,42,.30)}.rrmJourneyPawnP624 img,.rrmJourneyPawnFallbackP624{width:38px;height:38px;object-fit:contain;image-rendering:pixelated;display:grid;place-items:center;font-size:23px}.rrmJourneyPawnP624 b,.rrmJourneyPawnP624 small{display:block;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;}.rrmJourneyPawnP624 b{font-size:10px}.rrmJourneyPawnP624 small{font-size:8px;opacity:.78}
.rrmJourneyCargoRowP624{display:grid;grid-template-columns:25px minmax(0,1fr) auto;gap:6px;align-items:center;padding:6px;border:1px solid rgba(148,163,184,.22);border-radius:7px;background:rgba(15,23,42,.30)}.rrmJourneyCargoRowP624>span:first-child{font-size:18px}.rrmJourneyCargoRowP624 b,.rrmJourneyCargoRowP624 small{display:block;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;}.rrmJourneyCargoRowP624 b{font-size:10px}.rrmJourneyCargoRowP624 small{font-size:8px;opacity:.74}.rrmJourneyCargoRowP624 strong{font-size:10px;color:var(--bd-title)}
.rrmJourneyDiaryP624{margin-top:8px!important}.rrmJourneyDiaryTitleP624{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}.rrmJourneyDiaryTitleP624 b,.rrmJourneyDiaryTitleP624 small{display:block}.rrmJourneyDiaryTitleP624 small{font-size:8px;opacity:.72}.rrmJourneyDiaryTitleP624>span:last-child{font-size:8px;opacity:.7;white-space:nowrap}.rrmJourneyEventListP624{display:grid;gap:5px;max-height:none;overflow-y:visible;padding-right:3px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}.rrmJourneyEventP624{display:grid;grid-template-columns:26px minmax(0,1fr);gap:7px;padding:6px;border-left:2px solid rgba(214,181,91,.52);background:rgba(15,23,42,.30);border-radius:0 7px 7px 0}.rrmJourneyEventP624>span{font-size:18px}.rrmJourneyEventP624 b{font-size:8px;color:var(--bd-title)}.rrmJourneyEventP624 p{font-size:10px;line-height:1.25;margin:2px 0 0;color:#e2e8f0}.rrmJourneyActionsP624{justify-content:flex-end;margin-top:8px}
@media(max-width:620px){.rrmJourneyHeroP624{grid-template-columns:1fr}.rrmJourneyCanvasWrapP624{height:360px}.rrmJourneyCanvasWrapP624 canvas{min-height:0}.rrmJourneyStatsP624{display:grid;grid-template-columns:1fr 1fr;gap:3px}.rrmJourneyStatsP624 .progressBar{grid-column:1 / -1}.rrmJourneyInfoGridP624{grid-template-columns:1fr}.rrmJourneyMemberListP624,.rrmJourneyCargoListP624{max-height:25vh}.rrmJourneyEventListP624{max-height:30vh}.rrmJourneyActionsP624{display:grid!important;grid-template-columns:1fr 1fr!important}.rrmJourneyActionsP624 button{width:100%!important;min-width:0!important}}
@media(max-width:620px){.rrmNarrativeStatsP629{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;padding:5px!important}.rrmNarrativeStatP629{padding:5px 6px}.rrmNarrativeStatP629 span{font-size:8px}.rrmNarrativeStatP629 strong{font-size:10px}.rrmWorldLocationGridP622,.rrmActiveCaravanGridP622{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important}.rrmWorldLocationCardP622{padding:3px}.rrmLocationPreviewP622{height:56px}.rrmLocationPreviewP622 img{width:30px;height:30px}.rrmLocationTitleP622{font-size:8.5px}.rrmLocationMetaP622,.rrmLocationGoodsP622{font-size:7.5px}.rrmCreateCaravanP622{font-size:8px!important;min-height:27px!important}.rrmHistoryGridP622{grid-template-columns:repeat(3,minmax(0,1fr))}.rrmComposerHeaderP623{align-items:flex-start;padding:5px}.rrmComposerSummaryP623{max-width:48%}.rrmComposerSummaryP623 span{font-size:8px;padding:3px 5px}.rrmComposerGridP623{grid-template-columns:1fr}.rrmComposerPawnListP623,.rrmComposerCargoListP623{max-height:30vh}.rrmComposerPawnP623{grid-template-columns:18px 34px minmax(0,1fr) auto;padding:4px}.rrmComposerPawnP623 img,.rrmComposerPawnFallbackP623{width:32px;height:32px}.rrmComposerCargoP623{grid-template-columns:minmax(0,1fr) 64px 42px;padding:4px}.rrmComposerActionsP623{display:grid!important;grid-template-columns:1fr 1fr!important}.rrmComposerActionsP623 button{min-width:0!important;width:100%!important}}
/* UI-F migrated feature CSS: prison */
.rrmPrisonPanelP627{margin-top:8px;padding:7px;border:1px solid rgba(249,115,22,.45);border-radius:7px;background:rgba(67,35,18,.35)}.rrmPrisonerListP627{display:grid;gap:4px;margin:6px 0}.rrmPrisonerRowP627{display:flex;justify-content:space-between;gap:8px;padding:5px;border-radius:5px;background:rgba(15,23,42,.42);font-size:9px}.rrmPrisonerRowP627 span{opacity:.8;text-align:right}
/* UI-F migrated feature CSS: debug */
#pawnStateDebugPanelP42712{position:fixed;right:14px;bottom:72px;width:min(560px,calc(100vw - 28px));max-height:min(680px,calc(100vh - 96px));overflow:auto;z-index:var(--rrm-z-debug-overlay);background:#111827;color:#e5e7eb;border:1px solid #374151;border-radius:8px;box-shadow:0 18px 50px rgba(0,0,0,.45);font:13px/1.35 system-ui,sans-serif}
#pawnStateDebugPanelP42712 .p42712Head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-bottom:1px solid #374151;background:#0f172a;position:sticky;top:0}
#pawnStateDebugPanelP42712 .p42712Head b{font-size:14px}
#pawnStateDebugPanelP42712 button{border:1px solid #4b5563;background:#1f2937;color:#e5e7eb;border-radius:6px;padding:5px 8px;cursor:pointer}
#pawnStateDebugPanelP42712 .p42712Body{padding:10px 12px;display:grid;gap:8px}
#pawnStateDebugPanelP42712 .p42712Summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
#pawnStateDebugPanelP42712 .p42712Metric{background:#172033;border:1px solid #2f3b52;border-radius:6px;padding:8px}
#pawnStateDebugPanelP42712 .p42712Metric span{display:block;color:#9ca3af;font-size:11px}
#pawnStateDebugPanelP42712 .p42712Row{border:1px solid #334155;border-radius:6px;padding:8px;background:#121a2a}
#pawnStateDebugPanelP42712 .p42712Row.ok{opacity:.76}
#pawnStateDebugPanelP42712 .p42712Top{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
#pawnStateDebugPanelP42712 .p42712Reason{color:#fbbf24}
#pawnStateDebugPanelP42712 small{color:#9ca3af}
#pawnStateDebugBtnP42712{min-width:30px}
/* UI-F migrated feature CSS: completion */
.rrmLetterP6429{display:grid;gap:12px}.rrmLetterMetaP6429{display:grid;grid-template-columns:2fr 1fr .6fr;gap:8px}.rrmLetterMetaP6429>div,.rrmLetterEffectP6429{padding:9px 11px;border:1px solid var(--bd-border-soft);border-radius:10px;background:var(--bd-panel-alt);color:var(--bd-text)}.rrmLetterMetaP6429 span,.rrmLetterMetaP6429 b{display:block}.rrmLetterMetaP6429 span{font-size:10px;opacity:.72}.rrmLetterP6429 article{padding:14px;border-left:3px solid var(--bd-accent);background:var(--bd-surface);color:var(--bd-text);border-radius:8px}.rrmLetterP6429 article h3{margin:0 0 8px;color:var(--bd-title,var(--bd-selection))}.rrmLetterP6429 article p{margin:0;white-space:pre-wrap;line-height:1.55}.rrmLetterEffectP6429{display:grid;gap:4px}.rrmLetterEffectP6429 b{color:var(--bd-title,var(--bd-selection))}.rrmMessageInboxP6429{display:grid;gap:6px}.rrmMessageRowP6429{display:flex!important;align-items:center;justify-content:space-between;gap:10px;width:100%;text-align:left;padding:8px 10px}.rrmMessageRowP6429 span{min-width:0}.rrmMessageRowP6429 strong,.rrmMessageRowP6429 small{display:block;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.rrmMessageRowP6429 small{opacity:.7}.rrmMessageRowP6429 em{font-style:normal;opacity:.75}.p6429IndustrySection{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:8px}.p6429IndustryTitle{grid-column:1/-1;font-size:11px;color:var(--bd-title,var(--bd-selection));opacity:.85}.p6429IndustryButton{display:flex!important;align-items:center;gap:7px;min-width:0}.p6429IndustryButton span:last-child{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}@media(max-width:700px){.rrmLetterMetaP6429{grid-template-columns:1fr 1fr}.rrmLetterMetaP6429>div:first-child{grid-column:1/-1}.p6429IndustrySection{grid-template-columns:1fr}}
/* UI-F migrated feature CSS: pasture */
#objectPopup.rrmPasturePopupP630{border-color:rgba(214,181,91,.78)!important}
#objectPopupBody.rrmPastureBodyP630{padding:10px!important;box-sizing:border-box;background:linear-gradient(180deg,rgba(9,24,39,.99),rgba(6,17,30,.99))}
.rrmPastureP630{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"label" "hero" "controls" "footer" "actions";gap:10px;min-width:0;color:#edf4fb}.rrmPastureLabelP630{grid-area:label}.rrmPastureHeroP630{grid-area:hero}.rrmPastureControlsP630{grid-area:controls}.rrmPastureFooterP630{grid-area:footer}.rrmPastureObjectActionsP630{grid-area:actions}.rrmPastureLabelP630 small{display:block;opacity:.72;margin-bottom:4px}.rrmPastureLabelP630>div{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.rrmPastureLabelP630 b{min-width:min(420px,65%);padding:8px 12px;border:1px solid rgba(214,181,91,.55);border-radius:9px;background:rgba(15,31,48,.8);font-size:17px;color:#f7dda0}.rrmPastureLabelP630 button{width:38px!important;min-width:38px!important;height:38px!important;padding:0!important}
.rrmPastureHeroP630{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(250px,.9fr);gap:10px;align-items:start;min-height:0}.rrmPastureCanvasWrapP630{position:relative;min-width:0;width:100%;height:clamp(180px,28vh,240px);max-height:240px;border:2px solid rgba(214,181,91,.62);border-radius:13px;overflow:hidden;background:#6f983f}.rrmPastureCanvasWrapP630 canvas{position:static!important;inset:auto!important;display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-width:none!important;max-height:none!important;margin:0!important}.rrmPastureStatsP630{display:grid;align-content:start;grid-auto-rows:min-content;gap:6px}.rrmPastureCountP630{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;border:1px solid rgba(148,163,184,.25);border-radius:8px;background:rgba(12,28,45,.82)}.rrmPastureCountP630 b{color:#f7dda0}.rrmPastureCountP630 .male{color:#38bdf8}.rrmPastureCountP630 .female{color:var(--bd-danger)}
.rrmPastureMetricP630{padding:8px 10px;border:1px solid rgba(214,181,91,.28);border-radius:9px;background:rgba(12,28,45,.82)}.rrmPastureMetricP630>div:first-child{display:flex;justify-content:space-between;gap:8px}.rrmPastureMetricP630 b{color:var(--bd-success);font-size:16px}.rrmPastureBarP630{height:10px;border-radius:999px;background:rgba(148,163,184,.22);overflow:hidden;margin-top:6px}.rrmPastureBarP630 i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#43a937,#7ed957)}
.rrmPastureControlsP630{display:grid;grid-template-columns:minmax(0,.9fr) minmax(300px,1.35fr) minmax(0,1fr);gap:10px}.rrmPastureControlsP630>section{min-width:0;padding:12px;border:1px solid rgba(214,181,91,.38);border-radius:12px;background:linear-gradient(180deg,rgba(16,34,52,.94),rgba(9,24,39,.94));display:flex;flex-direction:column}.rrmPastureControlsP630 header{display:flex;align-items:center;gap:8px;font-size:16px;color:#f7dda0}.rrmPastureControlsP630 header span{font-size:22px}.rrmPastureControlsP630 p{margin:7px 0 10px;opacity:.72;font-size:10px;line-height:1.35}.rrmPastureToggleP630{margin-top:auto!important;width:58px!important;min-width:58px!important;height:32px!important;padding:3px!important;border-radius:999px!important;background:#334155!important}.rrmPastureToggleP630 span{display:block;width:24px;height:24px;border-radius:50%;background:#e5e7eb;transition:transform .15s}.rrmPastureToggleP630.on{background:#3f9d2f!important}.rrmPastureToggleP630.on span{transform:translateX(25px)}
.rrmPastureRulesP630{display:grid;gap:4px;margin-top:8px}.rrmPastureRuleP630{display:grid;grid-template-columns:minmax(0,1fr) 28px 24px 28px;align-items:center;gap:4px;padding:3px 5px;border:1px solid rgba(148,163,184,.18);border-radius:7px;background:rgba(5,17,30,.45);font-size:9px}.rrmPastureRuleP630 button{width:28px!important;min-width:28px!important;height:27px!important;min-height:27px!important;padding:0!important}.rrmPastureRuleP630 b{text-align:center;color:#f7dda0}.rrmPastureRulesP630 label{display:grid;grid-template-columns:minmax(0,1fr) 120px;align-items:center;gap:5px;font-size:9px}.rrmPastureRulesP630 select{height:29px!important;padding:2px 6px!important;font-size:9px!important}.rrmPasturePriorityP630{display:grid;grid-template-columns:1fr 1fr 1fr;margin-top:auto}.rrmPasturePriorityP630 button{min-width:0!important;border-radius:0!important}.rrmPasturePriorityP630 button:first-child{border-radius:8px 0 0 8px!important}.rrmPasturePriorityP630 button:last-child{border-radius:0 8px 8px 0!important}.rrmPasturePriorityP630 .active{color:#f7dda0!important;border-color:#d6b55b!important;background:rgba(128,87,19,.32)!important}
.rrmPastureFooterP630{display:grid;grid-template-columns:1.15fr 1fr .9fr;gap:8px}.rrmPastureFooterP630 section{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:8px;padding:9px 11px;border:1px solid rgba(214,181,91,.32);border-radius:10px;background:rgba(13,29,46,.92)}.rrmPastureFooterP630 section>span{font-size:27px}.rrmPastureFooterP630 small,.rrmPastureFooterP630 b{display:block}.rrmPastureFooterP630 small{opacity:.72}.rrmPastureFooterP630 b{color:#f7dda0}.rrmPastureFooterP630 .health{color:var(--bd-success)}.rrmPastureFooterP630 button{min-width:105px!important}.rrmPastureObjectActionsP630{display:flex;justify-content:flex-end;gap:7px}.rrmPastureObjectActionsP630 button{font-size:9px!important}
@media(max-width:900px){.rrmPastureHeroP630{grid-template-columns:minmax(0,1fr) 230px}.rrmPastureCanvasWrapP630{height:210px!important;max-height:210px!important}.rrmPastureControlsP630{grid-template-columns:1fr 1.25fr 1fr;gap:6px}.rrmPastureControlsP630>section{padding:8px}.rrmPastureFooterP630{grid-template-columns:1fr 1fr 1fr}.rrmPastureFooterP630 section{grid-template-columns:30px minmax(0,1fr);padding:7px}.rrmPastureFooterP630 section button{grid-column:1/-1;width:100%!important}.rrmPastureRuleP630{grid-template-columns:minmax(0,1fr) 25px 19px 25px}.rrmPastureRuleP630 button{width:25px!important;min-width:25px!important}}
@media(max-height:760px){.rrmPastureP630{gap:8px}.rrmPastureHeroP630{grid-template-columns:minmax(0,1.2fr) 220px;gap:8px}.rrmPastureCanvasWrapP630{height:180px!important;max-height:180px!important}.rrmPastureControlsP630{gap:8px}.rrmPastureControlsP630>section{padding:9px}.rrmPastureFooterP630 section{padding:8px 9px}.rrmPastureObjectActionsP630{padding-bottom:2px}}
@media(max-width:620px){.rrmPastureHeroP630{grid-template-columns:1fr}.rrmPastureCanvasWrapP630{height:180px!important;max-height:180px!important}.rrmPastureStatsP630{grid-template-columns:1fr 1fr}.rrmPastureMetricP630{grid-column:span 2}.rrmPastureControlsP630{grid-template-columns:1fr}.rrmPastureFooterP630{grid-template-columns:1fr}.rrmPastureFooterP630 section{grid-template-columns:36px minmax(0,1fr) auto}.rrmPastureFooterP630 section button{grid-column:auto;width:auto!important}.rrmPastureObjectActionsP630{display:grid;grid-template-columns:1fr 1fr}.rrmPastureObjectActionsP630 button{width:100%!important;min-width:0!important}}
@media(max-height:620px) and (min-width:621px){.rrmPastureP630{gap:7px!important}.rrmPastureHeroP630{grid-template-columns:minmax(0,1.45fr) minmax(210px,.8fr)!important;gap:7px!important}.rrmPastureCanvasWrapP630{height:150px!important;max-height:150px!important}.rrmPastureStatsP630{grid-template-columns:1fr 1fr!important;gap:4px!important}.rrmPastureCountP630{padding:5px 7px!important;font-size:9px!important}.rrmPastureMetricP630{grid-column:span 2!important;padding:5px 7px!important}.rrmPastureControlsP630{grid-template-columns:minmax(0,.85fr) minmax(0,1.35fr) minmax(0,1fr)!important;gap:7px!important}.rrmPastureControlsP630>section{padding:7px!important}.rrmPastureControlsP630 header{font-size:11px!important}.rrmPastureControlsP630 header span{font-size:16px!important}.rrmPastureControlsP630 p{margin:4px 0 6px!important;font-size:8px!important}.rrmPastureRulesP630{margin-top:5px!important;gap:3px!important}.rrmPastureFooterP630{grid-template-columns:1.15fr 1fr .9fr!important;gap:7px!important}.rrmPastureFooterP630 section{grid-template-columns:27px minmax(0,1fr) auto!important;padding:6px 7px!important}.rrmPastureFooterP630 section>span{font-size:20px!important}.rrmPastureFooterP630 section button{grid-column:auto!important;width:auto!important;min-width:78px!important}.rrmPastureObjectActionsP630{padding-bottom:2px!important}}

/* P6.30.3 - uma prévia por espécie, sem lista/seleção individual no pasto. */
.rrmPastureSpeciesBadgeP630{position:absolute;z-index:2;left:10px;top:10px;max-width:calc(100% - 20px);padding:6px 10px;border:1px solid var(--bd-border-soft,rgba(214,181,91,.65));border-radius:999px;background:var(--bd-panel,rgba(9,24,39,.92));color:var(--bd-title,#f7dda0);font-size:11px;font-weight:800;line-height:1.15;box-shadow:0 3px 10px rgba(0,0,0,.28);pointer-events:none}
html body.rrmModernUiP485 #objectPopup.rrmPasturePopupP630 .rrmPastureStatsP630{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
html body.rrmModernUiP485 #objectPopup.rrmPasturePopupP630 .rrmPastureCountP630:first-child{grid-column:1/-1;min-height:40px}
html body.rrmModernUiP485 #objectPopup.rrmPasturePopupP630 .rrmPastureMetricP630{grid-column:1/-1;min-width:0}
html body.rrmModernUiP485 #objectPopup.rrmPasturePopupP630 .rrmPastureCountP630{min-width:0;gap:6px}
@media(max-width:620px){html body.rrmModernUiP485 #objectPopup.rrmPasturePopupP630 .rrmPastureStatsP630{grid-template-columns:repeat(2,minmax(0,1fr))}html body.rrmModernUiP485 #objectPopup.rrmPasturePopupP630 .rrmPastureCountP630:first-child{grid-column:1/-1}}

/* P10.25.0 - non-emoji icon assets for icon-only controls. */
.rrmUiIconImage{
  display:block;
  width:70%;
  height:70%;
  object-fit:contain;
  pointer-events:none;
  user-select:none;
}


/* P10.25.10 AGR-5 - notificações sazonais agrícolas compactas */
#rrmAgr5SeasonalNoticeHost{
  position:fixed;
  top:calc(var(--topbar-height,44px) + var(--safe-top,0px) + 10px);
  right:max(10px,var(--safe-right,0px));
  width:min(380px,calc(100vw - 20px));
  z-index:100040;
  pointer-events:none;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.rrmAgr5SeasonalNotice{
  pointer-events:auto;
  box-sizing:border-box;
  border:1px solid color-mix(in srgb,var(--bd-border-soft,#64748b) 72%,transparent);
  border-left:4px solid var(--bd-warning,#facc15);
  border-radius:12px;
  background:color-mix(in srgb,var(--bd-panel,#111827) 96%,transparent);
  box-shadow:0 12px 34px rgba(0,0,0,.32);
  padding:10px 38px 10px 12px;
  color:var(--bd-text,#e5e7eb);
  position:relative;
  backdrop-filter:blur(8px);
}
.rrmAgr5SeasonalNotice[data-kind="danger"]{border-left-color:var(--bd-danger,#ef4444)}
.rrmAgr5SeasonalNoticeTitle{font-weight:800;font-size:14px;line-height:1.25;margin:0 0 4px}
.rrmAgr5SeasonalNoticeDesc{font-size:12px;line-height:1.4;color:var(--bd-text-muted,#cbd5e1)}
.rrmAgr5SeasonalNoticeClose{
  position:absolute;right:6px;top:6px;width:28px;height:28px;border:0;border-radius:8px;
  background:transparent;color:inherit;font-size:18px;line-height:1;cursor:pointer;
}
@media(max-width:520px){
  #rrmAgr5SeasonalNoticeHost{left:8px;right:8px;width:auto;top:calc(var(--topbar-height,44px) + var(--safe-top,0px) + 6px)}
  .rrmAgr5SeasonalNotice{padding:9px 36px 9px 10px}
}

/* P10.25.22 — Landscape mobile map setup keeps its actions inside a swipeable card. */
@media (max-height:600px) and (min-aspect-ratio:6/5){
  #mapSetupScreen{
    overflow:hidden!important;
    height:100dvh!important;
    max-height:100dvh!important;
    padding:8px!important;
    align-items:flex-start!important;
    justify-content:center!important;
    touch-action:pan-y!important;
  }
  #mapSetupScreen .mapSetupCard{
    max-height:calc(100dvh - 16px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-y!important;
  }
}

/* P6.30.5: fullscreen gameplay normally pins every canvas to the viewport.
   Keep the pasture illustration inside its own responsive preview frame. */
#objectPopup.rrmPasturePopupP630 .rrmPastureCanvasWrapP630>canvas{
  position:static!important;
  inset:auto!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
}
/* Connected Colonies profile: canonical settings surface and in-game text fields. */
#ccProfilePanel:not([hidden]) { display:flex; flex-direction:column; gap:8px; min-width:0; overflow-wrap:anywhere; }
#ccProfilePanel button, #ccProfilePanel a, #ccProfilePanel .bdGameTextField { min-height:44px; max-width:100%; white-space:normal; }
#ccProfilePanel button { width:100%; }
#ccProfilePanel p { margin:0; }
#ccProfilePanel .ccSnapshotPanel:not([hidden]) { display:flex; flex-direction:column; gap:8px; min-width:0; }
#ccProfilePanel .ccSnapshotPanel h3, #ccProfilePanel .ccSnapshotPanel h4 { margin:8px 0 0; }
#ccProfilePanel .ccSnapshotPanel label input { flex-shrink:0; }
/* The world canvas fullscreen policy must not expand the read-only snapshot. */
#ccProfilePanel .ccSnapshotPanel canvas { position:static!important; inset:auto!important; display:block; width:min(100%,320px)!important; height:auto!important; max-width:100%; image-rendering:pixelated; }
#ccProfilePanel label { display:flex; align-items:center; gap:8px; min-height:44px; }

/* CC-2 non-binding offer listings: canonical quantity controls, responsive rows. */
#ccProfilePanel .ccOfferPanel:not([hidden]), #ccProfilePanel .ccOfferPanel fieldset, #ccProfilePanel .ccOfferRow { display:flex; flex-direction:column; gap:8px; min-width:0; }
#ccProfilePanel .ccOfferPanel fieldset { margin:8px 0; padding:8px; border:1px solid currentColor; border-radius:6px; }
#ccProfilePanel .ccOfferRow select { width:100%; min-width:0; min-height:44px; }
#ccProfilePanel .ccOfferRow .bdQuantitySelector button { width:auto; min-width:36px; }

/* Recovery is an ordinary settings section: inherit theme, scroll and touch sizing. */
#ccProfilePanel .ccRecoveryPanel:not([hidden]) { display:flex; flex-direction:column; gap:8px; min-width:0; }
#ccProfilePanel .ccRecoveryPanel h3 { margin:8px 0 0; }
#ccProfilePanel .ccRecoveryPanel label input { flex-shrink:0; }
