/* An independent teaching layer. Tray art, layout, score and world art stay shared. */
.tutorial-dialog { width:min(92vw,28rem); max-height:88dvh; overflow:auto; padding:1.4rem; color:#f7f4eb; background:#101720; border:1px solid #ddc98b88; border-radius:1.1rem; box-shadow:0 1rem 5rem #0009; }
.tutorial-dialog::backdrop { background:#03070bd9; backdrop-filter:blur(5px); }
.tutorial-dialog h1 { font:400 1.9rem/1.15 Georgia,serif; margin:.7rem 0; }
.tutorial-dialog p { font-size:.9rem; line-height:1.55; color:#c6cdd7; }
.tutorial-choices { display:grid; gap:.6rem; margin:1.1rem 0; }
.tutorial-choices[hidden], .tutorial-coach[hidden] { display:none; }
.tutorial-choices button { text-align:left; display:grid; gap:.3rem; padding:.9rem; border:1px solid #ddc98b55; background:#222e3c; border-radius:.65rem; color:#f4dfa3; cursor:pointer; min-height:64px; }
.tutorial-choices span { color:#c6cdd7; font-size:.75rem; }
.tutorial-choices button[data-completed="true"] { border-color:#7fb89a;background:linear-gradient(120deg,#193229,#222e3c); }
.tutorial-choices button[data-completed="true"] span { color:#aee0bf;font-weight:700; }
.tutorial-skip { width:100%; min-height:44px; background:transparent; color:#ddd; border:1px solid #ffffff30; border-radius:.6rem; cursor:pointer; }
.tutorial-coach { position:relative; grid-row:4; z-index:8; margin:.25rem .5rem .35rem; padding:.6rem .8rem; background:#101720f5; border:1px solid #ddc98b70; border-radius:.8rem; }
.tutorial-kicker { display:flex; align-items:center; justify-content:space-between; gap:.5rem; color:#ddc98b; font-size:.65rem; }
.tutorial-kicker button { border:0; background:none; color:#c6cdd7; min-height:36px; padding:.2rem .35rem; cursor:pointer; }
.tutorial-coach h2 { font:400 1.15rem/1.2 Georgia,serif; margin:.1rem 0 .35rem; }
.tutorial-coach p { font-size:.78rem; line-height:1.45; margin:.3rem 0; }
.tutorial-preview { color:#ddc98b; font-size:.72rem; }
.tutorial-preview:empty { display:none; }
.tutorial-actions { display:flex; justify-content:space-between; gap:.5rem; margin-top:.5rem; }
.tutorial-actions button { min-height:44px; padding:.4rem .75rem; border:1px solid #ddc98b55; border-radius:.5rem; color:#f4dfa3; background:#253140; cursor:pointer; font-size:.75rem; }
.tutorial-actions button:disabled { opacity:.4; cursor:default; }
.tutorial-actions button:last-child:not(:disabled) { color:#101720; background:#ddc98b; }
.game-shell[data-mode="tutorial"] { grid-template-rows:max(3.8rem,calc(env(safe-area-inset-top) + 3rem)) minmax(10rem,1fr) auto auto auto; }
.game-shell[data-mode="tutorial"] .feedback-layer { display:none; }
.game-shell[data-mode="tutorial"] .cell.legal { fill:rgba(11,15,20,.32); stroke:rgba(255,255,255,.18); }
.game-shell[data-mode="tutorial"] .cell.tutorial-target { fill:#ddc98b26; stroke:#f4dfa3; stroke-width:4px; filter:drop-shadow(0 0 6px #ddc98b88); }
.tutorial-marker { fill:#fff3ca; font-size:28px; font-weight:800; paint-order:stroke; stroke:#101720; stroke-width:4px; pointer-events:none; }
@media (max-height:680px) { .tutorial-coach { padding:.35rem .6rem; } .tutorial-coach p { font-size:.73rem; } .tutorial-kicker button { min-height:30px; } }


.instructions-dialog .help-close-row{display:flex;justify-content:flex-end;flex:0 0 auto}
.instructions-dialog .help-return{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;padding:6px 8px;border:0;background:transparent;font-size:12px;line-height:1.3;cursor:pointer}
.help-return svg{display:block;flex:0 0 18px}
