/* Only the unsaved tutorial page uses these controls and visual layers. */
body.fdbTutorial #btn_nextGame,
body.fdbTutorial #btn_undo,
body.fdbTutorial #btn_redo,
body.fdbTutorial #btn_undoAll,
body.fdbTutorial #btn_redoAll,
body.fdbTutorial #btn_finishTurn,
body.fdbTutorial #gameOptions .gameOptionsActions,
body.fdbTutorial #btnCancelGame { display: none !important; }
#fdbTutorialSpotlight { position: fixed; inset: 0; z-index: 1040; pointer-events: none; }
.fdbTutorialOutline { fill: none; stroke: #ffd36b; stroke-width: 2.5; stroke-linejoin: round; }
#fdbTutorialDialog {
    position: fixed; z-index: 1042; width: min(480px, calc(100vw - 24px));
    max-height: calc(100vh - 140px); overflow-y: auto; color: #202b36; background: #fff;
    border: 1px solid #d7a642; border-radius: 8px; box-shadow: 0 5px 24px #0006;
    font: 14px/1.55 system-ui, sans-serif;
}
#fdbTutorialDialog header { background: #fff0c9; padding: 10px 16px 6px; border-radius: 8px 8px 0 0; }
#fdbTutorialDialog h2 { font-size: 1rem; margin: 0 0 4px; color: inherit; }
.fdbTutorialPosition { font-size: .75rem; margin: 0; color: #52606e; }
.fdbTutorialText { margin: 0; padding: 14px 16px; white-space: pre-line; }
.fdbTutorialControls { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 12px; }
#fdbTutorialNext { margin-left: auto; }
.fdbTutorialContentsTitle { font-size: 1rem; margin: .75rem .6rem; }
.fdbTutorialChapter { font-size: .85rem; margin: .9rem .6rem .3rem; color: #52606e; }
.fdbTutorialEntry { display: flex; align-items: baseline; gap: .5rem; width: 100%; padding: .6rem;
    border: 0; border-bottom: 1px solid #ddd; background: transparent; color: inherit; text-align: left; font: inherit; }
.fdbTutorialEntry .bi-check-circle { color: #28723d; }
.fdbTutorialEntry:hover, .fdbTutorialEntry[aria-current] { background: #e5edf8; }
.fdbTutorialEntry:focus-visible { outline: 2px solid #3467a7; outline-offset: -2px; }
#btn_fdbTutorialReveal .buttonText { position: static !important; width: auto !important; height: auto !important;
    overflow: visible !important; clip-path: none !important; }

.fdbTutorialReading { padding: 14px 16px; }
.fdbTutorialReading .fdbTutorialText { padding: 0; }
.fdbTutorialReading h3 { font-size: .9rem; margin: 12px 0 4px; }
.fdbTutorialReading > p { margin-bottom: 10px; }
.fdbTutorialExample { margin: 8px 0 0; text-align: center; }
.fdbTutorialExampleArt { position: relative; display: inline-block; }
.fdbTutorialExampleArt > img { display: block; max-width: 270px; max-height: 190px; width: auto; height: auto; }
.fdbTutorialExampleRegion { position: absolute; border: 3px solid #d99800; background: #ffe29b22; pointer-events: none; box-sizing: border-box; }
.fdbTutorialExample figcaption { font-size: .75rem; color: #52606e; margin-top: 4px; }
.fdbTutorialOrders { display: flex; justify-content: center; gap: 24px; margin-block: 12px; }
.fdbTutorialOrders figure { margin: 0; text-align: center; }
.fdbTutorialOrders img { width: 65px; height: 98px; object-fit: contain; }
.fdbTutorialOrders figcaption { font-size: .8rem; }
.fdbTutorialFormula { padding: 10px; background: #fff0c9; border-radius: 4px; font-weight: bold; }
.fdbTutorialAnswers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fdbTutorialAnswers [aria-pressed="true"] { background: #e5edf8; color: #202b36; }
.fdbTutorialFeedback { margin: 12px 0 0; padding: 8px; border-left: 3px solid #d7a642; background: #fff9e9; }
.fdbTutorialHits { width: 100%; margin-top: 12px; font-size: .8rem; }
.fdbTutorialHits caption { caption-side: top; }
.fdbTutorialHits th, .fdbTutorialHits td { padding: 6px 3px; border-bottom: 1px solid #ddd; vertical-align: top; }
.fdbTutorialHits td > span:not(.fdbTutorialDie) { display: block; }
.fdbTutorialHits img { display: block; width: 35px; height: 35px; margin-top: 3px; }
.fdbTutorialCoordinate { border: 0; color: #214b6b; background: #e9f2f6; text-decoration: underline; }
.fdbTutorialDie { font-size: 24px; line-height: 1; }
.fdbTutorialDie.type1 { color: #785d00; }
.fdbTutorialDie.type2 { color: #a82520; }
.fdbTutorialDie.type3 { color: #167438; }
