/* ==========================================
   EXERCISE 0: LYRICS ACCORDION
   ========================================== */
.anilirik-lyrics {
  font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif;
  max-width: 850px; margin: 12px auto; color: #424242;
}
.anilirik-lyrics .global-controls { display: flex; justify-content: flex-end; margin-bottom: 24px; }
.anilirik-lyrics .global-controls.bottom { margin-top: 24px; margin-bottom: 0; }
.anilirik-lyrics .ctrl-btn { background: #f4f4f4; color: #006666; border: 1px solid rgba(0, 102, 102, 0.2); border-radius: 24px; padding: 10px 24px; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.05); font-size: 18px; }
.anilirik-lyrics .ctrl-btn:hover { background: #e0f2f2; transform: translateY(-1px); }
.anilirik-lyrics .ctrl-btn:active { transform: translateY(1px); box-shadow: none; }
.anilirik-lyrics .lyric-wrapper { margin-bottom: 2px; border-radius: 8px; border-left: 5px solid transparent; transition: background-color 0.3s ease, border-color 0.3s ease, margin-bottom 0.3s ease; background: transparent; }
.anilirik-lyrics .lyric-wrapper.open { background: rgba(0, 102, 102, 0.03); border-left-color: #006666; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.anilirik-lyrics .lyric-line { font-weight: bold; color: #006666; padding: 8px 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background-color 0.2s ease; border-radius: 0 8px 8px 0; user-select: none; -webkit-tap-highlight-color: transparent; font-size: 20px; }
.anilirik-lyrics .lyric-line:hover { background-color: rgba(0, 102, 102, 0.06); }
.anilirik-lyrics .chevron { font-size: 16px; color: rgba(0, 102, 102, 0.5); transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.anilirik-lyrics .lyric-wrapper.open .chevron { transform: rotate(180deg); color: #006666; }
/* THE FIX: JavaScript-Powered Accordion */
.anilirik-lyrics .lyric-animator { 
    display: block !important; 
}
.anilirik-lyrics .lyric-content { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.3s ease-out !important; 
}

/* Inner formatting */
.anilirik-lyrics .lyric-inner { padding: 0 16px 16px 16px; }
.anilirik-lyrics .translation { font-style: italic; color: #666; margin-bottom: 12px; line-height: 1.4; font-size: 18px; }
.anilirik-lyrics .word-gloss { color: #333; line-height: 1.6; padding-top: 12px; border-top: 1px solid rgba(0, 102, 102, 0.15); font-size: 16px; }
.anilirik-lyrics .word-gloss b { color: #004c4c; font-weight: 700; }
.anilirik-lyrics .spacer { height: 48px; width: 100%; }

/* ==========================================
   EXERCISE 1: POEM SORTER
   ========================================== */
.anilirik-sorter { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; font-weight: bold; max-width: 850px; margin: 12px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-sorter .header-area { position: relative; min-height: 42px; margin-bottom: 24px; }
.anilirik-sorter .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: calc(21px * var(--font-scale, 1)); letter-spacing: 0.5px; padding-right: 150px; }
.anilirik-sorter .header-controls { position: absolute; top: 0; right: 0; display: flex; gap: 10px; }
.anilirik-sorter .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-sorter .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-sorter .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }
.anilirik-sorter .sort-container { display: flex; flex-direction: column; gap: 8px; position: relative; } /* Removed touch-action: none */
.anilirik-sorter .sort-item { display: flex; align-items: center; background-color: #f4f4f4; color: #006666; padding: 10px 16px; border-radius: 10px; cursor: grab; line-height: 1.4; font-size: calc(16px * var(--font-scale, 1)); box-shadow: 0 2px 5px rgba(0,0,0,0.08); transition: transform 0.2s ease, background-color 0.4s ease, color 0.4s ease, box-shadow 0.2s ease; z-index: 1; gap: 15px; } /* Added gap for arrow spacing */
.anilirik-sorter .sort-item.correct-state { background-color: #bce3e3; color: #003333; }
.anilirik-sorter .sort-item.dragging { opacity: 0.4; cursor: grabbing; box-shadow: inset 0 0 10px rgba(0,0,0,0.05); }
.anilirik-sorter .sort-item.swap-selected { background-color: #ddccaa; color: #006666; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transform: scale(1.02); z-index: 5; border: 2px solid #006666; }
.anilirik-sorter .line-text { flex-grow: 1; pointer-events: none; text-align: left; } /* Changed to accommodate left arrows */
.anilirik-sorter .arrows { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.anilirik-sorter .arrow-btn { background: rgba(0, 0, 0, 0.05); border: none; border-radius: 5px; color: inherit; font-size: 10px; width: 32px; height: 24px; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: background 0.2s ease; }
.anilirik-sorter .arrow-btn:hover { background: rgba(0, 0, 0, 0.12); }
.anilirik-sorter .correct-state .arrow-btn { background: rgba(0, 51, 51, 0.08); color: #003333; }
.anilirik-sorter .correct-state .arrow-btn:hover { background: rgba(0, 51, 51, 0.15); }
.anilirik-sorter .arrow-btn:disabled { opacity: 0.15; cursor: not-allowed; }
.anilirik-sorter .popup-score { position: fixed; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-size: calc(24px * var(--font-scale, 1)); font-weight: bold; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10000; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-sorter .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-sorter .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-sorter .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* ==========================================
   EXERCISE 2: FILL IN THE BLANKS
   ========================================== */
.anilirik-fill-blanks { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; max-width: 850px; margin: 24px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-fill-blanks .header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: #006666; flex-wrap: wrap; gap: 12px; }
.anilirik-fill-blanks .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.anilirik-fill-blanks .header-controls { display: flex; gap: 10px; align-items: center; }
.anilirik-fill-blanks .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-fill-blanks .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-fill-blanks .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }
.anilirik-fill-blanks .stanza-container { margin-bottom: 32px; }
.anilirik-fill-blanks .poem-line { font-size: 18px; font-weight: bold; color: #006666; line-height: 2.2; letter-spacing: 0.3px; }
.anilirik-fill-blanks .drop-zone { display: inline-flex; align-items: center; justify-content: center; height: 32px; background-color: rgba(0, 102, 102, 0.08); border: 2px dashed rgba(0, 102, 102, 0.4); border-radius: 8px; margin: 0 6px; vertical-align: middle; transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease; color: transparent; cursor: pointer; }
.anilirik-fill-blanks .drop-zone.drag-over { background-color: rgba(0, 102, 102, 0.2); border-style: solid; transform: scale(1.05); }
.anilirik-fill-blanks .drop-zone.highlight-target { border-color: #006666; background-color: rgba(0, 102, 102, 0.15); animation: pulse-border 1.5s infinite; }
@keyframes pulse-border { 0% { border-color: rgba(0, 102, 102, 0.4); } 50% { border-color: rgba(0, 102, 102, 1); } 100% { border-color: rgba(0, 102, 102, 0.4); } }
.anilirik-fill-blanks .drop-zone.filled { background-color: #bce3e3; border: 2px solid #bce3e3; color: #003333; font-weight: bold; transform: scale(1); cursor: default; animation: none; }
@keyframes shake-reject { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.anilirik-fill-blanks .drop-zone.shake-reject { animation: shake-reject 0.3s cubic-bezier(.36,.07,.19,.97) both; border-color: #ff6b6b; background-color: rgba(255, 107, 107, 0.15); }
.anilirik-fill-blanks .word-bank { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding: 14px; background: rgba(0, 0, 0, 0.03); border-radius: 0 0 12px 12px; min-height: 48px; border: 1px solid rgba(0,0,0,0.05); border-top: none; }
.anilirik-fill-blanks .drag-word { background-color: #f4f4f4; color: #006666; padding: 8px 16px; border-radius: 10px; font-weight: bold; cursor: grab; font-size: 16px; box-shadow: 0 2px 5px rgba(0,0,0,0.08); transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s ease; touch-action: none; display: inline-block; }
.anilirik-fill-blanks .drag-word:active { cursor: grabbing; }
.anilirik-fill-blanks .drag-word.dragging-hide { opacity: 0.01; } 
.anilirik-fill-blanks .drag-word.selected { box-shadow: 0 0 0 3px #006666, 0 4px 10px rgba(0,0,0,0.2); transform: scale(1.05); background-color: #e0f2f2; }
.anilirik-fill-blanks .popup-score { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-weight: bold; font-size: 24px; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-fill-blanks .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-fill-blanks .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-fill-blanks .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* ==========================================
   EXERCISE 3: CROSSOUT
   ========================================== */
.anilirik-crossout { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; max-width: 850px; margin: 24px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-crossout .header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: #006666; flex-wrap: wrap; gap: 12px; }
.anilirik-crossout .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.anilirik-crossout .header-controls { display: flex; gap: 10px; align-items: center; }
.anilirik-crossout .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-crossout .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-crossout .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }
.anilirik-crossout .stanza-container { margin-bottom: 32px; }
.anilirik-crossout .poem-line { font-size: 20px; font-weight: bold; color: #006666; line-height: 2; letter-spacing: 0.5px; }
.anilirik-crossout .tap-word { position: relative; display: inline-block; cursor: pointer; padding: 0 4px; margin: 0 -4px; border-radius: 6px; transition: color 0.3s ease, background-color 0.2s ease; }
.anilirik-crossout .tap-word:hover { background-color: rgba(0, 102, 102, 0.08); }
.anilirik-crossout .tap-word::after { content: ""; position: absolute; top: 50%; left: 0; width: 0; height: 3px; background-color: #d35400; transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); transform: translateY(-50%); pointer-events: none; border-radius: 2px; }
.anilirik-crossout .tap-word.crossed { color: #d35400; }
.anilirik-crossout .tap-word.crossed::after { width: 100%; }
.anilirik-crossout .tap-word.crossed:hover { background-color: transparent; cursor: default; }
@keyframes ex3-shake-reject { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-3px); } 40% { transform: translateX(3px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.anilirik-crossout .tap-word.wrong { animation: ex3-shake-reject 0.3s cubic-bezier(.36,.07,.19,.97) both; color: #006666; background-color: rgba(0, 102, 102, 0.15); }
.anilirik-crossout .popup-score { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-weight: bold; font-size: 24px; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-crossout .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-crossout .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-crossout .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* ==========================================
   EXERCISE 4: LINE JUMBLE
   ========================================== */
.anilirik-jumble { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; width: 95%; max-width: 850px; margin: 12px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-jumble .header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: #006666; flex-wrap: wrap; gap: 12px; }
.anilirik-jumble .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.anilirik-jumble .header-controls { display: flex; gap: 10px; align-items: center; }
.anilirik-jumble .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-jumble .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-jumble .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }

/* Progress Bar & Navigation */
.anilirik-jumble .progress-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.anilirik-jumble .prog-dot { width: 34px; height: 34px; border-radius: 8px; background: rgba(0, 102, 102, 0.08); color: #006666; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 16px; cursor: pointer; transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); border: 2px solid transparent; }
.anilirik-jumble .prog-dot:hover { background: rgba(0, 102, 102, 0.15); }
.anilirik-jumble .prog-dot.solved { background: #bce3e3; color: #003333; }
.anilirik-jumble .prog-dot.active { border-color: #006666; transform: scale(1.1); box-shadow: 0 4px 10px rgba(0,102,102,0.15); }
.anilirik-jumble .prog-dot.active.solved { background: #006666; color: white; border-color: #006666; }
.anilirik-jumble .nav-area { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; }
.anilirik-jumble .nav-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 48px; height: 48px; font-size: 20px; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 102, 102, 0.2); transition: all 0.2s ease; display: inline-flex; justify-content: center; align-items: center; }
.anilirik-jumble .nav-btn:hover:not(:disabled) { background: #004c4c; transform: translateY(-2px); }
.anilirik-jumble .nav-btn:active:not(:disabled) { transform: translateY(1px); }
.anilirik-jumble .nav-btn:disabled { opacity: 0.3; cursor: not-allowed; box-shadow: none; }

/* Stanza Pagination Logic */
.anilirik-jumble .stanza-container { display: none; margin-bottom: 0; }
.anilirik-jumble .stanza-container.active { display: block; animation: ex4-fade 0.3s ease; }
@keyframes ex4-fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Game Elements */
.anilirik-jumble .line-track { display: flex; flex-wrap: wrap; gap: 8px; background: rgba(0, 0, 0, 0.03); padding: 10px; border-radius: 12px; margin-bottom: 10px; border: 2px solid transparent; transition: background-color 0.4s ease, border-color 0.4s ease; min-height: 44px; align-items: center; }
.anilirik-jumble .word-item { background-color: #f4f4f4; color: #006666; padding: 6px 14px; border-radius: 8px; font-size: 18px; font-weight: bold; cursor: grab; box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s ease, color 0.2s ease; touch-action: none; }
.anilirik-jumble .word-item:active { cursor: grabbing; }
.anilirik-jumble .word-item.dragging-hide { opacity: 0.01; }
.anilirik-jumble .word-item.selected { box-shadow: 0 0 0 3px #006666, 0 4px 10px rgba(0,0,0,0.2); transform: scale(1.05); background-color: #e0f2f2; z-index: 2; }
.anilirik-jumble .line-track.correct-state { background-color: #bce3e3; }
.anilirik-jumble .line-track.correct-state .word-item { background-color: transparent; color: #003333; box-shadow: none; cursor: default; padding: 6px 4px; }
.anilirik-jumble .popup-score { position: fixed; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-size: 24px; font-weight: bold; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10000; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-jumble .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-jumble .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-jumble .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* ==========================================
   EXERCISE 5: TRANSLATION MATCH
   ========================================== */
.anilirik-matchmaker { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; max-width: 850px; margin: 12px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-matchmaker .header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: #006666; flex-wrap: wrap; gap: 12px; }
.anilirik-matchmaker .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.anilirik-matchmaker .header-controls { display: flex; gap: 10px; align-items: center; }
.anilirik-matchmaker .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-matchmaker .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-matchmaker .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }

/* The Columns (Forced side-by-side) */
.anilirik-matchmaker .match-columns { display: flex; flex-direction: row; gap: 20px; width: 100%; }
.anilirik-matchmaker .column { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; /* Prevents long words from breaking the flex row */ }

.anilirik-matchmaker .word-box { display: flex; align-items: center; justify-content: center; padding: 12px 16px; border-radius: 12px; font-size: 18px; font-weight: bold; text-align: center; cursor: pointer; min-height: 50px; height: auto; border: 2px solid transparent; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 2px 5px rgba(0,0,0,0.05); color: #424242; word-break: break-word; line-height: 1.2; }
.anilirik-matchmaker .word-box.tr { background-color: rgba(0, 102, 102, 0.08); }
.anilirik-matchmaker .word-box.en { background-color: rgba(221, 204, 170, 0.4); }
.anilirik-matchmaker .word-box.selected { border-color: #006666; transform: scale(1.03); box-shadow: 0 6px 15px rgba(0, 102, 102, 0.15); }
.anilirik-matchmaker .word-box.matched { background-color: #bce3e3 !important; color: #006666 !important; border-color: transparent; transform: scale(0.97); opacity: 0.95; cursor: default; pointer-events: none; box-shadow: none; }
.anilirik-matchmaker .word-box.matched-show-alt1 { background-color: rgba(0, 102, 102, 0.08) !important; color: #006666 !important; border-color: transparent; transform: scale(0.97); opacity: 0.95; cursor: default; pointer-events: none; box-shadow: none; }
.anilirik-matchmaker .word-box.matched-show-alt2 { background-color: rgba(221, 204, 170, 0.4) !important; color: #006666 !important; border-color: transparent; transform: scale(0.97); opacity: 0.95; cursor: default; pointer-events: none; box-shadow: none; }

@keyframes ex5-shake-reject { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.anilirik-matchmaker .word-box.shake-reject { animation: ex5-shake-reject 0.3s cubic-bezier(.36,.07,.19,.97) both; border-color: #ff6b6b; }
.anilirik-matchmaker .popup-score { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-weight: bold; font-size: 24px; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-matchmaker .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-matchmaker .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-matchmaker .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* Squish logic for narrow mobile screens to keep them side-by-side neatly */
@media (max-width: 500px) {
  .anilirik-matchmaker .match-columns { gap: 8px; }
  .anilirik-matchmaker .word-box { padding: 10px 8px; font-size: 15px; min-height: 44px; border-radius: 8px; }
}

/* ==========================================
   EXERCISE 6: LETTER SCRAMBLE
   ========================================== */
.anilirik-letter-scramble { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; max-width: 850px; margin: 12px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-letter-scramble .header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: #006666; flex-wrap: wrap; gap: 12px; }
.anilirik-letter-scramble .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.anilirik-letter-scramble .header-controls { display: flex; gap: 10px; align-items: center; }
.anilirik-letter-scramble .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-letter-scramble .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-letter-scramble .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }

/* Progress Bar & Navigation */
.anilirik-letter-scramble .progress-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.anilirik-letter-scramble .prog-dot { width: 34px; height: 34px; border-radius: 8px; background: rgba(0, 102, 102, 0.08); color: #006666; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 16px; cursor: pointer; transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); border: 2px solid transparent; }
.anilirik-letter-scramble .prog-dot:hover { background: rgba(0, 102, 102, 0.15); }
.anilirik-letter-scramble .prog-dot.solved { background: #bce3e3; color: #003333; }
.anilirik-letter-scramble .prog-dot.active { border-color: #006666; transform: scale(1.1); box-shadow: 0 4px 10px rgba(0,102,102,0.15); }
.anilirik-letter-scramble .prog-dot.active.solved { background: #006666; color: white; border-color: #006666; }
.anilirik-letter-scramble .nav-area { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; }
.anilirik-letter-scramble .nav-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 48px; height: 48px; font-size: 20px; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 102, 102, 0.2); transition: all 0.2s ease; display: inline-flex; justify-content: center; align-items: center; }
.anilirik-letter-scramble .nav-btn:hover:not(:disabled) { background: #004c4c; transform: translateY(-2px); }
.anilirik-letter-scramble .nav-btn:active:not(:disabled) { transform: translateY(1px); }
.anilirik-letter-scramble .nav-btn:disabled { opacity: 0.3; cursor: not-allowed; box-shadow: none; }

/* Stanza Pagination Logic */
.anilirik-letter-scramble .stanza-container { display: none; margin-bottom: 0; }
.anilirik-letter-scramble .stanza-container.active { display: block; animation: ex6-fade 0.3s ease; }
@keyframes ex6-fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Game Elements */
.anilirik-letter-scramble .line-wrapper { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.anilirik-letter-scramble .poem-line { font-size: 19px; font-weight: bold; color: #006666; line-height: 1.8; letter-spacing: 0.3px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.anilirik-letter-scramble .word-blank-container { display: inline-flex; gap: 4px; align-items: center; vertical-align: middle; }
.anilirik-letter-scramble .letter-box { width: 28px; height: 36px; border: 2px dashed rgba(0, 102, 102, 0.4); border-radius: 6px; background-color: rgba(0, 102, 102, 0.05); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: bold; color: #003333; transition: all 0.2s ease; }
.anilirik-letter-scramble .letter-box.drag-over { background-color: rgba(0, 102, 102, 0.2); border-style: solid; transform: scale(1.1); }
.anilirik-letter-scramble .keyboard-tray { display: flex; flex-wrap: wrap; gap: 8px; background: rgba(0, 0, 0, 0.04); padding: 12px; border-radius: 10px; min-height: 48px; border: 1px solid rgba(0,0,0,0.05); align-items: center; transition: opacity 0.3s ease; }
.anilirik-letter-scramble .keyboard-tray.solved-hide { opacity: 0; pointer-events: none; height: 0; min-height: 0; padding: 0; margin: 0; overflow: hidden; }
.anilirik-letter-scramble .key-tile { width: 32px; height: 38px; background-color: #f4f4f4; color: #006666; border-radius: 6px; font-size: 20px; font-weight: bold; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.15); transition: transform 0.1s ease, box-shadow 0.1s ease; touch-action: none; text-transform: lowercase; }
.anilirik-letter-scramble .key-tile:active { transform: scale(0.95); }
.anilirik-letter-scramble .key-tile.dragging-hide { opacity: 0.01; }
.anilirik-letter-scramble .tile-slot { width: 32px; height: 38px; display: inline-block; }
.anilirik-letter-scramble .word-blank-container.solved .letter-box { background-color: #bce3e3; border-color: #bce3e3; border-style: solid; color: #003333; }
.anilirik-letter-scramble .word-blank-container.solved .key-tile { background-color: transparent; box-shadow: none; cursor: default; }
@keyframes ex6-shake-reject { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.anilirik-letter-scramble .word-blank-container.shake-reject { animation: ex6-shake-reject 0.3s cubic-bezier(.36,.07,.19,.97) both; }
.anilirik-letter-scramble .word-blank-container.shake-reject .letter-box { border-color: #ff6b6b; background-color: rgba(255, 107, 107, 0.15); }
.anilirik-letter-scramble .popup-score { position: fixed; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-size: 24px; font-weight: bold; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10000; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-letter-scramble .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-letter-scramble .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-letter-scramble .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* ==========================================
   EXERCISE 7: MULTIPLE CHOICE
   ========================================== */
.anilirik-mcq { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; max-width: 850px; margin: 24px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-mcq .header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: #006666; flex-wrap: wrap; gap: 12px; }
.anilirik-mcq .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.anilirik-mcq .header-controls { display: flex; gap: 10px; align-items: center; }
.anilirik-mcq .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-mcq .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-mcq .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }
.anilirik-mcq .progress-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.anilirik-mcq .prog-dot { width: 34px; height: 34px; border-radius: 8px; background: rgba(0, 102, 102, 0.08); color: #006666; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 16px; cursor: pointer; transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); border: 2px solid transparent; }
.anilirik-mcq .prog-dot:hover { background: rgba(0, 102, 102, 0.15); }
.anilirik-mcq .prog-dot.solved { background: #bce3e3; color: #003333; }
.anilirik-mcq .prog-dot.active { border-color: #006666; transform: scale(1.1); box-shadow: 0 4px 10px rgba(0,102,102,0.15); }
.anilirik-mcq .prog-dot.active.solved { background: #006666; color: white; border-color: #006666; }
.anilirik-mcq .mcq-question { font-size: 22px; font-weight: bold; color: #006666; line-height: 1.5; margin-bottom: 24px; padding: 16px 20px; background: rgba(0, 102, 102, 0.05); border-radius: 12px; border-left: 5px solid #006666; }
.anilirik-mcq .mcq-options { display: flex; flex-direction: column; gap: 12px; }
.anilirik-mcq .mcq-option { background-color: #f4f4f4; color: #006666; padding: 16px 20px; border-radius: 10px; font-size: 18px; font-weight: bold; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.08); transition: all 0.2s ease; border: 2px solid transparent; display: flex; align-items: center; }
.anilirik-mcq .mcq-option:hover { background-color: #e0f2f2; transform: translateY(-1px); }
.anilirik-mcq .mcq-option.correct { background-color: #bce3e3; color: #003333; border-color: #bce3e3; transform: scale(1.02); box-shadow: 0 6px 15px rgba(0, 102, 102, 0.15); cursor: default; }
.anilirik-mcq .mcq-option.disabled { opacity: 0.6; cursor: default; pointer-events: none; }
@keyframes ex7-shake-reject { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.anilirik-mcq .mcq-option.wrong { animation: ex7-shake-reject 0.3s cubic-bezier(.36,.07,.19,.97) both; border-color: #ff6b6b; background-color: rgba(255, 107, 107, 0.15); }
.anilirik-mcq .nav-area { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; }
.anilirik-mcq .nav-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 48px; height: 48px; font-size: 20px; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 102, 102, 0.2); transition: all 0.2s ease; display: inline-flex; justify-content: center; align-items: center; }
.anilirik-mcq .nav-btn:hover:not(:disabled) { background: #004c4c; transform: translateY(-2px); }
.anilirik-mcq .nav-btn:active:not(:disabled) { transform: translateY(1px); }
.anilirik-mcq .nav-btn:disabled { opacity: 0.3; cursor: not-allowed; box-shadow: none; }
.anilirik-mcq .popup-score { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-size: 24px; font-weight: bold; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-mcq .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-mcq .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-mcq .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* ==========================================
   EXERCISE 8: BUCKET SORTER
   ========================================== */
.anilirik-bucket-sort { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; max-width: 850px; margin: 24px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-bucket-sort .header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: #006666; flex-wrap: wrap; gap: 12px; }
.anilirik-bucket-sort .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.anilirik-bucket-sort .header-controls { display: flex; gap: 10px; align-items: center; }
.anilirik-bucket-sort .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-bucket-sort .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-bucket-sort .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }
.anilirik-bucket-sort .word-bank { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px; background: rgba(0, 0, 0, 0.03); border-radius: 12px; min-height: 80px; margin-bottom: 24px; border: 2px dashed rgba(0, 102, 102, 0.2); align-items: center; justify-content: center; }
.anilirik-bucket-sort .drag-word { background-color: #f4f4f4; color: #006666; padding: 8px 16px; border-radius: 10px; font-weight: bold; cursor: grab; font-size: 17px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s ease; touch-action: none; display: inline-block; }
.anilirik-bucket-sort .drag-word:active { cursor: grabbing; }
.anilirik-bucket-sort .drag-word.dragging-hide { opacity: 0.01; } 
.anilirik-bucket-sort .drag-word.selected { box-shadow: 0 0 0 3px #006666, 0 4px 10px rgba(0,0,0,0.2); transform: scale(1.05); background-color: #e0f2f2; }
.anilirik-bucket-sort .bucket-zone .drag-word { background-color: transparent; box-shadow: none; color: #003333; padding: 4px 8px; cursor: default; font-size: 16px; }
.anilirik-bucket-sort .buckets-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.anilirik-bucket-sort .sort-bucket { flex: 1 1 180px; min-width: 140px; background: #fff; border: 2px solid rgba(0, 102, 102, 0.3); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: all 0.3s ease; }
.anilirik-bucket-sort .sort-bucket.drag-over { border-color: #006666; background-color: rgba(0, 102, 102, 0.05); transform: scale(1.02); }
.anilirik-bucket-sort .sort-bucket.highlight-target { border-color: #006666; background-color: rgba(0, 102, 102, 0.05); animation: ex8-pulse-border 1.5s infinite; cursor: pointer; }
@keyframes ex8-pulse-border { 0% { box-shadow: 0 0 0 0 rgba(0, 102, 102, 0.4); } 70% { box-shadow: 0 0 0 8px rgba(0, 102, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 102, 102, 0); } }
.anilirik-bucket-sort .bucket-header { background-color: rgba(0, 102, 102, 0.1); color: #006666; padding: 10px; text-align: center; font-weight: bold; border-bottom: 2px solid rgba(0, 102, 102, 0.1); pointer-events: none; font-size: 18px; }
.anilirik-bucket-sort .bucket-zone { padding: 12px; min-height: 80px; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; flex-grow: 1; background-color: transparent; }
@keyframes ex8-flash-green { 0% { background-color: transparent; } 50% { background-color: rgba(188, 227, 227, 0.5); } 100% { background-color: transparent; } }
.anilirik-bucket-sort .sort-bucket.flash-correct { animation: ex8-flash-green 0.5s ease; }
@keyframes ex8-shake-reject { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.anilirik-bucket-sort .sort-bucket.shake-reject { animation: ex8-shake-reject 0.3s cubic-bezier(.36,.07,.19,.97) both; border-color: #ff6b6b; }
.anilirik-bucket-sort .popup-score { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-size: 24px; font-weight: bold; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-bucket-sort .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-bucket-sort .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-bucket-sort .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* ==========================================
   EXERCISE 9: INLINE SELECTOR
   ========================================== */
.anilirik-inline-selector { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; max-width: 850px; margin: 24px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-inline-selector .header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: #006666; flex-wrap: wrap; gap: 12px; }
.anilirik-inline-selector .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.anilirik-inline-selector .header-controls { display: flex; gap: 10px; align-items: center; }
.anilirik-inline-selector .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-inline-selector .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-inline-selector .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }
.anilirik-inline-selector .game-container { position: relative; }
.anilirik-inline-selector .stanza-container { margin-bottom: 32px; }
.anilirik-inline-selector .poem-line { font-size: 20px; font-weight: bold; color: #006666; line-height: 2.4; letter-spacing: 0.5px; }
.anilirik-inline-selector .inline-blank { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; padding: 4px 14px; margin: 0 6px; background-color: #fdfdfd; border: 2px solid rgba(0, 102, 102, 0.2); border-radius: 10px; color: #006666; cursor: pointer; transition: all 0.2s ease; vertical-align: middle; box-shadow: 0 2px 4px rgba(0,0,0,0.05); gap: 6px; }
.anilirik-inline-selector .inline-blank:hover { border-color: #006666; background-color: #f4f8f8; }
.anilirik-inline-selector .inline-blank.active { background-color: #006666; color: white; border-color: #006666; }
.anilirik-inline-selector .inline-blank.solved { background-color: #bce3e3; color: #003333; border-color: #bce3e3; box-shadow: none; cursor: default; pointer-events: none; }
@keyframes ex9-shake-reject { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.anilirik-inline-selector .inline-blank.shake-reject { animation: ex9-shake-reject 0.3s cubic-bezier(.36,.07,.19,.97) both; background-color: rgba(255, 107, 107, 0.1); color: #d32f2f; border-color: #ff6b6b; }
.anilirik-inline-selector .inline-menu { position: absolute; z-index: 1000; background: white; border-radius: 8px; box-shadow: 0 8px 25px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05); min-width: 140px; max-width: 250px; max-height: 250px; overflow-y: auto; display: flex; flex-direction: column; padding: 6px; animation: ex9-menu-pop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; transform-origin: top center; }
@keyframes ex9-menu-pop { 0% { opacity: 0; transform: scale(0.9) translateY(-10px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
.anilirik-inline-selector .inline-option { background: transparent; border: none; padding: 12px 16px; font-family: inherit; font-weight: bold; color: #006666; text-align: left; border-radius: 6px; cursor: pointer; transition: background-color 0.1s ease; font-size: 18px; }
.anilirik-inline-selector .inline-option:hover { background: rgba(0, 102, 102, 0.08); }
.anilirik-inline-selector .inline-option.picked { background-color: #e0f2f2; color: #006666; cursor: default; }
.anilirik-inline-selector .multi-select-hint { font-size: 14px; color: #888; text-align: center; padding: 10px 4px 4px 4px; font-style: italic; border-top: 1px dashed rgba(0,0,0,0.1); margin-top: 6px; }
.anilirik-inline-selector .popup-score { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-size: 24px; font-weight: bold; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-inline-selector .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-inline-selector .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-inline-selector .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* ==========================================
   EXERCISE 10: SUFFIX SNAPPER
   ========================================== */
.anilirik-suffix-snapper { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; max-width: 850px; margin: 24px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-suffix-snapper .header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: #006666; flex-wrap: wrap; gap: 12px; }
.anilirik-suffix-snapper .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.anilirik-suffix-snapper .header-controls { display: flex; gap: 10px; align-items: center; }
.anilirik-suffix-snapper .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-suffix-snapper .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-suffix-snapper .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }
.anilirik-suffix-snapper .stanza-container { margin-bottom: 32px; }
.anilirik-suffix-snapper .poem-line { font-size: 20px; font-weight: bold; color: #006666; line-height: 2; }
.anilirik-suffix-snapper .snapper-block { margin-bottom: 32px; padding: 16px 20px; background: rgba(0, 102, 102, 0.03); border-radius: 12px; border: 1px solid rgba(0,0,0,0.05); transition: all 0.3s ease; }
.anilirik-suffix-snapper .translation { font-size: 18px; font-style: italic; color: #666; margin-bottom: 16px; }
.anilirik-suffix-snapper .train-track { display: flex; flex-wrap: wrap; align-items: stretch; gap: 4px; margin-bottom: 16px; }
.anilirik-suffix-snapper .root-box { background: #006666; color: white; padding: 8px 16px; font-size: 22px; font-weight: bold; border-radius: 8px 4px 4px 8px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.anilirik-suffix-snapper .suffix-slot { min-width: 45px; border: 2px dashed rgba(0, 102, 102, 0.4); border-radius: 4px; background-color: rgba(0, 102, 102, 0.05); display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
.anilirik-suffix-snapper .suffix-slot.drag-over { background-color: rgba(0, 102, 102, 0.2); border-style: solid; transform: scale(1.05); }
.anilirik-suffix-snapper .suffix-pool { display: flex; flex-wrap: wrap; gap: 8px; background: rgba(0, 0, 0, 0.04); padding: 12px; border-radius: 8px; min-height: 50px; align-items: center; transition: opacity 0.3s ease; }
.anilirik-suffix-snapper .snapper-block.solved .suffix-pool { opacity: 0; pointer-events: none; height: 0; min-height: 0; padding: 0; margin: 0; overflow: hidden; }
.anilirik-suffix-snapper .tile-slot { display: inline-block; min-width: 45px; min-height: 40px; }
.anilirik-suffix-snapper .suffix-tile { background-color: #f4f4f4; color: #006666; padding: 8px 14px; border-radius: 4px; font-size: 20px; font-weight: bold; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.15); transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.2s ease; touch-action: none; display: flex; align-items: center; justify-content: center; height: 100%; box-sizing: border-box; }
.anilirik-suffix-snapper .suffix-tile:active { transform: scale(0.95); }
.anilirik-suffix-snapper .suffix-tile.dragging-hide { opacity: 0.01; }
.anilirik-suffix-snapper .suffix-slot .suffix-tile { box-shadow: none; border-radius: 4px; width: 100%; }
.anilirik-suffix-snapper .snapper-block.solved { background-color: rgba(188, 227, 227, 0.2); border-color: #bce3e3; }
.anilirik-suffix-snapper .snapper-block.solved .suffix-slot { border: none; background-color: #bce3e3; padding: 0; }
.anilirik-suffix-snapper .snapper-block.solved .suffix-tile { background-color: transparent; color: #003333; cursor: default; }
.anilirik-suffix-snapper .snapper-block.solved .root-box { background: #004c4c; }
@keyframes ex10-shake-reject { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.anilirik-suffix-snapper .train-track.shake-reject { animation: ex10-shake-reject 0.3s cubic-bezier(.36,.07,.19,.97) both; }
.anilirik-suffix-snapper .train-track.shake-reject .suffix-slot { border-color: #ff6b6b; background-color: rgba(255, 107, 107, 0.15); }
.anilirik-suffix-snapper .popup-score { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-size: 24px; font-weight: bold; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-suffix-snapper .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-suffix-snapper .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-suffix-snapper .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* ==========================================
   EXERCISE 11: DICTATION
   ========================================== */
.anilirik-dictation { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; max-width: 850px; margin: 24px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-dictation .header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: #006666; flex-wrap: wrap; gap: 12px; }
.anilirik-dictation .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.anilirik-dictation .header-controls { display: flex; gap: 10px; align-items: center; }
.anilirik-dictation .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-dictation .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-dictation .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }
.anilirik-dictation .dictation-list { display: flex; flex-direction: column; gap: 16px; }
.anilirik-dictation .dictation-row { display: flex; align-items: center; gap: 12px; background: rgba(0, 102, 102, 0.03); padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.05); transition: all 0.3s ease; }
.anilirik-dictation .play-audio-btn { background: #e0f2f2; color: #006666; border: none; border-radius: 50%; width: 48px; height: 48px; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.anilirik-dictation .play-audio-btn:hover { background: #006666; color: white; transform: scale(1.05); }
.anilirik-dictation .play-audio-btn:active { transform: scale(0.95); }
.anilirik-dictation .play-audio-btn.playing { background: #006666; color: white; animation: pulse-ring 1s infinite; }
.anilirik-dictation .dictation-input-wrapper { flex-grow: 1; position: relative; display: flex; align-items: center; }
.anilirik-dictation .dictation-input { width: 100%; background: white; border: 2px solid rgba(0, 102, 102, 0.2); border-radius: 8px; padding: 12px 40px 12px 16px; font-size: 18px; font-family: inherit; color: #333; transition: all 0.2s ease; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); box-sizing: border-box; }
.anilirik-dictation .dictation-input:focus { outline: none; border-color: #006666; box-shadow: inset 0 2px 4px rgba(0,0,0,0.02), 0 0 0 3px rgba(0, 102, 102, 0.1); }
.anilirik-dictation .check-input-btn { position: absolute; right: 8px; background: transparent; border: none; color: rgba(0, 102, 102, 0.5); font-size: 18px; cursor: pointer; padding: 4px; transition: color 0.2s ease; }
.anilirik-dictation .check-input-btn:hover { color: #006666; }
.anilirik-dictation .dictation-row.solved { background-color: rgba(188, 227, 227, 0.3); border-color: #bce3e3; }
.anilirik-dictation .dictation-row.solved .dictation-input { background-color: transparent; border-color: transparent; box-shadow: none; color: #006666; font-weight: bold; padding-right: 16px; cursor: default; }
.anilirik-dictation .dictation-row.solved .check-input-btn { display: none; }
.anilirik-dictation .dictation-row.solved .play-audio-btn { background: #006666; color: white; }
@keyframes ex11-shake-reject { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.anilirik-dictation .dictation-input.shake-reject { animation: ex11-shake-reject 0.3s cubic-bezier(.36,.07,.19,.97) both; border-color: #ff6b6b; background-color: rgba(255, 107, 107, 0.05); color: #d32f2f; }
.anilirik-dictation .popup-score { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-size: 24px; font-weight: bold; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-dictation .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-dictation .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-dictation .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* ==========================================
   EXERCISE 12: AUDIO MCQ
   ========================================== */
.anilirik-audio-mcq { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; max-width: 850px; margin: 24px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-audio-mcq .header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: #006666; flex-wrap: wrap; gap: 12px; }
.anilirik-audio-mcq .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.anilirik-audio-mcq .header-controls { display: flex; gap: 10px; align-items: center; }
.anilirik-audio-mcq .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-audio-mcq .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-audio-mcq .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }
.anilirik-audio-mcq .progress-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.anilirik-audio-mcq .prog-dot { width: 34px; height: 34px; border-radius: 8px; background: rgba(0, 102, 102, 0.08); color: #006666; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 16px; cursor: pointer; transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); border: 2px solid transparent; }
.anilirik-audio-mcq .prog-dot:hover { background: rgba(0, 102, 102, 0.15); }
.anilirik-audio-mcq .prog-dot.solved { background: #bce3e3; color: #003333; }
.anilirik-audio-mcq .prog-dot.active { border-color: #006666; transform: scale(1.1); box-shadow: 0 4px 10px rgba(0,102,102,0.15); }
.anilirik-audio-mcq .prog-dot.active.solved { background: #006666; color: white; border-color: #006666; }
.anilirik-audio-mcq .mcq-question { font-size: 22px; font-weight: bold; color: #006666; line-height: 1.5; margin-bottom: 24px; padding: 16px 20px; background: rgba(0, 102, 102, 0.05); border-radius: 12px; border-left: 5px solid #006666; display: flex; align-items: center; gap: 16px; }
.anilirik-audio-mcq .play-q-btn { background: #006666; color: white; border: none; border-radius: 50%; width: 56px; height: 56px; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s ease; box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-audio-mcq .play-q-btn:hover { transform: scale(1.05); }
.anilirik-audio-mcq .play-q-btn:active { transform: scale(0.95); }
.anilirik-audio-mcq .play-q-btn.playing { animation: pulse-ring 1s infinite; }
.anilirik-audio-mcq .mcq-options { display: flex; flex-direction: column; gap: 12px; }
.anilirik-audio-mcq .mcq-option { background-color: #f4f4f4; color: #006666; padding: 14px 20px; border-radius: 10px; font-size: 18px; font-weight: bold; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.08); transition: all 0.2s ease; border: 2px solid transparent; display: flex; align-items: center; gap: 16px; }
.anilirik-audio-mcq .mcq-option:hover { background: #e0f2f2; transform: translateY(-1px); }
.anilirik-audio-mcq .opt-play-btn { background: #006666; color: white; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s ease; }
.anilirik-audio-mcq .opt-play-btn:hover { background: #004c4c; transform: scale(1.1); }
.anilirik-audio-mcq .opt-play-btn.playing { animation: pulse-ring 1s infinite; }
.anilirik-audio-mcq .hidden-text { color: rgba(0, 102, 102, 0.5); font-style: italic; }
.anilirik-audio-mcq .mcq-option.correct { background-color: #bce3e3; color: #003333; border-color: #bce3e3; transform: scale(1.02); box-shadow: 0 6px 15px rgba(0, 102, 102, 0.15); cursor: default; }
.anilirik-audio-mcq .mcq-option.disabled { opacity: 0.6; cursor: default; pointer-events: none; }
@keyframes ex12-shake-reject { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.anilirik-audio-mcq .mcq-option.wrong { animation: ex12-shake-reject 0.3s cubic-bezier(.36,.07,.19,.97) both; border-color: #ff6b6b; background-color: rgba(255, 107, 107, 0.15); }
.anilirik-audio-mcq .nav-area { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; }
.anilirik-audio-mcq .nav-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 48px; height: 48px; font-size: 20px; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 102, 102, 0.2); transition: all 0.2s ease; display: inline-flex; justify-content: center; align-items: center; }
.anilirik-audio-mcq .nav-btn:hover:not(:disabled) { background: #004c4c; transform: translateY(-2px); }
.anilirik-audio-mcq .nav-btn:active:not(:disabled) { transform: translateY(1px); }
.anilirik-audio-mcq .nav-btn:disabled { opacity: 0.3; cursor: not-allowed; box-shadow: none; }
.anilirik-audio-mcq .popup-score { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-size: 24px; font-weight: bold; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-audio-mcq .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-audio-mcq .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-audio-mcq .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* ==========================================
   EXERCISE 33: HIGHLIGHT BOX
   ========================================== */
.anilirik-highlight-box { font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", sans-serif; max-width: 850px; margin: 24px auto; position: relative; user-select: none; -webkit-tap-highlight-color: transparent; }
.anilirik-highlight-box .header-area { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; color: #006666; flex-wrap: wrap; gap: 12px; }
.anilirik-highlight-box .title { font-family: inherit; font-style: italic; font-weight: bold; color: #424242; margin: 0; font-size: 21px; letter-spacing: 0.5px; }
.anilirik-highlight-box .header-controls { display: flex; gap: 10px; align-items: center; }
.anilirik-highlight-box .action-btn { background: #006666; color: white; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 102, 102, 0.2); padding: 0; }
.anilirik-highlight-box .action-btn:hover { background: #004c4c; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 102, 102, 0.3); }
.anilirik-highlight-box .action-btn:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(0, 102, 102, 0.2); }
.anilirik-highlight-box .stanza-container { margin-bottom: 32px; }
.anilirik-highlight-box .poem-line { font-size: 20px; font-weight: bold; color: #006666; line-height: 2.4; letter-spacing: 0.5px; }
.anilirik-highlight-box .tap-word { position: relative; display: inline-block; cursor: pointer; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; transition: all 0.3s ease; }
.anilirik-highlight-box .tap-word:hover { background-color: rgba(0, 102, 102, 0.08); }
.anilirik-highlight-box .tap-word.lit-box { color: #003333; background-color: #bce3e3; box-shadow: 0 0 12px rgba(188, 227, 227, 0.9), inset 0 0 4px rgba(255, 255, 255, 0.6); }
.anilirik-highlight-box .tap-word.lit-box:hover { cursor: default; }
@keyframes ex33-shake-reject { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-3px); } 40% { transform: translateX(3px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.anilirik-highlight-box .tap-word.wrong { animation: ex33-shake-reject 0.3s cubic-bezier(.36,.07,.19,.97) both; color: #006666; background-color: rgba(0, 102, 102, 0.15); }
.anilirik-highlight-box .popup-score { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; background-color: rgba(221, 204, 170, 0.95); border: 4px solid #006666; border-radius: 12px; color: #006666; font-size: 24px; font-weight: bold; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(45deg) scale(0.8); transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.1s ease, color 0.1s ease; z-index: 10; box-shadow: 0 10px 25px rgba(0,0,0,0.25); }
.anilirik-highlight-box .popup-content { transform: rotate(-45deg); display: block; }
.anilirik-highlight-box .popup-score.show { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
.anilirik-highlight-box .popup-score.flash { background-color: #006666; color: #ddccaa; transition: none; }

/* ==========================================
   GLOBAL OVERRIDE: HORIZONTAL PROGRESS BAR
   ========================================== */
[class^="anilirik-"] .progress-bar {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  padding-bottom: 4px; /* Breathing room for shadows */
  
  /* Hide scrollbar for a clean, app-like swipe experience */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

[class^="anilirik-"] .progress-bar::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

[class^="anilirik-"] .prog-dot {
  flex-shrink: 0 !important; /* Prevents the circles from turning into ovals when there are many questions */
}


/* ==========================================
   GLOBAL OVERRIDE: SMART POPUP PLACEMENT
   ========================================== */
[class^="anilirik-"] .popup-score {
  position: absolute !important; /* Anchors it to the exercise, not the monitor! */
  top: var(--pop-y, 50%) !important;
  left: var(--pop-x, 50%) !important;
  width: 60px !important; 
  height: 60px !important;
  font-size: 16px !important;
  border-width: 4px !important;
  border-radius: 12px !important;
  
  /* Start hidden at the exact touch point */
  transform: translate(-50%, -50%) rotate(45deg) scale(0.1) !important;
  opacity: 0 !important;
  z-index: 1000 !important; 
  
  /* Smooth flying transitions */
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              top 0.4s ease, left 0.4s ease, width 0.4s ease, height 0.4s ease, 
              opacity 0.2s ease, background-color 0.3s ease, color 0.3s ease !important;
}

/* Standard Hit: Pop upwards slightly above the finger */
[class^="anilirik-"] .popup-score.show:not(.finale) {
  transform: translate(-50%, -150%) rotate(45deg) scale(1) !important;
  opacity: 1 !important;
}

/* ==========================================
   GLOBAL OVERRIDE: THE FINALE POPUP
   ========================================== */
[class^="anilirik-"] .popup-score.finale {
  /* Jump to the center of the EXERCISE BOX */
  top: 50% !important;
  left: 50% !important;
  
  /* Make it massive */
  width: 160px !important;
  height: 160px !important;
  font-size: 42px !important;
  border-width: 8px !important;
  border-radius: 16px !important;
  
  /* Flashy Inverted Colors */
  background-color: #006666 !important;
  color: #ddccaa !important;
  border-color: #ddccaa !important;
  box-shadow: 0 20px 60px rgba(0, 102, 102, 0.6) !important;
}

/* The Explosive Center Pulse */
[class^="anilirik-"] .popup-score.finale.show {
  opacity: 1 !important;
  transform: translate(-50%, -50%) rotate(45deg) scale(1) !important;
  animation: finale-pulse 1s infinite alternate ease-in-out !important;
}

@keyframes finale-pulse {
  0% { transform: translate(-50%, -50%) rotate(45deg) scale(1); }
  100% { transform: translate(-50%, -50%) rotate(45deg) scale(1.15); box-shadow: 0 30px 80px rgba(0, 102, 102, 0.9), inset 0 0 20px rgba(221, 204, 170, 0.4); }
}


/* ==========================================
   GLOBAL OVERRIDE: BI-DIRECTIONAL TAP UX
   ========================================== */
/* The actively selected Blank or Drop Zone */
[class^="anilirik-"] .drop-zone.zone-selected,
[class^="anilirik-"] .letter-box.zone-selected,
[class^="anilirik-"] .sort-bucket.zone-selected,
[class^="anilirik-"] .suffix-slot.zone-selected {
    border-color: #d35400 !important;
    background-color: rgba(211, 84, 0, 0.15) !important;
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(211, 84, 0, 0.3);
}

/* The pulsing available options (Words or Letters) */
[class^="anilirik-"] .drag-word.highlight-target,
[class^="anilirik-"] .key-tile.highlight-target,
[class^="anilirik-"] .letter-box.highlight-target,
[class^="anilirik-"] .sort-bucket.highlight-target,
[class^="anilirik-"] .suffix-tile.highlight-target,
[class^="anilirik-"] .suffix-slot.highlight-target {
    animation: tap-pulse-target 1.5s infinite;
    border: 2px solid #d35400;
}

@keyframes tap-pulse-target {
    0% { border-color: rgba(211, 84, 0, 0.4); box-shadow: 0 0 0px transparent; }
    50% { border-color: rgba(211, 84, 0, 1); box-shadow: 0 0 10px rgba(211, 84, 0, 0.6); }
    100% { border-color: rgba(211, 84, 0, 0.4); box-shadow: 0 0 0px transparent; }
}