#game-root {
    --mv-accent: #10B981;
    --mv-accent-dark: #0c8d64;
    --mv-accent-light: #e3f9ef;
    --mv-accent-border: #a7f3d0;
    --mv-glass-bg: rgba(255, 255, 255, .62);
    --mv-glass-border: rgba(255, 255, 255, .45);
    /* Palette chrome modeled on Minecraft's gray inventory UI. */
    --mv-slot-bg: #8b8b8b;
    --mv-slot-light: #ffffff;
    --mv-slot-dark: #373737;
    --mv-panel: #c6c6c6;
    --mv-gold: #facc15;
}

/*
 * The kwi-* modifier classes game.js passes to KidWorldIcons.svg() are only
 * ever *named* by the shared icon helper, never defined by it, so the
 * tier/status colors are given real values here, scoped to this game.
 */
#game-root .kwi-accent { color: var(--mv-accent); }
#game-root .kwi-success { color: #10B981; }
#game-root .kwi-danger { color: #EF4444; }
#game-root .kwi-trophy { color: #F59E0B; }
#game-root .kwi-stars { color: #8B5CF6; }
#game-root .kwi-thumbsup { color: #10B981; }
#game-root .kwi-lightning { color: #3B82F6; }
#game-root .kwi-smile { color: #F472B6; }
#game-root .kwi-muted { color: #cbd5e1; }

.kwg-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}

.mv-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.mv-wrap-narrow {
    max-width: 480px;
}

.mv-loading,
.mv-error {
    text-align: center;
    padding: 48px 16px;
}

.mv-loading-icon,
.mv-error-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.mv-loading-icon {
    animation: mv-pulse 1.2s ease-in-out infinite;
}

.mv-loading-text {
    font-size: 15px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.mv-error-text {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: #EF4444;
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
}

.mv-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.mv-header-icon {
    display: flex;
    font-size: 30px;
    line-height: 1;
}

.mv-header-icon img {
    display: block;
    height: 38px;
    width: auto;
}

.mv-header-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.mv-levels {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.mv-level-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--mv-glass-border);
    border-radius: var(--kw-radius, 12px);
    background: var(--mv-glass-bg);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    transition: transform .15s ease, box-shadow .15s ease;
}

.mv-level-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, .14);
}

.mv-level-card:active {
    transform: translateY(-1px);
}

.mv-level-thumb {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    font-size: 36px;
    background: linear-gradient(135deg, var(--mv-accent-light), var(--mv-accent-border));
    background-size: 70px 70px;
    background-repeat: no-repeat;
    background-position: center;
}

.mv-level-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 10px 16px;
}

.mv-level-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--kw-text, #2D2A32);
    text-align: center;
}

.mv-level-age {
    font-size: 14px;
    font-weight: 700;
    color: var(--mv-accent-dark);
    background: var(--mv-accent-light);
    padding: 2px 10px;
    border-radius: 999px;
}

.mv-level-row {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mv-level-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--mv-accent-light);
    color: var(--mv-accent-dark);
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 700;
    font-size: 12px;
}

.mv-level-pill-icon {
    display: inline-flex;
    line-height: 1;
}

.mv-level-pill-icon img {
    display: block;
    width: 14px;
    height: 14px;
    object-fit: cover;
    border-radius: 50%;
}

.mv-change-level-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--mv-glass-border);
    background: var(--mv-glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--mv-accent-dark);
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 6px 12px 6px 10px;
    transition: transform .1s ease, background .15s ease;
}

.mv-change-level-btn svg {
    width: 12px;
    height: 12px;
}

.mv-change-level-btn:hover {
    background: rgba(255, 255, 255, .8);
    transform: translateY(-1px);
}

/* ---- quest card & village chips ---- */

.mv-quest {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--mv-glass-bg);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--mv-glass-border);
    border-radius: var(--kw-radius, 12px);
    padding: 8px 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

.mv-quest-pic {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
}

.mv-quest-emoji {
    font-size: 34px;
    line-height: 1;
    flex: 0 0 auto;
}

.mv-quest-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 auto;
    min-width: 0;
}

.mv-quest-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--mv-accent-dark);
}

.mv-quest-text {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--kw-text, #2D2A32);
}

.mv-quest-bar {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .1);
    overflow: hidden;
}

.mv-quest-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--mv-accent);
    transition: width .3s ease;
}

.mv-quest-count {
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 900;
    color: var(--mv-accent-dark);
    font-variant-numeric: tabular-nums;
}

.mv-quest-unlock {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: #777;
    border-left: 1px dashed rgba(0, 0, 0, .15);
    padding-left: 10px;
}

.mv-quest-unlock img {
    width: 36px;
    height: 36px;
    filter: grayscale(.6);
    opacity: .85;
}

.mv-quest-done {
    background: var(--mv-accent);
    border-color: var(--mv-accent-dark);
}

.mv-quest-done .mv-quest-title,
.mv-quest-done .mv-quest-text {
    color: #fff;
}

.mv-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}

.mv-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--mv-glass-bg);
    border: 1px solid var(--mv-glass-border);
    color: var(--kw-text, #2D2A32);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
}

/* ---- island stage ---- */

.mv-stage {
    position: relative;
    border-radius: var(--kw-radius, 12px);
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
    background: #2f86d0;
}

.mv-canvas {
    display: block;
    width: 100%;
    cursor: pointer;
    /* Drags paint pieces (or pan with the Move tool), so the page must not
       scroll or zoom under the finger. */
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.mv-view-btns {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mv-view-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 0, 0, .3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease;
}

.mv-view-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, .45);
}

.mv-view-btn:disabled {
    opacity: .35;
    cursor: default;
}

.mv-view-btn svg {
    width: 17px;
    height: 17px;
}

.mv-toast {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 110px);
    background: rgba(20, 20, 20, .78);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    padding: 7px 14px;
    border-radius: 10px;
    pointer-events: none;
}

.mv-toast[hidden] {
    display: none;
}

.mv-toast-show {
    animation: mv-toast-in .25s ease;
}

/* ---- palette ---- */

.mv-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
    gap: 4px;
    margin-top: 10px;
    padding: 5px;
    background: var(--mv-panel);
    border: 3px solid;
    border-color: var(--mv-slot-light) var(--mv-slot-dark) var(--mv-slot-dark) var(--mv-slot-light);
    border-radius: 6px;
}

.mv-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-height: 64px;
    padding: 3px 2px;
    background: var(--mv-slot-bg);
    border: 3px solid;
    border-color: var(--mv-slot-dark) var(--mv-slot-light) var(--mv-slot-light) var(--mv-slot-dark);
    border-radius: 2px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mv-slot-pic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.mv-slot-pic img {
    width: 40px;
    height: 40px;
}

.mv-slot-emoji {
    font-size: 26px;
    line-height: 1;
}

.mv-slot-label {
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    text-shadow: 1px 1px 0 #3f3f3f;
    white-space: nowrap;
}

.mv-slot-selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mv-accent);
    background: #a3a3a3;
    z-index: 1;
}

.mv-slot-lock,
.mv-slot-new {
    display: none;
    position: absolute;
    pointer-events: none;
}

.mv-slot-locked {
    cursor: help;
}

.mv-slot-locked .mv-slot-pic,
.mv-slot-locked .mv-slot-label {
    filter: grayscale(1) brightness(.55);
    opacity: .6;
}

.mv-slot-locked .mv-slot-lock {
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    font-size: 20px;
}

.mv-slot-fresh .mv-slot-new {
    display: block;
    top: -6px;
    right: -6px;
    background: #F59E0B;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.mv-slot-fresh {
    animation: mv-wiggle 1s ease-in-out 3;
}

/* ---- controls ---- */

.mv-control-row {
    justify-content: center;
    margin-top: 12px;
    margin-bottom: 0;
}

.mv-btn {
    border: none;
    background: var(--mv-accent-light);
    color: var(--mv-accent-dark);
    border-radius: 999px;
    padding: 9px 16px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: transform .1s ease, background .15s ease;
}

.mv-btn:hover:not(:disabled) {
    background: var(--mv-accent-border);
    transform: translateY(-1px);
}

.mv-btn:disabled {
    opacity: .5;
    cursor: default;
}

.mv-btn-finish {
    background: var(--mv-accent);
    color: #fff;
    box-shadow: 0 3px 0 var(--mv-accent-dark);
}

.mv-btn-finish:hover:not(:disabled) {
    background: var(--mv-accent);
}

.mv-tip {
    min-height: 20px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

/* ---- result screen ---- */

.mv-done-card {
    text-align: center;
    background: var(--mv-glass-bg);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--mv-glass-border);
    border-radius: var(--kw-radius, 12px);
    padding: 28px 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
    animation: mv-pop .3s ease;
}

.mv-done-emoji {
    font-size: 56px;
    margin-bottom: 8px;
}

.mv-done-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--mv-accent-dark);
    margin-bottom: 12px;
}

.mv-done-shot-wrap {
    margin: 0 auto 12px;
}

.mv-done-shot {
    display: block;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 8px;
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
    image-rendering: pixelated;
}

.mv-done-score {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}

.mv-done-meta {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.mv-done-meta-item {
    background: var(--mv-accent-light);
    color: var(--mv-accent-dark);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
}

.mv-done-stars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    font-size: 24px;
}

.mv-done-share {
    justify-content: center;
    margin-top: 16px;
}

.mv-done-actions {
    justify-content: center;
    margin-top: 20px;
}

.mv-btn-primary,
.mv-btn-secondary {
    border: none;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: transform .1s ease;
}

.mv-btn-primary {
    background: var(--mv-accent);
    color: #fff;
    box-shadow: 0 3px 0 var(--mv-accent-dark);
}

.mv-btn-primary:hover {
    transform: translateY(-1px);
}

.mv-btn-secondary {
    background: var(--mv-accent-light);
    color: var(--mv-accent-dark);
}

.mv-btn-secondary:hover {
    background: var(--mv-accent-border);
}

/* ---- English materials bar (earn by answering; tap a chip to earn more) ---- */

.mv-materials {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.mv-mat {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 6px 8px;
    background: var(--mv-glass-bg);
    border: 1px solid var(--mv-glass-border);
    border-radius: var(--kw-radius, 12px);
    color: var(--kw-text, #2D2A32);
    text-align: left;
    cursor: pointer;
    transition: transform .1s ease, background .15s ease;
}

.mv-mat:hover {
    background: rgba(255, 255, 255, .85);
    transform: translateY(-1px);
}

.mv-mat-emoji {
    flex: 0 0 auto;
    font-size: 22px;
    line-height: 1;
}

.mv-mat-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.mv-mat-count {
    font-size: 14px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mv-mat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--mv-accent-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mv-mat-plus {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--mv-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

/* Cost of a palette piece; amber when there isn't enough to build one. */
.mv-slot-cost {
    position: absolute;
    top: -6px;
    left: -6px;
    background: var(--mv-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    pointer-events: none;
    white-space: nowrap;
}

.mv-slot-short .mv-slot-cost {
    background: var(--mv-gold);
    color: #713f12;
}

.mv-slot-locked .mv-slot-cost {
    display: none;
}

/* ---- English question card: over the island on wide screens, a full-screen
   card on phones where the island is short ---- */

.mv-quiz {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, .45);
    overflow-y: auto;
    animation: mv-fade .2s ease;
}

.mv-done-kinds {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.mv-done-kind {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--mv-accent-dark);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
}

.mv-quiz[hidden] {
    display: none;
}

.mv-quiz-card {
    width: 100%;
    max-width: 460px;
    max-height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    background: var(--mv-panel);
    border: 3px solid;
    border-color: var(--mv-slot-light) var(--mv-slot-dark) var(--mv-slot-dark) var(--mv-slot-light);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    animation: mv-pop .25s ease;
}

.mv-quiz-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.mv-quiz-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--mv-slot-bg);
    color: #fff;
    border-radius: 999px;
    padding: 4px 12px 4px 5px;
    font-size: 13px;
    font-weight: 800;
    text-shadow: 1px 1px 0 #3f3f3f;
}

.mv-quiz-tag-img {
    width: 22px;
    height: 22px;
}

.mv-quiz-close {
    flex: 0 0 auto;
    border: none;
    background: var(--mv-slot-bg);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mv-quiz-close svg {
    width: 15px;
    height: 15px;
}

.mv-quiz-body {
    background: #fff;
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
    margin-bottom: 10px;
}

.mv-quiz-picture {
    font-size: 34px;
    line-height: 1.3;
    word-spacing: 8px;
    overflow-wrap: anywhere;
}

.mv-take {
    position: relative;
    display: inline-block;
}

.mv-take-gone {
    opacity: .35;
}

.mv-take-gone::after {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    top: 50%;
    height: 4px;
    margin-top: -2px;
    background: #EF4444;
    border-radius: 2px;
    transform: rotate(-35deg);
}

.mv-quiz-figure {
    display: flex;
    justify-content: center;
}

.mv-shape-svg {
    width: 110px;
    height: 110px;
}

.mv-rect-svg {
    width: 100%;
    height: auto;
    font: 800 14px/1 system-ui, sans-serif;
    fill: var(--mv-accent-dark);
}

.mv-quiz-story {
    font-size: 17px;
    font-weight: 700;
    color: var(--kw-text, #2D2A32);
    line-height: 1.5;
    margin-top: 4px;
}

.mv-quiz-expr {
    font-size: 30px;
    font-weight: 900;
    color: var(--kw-text, #2D2A32);
    line-height: 1.4;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.mv-quiz-blank {
    display: inline-block;
    min-width: 1.4em;
    padding: 0 6px;
    margin: 0 2px;
    border-bottom: 3px dashed var(--mv-accent);
    color: var(--mv-accent-dark);
    background: var(--mv-accent-light);
    border-radius: 4px 4px 0 0;
}

.mv-quiz-blank-filled {
    border-bottom-style: solid;
    animation: mv-pop .3s ease;
}

.mv-quiz-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 800;
    color: #444;
}

.mv-quiz-speak {
    border: none;
    background: var(--mv-accent);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 0 var(--mv-accent-dark);
}

.mv-quiz-speak svg {
    width: 16px;
    height: 16px;
}

.mv-quiz-speak[hidden] {
    display: none;
}

.mv-quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mv-quiz-options-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.mv-quiz-prompt-big {
    font-size: 20px;
    color: var(--kw-text, #2D2A32);
}

.mv-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    background: var(--mv-slot-bg);
    border: 3px solid;
    border-color: var(--mv-slot-light) var(--mv-slot-dark) var(--mv-slot-dark) var(--mv-slot-light);
    border-radius: 6px;
    padding: 6px 10px;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    text-align: left;
    text-shadow: 1px 1px 0 #3f3f3f;
    cursor: pointer;
    transition: transform .1s ease, background .15s ease;
}

.mv-opt:hover:not(:disabled) {
    background: #9d9d9d;
    transform: translateY(-1px);
}

.mv-opt:disabled {
    cursor: default;
}

.mv-opt-key {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .25);
    font-size: 12px;
}

.mv-opt-text {
    flex: 1 1 auto;
    overflow-wrap: anywhere;
}

.mv-quiz-options-emoji .mv-opt-text {
    font-size: 26px;
    line-height: 1.2;
    text-align: center;
    text-shadow: none;
}

.mv-opt-right {
    background: var(--mv-accent);
    border-color: #6ee7b7 var(--mv-accent-dark) var(--mv-accent-dark) #6ee7b7;
    animation: mv-pop .3s ease;
}

.mv-opt-wrong {
    background: #EF4444;
    border-color: #fca5a5 #991b1b #991b1b #fca5a5;
    animation: mv-shake .4s ease;
}

.mv-opt-dim {
    opacity: .55;
}

.mv-quiz-feedback {
    min-height: 0;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    line-height: 1.4;
}

.mv-quiz-feedback:empty {
    margin-top: 0;
}

.mv-quiz-feedback-right {
    color: var(--mv-accent-dark);
}

.mv-quiz-feedback-wrong {
    color: #b91c1c;
}

.mv-quiz-explain {
    display: block;
    margin-top: 2px;
    color: #444;
    font-weight: 700;
}

.mv-quiz-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.mv-quiz-actions[hidden] {
    display: none;
}

.mv-done-kind {
    background: #fff;
    border: 1px solid var(--mv-accent-border);
}

.mv-done-kinds:empty {
    display: none;
}

.mv-done-words {
    margin: 0 0 12px;
}

.mv-done-words-title {
    font-size: 13px;
    font-weight: 800;
    color: #444;
    margin-bottom: 6px;
}

.mv-words {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.mv-word {
    background: var(--mv-accent);
    color: #fff;
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 13px;
    font-weight: 700;
}

.mv-word-missed {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.mv-word-more {
    background: transparent;
    color: #555;
}

.mv-btn-go {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--mv-accent);
    color: #fff;
    box-shadow: 0 3px 0 var(--mv-accent-dark);
}

.mv-btn-go:hover:not(:disabled) {
    background: var(--mv-accent);
}

.mv-btn-go svg {
    width: 14px;
    height: 14px;
}

@keyframes mv-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes mv-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@media (max-width: 576px) {
    .mv-materials {
        grid-template-columns: repeat(2, 1fr);
    }

    .mv-quiz {
        position: fixed;
        z-index: 1000;
        padding: 10px;
    }

    .mv-quiz-card {
        padding: 10px;
    }

    .mv-quiz-picture {
        font-size: 28px;
        word-spacing: 4px;
    }

    .mv-quiz-expr {
        font-size: 25px;
    }

    .mv-quiz-story {
        font-size: 16px;
    }

    .mv-quiz-options-3:not(.mv-quiz-options-emoji) {
        grid-template-columns: 1fr;
    }

    .mv-opt {
        font-size: 15px;
        min-height: 44px;
    }
}

@keyframes mv-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes mv-toast-in {
    from { opacity: 0; transform: translate(-50%, -6px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes mv-pop {
    0% { transform: scale(.85); }
    100% { transform: scale(1); }
}

@keyframes mv-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: .7; }
}

@keyframes mv-wiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-6deg) scale(1.06); }
    75% { transform: rotate(6deg) scale(1.06); }
}

@media (max-width: 576px) {
    .mv-toast {
        max-width: calc(100% - 64px);
        font-size: 12px;
    }

    .mv-view-btns {
        top: 6px;
        right: 6px;
        gap: 4px;
    }

    .mv-view-btn {
        width: 32px;
        height: 32px;
    }

    .mv-quest {
        padding: 8px 10px;
        gap: 8px;
    }

    .mv-quest-pic {
        width: 38px;
        height: 38px;
    }

    .mv-quest-text {
        font-size: 13px;
    }

    .mv-quest-unlock {
        display: none;
    }

    .mv-palette {
        grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    }
}
