/* Short, optional onboarding stays in the page or the current facility dialog. */
.first-steps {
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  max-width:1240px;margin:10px auto 16px;padding:14px 18px;
  color:var(--ink);background:var(--panel-solid);border:1px solid var(--line);
  border-left:4px solid var(--accent);border-radius:4px;
}
.first-steps-copy { min-width:0; }
.first-steps-label { display:block;font-size:12px;line-height:1.5;font-weight:600;color:var(--ink-soft); }
.first-steps h3,.guide-welcome h3 { margin:3px 0 0;font-size:17px;line-height:1.5; }
.first-steps p { margin:4px 0;line-height:1.65;font-size:14px; }
.first-steps small { display:block;color:var(--ink-soft);font-size:12px;line-height:1.6; }
.first-steps-actions { display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:7px 12px;flex-shrink:0;max-width:280px; }
.first-steps-link { border:0;background:none;padding:5px 0;color:var(--ink-soft);font-size:12px;line-height:1.5;text-decoration:underline;text-underline-offset:3px;min-height:32px; }
.first-steps .btn { font-size:14px;min-height:40px; }
.first-steps-in-sheet { display:block;margin:0 0 16px;padding:12px 14px; }
.first-steps-in-sheet .first-steps-actions { max-width:none;justify-content:flex-start;margin-top:8px; }
.first-steps-complete { border-left-color:var(--good); }
.tutorial-target { outline:3px solid var(--accent)!important;outline-offset:3px!important; }
.tutorial-target { scroll-margin-block:130px; }
.tutorial-pointer {
  display:block;max-width:220px;margin:8px 0 0;padding:7px 9px;
  background:#f8f1dc;border:1px solid #b8a777;border-radius:5px;
  color:#000;font-size:12px;line-height:1.6;white-space:normal;text-align:left;
}
.first-steps-growth { color:#000;font-weight:600; }
.first-steps :is(.first-steps-label,small,.first-steps-link) { color:#000; }
.first-steps-complete .first-steps-actions { max-width:360px; }
/* A short navigation strip remains visible; the full explanation scrolls normally. */
.tutorial-dock {
  display:flex;align-items:center;justify-content:space-between;gap:8px 14px;
  padding:9px 14px;color:#000;background:#f6f1df;border:1px solid #b8a777;
  box-shadow:0 2px 7px rgba(35,40,25,.08);font-size:13px;line-height:1.5;
}
.tutorial-dock-copy { min-width:0; }
.tutorial-dock-copy strong { display:block;font-size:13px; }
.tutorial-dock-copy small { display:block;color:#000;font-size:12px; }
.tutorial-dock-copy small:empty { display:none; }
.tutorial-dock-actions { display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap;flex:none; }
.tutorial-dock-actions .btn,.tutorial-dock-actions .first-steps-link { min-height:40px;color:#000; }
.tutorial-dock-page { position:sticky;top:6px;z-index:18;max-width:1240px;margin:8px auto;border-radius:5px; }
#sheetRoot .sheet.has-tutorial,
body:has(.game-hud) #sheetRoot .sheet.has-tutorial { grid-template-rows:auto auto auto minmax(0,1fr); }
.tutorial-dock-sheet { border-width:0 0 1px;box-shadow:none; }
#sheetRoot .tutorial-dock-sheet .tutorial-dock-copy small { font-size:12px; }
.guide-welcome { padding:4px 0 16px; }
.guide-welcome p { margin:8px 0;line-height:1.65; }
.guide-reference h4 { margin:8px 0;font-size:14px; }
.guide-reference details { border-top:1px solid var(--line);padding:6px 0; }
.guide-reference summary { cursor:pointer;min-height:40px;padding:8px 0;font-size:14px;font-weight:600; }
.guide-reference details p { margin:2px 0 10px;line-height:1.7;font-size:14px; }
.guide-reference details .btn { margin-bottom:8px; }

/* Disabled actions keep their reasons readable while remaining visibly inactive. */
.realm .bact:disabled { opacity:1;background:var(--sunk);border-style:dashed;color:var(--ink-soft);cursor:not-allowed; }
.realm .bact .realm-action-reason { color:var(--ink);font-size:13px;line-height:1.55;white-space:normal; }
.realm .bact small { white-space:normal;line-height:1.5; }
.realm-zone-tip { margin:10px 0 6px;line-height:1.7; }
.realm-zone-tip .btn { margin:4px 0; }
.hunt-confirm p { margin:0 0 12px;line-height:1.75; }
.hunt-confirm .row-btns { margin-top:16px;justify-content:flex-end; }

/* The scene and shared HUD use pale surfaces even when system dark mode is on. */
body:has(.game-hud) .topbar.scene-topbar .res { color:#000; }
.sect-scene :is(.scene-profile-text small,.scene-profile-text strong,.scene-profile-text>span,
  .scene-summary-meta,.scene-popover-title,.scene-popover-detail,.scene-journal,.scene-activity) { color:#000; }
.game-hud { color:#000; }
.game-hud button { color:#000; }
.game-hud button:is([aria-current="page"],[aria-expanded="true"]) { color:#000; }
.scene-record-facts dd,.scene-facility-list small { color:var(--ink); }

@media (max-width:700px) {
  .first-steps { display:block;padding:11px 13px;margin:8px 0 12px; }
  .first-steps h3 { font-size:16px; }
  .first-steps p { font-size:13px; }
  .first-steps-actions { max-width:none;justify-content:flex-start;margin-top:8px;gap:4px 14px; }
  .first-steps-link { min-height:40px; }
  .first-steps-complete>.btn { margin-top:8px; }
  .tutorial-pointer { max-width:180px;font-size:12px; }
  .tutorial-dock { display:block;padding:7px 10px; }
  .tutorial-dock-actions { margin-top:3px;gap:4px 12px; }
  .tutorial-dock-actions .btn { font-size:13px;padding:6px 9px; }
  .tutorial-dock-actions .first-steps-link { font-size:12px; }
  .realm .bact small { font-size:12px; }
}
@media (forced-colors:active) {
  .tutorial-target { outline-color:Highlight!important; }
  .game-hud,.game-hud button,.sect-scene .scene-popover-detail { color:CanvasText; }
}
