@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-500.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:Inter;src:url("brand/login-fonts/inter-600.woff2") format("woff2");font-weight:600;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}

:root{
  --chalk:#f4f1e8;
  --chalk-soft:rgba(244,241,232,.78);
  --orange:#ee7f43;
  --board:#0a2019;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;min-height:100vh;color:var(--chalk);color-scheme:dark;
  font-family:Inter,system-ui,sans-serif;background-color:#111915;
  background-image:linear-gradient(rgba(8,13,11,.10), rgba(8,13,11,.10)), url("brand/login-board.png?v=v27");
  background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed;
}
img{display:block;max-width:100%}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer}
a{color:inherit}
[hidden]{display:none !important}
body.needs-auth .app{visibility:hidden}
.app{position:relative;z-index:1;min-height:100vh;padding:18px 28px 34px}
.sr-sink{position:fixed;left:0;top:0;width:1px;height:1px;margin:0;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);pointer-events:none}

.topbar{display:flex;align-items:center;justify-content:space-between;padding:4px 0 12px;margin-bottom:16px;position:relative}
.topbar::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:2px;
  background:linear-gradient(90deg, rgba(255,255,255,.75), rgba(255,255,255,.55), rgba(255,255,255,.75));
  box-shadow:0 0 1px rgba(255,255,255,.55), 0 0 6px rgba(255,255,255,.12);opacity:.9;
}
.logo-nav{display:flex;align-items:flex-start;gap:42px}
.logo{
  font-family:"Cabin Sketch",cursive;font-weight:700;font-size:32px;line-height:.95;letter-spacing:.035em;
  color:#f6f2e8;text-transform:uppercase;text-shadow:0 0 1px rgba(255,255,255,.34), 0 0 4px rgba(255,255,255,.10);
}
.nav{display:flex;align-items:flex-start;gap:34px;padding-top:2px}
.nav a{position:relative;color:var(--chalk);text-decoration:none;font-weight:700;font-size:18px;opacity:.98;padding:0 0 14px}
.nav a.active::before,.nav a.active::after{content:"";position:absolute;left:50%;transform:translateX(-50%) rotate(-1deg);border-radius:999px;pointer-events:none}
.nav a.active::before{bottom:1px;width:58px;height:5px;background:rgba(218,113,75,.48)}
.nav a.active::after{bottom:2px;width:54px;height:2.6px;background:#eb8b63;box-shadow:8px 1px 0 -1px rgba(239,140,102,.55),-5px -1px 0 -1px rgba(239,140,102,.42)}
.top-right{display:flex;align-items:center;gap:14px}
.logout{
  width:48px;height:48px;border-radius:10px;border:2px solid rgba(246,243,235,.88);
  background:rgba(8,18,15,.18);color:var(--chalk);display:grid;place-items:center;padding:0;
}
.logout svg{width:23px;height:23px}
#account-support{height:38px;padding:0 13px;border-radius:10px;border:1px solid rgba(245,241,231,.16);background:rgba(255,255,255,.04);color:#f5f1e7;font-family:Inter,system-ui,sans-serif;font-size:12px;font-weight:650}
#account-club-label{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;color:var(--chalk)}
#account-club{height:40px;max-width:220px;border-radius:8px;border:2px solid rgba(246,243,235,.78);background:rgba(4,16,12,.55);color:#f6f3eb;padding:0 8px}

.import-page{position:relative;z-index:1;max-width:1740px;margin:0 auto;padding:16px 8px 40px}
.title-row{display:flex;align-items:flex-end;gap:18px;margin-bottom:8px}
.import-page h1{
  margin:0;position:relative;display:inline-block;font-family:"Cabin Sketch",cursive;font-size:64px;line-height:.95;font-weight:700;letter-spacing:.2px;color:#f7f4ec;
}
.import-page h1::after{
  content:"";display:block;width:86%;height:6px;margin-top:10px;border-radius:42% 58% 45% 55% / 55% 45% 58% 42%;
  background:linear-gradient(90deg,transparent 0%,rgba(213,111,74,.6) 3%,#d56f4a 10%,#e68a63 53%,#d56f4a 88%,rgba(213,111,74,.4) 97%,transparent 100%);
  transform:rotate(-.7deg) skewX(-4deg);filter:url(#chalkUnderline);
}
.title-rays{width:44px;height:44px;position:relative;top:-8px}
.title-rays i{position:absolute;height:6px;border-radius:999px;background:var(--orange);filter:url(#offball-login-chalk-border)}
.title-rays i:nth-child(1){width:19px;left:4px;top:7px;transform:rotate(-34deg)}
.title-rays i:nth-child(2){width:22px;left:20px;top:19px;transform:rotate(1deg)}
.title-rays i:nth-child(3){width:18px;left:7px;top:34px;transform:rotate(31deg)}
.import-page > .sub{font-family:"Patrick Hand",cursive;font-size:24px;line-height:1.35;color:var(--chalk-soft);max-width:900px;margin:10px 0 28px}

.import-layout{display:grid;grid-template-columns:330px minmax(620px,1fr) 260px;gap:34px;align-items:center;min-height:min(620px,calc(100dvh - 280px))}
.left-art-wrap{display:flex;align-items:center;justify-content:center;align-self:stretch}
.left-art{width:100%;max-width:320px;height:auto;display:block;overflow:visible}
.left-art .chalk,.left-art .chalk-thin,.left-art .orange,.left-art .orange-thin,.left-art .route,.left-art .route-orange{fill:none;stroke-linecap:round;stroke-linejoin:round;filter:url(#offball-login-chalk-border)}
.left-art .chalk{stroke:var(--chalk);stroke-width:5.8}
.left-art .chalk-thin{stroke:rgba(244,241,232,.93);stroke-width:4.5}
.left-art .dust{fill:none;stroke:rgba(244,241,232,.22);stroke-width:10;stroke-linecap:round;stroke-linejoin:round;filter:url(#chalkDust)}
.left-art .orange{stroke:var(--orange);stroke-width:6.4}
.left-art .orange-thin{stroke:var(--orange);stroke-width:5}
.left-art .file-label{font-family:"Patrick Hand",cursive;font-size:28px;fill:var(--orange)}
.left-art .route{stroke:var(--chalk);stroke-width:5.4;stroke-dasharray:14 13}
.left-art .route-orange{stroke:var(--orange);stroke-width:5.4}
.right-decor-empty{min-height:120px;pointer-events:none}

.stage{min-height:min(480px,calc(100dvh - 320px))}
.drop-card,.stage-card{
  position:relative;min-height:min(480px,calc(100dvh - 320px));border-radius:26px;background:rgba(6,25,19,.36);
  display:flex;align-items:center;justify-content:center;padding:32px 42px;isolation:isolate;text-align:center;
}
.drop-card::before,.stage-card::before{
  content:"";position:absolute;inset:0;border:3px solid #f5efe2;border-radius:26px;pointer-events:none;filter:url(#offball-login-chalk-border);opacity:.96;
}
.drop-card::after{
  content:"";position:absolute;inset:12px;border:2px dashed rgba(245,239,226,.30);border-radius:20px;pointer-events:none;filter:url(#offball-login-chalk-border);
}
.drop-card.is-dragging{background:rgba(70,49,25,.26)}
.drop-inner{position:relative;z-index:1;max-width:700px}
.upload-icon{width:104px;height:104px;margin:0 auto 15px}
.upload-icon svg{width:100%;height:100%;overflow:visible}
.upload-icon path{fill:none;stroke:var(--orange);stroke-width:6;stroke-linecap:round;stroke-linejoin:round;filter:url(#offball-login-chalk-border)}
.drop-title{font-family:"Patrick Hand",cursive;font-size:46px;line-height:1;margin:0 0 10px;font-weight:400}
.drop-sub{font-family:"Patrick Hand",cursive;font-size:25px;color:var(--chalk-soft);margin:0 0 20px}
.formats{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-bottom:24px}
.format{position:relative;border:0;border-radius:999px;padding:7px 14px;font-family:"Patrick Hand",cursive;font-size:19px;line-height:1;background:rgba(255,255,255,.02)}
.format::after{content:"";position:absolute;inset:0;border:2px solid rgba(245,239,226,.92);border-radius:inherit;pointer-events:none;filter:url(#offball-login-chalk-border);opacity:.94}
#pick-files{
  position:relative;width:300px;height:74px;margin:0 auto;display:grid;place-items:center;border:0;border-radius:0;background:transparent;color:#fff8ef;
  font-family:"Patrick Hand",cursive;font-size:27px;filter:drop-shadow(0 2px 8px rgba(0,0,0,.18));
}
#pick-files::before{content:"";position:absolute;inset:0;background:url("brand/create/create-btn.png?v=v9") center/100% 100% no-repeat;pointer-events:none}
#pick-files span{position:relative;z-index:1;display:flex;gap:10px;align-items:center}
#pick-files svg{width:26px;height:26px}

#ai-vision{position:relative;max-width:900px;margin:-8px 0 22px;padding:14px 18px 16px;background:rgba(6,25,19,.36);border-radius:16px}
#ai-vision::before{content:"";position:absolute;inset:0;border:2.2px solid rgba(245,239,226,.9);border-radius:16px;pointer-events:none;filter:url(#offball-login-chalk-border)}
#ai-vision h2{margin:0 0 6px;font-family:"Patrick Hand",cursive;font-size:28px;font-weight:400}
#ai-vision p{margin:0;font-family:"Patrick Hand",cursive;font-size:18px;color:var(--chalk-soft)}

.stage-card{flex-direction:column;gap:8px}
.stage-card > div{position:relative;z-index:1;max-width:640px}
.state-title{font-family:"Cabin Sketch",cursive;font-size:42px;line-height:1;margin:8px 0}
.state-text{font-family:"Patrick Hand",cursive;font-size:22px;line-height:1.35;color:var(--chalk-soft)}
.stage-card .actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:18px}
.stage-card .primary,.stage-card .secondary{
  min-height:48px;padding:0 16px;border-radius:8px;font-family:"Patrick Hand",cursive;font-size:20px;
}
.stage-card .primary{position:relative;border:0;background:transparent;color:#fff8ef;min-width:180px}
.stage-card .primary::before{content:"";position:absolute;inset:0;background:url("brand/create/create-btn.png?v=v9") center/100% 100% no-repeat;pointer-events:none}
.stage-card .primary span,.stage-card .secondary{position:relative;z-index:1}
.stage-card .secondary{border:0;background:rgba(3,14,10,.4);color:#f6f3eb}
.stage-card .secondary{position:relative}
.stage-card .secondary::after{content:"";position:absolute;inset:0;border:1.9px solid rgba(243,239,228,.92);border-radius:8px;pointer-events:none;filter:url(#offball-login-chalk-border)}
#ai-import-result h2{margin:0;font-family:"Cabin Sketch",cursive;font-size:42px;font-weight:700}
#ai-import-result p,#ai-import-result li{font-family:"Patrick Hand",cursive;font-size:20px;color:var(--chalk-soft)}
#ai-import-result ul{margin:12px 0 0;padding-left:18px;text-align:left}

#import-progress{
  position:fixed;inset:0;z-index:90;margin:0;display:flex;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;
}
#import-progress .loader-scene{width:min(92vw,980px);display:flex;flex-direction:column;align-items:center;text-align:center;padding:24px;gap:12px}
#import-progress .spinner-zone{position:relative;width:210px;height:210px;display:grid;place-items:center;margin-bottom:2px}
#import-progress .ring{position:absolute;border-radius:50%}
#import-progress .ring.outer-base{inset:12px;border:5px solid rgba(244,240,230,.22);filter:url(#chalkStrokeSoft)}
#import-progress .ring.main-spin{inset:6px;border:none;overflow:visible;transform:rotate(-24deg);animation:loader-spin 1.9s linear infinite}
#import-progress .ring.orange-accent{inset:0;border:none;overflow:visible;opacity:.95;transform:rotate(18deg);animation:loader-spin-reverse 2.8s linear infinite}
#import-progress .ring.ghost-dashes{inset:22px;border:3px dashed rgba(244,240,230,.22);filter:url(#chalkStrokeSoft);animation:loader-pulse 2.2s ease-in-out infinite}
#import-progress .ring.main-spin::before,#import-progress .ring.orange-accent::before,#import-progress .ring.main-spin::after,#import-progress .ring.orange-accent::after{content:"";position:absolute;display:block;border-radius:50%}
#import-progress .ring.main-spin::before{
  inset:0;
  background:conic-gradient(from -90deg, rgba(249,245,238,1) 0deg, rgba(249,245,238,.98) 18deg, rgba(249,245,238,.82) 58deg, rgba(249,245,238,.48) 110deg, rgba(249,245,238,.18) 156deg, rgba(249,245,238,.02) 188deg, transparent 215deg 360deg);
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - 12px), #000 calc(100% - 12px) calc(100% - 6px), transparent calc(100% - 6px));
  mask:radial-gradient(farthest-side, transparent calc(100% - 12px), #000 calc(100% - 12px) calc(100% - 6px), transparent calc(100% - 6px));
  filter:url(#chalkStrokeWhite);
}
#import-progress .ring.main-spin::after{width:14px;height:14px;left:50%;top:6px;transform:translateX(-50%);background:rgba(249,245,238,.95);filter:url(#chalkDot)}
#import-progress .ring.orange-accent::before{
  inset:0;
  background:conic-gradient(from -90deg, rgba(223,131,91,.98) 0deg, rgba(223,131,91,.96) 20deg, rgba(223,131,91,.78) 52deg, rgba(223,131,91,.46) 96deg, rgba(223,131,91,.18) 136deg, rgba(223,131,91,.03) 166deg, transparent 192deg 360deg);
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 10px) calc(100% - 5px), transparent calc(100% - 5px));
  mask:radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 10px) calc(100% - 5px), transparent calc(100% - 5px));
  filter:url(#chalkStrokeOrange);
}
#import-progress .ring.orange-accent::after{width:12px;height:12px;left:50%;top:5px;transform:translateX(-50%);background:#df835b;filter:url(#chalkDot)}
#import-progress .orbit{position:absolute;inset:0;animation:loader-spin 4.1s linear infinite}
#import-progress .orbit::before,#import-progress .orbit::after{content:"";position:absolute;width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.7);filter:url(#chalkDot)}
#import-progress .orbit::before{top:8px;left:50%;transform:translateX(-50%)}
#import-progress .orbit::after{right:20px;top:40px;width:6px;height:6px;opacity:.65}
#import-progress .ball-shell{
  width:112px;height:112px;border-radius:50%;display:grid;place-items:center;
  background:radial-gradient(circle at 32% 28%, rgba(255,255,255,.08), rgba(0,0,0,.12) 100%);
  border:2px solid rgba(255,255,255,.18);animation:loader-shell 2.2s ease-in-out infinite;
}
#import-progress .ball-shell img{width:80px;height:80px;max-width:none;object-fit:contain;filter:drop-shadow(0 4px 10px rgba(0,0,0,.22));animation:loader-bob 2.1s ease-in-out infinite}
#import-progress .title{
  position:relative;margin:0;padding:0 10px 13px;font-family:"Cabin Sketch",cursive;font-size:clamp(40px,5vw,64px);font-weight:700;line-height:1;color:#f4f0e6;
}
#import-progress .title:not(:has(span))::after{
  content:"";position:absolute;left:15%;right:13%;bottom:0;height:6px;border-radius:42% 58% 45% 55% / 55% 45% 58% 42%;
  background:linear-gradient(90deg, transparent 0%, rgba(213,111,74,.60) 3%, #d56f4a 10%, #e68a63 53%, #d56f4a 88%, rgba(213,111,74,.40) 97%, transparent 100%);
  transform:rotate(-.8deg) skewX(-6deg);opacity:.92;filter:url(#chalkUnderline);
}
#import-progress .title span{display:block;font-family:"Patrick Hand",cursive;font-size:28px;font-weight:400;line-height:1.2}
#import-progress .progress-sub{margin:8px 0 0;color:rgba(244,240,230,.70);font-family:"Patrick Hand",cursive;font-size:clamp(18px,1.6vw,24px)}
.import-phases{display:flex;gap:18px;list-style:none;margin:8px 0 0;padding:0}
.import-phases li{display:flex;align-items:center;gap:8px;font-family:"Patrick Hand",cursive;font-size:20px;color:rgba(244,241,232,.42)}
.import-phases span{
  width:34px;height:34px;display:grid;place-items:center;border-radius:50%;border:2.4px solid rgba(244,241,232,.35);font-size:18px;
}
#import-progress[data-phase="prep"] [data-step="prep"],
#import-progress[data-phase="scan"] [data-step="scan"],
#import-progress[data-phase="read"] [data-step="read"]{color:#f4f1e8}
#import-progress[data-phase="prep"] [data-step="prep"] span,
#import-progress[data-phase="scan"] [data-step="scan"] span,
#import-progress[data-phase="read"] [data-step="read"] span{border-color:#e27a53;color:#ee7f43;filter:url(#chalkStrokeOrange)}
#import-progress[data-phase="scan"] [data-step="prep"],
#import-progress[data-phase="read"] [data-step="prep"],
#import-progress[data-phase="read"] [data-step="scan"]{color:rgba(244,241,232,.78)}
#import-progress-cancel{
  position:relative;margin-top:8px;min-width:140px;height:46px;border:0;border-radius:8px;background:rgba(3,14,10,.45);color:#f6f3eb;
  font-family:"Patrick Hand",cursive;font-size:22px;
}
#import-progress-cancel::after{content:"";position:absolute;inset:0;border:1.9px solid rgba(243,239,228,.92);border-radius:8px;pointer-events:none;filter:url(#offball-login-chalk-border)}
@keyframes loader-spin{to{transform:rotate(336deg)}}
@keyframes loader-spin-reverse{to{transform:rotate(-342deg)}}
@keyframes loader-bob{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-3px) scale(1.02)}}
@keyframes loader-shell{0%,100%{transform:scale(1)}50%{transform:scale(1.02)}}
@keyframes loader-pulse{0%,100%{opacity:.4;transform:scale(1)}50%{opacity:.75;transform:scale(1.015)}}

dialog.ui-confirm,#password-dialog,#login-dialog{width:min(480px,calc(100vw - 32px));margin:auto;padding:0;border:0;border-radius:20px;background:#fff;color:#102d55}
dialog.ui-confirm h2,#password-dialog h2,#login-dialog h2{margin:0;padding:16px 18px;border-bottom:1px solid #e2e9f0;font-size:18px;color:#102d55}
dialog.ui-confirm p{margin:0;padding:14px 18px;color:#6f8398;font-size:14px;line-height:1.5}
dialog.ui-confirm p:empty,#login-error:empty,#password-error:empty{display:none}
.modal-foot{display:flex;justify-content:flex-end;gap:8px;margin:0;padding:14px 18px;border-top:1px solid #e2e9f0}
.modal-foot button,#password-dialog button,#login-dialog button[type="submit"]{min-height:40px;border-radius:12px;padding:0 14px;font-size:14px;font-weight:800;border:1px solid #cfdae5;background:#fff;color:#08284a;cursor:pointer}
#logout-accept,#password-dialog button[type="submit"],#login-dialog button[type="submit"]{border:0;background:linear-gradient(180deg,#ff7d18,#ff6900);color:#fff}
#password-dialog form,#login-dialog form{padding:8px 0 0}
#password-dialog label,#login-dialog label{display:flex;flex-direction:column;gap:6px;padding:0 18px 12px;font-size:13px;font-weight:700;color:#102d55}
#password-dialog input,#login-dialog input{height:42px;border-radius:10px;border:1px solid #c9d7e4;padding:0 12px;background:#fff;color:#102d55}
#account-banner:not([hidden]){margin:0 0 12px;color:#fff2e9;background:#542f26;border:1px solid #db987e;border-radius:8px;padding:10px 12px;font-size:14px}

@media(max-height:980px){
  .app{padding:12px 28px 16px}
  .import-page{padding-top:4px;padding-bottom:12px}
  .import-page h1{font-size:52px}
  .import-page > .sub{font-size:20px;margin:6px 0 14px}
  .import-layout{min-height:0}
  .left-art{max-height:calc(100dvh - 300px);width:auto;max-width:280px}
  .drop-card,.stage-card,.stage{min-height:0}
  .drop-card,.stage-card{padding:22px 28px}
  .upload-icon{width:78px;height:78px;margin-bottom:8px}
  .drop-title{font-size:38px}
  #pick-files{height:64px}
}
@media(max-width:1300px){
  .import-layout{grid-template-columns:270px minmax(520px,1fr) 180px;gap:22px}
  .left-art{max-width:270px}
}
@media(max-width:1050px){
  .import-layout{grid-template-columns:240px 1fr}
  .right-decor-empty{display:none}
}
@media(max-width:860px){
  .app{padding:16px}
  .logo-nav{gap:20px;flex-direction:column}
  .nav{gap:22px;flex-wrap:wrap}
  .import-page h1{font-size:48px}
  .import-page > .sub{font-size:21px}
  .import-layout{grid-template-columns:1fr}
  .left-art-wrap{order:2;min-height:360px}
  .left-art{max-width:290px}
  .drop-card,.stage-card{order:1;min-height:430px;padding:28px 20px}
  .drop-title{font-size:38px}
  .import-phases{flex-direction:column;align-items:flex-start}
}
@media(max-width:700px){
  #import-progress .spinner-zone{width:180px;height:180px}
  #import-progress .ball-shell{width:98px;height:98px}
  #import-progress .ball-shell img{width:70px;height:70px}
}
@media(prefers-reduced-motion:reduce){
  #import-progress .ring,#import-progress .orbit,#import-progress .ball-shell,#import-progress .ball-shell img{animation:none}
}
/* Narrow phones: allow the upload grid children to shrink inside the page. */
@media(max-width:700px){
 body.page-import .left-art-wrap,body.page-import .stage,body.page-import .drop-card,body.page-import .stage-card{min-width:0;width:100%;box-sizing:border-box}
 body.page-import .stage-card{overflow-wrap:anywhere}
}
