/* Offline tutorial chrome, soft spotlight layers, and illustrated help cards. */
body.wwTutorial #btn_nextGame,
body.wwTutorial #btn_undo,
body.wwTutorial #btn_redo,
body.wwTutorial #btn_undoAll,
body.wwTutorial #btn_redoAll,
body.wwTutorial #btn_finishTurn,
body.wwTutorial #gameOptions .gameOptionsActions,
body.wwTutorial #btnCancelGame {
    display: none !important;
}

#wwTutorialSpotlight {
    position: fixed;
    inset: 0;
    z-index: 1040;
    pointer-events: none;
}

.wwTutorialOutline {
    fill: none;
    stroke: rgba(255, 224, 130, 0.56);
    stroke-width: 7;
    stroke-linejoin: round;
    stroke-linecap: round;
}

#wwTutorialDialog {
    position: fixed;
    z-index: 1042;
    width: min(510px, calc(100vw - 24px));
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    color: #2c2416;
    background: #fffdf8;
    border: 1px solid #d4a64a;
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.36);
    font: 15px/1.55 system-ui, -apple-system, sans-serif;
}

#wwTutorialDialog header {
    background: linear-gradient(180deg, #fdf3d7 0%, #f6dfa4 100%);
    padding: 11px 16px 8px;
    border-bottom: 1px solid #e6c67c;
    border-radius: 11px 11px 0 0;
}

#wwTutorialDialog h2 {
    font-size: 1.12rem;
    font-weight: 700;
    margin: 0 0 3px;
    color: #4a3109;
}

.wwTutorialPosition {
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0;
    color: #7c581c;
}

.wwTutorialReading {
    padding: 14px 16px;
}

.wwTutorialText {
    margin: 0 0 8px;
}

.wwTutorialText:last-child {
    margin-bottom: 0;
}

#wwTutorialDialog img.wwTutorialInlineIcon,
.wwTutorialInlineIcon {
    display: inline-block;
    height: 1.15em;
    max-height: 19px;
    width: auto;
    vertical-align: -0.2em;
    margin: 0 2px;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

#wwTutorialDialog img.wwTutorialInlineIcon.is-deck,
.wwTutorialInlineIcon.is-deck {
    border-radius: 3px;
}

.wwTutorialStepPill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    min-width: 1.75em;
    height: 1.35em;
    border-radius: 999px;
    background: #9a5b13;
    color: #fffdf8;
    font-size: 0.78em;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
    vertical-align: 0.05em;
    margin: 0 2px;
}

.wwTutorialList {
    margin: 4px 0 8px;
    padding-left: 1.15rem;
}

.wwTutorialList:last-child {
    margin-bottom: 0;
}

.wwTutorialList li {
    margin-bottom: 4px;
}

.wwTutorialList li:last-child {
    margin-bottom: 0;
}

/* Savanna visual help blocks inside tutorial dialogs */
.wwTutorialVisual {
    margin-top: 10px;
}

.wwTutorialTeamStrip {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    padding: 8px 6px;
    border-radius: 10px;
    background: #f8efd7;
    border: 1px solid #e7cf96;
}

.wwTutorialTeamChip {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
}

.wwTutorialTeamChip img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
}

.wwTutorialTeamChip span {
    font-size: 0.78rem;
    font-weight: 700;
    color: #5c4010;
    line-height: 1.15;
    word-break: break-word;
}

.wwTutorialCallout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #eef8fc;
    border: 1px solid #93c5fd;
    color: #0c4a6e;
    font-size: 0.9rem;
    line-height: 1.42;
}

.wwTutorialCallout.is-warning {
    background: #fef5e0;
    border-color: #eab308;
    color: #6b4308;
}

.wwTutorialCalloutIcons {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.wwTutorialCalloutIcons > img {
    height: 38px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}

.wwTutorialLegendGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wwTutorialLegendItem {
    flex: 1 1 130px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f8efd7;
    border: 1px solid #e7cf96;
    font-size: 0.86rem;
    font-weight: 600;
    color: #4a3109;
}

.wwTutorialLegendItem > img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.wwTutorialCardAidList {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.wwTutorialCardAid {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border-radius: 10px;
    background: #f9f3e3;
    border: 1px solid #e6cf99;
}

.wwTutorialCardAid > img {
    height: 64px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
    flex-shrink: 0;
}

.wwTutorialCardAidText {
    font-size: 0.9rem;
    line-height: 1.4;
}

.wwTutorialCardAidTitle {
    font-weight: 700;
    color: #4a3109;
    margin-bottom: 2px;
}

.wwTutorialIconAidGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 6px;
}

.wwTutorialIconAid {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f9f3e3;
    border: 1px solid #e6cf99;
    font-size: 0.88rem;
    line-height: 1.36;
}

.wwTutorialIconAid > img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.wwTutorialNote {
    margin-top: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    border-left: 4px solid #d97706;
    background: #fff3d1;
    color: #6b4308;
    font-size: 0.88rem;
    line-height: 1.4;
}

.wwTutorialControls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 16px 12px;
}

#wwTutorialNext {
    margin-left: auto;
}

.wwTutorialContentsTitle {
    font-size: 1.08rem;
    margin: 0.75rem 0.6rem;
}

.wwTutorialChapter {
    font-size: 0.92rem;
    margin: 0.9rem 0.6rem 0.3rem;
    color: #52606e;
}

.wwTutorialEntry {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem;
    border: 0;
    border-bottom: 1px solid #dddddd;
    background: transparent;
    color: inherit;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.35;
}

.wwTutorialEntry .bi-check-circle {
    color: #28723d;
}

.wwTutorialEntry:hover,
.wwTutorialEntry[aria-current] {
    background: #e5edf8;
}

.wwTutorialEntry:focus-visible {
    outline: 2px solid #3467a7;
    outline-offset: -2px;
}

#btn_wwTutorialReveal .buttonText {
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip-path: none !important;
}

.wwTutorialExample {
    margin: 10px 0 0;
    text-align: center;
}

.wwTutorialExampleArt {
    position: relative;
    display: inline-block;
}

.wwTutorialExampleArt > img {
    display: block;
    max-width: 145px;
    max-height: 185px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.wwTutorialExampleRegion {
    position: absolute;
    border: 2px solid rgba(234, 179, 8, 0.9);
    background: rgba(255, 232, 163, 0.24);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.65);
    pointer-events: none;
    box-sizing: border-box;
    border-radius: 10px;
}

.wwTutorialExample figcaption {
    font-size: 0.84rem;
    color: #6b5324;
    margin-top: 4px;
}

.wwTutorialScore {
    width: 100%;
    font-size: 0.9rem;
    margin-top: 8px;
    background: #fcf6e5;
    border-radius: 8px;
    overflow: hidden;
}

.wwTutorialScore caption {
    caption-side: top;
    color: #5c4010;
    font-weight: 700;
    padding-bottom: 4px;
}

.wwTutorialScore th,
.wwTutorialScore td {
    padding: 5px 8px;
    border-bottom: 1px solid #ead8ad;
}

.wwTutorialScore th {
    font-weight: 600;
}

.wwTutorialScore td {
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
}

.wwTutorialScoreTotal {
    font-weight: 800;
    background: #f5e5bd;
}

.wwTutorialPracticeStatus {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border-left: 4px solid #b45309;
    background: #fef3c7;
    color: #78350f;
}

.wwTutorialPracticeStatus.is-hint {
    border-left-color: #c2410c;
    background: #ffedd5;
    color: #7c2d12;
}

.wwTutorialPracticeStatus.is-done {
    border-left-color: #15803d;
    background: #dcfce7;
    color: #14532d;
}
