#tutorialDialog{
 position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;
 margin:0;padding:0;border:0;border-radius:0;background:transparent;overflow:hidden;color:#eee8d5;
}
/* The base dialog blur would also blur the highlighted game control. */
#tutorialDialog::backdrop{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
#tutorialDialog.tutorial-no-target{background:#020a0c99}
#tutorialFocus{
 position:fixed;border:2px solid #f0d28b;border-radius:9px;
 box-shadow:0 0 0 200vmax #020a0c99;pointer-events:none;box-sizing:border-box;
}
#tutorialDialog .tutorial-card{
 position:fixed;z-index:1;width:min(460px,calc(100% - 24px));max-height:calc(100dvh - 24px);
 margin:0;padding:18px;border:1px solid #b39b63;border-radius:14px;
 background:#152529;box-shadow:0 8px 28px #0006;overflow:auto;box-sizing:border-box;
 overscroll-behavior:contain;text-align:left;
}
/* Reset the global dialog button width and margin inside this guide. */
#tutorialDialog button{
 width:auto;min-width:0;max-width:100%;min-height:44px;margin:0;padding:10px 14px;
 font-size:1rem;line-height:1.4;letter-spacing:normal;white-space:nowrap;word-break:normal;
 writing-mode:horizontal-tb;box-sizing:border-box;
}
#tutorialDialog .tutorial-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0 12px}
#tutorialProgress{flex:1 0 auto;max-width:100%;font-size:.875rem;line-height:1.5;color:#d6bc80;white-space:nowrap}
#tutorialDialog #tutorialSkip{flex:none;padding:8px 10px;font-size:.875rem;background:transparent;border-color:transparent;color:#c1cbc7}
#tutorialDialog #tutorialSkip:hover{border-color:#b39b63;color:#f0d28b}
#tutorialDialog h2{font-size:1.25rem;line-height:1.45;margin:8px 0;color:#eed79f;letter-spacing:normal}
#tutorialDialog #tutorialText{font-size:1rem;line-height:1.7;margin:8px 0 18px;color:#d7dfd9}
#tutorialDialog .tutorial-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr));gap:10px}
#tutorialDialog .tutorial-controls button{width:100%;min-height:46px}
#tutorialDialog #tutorialBack[hidden]+#tutorialNext{grid-column:1/-1}
#tutorialDialog #tutorialError{color:#f1b3a3;font-size:.875rem;line-height:1.5;margin:8px 0}
#tutorialError:empty{display:none}
@media(max-width:360px){#tutorialDialog .tutorial-card{padding:14px}#tutorialDialog button{padding:10px 8px}}
@media(max-height:480px){#tutorialDialog .tutorial-card{padding:12px 16px}#tutorialDialog #tutorialText{margin:6px 0 12px}}
