.clickable {
    cursor: pointer;
}

.book {
    display: none;
}

.lesson-cont {
    line-height: 1.7;
    background-color: white;
    color: black;
    margin: 0 auto; /* Center container and add top/bottom margin */
    max-width: 92%; /* mobile */
}
@media (min-width: 1000px) {
    .lesson-cont {
        max-width: 75%; /* ADAPT */
    }
}
@media (min-width: 1275px) {
    .lesson-cont {
        max-width: 65%;
    }
}
/* @media (min-width: 1400px) {
    .lesson-cont {
        max-width: 60%;
    }
} */

.lesson-cont h1 {
    font-size: 1.5rem;
    text-align: left;
    /* color: rgb(23, 82, 131); */
    margin: 1rem 0rem 0rem;
    /* background-image: linear-gradient(rgb(63, 130, 185), rgb(39, 101, 152)); */
    background-image: linear-gradient(rgb(83, 146, 197), rgb(61, 122, 172));
    color: white;
    border-radius: 1.25rem;
    padding: 0.5rem 0.8rem;
}

.lesson-cont .videoH1 {
    font-size: 1.5rem;
    text-align: left;
    margin: 1rem 0rem;
    background-image: linear-gradient(rgb(66, 185, 120), rgb(57, 174, 110));
    color: white;
    border-radius: 1.25rem;
    padding: 0.5rem 0.8rem;
}

.lesson-cont h2 {
    font-size: 1.4rem;
    /* color: rgb(170, 7, 7);
    background-color: white; */
    background-image: linear-gradient(rgb(66, 185, 120), rgb(57, 174, 110));
    color: white;
    /* text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); */
    border-radius: 1.25rem;
    padding: 0.5rem 0.8rem;
    margin: 1rem 0rem;
}

.part-title {
    font-size: 1.2rem !important; 
    margin: 0.4rem 0rem !important;
}

.lesson-cont h3 {
    font-size: 1.2rem;
    background-image: linear-gradient(rgb(101, 155, 200), rgb(119, 170, 211));
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
    /* background-image: linear-gradient(rgb(91, 197, 161), rgb(105, 202, 169));    */
    padding: 0.4rem 0.8rem;
    /* color: rgb(23, 82, 131); */
    color: white;
    margin: 0.5rem 0rem 1rem;
    border-radius: 1.25rem;
}

.lesson-cont h4 {
    font-size: 1.2rem;
    color: rgb(45, 45, 45);
    margin: 0.5rem 0rem 0.3rem;
}

.lesson-cont section {
    margin-bottom: 1.5rem;
}

.lesson-cont p {
    margin: 0.5rem 0;
}

.pointer{
    position: relative;
    padding-left: 1.2rem; /* Indents text to make space for triangle */
}

.pointer::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 10px; /* Creates triangle shape */
    border-color: transparent transparent transparent green; /* Green triangle */
}

/* add to homescreen banner / div  */
.homescreen {
    display: flex;
    flex-direction: row;
    justify-content: flex-start; 
    align-items: center;
    padding: 0.3rem 1rem;
    /* width: auto; */
    cursor: pointer;
    background-image: linear-gradient(rgb(63, 130, 185), rgb(39, 101, 152));
    border-radius: 0.85em;
    margin: 0 auto;
}
.homescreen-content { /* add to homescreen banner / div  */
    display: flex;
    flex-direction: row;
    justify-content: flex-start; 
    align-items: center;
    gap: 1rem; /* Space between image and slogan */
    max-width: fit-content; /* Shrink-wrap the content */
}
.homescreen img { /* add to homescreen banner / div  */
    height: 6rem;
    width: auto;
    border-color: white;
    border-width: 0.15rem;
    border-style: solid; /* Added to make the border visible */
}

.homescreen-slogan { /* add to homescreen banner / div  */
    display: flex;
    align-items: center;
    height: 6rem;
    padding: 0;
    margin: 0;
    text-align: left;
    font-size: 1.15rem;
    /* color: rgb(23, 82, 131); */
    color:white;
    font-weight: 600;
    /* text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); Adds a subtle shadow */

}

/* Type Styling & Play Button */
.chars, .chars2{
  font-size: 1.2rem;
}

.play {
    width: 1.35rem;
    height: 1.35rem;
    margin-right: 0.35rem;
    vertical-align: -0.15em; /* nudge down like emoji */
    transition: transform 120ms ease, opacity 120ms ease, filter 120ms ease;
}

.play.is-pressed {
    transform: scale(0.92);
    opacity: 0.8;
}

/* While the clip is playing (subtle glow) */
/* .play.is-playing {
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.35));
} */

/* Pronunciation */

.tone-list {
    list-style: none; /* Remove default bullets */
    padding-left: 0;
    margin-bottom: 1rem;
}

.tone-list li {
    margin-bottom: 1rem;
    padding-left: 1.2rem;
    position: relative;
}

.tone-list li strong {
    color: rgb(23, 82, 131);
}

.tone-list li p, 
.tone-list li .voc-grid {
    margin: 0.8rem 0rem;
}

.tone-list li::before {
    content: '✓'; /* Or '→', '•', etc. */
    position: absolute;
    left: 0;
    color: green;
    /* color: rgb(170, 7, 7); Accent color */
    font-weight: bold;
    font-size: 1rem;
}

/* Vocabulary Grid Layout */
.voc-grid {
    display: grid;
    grid-template-columns: 20% 20% 60%;
    margin-bottom: 1.5rem;
    margin-top: 1.2rem;
    gap: 0;
}

.voc-grid > div {
    display: flex; 
    align-items: center; /* vertically in cell */
    padding: 0.2rem 0.6rem;
    overflow-wrap: anywhere; /* Avoids breaking words */
    white-space: normal; /* Ensures natural text wrapping */
    margin: 0;
}

@media (max-width: 650px) {
    .voc-grid {
        grid-template-columns: 100%;
    }
    .voc-grid > div {
        grid-column: 1;
    }
}

.alt {
    /* background-color:rgb(255, 242, 242) !important; */
    background-color:rgb(231, 242, 249) !important; 
    /* background-color: rgb(234, 243, 234) !important; */
}

.voc-header {
    font-weight: bold;
    /* background-color: rgb(255, 242, 242);
    color: rgb(170, 7, 7); */
    background-color:rgb(231, 242, 249);
    /* background-color: rgb(234, 243, 234); */
    color: rgb(23, 82, 131);
    font-size: 1.05rem;
}

.lesson-cont .note {
    padding: 0.6rem 1.25rem;
    /* background-color: rgb(255, 242, 242); */
    /* background-color:rgb(226, 240, 249); */
    background-color:rgb(231, 242, 249); 
    /* background-color: rgb(234, 243, 234); */
    border-radius: 1rem;
    margin: 1.5rem 0;
    /* color:black; */
}

.movenoteup {
    margin-top: -3rem !important;
    margin-bottom: 2rem !important;
}

.note p {
    margin: 0.5rem 0rem;
}

.onote  {
    background-color: rgb(237, 246, 235);
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    margin: 0.4rem 0rem;
    font-weight: 550;
}

/* Grammar  */

.check {
    text-indent: 0rem; /* Indents the paragraph to the right */
    position: relative; /* Allows positioning of the pseudo-element */
    padding-left: 1.5rem; /* Makes space for the checkmark */
    font-size: 1.05rem;
}
  
.check::before {
    content: '✓'; /* Adds the checkmark symbol */
    position: absolute; /* Positions the checkmark relative to the paragraph */
    left: 0; /* Aligns the checkmark to the left */
    top: 0%; 
    margin-right: 0.5rem; /* Adds space between checkmark and text */
    color: green;
    font-weight: bold;
    font-size: 1.2rem;
}

.pattern {
    font-size: 1.05rem;
    color: rgb(23, 82, 131);
    font-weight: 550;
    margin: 0.7rem 0 !important;
}

/* Sentences */
.sentences-list {
    margin-top: 1.1rem;
}

.lesson-cont .example {
    margin: 1.1rem 0;
    padding: 0.2rem 0.6rem;
    background-color: #fdfdfd;
    border-left: 0.22rem solid green; 
    border-radius: 0.2rem;
}

.example p {
    margin: 0.55rem 0;
}

.example p:last-child {
    margin-bottom: 0rem; /* Remove margin from the last line */
}
.example p:first-child {
    margin-top: 0rem; /* Remove margin from the first line */
}

/* Dialogue Section */

.dialogue-list {
    margin-top: 1.1rem;
}

.dia-line {
    margin: 1.1rem 0rem;
    padding: 0.2rem 0.6rem;
    background-color: #fdfdfd;
    border-left: 0.22rem solid green;
    border-radius: 0.2rem;
}

.dialogue-list > .speaker-2 {
    border-left: 0.22rem solid rgb(33, 114, 180);
}

.dialogue-list > .speaker-3 {
    border-left: 0.22rem solid rgb(228, 164, 68);
}

.dia-line p {
    margin: 0.55rem 0;
}

.dia-line p:last-child {
    margin-bottom: 0rem; /* Remove margin from the last line */
}
.dia-line p:first-child {
    margin-top: 0rem; /* Remove margin from the first line */
}

/* Character analysis */

.char-item .voc-grid {
    margin: 0.2rem 0rem;
}

.char-item {
    margin: 1.1rem 0;
    padding: 0.1rem 0.6rem;
    background-color: #fdfdfd;
    border-left: 0.22rem solid green; /* Accent color border */
}
.char-item p {
    margin: 0.5rem 0;
}
.char-item p:last-child {
    margin-bottom: 0rem; /* Remove margin from the last line */
}
.char-item p:first-child {
    margin-top: 0rem; /* Remove margin from the first line */
}

/* bottom */
.section-end {
    padding-bottom: 1rem;
}

/* characters */

:root {
    --ink: #1a1a2e;
    --paper: #f5f0e8;
    --accent: #c0392b;
    --accent-soft: #e74c3c22;
    --stone: #5b5b5b;
    --warm-white: #faf7f2;
    --soft-green: rgb(234, 243, 234);
    --shadow-color: 20deg 20% 50%;
    --cnav-clickarea: -35px;
}

/* Hide all character pages by default */
.character-page {
    display: none; 
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 1rem;
    max-width: 100%;
    margin: 0 auto;
}

.character {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto 0.3rem;
    gap: 0.5rem;
}

.character .chars {
    font-size: 5.5rem;
    line-height: 6rem;
    color: var(--ink);
    margin: 0 auto;
}

@media (max-width: 650px) {
    .character-page {
        gap: 0.9rem;
    }
    .character {
        gap: 0.3rem;
    }
}

/* Subtle underline accent */
/* .character .chars::after {
    content: '';
    display: block;
    width: 6rem;
    height: 3px;
    background: var(--accent);
    margin: 1rem auto 0;
    border-radius: 3px;
} */

.character .pinyin {
    font-size: 1.15rem;
    text-transform: lowercase;
    color: var(--stone);
    margin: 0 auto 0;
    font-weight: 500;
}

.character .english {
    font-size: 1.05rem;
    color: var(--ink);
    margin: 0 auto 0;
    font-style: italic;
}

.character-explanation {
    margin: 0 auto 0;
    padding: 1rem 1.5rem;
    background: var(--warm-white);
    /* border-left: 3px solid var(--accent); */
    border-radius: 0.5rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
    max-width: 36rem;
}

.character-example {
    width: 16rem;
    margin: 0rem auto;
    border-radius: 0.2rem;
    padding: 0.2rem 0.6rem;
    background-color: #fdfdfd;
    border-left: 0.22rem solid green; 
    text-align: center;
    /* background: var(--soft-green); */
}

.character-example p {
    margin: 0.2rem 1rem;
}

.character-example .pinyin, .english{
    font-size: 1.05rem;
}

.character-example .chars, .chars2{
    font-size: 1.2rem;
}

@media (max-width: 650px) {
    .character-explanation {
        padding: 0.6rem 0.6rem;
        font-size: 1rem;
    }
    .character-example p {
        margin: 0.1rem 1rem;
    }
    .character-example .pinyin, .english{
        font-size: 1rem;
    }
}

/* .character-explanation::before {
    content: '筆記';
    position: absolute;
    top: -1rem;
    left: 1.5rem;
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    color: var(--ink);
    background: var(--warm-white);
    padding: 0.6rem;
    border-radius: 0.15rem;
} */

.flashcard-progress-container {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between the bar and the text */
    padding: 0 10px; /* Optional: keeps it from touching the very edges */
    max-width: 50%;
    margin: 2.5rem auto 2rem; /* Centers the bar and keeps the 20px bottom margin */
}

.flashcard-progress-bar {
    flex-grow: 1; /* Makes the bar take up all available leftover space */
    height: 8px;
    background-color: #e5e7eb; /* Light gray track */
    border-radius: 4px;
    overflow: hidden;
}

.flashcard-progress-fill {
    height: 100%;
    background-color: mediumseagreen; /* Nice modern blue */
    width: 0%; /* Starting width, JS will control this */
    transition: width 0.3s ease-in-out; /* Smooth sliding animation */
}

.flashcard-progress-text {
    display: none;
    color: #888888;
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap; /* Prevents the text from wrapping to a new line */
}

/* --- Character Navigation --- */

/* --- 1. The Carousel Wrapper --- */
.flashcard-carousel {
    position: relative;
    max-width: 90vw;
    margin: 0 auto;
    width: 100%;
}

/* --- 2. The Character Pages (The Cards) --- */

/* Only show the page that has the active class */
.character-page.active {
    display: flex;
    animation: fadeIn 0.3s ease-in-out; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 3. The Navigation --- */
.cnav.cnav-simple {
    position: absolute;
    top: 5.5rem; 
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(-50%);
    padding: 0 1rem; 
    box-sizing: border-box;
    pointer-events: none; /* Lets users click the text under the invisible wrapper */
}

.cnav-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    gap: 0.25rem;
    color: var(--stone);
    text-decoration: none;
    transition: opacity 0.2s ease;
    pointer-events: auto; /* Re-enables clicks specifically on the buttons */
}

.cnav-link:hover {
    opacity: 0.8;
}

.cnavsvg {
    width: 2.3rem;
    height: 2.3rem;
}

.cnav-text {
    font-size: 0.9rem;
    /* text-transform: uppercase; */
    /* letter-spacing: 0.05em; */
}

/* Desktop Spacing */
@media (min-width: 768px) {
    .cnav.cnav-simple {
        padding: 0 12rem; 
    }
}

.cnav-link::before {
    content: "";
    position: absolute;
    /* Expand the hit area by 20px in every direction */
    top: var(--cnav-clickarea);
    bottom: var(--cnav-clickarea);
    left: var(--cnav-clickarea);
    right: var(--cnav-clickarea);
    z-index: 1;
}

/* options gear */
/* --- Pinyin Hiding Logic --- */
/* When the body has this class, hide the pinyin elements */
body.hide-pinyin .voc-grid .chars + div,
body.hide-pinyin .voc-grid .voc-header:nth-child(2),
body.hide-pinyin .example p.chars + p,
body.hide-pinyin .dia-line p.chars + p,
body.hide-pinyin .pinyin,
body.hide-pinyin .quiz-option .opt-pinyin
{
    display: none; 
}

body.hide-pinyin .voc-grid {
    grid-template-columns: 25% 75%; 
}

@media (max-width: 650px) {
    body.hide-pinyin .voc-grid {
        grid-template-columns: 35% 65%;
    }
    body.hide-pinyin .voc-grid > div {
        grid-column: auto;
    }
}

/* --- Settings Menu Styles --- */
.nav-right-group {
    display: flex;
    align-items: center;
    gap: 20px; /* Adjust this to change the space between Next and the Gear */
}

.settings-container {
    position: relative;
    display: flex;
    align-items: center;
}

.settings-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.settings-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgb(227, 241, 227);
    border: 2.5px solid rgb(20, 133, 20);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 0.8rem 1.3rem;
    font-weight: 500;
    border-radius: 8px;
    z-index: 5;
    white-space: nowrap;
}

.settings-menu.show {
    display: block;
}

/* Ensure the label layout stays neat */
.pinyin-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Pushes text to left, switch to right */
    gap: 15px;
    cursor: pointer;
    font-size: 14px;
    margin: 0;
}

/* --- iOS Toggle Switch Styles --- */

/* 1. Sizing the switch container */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

/* 2. Hide the default ugly checkbox */
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* 3. The slider track (the gray background when off) */
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #c4c4c4; /* iOS off-gray */
    transition: 0.3s ease-in-out;
    border-radius: 26px; /* Makes it a pill shape */
}

/* 4. The slider knob (the white circle) */
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s ease-in-out;
    border-radius: 50%; /* Makes it perfectly round */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Gives it that slight 3D pop */
}

/* 5. When the hidden checkbox is checked, turn the track green */
.toggle-switch input:checked + .toggle-slider {
    background-color: rgb(20, 133, 20); /* Classic iOS Green */
}

/* 6. When checked, slide the white knob to the right */
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* quiz.css — shared styles for the lesson quizzes */

.quiz-cont {
    max-width: 55%;
    margin: 0 auto;
    /* padding: 20px 0; */
}

.quiz-header {
    margin-top: 0.8rem;
}

.quiz-score {
    font-size: 1.2em;
    font-weight: bold;
    color: rgb(20, 133, 20);
    margin-bottom: 0.65rem;
    text-align: right;
}

.quiz-progress-bar {
    width: 100%;
    height: 6px;
    background: #eaeaea;
    border-radius: 3px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background-color: mediumseagreen;
    /* background: linear-gradient(90deg, #4CAF50, #8BC34A); */
    width: 0%;
    transition: width 0.3s ease;
}

.quiz-prompt {
    text-align: center;
    margin-top: 0.8rem;
    font-size: 1.45rem;
    font-weight: 500;
    color: #2f2f2f;
    /* min-height: 60px; */
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-options {
    margin-top: 0.8rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.quiz-option {
    padding: 1rem 0.1rem;
    background: #fff;
    border: 2px solid mediumseagreen;
    border-radius: 1rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    user-select: none;
}

/* Only apply hover on devices that actually support hover (mouse) */
@media (hover: hover) and (pointer: fine) {
    .quiz-option:hover:not(.disabled):not(.wrong):not(.correct) {
        background-color: rgb(234, 242, 234);
        /* transform: translateY(-2px); */
        /* box-shadow: 0 3px 10px rgba(0,0,0,0.1); */
    }
}

/* Optional: nice touch feedback on iPhone/iPad (shows briefly on tap) */
.quiz-option:active:not(.disabled) {
    background-color: rgb(234, 242, 234);
}

.quiz-option.disabled {
    cursor: default;
}

.quiz-option .opt-char {
    font-size: 3.2rem;
    line-height: 1.25; 
    /* font-weight: bold; */
    /* margin-bottom: 2px; */
    color: #2f2f2f;
}

.quiz-option .opt-pinyin {
    /* font-style: italic; */
    font-size: 1.15rem;
    text-transform: lowercase;
    color: var(--stone);
    margin: 0.75rem auto 0;
    font-weight: 500;
}

@media (max-width: 500px) {
    .quiz-cont {
    max-width: 100%;
    }
    .quiz-prompt {
        font-size: 1.25rem;
    }
    .quiz-option .opt-char {
        font-size: 2.2rem;
    }
    .quiz-option .opt-pinyin {
    /* font-style: italic; */
        font-size: 1.05rem;
    }
}

.quiz-option.correct {
    background: #4CAF50;
    border-color: #388E3C;
    animation: quiz-pulse-correct 0.4s ease;
}

.quiz-option.correct .opt-char,
.quiz-option.correct .opt-pinyin {
    color: #fff;
}

.quiz-option.wrong {
    background: #f44336;
    border-color: #c62828;
    /* animation: quiz-shake 1s ease; */
}

.quiz-option.wrong .opt-char,
.quiz-option.wrong .opt-pinyin {
    color: #fff;
}

@keyframes quiz-pulse-correct {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); box-shadow: 0 0 20px rgba(76,175,80,0.6); }
    100% { transform: scale(1); }
}

@keyframes quiz-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* Ensure the box feels clickable again */
.quiz-option.click-to-continue {
    cursor: pointer;
    position: relative;
    /* Optional: A green pulse to draw the eye */
    animation: pulse-attention 1.5s infinite;
}

/* Add a slight hover effect just for this continuation box */
@media (hover: hover) and (pointer: fine) {
    .quiz-option.click-to-continue:hover {
        transform: scale(1.02);
    }
}

/* Keyframes for the bounce and pulse */
@keyframes bounce-up-down {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

@keyframes pulse-attention {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.feedback-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 6em;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.feedback-overlay.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.quiz-end {
    text-align: center;
    /* padding: 40px 20px; */
}

.quiz-end-icon {
    font-size: 3.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

#end-message {
    font-size: 2.25rem;
    /* font-weight: bold; */
    color: rgb(49, 49, 49);
    justify-content: center;
    text-align: center;
}

.quiz-end-score {
    font-size: 2.25rem;
    font-weight: bold;
    color: rgb(20, 133, 20);
    margin-top: 0.55rem;
    margin-bottom: 0.55rem;
}

#end-message {
    white-space: pre-line;
    text-align: center;
}

.quiz-end-percent {
    font-size: 1.6rem;
    /* font-weight: bold; */
    color: #616161;
    /* margin-bottom: 0.9rem; */
}

.quiz-retake-btn {
    margin-top: 0.8rem;
    margin-bottom: 0.6rem;
    padding: 1rem 2.5rem;
    font-size: 1.65rem;
    background: rgb(20, 133, 20);
    color: #fff;
    border: none;
    border-radius: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-retake-btn:hover {
    background: rgb(45, 155, 45);
    transform: translateY(-2px);
    /* box-shadow: 0 4px 12px rgb(49, 158, 49); */
}

.hidden {
    display: none !important;
}

.voc-grid.quiz-source[hidden] {
    display: none !important;
}

@media (max-width: 500px) {
    .quiz-end {
        font-size: 2.1rem;
    }
    .quiz-end-score {
        font-size: 2rem;
    }
}

/* --- Bamboo forest scene (builds with correct answers) --- */

.scene-stage.theme-lanterns {
    padding-top: 1.5rem;
}

.scene-stage {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    margin-bottom: 3rem;
}
 
.scene-svg {
    width: 100%;
    max-width: 600px;
    height: auto;
    overflow: visible;
}
 
/* Each piece grows up from its base with a soft bounce */
.scene-piece {
    transform-origin: center bottom;
    animation: scene-grow 0.55s cubic-bezier(.34, 1.56, .64, 1) backwards;
}
 
@keyframes scene-grow {
    0%   { transform: scaleY(0); opacity: 0; }
    60%  { opacity: 1; }
    100% { transform: scaleY(1); opacity: 1; }
}