/* Lao4Me canonical bundle. GENERATED by scripts/assemble-styles.mjs. Do not edit. */

/* BEGIN lao4me-culture-theme.css */
/* Lao4Me – Tradition & Culture: header + curriculum skin only.
   No rules for .nav-list, .nav-item, mobile menu, buttons/icon assets managed by Codex. */
:root{
  --heritage-deep:#652d30;
  --heritage-bordeaux:#813e3a;
  --heritage-rust:#b45644;
  --heritage-sand:#dfc09b;
  --heritage-cream:#fff9ee;
  --heritage-muted:#7a655c;
}
body{background:linear-gradient(180deg,#fffaf2,#f9f1e6)!important;color:#40342f}
.main-content{background:linear-gradient(180deg,#fffdf7dd,transparent 45rem)}
/* The exact approved stacked Lao4Me artwork is the source of brand identity. */
.sidebar .brand-logo{width:164px;height:52px;object-fit:contain}
.topbar{
  position:relative;
  height:80px;
  padding:0 5px;
  gap:12px;
  border-bottom:1px solid #dec2a0;
  background:linear-gradient(110deg,#fffaf0,#f5e5d1);
}
.topbar:after{
  content:"";position:absolute;bottom:0;left:0;right:0;height:2px;
  background:repeating-linear-gradient(90deg,#b95a4d 0 7px,#e6c499 7px 14px,transparent 14px 21px);
  opacity:.48;pointer-events:none;
}
.header-logo{display:none;align-items:center;flex:0 0 auto;text-decoration:none}
.header-logo img{display:block;width:172px;height:47px;object-fit:contain;object-position:left center}
.topbar .breadcrumb>span,.topbar .breadcrumb>i{display:none}
.topbar .breadcrumb strong{color:#814a3f;font-weight:700}
.top-actions{gap:9px}
.topbar .today-label{color:#957a6a}
#app-back{display:none!important}
.install-app{
  height:36px;border:1px solid #dec3a2;border-radius:11px;
  background:#fff8ea;color:#713d36;
}
.install-app:hover{background:#f7e8d3}
.avatar{
  display:grid;place-items:center;
  flex:0 0 40px;width:40px;height:40px;
  border:2px solid #cba16d;border-radius:50%;
  background:#f7e2c6;color:#723731;
  font:800 14px/1 var(--sans);
  box-shadow:0 0 0 2px #fff9f1;
  cursor:pointer;
}
.avatar.profile-empty{font-size:0}
.avatar.profile-empty:before{
  content:"";position:absolute;width:11px;height:11px;
  top:8px;left:12px;border-radius:50%;background:#865941;
}
.avatar.profile-empty:after{
  content:"";position:absolute;width:21px;height:10px;
  bottom:6px;left:7px;border-radius:12px 12px 5px 5px;background:#865941;
}
.avatar{position:relative}
/* MBM v1.0.3 owns ALL flag drawing, dropdown styling, focus and stacking. */
.lao4me-language-control{display:flex;align-items:center;flex:0 0 auto;min-width:45px;min-height:42px}
.lao4me-language-control [data-mbm-language-core]{display:inline-flex}
body.mbm-locale-core-ready .lao4me-language-control>.language-toggle{display:none!important}
.lao4me-language-control>.language-toggle{
  display:inline-flex!important;padding:2px;border:1px solid #e0c5a8;border-radius:12px;
  background:#fff8ed;gap:1px;
}
.lao4me-language-control>.language-toggle button{font-size:10px;min-height:32px}
.lao4me-language-control .mbm-language-core-trigger{color:#713e36}
.page-view .eyebrow{color:#986c58}
.page-view .eyebrow-line{background:#ad4b3e}
.page-view h1{color:#49312f}
.page-view h1 em{color:#82403a}
.welcome-copy{color:#79665c}
.greeting-card{
  border:1px solid #e3c4a2;border-radius:20px;
  box-shadow:0 6px 21px #613d251a;
}
.greeting-copy{
  background:#fffaefd9;border:1px solid #f2dcc2;
  border-radius:13px;box-shadow:0 4px 12px #58372314;
}
.greeting-card .greeting-lao{color:#652f31}
.greeting-card .greeting-phonetic{color:#9b5948}
.greeting-card .sound-button{background:var(--tropical);color:#fff;border:1px solid var(--tropical-deep)}
.pathway-card{
  background:linear-gradient(135deg,#fffdf8,#fff7ed);
  border:1px solid #e8cdb0;border-radius:18px;
  box-shadow:0 6px 18px #68402712;
}
.pathway-card:before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:4px;
  background:#a85544;opacity:.68;
}
.pathway-card:after{
  width:95px;height:95px;right:7px;top:5px;border-radius:0;
  background:url('/illustrations/frangipani.svg') center/contain no-repeat;
  opacity:.10;pointer-events:none;
}
.pathway-card h2{color:#563530}
.pathway-card p{color:#78675d}
.pathway-card .pathway-kicker{color:#a66a50}
.pathway-button{background:var(--tropical);color:#fff;box-shadow:0 3px 0 #164d3e}
.pathway-button:hover{background:var(--tropical-deep)}
.pathway-button:focus-visible{outline:3px solid #72a88b;outline-offset:3px}
.explorer-tools>h2{color:#633d34}
.explorer-tool-grid button{background:#fffaf2;border:1px solid #e8ceb2;border-radius:16px;box-shadow:0 4px 13px #58372310}
.explorer-tool-grid button>span{color:#985441}
.explorer-tool-grid button strong{color:#5d3933}
.home-progress{background:#fffaf1;border-color:#e5c8a5}
.home-progress-bar{background:#ead9c4}
.home-progress-bar span{background:var(--tropical)}
/* The local footer uses the shared Lao4Me palette, without a second promotional block. */
@media(min-width:761px){
  .header-logo{display:none}
  .topbar .breadcrumb{margin-right:auto}
}
@media(max-width:760px){
  body{background:#fff9f0!important}
  .main-content{padding-left:13px;padding-right:13px}
  .topbar{
    height:72px;min-height:72px;padding:0 2px;gap:5px;
    position:relative;z-index:100;
  }
  .topbar .header-logo{
    display:flex!important;flex:0 0 clamp(148px,42vw,176px);
    width:clamp(148px,42vw,176px);height:53px;
    padding:0;border:0;border-radius:0;background:transparent;
    overflow:visible;
  }
  .header-logo img{width:100%;height:50px;object-fit:contain;object-position:left center}
  .topbar .breadcrumb{display:none!important}
  .top-actions{margin-left:auto;gap:4px;min-width:0}
  .top-actions .today-label{display:none}
  .install-app{min-width:30px;width:30px;height:34px;padding:0!important;justify-content:center}
  .install-app span:last-child{display:none!important}
  .avatar{flex:0 0 34px;width:34px;height:34px;font-size:12px}
  .avatar.profile-empty:before{top:6px;left:10px}
  .avatar.profile-empty:after{bottom:5px;left:6px}
  .lao4me-language-control{min-width:43px}
  .page-view{padding-top:24px}
  .page-view h1{font-size:clamp(30px,8vw,38px)}
  .greeting-card{height:145px}
  /* Mobile bottom nav, its burger and all nine incoming illustrations: UNTOUCHED. */
}
@media(max-width:375px){
 .topbar .header-logo{flex-basis:145px;width:145px}
 .topbar .header-logo img{height:45px}
 .install-app{width:27px;min-width:27px}
 .avatar{flex-basis:31px;width:31px;height:31px}
 .top-actions{gap:2px}
}

/* Identity v2: display the approved stacked source as one image, never as a horizontal collage. */
.sidebar .brand-logo{display:block;width:166px;height:111px;max-width:100%;object-fit:contain;object-position:left center}
@media(max-width:760px){
 .topbar .header-logo{display:flex!important;flex:0 0 clamp(96px,28vw,111px);width:clamp(96px,28vw,111px);height:68px;overflow:visible;padding:0;border:0;border-radius:0;background:transparent}
 .topbar .header-logo img{display:block;width:100%;height:68px;object-fit:contain;object-position:center}
}
@media(max-width:375px){
 .topbar .header-logo{flex-basis:95px;width:95px}
 .topbar .header-logo img{height:65px}
}

/* END lao4me-culture-theme.css */

/* BEGIN learning-polish.css */
/* Lao4Me v101: accessible reading sizes, green accents.
   Only presentation: preserve approved imagery, MBM shared shell and navigation. */
.home-push-onboarding{position:relative;padding-right:44px}
.home-push-dismiss{position:absolute;top:8px;right:9px;width:32px;height:32px;background:transparent;border:0;border-radius:8px;color:#66594c;font-size:22px;cursor:pointer}
.home-push-dismiss:hover{background:#eee5d7}
.home-push-dismiss:focus-visible{outline:3px solid #d8ad66;outline-offset:3px}
.word-meaning{font-size:14px;line-height:1.5}.word-phonetic{font-size:13px;line-height:1.4}
.word-category,.word-date,.row-status{font-size:11px;line-height:1.45}
.filter-pill{font-size:13px;line-height:1.35;min-height:40px}
.study-meta,.study-label{font-size:12px}.study-phonetic{font-size:15px}
.study-context{font-size:13px;line-height:1.55}
.search-box input{font-size:14px}.field-label,.field-label input,.field-label textarea,.field-label select{font-size:14px}
.course-push-callout button{margin-left:10px;min-height:38px;padding:7px 11px;border:1px solid #94b6a0;border-radius:9px;background:#fff;color:#276344;font-size:13px;font-weight:650;cursor:pointer}
.course-push-callout button:focus-visible{outline:3px solid #d8ad66;outline-offset:2px}
@media(max-width:760px){.word-phonetic{font-size:13px}.study-phonetic{font-size:15px}.filter-pill{padding:9px 13px}}

/* 22 Nov: one-screen quiz ergonomics and choose -> validate -> next workflow. */
.quiz-choice.is-selected,
.review-challenge-choices button.selected,
.course-option.is-selected,
.traveler-challenge-choices button.selected,
.grammar-answer.chosen:not(.correct):not(.incorrect){
  border:2px solid #246b55!important;background:#e4f2e7!important;color:#235a41!important;
  box-shadow:inset 0 0 0 1px #246b5533;
}
.quiz-check-answer:disabled,.review-challenge-check:disabled,
.course-check-answer:disabled,.traveler-check-answer:disabled,
.grammar-check-answer:disabled{opacity:.45;cursor:not-allowed}
.course-check-answer{display:block;margin:11px auto 0;min-height:44px}
.course-check-answer[hidden]{display:none}
.traveler-challenge-choices button small{display:block;color:#617d6a;font:500 12px/1.35 var(--sans,Arial,sans-serif);margin-top:3px}
.traveler-in-mission .traveler-hero,.traveler-in-mission .traveler-audio-setup{display:none!important}
@media(max-width:760px){
  #counting-program-view:has(.count-quiz),#reading-program-view:has(.course-options),
  #qcm-view:has(.quiz-card),#grammar-program-view:has(.grammar-question),
  #traveler-view:has(.traveler-in-mission),#revisions-view:has(.review-challenge-play){padding-top:8px}
  #qcm-root .learning-head{padding:0 0 7px}
  #qcm-root .learning-head h1{font:700 clamp(17px,4.4vw,21px)/1.25 var(--sans,Arial,sans-serif);margin:6px 0}
  #qcm-root .quiz-card{padding:12px;border-radius:14px}
  #qcm-root .quiz-word{font:700 clamp(27px,7vw,36px)/1.4 "Noto Sans Lao","Phetsarath OT",sans-serif}
  #qcm-root .quiz-phonetic{margin:1px 0 6px;font-size:14px}
  #qcm-root .library-speak{min-height:37px}
  #qcm-root .quiz-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  #qcm-root .quiz-choice{min-height:58px;padding:8px;text-align:center;font-size:13px;overflow-wrap:anywhere}
  #qcm-root .quiz-feedback{margin:8px 0 0}
  #qcm-root .quiz-check-answer,#qcm-root #qcm-next{width:100%;margin-top:10px;min-height:44px}
  #reading-program-view .course-session:has(.course-options){padding-bottom:8px}
  #reading-program-view .course-session:has(.course-options) .back-link{margin:0 0 3px;padding:4px}
  #reading-program-view .course-session:has(.course-options) .course-beta-line,
  #reading-program-view .course-session:has(.course-options) .course-hint{display:none}
  #reading-program-view .course-session:has(.course-options) h1{font:700 clamp(18px,4.5vw,22px)/1.3 var(--sans,Arial,sans-serif);margin:7px 0}
  #reading-program-view .course-session:has(.course-options)>p{font-size:12px;line-height:1.35;margin:4px 0}
  #reading-program-view .course-question-progress{margin:6px 0;height:5px}
  #reading-program-view .course-question-glyph{margin:5px auto 8px}
  #reading-program-view .course-options{gap:7px}
  #reading-program-view .course-option{min-height:59px;font-size:clamp(22px,6vw,29px);line-height:1.4;padding:4px}
  #reading-program-view .course-sound-options .course-option{min-height:58px;padding:8px 5px;font-size:13px!important}
  #reading-program-view .course-sound-prompt{margin:6px auto 8px}
  #reading-program-view .course-check-answer{width:100%;margin-top:9px}
  #reading-program-view .course-answer-feedback{padding:8px;line-height:1.3;font-size:12px}
  #reading-program-view [data-course-question-next]{min-height:42px;margin-top:7px}
  .review-challenge-play{padding:12px!important;gap:7px;border-radius:14px}
  .review-challenge-play .review-challenge-question{font-size:clamp(27px,7vw,35px);margin-top:2px;line-height:1.4}
  .review-challenge-play .review-challenge-phonetic{font-size:13px}
  .review-challenge-play>p{font-size:12px;margin:0}
  .review-challenge-play .review-challenge-progress-bar{height:5px}
  .review-challenge-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .review-challenge-choices button{min-height:58px;padding:8px;text-align:center;font-size:12px;overflow-wrap:anywhere}
  .review-challenge-play>.button-primary{width:100%;margin-top:2px;min-height:43px}
  .review-challenge-feedback{padding:8px;font-size:12px}
  .grammar-course .grammar-game-stages{margin-bottom:7px;gap:5px}
  .grammar-course .grammar-game-stages button{min-height:39px;padding:5px}
  .grammar-course .grammar-game-content{padding-bottom:8px;gap:6px}
  .grammar-course .grammar-question h4{font-size:15px;line-height:1.3;margin:4px 0 9px}
  .grammar-course .grammar-question-meter{margin:5px 0 8px}
  .grammar-course .grammar-answer-grid{gap:7px;margin-bottom:8px}
  .grammar-course .grammar-answer{min-height:56px;padding:6px 5px}
  .grammar-course .grammar-answer-lao{font-size:17px;line-height:1.4}
  .grammar-course .grammar-game-feedback{padding:8px;margin:6px 0}
  .grammar-course .grammar-check-answer{min-height:43px}
  #traveler-view .traveler-in-mission .traveler-panel{padding:11px;border-radius:14px}
  #traveler-view .traveler-in-mission .traveler-panel h2{font-size:19px;margin:6px 0}
  #traveler-view .traveler-in-mission .traveler-panel>p{font-size:12px;margin:7px 0}
  #traveler-view .traveler-in-mission .traveler-challenge-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  #traveler-view .traveler-in-mission .traveler-challenge-choices button{min-height:62px;padding:7px;overflow-wrap:anywhere}
  #traveler-view .traveler-in-mission .traveler-challenge-choices button span{font-size:17px;line-height:1.35}
  #traveler-view .traveler-in-mission .traveler-primary{min-height:43px;margin-top:8px}
}
@media(max-height:700px) and (max-width:760px){
  #qcm-root .quiz-choice,.review-challenge-choices button{min-height:47px}
  #reading-program-view .course-option{min-height:47px}
  .grammar-course .grammar-answer{min-height:46px}
  #traveler-view .traveler-in-mission .traveler-challenge-choices button{min-height:50px}
}

/* Dictionary playback: obvious, thumb-friendly green listening action. */
#word-card-speak{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  min-width:190px;min-height:52px;margin:14px auto 12px;padding:11px 23px;
  border:2px solid #176c4b;border-radius:999px;background:#23865f;color:#fff;
  font:800 16px/1.2 var(--sans,system-ui,sans-serif);letter-spacing:.01em;
  box-shadow:0 5px 0 #13583a21,0 9px 21px #145b4030;
  cursor:pointer;transition:background-color .16s,box-shadow .16s,transform .16s;
}
#word-card-speak:hover{background:#176e4d;box-shadow:0 6px 0 #13583a28,0 12px 24px #145b403b;transform:translateY(-1px)}
#word-card-speak:active{transform:translateY(1px)}
#word-card-speak.is-playing{background:#155f43;border-color:#0c5839;box-shadow:0 0 0 4px #28986b33,0 7px 17px #145b4030}
#word-card-speak:focus-visible,.library-speak:focus-visible{outline:3px solid #f1bc49;outline-offset:3px}
.library-speak{min-height:44px;padding:9px 15px;border:1px solid #176c4b;border-radius:999px;background:#23865f;color:#fff;font-size:13px;font-weight:750;box-shadow:0 4px 12px #145b4025}
.library-speak:hover{border-color:#0c5839;background:#176e4d;color:#fff}
@media(max-width:760px){#word-card-speak{min-width:185px;min-height:52px;font-size:16px}}
@media(prefers-reduced-motion:reduce){#word-card-speak{transition:none}#word-card-speak:hover,#word-card-speak:active{transform:none}}

/* Stable route entry: no scroll interpolation or browser anchor jumps after a page swap. */
html{scroll-behavior:auto!important;overflow-anchor:none}
.page-view{overflow-anchor:none}
.dictionary-visually-hidden{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;
  margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;border:0!important;
}

/* Dictionary: content starts immediately after two tabs and one lightweight toolbar. */
#library-view,#phrases-view{padding-top:9px}
#library-view .library-simple-head,#phrases-view .library-simple-head{
  min-height:0;display:flex;align-items:center;margin:0 0 5px;padding:0;
}
#library-view .library-simple-head h1,#phrases-view .library-simple-head h1{
  margin:0;font-size:clamp(25px,4vw,32px);line-height:1.15;letter-spacing:-.5px;
}
#library-view .dictionary-modes,#phrases-view .dictionary-modes{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;width:100%;
  margin:0 0 8px;padding:4px;border-radius:13px;
}
#library-view .dictionary-modes button,#phrases-view .dictionary-modes button{
  min-width:0;min-height:42px;padding:8px 10px;font-size:13px;line-height:1.25;
}
.dictionary-quick-controls{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:stretch;
  margin:0 0 8px;
}
.dictionary-quick-controls .search-box{
  display:flex;align-items:center;width:100%;max-width:none;min-width:0;
  height:46px;min-height:46px;padding:0 10px;border:1px solid #d8cdb9;
  border-radius:13px;background:#fffdf7;
}
.dictionary-quick-controls .search-box input{
  width:100%;min-width:0;border:0;background:transparent;font-size:14px;
}
.dictionary-filter-toggle{
  display:inline-flex;justify-content:center;align-items:center;gap:7px;
  min-height:46px;padding:0 15px;border:1px solid #bbd6c4;border-radius:13px;
  background:#eff6ec;color:#23684b;font:750 13px var(--sans,system-ui,sans-serif);
  white-space:nowrap;cursor:pointer;
}
.dictionary-filter-toggle span{font-size:19px;line-height:1}
.dictionary-filter-toggle:hover,.dictionary-filter-toggle.is-open{background:#dfeee0;border-color:#7daf8b}
.dictionary-filter-toggle.has-active-filter{background:#256f50;border-color:#256f50;color:white}
.dictionary-filter-toggle:focus-visible,.dictionary-filter-done:focus-visible,.dictionary-card-listen:focus-visible{
  outline:3px solid #e8b95c;outline-offset:2px;
}
.dictionary-filter-panel{
  display:grid;gap:12px;padding:14px;margin:2px 0 11px;border:1px solid #dfd6bf;
  border-radius:14px;background:#fffaf0;box-shadow:0 4px 13px #73562b0c;
}
.dictionary-filter-panel[hidden]{display:none!important}
.dictionary-filter-panel fieldset{margin:0;padding:0;border:0;min-width:0}
.dictionary-filter-panel legend{margin:0 0 6px;color:#506257;font-weight:700;font-size:12px}
#library-view .dictionary-filter-panel .library-track,#library-view .dictionary-filter-panel .library-scope{
  position:static;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;width:100%;margin:0;padding:0;background:transparent;box-shadow:none;
}
#library-view .dictionary-filter-panel .library-track button,
#library-view .dictionary-filter-panel .library-scope button{
  min-width:0;min-height:42px;font-size:12px;padding:7px 5px;border-radius:11px;
  text-align:center;white-space:normal;overflow-wrap:anywhere;
}
#library-view .dictionary-filter-panel #library-filters.library-filters,
#phrases-view .dictionary-filter-panel #phrases-filters.library-filters{
  display:block;margin:0;padding:0!important;min-height:0;overflow:visible!important;width:100%;
}
#library-view .dictionary-filter-panel .learning-topic-select,
#phrases-view .dictionary-filter-panel .learning-topic-select{
  display:flex;align-items:center;gap:8px;min-width:0;width:100%;
}
#library-view .dictionary-filter-panel #library-category-select,
#phrases-view .dictionary-filter-panel #phrases-category-select{
  min-width:0;flex:1;min-height:44px;padding:7px;border-radius:11px;
  font-size:13px;
}
.dictionary-filter-done{
  width:100%;min-height:44px;border:0;border-radius:12px;background:#23865f;
  color:#fff;font:750 14px var(--sans,system-ui,sans-serif);
}
#library-view .dictionary-letter-group{margin:4px 0 11px}
#library-view .dictionary-letter-group>h2{padding:5px 3px;margin:0;font-size:16px}
#library-view .dictionary-letter-group .library-grid{margin-top:6px;gap:8px}
#library-view .library-card{
  display:grid;grid-template-columns:68px minmax(0,1fr);grid-template-rows:repeat(5,auto);
  align-items:center;gap:2px 11px;min-height:118px;
  padding:11px 58px 11px 11px;position:relative;
}
#library-view .library-card .library-art{
  grid-column:1;grid-row:1/6;width:68px;height:68px;
}
#library-view .library-card .library-category{grid-column:2;grid-row:1;font-size:9px!important}
#library-view .library-card .library-lao{grid-column:2;grid-row:2;margin:0!important;font-size:25px!important;line-height:1.25!important}
#library-view .library-card .library-phonetic{grid-column:2;grid-row:3;font-size:13px!important;line-height:1.3!important;margin:0!important}
#library-view .library-card .library-meaning{grid-column:2;grid-row:4;font-size:15px!important;line-height:1.3!important}
#library-view .library-card .library-status{grid-column:2;grid-row:5;font-size:10px!important;line-height:1.25!important}
#library-view .library-card .dictionary-card-listen,
#phrases-view .phrase-card .dictionary-card-listen{
  position:absolute;right:9px;bottom:11px;z-index:3;pointer-events:auto;
  display:inline-flex;align-items:center;justify-content:center;
  width:46px;height:46px;padding:0;border:1px solid #176c4b;
  border-radius:14px;background:#23865f;color:white;font-size:23px;
  box-shadow:0 3px 9px #145b4030;cursor:pointer;touch-action:manipulation;
}
#library-view .library-card .dictionary-card-listen:hover,
#phrases-view .phrase-card .dictionary-card-listen:hover{background:#155f43}
#phrases-view .phrases-list{margin-top:6px}
#phrases-view .phrase-card{padding:12px 57px 28px 13px;gap:4px;min-height:115px}
#phrases-view .phrase-card .phrase-card-topic{font-size:9px}
#phrases-view .phrase-card .phrase-card-meaning{font-size:17px}
#phrases-view .phrase-card .phrase-card-lao{font-size:22px}
#phrases-view .phrase-card .phrase-card-status{bottom:9px;left:13px}
@media(max-width:600px){
  #library-view,#phrases-view{padding-top:6px}
  #library-view .library-simple-head h1,#phrases-view .library-simple-head h1{font-size:27px}
  #library-view .dictionary-modes button,#phrases-view .dictionary-modes button{min-height:40px;font-size:12px}
  .dictionary-quick-controls{gap:7px}
  .dictionary-quick-controls .search-box input{font-size:13px}
  .dictionary-filter-toggle{padding:0 11px;font-size:12px}
  #library-view .dictionary-letter-group .library-grid{grid-template-columns:1fr}
  #library-view .library-card{grid-template-columns:61px minmax(0,1fr);padding:10px 54px 10px 10px;min-height:113px;gap:1px 9px}
  #library-view .library-card .library-art{width:61px;height:61px}
  #library-view .library-card .library-lao{font-size:23px!important}
  #library-view .library-card .library-phonetic{font-size:12px!important}
  #library-view .library-card .library-meaning{font-size:14px!important}
  #library-view .library-card .dictionary-card-listen,#phrases-view .phrase-card .dictionary-card-listen{
    width:44px;height:44px;right:7px;bottom:9px;
  }
}

/* 22 Nov: cards are the destination, not the bottom of a long introduction.
   All learning overlays scroll internally; explanatory content stays available. */
#alphabet-root.card-flow-fullscreen,
#memocards-root.card-flow-fullscreen,
#study-wrap.card-flow-fullscreen,
#reading-program-root.card-flow-fullscreen,
#counting-program-root.card-flow-fullscreen,
#traveler-root.card-flow-fullscreen,
#grammar-program-view .grammar-flashcards.card-flow-fullscreen {
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100dvh!important;
  max-width:none!important;
  max-height:100dvh!important;
  min-height:0!important;
  margin:0!important;
  z-index:1500!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  background:linear-gradient(165deg,#fffaf0 0%,#f6ebd6 100%)!important;
  padding:calc(48px + env(safe-area-inset-top,0px)) 16px calc(20px + env(safe-area-inset-bottom,0px))!important;
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
}
.card-flow-close {
  position:fixed;
  top:calc(9px + env(safe-area-inset-top,0px));
  right:12px;
  width:42px;height:42px;
  border:1px solid #d9cfb9;
  border-radius:50%;
  background:#fffef9;
  color:#275e4d;
  font-size:27px;
  line-height:1;
  font-weight:500;
  box-shadow:0 4px 18px #18362b1a;
  z-index:1600;
}
.card-flow-soundbar,.card-flow-stage-grade,.alphabet-grade-actions,.memo-card-grade {
  display:flex;align-items:center;justify-content:center;gap:10px;
  flex-wrap:wrap;width:100%;margin:6px auto;
}
.card-flow-soundbar>button,.card-flow-stage-grade>button,
.alphabet-grade-actions>button,.memo-card-grade>button {
  min-height:44px;
  border:1px solid #9bb7a6;
  border-radius:13px;
  padding:9px 15px;
  background:#f5faf4;
  color:#1d614d;
  font-family:inherit;font-size:14px;line-height:1.3;font-weight:700;
  cursor:pointer;
}
.card-flow-stage-grade>button:last-child,
.alphabet-grade-actions>button:last-child,
.memo-card-grade>button:last-child {
  background:#226952;color:#fff;border-color:#226952;
}
.card-flow-soundbar {max-width:540px;order:3;}
.card-flow-soundbar:empty{display:none}
.card-flow-soundbar button{white-space:nowrap;}
/* Alphabet: first the letter, then controls, with the explanatory sheet below. */
#alphabet-root.card-flow-fullscreen .alphabet-card {
  order:1;width:min(100%,540px);margin:0 auto;min-height:0;
  padding:14px 16px;
}
#alphabet-root.card-flow-fullscreen .alphabet-progress{order:0;margin:0;text-align:center}
#alphabet-root.card-flow-fullscreen .alphabet-grade-actions{order:2;max-width:540px}
#alphabet-root.card-flow-fullscreen .alphabet-controls{order:3;margin:0;width:min(100%,540px)}
#alphabet-root.card-flow-fullscreen .alphabet-picker{order:5;width:min(100%,540px);margin-top:14px}
#alphabet-root.card-flow-fullscreen .learning-head{order:6;max-width:540px;text-align:center;opacity:.85}
#alphabet-root.card-flow-fullscreen .alphabet-symbol{font-size:clamp(54px,13vw,96px)}
#alphabet-root.card-flow-fullscreen .alphabet-visual{margin:4px auto}
#alphabet-root.card-flow-fullscreen .card-flow-soundbar{order:4}
#alphabet-root.card-flow-fullscreen .alphabet-grade-actions button{flex:1 1 45%}
/* Memo: the current flashcard appears above category selectors and introduction. */
#memocards-root.card-flow-fullscreen .memo-page {
  display:flex;flex-direction:column;align-items:center;
  width:min(100%,570px);max-width:570px;margin:0 auto;gap:10px;
}
#memocards-root.card-flow-fullscreen .memo-card{order:0;width:100%;margin:0 auto;padding:14px;}
#memocards-root.card-flow-fullscreen .memo-card-art{max-height:clamp(125px,23dvh,240px)}
#memocards-root.card-flow-fullscreen .memo-card-nav{margin-top:4px}
#memocards-root.card-flow-fullscreen .memo-themes{order:3;width:100%;margin-top:8px}
#memocards-root.card-flow-fullscreen .memo-page>.eyebrow,
#memocards-root.card-flow-fullscreen .memo-page>h1,
#memocards-root.card-flow-fullscreen .memo-page>.welcome-copy{order:4;margin:0;text-align:center}
#memocards-root.card-flow-fullscreen .card-flow-soundbar{order:2}
#memocards-root.card-flow-fullscreen .memo-card-grade button{flex:1 1 44%}
/* Reviews: the flip surface stays centered, while all grading and audio works. */
#study-wrap.card-flow-fullscreen .study-flip {
  order:2;width:min(100%,560px);margin:0;min-height:min(50dvh,470px);
}
#study-wrap.card-flow-fullscreen .study-meta {order:0;margin:0;width:min(100%,560px)}
#study-wrap.card-flow-fullscreen .review-direction{order:4;width:min(100%,560px);margin:0}
#study-wrap.card-flow-fullscreen .study-review-actions{order:3;margin:0;width:min(100%,560px)}
#study-wrap.card-flow-fullscreen .review-change-topic{order:6;margin:8px 0}
#study-wrap.card-flow-fullscreen .review-gesture-tip{order:7;margin:0}
#study-wrap.card-flow-fullscreen .card-flow-soundbar{order:1}
/* Reading stages and tests open as cards. Preserve actual questions and answers. */
#reading-program-root.card-flow-fullscreen .course-session{
  width:min(100%,650px)!important;
  margin:0 auto!important;
  padding:0!important;
  display:flex;flex-direction:column;align-items:stretch;gap:12px;
}
#reading-program-root.card-flow-fullscreen .course-session:has(.course-teach-card)>h1,
#reading-program-root.card-flow-fullscreen .course-session:has(.course-teach-card)>.course-beta-line{
  display:none;
}
#reading-program-root.card-flow-fullscreen .course-session>.eyebrow{font-size:12px;text-align:center;margin:0}
#reading-program-root.card-flow-fullscreen .course-teach-card{margin:0 auto;width:100%;max-width:620px}
#reading-program-root.card-flow-fullscreen .course-teach-navigation{margin:0}
#reading-program-root.card-flow-fullscreen .course-day-goal{margin-top:12px}
#reading-program-root.card-flow-fullscreen .card-flow-stage-grade{margin:0}
#reading-program-root.card-flow-fullscreen .card-flow-stage-grade button{flex:1 1 40%}
#reading-program-root.card-flow-fullscreen .course-session>.back-link{align-self:flex-start;margin:0}
/* Grammar flashcards use the same dialog-like full-screen study surface. */
#grammar-program-view .grammar-flashcards.card-flow-fullscreen {
  gap:10px!important;padding-top:calc(52px + env(safe-area-inset-top,0px))!important;
}
#grammar-program-view .grammar-flashcards.card-flow-fullscreen .grammar-flip-card{
  width:min(100%,570px);min-height:min(44dvh,440px);margin:0 auto;
}
#grammar-program-view .grammar-flashcards.card-flow-fullscreen
  .grammar-card-situation{width:min(100%,600px);}
#grammar-program-view .grammar-flashcards.card-flow-fullscreen
  .grammar-card-grade-actions{width:min(100%,600px);margin:0 auto;}
#grammar-program-view .grammar-flashcards.card-flow-fullscreen
  .grammar-swipe-help{margin:0 auto;font-size:12px;}
/* The swipe detector never hijacks vertical reading or deliberate button taps. */
#alphabet-root .alphabet-card,#memocards-root .memo-card,
#reading-program-root .course-teach-card{touch-action:pan-y;}
@media(max-height:680px){
  #study-wrap.card-flow-fullscreen .study-flip{min-height:310px}
  #memocards-root.card-flow-fullscreen .memo-card-art{max-height:145px}
  #alphabet-root.card-flow-fullscreen .alphabet-card{padding:10px}
}

/* Numeric exercises and conversational missions are focused without disturbing
   the scoring and answer-validation rules of their quizzes. */
#counting-program-root.card-flow-fullscreen .count-quiz,
#traveler-root.card-flow-fullscreen .traveler-panel{
  width:min(100%,650px);max-width:650px;
  margin:0 auto!important;
  padding:14px 16px;
  box-sizing:border-box;
  background:#fffaf0;
  border:1px solid #e0d3b9;
  border-radius:19px;
}
#counting-program-root.card-flow-fullscreen .count-quiz>h2{font-size:clamp(20px,4.5vw,29px);margin:6px 0}
#counting-program-root.card-flow-fullscreen .count-quiz .count-question-subject{margin:8px auto}
#traveler-root.card-flow-fullscreen>.traveler-hero,
#traveler-root.card-flow-fullscreen>.traveler-modes{display:none!important}
#study-wrap.card-flow-fullscreen .review-challenge-play{width:min(100%,630px);max-width:630px;order:2}
#study-wrap.card-flow-fullscreen .review-challenge-result{width:min(100%,630px);order:2}
@media(max-width:580px){
  #counting-program-root.card-flow-fullscreen .count-quiz,
  #traveler-root.card-flow-fullscreen .traveler-panel{padding:12px}
  #alphabet-root.card-flow-fullscreen .alphabet-card{width:100%}
  #memocards-root.card-flow-fullscreen .memo-card .memo-card-lao{font-size:clamp(28px,8vw,38px)}
}

/* END learning-polish.css */

/* BEGIN grammar-express.css */
/* Lao4Me · Grammaire express (inside the existing everyday speaking course)
   No styling or changes to Codex-owned navigation, illustrations or lesson cards. */
.grammar-quick{
  scroll-margin-top:86px;
  margin:12px 0 17px;
  background:linear-gradient(145deg,#fffdf8,#fbf0df);
  color:#483632;border:1px solid #dec5a7;border-radius:18px;
  box-shadow:0 7px 17px #673c2812;overflow:hidden;
}
.grammar-quick>summary{
  display:flex;align-items:center;gap:12px;min-height:66px;padding:12px 16px;
  list-style:none;cursor:pointer;user-select:none;
}
.grammar-quick>summary::-webkit-details-marker{display:none}
.grammar-quick>summary:focus-visible{outline:3px solid #a55d45;outline-offset:-3px}
.grammar-quick[open]>summary{border-bottom:1px solid #e9d4b7}
.grammar-summary-mark{
  display:grid;place-items:center;flex:0 0 41px;width:41px;height:41px;
  background:#f3e1c8;border:1px solid #dec2a0;border-radius:12px;
  font:700 26px/1 "Noto Sans Lao","Phetsarath OT",system-ui,sans-serif;
  color:#7a3c37;
}
.grammar-summary-copy{display:grid;gap:4px;min-width:0;flex:1}
.grammar-summary-copy strong{font-size:15px;color:#683633;line-height:1.25}
.grammar-summary-copy small{font-size:12px;color:#78695d;line-height:1.35}
.grammar-summary-chevron{font-size:26px;line-height:1;color:#985e42;transition:transform .2s}
.grammar-quick[open] .grammar-summary-chevron{transform:rotate(180deg)}
.grammar-quick-content{padding:14px 15px 17px}
.grammar-tabs{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
  gap:6px;margin-bottom:16px;
  background:#f2e7d8;padding:5px;border-radius:12px;
}
.grammar-tabs [role=tab]{
  min-width:0;min-height:42px;border-radius:9px;border:1px solid transparent;
  background:transparent;color:#725b4e;font-size:12px;font-weight:750;
  padding:8px 5px;line-height:1.25;text-align:center;
}
.grammar-tabs [role=tab][aria-selected=true]{
  background:#783a35;border-color:#783a35;color:#fff8ee;
  box-shadow:0 3px 8px #763f362a;
}
.grammar-tabs [role=tab]:focus-visible{outline:3px solid #b88b60;outline-offset:2px}
.grammar-panel[hidden]{display:none!important}
.grammar-intro{font-size:13px;line-height:1.6;margin:0 0 13px;color:#65574f}
.grammar-formula{
  display:flex;align-items:center;justify-content:center;flex-wrap:wrap;
  gap:8px;background:#f4e7d2;border:1px solid #e0c6a6;border-radius:12px;
  padding:12px 8px;margin:0 0 13px;
}
.grammar-formula>span{
  padding:7px 10px;border-radius:8px;background:#fffbf3;
  font-size:12px;font-weight:750;color:#653e35;
}
.grammar-formula>span small{display:block;text-align:center;margin-top:3px;color:#816c5c;font-size:11px;font-weight:500}
.grammar-formula>b{color:#a56b4e;font-size:15px}
.grammar-lao{
  font-family:"Noto Sans Lao","Phetsarath OT","Saysettha OT",system-ui,sans-serif;
  color:#733531;font-size:18px;line-height:1.6;word-break:break-word;
}
.grammar-phonetic{display:block;color:#8e654e;font-size:11px;line-height:1.35;font-weight:500}
.grammar-table-scroll{max-width:100%;overflow-x:auto;border:1px solid #e6cfb4;border-radius:12px;background:#fffdf8}
.grammar-classifier-table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}
.grammar-classifier-table th{
  padding:10px 12px;background:#f3e1cd;color:#683b32;
  letter-spacing:.01em;font-size:11px;font-weight:800;
}
.grammar-classifier-table td{padding:10px 12px;border-top:1px solid #eee1d3;vertical-align:middle}
.grammar-classifier-table tbody tr:nth-child(even){background:#fffcf5}
.grammar-class-cell{white-space:nowrap;width:115px}
.grammar-class-cell strong{font-size:20px}
.grammar-usage{width:30%;color:#574b43;font-weight:600}
.grammar-example-cell{line-height:1.5;color:#5b534b}
.grammar-example-cell .grammar-lao{display:block;font-size:16px}
.grammar-example-cell .grammar-phonetic{margin:2px 0 3px}
.grammar-tip{
  background:#f7ecdc;border-left:3px solid #ad6f4c;border-radius:8px;
  padding:11px 12px;color:#634b3e;font-size:12px;line-height:1.55;margin:13px 0 8px;
}
.grammar-tip strong{color:#743d32}
.grammar-small{color:#74645a;font-size:12px;line-height:1.55;margin:8px 0 0}
.grammar-rule-stack{display:grid;gap:8px;margin-bottom:14px}
.grammar-rule{
  display:flex;align-items:center;gap:15px;
  background:#fffaf2;border:1px solid #e8d3b8;border-radius:12px;
  padding:10px 13px;
}
.grammar-rule>strong{width:115px;min-width:115px;text-align:center;color:#743632;font-size:21px}
.grammar-rule>strong span{font-family:"Noto Sans Lao","Phetsarath OT",system-ui,sans-serif}
.grammar-rule>strong small{font:600 12px/1.2 system-ui,sans-serif;color:#8d6752}
.grammar-rule>span{color:#615248;font-size:13px;line-height:1.55}
.grammar-example-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.grammar-example{
  display:flex;flex-direction:column;gap:4px;
  border:1px solid #e9d4b8;border-radius:12px;padding:12px;
  background:#fffdfa;min-width:0;
}
.grammar-example-tag{font-size:10px;color:#8b5d4b;text-transform:uppercase;font-weight:800;letter-spacing:.035em}
.grammar-example .grammar-lao{font-size:20px;font-weight:650}
.grammar-example .grammar-phonetic{font-size:12px}
.grammar-meaning{font-size:12px;line-height:1.5;color:#61544e}
.grammar-note{font-size:11px;line-height:1.55;color:#886f5e;margin:16px 0 5px}
.grammar-references{font-size:10px;line-height:1.55;color:#8a7767;margin:0}
.grammar-references a{color:#7d4a3d;text-decoration:underline;text-underline-offset:2px}
@media(max-width:760px){
  .grammar-quick{margin:11px 0 15px}
  .grammar-quick>summary{padding:10px 12px}
  .grammar-quick-content{padding:12px 10px 14px}
  .grammar-classifier-table{table-layout:fixed}
  .grammar-classifier-table thead{display:none}
  .grammar-classifier-table tbody tr{display:grid;grid-template-columns:minmax(88px,34%) minmax(0,1fr);align-items:start}
  .grammar-classifier-table tbody td{display:block;width:auto;border:0;padding:8px 10px}
  .grammar-classifier-table .grammar-class-cell{grid-row:1/span 2;grid-column:1;padding-top:14px;white-space:normal}
  .grammar-classifier-table .grammar-usage{grid-column:2;grid-row:1;font-size:12px;padding-top:11px}
  .grammar-classifier-table .grammar-example-cell{grid-column:2;grid-row:2;padding-top:0;padding-bottom:13px}
  .grammar-classifier-table tbody tr+tr{border-top:1px solid #ecddc9}
  .grammar-classifier-table .grammar-example-cell .grammar-lao{font-size:16px}
  .grammar-example-grid{grid-template-columns:1fr}
}
@media(max-width:375px){
  .grammar-summary-copy strong{font-size:14px}
  .grammar-summary-copy small{font-size:11px}
  .grammar-rule{gap:9px;padding:9px 8px}
  .grammar-rule>strong{width:90px;min-width:90px;font-size:18px}
  .grammar-rule>span{font-size:12px}
  .grammar-tabs [role=tab]{font-size:11px}
}
@media(prefers-reduced-motion:reduce){
  .grammar-summary-chevron{transition:none}
}

/* Word construction: distinct Lao blocks, no decorative or misleading word images. */
.grammar-compound-contrast{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:10px 0 12px}
.grammar-compound-contrast>div{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:11px 8px;border:1px solid #d9c1a3;border-radius:12px;background:#fffaf1;text-align:center}
.grammar-compound-contrast strong{font:750 23px/1.4 "Noto Sans Lao","Phetsarath OT",system-ui,sans-serif;color:#793f34}
.grammar-compound-contrast strong small{font:600 12px/1.4 system-ui,sans-serif;color:#8b6850}
.grammar-compound-contrast span{font-size:12px;line-height:1.4;color:#71564c}
.grammar-compound-list{display:grid;gap:11px;margin:15px 0}
.grammar-compound-item{background:#fffdf9;border:1px solid #e5d1b5;border-radius:14px;padding:12px 10px;min-width:0}
.grammar-compound-parts{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:9px;margin-bottom:11px}
.grammar-compound-parts>b{font-size:18px;color:#9b704d}
.grammar-compound-part{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:105px;max-width:100%;min-height:88px;gap:3px;padding:8px 10px;border-radius:11px;background:#e8f1e8;color:#265944;text-align:center}
.grammar-compound-part .grammar-lao{color:#265944;font-size:23px}
.grammar-compound-part small{font-size:11px}
.grammar-compound-part>span{font-size:12px;line-height:1.3}
.grammar-compound-result{display:flex;align-items:center;justify-content:center;gap:13px;border-top:1px dashed #dec5a8;padding-top:11px}
.grammar-compound-result>span{font-size:23px;font-weight:750;color:#9b704d}
.grammar-compound-result>div{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:3px 10px;text-align:center}
.grammar-compound-result .grammar-lao{font-size:24px}
.grammar-compound-result small{font-size:11px;color:#805b4a}
.grammar-compound-result strong:not(.grammar-lao){font-size:13px;color:#28593e}
.grammar-compound-result em{flex-basis:100%;font-size:11px;color:#817163}
@media(max-width:760px){
  .grammar-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grammar-tabs [data-grammar-tab="compounds"]:last-child{grid-column:1/-1}
  .grammar-compound-part{min-width:88px;padding:8px 7px}
}

/* END grammar-express.css */

/* BEGIN grammar-practice.css */
/* Lao4Me · Interactive grammar in the existing practical courses. */
.grammar-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
.grammar-tabs [role=tab]{font-size:11px;white-space:normal;min-height:48px}
.grammar-lesson[hidden]{display:none!important}
.grammar-reference-details{border:1px solid #e5ceaf;border-radius:12px;overflow:hidden;margin:12px 0;background:#fffaf1}
.grammar-reference-details>summary{list-style:none;cursor:pointer;padding:12px 14px;color:#754132;font-weight:750;font-size:12px}
.grammar-reference-details>summary::-webkit-details-marker{display:none}
.grammar-reference-details[open]>summary{border-bottom:1px solid #e8d2b7}
.grammar-reference-details>summary:focus-visible{outline:3px solid #bd9064;outline-offset:-3px}
.grammar-reference-details .grammar-table-scroll{border:none;border-radius:0}
.grammar-flashcards{margin:15px 0 13px}
.grammar-card-progress{font-size:12px;color:#886451;font-weight:750;margin-bottom:7px}
.grammar-flip-card{
  width:100%;min-height:173px;background:linear-gradient(140deg,#fdf7e8,#f0dfc5);
  border:1px solid #d9b994;border-radius:17px;color:#693d34;
  box-shadow:0 4px 11px #5f392214;cursor:pointer;
  display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;
  text-align:center;padding:15px 19px;transition:background .15s;
}
.grammar-flip-card:hover{background:#f7e8d3}
.grammar-flip-card.revealed{background:linear-gradient(140deg,#f0e4d0,#fff8eb)}
.grammar-flip-card:focus-visible{outline:3px solid #a65b41;outline-offset:3px}
.grammar-flip-card>small,.grammar-flip-hint{font-size:11px;color:#96735a;font-weight:650}
.grammar-flip-card>strong{font-size:15px;color:#86503e}
.grammar-flip-lao{font-family:"Noto Sans Lao","Phetsarath OT",system-ui,sans-serif;font-size:36px;line-height:1.5;color:#713b35}
.grammar-flip-answer{font-weight:800;font-size:15px}
.grammar-flip-example{font-size:12px;line-height:1.6;color:#665149}
.grammar-flip-example span{font-family:"Noto Sans Lao","Phetsarath OT",system-ui,sans-serif;font-size:16px}
.grammar-card-controls{display:flex;gap:8px;justify-content:space-between;margin-top:9px}
.grammar-card-controls button,.grammar-game-secondary{
  min-height:40px;border:1px solid #dbc3a7;border-radius:10px;background:#fffaf0;
  color:#714b3f;padding:9px 12px;font-size:12px;font-weight:750
}
.grammar-card-controls button:disabled{opacity:.4;cursor:not-allowed}
.grammar-game-progress{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  margin:12px 0 7px;color:#856957;font-weight:650;font-size:11px
}
.grammar-game-stages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:0 0 15px}
.grammar-game-stages button{
  border:1px solid #e4c9a5;background:#fff8ed;border-radius:10px;
  color:#6e584a;font-size:11px;font-weight:750;min-width:0;line-height:1.25;
  min-height:44px;padding:7px 5px;text-align:center
}
.grammar-game-stages button.active{
  background:var(--tropical);border-color:var(--tropical);color:#fff;box-shadow:0 3px 8px #164d3e20
}
.grammar-game-stages button:disabled{opacity:.46;cursor:not-allowed}
.grammar-game-stages button:focus-visible,.grammar-game-primary:focus-visible,
.grammar-game-secondary:focus-visible,.grammar-match-card:focus-visible,
.grammar-answer:focus-visible{outline:3px solid #b18463;outline-offset:2px}
.grammar-game-content{display:grid;gap:12px}
.grammar-game-tip{
  border:1px solid #e3d0b5;border-radius:10px;padding:10px 12px;
  color:#786356;background:#fff9f0;font-size:12px;line-height:1.5
}
.grammar-game-primary{
  width:100%;min-height:44px;background:var(--tropical);color:#fff;border:1px solid var(--tropical-deep);
  border-radius:11px;padding:11px 12px;font-size:13px;font-weight:800;
  box-shadow:0 3px 0 #164d3e;cursor:pointer
}
.grammar-game-primary:hover{background:var(--tropical-deep)}
.grammar-game-secondary{width:100%;cursor:pointer}
.grammar-match-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px}
.grammar-match-heading strong{font-size:14px;color:#654035}
.grammar-match-heading span{white-space:nowrap;font-size:11px;color:#8f6b54}
.grammar-match-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.grammar-match-column{display:grid;grid-template-rows:auto repeat(4,minmax(64px,auto));gap:7px}
.grammar-match-column>small{display:block;font-size:11px;color:#986c55;font-weight:800;text-align:center;padding-bottom:4px}
.grammar-match-card{
  width:100%;min-width:0;border:1px solid #e2c7a7;border-radius:11px;
  padding:10px 5px;background:#fffcf7;display:flex;flex-direction:column;
  justify-content:center;align-items:center;gap:3px;text-align:center;
  min-height:65px;line-height:1.3;font-size:12px;color:#684a3f;cursor:pointer
}
.grammar-match-card .grammar-lao{font-size:23px;line-height:1.4}
.grammar-match-card>strong{font-size:12px}
.grammar-match-card.selected{border:2px solid #934d3e;background:#f2dec8}
.grammar-match-card:disabled{background:#e7efdf;border-color:#91b080;opacity:.7;color:#567345;cursor:default}
.grammar-match-card:disabled .grammar-lao{color:#567345}
.grammar-game-feedback{font-size:12px;line-height:1.55;border-radius:9px;padding:9px 11px;background:#f2e9dd;color:#735b4b;min-height:28px}
.grammar-game-feedback.correct{background:#ebf2e5;color:#47663e}
.grammar-game-feedback.incorrect{background:#fcf0e8;color:#9d4d40}
.grammar-answer-correct{display:block;margin-top:7px;font-weight:800}
.grammar-question-step{display:flex;align-items:center;justify-content:space-between;color:#8b6653;font-size:12px;font-weight:750}
.grammar-question-meter{height:6px;background:#e9d7bf;border-radius:9px;overflow:hidden;margin:8px 0 17px}
.grammar-question-meter>span{display:block;height:100%;background:#9b614a;transition:width .2s}
.grammar-question h4{font-size:16px;color:#5a342f;line-height:1.35;margin:0 0 15px}
.grammar-answer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}
.grammar-answer{
  display:flex;align-items:center;justify-content:center;flex-direction:column;
  gap:3px;text-align:center;min-width:0;min-height:77px;padding:10px 8px;border-radius:12px;
  border:1px solid #dfc6a8;background:#fffdf7;color:#60483e;line-height:1.35;cursor:pointer;
  font-size:12px;font-weight:680
}
.grammar-answer-lao{font-family:"Noto Sans Lao","Phetsarath OT",system-ui,sans-serif;color:#773d36;font-size:19px;line-height:1.55}
.grammar-answer>small{font-weight:500;color:#a0795b;font-size:10px}
.grammar-answer.chosen{border:2px solid #a86f4e}
.grammar-answer.correct{border-color:#61905a;background:#edf6e7}
.grammar-answer.incorrect{border-color:#ba6655;background:#fff0ea}
.grammar-answer:disabled{cursor:default}
.grammar-game-hint{font-size:12px;color:#937a65}
.grammar-result{
  border:1px solid #e1c9ad;border-radius:13px;background:#fff9ef;
  padding:15px;display:grid;gap:11px;text-align:center
}
.grammar-result>strong{color:#673d35;font-size:18px}
.grammar-result>p{font-size:13px;color:#745e50;margin:0}
.grammar-result-symbol{color:#985b41;font-size:27px}
.grammar-counting-guide .grammar-game-stages{margin-bottom:13px}
@media(max-width:760px){
  .grammar-quick-content{padding:11px 10px 15px}
  .grammar-tabs [role=tab]{font-size:10px;min-height:48px;padding:6px 3px}
  .grammar-game-stages button{font-size:10px;padding:5px 3px}
  .grammar-answer-grid{grid-template-columns:1fr 1fr}
  .grammar-answer{min-height:80px}
  .grammar-match-card{min-height:69px}
  .grammar-flip-card{min-height:163px}
}
@media(max-width:340px){
  .grammar-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grammar-match-grid{gap:5px}
  .grammar-match-card{font-size:11px}
  .grammar-game-stages button{font-size:9px}
}
@media(prefers-reduced-motion:reduce){.grammar-question-meter>span,.grammar-flip-card{transition:none}}

/* One swipeable grammar rule per card, matching the existing vocabulary review gesture. */
.grammar-swipe-card{
  touch-action:pan-y;user-select:none;-webkit-user-select:none;min-height:208px;
  transition:transform .15s ease,background .15s ease;will-change:transform;
  display:flex;flex-direction:column;gap:9px;padding:18px 20px;overflow:hidden;
}
.grammar-swipe-card.revealed{min-height:245px}
.grammar-flip-label{font-size:11px;font-weight:800;letter-spacing:.035em;color:#8f694d;text-transform:uppercase}
.grammar-swipe-card .grammar-flip-lao{font-size:43px;line-height:1.5}
.grammar-flip-rule{display:block;font-size:13px;font-weight:550;line-height:1.6;color:#51443d}
.grammar-swipe-card .grammar-flip-example{
  display:flex;flex-direction:column;align-items:center;gap:2px;
  width:100%;border-top:1px solid #d9c3a7;margin-top:5px;padding-top:10px;
}
.grammar-swipe-card .grammar-flip-example small{font-size:11px;color:#966a4c}
.grammar-swipe-help,.grammar-card-reveal-hint{color:#775f51;font-size:11px;line-height:1.5;text-align:center;margin:8px 0}
.grammar-card-situation{
  border:1px solid #deceb1;border-radius:13px;background:#fffcf5;
  padding:13px 12px;margin-top:10px;
}
.grammar-card-situation>strong{font-size:13px;color:#275a3e}
.grammar-card-situation>p{font-size:12px;color:#514e46;line-height:1.55;margin:6px 0 11px}
.grammar-card-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.grammar-card-choice{
  display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;
  min-height:75px;border:1px solid #d7bc9d;border-radius:11px;background:#fff5e6;
  color:#754536;padding:8px 4px;text-align:center;cursor:pointer;
}
.grammar-card-choice strong{font:700 21px/1.5 "Noto Sans Lao","Phetsarath OT",system-ui,sans-serif}
.grammar-card-choice small{color:#886b56;font-size:10px;line-height:1.3}
.grammar-card-choice.correct{border:2px solid #388365;background:#e5f4e9}
.grammar-card-choice.incorrect{border:2px solid #c45b46;background:#fff0e9}
.grammar-card-choice:disabled{cursor:default}
.grammar-card-choice:focus-visible,.grammar-card-grade-actions button:focus-visible,
.grammar-swipe-card:focus-visible{outline:3px solid #b78a60;outline-offset:2px}
.grammar-card-grade-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:11px}
.grammar-card-grade-actions button{
  border:1px solid #cba988;border-radius:12px;min-height:48px;padding:10px 8px;
  font-size:12px;font-weight:800;line-height:1.35;cursor:pointer;
}
.grammar-card-grade-actions button:first-child{background:#fff1e7;color:#854b3d}
.grammar-card-grade-actions button:last-child{background:#236d4a;border-color:#236d4a;color:white}
.grammar-cards-done{display:grid;gap:10px;text-align:center;padding:18px;border:1px solid #d9c5a8;border-radius:13px;background:#fffaf2}
.grammar-cards-done>strong{font-size:16px;color:#266146}
.grammar-cards-done>p{margin:0;font-size:13px;color:#6c5a50}
.grammar-cards-done .grammar-card-progress{margin:4px 0 8px}
.grammar-full-reference{border:1px solid #e2ccb0;border-radius:12px;background:#fffaf1;margin-top:12px}
.grammar-full-reference>summary{cursor:pointer;list-style:none;padding:13px 14px;color:#734534;font-size:12px;font-weight:800}
.grammar-full-reference>summary::-webkit-details-marker{display:none}
.grammar-full-reference>summary:focus-visible{outline:3px solid #a98765;outline-offset:2px}
.grammar-full-reference-body{border-top:1px solid #e2ccb0;padding:12px}
@media(max-width:430px){
 .grammar-card-choices{gap:5px}
 .grammar-card-choice strong{font-size:18px}
 .grammar-card-grade-actions button{font-size:11px}
}
@media(prefers-reduced-motion:reduce){.grammar-swipe-card{transition:none}}

/* Eighteen transparent, text-free watercolor motifs. Each 216px atlas cell is
   independent: six columns x three rows in classifier / grammar-rule order. */
.grammar-card-art{
  display:block;
  flex:0 0 auto;
  width:160px;
  max-width:100%;
  aspect-ratio:1;
  margin:2px auto 0;
  background-image:url('/illustrations/grammar/grammar-watercolor-18-v109.webp');
  background-position:var(--grammar-art-x) var(--grammar-art-y);
  background-size:600% 300%;
  background-repeat:no-repeat;
  pointer-events:none;
}
.grammar-swipe-card{min-height:284px}
.grammar-swipe-card.revealed{min-height:302px}
.grammar-swipe-card.revealed .grammar-card-art{width:106px;margin:0 auto}
@media(max-width:430px){
  .grammar-card-art{width:140px}
  .grammar-swipe-card.revealed .grammar-card-art{width:94px}
  .grammar-swipe-card{padding:14px 12px}
}
@media(prefers-reduced-motion:reduce){
  .grammar-card-art{animation:none}
}

/* Grammar foundations: compact native Lao reference and text-only study cards. */
.grammar-foundations-table .grammar-usage-note{
  display:block;margin-top:6px;color:#79675a;font-size:11px;line-height:1.5;font-weight:450;
}
.grammar-foundations-table .grammar-example-cell{min-width:160px}
.grammar-foundations-rules{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:14px 0}
.grammar-foundations-rule{
  display:flex;flex-direction:column;gap:4px;min-width:0;
  border:1px solid #e6ceb0;border-radius:12px;background:#fffaf2;padding:12px;
}
.grammar-foundations-rule>strong{font-size:12px;color:#6d473b;line-height:1.4}
.grammar-foundations-rule .grammar-lao{font-size:19px}
.grammar-foundations-rule>small{font-size:11px;color:#96745a}
.grammar-foundations-rule>p{margin:4px 0 0;color:#67564b;font-size:12px;line-height:1.55}
/* Learning cards show the learner-language meaning immediately under the phonetics. */
.grammar-study-translation{
  display:block;margin-top:3px;color:#246b55;font-size:13px;
  font-weight:700;line-height:1.5;overflow-wrap:anywhere
}
.grammar-class-cell .grammar-study-translation{font-size:12px}
.grammar-flip-translation{
  display:block;color:#246b55;font-size:13px;font-weight:700;
  line-height:1.5;overflow-wrap:anywhere
}
.grammar-swipe-card.grammar-text-card{min-height:200px}
.grammar-swipe-card.grammar-text-card.revealed{min-height:235px}
.grammar-text-card .grammar-flip-lao{font-size:clamp(24px,5vw,39px);overflow-wrap:anywhere}
.grammar-card-choices .grammar-card-choice strong{overflow-wrap:anywhere}
@media(max-width:760px){
 .grammar-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
 .grammar-tabs [role=tab]{min-height:48px;padding:8px 4px;font-size:11px}
 .grammar-foundations-rules{grid-template-columns:1fr}
}
@media(max-width:360px){.grammar-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Standalone grammar route. Mirrors Lao4Me's other modules: one category
   chooser, then a focused four-step learning flow. */
.grammar-program{
  width:min(100%,1040px);margin:0 auto;padding:20px 12px 125px;
  color:#3b403a;box-sizing:border-box;
}
.grammar-program-head{padding:19px 15px 17px;margin:2px 0 20px}
.grammar-program-head .eyebrow,.grammar-topic-detail .eyebrow{
  color:#8a6550;font-size:11px;font-weight:800;letter-spacing:.12em;
}
.grammar-program-head h1,.grammar-topic-detail h1{
  margin:9px 0 8px;font:700 clamp(30px,5vw,48px)/1.08 Georgia,serif;color:#49352f;
}
.grammar-program-head h1 em{color:#226c51;font-weight:500}
.grammar-program-head p,.grammar-topic-detail p{
  max-width:630px;margin:8px 0 14px;font-size:14px;line-height:1.6;color:#70645c;
}
.grammar-four-step-promise{
  display:flex;flex-wrap:wrap;gap:7px;margin-top:16px;
}
.grammar-four-step-promise span{
  padding:8px 11px;border:1px solid #dae3d3;background:#f0f5e9;
  color:#28674b;border-radius:10px;font-size:11px;font-weight:750;
}
.grammar-topic-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;align-items:stretch;margin:0 0 20px;
}
.grammar-topic-card{
  width:100%;min-width:0;position:relative;
  display:flex;flex-direction:column;align-items:stretch;
  text-align:left;gap:6px;min-height:205px;
  padding:15px 14px 13px;border:1px solid #dbcdb7;border-radius:20px;
  background:linear-gradient(146deg,#fffdfa 13%,#f6f0e6 100%);
  box-shadow:0 4px 16px #6f4b2814;color:#443b33;cursor:pointer;
}
.grammar-topic-card:hover,.grammar-topic-card:focus-visible{
  border-color:#59957a;box-shadow:0 8px 19px #2d6e4d1c;
}
.grammar-topic-card:focus-visible{outline:3px solid #72a58c;outline-offset:3px}
.grammar-topic-art{
  display:grid;place-items:center;align-self:flex-start;
  min-width:66px;height:66px;max-width:100%;padding:0 10px;
  border:1px solid #d6d6bf;border-radius:18px;
  background:radial-gradient(ellipse at 34% 24%,#fffbef 0%,#e5eee0 61%,#d7e5d7 100%);
  color:#28654d;font:700 clamp(22px,4vw,31px)/1.4 "Noto Sans Lao","Phetsarath OT",system-ui,sans-serif;
}
.grammar-topic-copy{display:flex;flex-direction:column;gap:6px;flex:1}
.grammar-topic-copy strong{font-size:15px;line-height:1.3;font-weight:800;color:#513a32}
.grammar-topic-copy small{font-size:12px;font-weight:500;line-height:1.45;color:#72685e}
.grammar-topic-status{
  border-top:1px solid #e9decd;padding-top:10px;padding-right:15px;
  font-size:11px;font-weight:750;color:#286a50;
}
.grammar-topic-arrow{position:absolute;bottom:12px;right:13px;color:#246e50;font-size:25px;line-height:1}
.grammar-topic-back{
  border:0;padding:7px 2px;margin:0 0 14px;background:transparent;
  color:#27664e;font-weight:750;font-size:13px;text-align:left;
}
.grammar-topic-detail{
  display:flex;gap:17px;align-items:center;
  padding:18px;margin:0 0 17px;border:1px solid #e1d2bd;
  border-radius:21px;background:linear-gradient(124deg,#fbf7ef,#edf5ec);
}
.grammar-detail-art{
  flex:0 0 auto;display:grid;place-items:center;width:86px;height:86px;
  border:1px solid #cbd7bc;border-radius:21px;
  background:radial-gradient(ellipse at 30% 15%,#fff9e7,#dcebdc);
  color:#23694e;font:750 25px/1.3 "Noto Sans Lao","Phetsarath OT",system-ui,sans-serif;
}
.grammar-topic-detail h1{font-size:clamp(24px,4vw,34px)}
.grammar-topic-detail p{margin-bottom:0}
.grammar-topic-learning{border:1px solid #e4d6c3;border-radius:20px;background:#fffdf9;padding:18px;box-shadow:0 5px 21px #3e3a2910}
.grammar-course .grammar-game-progress{font-size:12px;color:#2a664b;margin:5px 0 10px}
.grammar-course .grammar-game-stages{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;margin:0 0 22px;
}
.grammar-course .grammar-game-stages button{
  min-height:53px;font-size:12px;border-radius:13px;
  border:1px solid #d6d7c9;background:#f6f7f0;color:#47634e;
  box-shadow:none;
}
.grammar-course .grammar-game-stages button.active{
  border-color:#236b50;background:#236b50;color:white;box-shadow:0 4px 11px #17533a20;
}
.grammar-course .grammar-game-stages button.completed:not(.active){border-color:#90b69e;color:#27694e}
.grammar-course .grammar-game-stages button:disabled{opacity:.48;cursor:not-allowed}
.grammar-course .grammar-full-reference{
  margin:0 0 17px;background:#fdf9f0;border-color:#e4d2ba;border-radius:15px;
}
.grammar-course .grammar-full-reference>summary{
  color:#275f49;font-size:14px;min-height:48px;display:flex;align-items:center;
}
.grammar-course .grammar-full-reference-body{padding:14px}
.grammar-course .grammar-flip-card{background:linear-gradient(145deg,#fbf8ef,#e9f0e1);border-color:#c9dac5;color:#285b45}
.grammar-course .grammar-flip-card.revealed{background:linear-gradient(145deg,#f0f5ec,#fff9ef)}
.grammar-course .grammar-flip-lao{color:#275e4c}
.grammar-course .grammar-game-primary{
  background:#226b50;border-color:#226b50;border-radius:12px;box-shadow:0 3px 0 #174d38;
}
.grammar-course .grammar-game-primary:hover{background:#17563f}
.grammar-course .grammar-game-secondary{border-color:#d7dac9;background:#f8f9f3;color:#32664d}
.grammar-course .grammar-answer{background:#f8faf4;border-color:#d3ddcc;min-height:80px}
.grammar-course .grammar-answer.correct{background:#e2f3e6;border-color:#44866b}
.grammar-course .grammar-question h4{color:#355541;font-size:17px;line-height:1.45}
.grammar-course .grammar-question-meter{background:#e4eadd}
.grammar-course .grammar-question-meter>span{background:#2b7a59}
.grammar-course .grammar-result{background:#f5f9f1;border-color:#d5dfd0}
.grammar-course .grammar-result>strong{color:#28644c}
.grammar-course .grammar-game-content{padding-bottom:20px}
@media(min-width:800px){.grammar-topic-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:550px){
 .grammar-program{padding:8px 8px 125px}
 .grammar-topic-grid{gap:9px}
 .grammar-topic-card{padding:12px 11px;min-height:195px;border-radius:17px}
 .grammar-topic-art{min-width:56px;height:58px;font-size:23px;border-radius:15px}
 .grammar-topic-copy strong{font-size:13px}
 .grammar-topic-copy small{font-size:11px}
 .grammar-topic-status{font-size:10px}
 .grammar-topic-detail{gap:11px;padding:12px}
 .grammar-detail-art{width:65px;height:65px;font-size:20px;border-radius:16px}
 .grammar-topic-learning{padding:12px 10px}
 .grammar-course .grammar-game-stages{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .grammar-course .grammar-game-stages button{font-size:11px;min-height:49px}
 .grammar-course .grammar-answer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* Grammar also appears as a fourth pathway, using the same home-card hierarchy. */
.grammar-path:after{background:#8dbaa321}
/* The grammar home-card icon is now a transparent watercolor image. The
   shared, responsive pathway-art layout lives in ui-action-illustrations.css. */


/* Twelve classifier learning tiles, with a true swipeable modal card. */
.grammar-classifier-overview{display:grid;gap:13px}
.grammar-classifier-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.grammar-classifier-heading strong{font-size:17px;color:#275e48}
.grammar-classifier-heading span{font-size:13px;font-weight:800;color:#287257}
.grammar-classifier-overview>p{margin:0;font-size:12px;line-height:1.5;color:#677464}
.grammar-classifier-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.grammar-classifier-tile{display:flex;align-items:center;flex-direction:column;justify-content:center;gap:3px;min-width:0;min-height:140px;padding:12px 7px;border:1.5px solid #dfd6c4;border-radius:15px;background:#fffbf3;text-align:center;color:#305b47;cursor:pointer;transition:border-color .15s,background .15s}
.grammar-classifier-tile:focus-visible{outline:3px solid #3b8a67;outline-offset:2px}
.grammar-classifier-tile:hover{border-color:#5b9c78}
.grammar-classifier-tile .grammar-lao{font-size:clamp(23px,3vw,35px);line-height:1.4;color:#2d664e}
.grammar-classifier-tile strong{font-size:14px;color:#37634e}
.grammar-classifier-tile small{font-size:11px;color:#766a5b;line-height:1.3}
.grammar-classifier-tile em{font-style:normal;font-weight:750;font-size:10px;color:#9b7959;margin-top:5px}
.grammar-classifier-tile.known{background:#ebf6eb;border-color:#85bd97}
.grammar-classifier-tile.known em{color:#287553}
.grammar-classifier-tile.review{background:#fff6eb;border-color:#deb58c}
.grammar-classifier-review-button{justify-self:start}
.grammar-classifier-dialog{position:fixed;inset:0;width:min(520px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);margin:auto;padding:0;border:1px solid #d9e2d2;border-radius:21px;background:#fffdf7;box-shadow:0 28px 75px #142c2057;color:#354b3d;overflow-y:auto;overscroll-behavior:contain}
.grammar-classifier-dialog::backdrop{background:#112c2082;backdrop-filter:blur(3px)}
.grammar-classifier-dialog-inner{box-sizing:border-box;padding:16px 20px 20px}
.grammar-classifier-close{display:grid;place-items:center;margin-left:auto;width:36px;height:36px;border:0;border-radius:50%;background:#ebf0e7;color:#315941;font-size:26px;line-height:1;cursor:pointer}
.grammar-classifier-dialog .grammar-flashcards{margin:0}
.grammar-classifier-dialog .grammar-flip-card{background:linear-gradient(145deg,#f3f8ed,#fff7e9);border-color:#c5dac8;min-height:175px}
.grammar-classifier-dialog .grammar-flip-card.revealed{min-height:215px}
.grammar-classifier-dialog .grammar-swipe-card{padding:13px 16px}
.grammar-classifier-dialog .grammar-card-progress{font-size:12px}
.grammar-classifier-dialog .grammar-card-situation{margin-top:7px;padding:10px}
.grammar-classifier-dialog .grammar-card-grade-actions{margin-top:8px}
.grammar-classifier-dialog .grammar-card-grade-actions button{min-height:46px}
@media(max-width:640px){
 .grammar-classifier-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .grammar-classifier-tile{min-height:114px;padding:8px 6px}
 .grammar-classifier-dialog-inner{padding:10px 12px 15px}
 .grammar-classifier-dialog .grammar-swipe-card{padding:10px 12px;min-height:145px}
 .grammar-classifier-dialog .grammar-swipe-card.revealed{min-height:175px}
 .grammar-classifier-dialog .grammar-card-situation{padding:8px}
}
@media(max-height:640px){
 .grammar-classifier-dialog .grammar-flip-card{min-height:135px}
 .grammar-classifier-dialog .grammar-swipe-card.revealed{min-height:155px}
 .grammar-classifier-dialog .grammar-card-art{max-height:90px}
 .grammar-classifier-dialog .grammar-card-choices{gap:4px}
 .grammar-classifier-dialog .grammar-card-choice{min-height:55px}
}
@media(prefers-reduced-motion:reduce){.grammar-classifier-tile{transition:none}}

/* In the classifier module the three steps always occupy equal-width slots. */
.grammar-course .grammar-game-stages.grammar-game-stages-three,
.grammar-counting-guide .grammar-game-stages.grammar-game-stages-three{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
@media(max-width:550px){
 .grammar-course .grammar-game-stages.grammar-game-stages-three,
 .grammar-counting-guide .grammar-game-stages.grammar-game-stages-three{
   grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;
 }
}

/* END grammar-practice.css */

/* BEGIN ui-action-illustrations.css */
/* Lao4Me uses a single light palette on every device, including Android dark-mode browsers. */
:root { color-scheme: only light; }
/* APPROVED WATERCOLOUR RESTORATION 2026-11-22; existing 10 CSS sources, current features preserved. */
/* Home order, full-width course actions and matching illustrated tool cards. */
body {background:#fff9f0!important;}
.topbar {background:#fff9f0!important;border:0!important;box-shadow:none!important;}
.topbar .header-logo {display:flex!important;flex:0 0 174px;width:174px;height:52px;padding:0;border:0;border-radius:0;background:transparent;overflow:visible;}
.topbar .header-logo img {width:100%;height:48px;object-fit:contain;}
.topbar .header-logo {background:transparent!important;border:0!important;border-radius:0!important;}
.sidebar>.brand {display:none!important;}
.sidebar>.nav-list>.profile-nav-item {display:none!important;}
.pathway-card:after {display:none!important;}
.pathway-card.daily-path,.pathway-card.count-path,.pathway-card.reading-path {
 display:grid;grid-template-columns:minmax(0,2.1fr) minmax(0,.9fr);
 grid-template-rows:min-content min-content min-content min-content auto;
 column-gap:16px;row-gap:5px;align-items:center;align-content:start;
 padding:20px 22px 18px;min-height:0;
 background:linear-gradient(145deg,#fffdf8,#f6ead7);
 border:1px solid #e5c9a7;border-radius:19px 15px 20px 16px;
 box-shadow:0 4px 0 #dfc7a8,0 10px 22px #65412412;
}
.pathway-card.daily-path .pathway-kicker,.pathway-card.count-path .pathway-kicker,.pathway-card.reading-path .pathway-kicker {grid-column:1;grid-row:1;align-self:end;}
.pathway-card.daily-path .pathway-mark.action-art,.pathway-card.count-path .pathway-mark.action-art,.pathway-card.reading-path .pathway-mark.action-art {
 position:static;grid-column:2;grid-row:1 / 5;place-self:center;width:100%;max-width:none;height:158px;object-fit:contain;
 filter:drop-shadow(0 5px 6px #63472720);
}
.pathway-card.daily-path h2,.pathway-card.count-path h2,.pathway-card.reading-path h2 {grid-column:1;grid-row:2;max-width:none;min-height:0;margin:7px 0 2px;line-height:1.2;}
.pathway-card.daily-path p,.pathway-card.count-path p,.pathway-card.reading-path p {grid-column:1;grid-row:3;min-height:0;align-self:start;line-height:1.5;}
.pathway-card.daily-path .pathway-progress,.pathway-card.count-path .pathway-progress,.pathway-card.reading-path .pathway-progress {grid-column:1;grid-row:4;margin:5px 0 8px;}
.pathway-card.daily-path>.pathway-button,.pathway-card.count-path>.pathway-button,.pathway-card.reading-path>.pathway-button {
 grid-column:1 / -1;grid-row:5;width:100%;min-height:48px;padding:0 22px;justify-self:stretch;justify-content:center;text-align:center;gap:10px;
 border-radius:13px;box-shadow:0 3px 0 #164d3e;
}
.pathway-card.count-path .pathway-mark.action-art {grid-column:1;grid-row:1 / 5;}
.pathway-card.count-path .pathway-kicker,.pathway-card.count-path h2,.pathway-card.count-path p,.pathway-card.count-path .pathway-progress {grid-column:2;}
.explorer-tool-grid {display:grid;grid-template-columns:minmax(0,1fr);gap:13px;}
.explorer-tool-grid button {
 position:relative;isolation:isolate;overflow:hidden;
 display:grid;grid-template-columns:minmax(130px,150px) minmax(0,1fr);
 grid-template-rows:minmax(0,1fr);align-items:center;align-content:center;
 column-gap:clamp(16px,2.5vw,26px);
 min-height:142px;padding:14px clamp(22px,4vw,40px);text-align:left;
 border:1px solid #e2c7a5;border-radius:18px 14px 19px 15px;
 background:linear-gradient(145deg,#fffdf8,#f5e8d4);
 box-shadow:0 4px 0 #dec5a4,0 10px 22px #63412112;
 transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.explorer-tool-grid button:after {content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:.45;background:radial-gradient(#b78d6018 .65px,transparent .8px);background-size:6px 6px;}
.explorer-tool-grid button:hover {transform:translateY(-2px);border-color:#cda77d;box-shadow:0 6px 0 #d6b997,0 14px 25px #63412118;}
.explorer-tool-grid button .explorer-art {
 grid-column:1;grid-row:1;display:block;place-self:center;
 width:100%;max-width:140px;height:112px;min-width:0;
}
.explorer-tool-grid button .explorer-art img {display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 4px 5px #6347271a);}
.explorer-tool-grid button .explorer-copy {
 grid-column:2;grid-row:1;display:flex;flex-direction:column;
 align-items:flex-start;justify-content:center;gap:4px;
 min-width:0;text-align:left;
}
.explorer-tool-grid button .explorer-copy strong {display:block;font-size:clamp(16px,1.45vw,19px);line-height:1.24;color:#593831;}
.explorer-tool-grid button .explorer-copy small {display:block;font-size:12px;line-height:1.42;color:#78685a;}
.explorer-tool-grid button .quiz-stat-line {display:block;}
.explorer-tool-grid button[data-view="qcm"] {grid-template-columns:minmax(0,1fr) minmax(130px,150px);}
.explorer-tool-grid button[data-view="qcm"] .explorer-art {grid-column:2;}
.explorer-tool-grid button[data-view="qcm"] .explorer-copy {grid-column:1;align-items:flex-end;text-align:right;}
.profile-menu-item .profile-menu-icon {width:42px;min-width:42px;height:42px;}
.profile-menu-item .profile-initial {width:30px;height:30px;}
.mobile-menu-panel {display:grid!important;position:fixed!important;top:88px!important;right:18px!important;bottom:auto!important;left:auto!important;width:min(350px,calc(100vw - 24px))!important;max-height:min(70vh,520px)!important;overflow:auto!important;z-index:3000!important;}
.mobile-menu-toggle {display:flex!important;position:relative;flex:0 0 38px;align-items:center;justify-content:center;width:38px!important;height:40px!important;min-height:40px!important;padding:0!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#693c36!important;box-shadow:none!important;}
.mobile-menu-toggle:hover,.mobile-menu-toggle[aria-expanded="true"] {background:#eadcc51f!important;transform:none!important;}
.mobile-menu-toggle .burger-glyph {width:23px;gap:5px;}
.mobile-menu-toggle .burger-glyph span {height:2px;background:#693c36;}
.mobile-menu-item {position:relative;z-index:1;}
@media(max-width:760px) {
 .topbar {height:72px;min-height:72px;padding:0 1px;gap:7px;}
 .topbar .header-logo {flex-basis:clamp(132px,40vw,166px);width:clamp(132px,40vw,166px);height:48px;}
 .topbar .header-logo img {height:46px;}
 .topbar .breadcrumb {display:none!important;}
 .top-actions {display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-left:auto;min-width:0;}
 .top-actions .today-label {display:none;}
 .top-actions .lao4me-language-control {order:1;min-width:0;}
 #mobile-burger {order:2;}
 .sidebar>.nav-list {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:1fr!important;gap:5px!important;}
 .sidebar>.nav-list>.nav-item[data-view="accueil"] {display:flex!important;order:1;}
 .sidebar>.nav-list>.nav-item[data-view="revisions"] {display:flex!important;order:2;}
 .sidebar>.nav-list>.nav-item[data-view="bibliotheque"] {display:flex!important;order:3;}
 .sidebar>.nav-list>.nav-item:not([data-view="accueil"]):not([data-view="revisions"]):not([data-view="bibliotheque"]) {display:none!important;}
 .sidebar>.nav-list>.nav-item:not(.mobile-menu-toggle) {height:54px;min-height:54px;gap:2px!important;padding:2px!important;font-size:10px!important;}
 .sidebar>.nav-list>.nav-item:not(.mobile-menu-toggle) .nav-icon {width:40px;min-width:40px;height:34px;}
 .sidebar>.nav-list>.nav-item:not(.mobile-menu-toggle) .nav-icon img {width:100%;height:100%;object-fit:contain;}
 #mobile-menu-panel {top:79px!important;right:10px!important;left:auto!important;bottom:auto!important;width:min(350px,calc(100vw - 20px))!important;max-height:calc(100dvh - 155px)!important;}
 .pathway-card.daily-path,.pathway-card.count-path,.pathway-card.reading-path {grid-template-columns:minmax(0,2.1fr) minmax(0,.9fr);column-gap:10px;row-gap:4px;padding:16px 17px 15px;}
 .pathway-card.daily-path .pathway-mark.action-art,.pathway-card.count-path .pathway-mark.action-art,.pathway-card.reading-path .pathway-mark.action-art {height:132px;}
 .pathway-card.daily-path h2,.pathway-card.count-path h2,.pathway-card.reading-path h2 {font-size:clamp(17px,5vw,21px);line-height:1.19;}
 .pathway-card.daily-path p,.pathway-card.count-path p,.pathway-card.reading-path p {font-size:12px;line-height:1.45;}
 .pathway-card.daily-path .pathway-progress,.pathway-card.count-path .pathway-progress,.pathway-card.reading-path .pathway-progress {gap:5px;font-size:10px;}
 .pathway-card.daily-path>.pathway-button,.pathway-card.count-path>.pathway-button,.pathway-card.reading-path>.pathway-button {min-height:46px;padding:0 18px;font-size:12px;}
 .explorer-tool-grid button {grid-template-columns:minmax(104px,118px) minmax(0,1fr);column-gap:14px;min-height:124px;padding:12px 20px;}
 .explorer-tool-grid button[data-view="qcm"] {grid-template-columns:minmax(0,1fr) minmax(104px,118px);}
 .explorer-tool-grid button .explorer-art {height:104px;}
 .explorer-tool-grid button .explorer-copy strong {font-size:clamp(15px,4.3vw,18px);}
 .explorer-tool-grid button .explorer-copy small {font-size:12px;line-height:1.4;}
}
@media(max-width:365px) {
 .topbar .header-logo {flex-basis:128px;width:128px;}
 .top-actions {gap:3px;}
 .pathway-card.daily-path,.pathway-card.count-path,.pathway-card.reading-path {grid-template-columns:minmax(0,2fr) minmax(0,.9fr);padding:14px 13px;column-gap:8px;}
 .pathway-card.daily-path .pathway-mark.action-art,.pathway-card.count-path .pathway-mark.action-art,.pathway-card.reading-path .pathway-mark.action-art {height:116px;}
 .explorer-tool-grid button {grid-template-columns:minmax(88px,98px) minmax(0,1fr);column-gap:10px;padding-inline:14px;}
 .explorer-tool-grid button[data-view="qcm"] {grid-template-columns:minmax(0,1fr) minmax(88px,98px);}
 .explorer-tool-grid button .explorer-art {height:92px;}
}

/* Home spacing, consistent pathway art and clearer mobile navigation. */
.topbar {border-bottom:1px solid #dfcbb0!important;box-shadow:0 3px 12px #70452b0d!important;}
.main-content>#home-view {padding-top:15px!important;}
.pathway-card.count-path {grid-template-columns:minmax(0,.9fr) minmax(0,2.1fr);}
.pathway-card.daily-path .pathway-mark.action-art,.pathway-card.count-path .pathway-mark.action-art,.pathway-card.reading-path .pathway-mark.action-art {height:142px;}
.explorer-tool-grid button[data-view="alphabet"] .explorer-art img,.explorer-tool-grid button[data-view="memocards"] .explorer-art img {transform:scale(1.2);}
.explorer-tool-grid button[data-view="alphabet"]:hover .explorer-art img,.explorer-tool-grid button[data-view="memocards"]:hover .explorer-art img {transform:scale(1.2) translateY(-2px);}
.explorer-tool-grid button[data-view="qcm"] .explorer-copy small {line-height:1.35;}
@media(max-width:760px) {
 .main-content {padding-bottom:92px!important;}
 .main-content>#home-view {padding-top:12px!important;}
 .topbar {border-bottom:1px solid #dfcbb0!important;box-shadow:0 3px 10px #70452b0d!important;}
 .sidebar {height:76px!important;}
 .sidebar>.nav-list>.nav-item:not(.mobile-menu-toggle) {height:66px!important;min-height:66px!important;font-size:11px!important;gap:2px!important;}
 .sidebar>.nav-list>.nav-item .nav-icon {width:59px!important;min-width:59px!important;height:48px!important;}
 .pathway-card.daily-path .pathway-mark.action-art,.pathway-card.count-path .pathway-mark.action-art,.pathway-card.reading-path .pathway-mark.action-art {height:120px;}
 .pathway-card.count-path {grid-template-columns:minmax(0,.9fr) minmax(0,2.1fr);}
}
@media(max-width:365px) {
 .pathway-card.daily-path .pathway-mark.action-art,.pathway-card.count-path .pathway-mark.action-art,.pathway-card.reading-path .pathway-mark.action-art {height:105px;}
 .pathway-card.count-path {grid-template-columns:minmax(0,.9fr) minmax(0,2fr);}
}


/* Approved illustration assets, restored selectively onto current main. */
.sidebar .nav-item .nav-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:59px;height:47px}
.sidebar .nav-item .nav-icon img{display:block;width:100%;height:100%;object-fit:contain}
.sidebar .nav-item.active{box-shadow:inset 3px 0 #315a38}
.sidebar .nav-item:focus-visible,.explorer-tool-grid button:focus-visible,.pathway-button:focus-visible,.mobile-menu-item:focus-visible{outline:3px solid #4b8057;outline-offset:3px}
.pathway-card .pathway-mark.action-art{object-fit:contain}
.mobile-menu-item .nav-icon{display:inline-block;flex:0 0 57px;width:57px;height:47px;font-size:0!important;line-height:0!important;background-size:contain;background-repeat:no-repeat;background-position:center}
.mobile-menu-item[data-view="voyageur"] .nav-icon{background-image:url('/illustrations/ui/parler-au-quotidien.webp')}
.mobile-menu-item[data-view="memocards"] .nav-icon{background-image:url('/illustrations/ui/cartes-memo.webp')}
.mobile-menu-item[data-view="revisions"] .nav-icon{background-image:url('/illustrations/ui/reviser.webp')}
.mobile-menu-item[data-proxy="find-word-home"] .nav-icon{background-image:url('/illustrations/ui/rechercher-un-mot.webp')}
.mobile-menu-item[data-action="contact"] .nav-icon{background-image:url('/illustrations/ui/contacter-lao4me.webp')}
.mobile-menu-item[data-proxy="ainvbtn"] .nav-icon{background-image:url('/illustrations/ui/inviter-une-personne.webp')}
.mobile-menu-item[data-proxy="alogout"] .nav-icon{background-image:url('/illustrations/ui/se-deconnecter.webp')}
#mobile-menu-panel[hidden]{display:none!important}

/* A compact mobile greeting keeps the first learning path closer to the fold. */
@media(max-width:760px){
  #home-view .welcome-row{padding:14px 16px 15px;gap:10px;margin:3px 0 13px;}
  #home-view .welcome-copy-block .eyebrow{display:none;}
  #home-view .welcome-copy-block h1{font-size:clamp(30px,7.6vw,38px);line-height:1.12;margin:0 0 6px;}
  #home-view .welcome-copy{font-size:13px;line-height:1.4;margin:0;}
  #home-view .greeting-card{height:136px;min-height:136px;}
  #home-view .greeting-copy{left:10px;top:auto;bottom:10px;padding:6px 10px;}
  #home-view .greeting-lao{font-size:23px;line-height:1.3;margin:3px 0 2px;}
  #home-view .greeting-phonetic{font-size:11px;}
  #home-view .greeting-card .sound-button{right:10px;bottom:10px;min-width:42px;min-height:42px;}
}

/* Grammar's hand-painted artwork uses the same left-art/right-copy grid as Counting. */
#home-view .pathway-card.grammar-path{
 display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,2.1fr);
 grid-template-rows:min-content min-content min-content min-content auto;
 column-gap:16px;row-gap:5px;align-items:center;align-content:start;
 padding:20px 22px 18px;min-height:0;
 background:linear-gradient(145deg,#fffdf8,#f6ead7);
 border:1px solid #e5c9a7;border-radius:19px 15px 20px 16px;
 box-shadow:0 4px 0 #dfc7a8,0 10px 22px #65412412;
}
#home-view .grammar-path .pathway-mark.grammar-path-mark.action-art{
 position:static;grid-column:1;grid-row:1 / 5;place-self:center;
 display:block;width:100%;max-width:none;height:142px;
 padding:0;border:0;border-radius:0;background:transparent;
 object-fit:contain;filter:drop-shadow(0 5px 6px #63472720);
}
#home-view .grammar-path .pathway-kicker{grid-column:2;grid-row:1;align-self:end}
#home-view .grammar-path h2{grid-column:2;grid-row:2;max-width:none;min-height:0;margin:7px 0 2px;line-height:1.2}
#home-view .grammar-path p{grid-column:2;grid-row:3;min-height:0;align-self:start;line-height:1.5}
#home-view .grammar-path .pathway-progress{grid-column:2;grid-row:4;margin:5px 0 8px}
#home-view .grammar-path>.pathway-button{
 grid-column:1 / -1;grid-row:5;width:100%;min-height:48px;
 padding:0 22px;justify-self:stretch;justify-content:center;text-align:center;
 gap:10px;border-radius:13px;box-shadow:0 3px 0 #164d3e;
}
@media(max-width:760px){
 #home-view .pathway-card.grammar-path{
  grid-template-columns:minmax(0,.9fr) minmax(0,2.1fr);
  column-gap:10px;row-gap:4px;padding:16px 17px 15px;
 }
 #home-view .grammar-path .pathway-mark.grammar-path-mark.action-art{height:120px}
 #home-view .grammar-path h2{font-size:clamp(17px,5vw,21px);line-height:1.19}
 #home-view .grammar-path p{font-size:12px;line-height:1.45}
 #home-view .grammar-path .pathway-progress{gap:5px;font-size:10px}
 #home-view .grammar-path>.pathway-button{min-height:46px;padding:0 18px;font-size:12px}
}
@media(max-width:365px){
 #home-view .pathway-card.grammar-path{grid-template-columns:minmax(0,.9fr) minmax(0,2fr);padding:14px 13px;column-gap:8px}
 #home-view .grammar-path .pathway-mark.grammar-path-mark.action-art{height:105px}
}

@media (max-width:760px){
  /* Only the new history rail modifies mobile; the existing home, cards, and bottom menu remain untouched. */
  #mobile-page-history[hidden]{display:none!important}
  #mobile-page-history:not([hidden]){
    position:sticky;top:0;z-index:90;display:flex!important;
    justify-content:space-between;align-items:center;gap:10px;
    margin:0 -1px 0;padding:6px 4px;min-height:50px;
    background:#fff9f0f7;border-bottom:1px solid #e7d8c1;
    backdrop-filter:blur(12px);
  }
  #mobile-page-history button{
    display:inline-flex;align-items:center;justify-content:center;gap:9px;
    flex:1 1 0;min-width:0;min-height:40px;
    padding:6px 10px;border:1px solid #dbcfb8;border-radius:12px;
    background:#fffdf7;color:#246b55;font-size:12px;font-weight:750;
    white-space:nowrap;touch-action:manipulation;
  }
  #mobile-page-history button span[aria-hidden="true"]{font-size:22px;line-height:1}
  #mobile-page-history button:disabled{opacity:.32;cursor:default}
  #mobile-page-history button:not(:disabled):active{background:#e6f1e9}
}

/* DESKTOP MATCHES PHONE SHELL, 22 November 2026.
   Computer-only adaptation: top header, fixed bottom 3-tab navigation, one-column cards.
   No selectors in this section apply at 760px or below. */
@media (min-width:761px){
  .app-shell{min-height:100dvh}

  /* Same bottom menu model as the phone. Never display the old left sidebar. */
  .sidebar{
    position:fixed!important;inset:auto 0 0 0!important;
    display:block!important;width:100%!important;max-width:none!important;
    height:82px!important;padding:4px 16px 6px!important;
    background:#fffaf1f5!important;
    border:0!important;border-top:1px solid #e5d8c1!important;
    box-shadow:0 -6px 20px #33452d10!important;
    backdrop-filter:blur(14px);z-index:2000!important;
  }
  .sidebar>.brand,.sidebar>.side-caption,.sidebar>.sidebar-bottom{display:none!important}
  .sidebar>.nav-list{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-rows:70px!important;
    width:min(100%,810px)!important;height:70px!important;max-height:none!important;
    padding:0!important;margin:0 auto!important;gap:10px!important;
    overflow:visible!important;align-items:center!important;
  }
  .sidebar>.nav-list>.nav-item[data-view="accueil"]{display:flex!important;order:1}
  .sidebar>.nav-list>.nav-item[data-view="revisions"]{display:flex!important;order:2}
  .sidebar>.nav-list>.nav-item[data-view="bibliotheque"]{display:flex!important;order:3}
  .sidebar>.nav-list>.nav-item:not([data-view="accueil"]):not([data-view="revisions"]):not([data-view="bibliotheque"]){display:none!important}
  .sidebar>.nav-list>.nav-item{
    display:flex!important;flex-direction:column!important;justify-content:center!important;
    align-items:center!important;gap:2px!important;
    width:100%!important;min-width:0!important;height:68px!important;min-height:68px!important;
    margin:0!important;padding:3px!important;text-align:center!important;
    border-radius:13px!important;color:#6e7971!important;
    font-size:12px!important;font-weight:700;transform:none!important;
  }
  .sidebar>.nav-list>.nav-item.active{
    background:#e8f2e8!important;color:#246b55!important;box-shadow:none!important;
  }
  .sidebar>.nav-list>.nav-item .nav-icon{
    display:inline-flex!important;flex:0 0 44px!important;
    width:60px!important;min-width:60px!important;height:44px!important;
    align-items:center;justify-content:center;
  }
  .sidebar>.nav-list>.nav-item .nav-icon img{width:100%;height:100%;object-fit:contain}

  /* Header remains at the top with the same actions and hamburger as on mobile. */
  .main-content{
    width:100%;min-width:0;min-height:100dvh;
    margin-left:0!important;padding:0 clamp(20px,4vw,58px) 116px!important;
  }
  .topbar{
    position:sticky!important;top:0!important;z-index:110!important;
    display:flex;align-items:center;justify-content:space-between;
    height:74px!important;min-height:74px!important;gap:10px!important;
    padding:0 2px!important;margin:0!important;
    background:#fff9f0f5!important;border-bottom:1px solid #dfcbb0!important;
    box-shadow:0 3px 10px #70452b0d!important;
    backdrop-filter:blur(14px);
  }
  .topbar .header-logo{
    display:flex!important;flex:0 0 134px!important;width:134px!important;
    height:67px!important;align-items:center;justify-content:flex-start;
    border:0!important;border-radius:0!important;
    background:transparent!important;overflow:visible!important;padding:0!important;
  }
  .topbar .header-logo img{display:block;width:100%!important;height:65px!important;object-fit:contain}
  .topbar .breadcrumb,.topbar .today-label{display:none!important}
  .topbar .top-actions{
    display:flex;align-items:center;justify-content:flex-end;
    flex:0 1 auto;min-width:0;margin-left:auto!important;gap:8px!important;
  }
  .topbar .top-actions .lao4me-language-control{order:1;min-width:0}
  .topbar #mobile-burger{order:2;display:inline-flex!important}
  .topbar .top-actions .install-app{width:36px;min-width:36px;max-width:36px;height:36px;padding:0!important;justify-content:center}
  .topbar .install-app>span:last-child{display:none!important}
  .topbar .avatar{width:36px;height:36px;flex:0 0 36px}
  #mobile-menu-panel{
    position:fixed!important;top:80px!important;right:clamp(12px,4vw,60px)!important;
    bottom:auto!important;left:auto!important;width:min(350px,calc(100vw - 24px))!important;
    max-height:calc(100dvh - 170px)!important;overflow:auto!important;z-index:3000!important;
  }
  #mobile-menu-panel[hidden]{display:none!important}

  /* Center the content and preserve the phone's vertical learning sequence. */
  .page-view{width:min(100%,860px)!important;margin:0 auto!important;padding:23px 0 46px!important}
  #home-view .welcome-row{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;
    gap:12px!important;padding:12px 18px 16px!important;
    margin:3px 0 15px!important;
  }
  #home-view .welcome-copy-block .eyebrow{display:none}
  #home-view .welcome-copy-block h1{font-size:clamp(30px,3.4vw,39px);line-height:1.12;margin:0 0 8px}
  #home-view .welcome-copy{font-size:14px;line-height:1.45}
  #home-view .greeting-card{width:100%;max-width:none;height:145px;min-height:145px}
  #home-view .pathway-grid{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;align-items:stretch;margin:6px 0 20px;
  }
  #home-view .pathway-card{
    min-width:0;min-height:0!important;
    transition:transform .16s ease,box-shadow .16s ease;
  }
  #home-view .pathway-card.daily-path,
  #home-view .pathway-card.count-path,
  #home-view .pathway-card.reading-path,
  #home-view .pathway-card.grammar-path{
    padding:17px 20px 16px!important;column-gap:16px;row-gap:5px;
    grid-template-rows:min-content min-content min-content min-content auto;
  }
  #home-view .pathway-card h2{font-size:clamp(19px,2vw,23px);line-height:1.2}
  #home-view .pathway-card p{font-size:13px;line-height:1.5;min-height:0}
  #home-view .pathway-card .pathway-progress{margin:6px 0 9px;font-size:11px}
  #home-view .pathway-card .pathway-mark.action-art{height:130px!important;object-fit:contain}
  #home-view .pathway-card>.pathway-button{
    grid-column:1 / -1;width:100%;min-height:48px;margin-top:auto;
    font-size:13px;padding-inline:20px;
  }
  #home-view .compact-progress{display:block!important;max-width:560px!important;margin:16px 0!important}
  #home-view .explorer-tools{margin-top:22px}
  #home-view .explorer-tools>h2{font-size:20px;margin-bottom:13px}
  #home-view .explorer-tool-grid{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:13px!important;
  }
  #home-view .explorer-tool-grid button{
    grid-template-columns:minmax(140px,160px) minmax(0,1fr);
    min-width:0;min-height:132px;padding:12px 32px;
    column-gap:22px;align-items:center;text-align:left;
  }
  #home-view .explorer-tool-grid button[data-view="qcm"]{
    grid-template-columns:minmax(0,1fr) minmax(140px,160px);
  }
  #home-view .explorer-tool-grid button .explorer-art{height:108px}
  #home-view .explorer-tool-grid button .explorer-copy strong{font-size:18px;line-height:1.25}
  #home-view .explorer-tool-grid button .explorer-copy small{font-size:12px;line-height:1.45}

  /* Identical previous / next navigation to mobile, directly below the top header. */
  #mobile-page-history[hidden]{display:none!important}
  #mobile-page-history:not([hidden]){
    position:sticky;top:74px;z-index:100;display:flex!important;
    justify-content:space-between;gap:12px;align-items:center;
    width:min(100%,860px);min-height:52px;margin:0 auto!important;padding:6px 4px;
    background:#fff9f0f7;border-bottom:1px solid #e7d8c1;backdrop-filter:blur(12px);
  }
  #mobile-page-history button{
    display:inline-flex;align-items:center;justify-content:center;gap:9px;
    flex:1 1 0;min-width:0;max-width:420px;min-height:40px;
    padding:7px 12px;border:1px solid #dbcfb8;border-radius:12px;
    background:#fffdf7;color:#246b55;font-size:13px;font-weight:750;
    white-space:nowrap;touch-action:manipulation;
  }
  #mobile-page-history button span[aria-hidden="true"]{font-size:22px;line-height:1}
  #mobile-page-history button:disabled{opacity:.32;cursor:default}
  #mobile-page-history button:not(:disabled):hover{background:#e6f1e9}
}
@media (min-width:761px) and (max-width:900px){
  .main-content{padding-inline:19px!important}
  .topbar .header-logo{flex-basis:115px!important;width:115px!important}
  .topbar .top-actions{gap:4px!important}
  #home-view .welcome-row{padding-inline:14px!important}
}


/* Sticky shared navigation, compact header and unobstructed hero artwork.
   Applies to the 3-tab phone and desktop shell at every screen size. */
.topbar{
  position:sticky!important;top:0!important;z-index:110!important;
  align-self:stretch;
  background:#fff9f0f8!important;
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
#mobile-page-history[hidden]{display:none!important}
#mobile-page-history:not([hidden]){
  position:sticky!important;z-index:105!important;
  align-self:stretch;flex-shrink:0;
  background:#fff9f0fa!important;
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  box-shadow:0 4px 9px #4a3a2610;
}
#mobile-burger{
  display:inline-flex!important;
  flex:0 0 var(--lao4me-burger-width,52px)!important;
  width:var(--lao4me-burger-width,52px)!important;
  min-width:var(--lao4me-burger-width,52px)!important;
  max-width:var(--lao4me-burger-width,52px)!important;
  height:44px!important;min-height:44px!important;
  padding:0!important;margin:0!important;
  align-items:center!important;justify-content:center!important;
  border:1px solid #e6d8c3!important;border-radius:11px!important;
  background:#fff9ef!important;color:#246b55!important;
  line-height:1!important;
}
#mobile-burger .nav-icon{
  flex:0 0 auto!important;width:auto!important;min-width:0!important;
  height:auto!important;line-height:1!important;
  font-size:25px!important;color:#246b55!important;
}
#mobile-burger .menu-button-label{display:none!important}
#mobile-menu-panel .mobile-menu-profile-entry{
  display:flex;align-items:center;gap:12px;min-height:62px;
  padding:8px 11px 11px;margin-bottom:5px;
  border-bottom:1px solid #e4d7c4;
  color:#246b55;font-size:14px;font-weight:750;
}
#mobile-menu-panel #profile-avatar{
  position:relative;display:grid!important;place-items:center;
  flex:0 0 38px!important;width:38px!important;height:38px!important;
  margin:0!important;border:2px solid #b8ccae!important;
  border-radius:50%!important;cursor:pointer;
}
#mobile-menu-panel .mobile-menu-profile-label{overflow-wrap:anywhere}

/* The greeting illustration is now a picture alone; remove the old cream veil. */
#home-view .greeting-card{
  position:relative!important;overflow:hidden!important;isolation:isolate;
  background:#f5eddf!important;border:1px solid #e4d6bc!important;
  border-radius:18px!important;
}
#home-view .greeting-card:before,#home-view .greeting-card:after{display:none!important;content:none!important}
#home-view .greeting-scene{
  position:relative!important;inset:auto!important;display:block!important;
  z-index:1!important;width:100%!important;height:100%!important;
  object-fit:contain!important;object-position:center!important;
  border-radius:inherit!important;max-height:none!important;
}

@media(max-width:760px){
  .topbar{position:sticky!important;top:0!important;height:72px!important;min-height:72px!important;z-index:110!important}
  #mobile-page-history:not([hidden]){top:72px!important;min-height:50px!important}
  .topbar .top-actions{
    margin-left:auto!important;margin-right:clamp(10px,3vw,20px)!important;
    gap:6px!important;
  }
  #mobile-burger{order:2!important}
  #home-view .greeting-card{
    width:100%!important;max-width:none!important;
    height:clamp(155px,58vw,220px)!important;
    min-height:155px!important;
  }
}
@media(min-width:761px){
  .topbar{position:sticky!important;top:0!important;z-index:110!important}
  #mobile-page-history:not([hidden]){top:74px!important}
  .topbar .top-actions{
    margin-left:auto!important;margin-right:clamp(16px,3vw,36px)!important;
  }
  #home-view .welcome-row{
    display:grid!important;
    grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)!important;
    align-items:center!important;gap:20px!important;
  }
  #home-view .welcome-row .greeting-card{
    grid-column:1;grid-row:1;
    width:100%!important;max-width:none!important;
    height:auto!important;max-height:none!important;
    min-height:0!important;aspect-ratio:3/2;
  }
  #home-view .welcome-row .welcome-copy-block{
    grid-column:2;grid-row:1;min-width:0;
  }
}
@media(min-width:761px) and (max-width:900px){
  #home-view .welcome-row{gap:13px!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
}

/* Consistent +13% home illustrations, without changing other learning tools. */
#home-view .pathway-grid .pathway-card:is(.daily-path,.count-path,.reading-path,.grammar-path) .pathway-mark.action-art{
 display:block;width:100%!important;max-width:none!important;height:147px!important;
 object-fit:contain!important;object-position:center!important;justify-self:center!important;align-self:center!important;
}
#mobile-burger{visibility:visible!important}
#mobile-menu-panel[hidden]{display:none!important}
@media(max-width:760px){
 #home-view .pathway-grid .pathway-card:is(.daily-path,.count-path,.reading-path,.grammar-path) .pathway-mark.action-art{height:136px!important}
}
@media(max-width:365px){
 #home-view .pathway-grid .pathway-card:is(.daily-path,.count-path,.reading-path,.grammar-path) .pathway-mark.action-art{height:119px!important}
}


/* 2026-11-22: Seven home illustrations calibrated to Alphabet Lao +10%.
   A common artwork stage on every card; original file proportions are preserved.
   Per-art scale compensates for differing transparent padding in the WebP assets. */
#home-view{
  --lao4me-home-art-width:clamp(104px,30vw,140px);
  --lao4me-home-art-height:calc(var(--lao4me-home-art-width) * .88);
}
#home-view .pathway-grid .pathway-card:is(.daily-path,.reading-path){
  grid-template-columns:minmax(0,1fr) var(--lao4me-home-art-width)!important;
}
#home-view .pathway-grid .pathway-card:is(.count-path,.grammar-path){
  grid-template-columns:var(--lao4me-home-art-width) minmax(0,1fr)!important;
}
#home-view .pathway-grid .pathway-card:is(.daily-path,.count-path,.reading-path,.grammar-path) .pathway-mark.action-art{
  display:block!important;position:static!important;
  width:var(--lao4me-home-art-width)!important;
  min-width:0!important;max-width:var(--lao4me-home-art-width)!important;
  height:var(--lao4me-home-art-height)!important;min-height:0!important;
  place-self:center!important;
  object-fit:contain!important;object-position:center!important;
  transform:scale(var(--lao4me-home-icon-scale,1.32))!important;
  transform-origin:center!important;
}
#home-view .pathway-card.daily-path .pathway-mark.action-art{--lao4me-home-icon-scale:1.23}
#home-view .pathway-card.count-path .pathway-mark.action-art{--lao4me-home-icon-scale:1.26}
#home-view .pathway-card.reading-path .pathway-mark.action-art{--lao4me-home-icon-scale:1.24}
#home-view .pathway-card.grammar-path .pathway-mark.action-art{--lao4me-home-icon-scale:1.20}
#home-view .explorer-tool-grid button{
  grid-template-columns:var(--lao4me-home-art-width) minmax(0,1fr)!important;
  column-gap:clamp(10px,2.5vw,22px)!important;
}
#home-view .explorer-tool-grid button[data-view="qcm"]{
  grid-template-columns:minmax(0,1fr) var(--lao4me-home-art-width)!important;
}
#home-view .explorer-tool-grid button .explorer-art{
  display:block!important;align-self:center!important;justify-self:center!important;
  width:var(--lao4me-home-art-width)!important;
  min-width:0!important;max-width:var(--lao4me-home-art-width)!important;
  height:var(--lao4me-home-art-height)!important;min-height:0!important;
  overflow:visible!important;
}
#home-view .explorer-tool-grid button .explorer-art img{
  display:block!important;width:100%!important;height:100%!important;
  max-width:none!important;object-fit:contain!important;
  object-position:center!important;
  transform:scale(var(--lao4me-home-icon-scale,1.32))!important;
  transform-origin:center!important;
}
#home-view .explorer-tool-grid button[data-view="alphabet"] .explorer-art img{
  --lao4me-home-icon-scale:1.32; /* 1.20 reference × 1.10 requested enlargement */
}
#home-view .explorer-tool-grid button[data-view="qcm"] .explorer-art img{--lao4me-home-icon-scale:1.35}
#home-view .explorer-tool-grid button[data-view="memocards"] .explorer-art img{--lao4me-home-icon-scale:1.25}
#home-view .explorer-tool-grid button .explorer-art img,
#home-view .pathway-grid .pathway-card .pathway-mark.action-art{
  transition:transform .18s ease;
}

/* A hamburger glyph alone. Keep the same responsive width as the flag. */
#mobile-burger,
.topbar #mobile-burger{
  border:0!important;outline:0!important;
  border-radius:0!important;box-shadow:none!important;
  background:transparent!important;background-image:none!important;
  padding:0!important;
}
#mobile-burger:hover,.topbar #mobile-burger:hover{
  background:transparent!important;color:#246b55!important;box-shadow:none!important;
}
#mobile-burger:focus-visible{
  outline:2px solid #246b55!important;outline-offset:3px!important;
  border-radius:4px!important;
}

/* Original Visit Tad Lo hero Polaroid asset.
   Its tilted photo opening matches the measured paper cutout (3:2 frame).
   The frame is stored locally in Lao4Me, not hot-linked to Visit Tad Lo. */
html body #home-view .greeting-card{
  position:relative!important;isolation:isolate!important;display:block!important;
  width:100%!important;height:auto!important;min-height:0!important;
  max-height:none!important;max-width:100%!important;aspect-ratio:3/2!important;
  overflow:visible!important;
  margin:0 auto!important;padding:0!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
  transform:rotate(-4deg) scale(1.476)!important;transform-origin:center!important;
}
html body #home-view .greeting-card::before{display:none!important;content:none!important}
html body #home-view .greeting-card::after{
  content:""!important;display:block!important;
  position:absolute!important;inset:0!important;z-index:4!important;
  width:100%!important;height:100%!important;
  border:0!important;border-radius:0!important;
  background:transparent url("/illustrations/ui/polaroid-visit-tad-lo.webp") center/100% 100% no-repeat!important;
  filter:drop-shadow(0 14px 20px rgba(39,67,53,.20))!important;
  pointer-events:none!important;
}
html body #home-view .greeting-card .greeting-scene{
  position:absolute!important;z-index:2!important;
  top:8.5%!important;left:7.5%!important;right:auto!important;bottom:auto!important;
  display:block!important;
  width:85%!important;height:72%!important;
  max-width:none!important;max-height:none!important;
  object-fit:cover!important;object-position:center!important;
  border:0!important;border-radius:2px!important;
  box-shadow:none!important;
  transform:rotate(3deg) scale(.889)!important;
  transform-origin:center!important;
}
@media(max-width:760px){
  html body #home-view .greeting-card{
    aspect-ratio:3/2!important;
    height:auto!important;min-height:0!important;
  }
  html body #home-view .greeting-card .greeting-scene{
    top:9.1%!important;left:8.3%!important;
    width:83.4%!important;height:70.5%!important;
    transform:rotate(3deg) scale(.875)!important;
  }
}

/* 2026-11-22: single full-bleed cream backdrop, approved Polaroid and compact hero.
   Keep these final layout rules consolidated rather than stacking mobile overrides. */
html, html body, html body .app-shell, html body .main-content, html body #home-view{
  background-color:#fff2dc!important;
  background-image:none!important;
}
html body #home-view{position:relative!important;isolation:isolate!important}
html body #home-view::before{
  content:""!important;position:absolute!important;top:0!important;bottom:0!important;
  left:50%!important;width:100vw!important;transform:translateX(-50%)!important;
  background:#fff2dc!important;pointer-events:none!important;z-index:-1!important;
}
html body .topbar{
  width:100vw!important;max-width:100vw!important;
  margin-left:calc(50% - 50vw)!important;margin-right:calc(50% - 50vw)!important;
  padding-inline:clamp(12px,4vw,52px)!important;
}
/* Original paper, tape and photo; only the handwritten label reads Laos. */
html body #home-view .greeting-card::after{
  background-image:url("/illustrations/ui/polaroid-laos.svg?v=20261123-clean-caption")!important;
}
@media(min-width:761px){
  html body #home-view .welcome-row{
    grid-template-columns:clamp(280px,35vw,390px) minmax(0,1fr)!important;
    column-gap:clamp(105px,10vw,126px)!important;
    min-height:345px!important;padding:14px 28px!important;
    margin:4px 0 14px!important;
  }
  html body #home-view .greeting-card{margin-top:0!important}
  html body #home-view .pathway-grid{margin-top:0!important}
}
@media(min-width:761px) and (max-width:900px){
  html body #home-view .welcome-row{padding-left:25px!important;padding-right:12px!important}
}
@media(max-width:760px){
  html body #home-view .welcome-row{
    gap:6px!important;padding:8px 16px 42px!important;
    margin:2px 0 12px!important;
  }
  html body #home-view .greeting-card{
    width:min(100%,calc((100vw - 8px)/1.4))!important;
    margin:clamp(36px,10vw,42px) auto 0!important;
  }
  html body #home-view .pathway-grid{margin-top:0!important;gap:12px!important}
  html body .app-shell{overflow-x:clip!important}
}

/* Slim back/forward history strip: keep navigation useful without a second header. */
@media(max-width:760px){
  #mobile-page-history:not([hidden]){
    min-height:38px!important;padding:3px 10px!important;gap:8px!important;
  }
  #mobile-page-history button{
    flex:0 1 auto!important;min-width:116px!important;max-width:158px!important;
    min-height:32px!important;padding:4px 10px!important;
    border-radius:999px!important;font-size:11px!important;gap:5px!important;
  }
  #mobile-page-history button span[aria-hidden="true"]{font-size:16px!important}
}
@media(min-width:761px){
  #mobile-page-history:not([hidden]){min-height:42px!important;padding:4px 8px!important;gap:10px!important}
  #mobile-page-history button{flex:0 1 170px!important;min-height:33px!important;border-radius:999px!important;font-size:12px!important}
  #mobile-page-history button span[aria-hidden="true"]{font-size:17px!important}
}

/* Lao4Me Android dark-theme fallback: keep card and header surfaces the same
   cream palette even on Android builds that force recolouring gradients. */
@media (prefers-color-scheme: dark) {
  html body .topbar,
  html body .sidebar { background:#fff9f0!important; color:#40342f!important; }
  html body #home-view .welcome-row {
    background:linear-gradient(110deg,#fff7e6 0%,#fffdf8 65%,#f1ead9 100%)!important;
    color:#40342f!important;
  }
  html body #home-view .pathway-card,
  html body #home-view .explorer-tool-grid button {
    background:linear-gradient(145deg,#fffdf8,#f6ead7)!important;
    color:#40342f!important;
  }
  html body #home-view .pathway-card h2 {color:#563530!important}
  html body #home-view .pathway-card p {color:#78675d!important}
}

/* END ui-action-illustrations.css */
