/* ═══════════════════════════════════════════════════════════════════
   Module activities (assets/js/activities.js)
   One shell (.ocjs-act) + one block per activity type. Brand colour via
   --ocjs-primary (school branding overrides it); feedback colours are
   semantic (green right, red wrong, slate info).
   ═══════════════════════════════════════════════════════════════════ */

.ocjs-act {
    --act-ink: #0f172a;
    --act-body: #475569;
    --act-muted: #94a3b8;
    --act-line: #e2e8f0;
    --act-soft: #f8fafc;
    --act-brand: var(--ocjs-primary, #E62538);
    --act-good: #16a34a;
    --act-good-bg: #f0fdf4;
    --act-good-line: #bbf7d0;
    --act-bad: #dc2626;
    --act-bad-bg: #fef2f2;
    --act-bad-line: #fecaca;
    margin: 24px 0;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--act-line);
    border-radius: 14px;
    box-shadow: 0 10px 30px -22px rgba(15, 23, 42, .35);
    color: var(--act-body);
    font-size: 15px;
    line-height: 1.5;
}

.ocjs-act *,
.ocjs-act *::before,
.ocjs-act *::after { box-sizing: border-box; }

.ocjs-act button { font: inherit; }

/* Components set display:flex/grid; the hidden attribute must still win. */
.ocjs-act [hidden] { display: none !important; }

/* ── Shell ─────────────────────────────────────────────────────────── */
.ocjs-act__head { margin-bottom: 14px; }

.ocjs-act__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 4px 8px;
    border-radius: 10px;
    background: #fdecee;
    color: var(--act-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.ocjs-act__chip .dashicons { width: 16px; height: 16px; font-size: 16px; }

.ocjs-act .ocjs-act__title {
    margin: 0 0 4px;
    color: var(--act-ink);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
}
.ocjs-act .ocjs-act__intro { margin: 0; color: var(--act-body); }

.ocjs-act__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.ocjs-act .ocjs-act__hint { margin: 0; color: var(--act-muted); font-size: 14px; }
.ocjs-act__progress {
    flex: none;
    margin-left: auto;
    padding: 3px 10px;
    border-radius: 10px;
    background: var(--act-soft);
    border: 1px solid var(--act-line);
    color: var(--act-ink);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Explanation after each move: icon + bold verdict + the explanation. */
.ocjs-act__feedback {
    --fb-accent: #2563eb;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 18px;
    padding: 16px 18px;
    border: 1.5px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e3a8a;
    box-shadow: 0 10px 26px -18px rgba(15, 23, 42, .45);
    font-size: 15.5px;
    line-height: 1.55;
}
.ocjs-act__feedback.is-good { --fb-accent: var(--act-good); border-color: #86efac; background: var(--act-good-bg); color: #14532d; }
.ocjs-act__feedback.is-bad  { --fb-accent: var(--act-bad);  border-color: #fca5a5; background: var(--act-bad-bg);  color: #7f1d1d; }

.ocjs-act__fb-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--fb-accent);
    color: #fff;
    font-size: 22px;
}
.ocjs-act__fb-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 4px; }
.ocjs-act__fb-title { font-size: 17px; font-weight: 800; line-height: 1.3; }
.ocjs-act__fb-text { font-weight: 500; }

.ocjs-act__feedback.is-pop { animation: ocjs-act-fb-in .35s ease; }
@keyframes ocjs-act-fb-in {
    from { opacity: 0; transform: translateY(6px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
    .ocjs-act__feedback { gap: 10px; padding: 14px; font-size: 15px; }
    .ocjs-act__fb-icon { width: 28px; height: 28px; font-size: 19px; }
    .ocjs-act__fb-title { font-size: 16px; }
}

.ocjs-act__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding: 10px 22px;
    border: 0;
    border-radius: 10px;
    background: var(--act-brand);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: filter .15s ease, transform .15s ease;
}
.ocjs-act__btn:hover { filter: brightness(.94); }
.ocjs-act__btn:active { transform: scale(.98); }
.ocjs-act__btn:disabled { opacity: .45; cursor: not-allowed; }
.ocjs-act__btn--ghost {
    margin-top: 0;
    padding: 7px 16px;
    background: #fff;
    color: var(--act-brand);
    border: 1px solid currentColor;
}

.ocjs-act__done {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    background: var(--act-good-bg);
    border: 1px solid var(--act-good-line);
}
.ocjs-act__done-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--act-good);
    color: #fff;
    font-size: 26px;
}
.ocjs-act__done-text { display: flex; flex-direction: column; color: #14532d; font-size: 14px; }
.ocjs-act__done-text strong { font-size: 16px; }
.ocjs-act__done .ocjs-act__btn--ghost { margin-left: auto; }

/* Shared card + chip */
.ocjs-act__item { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.ocjs-act__item-img { display: block; max-width: 100%; max-height: 120px; object-fit: contain; border-radius: 10px; }
.ocjs-act__item-text { text-align: center; }

.ocjs-act-card,
.ocjs-act-chip {
    position: relative;
    padding: 12px 14px;
    border: 1.5px solid var(--act-line);
    border-radius: 10px;
    background: #fff;
    color: var(--act-ink);
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease, transform .15s ease;
}
.ocjs-act-chip { padding: 8px 14px; border-radius: 10px; font-size: 14px; }
.ocjs-act-card:hover:not(:disabled),
.ocjs-act-chip:hover:not(:disabled) { border-color: #cbd5e1; transform: translateY(-1px); }
.ocjs-act-card.is-picked,
.ocjs-act-chip.is-picked {
    border-color: var(--act-brand);
    box-shadow: 0 0 0 3px rgba(230, 37, 56, .15);
    background: #fff7f8;
}
.ocjs-act-card:disabled,
.ocjs-act-chip:disabled { cursor: default; }
.ocjs-act-chip.is-used { opacity: .35; text-decoration: line-through; }

.has-picked .ocjs-act-card--target:not(:disabled),
.has-picked .ocjs-act-pin:not(:disabled),
.has-picked .ocjs-act-sort__zone { outline: 2px dashed rgba(230, 37, 56, .35); outline-offset: 2px; }
.is-drop-over { background: #fff7f8 !important; border-color: var(--act-brand) !important; }

.is-shake { animation: ocjs-act-shake .45s ease; }
@keyframes ocjs-act-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.ocjs-act-bank { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }

/* ── 1 & 2. Picture stage (hotspot, label) ─────────────────────────── */
.ocjs-act-stage {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: var(--act-soft);
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
}
.ocjs-act-stage__img { display: block; width: 100%; height: auto; }

.ocjs-act-mark {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
/* Hotspot: circles and their bubbles may reach past the picture's edge. */
.ocjs-act-stage--hotspot { overflow: visible; background: none; }
.ocjs-act-stage--hotspot .ocjs-act-stage__img { border-radius: 10px; }

.ocjs-act-bubble {
    --bubble-line: #86efac;
    position: absolute;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: max-content;
    max-width: min(340px, 92%);
    padding: 12px 15px;
    border: 1.5px solid var(--bubble-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 32px -14px rgba(15, 23, 42, .5);
    color: #14532d;
    font-size: 14px;
    line-height: 1.5;
    cursor: default;
}
.ocjs-act-bubble.is-bad { --bubble-line: #fca5a5; color: #7f1d1d; }
.ocjs-act-bubble__title { font-size: 15px; font-weight: 800; }
.ocjs-act-bubble__text { color: var(--act-body); font-weight: 500; }
.ocjs-act-bubble::after {
    content: "";
    position: absolute;
    left: var(--arrow-x, 50%);
    width: 12px;
    height: 12px;
    margin-left: -6px;
    background: #fff;
    border: 1.5px solid var(--bubble-line);
    transform: rotate(45deg);
}
.ocjs-act-bubble.is-above::after { bottom: -7px; border-top: 0; border-left: 0; }
.ocjs-act-bubble.is-below::after { top: -7px; border-bottom: 0; border-right: 0; }
.ocjs-act-bubble.is-pop { animation: ocjs-act-fb-in .25s ease; }

.ocjs-act-mark--hit {
    pointer-events: auto;
    cursor: help;
    aspect-ratio: 1;
    border: 3px solid var(--act-good);
    border-radius: 50%;
    background: rgba(22, 163, 74, .15);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .7);
    animation: ocjs-act-pop .35s ease;
}
.ocjs-act-mark__num {
    position: absolute;
    top: -10px;
    right: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--act-good);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.ocjs-act-mark--miss {
    color: var(--act-bad);
    font-size: 26px;
    font-weight: 800;
    text-shadow: 0 0 4px #fff, 0 0 8px #fff;
    animation: ocjs-act-fade .9s ease forwards;
}
@keyframes ocjs-act-pop { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } }
@keyframes ocjs-act-fade { 70% { opacity: 1; } to { opacity: 0; } }

.ocjs-act-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.ocjs-act-pin__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--act-brand);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .35);
}
.ocjs-act-pin__tag:empty { display: none; }
.ocjs-act-pin__tag {
    padding: 3px 10px;
    border-radius: 10px;
    background: var(--act-good);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .3);
}
.ocjs-act-pin.is-done .ocjs-act-pin__num { background: var(--act-good); }

/* ── 3. Match ──────────────────────────────────────────────────────── */
.ocjs-act-match { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ocjs-act-match__col { display: flex; flex-direction: column; gap: 10px; }
.ocjs-act-card.is-matched { cursor: default; }
.ocjs-act-card.is-c1 { border-color: #16a34a; background: #f0fdf4; }
.ocjs-act-card.is-c2 { border-color: #2563eb; background: #eff6ff; }
.ocjs-act-card.is-c3 { border-color: #9333ea; background: #faf5ff; }
.ocjs-act-card.is-c4 { border-color: #d97706; background: #fffbeb; }
.ocjs-act-card.is-c5 { border-color: #0891b2; background: #ecfeff; }
.ocjs-act-card.is-c0 { border-color: #db2777; background: #fdf2f8; }

/* Picture mode: tile grid of pictures, names as chips underneath. */
.ocjs-act-match--pictures { grid-template-columns: 1fr; gap: 18px; }
.ocjs-act-match--pictures .ocjs-act-match__col:first-child {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
}
.ocjs-act-match--pictures .ocjs-act-match__col:first-child .ocjs-act-card { padding: 12px 8px; }
.ocjs-act-match--pictures .ocjs-act__item-img { max-height: 64px; }
.ocjs-act-match--pictures .ocjs-act-match__col:last-child { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.ocjs-act-match--pictures .ocjs-act-match__col:last-child .ocjs-act-card { padding: 8px 14px; border-radius: 10px; font-size: 14px; }
/* Matched: the name moves under its picture, so drop the chip and keep one calm colour. */
.ocjs-act-match--pictures .ocjs-act-card--target.is-matched { display: none; }
.ocjs-act-match--pictures .ocjs-act-card.is-matched { border-color: var(--act-good-line); background: var(--act-good-bg); }
.ocjs-act-card__got { display: block; margin-top: 8px; font-size: 12px; font-weight: 700; line-height: 1.3; color: #166534; text-align: center; }

/* ── 4. Sequence ───────────────────────────────────────────────────── */
.ocjs-act-seq { margin: 0; padding: 0; list-style: none; counter-reset: seq; }
.ocjs-act-seq__item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1.5px solid var(--act-line);
    border-radius: 10px;
    background: #fff;
    color: var(--act-ink);
    font-weight: 600;
    cursor: grab;
    counter-increment: seq;
    transition: border-color .15s ease, background-color .15s ease;
}
.ocjs-act-seq__item::before {
    content: counter(seq);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--act-soft);
    border: 1px solid var(--act-line);
    font-size: 13px;
    font-weight: 800;
}
.ocjs-act-seq__item .ocjs-act__item { flex-direction: row; justify-content: flex-start; }
.ocjs-act-seq__item .ocjs-act__item-img { max-height: 56px; }
.ocjs-act-seq__item .ocjs-act__item-text { text-align: left; }
.ocjs-act-seq__grip { order: 9; color: var(--act-muted); }
.ocjs-act-seq__ctrls { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.ocjs-act .ocjs-act-seq__move {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--act-line);
    border-radius: 10px;
    background: var(--act-soft);
    color: var(--act-body);
    line-height: 1;
    cursor: pointer;
}
.ocjs-act-seq__move .dashicons { width: 18px; height: 18px; font-size: 18px; line-height: 1; }
.ocjs-act-seq__move:hover { border-color: #cbd5e1; color: var(--act-ink); }
.ocjs-act-seq__item.is-dragging { opacity: .45; }
.ocjs-act-seq__item.is-right { border-color: var(--act-good); background: var(--act-good-bg); }
.ocjs-act-seq__item.is-right::before { background: var(--act-good); border-color: var(--act-good); color: #fff; }
.ocjs-act-seq__item.is-wrong { border-color: #f59e0b; background: #fffbeb; }
.ocjs-act-seq.is-locked .ocjs-act-seq__item { cursor: default; }
.ocjs-act-seq.is-locked .ocjs-act-seq__ctrls,
.ocjs-act-seq.is-locked .ocjs-act-seq__grip { display: none; }

/* ── 5. Sort ───────────────────────────────────────────────────────── */
.ocjs-act-sort {
    display: grid;
    grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
    gap: 12px;
}
.ocjs-act-sort__zone {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 150px;
    padding: 12px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: var(--act-soft);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.ocjs-act-sort__name { color: var(--act-ink); font-weight: 800; text-align: center; }
.ocjs-act-sort__list { display: flex; flex-direction: column; gap: 6px; }
.ocjs-act-card--small { padding: 8px 10px; font-size: 14px; }
.ocjs-act-card--small .ocjs-act__item-img { max-height: 64px; }
.ocjs-act-card.is-placed { border-color: var(--act-good-line); background: var(--act-good-bg); cursor: default; }

/* ── 6. Scenario ───────────────────────────────────────────────────── */
.ocjs-act-scn__img { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; margin-bottom: 14px; }
.ocjs-act .ocjs-act-scn__text { margin: 0 0 14px; color: var(--act-ink); font-size: 17px; font-weight: 600; }
.ocjs-act-scn__choices { display: flex; flex-direction: column; gap: 10px; }
.ocjs-act-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--act-line);
    border-radius: 10px;
    background: #fff;
    color: var(--act-ink);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.ocjs-act-choice:hover:not(:disabled) { border-color: #cbd5e1; background: var(--act-soft); }
.ocjs-act-choice__key {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--act-soft);
    border: 1px solid var(--act-line);
    font-weight: 800;
}
.ocjs-act-choice.is-right { border-color: var(--act-good); background: var(--act-good-bg); }
.ocjs-act-choice.is-right .ocjs-act-choice__key { background: var(--act-good); border-color: var(--act-good); color: #fff; }
.ocjs-act-choice.is-wrong { border-color: var(--act-bad-line); background: var(--act-bad-bg); opacity: .8; }
.ocjs-act-choice.is-wrong .ocjs-act-choice__key { background: var(--act-bad); border-color: var(--act-bad); color: #fff; }
.ocjs-act-choice:disabled { cursor: default; }

/* ── 7. Estimate ───────────────────────────────────────────────────── */
.ocjs-act .ocjs-act-est__q { margin: 0 0 16px; color: var(--act-ink); font-size: 17px; font-weight: 600; }
.ocjs-act-est__value {
    display: block;
    margin-bottom: 6px;
    color: var(--act-brand);
    font-size: 30px;
    font-weight: 800;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.ocjs-act-est__range { width: 100%; accent-color: var(--act-brand); }
.ocjs-act-est__scale { display: flex; justify-content: space-between; color: var(--act-muted); font-size: 12px; }
.ocjs-act-est__reveal { margin-top: 28px; padding: 0 8px; }
.ocjs-act-est__track { position: relative; height: 8px; margin: 34px 0 30px; border-radius: 10px; background: var(--act-line); }
.ocjs-act-est__pin { position: absolute; top: 50%; width: 16px; height: 16px; border: 3px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(15, 23, 42, .35); }
.ocjs-act-est__pin span { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; }
.ocjs-act-est__pin--guess { background: #64748b; }
.ocjs-act-est__pin--guess span { bottom: 18px; color: #475569; }
.ocjs-act-est__pin--real { background: var(--act-good); }
.ocjs-act-est__pin--real span { top: 18px; color: var(--act-good); }

/* ── 8. Myth or fact ───────────────────────────────────────────────── */
.ocjs-act-myth {
    padding: 26px 22px;
    border: 1.5px solid var(--act-line);
    border-radius: 14px;
    background: linear-gradient(160deg, #fff 60%, var(--act-soft));
    text-align: center;
    transition: border-color .2s ease, background-color .2s ease;
}
.ocjs-act .ocjs-act-myth__text { margin: 0 0 20px; color: var(--act-ink); font-size: 19px; font-weight: 700; }
.ocjs-act-myth__btns { display: flex; justify-content: center; gap: 12px; }
.ocjs-act-myth__btn {
    min-width: 120px;
    padding: 12px 22px;
    border: 2px solid var(--act-line);
    border-radius: 10px;
    background: #fff;
    color: var(--act-ink);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}
.ocjs-act-myth__btn--myth:hover:not(:disabled) { border-color: #f59e0b; color: #b45309; }
.ocjs-act-myth__btn--fact:hover:not(:disabled) { border-color: #2563eb; color: #1d4ed8; }
.ocjs-act-myth__btn.is-right { border-color: var(--act-good); background: var(--act-good); color: #fff; }
.ocjs-act-myth__btn.is-wrong { border-color: var(--act-bad); background: var(--act-bad); color: #fff; }
.ocjs-act-myth.is-right { border-color: var(--act-good-line); }
.ocjs-act-myth.is-wrong { border-color: var(--act-bad-line); }

/* ── 9. Think and write ────────────────────────────────────────────── */
.ocjs-act .ocjs-act-refl__q { margin: 0 0 12px; color: var(--act-ink); font-size: 17px; font-weight: 600; }
.ocjs-act-refl__input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--act-line);
    border-radius: 10px;
    font: inherit;
    color: var(--act-ink);
    resize: vertical;
}
.ocjs-act-refl__input:focus { outline: none; border-color: var(--act-brand); box-shadow: 0 0 0 3px rgba(230, 37, 56, .12); }
.ocjs-act-refl__meta { display: flex; align-items: center; gap: 12px; }
.ocjs-act-refl__meta .ocjs-act__btn { margin-left: auto; }
.ocjs-act-refl__count { margin-top: 16px; color: var(--act-muted); font-size: 13px; }
.ocjs-act-refl__model { margin-top: 16px; padding: 14px 16px; border: 1.5px solid #86efac; border-radius: 10px; background: var(--act-good-bg); }
.ocjs-act-refl__model strong { color: #14532d; }
.ocjs-act .ocjs-act-refl__model p { margin: 6px 0 0; color: var(--act-ink); }

/* ── 10. Catch the moment (video) ─────────────────────────────────────────── */
.ocjs-act-mo__stage { position: relative; overflow: hidden; border-radius: 10px; background: #0f172a; aspect-ratio: 16 / 9; cursor: pointer; }
.ocjs-act-mo__video { display: block; width: 100%; height: 100%; object-fit: contain; }
.ocjs-act-mo__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    background: rgba(15, 23, 42, .55);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}
.ocjs-act-mo__overlay[hidden] { display: none; }
.ocjs-act-mo__overlay .dashicons {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--act-brand);
    font-size: 34px;
}
.ocjs-act-mo__flags { position: absolute; inset: 0; pointer-events: none; }
.ocjs-act-mo__pulse {
    position: absolute;
    inset: 0;
    border: 6px solid rgba(250, 204, 21, .9);
    border-radius: 10px;
    animation: ocjs-act-fade .7s ease forwards;
}
.ocjs-act-mo__timeline { position: relative; height: 10px; margin: 12px 0; border-radius: 10px; background: var(--act-line); overflow: visible; }
.ocjs-act-mo__played { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 10px; background: #94a3b8; }
.ocjs-act-mo__flag { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: #facc15; box-shadow: 0 0 0 1px #a16207; }
.ocjs-act-mo__window { position: absolute; top: 0; bottom: 0; border-radius: 10px; background: rgba(22, 163, 74, .45); }
.ocjs-act-mo__btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: 0;
    border-radius: 10px;
    background: #facc15;
    color: #422006;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .1s ease, filter .15s ease;
}
.ocjs-act-mo__btn:disabled { opacity: .4; cursor: not-allowed; }
.ocjs-act-mo__btn.is-hit { transform: scale(.97); filter: brightness(.9); }
.ocjs-act-mo__results { margin-top: 16px; }
.ocjs-act-mo__results-title { color: var(--act-ink); font-size: 16px; }
.ocjs-act-mo__list { margin: 10px 0 0; padding: 0; list-style: none; }
.ocjs-act-mo__list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    margin-bottom: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--act-line);
}
.ocjs-act-mo__list li.is-right { border-color: var(--act-good-line); background: var(--act-good-bg); }
.ocjs-act-mo__list li.is-wrong { border-color: var(--act-bad-line); background: var(--act-bad-bg); }
.ocjs-act-mo__name { color: var(--act-ink); font-weight: 700; }
.ocjs-act-mo__pts { font-weight: 800; }
.ocjs-act-mo__fb { grid-column: 1 / -1; font-size: 14px; }
.ocjs-act .ocjs-act-mo__total { margin: 6px 0 0; color: var(--act-ink); font-weight: 800; }

/* ── Mobile ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ocjs-act { padding: 16px; border-radius: 10px; }
    .ocjs-act .ocjs-act__title { font-size: 18px; }
    .ocjs-act__bar { flex-wrap: wrap; }
    .ocjs-act-match { gap: 8px; }
    .ocjs-act-match--pictures .ocjs-act-match__col:first-child { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
    .ocjs-act-card { padding: 10px; font-size: 14px; }
    .ocjs-act-sort { grid-template-columns: 1fr; }
    .ocjs-act-myth__btn { min-width: 0; flex: 1; }
    .ocjs-act-pin__num { width: 26px; height: 26px; font-size: 12px; }
    .ocjs-act__done { flex-wrap: wrap; }
    .ocjs-act__done .ocjs-act__btn--ghost { margin-left: 54px; }
}

@media (prefers-reduced-motion: reduce) {
    .ocjs-act *,
    .ocjs-act *::before { animation: none !important; transition: none !important; }
}

/* Saving / error status (shares the done area) */
.ocjs-act__done--status { background: var(--act-soft); border-color: var(--act-line); color: var(--act-body); font-size: 14px; }
.ocjs-act__done--status.is-error { background: var(--act-bad-bg); border-color: var(--act-bad-line); color: #7f1d1d; }
.ocjs-act__done--status .ocjs-act__btn--ghost { margin-left: auto; }

/* Keyboard focus */
.ocjs-act button:focus-visible,
.ocjs-act [role="button"]:focus-visible,
.ocjs-act input:focus-visible {
    outline: 3px solid rgba(230, 37, 56, .4);
    outline-offset: 2px;
}
.ocjs-act button:focus:not(:focus-visible) { outline: none; }

/* ── Course outline: "Activity" badge on activity lessons ─────────── */
.ocjs-sidebar-lesson__act {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
    padding: 2px 8px 2px 5px;
    border-radius: 10px;
    background: #fdecee;
    color: var(--ocjs-primary, #E62538);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}
.ocjs-sidebar-lesson__act .dashicons { width: 14px; height: 14px; font-size: 14px; color: inherit; }
/* Current lesson row is filled with the brand colour: invert the badge. */
.ocjs-sidebar-lesson.is-current .ocjs-sidebar-lesson__act { background: #fff; }
body.ocjs-v2 .ocjs-sidebar-lesson.is-current .ocjs-sidebar-lesson__link .ocjs-sidebar-lesson__act,
body.ocjs-v2 .ocjs-sidebar-lesson.is-current .ocjs-sidebar-lesson__link .ocjs-sidebar-lesson__act .dashicons {
    color: var(--ocjs-primary, #E62538) !important;
}

/* Continue / Next sit under the explanation. */
.ocjs-act__actions:empty { display: none; }
.ocjs-act__actions .ocjs-act__btn { margin-top: 14px; }

/* Acknowledge a selection immediately, before the server grades it. */
.ocjs-act .is-checking {
    outline: 2px solid var(--ocjs-primary, #E62538);
    outline-offset: 2px;
    cursor: progress;
}
.ocjs-act__pending {
    margin-top: 12px;
    color: #63748b;
    font-size: 14px;
}
.ocjs-act__pending[hidden] { display: none; }
