/* Word Garden learner screens: shell, join, home, placeholders. */

.app { min-height: 100vh; }
.screen { min-height: 100vh; padding: 12px 32px 24px; max-width: 1240px; margin: 0 auto; animation: fadeIn .45s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.99); } to { opacity: 1; transform: none; } }

.lhead { display: flex; align-items: center; justify-content: space-between; min-height: 56px; margin-bottom: 8px; }
.brand { font-size: 18px; font-weight: 800; color: var(--teal); display: flex; align-items: center; gap: 8px; }

/* Round avatar with the learner's colour ring (tells apart learners who share a name) */
.face {
  display: inline-grid; place-items: center; flex: none; border-radius: 50%;
  background: var(--cream-2); box-shadow: 0 0 0 4px var(--ring, transparent);
}
.face:empty { display: none; }
#mePrev { width: 58px; height: 58px; font-size: 32px; }
.face-lg { width: 116px; height: 116px; font-size: 64px; margin: 10px auto 18px; background: var(--orange-l); }
.face-sm { width: 56px; height: 56px; font-size: 32px; vertical-align: middle; margin-right: 10px; }

/* ---------- Join ---------- */
.join { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: stretch; margin-top: 6px; }
.join .card { padding: 28px 32px; }
.join-name { display: flex; flex-direction: column; }
.field { margin: 18px 0 24px; }
.field input {
  width: 100%; height: 76px; border-radius: var(--r-md); border: 3px solid var(--line);
  background: var(--cream); padding: 0 24px; font-size: 32px; font-family: inherit; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--teal); background: #fff; box-shadow: 0 0 0 6px rgba(47, 115, 112, .15); }
.label { font-size: var(--fs-label); font-weight: 700; }
.avatars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px auto 0; max-width: 430px; }
.av {
  aspect-ratio: 1; min-height: 64px; border-radius: 18px; border: 3px solid transparent;
  background: var(--cream); font-size: 40px; line-height: 1; cursor: pointer;
  transition: transform .15s var(--ease), background .2s, border-color .2s;
}
.av:hover { background: var(--cream-2); transform: translateY(-2px); }
.av[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-l); transform: scale(1.05); }
.join-foot { display: flex; align-items: center; gap: 22px; margin-top: auto; flex-wrap: wrap; }
.me-preview { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; color: var(--ink-2); min-width: 0; }
.me-preview span:last-child { overflow-wrap: anywhere; }
.form-error { margin-top: 16px; color: var(--orange-d); font-weight: 700; }
.join-solo { max-width: 540px; margin: 10px auto 0; padding: 28px 32px 24px; text-align: center; }
.join-solo .btn { width: 100%; text-decoration: none; }
.join-solo .btn-ghost { width: auto; margin-top: 6px; }

/* ---------- Home ---------- */
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 22px; }
.home-head h1 { display: flex; align-items: center; flex-wrap: wrap; }
.status { margin-top: 8px; font-size: 24px; color: var(--ink-2); min-height: 36px; }
.streak {
  font-size: 19px; color: var(--ink-2); background: #fff; border-radius: 999px; padding: 10px 20px;
  box-shadow: var(--sh-sm); text-align: center; line-height: 1.2;
}
.streak .vi { font-size: 14px; }
.streak[hidden] { display: none; }

.home-grid { display: flex; gap: 24px; align-items: stretch; }
.cards { flex: 2; display: flex; gap: 24px; min-width: 0; }
.big {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 290px; padding: 28px; border-radius: var(--r-xl); background: #fff; border: 3px solid transparent;
  box-shadow: var(--sh); color: inherit; text-decoration: none; text-align: left; font-size: 22px;
  transition: transform .2s var(--ease), box-shadow .2s;
}
a.big { cursor: pointer; }
a.big:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(23, 50, 77, .14); }
.big .ico { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.big p { color: var(--ink-2); font-size: 21px; margin-top: 4px; }
.big.rec { background: linear-gradient(160deg, #fff 0%, #FFF4E3 100%); border-color: var(--orange); }
.big.waiting { background: var(--teal-l); box-shadow: none; }
.big .go { margin-top: auto; font-weight: 800; color: var(--teal); }
.reconnect { font-size: 18px !important; }
.badge-rec {
  position: absolute; top: 20px; right: 20px; background: var(--orange); color: #3B2200;
  font-size: 16px; font-weight: 800; padding: 6px 14px; border-radius: 999px; line-height: 1.2; text-align: center;
}
.badge-rec .vi { color: #3B2200; font-size: 12px; }

.peek {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 20px;
  color: inherit; text-decoration: none; background: linear-gradient(180deg, #FFF4DF, #FCE6C4);
  transition: transform .2s var(--ease);
}
.peek:hover { transform: translateY(-3px); }
.peek h2 { font-size: 24px; }
.peek .go { margin-top: auto; font-weight: 800; color: var(--teal); font-size: 20px; }
#peek { flex: 1; display: flex; align-items: flex-end; min-height: 130px; }
.peek-bed {
  width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 4px;
  border-bottom: 10px solid #A86E3E; border-radius: 0 0 6px 6px;
}
.peek-plant { width: 25%; max-width: 86px; height: auto; aspect-ratio: 100 / 110; }
.peek-empty { text-align: center; width: 100%; }
.peek-empty p { font-size: 19px; line-height: 1.3; color: var(--ink-2); }
.peek-empty .peek-hint { font-size: 16px; margin-top: 6px; }
.peek-seed { width: 76px; height: 84px; }

.home-links { margin-top: 20px; display: flex; justify-content: center; min-height: 58px; }
.home-links:empty { display: none; }

/* Ask button: fixed in the corner, never covers content on a 1366x768 screen */
.ask-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; align-items: center; gap: 10px;
  min-height: var(--tap); padding: 6px 22px 6px 16px; border-radius: 999px; background: #fff;
  border: 2px solid var(--orange); box-shadow: var(--sh-sm); font-size: 19px; font-weight: 700;
  line-height: 1.15; text-align: left; cursor: pointer; white-space: nowrap;
}
.ask-fab .e { font-size: 28px; }
.ask-fab .vi { font-size: 13px; }

/* ---------- Placeholders and errors ---------- */
.center-screen { display: grid; place-items: center; }
.soon { max-width: 560px; padding: 36px 40px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.soon .btn { text-decoration: none; margin-top: 8px; }
.soon-ico { font-size: 64px; line-height: 1; }

@media (max-width: 1100px) {
  .home-grid, .cards { flex-direction: column; }
  .join { grid-template-columns: 1fr; }
}

/* ---------- Vietnamese on/off switch (shell, top right, quiet) ---------- */
.lang-slot { position: fixed; top: 10px; right: max(24px, calc((100vw - 1240px) / 2 + 32px)); z-index: 60; }
.lang-switch {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 16px;
  border-radius: 999px; border: 2px solid var(--line); background: rgba(255, 255, 255, .85);
  font-size: 17px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.lang-switch:hover { border-color: var(--teal); }
.lang-track { position: relative; width: 46px; height: 26px; border-radius: 13px; background: #B9C3CC; transition: background .2s; }
.lang-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.lang-switch[aria-checked="true"] .lang-track { background: var(--teal); }
.lang-switch[aria-checked="true"] .lang-knob { transform: translateX(20px); }
.lang-state { min-width: 26px; text-align: left; }

/* English-only: fewer lines per card, so give the cards and spacing a little more room */
html.hide-vi .big { min-height: 340px; }
html.hide-vi .home-head { margin-bottom: 34px; }
html.hide-vi .home-links { margin-top: 28px; }

/* =====================================================================
   Game screens: revision (#s3, #s13), mission (#s4), success (#s6),
   garden (#s7), end (#s8) and the Ask popover. Fit 1366x768, no page scroll.
   ===================================================================== */

/* ---------- shared ---------- */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px; background: var(--teal-l); color: var(--teal-d); font-size: 18px; font-weight: 700; line-height: 1.2; }
.chip .vi { display: inline; margin: 0 0 0 6px; color: inherit; opacity: .85; font-size: .82em; }
.chip.soft { background: var(--orange-l); color: var(--orange-d); }
.wg-chip2 { flex-direction: column; gap: 0; padding: 4px 14px; }
.wg-chip2 .vi { display: block; margin: 0; font-size: 12px; }

.wg-calm .soon { max-width: 640px; }
.wg-calm-actions { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.wg-calm-actions a { text-decoration: none; }

/* quiet link in the bottom-left corner (the Ask button owns the bottom-right) */
.wg-finish {
  position: fixed; left: 20px; bottom: 20px; z-index: 40; display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-height: var(--tap); padding: 6px 20px; border-radius: 999px; background: rgba(255, 255, 255, .8); border: 2px solid var(--line);
  font-size: 18px; font-weight: 700; color: var(--ink-2); text-decoration: none; line-height: 1.15;
}
.wg-finish .vi { font-size: 13px; }
.wg-finish:hover { border-color: var(--teal); color: var(--ink); }

.wg-gtoast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  max-width: min(720px, 56vw); padding: 14px 24px; border-radius: var(--r-md); background: #fff; border-left: 8px solid var(--orange);
  box-shadow: 0 14px 40px rgba(23, 50, 77, .22); font-size: 21px; font-weight: 700; line-height: 1.3; text-align: left;
  transition: opacity .3s, transform .3s var(--ease);
}
.wg-gtoast .vi { font-size: 16px; }
.wg-gtoast.is-shown { opacity: 1; transform: translate(-50%, 0); }

.wg-dots { display: flex; gap: 10px; align-items: center; }
.wg-dots i { width: 16px; height: 16px; border-radius: 50%; background: #E4D6C1; flex: none; }
.wg-dots i.done { background: var(--leaf); }
.wg-dots i.now { background: var(--orange); box-shadow: 0 0 0 5px rgba(242, 155, 56, .25); width: 20px; height: 20px; }
.wg-dots span { font-size: 18px; color: var(--ink-2); margin-left: 10px; line-height: 1.2; }
.wg-dots .vi { font-size: 13px; }

.wg-star { display: inline-block; line-height: 0; }
.wg-star svg { width: 100%; height: 100%; }
.wg-star.dim { opacity: .28; filter: grayscale(1); }
.wg-star.pop { animation: wgPop .6s var(--ease) both; }
.wg-star.pop:nth-child(2) { animation-delay: .2s; }
.wg-star.pop:nth-child(3) { animation-delay: .4s; }
@keyframes wgPop { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 60% { transform: scale(1.25) rotate(8deg); opacity: 1; } 100% { transform: none; opacity: 1; } }

/* ---------- Ask ---------- */
.ask-fab.is-asked { background: var(--orange-l); }
.ask-fab.ask-inline { position: static; min-height: 48px; padding: 2px 20px 2px 14px; box-shadow: none; }
.ask-fab.ask-inline .e { font-size: 24px; }
.ask-pop {
  position: fixed; z-index: 90; width: 380px; max-width: calc(100vw - 24px); padding: 18px 20px 14px; border-radius: var(--r-lg);
  background: #fff; box-shadow: 0 18px 50px rgba(23, 50, 77, .22); font-size: 19px; line-height: 1.3; animation: fadeIn .25s var(--ease) both;
}
.ask-h { font-size: 24px; margin-bottom: 10px; }
.ask-h .vi { font-size: 15px; }
.ask-choices { display: flex; flex-direction: column; gap: 10px; }
.ask-choice {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 8px 16px; border-radius: var(--r-md); border: 3px solid #E7DCCB;
  background: #fff; font-size: 21px; font-weight: 700; text-align: left; line-height: 1.2; cursor: pointer;
}
.ask-choice:hover { border-color: var(--teal); }
.ask-choice .e { font-size: 30px; }
.ask-choice .vi { font-size: 14px; }
.ask-msg { font-size: 21px; font-weight: 700; margin-bottom: 12px; }
.ask-msg .vi { font-size: 15px; }
.ask-ok { width: 100%; }
.ask-lock { font-size: 15px; color: var(--ink-2); margin-top: 12px; }
.ask-lock .vi { font-size: 12.5px; }
.ask-err { display: block; margin-top: 8px; color: var(--orange-d); font-weight: 700; font-size: 17px; }

/* ---------- Revision (#s3, #s13) ---------- */
.wg-rev { height: 100vh; min-height: 0; display: flex; flex-direction: column; padding-bottom: 92px; overflow: hidden; }
.wg-rev .lhead { flex: none; }
.wg-rev-body { flex: 1; min-height: 0; width: 100%; max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; }
.wg-q-top { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; min-height: 44px; }
.wg-q-card { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 26px 40px 18px; text-align: center; animation: fadeIn .35s var(--ease) both; }
.wg-q-h { font-size: 36px; max-width: 900px; margin: 0 auto; }
.wg-q-h .vi { font-size: 21px; margin-top: 4px; }
.wg-q-main { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px 0 8px; }
.wg-q-foot { flex: none; display: flex; align-items: center; justify-content: center; gap: 24px; min-height: 76px; }
.wg-q-fbcol { flex: 1; min-width: 0; text-align: left; }
.wg-q-feedback { font-size: 22px; font-weight: 700; line-height: 1.3; }
.wg-q-feedback .vi { font-size: 16px; }
.wg-q-feedback.is-ok { color: var(--leaf-d); }
.wg-q-feedback.is-try { color: var(--orange-d); }
.wg-q-ok { display: flex; align-items: center; gap: 14px; }
.wg-q-stars { display: inline-flex; gap: 4px; flex: none; }
.wg-q-stars .wg-star { width: 36px; height: 36px; }
.wg-proof { margin-top: 4px; font-size: 18px; color: var(--ink-2); font-weight: 600; line-height: 1.3; }
.wg-proof[hidden] { display: none; }
.wg-proof .vi { font-size: 14px; }
.wg-q-btns { display: flex; gap: 14px; flex: none; }
.wg-q-btns .btn { min-width: 200px; }
.wg-q-btns .btn[hidden] { display: none; }

/* pick */
.wg-choices { display: grid; gap: 20px; width: 100%; max-width: 900px; }
.wg-choices.two { grid-template-columns: repeat(2, 1fr); max-width: 520px; }
.wg-choices.three { grid-template-columns: repeat(3, 1fr); max-width: 740px; }
.wg-choices.four { grid-template-columns: repeat(4, 1fr); }
.wg-choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 96px; padding: 18px 10px 16px;
  border-radius: var(--r-lg); border: 3px solid #E7DCCB; background: #fff; cursor: pointer; font-size: 22px; font-weight: 700; line-height: 1.2;
  transition: transform .15s var(--ease), border-color .2s, background .2s, opacity .3s;
}
.wg-choice:hover:not([disabled]) { border-color: var(--teal); transform: translateY(-3px); }
.wg-choice .vi { font-size: 16px; }
.wg-opt-img { width: 100px; height: 100px; border-radius: 14px; background: #F7F7F7; border: 1px solid #D6D6D6; display: grid; place-items: center; }
.wg-opt-img img { max-width: 76px; max-height: 76px; }
.wg-opt-emoji { font-size: 54px; line-height: 1; }
.wg-choice.is-right { border-color: var(--leaf); background: var(--leaf-l); }
.wg-choice.is-nope, .wg-choice.is-quiet { opacity: .45; cursor: default; }
.wg-choice.is-reveal { border-color: var(--orange); animation: wgReveal 1.6s ease-in-out infinite; }
@keyframes wgReveal { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 155, 56, .5); } 50% { box-shadow: 0 0 0 12px rgba(242, 155, 56, 0); } }

/* click-ui placeholder mini mocks (unlabelled, so the answer isn't given away) */
.wg-mock-host { width: 100%; max-width: 860px; height: 100%; max-height: 380px; display: flex; }
.wg-mock-host > * { flex: 1; min-width: 0; }
.wg-ph { display: grid; gap: 4px; padding: 6px; border-radius: 12px; background: #E9E9E9; border: 1px solid #C9C9C9; height: 100%; }
.wg-ph-r { position: relative; border: 2px solid transparent; border-radius: 8px; background: transparent; padding: 0; cursor: pointer; min-height: 22px; transition: border-color .2s, opacity .3s; }
.wg-ph-r:hover { border-color: var(--teal); }
.wg-ph-art { position: absolute; inset: 2px; border-radius: 5px; background: #fff; }
.wg-ph-r.is-right { border-color: var(--leaf); background: var(--leaf-l); }
.wg-ph-r.is-nope { opacity: .5; }
.wg-ph-r.is-reveal { border-color: var(--orange); animation: wgReveal 1.6s ease-in-out infinite; }
.ph-word { grid-template-columns: 170px 1fr 120px; grid-template-rows: 30px 24px 74px 1fr 24px; grid-template-areas: "qat title title" "tabs tabs tabs" "ribbon ribbon ribbon" "document document document" "status status status"; }
.ph-word [data-region="title"] .wg-ph-art, .ph-word [data-region="qat"] .wg-ph-art { background: #F3F3F3; }
.ph-word [data-region="qat"] .wg-ph-art { background: repeating-linear-gradient(90deg, #F3F3F3 0 10px, #9DB5D8 10px 24px, #F3F3F3 24px 34px); background-size: 100% 12px; background-position: 0 50%; background-repeat: no-repeat; }
.ph-word [data-region="tabs"] .wg-ph-art { background: repeating-linear-gradient(90deg, transparent 0 14px, #C8C8C8 14px 54px, transparent 54px 70px) 0 50% / 100% 6px no-repeat, #F3F3F3; }
.ph-word [data-region="ribbon"] .wg-ph-art { background: repeating-linear-gradient(90deg, transparent 0 12px, #DADADA 12px 40px, transparent 40px 52px) 0 35% / 100% 28px no-repeat, #fff; }
.ph-word [data-region="document"] .wg-ph-art { left: 22%; right: 22%; background: repeating-linear-gradient(180deg, transparent 0 20px, #E3E3E3 20px 24px) 0 26px / 80% 100% no-repeat, #fff; background-position: 10% 26px; box-shadow: 0 0 0 1px #CFCFCF; }
.ph-word [data-region="status"] .wg-ph-art { background: #F3F3F3; }
.ph-start { grid-template-columns: 1fr 1fr; grid-template-rows: 54px 1fr 1fr 48px; grid-template-areas: "search search" "word pinned" "recommended recommended" ". power"; background: #EEF1F6; }
.ph-start [data-region="search"] .wg-ph-art { border-radius: 999px; box-shadow: inset 0 0 0 1px #C9CED8; }
.ph-start [data-region="word"] .wg-ph-art { background: linear-gradient(#2B579A, #2B579A) 50% 40% / 44px 44px no-repeat, #fff; }
.ph-start [data-region="pinned"] .wg-ph-art { background: radial-gradient(circle, #C9D3E3 0 16px, transparent 17px) 0 0 / 60px 60px, #fff; }
.ph-start [data-region="recommended"] .wg-ph-art { background: repeating-linear-gradient(180deg, transparent 0 14px, #E3E6EC 14px 22px), #fff; }
.ph-start [data-region="power"] .wg-ph-art { left: auto; width: 46px; border-radius: 50%; background: radial-gradient(circle, transparent 0 9px, #6B7280 10px 12px, transparent 13px), #fff; }
.ph-explorer { grid-template-columns: 220px 1fr 220px; grid-template-rows: 40px 1fr; grid-template-areas: "address address searchbox" "nav files files"; }
.ph-explorer [data-region="nav"] .wg-ph-art { background: repeating-linear-gradient(180deg, transparent 0 12px, #E1E1E1 12px 22px) 12px 8px / 80% 100% no-repeat, #FAFAFA; }
.ph-explorer [data-region="files"] .wg-ph-art { background: repeating-linear-gradient(180deg, transparent 0 12px, #E8E8E8 12px 30px) 14px 8px / 70% 100% no-repeat, #fff; }
.ph-generic { display: flex; gap: 8px; }
.ph-generic .wg-ph-r { flex: 1; }

/* order: tap the steps in order */
.wg-order { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; width: 100%; max-width: 980px; text-align: left; align-self: stretch; }
.wg-order-col { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.wg-order-h { font-size: 18px; font-weight: 700; color: var(--ink-2); line-height: 1.25; }
.wg-order-h .vi { font-size: 14px; }
.wg-order-pool, .wg-order-slots { display: flex; flex-direction: column; gap: 8px; }
.wg-order-slots { list-style: none; margin: 0; padding: 10px; border-radius: var(--r-md); background: var(--cream); transition: background .3s; }
.wg-order-mine.is-right .wg-order-slots { background: var(--leaf-l); }
.wg-step {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 6px 14px; border-radius: 14px; border: 3px solid #E7DCCB;
  background: #fff; font-size: 19px; font-weight: 700; line-height: 1.2; text-align: left; cursor: pointer; transition: opacity .2s, border-color .2s;
}
.wg-step .vi { font-size: 14px; }
.wg-step:hover:not([disabled]) { border-color: var(--teal); }
.wg-step.is-used { opacity: .3; cursor: default; }
.wg-step-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #E4D6C1; font-size: 17px; font-weight: 800; }
.wg-step.is-placed .wg-step-n { background: var(--teal); color: #fff; }
.wg-step-n.is-hint { background: var(--orange); color: #3B2200; }
.wg-slot-empty { min-height: 54px; border-radius: 14px; border: 2px dashed #D9CBB5; display: flex; align-items: center; padding: 0 14px; }
.wg-order-back { font-size: 15px; color: var(--ink-3); }
.wg-order-back .vi { font-size: 12px; }

/* sort: one card at a time, tap its box */
.wg-sort { width: 100%; max-width: 980px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.wg-sort-now { min-height: 110px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.wg-sort-q { font-size: 19px; color: var(--ink-2); font-weight: 700; }
.wg-sort-q .vi { display: inline; margin-left: 6px; font-size: 15px; }
.wg-sort-count { margin-left: 10px; color: var(--ink-3); font-weight: 600; }
.wg-sort-card { padding: 14px 32px; border-radius: var(--r-md); background: var(--orange-l); border: 3px solid var(--orange); font-size: 26px; font-weight: 800; line-height: 1.2; animation: fadeIn .3s var(--ease) both; }
.wg-sort-card .vi { font-size: 17px; }
.wg-bins { display: flex; gap: 18px; width: 100%; justify-content: center; }
.wg-bin {
  flex: 1; max-width: 300px; min-height: 150px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 12px;
  border-radius: var(--r-lg); border: 3px solid #E7DCCB; background: #fff; cursor: pointer; font-size: 22px; font-weight: 800; line-height: 1.2;
}
.wg-bin:hover:not([disabled]) { border-color: var(--teal); }
.wg-bin .vi { font-size: 15px; }
.wg-bin-cards { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.wg-bin-chip { font-size: 15px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--leaf-l); color: var(--leaf-d); }
.wg-bin.is-reveal { border-color: var(--orange); animation: wgReveal 1.6s ease-in-out infinite; }
.wg-bin.is-nudge { animation: wgNudge .45s ease-in-out; }
@keyframes wgNudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* fix: correct the words */
.wg-fix { width: 100%; max-width: 820px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.wg-fix-l { font-size: 18px; font-weight: 700; color: var(--ink-2); }
.wg-fix-l .vi { display: inline; margin-left: 6px; font-size: 14px; }
.wg-fix-in {
  width: 100%; resize: none; padding: 14px 20px; border-radius: var(--r-md); border: 3px solid var(--line); background: #fff;
  font-family: "Aptos", Calibri, "Segoe UI", sans-serif; font-size: 30px; line-height: 1.3; color: #000;
}
.wg-fix-in:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 6px rgba(47, 115, 112, .15); }
.wg-fix-in.is-right { border-color: var(--leaf); background: var(--leaf-l); }
.wg-fix-model { padding: 10px 18px; border-radius: var(--r-md); background: var(--orange-l); }
.wg-fix-ml { display: block; font-size: 17px; font-weight: 700; color: var(--orange-d); }
.wg-fix-ml .vi { display: inline; margin-left: 6px; font-size: 13px; }
.wg-fix-mt { display: block; font-family: "Aptos", Calibri, "Segoe UI", sans-serif; font-size: 28px; color: #000; }

/* do: a small Word task inside the card */
.wg-q-card.is-do { padding: 14px 16px 14px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; gap: 10px 16px; text-align: left; }
.wg-q-card.is-do .wg-q-h { font-size: 26px; margin: 0; align-self: center; }
.wg-q-card.is-do .wg-q-h .vi { font-size: 16px; }
.wg-q-card.is-do .wg-q-foot { grid-column: 2; grid-row: 1; min-height: 0; }
.wg-q-card.is-do .wg-q-fbcol { max-width: 420px; }
.wg-q-card.is-do .wg-q-feedback { font-size: 18px; }
.wg-q-card.is-do .wg-q-main { grid-column: 1 / -1; padding: 0; align-items: stretch; }
.wg-do-host { width: 100%; height: 100%; min-height: 0; }

/* ---------- Mission (#s4) ---------- */
.wg-mis { height: 100vh; display: grid; grid-template-columns: 300px 1fr; gap: 12px; padding: 10px; overflow: hidden; animation: fadeIn .4s var(--ease) both; }
.wg-mcol { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 12px; border-radius: 22px; min-height: 0; overflow: auto; }
.wg-eyebrow { font-size: 14px; font-weight: 800; color: var(--orange-d); line-height: 1.2; }
.wg-eyebrow .vi { font-size: 12px; color: var(--ink-3); }
.wg-m-goal { font-size: 25px; line-height: 1.15; }
.wg-m-goal .vi { font-size: 16px; margin-top: 3px; }
.wg-m-scn { font-size: 16px; color: var(--ink-2); line-height: 1.3; }
.wg-m-scn .vi { font-size: 13px; }
.wg-m-look { font-size: 16px; font-weight: 700; color: var(--ink-2); line-height: 1.25; }
.wg-m-look .vi { font-size: 13px; }
.wg-thumb { position: relative; height: 90px; margin-top: 6px; overflow: hidden; border-radius: 10px; background: #fff; border: 1px solid #DCD3C3; box-shadow: 0 3px 0 #EFE6D6; }
.wg-thumb-page { position: absolute; left: 0; top: 0; width: 7in; padding: .25in; transform-origin: 0 0; background: #fff; color: #000; pointer-events: none; user-select: none; }
.wg-thumb-ok { position: absolute; top: 4px; right: 8px; font-size: 20px; font-weight: 800; color: var(--leaf-d); opacity: 0; transition: opacity .4s; }
.wg-thumb.is-met .wg-thumb-ok { opacity: 1; }
.wg-msteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wg-mstep { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 16px; background: var(--cream); border: 2px solid transparent; font-size: 17px; font-weight: 700; line-height: 1.2; transition: background .3s, border-color .3s; }
.wg-mstep .vi { font-size: 13px; }
.wg-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #E4D6C1; font-size: 16px; font-weight: 800; }
.wg-mstep.now { background: var(--orange-l); border-color: var(--orange); }
.wg-mstep.now .wg-num { background: var(--orange); color: #3B2200; }
.wg-mstep.done { background: var(--leaf-l); }
.wg-mstep.done .wg-num { background: var(--leaf); color: #fff; }
.wg-mstep.done .wg-num::before { content: "✓"; }
.wg-mstep.done .wg-num span { display: none; }
.wg-offer {
  min-height: 56px; width: 100%; border-radius: 999px; border: 2px dashed var(--orange); background: #fff; font-size: 18px; font-weight: 800;
  line-height: 1.15; cursor: pointer; flex: none;
}
.wg-offer .vi { font-size: 13px; }
.wg-offer { background: #FFF3DF; }
.wg-offer[hidden] { display: none; }
.wg-helpbtn {
  display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 2px 20px; flex: none; border-radius: 999px;
  border: 2px solid var(--teal); background: #fff; color: var(--teal-d); font-size: 20px; font-weight: 800; line-height: 1.1; text-align: left; cursor: pointer;
  transition: background .2s;
}
.wg-helpbtn .vi { font-size: 13px; }
.wg-helpbtn:hover:not([disabled]) { background: var(--teal-l); }
.wg-helpbtn[disabled] { opacity: .5; cursor: default; }
.wg-ladder { display: flex; gap: 4px; }
.wg-ladder i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--teal); }
.wg-ladder i.f { background: var(--teal); }
.wg-ladder i[hidden] { display: none; }
.wg-colhint { font-size: 17px; font-weight: 700; padding: 8px 12px; border-radius: 12px; background: var(--ink); color: #fff; line-height: 1.3; }
.wg-colhint .vi { color: #D6E2EE; font-size: 13px; }
.wg-explore { font-size: 13.5px; color: var(--ink-2); line-height: 1.3; background: var(--teal-l); border-radius: 12px; padding: 6px 10px; }
.wg-explore .vi { font-size: 12.5px; }
.wg-finish-in {
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 48px; margin-left: 18px; padding: 2px 18px;
  border-radius: 999px; border: 2px solid var(--line); background: rgba(255, 255, 255, .8); font-size: 17px; font-weight: 700; color: var(--ink-2); line-height: 1.15; text-decoration: none;
}
.wg-finish-in .vi { font-size: 12px; }
.wg-finish-in:hover { border-color: var(--teal); color: var(--ink); }
.wg-offer:not([hidden]) ~ .wg-explore { display: none; }
.wg-mwork { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
/* Finish, Help and Ask sit together at the top; the right side stays clear for the fixed Vietnamese switch. */
.wg-mtop { flex: none; height: 62px; display: flex; align-items: center; gap: 12px; padding: 0 230px 6px 6px; }
.wg-whost { flex: 1; min-height: 0; display: flex; }
.wg-whost > * { flex: 1; min-width: 0; }
.wg-mock-missing { margin: auto; max-width: 560px; padding: 32px 36px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; flex: none !important; }

/* ---------- Success (#s6) ---------- */
.wg-win-screen { height: 100vh; overflow: hidden; }
.wg-win { max-width: 760px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.wg-stars { display: flex; gap: 14px; justify-content: center; }
.wg-stars .wg-star { width: 58px; height: 58px; }
.wg-potstage { position: relative; width: 250px; height: 250px; margin: 12px 0 14px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #FFF1D6 0, #FBE3BD 60%, #F5D3A1 100%); }
.wg-pot { position: absolute; left: 50%; bottom: 12px; width: 196px; margin-left: -98px; }
.wg-potstage .grow-old { animation: wgShrinkAway 1.1s .5s var(--ease) both; }
.wg-potstage.grows .grow-new { transform-origin: 150px 240px; transform-box: view-box; animation: wgGrowIn 1.2s .8s var(--ease) both; }
.wg-potstage.watered .grow-new { transform-origin: 150px 240px; transform-box: view-box; animation: wgPerk 1.4s .6s var(--ease) both; }
@keyframes wgShrinkAway { from { opacity: 1; } to { opacity: 0; } }
@keyframes wgGrowIn { from { opacity: 0; transform: scale(.45); } 70% { opacity: 1; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
@keyframes wgPerk { 0% { transform: scale(.96); } 50% { transform: scale(1.04); } 100% { transform: scale(1); } }
.wg-drops { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); display: flex; gap: 14px; }
.wg-drops i { width: 8px; height: 12px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #5AA8E0; animation: wgDrip 1.6s ease-in 3 both; }
.wg-drops i:nth-child(2) { animation-delay: .3s; }
.wg-drops i:nth-child(3) { animation-delay: .6s; }
@keyframes wgDrip { 0% { opacity: 0; transform: translateY(-6px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(40px); } }
.wg-win h1 { font-size: 44px; }
.wg-win h1 .vi { font-size: 26px; margin-top: 6px; }
.wg-newbadge { margin-top: 12px; font-size: 20px; font-weight: 700; color: var(--leaf-d); line-height: 1.3; animation: fadeIn .5s 1.4s both; }
.wg-newbadge .vi { font-size: 15px; }
.wg-win .btn { margin-top: 20px; min-width: 260px; }

/* ---------- Garden (#s7) ---------- */
.wg-garden { height: 100vh; max-width: 1340px; display: flex; flex-direction: column; padding: 10px 24px 12px; overflow: hidden; }
.wg-g-head { flex: none; display: flex; align-items: center; gap: 16px; min-height: 64px; margin-bottom: 8px; padding-right: 330px; }
.wg-g-head h1 { font-size: 34px; line-height: 1.05; }
.wg-g-head h1 .vi { font-size: 16px; }
.wg-g-sum { display: flex; gap: 8px; }
.wg-kind { flex-direction: row; gap: 6px; padding-left: 6px; background: var(--leaf-l); color: var(--leaf-d); }
.wg-kind svg { width: 30px; height: 33px; flex: none; }
.wg-kind > span { display: flex; flex-direction: column; }
.wg-g-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 360px; gap: 20px; padding-bottom: 80px; }
.wg-g-left { min-height: 0; display: flex; flex-direction: column; }
.wg-g-empty { font-size: 19px; color: var(--ink-2); margin-bottom: 10px; line-height: 1.3; }
.wg-g-empty .vi { font-size: 15px; }
.wg-beds { display: grid; gap: 12px; align-content: start; }
.wg-beds.cols-1 { grid-template-columns: 1fr; }
.wg-beds.cols-2 { grid-template-columns: repeat(2, 1fr); }
.wg-beds.cols-3 { grid-template-columns: repeat(3, 1fr); }
.wg-bed { background: #fff; border-radius: 18px; box-shadow: var(--sh-sm); padding: 8px 12px 12px; display: flex; flex-direction: column; min-width: 0; }
.wg-bed-h { display: flex; align-items: flex-start; gap: 8px; font-size: 16px; font-weight: 800; line-height: 1.15; min-height: 38px; }
.wg-bed-h .vi { font-size: 12.5px; margin-top: 1px; }
.wg-bed-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--teal-l); color: var(--teal-d); display: grid; place-items: center; font-size: 13px; }
.wg-bed-dish { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--orange-d); white-space: nowrap; line-height: 24px; }
.wg-soil {
  position: relative; margin-top: 6px; min-height: 92px; border-radius: 12px 12px 9px 9px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-around; gap: 2px 0; padding: 8px 4px 14px;
  background: radial-gradient(circle at 20% 70%, rgba(255, 255, 255, .07) 0 2px, transparent 3px) 0 0 / 22px 16px, radial-gradient(circle at 70% 30%, rgba(0, 0, 0, .12) 0 2px, transparent 3px) 0 0 / 18px 14px, linear-gradient(#8A5A3B, #7A4E33);
  box-shadow: inset 0 8px 0 -2px #6E4529, inset 0 -9px 0 #B87C49, 0 4px 0 #A86E3E;
}
.wg-beds.cols-1 .wg-soil { min-height: 150px; }
.wg-pbtn { position: relative; border: 0; background: transparent; padding: 0; cursor: pointer; width: 60px; height: 82px; border-radius: 12px; }
.wg-beds.cols-1 .wg-pbtn { width: 84px; height: 112px; }
.wg-beds.cols-3 .wg-pbtn { width: 46px; height: 66px; }
.wg-pbtn:hover { background: rgba(255, 255, 255, .1); }
.wg-pbtn .wg-plant { width: 100%; height: 86%; transform-origin: 50% 100%; animation: wgSway 5s ease-in-out infinite; animation-delay: var(--d, 0s); }
.wg-pbtn.is-wilt .wg-plant { animation: wgHop 2.6s ease-in-out infinite; }
@keyframes wgSway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2.5deg); } }
@keyframes wgHop { 0%, 70%, 100% { transform: translateY(0); } 78% { transform: translateY(-7px); } 86% { transform: translateY(0); } 92% { transform: translateY(-3px); } }
.wg-drop { position: absolute; top: -4px; left: 50%; margin-left: -9px; font-size: 16px; line-height: 1; pointer-events: none; animation: wgBob 2.4s ease-in-out infinite; }
@keyframes wgBob { 50% { transform: translateY(-3px); } }
.wg-tip {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translate(-50%, 6px); z-index: 5; width: max-content; max-width: 260px;
  padding: 6px 12px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.25; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.wg-tip .vi { color: #D6E2EE; font-size: 12px; }
.wg-pbtn:hover .wg-tip, .wg-pbtn:focus-visible .wg-tip { opacity: 1; transform: translate(-50%, 0); }
/* How a plant grows (a tab beside Kitchen and Badges): the four stages top to bottom, then the watering and star notes. */
.wg-legend-tap { margin-top: 8px; padding-left: 220px; font-size: 14px; color: var(--ink-2); } /* clear of the fixed Back home link */
.wg-legend-tap .vi { display: inline; margin-left: 4px; font-size: 12px; }
.wg-howto-h { font-size: 16px; color: var(--ink); line-height: 1.15; }
.wg-steps { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 4px 0 0; padding: 0; }
.wg-steps li { display: flex; align-items: center; gap: 10px; padding: 3px 6px; border-radius: 12px; background: var(--cream); }
.wg-steps svg { width: 34px; height: 37px; flex: none; }
.wg-steps b { display: block; font-size: 16px; color: var(--ink); line-height: 1.15; }
.wg-steps small { display: block; font-size: 15px; color: var(--ink-2); line-height: 1.2; }
.wg-howto .vi { display: block; margin: 0; font-size: 12px; font-weight: 400; }
.wg-howto .wg-steps b .vi { display: inline; margin-left: 6px; }
.wg-howto-note.is-stars { flex-direction: column; align-items: flex-start; gap: 0; }
.wg-howto-note { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; color: var(--ink-2); line-height: 1.25; }
.wg-howto-note svg { width: 32px; height: 36px; flex: none; }
.wg-howto-note.is-stars { padding: 6px 10px; border-radius: 12px; background: var(--orange-l); color: var(--orange-d); font-weight: 700; }
.wg-g-aside { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.wg-panel { background: #fff; border-radius: 18px; box-shadow: var(--sh-sm); padding: 12px 16px; }
.wg-panel[hidden] { display: none; }
.wg-tmsg { background: linear-gradient(150deg, #FFF6E6, #FDE7C6); border: 2px solid #F7C98D; }
.wg-tmsg p { font-size: 19px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.wg-tmsg p + p { margin-top: 6px; font-size: 16px; }
.wg-tmsg p.is-new { animation: wgPop .6s var(--ease) both; }
.wg-from { font-size: 12px; color: var(--orange-d); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }
.wg-from .vi { display: inline; margin-left: 6px; font-size: 11px; letter-spacing: 0; text-transform: none; }
.wg-stabs { display: flex; gap: 6px; margin-bottom: 10px; }
.wg-stab { flex: 1; min-height: 52px; border-radius: 12px; border: 2px solid #E7DCCB; background: #fff; font-size: 17px; font-weight: 800; cursor: pointer; line-height: 1.1; }
.wg-stab .vi { font-size: 12px; }
.wg-stab[aria-selected="true"] { border-color: var(--teal); background: var(--teal-l); color: var(--teal-d); }
.wg-tpanel[hidden] { display: none; }
.wg-shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 8px; }
.wg-dish { text-align: center; font-size: 13px; font-weight: 700; line-height: 1.15; padding-top: 2px; color: var(--ink-3); }
.wg-dish svg { width: 100%; height: 44px; }
.wg-dish.is-cooked { color: var(--ink); }
.wg-dish small { display: block; font-weight: 400; color: var(--ink-2); font-size: 11px; }
.wg-dish small .vi { display: inline; margin-left: 4px; font-size: 10px; }
.wg-dish-n { display: block; min-height: 15px; }
.wg-steam { animation: wgSteam 3s ease-in-out infinite; }
@keyframes wgSteam { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
.wg-plank { grid-column: 1 / -1; height: 9px; border-radius: 4px; background: linear-gradient(#D49A63, #B67A45); box-shadow: 0 3px 0 #94603A; margin: 2px 0 8px; }
.wg-k-note { font-size: 14px; color: var(--ink-2); line-height: 1.3; }
.wg-k-note .vi { font-size: 12px; }
.wg-badges { display: flex; flex-wrap: wrap; gap: 8px; max-height: 300px; overflow: auto; }
.wg-ican { font-size: 15px; font-weight: 700; padding: 6px 12px; border-radius: 16px; background: var(--leaf-l); color: var(--leaf-d); line-height: 1.25; }
.wg-ican .vi { font-size: 12px; color: inherit; opacity: .85; }
.wg-ican.is-fresh { background: var(--orange-l); color: var(--orange-d); }
.wg-subh { font-size: 16px; font-weight: 800; margin: 14px 0 8px; }
.wg-subh .vi { display: inline; margin-left: 6px; font-size: 12px; }
.wg-helper { display: flex; gap: 12px; align-items: center; font-size: 16px; line-height: 1.3; }
.wg-hb { width: 50px; height: 50px; flex: none; border-radius: 50%; background: #EAE3F7; display: grid; place-items: center; font-size: 26px; }
.wg-helper small { display: block; color: var(--ink-2); font-size: 13px; }
.wg-pcard-back { position: fixed; inset: 0; z-index: 85; background: rgba(23, 50, 77, .28); display: flex; align-items: center; justify-content: center; animation: fadeIn .25s both; }
.wg-pcard { position: relative; width: 440px; max-width: calc(100vw - 32px); padding: 26px 30px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.wg-pcard-plant { width: 120px; height: 132px; }
.wg-pcard-plant.is-wilt { animation: wgHop 2.6s ease-in-out infinite; }
.wg-pcard h2 { font-size: 26px; line-height: 1.2; }
.wg-pcard h2 .vi { font-size: 17px; }
.wg-pcard .chip { margin: 6px 0 14px; font-size: 17px; flex-direction: column; gap: 0; }
.wg-pcard .chip .vi { display: block; margin: 0; font-size: 13px; }
.wg-pcard .btn { width: 100%; }
.wg-pclose { position: absolute; top: 12px; right: 12px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--cream); font-size: 20px; cursor: pointer; }

/* ---------- End (#s8) ---------- */
.wg-end { height: 100vh; overflow: hidden; padding-top: 16px; }
.wg-end-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wg-hero { grid-column: 1 / -1; text-align: center; padding-right: 0; margin-top: 40px; }
.wg-hero h1 { font-size: 38px; }
.wg-hero h1 .vi { font-size: 22px; }
.wg-total { margin-top: 8px; font-size: 22px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 10px; }
.wg-total .vi { display: inline; margin-left: 8px; font-size: 16px; }
.wg-evid, .wg-watered { padding: 16px 26px; }
.wg-watered.is-wide { grid-column: 1 / -1; }
.wg-evid h2, .wg-watered h2 { font-size: 21px; font-weight: 800; line-height: 1.25; margin-bottom: 10px; }
.wg-evid h2 .vi, .wg-watered h2 .vi { font-size: 15px; }
.wg-cmp { display: flex; align-items: center; gap: 16px; }
.wg-c { flex: 1; text-align: center; font-size: 17px; color: var(--ink-2); line-height: 1.25; }
.wg-c .vi { font-size: 13px; }
.wg-c-stars { display: flex; justify-content: center; gap: 4px; margin-bottom: 6px; }
.wg-c-stars .wg-star { width: 34px; height: 34px; }
.wg-c.is-now { color: var(--leaf-d); font-weight: 800; }
.wg-arrow { font-size: 32px; color: var(--orange); }
.wg-what { margin-top: 10px; font-size: 17px; color: var(--ink-2); text-align: center; line-height: 1.3; }
.wg-what .vi { font-size: 13px; }
.wg-wrow { display: flex; justify-content: space-around; align-items: flex-start; gap: 10px; padding-top: 8px; }
.wg-w { position: relative; flex: 1; min-width: 0; max-width: 200px; display: flex; flex-direction: column; align-items: center; font-size: 14px; font-weight: 700; line-height: 1.2; text-align: center; }
.wg-w .vi { font-size: 11.5px; }
.wg-w-t { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.wg-w .wg-plant { width: 84px; height: 96px; transform-origin: 50% 100%; animation: wgSway 5s ease-in-out infinite; }
.wg-drip { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); color: #3A8BD0; font-size: 14px; letter-spacing: 4px; animation: wgDripDots 2s ease-in infinite; }
@keyframes wgDripDots { 0% { opacity: 0; transform: translate(-50%, -6px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 14px); } }
.wg-tell { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; padding: 14px 30px; background: var(--teal); color: #fff; }
.wg-tell .e { font-size: 44px; }
.wg-tell p { font-size: 24px; font-weight: 800; line-height: 1.25; }
.wg-tell .vi { color: #D5ECEA; font-size: 17px; }
.wg-bye { grid-column: 1 / -1; display: flex; align-items: center; gap: 28px; padding: 0 6px; }
.wg-bye p { font-size: 22px; font-weight: 700; line-height: 1.3; }
.wg-bye .vi { font-size: 16px; }

/* Infinite loops would flicker at the global .01ms duration: stop them instead. */
@media (prefers-reduced-motion: reduce) {
  .wg-pbtn .wg-plant, .wg-pbtn.is-wilt .wg-plant, .wg-pcard-plant.is-wilt, .wg-drop, .wg-steam, .wg-w .wg-plant, .wg-drip,
  .wg-choice.is-reveal, .wg-ph-r.is-reveal, .wg-bin.is-reveal, .wg-drops i { animation: none; }
  .wg-drip, .wg-drops { display: none; }
  .wg-choice.is-reveal, .wg-ph-r.is-reveal, .wg-bin.is-reveal { box-shadow: 0 0 0 5px rgba(242, 155, 56, .45); }
}

/* Order items: keep a 4-step list clear of the question footer when Vietnamese is shown. */
.wg-q-main { padding: 4px 0 2px; }
.wg-order-col { gap: 4px; }
.wg-order-pool, .wg-order-slots { gap: 6px; }
.wg-order-slots { padding: 6px; }
.wg-step { padding: 3px 12px; border-width: 2px; }
.wg-step, .wg-slot-empty { min-height: 50px; }
.wg-step-n { width: 30px; height: 30px; }

/* Replay: the real actions, once, over the answered item. Skip is a small link; Next stays the main button. */
.wg-q-card { position: relative; }
.wg-replay {
  position: absolute; z-index: 30; display: flex; flex-direction: column; gap: 6px; padding: 6px 10px 8px;
  border-radius: var(--r-md); background: var(--teal-l); box-shadow: 0 0 0 2px var(--teal) inset; text-align: left; animation: fadeIn .3s var(--ease) both;
}
.wg-replay-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.wg-replay-h { font-size: 19px; font-weight: 800; color: var(--teal-d); line-height: 1.2; }
.wg-replay-h .vi { display: inline; margin: 0 0 0 8px; font-size: 14px; color: var(--teal-d); }
.wg-replay-skip {
  flex: none; display: inline-flex; align-items: baseline; gap: 6px; min-height: 40px; padding: 4px 16px; border-radius: 999px;
  border: 2px solid transparent; background: rgba(255, 255, 255, .7); color: var(--ink-2); font: inherit; font-size: 17px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; line-height: 1.2;
}
.wg-replay-skip .vi { display: inline; margin: 0; font-size: 13px; color: inherit; text-decoration: none; }
.wg-replay-skip:hover, .wg-replay-skip:focus-visible { border-color: var(--teal); color: var(--ink); outline: none; }
.wg-replay-stage { position: relative; flex: 1; min-height: 0; display: flex; justify-content: center; border-radius: 10px; overflow: hidden; background: #fff; }
.wg-replay-stage > .wd { flex: 1; min-width: 0; }
.wg-replay-stage > .mk-root { flex: 1 1 auto; width: auto; max-width: 900px; }
.wg-replay-blank { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 18px 24px; background: #FAFAFA; }
.wg-replay-line {
  width: min(640px, 90%); min-height: 52px; padding: 0 16px; border-bottom: 2px solid var(--line);
  font-family: "Aptos", Calibri, "Segoe UI", sans-serif; font-size: 28px; color: #000;
}
/* The card behind the replay keeps its layout; only the replay is read. */
.wg-q-card.is-replaying > .wg-q-h, .wg-q-card.is-replaying > .wg-q-hrow, .wg-q-card.is-replaying > .wg-q-main { visibility: hidden; }

/* The "where you are" picture next to the prompt (item.context): a mini mock scaled down, never clickable. */
.wg-q-hrow { display: flex; align-items: center; justify-content: center; gap: 20px; }
.wg-q-hrow .wg-q-h { flex: 1; min-width: 0; margin: 0; font-size: 28px; text-align: left; }
.wg-q-hrow .wg-q-h .vi { font-size: 18px; }
.wg-q-context { flex: none; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wg-q-ctx-pic { width: 304px; height: 152px; position: relative; overflow: hidden; border-radius: 8px; box-shadow: 0 0 0 2px var(--line); background: #F3F3F3; }
.wg-q-ctx-in { position: absolute; left: 0; top: 0; width: 760px; height: 380px; display: flex; transform: scale(.4); transform-origin: 0 0; }
.wg-q-ctx-in > .mk-root { width: 760px; flex: 1 1 760px; }
.wg-q-context figcaption { font-size: 14px; font-weight: 700; color: var(--ink-2); line-height: 1.2; }
.wg-q-context figcaption .vi { display: inline; margin-left: 6px; font-size: 12px; }

/* Pick items with a picture of a table (item.figure): the table above the choices, marked cells shaded. */
.wg-q-main:has(> .wg-q-figure) { flex-direction: column; gap: 18px; }
.wg-q-figure { margin: 0; }
.wg-q-ftable { border-collapse: collapse; font: 20px/1.3 Calibri, "Segoe UI", Arial, sans-serif; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.wg-q-ftable td { border: 1px solid #000; padding: 8px 22px; min-width: 120px; color: #000; }
.wg-q-ftable td.is-mark { background: #FFE8A3; outline: 3px solid var(--orange, #F29B38); outline-offset: -3px; }
