:root{
  --stitch-sidebar:320px;
  --stitch-cyan:#9de2ff;
  --stitch-cyan-strong:#5ed4ff;
  --stitch-cyan-container:#00ccff;
  --stitch-gold:#e9c176;
  --stitch-gold-dim:#8d672b;
  --stitch-ink:#010f1f;
  --stitch-surface:#051424;
  --stitch-panel:rgba(3,16,27,.82);
  --stitch-panel-soft:rgba(12,28,44,.76);
  --stitch-line:rgba(233,193,118,.34);
  --stitch-text:#d4e4fa;
  --stitch-muted:#bbc8d0;
  --stitch-danger:#ff5b62;
  --stitch-success:#49d58a;
  --stitch-radius:6px;
  --blue:var(--stitch-cyan-strong);
  --gold:var(--stitch-gold);
  --red:var(--stitch-danger);
  --green:var(--stitch-success);
  --muted:var(--stitch-muted);
}

*{box-sizing:border-box}
html{
  min-height:100%;
  background:var(--stitch-surface);
  color-scheme:dark;
}
html body{
  width:100%;
  min-height:100%;
  height:auto;
  margin:0;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  background:transparent!important;
  color:var(--stitch-text);
  font-family:"Work Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    linear-gradient(90deg,rgba(1,12,22,.56),rgba(1,10,20,.38) 36%,rgba(1,10,20,.5)),
    rgba(1,10,20,.24);
}
.phoenix-master-artwork{
  position:fixed;
  inset:0;
  z-index:-2;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  transform:none;
}
button,input,select,textarea{font:inherit}
button{cursor:pointer}

/* Application shell */
#stageHost,
#stageScaleBox,
#desktopStage{
  width:100%!important;
  height:auto!important;
  min-height:100vh!important;
  margin:0!important;
  position:relative!important;
  inset:auto!important;
  overflow:visible!important;
  background:transparent!important;
  transform:none!important;
}
#stageHost{display:block!important}

.master-sidebar{
  position:fixed!important;
  inset:0 auto 0 0!important;
  width:var(--stitch-sidebar)!important;
  height:100vh!important;
  z-index:50!important;
  display:flex!important;
  flex-direction:column;
  overflow-y:auto;
  overflow-x:hidden;
  background:rgba(3,17,29,.88)!important;
  border:0!important;
  border-right:1px solid var(--stitch-line)!important;
  box-shadow:10px 0 34px rgba(0,0,0,.28),inset -1px 0 rgba(94,212,255,.08);
  backdrop-filter:blur(16px);
}
.sidebar-brand{
  position:relative!important;
  inset:auto!important;
  flex:0 0 324px;
  width:100%!important;
  height:324px!important;
  background:url("./phoenix-stitch-logo.png") center 30px/160px 160px no-repeat!important;
  border:0!important;
}
.sidebar-brand::before{
  content:"PHOENIX";
  position:absolute;
  left:0;
  right:0;
  top:196px;
  text-align:center;
  color:var(--stitch-cyan);
  font-family:"Pirata One","Old English Text MT",Georgia,serif;
  font-size:55px;
  line-height:1;
  letter-spacing:.09em;
  text-shadow:0 0 18px rgba(0,204,255,.58),0 2px 2px #00141f;
}
.sidebar-brand::after{
  content:"GUILD COMMAND";
  position:absolute;
  left:0;
  right:0;
  top:264px;
  text-align:center;
  color:var(--stitch-gold);
  font-family:"Space Grotesk",sans-serif;
  font-size:16px;
  font-weight:700;
  letter-spacing:.22em;
}
.master-nav{
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  height:auto!important;
  display:flex!important;
  flex:1 0 auto;
  flex-direction:column;
  gap:2px;
  padding:0 10px;
}
.master-nav button{
  position:relative;
  min-height:62px!important;
  width:100%;
  padding:0 28px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:20px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--stitch-muted)!important;
  font-family:"Space Grotesk",sans-serif!important;
  font-size:17px!important;
  font-weight:600!important;
  text-align:left;
  transition:background .18s ease,color .18s ease,transform .18s ease;
}
.master-nav button::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:transparent;
}
.master-nav button:hover{
  color:var(--stitch-cyan)!important;
  background:rgba(39,54,71,.5)!important;
  transform:translateX(2px);
}
.master-nav button.active{
  color:var(--stitch-cyan)!important;
  background:linear-gradient(90deg,rgba(0,204,255,.22),rgba(0,77,99,.26))!important;
  box-shadow:inset 0 0 24px rgba(0,204,255,.11)!important;
}
.master-nav button.active::before{background:var(--stitch-cyan)}
.master-nav img{
  width:30px!important;
  height:30px!important;
  object-fit:contain;
  filter:grayscale(1) brightness(1.7) saturate(.4)!important;
  opacity:.86;
}
.master-nav button.active img,
.master-nav button:hover img{
  filter:brightness(0) saturate(100%) invert(83%) sepia(17%) saturate(1170%) hue-rotate(164deg) brightness(105%) contrast(102%)!important;
  opacity:1;
}
.sidebar-footer-art{
  position:relative!important;
  inset:auto!important;
  flex:0 0 142px;
  width:100%!important;
  height:142px!important;
  margin-top:20px;
  background:none!important;
  border-top:1px solid var(--stitch-line);
}
.sidebar-footer-art::before{
  content:"◉  STRENGTH IN LOYALTY";
  position:absolute;
  left:0;
  right:0;
  top:34px;
  color:var(--stitch-gold);
  font-family:"Space Grotesk",sans-serif;
  font-size:14px;
  font-weight:700;
  letter-spacing:.12em;
  text-align:center;
}
.sidebar-footer-art::after{
  content:"HONOR IN ACTION";
  position:absolute;
  left:64px;
  right:64px;
  top:82px;
  padding-top:14px;
  border-top:1px solid rgba(233,193,118,.3);
  color:var(--stitch-gold);
  font-family:"Space Grotesk",sans-serif;
  font-size:12px;
  text-align:center;
}

.master-workspace{
  position:relative!important;
  inset:auto!important;
  width:calc(100% - var(--stitch-sidebar))!important;
  min-height:100vh!important;
  height:auto!important;
  margin-left:var(--stitch-sidebar);
  overflow:visible!important;
  background:transparent!important;
}
.workspace-top-scene{display:none!important}

/* Header */
.stitch-appbar{
  position:sticky;
  top:0;
  z-index:40;
  display:block;
  height:160px;
  padding:28px 40px;
  background:linear-gradient(180deg,rgba(4,19,33,.86),rgba(4,19,33,.44) 74%,transparent);
  backdrop-filter:blur(4px);
}
#pageTitle{
  position:absolute;
  left:40px;
  top:28px;
  max-width:510px;
  color:var(--stitch-cyan);
  font-family:"Pirata One","Old English Text MT",Georgia,serif;
  font-size:42px;
  line-height:1.08;
  letter-spacing:.02em;
  text-transform:uppercase;
  text-shadow:0 0 13px rgba(0,204,255,.5);
}
#pageSub{
  position:absolute;
  left:40px;
  top:82px;
  max-width:550px;
  color:var(--stitch-cyan);
  font-family:"Space Grotesk",sans-serif;
  font-size:16px;
  letter-spacing:.3em;
  text-transform:uppercase;
  opacity:.88;
}
.master-control,
.event-control,
.year-control,
.role-control,
.add-year-control,
.live-identity{
  position:absolute!important;
  inset:auto!important;
}
.event-control{right:520px!important;top:32px!important;width:145px!important;height:70px!important}
.year-control{right:378px!important;top:32px!important;width:130px!important;height:70px!important}
.add-year-control{
  right:330px!important;
  top:32px!important;
  width:44px!important;
  height:70px!important;
  display:grid!important;
  place-items:center;
  padding:0!important;
  border:1px solid var(--stitch-line)!important;
  border-radius:var(--stitch-radius)!important;
  background:rgba(1,15,31,.82)!important;
  color:var(--stitch-cyan)!important;
  font-size:27px!important;
  box-shadow:none!important;
}
.event-control select,
.year-control select,
.role-control select{
  width:100%!important;
  height:100%!important;
  padding:0 18px!important;
  border:1px solid var(--stitch-line)!important;
  border-radius:var(--stitch-radius)!important;
  background:rgba(1,15,31,.84)!important;
  color:var(--stitch-cyan)!important;
  font-family:"Space Grotesk",sans-serif!important;
  font-size:18px!important;
  outline:none;
}
.role-control{
  right:40px!important;
  top:32px!important;
  width:270px!important;
  height:70px!important;
}
.role-control::before{display:none!important}
.live-identity{
  right:40px!important;
  top:28px!important;
  width:270px!important;
  min-height:78px!important;
  padding:12px 12px 12px 18px!important;
  display:flex!important;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--stitch-line)!important;
  border-radius:var(--stitch-radius)!important;
  background:rgba(1,15,31,.8)!important;
  box-shadow:inset 0 0 18px rgba(94,212,255,.04)!important;
}
.live-identity.hidden{display:none!important}
.live-identity-copy{min-width:0}
.live-identity-copy strong{
  display:block;
  overflow:hidden;
  color:var(--stitch-gold)!important;
  font-family:"Space Grotesk",sans-serif;
  font-size:15px!important;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.live-identity-copy span{
  display:block;
  margin-top:4px;
  overflow:hidden;
  color:var(--stitch-muted)!important;
  font-size:12px!important;
  font-style:italic;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.live-signout{
  flex:0 0 38px;
  width:38px!important;
  height:38px!important;
  border:1px solid rgba(94,212,255,.35)!important;
  border-radius:50%!important;
  background:rgba(18,33,49,.8)!important;
  color:var(--stitch-cyan)!important;
}

/* Main content and panels */
.master-content{
  position:relative!important;
  inset:auto!important;
  z-index:10!important;
  width:100%!important;
  height:auto!important;
  min-height:calc(100vh - 160px);
  padding:0 40px 56px;
  overflow:visible!important;
}
.view{display:none!important}
.view.active{display:block!important}
.master-content>.view:not(#dashboard){
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  min-height:calc(100vh - 210px);
  padding:0!important;
  overflow:visible!important;
}
.card,
.panel,
.framed-panel,
.rail-panel{
  border:1px solid var(--stitch-line)!important;
  border-radius:var(--stitch-radius)!important;
  background:var(--stitch-panel)!important;
  box-shadow:0 18px 55px rgba(0,0,0,.22),inset 0 1px rgba(157,226,255,.04)!important;
  backdrop-filter:blur(14px)!important;
}
.card:hover,.panel:hover,.rail-panel:hover{border-color:rgba(94,212,255,.42)!important}

.stats-strip{
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  height:auto!important;
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:16px!important;
  padding:0!important;
  margin:0 0 32px!important;
  border:0!important;
  background:transparent!important;
}
.stat-card{
  position:relative;
  min-height:132px!important;
  padding:24px 18px!important;
  display:flex!important;
  flex-direction:row-reverse;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  border:1px solid var(--stitch-line)!important;
  border-radius:0!important;
  background:rgba(3,16,27,.72)!important;
  box-shadow:inset 0 0 24px rgba(94,212,255,.025)!important;
  backdrop-filter:blur(12px);
}
.stat-card:hover{border-color:rgba(94,212,255,.56)!important}
.stat-card>div:not(.stat-icon):not(.collection-ring){
  width:0!important;
  min-width:0!important;
  flex:1 1 0!important;
  overflow:hidden;
}
.stat-icon{width:50px!important;height:50px!important;opacity:.58}
.stat-icon img{width:50px!important;height:50px!important;object-fit:contain}
.stat-value{
  color:var(--stitch-text)!important;
  font-family:"Pirata One",Georgia,serif!important;
  font-size:31px!important;
  line-height:1!important;
  white-space:nowrap;
}
.stat-label{
  max-width:130px;
  margin-top:10px;
  color:var(--stitch-muted)!important;
  font-family:"Space Grotesk",sans-serif!important;
  font-size:12px!important;
  font-weight:600!important;
  line-height:1.35!important;
  text-align:left!important;
  white-space:normal!important;
  text-transform:uppercase;
}
.collection-ring{display:none!important}

.dashboard-content{
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  height:auto!important;
  display:grid!important;
  grid-template-columns:minmax(0,2.08fr) minmax(330px,.92fr)!important;
  gap:32px!important;
}
.members-ledger{
  height:auto!important;
  min-height:710px!important;
  padding:0!important;
  overflow:hidden!important;
}
.ledger-title{
  height:auto!important;
  min-height:78px;
  padding:24px 28px 10px!important;
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  border:0!important;
  background:transparent!important;
}
.ledger-title img{width:34px!important;height:34px!important;object-fit:contain}
.ledger-title h3,
.rail-heading,
.panel-head h3{
  margin:0!important;
  color:var(--stitch-cyan)!important;
  font-family:"Pirata One",Georgia,serif!important;
  font-size:30px!important;
  font-weight:400!important;
  letter-spacing:.04em;
  text-transform:uppercase;
  text-shadow:0 0 12px rgba(0,204,255,.42);
}
.ledger-toolbar{
  height:auto!important;
  min-height:72px;
  padding:0 28px 20px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  border-bottom:1px solid rgba(233,193,118,.18)!important;
}
.dashboard-view-label{
  color:var(--stitch-muted)!important;
  font-family:"Space Grotesk",sans-serif;
  font-size:12px!important;
  font-weight:600;
  letter-spacing:.16em;
}
.toolbar-search{display:flex!important;gap:10px!important}
.search-shell{position:relative!important;display:block!important}
.search-shell input,
.search,
.tools input,
.tools select,
.field input,
.field select,
.field textarea,
#settings select,
#settings input{
  min-height:48px!important;
  border:1px solid var(--stitch-line)!important;
  border-radius:2px!important;
  background:rgba(1,15,31,.9)!important;
  color:var(--stitch-text)!important;
  outline:none!important;
  box-shadow:none!important;
}
.search-shell input{padding:0 46px 0 16px!important}
.search-shell img{
  position:absolute!important;
  right:16px!important;
  left:auto!important;
  top:50%!important;
  width:18px!important;
  height:18px!important;
  transform:translateY(-50%);
  opacity:.7;
}
input:focus,select:focus,textarea:focus{
  border-color:var(--stitch-cyan-strong)!important;
  box-shadow:0 0 0 2px rgba(94,212,255,.12)!important;
}
.btn{
  min-height:44px;
  padding:0 18px!important;
  border:1px solid var(--stitch-line)!important;
  border-radius:2px!important;
  background:rgba(18,33,49,.88)!important;
  color:var(--stitch-text)!important;
  font-family:"Space Grotesk",sans-serif!important;
  font-size:13px!important;
  font-weight:600!important;
  letter-spacing:.02em;
  box-shadow:none!important;
  transition:transform .15s ease,border-color .15s ease,background .15s ease;
}
.btn:hover{border-color:var(--stitch-cyan)!important;transform:translateY(-1px)}
.btn.primary{
  border-color:var(--stitch-gold)!important;
  background:var(--stitch-gold)!important;
  color:#261900!important;
}
.btn.danger{border-color:rgba(255,91,98,.55)!important;color:#ff8b90!important;background:rgba(147,0,10,.22)!important}
.btn.small{min-height:34px!important;padding:0 11px!important;font-size:11px!important}
.filter-btn{width:50px!important;padding:0!important}
.filter-btn img{width:21px!important;height:21px!important}

.table-wrap{
  width:100%!important;
  overflow:auto!important;
  border:0!important;
  background:rgba(1,15,31,.2);
}
.table-wrap table,
.dashboard-table,
.roster-table,
.stowaway-table,
.meal-table{
  width:100%!important;
  min-width:880px!important;
  table-layout:fixed;
  border-collapse:collapse!important;
  color:var(--stitch-text)!important;
}
.dashboard-table{min-width:1120px!important}
.table-wrap th,
.dashboard-table th,
.roster-table th,
.stowaway-table th,
.meal-table th{
  height:68px!important;
  padding:12px 18px!important;
  border:0!important;
  border-bottom:1px solid rgba(233,193,118,.16)!important;
  background:rgba(28,43,60,.62)!important;
  color:var(--stitch-gold)!important;
  font-family:"Space Grotesk",sans-serif!important;
  font-size:12px!important;
  font-weight:700!important;
  letter-spacing:.04em;
  text-align:left!important;
  text-transform:uppercase;
}
.table-wrap td,
.dashboard-table td,
.roster-table td,
.stowaway-table td,
.meal-table td{
  height:76px!important;
  padding:12px 18px!important;
  border:0!important;
  border-top:1px solid rgba(134,147,153,.16)!important;
  background:rgba(1,15,31,.22);
  color:var(--stitch-text)!important;
  font-size:14px!important;
  vertical-align:middle;
}
.table-wrap tbody tr:nth-child(even) td{background:rgba(39,54,71,.1)}
.table-wrap tbody tr:hover td{background:rgba(0,204,255,.065)!important}
.member-avatar{width:38px!important;height:38px!important;border:1px solid rgba(94,212,255,.35)!important;border-radius:50%!important}
.member-cell{gap:14px!important}
.member-cell strong{font-size:15px!important}
.real-name-muted{color:var(--stitch-muted)!important;font-style:italic}
.money{font-family:"Space Grotesk",sans-serif!important;text-align:right!important;font-variant-numeric:tabular-nums}
.rank,
.status,
.feedback-pill,
.outstanding-category{
  border-radius:999px!important;
  font-family:"Space Grotesk",sans-serif!important;
  font-size:10px!important;
  font-weight:700!important;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.rank{padding:6px 12px!important;background:rgba(18,33,49,.8)!important}
.rank img{display:none!important}
.rank-council{border:1px solid #a85df5!important;color:#bd78ff!important;box-shadow:0 0 10px rgba(168,93,245,.22)}
.rank-member{border:1px solid var(--stitch-cyan)!important;color:var(--stitch-cyan)!important;box-shadow:0 0 10px rgba(94,212,255,.2)}
.rank-recruit{border:1px solid #49d58a!important;color:#72e7aa!important}
.ship-badge{color:var(--stitch-muted)!important}
.ship-badge img{width:18px!important;height:18px!important;filter:none!important}
.status{padding:5px 12px!important}
.status.good{color:#60e79c!important;border:1px solid rgba(73,213,138,.48)!important;background:rgba(30,110,67,.22)!important}
.status.bad{color:#ff8b90!important;border:1px solid rgba(255,91,98,.45)!important;background:rgba(147,0,10,.25)!important}
.status.partial{color:#ffc968!important;border:1px solid rgba(233,193,118,.48)!important;background:rgba(96,68,3,.36)!important}
.actions{display:flex!important;flex-wrap:wrap;gap:6px!important}

.ledger-footer{
  min-height:82px!important;
  height:auto!important;
  padding:18px 28px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px;
  border-top:1px solid rgba(233,193,118,.16)!important;
  background:rgba(13,28,45,.52)!important;
  color:var(--stitch-muted)!important;
  font-family:"Space Grotesk",sans-serif!important;
  font-size:12px!important;
}
.pagination{display:flex!important;gap:6px!important}
.page-pill,.page-nav{width:38px!important;height:38px!important;min-height:38px!important;padding:0!important}
.active-page{border-color:var(--stitch-cyan)!important;background:rgba(0,204,255,.18)!important;color:var(--stitch-cyan)!important}
.ledger-ornament{display:none!important}

.dashboard-rail{
  display:flex!important;
  flex-direction:column!important;
  gap:32px!important;
}
.rail-panel{
  height:auto!important;
  min-height:330px!important;
  padding:28px!important;
}
.rail-heading{
  display:flex!important;
  align-items:center!important;
  gap:13px!important;
  margin-bottom:24px!important;
  color:var(--stitch-gold)!important;
}
.rail-heading img{width:27px!important;height:27px!important;object-fit:contain}
.mini-list{display:flex!important;flex-direction:column!important}
.mini{
  min-height:54px!important;
  padding:12px 0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  border-bottom:1px solid rgba(233,193,118,.13)!important;
  font-family:"Space Grotesk",sans-serif;
}
.mini strong{color:var(--stitch-danger)!important;font-size:17px!important}
.rail-button{width:100%!important;margin-top:22px!important;border-color:var(--stitch-gold)!important;color:var(--stitch-gold)!important;background:transparent!important;text-transform:uppercase;letter-spacing:.14em}
.ship-row{
  min-height:86px!important;
  padding:16px 0!important;
  border-bottom:1px solid rgba(233,193,118,.13)!important;
}
.ship-icon{width:32px!important;height:32px!important}
.ship-progress{background:#273647!important}
.ship-progress i{background:var(--stitch-cyan)!important;box-shadow:0 0 10px rgba(94,212,255,.45)}

/* Section views */
.panel-head{
  min-height:92px!important;
  padding:22px 28px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px!important;
  border-bottom:1px solid rgba(233,193,118,.18)!important;
  background:rgba(13,28,45,.5)!important;
}
.panel-head h3{font-size:38px!important}
.tools{display:flex!important;align-items:center!important;justify-content:flex-end;gap:10px!important;flex-wrap:wrap}
.tools input.search{min-width:300px}
.roster-admin-panel,
.stowaway-admin-panel,
.meal-admin-panel,
.outstanding-ledger-panel{
  min-height:680px;
  overflow:hidden;
}
.roster-table{min-width:1340px!important}
.stowaway-table,.meal-table{min-width:960px!important}

.ops-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:28px!important;
}
.ops-card{
  min-height:176px!important;
  padding:30px!important;
  border-left:5px solid var(--stitch-cyan)!important;
}
.ops-card:nth-child(2){border-left-color:var(--stitch-gold)!important}
.ops-card:nth-child(3){border-left-color:#00a0c7!important}
.ops-card h3{
  margin:0 0 28px!important;
  color:var(--stitch-muted)!important;
  font-family:"Space Grotesk",sans-serif!important;
  font-size:15px!important;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.ops-card .count{
  color:var(--stitch-cyan)!important;
  font-family:"Pirata One",Georgia,serif!important;
  font-size:54px!important;
}

.calendar-grid{
  grid-template-columns:repeat(7,minmax(110px,1fr))!important;
  min-width:880px;
  background:rgba(1,15,31,.32);
}
.calendar-head{color:var(--stitch-gold)!important;background:rgba(28,43,60,.6)!important}
.calendar-day{min-height:118px!important;background:rgba(1,15,31,.38)!important;border-color:rgba(233,193,118,.13)!important}
.calendar-event{border-radius:3px!important}

.grid2{display:grid!important;grid-template-columns:minmax(0,1.45fr) minmax(330px,.8fr)!important;gap:28px!important}
.settings-grid{gap:28px!important}
.settings-card{padding:28px!important}
.settings-card h3{
  color:var(--stitch-gold)!important;
  font-family:"Pirata One",Georgia,serif!important;
  font-size:30px!important;
  font-weight:400!important;
  text-transform:uppercase;
}
.settings-card label,.field label{
  color:var(--stitch-muted)!important;
  font-family:"Space Grotesk",sans-serif!important;
  font-size:12px!important;
  font-weight:700!important;
  text-transform:uppercase;
}
.settings-readonly-note{
  border:1px solid var(--stitch-line)!important;
  background:rgba(96,68,3,.28)!important;
  color:var(--stitch-gold)!important;
}

/* Dialogs and gates */
.modal,.live-gate{
  background:rgba(0,8,16,.82)!important;
  backdrop-filter:blur(12px)!important;
}
.modal-card,.live-gate-card{
  border:1px solid var(--stitch-gold)!important;
  border-radius:8px!important;
  background:rgba(3,16,27,.96)!important;
  box-shadow:0 0 50px rgba(0,204,255,.15)!important;
  color:var(--stitch-text)!important;
}
.modal-card h3,.live-gate-card h1,.live-gate-card h2{
  color:var(--stitch-cyan)!important;
  font-family:"Pirata One",Georgia,serif!important;
  letter-spacing:.04em;
}
.live-gate-card>img{
  content:url("./phoenix-stitch-logo.png");
  object-fit:contain!important;
}
.toast{
  border:1px solid var(--stitch-gold)!important;
  background:rgba(3,16,27,.96)!important;
  color:var(--stitch-text)!important;
}
.live-status{display:none!important}
.mobile-menu{display:none!important}

/* Scrollbars */
*{scrollbar-width:thin;scrollbar-color:rgba(233,193,118,.7) rgba(1,15,31,.35)}
*::-webkit-scrollbar{width:8px;height:8px}
*::-webkit-scrollbar-track{background:rgba(1,15,31,.35)}
*::-webkit-scrollbar-thumb{background:rgba(233,193,118,.62);border-radius:10px}

/* Tablet and narrow desktop: preserve the Stitch structure and allow content to breathe. */
@media (max-width:1280px){
  :root{--stitch-sidebar:250px}
  .sidebar-brand{flex-basis:270px;background-size:132px 132px!important;background-position:center 24px!important}
  .sidebar-brand::before{top:168px;font-size:44px}
  .sidebar-brand::after{top:222px;font-size:13px}
  .master-nav button{min-height:56px!important;padding:0 20px!important;font-size:14px!important;gap:14px!important}
  .master-nav img{width:25px!important;height:25px!important}
  #pageTitle{font-size:36px;max-width:360px}
  .event-control{right:470px!important;width:120px!important}
  .year-control{right:348px!important;width:110px!important}
  .add-year-control{right:300px!important}
  .role-control,.live-identity{right:24px!important;width:260px!important}
  .master-content{padding-left:24px;padding-right:24px}
  .stitch-appbar{padding-left:24px;padding-right:24px}
  #pageTitle,#pageSub{left:24px}
  .stats-strip{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .dashboard-content{grid-template-columns:minmax(0,1fr)!important}
  .dashboard-rail{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media (min-width:821px) and (max-width:1100px){
  .stitch-appbar{height:220px}
  #pageTitle{top:24px;max-width:620px;font-size:34px}
  #pageSub{top:70px;max-width:620px}
  .event-control{left:24px!important;right:auto!important;top:124px!important;width:128px!important;height:58px!important}
  .year-control{left:162px!important;right:auto!important;top:124px!important;width:112px!important;height:58px!important}
  .add-year-control{left:284px!important;right:auto!important;top:124px!important;width:44px!important;height:58px!important}
  .role-control,.live-identity{left:auto!important;right:24px!important;top:116px!important;width:270px!important;min-height:72px!important;height:72px!important}
}

/* Mobile layout mirrors the Stitch package reflow: one column plus bottom navigation. */
@media (max-width:820px){
  :root{--stitch-sidebar:0px}
  html body{padding-bottom:76px!important}
  .phoenix-master-artwork{object-position:center center}
  .master-sidebar{
    position:fixed!important;
    inset:auto 0 0 0!important;
    width:100%!important;
    height:72px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    display:block!important;
    border:0!important;
    border-top:1px solid var(--stitch-line)!important;
    background:rgba(3,17,29,.96)!important;
  }
  .sidebar-brand,.sidebar-footer-art{display:none!important}
  .master-nav{
    width:max-content!important;
    min-width:100%!important;
    height:72px!important;
    display:flex!important;
    flex-direction:row!important;
    padding:0 6px!important;
    gap:2px!important;
  }
  .master-nav button{
    width:82px!important;
    min-width:82px!important;
    min-height:72px!important;
    padding:7px 4px!important;
    flex-direction:column!important;
    justify-content:center!important;
    gap:4px!important;
    font-size:9px!important;
  }
  .master-nav button::before{left:0;right:0;top:0;bottom:auto;width:auto;height:3px}
  .master-nav img{width:25px!important;height:25px!important}
  .master-workspace{width:100%!important;margin-left:0!important}
  .stitch-appbar{
    position:relative;
    height:auto;
    min-height:242px;
    padding:20px 16px;
    display:grid;
    grid-template-columns:minmax(0,1fr) 105px 44px;
    grid-template-rows:auto auto 52px 58px;
    gap:10px;
  }
  #pageTitle,#pageSub,
  .event-control,.year-control,.add-year-control,
  .role-control,.live-identity{
    position:relative!important;
    inset:auto!important;
  }
  #pageTitle{grid-column:1/-1;grid-row:1;font-size:32px;max-width:none}
  #pageSub{grid-column:1/-1;grid-row:2;font-size:11px;letter-spacing:.19em}
  .event-control{grid-column:1;grid-row:3;width:100%!important;height:52px!important}
  .year-control{grid-column:2;grid-row:3;width:100%!important;height:52px!important}
  .add-year-control{grid-column:3;grid-row:3;width:44px!important;height:52px!important}
  .live-identity,.role-control{grid-column:1/-1;grid-row:4;width:100%!important;min-height:58px!important;height:58px!important}
  .master-content{min-height:0;padding:0 12px 24px}
  .stats-strip{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin-bottom:16px!important}
  .stat-card{min-height:104px!important;padding:16px 12px!important}
  .stat-value{font-size:24px!important}
  .stat-icon,.stat-icon img{width:38px!important;height:38px!important}
  .dashboard-content{gap:16px!important}
  .dashboard-rail{display:flex!important}
  .rail-panel{padding:20px!important;min-height:260px!important}
  .ledger-title{padding:18px 18px 8px!important}
  .ledger-toolbar{padding:0 18px 16px!important;align-items:stretch!important;flex-direction:column!important;gap:12px}
  .toolbar-search{width:100%}
  .toolbar-search .search-shell{flex:1}
  .toolbar-search input{width:100%}
  .ledger-footer{align-items:flex-start!important;flex-direction:column!important}
  .pagination{order:3}
  .panel-head{align-items:flex-start!important;flex-direction:column!important;padding:18px!important}
  .panel-head h3{font-size:30px!important}
  .tools{width:100%;justify-content:flex-start}
  .tools input.search{min-width:0;width:100%}
  .ops-grid{grid-template-columns:1fr!important;gap:14px!important}
  .grid2{grid-template-columns:1fr!important}
  .calendar-grid{min-width:780px}
  .modal-card,.live-gate-card{width:calc(100% - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important}
  .field input,.field select,.field textarea{font-size:16px!important}
}

@media (max-width:430px){
  .stats-strip{grid-template-columns:1fr!important}
  .stat-card{min-height:86px!important}
  #pageTitle{font-size:28px}
}
