/* MyFriends.Space — Site Experience 1.0. Layered after site.css.
   Scoped to the social shell. Account pages and standalone game engines keep their own styles. */
body.mfs-site {
  --mfs-bg:#f5f2fa; --mfs-surface:#fff; --mfs-ink:#271b37; --mfs-muted:#6b607a;
  --mfs-primary:#6837b3; --mfs-primary-hover:#54258f; --mfs-soft:#f1eafc; --mfs-border:#ded4e9;
  --mfs-input:#fff; --mfs-success:#246d4c; --mfs-danger:#9e2443; --mfs-shadow:0 10px 32px rgba(51,26,86,.055);
  --mfs-header:80px; --mfs-bottom:0px; --mfs-visible-height:100dvh;
  --bg:var(--mfs-bg); --surface:var(--mfs-surface); --surface-alt:var(--mfs-bg); --surface-muted:var(--mfs-soft);
  --text:var(--mfs-ink); --text-muted:var(--mfs-muted); --border:var(--mfs-border); --border-strong:var(--mfs-primary);
  --button:var(--mfs-primary); --button-hover:var(--mfs-primary-hover); --card-header:var(--mfs-surface);
  --radius-sm:12px; --radius-md:20px; --shadow-soft:var(--mfs-shadow);
  margin:0; min-height:100vh; min-height:100dvh; color:var(--mfs-ink); background:var(--mfs-bg);
  font:16px/1.55 "Segoe UI",Arial,sans-serif; color-scheme:light; overflow-wrap:anywhere;
}
body.mfs-site.theme-dark { --mfs-bg:#191621; --mfs-surface:#241f30; --mfs-ink:#f1eaf8; --mfs-muted:#beb2cf; --mfs-primary:#ba93fa; --mfs-primary-hover:#d1b2ff; --mfs-soft:#342543; --mfs-border:#4a3e5b; --mfs-input:#1b1725; --mfs-success:#91d4b0; --mfs-danger:#ffb0c1; --mfs-shadow:0 10px 32px #0002; color-scheme:dark; }
.mfs-site *, .mfs-site *::before, .mfs-site *::after { box-sizing:border-box; }
.mfs-site [hidden] { display:none !important; }
.mfs-site img { max-width:100%; }
.mfs-site a { color:var(--mfs-primary); text-underline-offset:3px; }
.mfs-site a:hover { text-decoration:underline; }
.mfs-site :focus-visible { outline:3px solid #ac7eeb; outline-offset:3px; }
.mfs-site button, .mfs-site input, .mfs-site select, .mfs-site textarea { font:inherit; }
.mfs-site h1,.mfs-site h2,.mfs-site h3,.mfs-site h4 { line-height:1.25; letter-spacing:-.025em; color:inherit; }
.mfs-site h1 { font-size:clamp(1.7rem,3vw,2.25rem); font-weight:750; margin:0 0 8px; }
.mfs-site h2 { font-size:1.25rem; font-weight:700; }
.mfs-site h3 { font-size:1.05rem; }
.mfs-site p { margin:0 0 14px; }
.mfs-site :is(button,a,input,summary) { -webkit-tap-highlight-color:transparent; }
.mfs-icon { display:inline-block; flex:none; width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle; }
.mfs-sr-only { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.mfs-skip-link { position:fixed; top:-100px; left:16px; background:var(--mfs-surface); padding:12px 18px; z-index:9999; }
.mfs-skip-link:focus { top:8px; }
/* Site navigation */
.mfs-site-header { background:var(--mfs-surface); border-bottom:1px solid var(--mfs-border); position:relative; z-index:100; }
.mfs-header-inner { max-width:1320px; padding:16px 28px; min-height:80px; display:flex; align-items:center; justify-content:space-between; gap:24px; margin:auto; }
.mfs-header-inner .mfs-brand { flex-shrink:0; }
.mfs-header-inner .mfs-brand img { width:226px; }
.mfs-desktop-nav { display:flex; align-items:center; justify-content:center; gap:5px; margin-left:auto; }
.mfs-desktop-nav a { color:var(--mfs-muted); font-size:14px; font-weight:650; padding:11px 12px; text-decoration:none; border-radius:10px; min-height:44px; }
.mfs-desktop-nav a:hover,.mfs-desktop-nav a[aria-current=page] { background:var(--mfs-soft); color:var(--mfs-primary); text-decoration:none; }
.mfs-header-actions { display:flex; align-items:center; gap:12px; }
.mfs-site .mfs-icon-button { display:inline-flex; align-items:center; justify-content:center; width:44px; min-width:44px; height:44px; padding:10px; border:1px solid var(--mfs-border); border-radius:12px; background:var(--mfs-surface); color:var(--mfs-ink); cursor:pointer; }
.mfs-site .mfs-icon-button:hover { background:var(--mfs-soft); }
.mfs-bell { position:relative; }
.mfs-count { position:absolute; top:-6px; right:-7px; min-width:20px; height:20px; padding:0 5px; display:flex; justify-content:center; align-items:center; border-radius:20px; background:var(--mfs-primary); color:white; font-size:10px; font-weight:750; border:2px solid var(--mfs-surface); }
.theme-dark .mfs-count { color:#211332; }
.mfs-account-menu { position:relative; }
.mfs-account-menu>summary { display:flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; list-style:none; font-size:13px; font-weight:650; }
.mfs-account-menu>summary::-webkit-details-marker { display:none; }
.mfs-account-menu>summary img { width:36px; height:36px; border-radius:10px; }
.mfs-account-name { max-width:134px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mfs-account-popover { position:absolute; z-index:110; right:0; top:calc(100% + 12px); width:240px; padding:12px; border:1px solid var(--mfs-border); border-radius:16px; box-shadow:0 20px 50px #21133220; background:var(--mfs-surface); }
.mfs-account-popover>p { font-size:10px; letter-spacing:1.3px; color:var(--mfs-muted); margin:8px 10px; }
.mfs-account-popover a,.mfs-account-popover button { display:block; text-align:left; width:100%; padding:11px 12px; min-height:44px; border:0; border-radius:8px; color:var(--mfs-ink); background:transparent; font-size:14px; text-decoration:none; cursor:pointer; }
.mfs-account-popover :is(a,button):hover { background:var(--mfs-soft); color:var(--mfs-primary); }
.mfs-account-popover form { margin-top:8px; border-top:1px solid var(--mfs-border); padding-top:8px; }
.mfs-site .mfs-menu-toggle { display:none; }
.mfs-signin-link { font-size:14px; font-weight:700; white-space:nowrap; }
.mfs-nav-dialog { width:min(420px,calc(100% - 24px)); max-height:calc(100dvh - 24px); margin:auto 12px auto auto; padding:20px; color:var(--mfs-ink); background:var(--mfs-surface); border:1px solid var(--mfs-border); border-radius:22px; overflow-y:auto; overscroll-behavior:contain; }
.mfs-nav-dialog::backdrop { background:#17102180; backdrop-filter:blur(3px); }
.mfs-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.mfs-dialog-heading h2 { margin:0; font-size:19px; }
.mfs-menu-links { display:grid; gap:3px; }
.mfs-menu-links a { display:flex; align-items:center; gap:14px; min-height:48px; border-radius:11px; padding:10px 12px; color:var(--mfs-ink); text-decoration:none; font-size:15px; font-weight:600; }
.mfs-menu-links a:hover { background:var(--mfs-soft); text-decoration:none; color:var(--mfs-primary); }
.mfs-menu-links .mfs-icon { color:var(--mfs-primary); }
.mfs-menu-logout { border-top:1px solid var(--mfs-border); margin-top:16px; padding-top:16px; }
.mfs-menu-logout button { width:100%; }
.mfs-bottom-nav { display:none; }
.mfs-site .page-shell { max-width:1260px; width:100%; margin:0 auto; padding:34px 28px 40px; min-height:calc(100dvh - 160px); }
.mfs-site .page-shell:focus { outline:0; }
.mfs-site-footer { max-width:1204px; margin:0 auto; padding:20px 0 28px; border-top:1px solid var(--mfs-border); display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; font-size:12px; color:var(--mfs-muted); }
/* Page titles, shared cards and controls */
.mfs-page-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:26px; }
.mfs-page-heading p { max-width:650px; font-size:15px; color:var(--mfs-muted); margin:0; }
.mfs-eyebrow { color:var(--mfs-primary); font-size:11px; font-weight:750; letter-spacing:1.7px; text-transform:uppercase; margin-bottom:8px !important; }
.mfs-heading-actions,.mfs-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.mfs-heading-actions { padding-top:8px; flex-shrink:0; }
.mfs-site .myspace-card { background:var(--mfs-surface); border:1px solid var(--mfs-border); border-radius:20px; box-shadow:var(--mfs-shadow); margin-bottom:20px; min-width:0; overflow:visible; }
.mfs-site .card-header { padding:20px 22px; background:transparent; color:var(--mfs-ink); border-bottom:1px solid var(--mfs-border); border-radius:20px 20px 0 0; font-size:17px; line-height:1.4; font-weight:700; }
.mfs-site .card-header :is(h1,h2,p) { margin:0; }
.mfs-site .card-header h1 { font-size:26px; }
.mfs-site .card-header p { font-size:14px; color:var(--mfs-muted); margin-top:6px; font-weight:400; }
.mfs-site .card-body { padding:22px; min-width:0; }
.mfs-site .card-body>:last-child { margin-bottom:0; }
.mfs-site .themed-button,.mfs-site .arcade-button,.mfs-site .mfs-button { display:inline-flex; justify-content:center; align-items:center; gap:8px; padding:11px 17px; min-height:46px; border:1px solid transparent; border-radius:11px; color:#fff; background:var(--mfs-primary); text-decoration:none; font-size:14px; line-height:1.5; font-weight:650; cursor:pointer; box-shadow:none; white-space:normal; text-align:center; }
.mfs-site.theme-dark .themed-button,.mfs-site.theme-dark .arcade-button { color:#211332; }
.mfs-site :is(.themed-button,.arcade-button):hover { background:var(--mfs-primary-hover); text-decoration:none; }
.mfs-site .secondary-button { color:var(--mfs-primary) !important; background:var(--mfs-surface); border-color:var(--mfs-border); }
.mfs-site .secondary-button:hover { background:var(--mfs-soft); }
.mfs-site .themed-button.mfs-danger { color:var(--mfs-danger) !important; border-color:var(--mfs-border); background:var(--mfs-surface); }
.mfs-site .small-button { font-size:13px; min-height:44px; padding:10px 13px; }
.mfs-site button:disabled { opacity:.5; cursor:not-allowed; }
.mfs-site .themed-input,.mfs-site .themed-select,.mfs-site .themed-textarea { display:block; width:100%; min-height:48px; padding:11px 13px; color:var(--mfs-ink); background:var(--mfs-input); border:1px solid var(--mfs-border); border-radius:10px; font-size:16px; line-height:1.5; box-shadow:none; }
.mfs-site .themed-textarea { min-height:112px; resize:vertical; }
.mfs-site input[type=file].themed-input { max-width:100%; padding:8px; font-size:13px; }
.mfs-site input[type=file]::file-selector-button { color:var(--mfs-primary); background:var(--mfs-soft); border:0; border-radius:7px; padding:10px; margin-right:12px; font:inherit; font-weight:650; cursor:pointer; }
.mfs-site :is(.themed-input,.themed-select,.themed-textarea):focus { border-color:var(--mfs-primary); outline:2px solid color-mix(in srgb,var(--mfs-primary) 25%,transparent); outline-offset:1px; }
.mfs-site label { font-size:14px; line-height:1.5; font-weight:600; }
.mfs-site input[type=checkbox],.mfs-site input[type=radio] { width:20px; height:20px; accent-color:#7546c8; flex-shrink:0; vertical-align:middle; }
.mfs-site .form-row { display:grid; gap:7px; min-width:0; }
.mfs-site .profile-form { gap:22px; }
.mfs-site .help-text { color:var(--mfs-muted); font-size:13px; line-height:1.5; }
.mfs-site .validation-summary,.mfs-site .field-validation-error { color:var(--mfs-danger); font-size:14px; }
.mfs-site .validation-summary-errors { border:1px solid var(--mfs-danger); border-radius:12px; padding:14px 18px; margin-bottom:20px; }
.mfs-site .validation-summary-valid { display:none; }
.mfs-site .input-validation-error { border-color:var(--mfs-danger); }
.mfs-notice { padding:16px 18px; border:1px solid var(--mfs-border); border-radius:14px; background:var(--mfs-soft); margin-bottom:20px; font-size:14px; }
.mfs-notice p:last-child { margin:0; }
.mfs-empty { padding:36px 24px; text-align:center; color:var(--mfs-muted); }
.mfs-empty>.mfs-icon { width:36px; height:36px; color:var(--mfs-primary); margin-bottom:12px; }
.mfs-empty h2,.mfs-empty h3 { color:var(--mfs-ink); margin:0 0 8px; }
.mfs-empty p { max-width:420px; margin:0 auto 16px; }
.mfs-search { display:flex; align-items:center; position:relative; max-width:440px; margin-bottom:22px; }
.mfs-search>.mfs-icon { position:absolute; left:14px; color:var(--mfs-muted); pointer-events:none; }
.mfs-search input { padding-left:44px !important; }
.mfs-section-nav { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px; }
.mfs-section-nav a { font-size:14px; font-weight:600; text-decoration:none; min-height:44px; padding:10px 14px; border-radius:10px; border:1px solid var(--mfs-border); background:var(--mfs-surface); }
.mfs-section-nav a[aria-current=page],.mfs-section-nav a:hover { background:var(--mfs-soft); border-color:var(--mfs-primary); text-decoration:none; }
.mfs-tabs { display:flex; gap:5px; border-bottom:1px solid var(--mfs-border); padding:0 0 10px; margin-bottom:20px; overflow:auto; scrollbar-width:thin; }
.mfs-tabs button { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:9px 15px; color:var(--mfs-muted); background:transparent; border:0; border-radius:9px; font-size:14px; font-weight:650; white-space:nowrap; cursor:pointer; }
.mfs-tabs button[aria-selected=true] { color:var(--mfs-primary); background:var(--mfs-soft); }
.mfs-tabs button span { font-size:11px; padding:1px 6px; border-radius:8px; background:var(--mfs-bg); }
/* Profile editing: six coherent sections, one form, one save action */
.mfs-settings-layout { display:grid; grid-template-columns:225px minmax(0,1fr); gap:26px; align-items:start; }
.mfs-settings-sidebar { position:sticky; top:20px; }
.mfs-settings-nav { display:grid; gap:5px; }
.mfs-settings-nav a { display:flex; align-items:center; gap:12px; min-height:48px; padding:12px; color:var(--mfs-muted); font-size:14px; font-weight:650; text-decoration:none; border:1px solid transparent; border-radius:11px; }
.mfs-settings-nav a[aria-selected=true],.mfs-settings-nav a:hover { background:var(--mfs-surface); border-color:var(--mfs-border); color:var(--mfs-primary); text-decoration:none; }
.mfs-settings-nav a[aria-selected=true] { box-shadow:var(--mfs-shadow); }
.mfs-settings-nav .mfs-icon { width:20px; height:20px; }
.mfs-settings-security { padding:18px 12px; margin-top:16px; border-top:1px solid var(--mfs-border); font-size:13px; color:var(--mfs-muted); }
.mfs-settings-security p { margin-bottom:10px; }
.mfs-settings-mobile-nav { display:none; }
.mfs-settings-main { min-width:0; }
.mfs-settings-panel { scroll-margin-top:20px; }
.mfs-settings-panel .card-header { border-bottom:0; padding-bottom:0; }
.mfs-settings-panel .card-header h2 { font-size:22px; margin:0 0 6px; }
.mfs-settings-panel .card-header p { font-size:14px; font-weight:400; }
.mfs-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.mfs-field-grid>.wide { grid-column:1/-1; }
.mfs-field-end { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.mfs-counter { flex-shrink:0; color:var(--mfs-muted); font-size:11px; font-variant-numeric:tabular-nums; }
.mfs-url-preview { font-size:12px; padding:9px 12px; background:var(--mfs-bg); border-radius:8px; color:var(--mfs-muted); overflow-wrap:anywhere; }
.mfs-settings-panel .mfs-separator { border:0; border-top:1px solid var(--mfs-border); margin:26px 0; }
.mfs-photo-upload { display:grid; grid-template-columns:88px minmax(0,1fr); gap:18px; align-items:center; padding:18px; border:1px dashed var(--mfs-border); border-radius:14px; background:var(--mfs-bg); }
.mfs-current-avatar { width:88px; height:88px; border-radius:22px; object-fit:cover; background:var(--mfs-soft); }
.mfs-photo-upload p { margin:0 0 8px; font-size:13px; color:var(--mfs-muted); }
.mfs-image-preview { display:block; width:100%; height:140px; border:1px solid var(--mfs-border); border-radius:12px; object-fit:cover; margin-bottom:12px; background:var(--mfs-bg); }
.mfs-upload-card { border:1px dashed var(--mfs-border); padding:16px; border-radius:14px; background:var(--mfs-bg); }
.mfs-upload-card h3 { margin:0 0 12px; }
.mfs-check-row { display:flex; align-items:flex-start; gap:12px; min-height:44px; font-weight:400 !important; margin:0; padding:10px 0; }
.mfs-check-row input { margin-top:2px; }
.mfs-check-row strong { display:block; font-weight:600; }
.mfs-check-row small { display:block; color:var(--mfs-muted); margin-top:3px; line-height:1.5; font-size:13px; }
.mfs-privacy-row { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(180px,1fr); gap:18px; padding:20px 0; border-bottom:1px solid var(--mfs-border); }
.mfs-privacy-row:first-of-type { padding-top:0; }
.mfs-privacy-row:last-of-type { border-bottom:0; }
.mfs-privacy-row label { display:block; margin:0 0 7px; }
.mfs-privacy-row .help-text { margin-top:7px; }
.mfs-preset-row { display:flex; gap:10px; align-items:flex-end; }
.mfs-preset-row .form-row { flex:1; }
.mfs-colors { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
.mfs-color-field { border:1px solid var(--mfs-border); border-radius:12px; padding:10px; display:flex; flex-direction:column; gap:7px; }
.mfs-color-field label { font-size:12px; }
.mfs-color-field input[type=color] { width:100%; height:40px; border:0; padding:0; background:none; cursor:pointer; }
.mfs-color-field input[type=color]::-webkit-color-swatch-wrapper { padding:0; }
.mfs-color-field input[type=color]::-webkit-color-swatch { border:0; border-radius:7px; }
.mfs-color-value { font-size:10px; color:var(--mfs-muted); text-transform:uppercase; }
.mfs-preview-label { display:flex; justify-content:space-between; gap:10px; margin-bottom:10px; color:var(--mfs-muted); font-size:12px; }
.mfs-profile-preview { --preview-bg:#120f1d; --preview-card:#1e1830; --preview-text:#f3eefe; --preview-link:#d8a8ff; --preview-header:#6d28d9; --preview-font:Verdana; border:1px solid var(--mfs-border); padding:22px; border-radius:16px; color:var(--preview-text); background-color:var(--preview-bg); background-size:cover; background-position:center; font-family:var(--preview-font),sans-serif; }
.mfs-preview-person { display:flex; align-items:center; gap:14px; margin-bottom:20px; }
.mfs-preview-person img { width:56px; height:56px; border-radius:16px; object-fit:cover; }
.mfs-preview-person h3 { font-size:20px; color:var(--preview-text); margin:0 0 3px; }
.mfs-preview-person p { font-size:12px; margin:0; color:var(--preview-text); opacity:.8; }
.mfs-preview-card { border:1px solid #ffffff30; border-radius:12px; overflow:hidden; background:var(--preview-card); color:var(--preview-text); }
.mfs-preview-card h4 { margin:0; padding:10px 14px; background:var(--preview-header); color:#fff; font-size:14px; }
.mfs-preview-card>div { padding:14px; }
.mfs-preview-card p { font-size:13px; margin-bottom:10px; }
.mfs-preview-card a { font-size:13px; color:var(--preview-link); }
.mfs-advanced { border:1px solid var(--mfs-border); border-radius:12px; margin-top:18px; }
.mfs-advanced>summary { min-height:48px; padding:13px 16px; cursor:pointer; font-size:14px; font-weight:650; }
.mfs-advanced>div { border-top:1px solid var(--mfs-border); padding:18px; }
.mfs-savebar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 20px; margin-top:18px; position:sticky; bottom:16px; z-index:30; border:1px solid var(--mfs-border); border-radius:15px; box-shadow:0 8px 28px #21133214; background:var(--mfs-surface); }
.mfs-save-status { font-size:13px; color:var(--mfs-muted); }
.mfs-save-status.is-dirty { color:var(--mfs-primary); font-weight:650; }
.mfs-savebar .mfs-actions { flex-shrink:0; }
.mfs-code-input { font-family:Consolas,monospace !important; font-size:13px !important; }
/* Profiles: personalization stays inside the profile, not the site chrome. */
.mfs-profile-tools { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:20px; }
.mfs-profile-jumps { display:flex; gap:6px; flex-wrap:wrap; }
.mfs-profile-jumps a { font-size:13px; font-weight:600; min-height:44px; padding:11px 13px; text-decoration:none; border-radius:10px; background:var(--mfs-surface); border:1px solid var(--mfs-border); }
.mfs-site .profile-theme-scope { border-radius:22px; overflow:hidden; padding:24px; }
.mfs-site .profile-top-header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:24px; }
.mfs-site .profile-display-name { font-size:clamp(26px,4vw,36px); }
.mfs-site .profile-layout { display:grid; grid-template-columns:minmax(0,300px) minmax(0,1fr); gap:22px; align-items:start; }
.mfs-site .profile-left-column,.mfs-site .profile-right-column { display:grid; gap:20px; min-width:0; }
.mfs-site .profile-layout .myspace-card { margin-bottom:0; }
.mfs-site .profile-network-box { max-width:310px; padding:15px; border-radius:14px; font-size:13px; }
.mfs-site .profile-main-photo,.mfs-site .profile-main-avatar { width:100%; max-width:220px; height:auto; aspect-ratio:1; border-radius:18px; object-fit:cover; margin:auto; }
.mfs-site .profile-main-avatar img { width:100%; height:100%; object-fit:contain; }
.mfs-site .profile-photo-wrap { margin-bottom:18px; }
.mfs-site .profile-basic-details { display:grid; gap:10px; font-size:14px; }
.mfs-site .profile-basic-details>div { overflow-wrap:anywhere; }
.mfs-site .profile-basic-details strong { font-weight:650; }
.mfs-site .contact-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.mfs-site .contact-actions>form { margin:0; }
.mfs-site .friend-gear-menu { min-width:180px; right:0; z-index:40; border-radius:12px; border-color:var(--mfs-border); }
.mfs-site .gear-button { min-width:44px; min-height:44px; border-radius:10px; }
.mfs-site .blurb-section { margin-bottom:22px; }
.mfs-site .blurb-section h3 { margin:0 0 10px; }
.mfs-site .blurb-section p { white-space:pre-wrap; line-height:1.65; }
.mfs-site .top8-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.mfs-site .top8-card { min-width:0; padding:10px; border-radius:14px; }
.mfs-site .top8-avatar,.mfs-site .top8-avatar-wrap { width:100%; height:auto; aspect-ratio:1; object-fit:cover; border-radius:12px; }
.mfs-site .top8-avatar-wrap>img { width:100%; height:100%; }
.mfs-site .top8-name { display:block; font-size:12px; overflow-wrap:anywhere; margin-top:7px; }
.mfs-site .top8-position-badge { font-size:11px; border-radius:8px; margin-bottom:6px; }
.mfs-site .profile-comment-card { padding:16px; border-radius:14px; margin-bottom:14px; min-width:0; }
.mfs-site .profile-comment-header { display:flex; justify-content:space-between; flex-wrap:wrap; gap:5px 12px; margin-bottom:12px; font-size:14px; }
.mfs-site .profile-comment-date,.mfs-site .thread-message-date { font-size:11px; }
.mfs-site .profile-comment-body { white-space:pre-wrap; line-height:1.6; }
.mfs-site .profile-message-thread { max-height:340px; overflow:auto; overscroll-behavior:contain; }
.mfs-site :is(.comment-target,.top8-target,#top8,#profileAbout,#profileComments) { scroll-margin-top:18px; }
/* Friends, Top 8, requests */
.mfs-site .friends-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.mfs-site .friend-card { margin:0; }
.mfs-site .friend-card .card-header { padding:18px 20px; }
.mfs-site .friend-card-link { color:var(--mfs-ink); text-decoration:none; }
.mfs-site .friend-card-photo-wrap { margin:0 auto 12px; }
.mfs-site .friend-card-photo,.mfs-site .friend-card-photo-wrap-inner { width:80px; height:80px; object-fit:cover; border-radius:20px; margin:auto; }
.mfs-site .friend-card-name { text-align:center; margin-bottom:14px; font-size:14px; color:var(--mfs-muted); }
.mfs-friend-actions { display:flex; gap:8px; margin-bottom:16px; }
.mfs-friend-actions a { flex:1; }
.mfs-friend-more { border-top:1px solid var(--mfs-border); }
.mfs-friend-more summary { min-height:44px; display:list-item; padding:12px 0; cursor:pointer; color:var(--mfs-muted); font-size:13px; }
.mfs-friend-more .family-form { margin-bottom:14px; }
.mfs-site .family-checkbox-row { min-height:44px; display:flex; align-items:center; gap:10px; }
.mfs-site .family-dropdown-wrap { margin-bottom:10px; }
.mfs-site .friend-remove-form { padding-top:12px; border-top:1px solid var(--mfs-border); }
.mfs-top8-layout { max-width:820px; }
.mfs-top8-list { list-style:none; padding:0; margin:0 0 20px; }
.mfs-site .top8-item { display:grid; grid-template-columns:40px 56px minmax(0,1fr) auto; align-items:center; gap:14px; border:1px solid var(--mfs-border); border-radius:14px; padding:14px; margin-bottom:10px; background:var(--mfs-surface); }
.mfs-site .top8-item.top8-highlight { border-color:color-mix(in srgb,var(--mfs-primary) 45%,var(--mfs-border)); background:var(--mfs-surface); }
.mfs-site .top8-number { text-align:center; font-weight:750; font-size:14px; color:var(--mfs-muted); }
.mfs-site .top8-highlight .top8-number { color:var(--mfs-primary); }
.mfs-top8-avatar { width:56px; height:56px; object-fit:cover; border-radius:14px; }
.mfs-top8-avatar img { width:100%; height:100%; }
.mfs-top8-person strong { display:block; font-size:14px; }
.mfs-top8-person small { color:var(--mfs-muted); font-size:12px; }
.mfs-top8-buttons { display:flex; gap:6px; }
.mfs-top8-buttons button { width:44px; height:44px; min-height:44px; padding:8px; border:1px solid var(--mfs-border); border-radius:10px; background:var(--mfs-bg); color:var(--mfs-primary); font-size:20px; cursor:pointer; }
.mfs-site .top8-item.is-dragging { opacity:.45; }
.mfs-request { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:18px; padding:20px; margin-bottom:14px; background:var(--mfs-surface); border:1px solid var(--mfs-border); border-radius:16px; }
.mfs-request p { margin:0; }
.mfs-request form { margin:0; }
/* Messages: list -> conversation on phones; composer stays inside the conversation. */
.mfs-site .messages-page-layout { align-items:stretch; display:grid; grid-template-columns:330px minmax(0,1fr); gap:0; border:1px solid var(--mfs-border); border-radius:20px; background:var(--mfs-surface); overflow:hidden; height:clamp(500px,calc(100dvh - 236px),790px); }
.mfs-site .messages-sidebar { display:flex; flex-direction:column; gap:0; overflow:auto; min-height:0; border-right:1px solid var(--mfs-border); padding:18px; overscroll-behavior:contain; }
.mfs-site .messages-sidebar .mfs-tabs { flex-shrink:0; }
.mfs-site .conversation-list { display:grid; gap:6px; }
.mfs-site .conversation-item { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:10px; border:1px solid transparent; border-radius:12px; padding:12px 10px; color:var(--mfs-ink); background:transparent; text-decoration:none; }
.mfs-site .conversation-item:hover,.mfs-site .conversation-item-active { background:var(--mfs-soft); border-color:var(--mfs-border); box-shadow:none; }
.mfs-site .conversation-avatar,.mfs-site .conversation-avatar-wrap { width:44px; height:44px; border-radius:12px; object-fit:cover; }
.mfs-site .conversation-name { font-size:14px; line-height:1.35; margin-bottom:4px; }
.mfs-site .conversation-preview { font-size:12px; color:var(--mfs-muted); white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.mfs-site .conversation-date { font-size:10px; color:var(--mfs-muted); }
.mfs-site .conversation-unread { min-width:22px; height:22px; border-radius:12px; background:var(--mfs-primary); color:var(--mfs-surface); font-size:11px; }
.mfs-site .messages-main { display:flex; flex-direction:column; gap:0; min-width:0; min-height:0; }
.mfs-thread-heading { display:flex; align-items:center; gap:12px; padding:18px 22px; border-bottom:1px solid var(--mfs-border); min-height:76px; flex-shrink:0; }
.mfs-thread-heading h2 { margin:0; font-size:16px; }
.mfs-thread-heading p { font-size:12px; color:var(--mfs-muted); margin:3px 0 0; }
.mfs-thread-heading .mfs-mobile-back { display:none; }
.mfs-site .messages-main .message-thread-scroll { flex:1; min-height:0; max-height:none; overflow:auto; overscroll-behavior:contain; display:flex; flex-direction:column; align-items:flex-start; gap:12px; padding:22px; margin:0; }
.mfs-site .thread-message { flex-shrink:0; max-width:85%; padding:12px 15px; border:1px solid var(--mfs-border); border-radius:15px; background:var(--mfs-bg); margin:0; min-width:0; }
.mfs-site .thread-message-mine { align-self:flex-end; margin-left:auto; background:var(--mfs-soft); }
.mfs-site .thread-message-body { font-size:14px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
.mfs-site .messages-main .message-send-form { flex-shrink:0; border-top:1px solid var(--mfs-border); padding:16px 20px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:end; }
.mfs-site .messages-main .message-send-form label { grid-column:1/-1; font-size:12px; }
.mfs-site .messages-main .message-send-form textarea { min-height:48px; max-height:160px; height:64px; resize:vertical; }
.mfs-site .messages-main .message-send-form .help-text { grid-column:1/-1; font-size:11px; }
.mfs-message-empty { margin:auto; padding:30px; text-align:center; color:var(--mfs-muted); }
.mfs-message-empty .mfs-icon { width:40px; height:40px; color:var(--mfs-primary); margin-bottom:14px; }
/* Groups and moderation */
.mfs-site .groups-page-layout { display:grid; gap:0; }
.mfs-site .group-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.mfs-site .group-list-item { grid-template-columns:64px minmax(0,1fr); gap:14px; padding:14px; border:1px solid var(--mfs-border); border-radius:14px; background:var(--mfs-surface); text-decoration:none; }
.mfs-site .group-list-item:hover { background:var(--mfs-bg); box-shadow:none; }
.mfs-site .group-list-image { width:64px; height:64px; object-fit:cover; border-radius:14px; }
.mfs-site .group-list-name { font-size:15px; color:var(--mfs-ink); }
.mfs-site .group-list-subtext { font-size:12px; color:var(--mfs-muted); }
.mfs-site .group-hero { grid-template-columns:130px minmax(0,1fr); gap:22px; }
.mfs-site .group-hero-image { width:130px; height:130px; object-fit:cover; border-radius:18px; }
.mfs-site .group-hero-meta { gap:9px; font-size:14px; }
.mfs-site .group-action-row { display:flex; flex-wrap:wrap; gap:10px; }
.mfs-site .group-description-block { padding:0; background:transparent; border:0; font-size:14px; line-height:1.7; }
.mfs-site .group-phase3-layout { grid-template-columns:minmax(0,1fr) 320px; gap:22px; }
.mfs-site .group-feed-column,.mfs-site .group-chat-column { min-width:0; gap:0; }
.mfs-site .group-post-card { padding:18px; background:var(--mfs-surface); border:1px solid var(--mfs-border); border-radius:16px; margin-bottom:16px; }
.mfs-site .group-post-header,.mfs-site .group-comment-header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.mfs-site .group-post-user,.mfs-site .group-comment-user { min-width:0; }
.mfs-site .group-post-actions { gap:6px; }
.mfs-site .group-post-actions .themed-button { min-height:40px; padding:8px 10px; font-size:12px; }
.mfs-site .group-post-content,.mfs-site .group-comment-content,.mfs-site .group-chat-content { font-size:14px; line-height:1.65; overflow-wrap:anywhere; }
.mfs-site .group-post-image,.mfs-site .group-comment-image { max-height:580px; object-fit:contain; }
.mfs-site .group-comment-card,.mfs-site .group-reply-card { border-radius:12px; background:var(--mfs-bg); padding:12px; }
.mfs-site .group-replies-wrap { margin-left:16px; padding-left:12px; border-left:2px solid var(--mfs-border); }
.mfs-site .group-comment-form,.mfs-site .group-reply-form,.mfs-site .group-chat-form { gap:10px; }
.mfs-reply-details { margin:12px 0 0; }
.mfs-reply-details summary { cursor:pointer; min-height:44px; padding:10px 0; font-size:13px; font-weight:650; color:var(--mfs-primary); }
.mfs-reply-details[open] summary { padding-bottom:12px; }
.mfs-site .group-chat-scroll { max-height:420px; overflow:auto; overscroll-behavior:contain; }
.mfs-site .group-chat-message { background:var(--mfs-bg); border-radius:12px; }
.mfs-site .group-members-grid { grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:10px; }
.mfs-site .group-member-card { border-radius:14px; padding:14px 10px; }
.mfs-site .group-member-avatar,.mfs-site .group-member-avatar-wrap { width:60px; height:60px; border-radius:16px; }
.mfs-site .group-member-name { font-size:13px; }
.mfs-site .groups-manage-layout { gap:20px; }
.mfs-site .group-manage-row { align-items:flex-start; padding:18px; border-radius:14px; background:var(--mfs-bg); }
.mfs-site .group-manage-actions { gap:10px; }
.mfs-site .group-manage-subtext { font-size:12px; }
.mfs-site .group-role-select { min-width:140px; max-width:100%; }
.mfs-site .group-manage-user { min-width:0; }
.mfs-site .group-manage-user>div { min-width:0; }
.mfs-site .group-manage-current-image { border-radius:16px; width:144px; height:144px; }
.mfs-group-mobile-tabs { display:none; }
.mfs-management-section { scroll-margin-top:20px; }
.mfs-danger-zone { border-color:var(--mfs-danger) !important; }
/* Arcade cards */
.mfs-site .games-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.mfs-site .mfs-game-card { overflow:hidden; text-decoration:none; color:var(--mfs-ink); margin:0; display:flex; flex-direction:column; }
.mfs-site .mfs-game-card:hover { text-decoration:none; box-shadow:0 12px 36px #41237616; border-color:var(--mfs-primary); }
.mfs-game-art { position:relative; height:176px; display:flex; align-items:center; justify-content:center; overflow:hidden; background:#eee7f7; color:#7546c8; }
.mfs-game-art>.mfs-icon { width:68px; height:68px; stroke-width:1.2; position:relative; z-index:1; }
.mfs-game-art::before,.mfs-game-art::after { content:""; position:absolute; width:220px; height:220px; border:1px solid currentColor; border-radius:50%; opacity:.16; }
.mfs-game-art::after { width:160px; height:160px; }
.mfs-game-card[data-game=pocket-putt] .mfs-game-art { background:#e3efe8; color:#30644e; }
.mfs-game-card[data-game=pocket-bowl] .mfs-game-art { background:#e8e4f4; color:#56447c; }
.mfs-game-card[data-game=duck-shoot] .mfs-game-art { background:#f4ebdf; color:#916335; }
.mfs-game-card[data-game=flappy-y2k] .mfs-game-art { background:#e2eff5; color:#3e6f89; }
.mfs-game-card .card-body { display:flex; flex:1; flex-direction:column; gap:12px; padding:24px; }
.mfs-game-card h2 { font-size:22px; margin:0; }
.mfs-game-card p { font-size:14px; color:var(--mfs-muted); margin:0; }
.mfs-game-tag { font-size:11px; font-weight:700; letter-spacing:1.1px; text-transform:uppercase; color:var(--mfs-primary); }
.mfs-game-start { margin-top:auto; display:flex; align-items:center; justify-content:space-between; padding-top:16px; font-size:14px; font-weight:700; color:var(--mfs-primary); }
.mfs-site .games-play-page { display:grid; gap:20px; }
.mfs-site .games-play-page>.myspace-card { margin:0; }
.mfs-site .games-play-hero-body { display:flex; justify-content:space-between; flex-wrap:wrap; gap:14px; align-items:center; }
.mfs-site .games-play-hero-body p { margin:0; color:var(--mfs-muted); }
.mfs-site .game-play-inner { display:grid; grid-template-columns:minmax(260px,420px) minmax(0,1fr); gap:24px; align-items:start; }
.mfs-site .game-left,.mfs-site .game-right { min-width:0; }
.mfs-site .game-right { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.mfs-site .canvas-shell { width:100%; max-width:420px; margin:auto; border-radius:16px; overflow:hidden; position:relative; }
.mfs-site #gameCanvas { width:100%; height:auto; display:block; touch-action:none; }
.mfs-site .score-strip { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.mfs-site .score-chip { font-size:12px; padding:8px 10px; border-radius:9px; background:var(--mfs-soft); border:1px solid var(--mfs-border); }
.mfs-site .leaderboard-section { border:1px solid var(--mfs-border); border-radius:14px; padding:16px; background:var(--mfs-bg); }
.mfs-site .leaderboard-section h3 { font-size:15px; margin:0 0 6px; }
.mfs-site .leaderboard-subtitle,.mfs-site .leaderboard-empty { color:var(--mfs-muted); font-size:12px; }
.mfs-site .leaderboard-row { grid-template-columns:24px minmax(0,1fr) auto; }
.mfs-site .instructions-panel { margin-top:12px; font-size:13px; }
.mfs-site .bowling-site-intro h1 { font-size:26px; }
.mfs-site .bowling-site-intro h2,.mfs-site .bowling-site-play>.card-header h2 { font-size:18px; margin:0; }
.mfs-site .bowling-site-play>.card-body { padding:14px; }
.mfs-site .pocket-bowl-page { border-radius:14px; overflow:hidden; }
.mfs-site .pocket-bowl-page .shell { max-width:100%; }
.mfs-site .pocket-bowl-page .stage { height:clamp(400px,calc(100dvh - 240px),740px); }
.mfs-site .pocket-bowl-page .stage:fullscreen { width:100vw; height:100dvh; max-height:none; border-radius:0; }
.mfs-site .pocket-bowl-page h1 { color:inherit; }
/* Admin, generic tables and non-game form pages. */
.mfs-table-wrap { overflow-x:auto; max-width:100%; border:1px solid var(--mfs-border); border-radius:16px; background:var(--mfs-surface); margin:20px 0; overscroll-behavior:contain; }
.mfs-table-wrap:focus { outline-offset:2px; }
.mfs-site table:not(.pocket-bowl-page table) { border-collapse:collapse; width:100%; font-size:14px; border:0; }
.mfs-site table:not(.pocket-bowl-page table) th { text-align:left; background:var(--mfs-bg); color:var(--mfs-muted); font-size:12px; font-weight:650; padding:14px 16px; border:0; border-bottom:1px solid var(--mfs-border); }
.mfs-site table:not(.pocket-bowl-page table) td { padding:16px; border:0; border-bottom:1px solid var(--mfs-border); vertical-align:top; overflow-wrap:anywhere; }
.mfs-site table:not(.pocket-bowl-page table) td form { margin:4px 5px 4px 0; }
.mfs-site table:not(.pocket-bowl-page table) td button { min-height:44px; }
.mfs-admin-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.mfs-admin-link { display:block; padding:24px; color:var(--mfs-ink) !important; text-decoration:none; }
.mfs-admin-link>.mfs-icon { color:var(--mfs-primary); width:30px; height:30px; margin-bottom:16px; }
.mfs-admin-link h2 { margin:0 0 8px; }
.mfs-admin-link p { margin:0; color:var(--mfs-muted); font-size:14px; }
.mfs-admin-link:hover { text-decoration:none !important; border-color:var(--mfs-primary); }
.mfs-site .admin-success-message,.mfs-site .admin-error-message { padding:15px 18px; border-radius:14px; }
.mfs-site .admin-user-card { border-radius:16px; background:var(--mfs-surface); padding:20px; }
.mfs-site .admin-user-actions { gap:10px; }
/* Notifications: one scrollable list, visible title/close, no clipped buttons. */
.mfs-site .modal-overlay { position:fixed; inset:0; z-index:999; background:#17102180; backdrop-filter:blur(3px); display:none; }
.mfs-site .notifications-modal { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); width:min(560px,calc(100% - 32px)); height:auto; max-height:calc(100dvh - 48px); display:none; flex-direction:column; border:1px solid var(--mfs-border); border-radius:22px; background:var(--mfs-surface); color:var(--mfs-ink); box-shadow:0 24px 80px #17102140; z-index:1000; overflow:hidden; }
.mfs-site .notifications-modal-header { flex-shrink:0; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 22px 12px; border:0; background:var(--mfs-surface); }
.mfs-site .notifications-modal-header h2 { font-size:23px; margin:0; }
.mfs-site .close-button { display:flex; align-items:center; justify-content:center; width:44px; height:44px; flex-shrink:0; border:1px solid var(--mfs-border); border-radius:11px; background:var(--mfs-surface); color:var(--mfs-ink); cursor:pointer; }
.mfs-modal-intro { flex-shrink:0; padding:0 22px 14px; margin:0 !important; font-size:13px; color:var(--mfs-muted); border-bottom:1px solid var(--mfs-border); }
.mfs-site .notifications-modal-body { flex:1; min-height:0; padding:16px; overflow:auto; overscroll-behavior:contain; }
.mfs-site .notification-card { padding:16px; margin-bottom:10px; border:1px solid var(--mfs-border); border-radius:14px; background:var(--mfs-surface); color:var(--mfs-ink); }
.mfs-site .notification-unseen { background:#fff9e8; border-color:#e9d698; color:#3f3219; }
.mfs-site.theme-dark .notification-unseen { background:#393022; border-color:#766339; color:#fff0d0; }
.mfs-site .notification-title { font-size:14px; font-weight:600; }
.mfs-site .notification-date { font-size:11px; margin-top:6px; }
.mfs-site .notification-footer { display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-top:12px; }
.mfs-site .notification-actions { display:flex; gap:6px; flex-wrap:wrap; }
.mfs-site .notification-link-wrap a { display:inline-block; padding:6px 0; min-height:32px; font-size:13px; }
body.mfs-overlay-open { overflow:hidden; }
.mfs-site .link-preview-card { max-width:100%; border-radius:12px; overflow:hidden; }
.mfs-site .link-preview-generic { grid-template-columns:90px minmax(0,1fr); }
.mfs-site .link-preview-thumb-wrap { width:90px; height:100%; min-height:90px; }
.mfs-site .link-preview-title { font-size:14px; }
.mfs-site .link-preview-description { font-size:12px; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
/* Responsive choreography */
@media (max-width:1180px) { .mfs-header-inner { gap:16px; } .mfs-header-inner .mfs-brand img { width:204px; } .mfs-account-name { display:none; } .mfs-site .game-right { grid-template-columns:1fr; } }
@media (max-width:960px) {
 body.mfs-site { --mfs-header:72px; --mfs-bottom:calc(66px + env(safe-area-inset-bottom,0px)); padding-bottom:var(--mfs-bottom); }
 .mfs-header-inner { min-height:72px; padding:14px 20px; }
 .mfs-desktop-nav,.mfs-account-menu { display:none; }
 .mfs-site .mfs-menu-toggle { display:inline-flex; }
 .mfs-header-inner .mfs-brand img { width:214px; }
 .mfs-bottom-nav { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); position:fixed; bottom:0; left:0; right:0; z-index:90; background:var(--mfs-surface); border-top:1px solid var(--mfs-border); padding:6px max(6px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left)); }
 .mfs-bottom-nav a,.mfs-bottom-nav button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-width:0; min-height:54px; background:transparent; border:0; border-radius:11px; padding:6px 3px; color:var(--mfs-muted); font-size:10px; font-weight:650; text-decoration:none; cursor:pointer; }
 .mfs-bottom-nav [aria-current=page] { color:var(--mfs-primary); background:var(--mfs-soft); }
 .mfs-bottom-nav .mfs-icon { width:22px; height:22px; }
 .mfs-site .page-shell { padding:26px 20px 28px; }
 .mfs-site-footer { margin:0 20px; padding:16px 0 22px; }
 .mfs-site .friends-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .mfs-site .profile-layout { grid-template-columns:250px minmax(0,1fr); gap:16px; }
 .mfs-site .top8-grid { gap:8px; }
 .mfs-settings-layout { grid-template-columns:185px minmax(0,1fr); gap:18px; }
 .mfs-colors { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .mfs-site .group-phase3-layout { grid-template-columns:minmax(0,1fr) 280px; gap:16px; }
 .mfs-site .messages-page-layout { grid-template-columns:285px minmax(0,1fr); }
 .mfs-savebar { bottom:calc(var(--mfs-bottom) + 10px); }
 .mfs-site .game-play-inner { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
 .mfs-keyboard-open .mfs-bottom-nav { display:none; }
 .mfs-keyboard-open .mfs-savebar { position:static; }
}
@media (max-width:740px) {
 .mfs-settings-layout { display:block; }
 .mfs-settings-sidebar { position:static; }
 .mfs-settings-nav { display:flex; gap:5px; overflow:auto; margin-bottom:18px; padding-bottom:6px; scrollbar-width:thin; }
 .mfs-settings-nav a { white-space:nowrap; flex-shrink:0; min-height:44px; padding:10px 12px; font-size:13px; }
 .mfs-settings-sidebar.is-enhanced .mfs-settings-nav { display:none; }
 .mfs-settings-sidebar.is-enhanced .mfs-settings-mobile-nav { display:block; margin-bottom:18px; }
 .mfs-settings-mobile-nav label { display:block; margin-bottom:6px; font-size:12px; color:var(--mfs-muted); }
 .mfs-settings-security { display:none; }
 .mfs-site .profile-layout { display:flex; flex-direction:column; }
 .mfs-site .profile-left-column,.mfs-site .profile-right-column { display:contents; }
 .mfs-site .profile-layout .myspace-card { width:100%; }
 .mfs-profile-identity { order:1; } .mfs-profile-contact { order:2; } .mfs-profile-blurbs { order:3; } .mfs-profile-song { order:4; } .mfs-profile-top8 { order:5; } .mfs-profile-family { order:6; } .mfs-profile-messages { order:7; } .mfs-profile-comment-form { order:8; } .mfs-profile-comments { order:9; }
 .mfs-site .profile-top-header { flex-direction:column; }
 .mfs-site .profile-network-box { max-width:none; width:100%; }
 .mfs-site .profile-main-photo,.mfs-site .profile-main-avatar { max-width:144px; border-radius:24px; }
 .mfs-site .profile-basic-details { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; font-size:13px; }
 .mfs-site .group-phase3-layout { display:block; }
 .mfs-site .group-chat-column { display:block; }
 .mfs-site .group-list { grid-template-columns:1fr; }
 .mfs-group-mobile-tabs.is-enhanced { display:flex; }
 .mfs-site .group-members-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .mfs-site .group-manage-row { flex-direction:column; align-items:stretch; }
 .mfs-site .group-manage-actions { width:100%; }
 .mfs-site .group-role-form { width:100%; }
 .mfs-site .group-role-select { flex:1; }
 .mfs-site .game-play-inner { grid-template-columns:1fr; }
 .mfs-site .game-right { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .mfs-site .canvas-shell { max-width:min(100%,calc((100dvh - 240px) * .65625)); }
 .mfs-site .games-grid { gap:16px; }
 .mfs-site .messages-page-layout { display:block; height:auto; }
 .mfs-site .messages-sidebar { border-right:0; max-height:none; }
 .mfs-site .messages-main { display:none; }
 .mfs-site .messages-page-layout.has-conversation { display:flex; height:var(--mfs-thread-height,calc(var(--mfs-visible-height) - 290px - var(--mfs-bottom))); min-height:220px; }
 .mfs-site .has-conversation .messages-sidebar { display:none; }
 .mfs-site .has-conversation .messages-main { display:flex; width:100%; }
 .mfs-thread-heading { min-height:66px; padding:12px 14px; }
 .mfs-thread-heading .mfs-mobile-back { display:inline-flex; }
 .mfs-site .messages-main .message-thread-scroll { padding:16px; }
 .mfs-site .messages-main .message-send-form { padding:12px; }
 .mfs-site .messages-main .message-send-form textarea { height:48px; }
 .mfs-messages-page.mfs-keyboard-open .mfs-page-heading { display:none; }
 .mfs-messages-page.mfs-keyboard-open .messages-page-layout.has-conversation { min-height:160px; height:var(--mfs-thread-height,calc(var(--mfs-visible-height) - 96px)); }
 .mfs-site .thread-message { max-width:90%; }
 .mfs-site .group-replies-wrap { margin-left:6px; padding-left:8px; }
}
@media (max-width:540px) {
 .mfs-header-inner { padding:13px 16px; gap:10px; }
 .mfs-header-inner .mfs-brand img { width:190px; }
 .mfs-header-actions { gap:9px; }
 .mfs-site .page-shell { padding:24px 16px; }
 .mfs-page-heading { flex-direction:column; align-items:stretch; gap:14px; margin-bottom:22px; }
 .mfs-page-heading h1 { font-size:28px; }
 .mfs-heading-actions { padding-top:0; }
 .mfs-page-heading p { font-size:14px; }
 .mfs-site .card-body { padding:18px; }
 .mfs-site .card-header { padding:18px; }
 .mfs-settings-panel .card-header { padding-bottom:0; }
 .mfs-site .myspace-card { border-radius:16px; }
 .mfs-site .card-header { border-radius:16px 16px 0 0; }
 .mfs-field-grid { grid-template-columns:1fr; gap:20px; }
 .mfs-privacy-row { grid-template-columns:1fr; gap:12px; }
 .mfs-privacy-row>div:last-child { border-left:2px solid var(--mfs-border); padding-left:12px; }
 .mfs-preset-row { flex-wrap:wrap; }
 .mfs-preset-row .form-row { flex-basis:100%; }
 .mfs-colors { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .mfs-photo-upload { grid-template-columns:64px minmax(0,1fr); padding:12px; gap:12px; }
 .mfs-current-avatar { width:64px; height:64px; border-radius:18px; }
 .mfs-photo-upload input[type=file] { grid-column:1/-1; }
 .mfs-savebar { padding:12px; gap:8px; margin-top:12px; border-radius:13px; }
 .mfs-save-status { font-size:11px; max-width:100px; }
 .mfs-savebar .themed-button { padding:10px 12px; font-size:13px; }
 .mfs-savebar .mfs-actions { gap:6px; }
 .mfs-site .profile-theme-scope { padding:14px; border-radius:18px; }
 .mfs-site .profile-layout { gap:14px; }
 .mfs-site .profile-layout .card-body { padding:14px; }
 .mfs-site .profile-basic-details { grid-template-columns:1fr; }
 .mfs-site .profile-basic-details strong { display:inline; }
 .mfs-site .top8-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
 .mfs-site .top8-card { padding:6px; border-radius:10px; }
 .mfs-site .top8-name { font-size:10px; }
 .mfs-site .friends-grid { grid-template-columns:1fr; gap:16px; }
 .mfs-site .friend-card .card-body { display:grid; grid-template-columns:64px minmax(0,1fr); column-gap:14px; align-items:center; }
 .mfs-site .friend-card-photo-wrap { margin:0; grid-row:1/3; }
 .mfs-site .friend-card-photo,.mfs-site .friend-card-photo-wrap-inner { width:64px; height:64px; border-radius:16px; }
 .mfs-site .friend-card-name { text-align:left; margin:0 0 10px; }
 .mfs-friend-actions { margin:0; gap:6px; }
 .mfs-friend-actions a { padding:8px 10px; font-size:12px; }
 .mfs-friend-more { grid-column:1/-1; margin-top:14px; }
 .mfs-site .top8-item { grid-template-columns:25px 44px minmax(0,1fr) auto; gap:9px; padding:12px 10px; }
 .mfs-top8-avatar { width:44px; height:44px; border-radius:12px; }
 .mfs-top8-buttons { flex-direction:column; gap:4px; }
 .mfs-top8-buttons button { width:40px; height:40px; min-height:40px; }
 .mfs-request { padding:18px; }
 .mfs-site .group-hero { grid-template-columns:70px minmax(0,1fr); gap:14px; }
 .mfs-site .group-hero-image { width:70px; height:70px; border-radius:16px; }
 .mfs-site .group-hero-meta { font-size:13px; }
 .mfs-site .group-post-card { padding:14px; }
 .mfs-site .group-post-user { flex:1; }
 .mfs-site .group-post-actions { width:100%; }
 .mfs-site .group-post-avatar,.mfs-site .group-post-avatar-wrap { width:38px; height:38px; }
 .mfs-site .group-comment-avatar,.mfs-site .group-comment-avatar-wrap { width:32px; height:32px; }
 .mfs-site .group-post-actions .themed-button { min-height:44px; }
 .mfs-site .group-chat-scroll { max-height:360px; }
 .mfs-site .group-members-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .mfs-site .games-grid { grid-template-columns:1fr; }
 .mfs-game-art { height:148px; }
 .mfs-game-card .card-body { padding:20px; }
 .mfs-site .game-right { grid-template-columns:1fr; }
 .mfs-site .bowling-site-play>.card-body { padding:0; }
 .mfs-site .pocket-bowl-page .stage { height:calc(100dvh - 178px); min-height:350px; }
 .mfs-admin-grid { grid-template-columns:1fr; }
 .mfs-table-wrap.mfs-stackable-table { border:0; background:transparent; overflow:visible; }
 .mfs-stackable-table table,.mfs-stackable-table tbody,.mfs-stackable-table tr,.mfs-stackable-table td { display:block; width:100%; }
 .mfs-stackable-table thead { position:absolute; clip:rect(0,0,0,0); width:1px; height:1px; overflow:hidden; }
 .mfs-stackable-table tr { border:1px solid var(--mfs-border); border-radius:14px; margin-bottom:14px; padding:10px 16px; background:var(--mfs-surface); }
 .mfs-site .mfs-stackable-table td { padding:10px 0 !important; }
 .mfs-stackable-table td::before { content:attr(data-label); display:block; font-size:11px; font-weight:650; color:var(--mfs-muted); margin-bottom:5px; }
 .mfs-site .notifications-modal { width:calc(100% - 16px); max-height:calc(100dvh - 24px); border-radius:20px; }
 .mfs-site .notifications-modal-body { padding:12px; }
 .mfs-site .notifications-modal-header { padding:16px 16px 10px; }
 .mfs-modal-intro { padding:0 16px 12px; }
 .mfs-site .link-preview-generic { grid-template-columns:1fr; }
 .mfs-site .link-preview-thumb-wrap { width:100%; height:140px; }
 .mfs-site-footer { font-size:11px; }
}
@media (max-width:360px) { .mfs-header-inner .mfs-brand img { width:164px; } .mfs-header-inner { padding:12px; } .mfs-site .page-shell { padding-left:12px; padding-right:12px; } .mfs-savebar { flex-wrap:wrap; } .mfs-save-status { max-width:none; } .mfs-photo-upload { grid-template-columns:1fr; } }
@media (prefers-reduced-motion:reduce) { .mfs-site *, .mfs-site *::before,.mfs-site *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } .mfs-site marquee { display:block; } }

@media (max-width:740px) { .mfs-profile-visitors { order:10; } .mfs-profile-game-stats { order:11; } }
.mfs-group-info > summary { cursor:pointer; list-style:revert; display:list-item; }
.mfs-group-info > summary::marker { color:var(--mfs-primary); font-size:12px; }
.mfs-group-info:not([open]) > summary { border-bottom:0; border-radius:20px; }
.mfs-group-info > .card-body { border-top:1px solid var(--mfs-border); }
.mfs-site .group-post-card .mfs-reply-details .group-reply-form { margin-top:0; }
.mfs-site .mfs-game-card[data-game=duck-shoot-y2k] .mfs-game-art { background:#f4ebdf; color:#916335; }

/* Conversation fits below the real page heading; resize is measured by messages-experience.js. */
@media(max-width:740px) {
 .mfs-messages-page:has(.has-conversation) .page-shell { min-height:0; padding-bottom:12px; }
 .mfs-messages-page:has(.has-conversation) .mfs-site-footer { display:none; }
}
