/* All compact styles are opt-in. Desktop retains its original styles and DOM. */
body.mobileBoards { padding-bottom: 64px; }
body.mobileBoards #mainLessonBar,
body.mobileBoards #loadedLessonDisplay,
body.mobileBoards > .gle-account-row { display: none; }
body.mobileBoards #helpAvatarSystem { display: none; }
body.mobileBoards.gleCompactShowHelp #helpAvatarSystem { display: block; }
body.mobileBoards .gleCompactShell { width: var(--workspace-width); margin: 0 auto 6px; }
body.mobileBoards .gleCompactToolbar,
body.mobileBoards .gleCompactMenus,
body.mobileBoards .gleCompactBoardMenus { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; }
body.mobileBoards .gleCompactToolbar { align-items: center; margin-bottom: 6px; }
body.mobileBoards #boardLessonPickers { display: flex; flex-wrap: wrap; gap: 6px; }
body.mobileBoards #mobileBoardsToggle { position: static; transform: none; margin-left: auto; width: auto; min-height: 44px; }
body.mobileBoards .gleCompactShell button,
body.mobileBoards .gleCompactContent button,
body.mobileBoards .gleCompactContent select,
body.mobileBoards .gleCompactContent a { min-height: 44px; font-size: 15px; touch-action: manipulation; }
body.mobileBoards #lessonButton,
body.mobileBoards .boardLessonBtn { padding: 8px 12px; font-size: 15px; min-height: 44px; }
body.mobileBoards .gleCompactPanel { min-width: 0; border: 1px solid #765b30; border-radius: 9px; background: #191919; text-align: left; }
body.mobileBoards .gleCompactPanel[hidden] { display: none; }
body.mobileBoards .gleCompactSummary { display: flex; align-items: center; justify-content: space-between; gap: 12px; box-sizing: border-box; min-height: 44px; padding: 4px 10px; cursor: pointer; color: #ffdb9b; font: 600 14px/1.3 Arial,sans-serif; list-style: none; }
body.mobileBoards .gleCompactSummary::-webkit-details-marker { display: none; }
body.mobileBoards .gleCompactSummary::after { content: '▾'; }
body.mobileBoards details[open] > .gleCompactSummary::after { content: '▴'; }
body.mobileBoards .gleCompactSummary:focus-visible { outline: 2px solid #6dc7ee; outline-offset: 2px; }
body.mobileBoards .gleCompactPanel[open] { flex-basis: 100%; }
body.mobileBoards .gleCompactContent { padding: 5px; border-top: 1px solid #494033; }
body.mobileBoards .gleCompactContent > .gle-site-nav { width: 100%; justify-content: flex-start; padding: 0; border: 0; background: transparent; z-index: auto; }
body.mobileBoards .gleCompactContent > .gle-site-nav a { display: inline-flex; align-items: center; }
body.mobileBoards #gleCompactSettings > .gleCompactContent,
body.mobileBoards #gleCompactHelp > .gleCompactContent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.mobileBoards #ghostNotesControl { float: none !important; min-height: 44px !important; padding: 4px 8px; }
body.mobileBoards #ltmPickControls { margin: 0; flex-wrap: wrap; gap: 6px; }
body.mobileBoards .boardControlStrip { padding: 6px; margin-top: 4px; margin-bottom: 4px; border-radius: 10px; }
body.mobileBoards .gleCompactBoardTitle { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; text-align: left; padding: 0 4px 3px; font-size: 14px; line-height: 1.3; }
body.mobileBoards #topBoardControlStrip .gleCompactBoardTitle { color: #8ed5f3; }
body.mobileBoards #bottomBoardControlStrip .gleCompactBoardTitle { color: #ffd18b; }
body.mobileBoards .boardControlHeader { margin: 0; flex-wrap: wrap; gap: 6px; }
body.mobileBoards .boardControlHeader > .controlLabel { display: none; }
body.mobileBoards .displayControls { flex-wrap: wrap; }
body.mobileBoards .patternBtn { padding: 8px 12px; }
body.mobileBoards .transportPanel,
body.mobileBoards .controlsWrap,
body.mobileBoards .controls { padding: 0; margin: 0; width: 100%; }
body.mobileBoards .transportMeta { flex: 0 1 auto; width: auto; flex-wrap: wrap; gap: 4px; }
body.mobileBoards .transportButtons { width: auto; flex-wrap: wrap; gap: 4px; margin-top: 0; }
body.mobileBoards .transportButtons .iconBtn { width: 46px; height: 46px; min-width: 46px; padding: 6px; font-size: 21px; }
body.mobileBoards #lessonPicker { position: relative; }
body.mobileBoards #lessonMenu { position: fixed; left: max(8px, env(safe-area-inset-left)); top: 64px; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 80px); overflow-y: auto; z-index: 15000; }
body.mobileBoards #boardLessonPickers .boardLessonBtn { min-height: 44px; padding: 8px 12px; font-size: 15px; }
body.mobileBoards #topTransport .iconBtn { width: 46px; height: 46px; min-height: 46px; }
body.mobileBoards #ltmPickToggle,
body.mobileBoards #ltmPickLiveToggle,
body.mobileBoards #ltmStrumLiveToggle { min-height: 44px; font-size: 15px; }
body.mobileBoards #handToggle { max-width: none; }
body.mobileBoards .gleCompactContent select { max-width: 100%; }
body.mobileBoards #progressionDisplay { margin: 4px auto 0; width: fit-content; max-width: 100%; overflow-wrap: anywhere; font-size: 12px; }

/* Spacing pass: mobile presentation only; board geometry stays with the engine. */
body.mobileBoards .gleCompactShell { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 4px; }
body.mobileBoards .gleCompactToolbar { display: contents; }
body.mobileBoards .gleCompactMenus { order: 1; gap: 4px; flex: 1 1 auto; }
body.mobileBoards #mobileBoardsToggle { order: 2; padding: 4px 10px; font-size: 14px; }
body.mobileBoards #boardLessonPickers { gap: 4px; }
body.mobileBoards #lessonButton,
body.mobileBoards #boardLessonPickers .boardLessonBtn { box-sizing: border-box; padding: 4px 10px; font-size: 14px; }
body.mobileBoards .gleCompactBoardMenus { gap: 4px; }
body.mobileBoards .boardControlStrip { padding: 4px; }
body.mobileBoards .transportPanel .controls { gap: 4px; }
/* These values remain visible in the transport disclosure heading. */
body.mobileBoards .transportMeta > .stepCounter,
body.mobileBoards .transportMeta > .transportStatus { display: none; }
body.mobileBoards #topSpeedSelect,
body.mobileBoards #speedSelect { box-sizing: border-box; min-height: 44px; padding: 4px 6px; font-size: 14px; }

/* No added spacing between the two mobile board viewports. */
body.mobileBoards #topBoardSection { margin-bottom: 0; }
