/* First-visit / guided-creator overlay uses the site's parchment and muted watercolor palette. */
#firstVisitModal, #firstVisitGuideMenu { z-index: 2000; }
#firstVisitModal .modal, #firstVisitGuideMenu .modal {
  width:min(92vw,760px); max-height:min(88vh,850px); overflow-y:auto;
  border:2px solid #a88a60; background:#f5eddc; color:#342719;
  box-shadow:0 22px 76px #1e1a15a6; font-family:"PingFang TC","Noto Sans CJK TC","Microsoft JhengHei",system-ui,sans-serif;
}
#firstVisitModal h3, #firstVisitGuideMenu h3 {
  font-family:var(--serif,serif); font-size:clamp(23px,3vw,32px); text-align:center; color:#643d2c;
  margin-bottom:10px; line-height:1.4;
}
.first-visit-lead { text-align:center; font-size:16px; line-height:1.8; color:#4b3b2e; margin:4px 0 21px; }
.first-visit-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.first-visit-option {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px;
  min-height:250px; padding:20px 16px; border:2px solid #ad956b; border-radius:14px;
  background:linear-gradient(150deg,#eef0df,#e7dbc0); color:#2a382c;
  font-size:16px; line-height:1.5; text-align:center; cursor:pointer;
  box-shadow:0 4px 10px #50382318; transition:transform .16s ease,border-color .16s ease;
}
.first-visit-option:hover { transform:translateY(-3px); border-color:#6e4933; background:#ecedda; }
.first-visit-option:focus-visible, #firstVisitGuideMenu button:focus-visible, #btnNewPlayerGuide:focus-visible {
  outline:3px solid #276190; outline-offset:3px;
}
.first-visit-option img { width:112px; height:112px; object-fit:contain; }
.first-visit-option strong { font-family:var(--serif,serif); color:#4a3527; font-size:20px; }
.first-visit-option span { color:#493e34; font-size:15px; line-height:1.7; }
#firstVisitGuideMenu .first-visit-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
#firstVisitGuideMenu .first-visit-option { min-height:160px; }
#firstVisitGuideMenu .first-visit-option img { width:74px; height:74px; }
#firstVisitGuideMenu .modal-acts { justify-content:center; margin-top:13px; }
#firstVisitGuideMenu button[hidden] { display:none !important; }
#firstVisitQuizNote { margin-top:8px; font-size:15px; color:#624d3a; }
#btnNewPlayerGuide { min-height:44px; white-space:nowrap; }
.dnd5r-guide-focus {
  outline:3px solid #83652c !important; outline-offset:5px;
  box-shadow:0 0 0 7px #f1de9a75 !important;
  transition:outline-color .2s ease;
}
#dnd5rGuidePointer {
  position:fixed; z-index:115; pointer-events:none;
  padding:5px 12px; border:2px solid #b79b58; border-radius:11px;
  background:#304c3b; color:#fff7df; font:700 14px/1.5 "PingFang TC","Microsoft JhengHei",sans-serif;
  max-width:min(260px,calc(100vw - 24px)); box-shadow:0 3px 14px #0004;
}
#dnd5rGuidePointer[hidden] { display:none !important; }
#academyGuidedCoach[hidden] { display:none !important; }
/* Coaching must not sit underneath the sticky two-row navigation or obscure actual controls. */
#academyGuidedCoach { position:relative !important; top:auto !important; max-height:none !important; overflow:visible !important; }
#academyGuidedCoach .coach-acts { display:flex; flex-wrap:wrap; gap:8px; margin-top:9px; }
#academyGuidedCoach .coach-acts button { min-height:44px; }
@media(max-width:620px) {
  /* Keep the tutorial in document flow: a sticky coach can cover the actual choices. */
  #academyGuidedCoach { position:relative !important; top:auto !important; max-height:none !important; overflow:visible !important; }
  #firstVisitModal .modal, #firstVisitGuideMenu .modal { width:calc(100vw - 22px); padding:18px 12px; }
  .first-visit-options, #firstVisitGuideMenu .first-visit-options { grid-template-columns:1fr; gap:12px; }
  .first-visit-option { flex-direction:row; text-align:left; min-height:125px; padding:11px 14px; flex-wrap:wrap; justify-content:flex-start; }
  .first-visit-option img { width:65px; height:65px; }
  .first-visit-option strong { font-size:18px; }
  .first-visit-option span { flex-basis:100%; }
  #firstVisitGuideMenu .first-visit-option { min-height:112px; }
  #dnd5rGuidePointer { font-size:12.5px; }
}
@media(prefers-reduced-motion:reduce) {
  .first-visit-option,.dnd5r-guide-focus { transition:none !important; }
  .first-visit-option:hover { transform:none; }
}
@media print {
  #firstVisitModal,#firstVisitGuideMenu,#dnd5rGuidePointer,#btnNewPlayerGuide { display:none !important; }
}