/* Content-aware review geometry, after phone and tablet rules. */
.boardColumn.adaptiveReview{--board-size:var(--review-board-size);height:auto;min-height:0;grid-template-rows:22px var(--review-coach-height) 26px var(--board-size) 26px 68px 64px;align-content:start}
.boardColumn.adaptiveReview>.compactCoach{align-items:flex-start;padding:10px 8px;overflow:hidden}
.boardColumn.adaptiveReview .compactCoach .coachBubble{height:100%;max-height:100%;box-sizing:border-box;flex:none}
.boardColumn.adaptiveReview :is(#coachBrief,#mistakeNotes){flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.bubbleFooter{flex-wrap:wrap}.bubbleFooter:has(.expandCoach:not([hidden])) #compactOpening{min-width:60px}
.expandCoach{font-size:12px;padding:5px 8px;min-height:30px;color:#161616;background:#efd5aa}
.reviewFullNote p{white-space:pre-wrap;line-height:1.6;font-size:16px}.reviewFullNote h3{line-height:1.35}
.reviewMeasure{position:fixed!important;left:-20000px!important;top:0!important;height:auto!important;max-height:none!important;min-height:0!important;display:block!important;visibility:hidden!important;box-sizing:border-box!important;overflow:visible!important;padding:12px 14px!important}
.reviewMeasure p{display:block!important;height:auto!important;max-height:none!important;overflow:visible!important;font-size:15px;line-height:1.38;margin:8px 0 0;font-weight:500}
.reviewMeasure .bubbleHeading{display:flex}.reviewMeasure h3{font-size:16px;line-height:1.25;flex:1;margin:0;font-weight:800;min-width:0}.reviewMeasure .bubbleFooter{display:flex;font-size:12px;margin-top:6px}
.reviewMeasure .badge{font-size:12px;padding:4px 6px;max-width:75px}.reviewMeasure [hidden]{display:none!important}
/* Explicit promotion contrast in every board mode. */
:is(#playPromotion,#promotionPanel,#onlinePromotion,#mistakePromotion) button:not(.quiet){background:#efd5aa;color:#231b14!important}
:is(#playPromotion,#promotionPanel,#onlinePromotion,#mistakePromotion) button.quiet{background:#594330;color:#fffaf1!important}
.onlineMatchActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}
.onlineMatchActions button{width:100%;min-width:0;min-height:48px;margin:0;padding:12px;white-space:normal;overflow-wrap:anywhere}
.onlineMatchActions #onlineSeek{grid-column:1/-1}.onlineMatchActions button[hidden]{display:none!important}
.onlineAccountActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.onlineAccountActions button{min-width:0;white-space:normal;margin:0}
@media(max-width:380px){.onlineMatchActions,.onlineAccountActions{grid-template-columns:minmax(0,1fr)}}
/* Theme controls use one palette, including selectors more specific than .primary. */
html[data-theme="green"]{--action-bg:#c8ec87;--action-text:#152018;--quiet-bg:#293632;--quiet-text:#edf1e7}
html[data-theme="green"] :is(#playHub,#onlinePanel,#learnScreen,.sheet,.mistakeScreen) button.primary,
html[data-theme="green"] :is(#playHub,#onlinePanel,#learnScreen,.sheet,.mistakeScreen) button:not([role="tab"]):not(.segBtn):not(.quiet):not(.square):not(.lessonCard):not(.categoryTab):not(.filterChip):not(.variationChip):not(.sideLaunchBtn):not(.ecoDrawerToggle):not(.branchPill):not(.importGame):not(.savedGame):not(.moveRow button):not(.homeOptions button):not(.botCards button){background:var(--action-bg);color:var(--action-text)}
html[data-theme="green"] :is(#playHub,#onlinePanel,#learnScreen,.sheet,.mistakeScreen) button.quiet:not([role="tab"]):not(.segBtn){background:var(--quiet-bg);color:var(--quiet-text)}
html[data-theme="green"] :is(#playHub,#onlinePanel,#learnScreen,.sheet) select,
html[data-theme="green"] #onlineLobby .onlineSelect{background:#293632;border-color:#526a45;color:#edf1e7}
html[data-theme="green"] :is(#playPromotion,#promotionPanel,#onlinePromotion,#mistakePromotion) button:not(.quiet){background:var(--action-bg);color:var(--action-text)!important}
html[data-theme="green"] :is(#playPromotion,#promotionPanel,#onlinePromotion,#mistakePromotion) button.quiet:not([role="tab"]):not(.segBtn){background:var(--quiet-bg);color:var(--quiet-text)!important}
html[data-theme="green"] .mistakeControls :is(#mistakePrev,#mistakeNext){background:#394434;color:#edf1e7}
html[data-theme="green"] .expandCoach{background:var(--action-bg);color:var(--action-text)}

html[data-theme="green"] .homeOptions button:nth-child(3){background:linear-gradient(145deg,#344935,#27352c);border-color:#526a45}
/* The existing bubble overlays the board; its reserved grid track never changes. */
.boardColumn>.compactCoach.coachOverlayOpen{position:relative;z-index:40;overflow:visible!important;isolation:isolate}
.boardColumn .compactCoach.coachOverlayOpen .coachBubble{position:absolute;top:10px;left:var(--coach-overlay-left,8px);right:var(--coach-overlay-right,8px);width:auto;max-width:none;height:var(--coach-overlay-height)!important;max-height:none!important;box-shadow:0 12px 28px #0006;overflow:hidden}
.boardColumn .compactCoach.coachOverlayOpen :is(#coachBrief,#mistakeNotes){overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;white-space:normal}
.expandCoach{flex:none;min-height:32px;touch-action:manipulation}
.boardColumn .compactCoach .bubbleHeading{flex:0 0 auto}
.boardColumn .compactCoach .bubbleFooter{flex:0 0 auto;min-height:32px}
.boardColumn .compactCoach :is(#coachBrief,#mistakeNotes){min-height:0;flex:1 1 auto}
.boardColumn .compactCoach .bubbleFooter:has(.expandCoach:not([hidden])){display:flex!important}

/* Selection must follow state, independent of action-button classes. */
html[data-theme="green"] :is(#importPanel,#playSetup) [role="tab"][aria-selected="true"],html[data-theme="green"] #learnScreen .segBtn.active{background:var(--action-bg);color:var(--action-text)}
html[data-theme="green"] :is(#importPanel,#playSetup) [role="tab"][aria-selected="false"],html[data-theme="green"] #learnScreen .segBtn:not(.active){background:var(--quiet-bg);color:var(--quiet-text)}
