.ov-app {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
}

/* Section tabs */
.ov-section-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 16px;
}

.ov-sec-tab {
    padding: 8px 18px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 6px 6px 0 0;
    transition: color 0.15s, border-color 0.15s;
}
.ov-sec-tab:hover { color: var(--text); }
.ov-sec-tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); font-weight: 600; }

/* Sections */
.ov-section { display: none; }
.ov-section.active { display: block; }

/* Controls */
.ov-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.ov-filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.ov-chip {
    padding: 4px 12px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
}
.ov-chip:hover { border-color: var(--primary-light); color: var(--primary-dark); }
.ov-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.ov-search {
    flex: 1;
    min-width: 180px;
    max-width: 300px;
    padding: 7px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}
.ov-search:focus { border-color: var(--primary-light); }

/* Grids */
.ov-grid {
    display: grid;
    gap: 8px;
}
.ov-grid-8 { grid-template-columns: repeat(8, 1fr); }
.ov-grid-4 { grid-template-columns: repeat(4, 1fr); }
.ov-grid-auto { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

@media (max-width: 640px) {
    .ov-grid-8 { grid-template-columns: repeat(5, 1fr); }
    .ov-grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 400px) {
    .ov-grid-8 { grid-template-columns: repeat(4, 1fr); }
    .ov-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Cards */
.ov-card {
    background: var(--bg-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 72px;
    justify-content: center;
}
.ov-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.ov-card-char {
    font-size: 26px;
    line-height: 1.2;
    color: var(--text);
}

.ov-card-rom {
    font-size: 11px;
    color: var(--text-2);
    line-height: 1.2;
}

.ov-card-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 999px;
}
.badge-mid { background: #e8f5e9; color: #2E7D32; }
.badge-high { background: #e3f2fd; color: #1565C0; }
.badge-low { background: #fff8e1; color: #E65100; }

/* Mark cards (wider) */
.ov-mark-card {
    background: var(--bg-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}
.ov-mark-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ov-mark-char { font-size: 28px; text-align: center; margin-bottom: 6px; }
.ov-mark-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; }

/* Modal */
.ov-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 100;
}
.ov-modal-backdrop.open { display: block; }

.ov-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    padding: 24px;
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 101;
}
.ov-modal.open { display: block; }

.ov-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-2);
}
.ov-modal-close:hover { background: var(--border); }

.ov-modal-char {
    font-size: 72px;
    text-align: center;
    line-height: 1.1;
    margin-bottom: 6px;
}

.ov-modal-phonetic {
    text-align: center;
    font-size: 18px;
    color: var(--text-2);
    margin-bottom: 10px;
}

.ov-class-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    margin: 0 auto 14px;
    width: fit-content;
    display: block;
    text-align: center;
}

.ov-modal-details {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.8;
    margin-bottom: 14px;
    background: var(--bg-2);
    border-radius: var(--radius);
    padding: 10px 14px;
}
.ov-modal-details strong { color: var(--text); }

.ov-audio-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    margin-bottom: 14px;
    transition: background 0.15s;
}
.ov-audio-btn:hover { background: var(--primary-dark); }

.ov-modal-words h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-2);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ov-word-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ov-word-list li {
    font-size: 13px;
    padding: 4px 8px;
    background: var(--bg-2);
    border-radius: 6px;
    color: var(--text);
}
