/* All styles are scoped to .ra-sebra-app; the active WordPress theme is left untouched. */
.ra-sebra-app,
.ra-sebra-app * { box-sizing: border-box; }
.ra-sebra-app {
    --ra-ink: #17243a;
    --ra-muted: #63718a;
    --ra-green: #087f5b;
    --ra-green-dark: #065f46;
    --ra-green-soft: #ecfdf5;
    --ra-blue: #245fbd;
    --ra-blue-soft: #edf4ff;
    --ra-purple: #5b43b5;
    --ra-line: #dce5ef;
    width: 100%;
    max-width: 1100px;
    min-width: 0;
    margin: 18px auto;
    border: 1px solid var(--ra-line);
    border-radius: 18px;
    overflow: hidden;
    background: #f8fbff;
    color: var(--ra-ink);
    box-shadow: 0 10px 30px rgba(15, 39, 75, .08);
    font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Bengali", "Nirmala UI", sans-serif;
    overflow-wrap: anywhere;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
}
.ra-sebra-app [hidden] { display: none !important; }
.ra-sebra-app button,
.ra-sebra-app input { font: inherit; }
.ra-sebra-app button { touch-action: manipulation; cursor: pointer; }
.ra-sebra-app button:focus-visible,
.ra-sebra-app input:focus-visible { outline: 3px solid rgba(8,127,91,.35); outline-offset: 2px; }

.ra-sebra__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 22px;
    color: #fff;
    background: linear-gradient(125deg, #102d55 0%, #135b8f 65%, #147d75 100%);
}
.ra-sebra__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ra-sebra__brand-mark {
    display: grid; place-items: center; flex: 0 0 52px;
    width: 52px; height: 52px; border-radius: 14px;
    border: 1px solid rgba(255,255,255,.45);
    background: rgba(255,255,255,.13);
    color: #fff; font-size: 17px; font-weight: 900; letter-spacing: -.05em;
}
.ra-sebra__brand-copy { min-width: 0; }
.ra-sebra__eyebrow { margin: 0 0 2px; color: #b9e9dc; font-size: 10px; font-weight: 850; letter-spacing: .16em; }
.ra-sebra__brand h2 { margin: 0; color: #fff; font-size: clamp(20px, 3vw, 28px); font-weight: 850; letter-spacing: -.03em; line-height: 1.2; }
.ra-sebra__brand-copy > p:last-child { margin: 5px 0 0; color: #e1f4f1; font-size: 12px; }
.ra-sebra__actions { display: flex; align-items: flex-start; justify-content: flex-end; gap: 7px; }
.ra-sebra__action {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    min-height: 40px; padding: 8px 11px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,.35); color: #fff;
    background: rgba(255,255,255,.12); font-size: 12px; font-weight: 800; white-space: nowrap;
}
.ra-sebra__action--quiz { background: #fff; border-color: #fff; color: #314b9d; }
.ra-sebra__action:hover { filter: brightness(1.06); }
.ra-sebra__action span { display: inline-flex; min-width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 99px; background: rgba(255,255,255,.18); font-size: 10px; }

.ra-sebra__level-tabs {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.ra-sebra__level-tab {
    display: flex; min-width: 0; min-height: 57px; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 8px 5px; border: 1px solid rgba(255,255,255,.25); border-radius: 11px;
    background: rgba(255,255,255,.10); color: #e9f6ff; text-align: center;
}
.ra-sebra__level-tab span { font-size: 13px; font-weight: 850; line-height: 1.25; }
.ra-sebra__level-tab small { color: inherit; font-size: 10px; opacity: .82; }
.ra-sebra__level-tab.is-active[data-level="easy"] { background: #0b9468; border-color: #75e0bd; color: #fff; }
.ra-sebra__level-tab.is-active[data-level="medium"] { background: #2563c9; border-color: #a5cbff; color: #fff; }
.ra-sebra__level-tab.is-active[data-level="advanced"] { background: #6d4dcc; border-color: #d0c4ff; color: #fff; }

.ra-sebra__range-area { grid-column: 1 / -1; min-width: 0; }
.ra-sebra__range-area > p { margin: 0 0 8px; color: #d9ecee; font-size: 11px; font-weight: 750; }
.ra-sebra__range-buttons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.ra-sebra__range-button {
    min-width: 0; min-height: 39px; padding: 6px 3px; border: 1px solid rgba(255,255,255,.2);
    border-radius: 9px; background: rgba(255,255,255,.1); color: #f4fbff;
    font-size: 12px; font-weight: 850; font-variant-numeric: tabular-nums;
}
.ra-sebra__range-button.is-active { border-color: #fff; background: #fff; color: #125b60; }

.ra-sebra__main { min-width: 0; padding: 17px; }
.ra-sebra__controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 13px; }
.ra-sebra__search {
    display: flex; min-width: 0; align-items: center; gap: 8px; padding: 0 11px;
    border: 1px solid #d7e2ee; border-radius: 11px; background: #fff; color: #718096;
}
.ra-sebra__search > span { font-size: 24px; line-height: 1; }
.ra-sebra__search input { width: 100%; min-width: 0; min-height: 45px; padding: 9px 0; border: 0; outline: none; background: transparent; color: var(--ra-ink); font-size: 16px; box-shadow: none; }
.ra-sebra__search input:focus { outline: none; box-shadow: none; }
.ra-sebra__search input::placeholder { color: #8997a9; }
.ra-sebra__show-all { display: flex; align-items: center; gap: 7px; min-width: 0; color: #255644; font-size: 12px; font-weight: 750; cursor: pointer; }
.ra-sebra__show-all input { flex: 0 0 auto; width: 19px; height: 19px; margin: 0; accent-color: #07845c; }
.ra-sebra__message { margin: 0 0 12px; padding: 9px 11px; border-radius: 9px; background: #edf5ff; color: #25558d; font-size: 12px; }
.ra-sebra__message:empty { display: none; }
.ra-sebra__message.is-error { background: #fff0f0; color: #9b2525; }
.ra-sebra__word-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.ra-sebra__word-card {
    min-width: 0; padding: 10px 11px; border: 1px solid #e0e7f0; border-radius: 12px;
    background: #fff; box-shadow: 0 2px 6px rgba(15,39,75,.035);
}
.ra-sebra__word-title-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ra-sebra__serial { flex: 0 0 auto; padding: 3px 5px; border-radius: 6px; background: #d1fae5; color: #065f46; font: 800 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.ra-sebra__word-title { flex: 1 1 auto; min-width: 0; margin: 0; color: #1e293b; font-size: 16px; font-weight: 850; line-height: 1.22; letter-spacing: -.015em; }
.ra-sebra__icon-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: #ecfdf5; color: #047857; font-size: 16px; }
.ra-sebra__icon-button:hover { background: #d1fae5; }
.ra-sebra__favorite { background: transparent; color: #c1cad6; font-size: 20px; }
.ra-sebra__favorite.is-saved { color: #e9a008; }
.ra-sebra__meaning { display: flex; flex-wrap: wrap; gap: 3px 6px; margin: 3px 0 0; color: #334155; font-size: 12px; line-height: 1.45; }
.ra-sebra__pronunciation { color: #087f5b; font-weight: 750; }
.ra-sebra__meaning-text { font-weight: 650; }
.ra-sebra__example-row { display: flex; align-items: flex-start; gap: 6px; min-width: 0; margin-top: 6px; }
.ra-sebra__example { flex: 1 1 auto; min-width: 0; margin: 0; color: #25344a; font-size: 12.5px; font-weight: 650; line-height: 1.4; }
.ra-sebra__example-speak { width: 27px; height: 27px; margin-top: -2px; background: #f1f5f9; color: #475569; font-size: 13px; }
.ra-sebra__example-bn { margin: 2px 0 0; color: #64748b; font-size: 10.5px; line-height: 1.45; }
.ra-sebra__example-translation { color: #087f5b; }
.ra-sebra__breakdown { margin: 4px 0 0; color: #64748b; font-size: 10px; line-height: 1.45; }
.ra-sebra__breakdown-label { color: #5145a8; font-weight: 850; }

.ra-sebra__load-more {
    display: block; width: 100%; min-height: 44px; margin: 13px 0 5px;
    border: 1px solid #a7f3d0; border-radius: 11px; background: #ecfdf5; color: #065f46;
    font-size: 13px; font-weight: 850;
}
.ra-sebra__load-more:hover { background: #d1fae5; }
.ra-sebra__empty { padding: 28px 12px; border: 1px dashed #d4deeb; border-radius: 13px; background: #fff; text-align: center; }
.ra-sebra__empty strong { color: #334155; font-size: 14px; }
.ra-sebra__empty p { margin: 5px 0 0; color: #718096; font-size: 12px; }

.ra-sebra__quiz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 12px; border: 1px solid #dbe5ff; border-radius: 12px; background: #eef2ff; }
.ra-sebra__quiz-head h3 { margin: 0; color: #312e81; font-size: 15px; font-weight: 850; }
.ra-sebra__quiz-head p { margin: 4px 0 0; color: #4f46a5; font-size: 11px; }
.ra-sebra__quiz-head strong { flex: 0 0 auto; color: #4338ca; font-size: 12px; white-space: nowrap; }
.ra-sebra__quiz-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.ra-sebra__question { min-width: 0; padding: 12px; border: 1px solid #e0e7f0; border-radius: 12px; background: #fff; }
.ra-sebra__question-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 9px; }
.ra-sebra__question-index { margin: 0 0 3px; color: #5b43b5; font-size: 9px; font-weight: 900; letter-spacing: .04em; }
.ra-sebra__question h4 { margin: 0; color: #1e293b; font-size: 16px; font-weight: 850; line-height: 1.25; }
.ra-sebra__question-pronunciation { margin: 3px 0 0; color: #087f5b; font-size: 11px; }
.ra-sebra__question-serial { padding: 3px 6px; border-radius: 6px; background: #f1f5f9; color: #64748b; font-size: 10px; white-space: nowrap; }
.ra-sebra__options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ra-sebra__option {
    display: flex; align-items: flex-start; gap: 7px; width: 100%; min-height: 42px; padding: 9px 10px;
    border: 1px solid #dce4ee; border-radius: 9px; background: #f8fafc; color: #334155;
    text-align: left; font-size: 12px; line-height: 1.4;
}
.ra-sebra__option-letter { flex: 0 0 auto; font-weight: 900; }
.ra-sebra__option:disabled { cursor: default; opacity: 1; }
.ra-sebra__option.is-correct { border-color: #34d399; background: #ecfdf5; color: #065f46; }
.ra-sebra__option.is-wrong { border-color: #fb7185; background: #fff1f2; color: #9f1239; }
.ra-sebra__quiz-complete { margin-top: 14px; padding: 14px; border: 1px solid #a7f3d0; border-radius: 12px; background: #ecfdf5; color: #065f46; text-align: center; font-weight: 750; }
.ra-sebra__toast { position: fixed; z-index: 99999; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 24px); padding: 10px 14px; border-radius: 99px; background: #102b45; color: #fff; box-shadow: 0 8px 24px rgba(15,39,75,.2); font-size: 12px; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: opacity .18s ease, transform .18s ease; }
.ra-sebra__toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 760px) {
    .ra-sebra__main { padding: 20px; }
    .ra-sebra__word-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ra-sebra__quiz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .ra-sebra__word-card { padding: 12px; }
}
@media (max-width: 600px) {
    .ra-sebra-app { margin: 12px auto; border-radius: 13px; }
    .ra-sebra__header { position: relative; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px 12px 13px; }
    .ra-sebra__brand-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 11px; font-size: 14px; }
    .ra-sebra__brand { gap: 9px; }
    .ra-sebra__brand h2 { font-size: 20px; }
    .ra-sebra__brand-copy > p:last-child { margin-top: 3px; font-size: 11px; }
    .ra-sebra__actions { position: static; align-items: center; justify-content: flex-end; }
    .ra-sebra__brand { padding-right: 0; }
    .ra-sebra__action { min-height: 36px; padding: 6px 8px; font-size: 11px; }
    .ra-sebra__level-tabs { gap: 5px; }
    .ra-sebra__level-tab { min-height: 51px; padding: 6px 3px; border-radius: 9px; }
    .ra-sebra__level-tab span { font-size: 10px; }
    .ra-sebra__level-tab small { font-size: 9px; }
    .ra-sebra__range-area > p { margin-bottom: 6px; font-size: 10px; }
    .ra-sebra__range-buttons { gap: 5px; }
    .ra-sebra__range-button { min-height: 36px; padding: 5px 1px; font-size: 11px; border-radius: 8px; }
    .ra-sebra__main { padding: 11px 9px 14px; }
    .ra-sebra__controls { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 11px; }
    .ra-sebra__search input { min-height: 43px; font-size: 16px; }
    .ra-sebra__show-all { font-size: 11px; }
    .ra-sebra__word-grid { gap: 7px; }
    .ra-sebra__word-card { padding: 9px 9px; border-radius: 10px; }
    .ra-sebra__word-title { font-size: 15px; }
    .ra-sebra__serial { font-size: 9px; }
    .ra-sebra__icon-button { width: 30px; height: 30px; }
    .ra-sebra__meaning { font-size: 11px; }
    .ra-sebra__example { font-size: 12px; }
    .ra-sebra__example-bn { font-size: 10px; }
    .ra-sebra__breakdown { font-size: 9px; }
    .ra-sebra__quiz-head { padding: 10px; }
    .ra-sebra__quiz-head h3 { font-size: 13px; }
    .ra-sebra__question { padding: 10px; }
    .ra-sebra__question h4 { font-size: 15px; }
    .ra-sebra__option { min-height: 44px; padding: 10px; font-size: 12px; }
}
@media (max-width: 370px) {
    .ra-sebra__brand { padding-right: 0; }
    .ra-sebra__actions { gap: 4px; }
    .ra-sebra__action { padding: 6px; font-size: 10px; }
    .ra-sebra__brand h2 { font-size: 18px; }
    .ra-sebra__level-tab span { font-size: 9px; }
    .ra-sebra__word-card { padding: 8px; }
    .ra-sebra__word-title { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .ra-sebra-app *, .ra-sebra-app *::before, .ra-sebra-app *::after {
        animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important;
    }
}