/* FestAxis Build 01.9 — shared responsive shell hardening.
   Conservative by design: stabilize the common application shell, mobile
   utilities, safe areas, and content containment without redesigning modules. */

html,body{max-width:100%}
.fx-design-system :where(img,video,canvas,svg){max-width:100%}
.fx-design-system :where(.shell,.content,.main,.topbarInner,.topLeft,.topRight){min-width:0}
.fx-design-system :where(input,select,textarea){max-width:100%;min-width:0}
.fx-design-system :where(.tablewrap,[class*="table-wrap"],[class*="tableWrap"]){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

/* Mobile event-day utility: a stable, thumb-reachable system surface. */
.fx-mobile-dayof{--fx-mobile-shortcut-count:4}
.fx-mobile-dayof.has-cue{--fx-mobile-shortcut-count:5}
.fx-mobile-dayof :where(a,button){min-width:0!important}
.fx-mobile-dayof button.fx-mobile-dayof-cue{appearance:none}

@media(max-width:900px){
  body.fx-admin-app{overflow-x:hidden}
  body.fx-admin-app .topbar.fx-operations-topbar,
  body.fx-platform-control .topbar{top:0;min-height:60px;padding-top:env(safe-area-inset-top);background:rgba(255,255,255,.985);border-bottom:1px solid #e2e8f0;box-shadow:0 1px 0 rgba(15,23,42,.025);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
  body.fx-admin-app .topbar.fx-operations-topbar .topbarInner,
  body.fx-platform-control .topbar .topbarInner{width:100%;max-width:none;min-height:60px;margin:0;padding:7px max(10px,env(safe-area-inset-right)) 7px max(10px,env(safe-area-inset-left));gap:8px;align-items:center}
  body.fx-admin-app .topbar .topLeft,
  body.fx-platform-control .topbar .topLeft{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;width:100%;gap:8px}
  body.fx-admin-app .topbar .topHamburger,
  body.fx-platform-control .topbar .topHamburger{position:static!important;inset:auto!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;margin:0!important;padding:0!important;border:1px solid #d6e0e8!important;border-radius:10px!important;background:#fff!important;color:#334155!important;box-shadow:none!important}
  body.fx-admin-app .topbar .topHamburger:hover,
  body.fx-platform-control .topbar .topHamburger:hover{background:#f8fafc!important;border-color:#b8c7d3!important}
  body.fx-admin-app .topbar :where(.fx-context-selector,.fx-context-switcher),
  body.fx-platform-control .topbar :where(.fx-context-selector,.fx-context-switcher){width:100%;max-width:none;min-width:0;margin:0}
  body.fx-admin-app .topbar .fx-context-selector,
  body.fx-platform-control .topbar .fx-context-selector{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;min-height:44px;padding:4px 8px!important;border:1px solid #d6e0e8!important;border-radius:10px!important;background:#fff!important;color:#162a46!important;box-shadow:none!important;text-align:left}
  body.fx-admin-app .topbar a.fx-context-selector{grid-template-columns:34px minmax(0,1fr)}
  body.fx-admin-app .topbar .fx-context-selector>span:not(.fx-context-icon),
  body.fx-platform-control .topbar .fx-context-selector>span:not(.fx-context-icon){min-width:0;overflow:hidden}
  body.fx-admin-app .topbar .fx-context-selector small,
  body.fx-platform-control .topbar .fx-context-selector small{display:block;color:#64748b;font-size:9px;line-height:12px;letter-spacing:.07em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.fx-admin-app .topbar .fx-context-selector strong,
  body.fx-platform-control .topbar .fx-context-selector strong{display:block;color:#162a46;font-size:13px;line-height:18px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.fx-admin-app .topbar .fx-context-icon,
  body.fx-platform-control .topbar .fx-context-icon{width:34px;height:34px;min-width:34px;border-radius:8px}
  body.fx-admin-app .topbar .fx-header-divider,
  body.fx-admin-app .topbar .fx-current-page,
  body.fx-platform-control .topbar .fx-header-divider,
  body.fx-platform-control .topbar .fx-current-page{display:none!important}
  body.fx-admin-app .topbar .topRight,
  body.fx-platform-control .topbar .topRight{display:none!important}
  body.fx-admin-app .sidebar{width:min(86vw,320px);max-width:calc(100vw - 48px)}
  body.navOpen{overflow:hidden;touch-action:none}
}

@media(max-width:860px){
  .fx-mobile-dayof{display:grid!important;grid-template-columns:repeat(var(--fx-mobile-shortcut-count),minmax(0,1fr))!important;left:max(8px,env(safe-area-inset-left))!important;right:max(8px,env(safe-area-inset-right))!important;bottom:max(8px,env(safe-area-inset-bottom))!important;width:auto;max-width:620px;margin-inline:auto;padding:6px!important;border:1px solid rgba(15,23,42,.10)!important;border-radius:18px!important;background:rgba(255,255,255,.96)!important;box-shadow:0 14px 34px rgba(15,23,42,.16)!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);transition:opacity 120ms ease,transform 120ms ease}
  .fx-mobile-dayof :where(a,button){display:grid!important;grid-template-rows:22px auto;place-items:center!important;align-content:center;gap:2px!important;min-height:52px!important;padding:5px 2px!important;border:0!important;border-radius:12px!important;background:transparent!important;background-image:none!important;color:#475569!important;box-shadow:none!important;filter:none!important;transform:none!important;text-decoration:none!important;font-family:Inter,system-ui,sans-serif!important;font-size:10px!important;font-weight:650!important;line-height:13px!important;white-space:nowrap;overflow:hidden}
  .fx-mobile-dayof :where(a,button):hover{background:#f1f5f9!important;color:#162a46!important;border:0!important;filter:none!important;transform:none!important}
  .fx-mobile-dayof :where(a,button):focus-visible{outline:0!important;box-shadow:0 0 0 3px rgba(5,140,186,.24)!important}
  .fx-mobile-dayof :where(a.is-active,button.is-active){background:#edf4ff!important;color:#0f3568!important}
  .fx-mobile-dayof :where(i,.phosphor-icon){width:20px!important;height:20px!important;font-size:20px!important;color:currentColor!important}
  .fx-mobile-dayof span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .fx-mobile-dayof button.fx-mobile-dayof-cue{color:#0547c8!important}
  .fx-mobile-dayof button.fx-mobile-dayof-cue img{display:block;width:20px;height:20px;max-width:none}
  html.fx-cue-open .fx-mobile-dayof{opacity:0;transform:translateY(12px);pointer-events:none}
  .content{padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
}

@media(max-width:420px){
  body.fx-admin-app .topbar.fx-operations-topbar .topbarInner,
  body.fx-platform-control .topbar .topbarInner{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
  body.fx-admin-app .topbar .topLeft,
  body.fx-platform-control .topbar .topLeft{grid-template-columns:42px minmax(0,1fr);gap:6px}
  body.fx-admin-app .topbar .topHamburger,
  body.fx-platform-control .topbar .topHamburger{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important}
  .fx-mobile-dayof{left:max(6px,env(safe-area-inset-left))!important;right:max(6px,env(safe-area-inset-right))!important;bottom:max(6px,env(safe-area-inset-bottom))!important;padding:5px!important;gap:2px!important}
  .fx-mobile-dayof :where(a,button){font-size:9px!important;padding-inline:1px!important}
}

/* Short landscape viewports still need reachable chrome and content. */
@media(max-width:900px) and (max-height:520px) and (orientation:landscape){
  body.fx-admin-app .topbar.fx-operations-topbar,
  body.fx-platform-control .topbar{min-height:52px}
  body.fx-admin-app .topbar.fx-operations-topbar .topbarInner,
  body.fx-platform-control .topbar .topbarInner{min-height:52px;padding-top:4px;padding-bottom:4px}
  .fx-mobile-dayof :where(a,button){min-height:46px!important}
}

@media(prefers-reduced-motion:reduce){
  .fx-mobile-dayof{transition:none!important}
}

/* Build 01.9.1 — mobile chrome polish.
   This deliberately targets the real shared organizer/admin shell with stronger
   selectors than the global button contract. Cue stays a light intelligence
   utility on the mobile toolbar; the top bar becomes one calm, compact row. */
@media(max-width:900px){
  body.fx-admin-app .topbar.fx-operations-topbar,
  body.fx-platform-control .topbar{
    min-height:54px!important;
    padding-top:env(safe-area-inset-top)!important;
    background:#fff!important;
    border-bottom:1px solid #e2e8f0!important;
    box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px)
  }
  body.fx-admin-app .topbar.fx-operations-topbar .topbarInner,
  body.fx-platform-control .topbar .topbarInner{
    display:flex!important;
    width:100%!important;
    min-height:54px!important;
    padding:6px max(8px,env(safe-area-inset-right)) 6px max(8px,env(safe-area-inset-left))!important;
    gap:8px!important;
    align-items:center!important
  }
  body.fx-admin-app .topbar .topLeft,
  body.fx-platform-control .topbar .topLeft{
    display:flex!important;
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    align-items:center!important;
    gap:8px!important
  }
  body.fx-admin-app .topbar .topHamburger,
  body.fx-platform-control .topbar .topHamburger{
    flex:0 0 40px!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:9px!important;
    background:transparent!important;
    color:#26384b!important;
    box-shadow:none!important
  }
  body.fx-admin-app .topbar .topHamburger:hover,
  body.fx-platform-control .topbar .topHamburger:hover{
    background:#f1f5f9!important;
    color:#0f3568!important
  }
  body.fx-admin-app .topbar .topHamburger:focus-visible,
  body.fx-platform-control .topbar .topHamburger:focus-visible{
    outline:0!important;
    box-shadow:0 0 0 3px rgba(1,157,215,.22)!important
  }
  body.fx-admin-app .topbar :where(.fx-context-switcher,.fx-context-selector),
  body.fx-platform-control .topbar :where(.fx-context-switcher,.fx-context-selector){
    min-width:0!important;
    max-width:none!important
  }
  body.fx-admin-app .topbar .fx-context-switcher,
  body.fx-platform-control .topbar .fx-context-switcher{
    flex:1 1 auto!important;
    width:auto!important;
    margin:0!important
  }
  body.fx-admin-app .topbar .fx-context-selector,
  body.fx-platform-control .topbar .fx-context-selector{
    display:grid!important;
    grid-template-columns:28px minmax(0,1fr) 16px!important;
    align-items:center!important;
    gap:7px!important;
    width:100%!important;
    min-height:40px!important;
    margin:0!important;
    padding:5px 9px!important;
    border:1px solid #dbe3ea!important;
    border-radius:10px!important;
    background:#f8fafc!important;
    background-image:none!important;
    color:#162a46!important;
    box-shadow:none!important;
    text-align:left!important
  }
  body.fx-admin-app .topbar a.fx-context-selector,
  body.fx-platform-control .topbar a.fx-context-selector{
    grid-template-columns:28px minmax(0,1fr)!important;
    text-decoration:none!important
  }
  body.fx-admin-app .topbar .fx-context-selector:hover,
  body.fx-platform-control .topbar .fx-context-selector:hover{
    border-color:#c6d2dc!important;
    background:#fff!important
  }
  body.fx-admin-app .topbar .fx-context-selector:focus-visible,
  body.fx-platform-control .topbar .fx-context-selector:focus-visible{
    outline:0!important;
    border-color:#7fcbe6!important;
    box-shadow:0 0 0 3px rgba(1,157,215,.16)!important
  }
  body.fx-admin-app .topbar .fx-context-selector small,
  body.fx-platform-control .topbar .fx-context-selector small{
    display:none!important
  }
  body.fx-admin-app .topbar .fx-context-selector strong,
  body.fx-platform-control .topbar .fx-context-selector strong{
    display:block!important;
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    color:#162a46!important;
    font-size:13px!important;
    line-height:18px!important;
    font-weight:650!important
  }
  body.fx-admin-app .topbar .fx-context-icon,
  body.fx-platform-control .topbar .fx-context-icon{
    display:grid!important;
    place-items:center!important;
    width:28px!important;
    height:28px!important;
    min-width:28px!important;
    border-radius:7px!important;
    overflow:hidden!important
  }
  body.fx-admin-app .topbar .fx-context-icon :where(i,svg),
  body.fx-platform-control .topbar .fx-context-icon :where(i,svg){
    width:17px!important;
    height:17px!important
  }
  body.fx-admin-app .topbar .fx-context-selector>i,
  body.fx-platform-control .topbar .fx-context-selector>i{
    width:16px!important;
    height:16px!important;
    color:#64748b!important
  }
  body.fx-admin-app .topbar .fx-context-popover,
  body.fx-platform-control .topbar .fx-context-popover{
    top:calc(100% + 6px)!important;
    left:0!important;
    right:0!important;
    width:auto!important;
    max-width:min(420px,calc(100vw - 16px))!important
  }
}

@media(max-width:860px){
  body.fx-admin-app .fx-mobile-dayof>button.fx-mobile-dayof-cue,
  body.fx-platform-control .fx-mobile-dayof>button.fx-mobile-dayof-cue{
    color:#0547c8!important;
    background:#f7faff!important;
    background-image:none!important;
    border:1px solid rgba(5,71,200,.18)!important;
    box-shadow:0 0 0 1px rgba(1,157,215,.06),0 3px 10px rgba(5,71,200,.06)!important;
    filter:none!important;
    transform:none!important
  }
  body.fx-admin-app .fx-mobile-dayof>button.fx-mobile-dayof-cue:hover,
  body.fx-platform-control .fx-mobile-dayof>button.fx-mobile-dayof-cue:hover{
    color:#0547c8!important;
    background:#eef5ff!important;
    border-color:rgba(5,71,200,.30)!important;
    box-shadow:0 0 0 1px rgba(1,157,215,.10),0 4px 12px rgba(5,71,200,.09)!important
  }
  body.fx-admin-app .fx-mobile-dayof>button.fx-mobile-dayof-cue:focus-visible,
  body.fx-platform-control .fx-mobile-dayof>button.fx-mobile-dayof-cue:focus-visible{
    outline:0!important;
    border-color:#54b8dc!important;
    box-shadow:0 0 0 3px rgba(1,157,215,.22)!important
  }
  body.fx-admin-app .fx-mobile-dayof>button.fx-mobile-dayof-cue img,
  body.fx-platform-control .fx-mobile-dayof>button.fx-mobile-dayof-cue img{
    width:20px!important;
    height:20px!important;
    opacity:1!important
  }
}

@media(max-width:380px){
  body.fx-admin-app .topbar.fx-operations-topbar .topbarInner,
  body.fx-platform-control .topbar .topbarInner{gap:5px!important;padding-left:max(6px,env(safe-area-inset-left))!important;padding-right:max(6px,env(safe-area-inset-right))!important}
  body.fx-admin-app .topbar .topHamburger,
  body.fx-platform-control .topbar .topHamburger{flex-basis:38px!important;width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important}
  body.fx-admin-app .topbar .fx-context-selector,
  body.fx-platform-control .topbar .fx-context-selector{grid-template-columns:24px minmax(0,1fr) 14px!important;gap:6px!important;min-height:38px!important;padding:4px 7px!important}
  body.fx-admin-app .topbar a.fx-context-selector,
  body.fx-platform-control .topbar a.fx-context-selector{grid-template-columns:24px minmax(0,1fr)!important}
  body.fx-admin-app .topbar .fx-context-icon,
  body.fx-platform-control .topbar .fx-context-icon{width:24px!important;height:24px!important;min-width:24px!important}
}


/* 2026-08-18 whole-app mobile audit: shared low-risk hardening. */
@media(max-width:760px){
  body.fx-admin-app :where(.page-shell,.pageShell,.fx-page-shell){max-width:100%;min-width:0;padding-left:12px;padding-right:12px}
  body.fx-admin-app :where(.page-hero,.pageHero){display:grid!important;grid-template-columns:1fr!important;gap:12px!important;align-items:start!important}
  body.fx-admin-app :where(.page-hero,.pageHero)>.btnrow{width:100%;justify-content:flex-start!important;flex-wrap:wrap!important}
  body.fx-admin-app :where(.page-hero,.pageHero)>.btnrow>.btn{flex:1 1 150px;min-width:0}
  body.fx-admin-app :where(.grid2,.grid3,.formgrid,.form-grid,.fx-secondary-grid,.fx-stat-grid){grid-template-columns:1fr!important}
  body.fx-admin-app :where(.fx-list-row){min-width:0;gap:10px}
  body.fx-admin-app :where(.fx-list-row)>.btnrow{min-width:0!important;justify-content:flex-start!important;flex-wrap:wrap!important}
  body.fx-admin-app :where(.card){min-width:0;max-width:100%}
  body.fx-admin-app :where(table){font-size:max(11px,.78rem)}
  body.fx-admin-app :where(.tablewrap,[class*="table-wrap"],[class*="tableWrap"],.fx-table-scroll){overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
  body.fx-admin-app :where(.tablewrap,[class*="table-wrap"],[class*="tableWrap"],.fx-table-scroll)>table{width:max-content;min-width:100%}
}
