/* Only the unsaved tutorial page uses these controls and visual layers. */
body.ftTutorial #btn_nextGame,
body.ftTutorial #btn_undo,
body.ftTutorial #btn_redo,
body.ftTutorial #btn_undoAll,
body.ftTutorial #btn_redoAll,
body.ftTutorial #btn_finishTurn,
body.ftTutorial #gameOptions .gameOptionsActions,
body.ftTutorial #btnCancelGame {
    display: none !important;
}

body.ftTutorial #game .active:not(.has-popover),
body.ftTutorial #game .ft-sand-target,
body.ftTutorial #game .bidButton {
    cursor: default;
}

#ftTutorialSpotlight {
    position: fixed;
    inset: 0;
    z-index: 1040;
    pointer-events: none;
}

.ftTutorialOutline {
    fill: none;
    stroke: #ffd36b;
    stroke-width: 3;
    stroke-linejoin: round;
}

#ftTutorialDialog {
    position: fixed;
    z-index: 1042;
    width: min(440px, calc(100vw - 16px));
    max-height: calc(100vh - 124px);
    overflow-y: auto;
    color: #0f172a;
    background: #fff;
    border: 2px solid #0284c7;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.36);
    font: 14px/1.55 system-ui, -apple-system, sans-serif;
}

#ftTutorialDialog header {
    background: #e0f2fe;
    color: #0c4a6e;
    padding: 10px 16px 8px;
    border-bottom: 1px solid rgba(2, 132, 199, 0.25);
    border-radius: 8px 8px 0 0;
}

#ftTutorialDialog h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 3px;
    color: inherit;
}

.ftTutorialPosition {
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0;
    color: #334155;
}

.ftTutorialReading {
    padding: 12px 16px;
}

.ftTutorialText {
    margin: 0;
    white-space: pre-line;
}

.ftTutorialExample {
    margin: 10px 0 0;
    padding: 8px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.ftTutorialExampleCards {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ftTutorialExampleCards img {
    width: 64px;
    height: auto;
    display: block;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.ftTutorialExample figcaption {
    font-size: 0.76rem;
    font-weight: 600;
    color: #334155;
    margin-top: 6px;
}

.ftTutorialScoreWrap {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
}

.ftTutorialScoreWrap h3 {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0c4a6e;
    margin: 0 0 6px;
}

.ftTutorialScoreWrap .ft-score-breakdown {
    min-width: 0;
    width: 100%;
}

.ftTutorialControls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 16px 12px;
}

#ftTutorialNext {
    margin-left: auto;
}

.ftTutorialContentsTitle {
    font-size: 1rem;
    font-weight: 700;
    margin: 0.75rem 0.6rem;
}

.ftTutorialChapter {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0.9rem 0.6rem 0.3rem;
    color: #475569;
}

.ftTutorialEntry {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem 0.6rem;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.ftTutorialEntry .bi-check-circle {
    color: #15803d;
}

.ftTutorialEntry:hover,
.ftTutorialEntry[aria-current] {
    background: #e0f2fe;
}

.ftTutorialEntry:focus-visible {
    outline: 2px solid #0284c7;
    outline-offset: -2px;
}

#btn_ftTutorialReveal .buttonText {
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip-path: none !important;
}
