.single_word_container .inline_block {
    margin-left:10px;
    margin-bottom:10px !important;
    display: inline-block;
    /* text-align: right; */
    transition: opacity 0.5s ease, transform 0.5s ease;
    font-size: 16px !important;
    display: inline-block;
    position: relative;    /* needed for tooltip anchor */
    vertical-align: baseline; /* keeps all inputs on same line */
}
.tw-bs4 form {
    padding: 20px 12px !important;

}
.quizShortcode .wp-block-spacer {
    height: 0px !important;
}
.tw-bs4 .nv-tags-list a,
.tw-bs4 .nv-tags-list a:hover {
    background: #2b2b2b !important;
    color: #fff !important;
}
.single_word_container .inline_block.is_visible {
 
    margin: 5px 5px 5px 5.7px!important;
    margin-bottom: 10px !important;
    opacity: 1;
    visibility: visible;
    letter-spacing: 2px;

}
/* Keep inputs from stretching weirdly */
.single_word_container .single_input {
    display: inline-block;
    vertical-align: baseline;
}

.single_word_container .inline_block.is_visible.left_one {
    text-align: end;
}
.tw-bs4 form input {
    margin: 2px !important;
}
.single_word_container .single_input {
    border:2px solid #ccc;
    border-radius:3px;
    padding-left:5px;
    padding-right:5px;
    padding-top:5px;
    padding-bottom:5px;
    font-size: 16px; /* was 14px — 16px prevents iOS auto-zoom; ch units scale proportionally so word-length hints stay correct */
}
.single_word_container .inline_block.is_visible.no_left {
    margin: 0 !important;
    text-align: left !important;
    width: auto !important;
    margin-right: 5px !important;
}

.single_word_container .inline_block.symbol {

    text-align: right !important;
}
.single_word_container .inline_block.no_left {
    margin-left:0px;
}
.tw-bs4.single_word_container .btn:hover {
    color: #fff !important;
}
.single_word_container .single_tab {
    display:none;
}
.single_word_container .single_tab:first-child {
    display:block;
}
.single_tab form {
    border-radius:25px !important;
    text-align: center; 
}
.tw-bs4 form span {
    padding: 0px !important;
}
/* IRL level pills under Start practice */
.irl-level-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 16px;
}

/* Individual level pill buttons */
.irl-level-pill {
    border-radius: 999px;
    padding: 0.3rem 0.85rem;          /* smaller pill */
    font-size: 0.85rem;               /* smaller text than Start practice */
    border: 1px solid #7C93FE;
    background: #ffffff;
    color: #7C93FE;
    cursor: pointer;
    line-height: 1.3;
    box-shadow: 0 2px 5px rgba(124,147,254,0.12);  /* softer shadow */
    transition: background 0.15s ease,
                color 0.15s ease,
                box-shadow 0.15s ease,
                transform 0.1s ease;
}

.irl-level-pill.is-selected {
    background: #7C93FE;
    color: #ffffff;
    box-shadow: 0 3px 9px rgba(124,147,254,0.2);
}


/* Selected pill – filled like the CTA button */
.irl-level-pill.is-selected {
    background: #7C93FE;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(124,147,254,0.25);
}

/* Slider container */
.slider-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
    padding: 30px;
    margin-bottom:20px;
    background: url(/wp-content/uploads/2024/08/Untitled-1-1.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    color:#fff;
    border: 1px solid #ccc;
    border-radius: 15px;
    gap: 10px;
    font-weight: 600;
    text-transform: capitalize;

}
/* Tooltip styling */
.slider-tooltip {
    position: absolute;
    top: -8px; /* Position above the slider thumb */
    right: 78%;
    transform: translateX(-50%);
    background: #6a5acd;
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    opacity: 1;
    pointer-events: none; /* Prevent interfering with slider interaction */
    transition: opacity 0.2s ease, transform 0.2s ease;
    line-height: normal;
    min-height: 39px;
    display: flex;
    align-items: center;
    max-width: max-content;
    width: 100%;
}
    /* Tooltip visibility when interacting with the slider */
/* .slider-container:hover .slider-tooltip,
.slider-container:focus-within .slider-tooltip {
    opacity: 1;
} */

/* The slider itself */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #fff;
    outline: none;
    transform: scaleX(-1); /* Reverse the slider */
}

/* Custom thumb (handle) */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #6a5acd;
    cursor: grab;
    transition-delay: 2s;
   transition: all 0.5s ease; /* Slows down thumb movement */
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
@media only screen and (max-width: 500px) {
    .single-post .playdis {
        left: 250px !important;
    }
}
@media (max-width:767px) {
    #slider-value {
        display:none !important;
    }
}
@media (max-width:609px) {
    .slider-container {
        flex-wrap:wrap;
        text-align: center;
    }
    input#cefr-slider {
        width: 100%;
    }
}    

/* Custom thumb for Firefox */
.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #6a5acd;
    cursor: grab;
    transition: all 0.5s ease; /* Slows down thumb movement */
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Display the current value */

figure.wp-block-audio {
    display:flex !important;
    flex-direction: row;
    justify-content: center;
    gap: 25px;
}
/* Small meta line under quiz: "12 seconds, 30 words" */
.sir-clip-meta {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #6b7280;
    text-align: left;
}
.single_word_container .wp-block-audio audio {
        width: 100% !important;
    }
#slider-value {
    font-size: 1.1rem;
    width:22%;
}  
input#cefr-slider {
    width: 100%;
}
@media (max-width:1400px) and (min-width: 1024px) {
.slider-tooltip {
        right: 80%;
    }
}
@media (max-width:1023px) and (min-width:768px) {
.slider-tooltip {
        right: 70%;
        top: -20px;
    }
}
@media (max-width:767px) and (min-width: 610px) {
.slider-tooltip {
        right: 66%;
        top: -20px;
    }
}
@media (max-width:609px) and (min-width: 525px) {
    .slider-tooltip {
        right: 56%;
        top: -20px;
    }
}
@media (max-width:524px) and (min-width: 420px) {
    .slider-tooltip {
        right: 36%;
        top: -20px;
    }
    .getAccessTo{
        padding-left: 34% !important;
    }
}
@media (max-width:419px) and (min-width: 320px) {
    .slider-tooltip {
        right: 31%;
        top: -20px;
    }
    .getAccessTo{
        padding-left: 34% !important;
    }
}

.mt-1.mb-2.text-right.wp-dark-mode-bg-image .make_clear {
    display: block !important;
}

.symbol-container {
    display: inline-flex;
    align-items: baseline;
}


form#cta-email-form input[type="email"] {
    min-width: 60% !important;
    width: 60% !important;
    border: 2px solid #a97dff !important;
    border-radius: 50px !important;
    font-size: 15px !important;
    padding: 10px 20px !important;
}

form#cta-email-form {
    display: flex;
    width: 100% !important;
    justify-content: space-between;
    background-color: transparent !important;
    padding: 0px !important;
    margin-bottom: 10px !important;
    margin-top: 0px !important;

}

form#cta-email-form button {
    width: 39% !important;
    min-width: 39% !important;
    font-size: 15px;
    padding: 10px 15px;
}

#cta-email-form button {
    border-radius: 20px !important;
}

form#cta-email-form button:hover {
    background: #a97dff !important;
    color: white !important;
}

@media (max-width: 768px) {
form#cta-email-form input[type="email"] {
    min-width: 100% !important;
    width: 100% !important;
    border: 2px solid #a97dff !important;
    border-radius: 50px !important;
    margin-bottom: 15px !important;
}
form#cta-email-form {
    display: flex !important;
    width: 100% !important;
    flex-direction: column;
}
form#cta-email-form button {
    width: 100% !important;
    min-width: 100% !important;
}
}

 
@media  (min-width: 960px) and (max-width: 1400px) {
    form#cta-email-form button {
        width: 40% !important;
        min-width: 40% !important;
        font-size: 15px;
    }
    form#cta-email-form input[type="email"] {
        min-width: 60% !important;
        width: 60% !important;
    }
} 

@media screen and (min-width: 1440px) {
    section.quizShortcode .single-post-container article {
        width: 100%;
        max-width: 66%;
        padding:40px 160px;
    }
}

/* The container must allow overlaying elements */
.single_word_container {
    position: relative;
    overflow: visible; /* ensure tooltip can overflow */
}

/* Greyed-out quiz when daily limit is reached */
.single_word_container.quiz-locked {
    position: relative;
    opacity: 0.4;                    /* fade everything */
    filter: grayscale(0.3);          /* subtle “greyed out” look */
    transition: opacity 0.2s ease;
}

/* Show “not allowed” cursor on quiz controls */
.single_word_container.quiz-locked input,
.single_word_container.quiz-locked button,
.single_word_container.quiz-locked .make_hint,
.single_word_container.quiz-locked .make_reveal,
.single_word_container.quiz-locked .make_clear {
    cursor: not-allowed;
}

/* Block interaction on everything under the overlay */
.single_word_container.quiz-locked * {
    pointer-events: none;
}

/* But allow interaction on the overlay + its children */
.single_word_container.quiz-locked .quiz-locked-overlay,
.single_word_container.quiz-locked .quiz-locked-overlay * {
    pointer-events: auto;
}

/* Daily limit message under the Start button (fallback text, if used) */
#daily-limit-message.daily-limit-msg {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #555;
}

#daily-limit-message.daily-limit-msg a {
    text-decoration: none !important;
}

/* Outer overlay */
.single_word_container.quiz-locked .quiz-locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.85); /* translucent white wash */
    z-index: 50;
}

/* Inner card */
.quiz-locked-overlay-inner {
    max-width: 440px;
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    padding: 20px 26px 22px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.20);
    font-size: 14px;
    color: #111827;
    border-top: 3px solid #ffa97d; /* subtle brand accent */
}

/* Title */
.quiz-locked-overlay-inner strong {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* Message lines under title */
.quiz-locked-overlay-inner > div {
    margin-bottom: 4px;
    color: #4b5563;
    line-height: 1.5;
}

/* Last line a bit lighter */
.quiz-locked-overlay-inner > div:last-of-type {
    margin-bottom: 10px;
    color: #6b7280;
}

/* Primary CTA button (Upgrade) */
.quiz-locked-overlay-inner a {
    display: inline-block;
    margin-top: 4px;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 22px;
    border-radius: 999px;
    background: #ffa97d;
    color: #ffffff !important;
    border: none;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(255,169,125,0.35);
    transition: all 0.2s ease;
}

/* Hover state */
.quiz-locked-overlay-inner a:hover {
    background: #ff9360;
    box-shadow: 0 6px 16px rgba(255,169,125,0.45);
    transform: translateY(-2px);
}

/* Make sure underline never sneaks back in */
.quiz-locked-overlay-inner a:link,
.quiz-locked-overlay-inner a:visited {
    text-decoration: none;
}
/* Force orange CTA inside the limit overlay */
.tw-bs4 .quiz-locked-overlay-inner a {
    background: #ffa97d !important;      /* solid orange */
    color: #ffffff !important;           /* white text */
    text-decoration: none !important;
    border-radius: 999px;
    padding: 10px 22px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255,169,125,0.35);
    transition: all 0.2s ease;
}

.tw-bs4 .quiz-locked-overlay-inner a:hover {
    background: #ff9360 !important;
    box-shadow: 0 6px 16px rgba(255,169,125,0.45);
    transform: translateY(-2px);
}
/* Hide custom audio player until practice starts */
.sir-audio-player {
    display: none !important;
}

/* Show audio player when practice is active */
body .sir-audio-player.is-active {
    display: flex !important;
}
/* FORCE audio player to show when active - highest specificity */
.tw-bs4 .single_word_container .sir-audio-player.is-active,
body .tw-bs4 .single_word_container .sir-audio-player.is-active,
.sir-audio-player.is-active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    height: auto !important;
    width: 100% !important;
    overflow: visible !important;
}

/* Make absolutely sure it's hidden by default */
.tw-bs4 .single_word_container .sir-audio-player:not(.is-active),
body .tw-bs4 .single_word_container .sir-audio-player:not(.is-active),
.sir-audio-player:not(.is-active) {
    display: none !important;
}
/* Privileged users can see audio player immediately */
.sir-audio-player.is-preview-enabled {
    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* But when practice starts, keep it visible */
.sir-audio-player.is-preview-enabled.is-active {
    display: inline-flex !important;
}
/* FORCE preview-enabled to show - highest specificity */
.tw-bs4.single_word_container .sir-audio-player.is-preview-enabled,
body .tw-bs4.single_word_container .sir-audio-player.is-preview-enabled,
html body .tw-bs4.single_word_container .sir-audio-player.is-preview-enabled {
    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/************************************************
 * Quiz Action Buttons (Hint, Reveal, Clear, Settings)
 ************************************************/

.quiz-action-buttons {
    display: flex !important;
    gap: 12px !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.quiz-action-btn.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    border: 2px solid !important;
    background: transparent !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.quiz-action-btn.btn svg {
    width: 20px !important;
    height: 20px !important;
    transition: transform 0.3s ease !important;
}

/* Hint button - Blue */
.quiz-action-btn.quiz-action-btn--hint.btn {
    color: #7d92ff !important;
    border-color: #7d92ff !important;
    background: transparent !important;
}

.quiz-action-btn.quiz-action-btn--hint.btn:hover,
.quiz-action-btn.quiz-action-btn--hint.btn:focus-visible,
.quiz-action-btn.quiz-action-btn--hint.btn:active {
    background: #7d92ff !important;
    color: #ffffff !important;
    border-color: #7d92ff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(125, 146, 255, 0.4) !important;
}

/* Reveal button - Green */
.quiz-action-btn.quiz-action-btn--reveal.btn {
    color: #10b981 !important;
    border-color: #10b981 !important;
    background: transparent !important;
}

.quiz-action-btn.quiz-action-btn--reveal.btn:hover,
.quiz-action-btn.quiz-action-btn--reveal.btn:focus-visible,
.quiz-action-btn.quiz-action-btn--reveal.btn:active {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
}

/* Clear button - Red */
.quiz-action-btn.quiz-action-btn--clear.btn {
    color: #ff7d92 !important;
    border-color: #ff7d92 !important;
    background: transparent !important;
}

.quiz-action-btn.quiz-action-btn--clear.btn:hover,
.quiz-action-btn.quiz-action-btn--clear.btn:focus-visible,
.quiz-action-btn.quiz-action-btn--clear.btn:active {
    background: #ff7d92 !important;
    color: #ffffff !important;
    border-color: #ff7d92 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 125, 146, 0.4) !important;
}

/* Slow playback button - base (available, not toggled) */
.quiz-action-btn.quiz-action-btn--slow.btn {
    color: #ffa97d !important;
    border-color: #ffa97d !important;
    background: transparent !important;
    position: relative !important;
    width: auto !important;
    min-width: 42px !important;
    padding: 0 6px !important;
}

.quiz-action-btn.quiz-action-btn--slow.btn .wps-slow-icon-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    transition: opacity 0.2s ease !important;
}

.quiz-action-btn.quiz-action-btn--slow.btn .wps-slow-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.quiz-action-btn.quiz-action-btn--slow.btn svg {
    width: 16px !important;
    height: 16px !important;
}

/* Lock icon - hidden by default, shown on hover/press of disabled button */
.quiz-action-btn.quiz-action-btn--slow .wps-slow-lock {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    color: #9ca3af;
}

/* Slow button - disabled/greyed out (no permission) */
.quiz-action-btn.quiz-action-btn--slow.btn.is-disabled {
    color: #d1d5db !important;
    border-color: #d1d5db !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

/* Disabled hover/press/pulse - show lock icon, dim content */
.quiz-action-btn.quiz-action-btn--slow.btn.is-disabled:hover,
.quiz-action-btn.quiz-action-btn--slow.btn.is-disabled:active,
.quiz-action-btn.quiz-action-btn--slow.btn.is-locked-pulse {
    opacity: 0.85 !important;
}

.quiz-action-btn.quiz-action-btn--slow.btn.is-disabled:hover .wps-slow-lock,
.quiz-action-btn.quiz-action-btn--slow.btn.is-disabled:active .wps-slow-lock,
.quiz-action-btn.quiz-action-btn--slow.btn.is-locked-pulse .wps-slow-lock {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.quiz-action-btn.quiz-action-btn--slow.btn.is-disabled:hover .wps-slow-icon-wrap,
.quiz-action-btn.quiz-action-btn--slow.btn.is-disabled:active .wps-slow-icon-wrap,
.quiz-action-btn.quiz-action-btn--slow.btn.is-locked-pulse .wps-slow-icon-wrap {
    opacity: 0.25 !important;
}

/* Slow button - available (hoverable) */
.quiz-action-btn.quiz-action-btn--slow.btn:not(.is-disabled):not(.is-active):hover,
.quiz-action-btn.quiz-action-btn--slow.btn:not(.is-disabled):not(.is-active):focus-visible {
    background: #ffa97d !important;
    color: #ffffff !important;
    border-color: #ffa97d !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 169, 125, 0.4) !important;
}

/* Slow button - active (toggled ON) */
.quiz-action-btn.quiz-action-btn--slow.btn.is-active {
    color: #ffffff !important;
    background: #ffa97d !important;
    border-color: #ffa97d !important;
}

.quiz-action-btn.quiz-action-btn--slow.btn.is-active:hover,
.quiz-action-btn.quiz-action-btn--slow.btn.is-active:focus-visible {
    background: #ff9360 !important;
    border-color: #ff9360 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 169, 125, 0.4) !important;
}

/* Settings button - Charcoal */
.quiz-action-btn.quiz-action-btn--settings.btn {
    color: #374151 !important;
    border-color: #374151 !important;
    background: transparent !important;
}

.quiz-action-btn.quiz-action-btn--settings.btn:hover,
.quiz-action-btn.quiz-action-btn--settings.btn:focus-visible,
.quiz-action-btn.quiz-action-btn--settings.btn:active {
    background: #374151 !important;
    color: #ffffff !important;
    border-color: #374151 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(55, 65, 81, 0.4) !important;
}

/* Active/pressed state for all buttons */
.quiz-action-btn.btn:active {
    transform: translateY(0) scale(0.95) !important;
}

/* Touch device optimization */
@media (hover: none) {
    .quiz-action-btn.btn:active {
        transform: scale(0.95) !important;
    }
}

/************************************************
 * User Quiz Preferences UI (Paid Members Only)
 ************************************************/

/* Modal overlay */
.wps-prefs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.wps-prefs-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

/* Modal panel */
.wps-prefs-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* Modal header */
.wps-prefs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.wps-prefs-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--global-palette3, #1A202C);
}

.wps-prefs-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.wps-prefs-close:hover {
    color: #4b5563;
}

/* Note text - removed per user request */

/* Preference options */
.wps-pref-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: #f9fafb;
    transition: background-color 0.2s ease;
}

.wps-pref-option:hover {
    background-color: #f3f4f6;
}

.wps-pref-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--global-palette4, #2D3748);
}

/* Toggle Switch Styling */
.wps-toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.wps-toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.wps-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.3s;
    border-radius: 28px;
}

.wps-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.wps-toggle-switch input[type="checkbox"]:checked + .wps-toggle-slider {
    background-color: var(--global-palette1, #2B6CB0);
}

.wps-toggle-switch input[type="checkbox"]:checked + .wps-toggle-slider:before {
    transform: translateX(24px);
}

.wps-toggle-switch input[type="checkbox"]:focus + .wps-toggle-slider {
    box-shadow: 0 0 1px var(--global-palette1, #2B6CB0);
}

/* Save button */
.wps-prefs-save {
    background: var(--global-palette1, #2B6CB0);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    margin-top: 0.5rem;
    width: 100%;
    transition: background 0.2s ease;
}

.wps-prefs-save:hover {
    background: var(--global-palette2, #215387);
}

/* Section titles */
.wps-prefs-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 1rem 0 0.5rem 0;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wps-prefs-section-title:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Preference description text */
.wps-pref-desc {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
    margin-top: 2px;
}

/* Locked state for free users */
.wps-pref-locked {
    opacity: 0.6;
}

.wps-pref-locked .wps-pref-label span {
    color: #9ca3af;
}

/* Lock icon container */
.wps-lock-icon {
    width: 52px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 28px;
    flex-shrink: 0;
}

.wps-lock-icon svg {
    color: #9ca3af;
}

/* Pro badge */
.wps-pro-badge {
    display: inline-flex;
    align-items: center;
    background: #10b981;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Upgrade prompt */
.wps-upgrade-prompt {
    background: linear-gradient(135deg, #f0f4ff 0%, #fef3f2 100%);
    border: 1px solid #e0e7ff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wps-upgrade-prompt span {
    font-size: 13px;
    color: #4b5563;
}

.wps-upgrade-link {
    background: var(--global-palette1, #7C93FE);
    color: white !important;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    transition: background 0.2s;
}

.wps-upgrade-link:hover {
    background: var(--global-palette2, #6478e0);
    color: white !important;
}

/* Disabled toggle slider */
.wps-toggle-switch input[type="checkbox"]:disabled + .wps-toggle-slider {
    background-color: #e5e7eb;
    cursor: not-allowed;
}

.wps-toggle-switch input[type="checkbox"]:disabled:checked + .wps-toggle-slider {
    background-color: #93c5fd;
}

/* Select dropdown for quiz preferences */
.wps-prefs-panel .wps-select {
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 150px;
    flex-shrink: 0;
}

.wps-prefs-panel .wps-select:hover {
    border-color: #7C93FE;
}

.wps-prefs-panel .wps-select:focus {
    outline: none;
    border-color: #7C93FE;
    box-shadow: 0 0 0 2px rgba(124, 147, 254, 0.2);
}

/* Mobile responsive */
@media (max-width: 767px) {
    .wps-prefs-panel {
        width: 95%;
        padding: 1.25rem;
    }

    .wps-prefs-header h4 {
        font-size: 16px;
    }

    .wps-upgrade-prompt {
        flex-direction: column;
        text-align: center;
    }
}

/* Hide slider for non-logged-in users (slider still exists in DOM for JS logic) */
.main-slider.irl-slider-hidden {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Free user locked row with lock icon on left */
.wps-pref-locked-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.wps-lock-icon-left {
    flex-shrink: 0;
    color: #9ca3af;
    margin-top: 2px;
}

.wps-pref-locked-row .wps-pref-label {
    flex: 1;
}

.wps-pref-state {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.wps-pref-state--off {
    background: #f3f4f6;
    color: #6b7280;
}

.wps-pref-state--on {
    background: #dcfce7;
    color: #16a34a;
}

/* Student message */
.wps-student-message {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.wps-student-message p {
    margin: 0;
}

/* Teacher warning notification */
.wps-teacher-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgb(254, 243, 199) 0%, rgb(253, 230, 138) 100%);
    border: 1px solid rgb(252, 211, 77);
    border-radius: 12px;
    box-shadow: rgba(251, 191, 36, 0.15) 0px 2px 8px 0px;
    color: rgb(120, 53, 15);
    font-size: 14px;
    line-height: 1.5;
}

.wps-teacher-warning-icon {
    flex-shrink: 0;
    color: rgb(180, 83, 9);
}

.wps-teacher-warning-icon svg {
    width: 24px;
    height: 24px;
}

.wps-teacher-warning-text {
    flex: 1;
}

/* ================================================================
   MOBILE APP FEEL — v2.0
   All new selectors. Nothing above is touched.
   ================================================================ */

/* ── 1. Progress bar ─────────────────────────────────────────── */
.cefr-progress-wrap {
    height: 4px;
    background: #e8ecff;
    border-radius: 9999px;
    margin: 0 0 10px;
    overflow: hidden;
    display: none; /* shown by JS when practice starts */
}

.cefr-progress-wrap.is-visible {
    display: block;
}

.cefr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7d92ff 0%, #a97dff 100%);
    border-radius: 9999px;
    width: 0%;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cefr-progress-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-align: right;
    margin: 0 0 6px;
    display: none;
    letter-spacing: 0.03em;
}

.cefr-progress-label.is-visible {
    display: block;
}

/* Completion flash */
.cefr-progress-wrap.is-complete .cefr-progress-fill {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    animation: cefr-progress-complete 0.5s ease;
}

@keyframes cefr-progress-complete {
    0%   { transform: scaleX(1); }
    50%  { transform: scaleX(1.02); }
    100% { transform: scaleX(1); }
}

/* ── 2. Mobile sticky control bar ───────────────────────────── */
.cefr-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: #fff;
    border-top: 1px solid #e8ecff;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.10);
    overflow: visible;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: none;
    align-items: center;
    gap: 10px;
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Only show on mobile */
@media (max-width: 767px) {
    .cefr-mobile-bar.is-visible {
        display: flex;
        transform: translateY(0);
    }
}

/* Play / pause button in bar */
.cefr-mb-play {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    border: none;
    background: #7C93FE;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.cefr-mb-play:active {
    transform: scale(0.90);
    background: #657af0;
}

/* Scrubber + time label */
.cefr-mb-scrubber-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.cefr-mb-scrubber {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 9999px;
    background: #e0e7ff;
    cursor: pointer;
    outline: none;
}

.cefr-mb-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    background: #7C93FE;
    box-shadow: 0 0 0 3px #eef2ff;
    cursor: pointer;
}

.cefr-mb-scrubber::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    background: #7C93FE;
    box-shadow: 0 0 0 3px #eef2ff;
    cursor: pointer;
    border: none;
}

.cefr-mb-time {
    font-size: 0.68rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Fill counter */
.cefr-mb-counter {
    font-size: 0.8rem;
    font-weight: 700;
    color: #7C93FE;
    white-space: nowrap;
    min-width: 36px;
    text-align: center;
}

/* Hint button in bar */
.cefr-mb-hint {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    border: 2px solid #7d92ff;
    background: transparent;
    color: #7d92ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.cefr-mb-hint:active {
    background: #7d92ff;
    color: #fff;
    transform: scale(0.92);
}

/* ── 3. Start button shimmer while loading ───────────────────── */
#start-quiz-button.cefr-start-btn[disabled] {
    background: #e8ecff !important;
    color: #7d92ff !important;
    cursor: wait !important;
    position: relative;
    overflow: hidden;
}

#start-quiz-button.cefr-start-btn[disabled]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.55) 50%,
        transparent 100%
    );
    animation: cefr-shimmer 1.4s ease-in-out infinite;
}

@keyframes cefr-shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(200%); }
}

/* ── 4. Action button labels on mobile ───────────────────────── */
@media (max-width: 767px) {
    .quiz-action-buttons {
        justify-content: center !important;
        gap: 8px !important;
    }

    /* Widen buttons to fit label text */
    .quiz-action-btn.btn {
        width: auto !important;
        min-width: 56px !important;
        height: 40px !important;
        padding: 0 10px !important;
        gap: 5px !important;
        border-radius: 8px !important;
    }

    /* Inline label after SVG icon */
    .quiz-action-btn--hint::after    { content: 'Hint';  font-size: 11px; font-weight: 700; }
    .quiz-action-btn--reveal::after  { content: 'Show';  font-size: 11px; font-weight: 700; }
    .quiz-action-btn--clear::after   { content: 'Clear'; font-size: 11px; font-weight: 700; }
    .quiz-action-btn--slow::after    { content: '';      font-size: 11px; font-weight: 700; }
    .quiz-action-btn--settings::after { content: '';     font-size: 11px; font-weight: 700; }
}

/* ── 5. Form padding: give inputs more breathing room on mobile ─ */
@media (max-width: 767px) {
    .tw-bs4 form {
        padding: 16px 10px !important;
    }

    /* Slightly larger margin between word blocks so taps don't collide */
    .single_word_container .inline_block {
        margin-left: 6px;
        margin-bottom: 12px !important;
    }
}

/* ── 6. Audio player: more prominent on mobile ───────────────── */
@media (max-width: 767px) {
    .sir-start-audio-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .sir-audio-player {
        width: 100% !important;
        border-radius: 12px !important;
        padding: 10px 14px !important;
        background: #f0f3ff !important;
    }

    .sir-audio-progress {
        flex: 1 !important;
        width: auto !important;
        min-width: 0;
    }
}

/* ── 7. Smooth correct-input flash (replaces nothing, additive) ─ */
.single_word_container .single_input.is_correct {
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* ── 8. Keep mobile bar above any theme footers / chat widgets ── */
@media (max-width: 767px) {
    .cefr-mobile-bar {
        /* position:fixed + bottom:0 handles all normal scrolling with zero JS.
           On keyboard open/close, JS applies transform:translateY to lift bar.
           No scroll listeners = no flicker or wobble. */
        bottom: 0;
        will-change: transform;
    }

    /* ── Progress strip at top of sticky bar ──────────────────── */
    /* On mobile, hide the floating progress bar — strip replaces it */
    .cefr-progress-wrap,
    .cefr-progress-label {
        display: none !important;
    }
}

/* Progress strip — inside the sticky bar, flush to its top edge */
.cefr-mb-progress-strip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #ecfdf3;           /* emerald-50 — light green track */
    border-radius: 4px 4px 0 0;    /* matches bar's top corners */
    overflow: hidden;
}

.cefr-mb-progress-fill {
    height: 100%;
    width: 0%;
    background: #10b981;           /* emerald-500 — site green */
    border-radius: 4px 4px 0 0;
    transition: width 0.3s ease, background 0.3s ease;
}

.cefr-mb-progress-fill.is-complete {
    background: #059669;           /* emerald-600 — deeper green at 100% */
}

/* ── Circular word-count ring ────────────────────────────────────────────── */
/*
   CSS Grid overlay pattern: all children share grid-area 1/1 so they stack.
   No position:absolute needed — grid handles the layering reliably in all
   flex contexts including Safari mobile.
*/
.cefr-ring {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex-shrink: 0;
}

.cefr-ring > * {
    grid-area: 1 / 1;           /* stack SVG and label in the same cell */
}

.cefr-ring-svg {
    width: 40px;
    height: 40px;
    transform: rotate(-90deg);  /* start progress from top */
}

.cefr-ring-track {
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 2.8;
    fill: none;
}

.cefr-ring-fill {
    stroke: #818cf8;
    stroke-width: 2.8;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                stroke 0.3s ease;
}

.cefr-ring.is-complete .cefr-ring-fill {
    stroke: #10b981;
}

.cefr-ring-label {
    font-size: 11px;
    font-weight: 700 !important;
    line-height: 1;
    color: #fff !important;
    pointer-events: none;
    white-space: nowrap;
    text-align: center;
    z-index: 1;
}

/* ── Top-viewport word-completion progress bar ───────────────── */
#cefr-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 999999;
    background: transparent;
    pointer-events: none;
    display: none;
}

#cefr-top-bar.is-visible {
    display: block;
}

#cefr-top-bar-fill {
    height: 100%;
    width: 0%;
    background: #4f46e5;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s ease;
    border-radius: 0 2px 2px 0;
}

#cefr-top-bar-fill.is-complete {
    background: #10b981;
}

/* CheckCircle icon inside ring when complete */
.cefr-ring.is-complete .cefr-ring-label svg {
    width: 16px !important;
    height: 16px !important;
    color: #10b981;
    fill: #10b981;
}

/* Desktop ring wrapper — inline with Start/Stop button */
.cefr-ring-wrap--desktop {
    display: none;
}

.cefr-ring-wrap--desktop.is-visible {
    display: inline-flex;
    align-items: center;
}

/* Desktop ring: 48px to match button height */
.cefr-ring-wrap--desktop .cefr-ring {
    width: 48px;
    height: 48px;
    min-width: 48px;
}

.cefr-ring-wrap--desktop .cefr-ring-svg {
    width: 48px !important;
    height: 48px !important;
}

.cefr-ring-wrap--desktop .cefr-ring-track {
    stroke: rgba(0, 0, 0, 0.1);
}

.cefr-ring-wrap--desktop .cefr-ring-fill {
    stroke: #4f46e5;
}

.cefr-ring-wrap--desktop .cefr-ring-label {
    color: #1e293b !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
}

.cefr-ring-wrap--desktop .cefr-ring.is-complete .cefr-ring-fill {
    stroke: #10b981;
}

.cefr-ring-wrap--desktop .cefr-ring.is-complete .cefr-ring-label {
    color: #059669;
}

/* On mobile: hide desktop ring (ring lives in sticky bar) */
@media (max-width: 767px) {
    .cefr-ring-wrap--desktop {
        display: none !important;
    }
}

/* Mobile ring inside the sticky bar — hidden by default, shown on mobile */
#cefr-mb-ring {
    display: none;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    #cefr-mb-ring {
        display: inline-grid !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        flex-shrink: 0 !important;
    }
    #cefr-mb-ring .cefr-ring-svg {
        display: block !important;
        width: 40px !important;
        height: 40px !important;
        overflow: visible !important;
    }
    /* Bar bg is white — use dark/indigo colors so ring is actually visible */
    #cefr-mb-ring .cefr-ring-track {
        stroke: #e0e7ff !important;   /* light indigo track on white bg */
        stroke-opacity: 1 !important;
        fill: none !important;
    }
    #cefr-mb-ring .cefr-ring-fill {
        stroke: #4f46e5 !important;
        fill: none !important;
    }
    #cefr-mb-ring.is-complete .cefr-ring-fill {
        stroke: #10b981 !important;
    }
    #cefr-mb-ring .cefr-ring-label {
        display: block !important;
        color: #4f46e5 !important;    /* indigo text on white */
        font-size: 11px !important;
        font-weight: 700 !important;
        z-index: 1;
        position: relative;
    }
    #cefr-mb-ring.is-complete .cefr-ring-label {
        color: #059669 !important;
    }
}

/* ── Icons inside bar buttons — ID selector beats any theme class rule */
#cefr-mobile-bar button.cefr-mb-play svg,
#cefr-mobile-bar button.cefr-mb-hint svg {
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    flex-shrink: 0 !important;
    pointer-events: none;
}

/* ── Full-width breakout for quiz container on mobile ────────────
   Kadence "content-style-boxed" adds horizontal padding to #primary.
   This classic vw trick breaks .tw-bs4 out to full viewport width
   regardless of how much the parent theme pads it.
   ─────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .tw-bs4 {
        width: 100vw;
        max-width: 100vw;
        position: relative;
        left: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        right: 50%;
        padding-left: 14px;
        padding-right: 14px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* Ensure the form inside doesn't add extra outer padding on mobile */
    .tw-bs4 form {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ── Slow-speed button in mobile bar ─────────────────────────── */
.cefr-mb-slow {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    border: 1.5px solid #e0e7ff;
    background: transparent;
    color: #7d92ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.cefr-mb-slow.is-slow {
    background: #7d92ff;
    color: #fff;
    border-color: #7d92ff;
}

.cefr-mb-slow:active {
    transform: scale(0.92);
}
/* ── Completion Modal ────────────────────────────────────────────────────── */
#sir-completion-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999990;
}

.sir-cm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}

.sir-cm-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 2rem 2rem 1.75rem;
    max-width: 360px;
    width: calc(100% - 2rem);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    animation: sirCMSlideUp 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes sirCMSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.sir-cm-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #667eea;
    background: #eef0ff;
    border-radius: 20px;
    padding: 3px 10px;
    margin-bottom: 0.9rem;
}

.sir-cm-headline {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.4rem;
    line-height: 1.2;
}

.sir-cm-sub {
    font-size: 0.95rem;
    color: #475569;
    margin: 0 0 1.4rem;
    line-height: 1.45;
}

.sir-cm-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sir-cm-btn {
    display: block;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s, transform 0.1s;
}

.sir-cm-btn:active { transform: scale(0.97); }

.sir-cm-btn--primary {
    background: #667eea;
    color: #fff;
}

.sir-cm-btn--primary:hover { opacity: 0.9; color: #fff; }

.sir-cm-btn--secondary {
    background: #f1f5f9;
    color: #334155;
}

.sir-cm-btn--secondary:hover { background: #e2e8f0; }

.sir-cm-close {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.4rem;
}

.sir-cm-close:hover { color: #475569; }

@media (max-width: 480px) {
    .sir-cm-card { padding: 1.75rem 1.5rem 1.5rem; }
    .sir-cm-headline { font-size: 1.3rem; }
}

/* ─────────────────────────────────────────────────────────────────
/* ─────────────────────────────────────────────────────────────────
   WORD CAPTURE TOAST — 3D deck stack
   All toasts live at the same top position in the region.
   Newest toast is full-size at front; older cards scale down
   and peek out beneath it (depth illusion, not a column).

   Stack:  front (index 0) → full size
           index 1 → scale(0.96) + 8px lower  (peeks below front)
           index 2 → scale(0.92) + 16px lower
           index 3+ → opacity 0, hidden

   Entry:  slight pop spring (scale 0.75→1.06→1.0, opacity 0→1)
   Exit:   fly to upper-right (→ "going to the logbook")
   ───────────────────────────────────────────────────────────────── */

#sir-toast-region {
    position: fixed;
    top: 20px;
    left: 50%;
    margin-left: -190px;       /* center 380px card */
    z-index: 2147483640;
    width: 380px;
    height: 0;                 /* toasts overflow-visible; region doesn't push layout */
    overflow: visible;
    pointer-events: none;      /* individual toasts re-enable pointer-events */
}

.sir-toast {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 380px;
    background: #ecfdf3;
    color: #14532d;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.14),
        0 2px 6px rgba(0, 0, 0, 0.08);
    padding: 1rem 2.4rem 1rem 1.1rem;
    font-size: 0.88rem;
    line-height: 1.5;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0;                /* JS/animation reveals */
    transform-origin: top center;
    /* No default transition — JS sets inline transitions for stack updates */
    /* No will-change here — added only during animation to avoid subpixel AA issues */
}

/* ── Entry pop ──────────────────────────────────────────────────── */
/* Slight spring: scales from 75% → slight overshoot → 100% */
@keyframes sir-toast-pop-in {
    0%   { transform: scale(0.75) translateY(-8px); opacity: 0; }
    60%  { transform: scale(1.05) translateY(2px);  opacity: 1; }
    82%  { transform: scale(0.99) translateY(0);    opacity: 1; }
    100% { transform: scale(1)    translateY(0);    opacity: 1; }
}
.sir-toast--entering {
    animation: sir-toast-pop-in 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    z-index: 10 !important;
}

/* ── Exit: fly to upper-right (off to the logbook) ─────────────── */
@keyframes sir-toast-fly-out {
    0%   { opacity: 1; transform: scale(1) translate(0, 0) rotate(0deg); }
    100% { opacity: 0; transform: scale(0.78) translate(80px, -52px) rotate(3deg); }
}
.sir-toast--dismissing {
    animation: sir-toast-fly-out 0.36s cubic-bezier(0.55, 0, 1, 0.45) forwards !important;
    pointer-events: none !important;
}

/* ── Dismiss × button ───────────────────────────────────────────── */
.sir-toast__close {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    background: none;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    /* Minimum 44×44px touch target (WCAG 2.5.5) */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4ade80;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.sir-toast__close:hover { background: #bbf7d0; color: #14532d; }
.sir-toast__close:focus-visible { outline: 2px solid #7d92ff; outline-offset: 2px; }

/* ── Header: used by summary/rollup/count toasts ────────────────── */
.sir-toast__header {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #16a34a;
    margin-bottom: 0.45rem;
}

/* ── "Captured: word [badge]" line ──────────────────────────────── */
.sir-toast__capture-line {
    display: flex;
    align-items: center;
    gap: 0.4em;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
}
.sir-toast__capture-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #16a34a;
}
.sir-toast__word {
    font-size: 1.45rem;
    font-weight: 700;
    color: #14532d;
    line-height: 1.2;
}

/* ── CEFR level badge (A1, B2, C1 etc.) ────────────────────────── */
.sir-toast__cefr-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1;
    background: rgba(22,101,52,0.1);
    color: #166534;
}
.sir-toast__cefr-badge--b1,
.sir-toast__cefr-badge--b2 { background: rgba(37,99,235,0.1); color: #1e40af; }
.sir-toast__cefr-badge--c1,
.sir-toast__cefr-badge--c2 { background: rgba(124,58,237,0.1); color: #6d28d9; }

/* ── "Added to your Logbook." confirmation line ─────────────────── */
.sir-toast__added {
    font-size: 0.8rem;
    color: #16a34a;
    margin-bottom: 0.5rem;
}

/* ── "First heard in:" block ────────────────────────────────────── */
.sir-toast__episode {
    font-size: 0.8rem;
    color: #166534;
    margin-bottom: 0.5rem;
}
.sir-toast__episode-label {
    font-weight: 600;
    opacity: 0.8;
}
.sir-toast__episode-link {
    font-size: 0.84rem;
    color: #15803d;
    text-decoration: none;
    border-bottom: 1px solid #bbf7d0;
    transition: border-color 0.15s, color 0.15s;
}
.sir-toast__episode-link:hover { color: #14532d; border-color: #16a34a; }

/* ── Coverage tier badge (inline in eyebrow) ────────────────────── */
/* Solid fill + contrasting text — tier color as text on gradient fails contrast */
.sir-toast__cov-tier-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-left: 0.4em;
    padding: 0.15em 0.55em;
    border-radius: 999px;
    /* background + color set via inline style from JS (tier.badgeBg + tier.badgeText) */
    vertical-align: middle;
    line-height: 1.6;
}
/* ── Coverage level-up name ─────────────────────────────────────── */
.sir-toast__cov-level-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.sir-toast__footer {
    border-top: 1px solid #bbf7d0;
    padding-top: 0.55rem;
}
.sir-toast__log-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #15803d;
    text-decoration: none;
    transition: color 0.15s;
}
.sir-toast__log-link:hover { color: #14532d; text-decoration: underline; }

/* ── Guest running total line ────────────────────────────────────── */
.sir-toast__guest-total {
    font-size: 0.78rem;
    color: #4ade80;
    margin: 0.35rem 0 0.5rem;
    font-weight: 500;
}

/* ── Summary word list ──────────────────────────────────────────── */
.sir-toast__summary-words {
    font-size: 0.88rem;
    color: #166534;
    margin: 0.3rem 0 0.75rem;
    line-height: 1.6;
}

/* ── Completion toast variant (white, site palette) ─────────────── */
.sir-toast--completion {
    background: #ffffff;
    color: #0f172a;
    border-color: #e2e8f0;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.16),
        0 2px 8px rgba(0, 0, 0, 0.08);
}
.sir-toast--completion .sir-toast__close       { color: #94a3b8; }
.sir-toast--completion .sir-toast__close:hover { background: #f1f5f9; color: #0f172a; }

.sir-toast__badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: #6366f1;
    color: #fff;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    margin-bottom: 0.5rem;
}
.sir-toast__headline {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 0.25rem;
}
.sir-toast__sub {
    font-size: 0.84rem;
    color: #475569;
    margin-bottom: 0.85rem;
    line-height: 1.5;
}
.sir-toast__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.sir-toast__cta {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
}
.sir-toast__cta--primary   { background: #6366f1; color: #fff; }
.sir-toast__cta--primary:hover  { background: #4f46e5; color: #fff; }
.sir-toast__cta--secondary { background: #f1f5f9; color: #334155; }
.sir-toast__cta--secondary:hover { background: #e2e8f0; }

/* ── Completion toast link (brand blue on white bg) ── */
.sir-toast--completion .sir-toast__log-link,
.sir-toast--completion .sir-toast__log-link--completion {
    color: #7d92ff;
    font-weight: 600;
}
.sir-toast--completion .sir-toast__log-link:hover,
.sir-toast--completion .sir-toast__log-link--completion:hover {
    color: #5a6fd1;
    text-decoration: underline;
}

/* ── Cold-state inline disclaimer (replaces old progress bar) ── */
.sir-toast__cold-note {
    font-size: 0.78em;
    color: #94a3b8;
    font-style: italic;
    white-space: nowrap;
}

/* ── Coverage toast — brand gradient, eye-catching milestone moment ── */
.sir-toast--coverage {
    background: linear-gradient(135deg, #a97dff 0%, #7d92ff 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 12px 40px rgba(169, 125, 255, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.18);
}
.sir-toast--coverage .sir-toast__close       { color: rgba(255,255,255,0.7); }
.sir-toast--coverage .sir-toast__close:hover { background: rgba(255,255,255,0.15); color: #fff; }
.sir-toast--coverage .sir-toast__headline    { color: #fff; font-size: 1.5rem; font-weight: 800; }
.sir-toast--coverage .sir-toast__sub         { color: rgba(255,255,255,0.88); }
.sir-toast--coverage .sir-toast__footer      { border-top-color: rgba(255, 255, 255, 0.25); }
.sir-toast--coverage .sir-toast__log-link    { color: #fff; font-weight: 700; }
.sir-toast--coverage .sir-toast__log-link:hover { color: rgba(255,255,255,0.85); text-decoration: underline; }

/* Progress hook toast — guest hasn't hit coverage threshold yet */
.sir-toast--progress-hook {
    background: #1e293b;
    border-color: #334155;
}
.sir-toast--progress-hook .sir-toast__close       { color: #94a3b8; }
.sir-toast--progress-hook .sir-toast__close:hover { background: rgba(255,255,255,0.08); color: #e2e8f0; }
.sir-toast--progress-hook .sir-toast__headline    { color: #f1f5f9; font-size: 1rem; font-weight: 700; }
.sir-toast--progress-hook .sir-toast__sub         { color: #94a3b8; font-size: 0.82rem; }

/* Eyebrow label above the score or progress bar */
.sir-toast__cov-eyebrow {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.4rem;
}

/* Progress bar (pre-reveal CALCULATING state) */
.sir-toast__cov-track {
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    margin-bottom: 0.6rem;
    overflow: hidden;
}
.sir-toast__cov-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 3px;
    min-width: 4px; /* always visible even at tiny % */
    transition: width 0.6s ease;
}

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .sir-toast--entering  { animation: none; opacity: 1; transform: none; }
    .sir-toast--dismissing { animation: none; opacity: 0; }
    .sir-toast__cov-fill  { transition: none; }
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    #sir-toast-region {
        top: 12px;
        left: 12px;
        right: 12px;
        margin-left: 0;
        width: calc(100vw - 24px);
    }
    .sir-toast { width: 100%; right: 0; }
}

/* ── Coverage eyebrow label (small LISTENING COVERAGE label above toast body) ── */
.sir-toast__cov-eyebrow {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
    opacity: 0.75;
}
.sir-toast--completion .sir-toast__cov-eyebrow { color: #64748b; }
.sir-toast--coverage  .sir-toast__cov-eyebrow  { color: rgba(255,255,255,0.9); }

/* ── Combined completion + recommendation toast ─────────────────── */
/* Header: badge + headline on same row, LP tier sub-line below */
.sir-toast--combined .sir-toast__cm-header {
    display: block;
    margin-bottom: 6px;
}
/* Title row: [BADGE--sm] Headline on one flex line */
.sir-toast--combined .sir-toast__cm-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
/* Headline — inline next to badge */
.sir-toast--combined .sir-toast__cm-headline {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}
/* LP tier sub-line below title row */
.sir-toast--combined .sir-toast__cm-lp-sub {
    margin-top: 2px;
    font-size: 0.72rem;
    color: #64748b;
}
/* Why-copy + Go button on one row */
.sir-toast--combined .sir-toast__cm-rec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}
.sir-toast--combined .sir-toast__rec-why {
    font-size: 0.80rem;
    color: #475569;
    line-height: 1.4;
    flex: 1;
}
/* Go / Continue button — filled pill */
.sir-toast--combined .sir-toast__rec-go {
    flex-shrink: 0;
    display: inline-block;
    background: #7d92ff;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.5;
}
.sir-toast--combined .sir-toast__rec-go:hover { background: #5a6fd1; color: #fff; }

/* ── Recommendation Toast ────────────────────────────────────────── */
.sir-toast--rec {
    background: #ffffff;
    color: #0f172a;
    border-color: #e2e8f0;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.16),
        0 2px 8px rgba(0, 0, 0, 0.08);
}
.sir-toast--rec .sir-toast__close       { color: #94a3b8; }
.sir-toast--rec .sir-toast__close:hover { background: #f1f5f9; color: #0f172a; }

/* Source clip acknowledgement ("You finished '…'") */
.sir-toast__rec-source {
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Recommended clip title */
.sir-toast__rec-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}
.sir-toast__rec-link {
    color: #7d92ff;
    text-decoration: none;
}
.sir-toast__rec-link:hover { text-decoration: underline; }

/* Why copy */
.sir-toast__rec-why {
    font-size: 0.8rem;
    color: #475569;
    margin-bottom: 0.65rem;
    line-height: 1.4;
}
.sir-toast__rec-why b { color: #c4b5fd; font-weight: 600; }

/* CTA row: Go + vote buttons */
.sir-toast__rec-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}
.sir-toast__rec-go {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    background: #7d92ff;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: background 150ms ease;
    flex-shrink: 0;
}
.sir-toast__rec-go:hover { background: #6375e8; color: #fff; text-decoration: none; }

.sir-toast__rec-vote {
    background: none;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 1rem;
    cursor: pointer;
    color: #94a3b8;
    transition: border-color 150ms ease, background 150ms ease;
    line-height: 1;
}
.sir-toast__rec-vote:hover:not(:disabled) {
    border-color: #7d92ff;
    background: rgba(125, 146, 255, 0.1);
}
.sir-toast__rec-vote:disabled { opacity: 0.5; cursor: default; }
.sir-toast__rec-vote--active  { border-color: #7d92ff; background: rgba(125, 146, 255, 0.15); }

/* Guest "Claim your Logbook" footer */
.sir-toast__rec-claim {
    font-size: 0.75rem;
    color: #7d92ff;
    font-weight: 600;
}
.sir-toast__rec-claim:hover { color: #a97dff; text-decoration: underline; }

/* ── Combined rec toast — new layout (2026-03) ───────────────────── */
/* Eyebrow row: small badge left, LP tier label right */
.sir-toast--combined .sir-toast__cm-eyebrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
/* Small badge variant — eyebrow size */
.sir-toast--combined .sir-toast__badge--sm {
    font-size: 0.65rem;
    padding: 2px 7px;
    letter-spacing: 0.08em;
}
/* LP tier label (right of eyebrow) */
.sir-toast--combined .sir-toast__lp-badge {
    font-size: 0.70rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    opacity: 0.9;
}
/* Recommended clip title — key conversion element, most prominent in rec section */
.sir-toast--combined .sir-toast__rec-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin: 4px 0 6px;
}

/* Attribution line ("Your logbook recommends:") */
.sir-toast--combined .sir-toast__rec-attribution {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 6px 0 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
/* Focus text block — sub_rec + why_copy flow together */
.sir-toast--combined .sir-toast__focus-text {
    font-size: 0.84rem;
    color: #1e293b;
    line-height: 1.45;
    margin-bottom: 10px;
}
.sir-toast--combined .sir-toast__focus-sub {
    font-weight: 600;
    color: #0f172a;
}
.sir-toast--combined .sir-toast__focus-why {
    color: #475569;
}
.sir-toast--combined .sir-toast__focus-why b { color: #a97dff; font-weight: 600; }
/* Go button sits below the focus block, full row with space for eye */
.sir-toast--combined .sir-toast__rec-go {
    display: block;
    text-align: center;
}

/* Logbook next-up why-copy sub-line */
.sir-lb-cov-next-why {
    display: block;
    font-size: 0.72rem;
    color: var(--lb-muted, #64748b);
    font-weight: 400;
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════
   GOT AWAY — Logbook section (words heard but never captured)
   Used in [sir_logbook_admin] shortcode on account page.
   ═══════════════════════════════════════════════════════════════════ */

.sir-got-away {
    background: #0f172a;
    border: 1px solid #1e3a5f;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}
.sir-got-away-header h3 {
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sir-got-away-count {
    background: #1d4ed8;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 10px;
}
.sir-got-away-header p {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0 0 20px;
}
.sir-got-away-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sir-got-away-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #1e293b;
    border-radius: 8px;
}
.sir-ga-word {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 1rem;
    min-width: 120px;
}
.sir-ga-heard {
    color: #64748b;
    font-size: 0.8rem;
    background: #0f172a;
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
}
.sir-ga-cefr {
    font-size: 0.75rem;
    font-weight: 700;
}
.sir-ga-link {
    margin-left: auto;
    color: #60a5fa;
    font-size: 0.82rem;
    text-decoration: none;
}
.sir-ga-link:hover { text-decoration: underline; }

/* CEFR level colours */
.sir-cefr-a1 { color: #86efac; }
.sir-cefr-a2 { color: #6ee7b7; }
.sir-cefr-b1 { color: #fde68a; }
.sir-cefr-b2 { color: #fca5a5; }
.sir-cefr-c1,
.sir-cefr-c2 { color: #f87171; }

/* ── Stats: hint pill (purple, 0% ease) ── */
.sir-ease-input--hint { border-color: #7c3aed; color: #7c3aed; background: #f5f3ff; }

/* ── Quiz input: hinted state locked to purple/neutral — cannot turn green ── */
/* !important overrides dynamically-injected .is_correct rule from shortcodes.php */
.single_word_container .single_input.is_hint,
.single_word_container .single_input.is_hint.is_correct {
    border: 2px solid #a97dff !important;
    background: #faf5ff !important;
    color: #7c3aed !important;
    pointer-events: none;
}

/* ── Repeat-capture word toast header ── */
.sir-toast__header--repeat {
    font-size: 0.78rem;
    font-weight: 600;
    color: #a786ff;
    letter-spacing: 0;
    text-transform: none;
    margin-bottom: 0.4rem;
}

/* ── Logbook coverage card: expand state ── */
/* Summary bar fades out when level breakdown is open */
.sir-lb-coverage.is-expanded .sir-lb-cov-summary-bar {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    overflow: hidden;
    transition: opacity 200ms ease, max-height 280ms ease, margin-bottom 280ms ease;
}
/* Score shrinks to defer to level bars */
.sir-lb-coverage.is-expanded .sir-lb-cov-score-inline {
    font-size: 1rem;
    transition: font-size 200ms ease;
}
@media (max-width: 360px) {
    .sir-lb-cov-score-inline { font-size: 1.2rem; }
}
