/* Victoria V13 — mobile-first navigation + responsive hardening */
@media (max-width: 991.98px){
  :root{--vx-mobile-header:68px;--vx-mobile-bottom:74px}
  html,body{max-width:100%;overflow-x:hidden}
  body{padding-top:var(--vx-mobile-header)!important;padding-bottom:calc(var(--vx-mobile-bottom) + env(safe-area-inset-bottom,0px))!important}

  /* Header */
  .v5-mobile-header{
    height:var(--vx-mobile-header)!important;
    min-height:var(--vx-mobile-header)!important;
    padding:0 max(12px,env(safe-area-inset-left)) 0 max(12px,env(safe-area-inset-right))!important;
    display:flex!important;align-items:center!important;justify-content:space-between!important;
    gap:10px;position:fixed!important;top:0!important;left:0!important;right:0!important;
    z-index:1300!important;box-sizing:border-box;
  }
  .v5-mobile-header .v5-brand{min-width:0;max-width:calc(100% - 150px);gap:8px;display:flex;align-items:center}
  .v5-mobile-header .v5-brand-logo{width:42px!important;height:42px!important;flex:0 0 42px}
  .v5-mobile-header .v11-brand-label{min-width:0}
  .v5-mobile-header .v11-brand-label strong,.v5-mobile-header .v11-brand-label small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .v5-mobile-actions{margin-left:auto!important;display:flex!important;gap:6px!important;align-items:center;flex:0 0 auto}
  .v5-mobile-actions .v5-mobile-action{position:relative;display:grid!important;place-items:center;width:42px!important;height:42px!important;min-width:42px;min-height:42px;padding:0!important;border:1px solid var(--v5-line)!important;border-radius:14px!important;background:var(--v5-surface)!important;color:var(--v5-ink)!important;text-decoration:none!important;box-sizing:border-box}
  .v5-mobile-actions .v5-mobile-action:hover{background:var(--v5-surface-2)!important}
  .v5-mobile-actions .v5-mobile-action>i{font-size:1rem}
  .v5-mobile-actions .v5-mobile-profile img{width:28px;height:28px;border-radius:10px;object-fit:cover;display:block}.v5-mobile-actions .v5-mobile-profile>i{font-size:1rem;color:var(--v5-ink)}
  .v5-mobile-action-badge{position:absolute;right:-4px;top:-4px;min-width:19px;height:19px;padding:0 5px;border-radius:999px;display:grid;place-items:center;background:var(--v5-coral);color:#fff;font-size:.55rem;line-height:1;font-weight:950;border:2px solid var(--v5-surface)}
  .v5-mobile-actions .v7-menu-btn{display:grid!important;place-items:center;width:42px!important;height:42px!important;min-width:42px;min-height:42px;padding:0!important;border-radius:14px!important}
  .v5-mobile-actions .v7-menu-btn i{font-size:1.05rem}

  /* The old menu was positioned relative to the viewport height. Keep it under the header and scroll internally. */
  .v7-mobile-menu{
    position:fixed!important;top:calc(var(--vx-mobile-header) + 8px)!important;left:10px!important;right:10px!important;
    width:auto!important;max-height:calc(100dvh - var(--vx-mobile-header) - 18px)!important;
    overflow:hidden!important;padding:10px!important;border-radius:22px!important;z-index:1310!important;
    box-sizing:border-box;overscroll-behavior:contain;
  }
  .v7-mobile-menu.open{display:block!important}
  .v7-mobile-menu-head{position:sticky;top:0;z-index:2;padding:8px 8px 10px!important;margin-bottom:0!important;background:inherit}
  .v7-mobile-menu-title{display:block;margin-top:4px;font-size:.68rem;color:var(--v5-muted);font-weight:800}
  .v7-mobile-menu-close{width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--v5-line);background:var(--v5-surface);color:var(--v5-ink);border-radius:12px}
  .v7-mobile-menu-scroll{max-height:calc(100dvh - var(--vx-mobile-header) - 86px);overflow:auto;padding:8px 2px 4px;scrollbar-width:thin}
  .v7-mobile-menu-section{display:grid;gap:3px;padding:4px 0 8px}
  .v7-mobile-menu-section + .v7-mobile-menu-section{border-top:1px solid var(--v5-line);margin-top:4px;padding-top:10px}
  .v7-mobile-menu-label{padding:0 10px 5px;color:var(--v5-muted);font-size:.58rem;font-weight:950;letter-spacing:.09em;text-transform:uppercase}
  .v7-mobile-menu a,.v7-mobile-pref-btn{min-height:46px;width:100%;box-sizing:border-box;border-radius:14px}
  .v7-mobile-menu a{display:flex;align-items:center;gap:12px;padding:11px 12px!important;font-size:.78rem!important;font-weight:850!important}
  .v7-mobile-menu a i{width:21px;flex:0 0 21px}
  .v7-mobile-menu-count{margin-left:auto;min-width:24px;height:24px;padding:0 7px;border-radius:999px;display:inline-grid;place-items:center;background:var(--v5-coral);color:#fff;font-size:.58rem;font-weight:950}
  .v7-mobile-menu-preferences{padding-bottom:4px}
  .v7-mobile-pref-btn{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid var(--v5-line);background:var(--v5-surface);color:var(--v5-ink);font:800 .75rem var(--v5-font);cursor:pointer}
  .v7-mobile-pref-btn:hover{background:var(--v5-surface-2)}
  .v7-mobile-pref-leading{display:flex;align-items:center;gap:11px;min-width:0}
  .v7-mobile-pref-leading>i{width:21px;text-align:center;color:var(--v5-teal-dark)}
  .v7-mobile-install-btn[hidden]{display:none!important}

  /* Bottom app navigation: exactly five equal columns, no wrapping/overflow. */
  .v5-mobile-bottom{
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
    left:9px!important;right:9px!important;bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;height:66px!important;min-height:66px;padding:6px!important;
    border-radius:21px!important;z-index:1290!important;box-sizing:border-box;
  }
  .v5-mobile-bottom a{min-width:0;min-height:54px;padding:4px 2px!important;gap:3px!important;font-size:.57rem!important;line-height:1!important;text-align:center;white-space:nowrap;overflow:hidden}
  .v5-mobile-bottom a i{font-size:.98rem!important;line-height:1}
  .v5-mobile-bottom a span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  .v5-mobile-bottom a.center{height:54px!important;margin:-11px 5px 0!important;border-radius:17px!important;align-self:start;box-shadow:0 12px 25px rgba(45,157,154,.23)}
  .v5-mobile-bottom a.center i{font-size:1.05rem!important}

  /* Candidate directory */
  .vx-directory-hero,.vx-candidate-hero,.vx-event-detail-hero,.vx-events-hero{width:100%;min-width:0;overflow:hidden}
  .vx-directory-copy,.vx-candidate-copy,.vx-event-detail-copy,.vx-events-copy{min-width:0}
  .vx-directory-copy h1,.vx-hero-copy h1,.vx-event-detail-copy h1,.vx-events-copy h1{overflow-wrap:anywhere;word-break:break-word}
  .vx-search-panel,.vx-inline-search{width:100%;max-width:100%;box-sizing:border-box}
  .vx-search-main input,.vx-search-field input,.vx-search-field select,.vx-inline-search input,.vx-inline-search select{min-width:0;max-width:100%}
  .vx-directory-toolbar>div{min-width:0}
  .vx-directory-toolbar h2{overflow-wrap:anywhere}
  .vx-directory-card,.vx-event-directory-card{min-width:0}
  .vx-directory-body,.vx-event-directory-body{min-width:0}
  .vx-directory-body h3,.vx-event-directory-body h3{overflow-wrap:anywhere;word-break:break-word}
  .vx-snippet{min-height:0}
  .vx-card-actions{min-width:0}
  .vx-card-actions .btn{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .vx-card-actions .btn:first-child{min-width:0}

  /* Candidate details */
  .vx-candidate-hero{min-width:0}
  .vx-candidate-photo-wrap{width:100%;min-width:0;box-sizing:border-box;overflow:hidden}
  .vx-candidate-photo{max-width:100%;box-sizing:border-box}
  .vx-hero-copy{min-width:0;overflow-wrap:anywhere}
  .vx-breadcrumbs{min-width:0;flex-wrap:wrap;row-gap:6px}
  .vx-breadcrumbs a{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .vx-chip-list{min-width:0}
  .vx-chip{max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}
  .vx-hero-actions{min-width:0}
  .vx-hero-actions .btn,.vx-vote-closed{max-width:100%;white-space:normal;overflow-wrap:anywhere}
  .vx-content-grid,.vx-main-column,.vx-side-column{min-width:0}
  .vx-card{min-width:0;max-width:100%;box-sizing:border-box}
  .vx-card img,.vx-card video,.vx-video-stage,.vx-video-stage video{max-width:100%}
  .vx-gallery-grid,.vx-comment,.vx-reply,.vx-comment-body{min-width:0}
  .vx-comment-head{min-width:0;align-items:flex-start}
  .vx-comment-head>span{flex:0 0 auto}
  .vx-comment-head strong{min-width:0;overflow-wrap:anywhere}
  .vx-comment-actions{min-width:0}
  .vx-comment-action{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

@media (max-width: 767.98px){
  .v5-mobile-header{box-shadow:0 7px 25px rgba(0,0,0,.08)!important}
  .v5-page{padding-top:16px!important}
  .vx-directory-hero,.vx-candidate-hero,.vx-event-detail-hero,.vx-events-hero{border-radius:23px!important}
  .vx-directory-copy,.vx-hero-copy,.vx-event-detail-copy,.vx-events-copy{padding:20px!important}
  .vx-candidate-photo-wrap{min-height:380px;padding:18px!important}
  .vx-candidate-photo{width:min(82vw,330px)!important}
  .vx-number-card{left:14px!important;bottom:14px!important}
  .vx-live-chip{right:14px!important;top:14px!important;max-width:calc(100% - 28px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .vx-directory-art,.vx-events-art{min-height:250px!important}
  .vx-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .vx-featured-candidate,.vx-event-feature{min-width:0}
  .vx-search-panel{grid-template-columns:1fr!important;padding:6px!important}
  .vx-search-main,.vx-search-btn{grid-column:auto!important}
  .vx-search-panel .vx-search-field{display:flex!important}
  .vx-search-panel .vx-search-field:nth-of-type(2),.vx-search-panel .vx-search-field:nth-of-type(3){display:none!important}
  .vx-search-shortcuts{overflow:auto;flex-wrap:nowrap;padding-bottom:2px;scroll-snap-type:x proximity}
  .vx-search-shortcuts a{white-space:nowrap;flex:0 0 auto}
  .vx-candidate-directory-grid,.vx-event-directory-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .vx-inline-search{grid-template-columns:1fr!important}
  .vx-inline-search>div,.vx-inline-search button{grid-column:auto!important;width:100%}
  .vx-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .v9-candidate-actions{min-width:0;display:grid!important;grid-template-columns:1fr 1fr;gap:7px!important}
  .v9-candidate-actions>*{min-width:0}
}

@media (max-width: 430px){
  .v5-mobile-header .v5-brand{max-width:calc(100% - 138px)}
  .v5-mobile-actions{gap:4px!important}
  .v5-mobile-actions .v5-mobile-action,.v5-mobile-actions .v7-menu-btn{width:40px!important;height:40px!important;min-width:40px;min-height:40px;border-radius:13px!important}
  .v5-mobile-actions .v5-mobile-profile img{width:26px;height:26px;border-radius:9px}
  .v5-mobile-bottom{left:6px!important;right:6px!important;padding:5px!important;border-radius:19px!important}
  .v5-mobile-bottom a{font-size:.53rem!important}
  .v5-mobile-bottom a.center{margin-left:3px!important;margin-right:3px!important}
  .vx-candidate-directory-grid,.vx-event-directory-grid{grid-template-columns:1fr!important}
  .vx-stat-grid{grid-template-columns:1fr 1fr!important;gap:7px!important}
  .vx-stat-card{padding:11px!important}
  .vx-stat-card strong{font-size:1rem!important}
  .vx-stat-icon{width:34px;height:34px;border-radius:11px;margin-bottom:8px}
  .vx-hero-actions{display:grid!important;grid-template-columns:1fr!important}
  .vx-hero-actions .btn,.vx-vote-closed{width:100%;justify-content:center;box-sizing:border-box}
  .vx-gallery-grid{gap:7px!important}
  .vx-card{padding:14px!important;border-radius:18px!important}
  .vx-section-head h2{font-size:1.15rem!important}
  .vx-section-head p{font-size:.71rem!important}
  .vx-composer{grid-template-columns:1fr!important}
  .vx-composer-avatar{display:none}
  .vx-comment,.vx-reply{grid-template-columns:36px minmax(0,1fr)!important}
  .vx-comment-avatar{width:36px!important;height:36px!important}
}

@media (max-width: 360px){
  .v5-mobile-header{padding-left:8px!important;padding-right:8px!important}
  .v5-mobile-header .v5-brand-logo{width:38px!important;height:38px!important;flex-basis:38px}
  .v5-mobile-header .v11-brand-label strong{font-size:.82rem!important}
  .v5-mobile-header .v11-brand-label small{font-size:.42rem!important}
  .v7-mobile-menu{left:7px!important;right:7px!important}
  .v5-mobile-bottom{bottom:5px!important;height:64px!important;min-height:64px}
  .v5-mobile-bottom a{min-height:52px;font-size:.49rem!important}
  .v5-mobile-bottom a.center{height:52px!important;margin-top:-9px!important}
  .vx-directory-copy,.vx-hero-copy,.vx-event-detail-copy,.vx-events-copy{padding:16px!important}
  .vx-search-shortcuts{display:none}
  .vx-candidate-photo-wrap{min-height:330px!important}
  .vx-candidate-photo{width:min(84vw,280px)!important}
}

@media (prefers-reduced-motion: reduce){
  .v7-mobile-menu{animation:none!important}
}


/* V15.6 — mobile header actions stay visible at 320–430px. */
@media (max-width:991.98px){
  .v5-mobile-header{overflow:visible!important}
  .v5-mobile-header .v5-brand{flex:1 1 auto!important;max-width:none!important;min-width:0!important}
  .v5-mobile-actions{flex:0 0 auto!important;min-width:max-content!important}
  .v5-mobile-actions .v5-mobile-action,.v5-mobile-actions .v7-menu-btn{flex:0 0 auto!important;visibility:visible!important;opacity:1!important}
  .v5-mobile-actions .v5-mobile-action[hidden],.v5-mobile-actions .v7-menu-btn[hidden]{display:grid!important}
}
@media (max-width:380px){
  .v5-mobile-header{padding-left:8px!important;padding-right:8px!important;gap:6px}
  .v5-mobile-header .v5-brand-logo{width:36px!important;height:36px!important;flex-basis:36px!important}
  .v5-mobile-header .v11-brand-label strong{font-size:.78rem!important}
  .v5-mobile-header .v11-brand-label small{font-size:.38rem!important}
  .v5-mobile-actions{gap:3px!important}
  .v5-mobile-actions .v5-mobile-action,.v5-mobile-actions .v7-menu-btn{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;border-radius:12px!important}
  .v5-mobile-actions .v5-mobile-profile img{width:24px!important;height:24px!important}
}
