:root{--ink:#210c49;--muted:#716680;--line:#e6dcf3;--card:#fff;--wash:#f7f3fc;--purple:#781cff;--violet:#4c16c9;--magenta:#d319f2;--lime:#ecff4d;--brand-gradient:linear-gradient(120deg,#32106f 0%,#5b18d2 48%,#a522f1 100%);--brand-shadow:0 16px 42px rgba(63,20,133,.12)}
body{background:linear-gradient(180deg,#fcfbff 0,#f8f5fc 100%);color:var(--ink)}
.top{background:rgba(255,255,255,.94);border-bottom-color:#e5daf2;box-shadow:0 8px 30px rgba(38,12,83,.06)}
.brand img{height:42px;width:auto;display:block}.links button,.linkbtn{color:#6f647e}.links button:hover,.links button.active{color:var(--purple)}.links button.active{box-shadow:inset 0 -2px var(--magenta)}
.mobile-menu-toggle{display:none}
.hero{background:radial-gradient(circle at 88% 18%,rgba(225,44,255,.55) 0,transparent 27%),radial-gradient(circle at 66% 105%,rgba(131,45,255,.6) 0,transparent 38%),linear-gradient(120deg,#1f093e 0%,#3e107d 42%,#6b19d7 100%)}
.hero p,.host-intro p,.pass-head p{color:#f0e8ff}.eyebrow{color:var(--lime)}
.btn{border-color:#ded2ec;color:var(--ink);box-shadow:0 4px 14px rgba(39,12,85,.04);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease}
.btn:hover:not(:disabled){transform:translateY(-1px);border-color:#b89ddd;box-shadow:0 9px 22px rgba(66,21,141,.13)}
.btn:focus-visible,.links button:focus-visible,.sidebar button:focus-visible{outline:3px solid rgba(211,25,242,.28);outline-offset:2px}
.btn.primary{background:linear-gradient(110deg,#39106f 0%,#6518dc 58%,#8f20f0 100%);border-color:#5c17c9;color:#fff}.btn.lime{background:linear-gradient(105deg,#bb17f2,#781cff);border-color:#9c1fed;color:#fff}
.card,.event-card,.org-card,.prod-card,.host-block,.stat,.adminform,.report-card,.privacy-center{border-color:#e5daf1;box-shadow:var(--brand-shadow)}.card:hover,.event-card:hover{border-color:#cbb4e7;box-shadow:0 20px 48px rgba(63,20,133,.16)}
/* Center short competition rows while preserving compact card widths. */
#homeCompetitions.grid,.event-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),360px));justify-content:center;align-items:stretch}
.tag,.org-badge{background:#f1e9ff;color:#6818d4;border:1px solid #e5d6ff}.notice,.report{background:#f4ecff;color:#4a168e;border-color:#ddc8fa}.recommend{background:linear-gradient(90deg,#f2ffc7,#f9ffe7);border:1px solid #dcefa1}
.tablewrap{border-color:#e2d7ee;box-shadow:0 12px 34px rgba(50,16,105,.07)}th{background:#f7f2fc;color:#665773}tbody tr:hover{background:#fbf8ff}
.sidebar{background:linear-gradient(165deg,#16072d 0%,#2b0d59 58%,#4f12a5 100%);box-shadow:0 18px 42px rgba(31,8,65,.2)}.sidebar button{color:#cfc0e5}.sidebar button:hover{color:#fff;background:rgba(255,255,255,.08)}.sidebar button.active{background:linear-gradient(100deg,rgba(130,31,255,.45),rgba(217,25,242,.28));color:#fff;box-shadow:inset 3px 0 var(--magenta)}
.progress span{background:linear-gradient(90deg,#4f16cf,#8b1fff,#d319f2)}.pass-head,.host-intro,.leader-detail-head,.account-profile{background:var(--brand-gradient)!important}.pass-tab.on{background:#f2e9ff;color:#6818d7;box-shadow:inset 0 -3px var(--magenta)}.open-badge{color:#6115ca}
.directory-tools input,.directory-tools select,.discovery-filters input,.discovery-filters select,.toolbar input,.toolbar select,.field input,.field select,.field textarea{border-color:#dfd3eb;background:#fff}
.directory-tools input:focus,.directory-tools select:focus,.discovery-filters input:focus,.discovery-filters select:focus,.toolbar input:focus,.toolbar select:focus,.field input:focus,.field select:focus,.field textarea:focus{outline:0;border-color:#8d3af1;box-shadow:0 0 0 4px rgba(120,28,255,.11)}
.toast{background:linear-gradient(110deg,#24104a,#6518d4);box-shadow:0 18px 50px rgba(42,11,91,.28)}dialog{border:1px solid #dfd1ef;box-shadow:0 34px 110px rgba(28,7,61,.35)}dialog::backdrop{background:rgba(20,6,43,.72);backdrop-filter:blur(3px)}footer{background:#fbf9ff;border-top-color:#e4d9ef!important}a{color:#6818d7}
@media(prefers-reduced-motion:reduce){.btn{transition:none}}

/* Event-ready responsive foundation. Keep every application surface inside the viewport. */
html,body{width:100%;max-width:100%;overflow-x:hidden}
img,svg,video,canvas{max-width:100%}
.page,.section,.grid,.card,.split,.formgrid,.field,.sectionhead,.toolbar,.tablewrap,.modal,.pass-dialog,.host-block,.org-panel,#adminWork{min-width:0;max-width:100%}
.shell{width:min(1180px,100%);max-width:1180px;margin-inline:auto;min-width:0}
#home>.section.shell{width:min(1040px,100%)}
#home>.section.shell .sectionhead{justify-content:flex-start;text-align:left;margin-bottom:26px}
#homeCompetitions.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;width:100%}
#homeCompetitions .competition-card{height:100%;display:flex;flex-direction:column}
#homeCompetitions .competition-body{display:flex;flex:1;flex-direction:column;height:auto;min-height:0;padding:26px}
#homeCompetitions .competition-body>.tag{display:inline-flex;align-items:center;gap:7px;align-self:flex-start;width:max-content;padding:7px 11px;font-size:11px;line-height:1;font-weight:850;letter-spacing:.08em;text-transform:uppercase;background:#f3ebff;border:1px solid #e2d2ff;color:#6517cf}
#homeCompetitions .competition-body>.tag::before{content:"";width:7px;height:7px;border-radius:50%;background:#7c1cff;box-shadow:0 0 0 3px rgba(124,28,255,.11)}
#homeCompetitions .competition-body .metric{margin-top:auto}
#homeCompetitions .competition-body .join{align-self:flex-start;margin-top:16px}
#homeCompetitions .competition-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;width:100%;margin-top:16px}
#homeCompetitions .competition-actions .btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;margin:0;padding:11px 16px;text-align:center}
#homeCompetitions .competition-actions .homeLeaderboard{border:2px solid #7c1cff;background:#fff;color:#4d118f;box-shadow:0 5px 14px rgba(76,17,143,.08)}
#homeCompetitions .competition-actions .homeLeaderboard:hover{background:#f7f0ff;border-color:#5b11bd}
.field input,.field select,.field textarea,.toolbar input,.toolbar select{width:100%;max-width:100%;min-width:0}
.card,.event-card,.org-card,.prod-card,.notice,.metric,.detailitem{overflow-wrap:anywhere}
.tablewrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}

@media(max-width:800px){
  #home>.section.shell .sectionhead{text-align:left;justify-content:flex-start;margin-bottom:18px}
  #homeCompetitions.grid{grid-template-columns:minmax(0,1fr);gap:16px}
  #homeCompetitions .competition-actions{grid-template-columns:1fr}
  .shell{width:100%;padding-left:16px;padding-right:16px}
  .top nav{height:auto;min-height:70px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px 14px;padding-top:10px;padding-bottom:10px}
  .top nav .brand{width:auto;justify-content:flex-start}
  .top nav .spacer{display:none}
  .top nav .mobile-menu-toggle{display:grid;place-content:center;gap:5px;width:46px;height:46px;padding:0;border:1px solid #dfd3eb;border-radius:14px;background:#fff;color:var(--ink);box-shadow:0 5px 16px rgba(39,12,85,.07)}
  .mobile-menu-toggle span{display:block;width:22px;height:2px;border-radius:99px;background:currentColor;transition:transform .18s ease,opacity .18s ease}
  .top nav.mobile-menu-open .mobile-menu-toggle span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  .top nav.mobile-menu-open .mobile-menu-toggle span:nth-child(2){opacity:0}
  .top nav.mobile-menu-open .mobile-menu-toggle span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
  .top nav .links{grid-column:1/-1;display:none;width:100%;padding:12px;background:#fff;border:1px solid #e5daf1;border-radius:16px;box-shadow:0 18px 40px rgba(39,12,85,.12)}
  .top nav.mobile-menu-open .links{display:grid;grid-template-columns:1fr;gap:4px}
  .top nav .links button{width:100%;min-height:46px;padding:11px 13px;text-align:left;border-radius:10px}
  .top nav>:not(.brand):not(.links):not(.spacer):not(.mobile-menu-toggle){display:none}
  .top nav.mobile-menu-open>:not(.brand):not(.links):not(.spacer):not(.mobile-menu-toggle){display:flex;grid-column:1/-1;width:100%;min-height:46px;align-items:center;justify-content:center}
  .brand img{height:34px;max-width:min(180px,70vw)}
  .hero{padding:50px 0 42px}
  h1{font-size:clamp(38px,12vw,54px);line-height:1.02;letter-spacing:-2.5px;overflow-wrap:normal;word-break:normal}
  h2{font-size:clamp(27px,8vw,34px);line-height:1.12;letter-spacing:-1px;overflow-wrap:anywhere}
  .hero p{font-size:17px}
  .section{padding:38px 0}
  .sectionhead{display:block;margin-bottom:18px}
  .sectionhead>.actions,.sectionhead>.btn{margin-top:14px}
  .sectionhead>.btn{width:100%}
  .grid,.event-grid,.creator-grid,.prod-grid{grid-template-columns:minmax(0,1fr)!important}
  .card,.event-card,.org-card,.prod-card,.host-block,.adminform{padding:17px}
  .competition-body{padding:17px}
  .actions{gap:9px}
  .actions .btn{min-height:44px}
  .toolbar,.ops-toolbar,.analytics-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%}
  .toolbar>*,.ops-toolbar>*,.analytics-toolbar>*{width:100%;min-width:0!important}
  .stats,.account-status-grid,.ops-grid,.org-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .split,.org-layout{grid-template-columns:minmax(0,1fr)!important}
  .sidebar,.org-nav{display:flex!important;gap:6px;overflow-x:auto;max-width:100%;padding:10px;scrollbar-width:none}
  .sidebar::-webkit-scrollbar,.org-nav::-webkit-scrollbar{display:none}
  .sidebar button,.org-nav button{flex:0 0 auto;width:auto;white-space:nowrap;min-height:42px}
  .formgrid,.profilegrid,.detailgrid,.analytics-grid,.report-layout,.report-metrics,.perf-grid,.perf-filterbar,.perf-rank,.privacy-list{grid-template-columns:minmax(0,1fr)!important}
  .checkgrid,.platform-picks,.logo-picks,.weight-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .org-editor-expanded #orgCompetitionForm,.org-editor-expanded #orgCompetitionForm .formgrid,.org-editor-expanded #orgCompetitionForm .logo-picks,.competition-rules-editor,#competitionModal #competitionForm>.formgrid{grid-template-columns:minmax(0,1fr)!important}
  .org-editor-expanded #orgCompetitionForm [data-editor-extras]{grid-template-columns:minmax(0,1fr)!important}
  .account-profile{grid-template-columns:auto minmax(0,1fr)!important}
  .account-profile .actions{grid-column:1/-1}
  .pass-dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;margin:auto;overflow-x:hidden}
  .pass-head{min-height:0;padding:22px 56px 20px 20px}
  .pass-head h2{font-size:26px;overflow-wrap:anywhere}
  .pass-tabs{display:flex;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:none}
  .pass-tabs::-webkit-scrollbar{display:none}
  .pass-tab{flex:0 0 145px;min-height:68px;padding:12px;scroll-snap-align:start}
  .pass-body{padding:20px}
  .pass-body h2{font-size:25px}
  .step-actions{position:sticky;bottom:-1px;z-index:2;background:#fff;padding:12px 0 2px;align-items:stretch}
  .step-actions .btn{min-height:44px}
  #competitionModal .modal{padding:14px}
  #competitionModal .modalhead{padding:8px 0}
  .modal{padding:20px}
  .notification-meta,.report-top,.org-card-head{align-items:flex-start;flex-wrap:wrap}
  .report-fab{max-width:calc(100vw - 20px);white-space:normal}
}

@media(max-width:480px){
  .shell{padding-left:14px;padding-right:14px}
  .top nav .links button{text-align:left}
  .hero{padding:42px 0 36px}
  h1{font-size:40px}
  .actions{display:grid;grid-template-columns:1fr}
  .actions .btn{width:100%}
  .stats,.account-status-grid,.ops-grid,.org-kpis,.checkgrid,.platform-picks,.logo-picks,.weight-grid{grid-template-columns:minmax(0,1fr)!important}
  .card,.event-card,.org-card,.prod-card,.host-block,.adminform{padding:15px}
  .metric{align-items:flex-start}
  .modal{padding:18px}
  .pass-body{padding:17px}
  .pass-tab{flex-basis:132px}
  .step-actions{display:grid;grid-template-columns:1fr 1fr}
  .step-actions>span:empty{display:none}
  .step-actions>span:empty+.btn{grid-column:1/-1}
  .toast{left:10px;right:10px;bottom:10px;text-align:center}
}
