/* One optional guide in the action panel; no modal, focus trap or input mask. */
.tutorial-host{min-width:0;width:100%}
.tutorial-host:empty{display:none}
.tutorial-panel{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;
  min-width:0;margin:0;padding:12px;border:1px solid #ad8b4c;border-radius:5px;
  background:#eadbb7;color:#3a3021;font-family:var(--sans);text-align:left;
}
.tutorial-heading{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;min-width:0;grid-column:1;grid-row:1}
.tutorial-heading>h3{min-width:0;margin:0;font:600 var(--type-body)/1.3 var(--sans);white-space:normal;overflow-wrap:anywhere}
.tutorial-progress{font:400 var(--type-caption)/1.3 var(--sans);white-space:normal;overflow-wrap:anywhere;color:#655035}
.tutorial-copy{grid-column:1/-1;grid-row:2;min-width:0;margin:0;font:400 var(--type-caption)/1.45 var(--sans);white-space:normal;overflow-wrap:anywhere}
.tutorial-skip{
  grid-column:2;grid-row:1;align-self:start;display:inline-flex;align-items:center;justify-content:center;
  min-width:48px;min-height:48px;max-width:100%;margin:0;padding:8px 10px;
  border:1px solid #896d43;border-radius:4px;background:#f2e6c8;color:#44351f;
  font:600 var(--type-caption)/1.3 var(--sans);white-space:normal;overflow-wrap:anywhere;
}
.tutorial-skip:focus-visible{outline:3px solid #44351f;outline-offset:2px}
.tutorial-skip:disabled{background:#d2c6ab;color:#655b48;opacity:1;cursor:not-allowed}
@media(hover:hover){.tutorial-skip:hover:not(:disabled){background:#ffefc6;border-color:#644d2c}}
/* Existing desktop tracks were sized for commands without instruction text. */
@media(min-width:1000px) and (min-height:680px){
  #app main.shell:has(>.command-bar .tutorial-panel){
    height:auto;min-height:100dvh;grid-template-rows:auto auto minmax(min-content,1fr) auto auto;
  }
  #app main.shell:has(>.command-bar .tutorial-panel):has(>.hand-panel){
    grid-template-rows:auto auto minmax(min-content,1fr) auto auto auto;
  }
}
@media(max-width:999px){
  .tutorial-panel{padding:10px;gap:6px 8px}
  /* The temporary instruction joins page flow, so it cannot cover HP or drag targets. */
  #app main.shell:has(>.command-bar .tutorial-panel)>.command-bar{
    position:static;max-height:none;grid-template-rows:auto auto;
  }
  #app main.shell:has(>.command-bar .tutorial-panel)>.command-bar>.spells-panel{overflow:visible;max-height:none}
  #app main.shell:not(:has(>.hand-panel)):has(>.command-bar .tutorial-panel) .battlefield{padding-bottom:4px}
  #app main.shell:not(:has(>.hand-panel)):has(>.command-bar .tutorial-panel) .formation-board .unit-card{scroll-margin-bottom:12px}
}
@media(prefers-reduced-motion:reduce){.tutorial-panel,.tutorial-skip{animation:none;transition:none}}
