/* 52MEX mobile refinement and localized access page. No player or auth behavior changes. */
@media (max-width:700px) {
  body.cs-home-v6 .cs3-shell { padding-bottom:calc(72px + env(safe-area-inset-bottom,0px)); }
  body.cs-home-v6 .cs3-topbar { padding-top:max(8px,env(safe-area-inset-top,0px)); }
  body.cs-home-v6 .cs3-topbar .cs3-search input { font-size:16px !important; }
  body.cs-home-v6.mh-search-active .mh-bottom-nav { display:none; }
  body.cs-home-v6 .cs3-topbar .cs3-search button { min-width:44px; min-height:44px; height:44px; }
  body.cs-home-v6 .cs3-search { padding-right:0; }
  body.cs-home-v6 .mh-feature { min-height:0; padding-top:18px; padding-bottom:12px; gap:12px; }
  body.cs-home-v6 .mh-feature h1 { font-size:clamp(22px,6.15vw,27px); line-height:1.18; }
  body.cs-home-v6 .mh-kicker { margin-bottom:8px; }
  body.cs-home-v6 .mh-meta { margin-top:8px; line-height:1.5; }
  body.cs-home-v6 .mh-description { display:none; }
  body.cs-home-v6 .mh-actions { margin-top:12px; }
  body.cs-home-v6 .mh-actions a,body.cs-home-v6 .mh-actions button { min-height:44px; }
  body.cs-home-v6 .mh-feature-art a { height:150px; width:100px; }
  body.cs-home-v6 .mh-feature-switch { gap:5px; margin-top:10px; }
  body.cs-home-v6 .mh-feature-switch button {
    min-width:44px; min-height:44px; border:1px solid var(--mh-line); border-radius:3px;
    padding:0 10px; background:transparent; color:var(--mh-muted); font-size:12px; font-weight:650;
  }
  body.cs-home-v6 .mh-feature-switch button.active,
  body.cs-home-v6 .mh-feature-switch button[aria-pressed="true"] {
    border-color:var(--mh-primary); background:var(--mh-primary); color:var(--mh-onprimary);
  }
  body.cs-home-v6 .mh-shortcuts { scroll-snap-type:x proximity; scroll-padding-inline:3px; overscroll-behavior-x:contain; }
  body.cs-home-v6 .mh-shortcuts a { scroll-snap-align:start; }
  body.cs-home-v6 .mh-row:not(.mh-row-empty) {
    grid-auto-columns:69%; scroll-snap-type:x proximity; scroll-padding-inline:1px;
    overscroll-behavior-x:contain; padding-bottom:8px; scrollbar-width:thin;
    scrollbar-color:var(--mh-accent) var(--mh-soft);
    background:
      linear-gradient(to right,var(--mh-bg) 12px,transparent 22px) left center / 28px 100% no-repeat local,
      linear-gradient(to left,var(--mh-bg) 12px,transparent 22px) right center / 28px 100% no-repeat local,
      radial-gradient(ellipse at left,rgba(0,0,0,.24),transparent 70%) left center / 9px 100% no-repeat scroll,
      radial-gradient(ellipse at right,rgba(0,0,0,.24),transparent 70%) right center / 9px 100% no-repeat scroll;
  }
  body.cs-home-v6 .mh-row:not(.mh-row-empty)::-webkit-scrollbar { height:3px; }
  body.cs-home-v6 .mh-row:not(.mh-row-empty)::-webkit-scrollbar-thumb { border-radius:0; background:var(--mh-accent); }
  body.cs-home-v6 .mh-card { scroll-snap-align:start; }
  body.cs-home-v6 .mh-bottom-nav { padding-left:max(8px,env(safe-area-inset-left,0px)); padding-right:max(8px,env(safe-area-inset-right,0px)); }
  body.cs-home-v6 .mh-bottom-nav a[aria-current="page"] { background:var(--mh-glow); border-radius:3px; font-weight:700; }
  body.cs-home-v6 .cs3-content { padding-left:env(safe-area-inset-left,0px); padding-right:env(safe-area-inset-right,0px); }
  body.cs-home-v6 .cs3-search-panel { max-height:calc(100dvh - 200px); overflow-y:auto; overscroll-behavior:contain; }
  body.cs-home-v6 .mh-utility-menu { max-height:calc(100dvh - 164px); overscroll-behavior:contain; }
  body.cs-home-v6 .mh-mobile-langs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
  body.cs-home-v6 .cs3-topbar .mh-mobile-langs button { min-width:0; min-height:44px; padding:8px 5px; white-space:normal; line-height:1.35; }
  body.cs-home-v6 .cs3-native-library-host input { font-size:16px !important; }
}
body.cs-home-v6 .cs3-topbar .mh-language-auto {
  min-height:44px; padding:8px 10px; border:1px solid var(--mh-line); border-radius:3px;
  background:var(--mh-bg) !important; color:var(--mh-muted) !important; font-size:12px; line-height:1.35;
  font-family:inherit; white-space:normal; cursor:pointer;
}
body.cs-home-v6 .cs3-topbar .mh-language-auto.active,
body.cs-home-v6 .cs3-topbar .mh-language-auto[aria-pressed="true"] { background:var(--mh-primary) !important; color:var(--mh-onprimary) !important; border-color:var(--mh-primary); }
@media (min-width:701px) {
  body.cs-home-v6 .mh-utility-menu .mh-mobile-langs { display:block; padding:8px 5px 2px; border-top:1px solid var(--mh-line); }
  body.cs-home-v6 .mh-utility-menu .mh-mobile-langs button:not(.mh-language-auto) { display:none; }
  body.cs-home-v6 .mh-utility-menu .mh-mobile-langs .mh-language-auto { display:block; width:100%; }
}
@media (max-width:360px) {
  body.cs-home-v6 .mh-feature { padding-top:16px; gap:10px; }
  body.cs-home-v6 .mh-feature-art a { width:80px; height:120px; }
}
@media (max-width:700px) and (max-height:500px) {
  body.cs-home-v6 .cs3-topbar { position:relative; top:auto; }
  body.cs-home-v6 .mh-bottom-nav { min-height:56px; padding-top:2px; padding-bottom:calc(2px + env(safe-area-inset-bottom,0px)); }
  body.cs-home-v6 .mh-bottom-nav a { min-height:48px; gap:3px; }
  body.cs-home-v6 .mh-feature { margin-top:10px; }
}

body.mh-access-page {
  --mh-bg:#0b0c0f; --mh-panel:#14161b; --mh-soft:#1d2027;
  --mh-text:#f5f3ef; --mh-muted:#a7acb5; --mh-line:#2b2e35;
  --mh-accent:#dfb56b; --mh-primary:#dbb16a; --mh-onprimary:#19140c;
  --mh-glow:rgba(219,177,106,.12); --mh-shadow:0 16px 36px rgba(0,0,0,.23);
  margin:0; background:var(--mh-bg) !important; color:var(--mh-text) !important;
  color-scheme:dark; font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;
}
html[data-cs-theme="day"] body.mh-access-page {
  --mh-bg:#f6f5f2; --mh-panel:#ffffff; --mh-soft:#eeece7;
  --mh-text:#20232a; --mh-muted:#666b73; --mh-line:#dededb;
  --mh-accent:#85612a; --mh-primary:#d5ac66; --mh-onprimary:#1d170e;
  --mh-glow:rgba(213,172,102,.15); --mh-shadow:0 10px 28px rgba(42,39,31,.07);
  background:var(--mh-bg) !important; color-scheme:light;
}
body.mh-access-page #root { min-height:100vh; background:var(--mh-bg) !important; color:var(--mh-text) !important; }
body.mh-access-page *,body.mh-access-page *::before,body.mh-access-page *::after { box-sizing:border-box; }
body.mh-access-page .mh-access-shell {
  display:flex; flex-direction:column; justify-content:center; align-items:center; gap:18px;
  width:100%; min-height:100vh; min-height:100svh;
  padding:max(28px,env(safe-area-inset-top,0px)) max(20px,env(safe-area-inset-right,0px)) max(28px,env(safe-area-inset-bottom,0px)) max(20px,env(safe-area-inset-left,0px));
  background:var(--mh-bg) !important; color:var(--mh-text) !important;
}
body.mh-access-page .mh-access-brand {
  display:flex; width:min(420px,100%); min-height:48px; align-items:center; justify-content:center;
  flex-direction:column; gap:5px; color:var(--mh-text) !important; text-decoration:none;
}
body.mh-access-page .mh-access-brand b { font-size:25px; line-height:1.1; font-weight:800; letter-spacing:-.04em; }
body.mh-access-page .mh-access-brand small { color:var(--mh-accent); font-size:9px; line-height:1.2; letter-spacing:.22em; }
body.mh-access-page .mh-access-tools {
  display:flex; width:min(420px,100%); align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px;
}
body.mh-access-page .mh-access-langs { display:flex; gap:4px; flex:0 1 auto; flex-wrap:wrap; max-width:100%; padding:3px; border:1px solid var(--mh-line); border-radius:3px; background:var(--mh-panel); }
body.mh-access-page .mh-access-langs button {
  display:inline-flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; padding:0 10px;
  border:0; border-radius:2px; background:transparent !important; color:var(--mh-muted) !important;
  font-family:inherit; font-size:13px; line-height:1.2; font-weight:650; cursor:pointer; white-space:normal;
}
body.mh-access-page .mh-access-langs button.active,
body.mh-access-page .mh-access-langs button[aria-pressed="true"] { background:var(--mh-primary) !important; color:var(--mh-onprimary) !important; }
body.mh-access-page .mh-access-theme {
  display:inline-flex; min-height:50px; min-width:44px; align-items:center; justify-content:center;
  max-width:100%; padding:8px 12px; border:1px solid var(--mh-line); border-radius:3px;
  background:var(--mh-panel) !important; color:var(--mh-text) !important; cursor:pointer;
  font-family:inherit; font-size:13px; line-height:1.4; font-weight:600; overflow-wrap:anywhere;
}
body.mh-access-page .mh-access-card {
  display:grid; gap:22px; width:min(420px,100%); max-width:420px; padding:28px 26px;
  border:1px solid var(--mh-line) !important; border-radius:4px !important;
  background:var(--mh-panel) !important; color:var(--mh-text) !important; box-shadow:var(--mh-shadow) !important;
}
body.mh-access-page .mh-access-card [data-slot="card-header"] { gap:10px; padding:0; text-align:left; }
body.mh-access-page .mh-access-card [data-slot="card-header"] > .flex { justify-content:flex-start; margin-bottom:0; }
body.mh-access-page .mh-access-card [data-slot="card-header"] svg { width:24px; height:24px; color:var(--mh-accent) !important; }
body.mh-access-page .mh-access-title { margin:0; color:var(--mh-text) !important; font-size:25px; line-height:1.25; font-weight:750; letter-spacing:-.025em; overflow-wrap:anywhere; }
body.mh-access-page .mh-access-hint {
  margin:3px 0 0; padding:12px 14px; border-left:2px solid var(--mh-accent); border-radius:0;
  color:var(--mh-accent) !important; background:var(--mh-glow) !important;
  font-size:14px; line-height:1.6; font-weight:600; letter-spacing:0; font-variant-numeric:tabular-nums; overflow-wrap:anywhere;
}
body.mh-access-page .mh-access-card [data-slot="card-content"] { display:grid; gap:20px; padding:0; }
body.mh-access-page .mh-access-card [data-slot="card-content"] > * + * { margin-top:0 !important; }
body.mh-access-page .mh-access-card label { display:block; margin:0 0 8px; color:var(--mh-text) !important; font-size:14px; line-height:1.5; font-weight:600; }
body.mh-access-page .mh-access-field { position:relative; border:1px solid var(--mh-line); border-radius:3px; background:var(--mh-bg); }
body.mh-access-page .mh-access-field:focus-within { border-color:var(--mh-accent); outline:2px solid var(--mh-glow); outline-offset:1px; }
body.mh-access-page .mh-access-field input {
  display:block; width:100%; min-width:0; height:48px !important; padding:10px 54px 10px 12px;
  border:0 !important; border-radius:3px; background:transparent !important; color:var(--mh-text) !important;
  font-family:inherit; font-size:16px !important; line-height:1.5; box-shadow:none !important;
}
body.mh-access-page .mh-access-field input:focus { outline:none; }
body.mh-access-page .mh-access-field input::placeholder { color:var(--mh-muted) !important; opacity:1; font-size:14px; }
body.mh-access-page .mh-password-toggle {
  position:absolute; top:0; right:0; display:grid; width:48px; height:48px; min-width:44px; min-height:44px;
  padding:0; place-items:center; border:0; border-radius:2px; background:transparent !important;
  color:var(--mh-muted) !important; cursor:pointer;
}
body.mh-access-page .mh-password-toggle svg { display:block; width:20px; height:20px; }
body.mh-access-page .mh-password-toggle:hover { color:var(--mh-accent) !important; background:var(--mh-glow) !important; }
body.mh-access-page .mh-access-submit {
  display:flex; width:100%; min-height:48px; height:auto !important; align-items:center; justify-content:center; gap:8px;
  padding:11px 16px; border:1px solid var(--mh-primary); border-radius:3px !important;
  background:var(--mh-primary) !important; color:var(--mh-onprimary) !important;
  font-family:inherit; font-size:16px; line-height:1.5; font-weight:700; white-space:normal !important; cursor:pointer;
}
body.mh-access-page .mh-access-submit:disabled { opacity:.6; cursor:wait; }
body.mh-access-page .mh-access-note { width:min(420px,100%); margin:0; color:var(--mh-muted) !important; font-size:12px; line-height:1.7; text-align:center; overflow-wrap:anywhere; }
body.mh-access-page .mh-access-field:has(input[aria-invalid="true"]) { border-color:#cf6c62; }
body.mh-access-page :focus-visible { outline:2px solid var(--mh-accent) !important; outline-offset:3px; }
body.mh-access-page .mh-access-field input:focus-visible { outline:none !important; }
@media (max-width:420px) {
  body.mh-access-page .mh-access-shell { gap:16px; }
  body.mh-access-page .mh-access-card { padding:24px 20px; gap:20px; }
  body.mh-access-page .mh-access-title { font-size:23px; }
  body.mh-access-page .mh-access-theme { padding:8px 10px; font-size:12px; }
  body.mh-access-page .mh-access-langs button { padding:0 7px; }
}
@media (max-height:600px) {
  body.mh-access-page .mh-access-shell { justify-content:flex-start; padding-top:max(16px,env(safe-area-inset-top,0px)); padding-bottom:max(20px,env(safe-area-inset-bottom,0px)); gap:12px; }
  body.mh-access-page .mh-access-brand { min-height:40px; }
}
@media (prefers-reduced-motion:reduce) {
  body.mh-access-page *,body.mh-access-page *::before,body.mh-access-page *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

/* Native route language control: its existing 46px field clipped the selected label. */
#mex52-language-switcher {
  display:flex; position:absolute; top:16px; right:24px; align-items:center; justify-content:flex-end;
  flex:0 0 auto; width:112px; max-width:calc(100vw - 40px); margin:0;
}
#mex52-language-switcher select {
  box-sizing:border-box; width:112px !important; max-width:100%; height:44px !important;
  min-height:44px; padding:0 26px 0 10px !important; border:1px solid #92989f;
  border-radius:3px; background:#f6f5f2 !important; color:#20232a !important;
  font-family:inherit; font-size:14px !important; font-weight:650; line-height:1.4;
  letter-spacing:0; cursor:pointer;
}
#mex52-language-switcher select:focus-visible { outline:2px solid #85612a; outline-offset:2px; box-shadow:none; }
#mex52-language-switcher option { background:#ffffff !important; color:#20232a !important; }
html[data-cs-theme="gold"] #mex52-language-switcher select { background:#14161b !important; color:#f5f3ef !important; border-color:#616976; }
html[data-cs-theme="gold"] #mex52-language-switcher option { background:#14161b !important; color:#f5f3ef !important; }
html[data-cs-theme="gold"] #mex52-language-switcher select:focus-visible { outline-color:#dfb56b; }
@media (max-width:700px) {
  #mex52-language-switcher { display:flex; position:relative; top:auto; right:auto; margin:8px 24px 10px auto; }
  #mex52-language-switcher select { font-size:16px !important; }
}
