/* class7-math-ch14-common.css - everything the Integers topic (14) popups SHARE.
   Scoped to .c14-overlay (the popup modal keeps the site's quiz-overlay / quiz-modal classes).
   Look: matte pastel cards, soft rims, one calm shadow - no hard glare. Touch first (Android),
   fine on desktop. The 4 answer chips ALWAYS sit on one line. */
.c14-overlay { --c14-ink: #3b3470; --c14-soft: #8f86c9; --c14-line: #ddd3f8; --c14-ok: #2fb27a; --c14-bad: #e8604c;
    --c14-t1: #fffdf6; --c14-t2: #f5f1ff; --c14-svg-max: 46vh; }   /* picture-card tint (top, bottom) and tallest picture; tiers override below */

/* ---------- picture card ---------- */
.c14-overlay .c14-stage {
    margin: 6px auto 12px; max-width: 540px; padding: 8px 8px 4px;
    background: linear-gradient(180deg, var(--c14-t1) 0%, var(--c14-t2) 100%);
    border: 2px solid #e8e1fb; border-radius: 22px;
    box-shadow: inset 0 1px 0 #fff, 0 6px 16px rgba(107, 95, 181, .10);
}
.c14-overlay .c14-svg { display: block; width: 100%; height: auto; max-height: var(--c14-svg-max); overflow: visible; }
.c14-overlay .c14-hint {
    display: flex; align-items: center; gap: 8px; margin: 4px 4px 6px; padding: 6px 10px;
    font: 700 clamp(12px, 3.4vw, 14px)/1.3 Nunito, Poppins, system-ui, sans-serif; color: #6a5fb0;
    background: #f1ecff; border-radius: 12px;
}
.c14-overlay .c14-hint-ico { flex: 0 0 22px; width: 22px; height: 22px; }

/* ---------- svg text + shapes ---------- */
.c14-overlay .c14-t { font-family: Nunito, Poppins, system-ui, sans-serif; font-weight: 800; fill: var(--c14-ink); user-select: none; -webkit-user-select: none; }
.c14-overlay .c14-s { font-size: 12px; font-weight: 700; }
.c14-overlay .c14-m { font-size: 15px; }
.c14-overlay .c14-big { font-size: 28px; }
.c14-overlay .c14-tick { font-size: 13px; font-weight: 800; }
.c14-overlay .c14-pill, .c14-overlay .c14-cell { stroke-width: 2; }
.c14-overlay .c14-arc, .c14-overlay .c14-arr { filter: drop-shadow(0 2px 2px rgba(60, 50, 120, .18)); }
.c14-overlay .c14-pin { filter: drop-shadow(0 2px 2px rgba(60, 50, 120, .25)); }

/* ---------- answer chips: ONE line, always 4 ---------- */
.c14-overlay .quiz-number-options {
    display: flex !important; flex-flow: row nowrap !important; align-items: stretch; justify-content: center;
    gap: clamp(5px, 1.6vw, 10px); width: 100%; margin: 6px 0 4px; padding: 0;
}
.c14-overlay .c14-opt {
    flex: 1 1 0; min-width: 0; min-height: 54px; margin: 0; padding: 6px 3px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    font: 800 clamp(16px, 4.8vw, 22px)/1.1 Nunito, Poppins, system-ui, sans-serif; color: var(--c14-ink);
    white-space: nowrap; overflow: hidden;
    background: linear-gradient(180deg, #fff 0%, #f6f2ff 100%);
    border: 2px solid var(--c14-line); border-radius: 16px; box-shadow: 0 3px 0 var(--c14-line);
    cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.c14-overlay .c14-opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--c14-line); }
.c14-overlay .c14-opt:focus-visible { outline: 3px solid #b9a6ff; outline-offset: 2px; }
.c14-overlay .c14-opt.c14-sm { font-size: clamp(12px, 3.7vw, 16px); white-space: normal; }
.c14-overlay .c14-opt.c14-xs { font-size: clamp(10px, 3.1vw, 13px); white-space: normal; line-height: 1.08; }
.c14-overlay .c14-opt.c14-has-ico { flex-direction: column; gap: 2px; font-size: clamp(11px, 3.4vw, 14px); padding: 6px 2px; }
.c14-overlay .c14-opt-ico svg { width: clamp(26px, 8vw, 38px); height: clamp(26px, 8vw, 38px); display: block; }
.c14-overlay .c14-opt-word { display: block; max-width: 100%; }
.c14-overlay .c14-opt.is-correct { background: linear-gradient(180deg, #e4f9ee, #c9f2dc); border-color: #6adba8; box-shadow: 0 3px 0 #6adba8; color: #17704a; }
.c14-overlay .c14-opt.is-wrong { background: linear-gradient(180deg, #fff0ec, #ffd9d0); border-color: #ff9a82; box-shadow: 0 3px 0 #ff9a82; color: #a8382a; }
.c14-overlay .c14-opt:disabled { cursor: default; }

/* phones: slightly tighter popup so picture + chips fit without scrolling */
@media (max-width: 420px) {
    .c14-overlay .c14-stage { margin: 4px -2px 10px; border-radius: 18px; padding: 6px 4px 2px; }
    .c14-overlay .c14-opt { min-height: 52px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) { .c14-overlay .c14-opt { transition: none; } }
.c14-overlay .c14-tick-sm { font-size: 11.5px; }

/* token pictures as answer chips */
.c14-overlay .c14-opt.c14-pic { padding: 4px 3px; min-height: 64px; }
.c14-overlay .c14-opt-thumb { display: block; width: 100%; }
.c14-overlay .c14-opt-thumb svg { display: block; width: 100%; height: auto; max-height: 70px; }

/* ================================================================
   Tier tints. One line per tier: each popup id starts with its tier prefix (nd = Tier 1 ... adv = Tier 12).
   The pictures that are tall (staircases, elevator, puzzles, grids) get a little more height.
   ================================================================ */
.c14-overlay[id^="nd"]  { --c14-t1: #fffdf6; --c14-t2: #f5f1ff; }                      /* 1  Number Detective      */
.c14-overlay[id^="ndhot"]   { --c14-t1: #fffaf0; --c14-t2: #fff0f0; }                  /*    hot or cold: warm     */
.c14-overlay[id^="ndmagic"] { --c14-t1: #f8f4ff; --c14-t2: #ece6ff; }                  /*    magic trick: violet   */
.c14-overlay[id^="nl"]  { --c14-t1: #fffdf2; --c14-t2: #f3f0ff; }                      /* 2  Number Line (carrom)  */
.c14-overlay[id^="tk"]  { --c14-t1: #fbfffc; --c14-t2: #f1f7ff; }                      /* 3  Tokens                */
.c14-overlay[id^="mb"]  { --c14-t1: #fbf8ff; --c14-t2: #f0ebff; }                      /* 4  Magic Bag             */
.c14-overlay[id^="stp"] { --c14-t1: #fffdf5; --c14-t2: #eef6ff; --c14-svg-max: 52vh; } /* 5  Staircases            */
.c14-overlay[id^="sgn"] { --c14-t1: #fffdf6; --c14-t2: #f6f1ff; }                      /* 6  Sign Rules            */
.c14-overlay[id^="irl"] { --c14-t1: #fffdf6; --c14-t2: #f1f6ff; --c14-svg-max: 50vh; } /* 7  Real Life             */
.c14-overlay[id^="dv"]  { --c14-t1: #fffdf6; --c14-t2: #eef8f3; }                      /* 8  Division              */
.c14-overlay[id^="prp"] { --c14-t1: #fffdf6; --c14-t2: #f4efff; }                      /* 9  Properties            */
.c14-overlay[id^="mch"] { --c14-t1: #f8fbff; --c14-t2: #f1ecff; }                      /* 10 Pattern Machines      */
.c14-overlay[id^="pzl"] { --c14-t1: #fffaf0; --c14-t2: #f3edff; --c14-svg-max: 50vh; } /* 11 Puzzles & Magic       */
.c14-overlay[id^="adv"] { --c14-t1: #fffdf6; --c14-t2: #eef4ff; --c14-svg-max: 52vh; } /* 12 Pro Level             */

/* small touches that used to live in single-tier files */
.c14-overlay .c14-band { filter: drop-shadow(0 2px 3px rgba(150, 120, 60, .18)); }       /* carrom board strip */
.c14-overlay .c14-pairbar { filter: drop-shadow(0 1px 2px rgba(127, 99, 230, .15)); }    /* linked zero pairs  */
.c14-overlay[id^="mb"] .c14-pill { filter: drop-shadow(0 1px 2px rgba(107, 95, 181, .10)); }