/* R40 A：系統資訊卡與每日印章冊。 */
.o-story-impact {
  margin-top: 6px; padding: 5px 7px; border: 1px solid #cdb77f; border-radius: 4px;
  background: #fff8df; color: #5f4a27; font-size: 12px; line-height: 1.35;
}
.o-story-impact.risky { border-color: #c56c45; background: #fff0d5; color: #823d25; font-weight: 700; }
.world-objective-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 7px 0; }
.world-objective-routes > strong { grid-column: 1 / -1; font-size: 11px; color: #694b25; }
.world-objective-routes .route { display: grid; gap: 2px; width: 100%; min-height: 44px; margin: 0; padding: 6px 8px; text-align: left; cursor: pointer; }
.world-objective-routes .route.tracked { outline: 2px solid #c4772b; background: #fff0bd; }
.world-objective-routes .route span { font-size: 10px; line-height: 1.3; }
.daily-fixed-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; background: #fff6e3; }
.daily-head-actions { display: flex; gap: 6px; }
.daily-head-actions button { min-height: 44px; border: 1px solid #b3874b; background: #fff9ec; color: #684323; }
#dailyTopClose { min-width: 44px; font-size: 24px; line-height: 1; }
.daily-locked-row { grid-column: 1 / -1; padding: 9px 12px; border: 1px dashed #bca77d; background: #f3ead7; color: #735f3d; font-size: 13px; line-height: 1.35; }
.res.mat { white-space: normal !important; }
#toast-zone:has(.settlement-card.milestone-card) {
  top: max(76px, env(safe-area-inset-top)); right: 14px; bottom: auto; left: auto; transform: none;
}
#toast-zone .settlement-card.milestone-card {
  position: static;
  width: min(340px, calc(100vw - 28px)); min-width: 0; padding: 12px 14px;
  border: 2px solid #9b7440; border-bottom-width: 4px; border-radius: 5px;
  background: #fff2cf; color: #5b3f21; box-shadow: 0 5px 0 rgba(94,60,25,.18);
}
#toast-zone .settlement-card.milestone-card strong { color: #6a421e; font-size: 16px; }
#toast-zone .settlement-card.milestone-card span { color: #5b3f21; font-size: 12px; line-height: 1.4; }
@media (max-width: 620px) {
  .world-objective-routes { grid-template-columns: 1fr; }
  #toast-zone:has(.settlement-card.milestone-card) { top: auto; right: 10px; bottom: calc(var(--fixed-bottom-inset, 0px) + 82px); }
  .res.mat .material-sep { display: none; }
  .res.mat .material-name { display: block; }
}
@media (max-width: 859px) and (orientation: portrait) {
  .side-panel.world-panel-open .side-body:has(> .side-pane[data-pane="orders"].sel) { max-height: 58.5dvh !important; }
  .side-pane[data-pane="orders"] .o-flavor { display: none; }
  .side-pane[data-pane="orders"] .o-story-impact { margin-top: 2px; padding: 2px 4px; font-size: 10px; line-height: 1.15; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .side-pane[data-pane="orders"] .o-flavor { display: none; }
  .side-pane[data-pane="orders"] .o-story-impact { margin-top: 2px; padding: 1px 0; border: 0; background: transparent; font-size: 10px; line-height: 1.15; }
}

/* R40 整合：鎖定列只佔一行；手機材料欄不被擠成一字一行 */
.daily-task-strip:has(.daily-locked-row) { grid-auto-rows: auto !important; align-items: start; }
.daily-locked-row { min-height: 0 !important; height: auto !important; align-self: start !important; flex: 0 0 auto !important; }
@media (max-width: 620px) {
  .res.mat { display: flex !important; flex-direction: column !important; align-items: flex-start !important; justify-content: center !important; gap: 0 !important; }
  .res.mat .ic { display: none !important; }
  .res.mat .material-name { display: block; white-space: nowrap !important; font-size: 11px !important; line-height: 1.25 !important; writing-mode: horizontal-tb !important; }
}
/* R40 整合：「再顯示 N 項」黏在面板底部時，上方加一段紙色漸層，讓後方的卡片像「往下還有」而不是被切壞 */
.side-pane .r32-show-more { box-shadow: 0 -26px 18px -6px #fff8e8, 0 2px 0 #c9ad7a; background: #fff3d6; }
