/* Vietnam Journey game (scoped: .vxc-journey, .vxj-*) */
.vxc-journey, .vxj-overlay {
    --vxj-primary: #0284c7;
    --vxj-primary-dark: #0369a1;
    --vxj-ok: #16a34a;
    --vxj-ok-soft: #dcfce7;
    --vxj-bad: #dc2626;
    --vxj-bad-soft: #fee2e2;
    --vxj-text: #0f172a;
    --vxj-muted: #64748b;
    --vxj-border: #e2e8f0;
    --vxj-surface: #ffffff;
    --vxj-soft: #f1f5f9;
    --vxj-gold: #f59e0b;
    --vxj-sea: #4fa6d8;
    --vxj-glass: rgba(255, 255, 255, .86);
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--vxj-text);
    -webkit-tap-highlight-color: transparent;
}

.vxc-journey *, .vxj-overlay * { box-sizing: border-box; }

/* ---------- Container: embedded or full screen ---------- */
.vxc-journey {
    position: relative;
    height: min(82vh, 760px);
    max-width: 960px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    background: var(--vxj-sea);
    box-shadow: 0 10px 40px rgba(15, 23, 42, .12);
}
.vxc-journey.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    height: auto;
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}
.vxc-journey:fullscreen { border-radius: 0; height: 100%; max-width: none; }

html.vxj-fs-on, html.vxj-fs-on body { overflow: hidden !important; }
html.vxj-fs-on #vxc-ai-toggle-btn { display: none !important; }

.vxj-noscript { padding: 24px; text-align: center; background: #fff; }

/* ---------- Map (real geography, pan & zoom) ---------- */
.vxj-board {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 38%, #fbfdff 0%, #e8f1f9 55%, #d3e3f1 100%);
    touch-action: manipulation;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}
.vxj-map { display: block; width: 100%; height: 100%; }

.vxj-vn { stroke: #4f7d3c; stroke-width: 1.4; stroke-linejoin: round; }
.vxj-slab-shadow { fill: rgba(30, 58, 95, .14); }
.vxj-cloud { opacity: .9; }
.vxj-river { fill: none; stroke: #4fa9dc; stroke-width: 2.2; stroke-linecap: round; opacity: .9; }

.vxj-road-edge { fill: none; stroke: #a8916a; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.vxj-road { fill: none; stroke: #f1e2bd; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
.vxj-road-dash { fill: none; stroke: #ffffff; stroke-width: 1.2; stroke-dasharray: 4 6; stroke-linecap: round; }
.vxj-road-done { fill: none; stroke: var(--vxj-gold); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.vxj-bridge-rope { fill: none; stroke: #6b4423; stroke-width: 8; stroke-linecap: round; }
.vxj-bridge { fill: none; stroke: #d9a86a; stroke-width: 6; stroke-dasharray: 3 2.5; }
.vxj-ferry-done { fill: none; stroke: var(--vxj-gold); stroke-width: 2.5; stroke-dasharray: 3 2.5; }

.vxj-start-pill { fill: var(--vxj-text); }
.vxj-start-text { fill: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; }

.vxj-node { cursor: pointer; outline: none; }
.vxj-node-emoji { font-size: 34px; }
.vxj-label rect { fill: rgba(255, 255, 255, .96); }
.vxj-label text { font-size: 14px; font-weight: 800; fill: var(--vxj-text); }
.vxj-hint rect { fill: var(--vxj-primary); }
.vxj-hint text { font-size: 11px; font-weight: 800; fill: #fff; }
.vxj-dot-c { stroke-width: 2; fill: #fff; }
.vxj-node.is-done .vxj-dot-c { fill: var(--vxj-ok); }
.vxj-node.is-next .vxj-dot-c { fill: var(--vxj-gold); }
.vxj-node.is-locked .vxj-dot-c { fill: #f8fafc; }
.vxj-node.is-locked { cursor: default; }
.vxj-node.is-locked .vxj-label rect { fill: rgba(255, 255, 255, .8); }
.vxj-node.is-locked .vxj-label text { fill: #64748b; font-weight: 700; }

.vxj-pad { fill: rgba(255, 255, 255, .92); stroke-width: 3; }
.vxj-node.is-next .vxj-pad { fill: #fffbeb; stroke: var(--vxj-gold); stroke-width: 4; }
.vxj-node.is-done .vxj-pad { fill: #f0fdf4; }
.vxj-node.is-locked .vxj-pad { stroke: #cbd5e1; fill: rgba(255, 255, 255, .75); }
.vxj-node.is-locked .vxj-lm { opacity: .6; filter: grayscale(.85); }
.vxj-node.is-next .vxj-lm { animation: vxj-lm-pop 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes vxj-lm-pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.vxj-node:focus-visible .vxj-pad { stroke: #38bdf8; stroke-width: 5; }
.vxj-node-pulse { fill: var(--vxj-gold); transform-box: fill-box; transform-origin: center; animation: vxj-pulse 1.6s ease-out infinite; }
@keyframes vxj-pulse { 0% { transform: scale(.7); opacity: .55; } 100% { transform: scale(1.35); opacity: 0; } }

.vxj-hero { pointer-events: none; }
.vxj-r-shadow { fill: rgba(15, 23, 42, .25); }
.vxj-r-body { animation: vxj-breathe 2.6s ease-in-out infinite; }
.vxj-r-tail { transform-box: fill-box; transform-origin: 100% 0; animation: vxj-tail 1.8s ease-in-out infinite; }
.vxj-r-head { transform-box: fill-box; transform-origin: 0 50%; animation: vxj-nod 3.2s ease-in-out infinite; }
.vxj-r-leg { transform-box: fill-box; transform-origin: 50% 0; }
.vxj-note { font-size: 11px; font-weight: 800; fill: #0369a1; paint-order: stroke; stroke: #fff; stroke-width: 2.5px; animation: vxj-note 2.4s ease-in-out infinite; }
.vxj-note-2 { animation-delay: -1.2s; }
.vxj-hero.is-moving .vxj-r-body { animation: vxj-trot .5s ease-in-out infinite; }
.vxj-hero.is-moving .vxj-r-leg-a { animation: vxj-step .5s ease-in-out infinite; }
.vxj-hero.is-moving .vxj-r-leg-b { animation: vxj-step .5s ease-in-out infinite reverse; }
.vxj-hero.is-moving .vxj-r-tail { animation-duration: .6s; }
.vxj-hero.is-moving .vxj-r-notes { display: none; }
@keyframes vxj-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.2px); } }
@keyframes vxj-trot { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes vxj-step { 0%, 100% { transform: rotate(22deg); } 50% { transform: rotate(-22deg); } }
@keyframes vxj-tail { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(18deg); } }
@keyframes vxj-nod { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-6deg); } 90% { transform: rotate(3deg); } }
@keyframes vxj-note { 0% { opacity: 0; transform: translate(0, 4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -10px); } }
.vxj-rider-badge { width: 120px; height: auto; display: inline-block; }

/* ---------- Floating chrome ---------- */
.vxj-topbar {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 640px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--vxj-glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .14);
    z-index: 3;
}
.vxj-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; padding: 0 4px; }
.vxj-title strong { font-size: 16px; font-weight: 900; color: var(--vxj-primary-dark); }
.vxj-title span { font-size: 12px; color: var(--vxj-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vxj-meter { height: 6px; margin-top: 5px; border-radius: 3px; background: rgba(15, 23, 42, .1); overflow: hidden; }
.vxj-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--vxj-gold), var(--vxj-ok)); transition: width .5s; }

.vxj-icon-btn {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; border: 1px solid var(--vxj-border);
    background: #fff; color: var(--vxj-text) !important;
    font: inherit; font-size: 18px; font-weight: 700; line-height: 1;
    text-decoration: none !important; cursor: pointer;
}
.vxj-icon-btn:hover { background: var(--vxj-soft); }

.vxj-minimap {
    position: absolute;
    top: calc(84px + env(safe-area-inset-top));
    left: 10px;
    width: 132px;
    padding: 6px 6px 4px;
    text-align: center;
    background: var(--vxj-glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .14);
    z-index: 2;
}
.vxj-mini { display: block; width: 100%; height: auto; background: #eef4fa; border-radius: 8px; }
.vxj-minimap span { display: block; margin-top: 3px; font-size: 11px; font-weight: 800; line-height: 1.2; color: var(--vxj-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vxj-mini-land { fill: #a9d58c; stroke: #5f8f4e; stroke-width: 6; }
.vxj-mini-islet { fill: #a9d58c; stroke: #5f8f4e; stroke-width: 5; }
.vxj-mini-label { font-size: 78px; font-weight: 800; fill: #334155; paint-order: stroke; stroke: #eef4fa; stroke-width: 18px; stroke-linejoin: round; }
.vxj-mini-route { fill: none; stroke: #8b7350; stroke-width: 10; stroke-dasharray: 18 14; stroke-linejoin: round; opacity: .7; }
.vxj-mini-travelled { fill: none; stroke: var(--vxj-gold); stroke-width: 16; stroke-linejoin: round; stroke-linecap: round; }
.vxj-mini-cur { fill: var(--vxj-bad); stroke: #fff; stroke-width: 8; }
.vxj-mini-ping { fill: var(--vxj-bad); opacity: .35; transform-box: fill-box; transform-origin: center; animation: vxj-pulse 1.6s ease-out infinite; }
.vxj-mini-view { fill: rgba(2, 132, 199, .12); stroke: var(--vxj-primary); stroke-width: 10; }
@media (min-width: 768px) { .vxj-minimap { width: 180px; } .vxj-minimap span { font-size: 12.5px; } }


.vxj-bottombar {
    position: absolute;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 420px;
    z-index: 3;
}
.vxj-btn.vxj-cta {
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 9px 24px 11px;
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(2, 132, 199, .45);
    line-height: 1.25;
}
.vxj-cta small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.vxj-cta span { font-size: 17px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vxj-toast {
    position: absolute; left: 50%;
    bottom: calc(96px + env(safe-area-inset-bottom));
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    max-width: calc(100% - 32px); text-align: center; z-index: 4;
    background: var(--vxj-text); color: #fff;
    font-size: 14px; font-weight: 600; padding: 10px 16px; border-radius: 12px;
    transition: all .25s;
}
.vxj-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Buttons ---------- */
.vxj-btn {
    font: inherit; font-weight: 700; font-size: 15px;
    border: 0; border-radius: 12px; padding: 11px 18px; min-height: 46px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    cursor: pointer; transition: background .2s, transform .08s;
}
.vxj-btn:active { transform: translateY(1px); }
.vxj-btn-primary { background: var(--vxj-primary); color: #fff; }
.vxj-btn-primary:hover { background: var(--vxj-primary-dark); }
.vxj-btn-danger { background: var(--vxj-bad); color: #fff; }
.vxj-btn-ghost { background: #fff; color: var(--vxj-text); border: 1px solid var(--vxj-border); }
.vxj-btn-ghost:hover { background: var(--vxj-soft); }
.vxj-btn-block { width: 100%; margin-top: 14px; }
.vxj-btn:focus-visible, .vxj-opt:focus-visible, .vxj-link:focus-visible, .vxj-icon-btn:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }

.vxj-link {
    font: inherit; font-size: 13.5px; font-weight: 600;
    background: none; border: 0; padding: 8px 2px; cursor: pointer;
    color: var(--vxj-primary); text-decoration: none;
}
.vxj-link:hover { text-decoration: underline; }

/* ---------- Modal ---------- */
body.vxj-modal-open { overflow: hidden; }
.vxj-overlay {
    position: fixed; inset: 0; z-index: 1000000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .45);
    animation: vxj-fade .15s ease-out;
}
@keyframes vxj-fade { from { opacity: 0; } to { opacity: 1; } }
.vxj-modal {
    position: relative; width: 100%; max-width: 440px;
    max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
    background: var(--vxj-surface); border-radius: 24px;
    padding: 22px 20px 20px; text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
    animation: vxj-pop .22s ease-out;
}
@keyframes vxj-pop { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.vxj-close {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    width: 36px; height: 36px; border-radius: 50%; border: 0;
    background: var(--vxj-soft); color: var(--vxj-muted); font-size: 16px; cursor: pointer;
}
.vxj-close:hover { background: var(--vxj-border); color: var(--vxj-text); }

.vxj-big-emoji { font-size: 56px; line-height: 1; }
.vxj-h2 { font-size: 24px; font-weight: 900; margin: 8px 0; line-height: 1.25; }
.vxj-lead { font-size: 15.5px; line-height: 1.55; margin: 0 0 6px; }
.vxj-sub { font-size: 14px; color: var(--vxj-muted); line-height: 1.55; margin: 6px 0 0; }
.vxj-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.vxj-row .vxj-btn { flex: 1 1 140px; }
.vxj-upsell { display: inline-block; margin-top: 12px; }

.vxj-stop { display: flex; align-items: center; gap: 12px; text-align: left; padding-right: 40px; margin-bottom: 16px; }
.vxj-stop .vxj-stop-emoji {
    flex: 0 0 64px; width: 64px; height: 64px; border-radius: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, #e0f2fe, #fef9c3); font-size: 32px; line-height: 1;
}
.vxj-stop .vxj-stop-emoji svg { width: 56px; height: 56px; }
.vxj-stop em { display: block; font-style: normal; font-size: 13px; font-weight: 700; color: var(--vxj-primary-dark); }
.vxj-stop strong { display: block; font-size: 19px; font-weight: 900; line-height: 1.2; }
.vxj-stop span { font-size: 12.5px; color: var(--vxj-muted); }

.vxj-postcard {
    margin-top: 12px; padding: 12px 14px; text-align: left;
    background: #fffbeb; border: 1px dashed #fbbf24; border-radius: 14px;
}
.vxj-fact { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.vxj-fact-vi { margin: 6px 0 0; font-size: 13px; color: var(--vxj-muted); line-height: 1.5; }

/* ---------- Question ---------- */
.vxj-qtitle { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--vxj-muted); }
.vxj-qprompt {
    display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
    padding: 16px 10px; background: var(--vxj-soft); border-radius: 16px;
}
.vxj-qtext { font-size: 26px; font-weight: 900; line-height: 1.3; }
.vxj-qtext-sm { font-size: 18px; font-weight: 800; line-height: 1.4; }
.vxj-qsub { margin: 8px 0 0; font-size: 13.5px; color: var(--vxj-muted); }

.vxj-speaker {
    font: inherit; font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 38px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--vxj-border); background: #fff; color: var(--vxj-primary);
}
.vxj-speaker:hover { background: #f0f9ff; }
.vxj-speaker-ico { font-size: 16px; }
.vxj-speaker.is-loading .vxj-speaker-ico { animation: vxj-blink .8s infinite; }
.vxj-speaker.is-playing { background: #e0f2fe; border-color: #7dd3fc; }
.vxj-speaker-big { font-size: 15px; padding: 14px 22px; }
.vxj-speaker-big .vxj-speaker-ico { font-size: 30px; }
@keyframes vxj-blink { 50% { opacity: .3; } }

.vxj-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.vxj-opt {
    font: inherit; font-size: 16px; font-weight: 700; color: var(--vxj-text);
    min-height: 56px; padding: 12px 10px; border-radius: 14px; cursor: pointer;
    background: #fff; border: 2px solid var(--vxj-border);
    transition: border-color .15s, background .15s;
}
/* 3 options (beginner): the last one spans the row */
.vxj-opt:last-child:nth-child(odd) { grid-column: 1 / -1; }
.vxj-opt:hover:not(:disabled) { border-color: #7dd3fc; background: #f0f9ff; }
.vxj-opt:disabled { cursor: default; color: var(--vxj-text); opacity: .55; }
.vxj-opt.is-correct { opacity: 1; border-color: var(--vxj-ok); background: var(--vxj-ok-soft); }
.vxj-opt.is-wrong { opacity: 1; border-color: var(--vxj-bad); background: var(--vxj-bad-soft); }

.vxj-speak-box { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 16px; }
.vxj-mic {
    width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--vxj-primary); color: #fff; font-size: 32px;
    box-shadow: 0 6px 18px rgba(2, 132, 199, .35);
}
.vxj-mic:disabled { opacity: .4; cursor: default; }
.vxj-mic.is-recording { background: var(--vxj-bad); animation: vxj-rec 1s ease-in-out infinite; }
@keyframes vxj-rec { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); } 50% { box-shadow: 0 0 0 14px rgba(220, 38, 38, 0); } }
.vxj-speak-status { margin: 0; min-height: 20px; font-size: 14px; color: var(--vxj-muted); }
.vxj-speak-result { width: 100%; }
.vxj-words { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.vxj-words span { font-size: 16px; font-weight: 700; padding: 3px 9px; border-radius: 8px; }
.vxj-words .is-ok { background: var(--vxj-ok-soft); color: #166534; }
.vxj-words .is-miss { background: var(--vxj-bad-soft); color: #991b1b; }
.vxj-score { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--vxj-muted); }

/* ---------- Feedback (short game result) ---------- */
.vxj-feedback { display: none; }
.vxj-feedback.is-show {
    display: block;
    margin: 16px -20px -20px; padding: 14px 20px 18px;
    border-radius: 0 0 24px 24px;
}
.vxj-feedback.is-ok { background: var(--vxj-ok-soft); }
.vxj-feedback.is-bad { background: var(--vxj-bad-soft); }
.vxj-result { text-align: center; animation: vxj-stamp .35s cubic-bezier(.2, 1.6, .4, 1); }
.vxj-timerow { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.vxj-timebar { flex: 1 1 auto; height: 6px; border-radius: 3px; overflow: hidden; }
.vxj-skip {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 17px; line-height: 1; color: #fff; cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .18); transition: transform .08s, filter .2s;
}
.vxj-skip:hover { filter: brightness(1.08); }
.vxj-skip:active { transform: scale(.94); }
.vxj-skip:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.vxj-feedback.is-ok .vxj-skip { background: var(--vxj-ok); }
.vxj-feedback.is-bad .vxj-skip { background: var(--vxj-bad); }
a.vxj-btn { text-decoration: none; box-sizing: border-box; }
.vxj-promo-link { color: var(--vxj-primary); }

/* Ebook covers fanned out like a hand of cards (--k: -2..2 from the centre) */
.vxj-books {
    display: flex; justify-content: center; align-items: flex-end;
    padding: 14px 8px 0; margin: 0 auto 22px;
}
.vxj-book {
    --w: min(80px, 19vw);
    position: relative; flex: 0 0 auto; width: var(--w); aspect-ratio: 3 / 4;
    margin: 0 calc(var(--w) * -0.2);
    border-radius: 4px 7px 7px 4px; overflow: hidden; background: var(--vxj-soft);
    box-shadow: 0 6px 14px rgba(15, 23, 42, .28), inset 3px 0 0 rgba(0, 0, 0, .12);
    transform: translateY(calc(var(--k) * var(--k) * 4px)) rotate(calc(var(--k) * 7deg));
    transform-origin: 50% 100%;
    z-index: calc(10 - var(--k) * var(--k));
    transition: transform .2s ease, box-shadow .2s ease;
    animation: vxj-book-in .45s cubic-bezier(.2, 1.4, .4, 1) both;
    animation-delay: calc((var(--k) + 2) * 60ms);
}
.vxj-book img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vxj-book:hover, .vxj-book:focus-visible {
    z-index: 20;
    transform: translateY(-10px) rotate(calc(var(--k) * 3deg)) scale(1.08);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .32);
}
.vxj-book:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.vxj-books.is-small { padding-top: 6px; margin-bottom: 4px; }
.vxj-books.is-small .vxj-book { --w: min(56px, 14vw); }

/* Finale: online 1-on-1 tutor card */
.vxj-tutor {
    margin: 16px 0 4px; padding: 14px; text-align: left;
    border: 1px solid var(--vxj-border); border-radius: 18px;
    background: linear-gradient(180deg, #f0f9ff, var(--vxj-surface));
}
.vxj-tutor-head { display: flex; align-items: center; gap: 12px; }
.vxj-tutor-photo {
    flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
    border: 3px solid #fff; box-shadow: 0 0 0 2px var(--vxj-primary), 0 4px 10px rgba(15, 23, 42, .18);
}
.vxj-tutor-meta strong { display: block; font-size: 17px; font-weight: 900; line-height: 1.2; }
.vxj-tutor-meta span { font-size: 12.5px; color: var(--vxj-muted); }
.vxj-tutor-text { font-size: 14px; line-height: 1.55; margin: 10px 0 0; }
.vxj-tutor .vxj-btn-block { margin-top: 12px; }
.vxj-finale-label { font-size: 13px; font-weight: 700; color: var(--vxj-muted); margin: 18px 0 0; }
@keyframes vxj-book-in { from { opacity: 0; transform: translateY(24px) rotate(0deg); } }
@media (prefers-reduced-motion: reduce) { .vxj-book { animation: none; transition: none; } }
.vxj-timebar i { display: block; height: 100%; width: 100%; border-radius: 3px; transform-origin: left center; animation: vxj-timebar linear forwards; }
.vxj-feedback.is-ok .vxj-timebar { background: rgba(22, 163, 74, .18); }
.vxj-feedback.is-ok .vxj-timebar i { background: var(--vxj-ok); }
.vxj-feedback.is-bad .vxj-timebar { background: rgba(220, 38, 38, .18); }
.vxj-feedback.is-bad .vxj-timebar i { background: var(--vxj-bad); }
@keyframes vxj-timebar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.vxj-result strong { display: block; font-size: 22px; font-weight: 900; line-height: 1.15; }
.vxj-result span { display: block; font-size: 16px; font-weight: 700; color: var(--vxj-text); }
.vxj-feedback.is-ok strong { color: #166534; }
.vxj-feedback.is-bad strong { color: #991b1b; }
@keyframes vxj-stamp { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.vxj-modal.is-shake { animation: vxj-shake .4s ease-in-out; }
@keyframes vxj-shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ---------- Hoang Sa & Truong Sa archipelagos ---------- */
.vxj-islet-reef { fill: rgba(125, 211, 252, .55); }
.vxj-islet-sand { fill: #f4e0b3; stroke: #d6b97a; stroke-width: .6; }
.vxj-islet-green { fill: #8fcf6a; }
.vxj-archi-label rect { fill: rgba(255, 255, 255, .96); }
.vxj-map:not(.is-overview) .vxj-overview-only { display: none; }
.vxj-archi-vi { font-size: 13px; font-weight: 800; fill: var(--vxj-text); }

/* ---------- Topic & level ---------- */
/* Top bar chip: current topic + level, opens the settings */
.vxj-topic-chip {
    flex: 0 1 auto; min-width: 0; max-width: 170px; height: 40px;
    display: inline-flex; align-items: center; gap: 7px; padding: 0 10px 0 7px;
    font: inherit; color: var(--vxj-text); text-align: left; cursor: pointer;
    background: #fff; border: 1px solid var(--vxj-border); border-radius: 12px;
}
.vxj-topic-chip:hover { background: var(--vxj-soft); border-color: #7dd3fc; }
.vxj-topic-chip:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.vxj-topic-chip-e { font-size: 20px; line-height: 1; }
.vxj-topic-chip-t { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.vxj-topic-chip-t b, .vxj-topic-chip-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vxj-topic-chip-t b { font-size: 12.5px; font-weight: 800; }
.vxj-topic-chip-t small { font-size: 11px; color: var(--vxj-muted); font-weight: 600; }

/* Settings / welcome card: wider than the question card */
.vxj-modal.vxj-modal-wide { max-width: 680px; }
.vxj-welcome-badge .vxj-rider-badge { width: 96px; }
.vxj-setup { text-align: left; margin-top: 10px; }
.vxj-setup-h { margin: 14px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--vxj-muted); }

/* "All topics" takes a whole row, topics 1/5 of a row */
.vxj-topics { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.vxj-topic, .vxj-level {
    position: relative; font: inherit; color: var(--vxj-text); cursor: pointer;
    background: #fff; border: 2px solid var(--vxj-border); border-radius: 14px;
    transition: border-color .15s, background .15s, transform .08s;
}
.vxj-topic:hover, .vxj-level:hover { border-color: #7dd3fc; background: #f0f9ff; }
.vxj-topic:active, .vxj-level:active { transform: scale(.97); }
.vxj-topic:focus-visible, .vxj-level:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.vxj-topic.is-on, .vxj-level.is-on { border-color: var(--vxj-primary); background: #e0f2fe; box-shadow: 0 0 0 1px var(--vxj-primary) inset; }
.vxj-topic.is-on::after, .vxj-level.is-on::after {
    content: '✓'; position: absolute; top: -7px; right: -7px;
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--vxj-primary); color: #fff; font-size: 12px; font-weight: 900;
}

.vxj-topic { grid-column: span 2; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; text-align: center; }
.vxj-topic-e { font-size: 30px; line-height: 1.1; }
.vxj-topic-t { display: flex; flex-direction: column; min-width: 0; }
.vxj-topic-t strong { font-size: 13px; font-weight: 800; line-height: 1.2; }
.vxj-topic-t small { font-size: 11.5px; color: var(--vxj-muted); line-height: 1.25; margin-top: 2px; }
/* "Mixed" spans the whole row, laid out horizontally */
.vxj-topic.is-mix { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 14px; text-align: left; }
.vxj-topic.is-mix .vxj-topic-e { font-size: 28px; }
.vxj-topic.is-mix strong { font-size: 14.5px; }

.vxj-levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.vxj-level { display: flex; flex-direction: column; align-items: center; padding: 9px 4px; line-height: 1.2; }
.vxj-level-e { font-size: 22px; line-height: 1.2; }
.vxj-level strong { font-size: 13.5px; font-weight: 800; }
.vxj-level small { font-size: 11.5px; color: var(--vxj-muted); }
.vxj-level-note { margin: 8px 2px 0; min-height: 20px; font-size: 13px; color: var(--vxj-muted); line-height: 1.45; text-align: center; }

/* Start / Save button stays reachable while the card scrolls */
.vxj-setup-go {
    position: sticky; bottom: -20px; z-index: 1;
    margin: 6px -20px -20px; padding: 2px 20px 20px;
    background: linear-gradient(rgba(255, 255, 255, 0), var(--vxj-surface) 18px);
}

/* Question card: topic / level tag and picture prompt */
.vxj-qtag { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.vxj-qtag span { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #f0f9ff; color: var(--vxj-primary-dark); border: 1px solid #bae6fd; }
.vxj-qemoji { font-size: 64px; line-height: 1.1; }

@media (max-width: 700px) {
    .vxj-topics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------- Phones ---------- */
@media (max-width: 600px) {
    .vxc-journey:not(.is-fullscreen) { margin: 0 -16px; border-radius: 0; height: min(86vh, 760px); height: min(86dvh, 760px); }

    /* Compact top bar */
    .vxj-topbar { top: calc(8px + env(safe-area-inset-top)); width: calc(100% - 16px); padding: 6px; gap: 6px; border-radius: 14px; }
    .vxj-title strong { font-size: 14px; }
    .vxj-title span { font-size: 11px; }
    .vxj-icon-btn { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }

    /* Small overview in the corner; tap to enlarge */
    .vxj-minimap { top: calc(66px + env(safe-area-inset-top)); left: 8px; width: 64px; padding: 4px; border-radius: 10px; cursor: pointer; transition: width .2s; }
    .vxj-minimap span { display: none; }
    .vxj-minimap.is-open { width: 150px; }
    .vxj-minimap.is-open span { display: block; }

    .vxj-bottombar { width: calc(100% - 24px); bottom: calc(10px + env(safe-area-inset-bottom)); }
    .vxj-btn.vxj-cta { padding: 7px 20px 9px; }
    .vxj-cta span { font-size: 16px; }

    /* Question card: floating sheet in the lower part, map + traveller stay visible above it */
    .vxj-overlay { padding: 0 10px calc(10px + env(safe-area-inset-bottom)); align-items: flex-end; background: rgba(15, 23, 42, .28); }
    .vxj-modal { max-height: 72vh; max-height: 72dvh; border-radius: 20px; padding: 16px 14px 14px; }
    .vxj-close { top: 8px; right: 8px; width: 32px; height: 32px; font-size: 14px; }
    .vxj-stop { gap: 10px; margin-bottom: 10px; padding-right: 34px; }
    .vxj-stop .vxj-stop-emoji { flex-basis: 46px; width: 46px; height: 46px; border-radius: 12px; font-size: 24px; }
    .vxj-stop .vxj-stop-emoji svg { width: 40px; height: 40px; }
    .vxj-stop strong { font-size: 17px; }
    .vxj-stop em, .vxj-stop span { font-size: 12px; }
    .vxj-qtitle { margin-bottom: 8px; font-size: 14px; }
    .vxj-qprompt { padding: 10px 8px; }
    .vxj-qtext { font-size: 22px; }
    .vxj-qtext-sm { font-size: 16px; }
    .vxj-options { gap: 8px; margin-top: 10px; }
    .vxj-opt { min-height: 50px; font-size: 15px; padding: 10px 8px; }
    .vxj-mic { width: 64px; height: 64px; font-size: 28px; }
    .vxj-feedback.is-show { margin: 12px -14px -14px; padding: 12px 14px 14px; border-radius: 0 0 20px 20px; }

    /* Topic chip: emoji only */
    .vxj-topic-chip { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 10px; flex: 0 0 auto; }
    .vxj-topic-chip-t { display: none; }
    .vxj-topic-chip-e { font-size: 18px; }

    /* Settings card: taller sheet, compact 2-column topic list (emoji left, names right) */
    .vxj-modal.vxj-modal-wide { max-height: 90vh; max-height: 90dvh; }
    .vxj-modal-wide .vxj-h2 { font-size: 20px; margin: 4px 0 6px; }
    .vxj-modal-wide .vxj-lead { font-size: 14px; line-height: 1.45; }
    .vxj-welcome-badge .vxj-rider-badge { width: 72px; }
    .vxj-setup-h { margin: 12px 0 6px; font-size: 12px; }
    .vxj-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .vxj-topic { grid-column: span 1; }
    .vxj-topic { flex-direction: row; justify-content: flex-start; gap: 8px; padding: 8px; text-align: left; border-radius: 12px; min-height: 52px; }
    .vxj-topic-e, .vxj-topic.is-mix .vxj-topic-e { font-size: 24px; flex: 0 0 auto; }
    .vxj-topic-t strong { font-size: 12.5px; }
    .vxj-topic-t small { font-size: 11px; }
    .vxj-topic.is-mix { padding: 8px 10px; gap: 10px; }
    .vxj-topic.is-mix strong { font-size: 13.5px; }
    .vxj-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .vxj-level { flex-direction: row; justify-content: flex-start; gap: 6px; padding: 8px 10px; flex-wrap: wrap; text-align: left; }
    .vxj-level-e { font-size: 18px; }
    .vxj-level small { width: 100%; padding-left: 26px; margin-top: -2px; }
    .vxj-level-note { font-size: 12.5px; }
    .vxj-setup-go { bottom: -14px; margin: 4px -14px -14px; padding: 2px 14px 14px; }
    .vxj-qemoji { font-size: 52px; }
}

@media (prefers-reduced-motion: reduce) {
    .vxj-node-pulse, .vxj-mic.is-recording, .vxj-lm, .vxj-mini-ping, .vxj-r-body, .vxj-r-tail, .vxj-r-head, .vxj-r-leg, .vxj-note, .vxj-result, .vxj-modal.is-shake { animation: none !important; }
}
