/* =====================================================================
   Learner portal (/app)
   ===================================================================== */
.app { --top-h: 66px; --rail-w: 104px; --tab-h: 72px; background: radial-gradient(1200px 500px at 60% -10%, #FFF1CF 0%, transparent 60%), var(--cream); }
.app::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: var(--pattern-star); background-size: 72px 72px; opacity: 0.07; }

/* ------------------------------------------------------------------ top bar */
.app-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-header); height: var(--top-h);
  display: flex; align-items: center; gap: 12px; padding: 0 clamp(12px, 3vw, 24px);
  background: rgba(255, 251, 241, 0.86); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1.5px solid var(--line);
}
.app-top__logo { display: block; width: clamp(128px, 14vw, 156px); flex: none; }
.app-top__logo svg { width: 100%; height: auto; }
.app-top__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.app-pill { display: inline-flex; align-items: center; gap: 4px; height: 42px; padding: 0 14px 0 6px; border-radius: 99px; background: #fff; border: 1.5px solid var(--gold-200); text-decoration: none; color: var(--gold-900); box-shadow: 0 3px 0 var(--gold-100); }
.app-pill__flower { width: 30px; height: 30px; display: block; }
.app-pill__flower svg { width: 100%; height: 100%; }
.app-pill strong { font: 400 1.25rem/1 var(--f-display); padding-top: 3px; margin-left: 2px; }
.app-pill__of { font: 700 0.85rem/1 var(--f-head); color: var(--ink-3); }
.app-icon-btn { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: #fff; border: 1.5px solid var(--line); color: var(--gold-800); transition: transform var(--dur-2) var(--ease-spring), border-color var(--dur-2); }
.app-icon-btn:hover { transform: translateY(-2px); border-color: var(--gold-300); }
.app-icon-btn .i { width: 21px; height: 21px; }
.app-avatar { border-radius: 50%; transition: transform var(--dur-2) var(--ease-spring); }
.app-avatar:hover { transform: scale(1.06) rotate(-6deg); }
.avatar--guest { color: var(--gold-700); }
.avatar--guest .i { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ navigation */
.app-nav { position: fixed; z-index: var(--z-sticky); display: flex; }
.app-nav__item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--ink-3); font: 800 0.8rem/1 var(--f-head); transition: color var(--dur-2); -webkit-tap-highlight-color: transparent; }
.app-nav__icon { position: relative; width: 48px; height: 38px; border-radius: 16px; display: grid; place-items: center; transition: background var(--dur-2), transform 0.45s var(--ease-spring), color var(--dur-2); }
.app-nav__icon .i { width: 24px; height: 24px; }
.app-nav__item:hover { color: var(--ink); }
.app-nav__item.is-active { color: var(--gold-900); }
.app-nav__item.is-active .app-nav__icon { background: linear-gradient(180deg, #F7E1AC, #EFCF84); color: var(--gold-900); transform: translateY(-2px) scale(1.05); box-shadow: 0 3px 0 #E0BD6A; }
@media (min-width: 1024px) {
  .app-nav { top: var(--top-h); left: 0; bottom: 0; width: var(--rail-w); flex-direction: column; gap: 8px; padding: 22px 0; background: rgba(255, 251, 241, 0.7); border-right: 1.5px solid var(--line); }
  .app-nav__item { padding: 10px 0; }
  .app-main { margin-left: var(--rail-w); }
  .app-banners { margin-left: var(--rail-w); }
}
@media (max-width: 1023px) {
  .app-nav { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); height: var(--tab-h); justify-content: space-around; padding: 0 6px; border-radius: 26px; background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1.5px solid var(--line); box-shadow: var(--sh-lg); }
  .app-nav__item { flex: 1; min-width: 0; }
  .app-nav__label { font-size: 0.72rem; }
  .app-main { padding-bottom: calc(var(--tab-h) + 40px + env(safe-area-inset-bottom)); }
}
/* small phones: "Certificate" and "Competition" side by side need a slightly smaller label */
@media (max-width: 380px) { .app-nav { padding: 0 3px; } .app-nav__label { font-size: 0.64rem; letter-spacing: -0.01em; } }

/* ------------------------------------------------------------------ main + banners */
.app-banners { padding-top: var(--top-h); }
.app-banners:empty { padding-top: var(--top-h); }
.banner { display: flex; align-items: center; gap: 12px; margin: 12px auto 0; width: min(100% - 2 * var(--gutter), 1120px); padding: 10px 12px 10px 14px; border-radius: 18px; font-weight: 600; }
.banner p { flex: 1; min-width: 0; line-height: 1.4; }
.banner__icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.banner--guest { background: var(--sky-50); border: 1.5px solid var(--sky-100); color: #1F4E7A; }
.banner--guest .banner__icon { background: #fff; color: var(--sky); }
.banner--note { background: #fff; border: 1.5px solid var(--rose-100); color: var(--ink-2); }
.banner--note .banner__icon { background: var(--rose-50); color: var(--rose); }
.banner__x { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-3); }
.banner__x:hover { background: var(--cream-2); }
/* Phones: the guest banner's text takes the first row and its button goes under it (the text was squeezed to a sliver) */
@media (max-width: 560px) { .banner { flex-wrap: wrap; } .banner:has(> .btn) p { flex-basis: calc(100% - 48px); } .banner .btn { margin-left: 48px; } }
.app-main { outline: none; min-height: calc(100dvh - var(--top-h)); }
.view { width: min(100% - 2 * var(--gutter), 1120px); margin: 0 auto; padding: 22px 0 40px; display: grid; gap: clamp(18px, 2.6vw, 28px); }
.app-boot { min-height: 60vh; display: grid; place-content: center; justify-items: center; gap: 14px; font: 700 1rem/1 var(--f-hand); color: var(--gold-800); }
.app-boot__flower { width: 70px; height: 70px; animation: spin 2.4s linear infinite; }
.app-boot__flower svg { width: 100%; height: 100%; }
.app-boot--error { padding: 0 16px; text-align: center; }
.app-boot--error strong { font: 700 1.25rem/1.3 var(--f-head); color: var(--ink); }
.app-boot--error p { max-width: 36ch; margin: 0; font: 600 .95rem/1.5 var(--f-body); color: var(--ink-2); }
.app-boot__flower--still { animation: none; }
.app-boot__acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

/* Immersive views (reader & quiz) take the whole screen */
.is-immersive .app-top, .is-immersive .app-nav, .is-immersive .app-banners { display: none; }
.is-immersive .app-main { margin-left: 0; padding: 0; min-height: 100dvh; }

/* ------------------------------------------------------------------ shared view pieces */
.view-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.view-head__text { flex: 1 1 320px; min-width: 0; }
.view-head__text > * + * { margin-top: 8px; }
.view-head__title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.view-head__sub { color: var(--ink-2); font-size: 1.05rem; }
.view-head__art { width: 86px; height: 86px; flex: none; animation: spin 30s linear infinite; }
.view-head__art svg { width: 100%; height: 100%; }
.comp-amount { color: var(--gold-700); font-size: 1.12em; text-shadow: 2px 2px 0 var(--gold-100); }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; }
.section-title .i { color: var(--gold-600); }
.panel { background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-xl); padding: clamp(18px, 2.6vw, 24px); box-shadow: var(--sh-sm); display: grid; gap: 14px; align-content: start; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel__title { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.panel__title .i { color: var(--gold-600); }
.panel__note { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; color: var(--ink-3); }
.panel__note .i { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.ring__label strong { display: block; font-size: 2.2rem; color: var(--gold-800); padding-top: 4px; }
.ring__label small { display: block; font: 700 0.78rem/1.2 var(--f-head); color: var(--ink-3); max-width: 80px; margin: 2px auto 0; }
.empty-card { display: grid; justify-items: center; text-align: center; gap: 12px; padding: clamp(28px, 5vw, 48px) 20px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-2xl); box-shadow: var(--sh-sm); }
.empty-card__art svg { height: 150px; width: auto; }
.empty-card__title { font-size: 1.5rem; }
.empty-card__text { color: var(--ink-2); max-width: 30rem; }
.empty-card__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }

/* Save-garden & tour modals */
.save-garden, .tour { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 8px 0 4px; }
.save-garden__art { width: 150px; height: 150px; display: flex; align-items: flex-end; justify-content: center; }
.save-garden__art svg { width: auto; height: 100%; max-width: 100%; }
/* guest welcome: a small round garden with the Level 1 bud growing on a hill */
.save-garden__scene {
  position: relative; display: block; width: 148px; height: 148px; margin-top: 2px; overflow: hidden; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #FFFFFF 0%, #EAF5FF 38%, #FFF4D8 76%);
  box-shadow: 0 0 0 5px #fff, 0 0 0 6.5px var(--gold-200), 0 14px 30px -12px rgba(166, 123, 36, 0.45);
}
.save-garden__sun { position: absolute; right: 26px; top: 22px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #FFF6C2, #FFD35A 60%, #F5B32E); box-shadow: 0 0 0 5px rgba(255, 220, 110, 0.25); }
.save-garden__cloud { position: absolute; left: 24px; top: 34px; width: 26px; height: 9px; border-radius: 99px; background: #fff; box-shadow: 8px -4px 0 -1px #fff, 15px 0 0 -2px #fff; animation: sg-drift 9s ease-in-out infinite alternate; }
.save-garden__hill { position: absolute; left: -12%; right: -12%; bottom: -26px; height: 70px; border-radius: 50% 50% 0 0 / 72% 72% 0 0; background: linear-gradient(180deg, #A8E0B3 0%, #6CC08A 45%, #4FA56E 100%); }
.save-garden__sprout { position: absolute; left: 50%; bottom: 14px; width: 90px; translate: -50% 0; }
.save-garden__sprout svg { display: block; width: 100%; height: auto; }
.save-garden__sprout .pl-soil { display: none; }
.save-garden__spark { position: absolute; left: var(--x); top: var(--y); width: 11px; height: 11px; translate: -50% -50%; opacity: 0; background: conic-gradient(from 45deg, transparent 0 20%, #F4C95D 20% 30%, transparent 30% 45%, #F4C95D 45% 55%, transparent 55% 70%, #F4C95D 70% 80%, transparent 80%); -webkit-mask: radial-gradient(circle, #000 0 30%, transparent 72%); mask: radial-gradient(circle, #000 0 30%, transparent 72%); animation: sg-twinkle 2.6s ease-in-out var(--d) infinite; }
@keyframes sg-twinkle { 0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@keyframes sg-drift { to { translate: 16px 0; } }
.save-garden__chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 12px; border-radius: 99px; background: var(--leaf-50); color: var(--leaf-dark); font: 700 0.82rem/1 var(--f-head); }
.save-garden__chip .i { width: 15px; height: 15px; }
.save-garden__title, .tour__title { font-size: 1.6rem; line-height: 1.2; }
.save-garden__chip + .save-garden__title { margin-top: -4px; }
.save-garden__text, .tour__text { color: var(--ink-2); }
.save-garden__actions { display: grid; gap: 10px; width: 100%; margin-top: 8px; }
.tour__art { height: 170px; display: grid; place-items: center; }
.tour__art svg { height: 160px; width: auto; }
.tour__page { height: 170px; width: auto; border-radius: 12px; box-shadow: var(--sh-md); rotate: -4deg; }
.tour__dots { display: flex; gap: 8px; }
.tour__dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); transition: width 0.3s, background 0.3s; }
.tour__dots .is-on { width: 26px; border-radius: 9px; background: var(--gold-500); }
.tour__actions { display: flex; justify-content: space-between; width: 100%; margin-top: 6px; }

/* Level sheet */
.lvl-sheet { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: center; }
.lvl-sheet__art { display: grid; place-items: end center; height: 190px; border-radius: var(--r-xl); background: linear-gradient(180deg, #EAF6FF, #FFF5DE 70%, #F2E2BD); }
.lvl-sheet__art svg { height: 180px; width: auto; }
.lvl-sheet--locked .lvl-sheet__art { filter: grayscale(0.4); }
.lvl-sheet__info { display: grid; gap: 12px; }
.lvl-sheet__tag { font: 800 0.85rem/1 var(--f-head); color: var(--gold-800); letter-spacing: 0.04em; }
.lvl-sheet__title { font-size: 1.55rem; }
.lvl-sheet__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.lvl-sheet__chips svg.fl { width: 18px; height: 18px; }
.lvl-status { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); background: var(--cream); border: 1.5px solid var(--line); }
.lvl-status__row { display: flex; justify-content: space-between; font-weight: 700; color: var(--ink-2); }
.lvl-status--done, .lvl-status--locked { display: flex; gap: 12px; align-items: flex-start; }
.lvl-status--done { background: var(--ok-bg); border-color: var(--ok-line); color: #1F6E44; }
.lvl-status--locked { color: var(--ink-3); }
.lvl-status--done > .i, .lvl-status--locked > .i { width: 26px; height: 26px; flex: none; }
.lvl-status strong { display: block; font-family: var(--f-head); }
.lvl-sheet__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lvl-sheet__hint { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; color: var(--ink-3); }
.lvl-sheet__hint .i { width: 18px; height: 18px; flex: none; margin-top: 2px; }
@media (max-width: 560px) { .lvl-sheet { grid-template-columns: 1fr; } .lvl-sheet__art { height: 150px; } .lvl-sheet__art svg { height: 140px; } .lvl-sheet__actions .btn { flex: 1 1 100%; } }

/* ------------------------------------------------------------------ GARDEN view */
.greet { display: flex; align-items: center; gap: 20px; justify-content: space-between; }
.greet__hi { font-size: 1.25rem; color: var(--gold-800); }
.greet__name { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; text-transform: capitalize; }
.greet__sub { margin-top: 8px; color: var(--ink-2); font-size: 1.08rem; }
.greet__ring { flex: none; }
@media (max-width: 520px) { .greet__ring .ring { width: 104px !important; height: 104px !important; } .greet__ring svg { width: 104px; height: 104px; } .ring__label strong { font-size: 1.7rem; } }

.continue { position: relative; overflow: hidden; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; align-items: center; padding: clamp(18px, 3vw, 28px); border-radius: var(--r-2xl); background: linear-gradient(135deg, #FFFFFF 0%, #FFF6DF 100%); border: 1.5px solid var(--gold-200); box-shadow: var(--sh-md); isolation: isolate; }
.continue::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 215, 120, 0.5), transparent 70%); z-index: -1; }
.continue__art { height: 190px; display: grid; place-items: end center; border-radius: var(--r-xl); background: linear-gradient(180deg, #E7F4FF 0%, #FFF6E2 62%, #EBD6A9 100%); }
.continue__art svg { height: 180px; width: auto; }
.continue__body { display: grid; gap: 12px; }
.continue__tag { display: inline-flex; align-items: center; gap: 6px; font: 800 0.85rem/1 var(--f-head); color: var(--gold-800); }
.continue__title { font-size: clamp(1.45rem, 3vw, 2rem); }
.continue__text { color: var(--ink-2); }
.continue__progress { display: grid; gap: 8px; }
.continue__progress-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-weight: 700; color: var(--ink-2); }
.continue__progress-row span { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-800); }
.continue__progress-row svg.fl { width: 22px; height: 22px; }
.continue__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.continue--done { background: linear-gradient(135deg, #FFF8E6, #FFE7B8); }
@media (max-width: 640px) { .continue { grid-template-columns: 1fr; } .continue__art { height: 160px; } .continue__art svg { height: 150px; } .continue__actions .btn { flex: 1 1 100%; } }

.garden { display: grid; gap: 14px; }
.garden__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.garden__legend { display: flex; gap: 14px; padding: 0; list-style: none; font-weight: 700; font-size: 0.88rem; color: var(--ink-3); }
.garden__legend li { display: flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--bloom { background: var(--rose); }
.dot--bud { background: var(--leaf); }
.dot--seed { background: #B98A5E; }
.garden__scene { position: relative; overflow: hidden; isolation: isolate; padding: 64px clamp(10px, 2.4vw, 26px) 22px; border-radius: var(--r-2xl); border: 1.5px solid var(--line); box-shadow: var(--sh-md); background: linear-gradient(180deg, #DDF0FF 0%, #F4FAFF 26%, #FFF6E2 52%, #F3E0B6 100%); }
.garden__scene::after { content: ""; position: absolute; inset: auto 0 0; height: 30%; z-index: -1; background: linear-gradient(180deg, transparent, rgba(134, 201, 138, 0.25)); }
.garden__sun { position: absolute; z-index: -1; right: 6%; top: 14px; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle, #FFFBE0 0%, #FFE38A 45%, rgba(250, 197, 79, 0) 70%); animation: float 9s ease-in-out infinite; }
.garden__clouds { position: absolute; z-index: -1; left: 0; top: 10px; width: 70%; height: 60px; animation: float 12s ease-in-out infinite; }
.garden__sign { position: absolute; left: 50%; top: 14px; translate: -50% 0; z-index: 2; }
.garden__sign span { display: inline-block; padding: 8px 18px; border-radius: 12px; background: linear-gradient(180deg, #D6A15B, #B98142); color: #fff; font: 400 clamp(1rem, 2.2vw, 1.3rem)/1 var(--f-display); letter-spacing: 0.03em; text-shadow: 0 2px 0 rgba(90, 50, 10, 0.4); box-shadow: 0 4px 0 #8F5B2C, var(--sh-md); rotate: -2deg; white-space: nowrap; }
.garden__beds { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px 6px; }
.g-plot { position: relative; display: grid; justify-items: center; align-items: end; min-height: 146px; padding: 0; border-radius: 18px; transition: background var(--dur-2), transform var(--dur-2) var(--ease-spring); }
.g-plot:hover { background: rgba(255, 255, 255, 0.45); transform: translateY(-3px); }
.g-plot:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.g-plot__plant { width: 100%; max-width: 110px; display: block; }
.g-plot__plant svg { width: 100%; height: auto; }
.g-plot__tag { position: absolute; bottom: -2px; left: 50%; translate: -50% 0; min-width: 26px; height: 22px; padding: 4px 7px 0; border-radius: 99px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.92); color: var(--gold-800); font: 400 0.78rem/1 var(--f-display); box-shadow: var(--sh-xs); }
.g-plot__tag .i { width: 12px; height: 12px; margin-top: -4px; color: var(--ink-4); }
.g-plot--done .g-plot__tag { background: var(--gold-500); color: #fff; }
.g-plot--open .g-plot__plant { filter: drop-shadow(0 0 14px rgba(70, 160, 106, 0.45)); }
.g-plot__next { position: absolute; top: 4px; left: 50%; translate: -50% 0; padding: 4px 10px; border-radius: 99px; background: var(--leaf); color: #fff; font: 800 0.72rem/1 var(--f-head); box-shadow: 0 3px 0 var(--leaf-dark); animation: bounce-y 1.6s ease-in-out infinite; }
.g-plot--locked, .g-plot--account { opacity: 0.85; }
.g-plot.is-wiggle { animation: wiggle 0.45s ease; }
.g-plot.is-new .g-plot__plant { filter: drop-shadow(0 0 22px rgba(255, 200, 80, 0.9)); }
@media (max-width: 900px) { .garden__beds { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 560px) { .garden__beds { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g-plot { min-height: 118px; } .garden__scene { padding-top: 60px; } }

.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mini-stat { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: #fff; border: 1.5px solid var(--line); box-shadow: var(--sh-xs); text-decoration: none; color: inherit; min-width: 0; }
.mini-stat--link { transition: transform var(--dur-2) var(--ease-spring), border-color var(--dur-2); }
.mini-stat--link:hover { transform: translateY(-3px); border-color: var(--gold-300); color: inherit; }
.mini-stat__ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; flex: none; }
.mini-stat__ico .i { width: 23px; height: 23px; }
.mini-stat__ico--gold { background: var(--gold-50); color: var(--gold-700); }
.mini-stat__ico--rose { background: var(--rose-50); color: var(--rose); }
.mini-stat__ico--leaf { background: var(--leaf-50); color: var(--leaf); }
.mini-stat__ico--sky { background: var(--sky-50); color: var(--sky); }
.mini-stat strong { display: block; font-size: 1.55rem; color: var(--ink); line-height: 1; padding-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-stat small { display: block; font-weight: 700; font-size: 0.8rem; color: var(--ink-3); line-height: 1.2; }
.mini-stat > span:last-child { min-width: 0; }
@media (max-width: 860px) { .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.garden-bottom { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 16px; align-items: stretch; }
@media (max-width: 860px) { .garden-bottom { grid-template-columns: 1fr; } }
.fotd { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 20px 18px; border-radius: var(--r-xl); background: #fff; border: 1.5px solid var(--gold-200); box-shadow: var(--sh-sm); isolation: isolate; overflow: hidden; }
.fotd::before { content: ""; position: absolute; inset: 8px; border-radius: 20px; border: 2px dashed var(--gold-200); z-index: -1; }
.fotd__label { display: inline-flex; align-items: center; gap: 6px; font: 800 0.85rem/1 var(--f-head); color: var(--gold-800); }
.fotd__tag { margin-top: 6px; padding: 5px 10px; border: 2px solid var(--gold-400); border-radius: 5px; font: 700 0.66rem/1 var(--f-body); letter-spacing: 0.14em; }
.fotd__ar { font-size: clamp(1.8rem, 4vw, 2.3rem); color: var(--ink); }
.fotd__en { font: 800 1.1rem/1.3 var(--f-head); }
.fotd__ref { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; color: var(--ink-3); text-transform: uppercase; }
.coll { padding: 18px; border-radius: var(--r-xl); background: #fff; border: 1.5px solid var(--line); box-shadow: var(--sh-sm); display: grid; gap: 12px; min-width: 0; }
.coll__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.coll__list { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; padding: 0; list-style: none; }
.coll__item { display: grid; justify-items: center; gap: 4px; text-align: center; }
.coll__flower { width: 100%; max-width: 54px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--cream); border: 1.5px dashed var(--line-2); }
.coll__flower svg { width: 82%; height: 82%; }
.coll__item.is-done .coll__flower { background: radial-gradient(circle, #fff, var(--gold-50)); border: 1.5px solid var(--gold-200); }
.coll__name { font: 700 0.64rem/1.15 var(--f-head); color: var(--ink-3); }
.coll__item.is-done .coll__name { color: var(--ink-2); }
@media (max-width: 560px) { .coll__list { grid-template-columns: repeat(6, minmax(0, 1fr)); } .coll__name { display: none; } }

/* ------------------------------------------------------------------ LEVELS view (garden path) */
.path { position: relative; padding: 10px 0 30px; }
.path__vine { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.path__vine-bg { fill: none; stroke: var(--line-2); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 14; }
.path__vine-fg { fill: none; stroke: var(--leaf); stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 2px 0 rgba(46, 122, 75, 0.35)); }
.path__list { position: relative; display: grid; gap: 4px; padding: 0; list-style: none; }
.stop { --x: 50%; position: relative; height: 136px; }
.stop:nth-child(8n + 1) { --x: 50%; }
.stop:nth-child(8n + 2) { --x: 30%; }
.stop:nth-child(8n + 3) { --x: 22%; }
.stop:nth-child(8n + 4) { --x: 34%; }
.stop:nth-child(8n + 5) { --x: 56%; }
.stop:nth-child(8n + 6) { --x: 74%; }
.stop:nth-child(8n + 7) { --x: 78%; }
.stop:nth-child(8n + 8) { --x: 66%; }
.stop__node { position: absolute; left: var(--x); top: 18px; translate: -50% 0; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; z-index: 1; }
.stop__circle { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: #fff; border: 4px solid var(--line-2); box-shadow: 0 6px 0 var(--line-2), var(--sh-md); transition: transform 0.35s var(--ease-spring), box-shadow var(--dur-2); }
.stop__circle svg { width: 84%; height: 84%; }
.stop__circle svg.plant { width: 100%; height: 100%; }
.stop__node:hover .stop__circle { transform: translateY(-4px) scale(1.04); }
.stop__node:focus-visible { outline: none; }
.stop__node:focus-visible .stop__circle { outline: 3px solid var(--focus); outline-offset: 4px; }
.stop--done .stop__circle { border-color: var(--gold-400); box-shadow: 0 6px 0 #D7B25C, var(--sh-md); background: radial-gradient(circle, #fff, #FFF6DD); }
.stop--open .stop__circle { border-color: var(--leaf); box-shadow: 0 6px 0 var(--leaf-dark), var(--sh-md); background: linear-gradient(180deg, #EAF6FF, #FFF6E2); }
.stop--locked .stop__circle, .stop--account .stop__circle { background: var(--cream-2); }
.stop--locked .stop__circle svg, .stop--account .stop__circle svg { opacity: 0.8; }
.stop__badge { position: absolute; right: -2px; bottom: 2px; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: #fff; border: 2.5px solid var(--line-2); font: 400 0.95rem/1 var(--f-display); color: var(--ink-3); z-index: 2; }
.stop__badge .i { width: 16px; height: 16px; }
.stop--done .stop__badge { background: var(--leaf); border-color: #fff; color: #fff; }
.stop--open .stop__badge { background: var(--gold-500); border-color: #fff; color: #fff; padding-top: 2px; }
.is-current .stop__node::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 4px solid var(--leaf); animation: pulse-ring 1.8s ease-out infinite; }
.stop__bubble { position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 0; padding: 7px 14px; border-radius: 14px; background: var(--leaf); color: #fff; font: 800 0.88rem/1 var(--f-head); white-space: nowrap; box-shadow: 0 4px 0 var(--leaf-dark); animation: bounce-y 1.6s ease-in-out infinite; }
.stop__bubble::after { content: ""; position: absolute; left: 50%; top: 100%; translate: -50% -1px; border: 7px solid transparent; border-top-color: var(--leaf); }
.stop__label { position: absolute; top: 30px; width: min(40%, 290px); display: grid; gap: 3px; }
.stop:nth-child(8n + 1) .stop__label, .stop:nth-child(8n + 2) .stop__label, .stop:nth-child(8n + 3) .stop__label, .stop:nth-child(8n + 4) .stop__label { left: calc(var(--x) + 64px); }
.stop:nth-child(8n + 5) .stop__label, .stop:nth-child(8n + 6) .stop__label, .stop:nth-child(8n + 7) .stop__label, .stop:nth-child(8n + 8) .stop__label { right: calc(100% - var(--x) + 64px); text-align: right; }
.stop__num { font: 800 0.78rem/1 var(--f-head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-800); }
.stop__title { font: 800 1.08rem/1.25 var(--f-head); color: var(--ink); }
.stop__meta { font-size: 0.86rem; color: var(--ink-3); font-weight: 600; }
.stop__meta em { font-style: normal; color: var(--ink-2); }
.stop--locked .stop__title, .stop--account .stop__title { color: var(--ink-3); }
.stop--finish .stop__circle { border-color: var(--gold-500); background: radial-gradient(circle, #FFF9E6, #FDE9B8); }
.stop--finish .stop__badge { background: var(--gold-600); border-color: #fff; color: #fff; }
.milestone { display: flex; justify-content: center; padding: 6px 0 12px; }
.milestone__sign { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 12px; background: #fff; border: 2px dashed var(--gold-300); font: 800 0.9rem/1 var(--f-head); color: var(--ink-3); position: relative; z-index: 1; }
.milestone__sign .i { width: 18px; height: 18px; }
.milestone.is-reached .milestone__sign { border-style: solid; background: var(--gold-50); color: var(--gold-900); }
.milestone.is-reached .milestone__sign .i { color: var(--gold-600); fill: var(--sun); }
@media (max-width: 700px) {
  .stop { height: 124px; }
  .stop:nth-child(odd), .stop:nth-child(even) { --x: 22%; }
  .stop:nth-child(4n + 2) { --x: 30%; }
  .stop:nth-child(4n + 3) { --x: 24%; }
  .stop:nth-child(4n) { --x: 16%; }
  .stop__node, .stop__circle { width: 82px; height: 82px; }
  .stop .stop__label { left: calc(var(--x) + 54px) !important; right: 12px !important; width: auto; text-align: left !important; top: 22px; }
  .stop__title { font-size: 1rem; }
}

/* ------------------------------------------------------------------ READER */
.view-reader { position: relative; width: 100%; max-width: none; padding: 0; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 0; background: radial-gradient(ellipse at 50% 0%, #FFF3D6, transparent 60%), linear-gradient(180deg, #FFF8EA, #F6E9CE); overflow: hidden; }
.reader-top { display: flex; align-items: center; gap: 12px; padding: 12px clamp(12px, 3vw, 24px); }
.reader-top__title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.reader-top__lv { display: inline-flex; align-items: center; gap: 6px; font: 800 0.82rem/1 var(--f-head); color: var(--gold-800); }
.reader-top__lv svg { width: 20px; height: 20px; }
.reader-top__title strong { font: 800 1.1rem/1.2 var(--f-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-zoom { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 99px; background: #fff; border: 1.5px solid var(--line); }
.reader-zoom__btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-800); }
.reader-zoom__btn:hover { background: var(--gold-50); }
.reader-zoom__btn .i { width: 19px; height: 19px; }
.reader-zoom__val { min-width: 48px; text-align: center; font: 800 0.88rem/1 var(--f-head); color: var(--ink-2); }
@media (max-width: 480px) { .reader-zoom__val { display: none; } .reader-top__title strong { font-size: 0.98rem; } }
.reader-stage { position: relative; overflow: hidden; display: grid; place-items: center; padding: 8px 16px 12px; touch-action: pan-y; user-select: none; }
.reader-stage.is-zoomed { overflow: auto; place-items: start center; touch-action: auto; cursor: grab; }
.reader-page { position: relative; border-radius: 14px; background: #fff; box-shadow: 0 2px 0 #E7D8B7, 0 4px 0 #F3E8D0, 0 6px 0 #EADBB9, var(--sh-xl); overflow: hidden; transform-origin: 50% 50%; transition: transform 0.25s var(--ease-out); flex: none; }
.reader-page img { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; }
.reader-page__spin { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; translate: -50% -50%; animation: spin 2s linear infinite; }
.reader-page__spin svg { width: 100%; height: 100%; }
.reader-page__error { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 20px; text-align: center; background: #fff; color: var(--ink-2); font-weight: 700; }
.reader-finish { display: flex; align-items: center; gap: 14px; margin: 0 auto 8px; width: min(100% - 24px, 640px); padding: 12px 14px; border-radius: 22px; background: #fff; border: 1.5px solid var(--ok-line); box-shadow: var(--sh-lg); animation: rise 0.5s var(--ease-spring); }
.reader-finish__flower { width: 58px; height: 58px; flex: none; }
.reader-finish__flower svg { width: 100%; height: 100%; }
.reader-finish__text { flex: 1; min-width: 0; display: grid; }
.reader-finish__text strong { font-family: var(--f-head); font-size: 1.08rem; }
.reader-finish__text span { color: var(--ink-3); font-size: 0.9rem; font-weight: 600; }
@media (max-width: 560px) { .reader-finish { flex-wrap: wrap; } .reader-finish .btn { width: 100%; } }
.reader-bottom { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); }
.reader-progress { display: grid; justify-items: center; gap: 8px; min-width: 0; }
.reader-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.reader-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); transition: background 0.3s, width 0.3s var(--ease-out); }
.reader-dot.is-read { background: var(--leaf); }
.reader-dot.is-on { width: 26px; border-radius: 9px; background: var(--gold-500); }
.reader-count { font: 800 0.92rem/1 var(--f-head); color: var(--ink-2); white-space: nowrap; }
.view-reader.is-last [data-next] { visibility: hidden; }

/* ------------------------------------------------------------------ QUIZ */
.view-quiz { width: 100%; max-width: none; padding: 0; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; background: radial-gradient(ellipse at 50% -10%, #FFF1CF, transparent 55%), linear-gradient(180deg, #FFFBF1, #F8EDD6); }
.quiz-top { display: flex; align-items: center; gap: 12px; padding: 12px clamp(12px, 3vw, 24px); }
.quiz-top__title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.quiz-top__title span { display: inline-flex; align-items: center; gap: 6px; font: 800 0.82rem/1 var(--f-head); color: var(--gold-800); }
.quiz-top__title span svg { width: 20px; height: 20px; }
.quiz-top__title strong { font: 800 1.08rem/1.2 var(--f-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quiz-steps { display: flex; gap: 6px; padding: 0; list-style: none; }
.quiz-step span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2.5px solid var(--line-2); font: 800 0.85rem/1 var(--f-head); color: var(--ink-3); transition: all 0.35s var(--ease-spring); }
.quiz-step .i { width: 18px; height: 18px; }
.quiz-step.is-on span { border-color: var(--gold-500); color: var(--gold-900); transform: scale(1.12); box-shadow: 0 0 0 4px var(--gold-glow); }
.quiz-step.is-right span { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.quiz-step.is-wrong span { background: var(--rose-50); border-color: var(--rose-100); color: var(--bad); }
.quiz-body { width: min(100% - 32px, 720px); margin: 0 auto; padding: 10px 0 40px; display: grid; gap: 18px; align-content: start; }
.quiz-card { position: relative; padding: 26px clamp(18px, 4vw, 34px) 30px; border-radius: 30px; background: #fff; border: 1.5px solid var(--line); box-shadow: var(--sh-lg); text-align: center; }
.quiz-card::after { content: ""; position: absolute; left: 50%; bottom: -14px; translate: -50% 0; border: 14px solid transparent; border-top-color: #fff; border-bottom: 0; filter: drop-shadow(0 2px 0 var(--line)); }
.quiz-card__bud { position: absolute; left: 14px; top: -34px; width: 56px; }
.quiz-card__bud svg { width: 100%; height: auto; }
.quiz-card__count { font: 800 0.85rem/1 var(--f-head); color: var(--gold-800); letter-spacing: 0.08em; text-transform: uppercase; }
.quiz-card__q { margin-top: 12px; font-size: clamp(1.45rem, 3.8vw, 2.1rem); line-height: 1.25; }
.quiz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.quiz-options--1 { grid-template-columns: 1fr; }
.quiz-opt {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 16px 18px; text-align: left;
  border-radius: 22px; background: #fff; border: 2.5px solid var(--line-2); box-shadow: 0 6px 0 var(--line-2);
  font: 800 clamp(1.08rem, 2.6vw, 1.3rem)/1.25 var(--f-head); color: var(--ink);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s, border-color var(--dur-2), background var(--dur-2), opacity var(--dur-2);
  animation: rise 0.5s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms + 120ms);
}
.quiz-opt:hover:not(:disabled) { border-color: var(--gold-400); transform: translateY(-2px); box-shadow: 0 8px 0 var(--gold-300); }
.quiz-opt:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--line-2); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt__letter { width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--gold-50); color: var(--gold-800); font: 400 1.2rem/1 var(--f-display); padding-top: 3px; transition: background var(--dur-2), color var(--dur-2); }
.quiz-opt__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.quiz-opt__mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.quiz-opt__mark:empty { display: none; }
.quiz-opt__mark .i { width: 20px; height: 20px; }
.quiz-opt.is-correct { border-color: var(--leaf); background: var(--ok-bg); box-shadow: 0 6px 0 var(--leaf); animation: pop-in 0.5s var(--ease-spring); }
.quiz-opt.is-correct .quiz-opt__letter { background: var(--leaf); color: #fff; }
.quiz-opt.is-correct .quiz-opt__mark { background: var(--leaf); color: #fff; }
.quiz-opt.is-wrong { border-color: #F2A3B3; background: var(--rose-50); box-shadow: 0 6px 0 #F2A3B3; animation: shake 0.5s var(--ease-out); }
.quiz-opt.is-wrong .quiz-opt__letter { background: var(--rose); color: #fff; }
.quiz-opt.is-wrong .quiz-opt__mark { background: var(--rose); color: #fff; }
.quiz-opt.is-dim { opacity: 0.5; }
@media (max-width: 560px) { .quiz-options { grid-template-columns: 1fr; } .quiz-opt { min-height: 70px; } }
.fb { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 20px; animation: rise 0.4s var(--ease-spring); }
.fb strong { font: 800 1.15rem/1.2 var(--f-head); display: block; }
.fb p { margin-top: 4px; color: var(--ink-2); }
.fb__icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 14px; }
.fb__icon svg.fl { width: 100%; height: 100%; animation: spin 10s linear infinite; }
.fb__icon .i { width: 22px; height: 22px; }
.fb--ok { background: var(--ok-bg); border: 1.5px solid var(--ok-line); color: #1F6E44; }
.fb--bad { background: var(--rose-50); border: 1.5px solid var(--rose-100); color: #A8385A; }
.fb--bad .fb__icon { background: #fff; color: var(--rose); }
.fb__tip { font-weight: 800; color: #1F6E44; }
.quiz-next { justify-self: center; min-width: 240px; }

/* Bloom celebration */
.bloom-screen { position: relative; min-height: 100dvh; display: grid; place-items: center; overflow: hidden; isolation: isolate; padding: 30px 18px; background: radial-gradient(circle at 50% 42%, #FFF6D8 0%, #F7D98E 32%, #D9A441 62%, #A67B24 100%); color: #fff; text-align: center; }
.bloom-screen__rays { position: absolute; left: 50%; top: 42%; width: 190vmax; height: 190vmax; translate: -50% -50%; z-index: -1; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.22) 0deg 7deg, transparent 7deg 18deg); animation: spin 60s linear infinite; -webkit-mask: radial-gradient(circle, #000 10%, transparent 60%); mask: radial-gradient(circle, #000 10%, transparent 60%); }
.bloom-screen__inner { display: grid; justify-items: center; gap: 12px; max-width: 560px; }
.bloom-screen__score { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px; background: rgba(255, 255, 255, 0.95); color: var(--ok); font: 800 1rem/1 var(--f-head); box-shadow: var(--sh-md); animation: pop-in 0.6s var(--ease-spring) 0.1s both; }
.bloom-screen__title { font-size: clamp(3rem, 11vw, 5.5rem); color: #fff; text-shadow: 4px 4px 0 #8A6519, 8px 8px 0 rgba(74, 50, 5, 0.18); animation: pop-in 0.7s var(--ease-spring) 0.2s both; }
.bloom-screen__flower { width: min(62vw, 300px); aspect-ratio: 1; filter: drop-shadow(0 20px 30px rgba(116, 91, 14, 0.4)); }
.bloom-screen__flower svg { width: 100%; height: 100%; animation: spin 40s linear infinite 2.6s; }
.bloom-screen__name { font: 800 clamp(1.3rem, 3.6vw, 1.8rem)/1.25 var(--f-head); text-shadow: 0 2px 0 rgba(90, 60, 5, 0.35); animation: rise 0.6s var(--ease-out) 1.4s both; }
.bloom-screen__unlock { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.18); border: 1.5px solid rgba(255, 255, 255, 0.4); font-weight: 800; animation: rise 0.6s var(--ease-out) 1.6s both; }
.bloom-screen__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; animation: rise 0.6s var(--ease-out) 1.8s both; }
.bloom-screen__ghost { --btn-fg: #fff; }
.bloom-screen__ghost:hover { --btn-bg: rgba(255, 255, 255, 0.16); --btn-fg: #fff; }

/* Fail + review */
.fail-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px 40px; background: linear-gradient(180deg, #FFF7EE, #FBE9E6); }
.fail-screen__card { width: min(100%, 620px); display: grid; justify-items: center; gap: 12px; text-align: center; padding: clamp(22px, 4vw, 34px); border-radius: 32px; background: #fff; border: 1.5px solid var(--line); box-shadow: var(--sh-lg); }
.fail-screen__art svg { height: 130px; width: auto; }
.fail-screen__title { font-size: clamp(2rem, 6vw, 2.8rem); }
.fail-screen__score { padding: 7px 16px; border-radius: 99px; background: var(--rose-50); border: 1.5px solid var(--rose-100); color: #B03C5E; font: 800 1rem/1 var(--f-head); }
.fail-screen__text { color: var(--ink-2); max-width: 30rem; }
.review { width: 100%; display: grid; gap: 10px; text-align: left; margin-top: 6px; }
.review__title { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.review__title .i { color: var(--gold-600); }
.review__item { padding: 12px 14px; border-radius: 16px; background: var(--cream); border: 1.5px solid var(--line); }
.review__q { font: 800 1rem/1.35 var(--f-head); display: flex; gap: 8px; }
.review__q span { flex: none; padding: 2px 8px; border-radius: 8px; background: var(--gold-100); color: var(--gold-900); font-size: 0.85rem; }
.review__a { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #B03C5E; font-weight: 700; }
.review__a .i { width: 17px; height: 17px; }
.fail-screen__actions { display: grid; gap: 10px; width: 100%; margin-top: 8px; }

/* ------------------------------------------------------------------ CERTIFICATE */
.cert-locked { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.cert-locked__progress { display: grid; justify-items: center; gap: 16px; text-align: center; padding: 28px; border-radius: var(--r-2xl); background: #fff; border: 1.5px solid var(--line); box-shadow: var(--sh-sm); }
.cert-locked__text { color: var(--ink-2); max-width: 26rem; }
.cert-locked__preview { position: relative; }
.cert-locked__lock { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 99px; background: #fff; box-shadow: var(--sh-lg); font: 800 1rem/1 var(--f-head); color: var(--gold-900); white-space: nowrap; }
.cert-ready { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: start; }
.cert-ready > .loader, .cert-ready > .alert, .cert-ready > .empty-card { grid-column: 1 / -1; }
.cert-ready__preview { transition: transform 0.3s var(--ease-out); }
.cert-ready__info { display: grid; gap: 16px; }
.cert-ready__num { display: grid; gap: 4px; justify-items: start; padding: 18px 20px; border-radius: var(--r-xl); background: linear-gradient(135deg, #FFF8E6, #FDEBC1); border: 1.5px solid var(--gold-200); }
.cert-ready__num span { font: 800 0.82rem/1 var(--f-head); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-800); }
.cert-ready__num strong { font-size: clamp(2.2rem, 5vw, 3rem); color: var(--gold-800); text-shadow: 2px 2px 0 #fff; }
.cert-ready__meta { display: grid; gap: 10px; }
.cert-ready__meta div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1.5px dashed var(--line); }
.cert-ready__meta dt { color: var(--ink-3); font-weight: 700; }
.cert-ready__meta dd { margin: 0; font-weight: 800; text-align: right; }
.cert-ready__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cert-ready__comp { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: #fff; border: 1.5px solid var(--gold-200); text-decoration: none; color: inherit; transition: transform var(--dur-2) var(--ease-spring), box-shadow var(--dur-2); }
.cert-ready__comp:hover { transform: translateY(-3px); box-shadow: var(--sh-md); color: inherit; }
.cert-ready__comp-art { width: 52px; height: 52px; flex: none; }
.cert-ready__comp-art svg { width: 100%; height: 100%; }
.cert-ready__comp strong { display: block; font-family: var(--f-head); }
.cert-ready__comp small { color: var(--ink-3); font-weight: 600; }
.cert-ready__comp > .i:last-child { margin-left: auto; color: var(--ink-3); }
@media (max-width: 860px) { .cert-locked, .cert-ready { grid-template-columns: 1fr; } .cert-locked__preview { max-width: 420px; margin: 0 auto; } }

/* ------------------------------------------------------------------ COMPETITION */
.comp-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0; list-style: none; }
.comp-facts li { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: #fff; border: 1.5px solid var(--line); min-width: 0; }
.comp-facts strong { display: block; font-family: var(--f-head); }
.comp-facts small { color: var(--ink-3); font-weight: 600; font-size: 0.82rem; }
.comp-facts__ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.comp-facts__ico--sky { background: var(--sky-50); color: var(--sky); }
.comp-facts__ico--rose { background: var(--rose-50); color: var(--rose); }
.comp-facts__ico--leaf { background: var(--leaf-50); color: var(--leaf); }
.comp-facts__more { display: inline-flex; align-items: center; gap: 8px; font: 800 0.95rem/1.2 var(--f-head); color: var(--gold-800); text-decoration: none; }
.comp-facts li:last-child { background: var(--gold-50); border-color: var(--gold-200); justify-content: center; }
@media (max-width: 960px) { .comp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .comp-facts { grid-template-columns: 1fr; } }
.comp-card-app { display: grid; gap: 16px; padding: clamp(18px, 3vw, 28px); border-radius: var(--r-2xl); background: #fff; border: 1.5px solid var(--line); box-shadow: var(--sh-sm); }
.elig { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0; list-style: none; }
.elig li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--cream); }
.elig li > .i { width: 24px; height: 24px; flex: none; }
.elig strong { display: block; font-family: var(--f-head); font-size: 0.98rem; }
.elig small { color: var(--ink-3); font-weight: 600; }
.elig .is-ok { background: var(--ok-bg); border-color: var(--ok-line); }
.elig .is-ok > .i { color: var(--ok); }
.elig .is-todo > .i { color: var(--gold-600); }
@media (max-width: 760px) { .elig { grid-template-columns: 1fr; } }
.comp-locked { display: flex; align-items: center; gap: 18px; padding: 16px; border-radius: var(--r-lg); background: var(--gold-25); border: 1.5px dashed var(--gold-300); }
.comp-locked p { color: var(--ink-2); margin: 4px 0 10px; }
@media (max-width: 520px) { .comp-locked { flex-direction: column; text-align: center; } }
.comp-form__group { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 14px; }
.comp-form__group legend { display: flex; align-items: center; gap: 10px; font: 800 1.1rem/1 var(--f-head); color: var(--gold-900); margin-bottom: 14px; }
.comp-form__n { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--gold-500); color: #fff; font: 400 0.95rem/1 var(--f-display); padding-top: 3px; }
.entry-pass { position: relative; overflow: hidden; display: grid; justify-items: center; gap: 12px; text-align: center; padding: 0 clamp(18px, 4vw, 34px) 28px; border-radius: 28px; background: #fff; border: 2px solid var(--gold-300); box-shadow: var(--sh-lg); }
.entry-pass__ribbon { width: calc(100% + 2 * clamp(18px, 4vw, 34px)); padding: 9px 0; background: linear-gradient(90deg, #CC9933, #E0B04E, #CC9933); color: #fff; font: 800 0.8rem/1 var(--f-head); letter-spacing: 0.14em; text-transform: uppercase; }
.entry-pass__art { width: 96px; height: 96px; margin-top: 8px; }
.entry-pass__art svg { width: 100%; height: 100%; }
.entry-pass__title { font-size: 1.8rem; }
.entry-pass__lead { color: var(--ok); font-weight: 700; }
.entry-pass__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; text-align: left; padding: 16px; border-radius: 18px; border: 1.5px solid var(--line); }
.entry-pass__grid dt { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.entry-pass__grid dd { margin: 2px 0 0; font: 800 1rem/1.3 var(--f-head); overflow-wrap: anywhere; }
.entry-pass__status { display: flex; align-items: center; gap: 6px; color: var(--ok); }
.entry-pass__status .i { width: 18px; height: 18px; }
.entry-pass__note { text-align: left; padding: 14px; border-radius: 14px; background: var(--gold-25); border: 1.5px solid var(--gold-200); color: var(--ink-2); font-weight: 600; }
.entry-pass__note strong { color: var(--gold-900); }
.entry-pass__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@media (max-width: 520px) { .entry-pass__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ PROFILE */
.profile-card { display: flex; align-items: center; gap: 22px; padding: clamp(18px, 3vw, 28px); border-radius: var(--r-2xl); background: linear-gradient(135deg, #FFFFFF, #FFF3DA); border: 1.5px solid var(--gold-200); box-shadow: var(--sh-md); }
.profile-card__avatar { position: relative; border-radius: 50%; flex: none; transition: transform 0.4s var(--ease-spring); }
.profile-card__avatar:hover { transform: rotate(-8deg) scale(1.04); }
.profile-card__edit { position: absolute; right: 2px; bottom: 6px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-500); color: #fff; border: 3px solid #fff; }
.profile-card__edit .i { width: 17px; height: 17px; }
.profile-card__name { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.profile-card__since { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--ink-3); font-weight: 700; }
.profile-card__since svg { width: 20px; height: 20px; }
.profile-card__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 560px) { .profile-card { flex-direction: column; text-align: center; } .profile-card__since, .profile-card__chips { justify-content: center; } }
.profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1060px) { .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .profile-grid { grid-template-columns: 1fr; } }
.details { display: grid; gap: 10px; margin: 0; }
.details div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1.5px dashed var(--line); }
.details dt { color: var(--ink-3); font-weight: 700; }
.details dd { margin: 0; font-weight: 800; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1.5px dashed var(--line); cursor: pointer; }
.pref:last-child { border-bottom: 0; }
.pref strong { display: block; font-family: var(--f-head); }
.pref small { color: var(--ink-3); font-weight: 600; }
.links-list { display: grid; }
.links-list a { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1.5px dashed var(--line); color: var(--ink-2); text-decoration: none; font-weight: 700; }
.links-list a:hover { color: var(--gold-900); }
.links-list a .i:first-child { color: var(--gold-600); }
.links-list a .i:last-child { margin-left: auto; color: var(--ink-4); }
.avatar-pick { display: grid; gap: 14px; }
.avatar-pick__more { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 700; font-size: 0.9rem; }
.avatar-pick .choices--avatars { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.choice--avatar .choice__card { padding: 12px 6px 10px; font-size: 0.8rem; gap: 6px; }
.choice--avatar .choice__card svg { width: 54px; height: 54px; }
@media (max-width: 420px) { .avatar-pick .choices--avatars { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ------------------------------------------------------------------ print: entry pass only */
@media print {
  .app-top, .app-nav, .app-banners, .view-head, .comp-facts, .entry-pass__actions, .skip-link, .toast-stack, .petal-overlay { display: none !important; }
  .app, .app-main { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  .view { width: 100%; padding: 0; }
  .entry-pass { box-shadow: none; border: 2px solid #000; }
}

/* View transitions: keep the app chrome steady — only the page content cross-fades. */
.app-top { view-transition-name: app-top; }
.app-nav { view-transition-name: app-nav; }
.app-banners { view-transition-name: app-banners; }
::view-transition-group(app-top), ::view-transition-group(app-nav), ::view-transition-group(app-banners),
::view-transition-old(app-top), ::view-transition-new(app-top), ::view-transition-old(app-nav), ::view-transition-new(app-nav),
::view-transition-old(app-banners), ::view-transition-new(app-banners) { animation: none; }
@media (max-width: 600px) { .view-head__art { display: none; } }

/* ------------------------------------------------------------------ progress badges (garden) */
.badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gbadge { position: relative; overflow: hidden; isolation: isolate; display: grid; align-content: start; gap: 4px; min-height: 168px; padding: 18px 18px 16px; border-radius: var(--r-xl); border: 1.5px solid rgba(255, 255, 255, 0.9); box-shadow: var(--sh-md); color: var(--ink); text-decoration: none; transition: transform 0.4s var(--ease-spring), box-shadow 0.4s; }
.gbadge::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.75) 1.2px, transparent 1.6px); background-size: 18px 18px; opacity: 0.7; -webkit-mask-image: linear-gradient(200deg, #000, transparent 70%); mask-image: linear-gradient(200deg, #000, transparent 70%); }
.gbadge:hover { transform: translateY(-4px) rotate(-0.6deg); box-shadow: var(--sh-lg); color: var(--ink); }
.gbadge--gold { background: linear-gradient(150deg, #FFF8E6, #FBDFA2); }
.gbadge--rose { background: linear-gradient(150deg, #FFF3F6, #FFD2DE); }
.gbadge--leaf { background: linear-gradient(150deg, #F1FBF4, #CDEDD8); }
.gbadge--sky { background: linear-gradient(150deg, #F0F8FF, #CFE6FF); }
.gbadge__visual { position: absolute; right: 12px; top: 12px; width: 70px; height: 62px; }
.gbadge__num { margin-top: 38px; font: 700 2rem/1 var(--f-head); letter-spacing: -0.01em; }
.gbadge__num small { font-size: 0.95rem; color: var(--ink-3); margin-left: 2px; font-weight: 600; }
.gbadge__num--text { font-size: 1.45rem; }
.gbadge__label { font: 600 0.92rem/1.2 var(--f-head); color: var(--ink-2); }
.gbadge__bar { height: 8px; margin-top: 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.8); overflow: hidden; }
.gbadge__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #E5C568, #CC9933); transition: width 1.2s var(--ease-out); }
.gbadge--rose .gbadge__bar i { background: linear-gradient(90deg, #F9A8BD, #EE6C8E); }
.gbadge--leaf .gbadge__bar i { background: linear-gradient(90deg, #8FD3A4, #46A06A); }
.gbadge__go { position: absolute; right: 16px; bottom: 16px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #2E6FAE; box-shadow: var(--sh-sm); transition: transform 0.3s var(--ease-out); }
.gbadge:hover .gbadge__go { transform: translateX(4px); }
/* stacked book pages */
.gbadge__pages span { position: absolute; right: 8px; top: 4px; width: 40px; height: 52px; border-radius: 6px; background: #fff; border: 2px solid #E7C98A; box-shadow: var(--sh-sm); }
.gbadge__pages span:nth-child(1) { rotate: -14deg; right: 26px; }
.gbadge__pages span:nth-child(2) { rotate: -4deg; right: 16px; }
.gbadge__pages span:nth-child(3) { rotate: 8deg; background: linear-gradient(180deg, #fff 0 22%, #FBEFD3 22% 26%, #fff 26% 44%, #FBEFD3 44% 48%, #fff 48%); animation: float-sm 5s ease-in-out infinite; }
/* bouquet of recent blooms */
.gbadge__bouquet span { position: absolute; top: 6px; width: 42px; height: 42px; right: calc(var(--k) * 20px); animation: spin 24s linear infinite; }
.gbadge__bouquet span:nth-child(2) { top: 18px; animation-direction: reverse; }
.gbadge__bouquet svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(178, 63, 91, 0.25)); }
/* star burst */
.gbadge__star { display: grid; place-items: center; }
.gbadge__star .i { width: 52px; height: 52px; color: #F2B42C; fill: #FFD25C; stroke: #E39A1B; filter: drop-shadow(0 4px 8px rgba(242, 180, 44, 0.45)); animation: float-sm 4.5s ease-in-out infinite; }
.gbadge__star::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 2px dashed rgba(70, 160, 106, 0.45); animation: spin 18s linear infinite; }
/* certificate thumbnail */
.gbadge__cert { width: 56px; height: 72px; top: 10px; border-radius: 6px; overflow: hidden; rotate: 8deg; box-shadow: var(--sh-md); background: #fff; }
.gbadge__cert img { width: 100%; height: 100%; object-fit: cover; }
.gbadge__cert.is-locked img { filter: blur(2px) saturate(0.4); opacity: 0.8; }
.gbadge__lock { position: absolute; inset: 0; display: grid; place-items: center; color: #2E6FAE; }
.gbadge__lock .i { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: #fff; box-sizing: content-box; }
@media (max-width: 860px) { .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .gbadge { min-height: 150px; padding: 14px; } .gbadge__num { font-size: 1.7rem; } .gbadge__visual { transform: scale(0.85); transform-origin: top right; } }

/* =====================================================================
   Version 2 — families & classes: switcher, "Who's learning today?", overview, Account & learners
   ===================================================================== */
/* a flower avatar inside a progress ring (24 levels) */
.lring { --ls: 64px; position: relative; display: inline-grid; place-items: center; width: var(--ls); height: var(--ls); flex: none; }
.lring > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lring__t { fill: none; stroke: var(--cream-3); }
.lring__f { fill: none; stroke: var(--leaf); stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--ease-out); }
.lring.is-full .lring__f { stroke: var(--gold-500); }
.lring .avatar { border-width: 0; }

/* a mini garden row: one dot per level, in groups of six */
.mrow { display: flex; flex-wrap: wrap; gap: 3px 6px; }
.mrow > span { display: inline-flex; gap: 3px; }
.mrow i { width: 9px; height: 9px; border-radius: 50%; background: var(--cream-3); box-shadow: inset 0 0 0 1px rgba(71, 54, 6, 0.06); }
.mrow i.is-on { background: var(--c, var(--gold-500)); box-shadow: none; }
.mrow i.is-cur { background: #fff; box-shadow: inset 0 0 0 2px var(--leaf); }

/* the avatar button when the account has several learners: ring + first name + chevron */
.app-avatar--who { display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 2px 10px 2px 2px; border-radius: 99px; background: #fff; border: 1.5px solid var(--gold-200); box-shadow: 0 3px 0 rgba(229, 197, 104, 0.35); }
.app-avatar--who:hover { transform: translateY(-1px); }
.app-avatar__name { font: 800 0.98rem/1 var(--f-head); color: var(--ink); max-width: 9ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-avatar__chev { display: grid; color: var(--gold-800); }
.app-avatar__chev .i { width: 16px; height: 16px; }
@media (max-width: 420px) { .app-avatar__name { max-width: 6ch; font-size: 0.9rem; } .app-avatar--who { padding-right: 6px; } }
/* Phones: the top bar's logo gives way first, so the flower count, sound and account buttons always fit on screen
   (together they need ~430px at full size). The name goes on the smallest phones (the flower picture stays), then the "/24". */
@media (max-width: 480px) {
  .app-top { gap: 8px; }
  .app-top__logo { flex: 0 1 auto; min-width: 84px; width: 128px; }
  .app-top__right { flex: none; gap: 6px; }
  .app-pill { height: 40px; padding: 0 10px 0 4px; }
  .app-pill__flower { width: 26px; height: 26px; }
  .app-icon-btn { width: 40px; height: 40px; }
  .app-avatar--who { height: 44px; }
}
@media (max-width: 380px) { .app-avatar__name { display: none; } .app-avatar--who { gap: 4px; padding-right: 4px; } }
@media (max-width: 340px) { .app-pill__of { display: none; } .app-pill { padding-right: 8px; } }

/* switching learners: a cream veil with falling petals */
.swv { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 5); display: grid; place-items: center; background: radial-gradient(70% 60% at 50% 40%, rgba(255, 251, 241, 0.97), rgba(254, 243, 214, 0.96)); opacity: 0; transition: opacity 0.32s var(--ease-out); }
.swv.is-in { opacity: 1; }
.swv.is-out { opacity: 0; transition-duration: 0.45s; }
.swv__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.swv__p { position: absolute; left: var(--x); top: -30px; width: var(--s); height: calc(var(--s) * 0.7); border-radius: 60% 40% 60% 40%; background: linear-gradient(135deg, #F7C6D4, #F59AB5); opacity: 0.85; transform: rotate(var(--r)); animation: swv-fall 1.6s var(--ease-in-out) var(--d) both; }
.swv__p:nth-child(3n) { background: linear-gradient(135deg, #FFE3A3, #E5C568); }
.swv__p:nth-child(4n) { background: linear-gradient(135deg, #E8E0FF, #C9B6F7); }
@keyframes swv-fall { from { transform: translateY(0) rotate(var(--r)); } to { transform: translateY(110vh) rotate(calc(var(--r) + 220deg)); } }
.swv__in { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; transform: translateY(14px) scale(0.96); transition: transform 0.45s var(--ease-spring); }
.swv.is-in .swv__in { transform: none; }
.swv__art { margin-bottom: 8px; }
.swv__k { font: 700 0.85rem/1 var(--f-head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-800); }
.swv__name { font: 400 clamp(2.2rem, 7vw, 3.4rem)/1 var(--f-display); color: var(--ink); letter-spacing: 0.02em; }
.swv__sub { font-weight: 800; color: #2E7A4B; }
@media (prefers-reduced-motion: reduce) { .swv__p { display: none; } .swv, .swv__in { transition: none; } }

/* "Who's learning today?" — full screen, over the portal */
.has-wlt .app-top, .has-wlt .app-nav { visibility: hidden; }
.wlt { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 2); overflow-y: auto; overscroll-behavior: contain; background: linear-gradient(180deg, #FFE8C6 0%, #FFF6E6 46%, #FFFBF1 100%); opacity: 0; transition: opacity 0.35s var(--ease-out); }
.wlt.is-in { opacity: 1; }
.wlt.is-out { opacity: 0; pointer-events: none; }
.wlt__bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.wlt__bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wlt__sun { position: absolute; width: 38vmin; aspect-ratio: 1; right: 8%; top: 6%; border-radius: 50%; background: radial-gradient(circle, #FFFBE0 0%, #FFE38A 42%, #FAC54F 64%, rgba(250, 197, 79, 0) 70%); opacity: 0.8; }
.wlt__hill { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 16vh; }
.wlt__top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px clamp(16px, 4vw, 32px); }
.wlt__logo { width: 140px; display: block; }
.wlt__logo svg { width: 100%; height: auto; }
.wlt__top-r { display: flex; align-items: center; gap: 8px; }
.wlt__x { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1.5px solid var(--line); color: var(--ink-2); }
.wlt__x:hover { border-color: var(--gold-300); color: var(--gold-900); }
.wlt__x .i { width: 20px; height: 20px; }
.wlt__inner { position: relative; z-index: 1; width: min(100% - 32px, 980px); margin: 0 auto; padding: clamp(8px, 4vh, 40px) 0 calc(18vh + 24px); display: grid; justify-items: center; gap: 12px; text-align: center; }
.wlt__title { font: 400 clamp(2.2rem, 6vw, 3.6rem)/1.05 var(--f-display); color: var(--ink); letter-spacing: 0.02em; }
.wlt__sub { max-width: 34rem; color: var(--ink-2); font-weight: 600; }
.wlt__search { width: min(100%, 420px); margin-top: 6px; }
.wlt__grid { list-style: none; padding: 0; margin: 16px 0 0; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.wlt__grid > li { animation: rise 0.5s var(--ease-out) both; animation-delay: calc(120ms + var(--i, 0) * 70ms); }
.wlt__grid > li[hidden] { display: none; }
.wlt-card { position: relative; width: 210px; display: grid; justify-items: center; gap: 10px; padding: 22px 14px 18px; border-radius: var(--r-xl); background: rgba(255, 255, 255, 0.9); border: 2px solid var(--line); box-shadow: var(--sh-md); text-align: center; transition: transform var(--dur-2) var(--ease-spring), border-color var(--dur-2), box-shadow var(--dur-2), opacity var(--dur-2); }
.wlt-card:hover:not(:disabled) { transform: translateY(-4px); border-color: var(--gold-300); box-shadow: var(--sh-lg); }
.wlt-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.wlt-card:disabled { opacity: 0.55; cursor: default; }
.wlt-card.is-last { border-color: var(--gold-300); }
.wlt.is-choosing .wlt-card:not(.is-chosen) { opacity: 0.4; }
.wlt-card.is-chosen { transform: scale(1.04); border-color: var(--gold-500); box-shadow: 0 0 0 5px var(--gold-glow), var(--sh-lg); }
.wlt-card__text { display: grid; gap: 3px; }
.wlt-card__name { font: 800 1.45rem/1.1 var(--f-head); color: var(--ink); }
.wlt-card__full { font-size: 0.82rem; font-weight: 700; color: var(--ink-3); }
.wlt-card__meta { font-size: 0.9rem; font-weight: 800; color: #2E7A4B; }
.wlt-card__cert { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; background: var(--gold-50); border: 1px solid var(--gold-200); color: var(--gold-900); font: 800 0.78rem/1 var(--f-head); }
.wlt-card__cert .i { width: 14px; height: 14px; }
.wlt-card__tag { position: absolute; top: 10px; right: 10px; padding: 4px 8px; border-radius: 99px; background: var(--leaf); color: #fff; font: 800 0.66rem/1 var(--f-head); letter-spacing: 0.06em; text-transform: uppercase; }
.wlt__none { color: var(--ink-3); font-weight: 700; }
.wlt__foot { margin-top: 14px; }
.wlt--many .wlt__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.wlt--many .wlt-card { width: 100%; grid-template-columns: 58px minmax(0, 1fr); justify-items: start; align-items: center; gap: 12px; padding: 10px 12px; text-align: left; border-radius: var(--r-lg); }
.wlt--many .wlt-card__name { font-size: 1.1rem; }
.wlt--many .wlt-card__cert { grid-column: 2; justify-self: start; }
.wlt--many .wlt-card__tag { top: 8px; }
@media (max-width: 520px) {
  .wlt__grid { gap: 10px; }
  .wlt:not(.wlt--many) .wlt__grid > li { width: calc(50% - 5px); }
  .wlt:not(.wlt--many) .wlt-card { width: 100%; padding: 16px 8px 14px; }
  .wlt-card__name { font-size: 1.2rem; }
  .wlt:not(.wlt--many) .wlt-card .lring { --ls: 92px !important; }
  .wlt-card__tag { top: 8px; right: 8px; }
}

/* the avatar menu: learner switcher + account */
.wmenu { position: fixed; z-index: calc(var(--z-menu) + 2); width: min(340px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow-y: auto; padding: 8px; border-radius: 22px; background: #fff; border: 1.5px solid var(--line); box-shadow: var(--sh-xl); opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top right; transition: opacity 0.18s var(--ease-out), transform 0.22s var(--ease-out); }
.wmenu.is-open { opacity: 1; transform: none; }
.wmenu__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 6px; font: 700 0.72rem/1 var(--f-head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.wmenu__count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; background: var(--gold-50); color: var(--gold-900); letter-spacing: 0; }
.wmenu__search { margin: 4px 4px 6px; }
.wmenu__search .input { min-height: 42px; }
.wmenu__list { display: grid; gap: 2px; max-height: 300px; overflow-y: auto; }
.wmenu__lr { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 14px; text-align: left; color: var(--ink-2); }
.wmenu__lr:hover, .wmenu__lr:focus-visible { background: var(--gold-50); outline: none; }
.wmenu__lr.is-active { background: var(--gold-25); }
.wmenu__lr:disabled { opacity: 0.5; }
.wmenu__lr[hidden] { display: none; }
.wmenu__lr > .i { width: 16px; height: 16px; color: var(--ink-4); }
.wmenu__lr-t { display: grid; gap: 1px; min-width: 0; }
.wmenu__lr-t strong { font: 800 0.95rem/1.2 var(--f-head); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wmenu__lr-t small { font-size: 0.78rem; font-weight: 700; color: var(--ink-3); }
.wmenu__check { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--leaf); color: #fff; }
.wmenu__check .i { width: 14px; height: 14px; }
.wmenu__me { display: flex; align-items: center; gap: 12px; padding: 8px 8px 10px; }
.wmenu__me strong { display: block; font: 800 1rem/1.2 var(--f-head); color: var(--ink); }
.wmenu__me small { font-size: 0.8rem; font-weight: 700; color: var(--ink-3); }
.wmenu__sep { height: 1.5px; background: var(--line); margin: 6px 4px; }
.wmenu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; font-weight: 700; color: var(--ink-2); text-align: left; }
.wmenu__item:hover, .wmenu__item:focus-visible { background: var(--gold-50); color: var(--ink); outline: none; }
.wmenu__item .i { width: 18px; height: 18px; color: var(--ink-3); }
.wmenu__item--danger, .wmenu__item--danger .i { color: var(--bad); }
.wmenu__item--danger:hover { background: var(--bad-bg); color: var(--bad); }

/* family / class overview on the garden */
.fam { display: grid; gap: 14px; padding: clamp(16px, 2.6vw, 24px); border-radius: var(--r-2xl); background: linear-gradient(135deg, #FFFFFF, #FFF6E2); border: 1.5px solid var(--gold-200); box-shadow: var(--sh-sm); }
.fam[hidden] { display: none; }
.fam__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fam__titles { display: grid; gap: 4px; min-width: 0; }
.fam__title { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.fam__holder { color: var(--ink-3); font-weight: 700; }
.fam__head-act { display: flex; gap: 4px; flex: none; }
.fam__sum { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-weight: 700; }
.fam__sum strong { font: 400 1.3rem/1 var(--f-display); color: var(--gold-900); margin-right: 4px; }
.fam__cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.lcard { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: #fff; border: 1.5px solid var(--line); transition: border-color var(--dur-2), box-shadow var(--dur-2), transform var(--dur-2) var(--ease-spring); }
.lcard:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.lcard.is-active { border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(70, 160, 106, 0.16); }
.lcard__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.lcard__who { display: grid; gap: 2px; min-width: 0; }
.lcard__who strong { font: 800 1.15rem/1.1 var(--f-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard__who small { font-size: 0.8rem; font-weight: 700; color: var(--ink-3); }
.lcard__n { font: 400 1.6rem/1 var(--f-display); color: var(--gold-900); }
.lcard__n small { font: 700 0.8rem/1 var(--f-head); color: var(--ink-3); }
.lcard__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 0.88rem; color: var(--ink-3); font-weight: 700; }
.lcard__lv strong { color: var(--ink-2); }
.fam__go { justify-self: start; }
.fam__now { display: inline-flex; align-items: center; gap: 6px; font: 800 0.9rem/1 var(--f-head); color: #2E7A4B; }
.fam__now .i { width: 16px; height: 16px; }
.fam__now--paused { color: var(--ink-3); }
.fam__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fam__stats > div { display: grid; gap: 4px; padding: 12px; border-radius: var(--r-md); background: #fff; border: 1.5px solid var(--line); }
.fam__stats strong { font: 400 1.6rem/1 var(--f-display); color: var(--gold-900); }
.fam__stats strong small { font: 700 0.8rem/1 var(--f-head); color: var(--ink-3); }
.fam__stats span { font-size: 0.82rem; font-weight: 800; color: var(--ink-3); }
.fam__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fam__search { flex: 1 1 220px; }
.fam__rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lrow { display: grid; grid-template-columns: auto minmax(140px, 1.2fr) minmax(160px, 1.4fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: #fff; border: 1.5px solid var(--line); }
.lrow.is-active { border-color: var(--leaf); }
.lrow__who { display: grid; gap: 2px; min-width: 0; }
.lrow__who strong { font: 800 1rem/1.15 var(--f-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow__who small { font-size: 0.78rem; font-weight: 700; color: var(--ink-3); }
.lrow__prog { display: grid; gap: 4px; }
.lrow__lv { font-size: 0.8rem; font-weight: 700; color: var(--ink-3); }
.lrow__togo { font-size: 0.82rem; font-weight: 700; color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.lrow__togo .i { width: 14px; height: 14px; }
.fam__none { color: var(--ink-3); font-weight: 700; }
@media (max-width: 860px) {
  .fam__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lrow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .lrow__prog { grid-column: 2 / -1; grid-row: 2; }
  .lrow__cert { grid-column: 1 / 3; grid-row: 3; }
  .lrow__act { grid-column: 3; grid-row: 1; }
  .fam__go-l { display: none; }
}
@media (max-width: 480px) { .fam__act-l { display: none; } }

/* Me — Account & learners */
.me-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 8px; font-size: 1.35rem; }
.me-group small { font: 700 0.86rem/1.3 var(--f-body); color: var(--ink-3); }
.profile-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .profile-grid--2 { grid-template-columns: 1fr; } }
.profile-card__text { min-width: 0; flex: 1; }
.profile-card__cta { flex: none; align-self: center; }
.me-certname { font-family: var(--f-head); letter-spacing: 0.04em; }
.me-flower { display: inline-flex; align-items: center; gap: 6px; }
.me-flower svg { width: 24px; height: 24px; }
.me-lock { display: inline-flex; align-items: center; gap: 6px; }
.me-lock .i { width: 15px; height: 15px; color: var(--ink-4); }
.me-classes-row dd { display: grid; justify-items: end; gap: 6px; }
.me-classes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.me-class { display: inline-grid; padding: 4px 10px; border-radius: 12px; background: var(--sky-50); border: 1px solid var(--sky-100); color: #245E9E; font-size: 0.86rem; text-align: right; }
.me-class small { font-weight: 600; color: var(--ink-3); }
.me-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.me-nums > div { display: grid; gap: 4px; padding: 12px 10px; border-radius: var(--r-md); background: var(--cream); border: 1.5px solid var(--line); text-align: center; }
.me-nums strong { font: 400 1.6rem/1 var(--f-display); color: var(--gold-900); }
.me-nums strong small { font: 700 0.8rem/1 var(--f-head); color: var(--ink-3); }
.me-nums span { font-size: 0.8rem; font-weight: 800; color: var(--ink-3); }
.me-acct__type { display: flex; align-items: center; gap: 12px; }
.me-acct__ico { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: var(--gold-50); color: var(--gold-800); border: 1.5px solid var(--gold-200); }
.me-acct__ico .i { width: 22px; height: 22px; }
.me-acct__type strong { display: block; font: 800 1.15rem/1.2 var(--f-head); }
.me-acct__type small { font-size: 0.85rem; font-weight: 700; color: var(--ink-3); }
.me-acct__data { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--cream); border: 1.5px dashed var(--line-2); }
.me-acct__data-ico { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--leaf); flex: none; }
.me-acct__data-ico .i { width: 20px; height: 20px; }
.me-acct__data p { flex: 1; display: grid; gap: 2px; min-width: 0; }
.me-acct__data small { color: var(--ink-3); font-weight: 600; }
.me-acct__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.me-acct__del { color: var(--bad); }
.me-acct__del:hover { background: var(--bad-bg); }
@media (max-width: 520px) { .me-acct__data { flex-wrap: wrap; } .me-acct__data .btn { width: 100%; } }
.is-flash { animation: me-flash 1.6s var(--ease-out); }
@keyframes me-flash { 0%, 100% { box-shadow: var(--sh-sm); } 30% { box-shadow: 0 0 0 5px var(--gold-glow), var(--sh-md); } }

/* the learner list on Me */
.lmg__head { flex-wrap: wrap; }
.lmg__count { font: 800 0.95rem/1 var(--f-head); color: var(--gold-900); padding: 4px 10px; border-radius: 99px; background: var(--gold-50); }
.lmg__count small { color: var(--ink-3); }
.lmg__search { max-width: 360px; }
.lmg { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lmg__row { display: grid; grid-template-columns: auto minmax(130px, 1.1fr) minmax(150px, 1.2fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--cream); border: 1.5px solid var(--line); }
.lmg__row.is-active { background: #F4FBF6; border-color: var(--ok-line); }
.lmg__who { display: grid; gap: 3px; min-width: 0; }
.lmg__who strong { font: 800 1rem/1.2 var(--f-head); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lmg__who small, .lmg__prog small { font-size: 0.8rem; font-weight: 700; color: var(--ink-3); }
.lmg__prog { display: grid; gap: 4px; }
.lmg__bar { display: flex; align-items: center; gap: 8px; font: 800 0.82rem/1 var(--f-head); color: var(--ink-2); }
.lmg__bar .bar { flex: 1; }
.lmg__act { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.lmg__del:hover { color: var(--bad); }
.lmg__note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--info-bg); border: 1.5px solid var(--info-line); color: #245E9E; font-size: 0.92rem; }
.lmg__note .i { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.lmg__note a { font-weight: 800; color: inherit; }
.lmg__hint { display: flex; gap: 8px; align-items: flex-start; font-size: 0.88rem; font-weight: 600; color: var(--ink-3); }
.lmg__hint .i { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--gold-600); }
@media (max-width: 860px) {
  .lmg__row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .lmg__prog { grid-column: 2 / -1; grid-row: 2; }
  .lmg__cert { grid-column: 1 / -1; grid-row: 3; }
  .lmg__act { grid-column: 3; grid-row: 1; }
}

/* add / edit a learner */
.lform__avatar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lform__flowers { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.lform__flower { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); transition: transform var(--dur-2) var(--ease-spring), border-color var(--dur-2); }
.lform__flower svg { width: 82%; height: 82%; }
.lform__flower:hover { transform: rotate(-8deg) scale(1.06); border-color: var(--gold-300); }
.lform__flower.is-on { border-color: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-glow); }
.lform__row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .lform__row3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lform__row3 > .field:last-child { grid-column: 1 / -1; } }
.lform__lead { color: var(--ink-2); }
.lform__code-in { text-align: center; letter-spacing: 0.3em; }
.lform__code { display: grid; gap: 10px; }
.lform__code[hidden] { display: none; }

/* parental consent note (India's DPDP Act) */
.consent-note { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: linear-gradient(135deg, #F2FBF5, #FFFDF5); border: 1.5px solid var(--ok-line); }
.consent-note__ico { width: 44px; height: 44px; border-radius: 16px; display: grid; place-items: center; background: #fff; color: #1F7A45; }
.consent-note__ico .i { width: 22px; height: 22px; }
.consent-note__text p { margin-top: 2px; font-size: 0.9rem; color: var(--ink-2); }
.consent-note__text a { font-weight: 800; }
.consent-note__act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.consent-note__act .btn { white-space: normal; text-align: center; }   /* "I am the parent / guardian — I agree" wraps on phones */
@media (max-width: 700px) { .consent-note { grid-template-columns: auto minmax(0, 1fr); } .consent-note__act { grid-column: 1 / -1; justify-content: flex-start; } }

/* "for this learner" tag on the certificate and competition screens */
.ltag { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 99px; background: #fff; border: 1.5px solid var(--gold-200); width: fit-content; max-width: 100%; box-shadow: var(--sh-xs); }
.ltag__t { display: grid; gap: 1px; min-width: 0; }
.ltag__t small { font: 700 0.7rem/1 var(--f-head); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.ltag__t strong { font: 800 1rem/1.15 var(--f-head); color: var(--ink); letter-spacing: 0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltag__sw { margin-left: 4px; }
.comp-card-app > .ltag { margin-bottom: 4px; }

/* delete account */
.del { display: grid; gap: 12px; }
.del__warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--bad-bg); border: 1.5px solid var(--bad-line); color: #A42F43; }
.del__warn .i { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.del__people { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-height: 220px; overflow-y: auto; }
.del__people li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; font-weight: 800; }
.del__people small { color: var(--ink-3); font-weight: 700; }
.del__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.del__list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-weight: 600; }
.del__list .i { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--bad); }
.del__scope { display: flex; gap: 8px; align-items: center; font-weight: 800; color: #1F6E44; }
.del__scope .i { width: 18px; height: 18px; flex: none; }
.del__more { font-size: 0.88rem; color: var(--ink-3); }
.del--done { justify-items: center; text-align: center; }
.del--done .details { width: 100%; text-align: left; }
.del__ok { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.del__ok .i { width: 34px; height: 34px; }
