/* Shared OFFBALL chrome. Page styles load first; this file owns the shell. */
:root{
  --app-board-color:#111915;
  --app-board-image:linear-gradient(rgba(8,13,11,.42),rgba(8,13,11,.42)),url("brand/login-board.png?v=v27");
}
@font-face{font-family:Inter;src:url("brand/login-fonts/inter-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Inter;src:url("brand/login-fonts/inter-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Cabin Sketch";src:url("brand/login-fonts/cabin-sketch-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Patrick Hand";src:url("brand/login-fonts/patrick-hand-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}

body.page-library,
body.page-import,
body.page-teams,
body.page-trainings,
body.page-training,
body.page-calendar,
body.coach-editor,
body.page-access,
body.page-coach,
body.page-player{
  min-height:100vh;
  background-color:var(--app-board-color) !important;
  background-image:var(--app-board-image) !important;
  background-position:center !important;
  background-size:cover !important;
  background-repeat:no-repeat !important;
  background-attachment:fixed !important;
}
html:has(body.page-training),
html:has(body.page-calendar),
html:has(body.page-access),
html:has(body.page-coach),
html:has(body.page-player){
  min-height:100%;
  background-color:var(--app-board-color);
  background-image:var(--app-board-image);
  background-position:center;
  background-size:cover;
  background-attachment:fixed;
}

/* One bar: the administration bar, on every signed-in page. */
#account-bar.topbar{
  height:68px;
  min-height:68px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 26px;
  margin:0;
  position:sticky;
  top:0;
  z-index:80;
  background:rgba(5,20,15,.95);
  backdrop-filter:blur(16px);
  border:0;
  border-bottom:1px solid rgba(245,241,231,.1);
  border-radius:0;
  box-shadow:none;
  color:#f5f1e7;
  flex-wrap:nowrap;
}
#account-bar.topbar::after{content:none}
#account-bar .logo-nav,
#account-bar .top-left{display:flex;align-items:center;gap:40px;min-width:0}
#account-bar .logo{
  font-family:"Cabin Sketch",cursive;
  font-weight:700;
  font-size:37px;
  line-height:1;
  letter-spacing:1.4px;
  text-transform:none;
  text-shadow:none;
  color:#f5f1e7;
}
#account-bar .nav{
  display:flex;
  align-items:center;
  gap:30px;
  padding:0;
  flex-wrap:nowrap;
}
#account-bar .nav a{
  position:relative;
  text-decoration:none;
  color:rgba(245,241,231,.72);
  font-family:"Patrick Hand",cursive;
  font-size:20px;
  font-weight:400;
  line-height:1;
  letter-spacing:0;
  opacity:1;
  padding:22px 2px 18px;
  background:transparent;
  border-radius:0;
  box-shadow:none;
}
#account-bar .nav a.active{color:#fff}
#account-bar .nav a.active::before{content:none}
#account-bar .nav a.active::after{
  content:"";
  position:absolute;
  left:-4px;
  right:-4px;
  bottom:11px;
  width:auto;
  height:4px;
  border-radius:99px;
  background:#ef7f3d;
  transform:rotate(-.8deg);
  filter:url(#chalk);
  box-shadow:none;
}
#account-bar .top-right{display:flex;align-items:center;gap:10px}
#account-bar #account-support,
#account-bar .top-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:38px;
  padding:0 13px;
  border-radius:10px;
  border:1px solid rgba(245,241,231,.16);
  background:rgba(255,255,255,.025);
  color:#f5f1e7;
  font-family:Inter,system-ui,sans-serif;
  font-size:12px;
  font-weight:650;
  box-shadow:none;
}
#account-bar #account-logout,
#account-bar .top-icon{
  width:38px;
  height:38px;
  min-height:38px;
  padding:0;
  border-radius:10px;
  border:1px solid rgba(245,241,231,.16);
  background:rgba(255,255,255,.025);
  color:#f5f1e7;
  display:grid;
  place-items:center;
  box-shadow:none;
}
#account-bar #account-logout svg,
#account-bar .top-icon svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8}
#account-bar #account-club-label{
  display:flex;
  align-items:center;
  gap:8px;
  height:38px;
  margin:0;
  padding:0 10px;
  border-radius:10px;
  border:1px solid rgba(245,241,231,.16);
  background:rgba(255,255,255,.025);
  color:rgba(245,241,231,.72);
  font-family:Inter,system-ui,sans-serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
}
#account-bar #account-club-label[hidden],
#account-bar #club-static[hidden]{display:none !important}
#account-bar:has(#account-club-label:not([hidden])) #club-static{display:none}
#account-bar #account-club{
  height:32px;
  max-width:180px;
  border:0;
  background:transparent;
  color:#f5f1e7;
  font-weight:700;
  padding:0;
}
#account-bar .club-btn{
  height:38px;
  padding:0 12px;
  border-radius:10px;
  border:1px solid rgba(245,241,231,.16);
  background:rgba(255,255,255,.025);
  color:#f5f1e7;
  display:flex;
  align-items:center;
  gap:7px;
  font-size:12px;
  font-weight:750;
}
#account-bar .club-btn small{font-size:9px;letter-spacing:1px;color:rgba(245,241,231,.58);font-weight:700}
#account-bar .club-btn strong,
#account-bar #club-name,
#account-bar #account-name{
  color:#f5f1e7;
  background:transparent;
  border:0;
  padding:0;
  margin:0;
  font-size:13px;
  font-weight:750;
  position:static;
  width:auto;
  height:auto;
  overflow:visible;
  clip:auto;
}
#account-bar #club-name::before{content:none}
#account-bar .top-name{font-family:"Patrick Hand",cursive;font-size:15px;color:rgba(245,241,231,.7);font-weight:400}

/* Pages that still fight the bar with the old light shell. */
body.page-training #account-bar.topbar,
body.page-calendar #account-bar.topbar{
  height:68px !important;
  min-height:68px !important;
  padding:0 26px !important;
  gap:16px !important;
  flex-wrap:nowrap !important;
  justify-content:space-between !important;
  align-items:center !important;
  background:rgba(5,20,15,.95) !important;
  color:#f5f1e7 !important;
  border-bottom:1px solid rgba(245,241,231,.1) !important;
}
body.page-training #account-bar #account-club,
body.page-calendar #account-bar #account-club{
  background:transparent !important;
  color:#f5f1e7 !important;
  border:0 !important;
}
body.page-training #account-bar #account-logout,
body.page-calendar #account-bar #account-logout{
  width:38px !important;
  height:38px !important;
  min-height:38px !important;
  padding:0 !important;
  border-radius:10px !important;
  background:rgba(255,255,255,.025) !important;
  color:#f5f1e7 !important;
  border:1px solid rgba(245,241,231,.16) !important;
}
body.page-training #club-name,
body.page-calendar #club-name,
body.page-training #account-name,
body.page-calendar #account-name{
  display:inline !important;
  position:static !important;
  width:auto !important;
  height:auto !important;
  overflow:visible !important;
  clip:auto !important;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  color:#f5f1e7 !important;
  font-size:13px !important;
  line-height:1 !important;
}
body.page-training #account-bar nav #account-systems,
body.page-training #account-bar nav #account-trainings,
body.page-training #account-bar nav #account-manage,
body.page-calendar #account-bar nav #account-systems,
body.page-calendar #account-bar nav #account-trainings,
body.page-calendar #account-bar nav #account-manage{
  order:0 !important;
  color:rgba(245,241,231,.72) !important;
}
body.page-training #account-bar nav a.active,
body.page-calendar #account-bar nav a.active{color:#fff !important}

body.coach-editor #account-bar.topbar{
  height:68px !important;
  min-height:68px !important;
  max-height:none !important;
  padding:0 26px !important;
  background:rgba(5,20,15,.95) !important;
  border-bottom:1px solid rgba(245,241,231,.1) !important;
}
body.coach-editor #account-bar .logo{font-size:37px !important}
body.coach-editor #account-bar .nav{display:flex !important;gap:30px !important;font-size:20px !important}
body.coach-editor #account-bar .nav a,
body.coach-editor #account-bar .nav a.active{
  font-family:"Patrick Hand",cursive !important;
  font-size:20px !important;
  font-weight:400 !important;
  padding:22px 2px 18px !important;
  color:rgba(245,241,231,.72) !important;
}
body.coach-editor #account-bar .nav a.active{color:#fff !important}

/* One responsive navigation, including pages that previously hid their links.
   Keep the three destinations visible, without a page-specific menu script. */
#account-bar[hidden]{display:none !important}
#account-bar .nav a[hidden]{display:none !important}
#account-bar .nav a{white-space:nowrap}
#account-bar .nav a.active::after{transform:rotate(-.8deg);filter:none}
#account-bar .top-chip::before,
#account-bar .top-icon::before,
#account-bar .club-btn::before{content:none}
#account-bar .mobile-nav-button{display:none !important}
#account-bar a:focus-visible,
#account-bar button:focus-visible,
#account-bar select:focus-visible{outline:2px solid #ef7f3d;outline-offset:4px}
body.page-library::before,
body.page-import::before,
body.page-teams::before,
body.page-trainings::before,
body.coach-editor::before{content:none}
@media(max-width:1100px){
  #account-bar .logo-nav,#account-bar .top-left{gap:22px}
  #account-bar .nav{gap:20px}
  #account-bar .top-name{display:none}
}
@media(max-width:980px){
  body #account-bar.topbar{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto;
    height:auto !important;min-height:104px !important;max-height:none !important;
    padding:10px 16px 0 !important;gap:4px 12px !important;
  }
  #account-bar .logo-nav,#account-bar .top-left{display:contents}
  body #account-bar .logo{grid-row:1;grid-column:1;font-size:30px !important}
  #account-bar .top-right{grid-row:1;grid-column:2;gap:8px;flex-wrap:wrap;justify-content:flex-end;max-width:190px}
  body #account-bar .nav,body #account-bar .nav.open{
    display:flex !important;grid-row:2;grid-column:1/-1;
    position:static;flex-direction:row;align-items:center;justify-content:flex-start;
    width:100%;min-width:0;gap:24px !important;padding:0;
    flex-wrap:nowrap;background:transparent;border:0;overflow-x:auto;
  }
  body #account-bar .nav a,body #account-bar .nav a.active{
    flex:none;width:auto;font-size:18px !important;padding:12px 2px 15px !important;
  }
  #account-bar .nav a.active::after{display:block;bottom:6px;left:0;right:0}
  #account-bar .top-name,#account-bar #account-name{display:none !important}
}
@media(max-width:480px){
  #account-bar #club-static{display:none}
  #account-bar #account-club-label{max-width:110px;padding:0 6px;gap:4px}
  #account-bar #account-club-label small{display:none}
  #account-bar #account-club{min-width:0;max-width:90px;font-size:12px}
  #account-bar #account-support{padding:0 9px}
}

/* Titles that sit directly on the board. Cards keep their own ink. */
body.page-training,
body.page-calendar{color:#f5f1e7}
body.page-training h1,
body.page-calendar .board-head h1{
  color:#f5f1e7 !important;
  font-family:"Cabin Sketch",cursive;
  font-weight:700;
  letter-spacing:0;
}
body.page-training .sub,
body.page-calendar .board-head .sub,
body.page-calendar .crumbs,
body.page-calendar .crumbs a,
body.page-training .board-status,
body.page-calendar .board-status{color:rgba(245,241,231,.72) !important}
body.page-calendar .crumbs a:hover,
body.page-calendar .crumbs .on{color:#fff !important}
body.page-training.page-busy .sheet,
body.page-calendar.page-busy .board{visibility:hidden}

/* Coach notebook: same board and bar, without the club navigation. */
body.page-coach{color:#f5f1e7}
body.page-coach .topbar{
  height:68px;
  background:rgba(5,20,15,.95);
  border-bottom:1px solid rgba(245,241,231,.1);
  box-shadow:none;
  backdrop-filter:blur(16px);
}
body.page-coach .brand{
  font-family:"Cabin Sketch",cursive;
  font-size:37px;
  font-weight:700;
  letter-spacing:1.4px;
  color:#f5f1e7;
}
body.page-coach .ball-logo{display:none}
body.page-coach .session-mini{color:rgba(245,241,231,.72);font-family:"Patrick Hand",cursive;font-size:16px;font-weight:400}
body.page-coach .plan-head h1{font-family:"Cabin Sketch",cursive;font-weight:700;color:#f5f1e7;letter-spacing:0}
body.page-coach .plan-meta,
body.page-coach .coach-state{color:rgba(245,241,231,.72)}
body.page-coach .plan-card,
body.page-coach .coach-note,
body.page-coach .plan-row,
body.page-coach .rail,
body.page-coach .free-phone,
body.page-coach .reader-header,
body.page-coach .free-card{color:#0b2b4d}

/* Player phone stays the reader. The page around it is the login board. */
body.page-player .preview-bg{background:transparent}
#state.state-box[data-kind="loading"]{background:transparent}
#state.state-box[data-kind="loading"] .state-wrap{
  background:transparent;
  border:0;
  box-shadow:none;
  width:auto;
  padding:0;
}

/* Ball loader for the pages that still used the old mark. */
.offball-loader{
  position:fixed;
  inset:0;
  z-index:90;
  margin:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:linear-gradient(rgba(8,13,11,.55), rgba(8,13,11,.62)), url("brand/login-board.png?v=v27") center/cover no-repeat;
}
body.page-training.page-busy #page-loading.offball-loader,
body.page-calendar.page-busy #page-loading.offball-loader,
#coach-loading.offball-loader:not([hidden]),
#state.state-box[data-kind="loading"].offball-loader{display:flex}
.offball-loader .loader-scene{width:min(92vw,980px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;gap:12px}
.offball-loader .spinner-zone,
.access-card .spinner-zone{position:relative;width:210px;height:210px;display:grid;place-items:center}
.offball-loader .ring,
.access-card .ring{position:absolute;border-radius:50%}
.offball-loader .ring.outer-base,
.access-card .ring.outer-base{inset:12px;border:5px solid rgba(244,240,230,.22)}
.offball-loader .ring.main-spin,
.access-card .ring.main-spin{inset:6px;transform:rotate(-24deg);animation:loader-spin 1.9s linear infinite}
.offball-loader .ring.orange-accent,
.access-card .ring.orange-accent{inset:0;transform:rotate(18deg);animation:loader-spin-reverse 2.8s linear infinite}
.offball-loader .ring.ghost-dashes,
.access-card .ring.ghost-dashes{inset:22px;border:3px dashed rgba(244,240,230,.22);animation:loader-pulse 2.2s ease-in-out infinite}
.offball-loader .ring.main-spin::before,
.offball-loader .ring.orange-accent::before,
.access-card .ring.main-spin::before,
.access-card .ring.orange-accent::before{content:"";position:absolute;inset:0;border-radius:50%}
.offball-loader .ring.main-spin::before,
.access-card .ring.main-spin::before{
  background:conic-gradient(from -90deg,#f9f5ee 0deg,rgba(249,245,238,.02) 188deg,transparent 215deg);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 12px),#000 calc(100% - 11px));
  mask:radial-gradient(farthest-side,transparent calc(100% - 12px),#000 calc(100% - 11px));
}
.offball-loader .ring.orange-accent::before,
.access-card .ring.orange-accent::before{
  background:conic-gradient(from -90deg,rgba(223,131,91,.98) 0deg,rgba(223,131,91,.03) 166deg,transparent 192deg);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 10px),#000 calc(100% - 9px));
  mask:radial-gradient(farthest-side,transparent calc(100% - 10px),#000 calc(100% - 9px));
}
.offball-loader .ball-shell,
.access-card .ball-shell{
  width:112px;height:112px;border-radius:50%;display:grid;place-items:center;
  border:2px solid rgba(255,255,255,.18);
  background:radial-gradient(circle at 32% 28%,rgba(255,255,255,.08),rgba(0,0,0,.12));
  animation:loader-shell 2.2s ease-in-out infinite;
}
.offball-loader .ball-shell img,
.access-card .ball-shell img{width:80px;height:80px;object-fit:contain;animation:loader-bob 2.1s ease-in-out infinite}
.offball-loader .title,
.access-card .loader-scene .title{
  margin:0;
  font-family:"Cabin Sketch",cursive;
  font-size:clamp(40px,5vw,64px);
  font-weight:700;
  line-height:1;
  color:#f4f0e6;
}
.offball-loader .subtitle,
.access-card .loader-scene .subtitle{margin:8px 0 0;color:rgba(244,240,230,.7);font-family:Inter,system-ui,sans-serif;font-size:18px}
.access-card .loader-scene{display:flex;flex-direction:column;align-items:center;gap:8px;margin:0 0 8px}
.access-card .spinner-zone{width:132px;height:132px}
.access-card .ball-shell{width:72px;height:72px}
.access-card .ball-shell img{width:52px;height:52px}
.access-card .loader-scene .title,
.access-card .loader-scene .subtitle{display:none}
@keyframes loader-spin{to{transform:rotate(360deg)}}
@keyframes loader-spin-reverse{to{transform:rotate(-360deg)}}
@keyframes loader-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes loader-shell{0%,100%{transform:scale(1)}50%{transform:scale(1.03)}}
@keyframes loader-pulse{0%,100%{opacity:.45}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){
  .offball-loader .ring,
  .offball-loader .ball-shell,
  .offball-loader .ball-shell img,
  .access-card .ring,
  .access-card .ball-shell,
  .access-card .ball-shell img{animation:none}
}
@media(max-width:980px){
 body.coach-editor #account-bar.topbar{height:auto!important;min-height:104px!important;padding:10px 16px 0!important}
 body.coach-editor #account-bar .logo{font-size:30px!important}
 body.coach-editor #account-bar .nav{gap:24px!important}
 body.coach-editor #account-bar .nav a,body.coach-editor #account-bar .nav a.active{font-size:18px!important;padding:12px 2px 15px!important}
}
