/* Public mobile UI: semantic navigation, presented as app controls. */
@media (max-width:700px), (max-height:500px) and (pointer:coarse) {
  .game-frame :is(.keyboard-only,.keyboard-guide,.keyboard-hint) { display:none !important; }
  :is(.site-shell,.game-frame,.garden-feedback) a,
  :is(.site-shell,.game-frame,.garden-feedback) a *,
  :is(.site-shell,.game-frame) :is(button,button *,.text-link,.help-button,.credit-link,.guest-play),
  .garden-feedback-link { text-decoration:none !important; }
  .action-label-arrow, .site-shell .arrow { display:none !important; }
  :is(.site-shell,.game-frame,.garden-feedback) :is(a,button,summary) { -webkit-tap-highlight-color:transparent;touch-action:manipulation; }
  :is(.site-shell,.game-frame,.garden-feedback) :is(a,button,summary):focus-visible { outline:3px solid #765297;outline-offset:3px; }
  :is(.site-shell,.game-frame) a:active { opacity:.72; }
  :is(.site-shell,.game-frame,.garden-feedback) button:not(:disabled):active { filter:brightness(.95); }

  /* One destination for profile and account; the You tab opens achievements. */
  .site-header .guest-badge.guest-profile { display:block;padding-block:6px; }
  .site-header .guest-badge:has(.guest-mobile-profile) > :is(.guest-identity,.guest-claim-link,.guest-sync-hint) { display:none; }
  .site-header .guest-badge > .guest-mobile-profile {
    display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;
    padding:0 4px;color:#252a39;border-radius:10px;width:100%;box-sizing:border-box;
  }
  .guest-mobile-profile-copy { display:flex;align-items:baseline;gap:8px;min-width:0; }
  .guest-mobile-profile-status { font:500 13px/1.5 system-ui,sans-serif;color:#454b59;white-space:nowrap; }
  .guest-mobile-profile-copy strong { font:650 13px/1.5 system-ui,sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  .guest-mobile-profile-chevron { font:400 25px/1 system-ui,sans-serif;color:#686074;flex-shrink:0; }
  .site-header .guest-mobile-profile:active { background:#e9e4ed;opacity:1; }

  /* Navigation outside cards becomes a comfortable row or a clear button. */
  .site-shell :is(.mobile-account-back,.back-link,.guest-play,.today-link) {
    display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 12px;
    border-radius:10px;background:#ece7f1;color:#49355e;font-size:14px;font-weight:600;box-sizing:border-box;
  }
  .site-shell .achievement-records td:first-child a { display:flex;justify-content:space-between;gap:12px;min-height:44px; }
  .site-shell .achievement-records td:first-child a::after { content:'';width:7px;height:7px;border-top:2px solid #686074;border-right:2px solid #686074;transform:rotate(45deg);flex-shrink:0;margin:8px 3px 0 0; }
  .site-shell :is(.resume-more,.achievement-more) > summary { min-height:48px;color:#49355e;font-size:14px;font-weight:600; }
  .site-shell .resume-more > summary { list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px; }
  .site-shell .resume-more > summary::-webkit-details-marker { display:none; }
  .site-shell .resume-more > summary::after { content:'';width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-right:4px; }
  .site-shell .resume-more[open] > summary::after { transform:rotate(225deg); }
  .site-shell :is(.resume-button,.daily-bloom-play,.daily-play-link,.standings-play) { border-radius:12px;min-height:44px;font-weight:600; }
  .site-shell :is(.rank-refresh,.guest-status button) { padding:10px 12px;min-height:44px;border-radius:10px;background:#ece7f1;color:#49355e; }
  .site-shell .leaderboard-controls label { display:contents; }
  .site-shell .leaderboard-controls label > span { align-self:center; }
  .site-shell .leaderboard-controls select { grid-column:1/-1;grid-row:2;width:100%; }
  .site-shell .leaderboard-controls .rank-refresh { grid-column:2;grid-row:1; }
  .site-shell .standings-play > span[aria-hidden] { display:none; }
  .site-shell .site-footer .garden-feedback-link { display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;background:#ece7f1;border-radius:12px;color:#49355e;font-size:14px;font-weight:600; }
  .site-shell .site-footer .garden-feedback-link::before { content:'';width:20px;height:20px;background:currentColor;mask:url('/_assets/shared/feedback-message.b581e29f11e70427a7ff.svg') center/contain no-repeat;-webkit-mask:url('/_assets/shared/feedback-message.b581e29f11e70427a7ff.svg') center/contain no-repeat; }
  .site-shell .site-footer .feedback-link-full { display:none; }
  .site-shell .site-footer .feedback-link-compact { display:inline; }

  /* Keep game navigation quiet, with comfortable controls inside Game options. */
  .game-frame.game-frame .game-header:has(.game-settings[open]) { position:relative;z-index:80; }
  .game-frame.game-frame .game-header .brand :is(small,.brand-caption) { font-size:0; }
  .game-frame.game-frame .game-header .brand :is(small,.brand-caption)::after { content:'‹ Games' / '';font:550 11px/1.5 system-ui,sans-serif;letter-spacing:0;text-transform:none;color:#454b59; }
  .game-frame.game-frame .game-header .help-button { min-height:44px;border:0;border-radius:10px;background:#ece7f1;color:#252a39;text-align:left;padding:10px 12px;font:600 14px/1.4 system-ui,sans-serif; }
  .game-frame.game-frame .game-header .help-button::after { content:'';margin-left:auto;width:7px;height:7px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(45deg);flex-shrink:0; }
  .game-frame.game-frame .game-header .help-button { display:flex;align-items:center;justify-content:space-between;gap:12px; }
  .game-frame.game-frame :is(.game-toolbar,.game-mobile-actions,.result-actions) button { border-radius:12px; }
  .game-frame.game-frame a:not(.brand) { min-height:44px;display:inline-flex;align-items:center;gap:8px;border-radius:10px;padding:8px 12px;box-sizing:border-box;font-weight:600;background:#ece7f1;color:#252a39; }
  .game-frame.game-frame :is(.dialog,.help-dialog,.overlay-content,.music-thanks) a { margin:4px 0; }
  .garden-feedback .feedback-dialog button { border-radius:12px; }
}
@media (prefers-reduced-motion:reduce) {
  :is(.site-shell,.game-frame,.garden-feedback) :is(a,button,summary) { scroll-behavior:auto; }
}
