/* ================================================================
   integers-lift-add.css
   ----------------------------------------------------------------
   Styles for "Moving in the lift: Start + Movement = Target
   (Addition)" (Tier 2) in Topic 8, "The Other Side of Zero
   (Integers)", on the Class 6 Math page:

     - A.1  Where Will I Reach?        (lift scene, Start + Move = Target)
     - A.2  Lift Addition Practice     (same-sign, mixed, zero, swapped)
     - A.3  Reaching a Fixed Floor     (which press reaches the target?)
     - A.4  Combining Button Presses   (Movement 1 + Movement 2)
     - A.5  Three Presses in a Row     (chains of movements)
     - A.6  Reading the Brackets       ((+2)+(-3) = start +2, move -3)

   Same shared popup shell as meet-tools / circle-pi (quiz-overlay /
   quiz-modal). This file only styles the pictures and the answer
   chips. Fully self-contained: every class starts with "la-" and
   every popup id starts with "lift". Site colour variables
   (--primary, --secondary, --line, --sun) are read with fallbacks.

   Finish (kid-friendly, matt + shine): glossy teal (up / positive),
   magenta (down / negative), gold (ground / zero) and violet (lift)
   shapes with a soft shine and a sparkle, on a matt pastel lavender
   "paper" stage. Teal = "+" and magenta = "-" everywhere, so the
   colour itself teaches the sign. High contrast, never harsh.

   Layout notes
   - Answer chips ALWAYS stay on ONE row (flex-wrap: nowrap), 4 chips.
   - Android-native feel: >=52px touch targets, instant :active press,
     no 300ms delay, no grey tap flash, safe-area padding.

     <link rel="stylesheet" th:href="@{/css/integers-lift-add.css}" />
   ================================================================ */

/* ---------- SVG paint ---------- */
.la-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.la-o { stroke: rgba(60, 38, 120, 0.60); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.la-sh { filter: drop-shadow(0 4px 3px rgba(60, 38, 120, 0.25)); }
.la-gloss { fill: #fff; opacity: 0.40; pointer-events: none; }
.la-spark { fill: #fff; opacity: 0.92; pointer-events: none; }
.la-nopt { pointer-events: none; stroke: none; }

.la-t {
    font: 800 22px/1 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    fill: #34205f; text-anchor: middle; dominant-baseline: central;
    stroke: #fff; stroke-width: 5; paint-order: stroke; stroke-linejoin: round;
    pointer-events: none; user-select: none; -webkit-user-select: none;
}
.la-t-lbl { font-size: 24px; }
.la-t-small { font-size: 17px; }
.la-t-white { fill: #fff; stroke: rgba(60, 38, 120, .55); stroke-width: 5; }
.la-t-big { font-size: 46px; }
.la-t-dot { font-size: 12px; stroke: none; fill: #fff; }

/* building: floor badges and shop names */
.la-fl { font: 800 15px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; text-anchor: middle; dominant-baseline: central; stroke: none; pointer-events: none; }
.la-fl-pos { fill: #0b7a68; }
.la-fl-neg { fill: #b0176d; }
.la-fl-zero { fill: #7a5200; }
.la-shop { font: 700 12px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; fill: #34205f; text-anchor: start; dominant-baseline: central; pointer-events: none; user-select: none; -webkit-user-select: none; }
.la-bd-pos { fill: #c9f5ea; stroke: rgba(11, 122, 104, .45); stroke-width: 1.5; }
.la-bd-neg { fill: #ffd9ec; stroke: rgba(176, 23, 109, .45); stroke-width: 1.5; }
.la-bd-zero { fill: #ffe9a8; stroke: rgba(122, 82, 0, .5); stroke-width: 1.5; }
.la-sep { stroke: #dccdfc; stroke-width: 1.5; }
.la-ground { stroke: #e09b00; stroke-width: 3.5; stroke-linecap: round; }
.la-shaft { fill: #e4d8ff; opacity: .8; }
.la-hi { transition: opacity .35s ease; }

/* arrows, legs and the connector */
.la-arrow-u { stroke: #fff; }
.la-leg-u { fill: none; stroke: #fff; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.la-leg { fill: none; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
.la-conn { stroke: #7c4dff; stroke-width: 2.5; stroke-dasharray: 2 5; stroke-linecap: round; opacity: .55; }

/* lift car */
.la-car-body { stroke: rgba(60, 38, 120, .6); stroke-width: 2.5; }
.la-car-door { fill: #f6f1ff; fill-opacity: .92; stroke: rgba(60, 38, 120, .45); stroke-width: 1.8; }
.la-car-split { stroke: rgba(60, 38, 120, .45); stroke-width: 1.8; }

/* unknown marker */
.la-qdash { fill: none; stroke: #10b981; stroke-width: 3; stroke-dasharray: 5 5; }

/* button-tally stages */
.la-opsign { font: 800 44px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; fill: #7c4dff; text-anchor: middle; dominant-baseline: central; stroke: #fff; stroke-width: 6; paint-order: stroke; pointer-events: none; }
.la-btn-sign { font: 800 38px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; fill: #fff; text-anchor: middle; dominant-baseline: central; stroke: rgba(60, 38, 120, .5); stroke-width: 4; paint-order: stroke; pointer-events: none; }
.la-btn-sub { font: 800 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; fill: #34205f; text-anchor: middle; dominant-baseline: central; stroke: #fff; stroke-width: 4; paint-order: stroke; pointer-events: none; }

/* mini column pictures (answer chips) */
.la-mini-line { stroke: #c9b8f7; stroke-width: 3; stroke-linecap: round; }
.la-mini-tick { stroke: #bba6f2; stroke-width: 3.5; stroke-linecap: round; }
.la-mini-zero { stroke: #e09b00; stroke-width: 9; stroke-linecap: round; }

/* ---------- picture card ---------- */
.quiz-overlay[id^="lift"] .quiz-modal { --la-fig: 270px; }
.quiz-overlay[id^="lift"] .quiz-question b { color: var(--secondary, #4b3f8f); }
.quiz-overlay[id^="lift"] .bq-btn,
.quiz-overlay[id^="lift"] .bq-next-btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.quiz-overlay[id^="lift"] .bq-next-btn { margin-bottom: env(safe-area-inset-bottom, 0px); }
.quiz-overlay[id^="lift"] .bq-summary-buttons { margin-bottom: env(safe-area-inset-bottom, 0px); }
.quiz-overlay[id^="lift"] .quiz-modal { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

.la-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 8px auto 0; width: 100%; }
.la-stage {
    position: relative;
    width: var(--la-fig);
    box-sizing: border-box;
    padding: 6px;
    border-radius: 20px;
    background:
        radial-gradient(120% 90% at 25% 10%, rgba(255, 255, 255, .92), rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, #f7f2ff 0%, #ece3ff 100%);
    border: 2px solid var(--line, #ddd2fb);
    box-shadow: 0 3px 0 rgba(75, 63, 143, 0.08), inset 0 0 22px rgba(167, 139, 250, .16);
}
.la-stage.la-tall { aspect-ratio: 5 / 6; }
.la-stage.la-wide { width: min(100%, calc(var(--la-fig) * 1.7)); aspect-ratio: 2 / 1; }
.la-stage > svg { width: 100%; height: 100%; }
.la-hint { margin: 0; text-align: center; font-size: 13px; font-weight: 700; color: #7a71a8; line-height: 1.35; max-width: 360px; }
.la-hint b { color: var(--secondary, #4b3f8f); }
.la-replay {
    min-height: 44px; padding: 8px 20px; border: 2px solid var(--primary, #6c5ce7); border-radius: 999px;
    background: #fff; color: var(--primary, #6c5ce7); font: inherit; font-weight: 800; font-size: 15px;
    box-shadow: 0 3px 0 rgba(108, 92, 231, 0.20); cursor: pointer;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
    transition: transform .08s ease, box-shadow .15s;
}
.la-replay:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(108, 92, 231, 0.20); }

/* ---------- the number sentence: [Start] + [Move] = [Target] ---------- */
.la-eq {
    display: flex; flex-wrap: nowrap; align-items: flex-start; justify-content: center;
    gap: 4px; width: 100%; max-width: 420px; margin: 0 auto;
}
.la-eqc { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.la-eqc small { font-size: 10.5px; font-weight: 800; line-height: 1.1; color: #7a71a8; text-align: center; max-width: 74px; }
.la-eqb {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 50px; min-height: 40px; padding: 4px 8px; box-sizing: border-box;
    border-radius: 12px; border: 2.5px solid #cdbdf6; background: #fff;
    font-weight: 800; font-size: 19px; line-height: 1; color: #34205f; white-space: nowrap;
    box-shadow: 0 2px 0 rgba(75, 63, 143, .10);
}
.la-eqb.la-r-start { border-color: #34c79a; background: #e6fbf3; }
.la-eqb.la-r-move  { border-color: #9a7cff; background: #f1ebff; }
.la-eqb.la-r-target { border-color: #f0b429; background: #fff6d6; }
.la-eqb.la-pos { color: #0b7a68; }
.la-eqb.la-neg { color: #b0176d; }
.la-eqb.la-q { border-style: dashed; color: #7c4dff; background: #fff; }
.la-eqb.la-hl { box-shadow: 0 0 0 4px rgba(124, 77, 255, .25), 0 2px 0 rgba(75, 63, 143, .10); transform: scale(1.06); }
.la-eqo { align-self: flex-start; display: inline-flex; align-items: center; min-height: 40px; font-weight: 800; font-size: 22px; color: #7c4dff; padding: 0 1px; }

.la-eq-long { gap: 2px; }
.la-eq-long .la-eqb { min-width: 34px; min-height: 34px; font-size: 15px; padding: 3px 4px; border-width: 2px; }
.la-eq-long .la-eqo { min-height: 34px; font-size: 17px; }

/* ================================================================
   Answer chips: ALWAYS a single line (4 chips)
   ================================================================ */
.quiz-number-options.la-picker {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 480px;
    margin: 16px auto 4px;
}
.quiz-number-options.la-picker:empty { display: none; }
.quiz-number-opt.la-opt {
    display: inline-flex;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: auto !important;
    min-height: 54px !important;
    max-height: none !important;
    box-sizing: border-box !important;
    padding: 10px 5px;
    white-space: normal !important;
    overflow: hidden;
    overflow-wrap: break-word;
    font-weight: 800;
    font-size: 15.5px;
    line-height: 1.2;
    text-align: center;
    color: var(--secondary, #4b3f8f);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    transition: transform .08s ease, box-shadow .15s, border-color .15s, background .15s;
}
.quiz-number-opt.la-opt.la-num { font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.quiz-number-opt.la-opt.la-num.la-pos { color: #0b7a68; }
.quiz-number-opt.la-opt.la-num.la-neg { color: #b0176d; }
.quiz-number-opt.la-opt.la-pair { font-size: 17px; line-height: 1.15; }
.quiz-number-opt.la-opt.la-eqchip { font-size: 14px; line-height: 1.2; }
.quiz-number-opt.la-opt:active:not(:disabled) { transform: scale(.96); background: rgba(124, 77, 255, 0.10); }
@media (hover: hover) {
    .quiz-number-opt.la-opt:hover:not(:disabled) { border-color: var(--primary, #6c5ce7); }
}
.quiz-number-opt.la-opt.is-correct { border-color: #10b981; background: rgba(16, 185, 129, 0.08); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
.quiz-number-opt.la-opt.is-wrong { border-color: #ef4444; background: rgba(239, 68, 68, 0.08); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18); }
.quiz-number-opt.la-opt.has-thumb { padding: 6px 4px 8px; }
.la-opt-thumb { display: block; width: 100%; max-width: 78px; aspect-ratio: 1 / 1; }
.la-opt-letter { font-size: 13px; font-weight: 800; opacity: .85; }

/* ================================================================
   Responsive (phones): shrink the drawings and chips only
   ================================================================ */
@media (max-width: 560px) {
    .quiz-overlay[id^="lift"] .quiz-modal { --la-fig: 250px; }
    .quiz-number-options.la-picker { gap: 8px; margin-top: 14px; }
    .quiz-number-opt.la-opt { font-size: 12.5px; padding: 8px 3px; min-height: 52px !important; letter-spacing: -0.1px; }
    .quiz-number-opt.la-opt.la-num { font-size: 20px; }
    .quiz-number-opt.la-opt.la-pair { font-size: 14px; }
    .quiz-number-opt.la-opt.la-eqchip { font-size: 11.5px; }
    .la-opt-thumb { max-width: 68px; }
    .la-eqb { min-width: 44px; min-height: 36px; font-size: 17px; padding: 4px 6px; }
    .la-eqo { min-height: 36px; font-size: 20px; }
    .la-eqc small { font-size: 10px; max-width: 64px; }
    .la-eq-long .la-eqb { min-width: 28px; min-height: 30px; font-size: 13px; padding: 2px 3px; }
    .la-eq-long .la-eqo { min-height: 30px; font-size: 15px; }
}
@media (max-width: 380px) {
    .quiz-overlay[id^="lift"] .quiz-modal { --la-fig: 222px; }
    .quiz-number-opt.la-opt { font-size: 11.5px; padding: 7px 2px; }
    .quiz-number-opt.la-opt.la-num { font-size: 18px; }
    .quiz-number-opt.la-opt.la-pair { font-size: 12.5px; }
    .quiz-number-opt.la-opt.la-eqchip { font-size: 10.5px; }
    .quiz-number-opt.la-opt.has-thumb { padding: 5px 2px 6px; }
    .quiz-number-options.la-picker { gap: 6px; }
    .la-opt-thumb { max-width: 58px; }
    .la-hint { font-size: 12.5px; }
    .la-eqb { min-width: 38px; font-size: 15px; padding: 4px 4px; }
    .la-eqo { font-size: 18px; }
    .la-eq-long .la-eqb { min-width: 26px; font-size: 12px; padding: 2px 2px; }
    .la-eq-long .la-eqo { font-size: 13px; }
}
@media (pointer: coarse) {
    .quiz-number-opt.la-opt { min-height: 56px !important; }
}
@media (max-height: 560px) and (orientation: landscape) {
    .quiz-overlay[id^="lift"] .quiz-modal { --la-fig: 170px; }
}
@media (prefers-reduced-motion: reduce) {
    .quiz-number-opt.la-opt, .la-replay, .la-hi { transition: none; }
}