/* Application shell owned by spm_core. Page-specific styles remain in the theme. */
.spm-mobile-menu-panel { display: none; }

@media (max-width: 900px) {
  body { padding-top: 62px; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .spm-app-header { position: fixed; top: 0; right: 0; left: 0; z-index: 95; overflow: visible; background: rgba(244,247,248,.96); backdrop-filter: blur(12px); }
  .spm-app-header-inner { display: grid; grid-template-columns: 46px minmax(0,1fr) 46px; align-items: center; justify-content: initial; width: calc(100% - 20px); min-height: 62px; gap: 8px; }
  .spm-app-logo { display: none; }
  .menu-icon { position: static; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--spm-line); border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(23,36,48,.04); }
  .menu-icon > div { display: block; }
  .menu-icon span { display: block; width: 20px; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--spm-ink); }
  .menu-icon.opened, .spm-menu-button.opened { color: var(--spm-ink); }
  .spm-mobile-brand { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; color: var(--spm-ink); text-align: center; line-height: 1.05; }
  .spm-mobile-brand strong, .spm-mobile-brand span { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .spm-mobile-brand strong { color: #3969e8; font-size: 21px; font-weight: 900; }
  .spm-mobile-brand span { margin-top: 5px; color: var(--spm-ink); font-size: 13px; font-weight: 900; }
  .spm-mobile-search { display: grid; place-items: center; justify-self: end; width: 42px; height: 42px; border: 1px solid var(--spm-line); border-radius: 12px; background: #fff; color: var(--spm-ink); box-shadow: 0 4px 14px rgba(23,36,48,.04); font-size: 18px; }
  .spm-mobile-search:hover { background: #fff; color: var(--spm-teal-dark); }
  header.spm-app-header nav.nav.spm-app-nav { display: none; visibility: hidden; height: 0; min-height: 0; max-height: 0; margin: 0; padding: 0; overflow: hidden; border: 0; opacity: 0; pointer-events: none; }
  header.spm-app-header .spm-mobile-menu-panel { position: fixed; top: 70px; right: 10px; left: 10px; z-index: 180; display: none; grid-template-columns: 1fr; width: auto; height: auto; min-height: 0; max-height: calc(100vh - 92px - env(safe-area-inset-bottom)); margin: 0; padding: 8px; gap: 6px; overflow: auto; border: 1px solid var(--spm-line); border-radius: 14px; background: #fff; box-shadow: 0 16px 38px rgba(23,36,48,.22); }
  header.spm-app-header .spm-mobile-menu-panel.open { display: grid; visibility: visible; opacity: 1; pointer-events: auto; }
  header.spm-app-header .spm-mobile-menu-panel a { display: flex; align-items: center; width: 100%; min-height: 46px; height: auto; margin: 0; padding: 0 12px; gap: 10px; border: 0; border-radius: 10px; background: #fff; color: var(--spm-ink); font-size: 15px; font-weight: 900; line-height: 1.2; text-align: left; text-decoration: none; }
  header.spm-app-header .spm-mobile-menu-panel a:hover, header.spm-app-header .spm-mobile-menu-panel a:focus { background: #edf6f5; color: var(--spm-teal-dark); }
  header.spm-app-header .spm-mobile-menu-panel i { width: 20px; color: var(--spm-teal-dark); font-size: 16px; text-align: center; }
  .spm-page-shell { padding-top: 14px; padding-bottom: 14px; }
  .spm-app-footer { display: none; }
  .spm-bottom-nav { height: calc(72px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.98); backdrop-filter: blur(12px); }
  .spm-bottom-nav a { color: #4d5d6b; font-size: 11px; font-weight: 900; }
  .spm-bottom-nav a.is-active, .spm-bottom-nav a.is-active i { color: var(--spm-teal-dark); }
  .spm-bottom-nav .spm-bottom-publish { color: var(--spm-coral); }
  .spm-bottom-nav .spm-bottom-publish i { width: 42px; height: 42px; margin-top: -22px; box-shadow: 0 6px 16px rgba(255,64,56,.28); font-size: 18px; }
  .spm-bottom-nav .spm-bottom-publish.is-active i { outline: 3px solid rgba(255,64,56,.18); color: #fff; }
  body.item #sidebar, body.search #sidebar, .spm-account-sidebar { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}

@media (max-width: 420px) {
  .spm-mobile-brand strong { font-size: 19px; }
  .spm-mobile-brand span { font-size: 12px; }
}
