/* V284.17 — explicit public-root navigation only; no gameplay or theme changes. */
.catchie-home-link {
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  gap:7px;
  min-width:44px;
  min-height:44px;
  max-width:100%;
  padding:10px 13px;
  box-sizing:border-box;
  border:2px solid var(--stroke,var(--line,#94a3b8));
  border-radius:12px;
  background:var(--surface-solid,var(--panel,var(--paper,#fff)));
  color:var(--theme-readable-text,var(--text-primary,var(--text,var(--ink,#172033))));
  font:800 .9rem/1.25 Inter,"Noto Sans Thai",Tahoma,system-ui,sans-serif;
  text-decoration:none;
  white-space:nowrap;
  touch-action:manipulation;
}
.catchie-home-link svg { flex:0 0 20px; width:20px; height:20px; }
.catchie-home-link:hover { border-color:currentColor; text-decoration:underline; }
.catchie-home-link:focus-visible { outline:3px solid currentColor; outline-offset:3px; }
.catchie-home-header > .catchie-home-link { justify-self:start; }
.game-topbar.catchie-home-header { grid-template-columns:auto auto minmax(0,1fr) auto; }
.game-topbar.catchie-home-header > .game-brand { min-width:0; text-align:center; overflow-wrap:anywhere; }
.catchie-home-header > .private-brand { min-width:0; overflow-wrap:anywhere; }
/* These actions stay in the dialog, above the scrollable leaderboard. */
.mg-board-card > .mg-fullscreen-head { grid-template-columns:44px minmax(0,1fr) auto; flex-shrink:0; }
.mg-board-card > .mg-fullscreen-head .mg-close { min-width:44px; min-height:44px; }
.mg-board-card > .mg-fullscreen-head h2 { overflow-wrap:anywhere; }
.catchie-result-homebar {
  display:flex; justify-content:flex-end; flex-shrink:0;
  position:sticky; top:0; z-index:2; margin:0 0 8px; padding:0 0 6px;
  background:var(--card,var(--surface-solid,var(--surface,#fff)));
}
.mg-result-actions > .catchie-home-link { min-width:0; }
.result-actions > .catchie-home-link { grid-column:1/-1; justify-self:stretch; }
@media(max-width:700px) {
  .lads-topbar.catchie-home-header,.mark-topbar.catchie-home-header {
    display:grid; grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center; gap:8px; padding:8px max(10px,env(safe-area-inset-left));
  }
  .catchie-home-header .catchie-home-link { padding:9px 10px; font-size:.82rem; }
  .lads-topbar.catchie-home-header > .private-brand,.mark-topbar.catchie-home-header > .private-brand {
    max-width:none; font-size:.85rem; line-height:1.3;
  }
  .game-topbar.catchie-home-header { grid-template-columns:auto minmax(0,1fr) auto; gap:6px; }
  .game-topbar.catchie-home-header > .game-back { grid-column:2; grid-row:1; }
  .game-topbar.catchie-home-header > .game-top-actions { grid-column:3; grid-row:1; }
  .game-topbar.catchie-home-header > .game-brand { grid-column:1/-1; grid-row:2; font-size:.9rem; }
  .course-topbar.catchie-home-header { gap:8px; padding:8px 10px; }
  .course-topbar.catchie-home-header > .course-brand { flex:1; font-size:1rem; }
  .course-topbar.catchie-home-header > .course-topnav { flex-basis:100%; order:3; }
  .course-topbar.catchie-home-header > .course-back { order:2; }
  .course-topbar.catchie-home-header > .language-switcher { margin-left:auto; }
  .mg-board-card > .mg-fullscreen-head { gap:6px; }
  .mg-board-card > .mg-fullscreen-head h2 { font-size:1rem; }
  .mg-board-card > .mg-fullscreen-head .catchie-home-link { padding:9px 8px; font-size:.8rem; }
  .mg-result-actions { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .mg-result-actions > .catchie-home-link { grid-column:1/-1; width:100%; }
  .result-actions > .catchie-home-link { flex-basis:100%; width:100%; scroll-margin-block:120px; }
}
@media(forced-colors:active) {
  .catchie-home-link { border-color:ButtonText; background:ButtonFace; color:ButtonText; }
}
