/* Import fonts: Nunito (Latin/UI) + BIZ UDPGothic & Noto Sans JP (Crystal Clear Japanese Kanji) */
@import url('https://fonts.googleapis.com/css2?family=BIZ+UDPGothic:wght@400;700&family=Noto+Sans+JP:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

/* --- Collection Styles --- */
.fc-collection-wrap { max-width: 800px; margin: 20px auto; padding: 20px; font-family: 'Nunito', "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif; }
.fc-collection-header { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 20px; min-height: 40px; }
.fc-collection-main-title { font-size: 28px; margin: 0; text-align: center; padding: 0 40px; font-weight: 700; color: #2c3e50; }
.fc-back-to-parent {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #555;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}
.fc-collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 30px; justify-items: center; }
.fc-collection-item { cursor: pointer; text-align: center; transition: transform 0.2s; }
.fc-collection-item:hover { transform: scale(1.05); }
.fc-collection-icon { width: 80px; height: 80px; color: white; display: flex; justify-content: center; align-items: center; font-size: 32px; font-weight: bold; margin: 0 auto 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border: 3px solid white; transition: background .3s, opacity .3s; }
.fc-collection-title { font-size: 15px; color: #333; font-weight: 600; }

.fc-collection-grid[data-item-type="set"] .fc-collection-icon {
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.fc-collection-grid[data-item-type="collection"] .fc-collection-icon {
    border-radius: 20px;
    background: linear-gradient(135deg, #0ba360, #3cba92);
}
.fc-collection-grid[data-item-type="collection"] .fc-item-number {
    font-family: serif;
    font-style: italic;
}

.fc-collection-item.completed {
    opacity: 0.55 !important;
    filter: grayscale(0.85);
    transition: all 0.3s ease;
}
.fc-collection-item.completed:hover {
    opacity: 0.9 !important;
    filter: grayscale(0);
}
.fc-collection-item.completed .fc-collection-icon { background: #bdc3c7 !important; opacity: 0.7; }
.fc-collection-item.completed .fc-collection-icon span { text-decoration: line-through; }

.fc-complete-button-wrapper { text-align: center; margin-top: 30px; }
.fc-complete-set { background: #27ae60; color: #fff; }
.fc-complete-next { background: #3498db; color: #fff; } 
.fc-collection-footer { text-align: center; margin-top: 30px; }
.fc-complete-collection { background: #e67e22; color: #fff; }

.fc-login-prompt { text-align: center; margin-bottom: 20px; background: #fffbe5; padding: 10px; border-radius: 5px; border: 1px solid #ffe8a0; }
.fc-continue-prompt { background-color: #eaf5ff; border: 1px solid #b8d9f3; border-radius: 8px; padding: 15px; margin-bottom: 25px; text-align: center; }
.fc-continue-prompt p { margin: 0 0 10px; font-size: 16px; }
.fc-continue-prompt .fc-btn { margin: 0 5px; }
#fc-continue-yes { background-color: #27ae60; }
#fc-continue-no { background-color: #7f8c8d; }

/* --- Flashcard Styles --- */
.fc-wrap {
    max-width: 600px;
    margin: 20px auto;
    padding: 0;
    font-family: 'Nunito', sans-serif; 
}

.fc-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    margin-bottom: 16px;
    padding: 0 4px;
    flex-wrap: wrap;
    gap: 10px;
}
.fc-header h3{
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    flex: 1;
    text-align: left;
}
.fc-progress{
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}
.fc-progress-counter {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 12px;
    color: #334155;
}
.fc-header-actions{
    display: flex;
    align-items: center;
    gap: 8px;
}
.fc-swap-sides{
    background:#8e44ad;
    color:#fff;
    border:none;
    padding:8px 12px;
    border-radius:20px;
    cursor:pointer;
    font-size:13px;
    font-weight:700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}
.fc-swap-sides.active{background:#27ae60}
.fc-swap-sides:hover { transform: translateY(-1px); }

.fc-audio-open{
    background:linear-gradient(135deg,#ff9f43,#ff6b6b);
    color:#fff;
    border:none;
    padding:8px 12px;
    border-radius:20px;
    cursor:pointer;
    font-size:14px;
}
.fc-audio-open:hover{
    transform:translateY(-2px);
    box-shadow:0 6px 18px rgba(255,107,107,.35);
}

.fc-card{
    position: relative;
    perspective: 1200px;
    width: 100%;
    min-height: 330px;
    height: clamp(330px, 48vh, 480px);
    margin: 0 auto 12px;
}
.fc-inner{
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    cursor: pointer;
    border-radius: 24px;
}
.fc-inner.flipped{
    transform: rotateY(180deg);
}
.fc-face{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    box-sizing: border-box;
    border-radius: 24px;
    font-size: 18px;
    text-align: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.fc-face::-webkit-scrollbar {
    width: 4px;
}
.fc-face::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
}

/* Luxury Cosmic Aurora - FRONT FACE */
.fc-front{
    background: radial-gradient(130% 120% at 20% 10%, #6366f1 0%, #4338ca 35%, #312e81 65%, #0f172a 100%);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 20px 50px -10px rgba(67, 56, 202, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        inset 0 -20px 40px rgba(15, 23, 42, 0.3);
}

/* Luxury Emerald Obsidian - BACK FACE */
.fc-back{
    background: radial-gradient(130% 120% at 80% 10%, #059669 0%, #047857 30%, #064e3b 65%, #022c22 100%);
    color: #ffffff;
    transform: rotateY(180deg);
    border: 1.5px solid rgba(52, 211, 153, 0.28);
    box-shadow: 
        0 20px 50px -10px rgba(5, 150, 105, 0.45),
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        inset 0 -20px 40px rgba(2, 44, 34, 0.35);
}

/* Card Decorative Badge & Hint */
.fc-card-face-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    flex-shrink: 0;
    margin-bottom: 6px;
}
.fc-front-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #e0e7ff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
}
.fc-back-badge {
    background: rgba(16, 185, 129, 0.22);
    color: #a7f3d0;
    border: 1px solid rgba(52, 211, 153, 0.4);
    backdrop-filter: blur(8px);
}

.fc-card-hint {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    user-select: none;
    flex-shrink: 0;
    margin-top: 6px;
    transition: color 0.2s ease;
}
.fc-inner:hover .fc-card-hint {
    color: rgba(255, 255, 255, 0.85);
}

.fc-text-content{
    width: 100%;
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.55;
    box-sizing: border-box;
    padding: 6px 4px;
    flex-shrink: 0;
    font-family: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "palt";
}
.fc-image-container{
    max-height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
}
.fc-image-container img{
    max-width: 100%;
    max-height: 100%;
    height: auto;
    border-radius: 14px;
    object-fit: contain;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}
.fc-inner.image-only .fc-face.fc-front{padding:0}

.fc-btns{text-align:center;margin-top:20px}
.fc-shortcut-guide,.fc-shortcut-guide-quiz,.fc-shortcut-guide-write{color:#888;font-size:13px;margin-top:14px;text-align:center;line-height:1.4}
.fc-btn-row{
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 10px 0;
}
.fc-btn{
    padding: 13px 30px;
    margin: 0;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Nunito', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.fc-btn:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(0,0,0,.2)}
.fc-hard{background:linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);color:#fff;box-shadow:0 6px 20px rgba(244,63,94,0.38)}
.fc-easy{background:linear-gradient(135deg, #10b981 0%, #059669 100%);color:#fff;box-shadow:0 6px 20px rgba(16,185,129,0.38)}
.fc-quiz{background:linear-gradient(135deg, #8b5cf6, #7c3aed);color:#fff}
.fc-write{background:linear-gradient(135deg, #3b82f6, #2563eb);color:#fff}
.fc-restart,.fc-export,.fc-quiz-exit,.fc-quiz-restart,.fc-back-flashcard,.fc-write-exit{background:#334155;color:#fff;margin-top:15px;border-radius:24px}
.fc-restart-hard,.fc-quiz-restart-wrong{background:linear-gradient(135deg, #f43f5e, #dc2626);color:#fff;margin-top:15px;border-radius:24px}
.fc-summary{display:flex;gap:20px;justify-content:center;margin:20px 0}
.fc-stat{padding:15px 30px;background:#f8fafc;border-radius:14px;font-size:18px;font-weight:700;border:1px solid #e2e8f0;display:inline-flex;align-items:center;gap:8px}
.fc-stat-easy{color:#059669;background:#f0fdf4;border-color:#bbf7d0}
.fc-stat-hard{color:#dc2626;background:#fef2f2;border-color:#fecaca}
.fc-lists{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:20px 0}
.fc-list{padding:18px;background:#f8fafc;border-radius:16px;border:1px solid #e2e8f0}
.fc-list h4{margin:0 0 15px;text-align:center;font-size:16px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:6px}
.fc-list div div{padding:10px 14px;margin:8px 0;background:#fff;border-left:4px solid #3b82f6;border-radius:8px;font-size:14px;box-shadow:0 1px 3px rgba(0,0,0,0.05);line-height:1.45}
.fc-list-easy div div{border-left-color:#10b981}
.fc-list-hard div div{border-left-color:#ef4444}
.fc-quiz-mode,.fc-quiz-results,.fc-results,.fc-writing-mode{background:#fff;padding:24px;border-radius:20px;box-shadow:0 10px 30px rgba(0,0,0,.06);border:1px solid #e2e8f0}
.fc-quiz-controls{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}
.fc-quiz-options-toggle{position:relative}
.fc-quiz-options-list{position:absolute;top:100%;right:0;background:#fff;border:1px solid #ddd;padding:10px;border-radius:5px;z-index:10;width:200px;box-shadow:0 2px 5px rgba(0,0,0,.1)}
.fc-quiz-options-list label{display:block;padding:5px;font-size:14px}
.fc-quiz-question{font-size:18px;margin-bottom:20px;padding:15px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border-radius:10px;text-align:center}
.fc-quiz-options{display:grid;gap:10px;margin:20px 0}
.fc-quiz-option{padding:12px 15px;border:2px solid #ddd;border-radius:10px;background:#fff;cursor:pointer;font-size:16px;text-align:left;transition:all .3s; font-family: 'Nunito', sans-serif;}
.fc-quiz-option:hover{border-color:#3498db;background:#f0f8ff}
.fc-quiz-option.correct{background:#d4edda;border-color:#28a745}
.fc-quiz-option.wrong{background:#f8d7da;border-color:#dc3545}
.fc-quiz-feedback{padding:12px;margin:15px 0;border-radius:10px;font-size:16px;font-weight:600;text-align:center}
.correct-feedback{background:#d4edda;color:#155724}
.wrong-feedback{background:#f8d7da;color:#721c24}
.fc-quiz-next{background:#3498db;color:#fff}
.fc-quiz-results h3,.fc-results h3{text-align:center;margin-bottom:20px;color:#1e293b;font-size:22px;font-weight:800}

/* --- SRS Latest Button --- */
.fc-btn-srs-latest {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
    border: 1.5px solid #f59e0b;
    padding: 4px 13px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
    transition: all 0.2s ease;
    font-family: inherit;
}
.fc-btn-srs-latest:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    color: #78350f;
}

/* --- Back Content Specific Styling - High Contrast & Crisp Text --- */
.fc-face.fc-back {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transform: rotateY(180deg) translateZ(1px);
    font-family: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.fc-back-line-front {
    font-family: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.2em;
    font-weight: 600;
    color: #fde047;
    margin-bottom: 6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    line-height: 1.45;
    letter-spacing: 0.02em;
}
.fc-back-line-1 {
    font-family: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1em;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    line-height: 1.5;
    letter-spacing: 0.02em;
}
.fc-separator {
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.8), rgba(255, 255, 255, 0.95), rgba(251, 191, 36, 0.8), transparent);
    margin: 10px auto;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
    flex-shrink: 0;
}
.fc-back-line-2, .fc-back-line-3 {
    font-family: 'Nunito', "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.92em;
    color: #ffffff;
    font-weight: 400;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    line-height: 1.5;
}
.fc-back-line-4 {
    font-family: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.88em;
    color: #6ee7b7;
    font-weight: 500;
    background: rgba(15, 23, 42, 0.7);
    border: 1.5px solid rgba(52, 211, 153, 0.6);
    border-radius: 10px;
    padding: 6px 14px;
    margin-bottom: 6px;
    line-height: 1.5;
    display: inline-block;
    max-width: 95%;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.fc-back-line-5 {
    font-family: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.88em;
    color: #fde047;
    font-weight: 500;
    background: rgba(15, 23, 42, 0.7);
    border: 1.5px solid rgba(251, 191, 36, 0.6);
    border-radius: 10px;
    padding: 6px 14px;
    margin-bottom: 6px;
    line-height: 1.5;
    display: inline-block;
    max-width: 95%;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* --- Writing Mode Styles --- */
.fc-writing-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.fc-write-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.fc-write-exit { margin-top: 0; }
.fc-write-actions .fc-btn { padding: 8px 15px; font-size: 14px; margin: 0; }
.fc-write-card-selector { font-size: 14px; padding: 8px; border-radius: 5px; max-width: 150px; font-family: 'Nunito', sans-serif;}
.fc-writing-area { position: relative; width: 100%; margin: 20px auto 0; }
.fc-writing-grid { display: flex; flex-wrap: wrap; justify-content: center; width: 100%; }
.fc-writing-char-box { width: 150px; height: 150px; border: 1px dashed #ccc; display: flex; justify-content: center; align-items: center; font-size: 90px; color: #e0e0e0; user-select: none; transition: color 0.3s; font-family: 'Nunito', sans-serif; font-weight: 600;}
.fc-writing-char-box.hide-ghost { color: transparent; }
#fc-writing-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; touch-action: none; }

/* --- Icon Button Styles --- */
.fc-btn-icon {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1;
    min-width: 42px;
}
.fc-quiz-controls .fc-btn-icon {
    padding: 10px 12px;
    font-size: 16px;
    margin: 0;
}
.fc-header .fc-swap-sides,
.fc-header .fc-audio-open {
    padding: 8px 12px;
    font-size: 14px;
}

/* --- Audio Modal & Custom Player --- */
.fc-audio-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}
.fc-audio-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(2px);
}
.fc-audio-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(540px, calc(100% - 30px));
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 18px 48px rgba(0,0,0,.28);
    animation: fcAudioPop .2s ease-out;
}
@keyframes fcAudioPop {
    from { opacity: 0; transform: translate(-50%, -47%) scale(0.98); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.fc-audio-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 16px 16px 0 0;
}
.fc-audio-dialog-head h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}
.fc-audio-close {
    margin: 0;
    background: rgba(255,255,255,.18);
    color: #fff;
}
.fc-audio-close:hover {
    background: rgba(255,255,255,.28);
}
.fc-audio-dialog-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.fc-custom-audio-player {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.fc-audio-progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: monospace;
    font-size: 15px;
    color: #555;
}

.fc-seek-bar {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
}
.fc-seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}
.fc-seek-bar::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.fc-audio-controls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
}

.fc-audio-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #4a5568;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    font-family: 'Nunito', sans-serif;
    font-weight: bold;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
.fc-audio-btn:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}
.fc-audio-btn:active {
    transform: scale(0.95);
}
.fc-audio-btn.main-btn {
    width: 70px;
    height: 70px;
    font-size: 26px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.fc-audio-btn.main-btn:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}
.fc-audio-btn.active {
    background: #27ae60;
    color: white;
}

@media(max-width:640px){
    .fc-collection-wrap { padding: 10px; }
    .fc-wrap { padding: 0; } 
    .fc-header, .fc-main-content, .fc-results, .fc-quiz-results {
        padding-left: 6px;
        padding-right: 6px;
    }
    .fc-writing-mode { padding: 10px 0; }
    .fc-writing-grid { flex-direction: column; align-items: center; }
    .fc-writing-char-box {
        width: 80vw;
        height: 80vw;
        max-width: 250px;
        max-height: 250px;
        font-size: 150px;
        margin-bottom: 10px;
    }

    .fc-header h3{font-size:18px; text-align:center;}
    .fc-lists{grid-template-columns:1fr}
    .fc-summary{flex-direction:column;gap:10px}
    .fc-stat{padding:10px}
    .fc-write-actions{justify-content:center;width:100%}
    .fc-collection-main-title { font-size: 22px; }
    .fc-back-to-parent { font-size: 20px; }

    /* Mobile Audio Player Adjustments */
    .fc-audio-dialog {
        width: calc(100% - 20px);
    }
    .fc-audio-dialog-body {
        padding: 20px 15px;
        gap: 15px;
    }
    .fc-audio-controls-container {
        gap: 12px;
    }
    .fc-audio-btn {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }
    .fc-audio-btn.main-btn {
        width: 65px;
        height: 65px;
        font-size: 24px;
    }
}

/* ==========================================================================
   AHOSHADOTAB 3-STEP SYSTEM STYLES (UNIFIED INTEGRATION)
   ========================================================================== */

.ahoshadotab-wrap {
    max-width: 850px;
    margin: 20px auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    font-family: 'Nunito', sans-serif;
    box-sizing: border-box;
}

/* Header */
.ast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 2px dashed #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}
.ast-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ast-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
}
.ast-brand-badge {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.ast-meta {
    font-size: 14px;
    color: #64748b;
}
.ast-card-count strong {
    color: #4f46e5;
    font-size: 16px;
}

/* Stepper Tabs Bar */
.ast-step-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}
.ast-step-tabs.no-audio {
    grid-template-columns: repeat(2, 1fr);
}
.ast-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
}
.ast-tab-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}
.ast-tab-btn.active {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
    border: 1px solid #c7d2fe;
}
.ast-tab-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e0e7ff;
    color: #3730a3;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.ast-tab-btn.active .ast-tab-badge {
    background: #4f46e5;
    color: #ffffff;
}
.ast-tab-text {
    font-size: 14px;
    font-weight: 700;
    color: #475569;
}
.ast-tab-btn.active .ast-tab-text {
    color: #1e293b;
}

/* AUDIO PLAYER CONTAINER */
.ast-audio-section {
    position: sticky;
    top: 8px;
    z-index: 990;
    margin-bottom: 18px;
}
.ast-audio-card {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.ast-audio-card-head {
    display: none;
}

.ast-custom-player {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}
.ast-custom-player .fc-audio-progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    font-family: monospace;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
}
.ast-custom-player .fc-seek-bar {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
}
.ast-custom-player .fc-seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fbbf24;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.ast-custom-player .fc-audio-controls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.ast-custom-player .fc-audio-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
}
.ast-custom-player .fc-audio-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.06);
}
.ast-custom-player .fc-audio-btn.main-btn {
    width: 44px;
    height: 44px;
    font-size: 16px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e1b4b;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.4);
}
.ast-custom-player .fc-audio-btn.main-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 5px 16px rgba(245, 158, 11, 0.6);
}
.ast-custom-player .fc-audio-btn.active {
    background: #10b981;
    color: #ffffff;
}

/* STEP NAVIGATION BARS */
.ast-step-nav-bar {
    margin-top: 15px;
    text-align: center;
}
.ast-next-step-btn {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Nunito', sans-serif;
}
.ast-next-step-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.45);
    background: linear-gradient(135deg, #4338ca, #4f46e5);
}

/* STEP BANNERS */
.ast-step-banner {
    background: #f1f5f9;
    border-left: 4px solid #4f46e5;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}
.ast-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}
.ast-banner-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
}
.ast-banner-desc {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: #475569;
}

.ast-global-toggles {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ast-btn-action {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Nunito', sans-serif;
}
.ast-btn-action:hover {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}
.ast-btn-action.active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

/* TABLES (STEP 2 & STEP 3) */
.ast-table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}
.ast-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}
.ast-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 800;
    font-size: 14px;
    padding: 12px 16px;
    text-align: left;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}
.ast-table th:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-left: 1px solid #e2e8f0;
}
.ast-table th:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-right: 1px solid #e2e8f0;
}

.ast-script-row, .ast-output-row {
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}
.ast-script-row:hover, .ast-output-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.ast-table td {
    padding: 14px 16px;
    font-size: 15px;
    color: #334155;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.ast-table td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-left: 1px solid #f1f5f9;
}
.ast-table td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-right: 1px solid #f1f5f9;
}

.ast-col-front {
    font-weight: 700;
    color: #1e293b;
}

.ast-back-line {
    margin-bottom: 4px;
}
.ast-back-line:last-child {
    margin-bottom: 0;
}
.ast-back1 { font-weight: 700; color: #1e293b; }
.ast-back2, .ast-back3 { color: #475569; }
.ast-back4 { color: #0284c7; font-weight: 600; }
.ast-back5-txt { color: #059669; font-weight: 600; }
.ast-empty-text { color: #94a3b8; font-style: italic; }

/* STEP 3 SPECIFIC STYLES & INTEGRATED TOGGLE */
.ast-col-back5 {
    background: #f0fdf4;
    color: #166534;
    font-weight: 700;
}
.ast-col-back4 {
    position: relative;
    background: #faf5ff;
}
.ast-back4-cell-wrap {
    position: relative;
    width: 100%;
}
.ast-back4-mask {
    color: #7e22ce;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f3e8ff;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px dashed #c084fc;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.ast-back4-mask:hover {
    background: #e9d5ff;
    border-color: #a855f7;
    color: #6b21a8;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(168, 85, 247, 0.15);
}
.ast-back4-val {
    color: #581c87;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.ast-back4-content-inner {
    flex: 1;
    line-height: 1.5;
    word-break: break-word;
}
.ast-row-action-btns {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: stretch;
    flex-shrink: 0;
    width: 78px;
}
.ast-rehide-btn, .ast-mark-btn {
    width: 78px;
    height: 26px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    padding: 0 4px;
    font-family: 'Nunito', sans-serif;
    transition: all 0.15s ease;
}
.ast-rehide-btn {
    background: #4a5568;
    color: #ffffff;
}
.ast-rehide-btn:hover {
    background: #2d3748;
    color: #ffffff;
}

.ast-mark-btn {
    background: #f59e0b;
    color: #1a202c;
}
.ast-mark-btn:hover {
    background: #d97706;
    color: #ffffff;
}
.ast-mark-btn.active {
    background: #ef4444;
    color: #ffffff;
}

.ast-report-trigger-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #cbd5e1;
    transition: all 0.2s ease;
    padding: 4px;
    margin-left: 4px;
}
.ast-report-trigger-btn:hover {
    color: #e53e3e;
    transform: scale(1.15);
}

.ast-step3-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}
.ast-nav-back-btn {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Nunito', sans-serif;
}
.ast-nav-back-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* REPORT MODAL */
.ast-report-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
}
.ast-report-modal {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: astFadeUp 0.3s ease;
}
@keyframes astFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.ast-report-modal-header {
    background: #fef2f2;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #fee2e2;
}
.ast-report-modal-title {
    font-size: 16px;
    font-weight: 800;
    color: #991b1b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ast-report-modal-close {
    background: transparent;
    border: none;
    font-size: 22px;
    color: #991b1b;
    cursor: pointer;
    line-height: 1;
}
.ast-report-modal-body {
    padding: 20px;
}
.ast-report-card-preview {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #334155;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.ast-report-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}
.ast-report-textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    resize: vertical;
}
.ast-report-textarea:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.ast-report-status-msg {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}
.ast-report-status-msg.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.ast-report-status-msg.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.ast-report-modal-footer {
    background: #f8fafc;
    padding: 14px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #e2e8f0;
}
.ast-report-btn-cancel {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.ast-report-btn-submit {
    background: #ef4444;
    border: none;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ast-report-btn-submit:hover {
    background: #dc2626;
}

@media (max-width: 650px) {
    .ahoshadotab-wrap {
        padding: 14px 10px;
        margin: 10px auto;
        border-radius: 16px;
    }
    .fc-mode-switcher {
        gap: 8px;
        margin-bottom: 14px;
        padding: 4px;
    }
    .fc-mode-tab-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    .fc-header {
        margin-bottom: 12px;
        gap: 8px;
    }
    .fc-header h3 {
        font-size: 18px;
        width: 100%;
        text-align: center;
    }
    .fc-progress {
        width: 100%;
        justify-content: center;
        font-size: 12px;
    }
    .fc-header-actions {
        width: 100%;
        justify-content: center;
    }
    .fc-card {
        min-height: 280px;
        height: clamp(280px, 52vh, 480px);
    }
    .fc-face {
        padding: 18px 14px;
        border-radius: 16px;
        font-size: 16px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .fc-text-content {
        font-size: 16px;
        padding: 4px 0;
        margin: auto 0;
    }
    .fc-btn-row {
        gap: 10px;
        margin: 10px 0;
    }
    .fc-btn {
        flex: 1;
        max-width: 150px;
        padding: 12px 14px;
        font-size: 14px;
    }
    .ast-header {
        padding-bottom: 10px;
        margin-bottom: 12px;
        gap: 6px;
    }
    .ast-title {
        font-size: 18px;
    }
    .ast-brand-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    .ast-meta {
        font-size: 12.5px;
    }
    .ast-step-tabs {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-bottom: 14px;
        padding: 4px;
        border-radius: 12px;
    }
    .ast-step-tabs.no-audio {
        grid-template-columns: 1fr;
    }
    .ast-tab-btn {
        flex-direction: row;
        justify-content: flex-start;
        gap: 8px;
        padding: 8px 10px;
        border-radius: 10px;
    }
    .ast-tab-badge {
        margin-bottom: 0;
        font-size: 10px;
        padding: 2px 6px;
    }
    .ast-tab-text {
        font-size: 13px;
    }
    .ast-audio-section {
        margin-bottom: 12px;
        top: 4px;
    }
    .ast-audio-card {
        padding: 10px 12px;
        border-radius: 12px;
    }
    .ast-step-banner {
        padding: 10px 12px;
        margin-bottom: 12px;
        border-radius: 10px;
        border-left-width: 3px;
    }
    .ast-banner-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 4px;
    }
    .ast-banner-title {
        font-size: 15px;
    }
    .ast-banner-desc {
        font-size: 12px;
        margin-top: 2px;
        line-height: 1.4;
    }
    .ast-global-toggles {
        width: 100%;
        margin-top: 4px;
        gap: 5px;
    }
    .ast-btn-action {
        flex: 1 1 auto;
        padding: 5px 8px;
        font-size: 11.5px;
        border-radius: 12px;
        text-align: center;
    }

    /* BẢNG SCRIPT & THỬ THÁCH: DÀN THEO HÀNG DỌC TRÊN MOBILE */
    .ast-table-responsive {
        overflow-x: visible;
        margin-bottom: 12px;
    }
    .ast-table {
        display: block;
        width: 100%;
        border-spacing: 0;
    }
    .ast-table thead {
        display: none !important;
    }
    .ast-table tbody {
        display: block;
        width: 100%;
    }

    /* STEP 2: SCRIPT ROW - HÀNG DỌC (Dòng 1: STT, Dòng 2: Mặt trước, Dòng 3: Chi tiết) */
    .ast-script-row {
        display: flex !important;
        flex-direction: column;
        gap: 6px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 10px 12px;
        margin-bottom: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    }
    .ast-script-row td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
    }
    .ast-script-row .ast-col-num {
        display: flex !important;
        align-items: center;
        text-align: left !important;
    }
    .ast-script-row .ast-col-num .ast-num-val {
        background: #eef2ff;
        color: #4338ca;
        padding: 2px 8px;
        border-radius: 6px;
        font-weight: 800;
        font-size: 11.5px;
        display: inline-block;
    }
    .ast-script-row .ast-col-front {
        font-size: 16px;
        font-weight: 700;
        color: #1e293b;
        line-height: 1.4;
        word-break: break-word;
    }
    .ast-script-row .ast-col-back {
        padding-top: 6px !important;
        margin-top: 2px;
        border-top: 1px dashed #e2e8f0 !important;
        font-size: 13.5px;
        color: #475569;
        line-height: 1.45;
        word-break: break-word;
    }

    /* STEP 3: OUTPUT ROW - HÀNG DỌC (Dòng 1: STT + Cần ôn + Báo lỗi, Dòng 2: VN, Dòng 3: VN ẩn / JP) */
    .ast-output-row {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        background: #ffffff;
        border: 1.5px solid #e2e8f0;
        border-radius: 12px;
        padding: 10px 12px;
        margin-bottom: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    }
    .ast-output-row.is-marked-row {
        border-color: #f59e0b;
        background: #fffdfa;
    }
    .ast-output-row td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
    }
    /* Dòng 1: STT + Cần ôn + Báo lỗi */
    .ast-output-row .ast-col-num {
        width: 100%;
    }
    .ast-output-row .ast-num-box {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
    }
    .ast-output-row .ast-num-val {
        background: #f1f5f9;
        color: #475569;
        padding: 2px 8px;
        border-radius: 6px;
        font-weight: 800;
        font-size: 11.5px;
    }
    .ast-output-row .ast-marked-badge-icon {
        background: #fef3c7;
        color: #b45309;
        padding: 2px 8px;
        border-radius: 6px;
        font-weight: 700;
        font-size: 11px;
        display: inline-flex;
        align-items: center;
        gap: 3px;
    }
    .ast-output-row .ast-report-trigger-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 11.5px;
        color: #94a3b8;
        padding: 2px 6px;
        border-radius: 4px;
        margin-left: auto;
    }
    /* Dòng 2: VN */
    .ast-output-row .ast-col-back5 {
        padding: 8px 10px !important;
        border-radius: 8px;
        background: #f0fdf4;
        color: #166534;
        font-weight: 700;
        font-size: 14.5px;
        line-height: 1.45;
        word-break: break-word;
    }
    /* Dòng 3: VN ẩn / JP */
    .ast-output-row .ast-col-back4 {
        padding: 8px 10px !important;
        border-radius: 8px;
        background: #faf5ff;
        font-size: 13.5px;
        word-break: break-word;
    }
    .ast-output-row .ast-back4-mask {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        padding: 8px 10px;
        font-size: 12.5px;
        border-radius: 8px;
    }
    .ast-output-row .ast-back4-val {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .ast-output-row .ast-back4-content-inner {
        font-size: 14.5px;
        font-weight: 700;
        color: #581c87;
        line-height: 1.45;
    }
    .ast-output-row .ast-row-action-btns {
        display: flex;
        flex-direction: row;
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }
    .ast-output-row .ast-rehide-btn,
    .ast-output-row .ast-mark-btn {
        flex: 1;
        height: 28px;
        font-size: 11.5px;
    }
}