/* v141 — MOBILE FIRST VISUAL RECOMPOSITION
   The desktop design stays intact. This layer is intentionally loaded last. */
@media (max-width: 760px) {
  :root{--m141-pad:16px;--m141-gap:12px}
  html,body{overflow-x:hidden!important;-webkit-text-size-adjust:100%}
  body{font-size:14px!important;line-height:1.45!important}
  .container{width:100%!important;max-width:100%!important;padding-left:var(--m141-pad)!important;padding-right:var(--m141-pad)!important}

  /* Never let legacy responsive rules create tiny desktop grids. */
  .programs-hub-page .hub-grid,
  .games-page .portal-grid.games-overview-grid,
  .portal-grid,.feature-grid,.product-grid,.review-grid,.leader-grid,.history-grid{
    grid-template-columns:1fr!important;
  }

  /* Header: premium, compact, app-like. */
  .site-header{height:58px!important;min-height:58px!important;max-height:58px!important;padding:4px 0!important}
  .site-header .header-inner{height:50px!important;min-height:50px!important;max-height:50px!important}
  .site-header .brand{height:44px!important;min-height:44px!important;gap:8px!important;max-width:calc(100% - 54px)!important}
  .site-header .brand-mark{width:31px!important;height:36px!important;flex:0 0 31px!important}
  .site-header .brand-mark img{width:31px!important;height:36px!important}
  .site-header .brand-copy strong{font-size:17px!important;line-height:1!important;letter-spacing:.01em!important}
  .site-header .brand-copy span{display:none!important}
  .site-header .menu-toggle{top:7px!important;right:10px!important;width:40px!important;height:40px!important;min-width:40px!important;border-radius:12px!important;font-size:21px!important}
  .site-header .main-nav{top:55px!important;right:9px!important;width:min(228px,calc(100vw - 18px))!important;max-height:calc(100dvh - 66px)!important}
  .site-header .main-nav a{min-height:39px!important;padding:9px 11px!important;font-size:12px!important}
  .global-back-btn{top:66px!important;left:10px!important;min-height:34px!important;padding:7px 11px!important;font-size:10px!important}
  .global-quick-dock,.apply-quick-access,.admin-quick-access{display:none!important}

  /* Universal type scale. No billboard headings on a 390px screen. */
  .section,.section.compact,.academy-section,.retreat-history{padding:30px 0!important}
  .section-heading h2,.ecosystem-heading h2,.author-page-heading h2{font-size:28px!important;line-height:1.04!important;letter-spacing:-.025em!important;margin-bottom:10px!important}
  .section-heading p,.ecosystem-heading p{font-size:13px!important;line-height:1.48!important}
  .kicker{font-size:8px!important;letter-spacing:.16em!important;margin-bottom:6px!important}
  .btn-3d,.btn-glass,.portal-primary,.portal-ghost,.portal-mini-btn,.table-btn,.payment-card-link,.registration-submit{
    min-height:40px!important;padding:9px 12px!important;font-size:10.5px!important;line-height:1.15!important;border-radius:12px!important
  }

  /* HOME — calm vertical story, small portrait. */
  body:not(.application-page) .hero{min-height:0!important;height:auto!important;padding:76px 0 22px!important}
  body:not(.application-page) .hero-grid{display:flex!important;flex-direction:column!important;gap:14px!important;min-height:0!important;height:auto!important}
  .hero-copy{text-align:left!important}
  .hero-brandline{width:min(180px,56vw)!important;margin:0 0 10px!important}
  .hero-win-wordmark{width:100%!important;max-width:180px!important}
  body:not(.application-page) .hero h1{font-size:34px!important;line-height:1.01!important;letter-spacing:-.03em!important;margin:0 0 12px!important;max-width:100%!important;text-wrap:balance!important}
  body:not(.application-page) .hero h1 br{display:none!important}
  body:not(.application-page) .hero-lead{font-size:13px!important;line-height:1.5!important;margin:0!important;max-width:100%!important}
  .hero-actions{display:flex!important;gap:8px!important;margin-top:14px!important}
  .hero-actions>*{flex:1 1 0!important;width:auto!important;min-width:0!important}
  .hero-note{margin-top:10px!important;font-size:8px!important;line-height:1.3!important;letter-spacing:.05em!important}
  .hero-stage{height:176px!important;min-height:176px!important;max-height:176px!important;display:grid!important;place-items:center!important;overflow:visible!important}
  .ring{width:154px!important;height:154px!important}
  .portrait-stack{width:108px!important;max-width:108px!important}
  .portrait-stack .portrait-card{width:108px!important;padding:4px!important;border-radius:17px!important}
  .portrait-card img{border-radius:13px!important;aspect-ratio:2/2.82!important}
  .floating-shield{width:35px!important;height:40px!important;left:-12px!important;bottom:5px!important;border-radius:10px!important;padding:4px!important}
  .floating-pill{top:8px!important;right:-28px!important;padding:4px 6px!important;font-size:6px!important;border-radius:7px!important}
  .portrait-name{margin-top:5px!important;font-size:14px!important;line-height:1!important}

  /* HOME ecosystem: a real mobile diagram — central spine + compact connected nodes. */
  .home-ecosystem.ecosystem-map-section{padding:28px 0!important}
  .home-ecosystem .ecosystem-heading{margin-bottom:10px!important;text-align:left!important}
  .home-ecosystem .ecosystem-heading h2.ecosystem-title{font-size:26px!important;line-height:1.03!important;max-width:100%!important}
  .home-ecosystem .ecosystem-map-shell{padding:12px 8px 10px!important;border-radius:20px!important;overflow:hidden!important}
  .home-ecosystem .ecosystem-map{position:relative!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px 24px!important;width:100%!important;min-height:0!important;height:auto!important;padding:60px 4px 6px!important;background:none!important;overflow:visible!important}
  .home-ecosystem .ecosystem-map::before{content:"";position:absolute;left:50%;top:51px;bottom:8px;width:1px;background:linear-gradient(to bottom,rgba(239,207,123,.72),rgba(239,207,123,.18));transform:translateX(-50%)}
  .home-ecosystem .ecosystem-lines{display:none!important}
  .home-ecosystem .ecosystem-core{position:absolute!important;left:50%!important;top:4px!important;transform:translateX(-50%)!important;width:156px!important;min-width:156px!important;min-height:40px!important;padding:8px 12px!important;border-radius:14px!important;margin:0!important;z-index:5!important}
  .home-ecosystem .ecosystem-core::before{inset:5px!important;border-radius:10px!important}
  .home-ecosystem .ecosystem-core span{font-size:16px!important}
  .home-ecosystem .eco-node{position:relative!important;left:auto!important;top:auto!important;transform:none!important;width:100%!important;min-width:0!important;min-height:33px!important;padding:6px 7px!important;border-radius:10px!important;font-size:7.6px!important;line-height:1.08!important;letter-spacing:.02em!important;background:linear-gradient(145deg,rgba(10,71,57,.88),rgba(5,45,37,.96))!important;color:#f2d487!important;border:1px solid rgba(240,210,132,.48)!important;box-shadow:inset 0 1px rgba(255,255,255,.06),0 5px 12px rgba(0,17,13,.18)!important;text-shadow:none!important;overflow:visible!important}
  .home-ecosystem .eco-node::after{display:none!important}
  .home-ecosystem .eco-node::before{content:"";position:absolute;top:50%;width:12px;height:1px;background:rgba(239,207,123,.55)}
  .home-ecosystem .eco-node:nth-of-type(even)::before{right:-13px}
  .home-ecosystem .eco-node:nth-of-type(odd)::before{left:-13px}

  /* Philosophy: no oversized shield. */
  .statement{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;text-align:left!important}
  .statement>div:last-child{order:1!important;text-align:left!important}
  .statement .quote{font-size:24px!important;line-height:1.04!important;margin:6px 0 12px!important}
  .statement .shield-stage{order:2!important;height:100px!important;min-height:100px!important}
  .statement .shield-stage::before{width:90px!important;height:90px!important;box-shadow:0 0 0 12px rgba(237,210,136,.012)!important}
  .statement .shield-stage img{width:76px!important;max-width:76px!important}
  .statement .shield-stage::after{width:76px!important;height:84px!important}

  /* Generic page hero. */
  .page-hero{min-height:0!important;padding:82px 0 26px!important}
  .page-hero-grid{display:grid!important;grid-template-columns:minmax(0,1fr) 48px!important;gap:8px!important;align-items:center!important}
  .page-hero-grid>div:first-child{text-align:left!important}
  .page-hero-grid>div:first-child>*{margin-left:0!important;margin-right:0!important}
  .page-hero h1{font-size:36px!important;line-height:.98!important;letter-spacing:-.03em!important;margin:0 0 8px!important;max-width:100%!important}
  .page-hero p{font-size:12px!important;line-height:1.45!important}
  .breadcrumbs{font-size:7px!important;margin-bottom:9px!important}
  .page-mark-wrap{width:48px!important;margin:0!important;position:static!important}

  /* WINsurfing: text first, brand graphic is only a small signature. */
  .two-col,.win-core{grid-template-columns:1fr!important;gap:14px!important}
  .win-core .win-core-title{font-size:25px!important;line-height:1.05!important;margin-bottom:10px!important}
  .win-core .win-intro,.win-core .text-block p,.win-core .gold-list li{font-size:12.5px!important;line-height:1.48!important}
  .win-core .gold-list{gap:6px!important;margin-top:12px!important}
  body .win-flow-visual{min-height:138px!important;height:138px!important;gap:2px!important;padding:2px 0!important;overflow:hidden!important}
  body .win-flow-visual .win-flow-shield{width:82px!important;max-width:82px!important;animation:none!important;filter:drop-shadow(0 10px 18px rgba(0,0,0,.2))!important}
  body .win-flow-visual .win-flow-wordmark{width:145px!important;max-width:145px!important;margin-top:-5px!important;animation:none!important}

  /* 17 qualities — same visual language, much less visual mass. */
  .section-qualities{padding-top:24px!important}
  .section-qualities .qualities-shell{gap:12px!important}
  .section-qualities .qualities-top{display:block!important}
  .section-qualities .qualities-heading h2{font-size:28px!important;line-height:1.03!important;margin-bottom:8px!important;max-width:100%!important}
  .section-qualities .qualities-heading p{font-size:12.5px!important;line-height:1.46!important;margin-bottom:12px!important}
  .section-qualities .quality-card-featured{width:100%!important;min-height:44px!important;height:44px!important;padding:7px 12px!important;margin:0!important;font-size:16px!important;border-radius:12px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.95),inset 0 -6px 9px rgba(125,81,14,.14),0 3px 0 #7d5414,0 8px 14px rgba(0,18,14,.16)!important}
  .section-qualities .qualities-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .section-qualities .quality-card{min-height:44px!important;height:44px!important;padding:6px 7px!important;border-radius:12px!important;font-size:13px!important;line-height:1.03!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.95),inset 0 -6px 9px rgba(125,81,14,.14),0 3px 0 #7d5414,0 8px 14px rgba(0,18,14,.16)!important}

  /* Programs: one readable mobile list, never four microscopic desktop columns. */
  .programs-hub-page .hub-section{padding:72px 0 16px!important}
  .programs-hub-page .hub-wrap{padding:14px!important;border-radius:18px!important}
  .programs-hub-page .hub-heading{margin-bottom:12px!important}
  .programs-hub-page .hub-heading h1{font-size:30px!important;line-height:1!important;margin:7px 0 8px!important}
  .programs-hub-page .hub-heading p{font-size:12px!important;line-height:1.45!important}
  .programs-hub-page .hub-grid{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  .programs-hub-page .hub-card{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"tag action" "title action" "copy copy"!important;gap:4px 10px!important;min-height:0!important;padding:12px!important;border-radius:15px!important}
  .programs-hub-page .hub-card .tag{grid-area:tag!important;font-size:7px!important;min-height:24px!important;padding:5px 8px!important}
  .programs-hub-page .hub-card h3{grid-area:title!important;font-size:19px!important;line-height:1.05!important;margin:0!important}
  .programs-hub-page .hub-card p{grid-area:copy!important;font-size:10.5px!important;line-height:1.38!important;margin-top:3px!important}
  .programs-hub-page .hub-card .hub-actions{grid-area:action!important;align-self:center!important;margin:0!important}
  .programs-hub-page .hub-card .hub-actions a{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;padding:0!important;border-radius:12px!important;font-size:0!important;display:grid!important;place-items:center!important}
  .programs-hub-page .hub-card .hub-actions a::after{content:"→";font-size:18px!important;font-weight:800!important}
  .programs-hub-page .hub-footer{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;margin-top:10px!important}
  .programs-hub-page .hub-footer p{font-size:10px!important}
  .programs-hub-page .hub-footer .contact-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;width:100%!important}

  /* About page: concise mobile biography, recognition without billboard typography. */
  .about-page-redraw .about-intro .about-name{font-size:32px!important;line-height:1!important}
  .about-page-redraw .about-intro .about-tags{display:none!important}
  .about-page-redraw .about-intro-extra{gap:7px!important;margin-top:10px!important}
  .about-page-redraw .about-intro-extra p{font-size:12px!important;line-height:1.45!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
  .about-page-redraw .about-list{grid-template-columns:1fr!important;gap:7px!important}
  .about-page-redraw .about-item{min-height:0!important;height:auto!important;padding:10px 12px!important;border-radius:12px!important}
  .about-page-redraw .about-item p{font-size:11.5px!important;line-height:1.4!important}
  .about-page-redraw .recognition-card{grid-template-columns:1fr!important;gap:12px!important;padding:0!important}
  .about-page-redraw .recognition-copy h2{font-size:28px!important;line-height:1.03!important;margin:6px 0 8px!important}
  .about-page-redraw .recognition-copy p{font-size:12px!important;line-height:1.45!important}
  .about-page-redraw .recognition-hero{width:150px!important;height:128px!important;margin:0 auto!important;border-radius:16px!important}
  .about-page-redraw .recognition-gallery{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin-top:10px!important}
  .about-page-redraw .recognition-gallery figure:last-child{grid-column:auto!important}
  .about-page-redraw .recognition-gallery img,.about-page-redraw .recognition-gallery figure:last-child img{height:92px!important}
  .about-page-redraw .recognition-gallery figcaption{padding:6px!important;font-size:8.5px!important;line-height:1.2!important}

  /* Personal cabinet: one compact top bar, restrained typography. */
  body.portal-page{overflow-x:hidden!important}
  body.portal-page .portal-shell{width:100%!important;max-width:100%!important;padding:8px!important}
  body.portal-page .portal-top{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:6px!important;min-height:46px!important;padding:5px 6px!important;border-radius:14px!important;margin-bottom:8px!important}
  body.portal-page .portal-brand{gap:5px!important;min-width:0!important;flex:1 1 auto!important}
  body.portal-page .portal-brand img{width:26px!important;height:30px!important;animation:none!important}
  body.portal-page .portal-brand strong{font-size:13px!important;line-height:1!important;white-space:nowrap!important}
  body.portal-page .portal-brand>span>span{display:none!important}
  body.portal-page .portal-top>div{display:flex!important;gap:3px!important;flex-wrap:nowrap!important;margin-left:auto!important}
  body.portal-page .portal-top .portal-ghost{min-height:29px!important;height:29px!important;padding:5px 7px!important;border-radius:8px!important;font-size:7.5px!important}
  body.portal-page .portal-card{padding:13px!important;border-radius:17px!important}
  body.portal-page .portal-title{font-size:28px!important;line-height:1!important;margin:5px 0 3px!important}
  body.portal-page .portal-sub{font-size:11px!important}
  body.portal-page .portal-role{margin-top:7px!important;padding:4px 7px!important;font-size:7px!important}
  body.portal-page .portal-inbox-actions{margin-top:9px!important;gap:6px!important}
  body.portal-page .portal-action-btn{width:36px!important;height:36px!important;min-width:36px!important;border-radius:10px!important}
  body.portal-page .portal-action-icon svg{width:17px!important;height:17px!important}
  body.portal-page .portal-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:5px!important;margin:12px -2px 2px!important;padding:5px!important;border-radius:12px!important;scrollbar-width:none!important}
  body.portal-page .portal-tabs::-webkit-scrollbar{display:none!important}
  body.portal-page .portal-tab{flex:0 0 auto!important;min-height:32px!important;height:32px!important;padding:0 10px!important;border-radius:9px!important;font-size:8.5px!important;white-space:nowrap!important}
  body.portal-page .portal-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin:10px 0 2px!important}
  body.portal-page .portal-stat{padding:10px!important;border-radius:13px!important}
  body.portal-page .portal-stat span{font-size:7px!important}
  body.portal-page .portal-stat b{font-size:20px!important;margin-top:4px!important}
  body.portal-page .portal-section{margin-top:10px!important;padding:12px!important;border-radius:15px!important}
  body.portal-page .portal-section h2{font-size:21px!important}

  /* Messages: on phone it is a chat list, not a stacked desktop page. */
  body.portal-page #messagesModal.portal-overlay{position:fixed!important;inset:0!important;padding:0!important;background:#052d22!important;z-index:10000!important}
  body.portal-page #messagesModal .portal-messenger-dialog{position:fixed!important;inset:0!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#052d22!important;box-shadow:none!important;overflow:hidden!important}
  body.portal-page #messagesModal .portal-dialog-close{position:fixed!important;top:10px!important;right:10px!important;width:34px!important;height:34px!important;z-index:50!important}
  body.portal-page #messagesModal .portal-messenger-shell{display:block!important;width:100%!important;height:100dvh!important;min-height:100dvh!important}
  body.portal-page #messagesModal .portal-messenger-sidebar{display:block!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;padding:10px 10px 18px!important;border:0!important;overflow-y:auto!important;background:linear-gradient(180deg,#073b2d,#04291f)!important}
  body.portal-page #messagesModal .portal-messenger-main{display:none!important;visibility:hidden!important;height:0!important;min-height:0!important;overflow:hidden!important}
  body.portal-page #messagesModal .portal-messenger-mobile-brand{display:flex!important;align-items:center!important;gap:6px!important;min-height:38px!important;padding:0 42px 6px 1px!important;border-bottom:1px solid rgba(244,216,117,.12)!important}
  body.portal-page #messagesModal .portal-messenger-mobile-brand img:first-child{width:23px!important;height:27px!important}
  body.portal-page #messagesModal .portal-messenger-mobile-brand img:last-child{width:110px!important;height:auto!important}
  body.portal-page #messagesModal .portal-messenger-sidebar>.portal-kicker{margin-top:10px!important;font-size:7px!important}
  body.portal-page #messagesModal .portal-messenger-sidebar h2{font-size:25px!important;line-height:1!important;margin:4px 0 8px!important}
  body.portal-page #messagesModal .portal-messenger-search{min-height:38px!important;padding:9px 11px!important;border-radius:12px!important;font-size:12px!important}
  body.portal-page #messagesModal .portal-messenger-placeholder-list{gap:5px!important;margin-top:8px!important}
  body.portal-page #messagesModal .portal-messenger-contact{min-height:56px!important;padding:7px 9px!important;border-radius:12px!important}
  body.portal-page #messagesModal .portal-contact-avatar{width:38px!important;height:38px!important;min-width:38px!important;font-size:12px!important}
  body.portal-page #messagesModal .portal-messenger-contact b{font-size:13px!important}
  body.portal-page #messagesModal .portal-messenger-contact small{font-size:10px!important}
  body.portal-page #messagesModal .portal-messenger-sidebar::after{content:"Раздел сообщений готовится к запуску";display:block;margin:10px 0 0;padding:8px 10px;border-radius:10px;border:1px solid rgba(244,216,117,.13);color:rgba(255,255,255,.52);font-size:9px;line-height:1.35;text-align:center}

  /* Forms / cards / event pages: readable, dense, no desktop grids. */
  .registration-grid,.form-grid,.ticket-grid,.event-story-head,.story-intro,.event-rules-grid,.event-benefit-grid,.event-program-grid,.leaders-mini-grid,.ticket-type-grid,.special-registration-grid,.events-hub-grid,.application-option-grid,.application-contact-grid{
    grid-template-columns:1fr!important;gap:9px!important
  }
  input,select,textarea{font-size:16px!important}
  .registration-form,.event-info-card,.ticket-type-card,.story-panel,.legal-card{padding:14px!important;border-radius:16px!important}
  .events-hub-grid .event-card,.ticket-type-card{min-height:0!important}

  /* Footer: signature, not another screen. */
  .site-footer{padding:30px 0 18px!important}
  .site-footer .footer-grid{gap:18px!important;margin-bottom:18px!important}
  .site-footer .footer-brand img{width:min(125px,42vw)!important}
  .site-footer .footer-brand p{font-size:9px!important;line-height:1.4!important;max-width:310px!important}
  .site-footer .footer-links{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
  .site-footer .footer-links h4{font-size:7px!important}
  .site-footer .footer-links a{font-size:8px!important;line-height:1.3!important}
  .site-footer .footer-bottom{font-size:7.5px!important;gap:6px!important}
}

@media (max-width:420px){
  :root{--m141-pad:14px}
  body:not(.application-page) .hero h1{font-size:32px!important}
  .section-heading h2,.ecosystem-heading h2,.author-page-heading h2{font-size:26px!important}
  .section-qualities .qualities-heading h2{font-size:26px!important}
  .section-qualities .quality-card{font-size:12.5px!important}
  .home-ecosystem .eco-node{font-size:7.2px!important}
  .programs-hub-page .hub-card h3{font-size:18px!important}
  body.portal-page .portal-title{font-size:26px!important}
}
