#learning-guide[hidden], #tour [hidden] { display: none; }
#tour { margin-inline: clamp(18px, 3vw, 54px); }
#tour-load {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--muted);
}
#tour-loading { margin: 0; }
.tour-course { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.tour-lesson {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: clamp(16px, 2.5vw, 35px);
    border: 1px solid #38594b;
    border-radius: 10px;
    background: linear-gradient(125deg, #243d32 0%, #172521 92%);
    color: #f3f6ee;
}
#tour-position { margin: 0 0 9px; font-size: 12px; font-weight: 650; color: #c7d7cc; }
#tour-title { margin: 0; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.25; letter-spacing: -.025em; }
#tour-title:focus { outline: none; }
.tour-summary { margin: 10px 0 0; color: #c9dbd0; font-size: 14px; line-height: 1.55; }
.tour-media {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    width: 100%;
    margin: 20px 0 14px;
}
.tour-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}
.tour-actions .btn { min-height: 36px; }
.tour-lesson .btn { background: #31483c; border-color: #577162; color: #f3f6ee; }
.tour-lesson .btn:hover:not(:disabled) { background: #3e594b; }
.tour-lesson .btn.primary { background: var(--accent); border-color: var(--accent); color: #203a30; font-weight: 700; }
.tour-lesson .btn.primary:hover:not(:disabled) { background: #def2ac; }
.tour-lesson button:focus-visible, .tour-lesson summary:focus-visible, #tour-audio:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.tour-lesson button:disabled { opacity: .55; cursor: default; }
.tour-lesson .textbtn { color: #d2e3d4; }
.tour-lesson .textbtn:hover { color: #f3f6ee; }
#tour-settings { margin-inline-start: auto; }
#tour-status { flex-basis: 100%; color: #c3d2c9; font-size: 12px; line-height: 1.45; }
#tour-status:empty { display: none; }
#tour-audio { height: 36px; width: min(100%, 310px); }
#tour-transcript-box, #tour-study { width: 100%; border-block-start: 1px solid #476054; }
#tour-study { border-block-end: 1px solid #476054; }
#tour :is(#tour-transcript-box,#tour-study) summary {
    width: fit-content; padding-block: 9px; cursor: pointer; color: #e2ede6; font-size: 14px;
}
#tour-transcript, #tour-notes {
    max-width: 64em; color: #ebf0e9; font-size: 14px; line-height: 1.8;
    overflow-wrap: anywhere;
}
#tour :is(#tour-transcript,#tour-notes) p { margin: 0 0 12px; white-space: pre-line; }
#tour-notes section + section { margin-top: 14px; }
#tour-notes h3 { color: #daecb5; font-size: 15px; margin: 4px 0; }
#tour-sources {
    margin: 8px 0 14px; padding-inline-start: 20px; color: #c9dbd0;
    font-size: 13px; line-height: 1.65; overflow-wrap: anywhere;
}
#tour-sources a { color: #d9edaf; }
#tour-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin-top: auto;
    padding-top: 16px;
}
#tour-target { text-align: left; min-height: 36px; }
.tour-pager { display: flex; flex-wrap: wrap; gap: 6px; margin-inline-start: auto; }
.tour-pager .btn { font-size: 13px; }
#tour-completion { margin: 5px 0 0; color: #c9dbd0; font-size: 12px; }
.learn-reference > summary {
    width: fit-content;
    padding: 6px 0;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
}
.learn-reference > .two { margin-top: 8px; }
[data-tour-stop] { scroll-margin-top: 12px; }
[data-tour-stop]:focus { outline: 2px solid #538465; outline-offset: 3px; }
#voice-settings { width: min(430px, 92vw); }
#voice-form { padding: 22px; }
#voice-form h2 { margin: 0 0 8px; }
#voice-form .footnote { line-height: 1.6; }
#voice-error { color: #9b382d; }
@media (max-width: 790px) {
    .tour-course { gap: 11px; }
}
@media (max-width: 640px) {
    #tour { margin-inline: 13px; }
    #tour-settings { margin-inline-start: 0; }
    .tour-actions { flex-basis: 100%; }
    #tour-target { flex-basis: 100%; }
}
