/* ==========================================================================
   BLK Swords Portal — canonical stylesheet
   Single active CSS source for login, administration and dashboard.
   Responsive layout is intentionally limited to 1199 / 899 / 599 / 419 px.
   ========================================================================== */

:root{
  --navy:#071a2f;
  --navy2:#0b2948;
  --gold:#f4c542;
  --text:#edf6ff;
}

*{box-sizing:border-box}

/* Login */
.login-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  background:
    linear-gradient(rgba(5,19,34,.35),rgba(5,19,34,.72)),
    url('../images/hero-bg.webp') center/cover fixed;
}
.login-card{
  width:min(420px,92vw);
  padding:34px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(7,26,47,.86);
  color:#edf6ff;
  backdrop-filter:blur(18px);
  box-shadow:0 30px 80px #0008;
  text-align:center;
}
.login-logo{width:155px;max-height:180px;object-fit:contain}
.login-card h1{margin:10px 0 26px;font:600 34px/1.2 Georgia,serif}
.field{
  width:100%;
  padding:15px 16px;
  border:1px solid #3d5875;
  background:#071a2f;
  color:#fff;
  font-size:16px;
  outline:none;
}
.btn{
  border:0;
  padding:14px 18px;
  background:#1769d3;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
.btn.full{width:100%;margin-top:12px}

/* Admin */
.admin{
  min-height:100vh;
  padding:28px;
  background:#eef3f8;
  color:#16283b;
}
.admin h1{margin:0}
.admin-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:18px 0;
}
.admin-card{
  padding:18px;
  border:1px solid #d6e0e9;
  background:#fff;
  box-shadow:0 8px 18px #16324f12;
}
.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}
.tabs a{
  padding:10px 13px;
  border:1px solid #d4dee8;
  background:#fff;
  color:#14304e;
  text-decoration:none;
}
.admin-table{width:100%;border-collapse:collapse;background:#fff}
.admin-table th,
.admin-table td{padding:10px;border-bottom:1px solid #e4ebf1;text-align:left}

/* Shared utility */
.notice{
  margin:12px 0;
  padding:12px;
  border:1px solid #edd87e;
  background:#fff5cf;
  color:#604c00;
}

/* ==========================================================================
   M1.49 CLEAN FRAME RESPONSIVE
   - M1.42 DOM preserved.
   - No M1.42 responsive stylesheet is loaded.
   - Approved hero-light.png is the only dashboard hero image.
   - Four visual table blocks stay separated.
   - Identity stays sticky; Score + Week + Events scroll together.
   ========================================================================== */

:root{
  --page-max:1500px;
  --content-max:1400px;
  --frame-pad:32px;
  --table-gap:10px;
  --row-h:32px;
  --head-h:40px;
  --id-w:200px;
  --score-w:200px;
  --week-w:170px;
  --event-w:96px;
  --ink:#183b5b;
  --muted:#7e96ab;
  --line:#d7e4ef;
  --line-soft:#e9f0f5;
  --panel:#fff;
  --header:#f5f8fb;
  --green:#1cb866;
  --red:#e74242;
  --amber:#e3a516;
}

/* Page / dashboard reset */
html,body{
  margin:0;
  max-width:100%;
  overflow-x:hidden;
  background:#fff;
  color:var(--ink);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.app-shell{
  position:relative;
  isolation:isolate;
  width:min(100%,var(--page-max));
  max-width:var(--page-max);
  min-height:100vh;
  margin-inline:auto;
  overflow:hidden;
  background:#fff;
  box-shadow:0 0 0 1px rgba(42,76,106,.06);
}

/* Decorative background layers */
.background-hero-window{
  position:absolute;
  inset:0 0 auto 0;
  width:100%;
  z-index:2;
  pointer-events:none;
  overflow:hidden;
}
.background-footer-window{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:230px;
  z-index:2;
  pointer-events:none;
  overflow:hidden;
}
.background-art{
  display:block;
  width:100%;
  max-width:none;
}
.background-art-top{
  height:auto;
  object-fit:contain;
  object-position:center top;
}
.background-art-bottom{
  position:absolute;
  left:0;
  bottom:0;
  height:230px;
  object-fit:cover;
  object-position:center bottom;
}

/* Hero */
.hero{
  --brand-logo-left:32px;
  --brand-logo-top:34px;
  --brand-logo-size:160px;
  --brand-gap:18px;
position:relative;
  /* Keep the header/profile dropdown above the dashboard table stacking context. */
  z-index:6;
  height:280px;
  min-height:280px;
  padding:0;
  margin:0;
  background:transparent;
  overflow:visible;
}
.hero-logo{
  position:absolute;
left:var(--brand-logo-left);
  top:var(--brand-logo-top);
  width:var(--brand-logo-size);
  height:var(--brand-logo-size);
}
.brand{
  position:absolute;
left:calc(var(--brand-logo-left) + var(--brand-logo-size) + var(--brand-gap));
  top:calc(var(--brand-logo-top) + (var(--brand-logo-size) / 2));
  transform:translateY(-50%);
  margin:0;
  padding:0;
}
.brand h1{
  margin:0;
  color:#173d68;
  font:700 48px/1 Georgia,serif;
  letter-spacing:-.02em;
  text-shadow:none;
  white-space:nowrap;
}
.brand p{
  margin:10px 0 0;
  color:#315d84;
  font-size:9.5px;
  font-weight:700;
  letter-spacing:.27em;
  white-space:nowrap;
}

/* Clickable profile */
.profile-wrap{
  position:absolute;
  top:14px;
  right:max(32px,calc((100% - var(--content-max))/2));
  z-index:999;
}
.profile{
  position:static;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:6px 11px;
  border:1px solid #d5e2ec;
  border-radius:10px;
  background:rgba(255,255,255,.96);
  color:#173c5d;
  font-weight:750;
  box-shadow:0 7px 20px rgba(32,70,105,.11);
  cursor:pointer;
}
.profile-avatar,.profile-menu-avatar{
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#164f7e;
  color:#fff;
}
.profile-avatar{width:26px;height:26px;font-size:11px;overflow:hidden}
.profile-avatar img,.profile-menu-avatar img{width:100%;height:100%;display:block;object-fit:cover}
.profile-name{font-size:12px}
.profile-caret{font-size:10px}
.profile-menu{
  display:none;
  position:absolute;
  top:48px;
  right:0;
  min-width:205px;
  overflow:hidden;
  border:1px solid #dbe7f1;
  border-radius:10px;
  background:#fff;
  color:#23435f;
  box-shadow:0 14px 38px rgba(25,55,85,.18);
  z-index:999;
}
.profile-wrap.open .profile-menu{display:block}
.profile-menu-head{display:flex;align-items:center;gap:9px;padding:10px 11px;border-bottom:1px solid #edf2f6;background:#fbfdff}
.profile-menu-avatar{width:28px;height:28px;overflow:hidden}
.profile-menu-head strong{display:block;font-size:12px}
.profile-menu-head small{display:block;margin-top:2px;color:#7c91a4;font-size:10px}
.profile-menu-item{display:flex;align-items:center;gap:9px;height:35px;padding:0 12px;color:#23435f;text-decoration:none;background:#fff;border:0;cursor:pointer;font-size:11.5px}
.profile-menu-item:hover{background:#f3f8fc}
.profile-menu-icon{width:19px;text-align:center;color:#467399}
.profile-menu-logout{border-top:1px solid #edf2f6}
.profile-file-input{display:none}

/* One shared content frame for controls, results, footer */
.hero-stats,.main,.page-footer-copy{
  width:min(calc(100% - (2 * var(--frame-pad))),var(--content-max));
  max-width:var(--content-max);
  margin-inline:auto;
}

/* Desktop header frame = exact thirds */
.hero-stats{
  position:absolute;
  left:50%;
  right:auto;
  bottom:10px;
  transform:translateX(-50%);
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-areas:"search kpis date";
  gap:16px;
  align-items:center;
  min-width:0;
  overflow:visible;
}
.hero-search{
  grid-area:search;
  justify-self:start;
  display:flex;
  align-items:center;
  gap:8px;
  width:min(100%,280px);
  min-width:0;
  height:44px;
  padding:0 13px;
  border:1px solid #d2e1ed;
  border-radius:10px;
  background:rgba(255,255,255,.96);
  box-shadow:0 4px 16px rgba(35,72,105,.07);
}
.hero-search-icon{color:#24679e;font-size:17px}
.hero-search .search{
  width:100%;
  min-width:0;
  padding:0;
  border:0;
  outline:0;
  background:transparent;
  color:#294a68;
  font-size:12px;
}
.hero-search .search::placeholder{color:#86a0b8}

.kpi-cluster{
  grid-area:kpis;
  justify-self:stretch;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  width:100%;
  min-width:0;
}
.stat-card,.week-card{
  height:44px;
  border:1px solid #cfe0ed;
  border-radius:10px;
  background:rgba(255,255,255,.96);
  color:var(--ink);
  box-shadow:0 4px 16px rgba(35,72,105,.07);
}
.stat-card{
  display:grid;
  grid-template-columns:30px minmax(0,1fr);
  align-items:center;
  gap:8px;
  width:100%;
  min-width:0;
  max-width:none;
  padding:0 10px;
  margin:0;
}
.stat-icon{
  position:relative;
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border:1px solid #d5e5f1;
  border-radius:7px;
  background:#f0f7fc;
  color:#176aa7;
}
.stat-icon svg,.event-upload svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}
.stat-badge{position:absolute;right:-5px;top:-7px;display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:#e34444;color:#fff;font-size:9px;font-weight:800}
.stat-value{font-size:16px;line-height:1;font-weight:750;color:#173f63}
.stat-label{margin-top:2px;color:#6f879e;font-size:10.5px;line-height:1.1;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.week-card{
  grid-area:date;
  justify-self:end;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 34px;
  align-items:center;
  gap:8px;
  width:min(100%,350px);
  min-width:0;
  padding:0 8px;
}
.week-main{min-width:0;text-align:center;white-space:nowrap}
.week-main b{display:block;overflow:hidden;text-overflow:ellipsis;color:#173f63;font-size:12.5px;line-height:1.05}
.week-arrow{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid #d3e3ef;border-radius:7px;background:#f7fbfe;color:#216398;font-size:22px;line-height:1;cursor:pointer}

/* Main/results */
.main{
  position:relative;
  z-index:5;
  margin-top:0;
  padding:0 0 28px;
  overflow:visible;
}
.panel{
  width:100%;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  overflow:visible;
}

/* One horizontal viewport. Four distinct visual panels. */
.performance-scroll{
  position:relative;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:visible;
  padding:0 0 8px;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  scrollbar-width:thin;
  scrollbar-color:#b8cad9 #eef4f8;
}
.performance-scroll::-webkit-scrollbar{height:8px}
.performance-scroll::-webkit-scrollbar-track{background:#eef4f8;border-radius:999px}
.performance-scroll::-webkit-scrollbar-thumb{background:#b8cad9;border:2px solid #eef4f8;border-radius:999px}

.performance-grid{
  position:relative;
  isolation:isolate;
  display:grid;
  grid-template-columns:var(--id-w) var(--score-w) var(--week-w) max-content;
  gap:var(--table-gap);
  align-items:start;
  width:max-content;
  min-width:max-content;
  max-width:none;
  margin:0;
  padding:0;
  overflow:visible;
}
.table-block{
  position:relative;
  overflow:hidden;
  border:1px solid #d5e3ee;
  border-radius:9px;
  background:rgba(255,255,255,.97);
  box-shadow:0 7px 22px rgba(30,65,96,.06);
  z-index:4;
}
.identity-block{
  position:sticky;
  left:0;
  z-index:40;
  width:var(--id-w);
  min-width:var(--id-w);
  box-shadow:9px 0 18px -15px rgba(29,61,91,.65),0 7px 22px rgba(30,65,96,.06);
}
.score-block{width:var(--score-w);min-width:var(--score-w)}
.week-block{width:var(--week-w);min-width:var(--week-w)}
.events-block{width:max-content;min-width:max-content}
.events-scroll{width:max-content;max-width:none;overflow:visible}

.split-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  color:var(--ink);
  background:#fff;
  font-size:12px;
}
.split-table th,.split-table td{
  height:var(--row-h);
  min-height:var(--row-h);
  max-height:var(--row-h);
  padding:0 8px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line-soft);
  text-align:center;
  vertical-align:middle;
  white-space:nowrap;
  background:rgba(255,255,255,.98);
}
.split-table th:last-child,.split-table td:last-child{border-right:0}
.split-table thead th{
  height:var(--head-h);
  min-height:var(--head-h);
  max-height:var(--head-h);
  color:#1a4264;
  background:var(--header);
  border-bottom:1px solid #cbdce8;
  font-size:11.5px;
  font-weight:700;
  line-height:1.05;
}
.split-table td.nick{text-align:left;font-weight:650}
.member-avatar{display:inline-grid;place-items:center;width:24px;height:24px;margin-right:8px;border:1px solid #cadce8;border-radius:50%;background:#edf5fa;color:#456681;font-size:9px;font-weight:700;vertical-align:middle}
.nick-label{display:inline-block;max-width:calc(var(--id-w) - 82px);overflow:hidden;text-overflow:ellipsis;vertical-align:middle}

.score-table th{background:#f3f7fb}
.score-flex{
  display:grid;
  grid-template-columns:50px minmax(72px,1fr);
  gap:10px;
  align-items:center;
  width:100%;
  min-width:0;
}
.score-num{
  width:auto;
  min-width:0;
  margin:0;
  padding:0;
  color:#294765;
  font-size:12px;
  font-weight:500;
  text-align:right;
  white-space:nowrap;
}
.bar{
  display:block;
  width:100%;
  min-width:0;
  height:7px;
  margin:0;
  overflow:hidden;
  border-radius:999px;
  background:#e6eef4;
}
.bar>i{display:block;height:100%;border-radius:inherit}
.bar-green{background:linear-gradient(90deg,#1dbd68,#55d98c)}
.bar-amber{background:linear-gradient(90deg,#e9a512,#ffd45a)}
.bar-red{background:linear-gradient(90deg,#ff6c58,#f0444b)}

.week-good{color:#117349;font-weight:600;background:#fff}
.week-mid{color:#80600a;font-weight:600;background:#fff}
.week-bad{color:#b33236;font-weight:600;background:#fff}

.events-table{
  width:max-content;
  min-width:calc(6 * var(--event-w));
}
.events-table th,.events-table td{
  width:var(--event-w);
  min-width:var(--event-w);
}
.events-table thead th span{display:inline-block;margin-top:3px;color:#8aa0b5;font-size:9.5px;font-weight:600}
.events-table td.over{color:#176d50;background:#f6fcf8;font-weight:600}
.events-table td.under{color:#d33f3f;background:#fff2f2;font-weight:600}
.events-table td.mid{color:#7a6200;background:#f8ff0f03;font-weight:600}
.screenshot-missing{background:#fffaf0}
.event-upload{display:inline-grid;place-items:center;width:30px;height:24px;padding:0;border:1px solid #edb33b;border-radius:7px;background:#fff9e8;color:#db9510;cursor:pointer}

/* SWORD cells themselves: content/background. Continuous border is JS line. */
.split-table tbody tr.sword td{
  position:relative;
  z-index:14;
  color:#795706;
  font-weight:700;
  background:rgba(255,247,220,.88);
  border-top:0;
  border-bottom:0;
  box-shadow:none;
}
.split-table tbody tr.sword td>*{position:relative;z-index:15;opacity:1}
.sword-reference-line{
  position:absolute;
  left:3px;
  right:3px;
  height:var(--row-h);
  z-index:50;
  border:1px solid #dfa92d;
  border-radius:7px;
  background:transparent;
  box-shadow:0 0 8px rgba(223,166,34,.16);
  pointer-events:none;
}

/* Footer */
.page-footer-copy{
  position:relative;
  z-index:5;
  min-height:120px;
  padding:34px 8px 10px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:end;
  gap:16px;
  color:#55718b;
  font-size:9px;
  letter-spacing:.13em;
}
.page-footer-copy>span:last-child{text-align:right}
.footer-quote{
  font:italic 13px/1.5 Georgia,serif;
  color:#173a5c;
  text-shadow:
    0 1px 1px rgba(255,255,255,.95),
    0 1px 3px rgba(20,50,80,.18);
  background:rgba(255,255,255,.26);
  backdrop-filter:blur(3px);
  border-radius:12px;
  padding:4px 14px 5px;
}
.footer-quote small{
  font-size:11px;
  color:#244b6e;
}
.modal label{color:#5f7990}
.modal select,.modal input{background:#fff;color:#183b5b;border:1px solid #cfdeea}

/* TABLET / COMPACT DESKTOP */
@media (max-width:1199px){
  :root{
    --frame-pad:20px;
    --id-w:210px;
    --score-w:180px;
    --week-w:165px;
    --event-w:100px;
  }
  .hero{height:320px;min-height:320px}
  .hero-logo{left:20px;width:110px;height:126px}
  .brand{left:145px;top:32px}
  .brand h1{font-size:41px}
  .brand p{font-size:8.8px}
  .profile-wrap{right:20px}

  .hero-stats{
    bottom:10px;
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-areas:"search date" "kpis kpis";
    gap:10px 12px;
  }
  .hero-search,.week-card{width:100%;max-width:none;justify-self:stretch}
  .kpi-cluster{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* TABLET */
@media (max-width:899px){
  :root{
    --frame-pad:16px;
    --table-gap:8px;
    --id-w:180px;
    --score-w:150px;
    --week-w:150px;
    --event-w:92px;
  }
  .hero{height:300px;min-height:300px}
  .background-art-top{object-position:58% top}
  .hero-logo{left:16px;top:6px;width:98px;height:114px}
  .brand{left:126px;top:30px}
  .brand h1{font-size:37px}
  .brand p{font-size:8px}
  .profile-wrap{right:16px;top:10px}
  .hero-stats{bottom:8px;gap:8px 10px}
  .kpi-cluster{gap:8px}
}

/* MOBILE */
@media (max-width:599px){
  :root{
    --frame-pad:12px;
    --id-w:155px;
    --score-w:132px;
    --week-w:145px;
    --event-w:88px;
  }
  .hero{height:265px;min-height:265px}
  .background-art-top{object-position:68% top}
  .hero-logo{left:12px;top:6px;width:82px;height:96px}
  .brand{left:104px;top:29px}
  .brand h1{font-size:29px}
  .brand p{display:none}
  .profile-wrap{right:12px;top:9px}
  .profile{min-height:38px;padding:5px 8px}
  .profile-name{max-width:88px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  .hero-stats{
    bottom:8px;
    grid-template-columns:1fr;
    grid-template-areas:"date" "kpis";
    gap:8px;
  }
  .hero-search{display:none}
  .week-card{width:100%;max-width:none;height:42px}
  .kpi-cluster{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  .stat-card{height:42px;padding:0 6px}
  .stat-label{font-size:9px}
  .score-flex{grid-template-columns:44px minmax(62px,1fr);gap:8px}
  .page-footer-copy{grid-template-columns:1fr;justify-items:center;text-align:center}
  .page-footer-copy>span:first-child{display:none}
  .page-footer-copy>span:last-child{text-align:center}
}

@media (max-width:419px){
  :root{
    --id-w:150px;
    --score-w:126px;
    --week-w:138px;
    --event-w:84px;
  }
  .hero-logo{width:76px;height:90px}
  .brand{left:96px}
  .brand h1{font-size:26px}
  .profile-name{display:none}
  .kpi-cluster{gap:5px}
  .stat-card{padding:0 4px}
  .stat-icon{width:24px;height:24px}
  .stat-value{font-size:13px}
  .stat-label{font-size:8.5px}
  .score-flex{grid-template-columns:42px minmax(58px,1fr);gap:7px}
}

/* DESKTOP FRAME LOCK — current approved geometry */
@media (min-width:1200px){
  .identity-block{
    width:200px;
    min-width:200px;
  }

  .identity-table .rank-head,
  .identity-table tbody td:first-child{
    width:40px;
    min-width:40px;
    max-width:40px;
  }

  .identity-table .nickname-head,
  .identity-table tbody td:nth-child(2){
    width:160px;
    min-width:160px;
    max-width:160px;
  }

  .performance-grid{
    width:100%;
    min-width:1200px;
    grid-template-columns:
      200px
      var(--score-w)
      var(--week-w)
      minmax(600px,1fr);
  }

  .events-block,
  .events-scroll,
  .events-table{
    width:100%;
  }

  .events-block,
  .events-scroll,
  .events-table{
    min-width:600px;
    max-width:none;
  }
}


/* STABILITY / ACCESSIBILITY FREEZE */
img{
  max-width:100%;
}

button,
input,
select,
a{
  font:inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible{
  outline:2px solid #2d78ad;
  outline-offset:2px;
}

.hero-search:focus-within,
.week-card:focus-within{
  border-color:#9bc1dc;
  box-shadow:0 0 0 3px rgba(45,120,173,.10),0 4px 16px rgba(35,72,105,.07);
}

.week-arrow,
.event-upload,
.profile{
  touch-action:manipulation;
}

@media (prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    scroll-behavior:auto;
    transition-duration:.01ms;
    animation-duration:.01ms;
    animation-iteration-count:1;
  }
}



/* ==========================================================================
   M1.58 — modal visibility correction
   Keep upload form out of normal document flow; show only as fullscreen modal.
   ========================================================================== */
.modal-backdrop{
  position:fixed;
  inset:0;
  display:none;
  place-items:center;
  z-index:999;
  padding:20px;
  background:rgba(7,26,47,.42);
  backdrop-filter:blur(2px);
}

.modal-backdrop.open{
  display:grid;
}


/* ==========================================================================
   M1.58 — page bottom spacing correction
   The table itself does not own footer spacing.
   Keep exactly 40px of page space below the results area while the footer art
   remains a background layer behind that region.
   ========================================================================== */
.main{
  padding-bottom:92px;
}

.performance-scroll{
  margin-bottom:0;
}

/* M1.59 — footer copy removed from document flow */
.page-footer-copy{
  position:absolute;
  left:0;
  right:0;
  bottom:24px;
  min-height:0;
  padding:0 40px;
  z-index:6;
}


/* M1.61 — unified responsive brand geometry */
@media (max-width:1199px){
  .hero{
    --brand-logo-left:20px;
    --brand-logo-top:36px;
    --brand-logo-size:140px;
    --brand-gap:16px;
  }
}

@media (max-width:899px){
  .hero{
    --brand-logo-left:16px;
    --brand-logo-top:38px;
    --brand-logo-size:120px;
    --brand-gap:14px;
  }
}

@media (max-width:599px){
  .hero{
    --brand-logo-left:12px;
    --brand-logo-top:34px;
    --brand-logo-size:96px;
    --brand-gap:12px;
  }
}

@media (max-width:419px){
  .hero{
    --brand-logo-left:12px;
    --brand-logo-top:38px;
    --brand-logo-size:88px;
    --brand-gap:10px;
  }
}


/* M1.62 — canonical brand alignment */
.hero-logo{
  position:absolute;
  left:var(--brand-logo-left);
  top:var(--brand-logo-top);
  width:var(--brand-logo-size);
  height:var(--brand-logo-size);
}

.brand{
  position:absolute;
  left:calc(var(--brand-logo-left) + var(--brand-logo-size) + var(--brand-gap));
  top:calc(var(--brand-logo-top) + (var(--brand-logo-size) / 2));
  transform:translateY(-50%);
}

/* ==========================================================================
   M2.1 — TABLE INTERACTION + SEARCH UX
   Step 2 begins here. No baseline layout geometry is changed.
   ========================================================================== */

/* Search clear control and no-results message are injected by portal.js. */
.hero-search{
  position:relative;
}

.hero-search .search{
  padding-right:26px;
}

.search-clear{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  display:none;
  width:26px;
  height:26px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#587794;
  font:600 16px/26px Arial,sans-serif;
  text-align:center;
  cursor:pointer;
}

.hero-search.has-query .search-clear{
  display:block;
}

.search-clear:hover{
  background:rgba(42,104,151,.08);
  color:#214d70;
}

.search-clear:focus-visible{
  outline:2px solid #2d78ad;
  outline-offset:1px;
}

.search-empty-state{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 7px);
  z-index:80;
  display:none;
  padding:9px 12px;
  border:1px solid #d6e4ef;
  border-radius:9px;
  background:rgba(255,255,255,.98);
  color:#58718a;
  box-shadow:0 8px 22px rgba(35,72,105,.12);
  font-size:11px;
  text-align:left;
  pointer-events:none;
}

.hero-search.no-results .search-empty-state{
  display:block;
}

/* Linked row feedback is intentionally drawn with inset lines so existing
   green/red/gold result backgrounds remain unchanged. */
.split-table tbody tr[data-player-key] td{
  transition:box-shadow .12s ease, filter .12s ease;
}

.split-table tbody tr.is-hovered td{
  box-shadow:
    inset 0 1px rgba(41,112,163,.28),
    inset 0 -1px rgba(41,112,163,.28);
  filter:brightness(.985);
}

.split-table tbody tr.is-selected td{
  box-shadow:
    inset 0 2px rgba(28,94,143,.48),
    inset 0 -2px rgba(28,94,143,.48);
}

.identity-table tbody tr[data-player-key]:not(.sword){
  cursor:pointer;
}

.identity-table tbody tr[data-player-key]:not(.sword):focus-visible{
  outline:2px solid #2d78ad;
  outline-offset:-2px;
}

/* SWORD is a fixed benchmark, never an interactive member row. */
.split-table tbody tr.sword{
  cursor:default;
}

@media (prefers-reduced-motion:reduce){
  .split-table tbody tr[data-player-key] td{
    transition:none;
  }
}

/* ==========================================================================
   M2.2 — UPLOAD UX + MODAL ACCESSIBILITY
   ========================================================================== */

.modal-backdrop{
  align-items:center;
  justify-items:center;
  overflow:auto;
}

.modal-backdrop.open{
  display:grid;
}

.modal{
  width:min(520px,calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  overflow:auto;
  padding:22px;
  border:1px solid #d4e2ed;
  border-radius:16px;
  background:#fff;
  color:#173a5c;
  box-shadow:0 24px 70px rgba(7,26,47,.28);
}

.modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.modal-head h3{
  margin:0 0 4px;
  color:#173a5c;
  font-size:20px;
  line-height:1.2;
}

.modal-player{
  color:#607d97;
  font-size:12px;
}

.modal-player b{
  color:#214968;
}

.modal-close{
  flex:0 0 auto;
  width:34px;
  height:34px;
  border:0;
  border-radius:9px;
  background:#eef5fa;
  color:#315d7d;
  font:500 22px/1 Arial,sans-serif;
  cursor:pointer;
}

.modal-close:hover{
  background:#e1edf5;
}

.modal-field{
  display:grid;
  gap:6px;
  margin-bottom:14px;
}

.modal-field label{
  color:#214968;
  font-size:12px;
  font-weight:700;
}

.modal-field label small{
  font-weight:500;
  color:#7890a4;
}

.modal-field input,
.modal-field select{
  width:100%;
  min-width:0;
  height:42px;
  padding:0 11px;
  border:1px solid #cdddea;
  border-radius:9px;
  background:#fff;
  color:#173a5c;
  outline:0;
}

.modal-field input:focus,
.modal-field select:focus{
  border-color:#6ea8cf;
  box-shadow:0 0 0 3px rgba(45,120,173,.10);
}

.modal-field input.is-invalid,
.modal-field select.is-invalid{
  border-color:#d94a4a;
  box-shadow:0 0 0 3px rgba(217,74,74,.09);
}

.field-help{
  color:#7a90a4;
  font-size:10px;
  line-height:1.35;
}

.file-picker{
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:5px 10px 5px 5px;
  border:1px solid #cdddea;
  border-radius:9px;
  background:#fff;
}

.file-picker:focus-within{
  border-color:#6ea8cf;
  box-shadow:0 0 0 3px rgba(45,120,173,.10);
}

.file-picker input[type="file"]{
  width:118px;
  height:30px;
  padding:0;
  border:0;
  border-radius:7px;
  font-size:0;
  cursor:pointer;
}

.file-picker input[type="file"]::file-selector-button{
  height:30px;
  margin:0;
  padding:0 11px;
  border:0;
  border-radius:7px;
  background:#e8f2f8;
  color:#245576;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}

.file-name{
  overflow:hidden;
  color:#617b91;
  font-size:11px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.modal-feedback{
  display:none;
  min-height:34px;
  margin:4px 0 12px;
  padding:8px 10px;
  border-radius:8px;
  font-size:11px;
  line-height:1.4;
}

.modal-feedback.is-error{
  display:block;
  background:#fff0ee;
  color:#b53030;
}

.modal-feedback.is-success{
  display:block;
  background:#edf8f3;
  color:#126a4b;
}

.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:4px;
}

.modal-actions .btn{
  min-width:96px;
  height:40px;
  margin:0;
  border-radius:9px;
}

.modal-cancel{
  background:#e9f0f5;
  color:#35546b;
}

.modal-submit{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:#1769d3;
}

.modal-submit[disabled]{
  opacity:.68;
  cursor:wait;
}

.submit-spinner{
  display:none;
  width:14px;
  height:14px;
  border:2px solid rgba(255,255,255,.45);
  border-top-color:#fff;
  border-radius:50%;
  animation:modal-spin .7s linear infinite;
}

.modal.is-submitting .submit-spinner{
  display:inline-block;
}

@keyframes modal-spin{
  to{transform:rotate(360deg)}
}

.notice-success{
  border-color:#b9dfcf;
  background:#eff9f4;
  color:#126a4b;
}

body.modal-open{
  overflow:hidden;
}

@media (max-width:599px){
  .modal-backdrop{
    padding:12px;
  }

  .modal{
    width:100%;
    max-height:calc(100vh - 24px);
    padding:17px;
    border-radius:13px;
  }

  .modal-head{
    margin-bottom:15px;
  }

  .modal-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  .modal-actions .btn{
    width:100%;
    min-width:0;
  }
}

@media (prefers-reduced-motion:reduce){
  .submit-spinner{
    animation-duration:1.4s;
  }
}

/* ==========================================================================
   M2.4 — FUNCTIONAL ADMIN CORE
   ========================================================================== */
.admin{
  max-width:1500px;
  margin:0 auto;
}
.admin-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}
.admin-topbar h1{margin:0 0 4px}
.admin-back{
  padding:10px 13px;
  border:1px solid #d4dee8;
  border-radius:9px;
  background:#fff;
  color:#14304e;
  text-decoration:none;
}
.admin-kpi{
  margin-top:8px;
  color:#173a5c;
  font-size:28px;
  font-weight:700;
}
.admin-kpi-role{font-size:18px}
.admin-section{
  margin-top:15px;
}
.admin-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:12px;
}
.admin-section-head h2{margin:0 0 4px}
.admin-section-head p{
  margin:0;
  color:#71869a;
  font-size:12px;
}
.admin-table-scroll{
  width:100%;
  overflow-x:auto;
}
.admin-table th{
  color:#536d83;
  font-size:11px;
  white-space:nowrap;
}
.admin-table td{
  vertical-align:middle;
  font-size:12px;
}
.admin-table td form{display:contents}
.admin-input{
  width:100%;
  min-width:96px;
  height:34px;
  padding:0 8px;
  border:1px solid #cfdce7;
  border-radius:7px;
  background:#fff;
  color:#173a5c;
}
.admin-number{min-width:120px}
.admin-sort{min-width:68px;width:68px}
.admin-check{
  display:inline-flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}
.admin-btn{
  min-width:66px;
  padding:8px 10px;
  border-radius:7px;
  font-size:11px;
}
.admin-btn-correct{background:#a46f16}
.admin-btn-reject{background:#b84444}
.admin-review-actions{
  display:flex;
  gap:5px;
  white-space:nowrap;
}
.admin-protected,
.admin-code{
  display:block;
  margin-top:3px;
  color:#8999a8;
  font-size:9px;
  font-weight:500;
}
.admin-protected{color:#976e1a}
.admin-status{
  display:inline-flex;
  padding:4px 7px;
  border-radius:999px;
  background:#edf2f6;
  color:#536b7e;
  font-size:10px;
  text-transform:capitalize;
}
.admin-status-pending{background:#fff5d9;color:#8a6512}
.admin-status-approved{background:#eaf7f0;color:#146346}
.admin-status-corrected{background:#eef2ff;color:#3d5191}
.admin-status-rejected{background:#fff0ee;color:#a83232}
.admin-placeholder{
  padding:18px;
  border:1px dashed #cad9e4;
  border-radius:10px;
  background:#f8fbfd;
  color:#61798e;
  font-size:12px;
}
@media (max-width:899px){
  .admin{padding:18px}
  .admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:599px){
  .admin{padding:12px}
  .admin-topbar{align-items:flex-start;flex-direction:column}
  .admin-grid{grid-template-columns:1fr 1fr;gap:8px}
  .admin-review-actions{flex-direction:column}
}

/* ==========================================================================
   M2.6 — ADMIN WORKFLOW & PERMISSION HARDENING
   ========================================================================== */
.admin-input.is-invalid{
  border-color:#d94a4a;
  box-shadow:0 0 0 3px rgba(217,74,74,.09);
}

.admin-action-locked{
  display:inline-flex;
  padding:5px 8px;
  border-radius:999px;
  background:#eef2f6;
  color:#71869a;
  font-size:10px;
  font-weight:600;
}

form[data-admin-form][data-submitting="1"]{
  opacity:.78;
}

form[data-admin-form] button:disabled{
  cursor:wait;
  opacity:.62;
}

.admin-audit-change{
  max-width:520px;
  min-width:260px;
  white-space:normal;
}

.admin-audit-change code{
  display:inline-block;
  max-width:220px;
  overflow:hidden;
  padding:3px 5px;
  border-radius:5px;
  background:#f4f7f9;
  color:#50677b;
  font:10px/1.35 ui-monospace,SFMono-Regular,Menlo,monospace;
  text-overflow:ellipsis;
  vertical-align:middle;
  white-space:nowrap;
}

.admin-audit-change span{
  margin:0 5px;
  color:#91a2b0;
}

@media (max-width:899px){
  .admin-audit-change{
    min-width:220px;
  }
}


/* ==========================================================================
   M3.2 — ADMIN PORTAL COMPLETE UX + SECURE LOGIN
   ========================================================================== */

.member-login-page,.admin-login-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  position:relative;
  overflow:hidden;
}
.member-login-page{
  background:
    linear-gradient(rgba(255,255,255,.18),rgba(244,249,255,.56)),
    url('../images/member-login-bg.webp') center/cover no-repeat;
  color:#123454;
}
.member-login-page::after{
  content:"";
  position:absolute;inset:auto 0 0;height:32%;
  background:linear-gradient(transparent,#f7fbff);
  pointer-events:none;
}
.login-brand,.admin-login-brand{
  position:absolute;top:34px;left:50%;transform:translateX(-50%);
  display:flex;align-items:center;gap:12px;z-index:2;
}
.login-brand img,.admin-login-brand img{width:52px;height:52px;object-fit:contain}
.login-brand div,.admin-login-brand{letter-spacing:.12em}
.login-brand strong,.admin-login-brand strong{display:block;font-size:18px;white-space:nowrap}
.login-brand small,.admin-login-brand small{display:block;font-size:8px;letter-spacing:.35em;text-align:center;margin-top:4px}
.member-login-card,.admin-login-card{
  position:relative;z-index:2;width:min(360px,calc(100vw - 32px));
  border-radius:16px;padding:26px;box-shadow:0 24px 70px rgba(15,45,76,.18);
}
.member-login-card{background:rgba(255,255,255,.91);border:1px solid rgba(174,198,220,.7);backdrop-filter:blur(14px)}
.member-login-card h1,.admin-login-card h1{margin:0;text-align:center;font-size:24px}
.member-login-card>p{margin:7px 0 20px;text-align:center;color:#6d8397;font-size:12px}
.login-field{display:block;margin:12px 0}.login-field span{display:block;font-size:11px;font-weight:700;margin:0 0 6px}
.login-field input,.login-field select{
  width:100%;height:46px;border:1px solid #c9d8e7;border-radius:9px;background:#fff;padding:0 13px;color:#173b5d;outline:none;
}
.login-field input:focus{border-color:#2685ee;box-shadow:0 0 0 3px rgba(38,133,238,.11)}
.login-primary,.login-secondary{
  width:100%;height:46px;border-radius:9px;font-weight:700;cursor:pointer;margin-top:10px;
}
.login-primary{border:0;background:#1684f4;color:#fff}
.login-secondary{border:1px solid #bdd0e1;background:#fff;color:#173b5d}
.login-error{padding:10px 12px;border-radius:8px;background:#fff0ee;color:#a93232;font-size:12px;margin:12px 0}
.login-instructions{max-width:420px;border:0;border-radius:14px;padding:26px;box-shadow:0 30px 80px rgba(0,0,0,.25)}
.login-instructions::backdrop{background:rgba(7,22,39,.48)}
.login-instructions>button{position:absolute;right:14px;top:10px;border:0;background:none;font-size:24px;cursor:pointer}

.admin-login-page{
  background:
    linear-gradient(rgba(3,14,26,.64),rgba(3,14,26,.78)),
    url('../images/hero-bg.png') center/cover no-repeat;
  color:#eef6ff;
}
.admin-login-brand{color:#fff;flex-direction:column;gap:2px}
.admin-login-brand img{width:58px;height:58px}
.admin-login-card{
  background:rgba(6,21,37,.91);border:1px solid rgba(108,149,188,.42);
  box-shadow:0 28px 80px rgba(0,0,0,.48);backdrop-filter:blur(16px);
}
.admin-login-identity{margin:16px 0;padding:11px 12px;border-radius:9px;background:#10283e;border:1px solid #294862}
.admin-login-identity span{display:block;font-weight:700}.admin-login-identity small{display:block;margin-top:3px;color:#91a9be}
.login-field.dark input{background:#0c2236;border-color:#35536d;color:#fff}
.admin-password-rule{display:block;color:#8fa8bc;font-size:10px;margin-top:-4px}
.admin-login-back{display:block;text-align:center;color:#9fc7ed;margin-top:14px;font-size:11px;text-decoration:none}

/* Admin shell */
.admin-shell{min-height:100vh;display:grid;grid-template-columns:220px minmax(0,1fr);background:#eef4f9;color:#18344e}
.admin-sidebar{
  position:sticky;top:0;height:100vh;display:flex;flex-direction:column;z-index:30;
  background:linear-gradient(180deg,#071828,#0a2136);color:#dbeaf7;border-right:1px solid #15334d;
}
.admin-side-brand{height:86px;display:flex;align-items:center;gap:10px;padding:15px;position:relative;border-bottom:1px solid rgba(255,255,255,.08)}
.admin-side-brand img{width:38px;height:38px;object-fit:contain}
.admin-side-brand strong{font-size:13px;display:block;white-space:nowrap}.admin-side-brand small{font-size:8px;color:#819bb1;letter-spacing:.15em}
.admin-collapse{margin-left:auto;border:1px solid rgba(255,255,255,.12);background:#102a40;color:#dceaf6;border-radius:7px;width:30px;height:30px;cursor:pointer}
.admin-nav{padding:10px 8px;display:grid;gap:4px}
.admin-nav a,.admin-side-bottom>a,.admin-collapse-bottom{
  display:flex;align-items:center;gap:11px;min-height:42px;padding:0 11px;border-radius:8px;color:#bdd0df;text-decoration:none;font-size:12px;
}
.admin-nav a:hover,.admin-nav a.active{background:#0d5bb3;color:#fff}.admin-nav a.active{box-shadow:inset 3px 0 0 #63a9f3}
.admin-nav-icon{width:22px;text-align:center;font-size:15px;flex:none}
.admin-side-bottom{margin-top:auto;padding:12px 8px;border-top:1px solid rgba(255,255,255,.08)}
.admin-user-mini{display:flex;align-items:center;gap:9px;padding:11px}.admin-user-mini b{display:block;font-size:11px}.admin-user-mini small{font-size:9px;color:#7f9ab1}
.admin-avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#2c7de0;color:#fff}
.admin-collapse-bottom{width:100%;border:0;background:none;text-align:left;cursor:pointer}
.admin-shell.is-collapsed{grid-template-columns:64px minmax(0,1fr)}
.admin-shell.is-collapsed .admin-nav-label,.admin-shell.is-collapsed .admin-side-brand>div,.admin-shell.is-collapsed .admin-user-mini>div{display:none}
.admin-shell.is-collapsed .admin-side-brand{justify-content:center;padding:12px 6px}.admin-shell.is-collapsed .admin-side-brand img{width:34px}.admin-shell.is-collapsed .admin-side-brand .admin-collapse{position:absolute;right:-12px;top:18px}
.admin-shell.is-collapsed .admin-nav a{justify-content:center;padding:0}.admin-shell.is-collapsed .admin-user-mini{justify-content:center}.admin-shell.is-collapsed .admin-collapse-bottom{justify-content:center}

.admin-workspace{min-width:0;padding:24px 28px 44px}
.admin-page-head{display:flex;justify-content:space-between;align-items:end;gap:18px;margin-bottom:18px}
.admin-page-head h1{font-size:25px;margin:4px 0 0}.admin-breadcrumb{font-size:10px;color:#8193a3}.admin-game-day{font-size:10px;color:#6b8295}
.admin-notice{padding:11px 13px;border-radius:9px;margin-bottom:14px;background:#e8f7ef;color:#196b48;border:1px solid #bfe5d2}.admin-notice.error{background:#fff0ee;color:#a83333;border-color:#f3c7c1}
.admin-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}
.admin-toolbar input,.admin-toolbar select,.admin-data-table select,.admin-data-table input,.admin-drawer input,.admin-drawer select,.admin-drawer textarea,.settings-card input,.settings-card select{
  height:36px;border:1px solid #d2dfe9;border-radius:7px;background:#fff;color:#183b5b;padding:0 9px;font:inherit
}
.admin-drawer textarea{height:auto;padding:9px;resize:vertical}.admin-search-wrap{flex:1;min-width:220px}.admin-search-wrap input{width:100%}
.admin-outline-btn,.admin-row-btn{border:1px solid #c9d8e4;background:#fff;color:#21425e;border-radius:7px;padding:8px 11px;cursor:pointer}
.admin-primary-btn,.admin-danger-btn,.admin-warn-btn{border:0;border-radius:8px;padding:10px 14px;color:#fff;font-weight:700;cursor:pointer}
.admin-primary-btn{background:#1677df}.admin-danger-btn{background:#d84949}.admin-warn-btn{background:#b67b1d}.compact{padding:8px 11px}
.admin-danger-link{border:0;background:none;color:#c33;cursor:pointer}
.admin-card{border:1px solid #d8e2eb;border-radius:11px;background:#fff;box-shadow:0 7px 20px rgba(32,70,104,.06)}
.admin-table-card{padding:0;overflow:auto}
.admin-data-table{width:100%;border-collapse:collapse;font-size:11px;background:#fff}
.admin-data-table th{position:relative;background:#f5f8fb;color:#5d7285;font-size:10px;font-weight:700;white-space:nowrap;cursor:default}
.admin-data-table th[data-sort]{cursor:pointer}.admin-data-table th[data-sort]::after{content:"↕";margin-left:5px;color:#9bb0c1}
.admin-data-table th,.admin-data-table td{padding:9px 10px;border-bottom:1px solid #e7edf2;text-align:left;vertical-align:middle}
.admin-data-table tbody tr:not(.admin-group-row):hover{background:#f7fbff}
.admin-group-row td{background:#edf3f8;color:#34536d;font-weight:800;font-size:10px;letter-spacing:.07em}
.admin-protected,.admin-cell-note{display:block;margin-top:3px;font-size:9px;color:#8b9ba8}
.ap-badge{display:inline-flex;align-items:center;padding:4px 7px;border-radius:999px;background:#eef3f7;color:#50687a;font-size:9px;font-weight:700}
.ap-active,.ap-status-approved{background:#e3f7eb;color:#167049}.ap-inactive,.ap-status-rejected{background:#ffeaea;color:#ae3636}.ap-status-pending{background:#fff4d8;color:#906b16}.ap-role-leader,.ap-role-superior{background:#fff1cf;color:#8b6511}.ap-role-admin{background:#ffe4e4;color:#a72b2b}.ap-role-member{background:#e8f2ff;color:#2460a7}
.admin-check-row{display:flex!important;align-items:center;gap:8px}.admin-check-row input{width:auto;height:auto}
.admin-info-strip{margin:12px;padding:10px 12px;border-radius:8px;background:#eaf4ff;color:#24577f;font-size:10px}
.drag-handle{cursor:grab;color:#7c93a6}
.admin-bulkbar{display:flex;gap:8px;align-items:center;margin-bottom:10px}.admin-bulkbar input{height:36px;flex:1;border:1px solid #d2dfe9;border-radius:7px;padding:0 9px}

.admin-drawer{
  position:fixed;z-index:60;top:0;right:0;width:min(420px,94vw);height:100vh;background:#fff;border-left:1px solid #d3dfe8;box-shadow:-20px 0 50px rgba(17,43,68,.18);
  transform:translateX(105%);transition:transform .22s ease;overflow:auto;
}
.admin-drawer.open{transform:translateX(0)}.admin-drawer-wide{width:min(480px,96vw)}
.admin-drawer-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:17px 18px;background:#fff;border-bottom:1px solid #e3eaf0}
.admin-drawer-head small{font-size:9px;color:#8798a7}.admin-drawer-head h2{margin:2px 0 0;font-size:19px}.admin-drawer-head button{border:0;background:none;font-size:24px;cursor:pointer}
.admin-drawer-body{padding:18px}.admin-drawer-body label,.settings-card label{display:block;font-size:10px;font-weight:700;margin:12px 0}.admin-drawer-body label input,.admin-drawer-body label select,.settings-card label input,.settings-card label select{display:block;width:100%;margin-top:6px}
.admin-drawer-section{padding-bottom:15px;margin-bottom:15px;border-bottom:1px solid #e5ebf0}.admin-drawer-section h3{margin:0 0 10px;font-size:13px}
.admin-two-col{display:grid;grid-template-columns:1fr 1fr;gap:9px}.admin-segmented{display:flex;gap:6px}.admin-segmented label{flex:1;padding:8px;border:1px solid #d4e0e9;border-radius:7px}
.admin-occurrence-preview{font-size:10px;color:#637c90;line-height:1.8;background:#f7fafc;padding:9px;border-radius:7px;min-height:20px}
.member-detail-card{text-align:center;padding-bottom:16px;border-bottom:1px solid #e5ebf0}.admin-detail-avatar{width:70px;height:70px;margin:0 auto 8px;border-radius:50%;display:grid;place-items:center;background:#143b5f;color:#fff;font-size:26px}
.member-detail-card h3{margin:0}.member-detail-card p{margin:5px 0;color:#71889a;font-size:10px}
.submission-compare{display:grid;grid-template-columns:1fr 1fr;gap:8px}.submission-compare>div{padding:9px;border-radius:8px;background:#f5f8fb}.submission-compare span{display:block;font-size:9px;color:#8194a4}.submission-compare b{font-size:12px}
.submission-image-shell{margin:14px 0;text-align:center}.submission-image-shell img{max-width:100%;max-height:360px;border-radius:8px}.submission-image-placeholder{padding:30px 12px;background:#f5f8fb;color:#8394a1;border-radius:8px;font-size:10px}
.admin-review-buttons{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px}
.admin-lightbox{position:fixed;z-index:100;inset:0;background:rgba(2,11,20,.9);display:grid;place-items:center;padding:30px}.admin-lightbox img{max-width:94vw;max-height:90vh}.admin-lightbox button{position:absolute;right:20px;top:15px;border:0;background:none;color:#fff;font-size:34px;cursor:pointer}

.admin-metrics-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:9px;margin-bottom:12px}.admin-metric{padding:12px 14px;border-radius:10px;background:#fff;border:1px solid #dbe5ed}.admin-metric span{display:block;font-size:9px;color:#7b8f9f}.admin-metric b{display:block;margin-top:4px;font-size:20px;color:#193d5b}
.admin-subtabs{display:flex;gap:6px;margin-bottom:13px;overflow-x:auto}.admin-subtabs a{padding:9px 12px;border-radius:7px;border:1px solid #d3dee8;background:#fff;color:#35536c;text-decoration:none;white-space:nowrap;font-size:10px}.admin-subtabs a.active{background:#e9f3ff;color:#0d65c8;border-color:#a9cbed}
.import-panel{display:grid;grid-template-columns:1fr 1.2fr;gap:22px;padding:20px}.admin-drop-form{display:grid;gap:10px}.admin-drop-form>input[type=file]{position:absolute;opacity:0;pointer-events:none}.admin-drop-zone{min-height:150px;border:2px dashed #a9c9e7;border-radius:10px;display:grid;place-items:center;text-align:center;padding:20px;background:#f8fbfe;cursor:pointer}.admin-drop-zone b{display:block}.admin-drop-zone span{font-size:10px;color:#8497a7}
.import-preview{margin-top:14px;padding:18px}.import-preview details{margin:9px 0;border:1px solid #dfe7ed;border-radius:8px;padding:9px}.import-preview pre{max-height:240px;overflow:auto;font-size:10px}
.settings-card{max-width:620px;padding:20px}.settings-card form{display:grid;gap:6px}
.admin-audit-change{max-width:520px}.admin-audit-change code{display:inline-block;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#f2f6f9;padding:3px 5px;border-radius:5px;font-size:9px}.admin-audit-change span{margin:0 4px}

@media (max-width:899px){
  .admin-shell{grid-template-columns:64px minmax(0,1fr)}
  .admin-nav-label,.admin-side-brand>div,.admin-user-mini>div{display:none}
  .admin-side-brand{justify-content:center;padding:12px 6px}.admin-side-brand img{width:34px}.admin-side-brand .admin-collapse{display:none}
  .admin-nav a{justify-content:center;padding:0}.admin-user-mini{justify-content:center}.admin-workspace{padding:18px 14px 40px}
  .admin-page-head{align-items:flex-start;flex-direction:column}.import-panel{grid-template-columns:1fr}.admin-two-col{grid-template-columns:1fr}
}
@media (max-width:599px){
  .member-login-card,.admin-login-card{padding:22px}.login-brand,.admin-login-brand{top:22px}
  .admin-workspace{padding:14px 10px 36px}.admin-game-day{display:none}.admin-review-buttons{grid-template-columns:1fr}.admin-metrics-row{grid-template-columns:1fr 1fr}
}

/* ==========================================================================
   M3.2.2 — APPROVED MEMBER LOGIN DESIGN
   ========================================================================== */
.member-login-page{
  background:
    /*linear-gradient(rgba(255,255,255,.08),rgba(255,255,255,.12)),
    url('../images/member-login-bg.webp') center/cover no-repeat;*/
}

.member-login-page::after{
  display:none;
}

.login-brand-stacked{
  top:34px;
  left:50%;
  transform:translateX(-50%);
  flex-direction:column;
  gap:6px;
  text-align:center;
}

.login-brand-stacked img{
  width:96px;
  height:96px;
  object-fit:contain;
  filter:drop-shadow(0 6px 16px rgba(33,50,67,.16));
}

.login-brand-stacked strong{
  display:block;
  font:700 27px/1.05 Georgia,serif;
  letter-spacing:.02em;
  color:#17314c;
  white-space:nowrap;
  text-shadow:0 1px 0 rgba(255,255,255,.45);
}

.member-login-card{
  width:min(390px,calc(100vw - 32px));
  padding:30px 28px 26px;
  border:1px solid rgba(255,255,255,.58);
  border-radius:18px;
  background:rgba(255,255,255,.5);
  color:#17314c;
  backdrop-filter:blur(15px) saturate(115%);
  -webkit-backdrop-filter:blur(15px) saturate(115%);
  box-shadow:
    0 26px 70px rgba(42,67,92,.18),
    inset 0 1px 0 rgba(255,255,255,.65);
}

.member-login-card h1{
  margin:0;
  font:700 29px/1.1 Georgia,serif;
  color:#17314c;
}

.member-login-card>p{
  margin:9px 0 22px;
  color:#6e8092;
  font-size:12px;
}

.member-login-card .login-field span{
  color:#17314c;
}

.member-login-card .login-field input{
  height:48px;
  border-color:#c4d6e6;
  background:rgba(255,255,255,.88);
  color:#17314c;
  font-size:15px;
}

.member-login-card .login-primary{
  height:49px;
  border-radius:9px;
  background:linear-gradient(180deg,#c99a58,#a9783c);
  box-shadow:0 8px 16px rgba(161,111,52,.24);
  color:#fff;
  font:700 16px/1 Georgia,serif;
}

.member-login-card .login-primary:hover{
  filter:brightness(1.04);
}

.member-login-card .login-secondary{
  height:46px;
  border-color:#c6d4df;
  background:rgba(255,255,255,.7);
  color:#20374f;
}

@media (max-width:599px){
  .login-brand-stacked{
    top:20px;
  }
  .login-brand-stacked img{
    width:78px;
    height:78px;
  }
  .login-brand-stacked strong{
    font-size:23px;
  }
  .member-login-card{
    width:min(360px,calc(100vw - 24px));
    padding:24px 20px 22px;
  }
}


/* ==========================================================================
   M3.2.3 — FRONTEND LOGIN BRANDING & ORNAMENT
   ========================================================================== */
.login-brand-stacked{
  gap:7px;
}

.login-brand-stacked img:not(.login-ornament){
  width:116px;
  height:116px;
}

.login-brand-stacked strong{
  font-size:29px;
  letter-spacing:.025em;
}

.login-ornament{
  display:block;
  object-fit:contain;
  pointer-events:none;
  user-select:none;
}

.login-brand-stacked .login-ornament-top{
  width:245px;
  height:20px;
  margin-top:2px;
  opacity:.88;
  filter:drop-shadow(0 2px 4px rgba(118,80,32,.08));
}

.login-motto{
  margin-top:15px;
  text-align:center;
}

.login-motto .login-ornament-bottom{
  width:100%;
  max-width:280px;
  height:18px;
  margin:0 auto 8px;
  opacity:.7;
}

.login-motto span{
  display:block;
  color:#718094;
  font:600 8.5px/1.4 Georgia,serif;
  letter-spacing:.24em;
  white-space:nowrap;
}

/* Epic but controlled hover animation for the frontend login action. */
.member-login-card .login-primary{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:
    linear-gradient(115deg,#b47a37 0%,#d6aa65 34%,#9d672f 70%,#c5904c 100%);
  background-size:220% 100%;
  transition:
    transform .24s cubic-bezier(.2,.8,.2,1),
    box-shadow .24s ease,
    filter .24s ease,
    background-position .55s ease;
}

.member-login-card .login-primary::before{
  content:"";
  position:absolute;
  z-index:-1;
  top:-55%;
  left:-38%;
  width:28%;
  height:210%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.72),transparent);
  transform:rotate(17deg) translateX(-220%);
  transition:transform .62s cubic-bezier(.2,.75,.2,1);
}

.member-login-card .login-primary::after{
  content:"";
  position:absolute;
  z-index:-2;
  inset:-2px;
  border-radius:inherit;
  opacity:0;
  box-shadow:
    0 0 0 1px rgba(255,229,173,.6),
    0 0 18px rgba(215,167,88,.75),
    0 0 38px rgba(189,126,48,.45);
  transition:opacity .25s ease;
}

.member-login-card .login-primary:hover{
  transform:translateY(-2px) scale(1.018);
  background-position:100% 0;
  filter:saturate(1.08) brightness(1.07);
  box-shadow:
    0 13px 24px rgba(139,88,31,.3),
    0 0 0 1px rgba(255,228,169,.45);
  animation:loginEpicPulse 1.45s ease-in-out infinite alternate;
}

.member-login-card .login-primary:hover::before{
  transform:rotate(17deg) translateX(620%);
}

.member-login-card .login-primary:hover::after{
  opacity:1;
}

.member-login-card .login-primary:active{
  transform:translateY(0) scale(.995);
  animation:none;
}

@keyframes loginEpicPulse{
  from{
    box-shadow:
      0 13px 24px rgba(139,88,31,.28),
      0 0 0 1px rgba(255,228,169,.38),
      0 0 12px rgba(211,157,76,.18);
  }
  to{
    box-shadow:
      0 15px 28px rgba(139,88,31,.34),
      0 0 0 1px rgba(255,233,187,.72),
      0 0 25px rgba(211,157,76,.42);
  }
}

@media (prefers-reduced-motion:reduce){
  .member-login-card .login-primary,
  .member-login-card .login-primary::before,
  .member-login-card .login-primary::after{
    animation:none!important;
    transition:none!important;
  }
}

@media (max-width:599px){
  .login-brand-stacked img:not(.login-ornament){
    width:92px;
    height:92px;
  }
  .login-brand-stacked strong{
    font-size:24px;
  }
  .login-brand-stacked .login-ornament-top{
    width:205px;
  }
  .login-motto span{
    font-size:7.5px;
    letter-spacing:.18em;
  }
}

/* ==========================================================================
   M3.2.4 — MEMBER LOGIN BRAND POSITION FIX
   ========================================================================== */
.login-brand-stacked{
  position:absolute;
  top:26px;
  left:50%;
  transform:translateX(-50%);
  z-index:4;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:7px;
  width:max-content;
  pointer-events:none;
}

.login-brand-stacked img:not(.login-ornament){
  width:132px;
  height:132px;
}

.login-brand-stacked strong{
  display:block;
  margin:0;
  font-size:31px;
  line-height:1;
}

.login-brand-stacked .login-ornament-top{
  width:255px;
  height:18px;
  margin-top:4px;
}

.member-login-card{
  position:relative;
  z-index:3;
  margin-top:220px;
}

@media (max-height:780px) and (min-width:600px){
  .login-brand-stacked{
    top:14px;
  }

  .login-brand-stacked img:not(.login-ornament){
    width:106px;
    height:106px;
  }

  .login-brand-stacked strong{
    font-size:27px;
  }

  .member-login-card{
    margin-top:172px;
  }
}

@media (max-width:599px){
  .login-brand-stacked{
    top:12px;
  }

  .login-brand-stacked img:not(.login-ornament){
    width:92px;
    height:92px;
  }

  .login-brand-stacked strong{
    font-size:24px;
  }

  .login-brand-stacked .login-ornament-top{
    width:195px;
    height:15px;
  }

  .member-login-card{
    margin-top:150px;
  }
}

/* ==========================================================================
   M3.3 — UNIFIED DATA + ADMIN NAVIGATION REFINEMENT
   ========================================================================== */
.admin-shell{
  grid-template-columns:228px minmax(0,1fr);
  transition:grid-template-columns .22s ease;
}
.admin-sidebar{
  background:
    radial-gradient(circle at 20% 0%,rgba(36,91,139,.18),transparent 34%),
    linear-gradient(180deg,#061522 0%,#081d30 48%,#061522 100%);
  box-shadow:8px 0 28px rgba(6,22,36,.10);
}
.admin-side-brand{
  height:92px;
  padding:16px 14px;
}
.admin-side-brand img{width:42px;height:42px}
.admin-side-brand strong{font-size:13px;letter-spacing:.08em}
.admin-side-brand small{margin-top:3px;text-transform:uppercase;letter-spacing:.18em}
.admin-nav{padding:13px 9px;gap:6px}
.admin-nav a,.admin-side-bottom>a{
  min-height:45px;
  border:1px solid transparent;
  transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease;
}
.admin-nav a:hover{
  background:rgba(40,112,180,.18);
  border-color:rgba(115,177,232,.12);
  transform:translateX(1px);
}
.admin-nav a.active{
  position:relative;
  background:linear-gradient(90deg,#0d65bf,#13569a);
  box-shadow:0 8px 20px rgba(2,72,138,.24);
  border-color:rgba(117,185,244,.20);
}
.admin-nav a.active::before{
  content:"";position:absolute;left:-9px;top:8px;bottom:8px;width:3px;border-radius:0 4px 4px 0;background:#8ec8ff;
}
.admin-nav-icon{width:23px;height:23px;display:grid;place-items:center}
.admin-nav-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.admin-side-bottom{padding:12px 9px 14px}
.admin-user-mini{border-radius:9px;background:rgba(255,255,255,.035);margin:7px 2px}
.admin-collapse-bottom{color:#8fa9bf}
.admin-shell.is-collapsed{grid-template-columns:68px minmax(0,1fr)}
.admin-shell.is-collapsed .admin-nav a{border-radius:10px}
.admin-shell.is-collapsed .admin-nav a.active::before{left:-9px}

.admin-mobile-menu{
  display:none;width:38px;height:36px;border:1px solid #ccd9e4;border-radius:8px;background:#fff;padding:8px;cursor:pointer
}
.admin-mobile-menu span{display:block;height:2px;background:#23445f;margin:4px 0;border-radius:2px}
.admin-sidebar-backdrop{display:none}

.admin-schema-warning ul{margin:7px 0 0;padding-left:18px}.admin-schema-warning li{margin:3px 0}

.admin-toggle-row{
  display:flex!important;align-items:center;justify-content:space-between;gap:20px;
  min-height:48px;padding:0 2px;margin:3px 0!important;font-size:11px!important
}
.admin-switch{position:relative;width:44px;height:24px;flex:none}
.admin-switch input{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important}
.admin-switch i{position:absolute;inset:0;border-radius:999px;background:#cad6df;box-shadow:inset 0 0 0 1px #b8c6d1;transition:.18s ease;cursor:pointer}
.admin-switch i::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(17,48,74,.22);transition:.18s ease}
.admin-switch input:checked+i{background:#1782ef;box-shadow:inset 0 0 0 1px #0870dc}
.admin-switch input:checked+i::after{transform:translateX(20px)}
.admin-switch input:focus-visible+i{outline:3px solid rgba(23,130,239,.18);outline-offset:2px}

.admin-repeat-field>span:first-child{display:block;margin-bottom:6px}
.admin-repeat-control{display:flex;align-items:center;gap:9px}
.admin-repeat-control input{width:110px!important;margin:0!important}
.admin-repeat-control b{font-size:11px;color:#617a8e}
[data-screenshot-deadline]{transition:opacity .18s ease}
[data-screenshot-deadline].is-disabled{opacity:.42}

.event-state{font-size:10px;color:#8ba0b2}.event-pending{display:inline-flex;padding:3px 5px;border-radius:999px;background:#fff4d8;color:#8b6614;font-weight:700}

.week-arrow{text-decoration:none;display:grid;place-items:center}

@media (max-width:899px){
  .admin-shell{grid-template-columns:1fr}
  .admin-sidebar{
    position:fixed;left:0;top:0;width:228px;transform:translateX(-105%);transition:transform .22s ease;z-index:80
  }
  .admin-shell.is-mobile-open .admin-sidebar{transform:translateX(0)}
  .admin-shell.is-mobile-open .admin-sidebar-backdrop{display:block;position:fixed;inset:0;z-index:70;border:0;background:rgba(4,17,29,.48)}
  .admin-mobile-menu{display:block;flex:none}
  .admin-nav-label,.admin-side-brand>div,.admin-user-mini>div{display:block}
  .admin-side-brand{justify-content:flex-start;padding:16px 14px}.admin-side-brand img{width:42px}.admin-nav a{justify-content:flex-start;padding:0 11px}.admin-user-mini{justify-content:flex-start}
  .admin-side-brand .admin-collapse,.admin-collapse-bottom{display:none}
}

/* ==========================================================================
   M3.3.1 — RESPONSIVE TABLE STABILIZATION + SUBMISSIONS LIGHTBOX FIX
   Keep the approved desktop performance-table geometry at every viewport.
   ========================================================================== */

/* Performance table: never compress columns on tablet/mobile.
   The outer performance-scroll owns horizontal scrolling; Identity stays sticky. */
:root{
  --id-w:200px;
  --score-w:200px;
  --week-w:170px;
  --event-w:96px;
}

.identity-block{
  width:200px;
  min-width:200px;
  max-width:200px;
}

.identity-table .rank-head,
.identity-table tbody td:first-child{
  width:40px;
  min-width:40px;
  max-width:40px;
}

.identity-table .nickname-head,
.identity-table tbody td:nth-child(2){
  width:160px;
  min-width:160px;
  max-width:160px;
}

.score-block{
  width:200px;
  min-width:200px;
  max-width:200px;
}

.week-block{
  width:170px;
  min-width:170px;
  max-width:170px;
}

.performance-grid{
  grid-template-columns:200px 200px 170px max-content;
  width:max-content;
  min-width:max-content;
  max-width:none;
}

.score-flex{
  grid-template-columns:50px minmax(72px,1fr);
  gap:10px;
}

.events-block,
.events-scroll{
  width:max-content;
  min-width:max-content;
  max-width:none;
  overflow:visible;
}

.events-table{
  width:max-content;
  min-width:max-content;
  max-width:none;
}

.events-table th,
.events-table td{
  width:96px;
  min-width:96px;
  max-width:96px;
}

/* Responsive breakpoints may adapt hero/KPI UI, but not table geometry. */
@media (max-width:1199px){
  :root{
    --id-w:200px;
    --score-w:200px;
    --week-w:170px;
    --event-w:96px;
  }
}

@media (max-width:899px){
  :root{
    --id-w:200px;
    --score-w:200px;
    --week-w:170px;
    --event-w:96px;
  }

  .score-flex{
    grid-template-columns:50px minmax(72px,1fr);
    gap:10px;
  }
}

@media (max-width:599px){
  :root{
    --id-w:200px;
    --score-w:200px;
    --week-w:170px;
    --event-w:96px;
  }

  .score-flex{
    grid-template-columns:50px minmax(72px,1fr);
    gap:10px;
  }
}

@media (max-width:419px){
  :root{
    --id-w:200px;
    --score-w:200px;
    --week-w:170px;
    --event-w:96px;
  }
}

/* Lightbox must obey the HTML hidden attribute. */
.admin-lightbox[hidden]{
  display:none !important;
}

.admin-lightbox{
  cursor:zoom-out;
}

.admin-lightbox img{
  cursor:default;
}

/* Clean empty state for an empty submission queue. */
.admin-empty-state{
  padding:54px 24px 58px;
  text-align:center;
  background:#fff;
  color:#6f8496;
}

.admin-empty-state-icon{
  width:46px;
  height:46px;
  margin:0 auto 12px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#eef5fb;
  color:#3778ad;
  font-size:20px;
}

.admin-empty-state h3{
  margin:0 0 6px;
  color:#23445f;
  font-size:15px;
}

.admin-empty-state p{
  margin:0;
  font-size:11px;
  line-height:1.55;
}

/* ==========================================================================
   M3.3.4 — 30-DAY EVENT AVERAGES + TABLE WIDTH RESTORE + SWORD CLEANUP
   ========================================================================== */

/* Desktop: fill the complete shared content frame up to the right edge of Date.
   Event columns share all remaining space, while retaining a 96px minimum. */
@media (min-width:1200px){
  .performance-grid{
    grid-template-columns:
      200px
      200px
      170px
      minmax(calc(var(--event-count,1) * 96px),1fr);
    width:100%;
    min-width:calc(200px + 200px + 170px + (3 * var(--table-gap)) + (var(--event-count,1) * 96px));
    max-width:none;
  }

  .events-block,
  .events-scroll,
  .events-table{
    width:100%;
    min-width:calc(var(--event-count,1) * 96px);
    max-width:none;
  }

  .events-table th,
  .events-table td{
    width:auto;
    min-width:96px;
    max-width:none;
  }
}

/* Below desktop: preserve approved desktop minimum geometry and scroll horizontally. */
@media (max-width:1199px){
  .performance-grid{
    grid-template-columns:200px 200px 170px max-content;
    width:max-content;
    min-width:max-content;
    max-width:none;
  }

  .events-block,
  .events-scroll,
  .events-table{
    width:max-content;
    min-width:max-content;
    max-width:none;
  }

  .events-table th,
  .events-table td{
    width:96px;
    min-width:96px;
    max-width:96px;
  }
}

/* SWORD stays yellow, but no longer has a card-like outline/border. */
.sword-reference-line{
  border:0;
  border-radius:0;
  box-shadow:none;
}

.split-table tbody tr.sword td{
  border-top:0;
  border-bottom:1px solid var(--line-soft);
}

/* ==========================================================================
   M3.3.5 — EVENT EDITOR UX + SLOVENIAN NUMBER FORMATTING
   ========================================================================== */

.admin-drawer[data-drawer="event"]{
  width:min(520px,96vw);
}

.admin-drawer[data-drawer="event"] .admin-drawer-body{
  padding:20px 22px 28px;
}

.admin-drawer[data-drawer="event"] .admin-drawer-section{
  padding-bottom:20px;
  margin-bottom:20px;
}

.admin-drawer[data-drawer="event"] .admin-drawer-section h3{
  margin-bottom:14px;
  font-size:15px;
}

.admin-schedule-type{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-bottom:16px;
}

.admin-schedule-type label{
  margin:0!important;
  cursor:pointer;
}

.admin-schedule-type input{
  position:absolute!important;
  opacity:0!important;
  width:1px!important;
  height:1px!important;
}

.admin-schedule-type label>span{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:46px;
  padding:0 13px;
  border:1px solid #cfdde8;
  border-radius:9px;
  background:#fff;
  color:#294861;
  font-size:11px;
  font-weight:750;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease;
}

.admin-schedule-type label>span>i{
  width:14px;
  height:14px;
  border:1.5px solid #8fa3b5;
  border-radius:50%;
  background:#fff;
  box-shadow:inset 0 0 0 3px #fff;
}

.admin-schedule-type input:checked+span{
  border-color:#2385ed;
  background:#eef7ff;
  box-shadow:0 0 0 2px rgba(35,133,237,.09);
  color:#165c9f;
}

.admin-schedule-type input:checked+span>i{
  border-color:#1681ee;
  background:#1681ee;
}

.admin-field-label{
  display:block;
  margin:12px 0 6px!important;
}

.admin-datetime-field{
  display:grid;
  grid-template-columns:minmax(0,1fr) 1px 128px;
  align-items:center;
  min-height:42px;
  border:1px solid #d2dfe9;
  border-radius:8px;
  background:#fff;
  overflow:hidden;
}

.admin-datetime-field input,
.admin-date-only-field input{
  width:100%!important;
  height:40px!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  padding:0 10px!important;
}

.admin-datetime-divider{
  display:block;
  width:1px;
  height:24px;
  background:#d9e4ec;
}

.admin-date-only-field{
  border:1px solid #d2dfe9;
  border-radius:8px;
  background:#fff;
  overflow:hidden;
}

.admin-repeat-field{
  margin:14px 0 10px!important;
}

.admin-repeat-control{
  margin-top:6px;
}

.admin-input-unit{
  display:flex;
  align-items:center;
  width:100%;
  margin-top:6px;
  border:1px solid #d2dfe9;
  border-radius:8px;
  background:#fff;
  overflow:hidden;
}

.admin-input-unit input{
  flex:1;
  min-width:0;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}

.admin-input-unit b{
  flex:none;
  padding:0 11px;
  color:#70869a;
  font-size:10px;
  font-weight:750;
  white-space:nowrap;
}

.admin-occurrence-preview{
  display:grid;
  gap:3px;
  margin-top:14px;
  padding:11px 13px;
}

.admin-occurrence-preview b{
  display:block;
  margin-bottom:3px;
  color:#587188;
  font-size:9px;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.admin-occurrence-preview span{
  display:block;
  color:#526f86;
  font-size:10px;
  line-height:1.7;
}

.admin-occurrence-preview i{
  padding:0 6px;
  color:#b2c1cc;
  font-style:normal;
}

[data-recurring-fields][hidden],
[data-screenshot-deadline].is-disabled{
  display:none!important;
}

.admin-drawer[data-drawer="event"] .admin-toggle-row{
  min-height:42px;
  margin:0!important;
}

.admin-drawer[data-drawer="event"] .admin-drawer-section:last-of-type{
  margin-bottom:16px;
}

@media (max-width:599px){
  .admin-drawer[data-drawer="event"]{
    width:100vw;
  }

  .admin-drawer[data-drawer="event"] .admin-two-col{
    grid-template-columns:1fr;
  }

  .admin-datetime-field{
    grid-template-columns:minmax(0,1fr) 1px 105px;
  }
}

/* ==========================================================================
   M3.3.7 — EVENTS ADMIN UX + GAME TIME UNIFICATION
   ========================================================================== */

/* Global admin typography */
.admin-workspace,
.admin-drawer{
  font-size:13px;
}

.admin-workspace input,
.admin-workspace select,
.admin-workspace button,
.admin-drawer input,
.admin-drawer select,
.admin-drawer button{
  font-size:13px;
}

.admin-page-head h1,
.admin-drawer-head h2,
.admin-drawer-section h3,
.admin-card h2,
.admin-card h3{
  font-size:15px!important;
  line-height:1.25;
}

.admin-breadcrumb,
.admin-cell-note,
.admin-protected,
.admin-info-strip,
.admin-data-table thead th,
.admin-drawer-head small,
.admin-metric span,
.admin-drawer small,
.admin-side-brand small{
  font-size:11px!important;
}

.admin-data-table tbody td,
.admin-data-table tbody td strong,
.admin-toolbar input,
.admin-toolbar select,
.admin-row-btn,
.admin-outline-btn,
.admin-primary-btn,
.admin-danger-btn,
.admin-drawer label{
  font-size:13px;
}

/* More prominent Game time */
.admin-game-day{
  display:inline-flex;
  align-items:baseline;
  gap:4px;
  color:#60788c;
  font-size:13px!important;
  white-space:nowrap;
}
.admin-game-day strong{
  color:#1d405d;
  font-size:13px;
}
.admin-game-day b{
  color:#1d405d;
  font-size:14px;
}
.admin-game-day em{
  color:#1974c9;
  font-size:14px;
  font-style:normal;
  font-weight:750;
}

/* Handle-only drag */
.admin-drag-col,
.drag-handle-cell{
  width:34px;
  min-width:34px;
  max-width:34px;
  padding:0!important;
  text-align:center!important;
}
.drag-handle{
  display:inline-grid;
  place-items:center;
  width:26px;
  height:30px;
  padding:0;
  border:0;
  background:transparent;
  color:#8ba2b5;
  font-size:17px!important;
  line-height:1;
  cursor:grab;
  user-select:none;
}
.drag-handle:hover{
  color:#2679b7;
  background:#eef6fc;
  border-radius:6px;
}
.drag-handle:active,
.drag-handle.is-dragging{
  cursor:grabbing;
}
#eventsTable tr.is-dragging{
  opacity:.55;
  background:#eef6fc;
}
#eventsTable tr.event-drop-before>td{
  box-shadow:inset 0 3px 0 #2688d9;
}
#eventsTable tr.event-drop-after>td{
  box-shadow:inset 0 -3px 0 #2688d9;
}

/* Smaller schedule selector */
.admin-schedule-type label>span{
  min-height:38px;
  padding:0 11px;
  gap:8px;
  font-size:13px;
}
.admin-schedule-type label>span>i{
  width:12px;
  height:12px;
  border-width:1.5px;
  box-shadow:inset 0 0 0 2.5px #fff;
}

/* Smaller switches */
.admin-switch{
  width:36px;
  height:20px;
}
.admin-switch i::after{
  top:2px;
  left:2px;
  width:16px;
  height:16px;
}
.admin-switch input:checked+i::after{
  transform:translateX(16px);
}
.admin-drawer[data-drawer="event"] .admin-toggle-row{
  min-height:36px;
}

/* Game dates are date-only business fields. */
.admin-game-date-field{
  max-width:none;
}
.admin-occurrence-preview span{
  font-size:11px;
}

/* Event delete zone */
.admin-danger-zone{
  margin:0 22px 24px;
  padding:16px 0 0;
  border-top:1px solid #e3eaf0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.admin-danger-zone>div{
  min-width:0;
}
.admin-danger-zone strong{
  display:block;
  color:#812f35;
  font-size:13px;
}
.admin-danger-zone small{
  display:block;
  margin-top:3px;
  max-width:300px;
  color:#7f8f9d;
  font-size:11px!important;
  line-height:1.4;
}
.admin-danger-zone form{
  flex:none;
}
.admin-danger-zone .admin-danger-btn{
  white-space:nowrap;
}

/* The top brand control is the single sidebar collapse control. */
.admin-collapse-bottom{
  display:none!important;
}

@media (max-width:599px){
  .admin-danger-zone{
    align-items:flex-start;
    flex-direction:column;
  }
}

/* ==========================================================================
   M3.3.8 — FRONTEND TABLE FINISH + DYNAMIC NORM UNITS
   ========================================================================== */

.admin-norm-unit{
  padding-right:0;
}

.admin-norm-unit select{
  flex:none;
  width:62px;
  align-self:stretch;
  margin:0!important;
  padding:0 24px 0 10px!important;
  border:0!important;
  border-left:1px solid #d8e3ec!important;
  border-radius:0!important;
  background:#f7fafc;
  color:#60788d;
  font-size:13px!important;
  font-weight:750;
  cursor:pointer;
  box-shadow:none!important;
}

/* Right side of the frontend event panel closes like the left side. */
.events-block{
  border-radius:10px;
  overflow:hidden;
}

.events-scroll{
  border-radius:inherit;
}

.events-table{
  border-collapse:separate;
  border-spacing:0;
}

.events-table thead th:last-child{
  border-top-right-radius:9px;
}

.events-table tbody tr:last-child td:last-child{
  border-bottom-right-radius:9px;
}

.events-table th:last-child,
.events-table td:last-child{
  border-right:1px solid var(--line);
}

/* Keep the outer right edge visually equal to the left card edge. */
.performance-grid .events-block{
  border-right:1px solid var(--line);
  box-shadow:0 5px 16px rgba(30,66,96,.055);
}

@media (min-width:1200px){
  .performance-grid .events-block{
    min-width:0;
    width:100%;
  }

  .events-scroll{
    width:100%;
    min-width:0;
  }

  .events-table{
    width:100%;
    min-width:100%;
  }
}

@media (max-width:1199px){
  .events-scroll{
    overflow:visible;
  }
}

/* ==========================================================================
   M3.3.9 — NORM INPUT / UNIT LAYOUT FIX
   Numeric value stays wide on the left; M/B selector stays compact on the right.
   ========================================================================== */
.admin-input-unit.admin-norm-unit{
  display:grid;
  grid-template-columns:minmax(0,1fr) 60px;
  align-items:stretch;
  width:100%;
  padding:0;
}

.admin-input-unit.admin-norm-unit input{
  width:100%!important;
  min-width:0;
  border:0!important;
  border-radius:8px 0 0 8px!important;
  background:#fff!important;
}

.admin-input-unit.admin-norm-unit select{
  width:60px!important;
  min-width:60px;
  max-width:60px;
  height:auto;
  margin:0!important;
  padding:0 20px 0 10px!important;
  border:0!important;
  border-left:1px solid #d8e3ec!important;
  border-radius:0 8px 8px 0!important;
  background:#f7fafc;
  color:#60788d;
  text-align:center;
  font-size:13px!important;
  font-weight:750;
  cursor:pointer;
  box-shadow:none!important;
}

.admin-input-unit.admin-norm-unit:focus-within{
  border-color:#2788e8;
  box-shadow:0 0 0 2px rgba(39,136,232,.10);
}

/* ==========================================================================
   M3.3.10 — MEMBER DETAIL UX + DAYS IN CLAN
   ========================================================================== */

.admin-member-drawer{
  width:min(460px,96vw);
}

.admin-member-drawer .admin-drawer-body{
  padding:20px 22px 28px;
}

.member-profile-hero{
  padding:4px 0 20px;
  margin-bottom:20px;
  border-bottom:1px solid #e4ebf1;
  text-align:center;
}

.member-profile-hero .admin-detail-avatar{
  width:74px;
  height:74px;
  margin:0 auto 10px;
  font-size:28px;
  box-shadow:0 8px 24px rgba(18,59,95,.13);
}

.member-profile-copy h3{
  margin:0;
  font-size:15px;
  color:#183c5b;
}

.member-profile-copy p{
  margin:4px 0 0;
  color:#72889a;
  font-size:11px;
}

.member-summary-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:16px;
}

.member-summary-grid>div{
  min-height:62px;
  padding:10px 8px;
  border:1px solid #dde7ee;
  border-radius:9px;
  background:#f8fbfd;
  text-align:left;
}

.member-summary-grid span{
  display:block;
  color:#8295a5;
  font-size:11px;
}

.member-summary-grid strong{
  display:block;
  margin-top:5px;
  color:#234863;
  font-size:13px;
}

.member-days-card{
  background:#eef7ff!important;
  border-color:#d4e9fb!important;
}

.member-days-card strong{
  color:#176ab2;
}

.member-edit-form .admin-drawer-section{
  margin-bottom:17px;
  padding-bottom:17px;
}

.member-edit-form .admin-drawer-section h3,
.member-meta-panel h3{
  margin:0 0 10px;
  color:#183c5b;
  font-size:15px!important;
}

.member-active-row{
  margin-top:14px!important;
  min-height:38px!important;
  padding:0 2px;
}

.member-meta-panel{
  margin:0 0 18px;
  padding:13px 14px;
  border:1px solid #e0e8ef;
  border-radius:9px;
  background:#f8fafc;
}

.member-meta-panel dl{
  margin:0;
}

.member-meta-panel dl>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:7px 0;
  border-bottom:1px solid #e8eef3;
}

.member-meta-panel dl>div:last-child{
  border-bottom:0;
}

.member-meta-panel dt{
  color:#7c909f;
  font-size:11px;
}

.member-meta-panel dd{
  margin:0;
  color:#284963;
  font-size:11px;
  font-weight:700;
  text-align:right;
}

.admin-field-help{
  display:block;
  margin-top:5px;
  color:#8194a4;
  font-size:11px!important;
  font-weight:400!important;
  line-height:1.4;
}

.member-drawer-actions{
  display:flex;
  justify-content:flex-start;
  padding-top:2px;
}

.member-drawer-actions .admin-primary-btn{
  min-width:130px;
}

@media (max-width:480px){
  .member-summary-grid{
    grid-template-columns:1fr;
  }
}

/* ==========================================================================
   M3.3.11 — SCREENSHOT UPLOAD UX REFINEMENT
   ========================================================================== */

.upload-backdrop{
  background:rgba(7,24,42,.48);
  backdrop-filter:blur(5px);
}

.upload-result-modal{
  width:min(560px,calc(100vw - 32px));
  padding:24px;
  border-radius:18px;
  box-shadow:0 28px 80px rgba(7,26,47,.32);
}

.upload-result-modal .modal-head{
  margin-bottom:14px;
}

.upload-result-modal .modal-head h3{
  font-size:20px;
}

.upload-modal-subtitle{
  margin:4px 0 0;
  color:#72889a;
  font-size:11px;
}

.upload-context-card{
  display:flex;
  align-items:center;
  gap:11px;
  margin:0 0 18px;
  padding:11px 12px;
  border:1px solid #dbe7ef;
  border-radius:11px;
  background:#f7fafc;
}

.upload-context-avatar{
  flex:0 0 auto;
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#174b73;
  color:#fff;
  font-size:16px;
  font-weight:750;
}

.upload-context-copy{
  min-width:0;
}

.upload-context-copy>strong{
  display:block;
  overflow:hidden;
  color:#1b405f;
  font-size:13px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.upload-context-copy>span{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:3px;
  color:#70889b;
  font-size:11px;
}

.upload-context-copy>span b{
  color:#3b5f79;
  font-weight:700;
}

.upload-context-copy>span i{
  color:#9caebb;
  font-style:normal;
}

.upload-result-modal .modal-field{
  gap:7px;
  margin-bottom:16px;
}

.upload-result-modal .modal-field>label:first-child{
  font-size:13px;
}

.upload-result-modal #uploadScore{
  height:46px;
  font-size:16px;
  font-weight:650;
  letter-spacing:.01em;
}

.upload-dropzone{
  position:relative;
  min-height:128px;
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  margin:0!important;
  padding:16px;
  border:1.5px dashed #a9c8df;
  border-radius:12px;
  background:#f8fbfd;
  color:#5f7c92;
  text-align:center;
  cursor:pointer;
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragging{
  border-color:#2e87c8;
  background:#eef7fe;
  box-shadow:0 0 0 3px rgba(46,135,200,.08);
}

.upload-dropzone.has-file{
  border-style:solid;
  border-color:#68b596;
  background:#f1faf6;
}

.upload-dropzone.is-invalid{
  border-color:#d94a4a;
  background:#fff5f4;
}

.upload-dropzone input[type="file"]{
  position:absolute;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  border:0!important;
  opacity:0;
  overflow:hidden;
}

.upload-drop-icon{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  margin-bottom:2px;
  border-radius:9px;
  background:#e6f1f8;
  color:#286b99;
  font-size:18px;
  font-weight:700;
}

.upload-dropzone strong{
  color:#244b69;
  font-size:13px;
}

.upload-dropzone>span:not(.upload-drop-icon){
  font-size:11px;
  font-weight:400;
}

.upload-dropzone small{
  display:block;
  max-width:100%;
  margin-top:5px;
  overflow:hidden;
  color:#70889a;
  font-size:11px!important;
  font-weight:600!important;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.upload-result-modal .modal-actions{
  margin-top:2px;
}

.upload-result-modal .modal-actions .btn{
  min-width:116px;
  height:42px;
  font-size:13px;
}

.upload-result-modal .modal-submit[disabled]{
  opacity:.52;
  cursor:not-allowed;
}

.upload-result-modal.is-submitting .modal-submit[disabled]{
  opacity:.72;
  cursor:wait;
}

@media (max-width:599px){
  .upload-result-modal{
    padding:18px;
  }

  .upload-dropzone{
    min-height:116px;
  }
}

/* ==========================================================================
   M3.3.13 — SUBMISSION REVIEW WORKSPACE
   ========================================================================== */

.submission-review-workspace{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:14px;
  align-items:start;
}

.submission-review-workspace.has-detail{
  grid-template-columns:minmax(0,1fr) 430px;
}

.submission-master{
  min-width:0;
}

.submission-detail-panel{
  position:sticky;
  top:16px;
  right:auto;
  z-index:3;
  width:100%;
  max-height:calc(100vh - 32px);
  overflow:auto;
  border:1px solid #d9e5ed;
  border-radius:12px;
  background:#fff;
  box-shadow:0 12px 32px rgba(16,47,73,.10);
  transform:none;
  visibility:hidden;
}

.submission-review-workspace.has-detail .submission-detail-panel{
  visibility:visible;
}

.submission-detail-panel .admin-drawer-head{
  position:sticky;
  top:0;
  z-index:2;
  background:#fff;
}

.submission-detail-empty{
  min-height:260px;
  display:grid;
  place-items:center;
  align-content:center;
  text-align:center;
}

.submission-detail-empty h3{
  margin:8px 0 3px;
  font-size:15px;
}

.submission-detail-empty p{
  margin:0;
  max-width:250px;
  color:#7a8fa0;
  font-size:11px;
}

.submission-detail-title{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:12px;
}

.submission-detail-title strong{
  display:block;
  color:#173b59;
  font-size:15px;
}

.submission-detail-title div span,
.submission-detail-title>span{
  color:#748a9b;
  font-size:11px;
}

.submission-compare-rich{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.submission-compare-rich [data-sub-percent].is-above{
  color:#168153;
}

.submission-compare-rich [data-sub-percent].is-below{
  color:#c33d42;
}

.submission-meta-line{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin:12px 0;
  padding:9px 11px;
  border:1px solid #e2eaf0;
  border-radius:8px;
  background:#f8fafc;
  font-size:11px;
}

.submission-meta-line span{
  color:#7a8fa0;
}

.submission-meta-line b{
  color:#36556d;
}

.submission-meta-line b.is-exif-old{
  color:#c33d42;
}

.submission-image-compact{
  min-height:220px;
  max-height:340px;
  margin-bottom:14px;
  overflow:hidden;
  border-radius:10px;
  background:#f4f7f9;
}

.submission-image-compact img{
  width:100%;
  height:280px;
  object-fit:contain;
  background:#10161c;
}

.submission-image-compact .admin-outline-btn{
  position:absolute;
  right:8px;
  bottom:8px;
}

.submission-row{
  cursor:pointer;
  transition:background .12s ease,box-shadow .12s ease;
}

.submission-row-approved{
  box-shadow:inset 3px 0 0 #4aac7d;
  background:rgba(73,170,124,.045);
}

.submission-row-rejected{
  box-shadow:inset 3px 0 0 #d85559;
  background:rgba(216,85,89,.045);
}

.submission-row-corrected{
  box-shadow:inset 3px 0 0 #cc8a21;
  background:rgba(204,138,33,.045);
}

.submission-row.is-selected{
  outline:2px solid rgba(35,133,237,.32);
  outline-offset:-2px;
  background:#eef7ff;
}

.submission-norm-cell{
  display:grid;
  grid-template-columns:auto auto;
  gap:1px 7px;
  align-items:baseline;
  min-width:100px;
  padding:6px 8px;
  border-radius:7px;
}

.submission-norm-cell span{
  color:#72899b;
  font-size:11px;
}

.submission-norm-cell strong{
  grid-column:1;
  color:#284c66;
  font-size:13px;
}

.submission-norm-cell small{
  grid-column:2;
  grid-row:1 / span 2;
  align-self:center;
  font-size:11px!important;
  font-weight:750;
}

.submission-norm-cell.is-above{
  background:#eef9f3;
}
.submission-norm-cell.is-above small{
  color:#178153;
}
.submission-norm-cell.is-below{
  background:#fff2f2;
}
.submission-norm-cell.is-below small{
  color:#c33d42;
}

.submission-detail-panel .admin-review-buttons{
  position:sticky;
  bottom:-1px;
  z-index:2;
  margin:12px -22px -28px;
  padding:12px 22px 18px;
  background:linear-gradient(to top,#fff 78%,rgba(255,255,255,.94));
  border-top:1px solid #e4ebf0;
}

@media (max-width:1450px){
  .submission-review-workspace.has-detail{
    grid-template-columns:minmax(0,1fr) 390px;
  }
}

@media (max-width:1100px){
  .submission-review-workspace.has-detail{
    grid-template-columns:1fr;
  }
  .submission-detail-panel{
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    width:min(460px,96vw);
    max-height:none;
    border-radius:0;
    z-index:40;
  }
}

/* ==========================================================================
   M3.3.14 — COMPACT SUBMISSION REVIEW + STATUS FILTER + VIEWPORT FIX
   ========================================================================== */

.admin-shell,
.admin-workspace{
  max-width:100%;
  min-width:0;
}

.admin-workspace{
  overflow-x:hidden;
}

.submission-kpis{
  gap:8px;
  margin-bottom:10px;
}

.submission-kpis .admin-metric{
  min-height:58px;
  padding:8px 12px;
}

.submission-kpis .admin-metric span{
  font-size:10px;
}

.submission-kpis .admin-metric b{
  margin-top:2px;
  font-size:19px;
}

.submission-toolbar{
  flex-wrap:nowrap;
}

.submission-toolbar .admin-search-wrap{
  min-width:160px;
}

.admin-status-filter{
  flex:0 0 140px;
  height:36px;
  border:1px solid #d2dfe9;
  border-radius:7px;
  background:#fff;
  color:#183b5b;
  padding:0 30px 0 10px;
  font-size:11px;
}

.submission-bulkbar{
  justify-content:flex-start;
  gap:8px;
}

.submission-review-workspace{
  width:100%;
  max-width:100%;
  min-width:0;
}

.submission-review-workspace.has-detail{
  grid-template-columns:minmax(0,1fr) 380px;
}

.submission-master,
.submission-master form,
.submission-master .admin-table-card{
  min-width:0;
  max-width:100%;
}

.submission-master .admin-table-card{
  overflow-x:auto;
  overflow-y:visible;
}

.submission-master .admin-data-table{
  min-width:980px;
}

.submission-detail-panel{
  max-height:calc(100vh - 20px);
  overflow:auto;
}

.submission-detail-panel .admin-drawer-head{
  padding-top:10px;
  padding-bottom:10px;
}

.submission-detail-panel .admin-drawer-body{
  padding:12px 14px 14px;
}

.submission-detail-title.compact{
  margin-bottom:8px;
}

.submission-detail-title.compact strong{
  font-size:13px;
}

.submission-detail-title.compact span{
  font-size:10px;
}

.submission-image-top{
  min-height:170px;
  max-height:245px;
  margin-bottom:9px;
}

.submission-image-top img{
  height:220px;
}

.submission-image-top .admin-outline-btn{
  padding:6px 8px;
  font-size:10px;
}

.submission-compare-dense{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  margin-bottom:8px;
}

.submission-compare-dense>div{
  min-height:45px;
  padding:6px 8px;
  border-radius:7px;
}

.submission-compare-dense>div.wide{
  grid-column:1 / -1;
  min-height:36px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.submission-compare-dense span{
  font-size:9px;
}

.submission-compare-dense b{
  margin-top:2px;
  font-size:11px;
}

.submission-score-field{
  margin-top:5px!important;
  font-size:11px!important;
}

.submission-score-field input{
  height:34px!important;
  font-size:13px!important;
  font-weight:700;
}

.submission-detail-panel .admin-review-buttons{
  margin:8px -14px -14px;
  padding:8px 14px 10px;
  gap:7px;
}

.submission-detail-panel .admin-review-buttons button{
  min-height:36px;
  padding:7px 8px;
  font-size:11px;
}

.submission-row-approved{
  box-shadow:none;
  background:rgba(73,170,124,.085);
}

.submission-row-rejected{
  box-shadow:none;
  background:rgba(216,85,89,.085);
}

.submission-row-corrected{
  box-shadow:none;
  background:rgba(204,138,33,.08);
}

.submission-row-pending{
  box-shadow:none;
}

.submission-row.is-selected{
  box-shadow:inset 0 0 0 2px rgba(35,133,237,.32);
  outline:0;
}

@media (max-width:1280px){
  .submission-review-workspace.has-detail{
    grid-template-columns:minmax(0,1fr) 350px;
  }
}

@media (max-width:1050px){
  .submission-review-workspace.has-detail{
    grid-template-columns:1fr;
  }
  .submission-detail-panel{
    width:min(390px,96vw);
  }
}

/* ==========================================================================
   M3.3.15 — SUBMISSION REVIEW STABILIZATION + VISUAL ALIGNMENT
   ========================================================================== */

/* Never show the empty state and review content at the same time. */
.submission-detail-empty[hidden],
.submission-detail-content[hidden]{
  display:none!important;
}

/* Keep the whole admin application inside the viewport. */
.admin-shell{
  width:100%;
  max-width:100vw;
  overflow-x:hidden;
}
.admin-workspace{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}

/* Low KPI strip, but with the visual hierarchy from the approved mockup. */
.submission-kpis{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-bottom:10px;
}
.submission-kpis .admin-metric{
  min-height:54px;
  padding:7px 11px;
  border-radius:9px;
}
.submission-kpis .admin-metric:nth-child(1){background:#f8fbfd;}
.submission-kpis .admin-metric:nth-child(2){background:#fffbf2;}
.submission-kpis .admin-metric:nth-child(3){background:#f1faf5;}
.submission-kpis .admin-metric:nth-child(4){background:#fff5f5;}
.submission-kpis .admin-metric span{font-size:9px;}
.submission-kpis .admin-metric b{font-size:18px;line-height:1.05;}

/* Master/detail layout: table may scroll, page may not. */
.submission-review-workspace,
.submission-review-workspace.has-detail{
  width:100%;
  min-width:0;
  max-width:100%;
}
.submission-review-workspace.has-detail{
  grid-template-columns:minmax(0,1fr) 390px;
  gap:10px;
}
.submission-master,
.submission-master form,
.submission-master .admin-table-card{
  min-width:0;
  max-width:100%;
}
.submission-master .admin-table-card{
  width:100%;
  overflow-x:auto;
  overflow-y:visible;
  overscroll-behavior-x:contain;
}
.submission-master .admin-data-table{
  width:max(100%,980px);
  min-width:980px;
}

/* Review panel matches approved concept and is optimized for short laptop screens. */
.submission-detail-panel{
  position:sticky;
  top:8px;
  width:100%;
  min-width:0;
  max-height:calc(100vh - 16px);
  overflow:hidden;
  border-radius:11px;
  display:flex;
  flex-direction:column;
}
.submission-detail-panel .admin-drawer-head{
  flex:0 0 auto;
  min-height:48px;
  padding:8px 12px;
  border-bottom:1px solid #e2eaf0;
}
.submission-detail-panel .admin-drawer-head small{
  font-size:9px;
}
.submission-detail-panel .admin-drawer-head h2{
  margin-top:1px;
  font-size:15px!important;
}
.submission-detail-panel .admin-drawer-head button{
  width:28px;
  height:28px;
  font-size:17px;
}
.submission-detail-panel .admin-drawer-body{
  min-height:0;
  padding:9px 11px 11px;
}
.submission-detail-content{
  overflow:hidden;
}
.submission-detail-title.compact{
  min-height:34px;
  margin:0 0 6px;
  align-items:center;
}
.submission-detail-title.compact strong{
  font-size:13px;
  line-height:1.15;
}
.submission-detail-title.compact div span,
.submission-detail-title.compact>span{
  font-size:9px;
  line-height:1.2;
}

/* Screenshot is the primary review asset and appears immediately. */
.submission-image-top{
  position:relative;
  min-height:0;
  height:190px;
  max-height:190px;
  margin:0 0 7px;
  border-radius:8px;
}
.submission-image-top img{
  width:100%;
  height:190px;
  object-fit:contain;
  background:#10161c;
}
.submission-image-top .submission-image-placeholder{
  min-height:76px;
  height:76px;
  display:grid;
  place-items:center;
  padding:10px;
  font-size:9px;
  text-align:center;
}
.submission-image-top:not(:has(img:not([hidden]))) {
  height:76px;
  max-height:76px;
}
.submission-image-top .admin-outline-btn{
  right:6px;
  bottom:6px;
  padding:5px 7px;
  border-radius:6px;
  font-size:9px;
}

/* Dense 3x2 statistics grid + a single EXIF row. */
.submission-compare-dense{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  margin:0 0 6px;
}
.submission-compare-dense>div{
  min-height:40px;
  padding:5px 7px;
  border-radius:7px;
  background:#f5f8fa;
}
.submission-compare-dense>div.wide{
  grid-column:1 / -1;
  min-height:28px;
  padding:4px 7px;
}
.submission-compare-dense span{
  font-size:8px!important;
  line-height:1.05;
}
.submission-compare-dense b{
  margin-top:2px;
  font-size:11px!important;
  line-height:1.15;
}
.submission-compare-dense b.is-exif-old{
  color:#c33d42;
}

/* Reviewed score is compact and dots are presentation-only, not stored. */
.submission-score-field{
  display:grid!important;
  grid-template-columns:105px minmax(0,1fr);
  align-items:center;
  gap:7px;
  margin:3px 0 0!important;
  font-size:10px!important;
}
.submission-score-field input{
  height:31px!important;
  min-width:0;
  padding:0 8px!important;
  font-size:12px!important;
  font-weight:700;
}

/* Always-visible compact review actions. */
.submission-detail-panel .admin-review-buttons{
  position:static;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  margin:7px 0 0;
  padding:7px 0 0;
  border-top:1px solid #e4ebf0;
  background:#fff;
}
.submission-detail-panel .admin-review-buttons button{
  min-height:33px;
  padding:6px 5px;
  border-radius:7px;
  font-size:10px;
}

/* Status coloring survives horizontal table scrolling. */
.submission-row-approved{background:#eef8f2!important;box-shadow:none!important;}
.submission-row-rejected{background:#fff0f0!important;box-shadow:none!important;}
.submission-row-corrected{background:#fff8e8!important;box-shadow:none!important;}
.submission-row-pending{background:#fff!important;box-shadow:none!important;}
.submission-row.is-selected{
  background:#e9f4ff!important;
  box-shadow:inset 0 0 0 2px rgba(35,133,237,.30)!important;
  outline:0!important;
}

/* Clearer status filter label without consuming extra vertical space. */
.admin-status-filter{
  min-width:145px;
}

@media (max-width:1280px){
  .submission-review-workspace.has-detail{
    grid-template-columns:minmax(0,1fr) 360px;
  }
  .submission-image-top,
  .submission-image-top img{
    height:175px;
    max-height:175px;
  }
}

@media (max-width:1050px){
  .submission-review-workspace.has-detail{grid-template-columns:1fr;}
  .submission-detail-panel{
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    width:min(390px,96vw);
    max-height:none;
    border-radius:0;
    z-index:40;
  }
}

/* Fallback for browsers without :has() support. The JS [hidden] state still
   controls image/placeholder visibility, so no data is hidden incorrectly. */

/* ==========================================================================
   M3.3.16 — SUBMISSION REVIEW HOTFIX + TABLE CLEANUP
   ========================================================================== */

.admin-side-bottom .admin-logout-link{
  color:#c7d6e2;
}
.admin-side-bottom .admin-logout-link:hover{
  color:#ffb8b8;
  background:rgba(224,73,77,.12);
}

/* Submission table: one value per column, consistent numeric alignment. */
#subsTable th[data-col="user_value"],
#subsTable th[data-col="norm"],
#subsTable th[data-col="result_percent"],
#subsTable th[data-col="csv_value"],
#subsTable th[data-col="difference"]{
  text-align:right;
}

#subsTable td.submission-number-cell,
#subsTable td.submission-percent-cell{
  text-align:right;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

#subsTable th[data-col="norm"]{
  min-width:78px;
}
#subsTable th[data-col="result_percent"]{
  min-width:92px;
}
#subsTable td.submission-norm-value{
  color:#6f879a;
  font-weight:600;
}

#subsTable td.submission-percent-cell{
  min-width:92px;
  font-weight:750;
  background:transparent!important;
}
#subsTable td.submission-percent-cell.is-above{
  color:#128052;
}
#subsTable td.submission-percent-cell.is-below{
  color:#c63a42;
}
#subsTable td.submission-percent-cell.is-neutral{
  color:#8296a5;
}

/* Status tint belongs to the row only; value cells never add a second tint. */
#subsTable .submission-row-approved td,
#subsTable .submission-row-rejected td,
#subsTable .submission-row-corrected td,
#subsTable .submission-row-pending td{
  background:transparent;
}

/* Screenshot loading/unavailable state is intentionally compact. */
.submission-image-top .submission-image-placeholder{
  color:#788e9f;
}
.submission-image-top .submission-image-placeholder[hidden]{
  display:none!important;
}
.submission-image-top img[hidden]{
  display:none!important;
}

/* ==========================================================================
   M3.3.17 — RELATIVE WEEK LABELS + CURRENT PERIOD NAVIGATION
   ========================================================================== */

.week-card{
  gap:8px;
}

.week-current{
  flex:0 0 auto;
  min-width:58px;
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 9px;
  border:1px solid #cfe1ef;
  border-radius:8px;
  background:rgba(255,255,255,.82);
  color:#176fae;
  font-size:11px;
  font-weight:750;
  text-decoration:none;
  transition:background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease;
}

.week-current:hover{
  background:#eef7ff;
  border-color:#9ec8e8;
  color:#0c5d98;
  transform:translateY(-1px);
}

.week-current.is-current{
  opacity:.46;
  pointer-events:none;
  transform:none;
}

.week-table thead th{
  vertical-align:middle;
}

.week-head-title{
  display:block;
  font-size:13px;
  line-height:1.05;
  font-weight:800;
}

.week-head-range{
  display:block;
  margin-top:3px;
  color:#8398aa;
  font-size:9px;
  line-height:1.05;
  font-weight:600;
  white-space:nowrap;
}

@media (max-width:599px){
  .week-current{
    min-width:50px;
    padding:0 7px;
    font-size:10px;
  }
  .week-head-title{
    font-size:12px;
  }
  .week-head-range{
    font-size:8px;
  }
}

/* ==========================================================================
   M3.3.18 — COMPACT WEEK HEADERS + CURRENT ICON + EVENT CREATE
   ========================================================================== */

.week-current{
  min-width:34px;
  width:34px;
  height:34px;
  padding:0;
  border-radius:9px;
}

.week-current svg{
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.week-head-title{
  font-size:13px;
  line-height:1.05;
  white-space:nowrap;
}

.week-head-range{
  margin-top:2px;
  font-size:9px;
  line-height:1.05;
  letter-spacing:-.01em;
  white-space:nowrap;
}

.week-table thead th{
  padding-left:5px;
  padding-right:5px;
  overflow:hidden;
}

.admin-icon-add{
  flex:0 0 36px;
  width:36px;
  height:36px;
  min-height:36px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  font-size:22px;
  font-weight:500;
  line-height:1;
}

[data-event-danger-zone][hidden]{
  display:none!important;
}

@media (max-width:599px){
  .week-current{
    min-width:32px;
    width:32px;
    height:32px;
  }
  .week-head-title{
    font-size:11px;
  }
  .week-head-range{
    font-size:7.5px;
  }
}

/* ==========================================================================
   M3.3.19 — WEEK NAVIGATOR FIX + EVENT CREATE STABILIZATION
   ========================================================================== */

.week-card{
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 34px 34px;
  grid-template-rows:1fr;
  align-items:center;
  gap:6px;
  width:min(100%,390px);
}

.week-card > *{
  min-width:0;
  grid-row:1;
}

.week-arrow,
.week-current{
  width:32px;
  min-width:32px;
  height:32px;
  margin:0;
  align-self:center;
}

.week-main{
  min-width:0;
  overflow:hidden;
}

.week-head-title{
  display:block;
  font-size:11.5px;
  line-height:1.05;
  font-weight:700;
  white-space:nowrap;
}

.week-head-range{
  display:block;
  margin-top:3px;
  color:#8aa0b5;
  font-size:9.5px;
  line-height:1.05;
  font-weight:600;
  white-space:nowrap;
}

.admin-icon-add{
  text-decoration:none;
}

@media (max-width:599px){
  .week-card{
    grid-template-columns:32px minmax(0,1fr) 32px 32px;
    gap:4px;
  }
  .week-arrow,
  .week-current{
    width:30px;
    min-width:30px;
    height:30px;
  }
  .week-head-title{
    font-size:11.5px;
  }
  .week-head-range{
    font-size:9px;
  }
}

/* ==========================================================================
   M3.3.20 — FRONTEND FLAT WEBP ICONS
   Exact icon color: #176aa7
   ========================================================================== */

.hero-search-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.hero-search-icon img{
  display:block;
  width:15px;
  height:15px;
  object-fit:contain;
}

.stat-icon img{
  display:block;
  width:18px;
  height:18px;
  object-fit:contain;
}

.week-current img{
  display:block;
  width:17px;
  height:17px;
  object-fit:contain;
}

/* ==========================================================================
   M3.3.23 — EVENT TABLE QUICK CONTROLS
   Screenshot / Deadline / Visible / Active live in the Events table.
   ========================================================================== */

#eventsTable .admin-quick-cell{
  text-align:center;
  vertical-align:middle;
  white-space:nowrap;
}

#eventsTable .admin-quick-cell form{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0;
}

.admin-switch-compact{
  transform:scale(.78);
  transform-origin:center;
}

.event-deadline-control{
  display:inline-flex;
  align-items:center;
  width:64px;
  height:30px;
  overflow:hidden;
  border:1px solid #cbdce9;
  border-radius:7px;
  background:#fff;
}

.event-deadline-control input{
  width:42px;
  height:28px;
  min-width:0;
  padding:0 4px;
  border:0;
  outline:0;
  background:transparent;
  color:#183957;
  font:700 11px/1.1 inherit;
  text-align:right;
  appearance:textfield;
  -moz-appearance:textfield;
}

.event-deadline-control input::-webkit-outer-spin-button,
.event-deadline-control input::-webkit-inner-spin-button{
  margin:0;
  appearance:none;
  -webkit-appearance:none;
}

.event-deadline-control b{
  flex:0 0 18px;
  color:#7890a4;
  font-size:10px;
  font-weight:700;
  text-align:left;
}

#eventsTable th[data-col="screenshot"],
#eventsTable th[data-col="visible"],
#eventsTable th[data-col="active"]{
  min-width:74px;
  text-align:center;
}

#eventsTable th[data-col="deadline"]{
  min-width:78px;
  text-align:center;
}

/* The drawer is deliberately shorter: these settings are now table-level. */
[data-drawer="event"] .admin-drawer-body{
  padding-bottom:18px;
}

/* ==========================================================================
   M3.3.24 — EVENT SWITCH HOTFIX + DEADLINE BACK TO MODAL
   ========================================================================== */

#eventsTable .admin-quick-cell{
  text-align:center;
  vertical-align:middle;
  white-space:nowrap;
}

#eventsTable .admin-quick-cell form{
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0;
}

/* Independent switch styling for table cells; does not inherit drawer sizing. */
#eventsTable .admin-switch-compact{
  position:relative;
  display:inline-block;
  width:38px;
  min-width:38px;
  height:22px;
  margin:0;
  transform:none;
  cursor:pointer;
}

#eventsTable .admin-switch-compact > input[type="hidden"]{
  display:none;
}

#eventsTable .admin-switch-compact > input[type="checkbox"]{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  margin:0;
  opacity:0;
  cursor:pointer;
  z-index:3;
}

#eventsTable .admin-switch-compact > i{
  position:absolute;
  inset:0;
  display:block;
  border:1px solid #bdd1df;
  border-radius:999px;
  background:#dce7ee;
  box-shadow:inset 0 1px 2px rgba(16,58,87,.08);
  transition:background .14s ease,border-color .14s ease,box-shadow .14s ease;
}

#eventsTable .admin-switch-compact > i::after{
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(20,55,80,.24);
  transition:transform .14s ease;
}

#eventsTable .admin-switch-compact > input[type="checkbox"]:checked + i{
  border-color:#1679c9;
  background:#2187e2;
}

#eventsTable .admin-switch-compact > input[type="checkbox"]:checked + i::after{
  transform:translateX(16px);
}

#eventsTable .admin-switch-compact > input[type="checkbox"]:focus-visible + i{
  outline:2px solid rgba(23,106,167,.28);
  outline-offset:2px;
}

#eventsTable .admin-switch-compact > input[type="checkbox"]:disabled + i{
  opacity:.58;
}

#eventsTable th[data-col="screenshot"],
#eventsTable th[data-col="visible"],
#eventsTable th[data-col="active"]{
  min-width:82px;
  text-align:center;
}

/* Deadline is intentionally only in the Event drawer again. */
#eventsTable th[data-col="deadline"],
#eventsTable td[data-col="deadline"]{
  display:none;
}

[data-drawer="event"] .admin-input-unit{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
}

[data-drawer="event"] .admin-input-unit b{
  white-space:nowrap;
}

/* ==========================================================================
   M3.3.25 — EVENTS TABLE UX REFINEMENT
   ========================================================================== */

#eventsTable .admin-switch-compact{
  width:32px;
  min-width:32px;
  height:18px;
}

#eventsTable .admin-switch-compact > i::after{
  top:1px;
  left:1px;
  width:14px;
  height:14px;
}

#eventsTable .admin-switch-compact > input[type="checkbox"]:checked + i::after{
  transform:translateX(14px);
}

#eventsTable .admin-quick-cell form{
  min-width:44px;
  min-height:30px;
}

.admin-column-picker-wrap{
  position:relative;
  display:inline-flex;
  flex:0 0 auto;
}

.admin-column-menu{
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  z-index:80;
  width:220px;
  max-height:330px;
  overflow:auto;
  padding:7px;
  border:1px solid #cbdbe7;
  border-radius:9px;
  background:#fff;
  box-shadow:0 12px 30px rgba(19,55,82,.16);
}

.admin-column-menu[hidden]{
  display:none!important;
}

.admin-column-menu-title{
  padding:4px 7px 7px;
  color:#7890a4;
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.admin-column-option{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:30px;
  padding:5px 7px;
  border-radius:6px;
  color:#183957;
  font-size:11px;
  cursor:pointer;
}

.admin-column-option:hover{
  background:#f1f6fa;
}

.admin-column-option input{
  width:15px;
  height:15px;
  margin:0;
  accent-color:#176aa7;
}

.admin-column-option input:disabled + span{
  opacity:.55;
}

#eventsTable th[data-col="next_event"],
#eventsTable td[data-col="next_event"]{
  white-space:nowrap;
}

/* ==========================================================================
   M3.3.27 — EVENT SWITCH CLICK HOTFIX
   Fixes legacy .admin-switch input !important sizing that reduced the real
   checkbox hit area to 1x1 px inside the Events table.
   ========================================================================== */

#eventsTable .admin-switch-compact > input[type="checkbox"]{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-width:100%!important;
  min-height:100%!important;
  margin:0!important;
  padding:0!important;
  opacity:0!important;
  cursor:pointer!important;
  z-index:5!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}

#eventsTable .admin-switch-compact{
  position:relative!important;
  display:inline-block!important;
  width:32px!important;
  min-width:32px!important;
  height:18px!important;
  min-height:18px!important;
  overflow:visible!important;
  cursor:pointer!important;
}

/* Keep the whole quick-control cell easy to target without enlarging the switch. */
#eventsTable .admin-quick-cell form{
  min-width:44px;
  min-height:30px;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

/* ==========================================================================
   M3.3.29 — RESPONSIVE RESULTS FRAME + TB ID HELP
   ========================================================================== */

/* Login help: compact, readable, responsive, with the approved ID example. */
.login-instructions{
  position:relative;
  width:min(92vw,450px);
  max-width:450px;
  max-height:min(88vh,760px);
  overflow:auto;
  margin:auto;
  padding:24px 26px 26px;
  border:0;
  border-radius:14px;
  background:#fff;
  color:#183b5b;
  box-shadow:0 30px 80px rgba(0,0,0,.25);
}

.login-instructions::backdrop{
  background:rgba(7,22,39,.48);
  backdrop-filter:blur(2px);
}

.login-instructions>button{
  position:absolute;
  top:12px;
  right:14px;
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  padding:0;
  border:0;
  border-radius:8px;
  background:#eef5fa;
  color:#244d6e;
  font-size:25px;
  line-height:1;
  cursor:pointer;
}

.login-instructions h2{
  margin:0 44px 16px 0;
  color:#173b5d;
  font-size:20px;
  line-height:1.15;
}

.login-id-help-copy{
  color:#273f55;
  font-size:13px;
  line-height:1.45;
}

.login-id-help-copy p{
  margin:0 0 10px;
}

.login-id-help-copy strong{
  color:#173b5d;
  font-weight:750;
}

.login-id-help-image{
  display:block;
  width:100%;
  height:auto;
  margin-top:16px;
  border:1px solid #d7e3ec;
  border-radius:9px;
  background:#f7f9fb;
}

@media (max-width:599px){
  .login-instructions{
    width:calc(100vw - 24px);
    max-height:88vh;
    padding:20px 18px 20px;
    border-radius:12px;
  }

  .login-instructions h2{
    margin-right:38px;
    font-size:18px;
  }

  .login-id-help-copy{
    font-size:12px;
  }

  .login-id-help-image{
    margin-top:13px;
    border-radius:7px;
  }
}

/* ==========================================================================
   M3.3.31 — EVENTS BLOCK STRETCH ONLY
   Only the visual Events table-block may consume remaining horizontal space.
   Identity / Score / Week widths and event-column geometry remain unchanged.
   ========================================================================== */

@media (max-width:1199px){
  .performance-grid{
    width:max-content;
    min-width:100%;
    grid-template-columns:
      var(--id-w)
      var(--score-w)
      var(--week-w)
      minmax(max-content,1fr);
  }

  .table-block.events-block{
    width:auto;
    min-width:max-content;
    justify-self:stretch;
  }

  .events-scroll{
    width:max-content;
    min-width:0;
    max-width:none;
  }

  .events-table{
    width:max-content;
    min-width:calc(var(--event-count) * var(--event-w));
  }
}

/* ==========================================================================
   M3.3.32 — RESPONSIVE HEADER CONTROLS
   Keep Search + 3 KPI cards + week selector in one row for as long as space
   allows. Hide Search before wrapping. Below 600px use two rows:
   week selector first, KPI cards second.
   ========================================================================== */

/* Compact desktop / wide tablet: one row with all controls. */
@media (min-width:900px) and (max-width:1199px){
  .hero-stats{
    grid-template-columns:
      minmax(180px,1.15fr)
      minmax(330px,1.8fr)
      minmax(300px,1.25fr);
    grid-template-areas:"search kpis date";
    gap:10px;
    align-items:center;
  }

  .hero-search{
    display:flex;
    width:100%;
    max-width:none;
    min-width:0;
    justify-self:stretch;
  }

  .kpi-cluster{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    min-width:0;
  }

  .stat-card{
    min-width:0;
    padding-inline:8px;
  }

  .week-card{
    width:100%;
    max-width:none;
    min-width:0;
    justify-self:stretch;
  }
}

/* Narrow tablet: Search disappears, KPI cards + week selector stay in one row. */
@media (min-width:600px) and (max-width:899px){
  .hero-stats{
    grid-template-columns:
      minmax(300px,1.45fr)
      minmax(260px,1fr);
    grid-template-areas:"kpis date";
    gap:8px;
    align-items:center;
  }

  .hero-search{
    display:none;
  }

  .kpi-cluster{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
    min-width:0;
  }

  .stat-card{
    min-width:0;
    padding-inline:6px;
  }

  .stat-icon{
    flex:none;
  }

  .week-card{
    width:100%;
    max-width:none;
    min-width:0;
    justify-self:stretch;
  }
}

/* Mobile: exactly two rows — date selector first, KPI cards second. */
@media (max-width:599px){
  .hero-stats{
    grid-template-columns:1fr;
    grid-template-areas:
      "date"
      "kpis";
    gap:8px;
  }

  .hero-search{
    display:none;
  }

  .week-card{
    width:100%;
    max-width:none;
    min-width:0;
  }

  .kpi-cluster{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
    width:100%;
    min-width:0;
  }
}

/* Events panel stays the only stretchable result block from M3.3.31. */
@media (max-width:1199px){
  .table-block.events-block{
    align-self:stretch;
  }
}

/* ==========================================================================
   M3.3.35 — RESPONSIVE EVENTS DESKTOP-MODEL FIX
   Base: M3.3.32. Builds on the proven >=1200px architecture.
   Only the fourth grid track (Events) is flexible below 1200px.
   Event cell geometry itself is intentionally left untouched.
   ========================================================================== */

@media (max-width:1199px){
  .performance-grid{
    width:100%;
    min-width:calc(
      var(--id-w)
      + var(--score-w)
      + var(--week-w)
      + (3 * var(--table-gap))
      + (var(--event-count) * var(--event-w))
    );
    grid-template-columns:
      var(--id-w)
      var(--score-w)
      var(--week-w)
      minmax(calc(var(--event-count) * var(--event-w)),1fr);
  }

  .table-block.events-block,
  .table-block.events-block > .events-scroll,
  .table-block.events-block .events-table{
    width:100%;
    max-width:none;
  }

  .table-block.events-block{
    min-width:0;
  }

  .table-block.events-block > .events-scroll{
    min-width:0;
  }

  .table-block.events-block .events-table{
    min-width:calc(var(--event-count) * var(--event-w));
  }
}

/* ==========================================================================
   M3.3.36 — RESPONSIVE CONTENT VERTICAL LIFT
   At the two existing responsive breakpoints the navigation stack becomes
   taller. Lift both the header controls and the results area together so the
   table does not drop unnecessarily low.
   ========================================================================== */

/* 900–1199 px: lift controls + results by 60 px. */
@media (min-width:900px) and (max-width:1199px){
  .hero-stats{
    transform:translate(-50%,-60px);
  }

  .main{
    margin-top:-60px;
  }
}

/* <=899 px is the exact breakpoint where the layout changes again.
   Lift controls + results by 80 px. */
@media (max-width:899px){
  .hero-stats{
    transform:translate(-50%,-80px);
  }

  .main{
    margin-top:-80px;
  }
}

/* On mobile hero-stats uses the same centered horizontal frame, so preserve
   the existing X centering while applying the stronger vertical lift. */
@media (max-width:599px){
  .hero-stats{
    transform:translate(-50%,-80px);
  }
}

/* ==========================================================================
   M3.3.37 — MOBILE TWO-ROW VERTICAL OFFSET
   The exact breakpoint is 599px, where the navigation changes to two rows.
   Relative to the <=899px lift (-80px), lower both controls and results by
   50px, resulting in a final mobile offset of -30px.
   ========================================================================== */

@media (max-width:599px){
  .hero-stats{
    transform:translate(-50%,-30px);
  }

  .main{
    margin-top:-30px;
  }
}

/* ==========================================================================
   M3.3.39 — MEMBER PERFORMANCE HISTORY
   ========================================================================== */

.member-name-link{
  appearance:none;
  border:0;
  padding:0;
  background:none;
  color:#173e5f;
  font:inherit;
  font-weight:800;
  cursor:pointer;
  text-align:left;
}
.member-name-link:hover,
.member-name-link:focus-visible{
  color:#176aa7;
  text-decoration:underline;
  text-underline-offset:2px;
}

.member-detail-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin:0 0 18px;
  padding:4px;
  border:1px solid #dfe8ef;
  border-radius:10px;
  background:#f5f8fb;
}
.member-detail-tabs button{
  min-height:34px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#6c8192;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.member-detail-tabs button.active{
  background:#fff;
  color:#176aa7;
  box-shadow:0 2px 8px rgba(19,57,87,.08);
}

.member-performance-panel{
  min-height:300px;
}
.member-performance-loading,
.member-performance-error,
.member-performance-empty{
  padding:18px;
  border:1px solid #e0e8ee;
  border-radius:9px;
  background:#f8fafc;
  color:#718696;
  font-size:11px;
  text-align:center;
}
.member-performance-error{
  border-color:#f0cccc;
  background:#fff3f3;
  color:#a73a3a;
}

.member-performance-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-bottom:20px;
}
.member-performance-kpis>div{
  min-width:0;
  padding:12px 10px;
  border:1px solid #dfe8ef;
  border-radius:10px;
  background:#f8fbfd;
}
.member-performance-kpis span,
.member-performance-kpis small{
  display:block;
  color:#7c909f;
  font-size:10px;
}
.member-performance-kpis strong{
  display:block;
  margin:5px 0 2px;
  color:#173e5f;
  font-size:18px;
  line-height:1.1;
}
.member-performance-kpis small{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.member-performance-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.member-performance-head h3{
  margin:0;
  color:#183c5b;
  font-size:15px;
}
.member-performance-head p{
  margin:4px 0 0;
  color:#8194a4;
  font-size:10px;
}

.member-performance-table-wrap{
  overflow-x:auto;
  border:1px solid #dfe8ef;
  border-radius:10px;
  background:#fff;
}
.member-performance-table{
  width:100%;
  min-width:390px;
  border-collapse:collapse;
  font-size:11px;
}
.member-performance-table th{
  padding:9px 10px;
  background:#f5f8fb;
  color:#718596;
  font-size:10px;
  font-weight:800;
  text-align:left;
  white-space:nowrap;
}
.member-performance-table td{
  padding:10px;
  border-top:1px solid #e7edf2;
  color:#34536d;
  white-space:nowrap;
}
.member-performance-table td:nth-child(2){
  white-space:normal;
}
.member-performance-empty{
  margin:12px;
}

@media (max-width:599px){
  .admin-member-drawer{
    width:100vw;
    max-width:100vw;
  }
  .member-performance-kpis{
    gap:6px;
  }
  .member-performance-kpis>div{
    padding:10px 8px;
  }
  .member-performance-kpis strong{
    font-size:15px;
  }
}

/* M3.3.40 — member drawer tab visibility hardening */
.admin-member-drawer [data-member-panel][hidden]{
  display:none !important;
}
.admin-member-drawer [data-member-panel]:not([hidden]){
  display:block;
}

/* ==========================================================================
   M3.3.41 — AVATAR UPLOAD & CROP
   ========================================================================== */

body.avatar-modal-open{
  overflow:hidden;
}

.avatar-modal[hidden]{
  display:none !important;
}
.avatar-modal{
  position:fixed;
  inset:0;
  z-index:4000;
  display:grid;
  place-items:center;
  padding:20px;
}
.avatar-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(18,42,65,.42);
  backdrop-filter:blur(5px);
}
.avatar-dialog{
  position:relative;
  width:min(92vw,560px);
  max-height:min(90vh,760px);
  overflow:auto;
  padding:22px;
  border:1px solid rgba(196,214,228,.95);
  border-radius:16px;
  background:rgba(255,255,255,.985);
  box-shadow:0 28px 80px rgba(20,49,76,.28);
}
.avatar-dialog-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}
.avatar-dialog-head h2{
  margin:0;
  color:#173b5c;
  font-size:21px;
  line-height:1.15;
}
.avatar-dialog-head p{
  margin:5px 0 0;
  color:#7a8fa0;
  font-size:11px;
}
.avatar-dialog-close{
  flex:none;
  width:34px;
  height:34px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#294c68;
  font-size:25px;
  line-height:1;
  cursor:pointer;
}
.avatar-dialog-close:hover{
  background:#f1f6fa;
}

.avatar-file-input{
  display:none;
}

.avatar-drop-zone{
  min-height:330px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:28px;
  border:1.5px dashed #98bfe3;
  border-radius:14px;
  background:#fbfdff;
  text-align:center;
  transition:border-color .15s ease,background .15s ease,transform .15s ease;
}
.avatar-drop-zone.drag-over{
  border-color:#2d7bd4;
  background:#f0f7ff;
  transform:scale(.995);
}
.avatar-drop-icon{
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  border:2px solid #4f83c2;
  border-radius:50%;
  color:#3c78bd;
  font-size:30px;
  font-weight:700;
}
.avatar-drop-zone strong{
  color:#173b5c;
  font-size:17px;
}
.avatar-drop-zone>span{
  color:#91a2b0;
  font-size:11px;
}
.avatar-drop-zone small{
  color:#7c91a4;
  font-size:10px;
}
.avatar-choose-button,
.avatar-save-button{
  min-height:42px;
  padding:0 22px;
  border:0;
  border-radius:9px;
  background:#2b78d4;
  color:#fff;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(43,120,212,.18);
}
.avatar-choose-button:hover,
.avatar-save-button:hover{
  background:#236cbe;
}
.avatar-save-button:disabled{
  opacity:.6;
  cursor:wait;
}

.avatar-editor{
  display:flex;
  flex-direction:column;
  align-items:center;
}
.avatar-editor[hidden]{
  display:none !important;
}
.avatar-crop-viewport{
  position:relative;
  width:min(72vw,360px);
  aspect-ratio:1;
  overflow:hidden;
  border-radius:50%;
  background:#d8e2ea;
  box-shadow:
    0 0 0 1px #aec3d3,
    0 10px 28px rgba(25,59,88,.16);
  cursor:grab;
  touch-action:none;
  user-select:none;
}
.avatar-crop-viewport.dragging{
  cursor:grabbing;
}
.avatar-crop-viewport img{
  position:absolute;
  left:50%;
  top:50%;
  max-width:none;
  max-height:none;
  pointer-events:none;
  user-select:none;
  will-change:width,height,transform;
}
.avatar-crop-guide{
  position:absolute;
  inset:0;
  border:2px solid rgba(255,255,255,.95);
  border-radius:50%;
  pointer-events:none;
  box-shadow:inset 0 0 0 1px rgba(27,63,91,.14);
}
.avatar-crop-guide::before,
.avatar-crop-guide::after{
  content:"";
  position:absolute;
  background:rgba(255,255,255,.35);
}
.avatar-crop-guide::before{
  left:50%;
  top:0;
  bottom:0;
  width:1px;
}
.avatar-crop-guide::after{
  top:50%;
  left:0;
  right:0;
  height:1px;
}

.avatar-drag-hint{
  margin:10px 0 14px;
  color:#7a8ea0;
  font-size:10px;
}

.avatar-zoom-row{
  width:100%;
  margin-top:2px;
}
.avatar-zoom-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:6px;
  color:#314f68;
  font-size:11px;
}
.avatar-zoom-label span{
  color:#7890a2;
}
.avatar-zoom-control{
  display:grid;
  grid-template-columns:18px 1fr 18px;
  gap:8px;
  align-items:center;
  color:#31516d;
  font-weight:800;
}
.avatar-zoom-control input{
  width:100%;
  accent-color:#2b78d4;
}

.avatar-editor-actions{
  width:100%;
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:20px;
  padding-top:16px;
  border-top:1px solid #e4ebf1;
}
.avatar-editor-actions>div{
  display:flex;
  gap:7px;
}
.avatar-secondary-button{
  min-height:38px;
  padding:0 12px;
  border:1px solid #d6e2eb;
  border-radius:8px;
  background:#f8fbfd;
  color:#31516c;
  font-size:11px;
  font-weight:750;
  cursor:pointer;
}
.avatar-secondary-button:hover{
  background:#eef5fa;
}

.avatar-message{
  margin-top:12px;
  padding:10px 12px;
  border:1px solid #efcaca;
  border-radius:8px;
  background:#fff4f4;
  color:#a43d3d;
  font-size:11px;
}
.avatar-message[data-kind="success"]{
  border-color:#c9e5d2;
  background:#f3fbf5;
  color:#287143;
}

@media (max-width:599px){
  .avatar-modal{
    padding:8px;
  }
  .avatar-dialog{
    width:100%;
    max-height:96vh;
    padding:16px;
    border-radius:14px;
  }
  .avatar-drop-zone{
    min-height:280px;
  }
  .avatar-crop-viewport{
    width:min(82vw,330px);
  }
  .avatar-editor-actions{
    flex-direction:column;
  }
  .avatar-editor-actions>div{
    width:100%;
  }
  .avatar-editor-actions>div:last-child{
    flex-direction:row;
  }
  .avatar-secondary-button,
  .avatar-save-button{
    flex:1;
  }
}

/* ==========================================================================
   M3.3.42 — MEMBER DRAWER REDESIGN + PERFORMANCE BANDS
   ========================================================================== */

.admin-member-drawer{width:min(570px,96vw)}
.admin-member-drawer .admin-drawer-body{padding:14px 20px 22px}
.member-drawer-head{min-height:74px}

.member-identity-strip{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto auto;
  gap:12px;
  align-items:center;
  padding:2px 0 14px;
  margin-bottom:12px;
  border-bottom:1px solid #e4ebf1;
}
.member-identity-strip .admin-detail-avatar{
  width:58px;height:58px;margin:0;font-size:22px;
  box-shadow:0 6px 18px rgba(18,59,95,.12)
}
.member-identity-copy{min-width:0}
.member-identity-meta{color:#7a8ea0;font-size:11px;line-height:1.2}
.member-identity-meta strong{color:#385873;font-weight:800}
.member-identity-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
.member-role-pill,.member-status-pill{
  display:inline-flex;align-items:center;min-height:24px;padding:0 10px;
  border-radius:999px;font-size:10px;font-weight:850
}
.member-role-pill{background:#fff1c9;color:#95680b}
.member-status-pill{background:#ddf5e7;color:#197245}
.member-days-compact{
  min-width:92px;padding:8px 11px;border:1px solid #cfe2f3;
  border-radius:9px;background:#f0f7fd
}
.member-days-compact span{display:block;color:#718799;font-size:10px}
.member-days-compact strong{display:block;margin-top:3px;color:#126dc3;font-size:14px}
.member-active-compact{
  display:flex;align-items:center;gap:7px;padding:8px 9px;border:1px solid #dbe6ee;
  border-radius:9px;background:#f8fbfd;color:#597289;font-size:10px;font-weight:800;cursor:pointer
}

.member-detail-tabs{margin-bottom:12px}
.member-section-heading{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.member-section-heading h3{margin:0;color:#173e5f;font-size:14px}
.member-section-icon{color:#1979d5;font-size:16px;line-height:1}

.member-settings-card{padding:14px!important;margin-bottom:12px}
.member-settings-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px
}
.member-settings-grid label{min-width:0;margin:0!important}
.member-settings-grid .admin-field-help{display:block;margin-top:5px}
.member-settings-actions{
  display:flex;justify-content:flex-end;gap:8px;margin-top:14px;padding-top:12px;
  border-top:1px solid #e5edf3
}
.member-settings-actions .admin-outline-btn,
.member-settings-actions .admin-primary-btn{min-width:118px}

.member-meta-compact{padding:14px}
.member-meta-compact dl{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0
}
.member-meta-compact dl>div{
  display:block;min-width:0;padding:10px 11px;border:1px solid #e6edf2;
  border-radius:8px;background:#fbfdfe
}
.member-meta-compact dt{margin:0 0 4px;color:#8295a5;font-size:10px}
.member-meta-compact dd{
  margin:0;color:#244963;font-size:11px;font-weight:800;overflow-wrap:anywhere
}

.member-performance-panel{min-height:0}
.member-performance-kpis{margin-bottom:14px}
.member-performance-kpis>div{padding:10px 11px}
.member-performance-head{margin-bottom:8px}
.member-performance-table-wrap{
  max-height:min(52vh,520px);
  overflow:auto;
  scrollbar-gutter:stable;
}
.member-performance-table thead th{
  position:sticky;top:0;z-index:2;background:#f5f8fb;
  box-shadow:0 1px 0 #dfe8ef
}
.member-performance-table tbody tr.performance-above td{background:#eaf8ef}
.member-performance-table tbody tr.performance-below td{background:#fdecec}
.member-performance-table tbody tr.performance-near td{background:#fff7dd}
.member-performance-table tbody tr.performance-neutral td{background:#fff}
.member-performance-table tbody tr.performance-above td:last-child strong{color:#188148}
.member-performance-table tbody tr.performance-below td:last-child strong{color:#c73535}
.member-performance-table tbody tr.performance-near td:last-child strong{color:#a67509}
.member-performance-table tbody tr:hover td{filter:brightness(.985)}

@media (max-width:720px){
  .member-identity-strip{grid-template-columns:auto minmax(0,1fr) auto}
  .member-active-compact{grid-column:2 / -1;justify-self:end;margin-top:-4px}
}
@media (max-width:599px){
  .admin-member-drawer .admin-drawer-body{padding:12px 14px 18px}
  .member-identity-strip{grid-template-columns:auto minmax(0,1fr)}
  .member-days-compact,.member-active-compact{grid-column:auto}
  .member-settings-grid,.member-meta-compact dl{grid-template-columns:1fr}
  .member-settings-actions{display:grid;grid-template-columns:1fr 1fr}
  .member-settings-actions .admin-outline-btn,
  .member-settings-actions .admin-primary-btn{min-width:0;width:100%}
  .member-performance-table-wrap{max-height:55vh}
}

/* ==========================================================================
   M3.3.43 — AVATAR TWO-STEP EDITOR + MEMBER DRAWER KPI FIXES
   ========================================================================== */

/* Member header: keep right-side controls inside drawer */
.member-identity-strip{
  grid-template-columns:auto minmax(0,1fr) minmax(150px,auto);
}
.member-side-compact{
  display:grid;
  grid-template-columns:minmax(92px,1fr);
  gap:7px;
  min-width:0;
}
.member-side-compact .member-days-compact,
.member-side-compact .member-active-compact{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
.member-side-compact .member-active-compact{
  justify-content:space-between;
}
.member-side-compact .admin-switch{
  flex:none;
}

[data-member-performance-week-delta]{
  display:block;
  margin-top:3px;
  color:#7d91a1;
  font-size:10px;
  line-height:1.2;
}
[data-member-performance-week-delta].positive{color:#1f8b4c}
[data-member-performance-week-delta].negative{color:#c43c3c}

/* Avatar two-step shell */
.avatar-dialog{
  width:min(92vw,560px);
  overflow:hidden;
}
.avatar-dialog[data-step="select"]{
  width:min(92vw,540px);
}
.avatar-dialog[data-step="edit"]{
  width:min(92vw,560px);
}
.avatar-dialog-head{
  margin-bottom:12px;
}
.icon-button svg,
.with-icon svg,
.avatar-drop-icon svg,
.avatar-zoom-icon svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.avatar-dialog-close{
  display:grid;
  place-items:center;
}
.avatar-dialog-close svg{
  width:20px;
  height:20px;
}

.avatar-stepper{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:10px;
  margin:0 0 16px;
}
.avatar-step{
  display:flex;
  align-items:center;
  gap:7px;
  color:#8b9cac;
  font-size:10px;
}
.avatar-step span{
  display:grid;
  place-items:center;
  width:23px;
  height:23px;
  border:1px solid #cedbe5;
  border-radius:50%;
  background:#fff;
  font-size:10px;
  font-weight:800;
}
.avatar-step strong{
  font-size:10px;
  font-weight:800;
}
.avatar-step.active{
  color:#176aa7;
}
.avatar-step.active span,
.avatar-step.done span{
  border-color:#7fb4e1;
  background:#edf6fd;
  color:#176aa7;
}
.avatar-step-line{
  height:1px;
  background:#dfe8ef;
}

.avatar-step-view[hidden]{
  display:none !important;
}
.avatar-step-view{
  animation:avatarStepIn .16s ease-out;
}
@keyframes avatarStepIn{
  from{opacity:0;transform:translateY(5px)}
  to{opacity:1;transform:none}
}

.avatar-drop-zone{
  min-height:320px;
}
.avatar-drop-icon{
  display:grid;
  place-items:center;
  width:56px;
  height:56px;
  border:1.5px solid #79aee0;
  border-radius:50%;
  color:#347bc1;
}
.avatar-drop-icon svg{
  width:27px;
  height:27px;
}

.avatar-editor{
  display:flex;
  flex-direction:column;
  align-items:center;
}
.avatar-crop-viewport{
  width:min(64vw,330px);
}
.avatar-drag-hint{
  margin:9px 0 13px;
}
.avatar-zoom-icon{
  display:grid;
  place-items:center;
  color:#31516d;
}
.avatar-zoom-icon svg{
  width:16px;
  height:16px;
}
.with-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
}
.avatar-editor-actions{
  margin-top:16px;
}
.avatar-editor-actions>div{
  flex-wrap:wrap;
}

@media (max-height:760px) and (min-width:600px){
  .avatar-dialog{
    max-height:96vh;
    overflow:auto;
  }
  .avatar-drop-zone{
    min-height:260px;
  }
  .avatar-crop-viewport{
    width:min(52vh,310px);
  }
}

@media (max-width:720px){
  .member-identity-strip{
    grid-template-columns:auto minmax(0,1fr);
  }
  .member-side-compact{
    grid-column:1 / -1;
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:599px){
  .avatar-stepper strong{
    display:none;
  }
  .avatar-stepper{
    grid-template-columns:auto 1fr auto;
  }
  .avatar-crop-viewport{
    width:min(76vw,320px);
  }
  .avatar-editor-actions{
    gap:8px;
  }
  .avatar-editor-actions>div{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
}

/* ==========================================================================
   M3.3.44 — MEMBER OVERVIEW HEADER ALIGNMENT + FRONTEND DOM HOTFIX SUPPORT
   ========================================================================== */

.admin-member-drawer{
  width:min(570px,96vw);
}

.member-drawer-head{
  min-height:72px;
}

.member-identity-row{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:13px;
  align-items:center;
  padding:4px 0 14px;
}

.member-identity-row .admin-detail-avatar{
  width:58px;
  height:58px;
  margin:0;
  font-size:22px;
  box-shadow:0 6px 18px rgba(18,59,95,.12);
}

.member-identity-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.member-identity-name{
  overflow:hidden;
  color:#173e5f;
  font-size:16px;
  line-height:1.15;
  font-weight:850;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.member-identity-tbid{
  margin-top:4px;
  color:#7b90a1;
  font-size:10px;
}

.member-identity-tbid b{
  color:#49677e;
  font-weight:800;
}

.member-header-active{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:118px;
  padding:8px 10px;
  border:1px solid #dbe6ee;
  border-radius:9px;
  background:#f8fbfd;
  color:#527086;
  font-size:10px;
  font-weight:800;
  box-sizing:border-box;
}

.member-header-active .admin-switch{
  flex:none;
  margin-left:auto;
}

.member-overview-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:0 0 12px;
}

.member-overview-summary[hidden]{
  display:none !important;
}

.member-summary-card{
  min-width:0;
  min-height:65px;
  padding:10px 11px;
  border:1px solid #dfe8ef;
  border-radius:10px;
  background:#f8fbfd;
  box-sizing:border-box;
}

.member-summary-card>span{
  display:block;
  color:#7d91a1;
  font-size:10px;
  line-height:1.2;
}

.member-summary-card>strong{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:6px;
  color:#254b66;
  font-size:13px;
  line-height:1.2;
  font-weight:850;
}

.member-summary-card b{
  font:inherit;
}

.member-summary-role strong{
  color:#8a640e;
}

.member-summary-status i{
  width:8px;
  height:8px;
  flex:none;
  border-radius:50%;
  background:#49b66f;
  box-shadow:0 0 0 3px rgba(73,182,111,.10);
}

.member-summary-status i.inactive{
  background:#d85a5a;
  box-shadow:0 0 0 3px rgba(216,90,90,.10);
}

.member-summary-status strong{
  color:#258050;
}

.member-summary-status i.inactive + b{
  color:#b54848;
}

.member-summary-days strong{
  color:#1472c8;
}

.member-detail-tabs{
  margin-top:0;
}

/* Old M3.3.42/43 top blocks are no longer used by the member drawer. */
.member-identity-strip,
.member-side-compact{
  display:none !important;
}

@media (max-width:599px){
  .member-identity-row{
    grid-template-columns:auto minmax(0,1fr);
  }

  .member-header-active{
    grid-column:1 / -1;
    width:100%;
  }

  .member-overview-summary{
    grid-template-columns:1fr;
  }
}

/* ==========================================================================
   M3.3.45 — MEMBER ACTIVE SWITCH VISUAL FIX
   ========================================================================== */

.member-header-active{
  justify-content:space-between;
  gap:12px;
  min-width:132px;
}

.member-header-active .admin-switch{
  position:relative;
  width:42px !important;
  height:24px !important;
  min-width:42px;
  flex:0 0 42px;
}

.member-header-active .admin-switch input{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  margin:0 !important;
  opacity:0 !important;
  cursor:pointer;
  z-index:2;
}

.member-header-active .admin-switch i{
  position:absolute;
  inset:0;
  display:block;
  border-radius:999px;
  background:#d7e0e8;
  border:1px solid #c7d4df;
  box-shadow:inset 0 1px 2px rgba(24,53,77,.08);
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease;
}

.member-header-active .admin-switch i::after{
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 5px rgba(25,51,75,.22);
  transition:transform .16s ease;
}

.member-header-active .admin-switch input:checked + i{
  background:#1f80e0;
  border-color:#1a73c9;
  box-shadow:inset 0 1px 2px rgba(0,71,137,.18);
}

.member-header-active .admin-switch input:checked + i::after{
  transform:translateX(18px);
}

.member-header-active .admin-switch input:focus-visible + i{
  outline:2px solid rgba(31,128,224,.28);
  outline-offset:2px;
}

.member-header-active:has(.admin-switch input:checked){
  border-color:#bfdcf5;
  background:#f3f9fe;
  color:#1b5f99;
}

.member-header-active:has(.admin-switch input:not(:checked)){
  color:#6c7f90;
}

/* ==========================================================================
   M3.3.46 — MEMBER ACTIVE SWITCH CORRECTION
   Force a proper visible toggle track + thumb inside the compact Active box.
   ========================================================================== */

.member-header-active{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  min-width:132px !important;
}

.member-header-active .admin-switch{
  position:relative !important;
  display:inline-block !important;
  width:44px !important;
  height:24px !important;
  min-width:44px !important;
  flex:0 0 44px !important;
  overflow:visible !important;
}

.member-header-active .admin-switch input{
  position:absolute !important;
  inset:0 !important;
  width:44px !important;
  height:24px !important;
  min-width:44px !important;
  margin:0 !important;
  padding:0 !important;
  opacity:0 !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  cursor:pointer !important;
  z-index:3 !important;
}

.member-header-active .admin-switch i{
  position:absolute !important;
  inset:0 !important;
  display:block !important;
  width:44px !important;
  height:24px !important;
  border-radius:999px !important;
  background:#d5dee7 !important;
  border:1px solid #c4d1dc !important;
  box-shadow:inset 0 1px 2px rgba(25,49,72,.08) !important;
  pointer-events:none !important;
  transition:background .16s ease,border-color .16s ease !important;
}

.member-header-active .admin-switch i::after{
  content:"" !important;
  position:absolute !important;
  top:2px !important;
  left:2px !important;
  width:18px !important;
  height:18px !important;
  border-radius:50% !important;
  background:#fff !important;
  box-shadow:0 2px 5px rgba(24,47,70,.24) !important;
  transform:translateX(0) !important;
  transition:transform .16s ease !important;
}

.member-header-active .admin-switch input:checked + i{
  background:#1f80e0 !important;
  border-color:#1a73c9 !important;
}

.member-header-active .admin-switch input:checked + i::after{
  transform:translateX(20px) !important;
}

.member-header-active .admin-switch input:focus-visible + i{
  outline:2px solid rgba(31,128,224,.30) !important;
  outline-offset:2px !important;
}

.member-header-active:has(.admin-switch input:checked){
  border-color:#bcdcf7 !important;
  background:#eef7ff !important;
  color:#1f639d !important;
}

.member-header-active:has(.admin-switch input:not(:checked)){
  border-color:#dbe6ee !important;
  background:#f8fbfd !important;
  color:#6b7f90 !important;
}

/* ==========================================================================
   M3.3.47 — MEMBER SWITCH MATCHES EVENTS SWITCH
   Exact compact geometry and visual treatment used in Events.
   ========================================================================== */

.member-header-active .admin-switch{
  position:relative !important;
  display:inline-block !important;
  width:32px !important;
  min-width:32px !important;
  height:18px !important;
  min-height:18px !important;
  flex:0 0 32px !important;
  overflow:visible !important;
  cursor:pointer !important;
}

.member-header-active .admin-switch input{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  min-width:100% !important;
  min-height:100% !important;
  margin:0 !important;
  padding:0 !important;
  opacity:0 !important;
  cursor:pointer !important;
  z-index:5 !important;
  appearance:none !important;
  -webkit-appearance:none !important;
}

.member-header-active .admin-switch i{
  position:absolute !important;
  inset:0 !important;
  display:block !important;
  width:32px !important;
  height:18px !important;
  border:1px solid #bdd1df !important;
  border-radius:999px !important;
  background:#dce7ee !important;
  box-shadow:inset 0 1px 2px rgba(16,58,87,.08) !important;
  pointer-events:none !important;
  transition:background .14s ease,border-color .14s ease,box-shadow .14s ease !important;
}

.member-header-active .admin-switch i::after{
  content:"" !important;
  position:absolute !important;
  top:1px !important;
  left:1px !important;
  width:14px !important;
  height:14px !important;
  border-radius:50% !important;
  background:#fff !important;
  box-shadow:0 1px 3px rgba(20,55,80,.24) !important;
  transform:translateX(0) !important;
  transition:transform .14s ease !important;
}

.member-header-active .admin-switch input:checked + i{
  border-color:#1679c9 !important;
  background:#2187e2 !important;
}

.member-header-active .admin-switch input:checked + i::after{
  transform:translateX(14px) !important;
}

.member-header-active .admin-switch input:focus-visible + i{
  outline:2px solid rgba(23,106,167,.28) !important;
  outline-offset:2px !important;
}

.member-header-active{
  min-width:118px !important;
  gap:8px !important;
}

/* ==========================================================================
   M3.3.48 — SUBMISSION SCREENSHOT 100% HOVER ZOOM
   ========================================================================== */

.submission-image-top{
  position:relative !important;
  overflow:hidden !important;
  cursor:crosshair;
}

.submission-image-top img{
  position:relative;
  z-index:1;
}

.submission-hover-zoom{
  position:absolute;
  inset:0;
  z-index:3;
  display:none;
  background-repeat:no-repeat;
  background-color:#10161c;
  pointer-events:none;
  cursor:crosshair;
}

.submission-hover-zoom.active{
  display:block;
}

.submission-hover-zoom>span{
  position:absolute;
  top:8px;
  right:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:24px;
  padding:0 8px;
  border:1px solid rgba(255,255,255,.45);
  border-radius:999px;
  background:rgba(13,28,40,.76);
  color:#fff;
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
  backdrop-filter:blur(3px);
}

.submission-image-top.is-hover-zooming .submission-image-placeholder{
  visibility:hidden;
}

/* Keep Enlarge available in the normal state. During hover inspection the
   zoom overlay intentionally covers the screenshot area; leaving it restores
   the button immediately. */
.submission-image-top.is-hover-zooming [data-sub-enlarge]{
  opacity:0;
  pointer-events:none;
}

@media (hover:none), (pointer:coarse){
  .submission-image-top{
    cursor:default;
  }
  .submission-hover-zoom{
    display:none !important;
  }
}

/* ==========================================================================
   M3.3.49 — SUBMISSIONS EVENT + EVENT DATE FILTERS
   Review drawer/modal intentionally unchanged.
   ========================================================================== */

.submission-toolbar{
  display:grid;
  grid-template-columns:minmax(260px,1fr) 180px 180px 190px auto auto;
  gap:8px;
  align-items:center;
}

.submission-toolbar .admin-search-wrap{
  min-width:0;
  width:100%;
}

.submission-toolbar .admin-search-wrap input,
.submission-toolbar select{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}

@media (max-width:1350px){
  .submission-toolbar{
    grid-template-columns:minmax(240px,1fr) repeat(3,minmax(150px,180px));
  }

  .submission-toolbar [data-select-all-visible],
  .submission-toolbar [data-column-picker]{
    width:auto;
  }
}

@media (max-width:980px){
  .submission-toolbar{
    grid-template-columns:1fr 1fr;
  }

  .submission-toolbar .admin-search-wrap{
    grid-column:1 / -1;
  }
}

@media (max-width:599px){
  .submission-toolbar{
    grid-template-columns:1fr;
  }

  .submission-toolbar .admin-search-wrap{
    grid-column:auto;
  }
}

/* ==========================================================================
   M3.3.50 — IMPORT HISTORY & SAFE ROLLBACK FOUNDATION
   ========================================================================== */

.import-history-toolbar{
  display:grid;
  grid-template-columns:minmax(260px,1fr) 170px 190px 180px;
  gap:8px;
  align-items:center;
}
.import-history-toolbar select,
.import-history-toolbar input{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}

.import-history-file{
  max-width:260px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.import-changes-summary{
  color:#4b687f;
  font-size:11px;
  white-space:nowrap;
}

.import-history-actions{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

.import-status-applied,
.import-status-imported{
  background:#dcf4e6;
  color:#1b7547;
}
.import-status-previewed{
  background:#e8f0f6;
  color:#526f84;
}
.import-status-superseded{
  background:#eef1f4;
  color:#708190;
}
.import-status-rolled_back{
  background:#e9edf2;
  color:#596e80;
}
.import-status-failed{
  background:#fde4e4;
  color:#b93d3d;
}

.import-detail-statusline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
  color:#7b8fa0;
  font-size:11px;
}

.import-detail-meta dl{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.import-detail-meta dl>div{
  display:block;
  min-width:0;
  padding:10px;
  border:1px solid #e3ebf1;
  border-radius:8px;
  background:#fbfdfe;
}
.import-detail-meta dt{
  margin-bottom:4px;
  color:#8295a5;
  font-size:10px;
}
.import-detail-meta dd{
  margin:0;
  color:#244963;
  font-size:11px;
  font-weight:800;
  overflow-wrap:anywhere;
}

.import-detail-metrics{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.import-detail-metrics>div{
  padding:11px;
  border:1px solid #e1eaf0;
  border-radius:9px;
  background:#f8fbfd;
}
.import-detail-metrics span{
  display:block;
  color:#8396a5;
  font-size:10px;
}
.import-detail-metrics strong{
  display:block;
  margin-top:4px;
  color:#173e5f;
  font-size:15px;
}

.import-detail-json{
  max-height:220px;
  overflow:auto;
  margin:0;
  padding:12px;
  border:1px solid #e3ebf1;
  border-radius:8px;
  background:#f8fafc;
  color:#3c586d;
  font:10px/1.45 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  white-space:pre-wrap;
  word-break:break-word;
}
.import-detail-errors{
  border-color:#efcccc;
  background:#fff5f5;
  color:#a64242;
}

.admin-confirm-modal[hidden]{
  display:none!important;
}
.admin-confirm-modal{
  position:fixed;
  inset:0;
  z-index:5000;
  display:grid;
  place-items:center;
  padding:18px;
}
.admin-confirm-backdrop{
  position:absolute;
  inset:0;
  background:rgba(18,42,65,.44);
  backdrop-filter:blur(4px);
}
.admin-confirm-dialog{
  position:relative;
  width:min(92vw,470px);
  padding:22px;
  border:1px solid #d5e2eb;
  border-radius:14px;
  background:#fff;
  box-shadow:0 24px 70px rgba(18,49,74,.28);
}
.admin-confirm-dialog h2{
  margin:0 0 7px;
  color:#173e5f;
  font-size:19px;
}
.admin-confirm-dialog>p{
  margin:0;
  color:#718697;
  font-size:11px;
}
.admin-confirm-summary{
  display:grid;
  gap:5px;
  margin:16px 0 10px;
  padding:12px;
  border:1px solid #e1eaf0;
  border-radius:9px;
  background:#f8fbfd;
}
.admin-confirm-summary strong{
  color:#234a67;
  overflow-wrap:anywhere;
}
.admin-confirm-summary span{
  color:#718697;
  font-size:10px;
}
.admin-confirm-warning{
  padding:10px 12px;
  border:1px solid #f0d8ae;
  border-radius:8px;
  background:#fff8e9;
  color:#8c681f;
  font-size:10px;
}
.admin-confirm-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:18px;
}
.admin-danger-btn{
  min-height:40px;
  padding:0 16px;
  border:0;
  border-radius:8px;
  background:#df4b4f;
  color:#fff;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}
.admin-danger-btn:hover{
  background:#c93f43;
}

@media(max-width:950px){
  .import-history-toolbar{
    grid-template-columns:1fr 1fr;
  }
  .import-history-toolbar .admin-search-wrap{
    grid-column:1 / -1;
  }
}
@media(max-width:599px){
  .import-history-toolbar{
    grid-template-columns:1fr;
  }
  .import-history-toolbar .admin-search-wrap{
    grid-column:auto;
  }
  .import-detail-meta dl,
  .import-detail-metrics{
    grid-template-columns:1fr;
  }
}

/* ==========================================================================
   M3.3.51 — CHESTCOUNTER SNAPSHOT + EVENT CYCLE FOUNDATION
   ========================================================================== */

.snapshot-datetime-field{
  display:grid;
  gap:6px;
  color:#244963;
  font-size:11px;
  font-weight:800;
}
.snapshot-datetime-field input{
  width:100%;
  min-height:40px;
}
.snapshot-datetime-field small{
  color:#8093a3;
  font-size:9px;
  font-weight:600;
  line-height:1.45;
}

.counter-preview-heading{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}
.counter-preview-heading p{
  margin:4px 0 0;
  color:#718697;
  font-size:10px;
}

.counter-preview-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:14px 0;
}
.counter-preview-card{
  min-width:0;
  padding:13px;
  border:1px solid #dfe9f0;
  border-radius:10px;
  background:#f9fbfd;
}
.counter-preview-card h3{
  margin:0 0 10px;
  color:#173e5f;
  font-size:12px;
}
.counter-group-list{
  display:grid;
  gap:6px;
  max-height:260px;
  overflow:auto;
}
.counter-group-list>div{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:8px 9px;
  border:1px solid #e6edf2;
  border-radius:7px;
  background:#fff;
}
.counter-group-list strong{
  color:#2c506a;
  font-size:10px;
}
.counter-group-list span{
  color:#8193a2;
  font-size:9px;
  text-align:right;
}
.counter-group-list p{
  margin:0;
  color:#8193a2;
  font-size:10px;
}

.event-counter-section [data-weekly-counter-fields][hidden]{
  display:none!important;
}
.event-counter-section .admin-info-strip{
  margin-top:8px;
}

.counter-metrics-table .metric-points-input{
  width:92px;
  min-width:92px;
  padding:6px 8px;
  font-size:10px;
}
.admin-muted{
  color:#91a0ac;
  font-size:9px;
}

@media(max-width:820px){
  .counter-preview-grid{
    grid-template-columns:1fr;
  }
}

/* ==========================================================================
   M3.3.53 — MEMBERS IMPORT: scanner CSV headers (nickname,user_id,clan)
   ========================================================================== */
.member-import-source-summary{
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid #dfe9f0;
  border-radius:9px;
  background:#f8fbfd;
  color:#72899a;
  font-size:10px;
}
.member-import-source-summary b{
  color:#244963;
}

/* ==========================================================================
   M3.3.54 — CHESTCOUNTER CONFLICT RESOLUTION
   ========================================================================== */
.counter-conflicts-section{
  margin:16px 0;
}
.counter-conflicts-section h3{
  margin:0 0 4px;
}
.admin-section-note{
  margin:0 0 10px;
  color:#7d91a1;
  font-size:10px;
}
.counter-conflicts-table select{
  min-width:170px;
}
.counter-conflict-details summary{
  cursor:pointer;
  color:#2b5572;
  font-size:10px;
  font-weight:800;
}
.counter-conflict-details div{
  max-width:560px;
  margin-top:6px;
  color:#6f8495;
  font-size:9px;
  line-height:1.45;
  white-space:normal;
}

/* ==========================================================================
   M3.3.57 — EVENT ↔ CHESTCOUNTER MAPPING
   ========================================================================== */
.counter-source-workspace{
  margin-bottom:14px;
  padding:14px;
}
.counter-source-workspace-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.counter-source-workspace-head h2{
  margin:0 0 4px;
  color:#173e5f;
  font-size:15px;
}
.counter-source-workspace-head p{
  margin:0;
  color:#768b9c;
  font-size:10px;
}
.counter-source-filters{
  display:flex;
  gap:8px;
  min-width:min(100%,420px);
}
.counter-source-filters input{
  flex:1 1 240px;
}
.counter-source-list{
  display:grid;
  gap:7px;
  max-height:520px;
  overflow:auto;
  padding-right:2px;
}
.counter-source-row{
  display:grid;
  grid-template-columns:minmax(240px,1fr) minmax(330px,1fr) auto;
  gap:10px;
  align-items:center;
  padding:9px 10px;
  border:1px solid #e1eaf0;
  border-radius:9px;
  background:#fbfdfe;
}
.counter-source-row[hidden]{
  display:none!important;
}
.counter-source-identity{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.counter-source-identity>div{
  min-width:0;
}
.counter-source-identity strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#244963;
  font-size:10px;
}
.counter-source-identity small{
  display:block;
  margin-top:2px;
  color:#8798a6;
  font-size:9px;
}
.counter-source-kind{
  min-width:52px;
  justify-content:center;
}
.counter-source-link-form{
  display:grid;
  grid-template-columns:minmax(180px,1fr) auto;
  gap:7px;
  align-items:center;
}
.counter-source-link-form select{
  width:100%;
  min-width:0;
}
.counter-source-empty{
  padding:16px;
  color:#8395a3;
  text-align:center;
  font-size:10px;
}
.event-counter-source-cell{
  display:flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}
.event-counter-source-cell span{
  max-width:190px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.admin-text-btn{
  padding:0;
  border:0;
  background:none;
  color:#b24b4b;
  font:inherit;
  font-size:9px;
  cursor:pointer;
  text-decoration:underline;
}

@media(max-width:1100px){
  .counter-source-row{
    grid-template-columns:minmax(210px,1fr) minmax(280px,1fr);
  }
  .counter-source-row>.admin-outline-btn{
    grid-column:2;
    justify-self:start;
  }
}
@media(max-width:760px){
  .counter-source-workspace-head,
  .counter-source-filters{
    flex-direction:column;
  }
  .counter-source-filters{
    width:100%;
    min-width:0;
  }
  .counter-source-row{
    grid-template-columns:1fr;
  }
  .counter-source-row>.admin-outline-btn{
    grid-column:auto;
  }
}

/* ==========================================================================
   M3.3.58 — EVENTS SUBVIEW FOR CHESTCOUNTER SOURCES
   ========================================================================== */
.admin-subnav{
  display:flex;
  align-items:center;
  gap:5px;
  margin:0 0 12px;
  padding:4px;
  width:max-content;
  max-width:100%;
  border:1px solid #dfe8ef;
  border-radius:10px;
  background:#f5f8fa;
}
.admin-subnav a{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:0 12px;
  border-radius:7px;
  color:#6f8494;
  font-size:10px;
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
}
.admin-subnav a:hover{
  color:#244963;
  background:#fff;
}
.admin-subnav a.active{
  color:#173e5f;
  background:#fff;
  box-shadow:0 1px 4px rgba(26,61,87,.10);
}
.admin-subnav-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:#e9f0f5;
  color:#49677d;
  font-size:9px;
}
.admin-subnav a.active .admin-subnav-count{
  background:#dcecf7;
  color:#20628f;
}
.counter-source-workspace-page{
  margin-bottom:0;
}
.counter-source-empty-state{
  padding:34px 20px;
  text-align:center;
}
.counter-source-empty-state h2{
  margin:0 0 6px;
  color:#244963;
  font-size:15px;
}
.counter-source-empty-state p{
  margin:0;
  color:#8193a2;
  font-size:10px;
}
@media(max-width:599px){
  .admin-subnav{width:100%}
  .admin-subnav a{
    flex:1 1 0;
    justify-content:center;
  }
}

/* ========================================================================== 
   M3.3.59 — POINT CONVERSIONS
   ========================================================================== */
.point-conversion-card .admin-info-strip{
  margin-bottom:0;
}
.point-conversion-table td{
  vertical-align:middle;
}
.point-conversion-editor-cell{
  min-width:390px;
}
.point-conversion-editor{
  display:grid;
  grid-template-columns:minmax(85px,110px) minmax(170px,1fr) auto;
  align-items:center;
  gap:7px;
}
.point-conversion-editor input{
  width:100%;
  min-width:0;
}
.point-conversion-history{
  min-width:170px;
}
.point-conversion-history summary{
  cursor:pointer;
  color:#2e678e;
  font-size:9px;
  font-weight:800;
}
.point-conversion-history-list{
  display:grid;
  gap:5px;
  margin-top:7px;
  min-width:270px;
}
.point-conversion-history-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 7px;
  border:1px solid #e3ebf0;
  border-radius:7px;
  background:#f9fbfc;
}
.point-conversion-history-row strong,
.point-conversion-history-row span{
  display:block;
  white-space:nowrap;
}
.point-conversion-history-row strong{
  color:#244963;
  font-size:9px;
}
.point-conversion-history-row span{
  margin-top:2px;
  color:#8093a1;
  font-size:8px;
}
@media(max-width:900px){
  .point-conversion-editor-cell{
    min-width:330px;
  }
  .point-conversion-editor{
    grid-template-columns:100px minmax(150px,1fr);
  }
  .point-conversion-editor .admin-row-btn{
    grid-column:1 / -1;
    justify-self:start;
  }
}

/* ==========================================================================
   M3.3.60 — POINT CONVERSION CATEGORIES
   ========================================================================== */
.conversion-category-manager{
  margin-bottom:12px;
  padding:14px;
}
.conversion-category-manager-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.conversion-category-manager-head h2{
  margin:0 0 4px;
  color:#173e5f;
  font-size:15px;
}
.conversion-category-manager-head p{
  margin:0;
  color:#7c8f9e;
  font-size:10px;
}
.conversion-category-create,
.conversion-category-edit{
  display:flex;
  align-items:center;
  gap:7px;
}
.conversion-category-create input[type="text"]{
  min-width:210px;
}
.conversion-category-create input[type="number"],
.conversion-category-edit input[type="number"]{
  width:82px;
}
.conversion-category-chips{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:12px;
}
.conversion-category-chip{
  position:relative;
  border:1px solid #dfe8ee;
  border-radius:8px;
  background:#fbfdfe;
}
.conversion-category-chip>summary{
  padding:8px 10px;
  cursor:pointer;
  color:#35566d;
  font-size:10px;
  font-weight:800;
}
.conversion-category-chip[open]{
  flex-basis:100%;
  padding-bottom:9px;
}
.conversion-category-chip[open]>summary{
  margin-bottom:8px;
  border-bottom:1px solid #e7eef3;
}
.conversion-category-chip>form{
  margin:0 10px 7px;
}
.point-conversion-filterbar{
  display:flex;
  gap:8px;
  align-items:center;
}
.point-conversion-filterbar select{
  min-width:180px;
}
.point-conversion-overview{
  margin-bottom:10px;
}
.point-conversion-category-stack{
  display:grid;
  gap:10px;
}
.point-conversion-category{
  overflow:hidden;
}
.point-conversion-category>summary{
  list-style:none;
}
.point-conversion-category>summary::-webkit-details-marker{
  display:none;
}
.point-conversion-category-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  cursor:pointer;
  background:#f7fafc;
  border-bottom:1px solid transparent;
}
.point-conversion-category[open] .point-conversion-category-summary{
  border-bottom-color:#e4ecf1;
}
.point-conversion-category-summary span{
  display:flex;
  align-items:baseline;
  gap:8px;
}
.point-conversion-category-summary strong{
  color:#244963;
  font-size:12px;
}
.point-conversion-category-summary small{
  color:#8294a2;
  font-size:9px;
}
.point-conversion-category-summary::after{
  content:'▾';
  color:#71899a;
  font-size:12px;
}
.point-conversion-category:not([open]) .point-conversion-category-summary::after{
  content:'▸';
}
.point-conversion-category-body{
  overflow-x:auto;
}
.point-conversion-category-body .point-conversion-table{
  margin:0;
}
.metric-category-form{
  display:flex;
  align-items:center;
  gap:5px;
  min-width:205px;
}
.metric-category-form select{
  min-width:130px;
  width:100%;
}
.point-conversion-category-cell{
  min-width:220px;
}

@media(max-width:900px){
  .conversion-category-manager-head{
    flex-direction:column;
  }
  .conversion-category-create{
    width:100%;
    flex-wrap:wrap;
  }
  .conversion-category-create input[type="text"]{
    flex:1 1 220px;
    min-width:0;
  }
  .point-conversion-filterbar{
    flex-wrap:wrap;
  }
}
@media(max-width:599px){
  .conversion-category-edit{
    flex-wrap:wrap;
  }
  .point-conversion-filterbar>*{
    flex:1 1 100%;
  }
}

/* ========================================================================== 
   M3.3.61 — UNIFIED PERFORMANCE / COUNTER DIAGNOSTICS
   ========================================================================== */
.event-counter-diagnostic{position:relative}
.event-counter-diagnostic>summary{cursor:pointer;color:#376c91;font-size:9px;text-decoration:underline;list-style:none}
.event-counter-diagnostic>summary::-webkit-details-marker{display:none}
.event-counter-diagnostic-popover{position:absolute;z-index:25;top:calc(100% + 7px);left:0;display:grid;gap:4px;min-width:275px;padding:10px 11px;border:1px solid #d6e3ec;border-radius:9px;background:#fff;box-shadow:0 12px 28px rgba(32,69,96,.16);color:#60798b;font-size:9px;white-space:normal}
.event-counter-diagnostic-popover strong{color:#244963;font-size:10px}

/* ==========================================================================
   M3.3.62 — COUNTER CYCLE CALCULATION & SNAPSHOT TIME
   ========================================================================== */
.counter-time-context{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-bottom:9px;
}
.counter-time-context>div{
  display:grid;
  gap:2px;
  padding:9px 10px;
  border:1px solid #dce7ef;
  border-radius:8px;
  background:#f7fafc;
}
.counter-time-context span{
  color:#8093a2;
  font-size:9px;
}
.counter-time-context strong{
  color:#234863;
  font-size:10px;
}
.counter-selected-game-day{
  margin-top:-1px;
  margin-bottom:10px;
  color:#6f8595;
  font-size:9px;
}
.counter-selected-game-day strong{
  color:#245678;
}
.event-counter-diagnostic-metrics{
  display:grid;
  gap:3px;
  margin-top:4px;
  padding-top:6px;
  border-top:1px solid #e5edf2;
}
.event-counter-diagnostic-metrics span{
  display:flex;
  justify-content:space-between;
  gap:12px;
}
.event-counter-diagnostic-metrics b{
  color:#315a76;
  font-weight:800;
}
@media(max-width:760px){
  .counter-time-context{
    grid-template-columns:1fr;
  }
}

/* ========================================================================== 
   M3.3.67 — POINT CONVERSION CALIBRATION & BULK MANAGEMENT
   ========================================================================== */
.point-conversion-analysis{
  margin-bottom:12px;
  padding:14px;
}
.point-conversion-analysis-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.point-conversion-analysis-head h2{
  margin:0 0 4px;
  color:#173e5f;
  font-size:16px;
}
.point-conversion-analysis-head p{
  margin:0;
  color:#7c8f9e;
  font-size:10px;
}
.point-conversion-analysis-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(120px,1fr));
  gap:8px;
  margin-bottom:10px;
}
.point-conversion-analysis-stats>div{
  padding:10px 12px;
  border:1px solid #e2eaf0;
  border-radius:8px;
  background:#f8fbfd;
}
.point-conversion-analysis-stats span{
  display:block;
  margin-bottom:4px;
  color:#8294a2;
  font-size:9px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.point-conversion-analysis-stats strong{
  color:#244963;
  font-size:14px;
}
.point-conversion-analysis-note{
  margin-bottom:10px;
}
.point-conversion-analysis-table-wrap{
  overflow-x:auto;
}
.point-conversion-analysis-table{
  margin:0;
}
.point-conversion-metric-link{
  color:#244963;
  text-decoration:none;
}
.point-conversion-metric-link:hover{
  text-decoration:underline;
}
.point-conversion-average-cell{
  min-width:120px;
}
.point-conversion-average-cell strong{
  color:#1f5a75;
}
.metric-category-form.is-dirty select{
  border-color:#b58b36;
  box-shadow:0 0 0 2px rgba(181,139,54,.10);
}
.point-conversion-dirty-label{
  color:#98712b;
  font-size:8px;
  font-weight:800;
  text-transform:uppercase;
}
.point-conversion-new-value{
  display:flex;
  align-items:center;
  gap:5px;
}
.point-conversion-use-average{
  white-space:nowrap;
}
.point-conversion-editor input[type="date"]{
  min-width:132px;
}
@media(max-width:900px){
  .point-conversion-analysis-stats{
    grid-template-columns:repeat(2,minmax(120px,1fr));
  }
}
@media(max-width:599px){
  .point-conversion-analysis-head{
    flex-direction:column;
  }
  .point-conversion-analysis-stats{
    grid-template-columns:1fr;
  }
}

/* M3.3.69 — Point Conversion Calibration Workspace */
.point-conversion-detail-head{
  display:flex;
  align-items:flex-start;
  gap:18px;
  margin:0 0 18px;
}
.point-conversion-detail-head>div{min-width:0}
.point-conversion-detail-head h2{margin:0 0 4px}
.point-conversion-detail-head p{margin:0;color:var(--muted,#7c8798)}
.point-conversion-detail-toolbar label{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.point-conversion-detail-toolbar label>span{
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  opacity:.72;
}
.point-conversion-detail-toolbar select{min-width:320px}
.point-conversion-detail-summary{margin-bottom:16px}
.point-conversion-calibration-card{padding:0;overflow:hidden}
.point-conversion-calibration-tools{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  padding:16px 18px;
  border-bottom:1px solid var(--line,rgba(255,255,255,.08));
}
.point-conversion-calibration-tools .admin-search-wrap{min-width:260px;flex:1}
.point-conversion-calibration-table-wrap{max-height:68vh;overflow:auto}
.point-conversion-calibration-table thead th{
  position:sticky;
  top:0;
  z-index:2;
}
.point-conversion-calibration-table td:nth-child(n+2){white-space:nowrap}
.calibration-points-input{width:130px;max-width:100%}
.calibration-source{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:rgba(127,127,127,.12);
}
.calibration-source-player{background:rgba(54,179,126,.14)}
.calibration-source-manual{background:rgba(72,126,255,.14)}
.calibration-source-missing{opacity:.65}
.point-conversion-calibration-actions{
  display:flex;
  justify-content:flex-end;
  padding:16px 18px;
  border-top:1px solid var(--line,rgba(255,255,255,.08));
}
@media(max-width:760px){
  .point-conversion-detail-head{display:block}
  .point-conversion-detail-head .admin-text-link{display:inline-block;margin-bottom:12px}
  .point-conversion-detail-toolbar select{min-width:0;width:100%}
  .point-conversion-calibration-tools{align-items:stretch}
  .point-conversion-calibration-tools .admin-search-wrap{min-width:0;width:100%}
}

/* M3.3.71 — counter scoring clarity */
.event-counter-components{display:grid;gap:8px;margin-top:10px;padding:14px 16px;border:1px solid var(--line,#d7e4ef);border-radius:14px;background:#f8fbfe}
.event-counter-components>b{font-size:13px;color:#54718a;text-transform:uppercase;letter-spacing:.04em}
.event-counter-component-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:7px 0;border-bottom:1px solid rgba(120,151,176,.18)}
.event-counter-component-row:last-of-type{border-bottom:0}
.event-counter-component-row strong{white-space:nowrap;color:#173d5f}
.event-counter-components small{color:#738ba0}
.event-counter-norm-reference{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;align-items:center;margin-top:12px;padding:14px 16px;border:1px solid #cfe1f1;border-radius:14px;background:#eef7ff}
.event-counter-norm-reference>span{font-weight:700;color:#56738b}
.event-counter-norm-reference>strong{font-size:18px;color:#173d5f}
.event-counter-norm-reference>small{grid-column:1/-1;color:#6d8598;line-height:1.4}

/* M3.3.72 — Game Period performance */
.period-card .week-main{min-width:245px}
.week-arrow.is-disabled{opacity:.28;pointer-events:none}
.score-table th small{display:block;margin-top:3px;font-size:10px;font-weight:600;letter-spacing:.02em;opacity:.62;text-transform:none}
.events-block{position:relative}
.events-group-title{height:24px;display:flex;align-items:center;padding:0 12px;font-size:10px;font-weight:800;letter-spacing:.08em;color:#6d8498;background:rgba(235,244,250,.82);border-bottom:1px solid rgba(153,180,201,.26);white-space:nowrap}
.events-block .events-scroll{height:calc(100% - 24px)}
.metric-group-title{height:24px;display:flex;align-items:center;justify-content:center;padding:0 10px;font-size:10px;font-weight:800;letter-spacing:.08em;color:#6d8498;background:rgba(235,244,250,.82);border-bottom:1px solid rgba(153,180,201,.26);white-space:nowrap}
.table-block>table,.table-block>.events-scroll{height:calc(100% - 24px)}
.score-block .score-flex{display:flex;justify-content:center;align-items:center;width:100%}
.score-block .score-num{width:auto;min-width:0}

/* M3.3.75 — Admin Event Center UX Foundation */
.events-overview-toolbar{align-items:center}
.events-overview-toolbar .admin-search-wrap{flex:1}
.events-overview-card{overflow:hidden}
.events-overview-table th,.events-overview-table td{vertical-align:middle}
.events-overview-table .event-name-button{display:flex;flex-direction:column;gap:3px;width:100%;padding:2px 0;border:0;background:transparent;text-align:left;color:inherit;cursor:pointer}
.events-overview-table .event-name-button strong{font-size:16px;color:#173754}
.events-overview-table .event-name-button small{font-size:12px;color:#8297aa}
.events-overview-table .event-overview-row:hover{background:#f7fbff}
.event-status-badge{display:inline-flex;align-items:center;min-height:26px;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap;background:#edf3f8;color:#60778b}
.event-status-badge.active{background:#e2f7ea;color:#16834a}
.event-status-badge.waiting{background:#fff1dc;color:#aa6510}
.event-status-badge.finished{background:#eaf1f7;color:#526b80}
.event-status-badge.upcoming{background:#e6f1ff;color:#176bc0}
.event-status-badge.issue{background:#ffe9e6;color:#c43f36}
.event-status-badge.disabled{background:#f0f1f3;color:#7b858e}

.admin-drawer.event-center-modal{position:fixed;inset:5vh 3vw 5vh auto;width:min(1450px,94vw);max-width:none;height:90vh;border-radius:22px;overflow:hidden;display:flex;flex-direction:column;background:#fff;box-shadow:0 24px 80px rgba(10,35,57,.28);transform:translateX(110%);transition:transform .22s ease;z-index:1300}
.admin-drawer.event-center-modal.open{transform:translateX(0)}
.event-center-form{display:flex;min-height:0;flex:1;flex-direction:column}
.event-center-head{display:flex;align-items:center;justify-content:space-between;padding:22px 28px 16px;border-bottom:1px solid #dbe7f1;background:#fff}
.event-center-title>small{display:block;margin-bottom:5px;color:#8295a8;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}
.event-center-title>div{display:flex;align-items:center;gap:12px}
.event-center-title h2{margin:0;color:#163653;font-size:28px}
.event-center-close{border:0;background:transparent;color:#294965;font-size:32px;line-height:1;cursor:pointer}
.event-center-tabs{display:grid;grid-template-columns:repeat(5,1fr);padding:0 28px;border-bottom:1px solid #dbe7f1;background:#f8fbfe;position:sticky;top:0;z-index:3}
.event-center-tabs button{padding:16px 10px;border:0;border-bottom:3px solid transparent;background:transparent;color:#6a8195;font-weight:800;cursor:pointer}
.event-center-tabs button.active{border-bottom-color:#1680df;color:#146ab2;background:#fff}
.event-center-body{flex:1;min-height:0;overflow:auto;padding:26px 28px 34px;background:#f5f9fc}
.event-tab-panel{display:none}
.event-tab-panel.active{display:block}
.event-panel-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.85fr);gap:22px;align-items:start}
.event-overview-grid{grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr)}
.event-panel-card{padding:22px;border:1px solid #d6e4ef;border-radius:16px;background:#fff;box-shadow:0 2px 7px rgba(24,59,87,.04)}
.event-panel-card h3{margin:0 0 18px;color:#183a57;font-size:18px}
.event-panel-card label{display:flex;flex-direction:column;gap:7px;margin-bottom:16px;color:#294a65;font-weight:700}
.event-panel-card input,.event-panel-card select{width:100%}
.event-toggle-list{display:grid;gap:8px;margin-top:8px}
.event-toggle-list>label{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:18px;margin:0;padding:12px 0;border-top:1px solid #edf2f6}
.event-toggle-list>label:first-child{border-top:0}
.event-toggle-list span:first-child{display:flex;flex-direction:column;gap:2px}
.event-toggle-list small{color:#8598a8;font-weight:500}
.event-summary-card dl,.event-mini-summary{margin:0;display:grid;gap:0}
.event-summary-card dl div,.event-mini-summary div{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:11px 0;border-bottom:1px solid #edf2f6}
.event-summary-card dt,.event-mini-summary dt{color:#7a8ea0;font-size:13px;font-weight:700}
.event-summary-card dd,.event-mini-summary dd{margin:0;color:#1b3d59;font-weight:800;text-align:right}
.event-target-card{margin-top:20px;padding:18px;border:1px solid #cfe4f7;border-radius:14px;background:#eff7ff}
.event-target-card span,.event-target-card small{display:block;color:#66849d}
.event-target-card strong{display:block;margin:5px 0;color:#1266a8;font-size:28px}
.event-counter-components{display:grid;gap:8px}
.event-counter-component-row{display:flex;justify-content:space-between;gap:18px;padding:9px 0;border-bottom:1px solid #edf2f6}
.event-calibration-link{margin-top:18px}
.event-source-health{display:flex;flex-direction:column;gap:2px;margin-bottom:18px;padding:14px 16px;border-radius:12px;background:#e9f8ef;color:#19754a}
.event-source-health.issue{background:#fff0ed;color:#be4038}
.event-source-health strong{font-size:16px}
.event-source-health small{opacity:.8}
.event-source-rule{padding:16px;border-radius:12px;background:#f2f7fb;color:#45627a;line-height:1.45}
.event-activity-list{display:grid;gap:8px;margin-bottom:18px}
.event-activity-row{display:grid;grid-template-columns:minmax(180px,1fr) 140px 130px;gap:16px;align-items:center;padding:12px 14px;border:1px solid #e1eaf2;border-radius:12px;background:#fbfdff}
.event-activity-row>span:first-child{display:flex;flex-direction:column;gap:2px}
.event-activity-row small{color:#8295a5;text-transform:capitalize}
.event-center-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 28px;border-top:1px solid #dbe7f1;background:#fff;position:sticky;bottom:0;z-index:4}
.event-center-footer-actions{display:flex;gap:10px;margin-left:auto}
.event-center-footer .admin-primary-btn,.event-center-footer .admin-outline-btn{min-width:130px}
.event-danger-actions:empty{display:none}

.event-mapping-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:14px}
.event-mapping-head h2{margin:0 0 5px;color:#173956}
.event-mapping-head p{margin:0;color:#7890a3}
.event-mapping-issues-toggle{display:flex;align-items:center;gap:8px;color:#36546d;font-weight:700;white-space:nowrap}
.event-mapping-card{overflow:hidden}
.event-mapping-toolbar{padding:14px 16px;border-bottom:1px solid #e0eaf2}
.event-mapping-toolbar .admin-search-wrap{flex:1}
.event-mapping-table td{vertical-align:middle}
.event-mapping-connect-form{display:flex;gap:7px;min-width:260px}
.event-mapping-connect-form select{min-width:150px}
.event-map-status{display:inline-flex;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap}
.event-map-status.connected{background:#e3f7eb;color:#1c824e}
.event-map-status.issue{background:#ffe9e6;color:#c44239}
.event-map-status.stale{background:#fff1dc;color:#a96a16}

@media(max-width:1100px){
  .admin-drawer.event-center-modal{inset:2vh 1.5vw;width:97vw;height:96vh}
  .event-panel-grid,.event-overview-grid{grid-template-columns:1fr}
  .event-center-tabs{padding:0 12px;overflow-x:auto;display:flex}
  .event-center-tabs button{min-width:130px}
}

/* M3.3.76 — Point Calibration UX */
.calibration-workspace{padding:22px;margin-bottom:18px}
.calibration-workspace-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}
.calibration-workspace-head h2{margin:0 0 5px;font-size:24px;color:#173653}
.calibration-workspace-head p{margin:0;color:#738ba2;max-width:760px}
.calibration-context-grid{display:grid;grid-template-columns:minmax(190px,1.1fr) minmax(220px,1.2fr) minmax(220px,1.2fr) minmax(260px,1.5fr);gap:14px;align-items:end;margin-bottom:18px}
.calibration-context-grid label,.calibration-apply-form label{display:flex;flex-direction:column;gap:7px;color:#6b8298;font-weight:700;font-size:12px;text-transform:uppercase;letter-spacing:.045em}
.calibration-context-grid select,.calibration-readonly-field,.calibration-apply-form input{min-height:44px;border:1px solid #cbdceb;border-radius:10px;background:#fff;color:#193c5b;padding:0 12px;font:inherit;font-weight:600}
.calibration-readonly-field{display:flex;align-items:center;text-transform:none;letter-spacing:0;font-size:14px}
.calibration-summary-grid{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:12px;margin:4px 0 18px}
.calibration-summary-grid>div{border:1px solid #d7e5f0;background:#f9fbfd;border-radius:12px;padding:14px 15px;min-height:82px}
.calibration-summary-grid span{display:block;color:#7b91a5;font-size:11px;text-transform:uppercase;font-weight:800;letter-spacing:.05em;margin-bottom:6px}
.calibration-summary-grid strong{display:block;color:#173653;font-size:20px;line-height:1.15;overflow-wrap:anywhere}
.calibration-apply-panel{display:grid;grid-template-columns:minmax(260px,1fr) minmax(520px,1.8fr);gap:18px;align-items:end;border:1px solid #cfe3f5;background:#eef7ff;border-radius:14px;padding:18px;margin-bottom:16px}
.calibration-apply-panel h3{margin:0 0 5px;color:#173653;font-size:18px}.calibration-apply-panel p{margin:0;color:#69849c}
.calibration-apply-form{display:grid;grid-template-columns:minmax(180px,1fr) minmax(160px,.8fr) auto;gap:10px;align-items:end}
.calibration-apply-form .admin-primary-btn{min-height:44px;white-space:nowrap}
.calibration-history-card{border:1px solid #d7e5f0;border-radius:12px;background:#fff;margin:0 0 16px;overflow:hidden}
.calibration-history-card>summary{cursor:pointer;padding:13px 16px;font-weight:800;color:#284d6d;background:#f8fbfd}
.calibration-history-list{display:grid;gap:0}.calibration-history-list>div{display:flex;justify-content:space-between;gap:16px;padding:11px 16px;border-top:1px solid #edf2f6}.calibration-history-list span{color:#7a91a6}
.calibration-members-section{border:1px solid #d8e5ef;border-radius:14px;background:#fff;overflow:hidden}
.calibration-members-section .point-conversion-calibration-tools{padding:14px 16px;background:#fbfdff;border-bottom:1px solid #e2ebf2;display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.calibration-members-section .admin-search-wrap{min-width:260px;flex:1}
.calibration-evidence-label,.calibration-helper{display:block;margin-top:4px;color:#8398aa;font-size:11px;font-weight:700}.calibration-evidence-label.manual{color:#4b6a93}.calibration-helper{font-weight:500}
.calibration-points-input:disabled{background:#f2f5f7;color:#93a3b0}
.advanced-conversion-management{margin-top:18px;border:1px solid #d7e5ef;border-radius:14px;background:#f7fafc;overflow:hidden}
.advanced-conversion-management>summary{cursor:pointer;padding:15px 18px;color:#48667f;font-weight:800}.advanced-conversion-management[open]>summary{border-bottom:1px solid #d7e5ef;background:#fff}
.advanced-conversion-management-body{padding:16px}.advanced-conversion-management-body>.admin-card:first-child{margin-top:0}
.calibration-empty{padding:28px 16px;text-align:center}
@media (max-width:1200px){.calibration-context-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.calibration-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.calibration-apply-panel{grid-template-columns:1fr}.calibration-apply-form{grid-template-columns:1fr 1fr auto}}
@media (max-width:760px){.calibration-context-grid,.calibration-summary-grid,.calibration-apply-form{grid-template-columns:1fr}.calibration-members-section .point-conversion-calibration-tools{align-items:stretch;flex-direction:column}.calibration-members-section .admin-search-wrap{min-width:0;width:100%}}

/* M3.3.77 — Import Center UX */
.import-center-tabs{margin-bottom:18px}
.import-center-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 16px;padding:4px 2px}
.import-center-hero h2{margin:3px 0 6px;color:#173653;font-size:26px}.import-center-hero p{margin:0;color:#758da1;max-width:760px}.admin-kicker{display:block;color:#4b8cc3;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.import-upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:18px}.import-upload-card{display:grid;grid-template-columns:auto 1fr auto;gap:18px;align-items:center;padding:22px;border:1px solid #d5e3ee;border-radius:16px;background:#fff;box-shadow:0 10px 26px rgba(37,72,101,.06);text-decoration:none;color:inherit;transition:.15s ease}.import-upload-card:hover{transform:translateY(-1px);border-color:#9fc8ea;box-shadow:0 14px 30px rgba(37,72,101,.1)}.import-upload-card-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:13px;background:#edf6ff;color:#2778b8;font-weight:900;font-size:18px}.import-upload-card-copy>span{display:block;color:#6f879b;font-size:11px;text-transform:uppercase;letter-spacing:.06em;font-weight:800}.import-upload-card-copy h2{margin:2px 0 5px;color:#173653;font-size:20px}.import-upload-card-copy p{margin:0 0 13px;color:#748b9f}.import-upload-card dl{margin:0;display:grid;gap:5px}.import-upload-card dl div{display:flex;justify-content:space-between;gap:14px}.import-upload-card dt{color:#8a9cab;font-size:12px}.import-upload-card dd{margin:0;color:#385873;font-size:12px;font-weight:800;text-align:right}.import-upload-card>strong{color:#2778b8;white-space:nowrap;font-size:13px}
.import-recent-card{padding:0;overflow:hidden}.admin-section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px}.admin-section-heading h2,.admin-section-heading h3{margin:0 0 3px;color:#173653}.admin-section-heading p{margin:0;color:#7a90a2}.import-recent-list{border-top:1px solid #e5edf3}.import-recent-row{display:grid;grid-template-columns:minmax(220px,1.4fr) minmax(220px,1fr) auto;gap:20px;align-items:center;padding:13px 20px;border-top:1px solid #eef3f7}.import-recent-row:first-child{border-top:0}.import-recent-row>div{display:flex;flex-direction:column;gap:2px}.import-recent-row strong{color:#22445f}.import-recent-row span,.import-recent-row small{color:#7d91a1;font-size:12px}.import-recent-row>div:nth-child(2){text-align:right}
.member-preview-sections{display:grid;gap:14px;margin:18px 0}.member-preview-sections section{border:1px solid #dbe7f0;border-radius:12px;overflow:hidden;background:#fff}.member-preview-sections section>h3,.member-preview-sections section>p{padding:0 16px}.member-preview-sections section>h3{margin:14px 0 5px;color:#1f4561}.member-preview-sections section>p{margin:0 0 12px;color:#7a8fa1}.member-preview-warning{border-color:#efc9b0!important;background:#fffaf5!important}.import-action-label{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800}.import-action-label.good{background:#e6f6ed;color:#287951}.import-action-label.warn{background:#fff0e6;color:#b06022}
.import-preview-primary-metrics{grid-template-columns:repeat(5,minmax(110px,1fr))}.counter-impact-panel{margin:16px 0;border:1px solid #d8e5ef;border-radius:14px;overflow:hidden;background:#fff}.counter-impact-panel .admin-section-heading{border-bottom:1px solid #e7eef4}.counter-impact-list{display:grid}.counter-impact-list>div{display:grid;grid-template-columns:minmax(180px,1fr) minmax(260px,1.4fr) auto;gap:16px;align-items:center;padding:12px 18px;border-top:1px solid #eef3f7}.counter-impact-list>div:first-child{border-top:0}.counter-impact-list strong{color:#23465f}.counter-impact-list span:nth-child(2){color:#71889b;font-size:12px}
.import-advanced-details{margin:15px 0;border:1px solid #d8e4ed;border-radius:12px;background:#f8fbfd;overflow:hidden}.import-advanced-details>summary{cursor:pointer;padding:14px 16px;font-weight:800;color:#45637c}.import-advanced-details[open]>summary{background:#fff;border-bottom:1px solid #dfe9f0}.import-advanced-details-body{padding:16px}.import-legacy-metrics{margin-top:14px;border:1px solid #d8e4ed;border-radius:12px;overflow:hidden}.import-legacy-metrics>summary{cursor:pointer;padding:14px 16px;font-weight:800;color:#5c7386;background:#f7fafc}.import-metrics-moved{text-align:center;padding:28px}.import-metrics-moved h2{margin:0 0 6px;color:#173653}.import-metrics-moved p{margin:0 0 16px;color:#768da0}
@media(max-width:980px){.import-upload-grid{grid-template-columns:1fr}.import-upload-card{grid-template-columns:auto 1fr}.import-upload-card>strong{grid-column:2}.import-preview-primary-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.counter-impact-list>div{grid-template-columns:1fr}.import-recent-row{grid-template-columns:1fr auto}.import-recent-row>div:nth-child(2){text-align:left}.import-recent-row>.ap-badge{grid-column:2;grid-row:1/3}}

/* M3.3.78 — Admin Session & UX Polish */
.admin-login-context{margin:8px auto 14px;max-width:300px;text-align:center;color:#9db2c5;font-size:12px;line-height:1.5}
.admin-login-actions{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:14px}
.admin-login-actions .admin-login-back{margin:0}
.admin-login-logout{color:#c7d4df;font-size:11px;text-decoration:none}
.admin-login-back:hover,.admin-login-logout:hover{text-decoration:underline}
.admin-full-logout-link{color:#9fb4c5!important}
.admin-full-logout-link:hover{color:#fff!important;background:rgba(255,255,255,.06)}
.event-unsaved-state{display:inline-flex;align-items:center;gap:7px;margin-right:auto;color:#9a6815;font-size:12px;font-weight:800}
.event-unsaved-state span{width:8px;height:8px;border-radius:999px;background:#e1a22c;box-shadow:0 0 0 3px rgba(225,162,44,.14)}
.event-center-footer .admin-primary-btn:disabled{cursor:not-allowed;opacity:.48;box-shadow:none}
.admin-notice.success{border-left:4px solid #3a9b68}
.admin-notice.error{border-left:4px solid #cb4d4d}
.event-map-status.connected,.ap-badge.status-success{background:#e3f7eb;color:#1c824e}
.event-map-status.issue,.ap-badge.status-danger{background:#ffe9e6;color:#c44239}
.event-map-status.stale,.ap-badge.status-warning{background:#fff1dc;color:#a96a16}
@media(max-width:640px){.admin-login-actions{flex-direction:column;gap:8px}.event-unsaved-state{width:100%;margin:0 0 8px}}

/* M3.3.79 — event-aware ChestCounter cycle integrity */
.event-cycle-integrity-card{grid-column:1/-1}
.event-panel-title-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}
.event-panel-title-row h3{margin:0}
.event-cycle-integrity-summary{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:28px}
.event-cycle-integrity-summary div:nth-last-child(-n+2){border-bottom:0}
.event-cycle-integrity-card>.admin-cell-note{display:block;margin-top:12px;line-height:1.45}
@media (max-width:760px){.event-cycle-integrity-summary{grid-template-columns:1fr}.event-cycle-integrity-summary div{border-bottom:1px solid #edf2f6!important}.event-cycle-integrity-summary div:last-child{border-bottom:0!important}}

/* M3.3.80 — read-only scoring diagnostics */
.scoring-diagnostics-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 16px}.scoring-diagnostics-head h2{margin:0 0 5px}.scoring-diagnostics-head p{margin:0;color:var(--muted,#74839a);max-width:850px}.scoring-diagnostics-filter{margin-bottom:16px}.scoring-diagnostics-form{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) minmax(260px,.9fr);gap:14px;align-items:end}.scoring-diagnostics-form label{display:grid;gap:6px}.scoring-diagnostics-form label>span,.scoring-diagnostics-period>span,.diagnostic-score-formula span,.diagnostic-cycle-meta span,.diagnostic-summary-grid article>span{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted,#74839a)}.scoring-diagnostics-form select{width:100%}.scoring-diagnostics-period{display:grid;gap:4px;padding:10px 12px;border:1px solid rgba(116,131,154,.22);border-radius:10px;background:rgba(247,249,252,.7)}.scoring-diagnostics-period strong{font-size:14px}.scoring-diagnostics-period small{color:var(--muted,#74839a)}
.diagnostic-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.diagnostic-summary-grid .admin-card{margin:0;display:grid;gap:6px;min-height:112px}.diagnostic-summary-grid article>strong{font-size:24px;line-height:1.05}.diagnostic-summary-grid article>small{color:var(--muted,#74839a)}.diagnostic-member-card>strong{font-size:20px!important}
.diagnostic-score-formula{display:grid;grid-template-columns:1.25fr .8fr .8fr 1.35fr;gap:0;margin-bottom:16px;padding:0;overflow:hidden}.diagnostic-score-formula>div{display:grid;gap:7px;padding:16px 18px;border-right:1px solid rgba(116,131,154,.16)}.diagnostic-score-formula>div:last-child{border-right:0}.diagnostic-formula-result{background:rgba(51,111,231,.05)}.diagnostic-formula-result strong{color:var(--accent,#356fe7)}
.diagnostic-event-table td,.diagnostic-event-table th{white-space:nowrap}.diagnostic-event-table td:first-child{white-space:normal;min-width:180px}.diagnostic-backline{margin:2px 0 12px}.admin-empty-cell{text-align:center!important;color:var(--muted,#74839a)!important;padding:28px 16px!important}
.diagnostic-pipeline-card{margin-bottom:16px}.diagnostic-cycle-meta{display:grid;grid-template-columns:1.5fr .55fr .7fr;gap:12px;margin:14px 0}.diagnostic-cycle-meta>div{display:grid;gap:5px;padding:12px 14px;border:1px solid rgba(116,131,154,.16);border-radius:10px;background:rgba(247,249,252,.62)}.diagnostic-warning-list{display:grid;gap:8px;margin:12px 0;padding:12px 14px;border:1px solid rgba(216,149,20,.28);border-radius:10px;background:rgba(245,184,55,.08);font-size:13px}.diagnostic-component-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}.diagnostic-component-grid article{display:grid;gap:5px;padding:13px 14px;border:1px solid rgba(116,131,154,.16);border-radius:10px}.diagnostic-component-grid article>span{font-size:12px;color:var(--muted,#74839a)}.diagnostic-component-grid article>small{color:var(--muted,#74839a)}
@media(max-width:1100px){.diagnostic-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.diagnostic-score-formula{grid-template-columns:repeat(2,minmax(0,1fr))}.diagnostic-score-formula>div:nth-child(2){border-right:0}.diagnostic-score-formula>div:nth-child(-n+2){border-bottom:1px solid rgba(116,131,154,.16)}.scoring-diagnostics-form{grid-template-columns:1fr 1fr}.scoring-diagnostics-period{grid-column:1/-1}.diagnostic-component-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.diagnostic-summary-grid,.diagnostic-score-formula,.diagnostic-cycle-meta,.diagnostic-component-grid,.scoring-diagnostics-form{grid-template-columns:1fr}.diagnostic-score-formula>div{border-right:0;border-bottom:1px solid rgba(116,131,154,.16)}.diagnostic-score-formula>div:last-child{border-bottom:0}.scoring-diagnostics-period{grid-column:auto}}

/* M3.3.81 — Scoring Health & Targeted Repair */
.diagnostic-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.scoring-health-card{margin-top:14px}.scoring-health-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}.scoring-health-summary>div{padding:14px 16px;border:1px solid var(--admin-border,#dfe5ec);border-radius:12px;background:var(--admin-soft,#f8fafc);display:flex;flex-direction:column;gap:5px}.scoring-health-summary span{font-size:12px;color:#718096}.scoring-health-summary strong{font-size:21px}.scoring-health-list{display:flex;flex-direction:column;border-top:1px solid var(--admin-border,#dfe5ec)}.scoring-health-item{display:grid;grid-template-columns:auto minmax(140px,.8fr) minmax(90px,.5fr) minmax(240px,2fr);gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--admin-border,#e7ebf0);color:inherit;text-decoration:none}.scoring-health-item em{font-style:normal;color:#596579}.diagnostic-health-empty{padding:14px;border-radius:10px;background:#f7faf8;color:#3f6b4d}.diagnostic-repair-actions{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0 4px}.diagnostic-repair-actions form,.diagnostic-repair-inline{margin:0}.scoring-repair-preview{margin-top:18px;scroll-margin-top:90px}.repair-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.repair-preview-table-wrap{overflow:auto;max-height:520px;border:1px solid var(--admin-border,#dfe5ec);border-radius:12px}.repair-preview-table-wrap table{margin:0}.repair-row-changed{background:rgba(245,158,11,.07)}.repair-preview-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:14px;padding-top:14px;border-top:1px solid var(--admin-border,#dfe5ec)}.repair-preview-footer>div{display:flex;flex-direction:column;gap:3px}.repair-preview-footer span{font-size:12px;color:#718096}@media(max-width:900px){.scoring-health-summary,.repair-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.scoring-health-item{grid-template-columns:auto 1fr}.scoring-health-item em{grid-column:1/-1}.repair-preview-footer{align-items:stretch;flex-direction:column}}

/* ========================================================================== 
   M3.3.81.1 — ADMIN LAYOUT + TYPOGRAPHY HOTFIX
   Keep the sidebar anchored to the viewport and let only the workspace scroll.
   ========================================================================== */

/* Desktop admin shell owns the viewport. Long pages scroll inside workspace. */
@media (min-width:900px){
  .admin-shell{
    height:100vh;
    min-height:100vh;
    overflow:hidden;
    align-items:stretch;
  }

  .admin-sidebar{
    position:relative;
    top:auto;
    height:100vh;
    min-height:0;
    overflow:hidden;
  }

  .admin-nav{
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
  }

  .admin-side-bottom{
    flex:none;
  }

  .admin-workspace{
    height:100vh;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-gutter:stable;
  }

  /* Keep page context visible while the workspace content scrolls. */
  .admin-page-head{
    position:sticky;
    top:0;
    z-index:24;
    margin:-24px -28px 18px;
    padding:24px 28px 14px;
    background:rgba(238,244,249,.96);
    border-bottom:1px solid rgba(203,218,230,.72);
    backdrop-filter:blur(8px);
  }
}

/* Compact high-density numeric UI. The values stay dominant without behaving
   like marketing hero typography. */
.calibration-workspace-head h2{
  font-size:20px;
  line-height:1.2;
}

.calibration-workspace-head p{
  font-size:13px;
  line-height:1.45;
}

.calibration-summary-grid>div{
  min-height:76px;
  padding:12px 13px;
}

.calibration-summary-grid span{
  font-size:10px;
  line-height:1.12;
  margin-bottom:5px;
}

.calibration-summary-grid strong{
  font-size:17px;
  line-height:1.15;
  letter-spacing:-.015em;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}

.calibration-apply-panel{
  padding:15px 16px;
}

.calibration-apply-panel h3{
  font-size:16px;
}

.calibration-apply-panel p{
  font-size:12px;
  line-height:1.4;
}

.calibration-context-grid label,
.calibration-apply-form label{
  font-size:11px;
}

/* Diagnostics: long scores must fit comfortably on normal desktop widths. */
.scoring-diagnostics-head h2{
  font-size:20px!important;
}

.scoring-diagnostics-head p{
  font-size:13px;
  line-height:1.45;
}

.diagnostic-summary-grid .admin-card{
  min-height:96px;
  padding:15px 16px;
}

.diagnostic-summary-grid article>span,
.diagnostic-score-formula span,
.diagnostic-cycle-meta span,
.scoring-diagnostics-form label>span,
.scoring-diagnostics-period>span{
  font-size:10px;
}

.diagnostic-summary-grid article>strong{
  font-size:19px;
  line-height:1.12;
  letter-spacing:-.018em;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}

.diagnostic-member-card>strong{
  font-size:18px!important;
}

.diagnostic-score-formula>div{
  padding:13px 15px;
}

.diagnostic-score-formula strong{
  font-size:14px;
  line-height:1.28;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}

.scoring-health-summary strong{
  font-size:18px;
}

/* Dense admin tables are easier to scan at a slightly calmer type scale. */
.calibration-members-section .admin-data-table,
.diagnostic-event-table,
.repair-preview-table-wrap .admin-data-table{
  font-size:12px;
}

.calibration-members-section .admin-data-table th,
.diagnostic-event-table th,
.repair-preview-table-wrap .admin-data-table th{
  font-size:10px!important;
}

@media (max-width:899px){
  /* Mobile keeps natural document scrolling; sidebar remains an overlay. */
  .admin-shell{
    min-height:100vh;
    height:auto;
    overflow:visible;
  }

  .admin-workspace{
    height:auto;
    overflow:visible;
  }

  .admin-page-head{
    position:relative;
    top:auto;
  }
}

/* M3.3.83 — Event Configuration Simplification */
.events-overview-table th[data-col="rate"],
.events-overview-table td[data-col="rate"]{text-align:right;white-space:nowrap}
.event-window-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:18px}
.event-window-note,.event-data-explainer,.event-formula-preview{margin-top:14px;padding:13px 15px;border:1px solid #d5e5f2;border-radius:12px;background:#f5f9fc;color:#58738b;font-size:13px;line-height:1.45}
.event-scoring-source-field{margin-top:18px}
.event-toggle-list label.is-disabled{opacity:.5}
.event-scoring-source-card .event-mini-summary{margin-top:8px}
.event-inline-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:16px}
.event-data-results-stack{display:grid;gap:18px}
.event-source-summary-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 18px}
.event-source-summary-strip>div{padding:12px 14px;border:1px solid #dbe7f0;border-radius:12px;background:#f8fbfd;min-width:0}
.event-source-summary-strip span{display:block;color:#7890a5;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px}
.event-source-summary-strip strong{display:block;color:#173b5b;font-size:14px;overflow-wrap:anywhere}
.event-source-search-label{margin-top:10px}
.event-source-search-label input[type="search"]{width:100%;margin-top:7px}
.event-scoring-source-card .event-counter-components{margin-top:16px}
.event-counter-component-row strong{font-size:13px}
.event-panel-title-row [data-event-source-health]{padding:0;background:none;border:0;margin:0}
.event-panel-title-row [data-event-source-health] strong{font-size:13px}
@media (max-width:900px){
  .event-window-grid,.event-source-summary-strip{grid-template-columns:1fr}
}

/* M3.3.84 — simplified event scoring + calibration */
.event-scoring-simple-grid{grid-template-columns:minmax(0,1fr) minmax(360px,.95fr)}
.event-result-source-choice{margin-top:22px;padding-top:20px;border-top:1px solid var(--admin-border,#dbe7f2);display:grid;gap:10px}
.event-result-source-choice>strong{font-size:15px;color:var(--admin-text,#153a5b)}
.event-source-radio{display:flex!important;align-items:flex-start!important;gap:12px!important;padding:10px 0!important;margin:0!important}
.event-source-radio input{width:20px!important;height:20px!important;flex:0 0 auto;margin-top:2px}
.event-source-radio span{display:grid;gap:2px}
.event-source-radio b{font-size:16px;color:var(--admin-text,#153a5b)}
.event-source-radio small{font-size:13px;line-height:1.35;color:var(--admin-muted,#718aa0)}
.event-score-source-panel>[data-score-panel]{height:100%}
.event-score-source-panel h3{margin-bottom:16px}
.event-submissions-link{margin-top:18px;width:100%;justify-content:space-between}

.event-calibration-simple{display:grid;gap:16px}
.event-calibration-simple.is-loading{opacity:.68;pointer-events:none}
.event-calibration-topbar{display:grid;grid-template-columns:minmax(360px,1.7fr) repeat(3,minmax(180px,.75fr));gap:12px;align-items:stretch}
.event-past-occurrences,.event-calibration-kpi{border:1px solid var(--admin-border,#dbe7f2);border-radius:14px;background:#fff;padding:15px 17px;min-width:0}
.event-past-occurrences{display:grid;gap:10px}
.event-past-occurrences>strong{font-size:14px;color:var(--admin-text,#153a5b)}
.event-past-occurrences>[data-calibration-history]{display:flex;gap:8px;flex-wrap:wrap}
.event-occurrence-chip{border:1px solid #c8dced;background:#f9fcff;color:#214968;border-radius:9px;padding:8px 13px;font-weight:700;cursor:pointer}
.event-occurrence-chip:hover{border-color:#66aef2}
.event-occurrence-chip.active{background:#e9f5ff;border-color:#2588e5;color:#0b65b8;box-shadow:0 0 0 2px rgba(37,136,229,.08)}
.event-calibration-kpi{display:flex;flex-direction:column;justify-content:center;gap:6px}
.event-calibration-kpi span{font-size:12px;text-transform:uppercase;letter-spacing:.04em;font-weight:700;color:var(--admin-muted,#718aa0)}
.event-calibration-kpi strong{font-size:22px;line-height:1.1;color:var(--admin-text,#153a5b);overflow-wrap:anywhere}
.event-calibration-kpi.is-primary{border-color:#6cb1ef;background:#f4faff}
.event-calibration-kpi.is-primary strong{font-size:26px;color:#0a69bd}
.event-member-calibration-card{padding:0!important;overflow:hidden}
.event-member-calibration-card>.event-panel-title-row{padding:18px 20px 10px}
.event-calibration-toolbar{display:flex;gap:18px;align-items:center;padding:0 20px 14px}
.event-calibration-toolbar>input[type=search]{min-width:280px;max-width:520px;flex:1;border:1px solid #c8dced;border-radius:9px;padding:10px 12px;font:inherit}
.event-calibration-toolbar label{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:13px;color:#284e6c}
.event-calibration-table-scroll{max-height:48vh;overflow:auto;border-top:1px solid var(--admin-border,#dbe7f2)}
.event-member-calibration-table{margin:0!important}
.event-member-calibration-table th,.event-member-calibration-table td{padding:11px 14px!important;vertical-align:middle}
.event-member-calibration-table th{position:sticky;top:0;background:#f5f8fb;z-index:1;font-size:12px}
.event-member-calibration-table td{font-size:13px}
.event-member-calibration-table td:first-child{min-width:150px}
.event-member-calibration-table .admin-cell-note{display:block;margin-top:2px}
.event-calibration-input{width:100%;min-width:130px;max-width:190px;border:1px solid #c8dced;border-radius:8px;padding:8px 10px;font:inherit;color:#173e60;background:#fff}
.event-calibration-input:disabled{background:#f5f7f9;color:#8da0af}
.event-calibration-save-row{display:flex;justify-content:flex-end;padding:12px 18px;border-top:1px solid var(--admin-border,#dbe7f2);background:#fbfdff}
.event-calibration-footer{display:flex;gap:12px;align-items:stretch}
.event-calibration-small-kpi{min-width:180px;border:1px solid var(--admin-border,#dbe7f2);border-radius:12px;background:#fff;padding:11px 16px;display:flex;flex-direction:column;gap:2px}
.event-calibration-small-kpi span{font-size:12px;color:var(--admin-muted,#718aa0)}
.event-calibration-small-kpi strong{font-size:22px;color:var(--admin-text,#153a5b)}
.event-apply-conversion-form{margin-left:auto;display:flex;align-items:center}
.event-calibration-message{border:1px solid #f2c3c3;background:#fff3f3;color:#9e3232;border-radius:10px;padding:11px 14px}

@media(max-width:1200px){
  .event-calibration-topbar{grid-template-columns:1fr 1fr}
  .event-past-occurrences{grid-column:1/-1}
  .event-scoring-simple-grid{grid-template-columns:1fr}
}
@media(max-width:800px){
  .event-calibration-topbar{grid-template-columns:1fr}
  .event-past-occurrences{grid-column:auto}
  .event-calibration-toolbar{align-items:flex-start;flex-direction:column;gap:8px}
  .event-calibration-toolbar>input[type=search]{min-width:0;max-width:none;width:100%}
  .event-calibration-footer{flex-wrap:wrap}
  .event-apply-conversion-form{width:100%;margin-left:0}
  .event-apply-conversion-form button{width:100%}
}

/* M3.3.84.1 — Unicode identity + compact calibration typography */
.member-avatar img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  border-radius:50%;
}

/* Data & Results is a dense admin workspace, not a hero dashboard. */
.event-calibration-topbar{
  gap:10px;
}
.event-past-occurrences,
.event-calibration-kpi{
  padding:12px 14px;
  border-radius:12px;
}
.event-past-occurrences>strong{
  font-size:13px;
}
.event-occurrence-chip{
  padding:7px 11px;
  font-size:13px;
  line-height:1.1;
}
.event-calibration-kpi{
  gap:3px;
}
.event-calibration-kpi span{
  font-size:10px;
  line-height:1.15;
}
.event-calibration-kpi strong,
.event-calibration-kpi.is-primary strong{
  font-size:19px;
  line-height:1.08;
  letter-spacing:-.015em;
  font-variant-numeric:tabular-nums;
  overflow-wrap:normal;
  word-break:normal;
}
.event-member-calibration-card>.event-panel-title-row{
  padding:14px 16px 8px;
}
.event-member-calibration-card>.event-panel-title-row h3{
  font-size:18px;
  line-height:1.2;
}
.event-calibration-toolbar{
  gap:12px;
  padding:0 16px 10px;
}
.event-calibration-toolbar>input[type=search]{
  padding:8px 10px;
  font-size:13px;
}
.event-calibration-toolbar label{
  font-size:12px;
}
.event-member-calibration-table th,
.event-member-calibration-table td{
  padding:8px 11px!important;
}
.event-member-calibration-table th{
  font-size:11px!important;
}
.event-member-calibration-table td{
  font-size:12.5px;
  line-height:1.25;
}
.event-member-calibration-table td:first-child{
  min-width:135px;
}
.event-calibration-input{
  min-width:115px;
  max-width:170px;
  padding:7px 9px;
  font-size:12.5px;
}
.event-calibration-small-kpi{
  min-width:150px;
  padding:9px 13px;
}
.event-calibration-small-kpi span{
  font-size:11px;
}
.event-calibration-small-kpi strong{
  font-size:18px;
}
.event-calibration-save-row{
  padding:9px 14px;
}

/* Keep large admin modal typography calmer and consistent. */
.event-modal .event-modal-title,
.event-editor-modal .event-modal-title{
  font-size:28px!important;
  line-height:1.12;
}
.event-modal .event-panel-title-row h3,
.event-editor-modal .event-panel-title-row h3{
  font-size:18px;
}

@media(max-width:1200px){
  .event-calibration-kpi strong,
  .event-calibration-kpi.is-primary strong{font-size:18px}
}

/* M3.3.84.3 — compact event editor fields and Data & Results header */
.event-basic-fields-row,
.event-scoring-fields-row{
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(220px,.9fr);
  gap:14px;
  align-items:end;
}
.event-scoring-fields-row{
  grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);
}
.event-basic-fields-row>label,
.event-scoring-fields-row>label{
  margin:0;
  min-width:0;
}
.event-target-card.event-target-card-compact{
  margin-top:12px;
  padding:10px 14px;
  border-radius:10px;
  display:grid;
  grid-template-columns:auto auto 1fr;
  gap:8px 12px;
  align-items:baseline;
}
.event-target-card.event-target-card-compact>span{
  font-size:12px;
  line-height:1.2;
}
.event-target-card.event-target-card-compact>strong{
  font-size:19px;
  line-height:1.15;
  white-space:nowrap;
}
.event-target-card.event-target-card-compact>small{
  font-size:11.5px;
  line-height:1.3;
  margin:0;
}

/* Data & Results header: dense working controls, not dashboard hero cards. */
.event-calibration-topbar{
  grid-template-columns:minmax(320px,1.65fr) repeat(3,minmax(155px,.7fr));
  gap:8px;
}
.event-past-occurrences,
.event-calibration-kpi{
  padding:10px 12px;
  min-height:82px;
}
.event-past-occurrences>strong{
  font-size:12.5px;
}
.event-past-occurrences>[data-calibration-history]{
  gap:6px;
}
.event-occurrence-chip{
  padding:6px 10px;
  font-size:12px;
  border-radius:8px;
}
.event-calibration-kpi span{
  font-size:9.5px;
  letter-spacing:.045em;
}
.event-calibration-kpi strong,
.event-calibration-kpi.is-primary strong{
  font-size:17px;
  line-height:1.05;
  letter-spacing:-.01em;
}
.event-calibration-kpi strong::after{
  font-size:10px;
}
.event-member-calibration-card>.event-panel-title-row h3{
  font-size:17px;
}
.event-member-calibration-card>.event-panel-title-row [data-calibration-count]{
  font-size:10.5px;
}
.event-calibration-toolbar{
  gap:10px;
  align-items:center;
}
.event-calibration-toolbar>input[type=search]{
  min-height:36px;
  padding:7px 10px;
  font-size:12.5px;
}
.event-calibration-toolbar label{
  gap:5px;
  font-size:11.5px;
}
.event-calibration-toolbar input[type=checkbox]{
  width:15px;
  height:15px;
  margin:0;
  flex:0 0 15px;
  accent-color:#2387e6;
}

@media(max-width:900px){
  .event-basic-fields-row,
  .event-scoring-fields-row{grid-template-columns:1fr}
  .event-target-card.event-target-card-compact{grid-template-columns:1fr}
}

/* ========================================================================== 
   M3.3.84.4 — ADMIN STICKY HEADER STACKING HOTFIX
   Prevent scrolled page content/subtabs from bleeding above or through the
   sticky page header inside the admin workspace.
   ========================================================================== */
@media (min-width:900px){
  .admin-workspace{
    position:relative;
    isolation:isolate;
    background:#eef4f9;
  }

  .admin-page-head{
    position:sticky;
    top:0;
    z-index:100;
    background:#eef4f9;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    box-shadow:0 1px 0 rgba(203,218,230,.82);
  }

  /* Opaque cover for the negative-margin/padded sticky header area. */
  .admin-page-head::before{
    content:"";
    position:absolute;
    z-index:-1;
    left:0;
    right:0;
    top:-24px;
    bottom:0;
    background:#eef4f9;
    pointer-events:none;
  }

  /* Ordinary page controls always remain below the sticky page context. */
  .admin-workspace > .admin-subtabs,
  .admin-workspace > .admin-subnav,
  .admin-workspace > .admin-toolbar,
  .admin-workspace > .admin-card{
    position:relative;
    z-index:1;
  }
}

/* ========================================================================== 
   M3.3.84.5 — EVENT MODAL / SIDEBAR BOUNDARY HOTFIX
   Keep desktop event editor fully inside the admin workspace instead of
   allowing the fixed modal to slide underneath the fixed sidebar.
   ========================================================================== */
@media (min-width:900px){
  .admin-shell .admin-drawer.event-center-modal{
    left:calc(220px + 3vw);
    right:3vw;
    width:auto;
    max-width:none;
    inset-block:5vh;
  }

  .admin-shell.is-collapsed .admin-drawer.event-center-modal{
    left:calc(68px + 3vw);
  }
}

@media (max-width:899px){
  .admin-shell .admin-drawer.event-center-modal,
  .admin-shell.is-collapsed .admin-drawer.event-center-modal{
    left:1.5vw;
    right:1.5vw;
    width:auto;
    inset-block:2vh;
  }
}

/* ========================================================================== 
   M3.3.86 — Import cleanup, Active pts/chest & compact admin header
   ========================================================================== */
@media (min-width:900px){
  .admin-workspace{
    padding-top:0;
  }
  .admin-page-head{
    top:0;
    margin-top:0;
    padding-top:14px;
    padding-bottom:12px;
  }
  .admin-page-head::before{
    top:0;
  }
}

.event-active-conversion-kpi{
  min-width:0;
}
.event-active-conversion-control{
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:5px;
}
.event-active-conversion-control input{
  min-width:0;
  width:100%;
  height:34px;
  padding:5px 8px;
  border:1px solid #cbddea;
  border-radius:8px;
  background:#fff;
  color:#173b5b;
  font-size:15px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
}
.event-active-conversion-control .admin-row-btn{
  height:34px;
  padding:0 10px;
  white-space:nowrap;
}

.import-history-delete-form{
  display:block;
}
.import-history-bulkbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-bottom:1px solid #dbe7f0;
  background:#f8fbfd;
}
.import-history-bulkbar label{
  display:flex;
  align-items:center;
  gap:7px;
  color:#5e7488;
  font-size:12px;
  font-weight:700;
}
.import-history-bulkbar input[type=checkbox],
.import-select-col input[type=checkbox]{
  width:15px;
  height:15px;
  margin:0;
  accent-color:#2387e6;
}
.import-history-bulkbar .admin-danger-btn{
  padding:7px 11px;
  font-size:12px;
}
.import-select-col{
  width:34px;
  text-align:center;
}

@media(max-width:900px){
  .event-active-conversion-control{align-items:stretch}
  .import-history-bulkbar{align-items:flex-start;flex-direction:column}
}

/* M3.3.86.1 conversion effective-date control */
.conversion-effective-modal[hidden]{display:none!important}
.conversion-effective-modal{position:fixed;inset:0;z-index:3200;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(8,28,45,.48)}
.conversion-effective-dialog{width:min(520px,calc(100vw - 40px));background:#fff;border:1px solid #d7e5f1;border-radius:16px;box-shadow:0 20px 70px rgba(8,28,45,.24);padding:20px}
.conversion-effective-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.conversion-effective-head small{display:block;font-size:11px;letter-spacing:.09em;font-weight:800;color:#738aa0;margin-bottom:4px}
.conversion-effective-head h3{margin:0;font-size:21px;line-height:1.2;color:#173a59}
.conversion-effective-close{border:0;background:transparent;font-size:25px;line-height:1;color:#5f7488;cursor:pointer;padding:0 2px}
.conversion-effective-values{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}
.conversion-effective-values>div{border:1px solid #dbe8f2;background:#f8fbfe;border-radius:12px;padding:12px 14px}
.conversion-effective-values span{display:block;font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#7a8fa2;margin-bottom:5px}
.conversion-effective-values strong{font-size:18px;color:#173a59;font-variant-numeric:tabular-nums}
.conversion-effective-date-label{display:grid;gap:7px;font-size:13px;font-weight:800;color:#284a67}
.conversion-effective-date-label input{height:42px;border:1px solid #cbddea;border-radius:10px;padding:0 12px;font:inherit;background:#fff;color:#173a59}
.conversion-effective-note{display:block;margin-top:8px;color:#73899d;font-size:12px;line-height:1.4}
.conversion-effective-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
@media(max-width:640px){.conversion-effective-values{grid-template-columns:1fr}.conversion-effective-modal{padding:12px}.conversion-effective-dialog{padding:16px}}

/* M3.3.86.3 — multi-component scoring cleanup */
.event-center-tabs [data-event-tab].is-disabled,
.event-center-tabs [data-event-tab]:disabled{
  opacity:.38;
  cursor:not-allowed;
  pointer-events:none;
}
.event-multi-counter-summary{display:grid;gap:14px;margin-top:2px}
.event-multi-source-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #e0eaf2;color:#6c8195;font-size:13px}
.event-multi-source-row strong{color:#173a59;font-size:14px;text-align:right}
.event-multi-components{border:1px solid #dbe8f2;border-radius:12px;background:#f8fbfe;padding:12px 14px}
.event-multi-label{display:block;margin-bottom:6px;color:#71889d;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.event-multi-component-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:8px 0;border-top:1px solid #e5eef5;font-size:13px}
.event-multi-component-row:first-child{border-top:0}
.event-multi-component-row span{color:#36556f}
.event-multi-component-row strong{color:#173a59;font-variant-numeric:tabular-nums;white-space:nowrap}
.event-multi-meta{margin-top:0}
.event-multi-formula{border-radius:10px;background:#eef6fd;padding:11px 13px;color:#52708a;font-size:12px;line-height:1.45}
.event-multi-formula strong{color:#204d72}

/* M3.3.87 — multi-component historical results + score visual restore */
.event-calibration-simple.is-multi-results .event-calibration-topbar{
  grid-template-columns:minmax(0,1fr);
}
.event-calibration-simple.is-multi-results .event-past-occurrences{
  width:100%;
}
.event-calibration-simple.is-multi-results .event-member-calibration-card{
  margin-top:0;
}
.event-calibration-simple.is-multi-results [data-calibration-toolbar]{
  grid-template-columns:minmax(260px,520px);
  justify-content:start;
}
.event-calibration-simple.is-multi-results .event-member-calibration-table th,
.event-calibration-simple.is-multi-results .event-member-calibration-table td{
  white-space:nowrap;
}
.event-calibration-simple.is-multi-results .event-member-calibration-table td:not(:first-child),
.event-calibration-simple.is-multi-results .event-member-calibration-table th:not(:first-child){
  text-align:right;
  font-variant-numeric:tabular-nums;
}

/* Score visual: compare 90-day equivalent Score with the SWORD 100% benchmark. */
.score-block .score-flex{
  display:grid;
  grid-template-columns:54px minmax(72px,1fr);
  gap:9px;
  align-items:center;
  justify-content:stretch;
  width:100%;
}
.score-block .score-num{
  width:auto;
  text-align:right;
}
.score-block .bar{
  height:6px;
  background:#e5edf3;
  box-shadow:inset 0 0 0 1px rgba(91,124,151,.08);
}
.score-block tr.sword .score-flex{
  grid-template-columns:54px minmax(72px,1fr);
}
.score-block .bar-sword{
  background:linear-gradient(90deg,#d99a00,#f6c84a);
}

/* M3.3.87.2 — multi-component result simplification & component editing */
.event-calibration-simple.is-multi-results .event-calibration-topbar{display:none!important}
.event-calibration-simple.is-multi-results .event-calibration-footer{display:none!important}
.event-calibration-simple.is-multi-results .event-calibration-toolbar{grid-template-columns:minmax(260px,1fr);}
.event-calibration-simple.is-multi-results .event-calibration-toolbar label{display:none!important}
.event-multi-component-edit{grid-template-columns:minmax(180px,1fr) minmax(280px,auto);align-items:center;gap:14px}
.event-component-value-control{display:flex;align-items:center;justify-content:flex-end;gap:8px}
.event-component-value-control input{width:110px;min-height:36px;padding:7px 9px;border:1px solid #cdddeb;border-radius:9px;background:#fff;font:inherit;text-align:right}
.event-component-value-control span{font-size:12px;color:#6f879b;white-space:nowrap}
.event-component-value-control .admin-row-btn{min-height:36px;padding:7px 12px}
@media (max-width:900px){.event-multi-component-edit{grid-template-columns:1fr}.event-component-value-control{justify-content:flex-start}}
.event-component-control-total{font-size:12px;color:#7b90a3;font-weight:700;text-align:right}

/* ========================================================================== 
   M3.3.87.5 — FRONTEND STICKY COLUMN HEADER OVERLAY
   The performance table lives inside a horizontal overflow container. That
   container prevents native `position: sticky` headers from following the
   page's vertical scroll. JavaScript therefore mirrors only the actual THEAD
   row into a fixed overlay while preserving the original horizontal geometry.
   Group labels remain part of normal document flow.
   ========================================================================== */
.performance-grid > .table-block{
  overflow:hidden;
}

/* Native table headers remain in normal flow; the overlay is responsible for
   the pinned state. This avoids two competing sticky implementations. */
.performance-grid .split-table thead th{
  position:static;
  top:auto;
  z-index:auto;
}

.performance-grid .metric-group-title{
  position:relative;
  top:auto;
  z-index:1;
}

.frontend-sticky-columns{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:var(--head-h);
  overflow:hidden;
  pointer-events:none;
  z-index:980;
  opacity:0;
  visibility:hidden;
  transition:opacity .08s linear;
}
.frontend-sticky-columns.is-visible{
  opacity:1;
  visibility:visible;
}
.frontend-sticky-column-block{
  position:absolute;
  top:0;
  height:var(--head-h);
  overflow:hidden;
  border-left:1px solid #d5e3ee;
  border-right:1px solid #d5e3ee;
  background:var(--header);
  box-shadow:0 1px 0 #cbdce8,0 5px 10px -9px rgba(24,61,91,.65);
}
.frontend-sticky-column-block.is-identity{
  z-index:3;
  box-shadow:9px 0 18px -15px rgba(29,61,91,.65),0 1px 0 #cbdce8,0 5px 10px -9px rgba(24,61,91,.65);
}
.frontend-sticky-column-block .split-table{
  margin:0;
  background:transparent;
}
.frontend-sticky-column-block .split-table thead th{
  position:static!important;
  height:var(--head-h);
  min-height:var(--head-h);
  max-height:var(--head-h);
  background:var(--header);
}
@media(max-width:599px){
  .frontend-sticky-columns{display:none!important}
}


/* ========================================================================== 
   M3.3.87.6 — MEMBER DRAWER HEADER + SESSION UX HOTFIX
   Member detail is an overlay surface and must render above the sticky admin
   page header; otherwise the drawer's own sticky header is hidden underneath.
   ========================================================================== */
.admin-member-drawer{
  z-index:1200;
}
.admin-member-drawer .admin-drawer-head{
  z-index:4;
}

/* M3.3.88 — Settings redesign and reset controls */
.settings-tabs{display:flex;gap:0;margin:0 24px 18px;border:1px solid #d7e5f1;background:#f7fbff;border-radius:10px;overflow:hidden}
.settings-tabs a{min-width:170px;padding:15px 24px;text-align:center;text-decoration:none;color:#173b5b;font-weight:700;border-bottom:3px solid transparent}
.settings-tabs a.active{background:#fff;color:#1477e8;border-bottom-color:#1477e8;box-shadow:0 2px 10px rgba(29,70,105,.07)}
.settings-panel{margin:0 24px 22px;background:#fff;border:1px solid #cfe0ee;border-radius:16px;padding:22px;box-shadow:0 6px 18px rgba(31,66,94,.04)}
.settings-section-heading{display:flex;align-items:flex-start;gap:14px;margin-bottom:22px}.settings-section-heading h2{margin:0 0 3px;font-size:22px}.settings-section-heading p{margin:0;color:#6d879e;font-size:13px}
.settings-icon{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;background:#1986ee;color:#fff;font-size:24px;font-weight:700;flex:0 0 auto}.settings-icon-orange{background:#f7a51a}
.settings-form{display:grid;gap:16px}.settings-field-row{display:grid;grid-template-columns:180px 1fr;gap:20px;align-items:start}.settings-field-row>label{font-weight:700;padding-top:12px}.settings-field-row input,.settings-field-row select,.settings-inline-grid input,.settings-inline-grid select,.reset-tracking-date input,.reset-confirm input,.total-reset-confirm input{width:100%;height:46px;border:1px solid #c7d9e8;border-radius:9px;padding:0 14px;background:#fff;color:#173b5b;font:inherit;font-weight:600}.settings-field-row small,.settings-inline-grid small{display:block;margin-top:6px;color:#7890a5;font-size:12px}.settings-info-box{padding:14px 16px;border:1px solid #b9d9fa;border-radius:9px;background:#eef7ff;color:#1268c7;display:flex;flex-direction:column;gap:3px}.settings-actions{display:flex;justify-content:flex-end;margin-top:4px}.settings-actions .admin-primary-btn{min-width:240px}
.settings-two-column{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(330px,.75fr);gap:0 18px;margin:0 24px 22px}.settings-two-column>.settings-panel{margin:0}.settings-side-column{display:grid;align-content:start;gap:16px}.settings-info-card,.settings-key-card,.settings-success-card{border:1px solid #cfe0ee;border-radius:13px;padding:18px;background:#fff}.settings-info-card{background:#eef7ff;border-color:#b8dcfb}.settings-info-card h3,.settings-key-card h3{margin:0 0 10px;font-size:17px}.settings-info-card p{margin:0;color:#587690;line-height:1.55}.settings-key-card dl{margin:0}.settings-key-card dl div{display:flex;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid #e2ebf2}.settings-key-card dl div:last-child{border-bottom:0}.settings-key-card dt{color:#456681}.settings-key-card dd{margin:0;font-weight:700;text-align:right}.settings-success-card{background:#eefbf7;border-color:#b8ead9;color:#0e7f5c;display:flex;flex-direction:column;gap:4px}.settings-success-card span{color:#4f7c70;font-size:12px}
.settings-inline-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}.settings-inline-grid label{margin:0}.settings-inline-grid label>span{display:block;margin-bottom:7px;font-size:12px;font-weight:700}.settings-info-strip,.settings-warning-strip{padding:13px 15px;border-radius:9px;background:#f1f5f8;color:#567188;font-size:12px;line-height:1.45}.settings-warning-strip{background:#fff5dc;border:1px solid #f0d393;color:#835e10}.settings-period-status,.settings-next-period{border:1px solid #d6e5f2;border-radius:11px;padding:16px;background:#f8fbfe}.settings-period-status{background:#eff7ff}.settings-period-status h3,.settings-next-period h3{margin:0 0 14px;font-size:15px;color:#176fc6}.settings-period-status>div,.settings-next-period>div{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.settings-next-period>div{grid-template-columns:1fr 1fr}.settings-period-status span,.settings-next-period span{display:flex;flex-direction:column;gap:5px;color:#6c8499;font-size:11px}.settings-period-status b,.settings-next-period b{font-size:17px;color:#173b5b}.settings-period-status small,.settings-next-period small{font-size:11px;color:#6c8499}
.settings-reset-header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.settings-reset-header>.settings-info-box{min-width:290px}.settings-reset-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}.settings-reset-selective,.settings-reset-danger{border:1px solid #bfd8ed;border-radius:12px;padding:16px;background:#fbfdff}.settings-reset-danger{border-color:#efb6b6;background:#fff9f9}.reset-card-title h3{margin:0;font-size:18px}.reset-card-title p{margin:3px 0 12px;color:#6c8499;font-size:12px}.reset-preset{width:100%;display:grid;grid-template-columns:1fr auto;text-align:left;gap:2px 12px;padding:13px 14px;margin-bottom:8px;border:1px solid #a9d0f5;border-radius:9px;background:#edf7ff;color:#126bc9;cursor:pointer}.reset-preset strong{grid-column:1}.reset-preset span{grid-column:1;color:#62839f;font-size:11px}.reset-preset b{grid-column:2;grid-row:1/3;align-self:center;border:1px solid #1680ec;border-radius:7px;padding:8px 10px;background:#fff}.reset-scope-row{display:grid;grid-template-columns:20px 1fr auto;gap:10px;align-items:center;padding:10px 2px;border-bottom:1px solid #e2ebf2;cursor:pointer}.reset-scope-row input{width:16px;height:16px}.reset-scope-row span{display:flex;flex-direction:column}.reset-scope-row strong{font-size:13px}.reset-scope-row small{color:#71889c;font-size:11px}.reset-scope-row em{font-style:normal;font-size:10px;color:#dc4141;background:#fff0f0;border-radius:5px;padding:4px 7px}.reset-tracking-date{display:grid;grid-template-columns:1fr 180px;align-items:center;gap:12px;margin-top:12px;padding:12px;border-radius:9px;background:#eef7ff}.reset-tracking-date span{font-weight:700;font-size:12px}.reset-preview{margin-top:10px;padding:12px;border:1px solid #b9d9fa;border-radius:9px;background:#f3f9ff;font-size:12px;line-height:1.5}.reset-confirm{margin-top:10px}.reset-confirm label,.total-reset-confirm{display:grid;gap:7px;font-size:12px}.reset-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;margin-top:12px}.total-reset-warning{padding:14px;border:1px solid #ef9f9f;border-radius:9px;background:#fff0f0;color:#b52222;margin-bottom:12px}.total-reset-warning strong{display:block;margin-bottom:5px}.total-reset-warning p{margin:0;font-size:12px;line-height:1.45}.total-reset-list{padding:14px;border:1px solid #efb8b8;border-radius:9px;background:#fff5f5;margin-bottom:12px}.total-reset-list>div{display:grid;grid-template-columns:1fr 1fr;gap:7px 18px;margin-top:10px}.total-reset-list span{font-size:11px;color:#b32626}.total-reset-confirm{padding:12px;border:1px solid #e0e8ef;border-radius:9px;background:#fff;margin-bottom:10px}.danger-reset-btn{width:100%;border:0;border-radius:8px;padding:13px;background:#dc3030;color:#fff;font-weight:800;cursor:pointer;margin-bottom:12px}
.login-id-format-help{display:block;margin:-5px 0 10px;color:#6d8397;font-size:10px}
@media(max-width:1000px){.settings-two-column,.settings-reset-columns{grid-template-columns:1fr}.settings-side-column{margin-top:0}.settings-inline-grid{grid-template-columns:1fr}.settings-reset-header{display:block}.settings-reset-header>.settings-info-box{margin-bottom:14px}.settings-field-row{grid-template-columns:1fr;gap:6px}.settings-field-row>label{padding-top:0}.settings-tabs{overflow-x:auto}.settings-tabs a{min-width:130px}}

/* M3.3.88.2 — Reset flow state clarity */
.settings-reset-selective .admin-primary-btn:disabled,
.settings-reset-selective [data-reset-execute]:disabled{
  opacity:.45;
  cursor:not-allowed;
  box-shadow:none;
  filter:saturate(.55);
}
.reset-preview small{
  display:block;
  margin-top:8px;
  color:#607d94;
  font-size:11px;
}
.reset-confirm:not([hidden]){
  display:block;
  padding:12px;
  border:1px solid #b9d9fa;
  border-radius:9px;
  background:#f8fbff;
}

/* M3.3.89 — Event cycle & composite mapping */
.composite-mapping-card{margin:0 0 18px;padding:22px}
.composite-mapping-form{display:grid;grid-template-columns:minmax(220px,320px) 1fr auto;gap:18px;align-items:end}
.composite-mapping-form>label{display:grid;gap:8px;font-weight:700;color:#173b5f}
.composite-mapping-form select{width:100%}
.composite-metric-picker{display:grid;gap:9px;min-width:0}
.composite-metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:250px;overflow:auto;padding:2px}
.composite-metric-option{display:flex;gap:9px;align-items:flex-start;padding:10px 12px;border:1px solid #d4e2ef;border-radius:10px;background:#fff;cursor:pointer}
.composite-metric-option input{margin-top:3px}
.composite-metric-option span{display:grid;gap:2px;min-width:0}
.composite-metric-option small{font-weight:500;color:#7890a7;white-space:normal}
.composite-metric-option.is-used{background:#f8fafc}
.event-window-grid .admin-repeat-control{width:100%}
.event-window-grid .admin-repeat-control input{width:100%}
@media(max-width:1100px){.composite-mapping-form{grid-template-columns:1fr}.composite-metric-grid{grid-template-columns:1fr}}

/* M3.3.90 — Composite mapping UX + classic Data & Results calibration */
.composite-mapping-card{padding:0;overflow:visible}
.composite-mapping-toggle{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto auto;gap:12px;align-items:center;border:0;background:transparent;padding:18px 20px;text-align:left;color:inherit;cursor:pointer}
.composite-mapping-title-icon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:#edf7ff;color:#0a75d8;font-weight:800;font-size:19px}
.composite-mapping-title-copy{display:grid;gap:3px}.composite-mapping-title-copy strong{font-size:18px;color:#153a5b}.composite-mapping-title-copy small{font-size:12px;color:#718aa0;font-weight:500}
.composite-toggle-hint{font-size:12px;color:#6f879b;font-weight:700}.composite-toggle-chevron{font-size:18px;color:#315675;line-height:1}
.composite-mapping-card.is-collapsed .composite-mapping-toggle{border-bottom:0}.composite-mapping-body{border-top:1px solid #dce8f2;padding:18px 20px 20px}
.composite-mapping-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:stretch}
.composite-builder-pane{border:1px solid #d5e4f0;border-radius:14px;background:#fff;padding:16px;min-width:0}
.composite-step-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;margin-bottom:12px}.composite-step-head>span:first-child{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#e7f4ff;color:#0875d5;font-weight:800}.composite-step-head>div{display:grid;gap:2px}.composite-step-head strong{color:#163c5f}.composite-step-head small{color:#7890a4;font-size:12px}.composite-event-step{margin-top:18px;padding-top:16px;border-top:1px solid #e2ebf2}
.composite-search-wrap input,.composite-event-combobox>input{width:100%;border:1px solid #c7dceb;border-radius:9px;padding:10px 12px;font:inherit;color:#183f61;background:#fff}
.composite-source-list{margin-top:10px;max-height:360px;overflow:auto;border:1px solid #e0e9f1;border-radius:10px;background:#fbfdff}
.composite-source-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 11px;border-bottom:1px solid #e7eef4;cursor:pointer;transition:.12s ease}.composite-source-row[hidden]{display:none!important}.composite-source-row:last-of-type{border-bottom:0}.composite-source-row:hover{background:#f4f9fd}.composite-source-row.is-selected{background:#edf7ff}.composite-source-row.is-unavailable{opacity:.55;cursor:not-allowed}.composite-source-row input{width:17px;height:17px}.composite-source-copy{display:grid;gap:1px;min-width:0}.composite-source-copy b{font-size:13px;color:#163d60}.composite-source-copy small{font-size:11px;color:#7990a3}.composite-source-state{font-size:11px;font-weight:700;color:#0872ce;text-align:right;max-width:190px}
.composite-selected-list{display:grid;gap:8px;min-height:96px}.composite-selected-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;align-items:center;border:1px solid #dbe7f1;border-radius:10px;padding:9px 10px;background:#fbfdff}.composite-selected-item>span:nth-child(2){display:grid;gap:1px}.composite-selected-item strong{font-size:13px;color:#173d60}.composite-selected-item small{font-size:11px;color:#7990a3}.composite-selected-item button{border:0;background:transparent;color:#295a7d;font-size:20px;cursor:pointer}.composite-drag-handle{color:#9aafc0;letter-spacing:-2px}.composite-selected-empty{border:1px dashed #c9dae7;border-radius:10px;padding:18px;text-align:center;color:#8397a8;font-size:12px}
.composite-existing-notice{margin-top:12px;border:1px solid #b9daf6;background:#eef8ff;border-radius:10px;padding:11px 12px;display:grid;gap:2px;color:#1669aa}.composite-existing-notice strong{font-size:13px}.composite-existing-notice span{font-size:12px;color:#537a99}
.composite-event-combobox{position:relative}.composite-event-options{position:absolute;z-index:40;left:0;right:0;top:calc(100% + 5px);max-height:240px;overflow:auto;border:1px solid #cbddea;border-radius:10px;background:#fff;box-shadow:0 14px 30px rgba(33,70,98,.14);padding:5px}.composite-event-options button{width:100%;display:grid;gap:2px;border:0;background:#fff;text-align:left;padding:9px 10px;border-radius:7px;cursor:pointer;color:#173c5e}.composite-event-options button:hover{background:#eef7ff}.composite-event-options button span{font-weight:700}.composite-event-options button small{color:#8295a6}
.composite-selected-event{margin-top:9px;border:1px solid #d9e6ef;background:#f8fbfd;border-radius:10px;padding:10px 11px;display:flex;align-items:center;justify-content:space-between;gap:12px}.composite-selected-event>span:first-child{display:grid;gap:2px}.composite-selected-event strong{font-size:13px;color:#163d60}.composite-selected-event small{font-size:11px;color:#7d92a4}.composite-form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:14px}.composite-clear-btn{justify-self:end}.event-mapping-row-actions{display:flex;align-items:center;gap:10px}.event-mapping-row-actions form{margin:0}

.event-calibration-simple.is-multi-results .event-calibration-topbar{display:grid!important}.event-calibration-simple.is-multi-results .event-calibration-footer{display:flex!important}.event-calibration-simple.is-multi-results .event-past-occurrences{display:block!important}.event-calibration-simple.is-multi-results [data-calibration-toolbar]{display:flex!important}.event-calibration-simple.is-multi-results [data-calibration-toolbar] label{display:flex!important}.event-calibration-simple.is-multi-results .event-calibration-save-row{display:flex!important}.event-calibration-simple.is-multi-results .event-member-calibration-card{display:block!important}
.event-calibration-simple.is-multi-results .event-calibration-table-scroll{overflow:auto}.event-calibration-simple.is-multi-results .event-member-calibration-table{min-width:1100px}.event-calibration-simple.is-multi-results .event-member-calibration-table th,.event-calibration-simple.is-multi-results .event-member-calibration-table td{white-space:nowrap}.event-calibration-simple.is-multi-results .event-member-calibration-table th:first-child,.event-calibration-simple.is-multi-results .event-member-calibration-table td:first-child{position:sticky;left:0;z-index:2;background:#fff}.event-calibration-simple.is-multi-results .event-member-calibration-table thead th:first-child{background:#f5f8fb;z-index:3}
.composite-completeness{display:block;margin-top:2px;font-size:10px;font-weight:700}.composite-completeness.complete{color:#31845a}.composite-completeness.partial{color:#b16b16}.event-member-calibration-table .is-missing-source{color:#9aabb9;background:#fbfcfd}

@media(max-width:1100px){.composite-mapping-form{grid-template-columns:1fr}.composite-mapping-toggle{grid-template-columns:auto minmax(0,1fr) auto}.composite-toggle-hint,.composite-mapping-toggle>.ap-badge{display:none}}

/* M3.3.92 — composite Data & Results regression hotfix */
.event-calibration-simple.is-multi-results .event-calibration-topbar{
  display:grid!important;
  grid-template-columns:minmax(320px,1.65fr) repeat(3,minmax(155px,.7fr))!important;
  gap:8px!important;
  align-items:stretch;
}
.event-calibration-simple.is-multi-results .event-past-occurrences{
  width:auto!important;
  grid-column:auto!important;
}
@media(max-width:1200px){
  .event-calibration-simple.is-multi-results .event-calibration-topbar{
    grid-template-columns:1fr 1fr!important;
  }
  .event-calibration-simple.is-multi-results .event-past-occurrences{
    grid-column:1/-1!important;
  }
}
@media(max-width:800px){
  .event-calibration-simple.is-multi-results .event-calibration-topbar{
    grid-template-columns:1fr!important;
  }
  .event-calibration-simple.is-multi-results .event-past-occurrences{
    grid-column:auto!important;
  }
}

/* M3.3.93 composite calculation method */
.composite-method-field{display:grid;gap:6px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line,#dce5ee)}
.composite-method-field>span{font-weight:700;color:#26384a}.composite-method-field select{min-height:40px;border:1px solid #cfd9e4;border-radius:8px;padding:0 10px;background:#fff}.composite-method-field small{color:#667788}

/* ========================================================================== 
   M3.3.94 — SUBMISSIONS COMPACT UX HOTFIX
   Approved compact layout: table-first hierarchy, reduced chrome.
   ========================================================================== */

.admin-tab-submissions{
  padding-top:14px;
}
.admin-tab-submissions .admin-page-head{
  margin-bottom:12px;
  align-items:center;
}
.admin-tab-submissions .admin-page-head h1{
  font-size:23px;
  margin-top:2px;
}
.admin-tab-submissions .admin-breadcrumb{
  font-size:9px;
}
.admin-tab-submissions .admin-game-day{
  font-size:10px;
}

/* KPI strip is useful context, but should not compete with the table. */
.admin-tab-submissions .submission-kpis{
  gap:8px;
  margin-bottom:8px;
}
.admin-tab-submissions .submission-kpis .admin-metric{
  min-height:42px;
  padding:6px 10px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  box-shadow:none;
}
.admin-tab-submissions .submission-kpis .admin-metric span{
  font-size:9px;
  margin:0;
}
.admin-tab-submissions .submission-kpis .admin-metric b{
  margin:0;
  font-size:17px;
  line-height:1;
}

/* One compact control row: search + filters + columns. */
.admin-tab-submissions .submission-toolbar{
  grid-template-columns:minmax(300px,1.45fr) minmax(130px,.55fr) minmax(130px,.55fr) minmax(145px,.6fr) auto;
  gap:7px;
  margin-bottom:7px;
}
.admin-tab-submissions .submission-toolbar input,
.admin-tab-submissions .submission-toolbar select,
.admin-tab-submissions .submission-columns-btn{
  height:34px;
  font-size:10px;
}
.admin-tab-submissions .submission-columns-btn{
  padding:0 11px;
  white-space:nowrap;
}

/* Bulk actions stay available, but no longer dominate the page. */
.admin-tab-submissions .submission-bulkbar{
  gap:7px;
  margin-bottom:7px;
}
.admin-tab-submissions .submission-bulkbar .compact{
  min-height:33px;
  padding:7px 11px;
  border-radius:7px;
  font-size:10px;
}

/* Table becomes the visual focus. */
.admin-tab-submissions .submission-master .admin-table-card{
  border-radius:10px;
  box-shadow:0 5px 16px rgba(32,70,104,.05);
}
.admin-tab-submissions #subsTable{
  min-width:1040px;
  font-size:10px;
}
.admin-tab-submissions #subsTable th{
  height:34px;
  padding:7px 8px;
  background:#f7f9fb;
  color:#5c7184;
  font-size:9px;
  font-weight:750;
}
.admin-tab-submissions #subsTable td{
  height:48px;
  padding:7px 8px;
  font-size:10px;
  line-height:1.18;
}
.admin-tab-submissions #subsTable th:first-child,
.admin-tab-submissions #subsTable td:first-child{
  width:34px;
  min-width:34px;
  padding-left:9px;
  padding-right:5px;
  text-align:center;
}
.admin-tab-submissions #subsTable th[data-col="member"],
.admin-tab-submissions #subsTable td[data-col="member"]{
  min-width:102px;
}
.admin-tab-submissions #subsTable td[data-col="member"]{
  font-weight:750;
  color:#173a5c;
}
.admin-tab-submissions #subsTable th[data-col="event"],
.admin-tab-submissions #subsTable td[data-col="event"]{
  min-width:88px;
}
.admin-tab-submissions #subsTable th[data-col="game_day"],
.admin-tab-submissions #subsTable td[data-col="game_day"]{
  min-width:94px;
  white-space:nowrap;
}
.admin-tab-submissions #subsTable td[data-col="user_value"]{
  font-weight:700;
  color:#173a5c;
}
.admin-tab-submissions #subsTable td.submission-percent-cell{
  font-size:11px;
  font-weight:800;
}
.admin-tab-submissions #subsTable th[data-col="source"],
.admin-tab-submissions #subsTable td[data-col="source"]{
  min-width:90px;
}
.admin-tab-submissions #subsTable th[data-col="submitted"],
.admin-tab-submissions #subsTable td[data-col="submitted"]{
  min-width:92px;
}
.admin-tab-submissions #subsTable th[data-col="actions"],
.admin-tab-submissions #subsTable td[data-col="actions"]{
  width:42px;
  min-width:42px;
  text-align:center;
}

/* Status is visible without painting the whole table aggressively. */
.admin-tab-submissions #subsTable .submission-row-approved{
  background:rgba(36,166,99,.035)!important;
  box-shadow:inset 3px 0 0 #27ad68!important;
}
.admin-tab-submissions #subsTable .submission-row-rejected{
  background:rgba(220,72,78,.045)!important;
  box-shadow:inset 3px 0 0 #e34d54!important;
}
.admin-tab-submissions #subsTable .submission-row-corrected{
  background:rgba(211,145,35,.045)!important;
  box-shadow:inset 3px 0 0 #d49a2b!important;
}
.admin-tab-submissions #subsTable .submission-row-pending{
  background:#fff!important;
  box-shadow:inset 3px 0 0 #cfdbe4!important;
}
.admin-tab-submissions #subsTable tbody tr:hover{
  background:#f7fbff!important;
}
.admin-tab-submissions #subsTable .submission-row.is-selected{
  background:#eaf4ff!important;
  box-shadow:inset 3px 0 0 #2085ed, inset 0 0 0 1px rgba(32,133,237,.18)!important;
}

/* Compact source chips replace wrapped “User + CSV” text. */
.submission-source-cell{
  white-space:nowrap;
}
.submission-source-chip{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:3px 7px;
  margin:1px 3px 1px 0;
  border-radius:999px;
  background:#edf3f8;
  color:#395773;
  font-size:9px;
  font-weight:700;
  line-height:1;
}

/* Submitted date/time gets a clean 2-line treatment. */
.submission-submitted-cell{
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.submission-submitted-cell span,
.submission-submitted-cell small{
  display:block;
}
.submission-submitted-cell span{
  color:#183b5b;
  font-weight:650;
}
.submission-submitted-cell small{
  margin-top:2px;
  color:#6d8497;
  font-size:9px;
  font-weight:650;
}

/* Row review remains available through the row itself; action is unobtrusive. */
.submission-more-btn{
  width:30px;
  height:28px;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#547087!important;
  font-size:12px!important;
  letter-spacing:1px;
  border-radius:6px!important;
}
.submission-more-btn:hover{
  background:#edf4f9!important;
  color:#173a5c!important;
}

/* Header checkbox replaces the large “Select visible” button. */
#subsTable [data-sub-select-visible-all]{
  width:15px;
  height:15px;
  margin:0;
  accent-color:#1677df;
}

/* Status pills remain compact. */
.admin-tab-submissions #subsTable .ap-badge{
  padding:4px 7px;
  font-size:8px;
  line-height:1;
}

@media (max-width:1350px){
  .admin-tab-submissions .submission-toolbar{
    grid-template-columns:minmax(240px,1fr) repeat(3,minmax(135px,1fr)) auto;
  }
}
@media (max-width:1050px){
  .admin-tab-submissions{
    padding-top:10px;
  }
  .admin-tab-submissions .submission-kpis{
    grid-template-columns:repeat(4,minmax(110px,1fr));
    overflow-x:auto;
  }
  .admin-tab-submissions .submission-toolbar{
    grid-template-columns:1fr 1fr;
  }
  .admin-tab-submissions .submission-toolbar .admin-search-wrap{
    grid-column:1 / -1;
  }
  .admin-tab-submissions .submission-columns-btn{
    justify-self:start;
  }
}

/* ==========================================================================
   M3.3.98 — SUBMISSION REVIEW EVENT CORRECTION + COMPACT DRAWER
   ========================================================================== */

/* Keep the table visually dominant while the right-hand review drawer is open. */
.submission-review-workspace.has-detail{
  grid-template-columns:minmax(0,1fr) 410px;
  gap:8px;
}

/* Denser submission rows: more records remain visible without sacrificing scanability. */
.admin-tab-submissions #subsTable thead th{
  padding-top:7px!important;
  padding-bottom:7px!important;
}
.admin-tab-submissions #subsTable tbody td{
  padding-top:7px!important;
  padding-bottom:7px!important;
  line-height:1.12;
}
.admin-tab-submissions #subsTable tbody tr{
  min-height:42px;
}

/* Drawer uses nearly the full viewport height but keeps the existing side-panel concept. */
.submission-detail-panel{
  top:4px;
  max-height:calc(100vh - 8px);
}
.submission-detail-panel .admin-drawer-body.submission-detail-content{
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:8px 10px 10px;
}
.submission-detail-title.compact{
  min-height:30px;
  margin-bottom:5px;
}
.submission-detail-title.compact strong{font-size:12px;}
.submission-detail-title.compact div span,
.submission-detail-title.compact>span{font-size:8px;}

/* Event correction and game day share one compact row and identical control height. */
.submission-review-meta{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:7px;
  margin:0 0 6px;
}
.submission-review-meta label{
  display:grid;
  gap:3px;
  min-width:0;
  margin:0!important;
  color:#173b5b;
  font-size:9px;
  font-weight:700;
}
.submission-review-meta input,
.submission-review-meta select{
  width:100%;
  min-width:0;
  height:32px!important;
  margin:0!important;
  padding:0 8px!important;
  border-radius:7px!important;
  font-size:11px!important;
  background:#fff;
}

/* Screenshot stays inline; hover zoom remains the only enlargement interaction. */
.submission-image-top,
.submission-image-top img{
  height:clamp(210px,31vh,330px);
  max-height:330px;
}
.submission-image-top{
  margin-bottom:6px;
}
.submission-image-top:not(:has(img:not([hidden]))){
  height:76px;
  max-height:76px;
}

/* Compact result grid, no explanatory filler rows. */
.submission-compare-dense{
  gap:4px;
  margin-bottom:5px;
}
.submission-compare-dense>div{
  min-height:37px;
  padding:5px 6px;
}
.submission-compare-dense span{font-size:7.5px!important;}
.submission-compare-dense b{font-size:10.5px!important;}

.submission-score-field{
  grid-template-columns:96px minmax(0,1fr);
  gap:6px;
  margin-top:2px!important;
  font-size:9px!important;
}
.submission-score-field input{
  height:32px!important;
}

/* Only the two actual decisions remain. */
.submission-detail-panel .admin-review-buttons{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin-top:6px;
  padding-top:6px;
}
.submission-detail-panel .admin-review-buttons button{
  min-height:36px;
  font-size:10px;
}

@media (max-width:1280px){
  .submission-review-workspace.has-detail{
    grid-template-columns:minmax(0,1fr) 380px;
  }
  .submission-image-top,
  .submission-image-top img{
    height:clamp(190px,28vh,285px);
  }
}

/* M3.4.00 — Event editor polish + diagnostics/performance sync */
.event-result-source-choice{
  gap:8px;
}
.event-source-radio{
  display:grid!important;
  grid-template-columns:22px minmax(0,1fr)!important;
  align-items:start!important;
  gap:10px!important;
  padding:11px 12px!important;
  border:1px solid transparent;
  border-radius:10px;
  transition:background .12s ease,border-color .12s ease;
}
.event-source-radio:hover{
  background:#f8fbfd;
  border-color:#e1ebf3;
}
.event-source-radio:has(input:checked){
  background:#f1f8fe;
  border-color:#c8e0f4;
}
.event-source-radio input{
  margin:1px 0 0!important;
  align-self:start;
}
.event-source-radio span{
  min-width:0;
  display:grid!important;
  grid-template-columns:1fr;
  gap:3px!important;
}
.event-source-radio b{
  display:block;
  line-height:20px;
  font-size:15px;
}
.event-source-radio small{
  display:block;
  margin:0;
  line-height:1.4;
}
.event-score-source-panel [data-score-panel="manual"]{
  display:flex;
  flex-direction:column;
  min-height:100%;
}
.event-score-source-panel [data-score-panel="manual"] .event-mini-summary{
  margin-bottom:4px;
}
.event-submissions-link{
  width:max-content!important;
  max-width:100%;
  margin-top:16px!important;
  margin-bottom:8px!important;
  justify-content:center!important;
}
.event-submissions-link + .admin-cell-note{
  display:block;
  margin:0 0 4px;
  line-height:1.4;
}

.composite-toggle-chevron{
  width:10px;
  height:10px;
  border-right:2px solid #315675;
  border-bottom:2px solid #315675;
  transform:rotate(45deg);
  transition:transform .16s ease;
  justify-self:center;
  margin-right:2px;
}
.composite-toggle-chevron.is-expanded{
  transform:rotate(225deg);
}
.composite-mapping-toggle:hover .composite-toggle-chevron{
  border-color:#0b72c9;
}

/* M3.4.04 — submission occurrence picker: only real event dates are selectable. */
.submission-occurrence-picker{position:relative;min-width:0;}
.submission-occurrence-trigger{
  width:100%;height:32px;margin:0;padding:0 9px;border:1px solid #bdccda;border-radius:7px;background:#fff;
  display:flex;align-items:center;justify-content:space-between;gap:8px;color:#173b5b;font:inherit;font-weight:700;text-align:left;cursor:pointer;
}
.submission-occurrence-trigger:focus{outline:2px solid #2280d8;outline-offset:1px;}
.submission-occurrence-calendar-icon{font-size:13px;color:#627f98;line-height:1;}
.submission-occurrence-popover{
  position:absolute;z-index:40;top:calc(100% + 5px);right:0;width:280px;padding:10px;background:#fff;border:1px solid #c9d8e5;border-radius:10px;
  box-shadow:0 14px 34px rgba(22,55,82,.18);
}
.submission-occurrence-monthbar{display:grid;grid-template-columns:30px 1fr 30px;align-items:center;gap:5px;margin-bottom:8px;}
.submission-occurrence-monthbar strong{text-align:center;color:#173b5b;font-size:11px;text-transform:capitalize;}
.submission-occurrence-monthbar button{height:30px;border:0;background:transparent;border-radius:6px;color:#45647e;font-size:20px;cursor:pointer;}
.submission-occurrence-monthbar button:hover{background:#f0f6fb;}
.submission-occurrence-weekdays,.submission-occurrence-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;}
.submission-occurrence-weekdays{margin-bottom:3px;color:#7a91a5;font-size:8px;text-align:center;}
.submission-occurrence-day,.submission-occurrence-blank{height:30px;min-width:0;}
.submission-occurrence-day{border:0;border-radius:6px;background:#eef6fc;color:#173b5b;font-size:10px;font-weight:700;cursor:pointer;}
.submission-occurrence-day:hover:not(:disabled){background:#dceefa;}
.submission-occurrence-day.is-selected{background:#1f7fe0;color:#fff;box-shadow:inset 0 0 0 2px #fff,0 0 0 1px #1f7fe0;}
.submission-occurrence-day:disabled{background:transparent;color:#c5ced6;cursor:not-allowed;font-weight:500;}
.submission-occurrence-empty{padding:10px 4px 2px;color:#8095a8;font-size:9px;text-align:center;}
@media (max-width:700px){.submission-occurrence-popover{left:0;right:auto;width:min(280px,calc(100vw - 40px));}}

/* M3.4.04 — submission occurrence picker: only actual event dates are selectable. */
.submission-occurrence-picker{position:relative;min-width:0;}
.submission-occurrence-trigger{
  width:100%;height:32px;margin:0;padding:0 9px;border:1px solid #bdccda;border-radius:7px;background:#fff;
  display:flex;align-items:center;justify-content:space-between;gap:8px;color:#173b5b;font:inherit;font-weight:700;text-align:left;cursor:pointer;
}
.submission-occurrence-trigger:focus{outline:2px solid #2280d8;outline-offset:1px;}
.submission-occurrence-calendar-icon{font-size:13px;color:#627f98;line-height:1;}
.submission-occurrence-popover{
  position:absolute;z-index:40;top:calc(100% + 5px);right:0;width:280px;padding:10px;background:#fff;border:1px solid #c9d8e5;border-radius:10px;
  box-shadow:0 14px 34px rgba(22,55,82,.18);
}
.submission-occurrence-monthbar{display:grid;grid-template-columns:30px 1fr 30px;align-items:center;gap:5px;margin-bottom:8px;}
.submission-occurrence-monthbar strong{text-align:center;color:#173b5b;font-size:11px;text-transform:capitalize;}
.submission-occurrence-monthbar button{height:30px;border:0;background:transparent;border-radius:6px;color:#45647e;font-size:20px;cursor:pointer;}
.submission-occurrence-monthbar button:hover{background:#f0f6fb;}
.submission-occurrence-weekdays,.submission-occurrence-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;}
.submission-occurrence-weekdays{margin-bottom:3px;color:#7a91a5;font-size:8px;text-align:center;}
.submission-occurrence-day,.submission-occurrence-blank{height:30px;min-width:0;}
.submission-occurrence-day{border:0;border-radius:6px;background:#eef6fc;color:#173b5b;font-size:10px;font-weight:700;cursor:pointer;}
.submission-occurrence-day:hover:not(:disabled){background:#dceefa;}
.submission-occurrence-day.is-selected{background:#1f7fe0;color:#fff;box-shadow:inset 0 0 0 2px #fff,0 0 0 1px #1f7fe0;}
.submission-occurrence-day:disabled{background:transparent;color:#c5ced6;cursor:not-allowed;font-weight:500;}
.submission-occurrence-empty{padding:10px 4px 2px;color:#8095a8;font-size:9px;text-align:center;}
@media (max-width:700px){.submission-occurrence-popover{left:0;right:auto;width:min(280px,calc(100vw - 40px));}}

/* M3.4.06 — refined Imports landing page */
.import-page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin:0 0 18px;
  padding:0 2px 16px;
  border-bottom:1px solid #d8e5ef;
}
.import-page-head h2{
  margin:0 0 4px;
  color:#173653;
  font-size:28px;
  line-height:1.08;
}
.import-page-head p{margin:0;color:#758da1;font-size:14px}
.import-center-tabs{margin:0;flex:0 0 auto}

.import-upload-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-bottom:18px;
}
.import-upload-card{
  display:block;
  padding:20px;
  border:1px solid #d5e3ee;
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 24px rgba(37,72,101,.055);
  color:inherit;
}
.import-upload-card-top{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:start;
  gap:16px;
}
.import-upload-card-icon{
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  border-radius:13px;
  background:#edf6ff;
  color:#2778b8;
  font-weight:900;
  font-size:18px;
}
.import-upload-card-copy{min-width:0}
.import-upload-card-copy h2{margin:1px 0 4px;color:#173653;font-size:20px;line-height:1.15}
.import-upload-card-copy p{margin:0;color:#748b9f;font-size:13px;line-height:1.35;max-width:440px}
.import-health-badge{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:28px;
  padding:5px 10px;
  border-radius:999px;
  white-space:nowrap;
  font-size:12px;
  font-weight:800;
}
.import-health-badge i{width:7px;height:7px;border-radius:50%;background:currentColor;display:block}
.import-health-badge.is-ok{background:#e7f7ee;color:#16824f}
.import-health-badge.is-neutral{background:#eef3f7;color:#73899b}
.import-upload-card-bottom{
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.15fr) auto;
  align-items:end;
  gap:18px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid #e4edf3;
}
.import-card-stat{display:flex;flex-direction:column;gap:4px;min-width:0}
.import-card-stat span{color:#8396a7;font-size:12px}
.import-card-stat strong{color:#294a65;font-size:13px;line-height:1.3;overflow-wrap:anywhere}
.import-upload-action{min-height:42px;padding:10px 16px;text-decoration:none;white-space:nowrap;align-self:center}

.import-recent-card{padding:0;overflow:hidden}
.import-recent-heading{padding:17px 20px}
.import-recent-heading h2{font-size:20px}
.import-recent-table-wrap{overflow-x:auto;border-top:1px solid #e5edf3}
.import-recent-table{width:100%;border-collapse:collapse;table-layout:fixed}
.import-recent-table th{
  padding:12px 16px;
  background:#f6f9fc;
  color:#5f7689;
  font-size:12px;
  font-weight:800;
  text-align:left;
  border-bottom:1px solid #e2eaf0;
}
.import-recent-table td{
  padding:12px 16px;
  color:#294a65;
  font-size:13px;
  vertical-align:middle;
  border-top:1px solid #edf2f6;
}
.import-recent-table tbody tr:first-child td{border-top:0}
.import-recent-table th:nth-child(1){width:17%}
.import-recent-table th:nth-child(2){width:25%}
.import-recent-table th:nth-child(3){width:18%}
.import-recent-table th:nth-child(4){width:22%}
.import-recent-table th:nth-child(5){width:12%}
.import-recent-table th:nth-child(6){width:6%}
.import-type-cell{display:flex;align-items:center;gap:10px;min-width:0}
.import-type-cell strong{color:#21415c;white-space:nowrap}
.import-type-icon{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  flex:0 0 34px;
  border-radius:9px;
  background:#eef6fd;
  color:#2778b8;
  font-weight:900;
}
.import-file-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#355b78}
.import-recent-table td>strong{font-size:12.5px;color:#355b78}
.import-impact{display:block;color:#657e91;line-height:1.35}
.import-action-col{text-align:center!important}
.import-more-btn{
  display:inline-grid;
  place-items:center;
  width:36px;
  height:34px;
  border:1px solid #cbdce8;
  border-radius:8px;
  background:#fff;
  color:#355b78;
  text-decoration:none;
  font-weight:900;
  letter-spacing:1px;
}
.import-more-btn:hover{border-color:#9fc8ea;background:#f7fbfe}
.import-empty-cell{text-align:center;padding:28px!important}

@media(max-width:1100px){
  .import-upload-card-bottom{grid-template-columns:1fr 1fr}
  .import-upload-action{grid-column:1/-1;justify-self:start}
}
@media(max-width:980px){
  .import-page-head{align-items:flex-start;flex-direction:column}
  .import-upload-grid{grid-template-columns:1fr}
}
@media(max-width:720px){
  .import-upload-card-top{grid-template-columns:auto minmax(0,1fr)}
  .import-health-badge{grid-column:2;justify-self:start}
  .import-upload-card-bottom{grid-template-columns:1fr}
  .import-upload-action{grid-column:auto;width:100%;justify-content:center}
  .import-recent-table{min-width:820px}
}

/* ==========================================================================\n   M3.4.12 — Submissions processed visibility toggle\n   ========================================================================== */
.submission-toolbar{
  grid-template-columns:minmax(230px,1fr) 166px 180px 180px 190px auto;
}
.submission-processed-toggle{
  min-height:44px;
  padding:0 12px;
  border:1px solid var(--line,#cfdde8);
  border-radius:10px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:var(--ink,#173a59);
  font-weight:700;
  white-space:nowrap;
  box-sizing:border-box;
}
.submission-processed-toggle .admin-switch{
  width:38px;
  height:22px;
}
.submission-processed-toggle .admin-switch i::after{
  width:16px;
  height:16px;
}
.submission-processed-toggle .admin-switch input:checked+i::after{
  transform:translateX(16px);
}
@media (max-width:1350px){
  .submission-toolbar{
    grid-template-columns:minmax(220px,1fr) 166px repeat(3,minmax(145px,170px)) auto;
  }
}
@media (max-width:1100px){
  .submission-toolbar{
    grid-template-columns:1fr 1fr 1fr;
  }
  .submission-toolbar .admin-search-wrap{
    grid-column:1 / 3;
  }
}
@media (max-width:760px){
  .submission-toolbar{
    grid-template-columns:1fr 1fr;
  }
  .submission-toolbar .admin-search-wrap{
    grid-column:1 / -1;
  }
}
@media (max-width:599px){
  .submission-toolbar{
    grid-template-columns:1fr;
  }
  .submission-toolbar .admin-search-wrap{
    grid-column:auto;
  }
}

/* ==========================================================================\n   M3.4.13 — Submissions open-only control + denser review table\n   ========================================================================== */
.admin-tab-submissions .submission-toolbar{
  display:grid;
  grid-template-columns:minmax(250px,320px) 138px minmax(145px,1fr) minmax(160px,1.05fr) minmax(150px,.95fr) auto;
  gap:8px;
  align-items:center;
}
.admin-tab-submissions .submission-toolbar .admin-search-wrap{
  width:100%;
  min-width:0;
}
.admin-tab-submissions .submission-processed-toggle{
  min-height:40px;
  height:40px;
  padding:0 9px 0 11px;
  border:1px solid #cbdbe7;
  border-radius:9px;
  background:#fff;
  gap:8px;
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
.admin-tab-submissions .submission-processed-toggle.is-active{
  border-color:#8fc5f4;
  background:#eef7ff;
  box-shadow:inset 0 0 0 1px rgba(28,128,224,.08);
}
.admin-tab-submissions .submission-processed-copy{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}
.admin-tab-submissions .submission-processed-copy strong{
  font-size:11px;
  line-height:1;
  color:#173a59;
  white-space:nowrap;
}
.admin-tab-submissions .submission-processed-copy small{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:26px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:#edf1f4;
  color:#6d8192;
  font-size:8px;
  font-weight:850;
  letter-spacing:.05em;
}
.admin-tab-submissions .submission-processed-toggle.is-active .submission-processed-copy small{
  background:#d9efff;
  color:#0b6eb8;
}
.admin-tab-submissions .submission-processed-toggle .admin-switch{
  flex:0 0 auto;
  width:34px;
  height:20px;
}
.admin-tab-submissions .submission-processed-toggle .admin-switch i{
  background:#c8d5df;
  box-shadow:inset 0 0 0 1px rgba(52,81,104,.08);
}
.admin-tab-submissions .submission-processed-toggle .admin-switch input:checked+i{
  background:#2388df;
}
.admin-tab-submissions .submission-processed-toggle .admin-switch i::after{
  width:16px;
  height:16px;
  top:2px;
  left:2px;
}
.admin-tab-submissions .submission-processed-toggle .admin-switch input:checked+i::after{
  transform:translateX(14px);
}
.admin-tab-submissions .submission-columns-btn{
  min-height:40px;
  height:40px;
  padding-left:12px;
  padding-right:12px;
}
.admin-tab-submissions .submission-toolbar select,
.admin-tab-submissions .submission-toolbar input{
  min-height:40px;
  height:40px;
}
.admin-tab-submissions .submission-bulkbar{
  margin-top:7px;
  margin-bottom:7px;
  gap:7px;
}
.admin-tab-submissions .submission-bulkbar .admin-primary-btn,
.admin-tab-submissions .submission-bulkbar .admin-danger-btn{
  min-height:34px;
  padding:7px 12px;
}
/* ~30% denser than the previous 48px submission rows. */
.admin-tab-submissions #subsTable tbody tr{
  height:34px;
  min-height:34px;
}
.admin-tab-submissions #subsTable tbody td{
  height:34px;
  padding-top:3px!important;
  padding-bottom:3px!important;
  line-height:1.05;
}
.admin-tab-submissions #subsTable .submission-submitted-cell{
  white-space:nowrap;
  font-size:9px;
}
.admin-tab-submissions #subsTable .submission-source-chip{
  min-height:20px;
  padding:3px 7px;
  font-size:8px;
}
.admin-tab-submissions #subsTable .ap-badge{
  min-height:20px;
  padding:3px 7px;
  font-size:8px;
}
.admin-tab-submissions #subsTable .submission-more-btn{
  min-height:24px;
  height:24px;
  padding:0 6px;
}
@media (max-width:1280px){
  .admin-tab-submissions .submission-toolbar{
    grid-template-columns:minmax(220px,290px) 132px minmax(135px,1fr) minmax(145px,1fr) minmax(140px,.9fr) auto;
  }
}
@media (max-width:1020px){
  .admin-tab-submissions .submission-toolbar{
    grid-template-columns:minmax(220px,1.4fr) 132px 1fr 1fr;
  }
  .admin-tab-submissions .submission-columns-btn{grid-column:auto;}
}
@media (max-width:760px){
  .admin-tab-submissions .submission-toolbar{grid-template-columns:1fr 132px;}
  .admin-tab-submissions .submission-toolbar .admin-search-wrap{grid-column:1/-1;}
}

/* ==========================================================================\n   M3.4.14 — Submissions operational view + ChestCounter comparison\n   ========================================================================== */
.admin-tab-submissions .submission-kpis{display:none!important;}
.admin-tab-submissions .submission-toolbar-m3414{
  display:grid;
  grid-template-columns:minmax(220px,300px) 124px minmax(150px,1fr) 150px minmax(145px,.8fr) auto;
  gap:7px;
  align-items:center;
  margin-bottom:7px;
}
.admin-tab-submissions .submission-toolbar-m3414 .admin-search-wrap{width:100%;min-width:0;}
.admin-tab-submissions .submission-toolbar-m3414 input,
.admin-tab-submissions .submission-toolbar-m3414 select,
.admin-tab-submissions .submission-toolbar-m3414 button{
  height:38px;
  min-height:38px;
  font-size:12px!important;
  line-height:1.1;
}
.admin-tab-submissions .submission-toolbar-m3414 input,
.admin-tab-submissions .submission-toolbar-m3414 select{padding-top:0;padding-bottom:0;}
.admin-tab-submissions .submission-date-filter{min-width:0;}
.admin-tab-submissions .submission-date-filter input{width:100%;min-width:0;}
.admin-tab-submissions .submission-show-segment{
  height:38px;
  display:grid;
  grid-template-columns:1fr 1fr;
  padding:3px;
  gap:2px;
  border:1px solid #cbdbe7;
  border-radius:8px;
  background:#eef3f7;
  overflow:hidden;
}
.admin-tab-submissions .submission-show-segment button{
  height:30px!important;
  min-height:30px!important;
  padding:0 8px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#627b8e;
  font-weight:750;
  cursor:pointer;
  white-space:nowrap;
}
.admin-tab-submissions .submission-show-segment button.is-active{
  background:#fff;
  color:#153d5e;
  box-shadow:0 1px 3px rgba(20,55,82,.14);
}
.admin-tab-submissions .submission-columns-btn{padding-left:12px;padding-right:12px;white-space:nowrap;}
.admin-tab-submissions .submission-bulkbar{margin:5px 0 6px;}
.admin-tab-submissions #subsTable tbody tr{height:42px;min-height:42px;cursor:pointer;}
.admin-tab-submissions #subsTable tbody td{height:42px;padding-top:4px!important;padding-bottom:4px!important;line-height:1.1;}
.admin-tab-submissions #subsTable tbody tr:hover:not(.is-selected){box-shadow:inset 0 0 0 999px rgba(33,126,196,.025);}
.admin-tab-submissions #subsTable td.submission-percent-cell{
  color:#173a59!important;
  font-weight:500!important;
  white-space:nowrap;
}
.admin-tab-submissions #subsTable td.submission-percent-cell.is-alert{
  color:#d7333f!important;
  font-weight:850!important;
}
.admin-tab-submissions #subsTable td.submission-counter-cell{white-space:nowrap;}
.admin-tab-submissions #subsTable td.submission-counter-cell strong{
  display:block;
  font-size:11px;
  line-height:1.05;
  color:#173a59;
  font-weight:800;
}
.admin-tab-submissions #subsTable td.submission-counter-cell small{
  display:block;
  margin-top:2px;
  color:#72899b;
  font-size:8px;
  line-height:1;
  font-weight:600;
}
.admin-tab-submissions #subsTable td.submission-counter-cell span{font-size:10px;}
.admin-tab-submissions .submission-filter-empty{border:0;border-radius:0;box-shadow:none;padding:28px 16px;}
.admin-tab-submissions .submission-filter-empty .admin-empty-state-icon{width:32px;height:32px;font-size:16px;}
@media (max-width:1240px){
  .admin-tab-submissions .submission-toolbar-m3414{
    grid-template-columns:minmax(190px,260px) 116px minmax(140px,1fr) 145px minmax(135px,.8fr) auto;
  }
}
@media (max-width:980px){
  .admin-tab-submissions .submission-toolbar-m3414{grid-template-columns:1fr 120px 1fr 145px;}
  .admin-tab-submissions .submission-toolbar-m3414 [data-sub-status-filter],
  .admin-tab-submissions .submission-toolbar-m3414 .submission-columns-btn{grid-column:auto;}
}
@media (max-width:700px){
  .admin-tab-submissions .submission-toolbar-m3414{grid-template-columns:1fr 110px;}
  .admin-tab-submissions .submission-toolbar-m3414 .admin-search-wrap{grid-column:1/-1;}
}


/* M3.4.19 — dated scoring versions */
.event-scoring-fields-row.event-scoring-versioned-row{
  grid-template-columns:minmax(0,1.05fr) minmax(0,.75fr) minmax(190px,.8fr);
}
.event-scoring-effective-field small{
  display:block;
  margin-top:5px;
  color:var(--admin-muted,#748aa0);
  font-size:11px;
  font-weight:500;
  line-height:1.25;
}
@media(max-width:1100px){
  .event-scoring-fields-row.event-scoring-versioned-row{grid-template-columns:1fr 1fr}
  .event-scoring-effective-field{grid-column:1/-1}
}
@media(max-width:900px){
  .event-scoring-fields-row.event-scoring-versioned-row{grid-template-columns:1fr}
  .event-scoring-effective-field{grid-column:auto}
}
\n\n/* M3.4.25 - persistent member login */\n.login-remember{display:flex;align-items:center;gap:10px;margin:4px 0 16px;color:#5f7488;font-size:13px;font-weight:600;cursor:pointer;user-select:none}\n.login-remember input{width:17px;height:17px;margin:0;accent-color:#1684e8;cursor:pointer;flex:0 0 auto}\n.login-remember span{line-height:1.25}\n
/* M3.5.0B - Surveys administration */
.survey-admin-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:4px 0 18px}.survey-admin-head h2{margin:2px 0 4px;font-size:28px;color:#153b5f}.survey-admin-head p{margin:0;color:#7890a5;max-width:760px}.survey-admin-kicker{font-size:12px;font-weight:800;letter-spacing:.12em;color:#2a78be}.survey-create-btn{white-space:nowrap;text-decoration:none}.survey-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}.survey-summary-card{background:#fff;border:1px solid #d6e4ef;border-radius:16px;padding:18px 20px;box-shadow:0 8px 22px rgba(22,62,94,.05)}.survey-summary-card span{display:block;font-size:13px;color:#7a91a5;margin-bottom:4px}.survey-summary-card strong{font-size:28px;color:#173f63}.survey-editor-card{padding:22px;margin-bottom:18px}.survey-editor-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.survey-editor-title h3{font-size:24px;margin:3px 0 0;color:#173f63}.survey-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.survey-field{display:flex;flex-direction:column;gap:7px;font-weight:700;color:#274968}.survey-field-wide{grid-column:span 2}.survey-field input,.survey-field textarea,.survey-field select,.survey-options-editor input{width:100%;border:1px solid #c8d9e7;background:#fff;border-radius:10px;padding:11px 12px;color:#173f63;font:inherit;box-sizing:border-box}.survey-field textarea{resize:vertical;min-height:88px}.survey-toggle-row{margin:16px 0 18px}.survey-toggle-row label{display:flex;align-items:flex-start;gap:10px}.survey-toggle-row input{margin-top:4px}.survey-toggle-row span{display:flex;flex-direction:column;gap:2px;color:#244765}.survey-toggle-row small{font-weight:400;color:#7c91a3}.survey-options-editor{display:grid;grid-template-columns:220px repeat(4,minmax(0,1fr));gap:10px;align-items:end;padding-top:18px;border-top:1px solid #e0eaf2}.survey-options-editor>div{display:flex;flex-direction:column;gap:3px;color:#244765}.survey-options-editor small{color:#8194a6}.survey-editor-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.survey-table-card{overflow:hidden}.survey-admin-table td{vertical-align:middle}.survey-status{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:800}.survey-status-active{background:#e1f6e8;color:#1e8b4c}.survey-status-scheduled{background:#e6f1ff;color:#236faf}.survey-status-draft{background:#eef2f5;color:#617689}.survey-status-finished{background:#edf0f3;color:#5d7182}.survey-required-tag{display:block;margin-top:5px;color:#b57a12;font-size:11px;font-weight:700}.survey-row-actions{width:110px}.survey-row-actions form{margin:0}.survey-empty-state{text-align:center;padding:54px 24px}.survey-empty-state h3{margin:12px 0 5px;color:#173f63;font-size:22px}.survey-empty-state p{margin:0 auto 18px;color:#7a90a3;max-width:520px}.survey-empty-icon{display:inline-grid;place-items:center;width:54px;height:54px;border-radius:16px;background:#edf6ff;color:#2679bd}.survey-empty-icon svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:1100px){.survey-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.survey-options-editor{grid-template-columns:1fr 1fr}.survey-options-editor>div{grid-column:1/-1}.survey-summary-grid{grid-template-columns:repeat(3,minmax(150px,1fr))}}
@media(max-width:720px){.survey-admin-head{align-items:stretch;flex-direction:column}.survey-create-btn{text-align:center}.survey-summary-grid{grid-template-columns:1fr}.survey-form-grid{grid-template-columns:1fr}.survey-field-wide{grid-column:auto}.survey-options-editor{grid-template-columns:1fr}.survey-editor-actions{flex-direction:column-reverse}.survey-editor-actions>*{width:100%;text-align:center}}


/* M3.5.0B2 — Surveys admin spacing polish */
.admin-tab-surveys .admin-workspace-inner,
.admin-tab-surveys .admin-content{overflow:visible}
.survey-admin-head{
  align-items:center;
  margin:10px 0 26px;
  min-height:70px;
}
.survey-admin-head>div{min-width:0;padding-right:18px}
.survey-admin-head h2{margin:4px 0 7px}
.survey-admin-head p{line-height:1.45}
.survey-create-btn{align-self:center;flex:0 0 auto;margin:0;position:relative;z-index:1}
.survey-summary-grid{margin-top:2px;margin-bottom:22px;gap:16px}
.survey-summary-card{padding:20px 22px}
.survey-table-card{margin-top:2px}
.survey-admin-table th,.survey-admin-table td{padding-top:14px;padding-bottom:14px}

/* M3.5.0B2 — frontend survey modal */
.survey-frontend-backdrop{
  position:fixed;inset:0;z-index:2147483200;
  display:none;align-items:center;justify-content:center;
  padding:22px;background:rgba(9,31,49,.56);backdrop-filter:blur(7px);
}
.survey-frontend-backdrop.is-open{display:flex}
.survey-frontend-modal{
  width:min(560px,100%);max-height:min(760px,calc(100vh - 44px));overflow:auto;
  background:#fff;border:1px solid rgba(193,213,228,.9);border-radius:22px;
  box-shadow:0 26px 80px rgba(8,35,57,.3);padding:0;
}
.survey-frontend-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:24px 26px 16px;border-bottom:1px solid #e1eaf1}
.survey-frontend-kicker{display:block;color:#2476b8;font-size:11px;font-weight:850;letter-spacing:.13em;margin-bottom:5px}
.survey-frontend-head h2{margin:0;color:#163d60;font-size:26px;line-height:1.15}
.survey-frontend-close{border:0;background:transparent;color:#61798d;font-size:28px;line-height:1;width:36px;height:36px;border-radius:10px;cursor:pointer}
.survey-frontend-close:hover{background:#f1f6fa;color:#173f63}
.survey-frontend-question{margin:0;padding:20px 26px 14px;color:#234866;font-size:17px;line-height:1.5;font-weight:650}
.survey-frontend-form{padding:0 26px 24px}
.survey-answer-list{display:grid;gap:10px}
.survey-answer-option{position:relative;display:flex;align-items:center;gap:12px;min-height:54px;padding:11px 14px;border:1px solid #cfdeea;border-radius:13px;background:#fbfdff;color:#21445f;font-size:15px;font-weight:650;cursor:pointer;transition:.15s ease}
.survey-answer-option:hover{border-color:#8fc2e7;background:#f4faff}
.survey-answer-option:has(input:checked){border-color:#2784ca;background:#edf7ff;box-shadow:0 0 0 2px rgba(39,132,202,.08)}
.survey-answer-option input{position:absolute;opacity:0;pointer-events:none}
.survey-answer-radio{width:20px;height:20px;border:2px solid #9bb3c6;border-radius:50%;background:#fff;box-sizing:border-box;position:relative;flex:0 0 20px}
.survey-answer-option input:checked+.survey-answer-radio{border-color:#167bc2}
.survey-answer-option input:checked+.survey-answer-radio:after{content:"";position:absolute;inset:4px;border-radius:50%;background:#167bc2}
.survey-frontend-meta{margin-top:14px;color:#8297a8;font-size:12px;line-height:1.4}
.survey-frontend-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
.survey-later-btn,.survey-submit-btn{min-height:44px;border-radius:11px;padding:0 18px;font:inherit;font-weight:750;cursor:pointer}
.survey-later-btn{background:#fff;border:1px solid #cbdce8;color:#31536d}
.survey-submit-btn{background:#197bd1;border:1px solid #197bd1;color:#fff;min-width:145px}
.survey-submit-btn:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:720px){
  .survey-admin-head{margin-bottom:20px}.survey-admin-head>div{padding-right:0}
  .survey-frontend-backdrop{align-items:flex-end;padding:12px}
  .survey-frontend-modal{width:100%;border-radius:20px 20px 14px 14px;max-height:88vh}
  .survey-frontend-head{padding:20px 20px 14px}.survey-frontend-question{padding:18px 20px 12px}.survey-frontend-form{padding:0 20px 20px}
  .survey-frontend-actions{flex-direction:column-reverse}.survey-later-btn,.survey-submit-btn{width:100%}
}

/* ========================================================================== */
/* M3.5.0B3 — Surveys admin density / hierarchy polish                        */
/* ========================================================================== */
.admin-tab-surveys .survey-admin-head{
  align-items:center;
  margin:0 0 12px;
  gap:18px;
}
.admin-tab-surveys .survey-admin-head>div{
  padding-right:0;
}
.admin-tab-surveys .survey-admin-kicker{
  font-size:10px;
  letter-spacing:.14em;
}
.admin-tab-surveys .survey-admin-head h2{
  margin:2px 0 3px;
  font-size:24px;
  line-height:1.1;
}
.admin-tab-surveys .survey-admin-head p{
  font-size:12px;
  line-height:1.35;
}
.admin-tab-surveys .survey-create-btn{
  margin-left:auto;
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 15px;
  border-radius:9px;
}
.admin-tab-surveys .survey-summary-grid{
  grid-template-columns:repeat(3,minmax(0,220px));
  justify-content:start;
  gap:10px;
  margin:0 0 14px;
}
.admin-tab-surveys .survey-summary-card{
  min-height:68px;
  padding:11px 14px;
  border-radius:12px;
  box-shadow:0 4px 14px rgba(22,62,94,.035);
}
.admin-tab-surveys .survey-summary-card span{
  margin-bottom:2px;
  font-size:11px;
}
.admin-tab-surveys .survey-summary-card strong{
  font-size:22px;
  line-height:1;
}
.admin-tab-surveys .survey-table-card{
  margin-top:0;
  border-radius:12px;
}
.admin-tab-surveys .survey-admin-table th{
  padding-top:9px;
  padding-bottom:9px;
  font-size:11px;
}
.admin-tab-surveys .survey-admin-table td{
  padding-top:10px;
  padding-bottom:10px;
  font-size:12px;
}
.admin-tab-surveys .survey-status{
  padding:4px 8px;
  font-size:10.5px;
}
.admin-tab-surveys .survey-required-tag{
  margin-top:3px;
  font-size:9.5px;
}
.admin-tab-surveys .admin-cell-note{
  margin-top:2px;
  font-size:10.5px;
}
@media(max-width:900px){
  .admin-tab-surveys .survey-summary-grid{grid-template-columns:repeat(3,1fr);max-width:none}
}
@media(max-width:720px){
  .admin-tab-surveys .survey-admin-head{align-items:stretch}
  .admin-tab-surveys .survey-create-btn{margin-left:0}
  .admin-tab-surveys .survey-summary-grid{grid-template-columns:1fr}
}

/* ========================================================================== */
/* SWORD M3.5.0B5 — frontend survey visual polish                            */
/* ========================================================================== */
.survey-frontend-backdrop{
  padding:28px;
  background:rgba(17,39,59,.58);
  backdrop-filter:blur(7px);
}
.survey-frontend-modal{
  width:min(620px,calc(100vw - 36px));
  max-height:min(84vh,760px);
  overflow:auto;
  border:1px solid rgba(207,222,234,.96);
  border-radius:22px;
  background:#fff;
  box-shadow:0 28px 70px rgba(17,39,59,.28);
}
.survey-frontend-head{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
  padding:23px 26px 19px;
  border-bottom:1px solid #e5edf3;
  background:linear-gradient(180deg,#fbfdff 0%,#f6faff 100%);
}
.survey-frontend-icon{
  display:grid;
  place-items:center;
  flex:0 0 44px;
  width:44px;
  height:44px;
  border:1px solid #cae1f1;
  border-radius:13px;
  background:linear-gradient(180deg,#eef8ff 0%,#e5f3fd 100%);
  color:#1876ba;
  box-shadow:0 6px 16px rgba(32,111,170,.10);
}
.survey-frontend-icon svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.survey-frontend-head-copy{min-width:0}
.survey-frontend-kicker{
  margin:0 0 4px;
  color:#2a75b6;
  font-size:10.5px;
  font-weight:850;
  letter-spacing:.14em;
}
.survey-frontend-head h2{
  margin:0;
  color:#173f63;
  font-size:27px;
  line-height:1.12;
  letter-spacing:-.02em;
}
.survey-frontend-body{padding:22px 26px 24px}
.survey-frontend-question{
  margin:0 0 16px;
  padding:0;
  color:#244765;
  font-size:17px;
  line-height:1.45;
  font-weight:750;
}
.survey-frontend-form{padding:0}
.survey-answer-list{display:grid;gap:10px}
.survey-answer-option{
  min-height:58px;
  padding:12px 15px;
  border:1px solid #cfdeea;
  border-radius:14px;
  background:#fbfdff;
  color:#21445f;
  font-size:15px;
  font-weight:700;
  box-shadow:0 2px 8px rgba(38,75,107,.025);
  transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
.survey-answer-option:hover{
  border-color:#9cc8e6;
  background:#f6fbff;
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(38,91,133,.06);
}
.survey-answer-option:has(input:checked){
  border-color:#2b86c9;
  background:#eef8ff;
  box-shadow:0 0 0 2px rgba(43,134,201,.08),0 7px 18px rgba(39,108,160,.08);
}
.survey-answer-radio{
  width:21px;
  height:21px;
  flex:0 0 21px;
  border-color:#9eb6c8;
}
.survey-answer-option input:checked+.survey-answer-radio{border-color:#177cc1}
.survey-answer-option input:checked+.survey-answer-radio:after{inset:4px;background:#177cc1}
.survey-answer-label{display:block;min-width:0}
.survey-frontend-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:20px;
}
.survey-submit-btn{
  min-width:156px;
  min-height:46px;
  padding:0 22px;
  border-radius:11px;
  border:1px solid #1a7bc8;
  background:linear-gradient(180deg,#2588d6 0%,#1778c6 100%);
  color:#fff;
  font:inherit;
  font-weight:800;
  box-shadow:0 7px 18px rgba(24,117,189,.18);
  cursor:pointer;
}
.survey-submit-btn:hover:not(:disabled){
  background:linear-gradient(180deg,#1f82cf 0%,#136fb8 100%);
}
.survey-submit-btn:disabled{
  opacity:.42;
  box-shadow:none;
  cursor:not-allowed;
}
.survey-remind-form{
  margin:10px 0 0;
  text-align:right;
}
.survey-remind-link{
  padding:3px 1px;
  border:0;
  background:transparent;
  color:#8094a5;
  font:inherit;
  font-size:11px;
  font-weight:650;
  text-decoration:none;
  cursor:pointer;
}
.survey-remind-link:hover,
.survey-remind-link:focus-visible{
  color:#2b6f9f;
  text-decoration:underline;
}
@media(max-width:720px){
  .survey-frontend-backdrop{align-items:flex-end;padding:10px}
  .survey-frontend-modal{width:100%;max-height:90vh;border-radius:20px 20px 14px 14px}
  .survey-frontend-head{padding:19px 19px 15px}
  .survey-frontend-icon{width:40px;height:40px;flex-basis:40px;border-radius:12px}
  .survey-frontend-head h2{font-size:23px}
  .survey-frontend-body{padding:18px 19px 20px}
  .survey-frontend-question{font-size:16px}
  .survey-frontend-actions{margin-top:16px}
  .survey-submit-btn{width:100%}
  .survey-remind-form{text-align:center;margin-top:9px}
}

/* ========================================================================== */
/* ========================================================================== */
/* SWORD M3.5.0B7 — survey modal aligned with approved compact plan          */
/* Scoped to .survey-medieval so no other portal modal/layout is affected.   */
/* ========================================================================== */
.survey-frontend-backdrop{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:26px;
  background:rgba(11,29,46,.54);
  backdrop-filter:blur(7px) saturate(.82);
}
.survey-frontend-modal.survey-medieval{
  position:relative;
  width:min(760px,calc(100vw - 120px));
  max-height:min(84vh,760px);
  overflow:visible;
  isolation:isolate;
  border:1px solid rgba(182,141,71,.78);
  border-radius:18px;
  background:
    radial-gradient(circle at 84% 26%,rgba(214,198,160,.14) 0 15%,transparent 35%),
    linear-gradient(180deg,#fdfbf6 0%,#f7f2e7 100%);
  box-shadow:
    0 28px 72px rgba(7,23,38,.34),
    0 0 0 3px rgba(17,51,80,.18),
    inset 0 0 0 1px rgba(255,255,255,.78);
}
.survey-frontend-modal.survey-medieval:before{
  content:"";
  position:absolute;
  inset:10px;
  z-index:-2;
  pointer-events:none;
  border:1px solid rgba(163,126,60,.34);
  border-radius:13px;
}
.survey-frontend-modal.survey-medieval:after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  top:10px;
  height:48px;
  z-index:-1;
  border-radius:13px 13px 0 0;
  border:1px solid rgba(183,147,80,.44);
  border-bottom-color:rgba(18,44,68,.55);
  background:
    linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,0) 34%),
    linear-gradient(180deg,#214f7e 0%,#163c62 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}
.survey-medieval-corner{
  position:absolute;
  z-index:4;
  width:118px;
  height:118px;
  background-repeat:no-repeat;
  background-size:contain;
  pointer-events:none;
  opacity:.92;
}
.survey-medieval-corner-tl{top:-8px;left:-8px;background-image:url('../images/survey-medieval/02_top_left_corner.webp');background-position:left top}
.survey-medieval-corner-tr{top:-8px;right:-8px;background-image:url('../images/survey-medieval/03_top_right_corner.webp');background-position:right top}
.survey-medieval-corner-bl{bottom:-8px;left:-8px;background-image:url('../images/survey-medieval/04_bottom_left_corner.webp');background-position:left bottom}
.survey-medieval-corner-br{bottom:-8px;right:-8px;background-image:url('../images/survey-medieval/05_bottom_right_corner.webp');background-position:right bottom}
.survey-medieval-crest{
  position:absolute;
  top:-40px;
  left:0;
  right:0;
  height:118px;
  display:grid;
  place-items:start center;
  pointer-events:none;
  z-index:5;
}
.survey-medieval-header-ornament{
  position:absolute;
  top:34px;
  left:50%;
  width:min(630px,82%);
  height:52px;
  object-fit:fill;
  transform:translateX(-50%);
  opacity:.95;
}
.survey-medieval-logo{
  position:relative;
  z-index:2;
  width:118px;
  height:118px;
  object-fit:contain;
  filter:drop-shadow(0 10px 14px rgba(16,35,52,.22));
}
.survey-medieval .survey-frontend-head{
  position:relative;
  display:block;
  padding:88px 68px 0;
  border:0;
  background:transparent;
  text-align:center;
}
.survey-medieval .survey-frontend-head-copy{min-width:0}
.survey-medieval .survey-frontend-kicker{
  display:block;
  margin:0 0 6px;
  color:#58748c;
  font-size:10px;
  font-weight:900;
  letter-spacing:.27em;
}
.survey-medieval .survey-frontend-head h2{
  margin:0;
  color:#173c62;
  font-family:Georgia,'Times New Roman',serif;
  font-size:33px;
  line-height:1.04;
  font-weight:800;
  letter-spacing:-.02em;
  text-shadow:0 1px 0 rgba(255,255,255,.9);
}
.survey-medieval-close{
  position:absolute;
  top:10px;
  right:16px;
  z-index:6;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  padding:0;
  border:2px solid #b89257;
  border-radius:50%;
  background:linear-gradient(180deg,#2b6096 0%,#163d66 100%);
  color:#f8ead0;
  font-family:Georgia,'Times New Roman',serif;
  font-size:28px;
  line-height:1;
  box-shadow:0 5px 12px rgba(13,31,49,.18),inset 0 0 0 1px rgba(255,255,255,.12);
  cursor:pointer;
}
.survey-medieval-close:hover,
.survey-medieval-close:focus-visible{filter:brightness(1.08)}
.survey-medieval-divider{
  display:block;
  width:min(520px,66%);
  height:28px;
  object-fit:fill;
  margin:8px auto 2px;
  opacity:.8;
}
.survey-medieval .survey-frontend-body{
  position:relative;
  z-index:3;
  padding:8px 48px 34px;
}
.survey-medieval .survey-frontend-question{
  margin:6px 0 18px;
  padding:0;
  color:#173b5d;
  font-family:Georgia,'Times New Roman',serif;
  font-size:24px;
  line-height:1.24;
  font-weight:800;
}
.survey-medieval .survey-frontend-form{padding:0}
.survey-medieval .survey-answer-list{display:grid;gap:10px}
.survey-medieval .survey-answer-option{
  position:relative;
  min-height:58px;
  padding:11px 46px 11px 18px;
  border:1px solid #b9c9d5;
  border-radius:8px;
  background:linear-gradient(180deg,rgba(255,255,255,.95) 0%,rgba(247,244,236,.93) 100%);
  color:#193b59;
  font-family:Georgia,'Times New Roman',serif;
  font-size:17px;
  font-weight:750;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.88),0 2px 6px rgba(27,60,88,.04);
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease,transform .15s ease;
}
.survey-medieval .survey-answer-option:before,
.survey-medieval .survey-answer-option:after{
  content:"";
  position:absolute;
  top:50%;
  width:4px;
  height:4px;
  background:#b39158;
  transform:translateY(-50%) rotate(45deg);
  opacity:.72;
}
.survey-medieval .survey-answer-option:before{left:8px}
.survey-medieval .survey-answer-option:after{right:8px}
.survey-medieval .survey-answer-option:hover{
  border-color:#9f7d45;
  background:linear-gradient(180deg,#fffdf7 0%,#f8f0df 100%);
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(74,60,39,.07),inset 0 0 0 1px rgba(255,255,255,.9);
}
.survey-medieval .survey-answer-option:has(input:checked){
  border-color:#a8792e;
  background:linear-gradient(180deg,#fff9e9 0%,#f3e5c8 100%);
  box-shadow:0 0 0 2px rgba(174,126,48,.10),0 7px 18px rgba(61,48,30,.08);
}
.survey-medieval .survey-answer-radio{
  width:22px;
  height:22px;
  flex:0 0 22px;
  border:2px solid #9aaebe;
  background:linear-gradient(180deg,#fff 0%,#eef3f6 100%);
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.74);
}
.survey-medieval .survey-answer-option input:checked+.survey-answer-radio{
  border-color:#a67729;
  background:#173f67;
  box-shadow:inset 0 0 0 3px #f7ebcc,0 0 0 1px rgba(104,75,31,.18);
}
.survey-medieval .survey-answer-option input:checked+.survey-answer-radio:after{display:none}
.survey-medieval .survey-answer-label{display:block;min-width:0}
.survey-answer-mark{
  position:absolute;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  color:#b79964;
  font-size:13px;
  opacity:.52;
}
.survey-medieval-footer{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid rgba(167,135,82,.30);
}
.survey-medieval-footer:before{
  content:"";
  position:absolute;
  top:-4px;
  left:50%;
  width:8px;
  height:8px;
  background:#b2905b;
  transform:translateX(-50%) rotate(45deg);
  box-shadow:0 0 0 2px #f7f2e7;
}
.survey-medieval .survey-submit-btn{
  min-width:210px;
  min-height:52px;
  padding:0 34px 2px;
  border:0;
  border-radius:0;
  background-color:transparent;
  background-image:url('../images/survey-medieval/07_cta_button_frame.webp');
  background-position:center;
  background-repeat:no-repeat;
  background-size:100% 100%;
  color:#fff7e8;
  font-family:Georgia,'Times New Roman',serif;
  font-size:17px;
  font-weight:800;
  text-shadow:0 1px 2px rgba(0,0,0,.55);
  box-shadow:none;
  cursor:pointer;
  transition:transform .15s ease,filter .15s ease,opacity .15s ease;
}
.survey-medieval .survey-submit-btn:hover:not(:disabled){
  background-color:transparent;
  transform:translateY(-1px);
  filter:brightness(1.08) saturate(1.04);
}
.survey-medieval .survey-submit-btn:disabled{
  opacity:.46;
  filter:grayscale(.35) saturate(.72);
  cursor:not-allowed;
}
.survey-medieval .survey-remind-link{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:6px 2px;
  border:0;
  background:transparent;
  color:#6d8090;
  font:inherit;
  font-size:12px;
  font-weight:750;
  text-decoration:underline;
  text-decoration-color:rgba(109,128,144,.44);
  text-underline-offset:4px;
  cursor:pointer;
}
.survey-medieval .survey-remind-link:hover,
.survey-medieval .survey-remind-link:focus-visible{
  color:#2b648e;
  text-decoration-color:#2b648e;
}
.survey-remind-hourglass{font-size:13px;line-height:1}

@media(max-width:760px){
  .survey-frontend-backdrop{align-items:flex-end;padding:10px}
  .survey-frontend-modal.survey-medieval{width:100%;max-height:92vh;border-radius:18px 18px 12px 12px;overflow:auto}
  .survey-medieval-corner{width:88px;height:88px;opacity:.72}
  .survey-medieval-crest{top:-32px;height:98px}
  .survey-medieval-header-ornament{height:42px;width:90%;top:28px}
  .survey-medieval-logo{width:96px;height:96px}
  .survey-medieval .survey-frontend-head{padding:72px 20px 0}
  .survey-medieval .survey-frontend-kicker{font-size:9px;letter-spacing:.22em}
  .survey-medieval .survey-frontend-head h2{font-size:27px}
  .survey-medieval-close{top:8px;right:12px;width:34px;height:34px;font-size:26px}
  .survey-medieval-divider{width:78%;height:24px;margin:6px auto 2px}
  .survey-medieval .survey-frontend-body{padding:8px 20px 24px}
  .survey-medieval .survey-frontend-question{font-size:20px;margin-bottom:14px}
  .survey-medieval .survey-answer-option{min-height:54px;padding:10px 38px 10px 15px;font-size:16px}
  .survey-medieval .survey-answer-radio{width:20px;height:20px;flex-basis:20px}
  .survey-medieval-footer{flex-direction:column-reverse;align-items:stretch;gap:8px;margin-top:16px;padding-top:14px}
  .survey-medieval .survey-submit-btn{width:100%;min-width:0;min-height:50px}
  .survey-medieval .survey-remind-link{align-self:center}
}

/* ========================================================================== */
/* SWORD M3.5.0B8 — survey approved-plan proportion / palette refinement      */
/* ========================================================================== */
.survey-frontend-backdrop{
  padding:22px;
  background:rgba(15,31,48,.44);
  backdrop-filter:blur(6px) saturate(.85);
}
.survey-frontend-modal.survey-medieval{
  width:min(680px,calc(100vw - 120px));
  max-height:min(82vh,690px);
  border-color:rgba(171,132,66,.72);
  border-radius:16px;
  background:
    radial-gradient(circle at 76% 30%,rgba(190,160,105,.08),transparent 38%),
    linear-gradient(180deg,#f8f3e9 0%,#f2eadc 100%);
  box-shadow:
    0 24px 64px rgba(7,23,38,.31),
    0 0 0 2px rgba(17,51,80,.15),
    inset 0 0 0 1px rgba(255,255,255,.64);
}
.survey-frontend-modal.survey-medieval:before{
  inset:9px;
  border-color:rgba(154,117,54,.27);
  border-radius:12px;
}
.survey-frontend-modal.survey-medieval:after{
  left:9px;
  right:9px;
  top:9px;
  height:50px;
  border-radius:12px 12px 0 0;
  background:
    linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,0) 34%),
    linear-gradient(180deg,#244f78 0%,#173b60 100%);
}
.survey-medieval-corner{width:102px;height:102px;opacity:.84}
.survey-medieval-corner-tl{top:-7px;left:-7px}
.survey-medieval-corner-tr{top:-7px;right:-7px}
.survey-medieval-corner-bl{bottom:-7px;left:-7px}
.survey-medieval-corner-br{bottom:-7px;right:-7px}
.survey-medieval-crest{top:-35px;height:106px}
.survey-medieval-header-ornament{top:31px;width:min(555px,82%);height:45px;opacity:.90}
.survey-medieval-logo{width:104px;height:104px;filter:drop-shadow(0 8px 12px rgba(16,35,52,.20))}
.survey-medieval .survey-frontend-head{padding:76px 58px 0}
.survey-medieval .survey-frontend-kicker{margin-bottom:5px;font-size:10px;letter-spacing:.25em}
.survey-medieval .survey-frontend-head h2{font-size:31px;line-height:1.03}
.survey-medieval-close{top:9px;right:14px;width:34px;height:34px;font-size:25px}
.survey-medieval-divider{width:55%;height:22px;margin:7px auto 10px;opacity:.76}
.survey-medieval .survey-frontend-body{padding:0 42px 24px}
.survey-medieval .survey-frontend-question{margin:0 0 16px;font-size:22px;line-height:1.22}
.survey-medieval .survey-answer-list{gap:12px}
.survey-medieval .survey-answer-option{
  min-height:60px;
  padding:10px 42px 10px 16px;
  border-color:#b9c3c8;
  border-radius:7px;
  background:linear-gradient(180deg,rgba(255,253,248,.94),rgba(242,235,224,.92));
  font-size:17px;
}
.survey-medieval .survey-answer-option:hover{
  border-color:#a98952;
  background:linear-gradient(180deg,#fcf7ec 0%,#efe4d1 100%);
}
.survey-medieval .survey-answer-option:has(input:checked){
  border-color:#a8792e;
  background:linear-gradient(180deg,#fbf2dc 0%,#ead9b9 100%);
}
.survey-medieval .survey-answer-radio{width:21px;height:21px;flex-basis:21px}
.survey-medieval .survey-answer-option input:checked+.survey-answer-radio{
  border-color:#a67729;
  background:#173f67;
  box-shadow:inset 0 0 0 3px #f4e5bd,0 0 0 1px rgba(104,75,31,.20);
}
.survey-answer-mark{right:16px;font-size:12px;opacity:.46}
.survey-medieval-footer{margin-top:16px;padding-top:14px;gap:16px}
.survey-medieval .survey-submit-btn{min-width:200px;min-height:50px;padding:0 32px 2px;font-size:16px}
.survey-medieval .survey-submit-btn:disabled{opacity:.56;filter:grayscale(.18) saturate(.62) brightness(.95)}
.survey-medieval .survey-remind-link{font-size:11.5px}

@media(max-width:760px){
  .survey-frontend-backdrop{padding:10px}
  .survey-frontend-modal.survey-medieval{width:100%;max-height:91vh}
  .survey-medieval-corner{width:82px;height:82px}
  .survey-medieval-crest{top:-29px;height:90px}
  .survey-medieval-header-ornament{top:26px;height:38px;width:88%}
  .survey-medieval-logo{width:88px;height:88px}
  .survey-medieval .survey-frontend-head{padding:65px 20px 0}
  .survey-medieval .survey-frontend-head h2{font-size:26px}
  .survey-medieval-divider{width:65%;height:20px;margin:6px auto 8px}
  .survey-medieval .survey-frontend-body{padding:0 18px 22px}
  .survey-medieval .survey-frontend-question{font-size:19px;margin-bottom:13px}
  .survey-medieval .survey-answer-option{min-height:54px;font-size:16px}
}

/* ========================================================================== */
/* SWORD M3.5.0B9 — survey concept refinement toward approved reference       */
/* ========================================================================== */
.survey-frontend-backdrop{
  padding:20px;
  background:rgba(15,31,48,.42);
  backdrop-filter:blur(6px) saturate(.88);
}
.survey-frontend-modal.survey-medieval{
  width:min(666px,calc(100vw - 118px));
  max-height:min(81vh,676px);
  border-color:rgba(167,128,64,.74);
  background:
    radial-gradient(circle at 75% 30%,rgba(190,160,105,.09),transparent 34%),
    radial-gradient(circle at 24% 10%,rgba(255,255,255,.38),transparent 22%),
    repeating-linear-gradient(0deg,rgba(129,108,73,.025) 0 2px,rgba(255,255,255,0) 2px 7px),
    linear-gradient(180deg,#f7f1e5 0%,#f1e9db 100%);
  box-shadow:
    0 24px 60px rgba(7,23,38,.29),
    0 0 0 2px rgba(17,51,80,.14),
    inset 0 0 0 1px rgba(255,255,255,.58);
}
.survey-frontend-modal.survey-medieval:before{
  inset:8px;
  border-color:rgba(152,117,55,.24);
}
.survey-frontend-modal.survey-medieval:after{
  left:8px;
  right:8px;
  top:8px;
  height:47px;
  border-radius:12px 12px 0 0;
  background-image:
    linear-gradient(135deg,rgba(255,255,255,.06) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.06) 50%,rgba(255,255,255,.06) 75%,transparent 75%,transparent),
    linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,0) 34%),
    linear-gradient(180deg,#21486f 0%,#173d61 100%);
  background-size:16px 16px,100% 100%,100% 100%;
}
.survey-medieval-corner{width:96px;height:96px;opacity:.82}
.survey-medieval-crest{top:-34px;height:100px}
.survey-medieval-header-ornament{top:30px;width:min(470px,69%);height:40px;opacity:.9}
.survey-medieval-logo{width:100px;height:100px;filter:drop-shadow(0 7px 11px rgba(16,35,52,.20))}
.survey-medieval .survey-frontend-head{padding:74px 54px 0}
.survey-medieval .survey-frontend-kicker{font-size:9.8px;letter-spacing:.26em;color:#587188}
.survey-medieval .survey-frontend-head h2{font-size:30px;line-height:1.02;letter-spacing:-.022em}
.survey-medieval-close{top:8px;right:13px;width:33px;height:33px;font-size:24px}
.survey-medieval-divider{width:49%;height:20px;margin:6px auto 9px;opacity:.75}
.survey-medieval .survey-frontend-body{padding:0 38px 22px;position:relative;overflow:hidden}
.survey-medieval-watermark{
  position:absolute;
  right:16px;
  top:-8px;
  width:180px;
  height:250px;
  background:url('../images/survey-medieval/08_watermark_heraldic.svg') center/contain no-repeat;
  opacity:.065;
  pointer-events:none;
  z-index:0;
}
.survey-medieval .survey-frontend-question,
.survey-medieval .survey-frontend-form{position:relative;z-index:1}
.survey-medieval .survey-frontend-question{margin:0 0 14px;font-size:21px;line-height:1.2}
.survey-medieval .survey-answer-list{gap:10px}
.survey-medieval .survey-answer-option{
  min-height:56px;
  padding:10px 42px 10px 14px;
  border-color:#b4c1ca;
  border-radius:0;
  clip-path:polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px);
  background:
    linear-gradient(180deg,rgba(255,255,255,.62),rgba(255,255,255,0) 35%),
    linear-gradient(180deg,rgba(255,253,248,.94),rgba(241,234,223,.92));
  box-shadow:inset 0 0 0 1px rgba(242,247,251,.9),0 1px 4px rgba(34,58,83,.04);
}
.survey-medieval .survey-answer-option:before,
.survey-medieval .survey-answer-option:after{width:5px;height:5px;background:#c2a56e;opacity:.8}
.survey-medieval .survey-answer-option:hover{
  border-color:#a3834b;
  background:
    linear-gradient(180deg,rgba(255,255,255,.58),rgba(255,255,255,0) 35%),
    linear-gradient(180deg,#fcf7ed 0%,#eee2cf 100%);
}
.survey-medieval .survey-answer-option:has(input:checked){
  border-color:#a67729;
  background:
    linear-gradient(180deg,rgba(255,255,255,.50),rgba(255,255,255,0) 35%),
    linear-gradient(180deg,#f9efd8 0%,#e9d7b6 100%);
}
.survey-medieval .survey-answer-radio{width:20px;height:20px;flex-basis:20px;border-color:#91a8ba;background:linear-gradient(180deg,#fff,#edf2f6)}
.survey-medieval .survey-answer-option input:checked+.survey-answer-radio{box-shadow:inset 0 0 0 3px #f6e8c4,0 0 0 1px rgba(104,75,31,.18)}
.survey-answer-mark{right:14px;font-size:20px;opacity:.13;color:#a58b58}
.survey-medieval-footer{margin-top:14px;padding-top:13px;gap:14px}
.survey-medieval .survey-submit-btn{min-width:196px;min-height:48px;padding:0 30px 2px;font-size:15px}
.survey-medieval .survey-submit-btn:disabled{opacity:.58;filter:grayscale(.12) saturate(.74) brightness(.96)}
.survey-medieval .survey-remind-link{font-size:11px}

@media(max-width:760px){
  .survey-frontend-modal.survey-medieval{width:100%;max-height:91vh}
  .survey-medieval-corner{width:80px;height:80px}
  .survey-medieval-crest{top:-29px;height:88px}
  .survey-medieval-header-ornament{top:26px;width:80%;height:34px}
  .survey-medieval-logo{width:88px;height:88px}
  .survey-medieval .survey-frontend-head{padding:64px 18px 0}
  .survey-medieval .survey-frontend-head h2{font-size:26px}
  .survey-medieval-divider{width:60%;height:18px;margin:5px auto 8px}
  .survey-medieval .survey-frontend-body{padding:0 17px 20px}
  .survey-medieval-watermark{width:130px;height:190px;right:8px;top:10px}
  .survey-medieval .survey-frontend-question{font-size:19px;margin-bottom:12px}
  .survey-medieval .survey-answer-option{min-height:52px;font-size:15.5px}
  .survey-answer-mark{font-size:18px}
}

/* ========================================================================== */
/* SWORD M3.5.0B10 — compact 500×330 survey modal                            */
/* ========================================================================== */
.survey-frontend-backdrop{
  padding:16px;
  background:rgba(15,31,48,.42);
  backdrop-filter:blur(5.5px) saturate(.88);
}
.survey-frontend-modal.survey-medieval{
  width:min(500px,calc(100vw - 32px));
  min-height:0;
  max-height:min(90vh,360px);
  border-radius:14px;
  overflow:visible;
  background:
    radial-gradient(circle at 78% 28%,rgba(190,160,105,.07),transparent 34%),
    radial-gradient(circle at 24% 8%,rgba(255,255,255,.30),transparent 22%),
    linear-gradient(180deg,#f8f2e7 0%,#f1e8d8 100%);
  box-shadow:
    0 20px 48px rgba(7,23,38,.28),
    0 0 0 2px rgba(17,51,80,.13),
    inset 0 0 0 1px rgba(255,255,255,.55);
}
.survey-frontend-modal.survey-medieval:before{
  inset:7px;
  border-radius:10px;
  border-color:rgba(152,117,55,.23);
}
.survey-frontend-modal.survey-medieval:after{
  left:7px;
  right:7px;
  top:7px;
  height:40px;
  border-radius:10px 10px 0 0;
  background-image:
    linear-gradient(135deg,rgba(255,255,255,.05) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.05) 50%,rgba(255,255,255,.05) 75%,transparent 75%,transparent),
    linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,0) 34%),
    linear-gradient(180deg,#21486f 0%,#173d61 100%);
  background-size:14px 14px,100% 100%,100% 100%;
}
.survey-medieval-corner{width:74px;height:74px;opacity:.78}
.survey-medieval-corner-tl{top:-5px;left:-5px}
.survey-medieval-corner-tr{top:-5px;right:-5px}
.survey-medieval-corner-bl{bottom:-5px;left:-5px}
.survey-medieval-corner-br{bottom:-5px;right:-5px}
.survey-medieval-crest{
  top:-40px;
  height:88px;
}
.survey-medieval-header-ornament{
  top:39px;
  width:min(350px,70%);
  height:26px;
  opacity:.9;
}
.survey-medieval-logo{
  width:86px;
  height:86px;
  filter:drop-shadow(0 6px 9px rgba(16,35,52,.18));
}
.survey-medieval .survey-frontend-head{
  padding:52px 42px 0;
}
.survey-medieval .survey-frontend-kicker{
  margin-bottom:3px;
  font-size:8.5px;
  letter-spacing:.23em;
}
.survey-medieval .survey-frontend-head h2{
  font-size:25px;
  line-height:1;
  letter-spacing:-.02em;
}
.survey-medieval-close{
  top:7px;
  right:10px;
  width:29px;
  height:29px;
  font-size:21px;
  border-width:1px;
}
.survey-medieval-divider{
  width:52%;
  height:15px;
  margin:4px auto 7px;
  opacity:.74;
}
.survey-medieval .survey-frontend-body{
  padding:0 24px 16px;
  overflow:hidden;
}
.survey-medieval-watermark{
  right:7px;
  top:6px;
  width:116px;
  height:150px;
  opacity:.035;
}
.survey-medieval .survey-frontend-question{
  margin:0 0 10px;
  font-size:18px;
  line-height:1.15;
}
.survey-medieval .survey-answer-list{gap:7px}
.survey-medieval .survey-answer-option{
  min-height:44px;
  padding:7px 34px 7px 12px;
  font-size:15px;
  clip-path:polygon(9px 0,calc(100% - 9px) 0,100% 9px,100% calc(100% - 9px),calc(100% - 9px) 100%,9px 100%,0 calc(100% - 9px),0 9px);
}
.survey-medieval .survey-answer-option:before,
.survey-medieval .survey-answer-option:after{width:4px;height:4px}
.survey-medieval .survey-answer-radio{
  width:18px;
  height:18px;
  flex-basis:18px;
  border-width:2px;
}
.survey-medieval .survey-answer-option input:checked+.survey-answer-radio{
  box-shadow:inset 0 0 0 2px #f6e8c4,0 0 0 1px rgba(104,75,31,.18);
}
.survey-answer-mark{right:11px;font-size:13px;opacity:.16}
.survey-medieval-footer{
  margin-top:10px;
  padding-top:10px;
  gap:10px;
}
.survey-medieval-footer:before{
  top:-3px;
  width:6px;
  height:6px;
}
.survey-medieval .survey-submit-btn{
  min-width:164px;
  min-height:43px;
  padding:0 24px 2px;
  font-size:14px;
}
.survey-medieval .survey-submit-btn:disabled{
  opacity:.58;
  filter:grayscale(.08) saturate(.76) brightness(.97);
}
.survey-medieval .survey-remind-link{
  gap:5px;
  padding:4px 1px;
  font-size:10.5px;
}
.survey-remind-hourglass{font-size:11px}

@media(max-width:560px){
  .survey-frontend-backdrop{padding:10px}
  .survey-frontend-modal.survey-medieval{width:calc(100vw - 20px);max-height:92vh;overflow:auto}
  .survey-medieval-corner{width:64px;height:64px}
  .survey-medieval-crest{top:-34px;height:78px}
  .survey-medieval-header-ornament{top:34px;width:72%;height:23px}
  .survey-medieval-logo{width:76px;height:76px}
  .survey-medieval .survey-frontend-head{padding:46px 18px 0}
  .survey-medieval .survey-frontend-head h2{font-size:23px}
  .survey-medieval-divider{width:58%;height:14px;margin:4px auto 6px}
  .survey-medieval .survey-frontend-body{padding:0 15px 14px}
  .survey-medieval-watermark{width:92px;height:124px}
  .survey-medieval .survey-frontend-question{font-size:17px;margin-bottom:9px}
  .survey-medieval .survey-answer-option{min-height:43px;font-size:14.5px}
  .survey-medieval-footer{margin-top:9px;padding-top:9px}
  .survey-medieval .survey-submit-btn{min-width:150px;min-height:42px}
}

/* ========================================================================== */
/* SWORD M3.5.0B11 — final compact survey refinement                         */
/* ========================================================================== */
.survey-frontend-backdrop{
  padding:16px;
  background:rgba(15,31,48,.40);
  backdrop-filter:blur(5px) saturate(.88);
}
.survey-frontend-modal.survey-medieval{
  width:min(500px,calc(100vw - 32px));
  min-height:0;
  max-height:min(90vh,330px);
  border-radius:14px;
  overflow:visible;
  background:
    radial-gradient(circle at 76% 26%,rgba(190,160,105,.06),transparent 34%),
    linear-gradient(180deg,#f8f2e7 0%,#f1e8d8 100%);
}
.survey-frontend-modal.survey-medieval:before{
  inset:7px;
  border-radius:10px;
  border-color:rgba(152,117,55,.22);
}
.survey-frontend-modal.survey-medieval:after{
  left:7px;
  right:7px;
  top:7px;
  height:34px;
  border-radius:10px 10px 0 0;
  background-image:
    linear-gradient(135deg,rgba(255,255,255,.035) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.035) 50%,rgba(255,255,255,.035) 75%,transparent 75%,transparent),
    linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,0) 34%),
    linear-gradient(180deg,#21486f 0%,#173d61 100%);
  background-size:14px 14px,100% 100%,100% 100%;
}
.survey-medieval-corner{opacity:.78}
.survey-medieval-corner-tl{top:-10px;left:-9px;width:72px;height:72px}
.survey-medieval-corner-tr{top:-10px;right:-9px;width:72px;height:72px}
.survey-medieval-corner-bl{bottom:-6px;left:-6px;width:68px;height:68px}
.survey-medieval-corner-br{bottom:-6px;right:-6px;width:68px;height:68px}
.survey-medieval-crest{
  top:-34px;
  height:78px;
}
.survey-medieval-header-ornament{
  top:26px;
  width:min(340px,68%);
  height:24px;
  opacity:.88;
}
.survey-medieval-logo{
  width:76px;
  height:76px;
  filter:drop-shadow(0 5px 8px rgba(16,35,52,.17));
}
.survey-medieval .survey-frontend-head{
  padding:48px 38px 0;
}
.survey-medieval .survey-frontend-kicker{
  margin-bottom:2px;
  font-size:8px;
  letter-spacing:.24em;
  color:#5a7185;
}
.survey-medieval .survey-frontend-head h2{
  font-size:22px;
  line-height:1;
  margin:0;
}
.survey-medieval-close{
  top:5px;
  right:8px;
  width:28px;
  height:28px;
  font-size:20px;
  border-width:1px;
}
.survey-medieval-divider{
  display:block;
  position:relative;
  width:210px;
  height:8px;
  margin:3px auto 6px;
  background:none!important;
  opacity:1;
}
.survey-medieval-divider::before{
  content:"";
  position:absolute;
  top:50%;
  left:0;
  right:0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(170,132,70,.42) 18%,rgba(170,132,70,.72) 50%,rgba(170,132,70,.42) 82%,transparent);
}
.survey-medieval-divider::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:5px;
  height:5px;
  background:#b58b49;
  transform:translate(-50%,-50%) rotate(45deg);
  box-shadow:0 0 0 2px #f4ecdd;
}
.survey-medieval .survey-frontend-body{
  padding:0 24px 14px;
  overflow:hidden;
}
.survey-medieval-watermark{
  width:90px;
  height:125px;
  right:8px;
  top:24px;
  opacity:.018;
}
.survey-medieval .survey-frontend-question{
  margin:0 0 9px;
  font-size:16px;
  line-height:1.15;
}
.survey-medieval .survey-answer-list{gap:7px}
.survey-medieval .survey-answer-option{
  min-height:40px;
  padding:7px 34px 7px 11px;
  font-size:14.5px;
  clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px),0 8px);
}
.survey-medieval .survey-answer-option:has(input:checked){
  border-color:#a8792e;
  background:linear-gradient(180deg,#fbf6e9 0%,#f4ead7 100%);
}
.survey-medieval .survey-answer-radio{
  width:17px;
  height:17px;
  flex-basis:17px;
}
.survey-medieval .survey-answer-option input:checked+.survey-answer-radio{
  box-shadow:inset 0 0 0 2px #f6e8c4,0 0 0 1px rgba(104,75,31,.16);
}
.survey-answer-mark{
  right:10px;
  font-size:11px;
  opacity:.10;
}
.survey-medieval-footer{
  align-items:center;
  margin-top:9px;
  padding-top:9px;
  gap:10px;
}
.survey-medieval-footer:before{
  top:-3px;
  width:5px;
  height:5px;
}
.survey-medieval .survey-remind-link{
  gap:4px;
  padding:3px 0;
  font-size:10px;
}
.survey-remind-hourglass{font-size:10px}
.survey-medieval .survey-submit-btn{
  min-width:150px;
  min-height:38px;
  padding:0 20px 2px;
  font-size:13.5px;
  background-color:transparent;
  background-image:url('../images/survey-medieval/07_cta_button_frame.webp');
  background-position:center;
  background-repeat:no-repeat;
  background-size:100% 100%;
}
.survey-medieval .survey-submit-btn:hover:not(:disabled){
  background-color:transparent;
  background-image:url('../images/survey-medieval/07_cta_button_frame.webp');
  background-position:center;
  background-repeat:no-repeat;
  background-size:100% 100%;
  transform:translateY(-1px);
  filter:brightness(1.07) saturate(1.04);
}
.survey-medieval .survey-submit-btn:active:not(:disabled){
  background-color:transparent;
  background-image:url('../images/survey-medieval/07_cta_button_frame.webp');
  background-position:center;
  background-repeat:no-repeat;
  background-size:100% 100%;
  transform:translateY(0);
  filter:brightness(.96);
}
.survey-medieval .survey-submit-btn:disabled{
  opacity:.58;
  filter:grayscale(.10) saturate(.72) brightness(.96);
}

@media(max-width:560px){
  .survey-frontend-backdrop{padding:10px}
  .survey-frontend-modal.survey-medieval{width:calc(100vw - 20px);max-height:92vh;overflow:auto}
  .survey-medieval-corner-tl,.survey-medieval-corner-tr{width:62px;height:62px}
  .survey-medieval-corner-bl,.survey-medieval-corner-br{width:58px;height:58px}
  .survey-medieval-crest{top:-30px;height:70px}
  .survey-medieval-header-ornament{top:24px;width:72%;height:21px}
  .survey-medieval-logo{width:68px;height:68px}
  .survey-medieval .survey-frontend-head{padding:43px 16px 0}
  .survey-medieval .survey-frontend-head h2{font-size:21px}
  .survey-medieval-divider{width:180px;height:7px;margin:3px auto 5px}
  .survey-medieval .survey-frontend-body{padding:0 14px 13px}
  .survey-medieval-watermark{width:72px;height:100px;right:5px;top:26px}
  .survey-medieval .survey-frontend-question{font-size:15.5px;margin-bottom:8px}
  .survey-medieval .survey-answer-option{min-height:40px;font-size:14px}
  .survey-medieval .survey-submit-btn{min-width:142px;min-height:38px}
}

/* ========================================================================== */
/* SWORD M3.5.0B12 — survey breathing-room and top-frame alignment           */
/* ========================================================================== */
.survey-frontend-modal.survey-medieval{
  width:min(500px,calc(100vw - 32px));
  min-height:315px;
  max-height:min(90vh,340px);
}
.survey-medieval-header-ornament{
  top:21px;
}
.survey-medieval-corner-tr{
  top:-7px;
  right:-6px;
}
.survey-medieval .survey-frontend-head{
  padding:52px 38px 0;
}
.survey-medieval-divider{
  margin:5px auto 8px;
}
.survey-medieval .survey-frontend-body{
  padding:0 24px 18px;
}
.survey-medieval .survey-frontend-question{
  margin:0 0 12px;
}
.survey-medieval .survey-answer-list{
  gap:8px;
}
.survey-medieval .survey-answer-option{
  min-height:42px;
  padding-top:8px;
  padding-bottom:8px;
}
.survey-medieval-footer{
  margin-top:12px;
  padding-top:11px;
}
.survey-medieval .survey-remind-link{
  padding:4px 0;
}
.survey-medieval .survey-submit-btn{
  min-height:40px;
}

@media(max-width:560px){
  .survey-frontend-modal.survey-medieval{min-height:0;max-height:92vh}
  .survey-medieval-header-ornament{top:21px}
  .survey-medieval-corner-tr{top:-7px;right:-6px}
  .survey-medieval .survey-frontend-head{padding:46px 16px 0}
  .survey-medieval-divider{margin:4px auto 7px}
  .survey-medieval .survey-frontend-body{padding:0 14px 16px}
  .survey-medieval .survey-frontend-question{margin-bottom:10px}
  .survey-medieval .survey-answer-list{gap:8px}
  .survey-medieval .survey-answer-option{min-height:42px}
  .survey-medieval-footer{margin-top:11px;padding-top:10px}
}

/* ========================================================================== */
/* SWORD M3.5.0B13 — survey visual fidelity pass against approved target      */
/* ========================================================================== */
.survey-frontend-backdrop{
  background:rgba(15,31,48,.40);
  backdrop-filter:blur(5px) saturate(.88);
}
.survey-frontend-modal.survey-medieval{
  width:min(500px,calc(100vw - 32px));
  min-height:318px;
  max-height:min(90vh,336px);
  background:
    radial-gradient(circle at 78% 27%,rgba(190,160,105,.065),transparent 34%),
    radial-gradient(circle at 24% 10%,rgba(255,255,255,.28),transparent 22%),
    linear-gradient(180deg,#f7efe2 0%,#efe5d4 100%);
}
.survey-frontend-modal.survey-medieval:after{
  height:30px;
  background-image:
    linear-gradient(135deg,rgba(255,255,255,.045) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.045) 50%,rgba(255,255,255,.045) 75%,transparent 75%,transparent),
    linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,0) 34%),
    linear-gradient(180deg,#21486f 0%,#173d61 100%);
  background-size:18px 18px,100% 100%,100% 100%;
}
.survey-medieval-corner-bl,
.survey-medieval-corner-br{
  width:64px;
  height:64px;
}
.survey-medieval-header-ornament{
  top:21px;
}
.survey-medieval-corner-tr{
  top:-7px;
  right:-6px;
}
.survey-medieval .survey-frontend-head{
  padding:58px 38px 0;
}
.survey-medieval .survey-frontend-head h2{
  font-size:21px;
}
.survey-medieval-divider{
  width:228px;
  margin:6px auto 10px;
}
.survey-medieval .survey-frontend-body{
  padding:0 24px 17px;
}
.survey-medieval-watermark{
  width:98px;
  height:136px;
  right:5px;
  top:18px;
  opacity:.026;
}
.survey-medieval .survey-frontend-question{
  margin:6px 0 13px;
  font-size:16px;
}
.survey-medieval .survey-answer-list{
  gap:11px;
}
.survey-medieval .survey-answer-option{
  min-height:47px;
  padding:9px 36px 9px 12px;
  border-color:#9eafbc;
  border-width:1px;
  font-size:14.5px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.62),rgba(255,255,255,0) 36%),
    linear-gradient(180deg,#fbf8f1 0%,#f3ece0 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.76),
    0 1px 3px rgba(28,51,73,.05);
}
.survey-medieval .survey-answer-option:hover{
  border-color:#8d9fae;
  background:
    linear-gradient(180deg,rgba(255,255,255,.58),rgba(255,255,255,0) 36%),
    linear-gradient(180deg,#fcf8ef 0%,#f1e7d6 100%);
}
.survey-medieval .survey-answer-option:has(input:checked){
  border-color:#aa8245;
  background:
    linear-gradient(180deg,rgba(255,255,255,.52),rgba(255,255,255,0) 36%),
    linear-gradient(180deg,#faf6eb 0%,#f2e8d7 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.72),
    0 0 0 1px rgba(170,130,69,.08);
}
.survey-medieval .survey-answer-radio{
  width:20px;
  height:20px;
  flex-basis:20px;
  border-color:#91a6b6;
}
.survey-medieval .survey-answer-option input:checked+.survey-answer-radio{
  border-color:#a97d36;
  background:#173f67;
  box-shadow:inset 0 0 0 3px #f3e5c2,0 0 0 1px rgba(104,75,31,.16);
}
.survey-answer-mark{
  right:11px;
  font-size:12px;
  opacity:.13;
}
.survey-medieval-footer{
  margin-top:11px;
  padding-top:10px;
}
.survey-medieval-footer:before{
  width:5px;
  height:5px;
}
.survey-medieval .survey-remind-link{
  font-size:10px;
}
.survey-remind-hourglass{
  font-size:11px;
}
.survey-medieval .survey-submit-btn{
  min-width:170px;
  min-height:43px;
  padding:0 22px 2px;
  font-size:14px;
}
.survey-medieval .survey-submit-btn:hover:not(:disabled){
  background-image:url('../images/survey-medieval/07_cta_button_frame.webp');
  transform:translateY(-1px);
  filter:brightness(1.06) saturate(1.03);
}

@media(max-width:560px){
  .survey-frontend-modal.survey-medieval{min-height:0;max-height:92vh}
  .survey-frontend-modal.survey-medieval:after{height:29px}
  .survey-medieval .survey-frontend-head{padding:54px 16px 0}
  .survey-medieval-divider{width:205px;margin:5px auto 8px}
  .survey-medieval .survey-frontend-body{padding:0 14px 15px}
  .survey-medieval-watermark{width:82px;height:115px;right:4px;top:18px}
  .survey-medieval .survey-frontend-question{margin:5px 0 11px;font-size:15.5px}
  .survey-medieval .survey-answer-list{gap:9px}
  .survey-medieval .survey-answer-option{min-height:44px;font-size:14px}
  .survey-medieval .survey-submit-btn{min-width:158px;min-height:41px;font-size:13.5px}
}

/* ========================================================================== */
/* SWORD M3.5.0B14 — reduced navy header / final spacing polish              */
/* ========================================================================== */
.survey-frontend-modal.survey-medieval:after{
  height:18px;
}
.survey-medieval .survey-frontend-head{
  padding:50px 38px 0;
}
.survey-medieval .survey-frontend-question{
  margin:5px 0 10px;
}
.survey-medieval .survey-answer-option{
  border-color:#8fa4b4;
}
.survey-medieval .survey-answer-option:hover{
  border-color:#7f95a6;
}
.survey-medieval .survey-answer-option:has(input:checked){
  border-color:#9f773a;
}

@media(max-width:560px){
  .survey-frontend-modal.survey-medieval:after{height:18px}
  .survey-medieval .survey-frontend-head{padding:48px 16px 0}
  .survey-medieval .survey-frontend-question{margin:4px 0 9px}
}

/* ========================================================================== */
/* SWORD M3.5.0B15 — target-frame fidelity / watermark / answer field polish */
/* ========================================================================== */
.survey-frontend-modal.survey-medieval{
  border:2px solid rgba(157,116,54,.88);
  box-shadow:
    0 24px 60px rgba(7,23,38,.29),
    0 0 0 1px rgba(26,55,83,.16);
}
.survey-frontend-modal.survey-medieval:before{
  display:none;
}
.survey-frontend-modal.survey-medieval:after{
  left:3px;
  right:3px;
  top:3px;
  height:11px;
  border-radius:9px 9px 0 0;
}
.survey-medieval .survey-frontend-head{
  padding-top:44px;
}
.survey-medieval-watermark{
  width:122px;
  height:162px;
  right:7px;
  top:5px;
  opacity:.055;
  background-position:center top;
}
.survey-medieval .survey-answer-list{
  gap:10px;
}
.survey-medieval .survey-answer-option{
  min-height:46px;
  padding:8px 37px 8px 12px;
  border:1.25px solid #879cac;
  background:
    linear-gradient(180deg,rgba(255,255,255,.52),rgba(255,255,255,0) 38%),
    linear-gradient(180deg,#fbf8f0 0%,#f2ebdf 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.72),
    0 1px 2px rgba(22,47,70,.05);
}
.survey-medieval .survey-answer-option:hover{
  border-color:#7890a2;
}
.survey-medieval .survey-answer-option:has(input:checked){
  border-color:#9f773a;
  background:
    linear-gradient(180deg,rgba(255,255,255,.48),rgba(255,255,255,0) 38%),
    linear-gradient(180deg,#fbf7ed 0%,#f3eadb 100%);
}
.survey-medieval .survey-answer-radio{
  width:20px;
  height:20px;
  flex-basis:20px;
  border-width:2px;
}
.survey-answer-mark{
  right:11px;
  font-size:13px;
  opacity:.17;
}
.survey-medieval-footer{
  border-top:0!important;
  margin-top:12px;
  padding-top:0;
}
.survey-medieval-footer:before{
  display:none;
}
.survey-medieval .survey-remind-link{
  text-decoration:none;
}
.survey-remind-hourglass{
  text-decoration:none!important;
}
.survey-remind-text{
  text-decoration:underline;
  text-decoration-color:rgba(109,128,144,.44);
  text-underline-offset:4px;
}
.survey-medieval .survey-remind-link:hover .survey-remind-text,
.survey-medieval .survey-remind-link:focus-visible .survey-remind-text{
  text-decoration-color:#2b648e;
}

@media(max-width:560px){
  .survey-frontend-modal.survey-medieval:after{height:11px;left:3px;right:3px;top:3px}
  .survey-medieval .survey-frontend-head{padding-top:42px}
  .survey-medieval-watermark{width:100px;height:136px;right:5px;top:9px;opacity:.05}
  .survey-medieval .survey-answer-option{min-height:44px}
  .survey-medieval-footer{margin-top:10px;padding-top:0}
}

/* ========================================================================== */
/* SWORD M3.5.0B16 — supplied lion watermark / answer fidelity polish         */
/* ========================================================================== */
.survey-medieval-watermark{
  top:10px;
  right:14px;
  width:112px;
  height:150px;
  opacity:.048;
  background-image:url('../images/survey-medieval/lev2.webp');
  background-position:center top;
  background-repeat:no-repeat;
  background-size:contain;
}
.survey-medieval .survey-answer-option{
  min-height:47px;
  border-color:#8298a8;
  background:
    linear-gradient(180deg,rgba(255,255,255,.58),rgba(255,255,255,0) 36%),
    linear-gradient(180deg,#fbf8f1 0%,#f3ebde 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    inset 0 -1px 0 rgba(108,129,145,.08),
    0 1px 2px rgba(22,47,70,.04);
}
.survey-medieval .survey-answer-option:hover{
  border-color:#748b9c;
}
.survey-medieval .survey-answer-option:has(input:checked){
  border-color:#9e773b;
  background:
    linear-gradient(180deg,rgba(255,255,255,.54),rgba(255,255,255,0) 36%),
    linear-gradient(180deg,#faf6eb 0%,#f2e8d8 100%);
}
.survey-answer-mark{
  opacity:.20;
}
.survey-medieval .survey-submit-btn{
  min-width:160px;
  min-height:41px;
  font-size:13.5px;
}
.survey-medieval-corner-bl,
.survey-medieval-corner-br{
  transform:scale(.96);
  transform-origin:bottom center;
}

@media(max-width:560px){
  .survey-medieval-watermark{
    top:12px;
    right:7px;
    width:92px;
    height:126px;
    opacity:.045;
  }
  .survey-medieval .survey-submit-btn{
    min-width:150px;
    min-height:40px;
    font-size:13px;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B16B — cropped lion watermark visibility adjustment           */
/* ========================================================================== */
.survey-medieval-watermark{
  top:8px;
  right:14px;
  width:110px;
  height:auto;
  aspect-ratio:500 / 661;
  opacity:.12;
  background-image:url('../images/survey-medieval/lev2.webp');
  background-position:center top;
  background-repeat:no-repeat;
  background-size:contain;
}

@media(max-width:560px){
  .survey-medieval-watermark{
    top:10px;
    right:7px;
    width:92px;
    height:auto;
    aspect-ratio:500 / 661;
    opacity:.10;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B16C — move cropped lion watermark to upper-right              */
/* ========================================================================== */
.survey-medieval-watermark{
  top:-28px;
  right:10px;
  width:118px;
  height:auto;
  aspect-ratio:500 / 661;
  opacity:.14;
  background-image:url('../images/survey-medieval/lev2.webp');
  background-position:right top;
  background-repeat:no-repeat;
  background-size:contain;
}

@media(max-width:560px){
  .survey-medieval-watermark{
    top:-10px;
    right:6px;
    width:96px;
    height:auto;
    aspect-ratio:500 / 661;
    opacity:.12;
    background-position:right top;
    background-repeat:no-repeat;
    background-size:contain;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B17 — vintage papyrus popup background                         */
/* ========================================================================== */
.survey-frontend-modal.survey-medieval{
  background:
    linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,0) 18%),
    radial-gradient(circle at 80% 24%,rgba(201,171,126,.11),transparent 33%),
    radial-gradient(circle at 24% 12%,rgba(255,255,255,.32),transparent 22%),
    url('../images/survey-medieval/09_parchment_texture.svg') center/cover no-repeat,
    linear-gradient(180deg,#f7efe2 0%,#eee2cf 100%);
  box-shadow:
    0 22px 56px rgba(7,23,38,.28),
    0 0 0 1px rgba(149,113,60,.72),
    inset 0 0 0 1px rgba(255,255,255,.26),
    inset 0 0 30px rgba(145,113,67,.06);
}

/* ========================================================================== */
/* SWORD M3.5.0B18 — popup frame WEBP integration                             */
/* ========================================================================== */
.survey-frontend-modal.survey-medieval{
  width:min(520px,calc(100vw - 24px));
  max-width:min(520px,calc(100vw - 24px));
  min-height:0;
  max-height:none;
  aspect-ratio:1536 / 1024;
  padding:0;
  border:0;
  border-radius:0;
  overflow:visible;
  background:transparent url('../images/survey-medieval/10_survey_popup_frame.webp') center/100% 100% no-repeat;
  box-shadow:0 24px 60px rgba(7,23,38,.28);
}
.survey-frontend-modal.survey-medieval::before,
.survey-frontend-modal.survey-medieval::after,
.survey-medieval-corner,
.survey-medieval-watermark,
.survey-medieval-header-ornament{
  display:none !important;
}
.survey-medieval-crest{
  top:-34px;
  height:78px;
}
.survey-medieval-logo{
  width:76px;
  height:76px;
  filter:drop-shadow(0 5px 8px rgba(16,35,52,.18));
}
.survey-medieval .survey-frontend-head{
  padding:58px 52px 0;
}
.survey-medieval .survey-frontend-kicker{
  margin-bottom:4px;
  color:#5b7388;
}
.survey-medieval .survey-frontend-head h2{
  font-size:23px;
  line-height:1.02;
}
.survey-medieval-close{
  top:16px;
  right:16px;
}
.survey-medieval-divider{
  width:230px;
  margin:8px auto 10px;
}
.survey-medieval .survey-frontend-body{
  padding:0 44px 28px;
  overflow:hidden;
}
.survey-medieval .survey-frontend-question{
  margin:4px 0 14px;
}
.survey-medieval .survey-answer-list{
  gap:10px;
}
.survey-medieval-footer{
  margin-top:12px;
  padding-top:0;
}

@media(max-width:560px){
  .survey-frontend-modal.survey-medieval{
    width:calc(100vw - 18px);
    max-width:calc(100vw - 18px);
  }
  .survey-medieval-crest{
    top:-29px;
    height:68px;
  }
  .survey-medieval-logo{
    width:66px;
    height:66px;
  }
  .survey-medieval .survey-frontend-head{
    padding:50px 24px 0;
  }
  .survey-medieval .survey-frontend-head h2{
    font-size:21px;
  }
  .survey-medieval-close{
    top:12px;
    right:12px;
  }
  .survey-medieval-divider{
    width:190px;
    margin:7px auto 8px;
  }
  .survey-medieval .survey-frontend-body{
    padding:0 16px 18px;
  }
  .survey-medieval .survey-frontend-question{
    margin:3px 0 11px;
    font-size:16px;
  }
  .survey-medieval .survey-answer-option{
    min-height:42px;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B18A — remove rectangular outer edge around popup frame        */
/* ========================================================================== */
.survey-frontend-modal.survey-medieval{
  background:transparent !important;
  box-shadow:none !important;
  position:relative;
}
.survey-frontend-modal.survey-medieval::before{
  content:"";
  display:block !important;
  position:absolute;
  inset:0;
  background:url('../images/survey-medieval/10_survey_popup_frame.webp') center/100% 100% no-repeat;
  filter:drop-shadow(0 18px 34px rgba(7,23,38,.26));
  pointer-events:none;
  z-index:0;
}
.survey-frontend-modal.survey-medieval::after{
  display:none !important;
}
.survey-frontend-modal.survey-medieval > *{
  position:relative;
  z-index:1;
}
.survey-medieval-crest{
  z-index:2;
}

/* ========================================================================== */
/* SWORD M3.5.0B18B — frame edge cleanup + internal layout pass               */
/* ========================================================================== */
.survey-frontend-modal.survey-medieval{
  position:relative;
  width:min(520px,calc(100vw - 24px));
  max-width:min(520px,calc(100vw - 24px));
  min-height:0;
  max-height:none;
  aspect-ratio:1536 / 1024;
  padding:0!important;
  margin:0!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible;
}
.survey-frontend-modal.survey-medieval::before{
  content:"";
  display:block!important;
  position:absolute;
  inset:0;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  background:transparent url('../images/survey-medieval/10_survey_popup_frame.webp') center/100% 100% no-repeat!important;
  box-shadow:none!important;
  filter:none!important;
  pointer-events:none;
  z-index:0;
}
.survey-frontend-modal.survey-medieval::after{
  display:none!important;
}
.survey-frontend-modal.survey-medieval > *{
  position:relative;
  z-index:1;
}
.survey-medieval-crest{
  top:-19px;
  height:78px;
  z-index:3;
}
.survey-medieval-logo{
  width:76px;
  height:76px;
}
.survey-medieval .survey-frontend-head{
  padding:54px 54px 0;
}
.survey-medieval .survey-frontend-kicker{
  margin-bottom:3px;
}
.survey-medieval .survey-frontend-head h2{
  font-size:22px;
  line-height:1;
}
.survey-medieval-divider{
  width:220px;
  margin:6px auto 9px;
}
.survey-medieval .survey-frontend-body{
  padding:0 54px 24px;
  overflow:visible;
}
.survey-medieval .survey-frontend-question{
  margin:2px 0 11px;
  font-size:16.5px;
  line-height:1.16;
}
.survey-medieval .survey-answer-list{
  gap:8px;
}
.survey-medieval .survey-answer-option{
  min-height:43px;
  padding:7px 34px 7px 12px;
}
.survey-medieval-footer{
  margin-top:14px;
  padding:0;
  min-height:42px;
  align-items:center;
}
.survey-medieval .survey-submit-btn{
  min-width:158px;
  min-height:40px;
  font-size:13.5px;
}
.survey-medieval .survey-remind-link{
  padding:3px 0;
}

@media(max-width:560px){
  .survey-frontend-modal.survey-medieval{
    width:calc(100vw - 18px);
    max-width:calc(100vw - 18px);
  }
  .survey-medieval-crest{
    top:-15px;
    height:68px;
  }
  .survey-medieval-logo{
    width:66px;
    height:66px;
  }
  .survey-medieval .survey-frontend-head{
    padding:48px 24px 0;
  }
  .survey-medieval .survey-frontend-head h2{
    font-size:20px;
  }
  .survey-medieval-divider{
    width:185px;
    margin:5px auto 7px;
  }
  .survey-medieval .survey-frontend-body{
    padding:0 22px 18px;
  }
  .survey-medieval .survey-frontend-question{
    margin:2px 0 9px;
    font-size:15.5px;
  }
  .survey-medieval .survey-answer-option{
    min-height:41px;
  }
  .survey-medieval-footer{
    margin-top:10px;
    min-height:40px;
  }
  .survey-medieval .survey-submit-btn{
    min-width:148px;
    min-height:39px;
    font-size:13px;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B18C — vertical layout pass inside WEBP popup frame            */
/* ========================================================================== */
.survey-frontend-modal.survey-medieval{
  width:min(520px,calc(100vw - 24px));
  max-width:min(520px,calc(100vw - 24px));
  aspect-ratio:1536 / 1024;
}
.survey-medieval-crest{
  top:-19px;
  height:72px;
}
.survey-medieval-logo{
  width:70px;
  height:70px;
}
.survey-medieval .survey-frontend-head{
  padding:38px 50px 0;
}
.survey-medieval .survey-frontend-kicker{
  margin-bottom:2px;
  font-size:8px;
  letter-spacing:.24em;
}
.survey-medieval .survey-frontend-head h2{
  margin:0;
  font-size:22px;
  line-height:1;
}
.survey-medieval-divider{
  width:205px;
  margin:5px auto 7px;
}
.survey-medieval .survey-frontend-body{
  padding:0 44px 18px;
  overflow:hidden;
}
.survey-medieval .survey-frontend-question{
  margin:0 0 10px;
  font-size:16px;
  line-height:1.14;
}
.survey-medieval .survey-answer-list{
  gap:8px;
}
.survey-medieval .survey-answer-option{
  min-height:42px;
  padding-top:7px;
  padding-bottom:7px;
}
.survey-medieval-footer{
  margin-top:10px;
  padding-top:0;
  min-height:42px;
  align-items:center;
  transform:translateY(-2px);
}
.survey-medieval .survey-remind-link{
  padding:2px 0;
}
.survey-medieval .survey-submit-btn{
  min-height:39px;
  min-width:154px;
  font-size:13px;
}

@media(max-width:560px){
  .survey-medieval-crest{
    top:-16px;
    height:64px;
  }
  .survey-medieval-logo{
    width:62px;
    height:62px;
  }
  .survey-medieval .survey-frontend-head{
    padding:34px 24px 0;
  }
  .survey-medieval .survey-frontend-head h2{
    font-size:20px;
  }
  .survey-medieval-divider{
    width:178px;
    margin:4px auto 6px;
  }
  .survey-medieval .survey-frontend-body{
    padding:0 18px 14px;
  }
  .survey-medieval .survey-frontend-question{
    margin-bottom:8px;
    font-size:15px;
  }
  .survey-medieval .survey-answer-list{
    gap:7px;
  }
  .survey-medieval .survey-answer-option{
    min-height:40px;
  }
  .survey-medieval-footer{
    margin-top:8px;
    min-height:40px;
    transform:translateY(-2px);
  }
  .survey-medieval .survey-submit-btn{
    min-width:146px;
    min-height:38px;
    font-size:12.5px;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B18D — survey header padding adjustment                        */
/* ========================================================================== */
.survey-medieval .survey-frontend-head{
  padding:0 50px 0;
}

@media(max-width:560px){
  .survey-medieval .survey-frontend-head{
    padding:0 24px 0;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B18E — divider spacing adjustment                             */
/* ========================================================================== */
.survey-medieval-divider{
  margin:14px auto 14px;
}

/* ========================================================================== */
/* SWORD M3.5.0B18F — mobile survey containment fix                           */
/* ========================================================================== */
@media(max-width:560px){
  .survey-frontend-backdrop{
    align-items:center;
    padding:10px;
  }

  .survey-frontend-modal.survey-medieval{
    width:calc(100vw - 18px);
    max-width:calc(100vw - 18px);
    aspect-ratio:auto;
    min-height:390px;
    max-height:none;
    overflow:visible;
  }

  .survey-frontend-modal.survey-medieval::before{
    inset:0;
    background-size:100% 100%;
  }

  .survey-medieval-crest{
    top:-14px;
    height:62px;
  }

  .survey-medieval-logo{
    width:60px;
    height:60px;
  }

  .survey-medieval .survey-frontend-head{
    padding:28px 28px 0;
  }

  .survey-medieval .survey-frontend-kicker{
    font-size:7.5px;
    margin-bottom:2px;
  }

  .survey-medieval .survey-frontend-head h2{
    font-size:19px;
  }

  .survey-medieval-divider{
    width:170px;
    margin:8px auto 9px;
  }

  .survey-medieval .survey-frontend-body{
    padding:0 28px 24px;
    overflow:visible;
  }

  .survey-medieval .survey-frontend-question{
    margin:0 0 10px;
    font-size:15px;
    line-height:1.15;
  }

  .survey-medieval .survey-answer-list{
    gap:8px;
  }

  .survey-medieval .survey-answer-option{
    min-height:44px;
    padding:7px 32px 7px 10px;
    font-size:14px;
  }

  .survey-medieval-footer{
    margin-top:12px;
    min-height:0;
    padding:0;
    transform:none;
    align-items:center;
  }

  .survey-medieval .survey-submit-btn{
    min-width:146px;
    min-height:38px;
    font-size:12.5px;
  }
}

@media(max-width:430px){
  .survey-frontend-modal.survey-medieval{
    min-height:420px;
  }

  .survey-medieval .survey-frontend-head{
    padding:28px 24px 0;
  }

  .survey-medieval .survey-frontend-body{
    padding:0 24px 24px;
  }

  .survey-medieval-footer{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
  }

  .survey-medieval .survey-submit-btn{
    width:100%;
    min-width:0;
  }

  .survey-medieval .survey-remind-link{
    align-self:center;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B18G — mobile safe-area + compact CTA                         */
/* ========================================================================== */
@media(max-width:560px){
  .survey-medieval .survey-frontend-body{
    padding-left:34px;
    padding-right:34px;
  }

  .survey-medieval .survey-submit-btn{
    width:auto;
    min-width:190px;
    max-width:220px;
    align-self:center;
  }
}

@media(max-width:430px){
  .survey-medieval .survey-frontend-body{
    padding-left:28px;
    padding-right:28px;
  }

  .survey-medieval-footer{
    align-items:center;
  }

  .survey-medieval .survey-submit-btn{
    width:72%;
    min-width:0;
    max-width:220px;
    align-self:center;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B18H — mobile crest scale + divider spacing refinement         */
/* ========================================================================== */
@media(max-width:560px){
  .survey-medieval-crest{
    top:-19px;
    height:72px;
  }

  .survey-medieval-logo{
    width:68px;
    height:68px;
  }

  .survey-medieval-divider{
    margin:12px auto 14px;
  }

  .survey-medieval-footer{
    margin-top:16px;
  }

  .survey-medieval .survey-remind-link{
    margin-top:4px;
  }
}

@media(max-width:430px){
  .survey-medieval-crest{
    top:-19px;
    height:72px;
  }

  .survey-medieval-logo{
    width:68px;
    height:68px;
  }

  .survey-medieval-divider{
    margin:14px auto 14px;
  }

  .survey-medieval-footer{
    gap:12px;
    margin-top:18px;
  }

  .survey-medieval .survey-remind-link{
    margin-top:6px;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B18I — mobile header padding adjustment                        */
/* ========================================================================== */
@media(max-width:560px){
  .survey-medieval .survey-frontend-head{
    padding:0 28px 0;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B18J — centered survey vote notice + timed dismissal           */
/* ========================================================================== */
.survey-vote-notice{
  text-align:center;
  transition:opacity .35s ease, transform .35s ease, max-height .35s ease, margin .35s ease, padding .35s ease, border-width .35s ease;
  overflow:hidden;
}
.survey-vote-notice.is-dismissing{
  opacity:0;
  transform:translateY(-4px);
  max-height:0;
  margin-top:0;
  margin-bottom:0;
  padding-top:0;
  padding-bottom:0;
  border-width:0;
}


/* ========================================================================== */
/* SWORD M3.5.0B18M — frontend live event badges + submissions bulk UX fix    */
/* ========================================================================== */
.events-table thead th .event-head-name{
  display:inline;
  margin:0;
  color:inherit;
  font-size:inherit;
  font-weight:inherit;
}
.events-table thead th .event-head-norm{
  display:inline-block;
  margin-top:3px;
  color:#8aa0b5;
  font-size:9.5px;
  font-weight:600;
}
.events-table thead th .event-live-badge{
  display:block;
  width:max-content;
  max-width:calc(100% - 8px);
  margin:5px auto 0;
  padding:2px 6px;
  border-radius:999px;
  font-size:8px;
  line-height:1.15;
  font-weight:800;
  letter-spacing:.02em;
  white-space:nowrap;
}
.events-table thead th .event-live-in_progress{
  background:#e3f7eb;
  color:#16834a;
  box-shadow:inset 0 0 0 1px rgba(22,131,74,.10);
}
.events-table thead th .event-live-waiting_results{
  background:#fff1dc;
  color:#a96510;
  box-shadow:inset 0 0 0 1px rgba(169,101,16,.10);
}

/* A disabled bulk action is simply unavailable; reserve the wait cursor for
   a form that is actually being submitted. */
form[data-admin-form] button:disabled{
  cursor:not-allowed;
}
form[data-admin-form][data-submitting="1"] button:disabled{
  cursor:wait;
}

/* Keep all split-table header rows aligned after adding the third status line. */
.performance-grid{
  --head-h:52px;
}

/* ========================================================================== */
/* SWORD M3.5.0B18N — Surveys administration management module               */
/* ========================================================================== */
.survey-summary-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.survey-manage-card{margin:22px 0;overflow:hidden}
.survey-manage-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;padding:24px 26px 18px}
.survey-manage-head h3{margin:4px 0 6px;font-size:28px;color:#173d61}.survey-manage-head p{margin:0;color:#70879b}.survey-manage-head-actions{display:flex;gap:10px;align-items:center}
.survey-manage-tabs{display:flex;border-top:1px solid #dbe6ef;border-bottom:1px solid #dbe6ef;background:#f7f9fc}.survey-manage-tabs a{padding:15px 20px;color:#6b8297;font-weight:800;text-decoration:none;border-bottom:3px solid transparent}.survey-manage-tabs a.active{color:#177cc1;border-bottom-color:#278ddd;background:#fff}
.survey-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;padding:22px 26px}.survey-detail-stat{border:1px solid #d3e1ec;border-radius:16px;padding:18px;background:#fff}.survey-detail-stat span,.survey-detail-stat small{display:block;color:#7890a4}.survey-detail-stat strong{display:block;margin:6px 0 3px;font-size:24px;color:#173d61}
.survey-overview-actions{display:flex;justify-content:flex-end;gap:10px;padding:0 26px 24px}
.survey-results-list{padding:24px 26px;display:grid;gap:18px}.survey-result-row>div:first-child{display:flex;justify-content:space-between;gap:16px;margin-bottom:8px}.survey-result-row strong{color:#173d61}.survey-result-row span{color:#71879a}.survey-result-bar{height:12px;border-radius:999px;background:#e7eef4;overflow:hidden}.survey-result-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#278ddd,#4cc98b)}.survey-results-summary{margin:0 26px 24px;padding:16px 18px;border-radius:14px;background:#eef6fc;color:#45637d}
.survey-audience-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:24px 26px}.survey-audience-columns section{border:1px solid #d7e3ec;border-radius:16px;padding:18px;background:#fff;max-height:390px;overflow:auto}.survey-audience-columns h4{display:flex;justify-content:space-between;margin:0 0 12px;color:#173d61}.survey-audience-columns h4 span{font-size:13px;background:#edf4fa;padding:4px 9px;border-radius:999px}.survey-member-row{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-top:1px solid #edf2f6}.survey-member-row:first-of-type{border-top:0}.survey-member-row small{color:#8295a6}.admin-muted{color:#8295a6}
.survey-settings-form{padding:24px 26px}.survey-editor-section{padding:18px 0;border-top:1px solid #e2eaf1}.survey-editor-section:first-of-type{border-top:0}.survey-editor-section h4{margin:0 0 14px;color:#173d61;font-size:18px}.survey-toggle-stack{display:grid;gap:10px;margin-top:14px}.survey-danger-zone{margin:0 26px 26px;padding:18px;border:1px solid #efc5c8;border-radius:16px;background:#fff7f7;display:flex;align-items:center;justify-content:space-between;gap:18px}.survey-danger-zone strong{color:#a62f3a}.survey-danger-zone p{margin:4px 0 0;color:#8c6770}.admin-danger-btn{border:0;border-radius:10px;padding:11px 16px;background:#d94c59;color:#fff;font-weight:800;cursor:pointer;white-space:nowrap}
.survey-preview-stage{padding:28px;text-align:center}.survey-preview-modal{max-width:520px;margin:0 auto 12px;padding:28px;border:1px solid #c7aa72;border-radius:18px;background:linear-gradient(180deg,#f8f1e5,#efe4d1);box-shadow:0 16px 40px rgba(18,42,61,.12);color:#173d61}.survey-preview-modal>span{font-size:11px;letter-spacing:.23em;font-weight:900;color:#668096}.survey-preview-modal h3{margin:7px 0 22px;font:700 30px Georgia,serif}.survey-preview-modal p{text-align:left;font:700 20px Georgia,serif}.survey-preview-option{margin:10px 0;padding:12px 14px;text-align:left;border:1px solid #9bafbd;background:#fbf8f0}.survey-preview-modal button{margin-top:16px;padding:11px 28px;border:1px solid #b9975c;background:#173f67;color:#fff;font-weight:800}.survey-preview-stage>small{color:#8295a6}
.survey-admin-preview{margin:20px 0;padding:18px;border:1px dashed #bdcad5;border-radius:16px;background:#f8fbfd}.survey-admin-preview>small{display:block;font-weight:900;letter-spacing:.16em;color:#7b90a3}.survey-admin-preview>strong{display:block;margin:6px 0;font-size:20px;color:#173d61}.survey-admin-preview p{margin:0 0 12px;color:#49667f}.survey-admin-preview [data-preview-options]{display:flex;gap:8px;flex-wrap:wrap}.survey-admin-preview [data-preview-options] span{padding:7px 10px;border-radius:8px;background:#fff;border:1px solid #d5e1ea;color:#173d61}
.survey-type-badge{display:inline-block;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:900}.survey-type-badge.required{background:#fff0d6;color:#9a6500}.survey-type-badge.optional{background:#edf3f7;color:#60778b}.survey-status-closed{background:#edf0f3!important;color:#5f6d79!important}.survey-status-finished{background:#eef1f4!important;color:#607486!important}.survey-row-actions{display:flex!important;gap:8px;align-items:center}.survey-row-actions form{margin:0}.survey-row-actions .admin-row-btn{text-decoration:none;white-space:nowrap}
@media(max-width:1000px){.survey-summary-grid-4,.survey-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.survey-admin-table{min-width:1100px}}
@media(max-width:720px){.survey-summary-grid-4,.survey-detail-grid,.survey-audience-columns{grid-template-columns:1fr}.survey-manage-head{flex-direction:column}.survey-manage-tabs{overflow:auto}.survey-manage-tabs a{white-space:nowrap}.survey-danger-zone{flex-direction:column;align-items:flex-start}}

/* ========================================================================== */
/* SWORD M3.5.0B18O — simplified surveys table + analysis drawer              */
/* ========================================================================== */
.admin-tab-surveys .survey-admin-head-simple{margin-bottom:20px}
.admin-tab-surveys .survey-table-card-simple{overflow:hidden}
.admin-tab-surveys .survey-overview-table{width:100%;min-width:0;table-layout:fixed}
.admin-tab-surveys .survey-overview-table th:nth-child(1){width:18%}
.admin-tab-surveys .survey-overview-table th:nth-child(2){width:34%}
.admin-tab-surveys .survey-overview-table th:nth-child(3){width:17%}
.admin-tab-surveys .survey-overview-table th:nth-child(4){width:17%}
.admin-tab-surveys .survey-overview-table th:nth-child(5){width:14%}
.admin-tab-surveys .survey-overview-table th,
.admin-tab-surveys .survey-overview-table td{padding:15px 18px;vertical-align:middle}
.admin-tab-surveys .survey-overview-row{transition:background .14s ease}
.admin-tab-surveys .survey-overview-row:hover{background:#f7fbff}
.admin-tab-surveys .survey-cell-link{display:block;color:#38566f;text-decoration:none;min-height:34px}
.admin-tab-surveys .survey-title-link strong{color:#173f63;font-size:14px}
.admin-tab-surveys .survey-cell-link>strong{color:#244966}
.admin-tab-surveys .survey-status-cell{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.admin-tab-surveys .survey-type-inline{font-size:11px;color:#8496a6;font-weight:700}
.admin-tab-surveys .survey-status-closed{background:#f0f2f4;color:#697b89}

.survey-drawer-backdrop{position:fixed;inset:0;z-index:220;background:rgba(11,29,46,.22);backdrop-filter:blur(1px)}
.survey-drawer-backdrop>a{position:absolute;inset:0}
.survey-analysis-drawer{position:fixed;z-index:221;top:0;right:0;bottom:0;width:min(620px,94vw);background:#fff;box-shadow:-18px 0 52px rgba(10,34,55,.22);display:flex;flex-direction:column;animation:surveyDrawerIn .18s ease-out}
@keyframes surveyDrawerIn{from{transform:translateX(36px);opacity:.65}to{transform:translateX(0);opacity:1}}
.survey-drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:24px 26px 17px;border-bottom:1px solid #e0e8ef}
.survey-drawer-head h3{margin:4px 0 0;color:#173f63;font-size:26px;line-height:1.16}
.survey-drawer-close{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;color:#60798d;background:#f2f6f9;text-decoration:none;font-size:25px;line-height:1}
.survey-drawer-close:hover{background:#e7f0f6;color:#1d5c8b}
.survey-drawer-tabs{display:flex;padding:0 26px;border-bottom:1px solid #dce6ee;background:#fbfcfe}
.survey-drawer-tabs a{position:relative;padding:15px 4px 13px;margin-right:28px;color:#71869a;text-decoration:none;font-weight:800;font-size:13px}
.survey-drawer-tabs a.active{color:#1f73b5}
.survey-drawer-tabs a.active:after{content:"";position:absolute;height:3px;left:0;right:0;bottom:-1px;border-radius:3px 3px 0 0;background:#2c88cc}
.survey-drawer-body{padding:24px 26px 30px;overflow:auto;flex:1;background:#fbfcfd}
.survey-analysis-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px}
.survey-analysis-meta>div{border:1px solid #dce7ef;border-radius:12px;background:#fff;padding:14px 15px;min-height:69px}
.survey-analysis-meta span:first-child{display:block;color:#8495a4;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px}
.survey-analysis-meta strong{color:#244964;font-size:14px}
.survey-analysis-question{padding:17px 18px;border:1px solid #dce7ef;border-radius:13px;background:#fff;margin-bottom:20px}
.survey-analysis-question>span{display:block;color:#8495a4;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:7px}
.survey-analysis-question p{margin:0;color:#173f63;font-size:17px;line-height:1.4;font-weight:700}
.survey-analysis-results{border:1px solid #dce7ef;border-radius:13px;background:#fff;padding:18px 18px 20px}
.survey-section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.survey-section-title h4{margin:0;color:#173f63;font-size:17px}.survey-section-title span{color:#8194a5;font-size:12px}
.survey-analysis-option+.survey-analysis-option{margin-top:17px}
.survey-analysis-option>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:7px}.survey-analysis-option strong{color:#274965}.survey-analysis-option span{color:#6e8497;font-size:12px;font-weight:700}
.survey-analysis-bar{height:10px;border-radius:999px;background:#e8eef3;overflow:hidden}.survey-analysis-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2b82c4,#52b797)}
.survey-analysis-delete{display:flex;justify-content:flex-end;margin-top:22px;padding-top:18px;border-top:1px solid #e2e9ef}
.survey-details-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}.survey-details-head h4{margin:0 0 4px;color:#173f63;font-size:19px}.survey-details-head p{margin:0;color:#7c90a0;font-size:13px}.survey-details-head>span{padding:6px 10px;border-radius:999px;background:#eaf3fa;color:#3478a8;font-size:12px;font-weight:800}
.survey-legacy-note{margin-bottom:14px;padding:10px 12px;border-radius:10px;background:#fff6dd;border:1px solid #ead9a9;color:#7b6732;font-size:12px}
.survey-member-votes-wrap{border:1px solid #dce7ef;border-radius:13px;background:#fff;overflow:auto}
.survey-member-votes{width:100%;border-collapse:collapse;min-width:500px}.survey-member-votes th{position:sticky;top:0;background:#f5f8fa;color:#718599;font-size:11px;text-transform:uppercase;letter-spacing:.05em;text-align:left;padding:11px 13px;border-bottom:1px solid #dce7ef}.survey-member-votes td{padding:12px 13px;border-bottom:1px solid #edf1f4;color:#496579;font-size:13px}.survey-member-votes tr:last-child td{border-bottom:0}.survey-member-votes strong{color:#254965}.survey-vote-value{display:inline-flex;padding:4px 8px;border-radius:999px;background:#e7f5ea;color:#25804b;font-size:12px;font-weight:800}.survey-not-answered{color:#99a6b0;font-style:italic}

@media(max-width:850px){
  .admin-tab-surveys .survey-overview-table{min-width:760px}
  .admin-tab-surveys .survey-table-card-simple{overflow:auto}
  .survey-analysis-drawer{width:min(620px,100vw)}
}
@media(max-width:560px){
  .survey-drawer-head{padding:20px 18px 14px}.survey-drawer-tabs{padding:0 18px}.survey-drawer-body{padding:18px}
  .survey-analysis-meta{grid-template-columns:1fr}.survey-analysis-drawer{width:100vw}
}

/* SWORD M3.5.0B18P — survey drawer header + performance pass */
.survey-drawer-title-copy{min-width:0;max-width:calc(100% - 58px)}
.survey-drawer-title-copy p{margin:7px 0 0;color:#71879a;font-size:14px;line-height:1.4;font-weight:600;max-width:500px}
@media(max-width:560px){
  .survey-drawer-title-copy p{font-size:13px;line-height:1.35}
}

/* SWORD M3.5.0B18R — Surveys visual system aligned with approved mockup */
.admin-tab-surveys .survey-admin-head-simple{
  align-items:flex-start;
  margin:2px 0 8px;
}
.admin-tab-surveys .survey-admin-head-simple .survey-create-btn{
  margin-top:10px;
  padding:12px 18px;
  border-radius:10px;
  box-shadow:0 8px 18px rgba(31,120,211,.16);
}
.admin-tab-surveys .survey-admin-kicker{font-size:11px;letter-spacing:.16em}
.admin-tab-surveys .survey-admin-head h2{font-size:30px;line-height:1.08;margin:3px 0 4px}
.admin-tab-surveys .survey-admin-head p{font-size:14px;color:#71899e}

.survey-overview-tools{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 12px;
  max-width:560px;
}
.survey-search-box{
  flex:1;
  min-width:260px;
  height:44px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 14px;
  border:1px solid #d4e1ec;
  border-radius:11px;
  background:#fff;
  box-shadow:0 5px 14px rgba(35,77,109,.04);
  color:#7f96aa;
}
.survey-search-box span{font-size:21px;line-height:1;transform:rotate(-20deg);display:inline-block}
.survey-search-box input{border:0;outline:0;background:transparent;width:100%;font:inherit;color:#173f63;font-size:13px}
.survey-search-box input::placeholder{color:#92a4b5}
.survey-status-filter{position:relative;display:block}
.survey-status-filter select{
  height:44px;
  min-width:150px;
  appearance:none;
  border:1px solid #d4e1ec;
  border-radius:11px;
  background:#fff;
  color:#52708a;
  padding:0 38px 0 14px;
  font:inherit;
  font-size:13px;
  outline:0;
  box-shadow:0 5px 14px rgba(35,77,109,.04);
}
.survey-status-filter:after{content:'⌄';position:absolute;right:14px;top:10px;color:#6f87a0;font-size:18px;pointer-events:none}

.admin-tab-surveys .survey-table-card-simple{
  border:1px solid #d7e3ec;
  border-radius:15px;
  box-shadow:0 10px 30px rgba(28,65,94,.06);
  background:#fff;
}
.admin-tab-surveys .survey-overview-table{table-layout:fixed}
.admin-tab-surveys .survey-overview-table th:nth-child(1){width:20%}
.admin-tab-surveys .survey-overview-table th:nth-child(2){width:32%}
.admin-tab-surveys .survey-overview-table th:nth-child(3){width:17%}
.admin-tab-surveys .survey-overview-table th:nth-child(4){width:17%}
.admin-tab-surveys .survey-overview-table th:nth-child(5){width:14%}
.admin-tab-surveys .survey-overview-table thead{background:#f5f8fb}
.admin-tab-surveys .survey-overview-table th{
  padding:13px 18px;
  color:#536d84;
  font-size:12px;
  font-weight:800;
  border-bottom:1px solid #dce6ee;
}
.admin-tab-surveys .survey-overview-table td{
  padding:15px 18px;
  border-bottom:1px solid #edf2f6;
  background:#fff;
}
.admin-tab-surveys .survey-overview-table tbody tr:last-child td{border-bottom:0}
.admin-tab-surveys .survey-overview-row{transition:background .16s ease,box-shadow .16s ease}
.admin-tab-surveys .survey-overview-row:hover td{background:#f5faff}
.admin-tab-surveys .survey-overview-row:has(.survey-status-active) td{background:#f7fbff}
.admin-tab-surveys .survey-overview-row:has(.survey-status-active):hover td{background:#eff7ff}
.admin-tab-surveys .survey-cell-link{min-height:42px;display:flex;flex-direction:column;justify-content:center;color:#2f516c;line-height:1.35}
.admin-tab-surveys .survey-title-link strong{font-size:14px;color:#143d61}
.admin-tab-surveys .survey-question-link{font-size:13px;color:#365b78}
.survey-created-note{display:block;margin-top:4px;color:#8da1b3;font-size:10px;font-weight:600}
.admin-tab-surveys .admin-cell-note{display:block;margin-top:3px;color:#7e95a9;font-size:11px}
.admin-tab-surveys .survey-status-cell{align-items:flex-start;gap:4px}
.admin-tab-surveys .survey-status{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:max-content;
  padding:5px 9px;
  border-radius:999px;
  font-size:11px;
  line-height:1;
  font-weight:800;
}
.admin-tab-surveys .survey-status:before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.9}
.admin-tab-surveys .survey-status-active{background:#dcf7e7;color:#198d4d}
.admin-tab-surveys .survey-status-scheduled{background:#fff0d8;color:#b47312}
.admin-tab-surveys .survey-status-finished{background:#edf2f6;color:#60788c}
.admin-tab-surveys .survey-status-closed{background:#edf0f3;color:#627485}
.admin-tab-surveys .survey-status-draft{background:#e9f2fb;color:#3d739f}
.admin-tab-surveys .survey-type-inline{font-size:10px;color:#8297aa;font-weight:700;margin-top:1px}
.survey-filter-empty td{text-align:center!important;color:#7c91a5!important;padding:28px!important}

.survey-drawer-backdrop{background:rgba(9,30,48,.18);backdrop-filter:blur(1.5px)}
.survey-analysis-drawer{
  width:min(440px,94vw);
  border-radius:18px 0 0 18px;
  overflow:hidden;
  box-shadow:-20px 0 56px rgba(10,35,56,.22);
  background:#fff;
}
.survey-drawer-head{
  position:relative;
  padding:25px 28px 19px;
  border-bottom:0;
  background:#fff;
}
.survey-drawer-title-copy{max-width:calc(100% - 44px)}
.survey-drawer-title-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:3px}
.survey-drawer-title-line h3{margin:0;font-size:24px;line-height:1.15;color:#173f63}
.survey-drawer-title-copy>p{margin:7px 0 0;color:#71879a;font-size:13px;line-height:1.45;font-weight:600}
.survey-drawer-head .survey-status{font-size:10px;padding:5px 8px}
.survey-drawer-close{
  position:absolute;
  top:18px;
  right:18px;
  width:34px;
  height:34px;
  border-radius:9px;
  background:transparent;
  color:#6c8498;
  font-size:25px;
}
.survey-drawer-close:hover{background:#f0f5f8}
.survey-drawer-tabs{
  padding:0 28px;
  background:#fff;
  border-bottom:1px solid #dce6ee;
}
.survey-drawer-tabs a{padding:13px 2px 12px;margin-right:34px;font-size:12px}
.survey-drawer-tabs a.active:after{height:3px;background:#1682df}
.survey-drawer-body{padding:18px 22px 26px;background:#fbfdff}
.survey-analysis-card{
  background:#fff;
  border:1px solid #d8e4ed;
  border-radius:13px;
  padding:17px;
  margin-bottom:14px;
  box-shadow:0 4px 12px rgba(31,72,103,.025);
}
.survey-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}
.survey-section-title h4{margin:0;color:#193f61;font-size:13px}
.survey-section-title span{color:#7b91a5;font-size:11px;font-weight:700}
.survey-participation-layout{display:flex;align-items:center;gap:22px}
.survey-participation-ring{
  --survey-progress:0;
  width:92px;
  height:92px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:conic-gradient(#2c8ceb calc(var(--survey-progress) * 1%),#e6edf3 0);
  position:relative;
  flex:0 0 auto;
}
.survey-participation-ring:after{content:'';position:absolute;inset:10px;border-radius:50%;background:#fff}
.survey-participation-ring span{position:relative;z-index:1;font-size:16px;color:#153b5f;font-weight:900}
.survey-participation-copy{display:flex;flex-direction:column;gap:5px}
.survey-participation-copy strong{font-size:20px;color:#153d61}
.survey-participation-copy span{font-size:12px;line-height:1.4;color:#7890a4;max-width:170px}
.survey-period-card{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.survey-period-item{display:flex;flex-direction:column;gap:5px;min-width:0}
.survey-period-item span{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#8196a8;font-weight:900}
.survey-period-item strong{font-size:12px;color:#254b69}
.survey-analysis-results{margin-bottom:14px}
.survey-analysis-option{margin-top:13px}
.survey-analysis-option:first-of-type{margin-top:0}
.survey-analysis-option>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:16px}
.survey-analysis-option strong{font-size:12px;color:#193f61}
.survey-analysis-option>div:first-child span{font-size:12px;color:#415f77;font-weight:800}
.survey-analysis-bar{height:9px;margin-top:7px;border-radius:999px;background:#e7edf2;overflow:hidden}
.survey-analysis-bar i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2187df,#4aa6ef)}
.survey-analysis-option small{display:block;margin-top:5px;color:#8599aa;font-size:10px}
.survey-analysis-info{display:flex;gap:10px;align-items:flex-start;border-radius:12px;padding:12px 14px;background:#eef7ff;color:#43657e;margin:2px 0 16px}
.survey-analysis-info>span{display:grid;place-items:center;width:18px;height:18px;border:1.5px solid #2583d6;border-radius:50%;color:#2583d6;font-size:11px;font-weight:900;flex:0 0 auto}
.survey-analysis-info p{margin:0;font-size:11px;line-height:1.45}
.survey-analysis-delete{padding-top:12px;border-top:1px solid #e4ecf2;text-align:right}
.survey-analysis-delete .admin-danger-btn{padding:10px 14px;border-radius:10px;font-size:12px}

.survey-details-head{margin-bottom:12px}.survey-details-head h4{font-size:15px;color:#173f63}.survey-details-head p{font-size:11px;color:#7890a4}
.survey-member-votes-wrap{background:#fff;border:1px solid #dbe5ed;border-radius:12px;overflow:auto}
.survey-member-votes{width:100%;border-collapse:collapse}.survey-member-votes th{position:sticky;top:0;background:#f6f9fb;color:#5d7387;font-size:10px;text-transform:uppercase;letter-spacing:.04em;padding:10px 12px;text-align:left}.survey-member-votes td{padding:11px 12px;border-top:1px solid #edf2f5;color:#38566f;font-size:11px}.survey-member-votes td strong{color:#173f63}.survey-vote-value{color:#1e7a50;font-weight:800}.survey-not-answered{color:#8b9baa}

@media(max-width:900px){
  .survey-overview-tools{max-width:none}
  .survey-analysis-drawer{width:min(440px,100vw);border-radius:0}
}
@media(max-width:620px){
  .admin-tab-surveys .survey-admin-head-simple{flex-direction:row;align-items:flex-start;gap:10px}
  .admin-tab-surveys .survey-create-btn{font-size:12px;padding:10px 12px}
  .survey-overview-tools{flex-direction:column;align-items:stretch}
  .survey-search-box{min-width:0}.survey-status-filter select{width:100%}
  .survey-period-card{grid-template-columns:1fr}
}

/* ========================================================================== */
/* SWORD M3.5.0B18S — Surveys wider analysis drawer + Details table refinement */
/* ========================================================================== */

/* Keep the page CTA anchored to the top-right of the Surveys header. */
.admin-tab-surveys .survey-admin-head-simple{
  display:flex !important;
  width:100%;
  box-sizing:border-box;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:24px;
}
.admin-tab-surveys .survey-admin-head-simple > div{
  min-width:0;
}
.admin-tab-surveys .survey-admin-head-simple .survey-create-btn{
  flex:0 0 auto;
  margin:10px 0 0 auto !important;
  align-self:flex-start !important;
}

/* Give analysis and Details enough room on desktop without turning the drawer
   into a full-page view. */
.survey-analysis-drawer{
  width:min(760px,52vw);
  max-width:760px;
}

/* Details table should fit the drawer instead of creating a horizontal rail. */
.survey-member-votes-wrap{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  overflow-y:auto;
}
.survey-member-votes{
  width:100%;
  min-width:0 !important;
  table-layout:fixed;
}
.survey-member-votes th,
.survey-member-votes td{
  box-sizing:border-box;
}
.survey-member-votes th:nth-child(1),
.survey-member-votes td:nth-child(1){
  width:42%;
}
.survey-member-votes th:nth-child(2),
.survey-member-votes td:nth-child(2){
  width:32%;
}
.survey-member-votes th:nth-child(3),
.survey-member-votes td:nth-child(3){
  width:26%;
  white-space:nowrap;
}
.survey-member-votes td:nth-child(1) strong{
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.survey-member-votes td:nth-child(2){
  overflow-wrap:anywhere;
}

/* On narrower laptops use the available width; mobile remains a full drawer. */
@media(max-width:1100px){
  .survey-analysis-drawer{
    width:min(680px,64vw);
    max-width:680px;
  }
}
@media(max-width:900px){
  .survey-analysis-drawer{
    width:100vw;
    max-width:100vw;
    border-radius:0;
  }
}
@media(max-width:620px){
  .admin-tab-surveys .survey-admin-head-simple{
    gap:12px;
  }
  .admin-tab-surveys .survey-admin-head-simple .survey-create-btn{
    margin-top:7px !important;
  }
  .survey-member-votes th:nth-child(1),
  .survey-member-votes td:nth-child(1){width:39%}
  .survey-member-votes th:nth-child(2),
  .survey-member-votes td:nth-child(2){width:31%}
  .survey-member-votes th:nth-child(3),
  .survey-member-votes td:nth-child(3){width:30%}
}

/* ========================================================================== */
/* SWORD M3.5.0B18T — occurrence-scoped Submissions + server pagination      */
/* ========================================================================== */

.submission-review-workspace-server .submission-master{min-width:0}
.submission-context-card{
  display:flex;align-items:flex-end;justify-content:space-between;gap:24px;
  padding:18px 20px;margin-bottom:10px;background:#fff;border:1px solid #d7e4ee;
  border-radius:16px;box-shadow:0 6px 18px rgba(26,61,91,.045)
}
.submission-context-copy small{
  display:block;margin-bottom:4px;color:#7d93a6;font-size:11px;font-weight:800;
  text-transform:uppercase;letter-spacing:.08em
}
.submission-context-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.submission-context-title-row h2{margin:0;color:#173f63;font-size:22px;line-height:1.1}
.submission-context-copy p{margin:5px 0 0;color:#7890a4;font-size:12px;font-weight:700}
.submission-context-status{
  display:inline-flex;align-items:center;min-height:26px;padding:4px 10px;border-radius:999px;
  background:#eef3f7;color:#5f7485;font-size:11px;font-weight:800
}
.submission-context-status.is-waiting{background:#fff1d9;color:#9b6812}
.submission-context-status.is-active{background:#e4f6ed;color:#16734b}
.submission-context-status.is-upcoming{background:#eaf3ff;color:#286cae}
.submission-occurrence-filter{min-width:min(360px,42vw)}
.submission-occurrence-filter label{display:grid;gap:6px;color:#698196;font-size:11px;font-weight:800}
.submission-occurrence-filter select{
  width:100%;height:42px;padding:0 38px 0 12px;border:1px solid #ccdce8;border-radius:11px;
  background:#fff;color:#1d4567;font:inherit;font-size:12px;font-weight:700
}
.submission-summary-strip{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px
}
.submission-summary-strip span{
  display:inline-flex;gap:5px;align-items:baseline;padding:7px 10px;border-radius:999px;
  background:#eef4f8;color:#6b8294;font-size:11px;font-weight:700
}
.submission-summary-strip b{color:#173f63;font-size:12px}
.submission-toolbar-server{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.submission-server-search{display:flex;min-width:280px;max-width:420px;flex:1}
.submission-server-search input{padding-right:78px}
.submission-search-submit{
  margin-left:-70px;width:66px;border:0;background:transparent;color:#247bc4;font-weight:800;cursor:pointer
}
.submission-toolbar-server .submission-show-segment{flex:0 0 auto}
.submission-toolbar-server .submission-show-segment a{
  display:inline-flex;align-items:center;justify-content:center;min-width:68px;height:40px;padding:0 14px;
  color:#61798d;text-decoration:none;font-size:12px;font-weight:800;border-radius:10px
}
.submission-toolbar-server .submission-show-segment a.is-active{background:#fff;color:#173f63;box-shadow:0 2px 9px rgba(30,67,98,.08)}
.submission-page-size{min-width:112px}
.submission-review-workspace-server #subsTable td[data-col="member"] strong{color:#173f63}
.submission-review-workspace-server #subsTable tbody tr{cursor:pointer}
.submission-pagination{
  display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 4px 0;color:#7890a4;font-size:11px
}
.submission-pagination-links{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.submission-pagination-links a{
  display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:0 10px;
  border:1px solid #d2e0ea;border-radius:9px;background:#fff;color:#41647f;text-decoration:none;font-weight:800
}
.submission-pagination-links a:hover{border-color:#8fbce0;color:#176fb5}
.submission-pagination-links a.is-active{background:#1976d2;border-color:#1976d2;color:#fff}

@media(max-width:900px){
  .submission-context-card{align-items:stretch;flex-direction:column;gap:12px}
  .submission-occurrence-filter{min-width:0;width:100%}
  .submission-toolbar-server{align-items:stretch}
  .submission-server-search{min-width:100%;max-width:none}
  .submission-pagination{align-items:flex-start;flex-direction:column}
}

/* ========================================================================== */
/* SWORD M3.5.0B18U — operational Submissions workflow                       */
/* ========================================================================== */

.submission-workflow-v2 .submission-master{min-width:0}
.submission-workflow-nav{
  display:flex;align-items:center;gap:6px;margin:0 0 12px;padding:4px;
  width:max-content;border:1px solid #d6e3ed;border-radius:12px;background:#eef4f8
}
.submission-workflow-nav a{
  display:inline-flex;align-items:center;justify-content:center;height:36px;padding:0 14px;
  border-radius:9px;color:#687f92;text-decoration:none;font-size:12px;font-weight:800
}
.submission-workflow-nav a.is-active{background:#fff;color:#173f63;box-shadow:0 2px 9px rgba(30,67,98,.08)}

.submission-workflow-switcher{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.submission-workflow-chip{
  display:grid;gap:2px;min-width:190px;padding:10px 12px;border:1px solid #d5e2ec;border-radius:12px;
  background:#fff;color:#234e70;text-decoration:none;box-shadow:0 4px 14px rgba(29,63,92,.035)
}
.submission-workflow-chip span{font-size:12px;font-weight:850}
.submission-workflow-chip small{color:#8095a7;font-size:10px;font-weight:700}
.submission-workflow-chip.is-active{border-color:#7fb7e5;background:#edf6ff;box-shadow:0 0 0 2px rgba(43,132,203,.08)}

.submission-context-card-v2{align-items:center}
.submission-context-status.is-collecting{background:#e6f6ef;color:#14704a}
.submission-context-status.is-reviewing{background:#fff1d9;color:#9b6812}
.submission-context-status.is-overdue{background:#fde8e8;color:#b43c43}
.submission-context-status.is-completed{background:#eaf0f4;color:#617688}
.submission-workflow-deadline{
  display:grid;gap:3px;min-width:250px;padding:10px 12px;border-left:1px solid #dbe6ee
}
.submission-workflow-deadline small{color:#8195a6;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.submission-workflow-deadline strong{color:#244e70;font-size:12px;line-height:1.35}

.submission-summary-strip-v2 span{padding:8px 11px}
.submission-summary-strip-v2 b{font-size:13px}
.submission-workflow-v2 .submission-show-segment a{min-width:86px}

.submission-history-card{overflow:hidden;padding:0}
.submission-history-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid #dbe5ed
}
.submission-history-head small{display:block;margin-bottom:3px;color:#7d93a6;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.submission-history-head h2{margin:0;color:#173f63;font-size:19px}
.submission-history-head>span{color:#8498a8;font-size:11px;font-weight:700}
.submission-history-table td:last-child,.submission-history-table th:last-child{text-align:right}
.submission-history-table .admin-outline-btn.compact{min-height:32px;padding:0 12px;border-radius:8px;font-size:11px}

.submission-no-workflow-card{padding:12px 0 18px}
.submission-no-workflow-card .admin-empty-state{min-height:290px}
.submission-no-workflow-card .admin-outline-btn{margin-top:6px;text-decoration:none}

@media(max-width:900px){
  .submission-workflow-nav{width:100%}
  .submission-workflow-nav a{flex:1}
  .submission-workflow-switcher{display:grid;grid-template-columns:1fr}
  .submission-workflow-chip{min-width:0}
  .submission-context-card-v2{align-items:stretch}
  .submission-workflow-deadline{min-width:0;padding:10px 0 0;border-left:0;border-top:1px solid #dbe6ee}
  .submission-history-card{overflow-x:auto}
  .submission-history-table{min-width:760px}
}

/* ========================================================================== */
/* SWORD M3.5.0B18V — Submissions visual refinement + scalable history        */
/* ========================================================================== */

.admin-tab-submissions .submission-workflow-v3{gap:12px}
.admin-tab-submissions .submission-workflow-nav-v3{margin-bottom:10px}
.admin-tab-submissions .submission-workflow-nav-v3 a{height:38px;padding:0 16px;font-size:12px}

.submission-current-hero{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px 22px;
  padding:18px 20px 16px;margin-bottom:12px;border:1px solid #d6e3ed;border-radius:16px;
  background:#fff;box-shadow:0 7px 22px rgba(28,65,95,.045)
}
.submission-current-heading>small{
  display:block;margin-bottom:5px;color:#7f94a7;font-size:10px;font-weight:850;
  letter-spacing:.09em;text-transform:uppercase
}
.submission-current-title-row{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap}
.submission-current-title-row h2{margin:0;color:#173f63;font-size:25px;line-height:1.05}
.submission-current-title-row p{margin:6px 0 0;color:#7890a4;font-size:12px;font-weight:750}
.submission-current-title-row .submission-context-status{margin-top:2px}
.submission-current-deadline{
  display:flex;align-items:center;gap:10px;min-width:258px;padding-left:22px;border-left:1px solid #dbe6ee
}
.submission-deadline-icon{
  display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:50%;
  background:#eaf4ff;color:#1677cf;font-size:22px;font-weight:900
}
.submission-current-deadline div{display:grid;gap:1px}
.submission-current-deadline small{color:#7f94a7;font-size:10px;font-weight:800}
.submission-current-deadline strong{color:#173f63;font-size:13px;line-height:1.25}
.submission-current-deadline span{color:#58748b;font-size:10px;font-weight:750}

.submission-metric-grid{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.submission-metric-card{
  display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 13px;border-radius:12px;border:1px solid transparent
}
.submission-metric-card>div{display:grid;gap:1px}
.submission-metric-card b{color:#173f63;font-size:21px;line-height:1;font-weight:850}
.submission-metric-card span:not(.submission-metric-icon){font-size:11px;font-weight:750}
.submission-metric-icon{
  display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:50%;font-size:19px;font-weight:900
}
.submission-metric-card.is-submitted{background:#eef6ff;border-color:#e0edf9;color:#176fb7}
.submission-metric-card.is-submitted .submission-metric-icon{background:#e2f0ff;color:#1477d2}
.submission-metric-card.is-review{background:#fff8e9;border-color:#f9edcd;color:#806637}
.submission-metric-card.is-review .submission-metric-icon{background:#fff2cd;color:#e89a00}
.submission-metric-card.is-approved{background:#ecf9f3;border-color:#dff1e8;color:#17734f}
.submission-metric-card.is-approved .submission-metric-icon{background:#dcf5e8;color:#0a9b61}
.submission-metric-card.is-missing{background:#fff1f2;border-color:#fae4e6;color:#a95559}
.submission-metric-card.is-missing .submission-metric-icon{background:#ffe3e6;color:#de3744}

.submission-queue-toolbar-v3{display:flex;align-items:center;gap:10px;margin:0 0 10px}
.submission-search-form-v3{
  position:relative;display:flex;align-items:center;flex:1 1 280px;max-width:360px;height:42px;
  border:1px solid #cfdee9;border-radius:11px;background:#fff
}
.submission-search-form-v3:focus-within{border-color:#85b9e3;box-shadow:0 0 0 3px rgba(36,123,196,.08)}
.submission-search-form-v3 .submission-search-icon{position:absolute;left:13px;color:#69859c;font-size:18px;line-height:1}
.submission-search-form-v3 input{width:100%;height:100%;padding:0 14px 0 39px;border:0;outline:0;background:transparent;color:#173f63;font:inherit;font-size:12px}
.submission-search-form-v3 input::placeholder{color:#91a4b5}
.submission-show-segment-v3{display:flex;align-items:center;gap:4px;padding:3px;border:1px solid #cfdee9;border-radius:11px;background:#eef4f8}
.submission-show-segment-v3 a{
  display:inline-flex;align-items:center;gap:7px;justify-content:center;min-width:105px;height:34px;padding:0 12px;
  border-radius:8px;color:#657e92;text-decoration:none;font-size:11px;font-weight:800
}
.submission-show-segment-v3 a b{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:7px;background:#dfe9f1;color:#577085;font-size:10px}
.submission-show-segment-v3 a.is-active{background:#1976d2;color:#fff;box-shadow:0 3px 9px rgba(25,118,210,.18)}
.submission-show-segment-v3 a.is-active b{background:#fff;color:#1976d2}
.submission-refresh-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;height:42px;margin-left:auto;padding:0 14px;
  border:1px solid #bcd7ee;border-radius:11px;background:#f8fbff;color:#1675c8;text-decoration:none;font-size:11px;font-weight:850
}
.submission-refresh-btn:hover{background:#eef7ff;border-color:#8fbce0}

.submission-bulkbar-v3{
  align-items:center;gap:8px;margin:0 0 8px;padding:7px 9px;border:1px solid #d8e5ee;border-radius:10px;background:#f8fbfd
}
.submission-bulkbar-v3[hidden]{display:none!important}
.submission-bulkbar-v3>span{margin-right:auto;color:#698196;font-size:11px;font-weight:750}
.submission-bulkbar-v3>span b{color:#173f63}
.submission-bulkbar-v3 .compact{min-height:34px;padding:0 13px}

.submission-table-card-v3{overflow:hidden}
.submission-table-card-v3 #subsTable thead th{height:42px;background:#f4f8fb;color:#5e768a;font-size:10px;font-weight:850}
.submission-table-card-v3 #subsTable tbody td{height:52px;font-size:11px}
.submission-table-card-v3 #subsTable tbody tr:hover{background:#f7fbff}
.submission-table-card-v3 #subsTable tbody tr.submission-row-approved{background:#fbfefd}
.submission-empty-v3{min-height:230px}
.submission-empty-v3 h3{margin-bottom:4px}

.submission-table-footer-v3{
  display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 2px 0;color:#7890a4;font-size:10px;font-weight:650
}
.submission-table-footer-actions{display:flex;align-items:center;gap:10px}
.submission-table-footer-actions form{margin:0}
.submission-table-footer-actions select{
  height:34px;padding:0 32px 0 11px;border:1px solid #d2e0ea;border-radius:9px;background:#fff;color:#2f5878;font:inherit;font-size:10px;font-weight:750
}
.submission-pagination-links span.is-disabled{
  display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:0 10px;
  border:1px solid #e1e9ef;border-radius:9px;background:#f7f9fb;color:#b5c2cc;font-weight:750
}

.submission-history-card-v3{border-radius:16px}
.submission-history-head-v3{padding:18px 20px 14px;border-bottom:0}
.submission-history-head-v3 h2{font-size:20px}
.submission-history-filters{
  display:grid;grid-template-columns:minmax(230px,1.4fr) minmax(160px,.75fr) minmax(160px,.75fr) auto;
  gap:10px;padding:0 14px 12px;border-bottom:1px solid #dce6ed
}
.submission-history-search,.submission-history-filters label{
  position:relative;display:flex;align-items:center;height:42px;border:1px solid #cfdee9;border-radius:10px;background:#fff
}
.submission-history-search>span{position:absolute;left:12px;color:#6e879b;font-size:17px}
.submission-history-search input{width:100%;height:100%;padding:0 12px 0 38px;border:0;outline:0;background:transparent;color:#173f63;font-size:11px}
.submission-history-filters label>span{position:absolute;left:12px;color:#8095a6;font-size:10px;pointer-events:none}
.submission-history-filters label input{width:100%;height:100%;padding:15px 10px 0;border:0;outline:0;background:transparent;color:#244e70;font-size:10px}
.submission-history-filter-btn{
  height:42px;padding:0 15px;border:1px solid #bcd7ee;border-radius:10px;background:#f7fbff;color:#176fb5;font-size:11px;font-weight:850;cursor:pointer
}
.submission-history-table-wrap{overflow-x:auto}
.submission-history-table-v3{min-width:760px}
.submission-history-table-v3 thead th{height:42px;background:#f4f8fb;color:#60798d;font-size:10px}
.submission-history-table-v3 tbody td{height:48px;font-size:11px}
.submission-history-table-v3 tbody tr{cursor:pointer}
.submission-history-table-v3 tbody tr:hover{background:#f7fbff}
.submission-history-open{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:8px;color:#1574c8;text-decoration:none;font-size:22px;line-height:1}
.submission-history-open:hover{background:#edf6ff}
.submission-history-footer-v3{padding:10px 14px 12px;border-top:1px solid #e1e9ef}

.submission-history-drawer-backdrop{position:fixed;inset:0;z-index:90;background:rgba(22,43,61,.16)}
.submission-history-detail-panel{
  position:fixed;top:0;right:0;bottom:0;z-index:91;width:min(500px,92vw);overflow:auto;
  border-left:1px solid #d6e3ed;background:#fff;box-shadow:-18px 0 48px rgba(14,39,61,.14)
}
.submission-history-drawer-head{
  position:sticky;top:0;z-index:2;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  padding:18px 20px 15px;border-bottom:1px solid #dce6ed;background:#fff
}
.submission-history-drawer-head small{display:block;margin-bottom:5px;color:#7c92a5;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}
.submission-history-drawer-head h2{margin:0;color:#173f63;font-size:24px;line-height:1.05}
.submission-history-drawer-head p{margin:5px 0 0;color:#70889b;font-size:11px;font-weight:750}
.submission-history-drawer-head>a{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;color:#496c88;text-decoration:none;font-size:24px}
.submission-history-drawer-head>a:hover{background:#f0f5f8}
.submission-history-drawer-body{padding:16px 18px 20px}
.submission-history-drawer-status{display:flex;justify-content:flex-end;margin:-2px 0 10px}
.submission-history-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-bottom:12px}
.submission-history-metrics>div{display:grid;gap:2px;padding:10px 8px;border-radius:10px;text-align:center}
.submission-history-metrics b{font-size:18px;line-height:1;color:#173f63}
.submission-history-metrics span{font-size:9px;font-weight:800}
.submission-history-metrics .is-submitted{background:#eef6ff;color:#1674c7}.submission-history-metrics .is-approved{background:#ecf8f2;color:#168052}.submission-history-metrics .is-rejected{background:#fff0f1;color:#d4474e}.submission-history-metrics .is-missing{background:#f2f5f8;color:#647c90}
.submission-history-detail-tabs{display:flex;gap:6px;margin-bottom:10px}
.submission-history-detail-tabs a{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 11px;border-radius:8px;background:#edf3f7;color:#5d7588;text-decoration:none;font-size:10px;font-weight:800}
.submission-history-detail-tabs a.is-active{background:#1976d2;color:#fff}.submission-history-detail-tabs a b{font-size:9px}
.submission-history-detail-search{position:relative;display:flex;align-items:center;height:40px;margin-bottom:10px;border:1px solid #cfdee9;border-radius:9px}
.submission-history-detail-search>span{position:absolute;left:11px;color:#7890a4}.submission-history-detail-search input{width:100%;height:100%;padding:0 11px 0 34px;border:0;outline:0;background:transparent;color:#173f63;font-size:10px}
.submission-history-detail-table-wrap{overflow-x:auto;border:1px solid #dce6ed;border-radius:10px}
.submission-history-detail-table{width:100%;border-collapse:collapse;min-width:420px}
.submission-history-detail-table th{height:34px;padding:0 9px;background:#f4f8fb;color:#61798c;text-align:left;font-size:9px;font-weight:850}
.submission-history-detail-table td{height:40px;padding:0 9px;border-top:1px solid #e3ebf1;color:#254d6d;font-size:9.5px}
.submission-history-detail-table td.is-result-good{color:#0d8f59;font-weight:800}
.submission-history-detail-empty{padding:22px;text-align:center;color:#8195a6;font-size:10px}
.submission-history-detail-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;color:#7890a4;font-size:9px}
.submission-history-detail-footer>div{display:flex;align-items:center;gap:7px}.submission-history-detail-footer form{margin:0}.submission-history-detail-footer select{height:32px;padding:0 28px 0 9px;border:1px solid #d2e0ea;border-radius:8px;background:#fff;color:#2f5878;font-size:9px;font-weight:750}
.submission-history-detail-footer .submission-pagination-links a{min-width:30px;height:30px;padding:0 8px}

@media(max-width:1080px){
  .submission-current-hero{grid-template-columns:1fr}.submission-current-deadline{min-width:0;padding:10px 0 0;border-left:0;border-top:1px solid #dbe6ee}.submission-metric-grid{grid-template-columns:repeat(2,1fr)}
  .submission-history-filters{grid-template-columns:1fr 1fr}.submission-history-search{grid-column:1/-1}.submission-history-filter-btn{justify-self:start}
}
@media(max-width:760px){
  .submission-queue-toolbar-v3{align-items:stretch;flex-direction:column}.submission-search-form-v3{max-width:none;flex-basis:auto}.submission-refresh-btn{margin-left:0;align-self:flex-start}.submission-show-segment-v3{width:100%}.submission-show-segment-v3 a{flex:1}
  .submission-table-footer-v3{align-items:flex-start;flex-direction:column}.submission-table-footer-actions{width:100%;justify-content:space-between;flex-wrap:wrap}
  .submission-history-filters{grid-template-columns:1fr}.submission-history-search{grid-column:auto}.submission-history-metrics{grid-template-columns:repeat(2,1fr)}
}

/* ========================================================================== */
/* SWORD M3.5.0B18W — Submissions final visual polish                         */
/* ========================================================================== */

/* Compact the active workflow header without changing its information model. */
.admin-tab-submissions .submission-current-hero{
  gap:12px 20px;
  padding:14px 18px 12px;
  margin-bottom:10px;
}
.admin-tab-submissions .submission-current-heading>small{margin-bottom:3px}
.admin-tab-submissions .submission-current-title-row h2{font-size:23px}
.admin-tab-submissions .submission-current-title-row p{margin-top:4px}
.admin-tab-submissions .submission-current-deadline{min-width:245px;padding-left:18px}
.admin-tab-submissions .submission-deadline-icon{
  flex-basis:34px;width:34px;height:34px;font-size:19px;
}
.admin-tab-submissions .submission-metric-grid{gap:9px}
.admin-tab-submissions .submission-metric-card{
  min-height:56px;
  padding:8px 12px;
  gap:10px;
}
.admin-tab-submissions .submission-metric-card b{font-size:19px}
.admin-tab-submissions .submission-metric-icon{
  flex-basis:32px;width:32px;height:32px;font-size:17px;
}
.admin-tab-submissions .submission-metric-icon svg{
  width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
}

/* Keep the queue toolbar balanced on wide screens instead of letting search
   consume the whole row. */
.admin-tab-submissions .submission-search-form-v3{
  flex:0 1 56%;
  width:56%;
  max-width:720px;
  min-width:280px;
}

/* A completed empty queue is a compact operational state, not a large panel. */
.admin-tab-submissions .submission-empty-v3{
  box-sizing:border-box;
  min-height:190px;
  padding:28px 16px 30px;
}
.admin-tab-submissions .submission-empty-v3 .admin-empty-state-icon{
  width:42px;height:42px;margin-bottom:10px;
}

/* History filters: keep field labels separate from the browser-native date
   value/placeholder so Safari/Chrome locale rendering cannot overlap them. */
.admin-tab-submissions .submission-history-search,
.admin-tab-submissions .submission-history-filters label,
.admin-tab-submissions .submission-history-filter-btn{height:46px}
.admin-tab-submissions .submission-history-filters label{
  display:grid;
  grid-template-rows:12px minmax(0,1fr);
  align-items:stretch;
  padding:5px 10px 4px;
}
.admin-tab-submissions .submission-history-filters label>span{
  position:static;
  align-self:start;
  line-height:12px;
  font-size:9px;
}
.admin-tab-submissions .submission-history-filters label input{
  width:100%;height:24px;min-height:0;
  padding:0;
  border:0;
  outline:0;
  background:transparent;
  color:#244e70;
  font-size:10px;
  line-height:24px;
}
.admin-tab-submissions .submission-history-table-v3 tbody tr:hover,
.admin-tab-submissions .submission-history-table-v3 tbody tr:focus-visible{
  background:#f4f9fe;
  box-shadow:inset 3px 0 0 #d7ebfb;
  outline:0;
}

/* The history details drawer must sit above the sticky admin page header.
   Keep the existing screenshot-review drawer untouched. */
.admin-tab-submissions .submission-history-drawer-backdrop{
  z-index:1299;
  background:rgba(22,43,61,.18);
}
.admin-tab-submissions .submission-history-detail-panel{
  z-index:1300;
  overscroll-behavior:contain;
}
.admin-tab-submissions .submission-history-drawer-head{z-index:10}

@media(max-width:1050px){
  .admin-tab-submissions .submission-search-form-v3{
    flex:1 1 280px;
    width:auto;
    max-width:none;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B18X — History row drawer + performance optimization            */
/* ========================================================================== */
.admin-tab-submissions .submission-history-table-v3{min-width:700px}
.admin-tab-submissions .submission-history-table-v3 tbody tr[role="button"]{cursor:pointer}
.admin-tab-submissions .submission-history-table-v3 tbody tr[role="button"]:active{background:#eef7ff}
.admin-tab-submissions .submission-history-drawer-head>button{
  display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:9px;
  background:transparent;color:#496c88;font:inherit;font-size:24px;line-height:1;cursor:pointer;
}
.admin-tab-submissions .submission-history-drawer-head>button:hover{background:#f0f5f8}
.admin-tab-submissions .submission-history-detail-tabs button{
  display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 11px;border:0;border-radius:8px;
  background:#edf3f7;color:#5d7588;font:inherit;font-size:10px;font-weight:800;cursor:pointer;
}
.admin-tab-submissions .submission-history-detail-tabs button.is-active{background:#1976d2;color:#fff}
.admin-tab-submissions .submission-history-detail-tabs button b{font-size:9px}
.admin-tab-submissions .submission-history-detail-footer select{
  height:32px;padding:0 28px 0 9px;border:1px solid #d2e0ea;border-radius:8px;background:#fff;color:#2f5878;font-size:9px;font-weight:750;
}
.admin-tab-submissions .submission-history-detail-footer .submission-pagination-links button{
  display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;padding:0 8px;
  border:1px solid #d2e0ea;border-radius:8px;background:#fff;color:#315a7a;font-size:9px;font-weight:800;cursor:pointer;
}
.admin-tab-submissions .submission-history-detail-footer .submission-pagination-links button:hover{background:#f2f8fd}
.admin-tab-submissions .submission-history-detail-footer .submission-pagination-links button.is-active{background:#1976d2;border-color:#1976d2;color:#fff}
html.submission-history-drawer-open{overflow:hidden}
.admin-tab-submissions .submission-history-drawer-backdrop,.submission-history-drawer-backdrop{animation:submissionHistoryBackdropIn .10s ease-out both}
.admin-tab-submissions .submission-history-detail-panel,.submission-history-detail-panel{animation:submissionHistoryPanelIn .12s ease-out both}
.submission-history-detail-loading{overflow:hidden}
.submission-history-drawer-loading-body{
  min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;
  padding:32px;color:#71899c;font-size:11px;font-weight:700;text-align:center;
}
.submission-history-drawer-loading-body.is-error{color:#a33d43}
.submission-history-loading-spinner{
  width:26px;height:26px;border:3px solid #dceaf5;border-top-color:#1976d2;border-radius:50%;
  animation:submissionHistorySpin .7s linear infinite;
}
@keyframes submissionHistoryBackdropIn{from{opacity:0}to{opacity:1}}
@keyframes submissionHistoryPanelIn{from{transform:translateX(12px);opacity:.75}to{transform:translateX(0);opacity:1}}
@keyframes submissionHistorySpin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.submission-history-drawer-backdrop,.submission-history-detail-panel,.submission-history-loading-spinner{animation:none!important}}

/* B18X injected drawers live directly under <body>, so critical drawer rules
   must not depend on the .admin-tab-submissions ancestor. */
.submission-history-drawer-backdrop{z-index:1299!important}
.submission-history-detail-panel{z-index:1300!important;overscroll-behavior:contain}
.submission-history-drawer-head>button{
  display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:9px;
  background:transparent;color:#496c88;font:inherit;font-size:24px;line-height:1;cursor:pointer;
}
.submission-history-drawer-head>button:hover{background:#f0f5f8}
.submission-history-detail-tabs button{
  display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 11px;border:0;border-radius:8px;
  background:#edf3f7;color:#5d7588;font:inherit;font-size:10px;font-weight:800;cursor:pointer;
}
.submission-history-detail-tabs button.is-active{background:#1976d2;color:#fff}
.submission-history-detail-tabs button b{font-size:9px}
.submission-history-detail-footer select{
  height:32px;padding:0 28px 0 9px;border:1px solid #d2e0ea;border-radius:8px;background:#fff;color:#2f5878;font-size:9px;font-weight:750;
}
.submission-history-detail-footer .submission-pagination-links button{
  display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;padding:0 8px;
  border:1px solid #d2e0ea;border-radius:8px;background:#fff;color:#315a7a;font-size:9px;font-weight:800;cursor:pointer;
}
.submission-history-detail-footer .submission-pagination-links button:hover{background:#f2f8fd}
.submission-history-detail-footer .submission-pagination-links button.is-active{background:#1976d2;border-color:#1976d2;color:#fff}

/* SWORD M3.5.0B18Y — Submissions History interaction/performance refinement */
.admin-tab-submissions .submission-history-table-v3{
  width:100%;
  min-width:720px;
  table-layout:fixed;
}
.admin-tab-submissions .submission-history-table-v3 col.submission-history-col-event{width:auto}
.admin-tab-submissions .submission-history-table-v3 col.submission-history-col-game-day{width:150px}
.admin-tab-submissions .submission-history-table-v3 col.submission-history-col-count{width:110px}
.admin-tab-submissions .submission-history-table-v3 col.submission-history-col-status{width:145px}
.admin-tab-submissions .submission-history-table-v3 th:nth-child(3),
.admin-tab-submissions .submission-history-table-v3 th:nth-child(4),
.admin-tab-submissions .submission-history-table-v3 th:nth-child(5),
.admin-tab-submissions .submission-history-table-v3 td:nth-child(3),
.admin-tab-submissions .submission-history-table-v3 td:nth-child(4),
.admin-tab-submissions .submission-history-table-v3 td:nth-child(5){
  text-align:center;
}
.admin-tab-submissions .submission-history-table-v3 td,
.admin-tab-submissions .submission-history-table-v3 th{
  overflow:hidden;
  text-overflow:ellipsis;
}
.admin-tab-submissions .submission-history-fallback-link{
  display:inline-block;
  max-width:100%;
  overflow:hidden;
  color:inherit;
  text-decoration:none;
  text-overflow:ellipsis;
  white-space:nowrap;
  vertical-align:middle;
}
.admin-tab-submissions .submission-history-table-v3 tbody tr[role="button"]{
  cursor:pointer;
}
.admin-tab-submissions .submission-history-table-v3 tbody tr[role="button"]:hover .submission-history-fallback-link,
.admin-tab-submissions .submission-history-table-v3 tbody tr[role="button"]:focus-visible .submission-history-fallback-link{
  color:#116fc3;
}

.admin-tab-submissions .submission-history-detail-table-wrap{
  overflow:hidden;
}
.admin-tab-submissions .submission-history-detail-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-member{width:auto}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-value{width:145px}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-result{width:92px}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-status{width:112px}
.admin-tab-submissions .submission-history-detail-table th,
.admin-tab-submissions .submission-history-detail-table td{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.admin-tab-submissions .submission-history-detail-table td:first-child strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* The History drawer opens immediately; do not delay interaction with decorative transitions. */
.admin-tab-submissions .submission-history-drawer-backdrop,
.admin-tab-submissions .submission-history-detail-panel{
  animation:none!important;
  transition:none!important;
}
.admin-tab-submissions .submission-history-drawer-loading-body{
  min-height:220px;
}

@media(max-width:900px){
  .admin-tab-submissions .submission-history-table-v3{min-width:680px}
  .admin-tab-submissions .submission-history-table-v3 col.submission-history-col-game-day{width:132px}
  .admin-tab-submissions .submission-history-table-v3 col.submission-history-col-count{width:92px}
  .admin-tab-submissions .submission-history-table-v3 col.submission-history-col-status{width:128px}
}
@media(max-width:560px){
  .admin-tab-submissions .submission-history-detail-table-wrap{overflow-x:auto}
  .admin-tab-submissions .submission-history-detail-table{min-width:430px}
}

/* ========================================================================== */
/* SWORD M3.5.0B18Z — multi-event submissions + system review provenance     */
/* ========================================================================== */

/* Current queue can contain submissions from several simultaneous events. */
.admin-tab-submissions .submission-table-card-v3{
  overflow-x:auto;
  overflow-y:hidden;
}
.admin-tab-submissions .submission-current-table-v4{
  width:100%;
  min-width:1050px;
  table-layout:fixed;
}
.admin-tab-submissions .submission-current-table-v4 col.submission-col-select{width:38px}
.admin-tab-submissions .submission-current-table-v4 col.submission-col-event{width:145px}
.admin-tab-submissions .submission-current-table-v4 col.submission-col-member{width:auto}
.admin-tab-submissions .submission-current-table-v4 col.submission-col-user-value{width:122px}
.admin-tab-submissions .submission-current-table-v4 col.submission-col-counter{width:138px}
.admin-tab-submissions .submission-current-table-v4 col.submission-col-result{width:88px}
.admin-tab-submissions .submission-current-table-v4 col.submission-col-time{width:145px}
.admin-tab-submissions .submission-current-table-v4 col.submission-col-reviewer{width:118px}
.admin-tab-submissions .submission-current-table-v4 col.submission-col-status{width:108px}
.admin-tab-submissions .submission-current-table-v4 th,
.admin-tab-submissions .submission-current-table-v4 td{
  overflow:hidden;
  text-overflow:ellipsis;
}
.admin-tab-submissions .submission-event-cell strong,
.admin-tab-submissions .submission-event-cell small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.admin-tab-submissions .submission-event-cell small{
  margin-top:3px;
  color:#8296a6;
  font-size:9px;
  font-weight:700;
}
.admin-tab-submissions .submission-reviewer-cell{white-space:nowrap}
.admin-tab-submissions .submission-reviewer{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#315a78;
  font-size:10px;
  font-weight:800;
}
.admin-tab-submissions .submission-reviewer.is-system{
  padding:4px 7px;
  border:1px solid #d8e7f3;
  border-radius:999px;
  background:#f3f8fc;
  color:#416984;
}
.admin-tab-submissions .submission-current-title-row p{
  max-width:720px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* History details now exposes who reviewed each result. */
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-value{width:126px}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-result{width:82px}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-reviewer{width:112px}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-status{width:102px}
.submission-history-reviewer{font-weight:800;color:#476b86}

/* History drawer close must remain above the sticky drawer header and receive
   pointer events independently of delegated admin handlers. */
.submission-history-drawer-head>button,
.admin-tab-submissions .submission-history-drawer-head>button{
  position:relative;
  z-index:30;
  pointer-events:auto;
  touch-action:manipulation;
}

@media(max-width:1180px){
  .admin-tab-submissions .submission-current-table-v4{min-width:1010px}
  .admin-tab-submissions .submission-current-table-v4 col.submission-col-event{width:132px}
  .admin-tab-submissions .submission-current-table-v4 col.submission-col-reviewer{width:108px}
}

/* SWORD M3.5.0B19 — TB Clan Tools SystemAdmin foundation */
.tb-tools-admin{display:flex;flex-direction:column;gap:18px}.tb-tools-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:2px 0 4px}.tb-tools-heading h2{margin:4px 0 6px;font-size:24px}.tb-tools-heading p{margin:0;color:#718096;max-width:760px}.tb-tools-eyebrow,.tb-tools-label{font-size:11px;font-weight:800;letter-spacing:.11em;color:#53708f}.tb-tools-clan-card{min-width:170px;padding:12px 15px;border:1px solid #dce5ee;border-radius:12px;background:#fff;display:grid;grid-template-columns:1fr auto;gap:2px 12px;box-shadow:0 4px 14px rgba(28,49,72,.04)}.tb-tools-clan-card span{grid-column:1/-1;font-size:11px;color:#8493a3;text-transform:uppercase;font-weight:700}.tb-tools-clan-card strong{font-size:17px}.tb-tools-clan-card code{align-self:center;background:#edf4fb;padding:3px 7px;border-radius:6px;color:#315d85}.tb-tools-tabs{display:flex;gap:5px;padding:5px;background:#edf2f7;border-radius:12px;width:max-content;max-width:100%;overflow:auto}.tb-tools-tabs a{padding:9px 16px;border-radius:8px;color:#536579;font-weight:700;text-decoration:none;white-space:nowrap}.tb-tools-tabs a.active{background:#fff;color:#1e5f9d;box-shadow:0 2px 8px rgba(30,65,100,.08)}.tb-tools-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.tb-tools-kpis article,.tb-tools-mini-stat{background:#fff;border:1px solid #dfe7ef;border-radius:12px;padding:16px 18px}.tb-tools-kpis span,.tb-tools-mini-stat span{display:block;color:#7c8c9d;font-size:12px;font-weight:700;margin-bottom:5px}.tb-tools-kpis strong,.tb-tools-mini-stat strong{font-size:25px;color:#24394f}.tb-tools-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.tb-tools-panel{background:#fff;border:1px solid #dfe7ef;border-radius:14px;padding:18px}.tb-tools-panel header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:16px}.tb-tools-panel h3{margin:3px 0 0}.tb-tools-panel header a{font-size:12px;font-weight:800;color:#2474b8;text-decoration:none}.tb-tools-facts{margin:0;display:grid;gap:10px}.tb-tools-facts>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:10px;border-top:1px solid #edf1f5}.tb-tools-facts dt{font-size:12px;color:#8090a0}.tb-tools-facts dd{margin:0;font-weight:700;text-align:right;max-width:70%;overflow-wrap:anywhere}.tb-tools-policy{display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:12px 15px;background:#f7fbff;border:1px solid #d9e8f5;border-radius:10px;font-size:12px;color:#607489}.tb-tools-policy strong{color:#254f75}.tb-tools-policy span:before{content:'•';margin-right:14px;color:#9ab0c5}.tb-tools-action-row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:15px 17px;background:#fff;border:1px solid #dfe7ef;border-radius:12px}.tb-tools-action-row h3{margin:0 0 4px}.tb-tools-action-row p{margin:0;color:#75879a;font-size:13px}.tb-tools-activation{display:flex;align-items:center;gap:16px;padding:16px 18px;border:1px solid #bcd8ee;background:#f5fbff;border-radius:12px}.tb-tools-activation span{font-size:11px;font-weight:800;color:#5b7891}.tb-tools-activation strong{font:800 24px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em;color:#154f7e}.tb-tools-activation small{margin-left:auto;color:#71849a}.tb-tools-table{min-width:780px}.tb-tools-table code{font-size:11px;color:#31536f;overflow-wrap:anywhere}.tb-tools-status{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.04em;background:#edf2f7;color:#52677a}.tb-tools-status.active,.tb-tools-status.ack,.tb-tools-status.accepted{background:#e7f7ef;color:#24714c}.tb-tools-status.revoked,.tb-tools-status.partial{background:#fff1eb;color:#a64c27}.tb-tools-status.duplicate{background:#eef3ff;color:#4d64a6}.tb-tools-status.left{background:#f3f4f6;color:#68717d}.tb-tools-row-actions{display:flex;gap:8px;align-items:center}.tb-tools-inline-form{display:flex;gap:6px}.tb-tools-inline-form input{width:140px;padding:7px 8px;border:1px solid #d9e2eb;border-radius:7px}.tb-tools-row-actions button{border:1px solid #d8e2ec;background:#fff;border-radius:7px;padding:7px 9px;font-weight:700;color:#446177}.tb-tools-row-actions button.danger{color:#a64040;border-color:#efd0d0}.tb-tools-empty{padding:28px 12px;text-align:center;color:#8897a6}.tb-tools-subheading{margin:5px 0 -7px;font-size:13px;color:#48647f;text-transform:uppercase;letter-spacing:.06em}@media(max-width:1000px){.tb-tools-kpis{grid-template-columns:repeat(2,1fr)}.tb-tools-grid-2{grid-template-columns:1fr}}@media(max-width:700px){.tb-tools-heading,.tb-tools-action-row{flex-direction:column;align-items:stretch}.tb-tools-clan-card{min-width:0}.tb-tools-kpis{grid-template-columns:1fr 1fr}.tb-tools-activation{align-items:flex-start;flex-direction:column}.tb-tools-activation small{margin-left:0}.tb-tools-policy{align-items:flex-start;flex-direction:column}.tb-tools-policy span:before{display:none}}

/* ========================================================================== */
/* SWORD M3.5.0B27 — TB Clan Tools Phase 8: audit & diagnostics              */
/* ========================================================================== */
.tb-tools-health-pill{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid #dce7ef;background:#f4f8fb;color:#536b7e}.tb-tools-health-pill.ok{background:#e8f7ef;border-color:#ccebdc;color:#24714c}.tb-tools-health-pill.warn{background:#fff4e7;border-color:#f3d8ae;color:#9a6414}.tb-tools-diagnostic-kpis article{min-height:86px}.tb-tools-diagnostic-alert{display:grid;grid-template-columns:auto 1fr;gap:4px 22px;padding:15px 17px;border:1px solid #f0c9c9;background:#fff7f7;border-radius:12px;color:#7f3535}.tb-tools-diagnostic-alert>div{grid-row:1/3}.tb-tools-diagnostic-alert span{display:block;font-size:10px;font-weight:800;letter-spacing:.09em;color:#a65c5c}.tb-tools-diagnostic-alert strong{display:block;margin-top:3px}.tb-tools-diagnostic-alert p{margin:0;font-weight:700}.tb-tools-diagnostic-alert small{color:#8a6969}.tb-api-audit-table{min-width:1180px}.tb-api-audit-table tr.has-error{background:#fffafa}.tb-api-message{display:block;max-width:260px;margin-top:4px;color:#9a5a5a;white-space:normal;line-height:1.25}.tb-api-audit-table th:nth-child(1){width:150px}.tb-api-audit-table th:nth-child(2){width:140px}.tb-api-audit-table th:nth-child(3){width:135px}.tb-api-audit-table th:nth-child(4){width:62px}.tb-api-audit-table th:nth-child(5){width:165px}.tb-api-audit-table th:nth-child(10){width:82px}.tb-api-audit-table th:nth-child(11){width:125px}@media(max-width:760px){.tb-tools-diagnostic-alert{grid-template-columns:1fr}.tb-tools-diagnostic-alert>div{grid-row:auto}}

/* SWORD M3.5.0B30 — TB Clan Tools Phase 10 acceptance validation */
.tb-validation-overall{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 14px;border-radius:999px;font-size:12px;font-weight:800;letter-spacing:.04em;white-space:nowrap}
.tb-validation-overall.ok{background:rgba(31,157,99,.12);color:#158255;border:1px solid rgba(31,157,99,.26)}
.tb-validation-overall.warn{background:rgba(201,137,24,.12);color:#9a650e;border:1px solid rgba(201,137,24,.28)}
.tb-validation-overall.fail{background:rgba(190,60,60,.11);color:#a72d2d;border:1px solid rgba(190,60,60,.25)}
.tb-validation-note{display:flex;gap:12px;align-items:flex-start;margin:14px 0;padding:12px 14px;border:1px solid var(--line,#d9dee7);border-radius:10px;background:rgba(70,92,125,.045);font-size:13px;line-height:1.5}
.tb-validation-note strong{white-space:nowrap}
.tb-validation-status{display:inline-flex;min-width:58px;justify-content:center;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.05em}
.tb-validation-status.pass{background:rgba(31,157,99,.12);color:#158255}
.tb-validation-status.warn{background:rgba(201,137,24,.13);color:#9a650e}
.tb-validation-status.fail{background:rgba(190,60,60,.12);color:#a72d2d}
.tb-validation-table td:last-child{min-width:340px}
.tb-validation-list{margin:0;padding:14px 18px 18px 36px;line-height:1.7;font-size:13px}
.tb-validation-final-grid{margin-top:14px}
@media (max-width:760px){.tb-validation-note{display:block}.tb-validation-note strong{display:block;margin-bottom:4px}.tb-validation-table td:last-child{min-width:260px}.tb-validation-overall{white-space:normal;text-align:center}}

/* M3.5.0B31 · TB Clan Tools read-only source comparisons */
.tb-comparison-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.tb-comparison-summary-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 17px;border:1px solid #dfe7ef;border-radius:12px;background:#fff;text-decoration:none;color:inherit}.tb-comparison-summary-card>div{display:flex;flex-direction:column;gap:3px}.tb-comparison-summary-card span:first-child{font-size:11px;font-weight:800;letter-spacing:.06em;color:#71879b;text-transform:uppercase}.tb-comparison-summary-card strong{font-size:14px;color:#2b4258}.tb-comparison-card{background:#fff;border:1px solid #dfe7ef;border-radius:14px;padding:18px;display:flex;flex-direction:column;gap:15px}.tb-comparison-card-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.tb-comparison-card-head h4{margin:3px 0 5px;font-size:17px}.tb-comparison-card-head p{margin:0;color:#718397;font-size:13px;max-width:760px}.tb-comparison-status{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;padding:6px 10px;border-radius:999px;font-size:10px;font-weight:900;letter-spacing:.045em;border:1px solid #dde5ec;background:#f2f5f8;color:#607184}.tb-comparison-status.match{background:#e7f7ef;border-color:#c9ead8;color:#24714c}.tb-comparison-status.differences{background:#fff1e8;border-color:#f0d1bd;color:#9b542b}.tb-comparison-status.no-tb,.tb-comparison-status.no-reference{background:#fff7e5;border-color:#ecdcae;color:#8b6718}.tb-comparison-status.unavailable{background:#f1f3f5;border-color:#dfe3e8;color:#6c7580}.tb-comparison-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}.tb-comparison-metrics>div{padding:11px 12px;border:1px solid #e7edf2;border-radius:10px;background:#f9fbfc}.tb-comparison-metrics span{display:block;color:#7f8e9d;font-size:11px;font-weight:700;margin-bottom:4px}.tb-comparison-metrics strong{font-size:20px;color:#283f55}.tb-comparison-context{display:flex;gap:10px 22px;flex-wrap:wrap;padding:10px 12px;border-radius:9px;background:#f5f8fb;color:#617488;font-size:12px}.tb-comparison-context b{color:#3b536a}.tb-comparison-note{margin:0;color:#5f7387;font-size:12px}.tb-comparison-table{min-width:760px}.tb-comparison-row-state{display:inline-flex;padding:4px 7px;border-radius:6px;background:#f2f5f8;color:#53677a;font-size:10px;font-weight:800}.tb-diff-value{color:#a14f2f}@media(max-width:1050px){.tb-comparison-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:760px){.tb-comparison-overview{grid-template-columns:1fr}.tb-comparison-summary-card,.tb-comparison-card-head{align-items:flex-start;flex-direction:column}.tb-comparison-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* M3.5.0B34 · TB Clan Tools device authorization clarity */
.tb-tools-api-link{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.03em}.tb-tools-api-link.ok{background:#e7f7ef;color:#24714c}.tb-tools-api-link.waiting{background:#fff4e7;color:#946313}.tb-tools-api-link.off{background:#f3f4f6;color:#6b7280}.tb-tools-api-time{display:block;margin-top:4px;color:#7b8c9d;font-size:10px;white-space:nowrap}.tb-tools-activation small{font-variant-numeric:tabular-nums}

/* ========================================================================== 
   SWORD M3.5.0B38 — iPad / tablet portrait admin layout stabilization
   Keep the workspace at viewport width when the sidebar switches off-canvas.
   Wide data tables scroll inside their cards instead of shrinking the page.
   ========================================================================== */
@media (max-width:899px){
  html,body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  /* Safari/iPadOS is more reliable with a normal block formatting context once
     the navigation becomes an off-canvas fixed element. */
  .admin-shell,
  .admin-shell.is-collapsed{
    display:block;
    width:100%;
    max-width:100vw;
    min-width:0;
    overflow-x:hidden;
  }

  .admin-workspace{
    display:block;
    width:100%;
    max-width:100vw;
    min-width:0;
    margin:0;
    padding:18px 16px 36px;
    overflow-x:hidden;
  }

  .admin-workspace > *,
  .admin-workspace form,
  .admin-workspace section,
  .admin-workspace article{
    min-width:0;
    max-width:100%;
  }

  .admin-page-head{
    width:100%;
    max-width:100%;
    align-items:flex-start;
    flex-wrap:wrap;
    gap:10px 14px;
  }

  .admin-page-head > div{
    min-width:0;
  }

  .admin-game-day{
    max-width:100%;
    white-space:normal;
  }

  .admin-toolbar,
  .submission-toolbar,
  .admin-bulkbar{
    width:100%;
    max-width:100%;
    flex-wrap:wrap!important;
  }

  .admin-search-wrap,
  .submission-toolbar .admin-search-wrap{
    flex:1 1 100%;
    width:100%;
    min-width:0;
  }

  .admin-table-card,
  .admin-table-scroll,
  .submission-master .admin-table-card{
    display:block;
    width:100%;
    max-width:100%;
    min-width:0;
    overflow-x:auto!important;
    overflow-y:visible;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
  }

  /* The table keeps useful desktop column widths; only its card scrolls. */
  .admin-data-table{
    max-width:none;
  }

  .submission-review-workspace,
  .submission-review-workspace.has-detail,
  .submission-master,
  .submission-master form{
    width:100%;
    max-width:100%;
    min-width:0;
  }

  .submission-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .admin-metrics-row{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .tb-tools-admin,
  .tb-tools-heading,
  .tb-tools-tabs,
  .tb-tools-panel,
  .tb-tools-action-row,
  .tb-comparison-card{
    max-width:100%;
    min-width:0;
  }

  .tb-tools-tabs{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
}

@media (max-width:600px){
  .admin-workspace{
    padding:14px 12px 30px;
  }

  .submission-kpis,
  .admin-metrics-row{
    grid-template-columns:1fr;
  }

  .admin-toolbar > button,
  .admin-toolbar > a,
  .admin-toolbar > select{
    max-width:100%;
  }
}
/* M3.5.0B40 — Members / Security */
.security-monitor-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;margin:0 0 16px;border:1px solid #f0d38a;background:#fff9e9;border-radius:12px}.security-monitor-banner div{display:flex;flex-direction:column;gap:3px}.security-monitor-banner strong{font-size:13px;color:#7b5500}.security-monitor-banner span{font-size:11px;color:#6e6553}.security-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.security-kpis>.admin-card{padding:16px}.security-kpis span{display:block;font-size:10px;font-weight:800;color:#70869a;letter-spacing:.06em}.security-kpis strong{display:block;margin:5px 0 2px;font-size:26px;color:#172f44}.security-kpis small{color:#7a8d9e}.security-empty{padding:22px}.security-section-head{display:flex;align-items:flex-start;justify-content:space-between;padding:18px 18px 8px}.security-section-head h2,.security-detail-head h2{margin:0;color:#18344b}.security-section-head p,.security-detail-head p{margin:4px 0 0;color:#73899a;font-size:11px}.security-locked{background:#ffe7e9!important;color:#b4232f!important;border-color:#f2b4b9!important}.security-risk{font-variant-numeric:tabular-nums}.security-risk.high{color:#c52734}.security-result{display:inline-flex;padding:5px 8px;border-radius:999px;background:#eef4f8;color:#536b7d;font-size:10px;font-weight:800}.security-result-would_lock,.security-result-locked{background:#ffe7e9;color:#b4232f}.security-result-allowed{background:#e8f7ef;color:#187448}.security-result-denied{background:#fff0dc;color:#9a5a00}.security-detail-card{margin-top:16px;padding:0 0 18px;overflow:hidden}.security-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px}.security-detail-head small{display:block;text-transform:uppercase;letter-spacing:.08em;color:#8296a6;font-weight:800}.security-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:4px 20px 18px}.security-profile-grid>section{border:1px solid #dce7ef;border-radius:10px;padding:15px;background:#fbfdff}.security-profile-grid h3{margin:0 0 10px;font-size:12px;color:#233f55}.security-profile-grid dl{margin:0}.security-profile-grid dl div{display:flex;justify-content:space-between;gap:14px;padding:7px 0;border-bottom:1px solid #edf2f6}.security-profile-grid dl div:last-child{border-bottom:0}.security-profile-grid dt{color:#7990a1;font-size:11px}.security-profile-grid dd{margin:0;text-align:right;color:#233d52;font-size:11px;font-weight:700;word-break:break-word}.security-risk-breakdown>div{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #e8eef3}.security-risk-breakdown .total{font-size:13px;border-top:2px solid #ccd9e3;border-bottom:0;margin-top:4px}.security-admin-actions{display:flex;gap:10px;flex-wrap:wrap;padding:0 20px}.security-admin-actions form,.security-inline-actions form{margin:0}.security-inline-actions{display:flex;gap:6px;flex-wrap:wrap}.admin-row-btn.danger{color:#b4232f;border-color:#efc0c4}.security-detail-tabs{padding:0 20px}.security-table-card .admin-table-scroll,.security-detail-card .admin-table-scroll{overflow:auto;-webkit-overflow-scrolling:touch}.security-table-card table,.security-detail-card table{min-width:900px}
@media(max-width:1100px){.security-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.security-profile-grid{grid-template-columns:1fr}}
@media(max-width:650px){.security-kpis{grid-template-columns:1fr}.security-monitor-banner{align-items:flex-start;flex-direction:column}.security-detail-head{align-items:stretch}.security-profile-grid{padding-left:12px;padding-right:12px}.security-admin-actions{padding-left:12px;padding-right:12px}}
.security-pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:12px 20px 0}.security-pagination span{font-size:11px;color:#6f8495;font-weight:700}

/* SWORD M3.5.0B41 — Members Security review drawer */
.security-review-backdrop{
  position:fixed;
  inset:0;
  z-index:1400;
  display:flex;
  justify-content:flex-end;
  background:rgba(10,26,40,.38);
  backdrop-filter:blur(2px);
}
.security-review-backdrop .security-detail-card{
  width:min(920px,92vw);
  height:100vh;
  max-height:100vh;
  margin:0;
  border-radius:18px 0 0 18px;
  overflow:auto;
  box-shadow:-20px 0 60px rgba(10,30,46,.24);
  animation:securityDrawerIn .18s ease-out;
}
.security-review-backdrop .security-detail-head{
  position:sticky;
  top:0;
  z-index:3;
  background:#fff;
  border-bottom:1px solid #e5edf3;
}
.security-review-backdrop .security-detail-tabs{
  position:sticky;
  top:76px;
  z-index:2;
  background:#fff;
  border-bottom:1px solid #edf2f6;
}
@keyframes securityDrawerIn{from{transform:translateX(28px);opacity:.7}to{transform:translateX(0);opacity:1}}
@media(max-width:760px){
  .security-review-backdrop .security-detail-card{width:100vw;border-radius:0}
  .security-review-backdrop .security-detail-tabs{top:82px;overflow-x:auto}
}

/* M3.5.0B42 — simplified TB Clan Tools operational UI */
.tb-tools-simple{display:flex;flex-direction:column;gap:18px}.tb-simple-heading{align-items:flex-start}.tb-simple-heading>div:first-child p{max-width:820px}.tb-tools-clan-card b{display:inline-flex;margin-left:8px;padding:5px 9px;border-radius:9px;background:#edf5ff;color:#1f69b7;font-size:12px;letter-spacing:.08em}.tb-tools-tabs{display:flex;gap:8px;flex-wrap:wrap}.tb-tools-tabs a{padding:11px 18px;border-radius:11px;font-weight:700;text-decoration:none;color:#4b6078}.tb-tools-tabs a.active{background:#fff;color:#096bc5;box-shadow:0 6px 20px rgba(20,62,96,.09)}
.tb-simple-health,.tb-simple-hero{background:#fff;border:1px solid #d7e3ef;border-radius:16px;padding:22px;display:flex;align-items:center;gap:20px;box-shadow:0 4px 14px rgba(42,71,98,.03)}.tb-simple-health-icon{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:#daf4e5;color:#138751;font-size:30px;font-weight:800;flex:none}.tb-simple-health.is-warn .tb-simple-health-icon{background:#fff1cf;color:#b87800}.tb-simple-health>div:nth-child(2){min-width:260px}.tb-simple-health span,.tb-simple-hero span{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#6a8199;font-weight:800}.tb-simple-health strong{display:block;font-size:25px;color:#168752;margin-top:4px}.tb-simple-health.is-warn strong{color:#a66b00}.tb-simple-health p{margin:4px 0 0;color:#6d8198}.tb-simple-connection{margin-left:auto;padding-left:28px;border-left:1px solid #dbe5ef;min-width:360px}.tb-simple-connection dl,.tb-simple-hero dl{margin:8px 0 0;display:grid;gap:6px}.tb-simple-connection dl div,.tb-simple-hero dl div{display:grid;grid-template-columns:130px 1fr;gap:10px}.tb-simple-connection dt,.tb-simple-hero dt{color:#7890a7}.tb-simple-connection dd,.tb-simple-hero dd{margin:0;font-weight:800;color:#193a5a}
.tb-simple-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.tb-simple-kpis article{background:#fff;border:1px solid #d9e5f0;border-radius:15px;padding:18px 20px;min-height:110px}.tb-simple-kpis span{display:block;color:#607791;font-weight:700}.tb-simple-kpis strong{display:block;font-size:28px;line-height:1.1;color:#123a61;margin-top:7px}.tb-simple-kpis small{display:block;color:#7690aa;margin-top:6px}.tb-simple-overview-grid,.tb-simple-two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}.tb-simple-metric-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:14px 0}.tb-simple-metric-row div{padding:10px 0;border-top:1px solid #e3ebf3}.tb-simple-metric-row strong{display:block;font-size:24px;color:#173d62}.tb-simple-metric-row span{color:#7690aa;font-size:12px}.tb-simple-mini-table{width:100%;border-collapse:collapse;font-size:13px}.tb-simple-mini-table th,.tb-simple-mini-table td{padding:8px 6px;border-top:1px solid #e5edf4;text-align:left}.tb-simple-mini-table th{color:#65809b;font-size:11px;text-transform:uppercase}.tb-simple-manage,.tb-system-checks{background:#fff;border:1px solid #d8e4ef;border-radius:15px;padding:0 18px}.tb-simple-manage>summary,.tb-system-checks>summary{cursor:pointer;padding:16px 2px;font-weight:800;color:#244765}.tb-simple-manage[open]>summary,.tb-system-checks[open]>summary{border-bottom:1px solid #e5edf4}.tb-simple-manage>.tb-tools-action-row{margin-top:16px}.tb-system-checks>summary{display:flex;justify-content:space-between;gap:20px}.tb-system-checks>summary span{font-weight:500;color:#7890a5}
.tb-simple-hero{justify-content:space-between;align-items:flex-start}.tb-simple-hero>div:first-child{max-width:720px}.tb-simple-hero h3{font-size:24px;margin:4px 0 6px}.tb-simple-hero p{margin:0;color:#6f849b}.tb-simple-hero dl{min-width:330px}.tb-unmatched-card{border-color:#f2d39a;background:#fffdf8}.tb-unmatched-row{display:grid;grid-template-columns:minmax(180px,1fr) 30px minmax(260px,1.4fr) auto;gap:12px;align-items:center;padding:12px 18px;border-top:1px solid #edf0f3}.tb-unmatched-row select{width:100%;min-height:40px}.tb-simple-pager{display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid #e4edf5}.tb-simple-pager a{padding:7px 11px;border:1px solid #cbdbea;border-radius:8px;text-decoration:none;color:#146fc2;font-weight:700}.tb-log-detail summary{cursor:pointer;color:#146fc2;font-weight:700}.tb-log-detail code,.tb-log-detail small{display:block;margin-top:6px;max-width:420px;white-space:normal;color:#60758b}.settings-toggle{display:flex!important;align-items:center;gap:10px;font-weight:700}.settings-toggle input{width:auto!important}
@media(max-width:1100px){.tb-simple-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.tb-simple-overview-grid,.tb-simple-two-col{grid-template-columns:1fr}.tb-simple-health{align-items:flex-start;flex-wrap:wrap}.tb-simple-connection{margin-left:0;width:100%;min-width:0;padding-left:0;padding-top:16px;border-left:0;border-top:1px solid #dbe5ef}.tb-simple-hero{flex-direction:column}.tb-simple-hero dl{min-width:0;width:100%}.tb-unmatched-row{grid-template-columns:1fr}.tb-unmatched-row>span{display:none}}
@media(max-width:680px){.tb-simple-kpis{grid-template-columns:1fr}.tb-simple-metric-row{grid-template-columns:1fr 1fr}.tb-tools-tabs a{flex:1 1 calc(50% - 8px);text-align:center}.tb-simple-connection dl div,.tb-simple-hero dl div{grid-template-columns:1fr}.tb-system-checks>summary{flex-direction:column;gap:4px}}

/* M3.5.0B43 - TB Clan Tools operational UX refinement */
.tb-tools-compact{gap:14px}.tb-tools-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px}.tb-tools-clan-inline{display:flex;align-items:center;gap:8px;padding:7px 10px;border:1px solid #d9e4ee;border-radius:10px;background:#fff;white-space:nowrap}.tb-tools-clan-inline span{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:#8191a1}.tb-tools-clan-inline strong{color:#1c3d5b}.tb-tools-clan-inline b{padding:3px 7px;border-radius:7px;background:#edf5ff;color:#1d68b1;font-size:11px;letter-spacing:.06em}.tb-tools-clan-inline code{padding:3px 7px;border-radius:7px;background:#f0f4f8;color:#486985;font-size:11px}.tb-tools-compact .tb-tools-tabs{margin:0}.tb-tools-compact .tb-simple-health,.tb-tools-compact .tb-simple-hero{padding:17px 19px}.tb-tools-compact .tb-simple-health-icon{width:48px;height:48px;font-size:24px}.tb-simple-health.is-ok .tb-simple-health-icon{background:#daf4e5;color:#138751}.tb-simple-health.has-issues .tb-simple-health-icon{background:#fff1cf;color:#b87800}.tb-simple-health.is-error .tb-simple-health-icon{background:#fde4e4;color:#b33f3f}.tb-simple-health.is-ok strong{color:#168752}.tb-simple-health.has-issues strong{color:#a66b00}.tb-simple-health.is-error strong{color:#b33f3f}.tb-health-copy p a{font-weight:800;color:#156bb5;text-decoration:none;margin-left:4px}.tb-simple-kpis-compact article{min-height:92px;padding:14px 16px}.tb-simple-kpis-compact strong{font-size:24px}.tb-simple-hero-compact h3{font-size:20px}.tb-simple-hero-compact dl{min-width:300px}.tb-tools-compact .tb-tools-panel{padding:15px 17px}.tb-tools-compact .tb-tools-panel header{margin-bottom:10px}.tb-tools-compact .tb-tools-table-card{overflow:hidden}.tb-row-reviewed{opacity:.68}.tb-reviewed-badge{display:inline-flex;padding:5px 9px;border-radius:999px;background:#edf2f7;color:#657789;font-size:10px;font-weight:800;text-transform:uppercase}.tb-review-btn{padding:6px 10px!important}.tb-review-backdrop{position:fixed;inset:0;background:rgba(17,36,55,.35);z-index:160}.tb-review-backdrop a{position:absolute;inset:0}.tb-review-drawer{position:fixed;top:0;right:0;bottom:0;width:min(520px,94vw);background:#f8fbfe;z-index:161;box-shadow:-18px 0 55px rgba(14,37,58,.18);display:flex;flex-direction:column}.tb-review-drawer>header{display:flex;justify-content:space-between;gap:18px;padding:22px 24px 18px;background:#fff;border-bottom:1px solid #dce6ef}.tb-review-drawer h3{margin:4px 0;font-size:23px;color:#173b5c}.tb-review-drawer header p{margin:0;color:#73879b}.tb-review-close{width:38px;height:38px;border:1px solid #d8e3ed;border-radius:10px;display:grid;place-items:center;text-decoration:none;color:#506980;font-size:24px;background:#fff}.tb-review-body{padding:20px 24px;overflow:auto;display:flex;flex-direction:column;gap:16px}.tb-review-compare{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tb-review-compare>div{padding:15px;border:1px solid #dce6ef;border-radius:12px;background:#fff}.tb-review-compare span,.tb-review-compare small{display:block;color:#7b8fa2;font-size:11px;text-transform:uppercase;letter-spacing:.05em}.tb-review-compare strong{display:block;margin:6px 0;color:#1c3f5e;font-size:17px}.tb-review-explanation{padding:14px 16px;border-radius:11px;background:#eef6fc;color:#496984;line-height:1.55}.tb-review-action{display:flex;flex-direction:column;align-items:flex-start;gap:7px;padding:15px 16px;border:1px solid #dde6ee;border-radius:12px;background:#fff}.tb-review-action small{color:#71869a;line-height:1.45}.tb-compact-details{background:#fff;border:1px solid #d9e4ee;border-radius:14px;overflow:hidden}.tb-compact-details>summary{cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:18px;padding:15px 18px;list-style:none}.tb-compact-details>summary::-webkit-details-marker{display:none}.tb-compact-details>summary span{display:flex;flex-direction:column;gap:3px}.tb-compact-details>summary strong{color:#1d405f}.tb-compact-details>summary small{color:#7c8fa1}.tb-compact-details>summary b{font-size:12px;color:#156dbc}.tb-compact-details[open]>summary{border-bottom:1px solid #e2eaf2}.tb-comparison-card-inner{border:0;border-radius:0;box-shadow:none}.tb-compact-details .admin-table-wrap{border:0}.tb-tools-compact .tb-unmatched-card{border-color:#ecd49f}.tb-tools-compact .tb-unmatched-row{padding:10px 16px}
@media(max-width:900px){.tb-tools-toolbar{align-items:stretch;flex-direction:column}.tb-tools-clan-inline{width:max-content}.tb-review-compare{grid-template-columns:1fr}}

/* M3.5.0B44 · TB Clan Tools event integration */
.event-tb-results-card{display:grid;gap:18px}
.event-tb-results-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.event-tb-results-kpis>div{min-width:0;padding:13px 14px;border:1px solid #dce8f1;border-radius:12px;background:#f8fbfd}
.event-tb-results-kpis span{display:block;margin-bottom:5px;color:#7a8ea0;font-size:12px;font-weight:700}
.event-tb-results-kpis strong{display:block;color:#183a57;font-size:16px;line-height:1.3;overflow-wrap:anywhere}
@media(max-width:980px){.event-tb-results-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.event-tb-results-kpis{grid-template-columns:1fr}}

/* M3.5.0B45 — TB identity + Event source comparison UX */
.tb-tools-row-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.tb-tools-row-actions form{margin:0}.tb-tools-row-actions .secondary-danger{background:#fff;color:#b83c43;border:1px solid #efb9bc}.tb-tools-row-actions .secondary-danger:hover{background:#fff4f4}.event-data-source-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-end;margin-bottom:16px}.event-data-source-head small{font-weight:800;letter-spacing:.12em;color:#68819a}.event-data-source-head h3{margin:4px 0 5px;font-size:22px}.event-data-source-head p{margin:0;color:#6e8399}.event-data-primary-source{background:#fff;border:1px solid #d8e4ef;border-radius:14px;padding:12px 16px;color:#71849a;white-space:nowrap}.event-data-primary-source strong{display:block;color:#153b5f;margin-top:2px}.event-data-source-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.event-data-source-tabs button{border:1px solid #d7e3ee;background:#f4f8fb;color:#49637b;border-radius:12px;padding:10px 16px;font-weight:800;cursor:pointer}.event-data-source-tabs button.active{background:#fff;color:#0877d8;border-color:#9cc9ef;box-shadow:0 4px 12px rgba(26,74,112,.08)}.event-data-source-tabs button[hidden]{display:none}.event-data-source-panel[hidden]{display:none!important}.event-source-compare-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.event-source-compare-kpis>div{background:#f7fafc;border:1px solid #dce7f0;border-radius:12px;padding:12px}.event-source-compare-kpis span{display:block;color:#7a8da0;font-size:12px;font-weight:700}.event-source-compare-kpis strong{display:block;color:#153b5f;font-size:24px;margin-top:4px}.event-source-compare-table td,.event-source-compare-table th{white-space:nowrap}.tb-review-action select{width:100%;min-height:44px;border:1px solid #cbdbe8;border-radius:10px;padding:8px 10px;background:#fff}.tb-review-link-note{margin:0 0 10px;color:#6f8498}.tb-device-action-feedback{font-size:12px;color:#247a4b}
@media(max-width:900px){.event-data-source-head{align-items:stretch;flex-direction:column}.event-data-primary-source{white-space:normal}.event-source-compare-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* M3.5.0B46 — TB event mapping and admin workflow refinement */
.tb-simple-manage[open] > summary{margin-bottom:18px}
.tb-tools-activation[hidden]{display:none!important}
.tb-review-membership-actions{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:18px}
.tb-review-membership-actions .tb-review-action{margin:0;height:100%;display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.tb-review-action.danger-zone{border-color:#f0c4c8;background:#fffafa}
.tb-reviewed-badge{white-space:nowrap}
.event-tb-source-mapping{margin-top:18px}
.event-tb-source-mapping .event-panel-title-row{align-items:flex-start}
.event-tb-source-mapping .event-panel-title-row p{margin:5px 0 0;color:var(--admin-muted,#70849a)}
.event-tb-mapping-warning{margin:14px 0;padding:12px 14px;border-radius:12px;background:#fff5dc;border:1px solid #f3d48b;color:#8a5c00;font-weight:700}
.event-tb-mapping-table select{min-width:260px;max-width:100%;width:100%;padding:10px 12px;border:1px solid #cad8e6;border-radius:10px;background:#fff;color:#173653}
.event-tb-mapping-table td:first-child{min-width:240px}
.event-primary-results-card{min-height:220px}
@media(max-width:900px){
  .tb-review-membership-actions{grid-template-columns:1fr}
  .event-tb-mapping-table select{min-width:190px}
}

/* M3.5.0B47 — Unified Data Mapping */
.unified-mapping-card{padding:0;overflow:hidden;border:1px solid #cfe0ef;background:#fff}
.unified-mapping-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:24px 28px;border-bottom:1px solid #d9e6f1}
.unified-mapping-header h2{margin:3px 0 4px;font-size:24px;color:#143653}
.unified-mapping-header p{margin:0;color:#6d8399}
.unified-mapping-kicker{font-size:12px;font-weight:800;letter-spacing:.13em;color:#577694}
.unified-mapping-form{padding:26px 28px;display:grid;gap:20px}
.unified-step{border:1px solid #d5e3ef;border-radius:18px;padding:20px;background:#fbfdff}
.unified-step-heading{display:flex;align-items:center;gap:14px;margin-bottom:16px}
.unified-step-heading>span{display:grid;place-items:center;min-width:36px;height:36px;border-radius:50%;background:#e5f2ff;color:#0a73db;font-weight:800}
.unified-step-heading>div{display:flex;flex-direction:column;gap:2px;flex:1}
.unified-step-heading strong{font-size:17px;color:#173852}
.unified-step-heading small{font-size:13px;color:#73889c}
.unified-source-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.unified-source-card{appearance:none;border:1px solid #d5e3ef;border-radius:16px;background:#fff;padding:17px 18px;display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:14px;text-align:left;cursor:pointer;color:#173852;transition:.16s ease}
.unified-source-card:hover{border-color:#94c6f4;box-shadow:0 8px 22px rgba(20,73,117,.07)}
.unified-source-card.is-active{border-color:#2087e8;background:#f2f8ff;box-shadow:0 0 0 1px rgba(32,135,232,.1)}
.unified-source-card>span:nth-child(2){display:flex;flex-direction:column;gap:3px}
.unified-source-card strong{font-size:16px}
.unified-source-card small{font-size:13px;color:#72879b;font-weight:500}
.unified-source-card b{font-size:12px;color:#0c76d8}
.unified-source-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#eaf5ff;color:#0878dd;font-size:19px;font-weight:900}
.unified-source-list{max-height:360px;border-radius:14px}
.unified-tb-map-table td,.unified-tb-map-table th{vertical-align:middle}
.unified-tb-map-table select{width:100%;min-width:260px}
.unified-tb-map-table tr.is-selected{background:#f5faff}
.unified-review-list{min-height:72px;border:1px dashed #c7dcec;border-radius:14px;padding:10px;background:#fff}
.unified-review-list .composite-selected-item{grid-template-columns:auto 1fr;margin:0 0 7px}
.unified-review-list .composite-selected-item:last-child{margin-bottom:0}
.unified-review-source{display:inline-flex;align-items:center;justify-content:center;min-width:52px;height:25px;border-radius:999px;background:#edf3f8;color:#57718a;font-size:10px;font-weight:900;letter-spacing:.08em}
.unified-validation-note{margin-top:14px;padding:12px 14px;border-radius:12px;background:#fff7e5;border:1px solid #f2d394;color:#8b610d;font-size:13px;font-weight:650}
.unified-validation-note.is-error{background:#fff5e9}
.event-mapping-table td:first-child strong{display:block}
@media(max-width:900px){.unified-source-choice{grid-template-columns:1fr}.unified-mapping-header{padding:20px}.unified-mapping-form{padding:18px}.unified-tb-map-table select{min-width:190px}}

/* M3.5.0B48 — Data Mapping simplification + TB Source semantics */
.unified-stepper{display:flex;align-items:center;gap:10px;padding:12px 28px;border-bottom:1px solid #e2ebf3;background:#f8fbfe;color:#607b94;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.unified-stepper span{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.unified-stepper b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#e4f2ff;color:#0877dc;font-size:11px}
.unified-stepper i{font-style:normal;color:#9db0c2}
.unified-mapping-form{padding:18px 22px;gap:14px}
.unified-step{padding:15px 16px;border-radius:14px}
.unified-step-heading{margin-bottom:11px;gap:10px}
.unified-step-heading>span{min-width:30px;height:30px;font-size:12px}
.unified-step-heading strong{font-size:15px}
.unified-source-card{padding:13px 14px;border-radius:13px}
.unified-source-icon{width:36px;height:36px;border-radius:11px}
.unified-source-list{max-height:300px}
.configured-mappings{margin-top:22px;border:1px solid #d5e3ef;border-radius:18px;background:#fff;overflow:hidden}
.configured-mappings-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:20px 22px;border-bottom:1px solid #e0e9f1}
.configured-mappings-head h3{margin:3px 0 4px;font-size:20px;color:#173852}
.configured-mappings-head p{margin:0;color:#71869b}
.configured-mappings-tools{display:flex;gap:10px;align-items:center}
.configured-mappings-tools input,.configured-mappings-tools select{min-height:42px;border:1px solid #cbd9e6;border-radius:10px;background:#fff;padding:8px 11px;color:#173852}
.configured-mappings-tools input{min-width:260px}
.configured-mappings-table td{vertical-align:middle}
.tb-history-filters{display:flex;gap:12px;align-items:end;padding:0 0 14px}
.tb-history-filters label{display:flex;flex-direction:column;gap:6px;color:#60778e;font-size:12px;font-weight:800}
.tb-history-filters select{min-width:260px;border:1px solid #cbd9e6;border-radius:10px;background:#fff;padding:9px 11px;color:#173852}
.tb-tools-table td:nth-child(3){font-weight:650}
@media(max-width:900px){
  .unified-stepper{overflow-x:auto;padding:10px 18px}
  .configured-mappings-head{align-items:stretch;flex-direction:column}
  .configured-mappings-tools{flex-direction:column;align-items:stretch}
  .configured-mappings-tools input{min-width:0;width:100%}
  .tb-history-filters select{min-width:0;width:100%}
}

/* ========================================================================== */
/* M3.5.0B49 — compact corporate Event Center                                */
/* ========================================================================== */
.event-center-modal.event-center-compact{
  width:min(1500px,calc(100vw - 28px));
  height:calc(100vh - 28px);
  max-height:calc(100vh - 28px);
  inset:14px auto auto 50%;
  transform:translateX(-50%);
  border-radius:8px;
  overflow:hidden;
}
.event-center-compact .event-center-form{height:100%;display:grid;grid-template-rows:auto auto minmax(0,1fr)}
.event-center-head-compact{min-height:58px;padding:8px 14px 8px 18px;border-bottom:1px solid #ccd9e6;display:flex;align-items:center;justify-content:space-between;gap:16px}
.event-center-title-compact>div{display:flex;align-items:center;gap:10px;min-width:0}
.event-center-title-compact h2{font-size:20px;line-height:1.15;margin:0;color:#123553;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.event-center-title-compact .event-status-badge{font-size:10px;padding:4px 8px}
.event-center-head-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.event-center-head-actions .admin-primary-btn,.event-center-head-actions .admin-outline-btn,.event-center-head-actions .admin-danger-outline-btn{height:34px;padding:0 14px;font-size:12px;border-radius:4px}
.admin-danger-outline-btn{border:1px solid #e3a6ab;background:#fff;color:#c7353f;font-weight:700;cursor:pointer}
.admin-danger-outline-btn:hover{background:#fff3f4;border-color:#d86f78}
.event-center-head-actions .event-center-close{position:static;width:30px;height:30px;border-radius:3px;font-size:20px}
.event-unsaved-state-head{font-size:10px;color:#9a6a00;display:inline-flex;align-items:center;gap:5px;margin-left:2px}
.event-unsaved-state-head i{width:7px;height:7px;border-radius:50%;background:#efb32e;display:inline-block}
.event-center-tabs-compact{height:42px;min-height:42px;border-bottom:1px solid #cfdbe7;display:grid;grid-template-columns:repeat(5,1fr);background:#f8fafc}
.event-center-tabs-compact button{height:42px;padding:0 12px;font-size:12px;border-radius:0;border:0;border-bottom:2px solid transparent;background:transparent;color:#5c7187;font-weight:700}
.event-center-tabs-compact button.active{color:#0876dc;border-bottom-color:#1685ea;background:#fff}
.event-center-body-compact{padding:12px 16px 14px;overflow:auto;background:#f5f8fb;min-height:0}
.event-center-body-compact .event-tab-panel{display:none;min-height:100%}
.event-center-body-compact .event-tab-panel.active{display:block}
.event-compact-columns{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(320px,.8fr);border:1px solid #cbd8e4;background:#fff;min-height:0}
.event-compact-section{padding:14px 16px;min-width:0}
.event-compact-section+.event-compact-section{border-left:1px solid #d6e0e9}
.event-compact-section h3,.event-stage-head h3{font-size:14px;line-height:1.2;margin:0 0 10px;color:#173a58}
.event-section-subtitle{margin-top:14px!important;padding-top:12px;border-top:1px solid #dbe4ec}
.event-compact-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.event-compact-form-grid label,.event-scoring-topline label{display:grid;gap:4px;font-size:11px;font-weight:700;color:#294d69}
.event-compact-form-grid input,.event-scoring-topline input,.event-scoring-topline select,.event-settings-table input,.event-settings-table select{height:34px;border:1px solid #bfcfdd;border-radius:3px;background:#fff;padding:0 9px;font-size:12px;color:#173a58}
.event-compact-check-list{margin-top:10px;border-top:1px solid #dbe4ec}
.event-compact-check-list label{display:grid;grid-template-columns:22px 1fr;gap:6px;align-items:start;padding:8px 0;border-bottom:1px solid #e1e8ef;font-size:11px;color:#294d69}
.event-compact-check-list label>input{margin-top:2px}
.event-compact-check-list b{display:block;font-size:12px;color:#153855}
.event-compact-check-list small{display:block;margin-top:1px;color:#778b9d;font-size:10px;line-height:1.25}
.event-summary-compact dl{margin:0}
.event-summary-compact dl>div{display:grid;grid-template-columns:1fr auto;gap:12px;padding:7px 0;border-bottom:1px solid #dde5ed;font-size:11px}
.event-summary-compact dt{color:#73879a}.event-summary-compact dd{margin:0;color:#173a58;font-weight:700;text-align:right}
.event-schedule-type-inline{display:flex;border:1px solid #c7d5e1;margin-bottom:10px;width:100%}
.event-schedule-type-inline label{flex:1}.event-schedule-type-inline input{position:absolute;opacity:0;pointer-events:none}
.event-schedule-type-inline span{display:block;text-align:center;padding:8px 10px;font-size:11px;font-weight:700;color:#61768a;background:#f8fafc;cursor:pointer}
.event-schedule-type-inline input:checked+span{background:#e9f4ff;color:#0876dc;box-shadow:inset 0 0 0 1px #1685ea}
.event-settings-table{border-top:1px solid #d8e2eb}
.event-settings-table>label,.event-settings-table>div>label{display:grid;grid-template-columns:minmax(150px,1fr) minmax(180px,1fr);align-items:center;gap:12px;min-height:46px;border-bottom:1px solid #dde5ed;font-size:11px;font-weight:700;color:#294d69}
.event-settings-table>div{display:contents}
.event-inline-unit{display:grid;grid-template-columns:1fr 55px;align-items:center;gap:7px}.event-inline-unit b{font-size:10px;color:#6d8295}
.event-occurrence-preview-compact{font-size:11px;border:1px solid #d4dfe9;max-height:360px;overflow:auto}
.event-occurrence-preview-compact>*{padding:7px 9px!important;margin:0!important;border-bottom:1px solid #e0e7ee!important}

.event-mapping-workspace{display:grid;grid-template-columns:170px minmax(0,1fr);border:1px solid #c6d4e0;background:#fff;min-height:520px}
.event-mapping-steps{border-right:1px solid #d5e0e9;background:#f6f9fc;padding:8px 0}
.event-mapping-steps button{width:100%;border:0;border-left:3px solid transparent;background:transparent;display:grid;grid-template-columns:28px 1fr;align-items:center;gap:7px;text-align:left;padding:10px 12px 10px 9px;font-size:11px;font-weight:700;color:#516b81;cursor:pointer}
.event-mapping-steps button i{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#e4edf5;color:#52718d;font-style:normal;font-size:10px}
.event-mapping-steps button.active{background:#eaf4ff;color:#0876dc;border-left-color:#1685ea}.event-mapping-steps button.active i{background:#1685ea;color:#fff}
.event-mapping-stage{padding:14px 16px;min-width:0}
.event-mapping-stage>section[hidden]{display:none!important}.event-mapping-stage>section.active{display:block}
.event-stage-head{margin-bottom:10px}.event-stage-head p{font-size:10px;color:#71869a;margin:2px 0 0}
.event-stage-head-tools{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.event-stage-head-tools>div:first-child{min-width:0}
.event-map-toolbar{display:flex;gap:6px;align-items:center}.event-map-toolbar input{width:min(310px,36vw);height:32px;border:1px solid #bdcedc;border-radius:3px;padding:0 9px;font-size:11px}.event-map-toolbar select{height:32px;border:1px solid #bdcedc;border-radius:3px;background:#fff;padding:0 24px 0 8px;font-size:11px}
.event-map-input-scroll{max-height:430px;overflow:auto;border:1px solid #d4dee7}
.event-config-table{width:100%;border-collapse:collapse;font-size:11px;color:#294b67}
.event-config-table th{position:sticky;top:0;z-index:2;background:#eef3f7;text-align:left;color:#547087;font-size:10px;font-weight:800;padding:7px 8px;border-bottom:1px solid #cbd8e3}
.event-config-table td{padding:7px 8px;border-bottom:1px solid #dce5ed;vertical-align:middle;background:#fff}
.event-config-table tr:last-child td{border-bottom:0}.event-config-table .check-col{width:52px;text-align:center}.event-config-table .score-col{width:150px}.event-config-table td:first-child:has(input[type="checkbox"]){text-align:center}
.event-config-table input[type="checkbox"]{width:15px;height:15px}
.event-config-table input[type="text"]{height:29px;width:100%;border:1px solid #c2d1de;border-radius:3px;padding:0 7px;font-size:11px}
.event-stage-actions{display:flex;justify-content:space-between;align-items:center;margin-top:10px}.event-stage-actions .admin-primary-btn{min-width:100px;height:34px;border-radius:3px;font-size:11px}.event-stage-actions .admin-text-link{font-size:11px}
.event-map-review-table td:first-child{width:180px}.event-map-review-table ul{margin:0;padding-left:17px;columns:2;column-gap:28px}.event-map-review-table li{padding:2px 0;break-inside:avoid}

.event-scoring-compact{border:1px solid #c7d4df;background:#fff;padding:12px 14px}
.event-scoring-topline{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(160px,.6fr) minmax(180px,.7fr);gap:12px;padding-bottom:12px;border-bottom:1px solid #d6e0e9;margin-bottom:12px}
.event-scoring-fields-table .check-col{width:54px}.event-scoring-fields-table .score-col{width:170px}
.event-inline-note{margin-top:8px;font-size:10px;color:#75899b}

.event-analysis-compact{border:1px solid #c7d4df;background:#fff;min-height:520px}
.event-analysis-toolbar{display:grid;grid-template-columns:190px minmax(180px,360px) auto auto;align-items:center;gap:8px;padding:9px 10px;border-bottom:1px solid #d5dfe8;background:#f8fafc}
.event-analysis-toolbar select,.event-analysis-toolbar input[type="search"]{height:32px;border:1px solid #bdcedc;border-radius:3px;background:#fff;padding:0 8px;font-size:11px}.event-analysis-toolbar label{font-size:10px;color:#526d82;white-space:nowrap}.event-analysis-toolbar .admin-outline-btn{height:32px;padding:0 11px;font-size:10px;border-radius:3px}
.event-analysis-table-scroll{max-height:calc(100vh - 220px);overflow:auto}
.event-analysis-table{font-size:10px;white-space:nowrap}.event-analysis-table th,.event-analysis-table td{padding:6px 8px}.event-analysis-table th small{display:block;font-size:8px;font-weight:600;color:#7d91a4;margin-top:1px}.event-analysis-table .sticky-col{position:sticky;left:0;z-index:4;background:inherit;min-width:135px}.event-analysis-table .sticky-col-2{position:sticky;left:135px;z-index:4;background:inherit;min-width:95px;border-right:1px solid #cdd9e3}

.event-center-compact .admin-primary-btn,.event-center-compact .admin-outline-btn,.event-center-compact input,.event-center-compact select{box-shadow:none!important}
.event-center-compact .event-panel-card,.event-center-compact .admin-card{border-radius:3px!important;box-shadow:none!important}

@media (max-width:1050px){
  .event-center-modal.event-center-compact{width:calc(100vw - 16px);height:calc(100vh - 16px);max-height:calc(100vh - 16px);inset:8px auto auto 50%}
  .event-compact-columns{grid-template-columns:1fr}.event-compact-section+.event-compact-section{border-left:0;border-top:1px solid #d6e0e9}
  .event-mapping-workspace{grid-template-columns:145px minmax(0,1fr)}
  .event-scoring-topline{grid-template-columns:1fr 1fr}.event-scoring-topline label:last-child{grid-column:1/-1}
}
@media (max-width:760px){
  .event-center-title-compact h2{font-size:16px}.event-center-head-actions .admin-danger-outline-btn{display:none}
  .event-center-tabs-compact{overflow-x:auto;display:flex}.event-center-tabs-compact button{min-width:100px;flex:1}
  .event-mapping-workspace{grid-template-columns:1fr}.event-mapping-steps{display:flex;border-right:0;border-bottom:1px solid #d5e0e9;padding:0;overflow-x:auto}.event-mapping-steps button{min-width:150px;border-left:0;border-bottom:3px solid transparent}.event-mapping-steps button.active{border-left:0;border-bottom-color:#1685ea}
  .event-stage-head-tools{display:block}.event-map-toolbar{margin-top:8px}.event-map-toolbar input{width:100%}
  .event-compact-form-grid,.event-scoring-topline{grid-template-columns:1fr}
  .event-analysis-toolbar{grid-template-columns:1fr 1fr}.event-analysis-toolbar input[type="search"]{grid-column:1/-1}
}

/* ==========================================================================
   M3.5.0B50 — Event Center workspace layout fix
   Resolves legacy drawer positioning conflicts and makes the five-tab Event
   editor usable as a real admin workspace on desktop/laptop displays.
   ========================================================================== */
@media (min-width:900px){
  .admin-shell .admin-drawer.event-center-modal.event-center-compact{
    top:14px;
    bottom:14px;
    left:238px;
    right:18px;
    width:auto;
    height:auto;
    max-height:none;
    inset-block:14px;
    border-radius:8px;
    transform:translateX(110%);
  }
  .admin-shell .admin-drawer.event-center-modal.event-center-compact.open{
    transform:translateX(0);
  }
  .admin-shell.is-collapsed .admin-drawer.event-center-modal.event-center-compact{
    left:86px;
  }
}

.event-center-modal.event-center-compact.open{
  box-shadow:0 24px 70px rgba(10,35,57,.24),0 0 0 100vmax rgba(18,42,62,.13);
}
.event-center-body-compact{
  padding:16px 18px 18px;
}
.event-compact-columns{
  grid-template-columns:minmax(0,1.85fr) minmax(300px,1fr);
  align-items:start;
}
.event-schedule-compact{
  grid-template-columns:minmax(0,1.7fr) minmax(320px,1fr);
}
.event-summary-compact{
  background:#fbfcfe;
}
.event-summary-compact h3{
  margin-bottom:4px;
}
.event-summary-compact dl>div{
  min-height:34px;
  align-items:center;
}

/* Mapping is a full-width sequential workspace, not a narrow left-rail drawer. */
.event-mapping-workspace{
  grid-template-columns:minmax(0,1fr);
  min-height:0;
}
.event-mapping-steps{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  border-right:0;
  border-bottom:1px solid #d5e0e9;
  padding:0;
  background:#f6f9fc;
}
.event-mapping-steps button{
  min-height:48px;
  border-left:0;
  border-bottom:3px solid transparent;
  padding:8px 14px;
  justify-content:start;
}
.event-mapping-steps button+button{
  border-left:1px solid #dbe4ec;
}
.event-mapping-steps button.active{
  border-left:0;
  border-bottom-color:#1685ea;
  background:#fff;
}
.event-mapping-stage{
  padding:18px 20px;
}
.event-map-input-scroll{
  max-height:calc(100vh - 295px);
}
.event-map-review-table ul{
  columns:3;
}

/* Scoring and Analysis use the available horizontal workspace. */
.event-scoring-compact,
.event-analysis-compact{
  width:100%;
  min-width:0;
}
.event-scoring-topline{
  grid-template-columns:minmax(260px,1.05fr) minmax(180px,.65fr) minmax(190px,.7fr);
}
.event-scoring-fields-table .check-col{
  width:46px;
}
.event-scoring-fields-table .score-col{
  width:160px;
}
.event-analysis-toolbar{
  grid-template-columns:minmax(180px,220px) minmax(220px,420px) auto auto;
}
.event-analysis-table-scroll{
  max-height:calc(100vh - 205px);
}

@media (max-width:1199px) and (min-width:900px){
  .admin-shell .admin-drawer.event-center-modal.event-center-compact{
    left:228px;
    right:10px;
    top:8px;
    bottom:8px;
    inset-block:8px;
  }
  .admin-shell.is-collapsed .admin-drawer.event-center-modal.event-center-compact{
    left:76px;
  }
  .event-center-body-compact{padding:12px}
  .event-compact-columns,.event-schedule-compact{grid-template-columns:minmax(0,1.55fr) minmax(280px,.9fr)}
  .event-mapping-stage{padding:14px}
  .event-map-review-table ul{columns:2}
}

@media (max-width:899px){
  .admin-shell .admin-drawer.event-center-modal.event-center-compact,
  .admin-shell.is-collapsed .admin-drawer.event-center-modal.event-center-compact{
    top:8px;
    right:8px;
    bottom:8px;
    left:8px;
    width:auto;
    height:auto;
    max-height:none;
    inset-block:8px;
    transform:translateX(110%);
  }
  .admin-shell .admin-drawer.event-center-modal.event-center-compact.open,
  .admin-shell.is-collapsed .admin-drawer.event-center-modal.event-center-compact.open{
    transform:translateX(0);
  }
  .event-compact-columns,.event-schedule-compact{grid-template-columns:1fr}
  .event-compact-section+.event-compact-section{border-left:0;border-top:1px solid #d6e0e9}
  .event-map-review-table ul{columns:1}
}

@media (max-width:760px){
  .event-mapping-steps{display:flex;overflow-x:auto}
  .event-mapping-steps button{min-width:150px;flex:1 0 150px}
  .event-mapping-stage{padding:12px}
}

/* ==========================================================================
   M3.5.0B51 — Event Center mapping + analysis corrections
   ========================================================================== */
.event-analysis-calibration-workspace{
  display:grid;
  gap:16px;
}
.event-analysis-toolbar-calibration{
  grid-template-columns:minmax(210px,280px) minmax(180px,220px) minmax(220px,1fr) auto auto;
  align-items:center;
}
.event-analysis-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.event-analysis-kpi{
  border:1px solid #d7e1ea;
  border-radius:8px;
  background:#fbfcfe;
  padding:14px 16px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.event-analysis-kpi span{
  font-size:12px;
  color:#6a7f92;
  font-weight:600;
}
.event-analysis-kpi strong{
  font-size:24px;
  line-height:1.1;
  color:#24364a;
}
.event-analysis-kpi-input{
  align-items:stretch;
}
.event-analysis-score-input-wrap{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.event-analysis-score-input-wrap input{
  width:100%;
}
.event-analysis-score-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}
.event-analysis-score-actions .admin-text-link{
  padding:0;
  border:0;
  background:transparent;
  cursor:pointer;
}
.event-analysis-detail-grid{
  display:grid;
  grid-template-columns:minmax(320px,1.3fr) minmax(260px,.9fr);
  gap:16px;
  align-items:start;
}
.event-analysis-shot-card,
.event-analysis-focus-card{
  border:1px solid #d7e1ea;
  border-radius:10px;
  background:#fff;
  padding:14px;
}
.event-analysis-section-head h3{
  margin:0 0 4px;
}
.event-analysis-section-head p{
  margin:0;
  color:#6a7f92;
  font-size:13px;
}
.event-analysis-shot-shell{
  margin-top:12px;
  min-height:260px;
  border:1px dashed #d5e0ea;
  border-radius:8px;
  background:#f8fbfd;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  position:relative;
}
.event-analysis-shot-shell img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#fff;
}
.event-analysis-shot-placeholder{
  padding:20px;
  text-align:center;
  color:#6a7f92;
  font-size:13px;
}
.event-analysis-focus-list{
  margin:12px 0 0;
}
.event-analysis-focus-list>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 0;
  border-bottom:1px solid #edf2f6;
}
.event-analysis-focus-list>div:last-child{
  border-bottom:0;
  padding-bottom:0;
}
.event-analysis-focus-list dt{
  color:#6a7f92;
  font-weight:600;
}
.event-analysis-focus-list dd{
  margin:0;
  text-align:right;
  font-weight:700;
  color:#24364a;
}
.event-analysis-table tbody tr{
  cursor:pointer;
}
.event-analysis-table tbody tr:hover{
  background:#f7fbff;
}
.event-analysis-empty-note{
  color:#6a7f92;
  font-size:13px;
}

@media (max-width:1080px){
  .event-analysis-toolbar-calibration{
    grid-template-columns:1fr 1fr;
  }
  .event-analysis-toolbar-calibration input[type="search"]{
    grid-column:1/-1;
  }
  .event-analysis-kpis,
  .event-analysis-detail-grid{
    grid-template-columns:1fr;
  }
}


/* ========================================================================== */
/* SWORD M3.5.0B53 — Event Center stabilization                              */
/* ========================================================================== */
/* Keep the proven B50 workspace geometry. Do not force panels/stepper to fill
   the viewport; that was the source of the B52 stretched Mapping regression. */
.event-mapping-workspace{height:auto;min-height:0}
.event-mapping-stage{overflow:visible;min-height:0}
.event-mapping-stage>section.active{height:auto;min-height:0}
.event-center-body-compact{overflow:auto}
.event-center-body-compact .event-tab-panel.active{height:auto;overflow:visible}
.event-map-input-scroll{height:auto;min-height:0;max-height:calc(100vh - 295px);overflow:auto}
.event-analysis-calibration-workspace{height:auto;grid-template-rows:auto auto auto minmax(0,1fr);gap:10px}
.event-analysis-table-scroll{height:auto;max-height:calc(100vh - 300px)!important;overflow:auto}
.event-analysis-kpis-compact{gap:10px}
.event-analysis-kpis-compact .event-analysis-kpi{min-height:68px;padding:9px 12px;gap:3px}
.event-analysis-kpis-compact .event-analysis-kpi span{font-size:11px}
.event-analysis-kpis-compact .event-analysis-kpi strong{font-size:18px}
.event-analysis-kpis-compact .event-analysis-score-input-wrap{display:grid;grid-template-columns:minmax(150px,1fr) auto;align-items:center;gap:10px}
.event-analysis-kpis-compact .event-analysis-score-actions{display:flex;flex-wrap:nowrap;gap:10px}
.event-stage-actions-end{justify-content:flex-end}

@media(max-width:1080px){
  .event-analysis-kpis-compact .event-analysis-score-input-wrap{grid-template-columns:1fr}
  .event-map-input-scroll{max-height:calc(100vh - 330px)}
}

/* ========================================================================== */
/* SWORD M3.5.0B61 — Mapping single-scroll workspace                         */
/* ========================================================================== */
/* Mapping owns its viewport. The editor body must not create a second,
   permanently-visible scrollbar while the field list already scrolls. */
.event-center-body-compact:has(> .event-tab-panel[data-event-panel="mapping"].active){
  overflow:hidden;
}
.event-tab-panel[data-event-panel="mapping"].active{
  height:100%;
  min-height:0;
  overflow:hidden;
}
.event-tab-panel[data-event-panel="mapping"].active .event-mapping-workspace{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
}
.event-tab-panel[data-event-panel="mapping"].active .event-mapping-steps{
  flex:0 0 auto;
}
.event-tab-panel[data-event-panel="mapping"].active .event-mapping-stage{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.event-tab-panel[data-event-panel="mapping"].active .event-mapping-stage>section.active{
  display:flex!important;
  flex:1 1 auto;
  min-height:0;
  flex-direction:column;
  overflow:hidden;
}
.event-tab-panel[data-event-panel="mapping"].active .event-stage-head,
.event-tab-panel[data-event-panel="mapping"].active .event-stage-actions{
  flex:0 0 auto;
}
.event-tab-panel[data-event-panel="mapping"].active .event-map-input-scroll{
  flex:1 1 auto;
  min-height:0;
  height:auto;
  max-height:none;
  overflow:auto;
}

/* ========================================================================== */
/* SWORD M3.5.0B62 — Analysis value history / apply controls                  */
/* ========================================================================== */
.event-analysis-toolbar-calibration .admin-check-label{
  display:inline-flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  white-space:nowrap;
  margin:0;
  min-height:38px;
}
.event-analysis-toolbar-calibration .admin-check-label input[type="checkbox"]{
  flex:0 0 auto;
  margin:0;
}
.event-analysis-current-kpi .event-analysis-history-value{
  margin-top:2px;
  font-size:11px;
  color:#6a7f92;
  font-weight:500;
}
.event-analysis-apply-row{
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(170px,220px) auto;
  align-items:end;
  gap:12px;
  padding:12px 14px;
  border:1px solid #d7e1ea;
  border-radius:8px;
  background:#fff;
}
.event-analysis-apply-row>label{
  display:flex;
  flex-direction:column;
  gap:5px;
}
.event-analysis-apply-row>label>span{
  font-size:11px;
  font-weight:600;
  color:#6a7f92;
}
.event-analysis-apply-row input{
  width:100%;
}
.event-analysis-apply-row .event-analysis-score-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:nowrap;
  min-height:38px;
}
.event-analysis-apply-row .event-analysis-score-actions .admin-primary-btn{
  white-space:nowrap;
}
.event-analysis-apply-message{
  grid-column:1/-1;
  font-size:12px;
  color:#43647e;
}
.event-analysis-apply-message.is-error{
  color:#b42318;
}
@media(max-width:1100px){
  .event-analysis-apply-row{
    grid-template-columns:1fr 1fr;
  }
  .event-analysis-apply-row .event-analysis-score-actions{
    grid-column:1/-1;
    justify-content:flex-start;
  }
}

/* M3.5.0B63 — keep Analysis apply controls compact; table owns remaining height */
.event-analysis-apply-row{align-self:start;min-height:0;height:auto}


/* ==========================================================================
   M3.5.0B65 — Event Overview separator cleanup
   Keep separators only around the Data sources section.
   ========================================================================== */
.event-tab-panel[data-event-panel="overview"] .event-compact-check-list:not(.event-source-check-list){
  border-top:0;
}
.event-tab-panel[data-event-panel="overview"] .event-compact-check-list:not(.event-source-check-list) label{
  border-bottom:0;
}
.event-tab-panel[data-event-panel="overview"] .event-section-subtitle{
  margin-top:14px!important;
  padding-top:14px;
  padding-bottom:12px;
  border-top:1px solid #dbe4ec;
  border-bottom:1px solid #dbe4ec;
}
.event-tab-panel[data-event-panel="overview"] .event-source-check-list{
  margin-top:0;
  border-top:0;
}
.event-tab-panel[data-event-panel="overview"] .event-source-check-list label{
  border-bottom:0;
}


/* ==========================================================================
   M3.5.0B67 — multi-day event countdown badge                              
   ========================================================================== */
.events-table thead th.has-countdown-badge{position:relative}
.events-table thead th .event-countdown-badge{
  position:absolute;
  top:26px;
  right:7px;
  display:grid;
  place-items:center;
  min-width:20px;
  height:20px;
  padding:0 5px;
  border-radius:999px;
  background:#e34444;
  color:#fff;
  box-shadow:0 1px 2px rgba(91,22,22,.18);
  font-size:9px;
  line-height:1;
  font-weight:900;
  letter-spacing:.01em;
  white-space:nowrap;
  cursor:help;
}


/* ==========================================================================\n   M3.5.0B72 — TB Clan Tools technical / compact admin redesign\n   Approved direction: Edit Event density, table-first presentation, minimal KPI chrome.\n   ========================================================================== */
.tb-tools-admin.tb-tools-compact{
  gap:12px;
}
.tb-tools-admin .tb-tools-toolbar{
  min-height:44px;
  padding:0;
  border-bottom:1px solid #d5e1ec;
  align-items:stretch;
}
.tb-tools-admin .tb-tools-tabs{
  display:flex;
  flex:1 1 auto;
  align-items:stretch;
  gap:0;
  padding:0;
  margin:0;
  background:transparent;
  border-radius:0;
  overflow:visible;
}
.tb-tools-admin .tb-tools-tabs a{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:132px;
  min-height:44px;
  padding:0 18px;
  border-radius:0;
  border-bottom:2px solid transparent;
  color:#526982;
  font-size:13px;
  font-weight:750;
  box-shadow:none;
}
.tb-tools-admin .tb-tools-tabs a:hover{background:#f7faff;color:#1d5f9e}
.tb-tools-admin .tb-tools-tabs a.active{
  color:#0877d8;
  background:#fff;
  border-bottom-color:#1688eb;
  box-shadow:none;
}
.tb-tools-admin .tb-tools-clan-inline{
  align-self:center;
  padding:5px 9px;
  border-radius:8px;
  font-size:12px;
}

/* Shared technical cards */
.tb-tools-admin .tb-tools-table-card,
.tb-tools-admin .tb-tools-panel,
.tb-tools-admin .tb-simple-health,
.tb-tools-admin .tb-simple-hero,
.tb-tools-admin .tb-simple-manage,
.tb-tools-admin .tb-system-checks,
.tb-tools-admin .tb-compact-details{
  border:1px solid #d3dfeb;
  border-radius:10px;
  background:#fff;
  box-shadow:none;
}
.tb-tools-admin .tb-tools-table-card{overflow:hidden}
.tb-tools-admin .tb-tools-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:52px;
  padding:10px 14px;
  border-bottom:1px solid #dce6ef;
}
.tb-tools-admin .tb-tools-card-head h4{margin:0 0 2px;font-size:15px;color:#153b5f}
.tb-tools-admin .tb-tools-card-head p{margin:0;color:#6d8298;font-size:12px;line-height:1.35}
.tb-tools-admin .admin-outline-btn,
.tb-tools-admin .admin-primary-btn{
  min-height:34px;
  padding:6px 11px;
  border-radius:7px;
  font-size:12px;
}

/* Overview: one status strip instead of large KPI cards. */
.tb-tools-admin .tb-technical-health{
  display:grid;
  grid-template-columns:38px minmax(260px,.95fr) minmax(520px,1.75fr);
  align-items:center;
  gap:14px;
  padding:12px 14px;
  border-color:#d2deea;
}
.tb-tools-admin .tb-technical-health.has-issues{border-color:#e8c982;background:#fffdf8}
.tb-tools-admin .tb-technical-health.is-error{border-color:#edc2c2;background:#fffafa}
.tb-tools-admin .tb-simple-health-icon{
  width:34px;
  height:34px;
  border-radius:8px;
  font-size:19px;
}
.tb-tools-admin .tb-health-copy{min-width:0}
.tb-tools-admin .tb-health-copy>span{font-size:10px;letter-spacing:.09em}
.tb-tools-admin .tb-health-copy>strong{font-size:19px;line-height:1.15;margin-top:2px}
.tb-tools-admin .tb-health-copy p{font-size:12px;line-height:1.35;margin-top:3px;white-space:normal}
.tb-tools-admin .tb-health-facts{
  display:grid;
  grid-template-columns:1fr 1.35fr .75fr .8fr;
  border-left:1px solid #dbe4ed;
  min-width:0;
}
.tb-tools-admin .tb-health-facts>div{min-width:0;padding:2px 14px;border-right:1px solid #e0e8f0}
.tb-tools-admin .tb-health-facts>div:last-child{border-right:0}
.tb-tools-admin .tb-health-facts span,
.tb-tools-admin .tb-health-facts small{display:block;color:#73879b;font-size:10.5px}
.tb-tools-admin .tb-health-facts strong{display:block;margin-top:3px;color:#173b5e;font-size:13px;line-height:1.25;overflow-wrap:anywhere}
.tb-tools-admin .tb-health-facts>div:first-child strong{color:#20754d}
.tb-tools-admin .tb-simple-overview-grid{gap:12px}
.tb-tools-admin .tb-tools-panel{padding:12px 14px}
.tb-tools-admin .tb-tools-panel header{margin:0 0 8px;padding-bottom:8px;border-bottom:1px solid #e1e9f0;align-items:flex-start}
.tb-tools-admin .tb-tools-panel header h3{margin:0;font-size:16px;color:#173b5f}
.tb-tools-admin .tb-tools-panel header p{margin:2px 0 0;color:#70849a;font-size:11.5px}
.tb-tools-admin .tb-tools-panel header a{font-size:11.5px}
.tb-tools-admin .tb-simple-metric-row{margin:0 0 7px;gap:0;border-bottom:1px solid #e1e9f0}
.tb-tools-admin .tb-simple-metric-row div{border-top:0;border-right:1px solid #dce6ef;padding:7px 10px 8px}
.tb-tools-admin .tb-simple-metric-row div:first-child{padding-left:0}
.tb-tools-admin .tb-simple-metric-row div:last-child{border-right:0}
.tb-tools-admin .tb-simple-metric-row strong{font-size:20px}
.tb-tools-admin .tb-simple-metric-row span{font-size:10.5px}
.tb-tools-admin .tb-simple-mini-table{font-size:11.5px}
.tb-tools-admin .tb-simple-mini-table th,
.tb-tools-admin .tb-simple-mini-table td{padding:6px 5px}
.tb-tools-admin .tb-simple-mini-table th{font-size:9.5px;letter-spacing:.03em}

/* Collapsed connection management: secondary system control, full controls remain intact when opened. */
.tb-tools-admin .tb-technical-manage{padding:0 14px}
.tb-tools-admin .tb-technical-manage>summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:50px;
  padding:8px 2px;
  list-style:none;
  cursor:pointer;
}
.tb-tools-admin .tb-technical-manage>summary::-webkit-details-marker{display:none}
.tb-tools-admin .tb-technical-manage>summary span{display:flex;flex-direction:column;gap:2px}
.tb-tools-admin .tb-technical-manage>summary strong{color:#173b5f;font-size:14px}
.tb-tools-admin .tb-technical-manage>summary small{color:#74889d;font-size:11px}
.tb-tools-admin .tb-technical-manage>summary b{color:#156fbd;font-size:11.5px}
.tb-tools-admin .tb-technical-manage[open]>summary{margin:0;border-bottom:1px solid #e1e9f0}
.tb-tools-admin .tb-technical-manage>.tb-tools-action-row{margin:12px 0 0;padding:10px 12px;border-radius:8px}

/* Member Scanner / ChestCounter / Log header bars. */
.tb-tools-admin .tb-technical-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  padding:11px 14px;
  min-height:76px;
}
.tb-tools-admin .tb-technical-hero .tb-tools-label{font-size:9.5px;letter-spacing:.09em}
.tb-tools-admin .tb-technical-hero h3{font-size:18px;margin:2px 0 2px}
.tb-tools-admin .tb-technical-hero p{font-size:12px;line-height:1.35}
.tb-tools-admin .tb-technical-hero dl{
  display:flex;
  align-items:stretch;
  gap:0;
  min-width:0;
  margin:0;
  border-left:1px solid #dce6ef;
}
.tb-tools-admin .tb-technical-hero dl div{
  display:block;
  min-width:135px;
  padding:2px 16px;
  border-right:1px solid #e0e8ef;
}
.tb-tools-admin .tb-technical-hero dl div:last-child{border-right:0}
.tb-tools-admin .tb-technical-hero dt{font-size:10.5px;color:#73889d}
.tb-tools-admin .tb-technical-hero dd{margin-top:3px;font-size:13px;white-space:nowrap}

/* Member Scanner metrics are a single technical strip, not four KPI cards. */
.tb-tools-admin .tb-technical-metrics{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:0;
  border:1px solid #d3dfeb;
  border-radius:10px;
  background:#fff;
  overflow:hidden;
}
.tb-tools-admin .tb-technical-metrics article{
  min-height:62px;
  padding:9px 14px;
  border:0;
  border-right:1px solid #dce6ef;
  border-radius:0;
  background:#fff;
}
.tb-tools-admin .tb-technical-metrics article:last-child{border-right:0}
.tb-tools-admin .tb-technical-metrics span{font-size:10.5px}
.tb-tools-admin .tb-technical-metrics strong{font-size:21px;margin-top:2px}
.tb-tools-admin .tb-technical-metrics small{font-size:10px;margin-top:1px}

/* Dense technical tables: match Event editor density. */
.tb-tools-admin .admin-table-wrap{border-radius:0;border:0;box-shadow:none}
.tb-tools-admin .tb-tools-table{min-width:720px;font-size:12px}
.tb-tools-admin .tb-tools-table thead th{
  height:34px;
  padding:6px 10px;
  background:#f3f7fb;
  color:#516b84;
  font-size:10.5px;
  line-height:1.15;
  font-weight:800;
  white-space:nowrap;
}
.tb-tools-admin .tb-tools-table tbody td{
  height:37px;
  padding:6px 10px;
  line-height:1.25;
  vertical-align:middle;
}
.tb-tools-admin .tb-tools-table tbody tr:hover{background:#f8fbfe}
.tb-tools-admin .tb-tools-status{padding:3px 7px;font-size:9.5px}
.tb-tools-admin .tb-comparison-row-state,
.tb-tools-admin .tb-reviewed-badge{padding:3px 6px;font-size:9px}
.tb-tools-admin .tb-review-btn{min-height:30px!important;padding:4px 9px!important}
.tb-tools-admin .tb-tools-empty{padding:18px 10px;font-size:12px}

/* ChestCounter mapping rows: compact and aligned. */
.tb-tools-admin .tb-unmatched-card{border-color:#e5cf9c;background:#fffefa}
.tb-tools-admin .tb-unmatched-row{
  grid-template-columns:minmax(170px,.75fr) 22px minmax(340px,1.55fr) auto;
  gap:9px;
  padding:7px 12px;
  min-height:48px;
}
.tb-tools-admin .tb-unmatched-row select{min-height:34px;height:34px;padding:5px 8px;border-radius:7px;font-size:12px}
.tb-tools-admin .tb-unmatched-row .admin-primary-btn{min-width:110px}

/* Compact secondary sections and pagination. */
.tb-tools-admin .tb-compact-details{border-radius:9px}
.tb-tools-admin .tb-compact-details>summary{min-height:46px;padding:8px 13px}
.tb-tools-admin .tb-compact-details>summary strong{font-size:13px}
.tb-tools-admin .tb-compact-details>summary small{font-size:10.5px}
.tb-tools-admin .tb-compact-details>summary b{font-size:11px}
.tb-tools-admin .tb-simple-pager{padding:8px 12px;font-size:11px}
.tb-tools-admin .tb-simple-pager a{padding:5px 8px;border-radius:6px}
.tb-tools-admin .tb-system-checks{padding:0 13px;border-radius:9px}
.tb-tools-admin .tb-system-checks>summary{min-height:44px;padding:7px 2px;font-size:12px;align-items:center}

/* Review drawer remains fully functional, but visually matches the denser technical shell. */
.tb-tools-admin .tb-review-drawer>header{padding:16px 18px 14px}
.tb-tools-admin .tb-review-drawer h3{font-size:20px}
.tb-tools-admin .tb-review-body{padding:15px 18px;gap:11px}
.tb-tools-admin .tb-review-compare>div,
.tb-tools-admin .tb-review-action{padding:11px 12px;border-radius:9px}
.tb-tools-admin .tb-review-explanation{padding:11px 12px;border-radius:8px;font-size:12px}
.tb-tools-admin .tb-review-action select{min-height:36px;border-radius:7px}

@media(max-width:1180px){
  .tb-tools-admin .tb-technical-health{grid-template-columns:38px minmax(220px,1fr)}
  .tb-tools-admin .tb-health-facts{grid-column:1/-1;border-left:0;border-top:1px solid #dbe4ed;padding-top:9px}
  .tb-tools-admin .tb-technical-hero{grid-template-columns:1fr}
  .tb-tools-admin .tb-technical-hero dl{border-left:0;border-top:1px solid #dce6ef;padding-top:8px}
}
@media(max-width:900px){
  .tb-tools-admin .tb-tools-toolbar{flex-direction:column;gap:7px;padding-bottom:8px}
  .tb-tools-admin .tb-tools-tabs{width:100%;overflow:auto}
  .tb-tools-admin .tb-tools-tabs a{min-width:118px}
  .tb-tools-admin .tb-tools-clan-inline{width:max-content}
  .tb-tools-admin .tb-health-facts{grid-template-columns:1fr 1fr}
  .tb-tools-admin .tb-health-facts>div:nth-child(2){border-right:0}
  .tb-tools-admin .tb-health-facts>div{padding:7px 10px;border-top:1px solid #edf2f6}
  .tb-tools-admin .tb-technical-metrics{grid-template-columns:1fr 1fr}
  .tb-tools-admin .tb-technical-metrics article:nth-child(2){border-right:0}
  .tb-tools-admin .tb-technical-metrics article:nth-child(-n+2){border-bottom:1px solid #dce6ef}
  .tb-tools-admin .tb-unmatched-row{grid-template-columns:1fr}
  .tb-tools-admin .tb-unmatched-row>span{display:none}
}
@media(max-width:620px){
  .tb-tools-admin .tb-technical-health{grid-template-columns:1fr}
  .tb-tools-admin .tb-simple-health-icon{display:none}
  .tb-tools-admin .tb-health-facts{grid-template-columns:1fr}
  .tb-tools-admin .tb-health-facts>div{border-right:0}
  .tb-tools-admin .tb-technical-hero dl{display:grid;grid-template-columns:1fr 1fr}
  .tb-tools-admin .tb-technical-hero dl div{min-width:0;padding:5px 8px}
  .tb-tools-admin .tb-technical-metrics{grid-template-columns:1fr}
  .tb-tools-admin .tb-technical-metrics article{border-right:0;border-bottom:1px solid #dce6ef}
}


/* ==========================================================================
   M3.5.0B76 — Plugin connection compact refinement
   ========================================================================== */
.tb-technical-manage > summary{
  align-items:center;
}
.tb-technical-manage > summary > span{
  display:flex;
  align-items:center;
  min-height:34px;
}
.tb-technical-manage > summary > span small{
  display:none;
}

.tb-device-toolbar{
  align-items:center;
}
.tb-device-toolbar .tb-device-toolbar-copy{
  min-height:36px;
  display:flex;
  align-items:center;
}
.tb-device-toolbar .tb-device-toolbar-copy p{
  display:none;
}

.tb-activation-code{
  margin-top:14px;
  padding:16px 20px;
  min-height:76px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  column-gap:18px;
}
.tb-activation-code > span:first-child{
  white-space:nowrap;
}
.tb-activation-code strong{
  margin-left:8px;
  letter-spacing:.12em;
}
.tb-activation-code small{
  justify-self:end;
  white-space:nowrap;
}

@media (max-width:900px){
  .tb-activation-code{
    grid-template-columns:1fr;
    row-gap:8px;
  }
  .tb-activation-code strong{
    margin-left:0;
  }
  .tb-activation-code small{
    justify-self:start;
  }
}


/* ==========================================================================
   M3.5.0B78 — Approved Plugin connection card
   ========================================================================== */
.tb-plugin-connection-card{overflow:hidden}
.tb-plugin-connection-card > summary{
  min-height:58px;
  padding:0 4px;
  align-items:center;
}
.tb-plugin-connection-card > summary > span{min-height:auto}
.tb-plugin-connection-card > summary strong{font-size:20px}

.tb-plugin-connection-card .tb-device-toolbar{
  margin-top:18px;
  min-height:70px;
  padding:14px 18px;
  border:1px solid #d8e3ee;
  border-radius:12px;
  background:#fff;
}
.tb-plugin-connection-card .tb-device-toolbar h3{
  margin:0;
  font-size:20px;
  line-height:1.2;
}
.tb-plugin-connection-card .tb-device-toolbar form{margin-left:auto}
.tb-plugin-connection-card .tb-device-toolbar .admin-primary-btn{
  min-height:44px;
  padding:0 22px;
}

.tb-activation-card{
  margin-top:14px!important;
  padding:18px 20px!important;
  min-height:84px!important;
  display:grid!important;
  grid-template-columns:auto minmax(240px,1fr) auto!important;
  align-items:center!important;
  column-gap:22px!important;
  border:1px solid #b9dcf7!important;
  border-radius:14px!important;
  background:#f2f9ff!important;
}
.tb-activation-label{
  padding-right:20px;
  border-right:1px solid #c7d9e8;
  color:#58738e;
  font-size:13px;
  font-weight:800;
  letter-spacing:.035em;
  white-space:nowrap;
}
.tb-activation-code-wrap{
  display:flex;
  align-items:center;
  gap:14px;
}
.tb-activation-code-wrap strong{
  margin:0!important;
  color:#164f81;
  font-size:31px;
  line-height:1;
  letter-spacing:.14em;
  font-variant-numeric:tabular-nums;
}
.tb-copy-code-btn{
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border:1px solid #c8dceb;
  border-radius:10px;
  background:#eaf4fc;
  color:#2c79b9;
  cursor:pointer;
}
.tb-copy-code-btn:hover,.tb-copy-code-btn.is-copied{
  background:#dcefff;
  border-color:#9fc9e9;
}
.tb-copy-code-btn svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
}
.tb-activation-expiry{
  min-width:250px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  padding:10px 14px;
  border:1px solid #ccdce9;
  border-radius:10px;
  background:#f7fbfe;
}
.tb-activation-clock{
  font-size:28px;
  line-height:1;
  color:#5d7790;
}
.tb-activation-expiry > span:last-child{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.tb-activation-expiry small{
  color:#6d8296;
  font-size:11px;
  font-weight:700;
}
.tb-activation-expiry strong{
  color:#173b5b;
  font-size:15px;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

.tb-clan-id-warning{
  margin-top:14px;
  padding:12px 16px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:center;
  border:1px solid #efc98c;
  border-radius:10px;
  background:#fff8e8;
  color:#6f4d12;
}
.tb-clan-id-warning strong{white-space:nowrap}
.tb-clan-id-warning a{
  color:#176fbe;
  font-weight:700;
  text-decoration:none;
  white-space:nowrap;
}

@media (max-width:900px){
  .tb-activation-card{
    grid-template-columns:1fr!important;
    row-gap:12px!important;
  }
  .tb-activation-label{
    padding-right:0;
    padding-bottom:10px;
    border-right:0;
    border-bottom:1px solid #c7d9e8;
  }
  .tb-activation-expiry{
    min-width:0;
    justify-content:flex-start;
  }
  .tb-clan-id-warning{grid-template-columns:1fr}
}


/* ==========================================================================
   M3.5.0B79 — Plugin connection UI refinement
   Compact technical hierarchy + unified device action controls.
   ========================================================================== */

/* Header stays quiet and compact. */
.tb-plugin-connection-card > summary{
  min-height:52px;
}
.tb-plugin-connection-card > summary strong{
  font-size:19px;
}

/* Connected devices = one compact operational row. */
.tb-plugin-connection-card .tb-device-toolbar{
  min-height:64px;
  margin-top:14px;
  padding:10px 16px;
  border-radius:10px;
}
.tb-plugin-connection-card .tb-device-toolbar-copy{
  min-height:40px;
}
.tb-plugin-connection-card .tb-device-toolbar h3{
  font-size:18px;
  font-weight:750;
}
.tb-plugin-connection-card .tb-device-toolbar .admin-primary-btn{
  height:40px;
  min-height:40px;
  padding:0 17px;
  border-radius:8px;
  font-size:14px;
  font-weight:700;
}

/* Activation strip: the code is primary; expiry is secondary. */
.tb-plugin-connection-card .tb-activation-card{
  min-height:78px!important;
  margin-top:12px!important;
  padding:14px 18px!important;
  grid-template-columns:auto minmax(260px,1fr) auto!important;
  column-gap:18px!important;
  border-radius:11px!important;
}
.tb-plugin-connection-card .tb-activation-label{
  padding-right:18px;
  font-size:12px;
  letter-spacing:.045em;
}
.tb-plugin-connection-card .tb-activation-code-wrap{
  gap:11px;
}
.tb-plugin-connection-card .tb-activation-code-wrap strong{
  font-size:29px;
  letter-spacing:.13em;
}
.tb-plugin-connection-card .tb-copy-code-btn{
  width:38px;
  height:38px;
  border-radius:8px;
}
.tb-plugin-connection-card .tb-copy-code-btn svg{
  width:18px;
  height:18px;
}

/* Expiry behaves as meta information instead of a competing card. */
.tb-plugin-connection-card .tb-activation-expiry{
  min-width:218px;
  gap:9px;
  padding:7px 10px;
  border-color:#d6e3ed;
  border-radius:8px;
  background:rgba(255,255,255,.42);
}
.tb-plugin-connection-card .tb-activation-clock{
  font-size:21px;
}
.tb-plugin-connection-card .tb-activation-expiry small{
  font-size:10px;
}
.tb-plugin-connection-card .tb-activation-expiry strong{
  font-size:13px;
}

/* Device table density and stable column behaviour. */
.tb-plugin-connection-card .tb-device-table{
  table-layout:auto;
}
.tb-plugin-connection-card .tb-device-table thead th{
  height:38px;
  padding-top:7px;
  padding-bottom:7px;
  white-space:nowrap;
}
.tb-plugin-connection-card .tb-device-table tbody td{
  height:50px;
  padding-top:7px;
  padding-bottom:7px;
  vertical-align:middle;
}
.tb-plugin-connection-card .tb-device-table th:last-child,
.tb-plugin-connection-card .tb-device-table td:last-child{
  width:1%;
  white-space:nowrap;
}

/* One unified action language. */
.tb-device-actions{
  min-width:520px;
}
.tb-device-actions-layout{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
}
.tb-device-rename-group,
.tb-device-danger-group{
  display:flex;
  align-items:center;
}
.tb-device-rename-form{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
}
.tb-device-danger-group{
  gap:8px;
  margin-left:2px;
}
.tb-device-action-form{
  display:inline-flex;
  margin:0;
}

.tb-device-name-input{
  width:200px;
  max-width:200px;
  height:38px;
  padding:0 11px;
  border:1px solid #cbd9e6;
  border-radius:8px;
  background:#fff;
  color:#17344f;
  font:inherit;
  font-size:14px;
  line-height:38px;
  outline:none;
}
.tb-device-name-input:focus{
  border-color:#79afe0;
  box-shadow:0 0 0 2px rgba(31,126,213,.10);
}

.tb-device-btn{
  height:38px;
  min-height:38px;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  font:inherit;
  font-size:14px;
  font-weight:650;
  line-height:1;
  white-space:nowrap;
  cursor:pointer;
}
.tb-device-btn-neutral{
  border:1px solid #c5d5e3;
  background:#fff;
  color:#24445f;
}
.tb-device-btn-neutral:hover{
  background:#f5f9fc;
  border-color:#aebfd0;
}
.tb-device-btn-warning{
  border:1px solid #e2a0a5;
  background:#fffafa;
  color:#b83a42;
}
.tb-device-btn-warning:hover{
  background:#fff1f2;
  border-color:#d97b83;
}
.tb-device-btn-danger{
  border:1px solid #dc7e86;
  background:#fff3f4;
  color:#b62e38;
  font-weight:750;
}
.tb-device-btn-danger:hover{
  background:#ffe8ea;
  border-color:#cc6069;
}

/* Multiple devices remain readable; action controls do not distort the row. */
.tb-plugin-connection-card .tb-device-table tbody tr + tr td{
  border-top-color:#e4ebf2;
}

/* Responsive: keep rename operation together, move connection actions below. */
@media (max-width:1180px){
  .tb-device-actions{
    min-width:340px;
    white-space:normal!important;
  }
  .tb-device-actions-layout{
    flex-direction:column;
    align-items:flex-start;
    gap:7px;
  }
  .tb-device-danger-group{
    margin-left:0;
  }
  .tb-device-name-input{
    width:180px;
    max-width:180px;
  }
}
@media (max-width:900px){
  .tb-plugin-connection-card .tb-device-toolbar{
    min-height:unset;
    align-items:flex-start;
    gap:10px;
  }
  .tb-plugin-connection-card .tb-activation-card{
    grid-template-columns:1fr!important;
    row-gap:10px!important;
  }
  .tb-plugin-connection-card .tb-activation-label{
    padding-right:0;
    padding-bottom:8px;
  }
  .tb-plugin-connection-card .tb-activation-expiry{
    min-width:0;
    width:max-content;
    max-width:100%;
  }
  .tb-device-actions{
    min-width:300px;
  }
}


/* ==========================================================================
   M3.5.0B80 — Activation-code countdown
   ========================================================================== */
.tb-plugin-connection-card .tb-activation-expiry [data-tb-activation-expiry]{
  min-width:54px;
  font-variant-numeric:tabular-nums;
  letter-spacing:.035em;
}
.tb-plugin-connection-card .tb-activation-expiry.is-expired{
  border-color:#e1b8bc;
  background:#fff5f5;
}
.tb-plugin-connection-card .tb-activation-expiry.is-expired,
.tb-plugin-connection-card .tb-activation-expiry.is-expired strong{
  color:#a93a42;
}
.tb-plugin-connection-card .tb-copy-code-btn:disabled{
  opacity:.45;
  cursor:not-allowed;
}


/* ==========================================================================
   M3.5.0B81 — Activation button right alignment
   ========================================================================== */
.tb-plugin-connection-card .tb-device-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.tb-plugin-connection-card .tb-device-toolbar-copy{
  flex:0 1 auto;
}
.tb-plugin-connection-card .tb-device-toolbar form{
  margin-left:auto;
  flex:0 0 auto;
}


/* ==========================================================================
   M3.5.0B82 — Plugin connection visual polish
   ========================================================================== */

/* Reduce nested-card feel and vertical weight. */
.tb-plugin-connection-card .tb-device-toolbar{
  min-height:56px;
  margin-top:10px;
  padding:8px 14px;
  border-radius:8px;
}
.tb-plugin-connection-card .tb-device-toolbar-copy{
  min-height:34px;
}
.tb-plugin-connection-card .tb-device-toolbar h3{
  font-size:17px;
  line-height:1.15;
}
.tb-plugin-connection-card .tb-device-toolbar .admin-primary-btn{
  height:38px;
  min-height:38px;
  padding:0 15px;
  font-size:13.5px;
}

/* Activation strip: slightly calmer hierarchy. */
.tb-plugin-connection-card .tb-activation-card{
  min-height:72px!important;
  margin-top:10px!important;
  padding:12px 16px!important;
  grid-template-columns:auto minmax(230px,1fr) auto!important;
  column-gap:15px!important;
  border-radius:9px!important;
}
.tb-plugin-connection-card .tb-activation-label{
  padding-right:15px;
  font-size:11.5px;
}
.tb-plugin-connection-card .tb-activation-code-wrap{
  gap:9px;
}
.tb-plugin-connection-card .tb-activation-code-wrap strong{
  font-size:27px;
  letter-spacing:.115em;
}
.tb-plugin-connection-card .tb-copy-code-btn{
  width:36px;
  height:36px;
  border-radius:7px;
}
.tb-plugin-connection-card .tb-copy-code-btn svg{
  width:17px;
  height:17px;
}

/* Make the expiry meta area narrower and quieter. */
.tb-plugin-connection-card .tb-activation-expiry{
  min-width:176px;
  gap:8px;
  padding:6px 9px;
  border-radius:7px;
}
.tb-plugin-connection-card .tb-activation-clock{
  font-size:19px;
}
.tb-plugin-connection-card .tb-activation-expiry small{
  font-size:9.5px;
}
.tb-plugin-connection-card .tb-activation-expiry strong{
  font-size:12.5px;
}

/* Tighter device table. */
.tb-plugin-connection-card .tb-device-table thead th{
  height:36px;
  padding-top:6px;
  padding-bottom:6px;
}
.tb-plugin-connection-card .tb-device-table tbody td{
  height:46px;
  padding-top:6px;
  padding-bottom:6px;
}

/* Keep last activity on one line on normal desktop widths. */
.tb-plugin-connection-card .tb-device-table th:nth-child(4),
.tb-plugin-connection-card .tb-device-table td:nth-child(4){
  white-space:nowrap;
}

/* Compact action area. */
.tb-device-actions{
  min-width:470px;
}
.tb-device-actions-layout{
  gap:10px;
}
.tb-device-rename-form{
  gap:7px;
}
.tb-device-danger-group{
  gap:7px;
  margin-left:1px;
}
.tb-device-name-input{
  width:170px;
  max-width:170px;
  height:36px;
  padding:0 10px;
  border-radius:7px;
  font-size:13.5px;
  line-height:36px;
}
.tb-device-btn{
  height:36px;
  min-height:36px;
  padding:0 12px;
  border-radius:7px;
  font-size:13.5px;
}

/* Remove remains visually strongest destructive action, but still subtle. */
.tb-device-btn-danger{
  background:#fff0f1;
  border-color:#d96f78;
}
.tb-device-btn-warning{
  background:#fffafa;
  border-color:#e0a0a5;
}

/* Less empty area at the bottom of the device table. */
.tb-plugin-connection-card .admin-table-wrap{
  margin-top:0;
}
.tb-plugin-connection-card .tb-device-table{
  margin-bottom:0;
}

@media (max-width:1180px){
  .tb-device-actions{
    min-width:320px;
  }
  .tb-device-name-input{
    width:160px;
    max-width:160px;
  }
}

@media (max-width:900px){
  .tb-plugin-connection-card .tb-device-toolbar{
    padding:9px 12px;
  }
  .tb-plugin-connection-card .tb-activation-card{
    grid-template-columns:1fr!important;
    row-gap:9px!important;
  }
  .tb-plugin-connection-card .tb-activation-expiry{
    min-width:0;
  }
}


/* ==========================================================================
   M3.5.0B83 — Members + Security technical redesign
   ========================================================================== */

.members-subnav{
  margin-bottom:14px;
  min-height:42px;
}
.members-subnav a{
  min-width:76px;
  padding:10px 14px;
  font-size:13px;
}

/* Members summary strip */
.member-summary-strip{
  margin-bottom:14px;
  min-height:64px;
  display:grid;
  grid-template-columns:repeat(4,minmax(125px,1fr)) minmax(220px,1.35fr);
  align-items:stretch;
  border:1px solid #d6e1ec;
  border-radius:11px;
  background:#fff;
  overflow:hidden;
}
.member-summary-strip > div{
  position:relative;
  min-width:0;
  padding:11px 18px;
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-rows:auto auto;
  column-gap:8px;
  align-content:center;
}
.member-summary-strip > div + div:before{
  content:"";
  position:absolute;
  left:0;
  top:14px;
  bottom:14px;
  width:1px;
  background:#dce5ee;
}
.member-summary-strip span{
  color:#6b8095;
  font-size:11px;
  font-weight:650;
}
.member-summary-strip strong{
  grid-column:2;
  color:#173a5c;
  font-size:18px;
  line-height:1.05;
  font-variant-numeric:tabular-nums;
}
.member-summary-strip > div:first-child strong{
  grid-column:1 / -1;
  margin-left:26px;
}
.member-summary-dot{
  width:8px;
  height:8px;
  margin-top:2px;
  border-radius:50%;
}
.member-summary-dot.is-active{background:#3fa761}
.member-summary-dot.is-inactive{background:#dc5358}
.member-summary-crown{
  color:#dda51b!important;
  font-size:18px!important;
  line-height:1;
}
.member-summary-sync{
  grid-template-columns:1fr!important;
}
.member-summary-sync strong{
  grid-column:1!important;
  margin-top:3px;
  font-size:14px;
}

/* Members toolbar */
.member-technical-toolbar{
  margin-bottom:12px;
  display:grid;
  grid-template-columns:minmax(300px,1fr) 140px 145px auto 42px;
  gap:10px;
  align-items:center;
}
.member-technical-toolbar .member-toolbar-search,
.member-technical-toolbar .admin-search-wrap{
  width:100%;
  min-width:0;
}
.member-technical-toolbar input,
.member-technical-toolbar select,
.member-technical-toolbar .admin-outline-btn{
  height:40px;
}
.member-refresh-btn{
  width:42px;
  padding:0!important;
  display:grid!important;
  place-items:center;
  font-size:20px!important;
  text-decoration:none;
}

/* Technical table */
.member-technical-card{
  padding:0!important;
  overflow:hidden;
  border-radius:10px!important;
}
.member-compact-table{
  width:100%;
  font-size:12px;
}
.member-compact-table thead th{
  height:36px;
  padding:7px 11px!important;
  background:#f2f6fa;
  color:#536b82;
  font-size:10.5px;
  font-weight:750;
  white-space:nowrap;
}
.member-compact-table tbody td{
  height:36px;
  padding:6px 11px!important;
  vertical-align:middle;
}
.member-compact-table .member-name-link{
  font-size:12px;
  font-weight:750;
}
.member-compact-table .admin-row-btn{
  min-height:28px;
  height:28px;
  padding:0 12px;
  border-radius:6px;
  font-size:11px;
}
.member-compact-table .ap-badge{
  font-size:10px;
  padding:4px 8px;
}
.member-view-btn:before{
  content:"◉";
  margin-right:6px;
  font-size:9px;
}

/* Role group headers */
.member-group-row{
  cursor:pointer;
}
.member-group-row td{
  height:34px!important;
  padding:6px 12px!important;
  background:#edf3f8!important;
  color:#173a5c!important;
  border-top:1px solid #d9e3ec;
  border-bottom:1px solid #d9e3ec;
}
.member-group-row td{
  display:table-cell;
}
.member-group-row strong{
  margin-left:6px;
  font-size:11px;
  letter-spacing:.025em;
}
.member-group-chevron{
  display:inline-block;
  width:14px;
  color:#355b7b;
  font-size:13px;
  transform-origin:center;
  transition:transform .15s ease;
}
.member-group-row.is-collapsed .member-group-chevron{
  transform:rotate(-90deg);
}
.member-group-count{
  display:inline-flex;
  min-width:24px;
  height:20px;
  margin-left:10px;
  padding:0 7px;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#dbe8f5;
  color:#284e70;
  font-size:10px;
  font-weight:800;
}

/* Inactive = separate collapsed section */
.member-inactive-card{
  margin:10px;
  border:1px solid #d9e3ec;
  border-radius:8px;
  overflow:hidden;
  background:#fff;
}
.member-inactive-card > summary{
  min-height:44px;
  padding:0 14px;
  display:flex;
  align-items:center;
  gap:8px;
  list-style:none;
  cursor:pointer;
  background:#f4f7fa;
  color:#173a5c;
}
.member-inactive-card > summary::-webkit-details-marker{display:none}
.member-inactive-card > summary strong{
  font-size:12px;
}
.member-inactive-card > summary small{
  margin-left:8px;
  color:#7a8fa2;
  font-size:10px;
}
.member-inactive-chevron{
  width:14px;
  font-size:19px;
  transition:transform .15s ease;
}
.member-inactive-card[open] .member-inactive-chevron{
  transform:rotate(90deg);
}
.member-inactive-card .admin-table-scroll{
  border-top:1px solid #dce5ed;
}
.member-inactive-table thead th{
  background:#f7f9fb;
}

/* Security monitor strip */
.security-monitor-banner{
  min-height:52px;
  margin-bottom:14px;
  padding:10px 16px;
  border-radius:9px;
}
.security-monitor-banner strong{
  font-size:13px;
}
.security-monitor-banner span:not(.ap-badge){
  font-size:10.5px;
}

/* Security KPI row — compact, exactly four */
.security-kpis{
  gap:10px;
  margin-bottom:14px;
}
.security-kpis .admin-card{
  min-height:78px;
  padding:13px 16px;
  border-radius:9px;
}
.security-kpis .admin-card > span{
  font-size:9.5px;
}
.security-kpis .admin-card > strong{
  margin:5px 0 2px;
  font-size:21px;
}
.security-kpis .admin-card > small{
  font-size:9.5px;
}

/* Security table header + filters */
.member-security-head{
  min-height:64px;
  padding:10px 14px!important;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  border-bottom:1px solid #dde6ee;
}
.member-security-head h2{
  margin:0;
  font-size:15px;
}
.member-security-head p{
  margin:3px 0 0;
  font-size:10px;
}
.member-security-filters{
  display:grid;
  grid-template-columns:minmax(240px,1fr) 120px 120px 120px;
  gap:8px;
  align-items:center;
  width:min(720px,62%);
}
.member-security-filters input,
.member-security-filters select{
  width:100%;
  height:36px;
  padding:0 10px;
  border:1px solid #cad8e5;
  border-radius:7px;
  background:#fff;
  color:#27445f;
  font:inherit;
  font-size:11px;
}
.member-filter-search{min-width:0}
.security-table-card .member-inactive-card{
  margin-top:10px;
}
.member-review-btn{
  min-width:66px;
  text-align:center;
}

/* Small TB permissions note in warning. */
.tb-clan-id-warning-note{
  color:#6f4d12;
  font-weight:700;
  white-space:nowrap;
}

@media (max-width:1100px){
  .member-summary-strip{
    grid-template-columns:repeat(2,1fr);
  }
  .member-summary-sync{
    grid-column:1 / -1;
  }
  .member-technical-toolbar{
    grid-template-columns:1fr 130px 135px auto;
  }
  .member-refresh-btn{grid-column:4}
  .member-security-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .member-security-filters{
    width:100%;
    grid-template-columns:1fr repeat(3,120px);
  }
}
@media (max-width:760px){
  .member-summary-strip{grid-template-columns:1fr}
  .member-summary-strip > div + div:before{display:none}
  .member-technical-toolbar{grid-template-columns:1fr 1fr}
  .member-toolbar-search{grid-column:1 / -1}
  .member-security-filters{grid-template-columns:1fr 1fr}
  .member-filter-search{grid-column:1 / -1}
}


/* ==========================================================================
   M3.5.0B84 — Members active roster / Inactive archive refinement
   ========================================================================== */

/* KPI strip now describes only the active clan roster. */
.member-summary-strip-roster{
  grid-template-columns:repeat(4,minmax(125px,1fr)) minmax(220px,1.35fr);
}
.member-summary-strip-roster > div:first-child strong{
  grid-column:2;
  margin-left:0;
}
.member-summary-strip-roster > div:not(:first-child):not(.member-summary-sync){
  grid-template-columns:1fr;
}
.member-summary-strip-roster > div:not(:first-child):not(.member-summary-sync) strong{
  grid-column:1;
  margin-top:3px;
}

/* Cleaner reusable collapse chevron.
   No text glyphs: this renders consistently across browsers/platforms. */
.member-collapse-chevron{
  display:inline-block;
  width:8px;
  height:8px;
  margin:0 5px 2px 1px;
  border-right:1.7px solid #355b7b;
  border-bottom:1.7px solid #355b7b;
  transform:rotate(45deg);
  transform-origin:center;
  transition:transform .16s ease;
  flex:0 0 auto;
}
.member-group-row.is-collapsed .member-collapse-chevron{
  transform:rotate(-45deg);
}
.member-group-row .member-collapse-chevron{
  vertical-align:middle;
}

/* Inactive is a fully separate card below the active roster. */
.member-inactive-section{
  margin-top:12px;
  overflow:hidden;
}
.member-inactive-card-standalone{
  margin:0;
  border:0;
  border-radius:0;
  background:#fff;
}
.member-inactive-card-standalone > summary{
  min-height:48px;
  padding:0 14px;
  background:#f4f7fa;
  border-bottom:0;
}
.member-inactive-card-standalone[open] > summary{
  border-bottom:1px solid #dce5ed;
}
.member-inactive-card-standalone .member-inactive-chevron-clean{
  transform:rotate(-45deg);
}
.member-inactive-card-standalone[open] .member-inactive-chevron-clean{
  transform:rotate(45deg);
}
.member-inactive-card-standalone > summary strong{
  font-size:12.5px;
}
.member-inactive-card-standalone .admin-table-scroll{
  border-top:0;
}

/* Archive columns are intentionally different from the active roster.
   Give date/elapsed fields enough room without widening the whole page. */
.member-inactive-table th:nth-child(5),
.member-inactive-table td:nth-child(5){
  min-width:142px;
  white-space:nowrap;
}
.member-inactive-table th:nth-child(6),
.member-inactive-table td:nth-child(6){
  min-width:108px;
  text-align:center;
}
.member-inactive-table th:nth-child(7),
.member-inactive-table td:nth-child(7){
  min-width:92px;
  text-align:center;
}
.member-inactive-table th:nth-child(8),
.member-inactive-table td:nth-child(8){
  min-width:142px;
  white-space:nowrap;
}

/* Slightly clearer separation between the active roster and inactive archive. */
.member-inactive-section + *{
  margin-top:12px;
}

@media (max-width:1100px){
  .member-summary-strip-roster{
    grid-template-columns:repeat(2,1fr);
  }
}
@media (max-width:760px){
  .member-summary-strip-roster{
    grid-template-columns:1fr;
  }
}


/* ==========================================================================
   M3.5.0B85 — Security inactive archive separate card
   ========================================================================== */
.security-inactive-section{
  margin-top:12px;
  overflow:hidden;
}
.security-inactive-section .member-inactive-card-standalone{
  margin:0;
}
.security-inactive-section .member-inactive-card-standalone > summary{
  min-height:48px;
}
.security-inactive-section .member-inactive-card-standalone > summary small{
  margin-left:8px;
}
.security-inactive-table thead th{
  background:#f7f9fb;
}


/* ==========================================================================
   M3.5.0B88 — Submissions drawer width + live review countdown
   ========================================================================== */

/* History details need enough room for complete member data and Submitted time. */
.admin-tab-submissions .submission-history-detail-panel{
  width:min(780px,94vw);
}
.admin-tab-submissions .submission-history-drawer-head>button{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  padding:0;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#496c88;
  font:inherit;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}
.admin-tab-submissions .submission-history-drawer-head>button:hover{
  background:#f0f5f8;
}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-member{width:auto}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-value{width:132px}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-submitted{width:148px}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-result{width:84px}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-reviewer{width:118px}
.admin-tab-submissions .submission-history-detail-table col.submission-history-detail-col-status{width:106px}
.admin-tab-submissions .submission-history-detail-table td:first-child{
  min-width:150px;
}
.admin-tab-submissions .submission-history-submitted{
  color:#496b86;
  font-variant-numeric:tabular-nums;
}

/* Current workflow review deadline per submission row. */
.admin-tab-submissions .submission-current-table-v4{
  min-width:1160px;
}
.admin-tab-submissions .submission-current-table-v4 col.submission-col-countdown{
  width:118px;
}
.admin-tab-submissions .submission-time-left-cell{
  white-space:nowrap;
}
.admin-tab-submissions .submission-review-countdown{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 8px;
  border-radius:999px;
  background:#eef5fb;
  color:#315f83;
  font-size:10px;
  font-weight:800;
  font-variant-numeric:tabular-nums;
}
.admin-tab-submissions .submission-review-countdown.is-urgent{
  background:#fff4dd;
  color:#9a6412;
}
.admin-tab-submissions .submission-review-countdown.is-overdue{
  background:#fdebed;
  color:#bf3740;
}

@media(max-width:900px){
  .admin-tab-submissions .submission-history-detail-panel{
    width:min(780px,96vw);
  }
  .admin-tab-submissions .submission-history-detail-table{
    min-width:700px;
  }
}


/* ==========================================================================
   M3.5.0B89 — Event Scoring source selection
   ========================================================================== */
.event-scoring-v89{display:grid;gap:12px;border:0;background:transparent;padding:0}
.event-scoring-v89 .event-scoring-section{border:1px solid #c7d4df;background:#fff;padding:12px 14px}
.event-scoring-v89 .event-scoring-section .event-scoring-topline{margin-bottom:0;border-bottom:0;padding-bottom:0}
.event-scoring-numbered-head{display:flex;align-items:flex-start;gap:10px;margin-bottom:12px}
.event-scoring-numbered-head>i{display:grid;place-items:center;width:26px;height:26px;flex:0 0 26px;border-radius:50%;background:#3478df;color:#fff;font-style:normal;font-size:11px;font-weight:800}
.event-scoring-numbered-head>div{min-width:0}.event-scoring-numbered-head h3{margin:1px 0 2px}.event-scoring-numbered-head p{margin:0}
.event-scoring-source-table .enabled-col{width:105px;text-align:center}.event-scoring-source-table .source-choice-col{width:145px;text-align:center}
.event-scoring-source-table td{vertical-align:middle}.event-scoring-source-table td:first-child strong{display:block;color:#173a58}.event-scoring-source-table td:first-child small{display:block;margin-top:2px;color:#71869a;font-size:10px}
.event-scoring-source-table tbody tr.is-selected{background:#f4f8ff}.event-scoring-source-table tbody tr.is-disabled{opacity:.58}
.event-scoring-source-switch{display:inline-flex;vertical-align:middle}.event-scoring-source-table [data-event-scoring-source]{width:18px;height:18px;margin:0;accent-color:#3478df}
.event-scoring-proof-badge{display:inline-flex;margin-left:8px;padding:3px 7px;border:1px solid #c6d8ef;border-radius:999px;background:#eef5ff;color:#2f68ad;font-size:9px;font-weight:800;white-space:nowrap}
.event-scoring-input-section [data-event-scoring-fields-wrap][hidden]{display:none!important}.event-scoring-input-section .event-inline-note{margin-top:8px}
@media(max-width:800px){.event-scoring-source-table{min-width:720px}}


/* M3.5.0B90 — scoring source validity boundary */
.event-scoring-source-effective-row{
  display:flex;
  align-items:flex-end;
  gap:16px;
  padding:12px 10px 2px;
  border-top:1px solid #dce5ed;
}
.event-scoring-source-effective-row label{
  width:min(280px,100%);
  display:grid;
  gap:6px;
  color:#27445f;
  font-size:11px;
  font-weight:750;
}
.event-scoring-source-effective-row input{
  width:100%;
  height:40px;
  padding:0 11px;
  border:1px solid #cad8e5;
  border-radius:6px;
  background:#fff;
  color:#173a5c;
  font:inherit;
  font-weight:600;
}
.event-scoring-source-effective-row small{
  padding-bottom:10px;
  color:#6f8397;
  font-size:10.5px;
  line-height:1.35;
}
@media(max-width:760px){
  .event-scoring-source-effective-row{align-items:stretch;flex-direction:column;gap:7px}
  .event-scoring-source-effective-row label{width:100%}
  .event-scoring-source-effective-row small{padding-bottom:2px}
}


/* ==========================================================================
   M3.5.0B91 — Complete Member Performance occurrence history
   ========================================================================== */

.admin-member-drawer{
  width:min(980px,94vw);
}

.member-performance-table-wrap{
  overflow:auto;
}

.member-performance-table{
  width:100%;
  min-width:880px;
  table-layout:fixed;
}
.member-performance-table th:nth-child(1),
.member-performance-table td:nth-child(1){width:105px}
.member-performance-table th:nth-child(2),
.member-performance-table td:nth-child(2){width:150px}
.member-performance-table th:nth-child(3),
.member-performance-table td:nth-child(3){width:145px}
.member-performance-table th:nth-child(4),
.member-performance-table td:nth-child(4){width:145px}
.member-performance-table th:nth-child(5),
.member-performance-table td:nth-child(5){width:145px}
.member-performance-table th:nth-child(6),
.member-performance-table td:nth-child(6){width:115px}
.member-performance-table th:nth-child(7),
.member-performance-table td:nth-child(7){width:130px}

.member-performance-table td:nth-child(n+3){
  font-variant-numeric:tabular-nums;
}
.member-performance-table td.is-scoring-source{
  position:relative;
  box-shadow:inset 0 0 0 1px rgba(32,118,188,.24);
}
.member-performance-source-mark{
  display:inline-flex;
  margin-left:5px;
  color:#1675bd;
  font-size:9px;
  font-weight:900;
  vertical-align:middle;
}

/* Keep the existing performance-band color system while making the
   authoritative source visible without adding another table column. */
.member-performance-table tr.performance-above td.is-scoring-source{background:#dff3e7}
.member-performance-table tr.performance-below td.is-scoring-source{background:#f9dfe1}
.member-performance-table tr.performance-near td.is-scoring-source{background:#fff0c7}

@media(max-width:760px){
  .admin-member-drawer{width:96vw}
  .member-performance-table{min-width:880px}
}


/* ==========================================================================
   M3.5.0B92 — Member drawer layout + Performance table visual refinement
   ========================================================================== */

/* Keep the drawer inside the admin content area and cap desktop width at 900px. */
.admin-shell:not(.is-collapsed) .admin-member-drawer{
  width:min(900px,calc(100vw - 244px));
}
.admin-shell.is-collapsed .admin-member-drawer{
  width:min(900px,calc(100vw - 88px));
}

/* Shared internal spacing for Overview / Performance at the new width. */
.admin-member-drawer .admin-drawer-body{
  min-width:0;
}
.admin-member-drawer .member-detail-tabs{
  margin:4px 0 12px;
}
.admin-member-drawer .member-overview-summary{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:0 0 18px;
}
.admin-member-drawer .member-summary-card{
  min-height:64px;
  padding:11px 12px;
}

/* Performance table stays readable without forcing the drawer under the sidebar. */
.admin-member-drawer .member-performance-table-wrap{
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
}
.admin-member-drawer .member-performance-table{
  min-width:860px;
}

/* Table typography is intentionally neutral/dark. Performance meaning is
   carried by the row background only. */
.admin-member-drawer .member-performance-table th{
  color:#273a4b;
}
.admin-member-drawer .member-performance-table td,
.admin-member-drawer .member-performance-table td strong{
  color:#162c3f;
}
.admin-member-drawer .member-performance-table td:first-child{
  color:#162c3f;
}

/* Only low-performance rows retain a tinted background. */
.admin-member-drawer .member-performance-table tr.performance-above,
.admin-member-drawer .member-performance-table tr.performance-near,
.admin-member-drawer .member-performance-table tr.performance-neutral{
  background:#fff;
}
.admin-member-drawer .member-performance-table tr.performance-below{
  background:#fdebec;
}
.admin-member-drawer .member-performance-table tr.performance-above td,
.admin-member-drawer .member-performance-table tr.performance-near td,
.admin-member-drawer .member-performance-table tr.performance-neutral td,
.admin-member-drawer .member-performance-table tr.performance-below td{
  background:transparent;
  color:#162c3f;
}

/* Authoritative-source cell is no longer boxed/blue. The check mark alone
   communicates the source used for this occurrence. */
.admin-member-drawer .member-performance-table td.is-scoring-source{
  box-shadow:none;
  border-color:inherit;
  background:transparent !important;
}
.admin-member-drawer .member-performance-table tr.performance-above td.is-scoring-source,
.admin-member-drawer .member-performance-table tr.performance-below td.is-scoring-source,
.admin-member-drawer .member-performance-table tr.performance-near td.is-scoring-source{
  background:transparent !important;
}
.admin-member-drawer .member-performance-source-mark{
  margin-left:4px;
  color:#2f9d59;
  font-size:10px;
  font-weight:900;
}

/* Do not introduce a third visual state on hover. */
.admin-member-drawer .member-performance-table tbody tr:not(.performance-below):hover{
  background:#f8fafc;
}
.admin-member-drawer .member-performance-table tbody tr.performance-below:hover{
  background:#fdebec;
}

/* Member settings remain two columns at normal drawer width. */
.admin-member-drawer .member-settings-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

@media(max-width:980px){
  .admin-shell:not(.is-collapsed) .admin-member-drawer{
    width:calc(100vw - 236px);
  }
  .admin-shell.is-collapsed .admin-member-drawer{
    width:calc(100vw - 80px);
  }
}

@media(max-width:760px){
  .admin-member-drawer .member-settings-grid{
    grid-template-columns:1fr;
  }
  .admin-member-drawer .member-overview-summary{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:620px){
  .admin-member-drawer .member-overview-summary{
    grid-template-columns:1fr;
  }
  .admin-member-drawer .member-performance-table{
    min-width:860px;
  }
}


/* ========================================================================== 
   M3.5.0B93 — Compact Performance table (no horizontal scrollbar)
   ========================================================================== */

.admin-member-drawer .member-performance-table-wrap{
  max-width:100%;
  overflow-x:hidden;
  overflow-y:auto;
}
.admin-member-drawer .member-performance-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}
.admin-member-drawer .member-performance-table col.member-performance-col-date{width:85px}
.admin-member-drawer .member-performance-table col.member-performance-col-event{width:110px}
.admin-member-drawer .member-performance-table col.member-performance-col-member-input{width:110px}
.admin-member-drawer .member-performance-table col.member-performance-col-chestcounter{width:110px}
.admin-member-drawer .member-performance-table col.member-performance-col-tb{width:110px}
.admin-member-drawer .member-performance-table col.member-performance-col-achievement{width:100px}
.admin-member-drawer .member-performance-table col.member-performance-col-contribution{width:100px}

.admin-member-drawer .member-performance-table th,
.admin-member-drawer .member-performance-table td{
  padding-left:8px;
  padding-right:8px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.admin-member-drawer .member-performance-table td:nth-child(2){
  white-space:nowrap;
}

/* B92 used border-color:inherit on the authoritative cell. Since the cell text
   is dark, that made the Member input row separators visibly darker. Restore
   the regular table separator and leave the green check as the only marker. */
.admin-member-drawer .member-performance-table td.is-scoring-source{
  border-top-color:#e7edf2 !important;
  border-right-color:transparent !important;
  border-bottom-color:transparent !important;
  border-left-color:transparent !important;
  outline:none !important;
  box-shadow:none !important;
}

@media(max-width:620px){
  .admin-member-drawer .member-performance-table{
    min-width:0;
  }
}

/* M3.5.0B95 — Chest Tracker integration v0.1.0 Alpha */
.ct-module{display:flex;flex-direction:column;gap:18px}.ct-hero{align-items:center}.ct-hero-state{display:flex;flex-direction:column;align-items:flex-end;gap:7px}.ct-hero-state small{color:var(--muted,#738196);font-size:12px}.ct-status-pill,.ct-map-status,.ct-sync-status{display:inline-flex;align-items:center;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.04em;padding:5px 9px;white-space:nowrap}.ct-status-pill.connected,.ct-map-linked,.ct-sync-status.success{background:#e9f8ef;color:#147a43}.ct-status-pill.offline,.ct-map-unlinked,.ct-sync-status.error{background:#fff0f0;color:#b63b3b}.ct-map-suggested{background:#edf5ff;color:#2b65ad}.ct-map-conflict{background:#fff4df;color:#9b6100}.ct-map-stale,.ct-sync-status.running{background:#f0f2f5;color:#667085}.ct-tabs{margin-top:-3px}.ct-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}.ct-overview-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);gap:18px}.ct-mapping-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:18px}.ct-mapping-summary>div{border:1px solid var(--admin-border,#e4e8ee);border-radius:12px;padding:14px;background:var(--admin-card,#fff)}.ct-mapping-summary span{display:block;color:var(--muted,#748094);font-size:12px}.ct-mapping-summary strong{display:block;font-size:24px;margin-top:5px}.ct-mapping-summary .warning{border-color:#f0c16f;background:#fffaf0}.ct-status-list{padding:8px 18px 18px;margin:0}.ct-status-list>div{display:grid;grid-template-columns:150px 1fr;gap:15px;padding:10px 0;border-bottom:1px solid var(--admin-border,#edf0f3)}.ct-status-list>div:last-child{border-bottom:0}.ct-status-list dt{color:var(--muted,#748094)}.ct-status-list dd{margin:0;font-weight:600;overflow-wrap:anywhere}.ct-members-table code,.ct-chests-table code{font-size:11px}.ct-map-drawer{z-index:1003}.ct-member-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.ct-member-facts>div{border:1px solid var(--admin-border,#e3e7ed);border-radius:10px;padding:12px}.ct-member-facts span,.ct-map-suggestion span{display:block;color:var(--muted,#748094);font-size:11px;text-transform:uppercase;letter-spacing:.05em}.ct-member-facts strong{display:block;margin-top:4px}.ct-map-suggestion{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:12px;background:#f4f8ff;border:1px solid #dbe7f8}.ct-map-suggestion .admin-primary-btn{align-self:flex-start}.ct-map-form{display:flex;flex-direction:column;gap:12px}.ct-map-form label{display:flex;flex-direction:column;gap:7px;font-weight:700}.ct-map-form select,.ct-filter-bar select,.ct-filter-bar input,.ct-settings-layout input{min-height:40px;border:1px solid var(--admin-border,#d9dee7);border-radius:9px;background:var(--admin-card,#fff);color:inherit;padding:8px 10px}.ct-filter-bar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:16px 18px}.ct-filter-bar label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:700;color:var(--muted,#647085)}.ct-filter-bar label input,.ct-filter-bar label select{min-width:170px}.ct-json-cell{white-space:normal;word-break:break-word;display:block;max-width:520px}.ct-api-response{margin:0;padding:18px;max-height:620px;overflow:auto;font-size:12px;line-height:1.55;background:#0d1522;color:#d7e2ef;border-radius:0 0 14px 14px}.ct-settings-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px}.ct-settings-actions{display:flex;gap:10px;flex-wrap:wrap;padding:0 22px 22px}.ct-settings-actions form{margin:0}.ct-module button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:1100px){.ct-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.ct-overview-grid,.ct-settings-layout{grid-template-columns:1fr}.ct-mapping-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.ct-kpis,.ct-mapping-summary,.ct-member-facts{grid-template-columns:1fr}.ct-hero{align-items:flex-start}.ct-hero-state{align-items:flex-start}.ct-filter-bar{align-items:stretch}.ct-filter-bar label,.ct-filter-bar label input,.ct-filter-bar label select{width:100%;min-width:0}.ct-filter-bar button{width:100%}}

/* SWORD M3.5.0B96 — Chest Tracker member mapping hardening / dense TB Clan Tools presentation */
.ct-members-workspace{display:flex;flex-direction:column;gap:10px}.ct-members-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 12px;background:#fff;border:1px solid #dfe7ef;border-radius:12px}.ct-members-summary{display:flex;align-items:baseline;gap:6px;min-width:0;flex-wrap:wrap;color:#72869a;font-size:12px}.ct-members-summary>strong{font-size:20px;line-height:1;color:#1b4265}.ct-members-summary>b{font-size:13px;color:#526a80}.ct-members-summary>b.ok{color:#168752}.ct-members-summary>b.warn{color:#ae6b00}.ct-members-summary>i{width:1px;height:15px;background:#dbe4ec;margin:0 4px}.ct-members-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 10px;border:1px solid #dfe7ef;border-radius:12px;background:#fff}.ct-status-filters{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.ct-status-filters a{display:inline-flex;align-items:center;gap:6px;text-decoration:none;padding:6px 9px;border-radius:8px;color:#60768b;font-size:11px;font-weight:800}.ct-status-filters a:hover{background:#f2f6fa}.ct-status-filters a.active{background:#eaf3fb;color:#175f99}.ct-status-filters a span{display:inline-flex;min-width:18px;height:18px;align-items:center;justify-content:center;padding:0 5px;border-radius:999px;background:#f0f4f8;color:#667d91;font-size:10px}.ct-status-filters a.active span{background:#fff;color:#175f99}.ct-member-search{display:flex;align-items:center;gap:6px;margin:0}.ct-member-search input{width:260px;min-height:32px;border:1px solid #d8e2eb;border-radius:8px;padding:6px 9px;background:#fff;color:inherit;font-size:12px}.ct-member-search .admin-outline-btn,.ct-compact-btn{padding:6px 9px!important;min-height:30px!important;font-size:11px!important}.ct-clear-search{font-size:11px;font-weight:700;color:#73889b;text-decoration:none}.ct-members-card{margin:0}.ct-members-card .tb-tools-card-head{padding:11px 14px}.ct-row-count{font-size:11px;font-weight:800;color:#6d8396;padding:4px 8px;border:1px solid #dfe7ef;border-radius:7px;background:#f8fafc}.ct-dense-table{min-width:860px;table-layout:fixed}.ct-dense-table th,.ct-dense-table td{padding:8px 10px;font-size:12px;vertical-align:middle}.ct-dense-table th{font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:#72879a}.ct-dense-table th:nth-child(1){width:92px}.ct-dense-table th:nth-child(2){width:27%}.ct-dense-table th:nth-child(3){width:27%}.ct-dense-table th:nth-child(4){width:65px}.ct-dense-table th:nth-child(5),.ct-dense-table th:nth-child(6){width:135px}.ct-dense-table th:nth-child(7){width:76px}.ct-identity-cell{display:flex;flex-direction:column;gap:2px;min-width:0}.ct-identity-cell strong{font-size:12px;color:#223f5a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ct-identity-cell small{display:block;min-width:0;color:#7b8fa2;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ct-identity-cell code{font-size:10px;color:#526d84}.ct-date-cell{font-variant-numeric:tabular-nums;color:#586f84;white-space:nowrap;font-size:11px!important}.ct-action-cell{text-align:right}.ct-row-status-conflict{background:#fffaf1}.ct-row-status-unlinked{background:#fffdfd}.ct-row-status-stale{opacity:.68}.ct-member-facts-dense{grid-template-columns:repeat(2,minmax(0,1fr))}.ct-member-facts-dense>div{padding:10px 12px}.ct-member-facts-dense strong{font-size:12px}.ct-alias-strip{padding:11px 13px;border:1px solid #dce6ef;border-radius:10px;background:#fff}.ct-alias-strip span{display:block;font-size:10px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#7b8fa2}.ct-alias-strip strong{display:block;margin-top:4px;font-size:12px;color:#284a68;overflow-wrap:anywhere}.ct-map-drawer{width:min(560px,94vw)}
@media(max-width:1050px){.ct-members-toolbar,.ct-members-controls{align-items:stretch;flex-direction:column}.ct-member-search{width:100%}.ct-member-search input{flex:1;width:auto}.ct-status-filters{width:100%}}
@media(max-width:700px){.ct-members-summary>i{display:none}.ct-member-search{flex-wrap:wrap}.ct-member-search input{flex-basis:100%}.ct-member-facts-dense{grid-template-columns:1fr}}

/* M3.5.0B97 — Chest Tracker data-dense progression, events and rewards */
.ct-progression-panel{border:1px solid #dfe7ef;border-radius:10px;background:#fbfdff;padding:10px 12px;display:flex;flex-direction:column;gap:9px}.ct-progression-panel>header{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.ct-progression-panel>header strong{font-size:12px;color:#274b68}.ct-progression-panel>header span{font-size:10px;color:#7a8fa2}.ct-progression-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.ct-progression-grid>div{border:1px solid #e3eaf0;border-radius:8px;background:#fff;padding:7px 8px}.ct-progression-grid span{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.05em;color:#7b8fa2}.ct-progression-grid strong{display:block;margin-top:2px;font-size:12px;color:#203f59}.ct-progression-meta{display:flex;gap:12px;flex-wrap:wrap;padding-top:2px;color:#71869a;font-size:10px}.ct-progression-meta b{color:#2b4c66;font-weight:800}.ct-event-table{min-width:820px;table-layout:fixed}.ct-event-table th,.ct-event-table td{padding:8px 10px;font-size:12px}.ct-event-table th:nth-child(1){width:100px}.ct-event-table th:nth-child(2){width:26%}.ct-event-table th:nth-child(3){width:90px}.ct-event-table th:nth-child(4){width:140px}.ct-event-table th:nth-child(5){width:190px}.ct-event-table th:nth-child(6){width:90px}.ct-event-detail-head{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid #dfe7ef;background:#fff;border-radius:12px;padding:11px 14px}.ct-event-detail-head h3{margin:2px 0 0;font-size:16px;color:#203f59}.ct-inline-metrics{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.ct-inline-metrics span{display:inline-flex;align-items:baseline;gap:4px;border:1px solid #e0e8ef;background:#f8fafc;border-radius:8px;padding:5px 8px;color:#72869a;font-size:10px}.ct-inline-metrics span b{font-size:12px;color:#294b65}.ct-inline-metrics span.warn{border-color:#f0d5a5;background:#fffaf1}.ct-event-results-table{min-width:900px;table-layout:fixed}.ct-event-results-table th,.ct-event-results-table td{padding:8px 9px;font-size:11px}.ct-army-inline{white-space:nowrap;color:#506b82;font-weight:700}.ct-raw-details{border:1px solid #dfe7ef;border-radius:12px;overflow:hidden;background:#fff}.ct-raw-details summary{cursor:pointer;padding:10px 13px;font-size:11px;font-weight:800;color:#45647d}.ct-raw-details .ct-api-response{border-radius:0;max-height:420px}.ct-reward-list{display:flex;flex-wrap:wrap;gap:5px}.ct-reward-list span{display:inline-flex;align-items:center;gap:5px;border:1px solid #dfe7ef;border-radius:7px;background:#f8fafc;padding:4px 6px;white-space:nowrap}.ct-reward-list b{font-size:9px;color:#70859a;text-transform:uppercase;letter-spacing:.03em}.ct-reward-list em{font-size:11px;color:#264963;font-style:normal;font-weight:800}.ct-chests-table.ct-dense-table th:nth-child(1){width:155px}.ct-chests-table.ct-dense-table th:nth-child(2){width:190px}.ct-chests-table.ct-dense-table th:nth-child(3){width:92px}.ct-chests-table.ct-dense-table th:nth-child(4){width:55px}.ct-chests-table.ct-dense-table th:nth-child(5){width:150px}.ct-chests-table.ct-dense-table th:nth-child(6){width:auto}
@media(max-width:900px){.ct-progression-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ct-event-detail-head{align-items:flex-start;flex-direction:column}}

/* M3.5.0B98 — Chest Tracker event mapping + scoring source */
.ct-event-map-cell{display:flex;align-items:center;gap:8px;min-width:210px}
.ct-event-map-cell>strong{font-size:12px;white-space:nowrap}
.ct-event-map-cell form{margin:0}
.ct-inline-map-form{display:flex;align-items:center;gap:6px;width:100%}
.ct-inline-map-form select{min-width:145px;max-width:190px;height:30px;padding:3px 28px 3px 8px;font-size:12px}
.ct-inline-map-form .admin-row-btn{white-space:nowrap}
.admin-member-drawer .member-performance-table col.member-performance-col-date{width:78px}
.admin-member-drawer .member-performance-table col.member-performance-col-event{width:104px}
.admin-member-drawer .member-performance-table col.member-performance-col-member-input{width:94px}
.admin-member-drawer .member-performance-table col.member-performance-col-chestcounter{width:94px}
.admin-member-drawer .member-performance-table col.member-performance-col-tb{width:94px}
.admin-member-drawer .member-performance-table col.member-performance-col-ct{width:94px}
.admin-member-drawer .member-performance-table col.member-performance-col-achievement{width:94px}
.admin-member-drawer .member-performance-table col.member-performance-col-contribution{width:98px}

/* B104 Chest Tracker persistent event workspace */
.ct-events-workspace{display:flex;flex-direction:column;gap:12px}.ct-events-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding:10px 12px;background:#fff;border:1px solid #dfe7ef;border-radius:12px}.ct-events-summary{display:flex;align-items:stretch;gap:0;min-width:0}.ct-events-summary>div{padding:0 14px;border-right:1px solid #e2e9ef}.ct-events-summary>div:first-child{padding-left:0}.ct-events-summary>div:last-child{border-right:0}.ct-events-summary span{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.05em;color:#7b8fa2;font-weight:800;white-space:nowrap}.ct-events-summary strong{display:block;margin-top:2px;font-size:15px;color:#274b68}.ct-events-summary strong.ok{color:#188653}.ct-events-summary strong.warn{color:#b06c00}.ct-events-fetch-form{display:flex;align-items:flex-end;gap:7px;margin:0}.ct-events-fetch-form label{display:flex;flex-direction:column;gap:3px}.ct-events-fetch-form label span{font-size:9px;text-transform:uppercase;letter-spacing:.05em;color:#7b8fa2;font-weight:800}.ct-events-fetch-form input{width:142px;min-height:32px;border:1px solid #d8e2eb;border-radius:8px;background:#fff;color:inherit;padding:5px 8px;font-size:11px}.ct-events-fetch-form .admin-primary-btn{min-height:32px!important;padding:6px 12px!important;font-size:11px!important}.ct-events-card{margin:0}.ct-events-card .tb-tools-card-head{padding:10px 13px}.ct-event-index-table{width:100%;table-layout:fixed;min-width:1040px}.ct-event-index-table th,.ct-event-index-table td{padding:7px 9px;font-size:11px;vertical-align:middle}.ct-event-index-table th{font-size:9px;text-transform:uppercase;letter-spacing:.05em;color:#73889b}.ct-event-index-table th:nth-child(1){width:92px}.ct-event-index-table th:nth-child(2){width:185px}.ct-event-index-table th:nth-child(3){width:250px}.ct-event-index-table th:nth-child(4){width:135px}.ct-event-index-table th:nth-child(5){width:82px}.ct-event-index-table th:nth-child(6){width:130px}.ct-event-index-table th:nth-child(7){width:120px}.ct-event-index-table th:nth-child(8){width:82px}.ct-event-link{font-weight:800;color:#176db2;text-decoration:none}.ct-event-link:hover{text-decoration:underline}.ct-event-mapped{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.ct-event-mapped strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#25455f;font-size:11px}.ct-event-mapped form{margin:0;flex:0 0 auto}.ct-event-map-compact{display:flex;align-items:center;gap:5px;margin:0}.ct-event-map-compact select{min-width:0;width:175px;height:28px;border:1px solid #d8e2eb;border-radius:7px;background:#fff;color:#29485f;padding:3px 25px 3px 7px;font-size:10px}.ct-event-map-compact .admin-row-btn{min-height:28px!important;padding:4px 8px!important;font-size:10px!important;white-space:nowrap}.ct-occurrence-compact{display:flex;flex-direction:column;gap:2px;min-width:0}.ct-occurrence-compact strong{font-size:11px;color:#274b68;white-space:nowrap}.ct-occurrence-compact.muted strong,.ct-occurrence-compact.muted span{color:#91a0ad}.ct-occurrence-compact>span:not(.ct-mini-state){font-size:9px;color:#8394a3}.ct-mini-state{display:inline-flex;align-items:center;width:max-content;max-width:100%;padding:3px 6px;border-radius:999px;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.035em;white-space:nowrap}.ct-mini-state.success{background:#e7f7ee;color:#197a49}.ct-mini-state.warning{background:#fff4df;color:#9b6200}.ct-mini-state.danger{background:#fff0f0;color:#b33b3b}.ct-num-cell{text-align:right;font-variant-numeric:tabular-nums;color:#526b80}.ct-points-cell{text-align:right;font-variant-numeric:tabular-nums;font-weight:800;color:#223f59}.ct-member-coverage{display:flex;flex-direction:column;gap:1px}.ct-member-coverage strong{font-size:11px;color:#274b68}.ct-member-coverage span{font-size:9px;color:#6d8799}.ct-member-coverage span.warn{color:#a86900}.ct-empty-state{display:flex;flex-direction:column;gap:3px;padding:22px 14px;color:#7a8da0}.ct-empty-state strong{font-size:12px;color:#3b5870}.ct-empty-state span{font-size:10px}@media(max-width:1150px){.ct-events-toolbar{align-items:stretch;flex-direction:column}.ct-events-fetch-form{justify-content:flex-start}.ct-events-summary{overflow-x:auto}.ct-events-summary>div{flex:0 0 auto}}

/* M3.5.0B105 — CheatTracker API source ownership moved into Events */
.event-ct-source-map{margin:0 0 10px;padding:10px 12px;border:1px solid var(--admin-border,#d7e2ee);border-radius:10px;background:#fff}
.event-ct-source-map label{display:grid;grid-template-columns:minmax(150px,220px) minmax(260px,1fr);align-items:center;gap:8px 14px;margin:0}
.event-ct-source-map label>span{font-size:12px;font-weight:800;color:var(--admin-ink,#17324d)}
.event-ct-source-map select{min-height:36px}
.event-ct-source-map small{grid-column:2;font-size:11px;color:var(--admin-muted,#70859b)}
@media(max-width:900px){.event-ct-source-map label{grid-template-columns:1fr}.event-ct-source-map small{grid-column:1}}

.ct-event-index-table.ct-event-index-source-only{min-width:760px}
.ct-event-index-table.ct-event-index-source-only th:nth-child(1){width:110px}
.ct-event-index-table.ct-event-index-source-only th:nth-child(2){width:auto}
.ct-event-index-table.ct-event-index-source-only th:nth-child(3){width:100px}
.ct-event-index-table.ct-event-index-source-only th:nth-child(4){width:150px}
.ct-event-index-table.ct-event-index-source-only th:nth-child(5){width:150px}
.ct-event-index-table.ct-event-index-source-only th:nth-child(6){width:90px}

/* M3.5.0B110 — member CheatTracker progression */
.member-ct-progression{margin-top:18px;border:1px solid #d8e3ee;border-radius:16px;padding:18px 20px;background:#fbfdff}.member-ct-progression-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px}.member-ct-progression-head h3{margin:0}.member-ct-progression-head span{color:#748ba2;font-size:.9rem}.member-ct-progress-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.member-ct-progress-grid>div{border:1px solid #dbe5ef;border-radius:13px;padding:12px 14px;background:#fff;min-height:74px}.member-ct-progress-grid span{display:block;color:#7188a0;font-size:.82rem;text-transform:uppercase;letter-spacing:.08em}.member-ct-progress-grid strong{display:block;margin-top:5px;font-size:1.2rem;color:#183b5c}.member-ct-progress-meta{display:flex;flex-wrap:wrap;gap:18px;margin-top:14px;color:#7188a0}.member-ct-progress-meta strong{color:#183b5c}.member-ct-unavailable{margin-top:12px;padding:10px 12px;border-radius:10px;background:#f4f7fa;color:#7188a0}.member-ct-progression.is-unavailable .member-ct-progress-grid,.member-ct-progression.is-unavailable .member-ct-progress-meta{opacity:.5}@media(max-width:900px){.member-ct-progress-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.member-ct-progression-head{align-items:flex-start;flex-direction:column;gap:4px}}

/* M3.5.0B111 — CheatTracker UX consolidation */
.ct-module{display:flex;flex-direction:column;gap:12px}
.ct-module .ct-hero{margin-bottom:0}
.ct-module .ct-tabs{margin:0}
.ct-health-strip{display:grid;grid-template-columns:minmax(310px,1.25fr) minmax(0,2.75fr);align-items:stretch;border:1px solid #dbe5ee;border-radius:12px;background:#fff;overflow:hidden}
.ct-health-strip.has-issues{border-color:#ead6ae}
.ct-health-primary{display:flex;align-items:center;gap:12px;padding:13px 16px;border-right:1px solid #e2e9f0}
.ct-health-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:9px;background:#ddf5e7;color:#16834d;font-size:22px;font-weight:900;flex:0 0 auto}
.ct-health-strip.has-issues .ct-health-icon{background:#fff2dc;color:#ad6900}
.ct-health-primary>div{min-width:0}.ct-health-primary strong{display:block;margin-top:1px;color:#173c5d;font-size:19px;line-height:1.1}.ct-health-primary p{margin:3px 0 0;color:#73879a;font-size:11px;line-height:1.3}
.ct-health-facts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:center}.ct-health-facts>div{min-width:0;padding:7px 12px;border-right:1px solid #e2e9f0}.ct-health-facts>div:last-child{border-right:0}.ct-health-facts span,.ct-health-facts small{display:block;color:#758a9f;font-size:9px}.ct-health-facts span{text-transform:uppercase;letter-spacing:.06em;font-weight:800}.ct-health-facts strong{display:block;margin:2px 0;color:#244661;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ct-health-facts small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ct-overview-production{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ct-compact-activity{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-top:1px solid #e4ebf2}.ct-compact-activity>div{padding:9px 13px;border-right:1px solid #e4ebf2}.ct-compact-activity>div:last-child{border-right:0}.ct-compact-activity span{display:block;color:#7a8ea1;font-size:9px;text-transform:uppercase;letter-spacing:.05em;font-weight:800}.ct-compact-activity strong{display:block;margin-top:2px;color:#294963;font-size:11px}
.ct-sync-dataset-list{display:flex;flex-direction:column}.ct-sync-dataset-list>div{display:grid;grid-template-columns:100px 1fr 48px;gap:12px;align-items:center;padding:8px 13px;border-top:1px solid #e4ebf2;font-size:11px}.ct-sync-dataset-list span{font-weight:800;color:#36566f}.ct-sync-dataset-list strong{color:#294963;font-weight:700}.ct-sync-dataset-list em{font-style:normal;text-align:right;color:#8495a4;font-size:10px}
.ct-issues-card{margin:0}.ct-issue-list{display:flex;flex-direction:column}.ct-issue-list>div{display:grid;grid-template-columns:95px minmax(0,1fr) auto;gap:12px;align-items:center;padding:8px 13px;border-top:1px solid #e4ebf2}.ct-issue-list strong{font-size:11px;color:#36556e}.ct-issue-list a{font-size:10px;font-weight:800;color:#176db2;text-decoration:none}
.ct-members-table{min-width:1060px;table-layout:fixed}.ct-members-table th:nth-child(1){width:95px}.ct-members-table th:nth-child(2){width:220px}.ct-members-table th:nth-child(3){width:220px}.ct-members-table th:nth-child(4){width:70px}.ct-members-table th:nth-child(5){width:120px}.ct-members-table th:nth-child(6){width:90px}.ct-members-table th:nth-child(7){width:145px}.ct-members-table th:nth-child(8){width:75px}.ct-army-tier{font-size:12px;color:#174f7d}
.ct-crypt-workspace{display:flex;flex-direction:column;gap:10px}.ct-crypt-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid #dfe7ef;border-radius:12px;background:#fff}.ct-crypt-heading h3{margin:2px 0 1px;color:#183c5c;font-size:17px}.ct-crypt-heading p{margin:0;color:#72879a;font-size:11px}.ct-crypt-fetch-form{display:flex;align-items:flex-end;gap:7px;margin:0}.ct-crypt-fetch-form label{display:flex;flex-direction:column;gap:3px}.ct-crypt-fetch-form label span{font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#788da0}.ct-crypt-fetch-form select,.ct-crypt-fetch-form input{height:32px;border:1px solid #d8e2eb;border-radius:8px;background:#fff;padding:4px 8px;color:#29485f;font-size:11px}.ct-crypt-fetch-form select{min-width:150px}.ct-crypt-fetch-form .admin-primary-btn{height:32px!important;min-height:32px!important;padding:5px 12px!important;font-size:11px!important}
.ct-crypt-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border:1px solid #dfe7ef;border-radius:12px;background:#fff;overflow:hidden}.ct-crypt-kpis>div{padding:9px 12px;border-right:1px solid #e2e9f0}.ct-crypt-kpis>div:last-child{border-right:0}.ct-crypt-kpis span{display:block;color:#7a8ea1;font-size:9px;text-transform:uppercase;letter-spacing:.05em;font-weight:800}.ct-crypt-kpis strong{display:block;margin-top:2px;color:#294a64;font-size:16px}.ct-crypt-kpis .warning strong{color:#a76a00}
.ct-section-tabs{display:flex;align-items:center;border-bottom:1px solid #d9e4ed}.ct-section-tabs button{appearance:none;border:0;border-bottom:2px solid transparent;background:transparent;padding:9px 17px;color:#597189;font-size:11px;font-weight:800;cursor:pointer}.ct-section-tabs button.active{border-bottom-color:#1388e9;color:#0872c7;background:#fff}.ct-crypt-panel{display:none}.ct-crypt-panel.active{display:block}.ct-crypt-activity-table{min-width:1000px;table-layout:fixed}.ct-crypt-activity-table th:nth-child(1){width:145px}.ct-crypt-activity-table th:nth-child(2){width:180px}.ct-crypt-activity-table th:nth-child(3){width:210px}.ct-crypt-activity-table th:nth-child(4){width:240px}.ct-crypt-activity-table th:nth-child(5){width:70px}.ct-crypt-activity-table th:nth-child(6){width:auto}.ct-crypt-summary-table{min-width:760px;table-layout:fixed}.ct-crypt-summary-table th:nth-child(1){width:210px}.ct-crypt-summary-table th:nth-child(2){width:260px}.ct-crypt-summary-table th:nth-child(3){width:auto}.ct-crypt-summary-table th:nth-child(4){width:90px}
.ct-reward-grid{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(0,1.4fr);gap:10px}.ct-reward-total-list{display:flex;flex-direction:column}.ct-reward-total-list>div{display:grid;grid-template-columns:1fr auto;gap:2px 12px;padding:10px 13px;border-top:1px solid #e4ebf2}.ct-reward-total-list span{font-size:11px;font-weight:800;color:#35556d}.ct-reward-total-list strong{font-size:14px;color:#254863}.ct-reward-total-list small{grid-column:1/3;color:#8394a3;font-size:9px}
.ct-event-data-table{min-width:840px;table-layout:fixed}.ct-event-data-table th:nth-child(1){width:105px}.ct-event-data-table th:nth-child(2){width:auto}.ct-event-data-table th:nth-child(3){width:110px}.ct-event-data-table th:nth-child(4){width:150px}.ct-event-data-table th:nth-child(5){width:170px}.ct-event-data-table th:nth-child(6){width:90px}
.ct-api-last{display:flex;align-items:baseline;gap:7px;color:#758a9e;font-size:9px}.ct-api-last span{text-transform:uppercase;letter-spacing:.05em;font-weight:800}.ct-api-last strong{font-size:11px;color:#2c4d67}.ct-api-last small{font-size:9px}.ct-history-table{min-width:1120px}.ct-history-table code{font-size:9px;color:#71879a}
@media(max-width:1250px){.ct-health-strip{grid-template-columns:1fr}.ct-health-primary{border-right:0;border-bottom:1px solid #e2e9f0}.ct-health-facts{grid-template-columns:repeat(3,minmax(0,1fr))}.ct-health-facts>div:nth-child(3){border-right:0}.ct-health-facts>div:nth-child(-n+3){border-bottom:1px solid #e2e9f0}.ct-crypt-toolbar{align-items:stretch;flex-direction:column}.ct-crypt-fetch-form{flex-wrap:wrap}.ct-crypt-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.ct-crypt-kpis>div:nth-child(3){border-right:0}.ct-crypt-kpis>div:nth-child(-n+3){border-bottom:1px solid #e2e9f0}}
@media(max-width:900px){.ct-overview-production,.ct-reward-grid{grid-template-columns:1fr}.ct-health-facts,.ct-crypt-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.ct-health-facts>div,.ct-crypt-kpis>div{border-bottom:1px solid #e2e9f0}.ct-health-facts>div:nth-child(even),.ct-crypt-kpis>div:nth-child(even){border-right:0}.ct-crypt-fetch-form label{flex:1 1 170px}.ct-issue-list>div{grid-template-columns:85px 1fr}.ct-issue-list a{grid-column:2}}

/* M3.5.0B114 — CheastTracker mapping groups */
.event-map-group-row td{background:#f4f8fc;color:#58738e;font-size:12px;letter-spacing:.06em;text-transform:uppercase;font-weight:700;border-top:1px solid #dce7f1;border-bottom:1px solid #dce7f1;padding-top:9px;padding-bottom:9px}

/* M3.5.0B115 — ChestCounter compact landing/history/summary */
.ct-chestcounter-workspace{display:grid;gap:16px}
.ct-chestcounter-hero .tb-tools-card-head{align-items:flex-end;gap:24px}
.ct-chestcounter-refresh{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin-left:auto}
.ct-chestcounter-refresh label{display:grid;gap:5px;font-size:12px;font-weight:700;color:#7088a2}
.ct-chestcounter-refresh input{min-width:145px}
.ct-chestcounter-status{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid #dce7f2;margin-top:14px}
.ct-chestcounter-status>div{padding:13px 16px;border-right:1px solid #dce7f2;display:grid;gap:3px}
.ct-chestcounter-status>div:last-child{border-right:0}
.ct-chestcounter-status span{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#758aa1;font-weight:800}
.ct-chestcounter-status strong{font-size:18px;color:#173754}
.ct-recent-chests-table td{vertical-align:middle}
.ct-reward-inline{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.ct-reward-inline span{display:inline-flex;gap:4px;align-items:center;padding:3px 7px;border:1px solid #d6e2ee;border-radius:8px;background:#f7fafc;font-size:11px;color:#607891;white-space:nowrap}
.ct-reward-inline span b{color:#183955}
.ct-reward-inline em{font-style:normal;color:#71869b;font-size:11px}
.ct-saved-mappings-card .tb-tools-card-head{min-height:62px}
.ct-chestcounter-summary-link{display:flex;justify-content:flex-end}
@media(max-width:980px){
  .ct-chestcounter-hero .tb-tools-card-head{align-items:stretch;flex-direction:column}
  .ct-chestcounter-refresh{margin-left:0}
  .ct-chestcounter-status{grid-template-columns:1fr}
  .ct-chestcounter-status>div{border-right:0;border-bottom:1px solid #dce7f2}
  .ct-chestcounter-status>div:last-child{border-bottom:0}
}

/* M3.5.0B116 — ChestCounter complete data view */
.ct-chestcounter-status .warning strong{color:#a76a00}
.ct-unmatched-wizard{border-color:#ead8b3}.ct-unmatched-wizard .tb-tools-card-head{background:#fffaf1}
.ct-unmatched-row{display:grid;grid-template-columns:minmax(180px,1fr) 24px minmax(260px,1.4fr) auto;gap:10px;align-items:center;padding:10px 14px;border-top:1px solid #e4ebf2;margin:0}
.ct-unmatched-row>div{display:grid;gap:2px}.ct-unmatched-row strong{font-size:12px;color:#294a64}.ct-unmatched-row small{font-size:10px;color:#7b8fa2}.ct-unmatched-row>span{text-align:center;color:#8da0b1;font-weight:800}.ct-unmatched-row select{min-height:34px;border:1px solid #d8e2eb;border-radius:8px;background:#fff;color:#29485f;padding:5px 30px 5px 8px;font-size:11px}
.ct-source-preview-table{min-width:980px;table-layout:fixed}.ct-source-preview-table th:nth-child(1){width:255px}.ct-source-preview-table th:nth-child(2){width:180px}.ct-source-preview-table th:nth-child(3){width:80px}.ct-source-preview-table th:nth-child(4){width:90px}.ct-source-preview-table th:nth-child(5){width:auto}
.ct-content-inline{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.ct-content-inline span{display:inline-flex;align-items:center;gap:4px;padding:3px 7px;border:1px solid #d8e3ee;border-radius:8px;background:#f8fbfd;color:#5e768d;font-size:10px;white-space:nowrap}.ct-content-inline span b{color:#173b59}.ct-content-inline em{font-style:normal;color:#8193a4;font-size:10px}
.ct-recent-chests-table{min-width:980px;table-layout:fixed}.ct-recent-chests-table th:nth-child(1){width:145px}.ct-recent-chests-table th:nth-child(2){width:170px}.ct-recent-chests-table th:nth-child(3){width:300px}.ct-recent-chests-table th:nth-child(4){width:auto}.ct-recent-chests-table th:nth-child(5){width:100px}
@media(max-width:980px){.ct-unmatched-row{grid-template-columns:1fr}.ct-unmatched-row>span{display:none}.ct-unmatched-row .admin-primary-btn{width:100%}}

/* M3.5.0B117 — ChestTracker Overview redesign */
.ct-tabs-row{display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid #d9e4ed}
.ct-tabs-row .ct-tabs{border-bottom:0;flex:1 1 auto;min-width:0}
.ct-menu-api-state{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:3px;padding:4px 2px 7px 12px}
.ct-menu-api-state small{font-size:10px;color:#71879b;white-space:nowrap}
.ct-health-facts-compact{grid-template-columns:repeat(4,minmax(0,1fr))}
.ct-overview-main-grid{align-items:stretch}
.ct-overview-module-card{margin:0;overflow:hidden}
.ct-overview-module-card .tb-tools-card-head{padding:12px 14px}
.ct-overview-module-card .tb-tools-card-head h4{font-size:16px}
.ct-overview-module-card .tb-tools-card-head p{margin-top:2px;font-size:11px}
.ct-overview-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:0 14px 12px;gap:0}
.ct-overview-kpis>div{padding:10px 12px;border:1px solid #e0e8f0;border-right:0;background:#fff}
.ct-overview-kpis>div:first-child{border-radius:10px 0 0 10px}.ct-overview-kpis>div:last-child{border-right:1px solid #e0e8f0;border-radius:0 10px 10px 0}
.ct-overview-kpis>div.warning{background:#fffaf0;border-color:#ead29c}.ct-overview-kpis>div.warning+div{border-left-color:#ead29c}
.ct-overview-kpis strong{display:block;font-size:18px;line-height:1.1;color:#173954}.ct-overview-kpis span{display:block;margin-top:4px;font-size:10px;color:#75899d}
.ct-overview-section-label{padding:8px 14px 5px;border-top:1px solid #e6edf3;color:#36566f;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.045em}
.ct-overview-mini-table{min-width:0;width:100%;table-layout:fixed}.ct-overview-mini-table th,.ct-overview-mini-table td{padding:6px 9px;font-size:10px}.ct-overview-mini-table th{font-size:8px;letter-spacing:.05em}.ct-overview-mini-table td strong{font-size:10px}.ct-overview-chest-table th:nth-child(1){width:135px}.ct-overview-chest-table th:nth-child(2){width:120px}.ct-overview-chest-table th:nth-child(3){width:auto}.ct-overview-chest-table th:nth-child(4){width:92px}
.ct-overview-events-card{margin:0}.ct-overview-event-layout{display:grid;grid-template-columns:455px minmax(0,1fr);align-items:stretch;border-top:1px solid #e6edf3}.ct-overview-event-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;padding:10px 14px;gap:0}.ct-overview-event-kpis>div{padding:10px 12px;border-bottom:1px solid #e3ebf2}.ct-overview-event-kpis>div:nth-child(odd){border-right:1px solid #e3ebf2}.ct-overview-event-kpis strong{display:block;color:#173954;font-size:18px}.ct-overview-event-kpis span{display:block;color:#75899d;font-size:10px;margin-top:3px}.ct-overview-event-layout>.admin-table-wrap{border-left:1px solid #e6edf3}
.ct-overview-bottom-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.ct-overview-sync-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:12px 14px;border-top:1px solid #e6edf3}.ct-overview-sync-grid>div{padding:3px 12px;border-right:1px solid #e3ebf2;min-width:0}.ct-overview-sync-grid>div:first-child{padding-left:0}.ct-overview-sync-grid>div:last-child{border-right:0}.ct-overview-sync-grid strong,.ct-overview-sync-grid span,.ct-overview-sync-grid small{display:block}.ct-overview-sync-grid strong{font-size:11px;color:#2d506a}.ct-overview-sync-grid span{margin-top:5px;font-size:10px;color:#294963;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ct-overview-sync-grid small{margin-top:2px;font-size:9px;color:#8193a3}
@media(max-width:1250px){.ct-tabs-row{align-items:stretch}.ct-menu-api-state{padding-right:4px}.ct-health-facts-compact{grid-template-columns:repeat(2,minmax(0,1fr))}.ct-health-facts-compact>div:nth-child(2){border-right:0}.ct-health-facts-compact>div:nth-child(-n+2){border-bottom:1px solid #e2e9f0}.ct-overview-event-layout{grid-template-columns:360px minmax(0,1fr)}.ct-overview-sync-grid{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:10px}.ct-overview-sync-grid>div:nth-child(2){border-right:0}}
@media(max-width:900px){.ct-tabs-row{flex-direction:column;align-items:stretch}.ct-menu-api-state{align-items:flex-start;border-top:1px solid #e1e8ef;padding:8px 4px}.ct-overview-main-grid,.ct-overview-bottom-grid{grid-template-columns:1fr}.ct-overview-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.ct-overview-kpis>div,.ct-overview-kpis>div:first-child,.ct-overview-kpis>div:last-child{border:1px solid #e0e8f0;border-radius:9px}.ct-overview-event-layout{grid-template-columns:1fr}.ct-overview-event-layout>.admin-table-wrap{border-left:0;border-top:1px solid #e6edf3}.ct-overview-event-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* B119 restricted portal access login notice */
.login-access-restricted{margin:0 0 14px;padding:12px 14px;border:1px solid #efc778;border-radius:10px;background:#fff8e8;color:#6f5318;display:grid;gap:3px}
.login-access-restricted strong{font-size:13px;text-transform:uppercase;letter-spacing:.05em;color:#9a6710}
.login-access-restricted span{font-size:13px;line-height:1.4}

/* M3.5.0B120 – ChestTracker source matrix */
.ct-source-window{display:flex;align-items:center;gap:18px;padding:10px 18px;border-top:1px solid var(--admin-border,#dbe5ee);font-size:13px}.ct-source-window span{color:#6e859b}.ct-source-window small{margin-left:5px}.ct-chestcounter-status{grid-template-columns:repeat(4,minmax(0,1fr))}.ct-source-preview-table td:first-child{min-width:280px}.ct-source-preview-table td:nth-child(3),.ct-source-preview-table td:nth-child(4){white-space:nowrap}.ct-inline-metrics{display:flex;gap:10px;flex-wrap:wrap;padding:12px 16px}.ct-inline-metrics>span{padding:8px 12px;border:1px solid var(--admin-border,#dbe5ee);border-radius:9px;background:#fff}.ct-inline-metrics b{margin-right:4px}
@media(max-width:900px){.ct-chestcounter-status{grid-template-columns:repeat(2,minmax(0,1fr))}.ct-source-window{align-items:flex-start;flex-direction:column;gap:4px}}


/* ==========================================================================
   M3.5.0B136 — Scoring configuration integrity & history
   ========================================================================== */
.event-scoring-integrity-section{display:grid;gap:12px}
.event-scoring-integrity-summary{display:grid;gap:7px}
.event-scoring-integrity-card{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 12px;border:1px solid #c9d8e5;border-radius:7px;background:#f8fbfe}
.event-scoring-integrity-card>div{display:grid;gap:3px}.event-scoring-integrity-card strong{color:#173a58;font-size:12px}.event-scoring-integrity-card small{color:#6e8397;font-size:10px}
.event-scoring-integrity-card.is-ok{border-color:#bfe2cf;background:#f3fbf7}.event-scoring-integrity-card.is-warning{border-color:#ead39b;background:#fffaf0}.event-scoring-integrity-card.is-issue{border-color:#efb9b9;background:#fff5f5}
.event-scoring-integrity-badge{display:inline-flex;align-items:center;min-height:25px;padding:0 9px;border-radius:999px;background:#eaf1f7;color:#39546d;font-size:9px;font-weight:800;white-space:nowrap}
.event-scoring-integrity-card.is-ok .event-scoring-integrity-badge{background:#dff4e8;color:#237548}.event-scoring-integrity-card.is-warning .event-scoring-integrity-badge{background:#fff0c8;color:#8a6200}.event-scoring-integrity-card.is-issue .event-scoring-integrity-badge{background:#fde1e1;color:#a13636}
.event-scoring-integrity-message{padding:8px 10px;border-radius:6px;font-size:10px;line-height:1.35}.event-scoring-integrity-message.is-error{background:#fff1f1;color:#993d3d}.event-scoring-integrity-message.is-warning{background:#fff8e9;color:#7c5b14}
.event-scoring-history-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.event-scoring-history-card{border:1px solid #d1dde7;border-radius:7px;overflow:hidden;background:#fff}
.event-scoring-history-head{display:grid;gap:2px;padding:10px 11px;border-bottom:1px solid #dce6ee;background:#f7fafc}.event-scoring-history-head strong{font-size:11px;color:#27445f}.event-scoring-history-head small{font-size:9.5px;color:#71869a}
.event-scoring-history-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 11px;border-bottom:1px solid #edf2f6}.event-scoring-history-row:last-child{border-bottom:0}
.event-scoring-history-row>span{display:grid;gap:2px;min-width:0}.event-scoring-history-row strong{font-size:10.5px;color:#173a58}.event-scoring-history-row small{font-size:9.5px;color:#74889b}
.event-scoring-history-row em{font-style:normal;font-size:9px;font-weight:800;text-transform:capitalize;color:#61768a}.event-scoring-history-row em.is-current{color:#237548}.event-scoring-history-row em.is-scheduled{color:#2f68ad}.event-scoring-history-row em.is-historical{color:#778a9d}
@media(max-width:900px){.event-scoring-history-grid{grid-template-columns:1fr}.event-scoring-integrity-card{align-items:flex-start;flex-direction:column}}


/* B137 — ChestTracker source catalog availability */
.event-source-availability{
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  padding:2px 7px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.05em;
  vertical-align:middle;
}
.event-source-availability.current{
  background:#e7f7ee;
  color:#167a43;
}
.event-source-availability.historical{
  background:#f2f4f7;
  color:#6b7b8e;
}
.event-source-history-note{
  display:block;
  margin-top:3px;
  color:#7a8ca0;
  font-weight:500;
}
.event-map-row-historical td{
  background:#fafbfc;
  color:#6f8093;
}

/* B143 · ChestTracker conflict visibility */
.admin-nav-conflict-badge{
  margin-left:auto;min-width:19px;height:19px;padding:0 5px;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;
  background:#df3545;color:#fff;font-size:10px;font-weight:800;line-height:1;
  box-shadow:0 0 0 2px rgba(255,255,255,.08);
}
.admin-nav a.active .admin-nav-conflict-badge{background:#ff4353;box-shadow:0 0 0 2px rgba(255,255,255,.16)}
.admin-shell.is-collapsed .admin-nav-conflict-badge{
  position:absolute;right:5px;top:4px;margin:0;min-width:17px;height:17px;padding:0 4px;font-size:9px;
}
.admin-shell.is-collapsed .admin-nav a{position:relative}
.ct-health-facts-b143{grid-template-columns:repeat(5,minmax(0,1fr))}
.ct-health-facts-b143 .warning strong{color:#bd2937}
@media(max-width:1250px){
  .ct-health-facts-b143{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ct-health-facts-b143>div:nth-child(3){border-right:0}
}
@media(max-width:900px){
  .ct-health-facts-b143{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ct-health-facts-b143>div:nth-child(even){border-right:0}
}

/* M3.5.0B144 — ChestTracker Operational UX & Conflict Resolution */
.ct-op-hero{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:18px;align-items:center;padding:22px 24px;border:1px solid #dbe6ef;border-radius:16px;background:#fff;box-shadow:0 6px 18px rgba(25,67,104,.035)}
.ct-op-hero-icon{width:48px;height:48px;border-radius:13px;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:900;background:#eef3f7;color:#52718b}.ct-op-auth .ct-op-hero-icon,.ct-op-offline .ct-op-hero-icon{background:#fff1f1;color:#bd4545}.ct-op-warning .ct-op-hero-icon{background:#fff5df;color:#a96a16}.ct-op-healthy .ct-op-hero-icon{background:#eff5f1;color:#3f7d5c}.ct-op-hero-copy h2{margin:2px 0 5px;font-size:24px;color:#153c60}.ct-op-hero-copy p{margin:0;color:#667f96;max-width:760px}.ct-op-inline-link{display:inline-block;margin-top:8px;font-size:11px;font-weight:800;color:#176ca9;text-decoration:none}.ct-op-inline-link:hover{text-decoration:underline}.ct-op-last{text-align:right;display:flex;flex-direction:column;gap:3px;text-decoration:none;border-left:1px solid #e4ebf1;padding-left:24px;min-width:225px}.ct-op-last:hover strong{color:#176ca9}.ct-op-last span,.ct-op-last small{font-size:11px;color:#7b8fa2}.ct-op-last strong{font-size:14px;color:#274c6c;transition:.15s}
.ct-op-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.ct-op-status-card{display:flex;gap:12px;align-items:center;text-decoration:none;color:inherit;background:#fff;border:1px solid #dfe8ef;border-radius:14px;padding:15px;min-height:108px;transition:.15s;position:relative}.ct-op-status-card:hover{border-color:#cbd9e4;box-shadow:0 5px 16px rgba(31,70,106,.045)}.ct-op-status-card.fresh{border-top-color:#dfe8ef}.ct-op-status-card.delayed{border-top:3px solid #d8a23a}.ct-op-status-card.critical{border-top:3px solid #d45151}.ct-op-card-icon{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:#f1f5f8;color:#526f87;font-weight:900}.ct-op-status-card>div{display:flex;flex-direction:column;min-width:0}.ct-op-status-card small{text-transform:uppercase;letter-spacing:.06em;font-size:10px;font-weight:800;color:#73889b}.ct-op-status-card strong{font-size:18px;color:#183f61;margin:2px 0}.ct-op-status-card span{font-size:11px;color:#60778d}.ct-op-status-card em{font-style:normal;font-size:10px;color:#8a9aab;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ct-op-main-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(360px,.75fr);gap:14px}.ct-op-attention-card,.ct-op-activity-card{overflow:hidden}.ct-op-section-head{padding-bottom:13px}.ct-op-section-head h4{font-size:18px}.ct-op-section-head p{margin-top:3px}.ct-op-attention-list,.ct-op-timeline{padding:0 18px 14px}.ct-op-attention-table,.ct-op-activity-table{display:block}.ct-op-attention-head,.ct-op-activity-head{display:grid;align-items:center;background:#f7f9fb;border-top:1px solid #e8eef3;border-bottom:1px solid #e8eef3;color:#75889a;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.055em;padding:9px 10px}.ct-op-attention-head{grid-template-columns:120px minmax(0,1fr) 80px;gap:14px}.ct-op-attention-row{display:grid;grid-template-columns:120px minmax(0,1fr) 80px;gap:14px;align-items:center;padding:13px 10px;border-bottom:1px solid #edf1f4}.ct-op-attention-row:last-child{border-bottom:0}.ct-op-attention-row strong{font-size:12px;color:#294a67;line-height:1.35}.ct-op-attention-row a{font-size:11px;font-weight:800;color:#1471b9;text-decoration:none;white-space:nowrap;text-align:right}.ct-op-attention-row a:hover{text-decoration:underline}.ct-op-empty-good{padding:24px;display:flex;flex-direction:column;align-items:center;gap:4px;color:#47715a}.ct-op-empty-good span{font-size:12px;color:#789083}.ct-op-activity-head{grid-template-columns:minmax(140px,1fr) minmax(120px,1fr) 72px;gap:10px}.ct-op-activity-row{display:grid;grid-template-columns:minmax(140px,1fr) minmax(120px,1fr) 72px;gap:10px;align-items:center;padding:10px;border-bottom:1px solid #edf1f4;font-size:11px}.ct-op-activity-row:last-of-type{border-bottom:0}.ct-op-time{display:flex;align-items:center;gap:8px;color:#72879a}.ct-op-time i{width:7px;height:7px;border-radius:99px;flex:0 0 7px}.ct-op-time i.ok{background:#35a667}.ct-op-time i.bad{background:#d25353}.ct-op-activity-row strong{color:#2c4b66;font-weight:700}.ct-op-activity-row b{font-size:9px;text-align:right}.ct-op-activity-row b.ok{color:#17834a}.ct-op-activity-row b.bad{color:#bf3f3f}.ct-op-history-link{display:inline-block;margin:3px 18px 16px;font-size:11px;font-weight:800;color:#176ca9;text-decoration:none}.ct-op-history-link:hover{text-decoration:underline}
.ct-mini-state.warning{background:#fff5df!important;color:#9a651a!important}.ct-mini-state.danger{background:#fff0f0!important;color:#bf4242!important}
@media(max-width:1100px){.ct-op-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ct-op-main-grid{grid-template-columns:1fr}.ct-op-hero{grid-template-columns:auto 1fr}.ct-op-last{grid-column:1/3;text-align:left;padding:12px 0 0 66px;border-left:0;border-top:1px solid #e4ebf1}}
@media(max-width:700px){.ct-op-status-grid{grid-template-columns:1fr}.ct-op-hero{grid-template-columns:1fr}.ct-op-hero-icon{display:none}.ct-op-last{grid-column:auto;padding:12px 0 0;border-top:1px solid #e4ebf1;min-width:0}.ct-op-attention-head,.ct-op-activity-head{display:none}.ct-op-attention-row{grid-template-columns:1fr;gap:7px;padding:13px 0}.ct-op-attention-row a{text-align:left}.ct-op-activity-row{grid-template-columns:1fr auto;gap:6px}.ct-op-activity-row .ct-op-time{grid-column:1/3}}
.admin-nav-api-alert{display:inline-flex;width:18px;height:18px;align-items:center;justify-content:center;border-radius:999px;background:#c94040;color:#fff;font-size:11px;font-weight:900;margin-left:auto}.admin-nav-api-alert+.admin-nav-conflict-badge{margin-left:4px}

/* B145 canonical occurrence schedule */
.event-occurrence-preview .occurrence-preview-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.event-occurrence-preview .occurrence-preview-row em{font-style:normal}
.event-occurrence-preview .occurrence-preview-row .event-status-badge{font-size:10px;white-space:nowrap}

/* B146 · Game Cycle configuration + production member scoring reset */
.member-scoring-reset-card{margin:20px 0 24px;padding:22px;border:1px solid #b9d9fb;border-radius:16px;background:linear-gradient(135deg,#f7fbff 0%,#edf7ff 100%);box-shadow:0 8px 24px rgba(27,91,142,.06)}
.member-scoring-reset-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:18px}.member-scoring-reset-head h3{margin:3px 0 6px;font-size:22px;color:#173652}.member-scoring-reset-head p{margin:0;max-width:850px;color:#607b93;line-height:1.45}.settings-kicker{font-size:11px;font-weight:800;letter-spacing:.11em;color:#1773ca}.member-scoring-safe-badge{white-space:nowrap;padding:7px 11px;border-radius:999px;background:#ddf6e8;color:#167440;font-weight:800;font-size:12px}
.member-scoring-reset-grid{display:grid;grid-template-columns:minmax(260px,.7fr) minmax(420px,1.3fr);gap:18px}.member-scoring-reset-grid>label{display:flex;flex-direction:column;gap:7px;font-weight:700;color:#274862}.member-scoring-reset-grid input[type=date]{height:46px;border:1px solid #bfd2e4;border-radius:10px;padding:0 13px;background:#fff;color:#183a56;font:inherit}.member-scoring-reset-grid small{font-weight:500;color:#758da2}.member-scoring-preserve{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px;padding:16px;border:1px solid #d5e4ef;border-radius:12px;background:#fff}.member-scoring-preserve strong{grid-column:1/-1;color:#23445e}.member-scoring-preserve span{font-size:13px;color:#42627c}
.member-scoring-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px;padding:15px;border-radius:12px;background:#fff;border:1px solid #c8ddec}.member-scoring-preview>strong,.member-scoring-preview>p{grid-column:1/-1}.member-scoring-preview>div{display:flex;align-items:baseline;gap:8px}.member-scoring-preview b{font-size:22px;color:#135f9e}.member-scoring-preview span,.member-scoring-preview p{color:#5d778e}.member-scoring-preview p{margin:0}.member-scoring-confirm{display:flex;flex-direction:column;gap:7px;margin-top:14px;color:#274862}.member-scoring-confirm input{height:44px;border:1px solid #bfd2e4;border-radius:10px;padding:0 12px}.settings-maintenance-divider{display:flex;align-items:center;gap:14px;margin:24px 0 18px;color:#8197aa;font-size:12px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}.settings-maintenance-divider:before,.settings-maintenance-divider:after{content:"";height:1px;background:#d5e1ea;flex:1}
@media(max-width:1050px){.member-scoring-reset-grid{grid-template-columns:1fr}.member-scoring-reset-head{flex-direction:column}.member-scoring-preserve{grid-template-columns:1fr}}


/* ========================================================================== 
   M3.5.0B147 — Scheduled portal launch popup (background intentionally unchanged)
   ========================================================================== */
.member-login-card.is-launch-lock{width:320px;min-height:350px;padding:14px 15px 12px;box-sizing:border-box;border:1px solid rgba(91,126,157,.56);border-radius:18px;background:linear-gradient(180deg,rgba(11,34,53,.95),rgba(8,28,44,.97));color:#eef5fb;box-shadow:0 24px 56px rgba(7,26,41,.32),inset 0 1px 0 rgba(255,255,255,.08);backdrop-filter:blur(16px) saturate(115%);-webkit-backdrop-filter:blur(16px) saturate(115%)}
.member-login-card.is-launch-lock h1{text-align:center;color:#fff;font-size:22px;line-height:1.08;margin:0}
.portal-lock-icon{text-align:center;color:#e6ad4f;font-size:18px;line-height:1;margin:0 0 4px}
.member-login-card.is-launch-lock .portal-lock-opens{margin:4px 0 10px;text-align:center;color:#b9c9d8;font-size:13px}
.portal-lock-countdown{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin:0 0 12px}
.portal-lock-countdown>span{display:grid;place-items:center;min-height:50px;padding:5px 3px;border:1px solid rgba(94,137,171,.45);border-radius:9px;background:rgba(6,28,45,.52)}
.portal-lock-countdown b{font:700 21px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#fff;letter-spacing:.02em}
.portal-lock-countdown small{margin-top:4px;color:#a9bdce;font-size:7px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.portal-lock-divider{height:1px;margin:0 0 10px;background:linear-gradient(90deg,transparent,#c38a37 25%,#c38a37 75%,transparent);position:relative}
.portal-lock-divider:after{content:"";position:absolute;left:50%;top:50%;width:6px;height:6px;background:#e5ad4e;border:2px solid #0b263b;transform:translate(-50%,-50%) rotate(45deg)}
.member-login-card.is-launch-lock .login-field{margin:8px 0}
.member-login-card.is-launch-lock .login-field span,.member-login-card.is-launch-lock .login-id-format-help,.member-login-card.is-launch-lock .login-remember{color:#b9c9d8}
.member-login-card.is-launch-lock .login-field span{font-size:10px;margin:0 0 4px}
.member-login-card.is-launch-lock .login-field input{height:40px;font-size:14px;border-color:#45657e;background:rgba(8,31,49,.78);color:#fff}.member-login-card.is-launch-lock .login-field input::placeholder{color:#8ea5b8}
.member-login-card.is-launch-lock .login-id-format-help{display:none}
.member-login-card.is-launch-lock .login-remember{gap:8px;margin:2px 0 10px;font-size:11px}
.member-login-card.is-launch-lock .login-remember input{width:15px;height:15px}
.member-login-card.is-launch-lock .login-primary{height:40px;font-size:14px;color:#fdfaf5}
.member-login-card.is-launch-lock .login-secondary{height:38px;border-color:#385a74;background:rgba(8,31,49,.58);color:#b9d7ef;font-size:13px}
.member-login-card.is-launch-lock .login-motto{display:none}
.member-login-card.is-launch-lock .login-error{margin-bottom:8px;padding:10px 12px;font-size:12px;border-color:#a84b58;background:rgba(107,31,43,.4);color:#ffd9dd}
.settings-portal-launch-control{display:grid;gap:10px}.settings-portal-launch-options{display:grid;grid-template-columns:minmax(210px,320px) minmax(280px,1fr);gap:12px;align-items:end;margin-top:4px}.settings-portal-launch-options>label:first-child{display:grid;gap:5px}.settings-portal-launch-options>label:first-child>span{font-weight:700;color:#24425f}.settings-launch-status{grid-column:1/-1}
@media(max-width:700px){.member-login-card.is-launch-lock{width:min(320px,calc(100vw - 24px));min-height:350px;padding:14px 15px 12px}.settings-portal-launch-options{grid-template-columns:1fr}}

/* ========================================================================== 
   M3.5.0B150.1 — ChestTracker Overview layout correction
   Make the overview a compact operational dashboard: neutral surfaces,
   white information panels, colour reserved for actionable states only.
   ========================================================================== */
.ct-op-hero{padding:18px 22px;gap:16px;border-radius:14px;box-shadow:none;background:#fff}
.ct-op-hero-icon{width:46px;height:46px;border-radius:12px;font-size:22px}
.ct-op-hero-copy h2{font-size:22px;margin:1px 0 4px}.ct-op-hero-copy p{font-size:12px}
.ct-op-last{padding-left:22px;border-left:1px solid #e4ebf1;min-width:245px}
.ct-op-last strong{font-size:13px}.ct-op-last span,.ct-op-last small{font-size:10px}

.ct-op-status-grid{gap:10px}
.ct-op-status-card{min-height:104px;padding:14px 15px;border-radius:12px;box-shadow:none}
.ct-op-status-card:hover{transform:none;box-shadow:0 4px 12px rgba(31,70,106,.05)}
.ct-op-status-card.fresh{border-top-color:#dfe8ef}.ct-op-status-card.delayed{border-top:2px solid #d7a039}.ct-op-status-card.critical{border-top:2px solid #c94c4c}
.ct-op-card-icon{background:#f2f6f9;color:#607b91;width:36px;height:36px;border-radius:9px}
.ct-op-status-card strong{font-size:17px}.ct-op-status-card span{font-size:10px}.ct-op-status-card em{font-size:9px}

.ct-op-main-grid{grid-template-columns:minmax(0,1.42fr) minmax(360px,.78fr);gap:14px;align-items:stretch}
.ct-op-attention-card,.ct-op-activity-card{background:#fff;border:1px solid #dfe8ef;border-radius:14px;overflow:hidden;box-shadow:none;min-width:0}
.ct-op-attention-card .ct-op-section-head,.ct-op-activity-card .ct-op-section-head{padding:15px 18px 10px;margin:0;background:#fff;border:0}
.ct-op-section-head h4{margin:0;font-size:17px;color:#183f61}.ct-op-section-head p{margin:3px 0 0;font-size:11px;color:#72879a}
.ct-op-section-head .ct-row-count{align-self:flex-start;background:#f3f6f8;border:1px solid #e2e8ed;color:#60778b;font-size:10px;padding:4px 8px;border-radius:7px}

.ct-op-attention-list,.ct-op-timeline{padding:0 18px 14px}
.ct-op-attention-list>div,.ct-op-timeline>div{border-bottom:1px solid #edf1f4}
.ct-op-attention-head,.ct-op-activity-head{background:#f6f8fa;border:1px solid #e7edf2!important;border-radius:0;padding:8px 10px!important;margin-bottom:0;text-transform:uppercase;letter-spacing:.05em;color:#6f8396;font-weight:800}
.ct-op-attention-head{grid-template-columns:140px minmax(0,1fr) 90px!important}
.ct-op-attention-head span{font-size:9px}.ct-op-attention-row{grid-template-columns:140px minmax(0,1fr) 90px!important;padding:12px 10px!important}
.ct-op-attention-row strong{font-size:11px;line-height:1.35}.ct-op-attention-row a{text-align:right;white-space:nowrap}
.ct-mini-state{justify-self:start;padding:4px 8px;border-radius:7px;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;background:#eef2f5;color:#536d82}
.ct-mini-state.warning{background:#fff4de;color:#9b640f}.ct-mini-state.danger{background:#fff0f0;color:#b93d3d}

.ct-op-activity-table>div{display:grid!important;grid-template-columns:minmax(170px,.95fr) minmax(130px,1fr) 82px!important;gap:12px!important;padding:10px!important;font-size:10px!important;align-items:center}
.ct-op-activity-head span{font-size:9px!important;color:#6f8396!important}.ct-op-activity-row .ct-op-time{display:flex;align-items:center;gap:8px;color:#72879a;white-space:nowrap}
.ct-op-activity-row strong{font-size:10px}.ct-op-activity-row b{text-align:right;font-size:9px}
.ct-op-history-link{display:inline-flex;margin:0 18px 15px;font-size:10px;font-weight:800;color:#176ca9;text-decoration:none}

.ct-op-empty-good{min-height:150px;justify-content:center;background:#fff}

@media(max-width:1100px){
  .ct-op-main-grid{grid-template-columns:1fr}
  .ct-op-last{border-left:0;border-top:1px solid #e4ebf1;padding:10px 0 0 62px;min-width:0}
}
@media(max-width:700px){
  .ct-op-last{padding-left:0}
  .ct-op-attention-head{display:none!important}
  .ct-op-attention-row{grid-template-columns:1fr auto!important;gap:7px!important}
  .ct-op-attention-row strong{grid-column:1/3}.ct-op-attention-row a{grid-column:2}
  .ct-op-activity-table>div{grid-template-columns:1fr auto!important}.ct-op-activity-head{display:none!important}.ct-op-activity-row strong{grid-column:1}.ct-op-activity-row .ct-op-time{grid-column:1/3}
}

/* ========================================================================== 
   M3.5.0B150.2 — Attention badges: KPI-only + TB Clan Tools nav attention
   ========================================================================== */
.ct-op-hero-icon{font-size:12px;font-weight:900;letter-spacing:.06em;background:#f2f6f9!important;color:#607b91!important}
.ct-op-status-card{position:relative}
.ct-kpi-alert-badge{position:absolute;top:11px;right:11px;width:18px;height:18px;display:grid;place-items:center;border-radius:999px;background:#e6424e;color:#fff;font-size:11px;font-weight:900;line-height:1;box-shadow:0 0 0 2px #fff}
.ct-op-status-card.delayed .ct-kpi-alert-badge,.ct-op-status-card.critical .ct-kpi-alert-badge{background:#e6424e}
.admin-nav-conflict-badge{flex:0 0 auto}

/* B150.3 — ChestTracker Chests Data resolution workspace */
.ct-kpi-alert-badge{color:#fff!important}
.ct-error-icon{width:32px;height:32px;border-radius:999px;background:#ef3e49;color:#fff!important;display:grid;place-items:center;font-size:18px;font-weight:900;line-height:1;flex:0 0 auto}
.ct-error-icon.small{width:23px;height:23px;font-size:13px}
.ct-chests-page{position:relative}.ct-chests-main{display:grid;gap:14px}.ct-chests-page.has-review-drawer .ct-chests-main{margin-right:360px}
.ct-chests-heading{display:flex;justify-content:space-between;align-items:flex-end;padding:0 2px}.ct-chests-heading h2{margin:0;color:#102f4c;font-size:25px}.ct-chests-heading p{margin:3px 0 0;color:#607991;font-size:13px}
.ct-chests-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.ct-chests-kpi{min-height:98px;border:1px solid #dce6ee;border-radius:12px;background:#fff;display:flex;align-items:center;gap:13px;padding:15px;text-decoration:none;color:inherit;position:relative}.ct-chests-kpi-icon{width:40px;height:40px;border-radius:10px;background:#f3f6f9;display:grid;place-items:center;color:#3f617f;font-weight:900}.ct-chests-kpi>div{display:grid;gap:1px}.ct-chests-kpi small{text-transform:uppercase;letter-spacing:.055em;color:#71869a;font-size:10px;font-weight:800}.ct-chests-kpi strong{font-size:22px;color:#153b5d}.ct-chests-kpi em{font-style:normal;font-size:10px;color:#7890a5}.ct-chests-kpi-attention.active{border-color:#ef6269;background:#fffafa}.ct-chests-kpi-attention.active small,.ct-chests-kpi-attention.active strong,.ct-chests-kpi-attention.active em{color:#d9343e}
.ct-chests-attention{overflow:hidden}.ct-chests-attention .tb-tools-card-head{padding:15px 16px 12px}.ct-chests-attention h3,.ct-chests-source-card h3,.ct-chests-recent h3{margin:0;color:#153b5d;font-size:18px}.ct-chests-attention .tb-tools-card-head p,.ct-chests-source-card p,.ct-chests-recent p{margin:3px 0 0;color:#6c8297;font-size:11px}.ct-attention-count{background:#fff0f0;color:#c83a43;border-radius:999px;padding:5px 10px;font-size:10px;font-weight:800}.ct-chests-attention-table th{font-size:9px}.ct-chests-attention-table td{vertical-align:middle}.ct-chests-attention-table tr.is-selected td{background:#fff7f7}.ct-attention-type{display:inline-flex;border-radius:6px;background:#fff0f0;color:#d3323b;padding:4px 7px;font-size:9px;font-weight:900}.ct-review-btn{white-space:nowrap}
.ct-chests-source-card{overflow:hidden}.ct-source-card-top{display:flex;gap:20px;align-items:flex-end;justify-content:space-between;padding:15px 16px 11px}.ct-source-card-top>div{max-width:390px}.ct-source-card-top .ct-chestcounter-refresh{margin-left:auto}.ct-chests-source-card .ct-source-window{padding:9px 16px}.ct-source-status{display:inline-flex;min-width:43px;justify-content:center;border-radius:999px;padding:3px 8px;font-size:9px;font-weight:900;text-transform:uppercase}.ct-source-status.ok{background:#e4f6ea;color:#197d46}.ct-source-status.attention{background:#fff0f0;color:#cf3640}.ct-source-arrow{font-size:22px;font-weight:700;color:#0d76d8;text-decoration:none}.ct-chests-card-footer{padding:9px 16px 12px;border-top:1px solid #edf2f6}.ct-chests-card-footer a,.ct-inline-link{font-size:11px;font-weight:800;color:#0870c9;text-decoration:none}.ct-chests-card-footer a:hover,.ct-inline-link:hover{text-decoration:underline}.ct-row-needs-review td{background:#fffafa}.ct-table-action{font-size:10px;font-weight:800;color:#0b73ca;text-decoration:none;white-space:nowrap}
.ct-chests-recent{overflow:hidden}.ct-chests-recent .tb-tools-card-head{padding:13px 16px 9px}.ct-chests-recent .admin-table{font-size:11px}
.ct-chests-review-drawer{position:fixed;z-index:120;top:0;right:0;width:360px;height:100vh;background:#fff;border-left:1px solid #d8e3ec;box-shadow:-12px 0 28px rgba(21,52,80,.09);display:flex;flex-direction:column}.ct-chests-review-drawer>header{display:flex;justify-content:space-between;gap:12px;padding:18px 18px 14px;border-bottom:1px solid #e5edf3}.ct-chests-review-drawer header h3{margin:0;color:#153550;font-size:18px}.ct-chests-review-drawer header p{margin:4px 0 0;color:#6d8296;font-size:11px;line-height:1.45}.ct-review-close{color:#4c6c87;text-decoration:none;font-size:25px;line-height:1}.ct-review-scroll{padding:16px 18px;overflow:auto;display:grid;gap:18px}.ct-review-scroll section{display:grid;gap:9px}.ct-review-scroll h4{margin:0;color:#173c5c;font-size:13px}.ct-review-facts{margin:0;border:1px solid #dce6ed;border-radius:8px;overflow:hidden}.ct-review-facts>div{display:grid;grid-template-columns:115px 1fr;border-bottom:1px solid #e6edf2}.ct-review-facts>div:last-child{border-bottom:0}.ct-review-facts dt,.ct-review-facts dd{margin:0;padding:7px 9px;font-size:10px}.ct-review-facts dt{background:#f6f8fa;color:#5f7488}.ct-review-facts dd{color:#183d5d;word-break:break-word}.ct-review-unlinked{display:flex;gap:9px;align-items:flex-start;padding:10px;border-radius:8px;background:#fff2f2;color:#c9343d}.ct-review-unlinked strong{font-size:11px}.ct-review-unlinked p{font-size:9px;margin:2px 0 0}.ct-review-search{display:flex;align-items:center;gap:7px;border:1px solid #cad9e5;border-radius:8px;padding:0 9px}.ct-review-search input{border:0!important;box-shadow:none!important;outline:0;width:100%;padding:8px 0;font-size:10px}.ct-review-candidates{border:1px solid #dbe5ed;border-radius:8px;max-height:235px;overflow:auto}.ct-review-candidate{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 8px;border-bottom:1px solid #e7edf2}.ct-review-candidate:last-child{border-bottom:0}.ct-candidate-avatar{width:28px;height:28px;border-radius:999px;background:#eef4f8;display:grid;place-items:center;color:#355a78;font-weight:800}.ct-candidate-name{display:grid}.ct-candidate-name strong{font-size:10px;color:#173b5a}.ct-candidate-name small{font-size:9px;color:#6f8599;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ct-review-candidate .admin-outline-btn{padding:5px 8px;font-size:9px}.ct-review-alt-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ct-review-alt-actions form{display:grid;gap:5px}.ct-review-alt-actions button{width:100%}.ct-review-alt-actions small{font-size:9px;line-height:1.35;color:#71869a}.ct-chests-review-drawer>footer{margin-top:auto;padding:13px 18px;border-top:1px solid #e5edf3;background:#fff}
@media(max-width:1250px){.ct-chests-page.has-review-drawer .ct-chests-main{margin-right:0}.ct-chests-review-drawer{width:380px}.ct-chests-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.ct-chests-kpis{grid-template-columns:1fr}.ct-source-card-top{align-items:stretch;flex-direction:column}.ct-source-card-top .ct-chestcounter-refresh{margin-left:0}.ct-chests-review-drawer{width:min(100vw,390px)}.ct-chests-attention-table th:nth-child(4),.ct-chests-attention-table td:nth-child(4){display:none}}

/* B150.4 — ChestTracker identity resolution + active issue cleanup */
.ct-op-main-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
.ct-op-attention-card,.ct-op-activity-card{min-width:0}
.ct-op-activity-head,.ct-op-activity-row{grid-template-columns:minmax(0,1.25fr) minmax(100px,.9fr) 72px!important}
.ct-op-activity-row>*{min-width:0}
.ct-op-activity-row strong,.ct-op-time{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ct-review-suggestion{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px;border:1px solid #dbe8f2;border-radius:10px;background:#f8fbfd}
.ct-review-suggestion>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.ct-review-suggestion strong{color:#183c5b;font-size:13px}.ct-review-suggestion span{color:#5f7890;font-size:11px}.ct-review-suggestion small{color:#7d90a1;font-size:10px}
.member-external-identities dd{overflow-wrap:anywhere;word-break:break-word}
@media(max-width:1100px){.ct-op-main-grid{grid-template-columns:1fr!important}}

/* ========================================================================
   M3.5.0B151 — Full Admin Mobile Responsive Reconstruction
   Dedicated mobile admin UX. Desktop geometry remains unchanged.
   ======================================================================== */
@media (max-width:767px){
  html,body{max-width:100%;overflow-x:hidden}
  body.admin-mobile-nav-open{overflow:hidden}
  .admin-shell{display:block!important;min-width:0}
  .admin-sidebar{width:min(86vw,320px)!important;max-width:320px!important;box-shadow:16px 0 38px rgba(4,26,45,.22)}
  .admin-workspace{width:100%;min-width:0;padding:0 12px 22px!important;overflow-x:hidden}
  .admin-page-head{position:sticky;top:0;z-index:55;display:grid!important;grid-template-columns:48px minmax(0,1fr);gap:0 10px;align-items:center;min-height:76px;padding:9px 0!important;background:#eef4f9;border-bottom:1px solid #d9e4ed}
  .admin-page-head>div:nth-child(2){min-width:0}
  .admin-breadcrumb{display:none!important}
  .admin-page-head h1{margin:0!important;font-size:24px!important;line-height:1.05!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .admin-head-actions{grid-column:2;justify-self:start!important;margin-top:-4px;min-width:0}
  .admin-game-day{font-size:12px!important;white-space:nowrap}.admin-game-day strong{display:none}.admin-game-day b{font-weight:600}.admin-game-day em{font-style:normal;color:#0874cf;font-weight:800}
  .admin-mobile-menu{display:grid!important;place-items:center;width:44px;height:44px;padding:9px;border-radius:11px;background:#fff;box-shadow:0 4px 12px rgba(25,60,90,.06)}
  .admin-mobile-menu span{width:22px;margin:2px 0}

  .admin-subnav,.tb-tools-tabs,.ct-tabs,.ct-section-tabs,.member-detail-tabs{display:flex!important;max-width:100%;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:none;-webkit-overflow-scrolling:touch;gap:4px}
  .admin-subnav::-webkit-scrollbar,.tb-tools-tabs::-webkit-scrollbar,.ct-tabs::-webkit-scrollbar,.ct-section-tabs::-webkit-scrollbar,.member-detail-tabs::-webkit-scrollbar{display:none}
  .admin-subnav a,.tb-tools-tabs a,.ct-tabs a,.member-detail-tabs button{flex:0 0 auto;min-height:44px;padding:10px 16px!important}
  .ct-tabs-row{display:block!important}.ct-menu-api-state{margin-top:7px!important;display:flex;justify-content:flex-end}

  .admin-card,.tb-tools-table-card{border-radius:12px!important}
  .admin-card{padding:12px!important}
  .admin-toolbar{gap:8px!important}
  .admin-table-scroll,.admin-table-wrap{max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
  .admin-data-table,.admin-table{font-size:12px}
  .admin-data-table th,.admin-data-table td,.admin-table th,.admin-table td{padding:9px 10px}

  /* Members: approved 2x2 KPI layout and one-line controls. */
  .member-summary-strip-roster{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;background:transparent!important;border:0!important;overflow:visible!important}
  .member-summary-strip-roster>div{min-height:92px!important;padding:11px 12px!important;border:1px solid #d9e4ed!important;border-radius:12px!important;background:#fff!important;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto 1fr!important;align-items:start!important;position:relative}
  .member-summary-strip-roster>div+div:before{display:none!important}
  .member-summary-strip-roster span{font-size:12px!important}
  .member-summary-strip-roster strong{grid-column:1!important;align-self:center;justify-self:center;margin:0!important;font-size:32px!important;line-height:1!important;text-align:center}
  .member-summary-strip-roster .member-summary-sync{grid-column:1/-1!important;min-height:64px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;text-align:center}
  .member-summary-strip-roster .member-summary-sync span{margin:0!important}.member-summary-strip-roster .member-summary-sync strong{font-size:17px!important;align-self:auto!important;justify-self:auto!important}
  .member-technical-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) 104px 44px!important;gap:7px!important;margin-bottom:10px!important}
  .member-technical-toolbar .member-toolbar-search{grid-column:auto!important;min-width:0}.member-technical-toolbar input{min-width:0!important;width:100%;padding-left:11px!important}
  .member-technical-toolbar select[data-column="role"]{display:block!important;width:104px!important;min-width:0!important;padding:0 8px!important}
  .member-technical-toolbar select[data-column="status"],.member-refresh-btn{display:none!important}
  .member-technical-toolbar [data-column-picker]{width:44px!important;min-width:44px!important;padding:0!important;font-size:0!important;display:grid!important;place-items:center}
  .member-technical-toolbar [data-column-picker]::before{content:"☷";font-size:22px;line-height:1;color:#244963;transform:rotate(90deg)}

  /* Members table becomes a compact touch list. */
  .member-technical-card{border:0!important;background:transparent!important;overflow:visible!important}
  .member-compact-table{display:block!important;background:transparent!important}.member-compact-table thead{display:none!important}.member-compact-table tbody{display:block!important}
  .member-compact-table tr[data-member-group]{display:grid!important;grid-template-columns:44px minmax(0,1fr) auto;grid-template-rows:auto auto;column-gap:10px;align-items:center;position:relative;margin:0;background:#fff;border:0;border-bottom:1px solid #e2e9ef;padding:10px 44px 10px 12px;min-height:72px}
  .member-compact-table tr[data-member-group] td{display:none!important;border:0!important;padding:0!important;height:auto!important;background:transparent!important}
  .member-compact-table tr[data-member-group] td[data-col="nickname"],.member-compact-table tr[data-member-group] td[data-col="tb_id"],.member-compact-table tr[data-member-group] td[data-col="status"],.member-compact-table tr[data-member-group] td[data-col="actions"]{display:block!important}
  .member-compact-table tr[data-member-group] td[data-col="nickname"]{grid-column:2;grid-row:1;font-size:15px}.member-compact-table tr[data-member-group] td[data-col="tb_id"]{grid-column:2;grid-row:2;color:#768b9f;font-size:12px;margin-top:2px}
  .member-compact-table tr[data-member-group] td[data-col="status"]{position:absolute;left:42px;top:10px}.member-compact-table tr[data-member-group] td[data-col="status"] .ap-badge{width:9px;height:9px;padding:0;font-size:0;border-radius:50%;display:block;background:#39ae62}
  .member-compact-table tr[data-member-group] td[data-col="actions"]{position:absolute;right:9px;top:16px}.member-compact-table .member-view-btn{width:34px!important;height:40px!important;min-width:34px!important;padding:0!important;font-size:0!important;border:0!important;background:#f5f8fb!important}.member-compact-table .member-view-btn:before{content:"⋮"!important;margin:0!important;font-size:22px!important;color:#183d5b}
  .member-group-row{display:block!important;margin-top:9px}.member-group-row td{display:flex!important;align-items:center!important;min-height:44px!important;border-radius:10px 10px 0 0!important;padding:9px 12px!important}.member-group-row strong{font-size:14px!important}.member-group-count{height:24px!important;font-size:11px!important}
  .member-inactive-section{margin-top:10px!important}.member-inactive-table{min-width:720px!important}

  /* Full-screen mobile drawers/sheets across admin. */
  .admin-drawer,.admin-member-drawer,.ct-map-drawer,.ct-chests-review-drawer,.submission-history-detail-panel,.submission-review-drawer{position:fixed!important;inset:0!important;width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;border-radius:0!important;border:0!important;z-index:130!important;box-shadow:none!important;transform:none!important}
  .admin-drawer-head,.ct-chests-review-drawer>header{position:sticky!important;top:0;z-index:3;background:#fff;padding:12px 14px!important;min-height:64px}
  .admin-drawer-body,.ct-review-scroll{padding:12px 14px 88px!important;overflow:auto!important}.ct-chests-review-drawer>footer{position:sticky!important;bottom:0;z-index:4;background:#fff;padding:10px 14px calc(10px + env(safe-area-inset-bottom))!important}
  .member-identity-row{display:grid!important;grid-template-columns:56px minmax(0,1fr) auto!important;gap:10px!important;padding:10px 0!important}.admin-detail-avatar{width:54px!important;height:54px!important;font-size:22px!important}.member-identity-name{font-size:20px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.member-header-active{grid-column:1/-1!important;justify-self:start!important;margin-top:4px}
  .member-overview-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.member-summary-card{min-height:74px!important;padding:10px!important}.member-summary-card strong{font-size:17px!important}
  .member-settings-grid,.ct-settings-layout{grid-template-columns:1fr!important}

  /* Performance: compact KPIs + result cards. */
  .member-performance-kpis{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}.member-performance-kpis>div{min-height:74px!important;padding:10px 11px!important}.member-performance-kpis>div:first-child{grid-column:1/-1!important}.member-performance-kpis strong{font-size:22px!important}
  .member-performance-table-wrap{overflow:visible!important;border:0!important}.member-performance-table{display:block!important;min-width:0!important}.member-performance-table thead{display:none!important}.member-performance-table tbody{display:grid!important;gap:8px}.member-performance-table tbody tr{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px 12px;padding:11px 12px!important;border:1px solid #dde6ed!important;border-radius:10px!important;background:#fff!important}.member-performance-table tbody td{display:grid!important;grid-template-columns:1fr auto!important;gap:8px;border:0!important;padding:2px 0!important;background:transparent!important;font-size:12px!important}.member-performance-table tbody td::before{content:attr(data-label);color:#71869a;font-size:10px;font-weight:700}.member-performance-table tbody td:nth-child(1),.member-performance-table tbody td:nth-child(2){grid-column:auto!important;font-weight:800}.member-performance-table tbody td:nth-child(n+3){grid-column:1/-1!important}.member-performance-table tbody tr.performance-below{background:#fff3f3!important}.member-performance-table tbody tr.performance-above{background:#f1faf4!important}

  /* Generic KPI collections: keep them dense, 2 per row. */
  .security-kpis,.ct-kpis,.ct-mapping-summary,.ct-op-status-grid,.ct-chests-kpis,.ct-crypt-kpis,.ct-health-facts,.tb-tools-kpis,.survey-kpis,.event-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .ct-op-status-card,.ct-chests-kpi{min-height:88px!important;padding:11px!important}.ct-op-status-card strong,.ct-chests-kpi strong{font-size:18px!important}.ct-op-card-icon,.ct-chests-kpi-icon{width:34px!important;height:34px!important}
  .ct-op-main-grid,.ct-overview-grid{grid-template-columns:1fr!important;gap:10px!important}.ct-op-attention-card,.ct-op-activity-card{min-width:0!important}.ct-op-attention-head,.ct-op-activity-head{display:none!important}.ct-op-attention-row{grid-template-columns:auto 1fr!important;gap:6px 9px!important;padding:10px 0!important}.ct-op-attention-row a{grid-column:2!important;justify-self:start}.ct-op-activity-row{grid-template-columns:minmax(0,1fr) auto!important}.ct-op-activity-row strong{display:none!important}
  .ct-op-section-head,.tb-tools-card-head{padding:12px!important}.ct-op-section-head h4,.tb-tools-card-head h4{font-size:17px!important}

  /* Chests Data / ChestTracker resolution workspace. */
  .ct-chests-page.has-review-drawer .ct-chests-main{margin-right:0!important}.ct-chests-heading{align-items:flex-start!important}.ct-chests-heading h2{font-size:22px!important}.ct-chests-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.ct-chests-kpi{min-height:86px!important}.ct-source-card-top{padding:12px!important;gap:10px!important}.ct-chestcounter-refresh,.ct-crypt-fetch-form{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%;gap:7px!important}.ct-chestcounter-refresh .admin-primary-btn,.ct-crypt-fetch-form .admin-primary-btn{grid-column:1/-1!important;width:100%}.ct-chests-attention-table{min-width:680px!important}.ct-source-preview-table,.ct-crypt-activity-table,.ct-event-table,.ct-event-results-table{min-width:760px!important}
  .ct-review-facts>div{grid-template-columns:105px 1fr!important}.ct-review-candidates{max-height:none!important}.ct-review-alt-actions{grid-template-columns:1fr 1fr!important}

  /* ChestTracker settings/explorer/history. */
  .ct-filter-bar{display:grid!important;grid-template-columns:1fr!important;padding:12px!important;gap:9px!important}.ct-filter-bar label,.ct-filter-bar input,.ct-filter-bar select,.ct-filter-bar button{width:100%!important;min-width:0!important}.ct-api-response{max-height:52vh!important;font-size:11px!important;padding:12px!important}.ct-history-table{min-width:760px!important}.ct-members-controls{display:grid!important;gap:8px}.ct-member-search{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important}.ct-status-filters{overflow-x:auto;white-space:nowrap}

  /* TB tools and operational pages. */
  .tb-tools-tabs{padding-bottom:2px}.tb-tools-grid,.tb-tools-overview-grid,.tb-member-scanner-grid{grid-template-columns:1fr!important}.tb-tools-card-head{align-items:flex-start!important;gap:8px!important}.tb-tools-card-head>div{min-width:0}.tb-tools-table-card{overflow:hidden}
  .security-monitor-banner,.member-security-head{padding:11px!important}.member-security-filters{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}.member-filter-search{grid-column:1/-1!important}

  /* Forms/settings: one column, touch-friendly. */
  .admin-form-grid,.admin-settings-grid,.settings-grid,.event-form-grid,.survey-form-grid{grid-template-columns:1fr!important}.admin-form-grid input,.admin-form-grid select,.admin-form-grid textarea,.ct-settings-layout input,.ct-settings-layout select{min-height:44px!important}
  .admin-toggle-row{min-height:52px!important}

  /* Technical tables remain horizontally scrollable instead of squeezing. */
  .admin-table-wrap>.admin-table:not(.member-compact-table),.admin-table-scroll>.admin-data-table:not(.member-compact-table){min-width:700px}
  .admin-table-wrap,.admin-table-scroll{border-radius:10px}

  /* Notices and dialogs. */
  .admin-notice{padding:10px 12px!important;font-size:12px!important}.admin-modal,.admin-confirm-modal{max-width:calc(100vw - 20px)!important;margin:10px!important}

  /* Keep action rows practical. */
  .admin-primary-btn,.admin-outline-btn,.admin-danger-btn{min-height:44px}
}

@media (max-width:420px){
  .admin-workspace{padding-left:10px!important;padding-right:10px!important}
  .admin-page-head h1{font-size:22px!important}.admin-game-day{font-size:11px!important}
  .member-summary-strip-roster>div{min-height:84px!important}.member-summary-strip-roster strong{font-size:29px!important}
  .member-technical-toolbar{grid-template-columns:minmax(0,1fr) 94px 42px!important}.member-technical-toolbar select[data-column="role"]{width:94px!important;font-size:12px!important}
  .ct-op-status-grid,.ct-chests-kpis,.security-kpis,.ct-kpis,.ct-mapping-summary,.ct-crypt-kpis,.ct-health-facts{gap:7px!important}
  .ct-op-status-card,.ct-chests-kpi{padding:9px!important;gap:8px!important}.ct-op-status-card span,.ct-chests-kpi em{font-size:9px!important}
}

/* ========================================================================
   M3.5.0B152 — ChestTracker Unified Operational UX
   Corporate flat workspace: compact summaries, attention-first resolution,
   grouped events, read-only operational pages and unified detail drawers.
   ======================================================================== */
.ct-work-page{display:flex;flex-direction:column;gap:14px}
.ct-work-summary{display:flex;align-items:stretch;min-height:58px;background:#fff;border:1px solid #dbe5ee;border-radius:12px;overflow:hidden}
.ct-work-summary>div{position:relative;display:flex;align-items:baseline;gap:7px;padding:13px 18px;min-width:120px;border-right:1px solid #e3eaf1}
.ct-work-summary>div:last-child{border-right:0}
.ct-work-summary strong{font-size:24px;line-height:1;color:#173d5f}.ct-work-summary strong.ok{color:#168a50}.ct-work-summary strong.warn{color:#d73f46}
.ct-work-summary span{font-size:12px;color:#71869a}.ct-work-summary-time{margin-left:auto;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center;gap:2px!important;min-width:180px!important}.ct-work-summary-time strong{font-size:13px!important;color:#34536d!important}
.ct-summary-alert{position:absolute;right:9px;top:8px;width:21px;height:21px;border-radius:50%;display:grid;place-items:center;background:#e8434d;color:#fff;font-size:13px;font-style:normal;font-weight:900}
.ct-work-attention{border-color:#efcfd1!important;overflow:hidden}.ct-work-card-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;border-bottom:1px solid #e2eaf1;background:#fff}.ct-work-card-head.compact{padding:10px 14px}.ct-work-card-head h3{margin:0;color:#173c5d;font-size:18px}.ct-work-card-head p{margin:2px 0 0;color:#74889b;font-size:12px}.ct-work-card-head>span{font-size:12px;font-weight:800;color:#d43d46}
.ct-work-table-card{overflow:hidden}.ct-work-table-card .admin-table th{padding-top:9px;padding-bottom:9px}.ct-work-table-card .admin-table td{padding-top:10px;padding-bottom:10px}
.ct-work-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;background:#fff;border:1px solid #dbe5ee;border-radius:11px}
.ct-members-attention .admin-table code{font-size:11px;color:#5e7890;background:transparent;padding:0}.ct-table-action{color:#0874cf;text-decoration:none;font-weight:800;white-space:nowrap}.ct-table-action:hover{text-decoration:underline}
.ct-unified-drawer{width:min(560px,94vw);background:#fff}.ct-unified-drawer .tb-review-body{background:#fff}.ct-unified-drawer .ct-review-candidates{max-height:320px;overflow:auto;border:1px solid #dce6ee;border-radius:10px}.ct-unified-drawer .ct-review-candidate{border:0;border-bottom:1px solid #edf1f5;border-radius:0}.ct-unified-drawer .ct-review-candidate:last-child{border-bottom:0}
.ct-member-resolution-actions{display:grid!important;grid-template-columns:1fr 1fr 1fr;gap:8px!important}.ct-member-resolution-actions form,.ct-member-resolution-actions button{width:100%}
.ct-drawer-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.ct-drawer-summary>div{padding:10px 12px;border:1px solid #dfe7ee;border-radius:9px;background:#f9fbfd}.ct-drawer-summary span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:#8091a1}.ct-drawer-summary strong{display:block;margin-top:4px;color:#173d5f;font-size:17px}.ct-drawer-summary strong.warn{color:#d43e46}
.ct-drawer-list{border:1px solid #dfe7ee;border-radius:10px;overflow:hidden}.ct-drawer-list-row{display:grid;grid-template-columns:minmax(0,1fr) auto 18px;align-items:center;gap:10px;padding:11px 12px;border-bottom:1px solid #e9eef3;text-decoration:none;color:#173c5d}.ct-drawer-list-row:last-child{border-bottom:0}.ct-drawer-list-row>div{display:flex;flex-direction:column;gap:2px}.ct-drawer-list-row span{font-size:11px;color:#72879a}.ct-drawer-list-row b{font-size:11px}.ct-drawer-list-row b.ok{color:#168a50}.ct-drawer-list-row b.warn{color:#d43e46}.ct-drawer-list-row i{font-style:normal;font-size:22px;color:#1680d5}
.ct-drawer-note{display:flex!important;flex-direction:column;gap:4px;padding:12px 14px!important;border:1px solid #dbe5ee;border-radius:10px;background:#f7fafc}.ct-drawer-note span{color:#71869a;font-size:12px}
.ct-event-participant-list{border:1px solid #dfe7ee;border-radius:10px;overflow:hidden}.ct-event-participant-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 12px;border-bottom:1px solid #edf1f4}.ct-event-participant-row:last-child{border-bottom:0}.ct-event-participant-row>div{display:flex;flex-direction:column;gap:2px}.ct-event-participant-row>div:last-child{align-items:flex-end}.ct-event-participant-row span{font-size:11px;color:#71869a}
.ct-event-group-table th,.ct-event-group-table td{vertical-align:middle}.ct-events-card .ct-work-card-head{min-height:48px}
.ct-chests-work-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.ct-chests-work-grid>.tb-tools-table-card{min-width:0}.ct-chests-work-grid .admin-table-wrap{max-height:520px;overflow:auto}.ct-chest-sources-card .ct-work-card-head,.ct-chests-recent .ct-work-card-head{min-height:50px}
.ct-settings-unified{gap:14px}.ct-settings-top-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}.ct-settings-status-list{margin:0;padding:6px 16px 14px}.ct-settings-status-list>div{display:grid;grid-template-columns:190px minmax(0,1fr);gap:12px;padding:9px 0;border-bottom:1px solid #edf1f4}.ct-settings-status-list>div:last-child{border-bottom:0}.ct-settings-status-list dt{color:#70869a}.ct-settings-status-list dd{margin:0;text-align:right;font-weight:700;color:#183d5d;word-break:break-word}.ct-settings-status-list dd.ok{color:#168a50}.ct-settings-status-list dd.warn{color:#d43e46}
.ct-credential-summary{display:grid;grid-template-columns:1fr;gap:0;padding:4px 16px 12px}.ct-credential-summary>div{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #edf1f4}.ct-credential-summary span{color:#72879a}.ct-credential-summary strong{color:#183d5d}.ct-credential-summary strong.ok{color:#168a50}.ct-change-credentials{margin:0 16px 16px;display:inline-flex}.ct-credential-edit{padding:8px 16px 16px}
.ct-settings-sync-card,.ct-settings-manual-card{overflow:hidden}.ct-sync-settings-form{padding:14px 16px}.ct-sync-toggle{margin-bottom:14px}.ct-sync-interval-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.ct-sync-interval-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:#34536d}.ct-sync-interval-grid label>span{display:flex;align-items:center;gap:7px}.ct-sync-interval-grid input{min-width:0;width:100%;height:42px}.ct-settings-inline-note{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:13px;padding:10px 12px;background:#f5f8fb;border-radius:9px;color:#71869a;font-size:11px}.ct-settings-inline-note strong{color:#244966}.ct-manual-sync-grid{padding:4px 16px 8px}.ct-manual-sync-grid>div{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid #edf1f4}.ct-manual-sync-grid>div>div{display:flex;flex-direction:column;gap:3px}.ct-manual-sync-grid span{font-size:11px;color:#71869a}.ct-manual-sync-footer{display:flex;justify-content:flex-end;padding:10px 16px 16px}.ct-disconnect-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 16px;border:1px solid #f0c9cc;border-radius:11px;background:#fff}.ct-disconnect-row>div{display:flex;flex-direction:column;gap:3px}.ct-disconnect-row span{font-size:11px;color:#71869a}
/* Overview remains conceptually unchanged; make the existing KPI cards denser. */
.ct-op-hero{min-height:96px!important;padding:15px 18px!important}.ct-op-hero-icon{width:48px!important;height:48px!important}.ct-op-hero-copy h2{font-size:22px!important}.ct-op-status-card{min-height:94px!important;padding:12px 14px!important}.ct-op-status-card strong{font-size:20px!important}.ct-op-main-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
/* B152 mobile drawer stacking fix: backdrop below full-screen sheet. */
@media (max-width:767px){
  .tb-review-backdrop{z-index:170!important}
  .tb-review-drawer,.ct-map-drawer,.ct-chests-review-drawer,.ct-unified-drawer{z-index:171!important}
  .ct-work-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));min-height:0}.ct-work-summary>div{min-width:0;padding:10px 11px;border-right:0;border-bottom:1px solid #e5ebf1}.ct-work-summary>div:nth-child(odd){border-right:1px solid #e5ebf1}.ct-work-summary strong{font-size:19px}.ct-work-summary-time{margin-left:0!important;min-width:0!important}.ct-work-summary-time strong{font-size:11px!important}
  .ct-work-attention .admin-table-wrap{overflow:auto}.ct-work-attention .admin-table{min-width:620px!important}
  .ct-work-controls{display:grid!important;gap:8px}.ct-status-filters{order:2}.ct-member-search{order:1}
  .ct-chests-work-grid,.ct-settings-top-grid{grid-template-columns:1fr!important}.ct-chests-work-grid .admin-table{min-width:600px!important}
  .ct-sync-interval-grid{grid-template-columns:1fr!important}.ct-settings-status-list>div{grid-template-columns:1fr auto}.ct-manual-sync-grid>div{min-height:54px}
  .ct-unified-drawer{width:100vw!important;height:100dvh!important;inset:0!important}.ct-unified-drawer>header{position:sticky;top:0;z-index:3;background:#fff;padding:12px 14px!important}.ct-unified-drawer .tb-review-body{padding:12px 14px 84px!important;overflow:auto!important}.ct-member-facts-dense{grid-template-columns:1fr 1fr!important}.ct-progression-grid{grid-template-columns:1fr 1fr!important}.ct-member-resolution-actions{grid-template-columns:1fr 1fr 1fr!important}
  .ct-op-main-grid{grid-template-columns:1fr!important}.ct-op-hero{min-height:auto!important}.ct-op-status-card{min-height:82px!important}
}

/* M3.5.0B153 — CT member mapping UX refinement */
.ct-map-drawer.ct-unified-drawer{width:min(560px,96vw)}
.ct-map-drawer.ct-unified-drawer>header h3{font-size:28px;line-height:1.08;margin:4px 0 0}
.ct-map-drawer.ct-unified-drawer>header p{font-size:14px;line-height:1.35;margin-top:6px}
.ct-map-drawer .ct-member-facts-dense{gap:8px}
.ct-map-drawer .ct-member-facts-dense>div{padding:9px 11px;border-radius:9px}
.ct-map-drawer .ct-member-facts-dense span{font-size:11px}
.ct-map-drawer .ct-member-facts-dense strong{font-size:14px}
.ct-map-drawer .ct-member-map-section h4{font-size:17px;margin-bottom:8px}
.ct-map-drawer .ct-review-search{min-height:44px;padding:0 12px}
.ct-map-drawer .ct-review-search input{font-size:14px!important;padding:10px 0!important}
.ct-map-drawer .ct-review-candidate{grid-template-columns:36px minmax(0,1fr) auto;padding:9px 10px;gap:10px}
.ct-map-drawer .ct-candidate-avatar{width:34px;height:34px}
.ct-map-drawer .ct-candidate-name strong{font-size:14px}
.ct-map-drawer .ct-candidate-name small{font-size:12px}
.ct-map-drawer .ct-review-candidate .admin-outline-btn{font-size:12px;padding:7px 10px;min-height:34px}
.ct-map-drawer .ct-review-candidate[hidden]{display:none!important}
.ct-member-resolution-compact{margin-top:2px;padding-top:10px;border-top:1px solid #e5edf3}
.ct-member-resolution-compact .ct-member-resolution-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.ct-member-resolution-compact .ct-member-resolution-actions form,.ct-member-resolution-compact .ct-member-resolution-actions button{width:100%;margin:0}
@media(max-width:700px){
  .ct-map-drawer.ct-unified-drawer>header h3{font-size:24px}
  .ct-map-drawer.ct-unified-drawer>header p{font-size:13px}
  .ct-map-drawer .ct-member-facts-dense{grid-template-columns:1fr 1fr!important}
  .ct-map-drawer .ct-member-facts-dense>div{padding:8px 10px}
  .ct-map-drawer .ct-review-candidates{max-height:none!important}
  .ct-member-resolution-compact .ct-member-resolution-actions{grid-template-columns:1fr 1fr 1fr!important}
}

/* B154 - ChestTracker compact operational tables and member KPIs */
.ct-members-summary{width:max-content;min-width:min(100%,660px)}
.ct-members-summary>div{min-width:180px;justify-content:center}
.ct-members-summary>div:nth-child(2){min-width:170px}
.ct-members-summary>div:nth-child(3){min-width:150px}

.ct-chest-sources-card,.ct-chests-recent,.ct-events-card{overflow:hidden}
.ct-chest-sources-card .admin-table-wrap,.ct-chests-recent .admin-table-wrap,.ct-events-card .admin-table-wrap{max-width:100%;overflow-x:auto}
.ct-chest-sources-table,.ct-breakdown-updates-table,.ct-event-group-table{width:100%;max-width:100%;table-layout:fixed;min-width:0}
.ct-chest-sources-table .ct-col-source{width:180px}
.ct-chest-sources-table .ct-col-category{width:100px}
.ct-chest-sources-table .ct-col-members{width:60px}
.ct-chest-sources-table .ct-col-chests{width:60px}
.ct-chest-sources-table .ct-col-status{width:78px}
.ct-chest-sources-table .ct-col-action,.ct-breakdown-updates-table .ct-col-action,.ct-event-group-table .ct-event-col-action{width:32px}
.ct-chest-sources-table th:nth-child(3),.ct-chest-sources-table td:nth-child(3),.ct-chest-sources-table th:nth-child(4),.ct-chest-sources-table td:nth-child(4){text-align:right;white-space:nowrap}
.ct-chest-sources-table th:last-child,.ct-chest-sources-table td:last-child,.ct-breakdown-updates-table th:last-child,.ct-breakdown-updates-table td:last-child,.ct-event-group-table th:last-child,.ct-event-group-table td:last-child{padding-left:2px;padding-right:2px;text-align:center}
.ct-chest-sources-table td:first-child a{display:-webkit-box;max-width:180px;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.2}
.ct-chest-sources-table td:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ct-source-arrow{display:inline-grid;place-items:center;width:28px;min-width:28px;height:28px;margin:0 auto}

.ct-breakdown-updates-table .ct-col-time{width:100px}
.ct-breakdown-updates-table .ct-col-received{width:60px}
.ct-breakdown-updates-table .ct-col-stored{width:60px}
.ct-breakdown-updates-table .ct-col-trigger{width:80px}
.ct-breakdown-updates-table .ct-col-result{width:76px}
.ct-breakdown-updates-table th:nth-child(2),.ct-breakdown-updates-table td:nth-child(2),.ct-breakdown-updates-table th:nth-child(3),.ct-breakdown-updates-table td:nth-child(3){text-align:right;white-space:nowrap}
.ct-breakdown-updates-table td:first-child{white-space:normal;line-height:1.2}
.ct-breakdown-updates-table td:nth-child(4),.ct-breakdown-updates-table td:nth-child(5){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.ct-event-group-table .ct-event-col-name{width:220px}
.ct-event-group-table .ct-event-col-occurrences{width:70px}
.ct-event-group-table .ct-event-col-participants{width:90px}
.ct-event-group-table .ct-event-col-points{width:140px}
.ct-event-group-table .ct-event-col-date{width:110px}
.ct-event-group-table .ct-event-col-status{width:90px}
.ct-event-group-table th:nth-child(2),.ct-event-group-table td:nth-child(2),.ct-event-group-table th:nth-child(3),.ct-event-group-table td:nth-child(3),.ct-event-group-table th:nth-child(4),.ct-event-group-table td:nth-child(4){text-align:right;white-space:nowrap}
.ct-event-group-table td:first-child a{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.2}
.ct-event-group-table td:nth-child(5),.ct-event-group-table td:nth-child(6){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

@media(max-width:760px){
  .ct-members-summary{width:100%;min-width:0;grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .ct-members-summary>div,.ct-members-summary>div:nth-child(2),.ct-members-summary>div:nth-child(3){min-width:0!important;padding:10px 8px!important}
  .ct-members-summary strong{font-size:20px!important}
  .ct-members-summary span{font-size:10px!important}
  .ct-chest-sources-table,.ct-breakdown-updates-table,.ct-event-group-table{min-width:560px}
}

/* ===== M3.5.0B155 ChestTracker data layout & member state correction ===== */
.ct-members-summary{grid-template-columns:repeat(3,minmax(0,1fr));display:grid;min-height:64px}
.ct-members-summary>div{min-width:0!important;justify-content:flex-start;border-right:1px solid #e3eaf1}
.ct-members-summary>div:last-child{border-right:0}
.ct-members-summary strong{font-variant-numeric:tabular-nums}

/* Dedicated CT work tables must not inherit ct-dense-table nth-child widths. */
.ct-chest-sources-table,.ct-breakdown-updates-table,.ct-event-group-table{width:100%!important;max-width:100%!important;table-layout:fixed!important;border-collapse:collapse}
.ct-chest-sources-table th,.ct-chest-sources-table td,
.ct-breakdown-updates-table th,.ct-breakdown-updates-table td,
.ct-event-group-table th,.ct-event-group-table td{box-sizing:border-box;padding:8px 10px;font-size:12px;vertical-align:middle;overflow:hidden}
.ct-chest-sources-table th,.ct-breakdown-updates-table th,.ct-event-group-table th{height:38px;padding-top:7px;padding-bottom:7px;font-size:10px;line-height:1.1;text-transform:uppercase;letter-spacing:.05em;color:#72879a;white-space:nowrap}

/* Chests Data: exact compact columns, with status/result using remaining card width. */
.ct-chest-sources-table .ct-col-source{width:180px!important}
.ct-chest-sources-table .ct-col-category{width:100px!important}
.ct-chest-sources-table .ct-col-members{width:60px!important}
.ct-chest-sources-table .ct-col-chests{width:60px!important}
.ct-chest-sources-table .ct-col-status{width:auto!important}
.ct-chest-sources-table .ct-col-action{width:32px!important}
.ct-chest-sources-table th:nth-child(3),.ct-chest-sources-table td:nth-child(3),.ct-chest-sources-table th:nth-child(4),.ct-chest-sources-table td:nth-child(4){text-align:right;white-space:nowrap}
.ct-chest-sources-table td:first-child a{display:-webkit-box;max-width:180px;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.2}
.ct-chest-sources-table td:nth-child(2){white-space:nowrap;text-overflow:ellipsis}

.ct-breakdown-updates-table .ct-col-time{width:100px!important}
.ct-breakdown-updates-table .ct-col-received{width:60px!important}
.ct-breakdown-updates-table .ct-col-stored{width:60px!important}
.ct-breakdown-updates-table .ct-col-trigger{width:80px!important}
.ct-breakdown-updates-table .ct-col-result{width:auto!important}
.ct-breakdown-updates-table .ct-col-action{width:32px!important}
.ct-breakdown-updates-table th:nth-child(2),.ct-breakdown-updates-table td:nth-child(2),.ct-breakdown-updates-table th:nth-child(3),.ct-breakdown-updates-table td:nth-child(3){text-align:right;white-space:nowrap}
.ct-breakdown-updates-table td:nth-child(4),.ct-breakdown-updates-table td:nth-child(5){white-space:nowrap;text-overflow:ellipsis}

/* Event Data: percentage geometry prevents Total points / Last occurrence collisions. */
.ct-event-group-table .ct-event-col-name{width:28%!important}
.ct-event-group-table .ct-event-col-occurrences{width:9%!important}
.ct-event-group-table .ct-event-col-participants{width:11%!important}
.ct-event-group-table .ct-event-col-points{width:19%!important}
.ct-event-group-table .ct-event-col-date{width:13%!important}
.ct-event-group-table .ct-event-col-status{width:12%!important}
.ct-event-group-table .ct-event-col-action{width:36px!important}
.ct-event-group-table th:nth-child(2),.ct-event-group-table td:nth-child(2){text-align:center;white-space:nowrap}
.ct-event-group-table th:nth-child(3),.ct-event-group-table td:nth-child(3),
.ct-event-group-table th:nth-child(4),.ct-event-group-table td:nth-child(4){text-align:right;white-space:nowrap}
.ct-event-group-table th:nth-child(5),.ct-event-group-table td:nth-child(5){text-align:left;white-space:nowrap}
.ct-event-group-table th:nth-child(6),.ct-event-group-table td:nth-child(6){text-align:center;white-space:nowrap}
.ct-event-group-table th:last-child,.ct-event-group-table td:last-child,
.ct-chest-sources-table th:last-child,.ct-chest-sources-table td:last-child,
.ct-breakdown-updates-table th:last-child,.ct-breakdown-updates-table td:last-child{width:32px!important;padding-left:2px!important;padding-right:2px!important;text-align:center!important}
.ct-event-group-table td:first-child a{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.2}
.ct-event-group-table td:nth-child(4){font-variant-numeric:tabular-nums;font-weight:800}
.ct-event-group-table td:nth-child(5){font-variant-numeric:tabular-nums}
.ct-events-card .admin-table-wrap,.ct-chest-sources-card .admin-table-wrap,.ct-chests-recent .admin-table-wrap{max-width:100%;overflow:hidden}

@media(max-width:900px){
  .ct-events-card .admin-table-wrap,.ct-chest-sources-card .admin-table-wrap,.ct-chests-recent .admin-table-wrap{overflow-x:auto}
  .ct-event-group-table{min-width:760px!important}
  .ct-chest-sources-table,.ct-breakdown-updates-table{min-width:560px!important}
}

/* ===== M3.5.0B156 Members snapshot, Unicode search & pending submissions badge ===== */
.ct-members-summary{
  width:100%;
  min-width:0;
  grid-template-columns:minmax(150px,1fr) minmax(140px,1fr) minmax(130px,1fr) minmax(210px,1.35fr);
}
.ct-members-summary .ct-members-last-snapshot{
  margin-left:0!important;
  min-width:0!important;
  align-items:flex-end!important;
  text-align:right;
  padding-right:18px!important;
}
.ct-members-summary .ct-members-last-snapshot span,
.ct-members-summary .ct-members-last-snapshot strong{width:100%;text-align:right}

.admin-nav-pending-badge{
  margin-left:auto;min-width:19px;height:19px;padding:0 5px;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;
  background:#d99a0b;color:#fff;font-size:10px;font-weight:900;line-height:1;
  box-shadow:0 0 0 2px rgba(255,255,255,.08);
}
.admin-nav a.active .admin-nav-pending-badge{background:#e5a615;box-shadow:0 0 0 2px rgba(255,255,255,.16)}
.admin-shell.is-collapsed .admin-nav-pending-badge{
  position:absolute;right:5px;top:4px;margin:0;min-width:17px;height:17px;padding:0 4px;font-size:9px;
}

@media(max-width:900px){
  .ct-members-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ct-members-summary .ct-members-last-snapshot{align-items:flex-start!important;text-align:left;padding-right:10px!important}
  .ct-members-summary .ct-members-last-snapshot span,
  .ct-members-summary .ct-members-last-snapshot strong{text-align:left}
}


/* ===== M3.5.0B157 Admin Members table alignment + unified avatar source ===== */
.member-compact-table .member-avatar-col,
.member-compact-table .member-avatar-cell{
  width:46px;
  min-width:46px;
  max-width:46px;
  padding-left:10px!important;
  padding-right:6px!important;
  text-align:center;
}
.member-admin-avatar{
  width:30px;
  height:30px;
  border-radius:50%;
  display:inline-grid;
  place-items:center;
  overflow:hidden;
  flex:0 0 30px;
  background:#edf4f8;
  border:1px solid #d8e5ed;
  color:#416782;
  font-size:11px;
  font-weight:800;
  line-height:1;
}
.member-admin-avatar img,
.admin-detail-avatar img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  border-radius:inherit;
}
.member-compact-table th[data-col="nickname"]{min-width:145px}
.member-compact-table td[data-col="nickname"]{min-width:145px}
.member-compact-table .member-avatar-cell + td[data-col="nickname"]{padding-left:6px!important}

@media (max-width: 760px){
  .member-compact-table tr[data-member-group]{
    grid-template-columns:44px minmax(0,1fr) auto!important;
  }
  .member-compact-table tr[data-member-group] td[data-col="avatar"]{
    display:block!important;
    grid-column:1;
    grid-row:1 / span 2;
    align-self:center;
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    padding:0!important;
  }
  .member-compact-table tr[data-member-group] td[data-col="avatar"] .member-admin-avatar{
    width:34px;
    height:34px;
    font-size:12px;
  }
  .member-compact-table tr[data-member-group] td[data-col="status"]{
    left:36px;
    top:8px;
  }
}


/* ===== M3.5.0B157.1 Members avatar duplicate corrective fix ===== */
.member-compact-table .mobile-member-avatar{display:none!important}
@media (max-width:760px){
  .member-compact-table tr[data-member-group] td[data-col="avatar"]{display:grid!important;place-items:center!important}
  .member-compact-table tr[data-member-group] td[data-col="nickname"]{grid-column:2!important;grid-row:1!important;padding-left:0!important}
  .member-compact-table tr[data-member-group] td[data-col="tb_id"]{grid-column:2!important;grid-row:2!important;padding-left:0!important}
}

/* B158 pre-launch safety + TB action guidance */
.tb-attention-link{display:inline-flex;align-items:center;gap:6px}
.tb-action-alert{display:inline-grid;place-items:center;width:18px;height:18px;min-width:18px;border-radius:50%;background:#e5484d;color:#fff;font-size:11px;font-weight:900;line-height:1;box-shadow:0 0 0 2px rgba(229,72,77,.08)}
.member-scoring-preflight{margin-top:14px;padding:14px 16px;border:1px solid #d8e5ef;border-radius:12px;background:#fff}
.member-scoring-preflight>strong{display:block;margin-bottom:10px;color:#23445e}
.member-scoring-preflight>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px}
.member-scoring-preflight span{display:flex;flex-direction:column;gap:3px;padding:9px 10px;border:1px solid #e4ebf1;border-radius:9px;color:#70869a;font-size:11px}
.member-scoring-preflight b{color:#1d3f5d;font-size:13px}
.member-scoring-integrity-result{margin:0 0 14px;padding:14px 16px;border:1px solid #bfe2cc;border-radius:12px;background:#f3fbf6}
.member-scoring-integrity-result.is-warning{border-color:#ecd29f;background:#fffaf0}
.member-scoring-integrity-result>div{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:10px}
.member-scoring-integrity-result strong{color:#176a40}.member-scoring-integrity-result.is-warning strong{color:#9a6810}
.member-scoring-integrity-result span{color:#688198;font-size:12px}
.member-scoring-integrity-result dl{margin:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.member-scoring-integrity-result dl div{padding:9px 10px;border:1px solid rgba(126,164,143,.22);border-radius:9px;background:#fff}
.member-scoring-integrity-result dt{font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:#7a8fa1;font-weight:800}
.member-scoring-integrity-result dd{margin:3px 0 0;color:#1f405e;font-weight:800}
@media(max-width:900px){.member-scoring-preflight>div{grid-template-columns:repeat(2,minmax(0,1fr))}.member-scoring-integrity-result dl{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.member-scoring-preflight>div,.member-scoring-integrity-result dl{grid-template-columns:1fr}.member-scoring-integrity-result>div{align-items:flex-start;flex-direction:column}}


/* M3.5.0B161 — chest breakdown overlay / mobile sheet corrective UX */
.events-table td.has-chest-breakdown{position:relative;padding-right:36px}
.chest-breakdown-anchor{position:absolute;right:7px;top:50%;z-index:2;transform:translateY(-50%)}
.chest-breakdown-trigger{display:grid;place-items:center;width:26px;height:26px;padding:0;border:1px solid #b7cfe1;border-radius:7px;background:#fff;color:#176da8;cursor:pointer;box-shadow:none}
.chest-breakdown-trigger:hover,.chest-breakdown-trigger:focus-visible,.chest-breakdown-trigger[aria-expanded="true"]{border-color:#6da8cf;background:#f6fbfe;outline:none}
.chest-breakdown-trigger svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.chest-breakdown-popover-source{display:none!important}

.chest-breakdown-overlay{position:fixed;z-index:10080;width:max-content;min-width:220px;max-width:min(300px,calc(100vw - 24px));padding:12px 13px;border:1px solid #c9dbe8;border-radius:10px;background:#fff;box-shadow:0 12px 32px rgba(27,57,82,.18);color:#173c5d;text-align:left;white-space:normal;pointer-events:auto}
.chest-breakdown-overlay::after{content:"";position:absolute;right:-6px;top:50%;width:10px;height:10px;border-top:1px solid #c9dbe8;border-right:1px solid #c9dbe8;background:#fff;transform:translateY(-50%) rotate(45deg)}
.chest-breakdown-overlay>b{display:block;margin:0 0 7px;font-size:14px;line-height:1.2}
.chest-breakdown-row,.chest-breakdown-total{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:6px 0;border-top:1px solid #edf3f7;font-size:12px;line-height:1.25}
.chest-breakdown-row:first-of-type{border-top:0}
.chest-breakdown-row em,.chest-breakdown-total em{font-style:normal;font-weight:500;color:#405f78}
.chest-breakdown-row strong,.chest-breakdown-total strong{font-size:12px;color:#123d61;text-align:right}
.chest-breakdown-total{margin-top:2px;font-weight:700}

.chest-breakdown-sheet-backdrop{display:none}
.chest-breakdown-sheet{display:none}
@media(max-width:700px){
  .events-table td.has-chest-breakdown{padding-right:34px}
  .chest-breakdown-anchor{right:5px}
  .chest-breakdown-trigger{width:30px;height:30px;border-radius:8px}
  .chest-breakdown-trigger svg{width:17px;height:17px}
  .chest-breakdown-overlay{display:none!important}
  .chest-breakdown-sheet-backdrop{position:fixed;inset:0;z-index:10100;display:block;background:rgba(14,36,55,.28);opacity:0;pointer-events:none;transition:opacity .16s ease}
  .chest-breakdown-sheet-backdrop.is-open{opacity:1;pointer-events:auto}
  .chest-breakdown-sheet{position:fixed;left:10px;right:10px;bottom:10px;z-index:10101;display:block;max-height:min(58vh,460px);overflow:auto;padding:14px 15px 16px;border:1px solid #c9dbe8;border-radius:14px;background:#fff;box-shadow:0 18px 42px rgba(17,43,65,.24);transform:translateY(calc(100% + 24px));transition:transform .18s ease;color:#173c5d;text-align:left}
  .chest-breakdown-sheet.is-open{transform:translateY(0)}
  .chest-breakdown-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:4px}
  .chest-breakdown-sheet-head>b{font-size:16px;line-height:1.25}
  .chest-breakdown-sheet-close{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid #d5e1ea;border-radius:8px;background:#fff;color:#355b78;font-size:20px;line-height:1;cursor:pointer}
  .chest-breakdown-sheet .chest-breakdown-row,.chest-breakdown-sheet .chest-breakdown-total{font-size:14px;padding:10px 0}
  .chest-breakdown-sheet .chest-breakdown-row strong,.chest-breakdown-sheet .chest-breakdown-total strong{font-size:14px}
}


/* M3.5.0B161.1 — keep the SWORD 100% chest-breakdown trigger inside its event cell.
   The generic SWORD child rule sets direct children to position:relative; this
   explicit override restores the trigger anchor as an absolute overlay. */
.events-table tbody tr.sword td.has-chest-breakdown > .chest-breakdown-anchor{
  position:absolute;
  right:7px;
  left:auto;
  top:50%;
  bottom:auto;
  z-index:16;
  transform:translateY(-50%);
}
@media(max-width:700px){
  .events-table tbody tr.sword td.has-chest-breakdown > .chest-breakdown-anchor{
    right:5px;
    left:auto;
    top:50%;
    bottom:auto;
    transform:translateY(-50%);
  }
}

/* M3.5.0B163 - minute-precision portal access schedule */
.settings-launch-datetime{display:grid;grid-template-columns:minmax(180px,1fr) minmax(145px,180px);gap:10px 12px;align-items:end}.settings-launch-datetime>label{display:grid;gap:5px}.settings-launch-datetime>label>span{font-weight:700;color:#24425f}.settings-launch-datetime>small{grid-column:1/-1}.settings-launch-status small{display:block;margin-top:3px;color:#7890a7;font-weight:500}@media(max-width:700px){.settings-launch-datetime{grid-template-columns:1fr 145px}}@media(max-width:480px){.settings-launch-datetime{grid-template-columns:1fr}}

/* ========================================================================== */
/* SWORD M3.5.0B163.1 — sticky event countdown badge positioning fix         */
/* Sticky frontend headers are mirrored into a fixed overlay. The generic     */
/* mirror rule sets cloned TH cells to position:static; countdown badges need  */
/* their own event header cell as the positioning context.                     */
/* ========================================================================== */
.frontend-sticky-column-block .events-table thead th.has-countdown-badge{
  position:relative!important;
}
.frontend-sticky-column-block .events-table thead th.has-countdown-badge .event-countdown-badge{
  right:7px;
  top:26px;
}

/* ========================================================================== */
/* SWORD M3.5.0B163.2 — sticky event countdown badge vertical position hotfix */
/* Keep the countdown pill fully inside the sticky event header so it does not */
/* extend below the header boundary and create a visible strip under the table. */
/* ========================================================================== */
.frontend-sticky-column-block .events-table thead th.has-countdown-badge .event-countdown-badge{
  top:20px;
}

/* M3.5.0B163.6 — unobtrusive Member Performance diagnostics export. */
.member-performance-head .member-performance-export{
  margin-left:auto;
  min-height:30px;
  padding:6px 10px;
  font-size:10px;
  line-height:16px;
  text-decoration:none;
  white-space:nowrap;
}
@media (max-width:700px){
  .member-performance-head{align-items:flex-start}
  .member-performance-head .member-performance-export{margin-left:8px}
}

/* M3.5.0B164 — Competitions */
.competition-status{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.02em;white-space:nowrap}.competition-status.live{background:#dcf6e6;color:#138447}.competition-status.upcoming{background:#e8f1ff;color:#2d67c7}.competition-status.final{background:#edf1f5;color:#526273}.competition-status.disabled{background:#f4e8e8;color:#a54b4b}.competition-visibility{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:700}.competition-visibility.admin-only{background:#fff4dc;color:#946515}.competition-admin-head,.competition-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.competition-admin-head{margin:0 0 16px}.competition-admin-head h2,.competition-section-head h2{margin:0;color:#18314f}.competition-admin-head p,.competition-section-head p{margin:4px 0 0;color:#71849a}.competition-admin-filters{display:flex;gap:10px;margin:0 0 14px}.competition-admin-filters input,.competition-admin-filters select{height:40px;border:1px solid #d7e0ea;border-radius:7px;background:#fff;padding:0 12px;color:#213a56}.competition-admin-filters input{min-width:280px}.competition-admin-title{color:#18314f;text-decoration:none}.competition-admin-table td{vertical-align:middle}.competition-admin-table th:nth-child(4),.competition-admin-table td:nth-child(4){white-space:nowrap}.competition-drawer-backdrop{position:fixed;inset:0;z-index:1300;background:rgba(18,36,58,.2);display:flex;justify-content:flex-end}.competition-drawer-backdrop>a{position:absolute;inset:0}.competition-admin-drawer{position:relative;width:min(470px,92vw);height:100%;background:#fff;box-shadow:-12px 0 35px rgba(20,44,72,.18);overflow:auto;z-index:1}.competition-admin-drawer>header{display:flex;justify-content:space-between;gap:15px;padding:22px 24px;border-bottom:1px solid #dde6ef}.competition-admin-drawer h2{margin:8px 0 4px;color:#172f4b}.competition-admin-drawer p{margin:0;color:#6f8299}.competition-drawer-close{font-size:28px;line-height:1;color:#52657b;text-decoration:none}.competition-drawer-form{padding:22px 24px;display:grid;gap:16px}.competition-drawer-form>label{display:grid;gap:7px}.competition-drawer-form label>span{font-size:12px;font-weight:800;color:#425c78}.competition-drawer-form input,.competition-drawer-form textarea{width:100%;border:1px solid #cfdbe7;border-radius:7px;padding:10px 11px;color:#1b3552;background:#fff}.competition-drawer-form input[readonly]{background:#f6f8fb;color:#61748b}.competition-admin-lock{padding:13px;border:1px solid #ead9ac;background:#fffbef;border-radius:8px;display:grid;gap:3px}.competition-admin-lock span{font-weight:800;color:#8d6413}.competition-admin-lock small{color:#7c6b46}.competition-drawer-preview{border-top:1px solid #e1e8ef;padding-top:16px}.competition-drawer-preview h3{margin:0 0 10px;color:#19334f}.competition-drawer-preview>div{display:grid;grid-template-columns:34px 38px 1fr auto;align-items:center;gap:9px;padding:8px 0;border-bottom:1px solid #edf1f5}.competition-mini-rank{font-weight:800;color:#6a7f96}.competition-drawer-actions{display:flex;justify-content:space-between;gap:10px;margin-top:6px}.competition-occurrence-row{display:grid!important;grid-template-columns:minmax(145px,1fr) auto auto;gap:10px;align-items:center}.occurrence-competition-toggle{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;color:#405b78;white-space:nowrap}.occurrence-competition-toggle input{accent-color:#3978de}

.competition-page{padding-bottom:28px}.competition-hero-card{position:relative;overflow:hidden;margin:0 0 12px;border:1px solid rgba(185,202,220,.95);border-radius:12px;background:#fff;box-shadow:0 8px 22px rgba(44,70,100,.09);padding:18px 20px;display:grid;grid-template-columns:minmax(0,1fr) 225px;gap:18px}.competition-hero-card:before{content:"";position:absolute;inset:0;background-image:linear-gradient(90deg,rgba(255,255,255,.98) 0%,rgba(255,255,255,.92) 48%,rgba(255,255,255,.74) 100%),var(--competition-hero);background-position:center;background-size:cover;opacity:.82}.competition-hero-card>*{position:relative;z-index:1}.competition-hero-main{display:flex;gap:14px;align-items:flex-start}.competition-trophy{width:48px;height:48px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(#fff4c8,#ffeaa1);font-size:25px;box-shadow:inset 0 0 0 1px #ecd585}.competition-title-wrap{min-width:0}.competition-title-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.competition-title-line h1{margin:0;color:#17304d;font-size:25px}.competition-event-ref{margin:5px 0;color:#45627f;font-size:13px}.competition-description{margin:9px 0 0;color:#526b84}.competition-countdown-card{align-self:start;padding:12px 14px;border:1px solid #d5e2ef;background:rgba(247,251,255,.92);border-radius:9px;text-align:left}.competition-countdown-card small,.competition-countdown-card span{display:block;color:#647b93;font-size:11px}.competition-countdown-card strong{display:block;color:#17365a;font-size:22px;margin:2px 0}.competition-reward{grid-column:1/-1;border-top:1px solid rgba(205,216,228,.8);padding-top:11px;display:flex;gap:12px;align-items:flex-start}.competition-reward>span{text-transform:uppercase;font-size:10px;font-weight:900;letter-spacing:.08em;color:#916b18}.competition-reward p{margin:0;color:#4b6179;font-size:13px}.competition-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 12px}.competition-kpis>div{border:1px solid #d8e2ec;border-radius:9px;background:rgba(255,255,255,.94);padding:11px 14px;box-shadow:0 5px 14px rgba(45,73,103,.06)}.competition-kpis span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.05em;font-weight:800;color:#71859b}.competition-kpis strong{display:block;margin-top:3px;color:#193755;font-size:18px}.competition-podium{display:grid;grid-template-columns:1fr 1.16fr 1fr;align-items:end;gap:10px;margin:0 0 12px;padding:20px 7% 0;border:1px solid #d7e2ed;border-radius:12px;background:linear-gradient(rgba(249,252,255,.86),rgba(241,247,252,.94)),var(--competition-hero,url('images/competition-hero.webp'));background-size:cover;background-position:center;min-height:215px}.competition-podium-card{position:relative;min-height:150px;border:1px solid #d8e2ec;border-radius:12px 12px 0 0;background:rgba(255,255,255,.94);display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:38px 12px 17px;text-align:center;box-shadow:0 8px 18px rgba(35,61,89,.08)}.competition-podium-card.rank-1{min-height:185px;background:linear-gradient(180deg,#fff7d7,#fffdf3);border-color:#e9cf73}.competition-podium-card.rank-2{background:linear-gradient(180deg,#f3f7fb,#fff);border-color:#c8d4e0}.competition-podium-card.rank-3{background:linear-gradient(180deg,#f8e8de,#fff9f5);border-color:#dfb59b}.podium-medal{position:absolute;top:10px;left:50%;transform:translateX(-50%);width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#fff;font-weight:900;color:#a27300;border:2px solid currentColor}.podium-avatar{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:#eaf1f7;color:#315777;font-weight:800;border:3px solid #fff;box-shadow:0 2px 8px rgba(30,55,80,.13)}.rank-1 .podium-avatar{width:66px;height:66px}.podium-avatar img{width:100%;height:100%;object-fit:cover}.competition-podium-card>strong{margin-top:8px;color:#183450}.competition-podium-card>b{margin-top:3px;color:#17304d;font-size:17px}.competition-podium-card>small{margin-top:4px;color:#70849a}.competition-content-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px}.competition-leaderboard-panel{padding:0;overflow:hidden}.competition-leaderboard-panel .competition-section-head,.competition-past-panel .competition-section-head{padding:14px 16px;border-bottom:1px solid #dde6ef}.competition-tabs{display:flex;border:1px solid #d9e3ed;border-radius:7px;overflow:hidden}.competition-tabs button{border:0;background:#fff;padding:8px 11px;color:#5f748c;font-weight:700;cursor:pointer}.competition-tabs button.active{background:#eaf2ff;color:#2f6dcc}.competition-table-scroll{overflow:auto}.competition-table{width:100%;border-collapse:collapse}.competition-table th{background:#f5f8fb;color:#48617d;font-size:11px;text-align:left;padding:10px 12px;border-bottom:1px solid #d9e3ed;white-space:nowrap}.competition-table td{padding:9px 12px;border-bottom:1px solid #e6edf3;color:#35506c}.competition-player{display:flex;align-items:center;gap:8px}.competition-rank-badge{font-weight:900;color:#5a718a}.rank-row.rank-1{background:#fff9e6}.rank-row.rank-2{background:#f7f9fb}.rank-row.rank-3{background:#fff5ef}.competition-breakdown-table td small{display:block;color:#8595a7;margin-top:2px}.competition-past-panel{border:1px solid #d8e2ec;border-radius:10px;background:rgba(255,255,255,.94);overflow:hidden}.competition-past-list{padding:10px;display:grid;gap:9px}.competition-past-card{position:relative;overflow:hidden;display:block;border:1px solid #dae4ee;border-radius:9px;text-decoration:none;color:inherit;background:#fff;padding:11px}.competition-past-card:before{content:"";position:absolute;inset:0;background-image:linear-gradient(90deg,rgba(255,255,255,.98),rgba(255,255,255,.79)),var(--competition-card);background-size:cover;background-position:center;opacity:.5}.competition-past-card>*{position:relative;z-index:1}.competition-past-card strong,.competition-past-card small{display:block}.competition-past-card strong{margin-top:6px;color:#193653}.competition-past-card small{margin-top:3px;color:#667c94}.competition-past-card footer{display:flex;justify-content:space-between;margin-top:10px;padding-top:8px;border-top:1px solid #e7edf3;font-size:12px;color:#435e7a}.competition-past-empty,.competition-empty{padding:28px;color:#667d94}.competition-empty{text-align:center}.competition-empty-icon{font-size:36px;margin-bottom:8px}

@media(max-width:900px){.competition-content-grid{grid-template-columns:1fr}.competition-past-panel{order:2}.competition-admin-table th:nth-child(6),.competition-admin-table td:nth-child(6),.competition-admin-table th:nth-child(7),.competition-admin-table td:nth-child(7){display:none}}
@media(max-width:680px){.competition-hero-card{grid-template-columns:1fr;padding:14px}.competition-countdown-card{width:100%}.competition-title-line h1{font-size:20px}.competition-kpis{grid-template-columns:repeat(2,1fr)}.competition-podium{grid-template-columns:1fr 1.12fr 1fr;padding:14px 4px 0;min-height:180px;gap:4px}.competition-podium-card{min-width:0;min-height:125px;padding:34px 5px 12px}.competition-podium-card.rank-1{min-height:150px}.podium-avatar{width:42px;height:42px}.rank-1 .podium-avatar{width:50px;height:50px}.competition-podium-card>strong{font-size:11px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.competition-podium-card>b{font-size:13px}.competition-podium-card>small{font-size:9px}.competition-section-head{display:block}.competition-tabs{margin-top:10px;width:100%}.competition-tabs button{flex:1}.competition-table th:nth-child(4),.competition-table td:nth-child(4),.competition-table th:nth-child(5),.competition-table td:nth-child(5){display:none}.competition-breakdown-table th:nth-child(n+5),.competition-breakdown-table td:nth-child(n+5){display:table-cell}.competition-admin-filters{flex-wrap:wrap}.competition-admin-filters input{min-width:0;flex:1 1 100%}.competition-admin-drawer{width:100vw}.competition-admin-table th:nth-child(3),.competition-admin-table td:nth-child(3),.competition-admin-table th:nth-child(8),.competition-admin-table td:nth-child(8){display:none}.competition-occurrence-row{grid-template-columns:1fr auto}.occurrence-competition-toggle{grid-column:1/-1;justify-self:start}.competition-drawer-actions{flex-direction:column-reverse}.competition-drawer-actions>*{width:100%;text-align:center}.competition-reward{display:block}.competition-reward p{margin-top:5px}}

/* ========================================================================== */
/* SWORD M3.5.0B165 — Competitions refined visual package                     */
/* Keeps the global BLK Sword page hero/background unchanged.                 */
/* ========================================================================== */
.competition-page{--competition-gold:#d7a62d;--competition-silver:#aebdca;--competition-bronze:#b9794f}
.competition-hero-card:before{background-image:linear-gradient(90deg,rgba(255,255,255,.985) 0%,rgba(255,255,255,.94) 51%,rgba(255,255,255,.72) 100%),var(--competition-hero);opacity:.9}
.competition-podium{position:relative;overflow:hidden;grid-template-columns:minmax(0,1fr) minmax(0,1.16fr) minmax(0,1fr);gap:8px;min-height:300px;padding:34px 5.5% 0;background-image:linear-gradient(180deg,rgba(248,252,255,.34),rgba(244,249,253,.62)),var(--competition-podium-bg);background-size:cover;background-position:center 52%;isolation:isolate}
.competition-podium:after{content:"";position:absolute;inset:auto 0 0;height:46%;z-index:0;background:linear-gradient(180deg,rgba(245,249,252,0),rgba(245,249,252,.56) 52%,rgba(245,249,252,.9));pointer-events:none}
.competition-podium-card{z-index:1;min-height:242px;border:0;background:transparent!important;box-shadow:none;padding:12px 8px 0;display:flex;justify-content:flex-start;overflow:visible}
.competition-podium-card.rank-1{min-height:276px}
.podium-medal{z-index:5;top:4px;width:30px;height:30px;background:#fff;border-width:2px;box-shadow:0 4px 12px rgba(33,53,74,.14)}
.rank-1 .podium-medal{color:#c99100}.rank-2 .podium-medal{color:#8095a8}.rank-3 .podium-medal{color:#a9653c}
.podium-avatar-shell{position:relative;width:106px;height:106px;margin:26px auto 0;display:grid;place-items:center;z-index:4}
.rank-1 .podium-avatar-shell{width:132px;height:132px;margin-top:18px}
.podium-avatar{position:absolute;inset:18%;width:auto;height:auto;border:0;box-shadow:0 3px 11px rgba(25,48,71,.2);font-size:20px;z-index:1}
.rank-1 .podium-avatar{width:auto;height:auto}
.podium-avatar img{width:100%;height:100%;object-fit:cover}
.podium-avatar-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:2;pointer-events:none;filter:drop-shadow(0 4px 8px rgba(25,45,65,.16))}
.podium-player-copy{position:relative;z-index:4;margin-top:-2px;display:grid;justify-items:center;gap:2px;min-height:58px;text-shadow:0 1px 0 rgba(255,255,255,.85)}
.podium-player-copy strong{max-width:180px;color:#183450;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.podium-player-copy b{color:#17304d;font-size:18px}.podium-player-copy small{color:#607790;font-weight:700}
.rank-1 .podium-player-copy strong{font-size:15px}.rank-1 .podium-player-copy b{font-size:21px}
.podium-base{position:absolute;z-index:2;left:50%;bottom:-2px;transform:translateX(-50%);width:min(132%,430px);height:112px;object-fit:contain;object-position:center bottom;pointer-events:none;filter:drop-shadow(0 8px 9px rgba(35,56,76,.16))}
.rank-1 .podium-base{width:min(138%,470px);height:142px}
.competition-past-card:before{opacity:.58}

@media(max-width:900px){
  .competition-podium{min-height:270px;padding-left:3%;padding-right:3%}
  .podium-avatar-shell{width:94px;height:94px}.rank-1 .podium-avatar-shell{width:116px;height:116px}
  .podium-base{height:102px}.rank-1 .podium-base{height:128px}
}
@media(max-width:680px){
  .competition-podium{min-height:220px;padding:16px 0 0;gap:0;background-position:center}
  .competition-podium-card{min-height:188px;padding-left:2px;padding-right:2px}.competition-podium-card.rank-1{min-height:208px}
  .podium-medal{width:24px;height:24px;font-size:11px;top:2px}
  .podium-avatar-shell{width:70px;height:70px;margin-top:24px}.rank-1 .podium-avatar-shell{width:84px;height:84px;margin-top:18px}
  .podium-avatar{font-size:13px}
  .podium-player-copy{min-height:49px;gap:1px;margin-top:0}.podium-player-copy strong{font-size:10px;max-width:100px}.rank-1 .podium-player-copy strong{font-size:11px}.podium-player-copy b{font-size:12px}.rank-1 .podium-player-copy b{font-size:14px}.podium-player-copy small{font-size:9px}
  .podium-base{height:78px;width:142%}.rank-1 .podium-base{height:92px;width:148%}
}
@media(max-width:420px){
  .competition-podium{min-height:205px}
  .podium-avatar-shell{width:62px;height:62px}.rank-1 .podium-avatar-shell{width:76px;height:76px}
  .podium-player-copy strong{max-width:86px}
  .podium-base{height:70px}.rank-1 .podium-base{height:85px}
}

/* ========================================================================== */
/* SWORD M3.5.0B165.4 — Competition data/visual refinement                    */
/* ========================================================================== */
/* Use the dedicated competition podium artwork. Global SWORD hero/background
   remain untouched. */
.competition-podium{
  background-image:linear-gradient(180deg,rgba(248,252,255,.22),rgba(244,249,253,.46)),var(--competition-podium-bg)!important;
  background-size:cover!important;
  background-position:center 52%!important;
}
.competition-podium:after{height:38%;background:linear-gradient(180deg,rgba(245,249,252,0),rgba(245,249,252,.38) 55%,rgba(245,249,252,.72))}

/* Match the compact frontend ranking density: body rows are exactly 32px. */
.competition-table tbody tr{height:32px}
.competition-table tbody td{height:32px;padding:3px 10px;line-height:24px;vertical-align:middle}
.competition-table .competition-player{height:26px;gap:6px}
.competition-table .member-avatar{width:24px;height:24px;min-width:24px;margin-right:0}
.competition-table .member-avatar img{width:100%;height:100%;object-fit:cover}
.competition-breakdown-table tbody td{line-height:14px}
.competition-breakdown-table tbody td small{margin-top:0;line-height:11px;font-size:9px}

/* Admin thumbnail library. WEBP assets dropped into competitions/thumbnails are
   discovered automatically by the server-side picker. */
.competition-thumbnail-picker{margin:0;padding:13px;border:1px solid #dbe5ee;border-radius:9px;background:#f9fbfd}
.competition-thumbnail-picker legend{padding:0 5px;font-size:12px;font-weight:800;color:#425c78}
.competition-thumbnail-picker>p{margin:0 0 10px;color:#6c8197;font-size:11px;line-height:1.45}
.competition-thumbnail-picker code{font-size:10px}
.competition-thumbnail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.competition-thumbnail-option{position:relative;display:grid!important;gap:5px!important;padding:5px;border:2px solid transparent;border-radius:8px;background:#fff;cursor:pointer;box-shadow:0 0 0 1px #dce5ed inset}
.competition-thumbnail-option input{position:absolute!important;width:1px!important;height:1px!important;opacity:0;pointer-events:none}
.competition-thumbnail-option:has(input:checked){border-color:#3e7bd8;box-shadow:0 0 0 2px rgba(62,123,216,.12)}
.competition-thumbnail-preview{display:block;aspect-ratio:16/9;border-radius:5px;overflow:hidden;background:#edf3f8}
.competition-thumbnail-preview img{width:100%;height:100%;display:block;object-fit:cover}
.competition-thumbnail-option b{font-size:10px;color:#405b77;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

@media(max-width:680px){
  .competition-thumbnail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .competition-table tbody tr,.competition-table tbody td{height:32px}
}


/* B165.5 visual hardening: ensure dedicated competition hero/podium art is rendered */
.competition-hero-card:before{
  background-image:linear-gradient(90deg,rgba(255,255,255,.985) 0%,rgba(255,255,255,.93) 44%,rgba(255,255,255,.76) 100%),var(--competition-hero)!important;
  background-position:center!important;background-size:cover!important;opacity:1!important;
}
.competition-hero-card{background-position:center;background-size:cover}

/* ========================================================================== */
/* SWORD M3.5.0B165.6 — mobile admin drawer visibility hotfix                */
/* Mobile full-screen drawers must remain off-canvas until explicitly opened. */
/* The previous mobile rule forced transform:none for every drawer, which      */
/* exposed an empty Member drawer on page load and made the close button       */
/* appear ineffective because removing .open could not move it off-screen.     */
/* ========================================================================== */
@media (max-width:760px){
  .admin-drawer{
    transform:translateX(105%)!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transition:transform .22s ease,visibility 0s linear .22s!important;
  }
  .admin-drawer.open{
    transform:translateX(0)!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transition:transform .22s ease,visibility 0s!important;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B165.7 — Competition final snapshot + UI refinement            */
/* ========================================================================== */
.competition-final-winner{display:flex;align-items:center;gap:8px;margin-top:10px;padding:8px 10px;width:max-content;max-width:100%;border:1px solid #ead28a;border-radius:8px;background:rgba(255,249,225,.9);box-shadow:0 3px 10px rgba(120,87,18,.06)}
.competition-final-winner>span{font-size:10px;letter-spacing:.08em;text-transform:uppercase;font-weight:900;color:#8d6811}.competition-final-winner>strong{color:#173653}.competition-final-winner>b{color:#8a6208}
.competition-podium{min-height:258px!important;padding-top:24px!important;background-position:center 48%!important}
.competition-podium:after{height:28%!important;background:linear-gradient(180deg,rgba(245,249,252,0),rgba(245,249,252,.24) 58%,rgba(245,249,252,.56))!important}
.competition-podium-card{min-height:214px!important}.competition-podium-card.rank-1{min-height:242px!important}
.podium-avatar-shell{margin-top:20px}.rank-1 .podium-avatar-shell{margin-top:13px}
.podium-player-copy{margin-top:-5px;min-height:52px}.podium-player-copy small{position:relative;z-index:5;background:rgba(255,255,255,.72);padding:0 5px;border-radius:7px}
.competition-results-empty{height:116px!important;text-align:center!important;color:#698097!important;padding:25px!important}.competition-results-empty strong,.competition-results-empty span{display:block}.competition-results-empty strong{font-size:14px;color:#385775;margin-bottom:4px}.competition-results-empty span{font-size:12px}
.competition-snapshot-pending{margin:14px;padding:18px;border:1px solid #e5d49d;border-radius:9px;background:#fffaf0;color:#6e5c32}.competition-snapshot-pending strong{display:block;color:#805d12;font-size:14px}.competition-snapshot-pending p{margin:5px 0 0;font-size:12px;line-height:1.5}
.competition-podium-empty{display:grid;grid-template-columns:1fr 1.16fr 1fr;align-items:end}.competition-ghost-slot{position:relative;z-index:2;min-height:126px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding-bottom:20px;color:#7890a6}.competition-ghost-slot.rank-1{min-height:166px}.competition-ghost-slot>span{width:54px;height:54px;display:grid;place-items:center;border-radius:50%;border:2px dashed rgba(76,113,148,.35);background:rgba(255,255,255,.55);font-weight:900}.competition-ghost-slot.rank-1>span{width:68px;height:68px}.competition-ghost-slot strong{margin-top:9px;color:#42617f}.competition-ghost-slot small{max-width:360px;text-align:center;margin-top:3px;font-size:11px}
.competition-snapshot-status{display:grid;gap:5px;padding:12px 13px;border-radius:8px;border:1px solid #dbe5ee;background:#f8fbfd}.competition-snapshot-status>div{display:flex;align-items:center;justify-content:space-between;gap:10px}.competition-snapshot-status>div span{font-size:11px;font-weight:800}.competition-snapshot-status small{color:#6d8196;line-height:1.45}.competition-snapshot-status.ready{border-color:#bee2c7;background:#f1fbf4}.competition-snapshot-status.ready>div span{color:#24703a}.competition-snapshot-status.pending{border-color:#ead8a5;background:#fffaf0}.competition-snapshot-status.pending>div span{color:#8c6815}.competition-snapshot-status.error{border-color:#efc4c4;background:#fff5f5}.competition-snapshot-status.error>div span{color:#a52f2f}.competition-snapshot-rebuild-form{padding:0 24px 22px}.competition-snapshot-rebuild-form button{width:100%}
.competition-past-card footer span{font-weight:800}.competition-past-card footer b{color:#173653}

@media(max-width:680px){
  .competition-final-winner{width:100%;justify-content:flex-start;flex-wrap:wrap}
  .competition-podium{min-height:200px!important;padding-top:12px!important}
  .competition-podium-card{min-height:174px!important}.competition-podium-card.rank-1{min-height:194px!important}
  .competition-ghost-slot{min-height:110px;padding-bottom:12px}.competition-ghost-slot.rank-1{min-height:140px}.competition-ghost-slot small{display:none}
  .competition-snapshot-rebuild-form{padding:0 14px 16px}
}

/* SWORD M3.5.0B165.9 — Past Competition thumbnail rendering */
.competition-past-card{display:grid;grid-template-columns:96px minmax(0,1fr);gap:10px;padding:8px;background:#fff}
.competition-past-card:before{display:none!important}
.competition-past-thumb{display:block;min-height:92px;border-radius:7px;overflow:hidden;background:#edf3f8}
.competition-past-thumb img{display:block;width:100%;height:100%;min-height:92px;object-fit:cover}
.competition-past-copy{min-width:0;padding:2px 2px 2px 0}
.competition-past-copy strong,.competition-past-copy small{display:block}
.competition-past-copy footer{display:flex;justify-content:space-between;gap:8px;margin-top:10px;padding-top:8px;border-top:1px solid #e7edf3;font-size:12px;color:#435e7a}
@media(max-width:680px){.competition-past-card{grid-template-columns:108px minmax(0,1fr)}.competition-past-thumb,.competition-past-thumb img{min-height:84px}}

/* ========================================================================== */
/* SWORD M3.5.0B165.11 — Competition selectable artwork                     */
/* One selected artwork drives the Competition hero/podium background and    */
/* the Past competitions thumbnail. This intentionally overrides legacy      */
/* fixed --competition-hero / --competition-podium-bg declarations.          */
/* ========================================================================== */
.competition-hero-card:before{
  background-image:linear-gradient(90deg,rgba(255,255,255,.97) 0%,rgba(255,255,255,.90) 42%,rgba(255,255,255,.60) 100%),var(--competition-art)!important;
  background-size:cover!important;
  background-position:center 45%!important;
  opacity:1!important;
}
.competition-podium,
.competition-podium.competition-podium-empty{
  background-image:linear-gradient(180deg,rgba(248,252,255,.08),rgba(244,249,253,.20)),var(--competition-art)!important;
  background-size:cover!important;
  background-position:center 50%!important;
}
.competition-podium:after{
  height:32%;
  background:linear-gradient(180deg,rgba(245,249,252,0),rgba(245,249,252,.20) 58%,rgba(245,249,252,.48))!important;
}
.competition-background-picker .competition-thumbnail-preview{aspect-ratio:16/9;min-height:72px}
.competition-background-picker .competition-thumbnail-option{padding:6px}
.competition-background-picker .competition-thumbnail-option b{font-size:11px}
.competition-past-card{display:grid!important;grid-template-columns:108px minmax(0,1fr)!important;gap:10px!important;padding:8px!important}
.competition-past-thumb{display:block;min-height:92px;border-radius:7px;overflow:hidden;background:#edf3f8}
.competition-past-thumb img{display:block;width:100%;height:100%;min-height:92px;object-fit:cover}
.competition-past-copy{min-width:0;display:flex;flex-direction:column;justify-content:center}
.competition-past-copy>strong,.competition-past-copy>small{display:block}
.competition-past-copy footer{display:flex;justify-content:space-between;gap:8px;margin-top:9px;padding-top:7px;border-top:1px solid #e7edf3}
@media(max-width:680px){
  .competition-past-card{grid-template-columns:112px minmax(0,1fr)!important}
  .competition-past-thumb,.competition-past-thumb img{min-height:86px}
  .competition-podium,.competition-podium.competition-podium-empty{background-position:center 48%!important}
}

/* ========================================================================== */
/* SWORD M3.5.0B166.0 — Competition Design v2                               */
/* ========================================================================== */
.competition-page-v2{padding-bottom:24px}
.competition-hero-unified{position:relative;display:grid;grid-template-columns:minmax(330px,.9fr) minmax(520px,1.5fr) 220px;grid-template-rows:auto 1fr;gap:0;min-height:330px;border:1px solid #cfdbe7;border-radius:14px;overflow:hidden;background-size:cover;background-position:center;box-shadow:0 10px 28px rgba(35,62,87,.08);isolation:isolate}
.competition-hero-unified:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.02) 55%,rgba(255,255,255,.18));z-index:0}
.competition-hero-info,.competition-final-info,.competition-hero-podium{position:relative;z-index:1}
.competition-hero-info{grid-column:1;grid-row:1/3;padding:24px 20px 18px 24px;align-self:stretch}
.competition-title-line-v2{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.competition-title-line-v2 h1{margin:0;color:#173653;font-size:28px;line-height:1.08;letter-spacing:-.02em}
.competition-trophy-v2{width:44px;height:44px;display:grid;place-items:center;border:1px solid #ebcf83;border-radius:10px;background:rgba(255,247,211,.92);font-size:24px;box-shadow:0 3px 10px rgba(136,100,19,.08)}
.competition-period-v2{margin:8px 0 0;color:#45637f;font-size:13px;font-weight:800}
.competition-description-v2{margin:7px 0 0;max-width:430px;color:#496681;font-size:13px;line-height:1.45}
.competition-winner-v2{display:flex;align-items:center;gap:10px;width:max-content;max-width:100%;margin-top:16px;padding:9px 13px;border:1px solid #efd59a;border-radius:9px;background:rgba(255,250,231,.94);box-shadow:0 3px 12px rgba(119,87,16,.07)}
.competition-winner-v2 span{color:#a06d00;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.competition-winner-v2 strong{color:#274662}.competition-winner-v2 b{color:#9a6500;font-size:16px}
.competition-reward-v2{display:flex;align-items:flex-start;gap:8px;margin-top:12px;color:#516d87;font-size:12px}.competition-reward-v2>span{font-weight:900;color:#8b6508;white-space:nowrap}.competition-reward-v2 p{margin:0;line-height:1.4}
.competition-final-info{grid-column:3;grid-row:1;justify-self:end;align-self:start;margin:18px 18px 0 0;min-width:188px;padding:13px 14px;border:1px solid rgba(202,216,229,.96);border-radius:10px;background:rgba(248,252,255,.92);box-shadow:0 8px 20px rgba(26,50,74,.08);text-align:left;color:#58718a}
.competition-final-info small,.competition-final-info span{display:block;font-size:10px}.competition-final-info strong{display:block;margin:3px 0;color:#153553;font-size:21px;line-height:1.05}
.competition-hero-podium{grid-column:2/4;grid-row:1/3;display:grid;grid-template-columns:1fr 1.15fr 1fr;align-items:end;gap:6px;padding:46px 50px 6px 22px;min-width:0}
.competition-v2-podium-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:0;min-height:250px;padding-bottom:62px;text-align:center;color:#183a58;text-shadow:0 1px 0 rgba(255,255,255,.9)}
.competition-v2-podium-card.rank-1{min-height:286px;padding-bottom:70px}
.competition-v2-rank{position:absolute;top:22px;z-index:6;width:30px;height:30px;display:grid;place-items:center;border-radius:50%;border:2px solid currentColor;background:#fff;font-weight:900;box-shadow:0 4px 12px rgba(33,53,74,.12)}
.rank-1 .competition-v2-rank{color:#c89000}.rank-2 .competition-v2-rank{color:#7d92a8}.rank-3 .competition-v2-rank{color:#a75e32}
.competition-v2-avatar-shell{position:relative;z-index:5;width:100px;height:100px;display:grid;place-items:center;margin-bottom:2px}.rank-1 .competition-v2-avatar-shell{width:126px;height:126px}
.competition-v2-avatar{position:absolute;inset:19%;display:grid;place-items:center;border-radius:50%;overflow:hidden;background:#eaf2f8;color:#33536f;font-weight:900;font-size:20px;box-shadow:0 3px 11px rgba(25,48,71,.18)}
.competition-v2-avatar img{width:100%;height:100%;object-fit:cover}.competition-v2-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:2;filter:drop-shadow(0 4px 8px rgba(25,45,65,.14))}
.competition-v2-nickname{position:relative;z-index:6;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.rank-1 .competition-v2-nickname{font-size:14px}
.competition-v2-score{position:relative;z-index:6;margin-top:3px;padding:3px 9px;border-radius:7px;background:rgba(255,255,255,.9);box-shadow:0 2px 8px rgba(28,51,75,.08);color:#173653;font-size:18px}.rank-1 .competition-v2-score{font-size:21px}
.competition-v2-crypts{position:relative;z-index:6;margin-top:3px;padding:2px 8px;border:1px solid rgba(201,215,227,.85);border-radius:999px;background:rgba(248,252,255,.86);color:#5d7892;font-size:10px;font-weight:800}
.competition-v2-base{position:absolute;left:50%;bottom:0;z-index:3;transform:translateX(-50%);width:min(138%,360px);height:92px;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 7px 8px rgba(35,56,76,.14));pointer-events:none}.rank-1 .competition-v2-base{width:min(145%,405px);height:110px}
.competition-hero-podium.is-empty{align-items:end}.competition-v2-empty-rank{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-height:150px;padding-bottom:30px;color:#718ba3}.competition-v2-empty-rank.rank-1{min-height:210px}.competition-v2-empty-rank>span{width:54px;height:54px;display:grid;place-items:center;border:2px dashed rgba(86,121,153,.35);border-radius:50%;background:rgba(255,255,255,.68);font-weight:900}.competition-v2-empty-rank.rank-1>span{width:66px;height:66px}.competition-v2-empty-rank strong{margin-top:9px;color:#3d5e7d}.competition-v2-empty-rank small{max-width:330px;margin-top:3px;text-align:center;font-size:10px}
.competition-kpis-v2{margin-top:10px}
.competition-kpis-v2>div{background:rgba(255,255,255,.95);box-shadow:0 4px 16px rgba(39,66,91,.05)}
.competition-results-card{position:relative;margin-top:10px;border:1px solid #cfdae5;border-radius:12px;overflow:hidden;background:rgba(255,255,255,.91);box-shadow:0 8px 24px rgba(37,62,86,.06);isolation:isolate}
.competition-results-card:before{content:"";position:absolute;inset:0;z-index:-2;background-image:var(--competition-results-art);background-size:cover;background-position:center bottom;opacity:.12}.competition-results-card:after{content:"";position:absolute;inset:0;z-index:-1;background:rgba(255,255,255,.80)}
.competition-results-head{display:flex;align-items:center;gap:7px;min-height:42px;padding:9px 14px;border-bottom:1px solid #d7e1ea;background:rgba(255,255,255,.82);color:#617991;font-size:12px;white-space:nowrap;overflow:hidden}
.competition-results-head h2{margin:0;color:#173653;font-size:15px;line-height:1}.competition-results-head strong{color:#365674}.competition-results-icon{font-size:16px}.competition-results-separator{color:#9babb9}
.competition-table-scroll-v2{overflow:auto;max-width:100%}
.competition-table-unified{min-width:1040px;background:rgba(255,255,255,.70)}
.competition-table-unified thead th{height:34px;padding:5px 10px;background:rgba(239,245,250,.94);font-size:10px;color:#47617c;border-right:1px solid rgba(218,227,236,.72)}
.competition-table-unified tbody tr{height:32px}.competition-table-unified tbody td{height:32px;padding:3px 10px;line-height:24px;background:rgba(255,255,255,.66);border-right:1px solid rgba(226,234,241,.66)}
.competition-table-unified tbody tr.rank-1 td{background:rgba(255,246,207,.76)}.competition-table-unified tbody tr.rank-2 td{background:rgba(239,244,248,.78)}.competition-table-unified tbody tr.rank-3 td{background:rgba(255,235,222,.72)}
.competition-table-unified .col-rank{width:42px;text-align:center}.competition-table-unified .col-avatar{width:52px;text-align:center}.competition-table-unified .col-name{min-width:190px}.competition-table-unified .col-score{min-width:220px}
.competition-table-avatar{display:inline-grid!important;width:24px!important;height:24px!important;min-width:24px!important;margin:0!important;place-items:center;vertical-align:middle}
.competition-rank-badge-v2{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:50%;font-weight:900;color:#516d87}.rank-1 .competition-rank-badge-v2{background:#e7ad21;color:#fff}.rank-2 .competition-rank-badge-v2{background:#9aaaba;color:#fff}.rank-3 .competition-rank-badge-v2{background:#b87348;color:#fff}
.competition-score-cell{display:grid;grid-template-columns:72px minmax(90px,1fr);align-items:center;gap:10px}.competition-score-cell>strong{color:#173653}.competition-score-track{display:block;height:7px;border-radius:999px;background:#e5edf4;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(151,171,190,.14)}.competition-score-track i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#72a8ed,#4f8ddd)}.rank-1 .competition-score-track i{background:linear-gradient(90deg,#e8b52e,#f0ca55)}.rank-2 .competition-score-track i{background:linear-gradient(90deg,#a7b4c3,#c2ccd5)}.rank-3 .competition-score-track i{background:linear-gradient(90deg,#c27b4d,#dd9b6d)}
.competition-crypt-cell{min-width:105px}.competition-crypt-cell strong{display:block;color:#24435f;font-size:12px;line-height:13px}.competition-crypt-cell small{display:block;color:#8092a4;font-size:9px;line-height:11px}
.competition-results-empty{height:120px!important;text-align:center!important;color:#70879e!important}.competition-results-empty strong,.competition-results-empty span{display:block}.competition-results-empty strong{color:#41627f;margin-bottom:4px}
@media(max-width:1100px){.competition-hero-unified{grid-template-columns:minmax(300px,.85fr) minmax(420px,1.35fr) 185px}.competition-hero-podium{padding-right:28px}.competition-title-line-v2 h1{font-size:24px}}
@media(max-width:820px){.competition-hero-unified{grid-template-columns:1fr;grid-template-rows:auto auto;min-height:0}.competition-hero-info{grid-column:1;grid-row:1;padding:16px 14px 10px;background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(255,255,255,.78))}.competition-final-info{grid-column:1;grid-row:1;margin:14px 14px 0 auto;min-width:150px}.competition-title-line-v2{padding-right:160px}.competition-title-line-v2 h1{font-size:20px}.competition-description-v2{max-width:calc(100% - 160px)}.competition-winner-v2{margin-top:10px}.competition-reward-v2{margin-top:8px}.competition-hero-podium{grid-column:1;grid-row:2;min-height:220px;padding:10px 3% 0}.competition-v2-podium-card{min-height:190px;padding-bottom:55px}.competition-v2-podium-card.rank-1{min-height:210px;padding-bottom:62px}.competition-v2-avatar-shell{width:76px;height:76px}.rank-1 .competition-v2-avatar-shell{width:92px;height:92px}.competition-v2-base{height:72px}.rank-1 .competition-v2-base{height:86px}.competition-v2-score{font-size:13px}.rank-1 .competition-v2-score{font-size:15px}.competition-v2-nickname{font-size:10px}.competition-results-head{overflow-x:auto}.competition-kpis-v2{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.competition-hero-info{padding-bottom:6px}.competition-title-line-v2{padding-right:0}.competition-final-info{position:relative;grid-row:1;margin:88px 10px 0 auto;min-width:135px;padding:8px 10px}.competition-description-v2{max-width:100%;padding-right:0}.competition-winner-v2{font-size:11px}.competition-reward-v2{max-width:58%;font-size:10px}.competition-hero-podium{min-height:188px;padding-top:4px}.competition-v2-podium-card{min-height:164px;padding-bottom:45px}.competition-v2-podium-card.rank-1{min-height:180px;padding-bottom:49px}.competition-v2-rank{top:14px;width:24px;height:24px;font-size:11px}.competition-v2-avatar-shell{width:62px;height:62px}.rank-1 .competition-v2-avatar-shell{width:74px;height:74px}.competition-v2-nickname{max-width:90px;font-size:9px}.competition-v2-score{padding:2px 5px;font-size:11px}.rank-1 .competition-v2-score{font-size:13px}.competition-v2-crypts{font-size:8px;padding:1px 5px}.competition-v2-base{height:58px;width:145%}.rank-1 .competition-v2-base{height:66px;width:150%}.competition-results-head{min-height:38px;padding:7px 10px;font-size:10px}.competition-results-head h2{font-size:13px}.competition-table-unified{min-width:980px}.competition-table-unified .col-rank,.competition-table-unified .col-avatar,.competition-table-unified .col-name{position:sticky;z-index:3;background:#fff}.competition-table-unified .col-rank{left:0}.competition-table-unified .col-avatar{left:42px}.competition-table-unified .col-name{left:94px}.competition-table-unified thead .col-rank,.competition-table-unified thead .col-avatar,.competition-table-unified thead .col-name{z-index:5;background:#eff5fa}.competition-table-unified tbody tr.rank-1 .col-rank,.competition-table-unified tbody tr.rank-1 .col-avatar,.competition-table-unified tbody tr.rank-1 .col-name{background:#fff6cf}.competition-table-unified tbody tr.rank-2 .col-rank,.competition-table-unified tbody tr.rank-2 .col-avatar,.competition-table-unified tbody tr.rank-2 .col-name{background:#eff4f8}.competition-table-unified tbody tr.rank-3 .col-rank,.competition-table-unified tbody tr.rank-3 .col-avatar,.competition-table-unified tbody tr.rank-3 .col-name{background:#ffebde}}

/* ========================================================================== */
/* SWORD M3.5.0B166.1 — Competition Premium Confirmed Layout                 */
/* ========================================================================== */
.competition-page-v2{padding-bottom:28px}
.competition-hero-unified{
  grid-template-columns:minmax(360px,38%) minmax(520px,42%) minmax(230px,20%);
  grid-template-rows:1fr;
  min-height:340px;
  border-color:#c9d8e6;
  border-radius:16px;
  box-shadow:0 12px 32px rgba(37,66,93,.10);
  background-position:center 54%!important;
}
.competition-hero-unified:after{
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.01) 58%,rgba(241,247,252,.14));
}
.competition-hero-info{
  grid-column:1;
  grid-row:1;
  padding:26px 24px 20px 28px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  background:linear-gradient(90deg,rgba(255,255,255,.72),rgba(255,255,255,.30) 78%,rgba(255,255,255,0));
}
.competition-title-line-v2{gap:10px}
.competition-title-line-v2 h1{font-size:30px;color:#163858}
.competition-trophy-v2{
  width:76px;height:76px;border-radius:16px;font-size:42px;
  border:1px solid rgba(230,195,101,.75);
  background:linear-gradient(180deg,rgba(255,252,238,.96),rgba(255,246,210,.88));
  box-shadow:0 8px 20px rgba(134,93,16,.10)
}
.competition-period-v2{font-size:14px;color:#355875;margin-top:10px}
.competition-description-v2{font-size:13px;max-width:470px;color:#365a78}
.competition-winner-v2{
  margin-top:16px;padding:10px 14px;border-radius:10px;
  background:rgba(255,251,236,.94);border-color:#ebd28d;
  box-shadow:0 6px 18px rgba(119,87,16,.08)
}
.competition-reward-v2{
  width:max-content;max-width:100%;margin-top:9px;padding:8px 12px;border-radius:9px;
  background:rgba(255,255,255,.72);border:1px solid rgba(205,218,230,.82)
}
.competition-final-info-v3{
  grid-column:3!important;
  grid-row:1!important;
  align-self:center!important;
  justify-self:stretch!important;
  margin:0 18px 0 10px!important;
  min-width:0!important;
  padding:16px 16px!important;
  background:rgba(249,252,255,.92)!important;
  border:1px solid rgba(198,214,228,.98)!important;
  backdrop-filter:blur(4px);
}
.competition-final-info-v3 h3{margin:0 0 10px;color:#193a58;font-size:14px}
.competition-final-info-v3 dl{margin:0;display:grid;gap:7px}
.competition-final-info-v3 dl>div{display:grid;grid-template-columns:78px 1fr;gap:8px;align-items:start}
.competition-final-info-v3 dt{color:#7890a6;font-size:10px}
.competition-final-info-v3 dd{margin:0;color:#1e405f;font-size:10px;font-weight:800;line-height:1.25;text-align:right}
.competition-info-status{display:inline-flex!important;padding:3px 8px;border-radius:999px;font-size:9px!important;font-weight:900!important;line-height:1!important}
.competition-info-status.final{background:#dff3e5;color:#2f7a49}
.competition-info-status.live{background:#dff5e8;color:#1b8c4d}
.competition-info-status.upcoming{background:#e7f0ff;color:#2766bb}
.competition-hero-podium{
  grid-column:2!important;
  grid-row:1!important;
  min-height:340px;
  padding:30px 10px 0!important;
  display:grid;
  grid-template-columns:1fr 1.16fr 1fr;
  align-items:end;
  gap:2px;
}
.competition-v2-podium-card{
  min-height:300px!important;
  padding-bottom:88px!important;
  justify-content:flex-end;
}
.competition-v2-podium-card.rank-1{min-height:326px!important;padding-bottom:112px!important}
.competition-v2-rank{top:20px}
.competition-v2-avatar-shell{width:94px;height:94px;margin-bottom:3px}
.rank-1 .competition-v2-avatar-shell{width:116px;height:116px}
.competition-v2-nickname{font-size:12px;background:rgba(255,255,255,.74);padding:2px 8px;border-radius:6px;box-shadow:0 2px 6px rgba(30,56,80,.06)}
.rank-1 .competition-v2-nickname{font-size:13px}
.competition-v2-score{font-size:18px!important;padding:4px 10px;background:rgba(255,255,255,.94);box-shadow:0 4px 12px rgba(28,51,75,.11)}
.rank-1 .competition-v2-score{font-size:22px!important}
.competition-v2-crypts{font-size:10px;padding:3px 9px;background:rgba(250,253,255,.94);border-color:#d3dfe9;color:#587690}
.competition-v2-base-legacy{display:none!important}
.competition-v3-step{
  position:absolute;left:50%;bottom:0;transform:translateX(-50%);
  z-index:2;width:86%;height:78px;border-radius:18px 18px 4px 4px;
  display:flex;align-items:flex-end;justify-content:center;padding-bottom:10px;
  border:1px solid rgba(181,197,211,.95);
  background:linear-gradient(180deg,#fdfefe 0%,#edf3f7 58%,#d9e3eb 100%);
  box-shadow:inset 0 8px 15px rgba(255,255,255,.88),0 8px 16px rgba(38,63,85,.14);
  overflow:hidden
}
.competition-v3-step:before{
  content:"";position:absolute;left:5%;right:5%;top:-10px;height:22px;border-radius:50%;
  border:1px solid rgba(186,202,215,.95);background:linear-gradient(180deg,#fff,#edf3f7);
  box-shadow:0 3px 8px rgba(37,61,82,.08)
}
.competition-v3-step span{position:relative;z-index:2;font-size:38px;font-weight:900;color:#8b9daf;line-height:1;text-shadow:0 1px 0 #fff}
.rank-1 .competition-v3-step{
  width:92%;height:108px;
  border-color:#e0ba52;
  background:linear-gradient(180deg,#fff9de 0%,#f6d66d 55%,#d9a624 100%);
  box-shadow:inset 0 9px 16px rgba(255,255,255,.72),0 9px 18px rgba(110,77,10,.18)
}
.rank-1 .competition-v3-step:before{border-color:#e6c66f;background:linear-gradient(180deg,#fffef3,#f8dc7b)}
.rank-1 .competition-v3-step span{color:#a87700;font-size:50px}
.rank-2 .competition-v3-step span{color:#7f91a3}
.rank-3 .competition-v3-step{
  border-color:#c88c69;background:linear-gradient(180deg,#fff5ef 0%,#e3a37e 58%,#b96e45 100%)
}
.rank-3 .competition-v3-step:before{border-color:#d7a083;background:linear-gradient(180deg,#fffaf6,#e8b18e)}
.rank-3 .competition-v3-step span{color:#9a5b36}
.competition-kpis-v3{gap:12px;margin-top:12px}
.competition-kpis-v3>div{min-height:74px;padding:12px 18px;border-radius:12px;border:1px solid #d3e0ea;background:rgba(255,255,255,.96)}
.competition-kpis-v3>div span{display:block;color:#728ba2;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}
.competition-kpis-v3>div strong{display:block;margin-top:2px;color:#173653;font-size:22px}
.competition-kpis-v3>div small{display:block;margin-top:2px;color:#8195a8;font-size:10px}
.competition-results-card{margin-top:12px;border-radius:14px}
.competition-results-card:before{opacity:.08;background-position:center 72%}
.competition-results-card:after{background:rgba(255,255,255,.86)}
.competition-results-head{min-height:40px;padding:8px 14px;background:rgba(255,255,255,.90)}
.competition-results-head h2{font-size:14px}
.competition-table-unified tbody tr,.competition-table-unified tbody td{height:32px}

@media(max-width:1180px){
  .competition-hero-unified{grid-template-columns:minmax(320px,36%) minmax(430px,44%) minmax(200px,20%)}
  .competition-title-line-v2 h1{font-size:26px}
  .competition-trophy-v2{width:62px;height:62px;font-size:34px}
  .competition-final-info-v3 dl>div{grid-template-columns:68px 1fr}
}
@media(max-width:900px){
  .competition-hero-unified{grid-template-columns:1fr;grid-template-rows:auto auto auto;min-height:0}
  .competition-hero-info{grid-column:1;grid-row:1;padding:18px 16px 12px;background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(255,255,255,.58))}
  .competition-final-info-v3{grid-column:1!important;grid-row:2!important;margin:0 14px 8px!important;justify-self:stretch!important}
  .competition-final-info-v3 dl{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 14px}
  .competition-final-info-v3 dl>div{grid-template-columns:1fr;gap:1px}
  .competition-final-info-v3 dd{text-align:left}
  .competition-hero-podium{grid-column:1!important;grid-row:3!important;min-height:240px;padding:4px 3% 0!important}
  .competition-v2-podium-card{min-height:212px!important;padding-bottom:66px!important}
  .competition-v2-podium-card.rank-1{min-height:232px!important;padding-bottom:82px!important}
  .competition-v2-avatar-shell{width:72px;height:72px}.rank-1 .competition-v2-avatar-shell{width:88px;height:88px}
  .competition-v3-step{height:60px}.rank-1 .competition-v3-step{height:78px}
  .competition-v3-step span{font-size:28px}.rank-1 .competition-v3-step span{font-size:38px}
}
@media(max-width:560px){
  .competition-title-line-v2 h1{font-size:20px}
  .competition-trophy-v2{width:48px;height:48px;font-size:27px}
  .competition-final-info-v3 dl{grid-template-columns:1fr 1fr}
  .competition-hero-podium{min-height:210px}
  .competition-v2-podium-card{min-height:188px!important;padding-bottom:54px!important}
  .competition-v2-podium-card.rank-1{min-height:204px!important;padding-bottom:66px!important}
  .competition-v2-avatar-shell{width:60px;height:60px}.rank-1 .competition-v2-avatar-shell{width:72px;height:72px}
  .competition-v2-nickname{font-size:9px;padding:1px 5px}.rank-1 .competition-v2-nickname{font-size:10px}
  .competition-v2-score{font-size:11px!important}.rank-1 .competition-v2-score{font-size:13px!important}
  .competition-v2-crypts{font-size:8px;padding:1px 5px}
  .competition-v3-step{height:48px;border-radius:12px 12px 3px 3px}.rank-1 .competition-v3-step{height:60px}
  .competition-v3-step:before{top:-6px;height:14px}.competition-v3-step span{font-size:22px}.rank-1 .competition-v3-step span{font-size:30px}
}

/* ========================================================================== */
/* SWORD M3.5.0B166.2 — Competition Podium Assets + Breadcrumb Refinement    */
/* ========================================================================== */
.hero.hero-competition{height:210px;min-height:210px}
.portal-breadcrumb.competition-breadcrumb{
  display:flex;align-items:center;gap:10px;
  min-height:38px;margin:0 0 10px;padding:0 2px;
  color:#6f88a0;font-size:13px;font-weight:600;
}
.portal-breadcrumb.competition-breadcrumb a{color:#3f739f;text-decoration:none}
.portal-breadcrumb.competition-breadcrumb a:hover{text-decoration:underline}
.portal-breadcrumb.competition-breadcrumb span{color:#9dafbe;font-size:16px;line-height:1}
.portal-breadcrumb.competition-breadcrumb strong{color:#274866;font-weight:800}

/* The Competition content is deliberately light and no longer uses scenic
   background images. Artwork selection remains stored for future use/admin. */
.competition-hero-unified{
  background-image:none!important;
  background:linear-gradient(135deg,#fbfdff 0%,#f4f8fb 50%,#eef5f9 100%)!important;
  border-color:#cfdae5!important;
}
.competition-hero-unified:after{
  background:linear-gradient(180deg,rgba(255,255,255,.24),rgba(232,242,249,.20))!important;
}
.competition-hero-info{
  background:linear-gradient(90deg,rgba(255,255,255,.96),rgba(248,251,253,.74) 82%,rgba(248,251,253,0))!important;
}
.competition-results-card{
  background:#fff!important;
}
.competition-results-card:before{display:none!important;background-image:none!important}
.competition-results-card:after{display:none!important}
.competition-table-unified{background:#fff!important}
.competition-table-unified tbody td{background:#fff}
.competition-table-unified tbody tr.rank-1 td{background:#fff7d8}
.competition-table-unified tbody tr.rank-2 td{background:#f2f6f9}
.competition-table-unified tbody tr.rank-3 td{background:#fff0e6}

/* Real podium artwork supplied for first, second and third place. */
.competition-v2-podium-card{
  min-height:305px!important;
  padding-bottom:102px!important;
}
.competition-v2-podium-card.rank-1{
  min-height:338px!important;
  padding-bottom:134px!important;
}
.competition-v3-step{display:none!important}
.competition-v2-base-legacy{display:none!important}
.competition-v3-step-image{
  position:absolute;left:50%;bottom:-2px;z-index:2;
  transform:translateX(-50%);
  width:210px;height:auto;max-width:132%;
  object-fit:contain;object-position:center bottom;
  filter:drop-shadow(0 8px 10px rgba(36,58,79,.15));
  pointer-events:none;
}
.competition-v3-step-image.rank-1{width:245px;max-width:145%}
.competition-v3-step-image.rank-2{width:205px}
.competition-v3-step-image.rank-3{width:205px}

/* Keep player data clearly above the podium artwork. */
.competition-v2-rank,.competition-v2-avatar-shell,.competition-v2-nickname,
.competition-v2-score,.competition-v2-crypts{z-index:6}
.competition-v2-score{margin-top:4px}
.competition-v2-crypts{margin-top:4px}

@media(max-width:900px){
  .hero.hero-competition{height:195px;min-height:195px}
  .portal-breadcrumb.competition-breadcrumb{margin-bottom:8px;font-size:12px;overflow-x:auto;white-space:nowrap}
  .competition-v2-podium-card{min-height:225px!important;padding-bottom:78px!important}
  .competition-v2-podium-card.rank-1{min-height:248px!important;padding-bottom:96px!important}
  .competition-v3-step-image{width:160px}
  .competition-v3-step-image.rank-1{width:188px}
}
@media(max-width:560px){
  .hero.hero-competition{height:170px;min-height:170px}
  .competition-v2-podium-card{min-height:194px!important;padding-bottom:63px!important}
  .competition-v2-podium-card.rank-1{min-height:210px!important;padding-bottom:76px!important}
  .competition-v3-step-image{width:126px}
  .competition-v3-step-image.rank-1{width:148px}
}

/* ========================================================================== */
/* SWORD M3.5.0B166.3 — Competition Transparent Hero + Podium Hierarchy       */
/* ========================================================================== */

/* Breadcrumb intentionally stays short and follows the portal-tool pattern. */
.portal-breadcrumb.competition-breadcrumb{
  gap:9px;
}
.portal-breadcrumb.competition-breadcrumb strong{
  white-space:nowrap;
}

/* The Competition hero no longer carries its own artwork/background image.
   It behaves as a light glass surface over the existing portal hero scenery. */
.competition-hero-unified{
  overflow:visible!important;
  background-image:none!important;
  background:rgba(255,255,255,.62)!important;
  -webkit-backdrop-filter:blur(5px) saturate(112%);
  backdrop-filter:blur(5px) saturate(112%);
  border:1px solid rgba(194,211,225,.88)!important;
  box-shadow:0 10px 30px rgba(35,62,87,.08)!important;
}
.competition-hero-unified:after{
  border-radius:inherit;
  background:linear-gradient(90deg,rgba(255,255,255,.48) 0%,rgba(255,255,255,.20) 46%,rgba(255,255,255,.30) 100%)!important;
}
.competition-hero-info{
  border-radius:14px 0 0 14px;
}
.competition-final-info-v3{
  background:rgba(255,255,255,.88)!important;
  -webkit-backdrop-filter:blur(7px);
  backdrop-filter:blur(7px);
}

/* The complete ceremony group is lifted slightly so crowns/avatar frames peek
   above the normal hero content line, matching the approved composition. */
.competition-hero-podium{
  top:-20px;
  margin-bottom:-20px;
  overflow:visible!important;
  align-items:end!important;
  padding-top:54px!important;
}

/* Explicit place hierarchy. 2nd must always stand above 3rd. */
.competition-v2-podium-card.rank-1{
  min-height:346px!important;
  padding-bottom:136px!important;
  transform:translateY(-10px);
}
.competition-v2-podium-card.rank-2{
  min-height:316px!important;
  padding-bottom:106px!important;
  transform:translateY(-2px);
}
.competition-v2-podium-card.rank-3{
  min-height:296px!important;
  padding-bottom:94px!important;
  transform:translateY(10px);
}

/* Use supplied first / second / third podium images without changing artwork. */
.competition-v3-step-image.rank-1{
  width:250px!important;
  bottom:-2px!important;
}
.competition-v3-step-image.rank-2{
  width:210px!important;
  bottom:-2px!important;
}
.competition-v3-step-image.rank-3{
  width:190px!important;
  bottom:-5px!important;
}

/* Keep identity and results visually attached to their podium position. */
.competition-v2-podium-card.rank-1 .competition-v2-score{font-size:19px!important}
.competition-v2-podium-card.rank-2 .competition-v2-score,
.competition-v2-podium-card.rank-3 .competition-v2-score{font-size:16px!important}
.competition-v2-score,.competition-v2-crypts{
  box-shadow:0 3px 12px rgba(34,58,79,.10);
}

@media(max-width:900px){
  .competition-hero-unified{overflow:hidden!important}
  .competition-hero-podium{top:0;margin-bottom:0;padding-top:8px!important}
  .competition-v2-podium-card.rank-1,
  .competition-v2-podium-card.rank-2,
  .competition-v2-podium-card.rank-3{transform:none}
  .competition-v2-podium-card.rank-1{min-height:248px!important;padding-bottom:96px!important}
  .competition-v2-podium-card.rank-2{min-height:228px!important;padding-bottom:80px!important}
  .competition-v2-podium-card.rank-3{min-height:216px!important;padding-bottom:72px!important}
  .competition-v3-step-image.rank-1{width:188px!important}
  .competition-v3-step-image.rank-2{width:160px!important}
  .competition-v3-step-image.rank-3{width:148px!important}
}
@media(max-width:560px){
  .competition-v2-podium-card.rank-1{min-height:210px!important;padding-bottom:76px!important}
  .competition-v2-podium-card.rank-2{min-height:196px!important;padding-bottom:65px!important}
  .competition-v2-podium-card.rank-3{min-height:188px!important;padding-bottom:58px!important}
  .competition-v3-step-image.rank-1{width:148px!important}
  .competition-v3-step-image.rank-2{width:126px!important}
  .competition-v3-step-image.rank-3{width:116px!important}
}


/* ========================================================================== */
/* SWORD M3.5.0B166.4 — Competition Open Hero Podium                         */
/* ========================================================================== */

/* Hero stays visually open and transparent. No local info-panel gradient. */
.competition-hero-unified{
  overflow:visible!important;
  background-image:none!important;
  -webkit-backdrop-filter:blur(5px) saturate(112%);
  backdrop-filter:blur(3px) saturate(54%);
  border:1px solid rgba(194,211,225,.88)!important;
  box-shadow:0 10px 30px rgba(35,62,87,.08)!important;
  margin-top:46px;
}
.competition-hero-info{
  background:none!important;
}

/* Rank circles above avatars are intentionally removed: rank is already
   represented by the supplied 1st / 2nd / 3rd podium artwork. */
.competition-v1-rank,.competition-v2-rank,.competition-v3-rank{display:none!important}

/* On desktop the complete ceremony rises through the top edge of the hero
   frame. The frame remains the visual boundary while crowns/avatar frames
   deliberately peek above it, matching the approved reference. */
@media(min-width:901px){
  .competition-hero-podium{
    top:-72px!important;
    margin-bottom:-72px!important;
    padding-top:0!important;
    overflow:visible!important;
    z-index:4!important;
  }
  .competition-v2-podium-card.rank-1{
    transform:translateY(-16px)!important;
  }
  .competition-v2-podium-card.rank-2{
    transform:translateY(-4px)!important;
  }
  .competition-v2-podium-card.rank-3{
    transform:translateY(12px)!important;
  }
}

@media(max-width:900px){
  .competition-hero-unified{margin-top:0}
  .competition-hero-info{background:none!important}
}

/* ========================================================================== */
/* SWORD M3.5.0B166.5 — Compact High Podium Refinement                       */
/* ========================================================================== */

/* Desktop: make the ceremony lighter, smaller and visibly higher while
   preserving 1 > 2 > 3 hierarchy and the open-top hero treatment. */
@media(min-width:901px){
  .competition-hero-podium{
    top:-106px!important;
    margin-bottom:-106px!important;
    padding-top:0!important;
    transform:scale(.94);
    transform-origin:center top;
  }

  .competition-v2-podium-card.rank-1{
    min-height:300px!important;
    padding-bottom:116px!important;
    transform:translateY(-18px)!important;
  }
  .competition-v2-podium-card.rank-2{
    min-height:274px!important;
    padding-bottom:94px!important;
    transform:translateY(-6px)!important;
  }
  .competition-v2-podium-card.rank-3{
    min-height:252px!important;
    padding-bottom:80px!important;
    transform:translateY(12px)!important;
  }

  .competition-v3-step-image.rank-1{width:215px!important;bottom:-2px!important}
  .competition-v3-step-image.rank-2{width:180px!important;bottom:-2px!important}
  .competition-v3-step-image.rank-3{width:162px!important;bottom:-4px!important}

  .competition-v2-podium-card.rank-1 .competition-v2-avatar-shell{transform:scale(.96);transform-origin:center bottom}
  .competition-v2-podium-card.rank-2 .competition-v2-avatar-shell,
  .competition-v2-podium-card.rank-3 .competition-v2-avatar-shell{transform:scale(.92);transform-origin:center bottom}

  .competition-v2-podium-card.rank-1 .competition-v2-score{font-size:18px!important}
  .competition-v2-podium-card.rank-2 .competition-v2-score,
  .competition-v2-podium-card.rank-3 .competition-v2-score{font-size:15px!important}

  .competition-final-info-v3{
    transform:translateY(-10px) scale(.94);
    transform-origin:right center;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B166.6 — Competition Snow Podium Final Hero                   */
/* ========================================================================== */

/* Final light-glass hero: no competition artwork and no info-panel gradient. */
.competition-hero-unified{
  margin-top:0!important;
  overflow:visible!important;
  background-image:none!important;
  background:rgba(255,255,255,.46)!important;
  -webkit-backdrop-filter:blur(2px) saturate(108%)!important;
  backdrop-filter:blur(2px) saturate(108%)!important;
  border:1px solid rgba(194,211,225,.75)!important;
  box-shadow:0 10px 28px rgba(35,62,87,.06)!important;
}
.competition-hero-unified:after{
  background:rgba(255,255,255,.02)!important;
}
.competition-hero-info{
  background:none!important;
}

/* Snow is a dedicated visual layer under the three supplied podium assets. */
.competition-hero-podium{
  position:relative!important;
  overflow:visible!important;
  isolation:isolate;
}
.competition-podium-snow{
  position:absolute;
  left:50%;
  bottom:-10px;
  width:96%;
  max-width:none;
  height:auto;
  transform:translateX(-50%);
  z-index:1;
  pointer-events:none;
  user-select:none;
  object-fit:contain;
  object-position:center bottom;
  filter:drop-shadow(0 8px 12px rgba(63,88,108,.08));
}
.competition-v2-podium-card{
  z-index:3!important;
}
.competition-v3-step-image{
  z-index:4!important;
}
.competition-v2-avatar-shell,
.competition-v2-nickname,
.competition-v2-score,
.competition-v2-crypts{
  position:relative;
  z-index:6!important;
}

/* Desktop keeps the approved open-top composition while snow visually grounds
   all three podiums on one continuous winter stage. */
@media(min-width:901px){
  .competition-hero-podium{
    top:-106px!important;
    margin-bottom:-106px!important;
    padding-top:0!important;
    transform:scale(.94);
    transform-origin:center top;
  }
  .competition-podium-snow{
    bottom:-4px;
    width:104%;
  }
}

/* Responsive: keep snow inside the hero and avoid clipping on narrow screens. */
@media(max-width:900px){
  .competition-hero-unified{overflow:hidden!important}
  .competition-hero-podium{
    top:0!important;
    margin-bottom:0!important;
    transform:none!important;
  }
  .competition-podium-snow{
    bottom:-2px;
    width:110%;
  }
}
@media(max-width:560px){
  .competition-podium-snow{
    bottom:0;
    width:122%;
    opacity:.96;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B166.7 — Competition Winter Floor & Compact Typography        */
/* ========================================================================== */

/* The winter floor belongs to the hero itself, not to the moving podium.
   It therefore remains visually stable while the 1/2/3 podium composition
   can move independently at desktop/tablet/mobile breakpoints. */
.competition-hero-unified{
  position:relative!important;
  isolation:isolate;
  background:rgba(255,255,255,.38)!important;
  -webkit-backdrop-filter:blur(2px) saturate(108%)!important;
  backdrop-filter:blur(2px) saturate(108%)!important;
}
.competition-winter-floor{
  position:absolute;
  left:0;
  right:0;
  bottom:-2px;
  width:100%;
  height:auto;
  max-width:none;
  object-fit:fill;
  object-position:center bottom;
  z-index:2;
  pointer-events:none;
  user-select:none;
  opacity:.98;
}
.competition-hero-info,
.competition-final-info,
.competition-hero-podium{
  position:relative;
  z-index:5;
}
.competition-hero-podium{
  z-index:4!important;
}

/* B166.6 podium-local snow is retired. Keep a defensive hide so an older
   cached/template fragment cannot produce a second snow layer. */
.competition-podium-snow{display:none!important}

/* Leaderboard body typography follows the front-page member table exactly:
   nickname and total-score values are both 12px. */
.competition-table-unified tbody .col-name>strong,
.competition-table-unified .competition-score-cell>strong{
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:700;
}
.competition-score-cell{
  grid-template-columns:64px minmax(90px,1fr);
  gap:8px;
}
.competition-score-track{height:6px}

/* Full-width winter floor remains independent from podium scaling. */
@media(min-width:901px){
  .competition-winter-floor{
    width:100%;
    left:0;
    bottom:-2px;
  }
}
@media(max-width:900px){
  .competition-winter-floor{
    width:106%;
    left:-3%;
    right:auto;
    bottom:-1px;
    object-fit:fill;
  }
}
@media(max-width:560px){
  .competition-winter-floor{
    width:116%;
    left:-8%;
    bottom:0;
    opacity:.96;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B166.8 — Competition Snow Ground & Live Countdown             */
/* ========================================================================== */

/* New low-profile snow ground: fixed to the hero, independent of podium motion. */
.competition-snow-ground{
  position:absolute;
  left:0;
  right:auto;
  bottom:0;
  width:102%;
  height:auto;
  max-width:none;
  object-fit:fill;
  object-position:center bottom;
  z-index:2;
  pointer-events:none;
  user-select:none;
  opacity:.98;
}
.competition-hero-info,
.competition-final-info,
.competition-hero-podium{
  position:relative;
  z-index:5;
}
.competition-hero-podium{z-index:4!important}

/* The old winter-floor layer is fully retired. */
.competition-winter-floor{display:none!important}

/* Live countdown follows the server-synchronised lock-page timer principle. */
.competition-live-countdown{
  margin:0 0 12px;
  padding:10px;
  border:1px solid rgba(203,218,231,.92);
  border-radius:10px;
  background:rgba(245,250,254,.82);
}
.competition-live-countdown-label{
  display:block;
  margin-bottom:7px;
  color:#6d849b;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.competition-live-countdown-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:5px;
}
.competition-live-countdown-grid>span{
  display:flex;
  min-width:0;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:7px 3px 6px;
  border:1px solid rgba(211,224,235,.88);
  border-radius:8px;
  background:rgba(255,255,255,.88);
}
.competition-live-countdown-grid b{
  color:#173958;
  font-size:16px;
  line-height:1;
  font-variant-numeric:tabular-nums;
}
.competition-live-countdown-grid small{
  margin-top:4px;
  color:#8296aa;
  font-size:7px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

/* Keep the information card compact after removing duplicated Period/Rewards. */
.competition-final-info-v3 dl{margin-top:2px}
.competition-final-info-v3 dl>div{min-height:24px}

@media(min-width:1200px){
  .competition-snow-ground{
    width:102%;
    left:0;
    bottom:0;
  }
}
@media(min-width:901px) and (max-width:1199px){
  .competition-snow-ground{
    width:118%;
    left:-8%;
    bottom:0;
  }
  .competition-live-countdown-grid b{font-size:14px}
}
@media(max-width:900px){
  .competition-snow-ground{
    width:132%;
    left:-16%;
    bottom:0;
  }
  .competition-live-countdown{margin-bottom:9px;padding:8px}
  .competition-live-countdown-grid{gap:4px}
  .competition-live-countdown-grid>span{padding:6px 2px 5px}
  .competition-live-countdown-grid b{font-size:13px}
}
@media(max-width:560px){
  .competition-snow-ground{
    width:150%;
    left:-25%;
    bottom:0;
    opacity:.96;
  }
  .competition-live-countdown-label{font-size:8px}
  .competition-live-countdown-grid b{font-size:11px}
  .competition-live-countdown-grid small{font-size:6px}
}


/* ========================================================================== */
/* SWORD M3.5.0B166.9 — Competition Snow Containment & White Floor Hotfix    */
/* ========================================================================== */

/* Keep the hero open for the raised podium, but clip only the snow artwork to
   the rounded hero bounds. This prevents the snow strip from leaking below the
   card while preserving the intentional open-top podium composition. */
.competition-hero-snow-clip{
  position:absolute;
  inset:0;
  overflow:hidden;
  border-radius:inherit;
  pointer-events:none;
  z-index:2;
}

/* B166.9: lower the artwork so the visible snow sits exactly on the bottom
   edge, and neutralise the previous blue cast for a clean white winter floor. */
.competition-hero-snow-clip .competition-snow-ground{
  position:absolute;
  left:0;
  right:auto;
  bottom:-22px;
  width:102%;
  height:auto;
  max-width:none;
  object-fit:fill;
  object-position:center bottom;
  opacity:.98;
  filter:brightness(1.20) saturate(.42) contrast(.94);
  -webkit-filter:brightness(1.20) saturate(.42) contrast(.94);
  pointer-events:none;
  user-select:none;
}

/* Snow stays behind the podium/content, while the clip wrapper itself remains
   independent from all podium transforms. */
.competition-hero-info,
.competition-final-info{
  position:relative;
  z-index:5;
}
.competition-hero-podium{
  position:relative;
  z-index:4!important;
}

@media(min-width:1200px){
  .competition-hero-snow-clip .competition-snow-ground{
    width:102%;
    left:0;
    bottom:-24px;
  }
}
@media(min-width:901px) and (max-width:1199px){
  .competition-hero-snow-clip .competition-snow-ground{
    width:118%;
    left:-8%;
    bottom:-20px;
  }
}
@media(max-width:900px){
  .competition-hero-snow-clip .competition-snow-ground{
    width:132%;
    left:-16%;
    bottom:-16px;
    filter:brightness(1.18) saturate(.48) contrast(.95);
    -webkit-filter:brightness(1.18) saturate(.48) contrast(.95);
  }
}
@media(max-width:560px){
  .competition-hero-snow-clip .competition-snow-ground{
    width:150%;
    left:-25%;
    bottom:-12px;
    opacity:.97;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B166.10 — Competition New Snow Ground Integration Hotfix      */
/* ========================================================================== */

/* Integrate the new user-approved white snow ground artwork and remove the
   previous brightening/light effect. The hill is naturally offset slightly to
   the right by the artwork itself; object-position preserves that bias when
   the image is widened for responsive coverage. */
.competition-hero-snow-clip .competition-snow-ground{
  left:0;
  right:auto;
  bottom:0;
  width:100%;
  height:auto;
  max-width:none;
  object-fit:fill;
  object-position:55% 100%;
  opacity:1;
  filter:none!important;
  -webkit-filter:none!important;
  mix-blend-mode:normal;
  display:block;
}

@media(min-width:1200px){
  .competition-hero-snow-clip .competition-snow-ground{
    width:100%;
    left:0;
    bottom:0;
    object-position:55% 100%;
  }
}
@media(min-width:901px) and (max-width:1199px){
  .competition-hero-snow-clip .competition-snow-ground{
    width:108%;
    left:-4%;
    bottom:0;
    object-position:55% 100%;
  }
}
@media(max-width:900px){
  .competition-hero-snow-clip .competition-snow-ground{
    width:124%;
    left:-10%;
    bottom:0;
    object-position:55% 100%;
  }
}
@media(max-width:560px){
  .competition-hero-snow-clip .competition-snow-ground{
    width:142%;
    left:-18%;
    bottom:0;
    object-position:55% 100%;
    opacity:1;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B166.11 — Competition Snow Responsive Position Tuning         */
/* ========================================================================== */

@media (min-width: 1200px) {
  .competition-hero-snow-clip .competition-snow-ground {
    width: 106%;
    left: -77px;
    bottom: -17px;
    object-position: 55% 100%;
    opacity: 50%;
  }
}

@media (min-width: 901px) and (max-width: 1199px) {
  .competition-hero-snow-clip .competition-snow-ground {
    width: 108%;
    left: -8%;
    bottom: -16px;
    object-position: 55% 100%;
    opacity: 50%;
  }
}

@media (max-width: 900px) {
  .competition-hero-snow-clip .competition-snow-ground {
    width: 124%;
    left: -10%;
    bottom: -13px;
    object-position: 55% 100%;
    opacity: 50%;
  }
}

@media (max-width: 560px) {
  .competition-hero-snow-clip .competition-snow-ground {
    width: 142%;
    left: -18%;
    bottom: -9px;
    object-position: 55% 100%;
    opacity: 50%;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B166.12 — Live Competition Header CTA & Member Access         */
/* ========================================================================== */

.competition-header-cta{
  position:absolute;
  left:50%;
  top:118px;
  transform:translateX(-50%);
  z-index:20;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:36px;
  max-width:min(470px,42vw);
  padding:5px 13px 5px 7px;
  border:1px solid rgba(214,173,73,.78);
  border-radius:999px;
  background:rgba(255,255,255,.90);
  box-shadow:0 6px 18px rgba(34,67,98,.10);
  color:#173b5d;
  text-decoration:none;
  white-space:nowrap;
  -webkit-backdrop-filter:blur(5px) saturate(112%);
  backdrop-filter:blur(5px) saturate(112%);
}
.competition-header-cta:hover{
  background:rgba(255,255,255,.97);
  box-shadow:0 8px 22px rgba(34,67,98,.14);
  transform:translateX(-50%) translateY(-1px);
}
.competition-header-cta-icon{
  display:grid;
  place-items:center;
  flex:0 0 27px;
  width:27px;
  height:27px;
  border-radius:50%;
  background:#fff7dc;
  color:#a7750a;
  font-size:14px;
}
.competition-header-cta strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:12px;
  font-weight:800;
}
.competition-header-cta-status{
  flex:0 0 auto;
  padding:3px 7px;
  border-radius:999px;
  background:#dff6e8;
  color:#16854a;
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
}
.competition-header-cta-divider{
  width:1px;
  height:18px;
  background:#d6e0e8;
}
.competition-header-cta-action{
  flex:0 0 auto;
  color:#946511;
  font-size:10.5px;
  font-weight:800;
}
.competition-visibility.member-visible{
  color:#1b7a4b;
  background:#e8f6ee;
  border-color:#cde8d8;
}

@media(max-width:1199px){
  .competition-header-cta{
    top:126px;
    max-width:min(430px,52vw);
  }
}
@media(max-width:899px){
  .competition-header-cta{
    top:120px;
    max-width:min(390px,72vw);
    min-height:34px;
  }
  .competition-header-cta-action{display:none}
  .competition-header-cta-divider{display:none}
}
@media(max-width:599px){
  .competition-header-cta{
    top:108px;
    width:auto;
    max-width:calc(100% - 24px);
    min-height:32px;
    padding:4px 10px 4px 6px;
    gap:7px;
  }
  .competition-header-cta strong{font-size:10.5px}
  .competition-header-cta-status{font-size:8px;padding:3px 6px}
  .competition-header-cta-icon{width:24px;height:24px;flex-basis:24px;font-size:12px}
}

/* ========================================================================== */
/* SWORD M3.5.0B166.13 — Competition CTA Trophy Refinement                   */
/* ========================================================================== */

/* Minimal CTA: no card/pill container. The trophy is the visual anchor, while
   the title + action remain compact and readable against the hero artwork. */
.competition-header-cta-v2{
  position:absolute;
  left:50%;
  bottom:64px;
  top:auto;
  transform:translateX(-50%);
  z-index:20;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:0;
  max-width:min(320px,36vw);
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:#173b5d;
  text-decoration:none;
  white-space:nowrap;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.competition-header-cta-v2:hover{
  background:transparent;
  box-shadow:none;
  transform:translateX(-50%) translateY(-1px);
}
.competition-header-cta-trophy{
  display:grid;
  place-items:center;
  flex:0 0 42px;
  width:42px;
  height:42px;
  filter:drop-shadow(0 3px 4px rgba(109,76,7,.18));
  transition:transform .16s ease,filter .16s ease;
}
.competition-header-cta-trophy svg{width:100%;height:100%;overflow:visible}
.competition-header-cta-trophy .cta-trophy-cup{
  fill:#f5c344;
  stroke:#9f6d07;
  stroke-width:2.1;
  stroke-linejoin:round;
}
.competition-header-cta-trophy .cta-trophy-side,
.competition-header-cta-trophy .cta-trophy-stem{
  fill:none;
  stroke:#b47b08;
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.competition-header-cta-trophy .cta-trophy-star{fill:#fff2a6;stroke:#9f6d07;stroke-width:1.4}
.competition-header-cta-copy{
  display:flex;
  min-width:0;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  text-shadow:0 1px 3px rgba(255,255,255,.9);
}
.competition-header-cta-title-row{
  display:flex;
  min-width:0;
  align-items:center;
  gap:7px;
}
.competition-header-cta-v2 strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:210px;
  color:#173b5d;
  font-size:12px;
  line-height:1.15;
  font-weight:850;
}
.competition-header-cta-v2 .competition-header-cta-status{
  flex:0 0 auto;
  padding:2px 6px;
  border-radius:999px;
  background:rgba(221,247,232,.92);
  color:#13844a;
  font-size:8px;
  line-height:1.25;
  font-weight:900;
  letter-spacing:.04em;
  box-shadow:0 1px 3px rgba(23,102,62,.07);
}
.competition-header-cta-v2 .competition-header-cta-action{
  color:#946511;
  font-size:10px;
  line-height:1.2;
  font-weight:800;
  transition:color .16s ease,transform .16s ease;
}
.competition-header-cta-v2:hover .competition-header-cta-trophy{
  transform:translateY(-1px) scale(1.04);
  filter:drop-shadow(0 4px 6px rgba(109,76,7,.24));
}
.competition-header-cta-v2:hover .competition-header-cta-action{
  color:#7d540a;
  transform:translateX(2px);
}
.competition-header-cta-divider{display:none!important}

@media(max-width:1199px){
  .competition-header-cta-v2{
    bottom:116px;
    max-width:min(300px,44vw);
  }
  .competition-header-cta-trophy{width:38px;height:38px;flex-basis:38px}
}
@media(max-width:899px){
  .competition-header-cta-v2{
    bottom:108px;
    max-width:min(280px,58vw);
  }
  .competition-header-cta-v2 .competition-header-cta-action{display:block}
}
@media(max-width:599px){
  .competition-header-cta-v2{
    left:50%;
    bottom:104px;
    width:auto;
    max-width:calc(100% - 118px);
    gap:7px;
  }
  .competition-header-cta-trophy{width:32px;height:32px;flex-basis:32px}
  .competition-header-cta-v2 strong{max-width:145px;font-size:10.5px}
  .competition-header-cta-v2 .competition-header-cta-status{font-size:7px;padding:2px 5px}
  .competition-header-cta-v2 .competition-header-cta-action{font-size:9px}
}

/* ========================================================================== */
/* SWORD M3.5.0B166.14 — Competition CTA Polish & Brand Typography           */
/* ========================================================================== */

/* Brand tagline refinement confirmed for the production header. */
.brand p{font-size:8px}

/* Final CTA direction: no card or pill, stronger ceremonial trophy, compact
   two-level copy and a small LIVE state. */
.competition-header-cta-v2{
  gap:14px;
  max-width:min(360px,40vw);
}
.competition-header-cta-trophy{
  flex:0 0 56px;
  width:56px;
  height:56px;
  filter:drop-shadow(0 5px 7px rgba(105,70,5,.22));
}
.competition-header-cta-trophy svg{width:100%;height:100%;overflow:visible}
.competition-header-cta-trophy .cta-trophy-cup{
  fill:url(#competitionTrophyGold);
  stroke:#936006;
  stroke-width:1.6;
  stroke-linejoin:round;
}
.competition-header-cta-trophy .cta-trophy-handle{
  fill:none;
  stroke:#b87908;
  stroke-width:3.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.competition-header-cta-trophy .cta-trophy-laurel{
  fill:none;
  stroke:#c58a14;
  stroke-width:2;
  stroke-linecap:round;
  opacity:.88;
}
.competition-header-cta-trophy .cta-trophy-rim{
  fill:none;
  stroke:#fff0a4;
  stroke-width:1.4;
  stroke-linecap:round;
  opacity:.9;
}
.competition-header-cta-trophy .cta-trophy-stem,
.competition-header-cta-trophy .cta-trophy-base{
  fill:url(#competitionTrophyDarkGold);
  stroke:#805005;
  stroke-width:1.2;
  stroke-linejoin:round;
}
.competition-header-cta-trophy .cta-trophy-gem{
  fill:#2f79a5;
  stroke:#f8df7b;
  stroke-width:1.5;
}
.competition-header-cta-trophy .cta-trophy-shine{
  fill:none;
  stroke:rgba(255,255,255,.82);
  stroke-width:2.1;
  stroke-linecap:round;
  opacity:.78;
}
.competition-header-cta-copy{gap:4px}
.competition-header-cta-title-row{gap:10px}
.competition-header-cta-v2 strong{
  max-width:230px;
  font-size:15px;
  line-height:1.1;
  font-weight:850;
}
.competition-header-cta-v2 .competition-header-cta-status{
  padding:2px 7px;
  font-size:9px;
}
.competition-header-cta-v2 .competition-header-cta-action{
  font-size:12px;
  line-height:1.15;
  color:#9a680d;
}
.competition-header-cta-v2:hover .competition-header-cta-trophy{
  transform:translateY(-1px) scale(1.04);
  filter:drop-shadow(0 6px 9px rgba(105,70,5,.28));
}
.competition-header-cta-v2:hover .competition-header-cta-action{transform:translateX(3px)}

@media(max-width:1199px){
  .competition-header-cta-v2{gap:11px;max-width:min(330px,46vw)}
  .competition-header-cta-trophy{width:48px;height:48px;flex-basis:48px}
  .competition-header-cta-v2 strong{font-size:13px;max-width:200px}
  .competition-header-cta-v2 .competition-header-cta-action{font-size:10.5px}
}
@media(max-width:899px){
  .competition-header-cta-v2{gap:9px;max-width:min(300px,62vw)}
  .competition-header-cta-trophy{width:42px;height:42px;flex-basis:42px}
  .competition-header-cta-v2 strong{font-size:12px;max-width:175px}
  .competition-header-cta-v2 .competition-header-cta-status{font-size:8px;padding:2px 6px}
}
@media(max-width:599px){
  .competition-header-cta-v2{gap:8px;max-width:calc(100% - 104px)}
  .competition-header-cta-trophy{width:36px;height:36px;flex-basis:36px}
  .competition-header-cta-v2 strong{font-size:10.5px;max-width:145px}
  .competition-header-cta-v2 .competition-header-cta-action{font-size:9px}
}

/* ========================================================================== */
/* SWORD M3.5.0B166.15 — Competition CTA Trophy Asset Integration            */
/* ========================================================================== */

/* Replace the previous inline SVG trophy with the approved WEBP artwork. */
.competition-header-cta-trophy{
  overflow:visible;
  background:none!important;
}
.competition-header-cta-trophy img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  mix-blend-mode:multiply;
  filter:drop-shadow(0 4px 7px rgba(74,53,17,.14));
  transition:transform .18s ease,filter .18s ease;
}
.competition-header-cta-trophy svg{display:none!important}
.competition-header-cta-v2:hover .competition-header-cta-trophy{
  transform:none;
  filter:none;
}
.competition-header-cta-v2:hover .competition-header-cta-trophy img{
  transform:translateY(-1px) scale(1.035);
  filter:drop-shadow(0 5px 8px rgba(74,53,17,.18));
}

@media(min-width:1200px){
  .competition-header-cta-trophy{width:68px;height:68px;flex-basis:68px}
}
@media(min-width:901px) and (max-width:1199px){
  .competition-header-cta-trophy{width:60px;height:60px;flex-basis:60px}
}
@media(max-width:900px){
  .competition-header-cta-trophy{width:52px;height:52px;flex-basis:52px}
}
@media(max-width:560px){
  .competition-header-cta-trophy{width:46px;height:46px;flex-basis:46px}
}

/* ========================================================================== */
/* SWORD M3.5.0B166.17 — Competition CTA Responsive Layout Hotfix            */
/* ========================================================================== */

/* Desktop keeps the approved composition: CTA sits in the visual gap above
   the single-row header controls. */
@media (min-width:1200px){
  .competition-header-cta-v2{
    left:50%;
    top:auto;
    bottom:64px;
    transform:translateX(-50%);
    max-width:min(360px,40vw);
  }
  .competition-header-cta-trophy{
    width:68px;
    height:68px;
    flex-basis:68px;
  }
}

/* Compact desktop / tablet: move CTA into its own clear band above the
   two-row hero controls. This prevents collisions with Game Period. */
@media (min-width:901px) and (max-width:1199px){
  .competition-header-cta-v2{
    left:50%;
    top:132px;
    bottom:auto;
    transform:translateX(-50%);
    gap:10px;
    max-width:min(305px,46vw);
  }
  .competition-header-cta-trophy{
    width:56px;
    height:56px;
    flex-basis:56px;
  }
  .competition-header-cta-v2 strong{
    max-width:190px;
    font-size:13px;
  }
  .competition-header-cta-v2 .competition-header-cta-action{
    font-size:10.5px;
  }
}

/* Tablet / narrow layout: CTA remains centered in a dedicated visual row,
   fully above search/date/KPI controls. */
@media (min-width:600px) and (max-width:900px){
  .competition-header-cta-v2{
    left:50%;
    top:126px;
    bottom:auto;
    transform:translateX(-50%);
    gap:9px;
    max-width:min(285px,58vw);
  }
  .competition-header-cta-trophy{
    width:48px;
    height:48px;
    flex-basis:48px;
  }
  .competition-header-cta-v2 strong{
    max-width:170px;
    font-size:12px;
  }
  .competition-header-cta-v2 .competition-header-cta-status{
    font-size:8px;
    padding:2px 6px;
  }
  .competition-header-cta-v2 .competition-header-cta-action{
    font-size:9.5px;
  }
}

/* Mobile: reserve a small CTA band between branding/profile and the date/KPI
   controls. Keep both CTA lines visible and avoid all control overlap. */
@media (max-width:599px){
  .competition-header-cta-v2{
    left:50%;
    top:106px;
    bottom:auto;
    transform:translateX(-50%);
    width:max-content;
    max-width:calc(100% - 32px);
    gap:8px;
  }
  .competition-header-cta-trophy{
    width:44px;
    height:44px;
    flex-basis:44px;
  }
  .competition-header-cta-copy{gap:2px}
  .competition-header-cta-title-row{gap:6px}
  .competition-header-cta-v2 strong{
    max-width:150px;
    font-size:11px;
  }
  .competition-header-cta-v2 .competition-header-cta-status{
    font-size:7px;
    padding:2px 5px;
  }
  .competition-header-cta-v2 .competition-header-cta-action{
    display:block;
    font-size:9px;
  }
}

@media (max-width:419px){
  .competition-header-cta-v2{
    top:102px;
    max-width:calc(100% - 24px);
    gap:7px;
  }
  .competition-header-cta-trophy{
    width:40px;
    height:40px;
    flex-basis:40px;
  }
  .competition-header-cta-v2 strong{
    max-width:132px;
    font-size:10.5px;
  }
  .competition-header-cta-v2 .competition-header-cta-action{font-size:8.5px}
}

/* ========================================================================== */
/* SWORD M3.5.0B166.18 — Competition CTA Responsive Collision Fix            */
/* ========================================================================== */

/* The dashboard control strip is vertically lifted at responsive breakpoints.
   Anchor the CTA from the hero bottom as well, so its position follows that
   layout geometry and can never collide with the Game Period card. */
@media (min-width:901px) and (max-width:1199px){
  .competition-header-cta-v2{
    left:50%;
    top:auto;
    bottom:128px;
    transform:translateX(-50%);
    gap:9px;
    max-width:min(285px,44vw);
  }
  .competition-header-cta-trophy{
    width:52px;
    height:52px;
    flex-basis:52px;
  }
  .competition-header-cta-copy{gap:2px}
  .competition-header-cta-title-row{gap:7px}
  .competition-header-cta-v2 strong{
    max-width:176px;
    font-size:12.5px;
    line-height:1.08;
  }
  .competition-header-cta-v2 .competition-header-cta-status{
    font-size:7.5px;
    padding:2px 5px;
  }
  .competition-header-cta-v2 .competition-header-cta-action{
    font-size:9.5px;
    line-height:1.05;
  }
}

/* Narrow tablet controls are lifted by 80px. Keep a dedicated clear band
   immediately above them rather than relying on an absolute top coordinate. */
@media (min-width:600px) and (max-width:900px){
  .competition-header-cta-v2{
    left:50%;
    top:auto;
    bottom:138px;
    transform:translateX(-50%);
    gap:8px;
    max-width:min(258px,56vw);
  }
  .competition-header-cta-trophy{
    width:44px;
    height:44px;
    flex-basis:44px;
  }
  .competition-header-cta-copy{gap:2px}
  .competition-header-cta-title-row{gap:6px}
  .competition-header-cta-v2 strong{
    max-width:155px;
    font-size:11.5px;
  }
  .competition-header-cta-v2 .competition-header-cta-status{
    font-size:7px;
    padding:2px 5px;
  }
  .competition-header-cta-v2 .competition-header-cta-action{font-size:9px}
}

/* Mobile has a two-row dashboard control stack. The CTA gets the remaining
   band above that stack and remains compact enough not to touch branding. */
@media (max-width:599px){
  .competition-header-cta-v2{
    left:50%;
    top:auto;
    bottom:134px;
    transform:translateX(-50%);
    width:max-content;
    max-width:calc(100% - 28px);
    gap:7px;
  }
  .competition-header-cta-trophy{
    width:40px;
    height:40px;
    flex-basis:40px;
  }
  .competition-header-cta-copy{gap:1px}
  .competition-header-cta-title-row{gap:5px}
  .competition-header-cta-v2 strong{
    max-width:138px;
    font-size:10.5px;
  }
  .competition-header-cta-v2 .competition-header-cta-status{
    font-size:6.5px;
    padding:1px 4px;
  }
  .competition-header-cta-v2 .competition-header-cta-action{
    display:block;
    font-size:8.5px;
  }
}

@media (max-width:419px){
  .competition-header-cta-v2{
    top:auto;
    bottom:132px;
    max-width:calc(100% - 20px);
    gap:6px;
  }
  .competition-header-cta-trophy{
    width:36px;
    height:36px;
    flex-basis:36px;
  }
  .competition-header-cta-v2 strong{
    max-width:126px;
    font-size:10px;
  }
  .competition-header-cta-v2 .competition-header-cta-action{font-size:8px}
}


/* ========================================================================== */
/* SWORD M3.5.0B166.22 — SWORD benchmark event-cell alignment                */
/* ========================================================================== */
/* The breakdown action reserves space on the right. Mirror that space on the
   left for SWORD 100% so the numeric benchmark remains geometrically centered
   with member percentages below it. */
.events-table tbody tr.sword td.has-chest-breakdown{
  padding-left:36px;
  padding-right:36px;
}
@media(max-width:700px){
  .events-table tbody tr.sword td.has-chest-breakdown{
    padding-left:34px;
    padding-right:34px;
  }
}

/* ========================================================================== */
/* SWORD M3.5.0B166.28 — Animated Competition mini banner CTA                */
/* ========================================================================== */
.hero-brand-link{position:absolute;inset:0 auto auto 0;display:contents;color:inherit;text-decoration:none}
.hero-brand-link .hero-logo,.hero-brand-link .brand{cursor:pointer}
.competition-header-cta-v3{position:absolute;z-index:8;left:55%;bottom:66px;transform:translateX(-50%);width:340px;height:64px;border:1px solid rgba(245,183,54,.9);border-radius:12px;overflow:hidden;display:flex;align-items:center;padding:0 10px 0 64px;text-decoration:none;color:#fff;background:linear-gradient(90deg,#201008 0%,#35170b 45%,#130d0b 100%);box-shadow:0 6px 18px rgba(31,18,8,.22),0 0 0 1px rgba(255,215,113,.08) inset;isolation:isolate;animation:competitionCtaGlow 2.8s ease-in-out infinite}
.competition-header-cta-v3::before{content:"";position:absolute;inset:1px;border-radius:11px;background:linear-gradient(90deg,rgba(255,132,0,.11),rgba(0,0,0,.08) 42%,rgba(0,0,0,.28));z-index:-1}
.competition-header-cta-v3::after{content:"";position:absolute;top:-40%;left:-28%;width:16%;height:180%;background:linear-gradient(90deg,transparent,rgba(255,239,190,.30),transparent);transform:skewX(-18deg);animation:competitionCtaSweep 8s ease-in-out infinite;pointer-events:none}
.competition-cta-scene{position:absolute;inset:0;background:url('../images/competition-cta/crypt-scene.webp') center 55%/cover no-repeat;opacity:.34;z-index:-2}
.competition-cta-art{position:absolute;left:-4px;bottom:-5px;width:72px;height:76px;display:flex;align-items:flex-end;justify-content:center;filter:drop-shadow(0 3px 5px rgba(0,0,0,.35));z-index:2}
.competition-cta-art img{max-width:100%;max-height:100%;object-fit:contain;transform:scale(1.02);transition:transform .2s ease}
.competition-cta-main{position:relative;z-index:3;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;column-gap:8px;row-gap:3px;width:100%;align-items:center}
.competition-cta-heading{display:flex;align-items:center;gap:6px;min-width:0;grid-column:1/2}
.competition-cta-heading strong{font-size:12px;line-height:1.05;font-weight:900;color:#fff7df;text-shadow:0 1px 2px rgba(0,0,0,.75);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.competition-cta-live{display:inline-flex;align-items:center;gap:4px;padding:2px 6px;border-radius:999px;background:rgba(28,132,72,.92);color:white;font-size:7px;font-weight:900;letter-spacing:.08em;box-shadow:0 0 0 1px rgba(255,255,255,.18) inset}
.competition-cta-live i{width:5px;height:5px;border-radius:50%;background:#d7ffe5;box-shadow:0 0 0 0 rgba(206,255,225,.55);animation:competitionLivePulse 1.7s ease-out infinite}
.competition-cta-countdown{grid-column:1/2;display:flex;gap:3px;align-items:center}
.competition-cta-time{display:inline-flex;align-items:baseline;justify-content:center;gap:1px;min-width:29px;height:23px;padding:0 4px;border-radius:5px;background:linear-gradient(180deg,rgba(33,30,31,.96),rgba(10,9,10,.96));border:1px solid rgba(242,183,72,.72);box-shadow:0 1px 0 rgba(255,255,255,.08) inset,0 2px 4px rgba(0,0,0,.24);transform-origin:50% 50%}
.competition-cta-time b{font-size:11px;line-height:1;font-weight:900;color:#fff1c7;font-variant-numeric:tabular-nums}
.competition-cta-time small{font-size:6.5px;font-weight:800;color:#d7bd83;text-transform:uppercase}
.competition-cta-time.is-flip{animation:competitionFlip .22s ease-out}
.competition-cta-action{grid-column:2/3;grid-row:1/3;align-self:center;white-space:nowrap;padding:6px 8px;border-radius:7px;background:linear-gradient(180deg,#9f231e,#651410);border:1px solid rgba(255,199,82,.75);color:#fff2cf;font-size:9px;font-weight:900;text-shadow:0 1px 1px rgba(0,0,0,.65);box-shadow:0 2px 6px rgba(0,0,0,.25);transition:filter .18s ease,transform .18s ease}
.competition-cta-action span{display:inline-block;transition:transform .18s ease}
.competition-header-cta-v3:hover{box-shadow:0 8px 22px rgba(31,18,8,.28),0 0 16px rgba(242,170,46,.22)}
.competition-header-cta-v3:hover .competition-cta-action{filter:brightness(1.12);transform:translateY(-1px)}
.competition-header-cta-v3:hover .competition-cta-action span{transform:translateX(3px)}
.competition-header-cta-v3:hover .competition-cta-art img{transform:scale(1.055)}
.competition-cta-embers{position:absolute;left:8px;bottom:4px;width:74px;height:52px;pointer-events:none;z-index:4}
.competition-cta-embers i{position:absolute;bottom:0;width:3px;height:3px;border-radius:50%;background:#ffb12b;box-shadow:0 0 5px #ff6a00;opacity:0;animation:competitionEmber 3.6s linear infinite}
.competition-cta-embers i:nth-child(1){left:15px;animation-delay:.2s}.competition-cta-embers i:nth-child(2){left:31px;animation-delay:1.1s;width:2px;height:2px}.competition-cta-embers i:nth-child(3){left:48px;animation-delay:2s}.competition-cta-embers i:nth-child(4){left:58px;animation-delay:2.7s;width:2px;height:2px}
.competition-header-cta-v3.is-ended{opacity:.72;filter:saturate(.65)}
@keyframes competitionCtaGlow{0%,100%{border-color:rgba(232,164,45,.78)}50%{border-color:rgba(255,211,99,1);box-shadow:0 6px 18px rgba(31,18,8,.22),0 0 10px rgba(255,176,42,.16)}}
@keyframes competitionCtaSweep{0%,72%{left:-28%;opacity:0}77%{opacity:1}88%{left:112%;opacity:0}100%{left:112%;opacity:0}}
@keyframes competitionLivePulse{0%{box-shadow:0 0 0 0 rgba(206,255,225,.55)}70%{box-shadow:0 0 0 5px rgba(206,255,225,0)}100%{box-shadow:0 0 0 0 rgba(206,255,225,0)}}
@keyframes competitionFlip{0%{transform:perspective(80px) rotateX(0)}45%{transform:perspective(80px) rotateX(-22deg)}100%{transform:perspective(80px) rotateX(0)}}
@keyframes competitionEmber{0%{transform:translate(0,0) scale(.7);opacity:0}15%{opacity:.8}75%{opacity:.35}100%{transform:translate(7px,-42px) scale(.2);opacity:0}}
@media(max-width:1199px){.competition-header-cta-v3{left:55%;bottom:126px;width:320px;height:60px;padding-left:58px}.competition-cta-art{width:64px;height:69px}.competition-cta-heading strong{font-size:11px}.competition-cta-action{font-size:8.5px;padding:5px 7px}}
@media(max-width:900px){.competition-header-cta-v3{left:50%;bottom:136px;width:300px;height:58px;padding-left:54px}.competition-cta-art{width:59px;height:64px}.competition-cta-heading strong{font-size:10.5px}.competition-cta-time{min-width:27px;height:21px}.competition-cta-time b{font-size:10px}}
@media(max-width:599px){.competition-header-cta-v3{left:50%;bottom:132px;width:min(286px,calc(100% - 26px));height:56px;padding-left:49px;padding-right:7px}.competition-cta-art{width:54px;height:60px}.competition-cta-heading strong{font-size:9.5px}.competition-cta-live{font-size:6px;padding:1px 5px}.competition-cta-action{font-size:7.5px;padding:5px 6px}.competition-cta-time{min-width:24px;height:20px;padding:0 3px}.competition-cta-time b{font-size:9px}.competition-cta-time small{font-size:5.5px}}
@media(prefers-reduced-motion:reduce){.competition-header-cta-v3,.competition-header-cta-v3::after,.competition-cta-live i,.competition-cta-time.is-flip,.competition-cta-embers i{animation:none!important}.competition-cta-action,.competition-cta-action span,.competition-cta-art img{transition:none!important}}

/* M3.5.0B166.30 — Compact Competition CTA refinement */
@media (min-width:1200px){
  .competition-header-cta-v3{
    width:350px;height:62px;left:55%;bottom:68px;
    padding:0 10px 0 67px;border-radius:13px;
    border:1px solid rgba(205,152,37,.72);
    background:linear-gradient(90deg,rgba(14,24,36,.96) 0%,rgba(18,23,29,.94) 54%,rgba(10,15,22,.96) 100%);
    box-shadow:0 7px 20px rgba(15,25,38,.22),0 0 0 1px rgba(255,255,255,.05) inset;
  }
  .competition-header-cta-v3::before{
    border-radius:12px;
    background:linear-gradient(90deg,rgba(255,138,12,.10),rgba(255,177,54,.025) 42%,rgba(0,0,0,.20));
  }
  .competition-cta-scene{
    background-position:67% 52%;opacity:.18;filter:saturate(.82) contrast(1.02);
  }
  .competition-cta-art{
    left:-6px;bottom:-4px;width:76px;height:72px;overflow:visible;border-radius:0;
    filter:drop-shadow(0 4px 7px rgba(0,0,0,.42));
  }
  .competition-cta-art img{
    width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center;
    transform:scale(1.02);
  }
  .competition-header-cta-v3:hover .competition-cta-art img{transform:scale(1.055)}
  .competition-cta-main{column-gap:8px;row-gap:3px}
  .competition-cta-heading strong{font-size:13px;letter-spacing:-.01em}
  .competition-cta-live{font-size:7px;padding:2px 6px}
  .competition-cta-countdown{gap:4px}
  .competition-cta-time{min-width:30px;height:24px;border-radius:6px}
  .competition-cta-time b{font-size:11px}.competition-cta-time small{font-size:6px}
  .competition-cta-action{
    padding:0 0 0 10px;border-radius:0;background:transparent;border:0;border-left:1px solid rgba(226,174,71,.48);
    color:#e8be67;font-size:9px;box-shadow:none;text-shadow:0 1px 1px rgba(0,0,0,.55);
  }
  .competition-header-cta-v3:hover .competition-cta-action{filter:brightness(1.16);transform:none}
}

/* SWORD M3.5.0B166.31 — Epic Crypt Competition CTA & Brand Refinement */
.brand h1{
  font:700 38px/1 Georgia,serif;
}
.brand p{
  font-size:8px;
  letter-spacing:.28em;
  text-transform:uppercase;
}

.competition-header-cta-v3.competition-header-cta-epic{
  left:55%;
  bottom:86px;
  width:372px;
  height:64px;
  padding:0;
  overflow:hidden;
  border:1px solid rgba(215,160,52,.45);
  border-radius:8px;
  background-image:url('../images/competition/crypt_event.webp');
  background-size:100% 100%;
  background-position:center;
  background-repeat:no-repeat;
  box-shadow:0 8px 22px rgba(20,28,38,.20),0 0 14px rgba(192,132,38,.12);
  animation:competitionCtaEpicGlow 8.5s ease-in-out infinite;
}
.competition-header-cta-v3.competition-header-cta-epic::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(90deg,rgba(5,9,14,.04) 0%,rgba(7,11,17,.52) 31%,rgba(7,11,17,.66) 68%,rgba(5,8,13,.28) 100%);
  z-index:0;
  pointer-events:none;
}
.competition-header-cta-v3.competition-header-cta-epic::after{
  content:"";
  position:absolute;
  top:-55%;
  left:-24%;
  width:12%;
  height:210%;
  background:linear-gradient(90deg,transparent,rgba(255,226,157,.22),transparent);
  transform:skewX(-20deg);
  animation:competitionCtaEpicSweep 9s ease-in-out infinite;
  pointer-events:none;
  z-index:2;
}
.competition-header-cta-epic .competition-cta-main{
  position:relative;
  z-index:3;
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto auto;
  column-gap:10px;
  row-gap:3px;
  align-items:center;
  padding:8px 13px 8px 106px;
}
.competition-header-cta-epic .competition-cta-heading{
  grid-column:1/2;
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}
.competition-header-cta-epic .competition-cta-heading strong{
  font-size:15px;
  line-height:1;
  font-weight:800;
  color:#fff4d7;
  text-shadow:0 1px 2px rgba(0,0,0,.9),0 0 8px rgba(220,160,55,.25);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.competition-header-cta-epic .competition-cta-live{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:2px 7px;
  border-radius:999px;
  background:rgba(21,139,74,.92);
  color:#fff;
  font-size:8px;
  line-height:1;
  font-weight:900;
  letter-spacing:.08em;
  box-shadow:0 0 0 1px rgba(255,255,255,.16) inset;
}
.competition-header-cta-epic .competition-cta-live i{
  width:5px;
  height:5px;
  border-radius:50%;
  background:#d9ffe6;
  animation:competitionLivePulse 1.7s ease-out infinite;
}
.competition-header-cta-epic .competition-cta-countdown{
  grid-column:1/2;
  display:flex;
  gap:4px;
  align-items:center;
}
.competition-header-cta-epic .competition-cta-time{
  min-width:38px;
  height:26px;
  padding:0 4px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:2px;
  border:1px solid rgba(211,157,54,.70);
  border-radius:6px;
  background:rgba(7,12,18,.74);
  box-shadow:0 1px 0 rgba(255,255,255,.05) inset,0 2px 5px rgba(0,0,0,.22);
}
.competition-header-cta-epic .competition-cta-time b{
  font-size:13px;
  line-height:1;
  font-weight:800;
  color:#fff2c8;
  font-variant-numeric:tabular-nums;
}
.competition-header-cta-epic .competition-cta-time small{
  font-size:7px;
  line-height:1;
  font-weight:800;
  color:#d5b66f;
}
.competition-header-cta-epic .competition-cta-action{
  grid-column:2/3;
  grid-row:1/3;
  align-self:center;
  padding:0 0 0 10px;
  border:0;
  border-left:1px solid rgba(226,174,71,.45);
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:#f2c35f;
  font-size:11px;
  line-height:1;
  font-weight:800;
  text-shadow:0 1px 2px rgba(0,0,0,.65);
  white-space:nowrap;
  transition:color .18s ease;
}
.competition-header-cta-epic .competition-cta-action span{
  display:inline-block;
  transition:transform .18s ease;
}
.competition-header-cta-epic:hover{
  box-shadow:0 9px 25px rgba(20,28,38,.24),0 0 16px rgba(192,132,38,.17);
}
.competition-header-cta-epic:hover .competition-cta-action{
  color:#ffe09a;
  filter:none;
  transform:none;
}
.competition-header-cta-epic:hover .competition-cta-action span{transform:translateX(3px)}

@keyframes competitionCtaEpicGlow{
  0%,100%{border-color:rgba(215,160,52,.42);filter:brightness(1)}
  50%{border-color:rgba(237,188,80,.62);filter:brightness(1.02)}
}
@keyframes competitionCtaEpicSweep{
  0%,76%{left:-24%;opacity:0}
  80%{opacity:1}
  91%{left:112%;opacity:0}
  100%{left:112%;opacity:0}
}

@media (min-width:1200px){
  .competition-header-cta-v3.competition-header-cta-epic{width:372px;height:64px;left:55%;bottom:86px;padding:0;border-radius:8px}
}
@media (min-width:901px) and (max-width:1199px){
  .competition-header-cta-v3.competition-header-cta-epic{width:330px;height:58px;left:55%;bottom:124px;padding:0}
  .competition-header-cta-epic .competition-cta-main{padding:7px 11px 7px 92px;column-gap:7px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:13px}
  .competition-header-cta-epic .competition-cta-time{min-width:34px;height:23px}
  .competition-header-cta-epic .competition-cta-time b{font-size:11px}
  .competition-header-cta-epic .competition-cta-action{font-size:9px;padding-left:8px}
}
@media (min-width:561px) and (max-width:900px){
  .competition-header-cta-v3.competition-header-cta-epic{width:300px;height:56px;left:50%;bottom:134px;padding:0}
  .competition-header-cta-epic .competition-cta-main{padding:6px 9px 6px 82px;column-gap:6px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:12px}
  .competition-header-cta-epic .competition-cta-live{font-size:7px;padding:2px 5px}
  .competition-header-cta-epic .competition-cta-time{min-width:31px;height:22px;padding:0 3px}
  .competition-header-cta-epic .competition-cta-time b{font-size:10px}
  .competition-header-cta-epic .competition-cta-action{font-size:8px;padding-left:7px}
}
@media (max-width:560px){
  .competition-header-cta-v3.competition-header-cta-epic{width:min(320px,calc(100% - 28px));height:58px;left:50%;bottom:132px;padding:0}
  .competition-header-cta-epic .competition-cta-main{padding:6px 8px 6px 74px;column-gap:5px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:11px}
  .competition-header-cta-epic .competition-cta-live{font-size:6px;padding:2px 5px}
  .competition-header-cta-epic .competition-cta-countdown{gap:3px}
  .competition-header-cta-epic .competition-cta-time{min-width:29px;height:21px;padding:0 2px}
  .competition-header-cta-epic .competition-cta-time b{font-size:9px}
  .competition-header-cta-epic .competition-cta-time small{font-size:6px}
  .competition-header-cta-epic .competition-cta-action{font-size:0;padding-left:6px}
  .competition-header-cta-epic .competition-cta-action::before{content:"View";font-size:8px}
  .competition-header-cta-epic .competition-cta-action span{font-size:8px}
}
@media (max-width:900px){.brand h1{font-size:32px}}
@media (max-width:560px){.brand h1{font-size:26px}}
@media (prefers-reduced-motion:reduce){
  .competition-header-cta-v3.competition-header-cta-epic,
  .competition-header-cta-v3.competition-header-cta-epic::after,
  .competition-header-cta-epic .competition-cta-live i,
  .competition-header-cta-epic .competition-cta-time.is-flip{animation:none!important}
}

/* SWORD M3.5.0B166.32 — Competition CTA native-frame hotfix */
.competition-header-cta-v3.competition-header-cta-epic{
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  filter:drop-shadow(0 7px 13px rgba(20,28,38,.20));
  animation:none!important;
  overflow:hidden;
}
.competition-header-cta-v3.competition-header-cta-epic::before{
  display:none!important;
}
.competition-header-cta-v3.competition-header-cta-epic::after{
  display:none!important;
}
.competition-header-cta-epic .competition-cta-main{
  padding-left:92px;
  padding-right:10px;
  column-gap:7px;
}
.competition-header-cta-epic .competition-cta-heading strong{
  font-size:13.5px;
  letter-spacing:-.015em;
  overflow:visible;
  text-overflow:clip;
}
.competition-header-cta-epic .competition-cta-action{
  padding-left:8px;
  font-size:9.5px;
}
.competition-header-cta-epic:hover{
  box-shadow:none!important;
  filter:drop-shadow(0 8px 15px rgba(20,28,38,.24)) brightness(1.015);
}
@media (min-width:901px) and (max-width:1199px){
  .competition-header-cta-epic .competition-cta-main{padding-left:80px;padding-right:9px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:12px}
}
@media (min-width:561px) and (max-width:900px){
  .competition-header-cta-epic .competition-cta-main{padding-left:72px;padding-right:8px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:11px}
}
@media (max-width:560px){
  .competition-header-cta-epic .competition-cta-main{padding-left:66px;padding-right:7px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:10px}
}

/* SWORD M3.5.0B166.33 — Competition CTA transparent wrapper + compact alignment hotfix */
.competition-header-cta-v3.competition-header-cta-epic{
  width:356px;
  height:56px;
  background:transparent url('../images/competition/crypt_event.webp') center/100% 100% no-repeat!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:drop-shadow(0 6px 11px rgba(18,25,34,.18));
  overflow:visible;
  isolation:auto;
}
.competition-header-cta-v3.competition-header-cta-epic::before,
.competition-header-cta-v3.competition-header-cta-epic::after{
  display:none!important;
  content:none!important;
}
.competition-header-cta-epic .competition-cta-main{
  padding:5px 14px 5px 86px;
  column-gap:7px;
  row-gap:1px;
}
.competition-header-cta-epic .competition-cta-heading{
  gap:7px;
  align-self:end;
}
.competition-header-cta-epic .competition-cta-heading strong{
  font-size:12.5px;
  line-height:1;
  overflow:visible;
  text-overflow:clip;
  letter-spacing:-.01em;
}
.competition-header-cta-epic .competition-cta-live{
  font-size:7px;
  padding:2px 6px;
}
.competition-header-cta-epic .competition-cta-countdown{
  gap:4px;
  align-self:start;
  transform:translateY(-1px);
}
.competition-header-cta-epic .competition-cta-time{
  min-width:34px;
  height:23px;
  padding:0 3px;
  border-color:rgba(213,165,68,.55);
  background:rgba(8,10,12,.72);
  border-radius:5px;
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 2px 4px rgba(0,0,0,.18);
}
.competition-header-cta-epic .competition-cta-time b{font-size:11px}
.competition-header-cta-epic .competition-cta-time small{font-size:6px}
.competition-header-cta-epic .competition-cta-action{
  padding-left:7px;
  padding-right:4px;
  font-size:8.8px;
  transform:translateX(-2px);
}
.competition-header-cta-v3.competition-header-cta-epic:hover{
  box-shadow:none!important;
  filter:drop-shadow(0 7px 13px rgba(18,25,34,.22)) brightness(1.012);
}
@media (min-width:901px) and (max-width:1199px){
  .competition-header-cta-v3.competition-header-cta-epic{width:326px;height:53px}
  .competition-header-cta-epic .competition-cta-main{padding-left:78px;padding-right:11px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:11.5px}
  .competition-header-cta-epic .competition-cta-time{min-width:32px;height:22px}
}
@media (min-width:561px) and (max-width:900px){
  .competition-header-cta-v3.competition-header-cta-epic{width:294px;height:52px}
  .competition-header-cta-epic .competition-cta-main{padding-left:70px;padding-right:9px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:10.5px}
  .competition-header-cta-epic .competition-cta-time{min-width:29px;height:21px}
}
@media (max-width:560px){
  .competition-header-cta-v3.competition-header-cta-epic{width:min(306px,calc(100% - 24px));height:54px}
  .competition-header-cta-epic .competition-cta-main{padding-left:68px;padding-right:8px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:10px}
  .competition-header-cta-epic .competition-cta-time{min-width:28px;height:21px}
  .competition-header-cta-epic .competition-cta-action{font-size:0}
  .competition-header-cta-epic .competition-cta-action::before{content:'View';font-size:8px}
  .competition-header-cta-epic .competition-cta-action span{font-size:8px}
}

/* SWORD M3.5.0B166.34 — Skull Crypt CTA background + exact 356×64 ratio */
.competition-header-cta-v3.competition-header-cta-epic{
  width:356px!important;
  height:64px!important;
  aspect-ratio:356/64;
  background-image:
    linear-gradient(90deg,rgba(5,9,14,.24) 0%,rgba(5,9,14,.16) 52%,rgba(5,9,14,.10) 100%),
    url('../images/competition/crypt_event.webp')!important;
  background-size:100% 100%!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}
.competition-header-cta-epic .competition-cta-main{
  padding-top:7px;
  padding-bottom:7px;
}
@media (min-width:901px) and (max-width:1199px){
  .competition-header-cta-v3.competition-header-cta-epic{
    width:326px!important;
    height:auto!important;
    aspect-ratio:356/64;
  }
}
@media (min-width:561px) and (max-width:900px){
  .competition-header-cta-v3.competition-header-cta-epic{
    width:294px!important;
    height:auto!important;
    aspect-ratio:356/64;
  }
}
@media (max-width:560px){
  .competition-header-cta-v3.competition-header-cta-epic{
    width:min(306px,calc(100% - 24px))!important;
    height:auto!important;
    aspect-ratio:356/64;
  }
}

/* SWORD M3.5.0B166.35 — Framed Skull Crypt Competition CTA */
.competition-header-cta-v3.competition-header-cta-epic{
  width:500px!important;
  height:auto!important;
  aspect-ratio:2121/741!important;
  left:55%;
  bottom:78px;
  padding:0!important;
  overflow:hidden!important;
  isolation:isolate;
  border:1px solid rgba(226,166,55,.95)!important;
  border-radius:10px!important;
  outline:0!important;
  box-shadow:0 8px 22px rgba(20,28,38,.20),0 0 14px rgba(192,132,38,.12)!important;
  filter:none!important;
  background-image:
    linear-gradient(90deg,rgba(5,8,12,.68) 0%,rgba(5,8,12,.38) 52%,rgba(5,8,12,.10) 100%),
    url('../images/competition/crypt_event.webp')!important;
  background-size:cover!important;
  background-position:54% center!important;
  background-repeat:no-repeat!important;
  transition:border-color .18s ease,box-shadow .18s ease,filter .18s ease;
}
.competition-header-cta-v3.competition-header-cta-epic::before{
  display:none!important;
  content:none!important;
}
.competition-header-cta-v3.competition-header-cta-epic::after{
  content:""!important;
  display:block!important;
  position:absolute;
  top:-55%;
  left:-24%;
  width:12%;
  height:210%;
  background:linear-gradient(90deg,transparent,rgba(255,226,157,.20),transparent);
  transform:skewX(-20deg);
  animation:competitionCtaEpicSweep 9s ease-in-out infinite;
  pointer-events:none;
  z-index:2;
}
.competition-header-cta-epic .competition-cta-main{
  position:relative;
  z-index:3;
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto auto;
  align-items:center;
  column-gap:18px;
  row-gap:8px;
  padding:20px 26px!important;
}
.competition-header-cta-epic .competition-cta-heading{
  grid-column:1/2;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  align-self:end;
}
.competition-header-cta-epic .competition-cta-heading strong{
  font-size:26px!important;
  line-height:1!important;
  font-weight:800;
  color:#fff4d7;
  text-shadow:0 2px 4px rgba(0,0,0,.92),0 0 10px rgba(220,160,55,.22);
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
  letter-spacing:-.025em;
}
.competition-header-cta-epic .competition-cta-live{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:3px 8px!important;
  border-radius:999px;
  background:rgba(21,139,74,.94);
  color:#fff;
  font-size:9px!important;
  line-height:1;
  font-weight:900;
  letter-spacing:.08em;
  box-shadow:0 0 0 1px rgba(255,255,255,.18) inset,0 0 8px rgba(24,191,98,.22);
}
.competition-header-cta-epic .competition-cta-live i{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#d9ffe6;
  animation:competitionLivePulse 1.7s ease-out infinite;
}
.competition-header-cta-epic .competition-cta-countdown{
  grid-column:1/2;
  display:flex;
  align-items:center;
  gap:8px!important;
  transform:none!important;
  align-self:start;
}
.competition-header-cta-epic .competition-cta-time{
  width:66px!important;
  min-width:66px!important;
  height:54px!important;
  padding:0 7px!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  border:1px solid rgba(226,166,55,.78)!important;
  border-radius:8px!important;
  background:rgba(5,7,10,.72)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.05) inset,0 3px 7px rgba(0,0,0,.24)!important;
}
.competition-header-cta-epic .competition-cta-time b{
  font-size:24px!important;
  line-height:1;
  font-weight:800;
  color:#fff2c8;
  font-variant-numeric:tabular-nums;
}
.competition-header-cta-epic .competition-cta-time small{
  font-size:10px!important;
  line-height:1;
  font-weight:800;
  color:#e0bb67;
}
.competition-header-cta-epic .competition-cta-action{
  grid-column:2/3;
  grid-row:1/3;
  align-self:center;
  padding:0 0 0 18px!important;
  margin-right:2px;
  border:0!important;
  border-left:1px solid rgba(226,174,71,.58)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#f2c35f;
  font-size:16px!important;
  line-height:1;
  font-weight:800;
  text-shadow:0 1px 3px rgba(0,0,0,.72);
  white-space:nowrap;
  transform:none!important;
  transition:color .18s ease;
}
.competition-header-cta-epic:hover{
  border-color:rgba(246,192,82,.98)!important;
  box-shadow:0 9px 25px rgba(20,28,38,.24),0 0 16px rgba(192,132,38,.17)!important;
  filter:brightness(1.012)!important;
}
.competition-header-cta-epic:hover .competition-cta-action{color:#ffe09a}
.competition-header-cta-epic:hover .competition-cta-action span{transform:translateX(3px)}

@media (min-width:901px) and (max-width:1199px){
  .competition-header-cta-v3.competition-header-cta-epic{width:440px!important;bottom:108px}
  .competition-header-cta-epic .competition-cta-main{padding:17px 21px!important;column-gap:14px;row-gap:7px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:22px!important}
  .competition-header-cta-epic .competition-cta-live{font-size:8px!important;padding:3px 7px!important}
  .competition-header-cta-epic .competition-cta-countdown{gap:6px!important}
  .competition-header-cta-epic .competition-cta-time{width:57px!important;min-width:57px!important;height:46px!important}
  .competition-header-cta-epic .competition-cta-time b{font-size:20px!important}
  .competition-header-cta-epic .competition-cta-time small{font-size:9px!important}
  .competition-header-cta-epic .competition-cta-action{font-size:14px!important;padding-left:14px!important}
}
@media (min-width:561px) and (max-width:900px){
  .competition-header-cta-v3.competition-header-cta-epic{width:360px!important;left:50%;bottom:126px}
  .competition-header-cta-epic .competition-cta-main{padding:13px 16px!important;column-gap:10px;row-gap:5px}
  .competition-header-cta-epic .competition-cta-heading{gap:6px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:17px!important}
  .competition-header-cta-epic .competition-cta-live{font-size:7px!important;padding:2px 6px!important}
  .competition-header-cta-epic .competition-cta-countdown{gap:4px!important}
  .competition-header-cta-epic .competition-cta-time{width:45px!important;min-width:45px!important;height:37px!important;padding:0 4px!important}
  .competition-header-cta-epic .competition-cta-time b{font-size:16px!important}
  .competition-header-cta-epic .competition-cta-time small{font-size:7px!important}
  .competition-header-cta-epic .competition-cta-action{font-size:11px!important;padding-left:9px!important}
}
@media (max-width:560px){
  .competition-header-cta-v3.competition-header-cta-epic{
    width:min(340px,calc(100% - 24px))!important;
    left:50%;
    bottom:128px;
  }
  .competition-header-cta-epic .competition-cta-main{padding:12px 13px!important;column-gap:8px;row-gap:4px}
  .competition-header-cta-epic .competition-cta-heading{gap:5px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:15px!important}
  .competition-header-cta-epic .competition-cta-live{font-size:6px!important;padding:2px 5px!important}
  .competition-header-cta-epic .competition-cta-countdown{gap:3px!important}
  .competition-header-cta-epic .competition-cta-time{width:40px!important;min-width:40px!important;height:34px!important;padding:0 3px!important}
  .competition-header-cta-epic .competition-cta-time b{font-size:14px!important}
  .competition-header-cta-epic .competition-cta-time small{font-size:6px!important}
  .competition-header-cta-epic .competition-cta-action{font-size:0!important;padding-left:8px!important}
  .competition-header-cta-epic .competition-cta-action::before{content:'View';font-size:10px}
  .competition-header-cta-epic .competition-cta-action span{font-size:10px}
}
@media (prefers-reduced-motion:reduce){
  .competition-header-cta-v3.competition-header-cta-epic::after,
  .competition-header-cta-epic .competition-cta-live i,
  .competition-header-cta-epic .competition-cta-time.is-flip{animation:none!important}
}

/* SWORD M3.5.0B166.36 — Compact 340px Competition CTA */
.competition-header-cta-v3.competition-header-cta-epic{
  width:340px!important;
  height:auto!important;
  aspect-ratio:2121/741!important;
  left:55%;
  bottom:88px;
  overflow:hidden!important;
  border:1px solid rgba(218,157,39,.90)!important;
  border-radius:8px!important;
  box-shadow:0 5px 14px rgba(9,15,22,.18)!important;
  background-image:
    linear-gradient(90deg,rgba(4,7,10,.68) 0%,rgba(4,7,10,.52) 48%,rgba(4,7,10,.10) 100%),
    url('../images/competition/crypt_event.webp')!important;
  background-size:cover!important;
  background-position:center center!important;
  background-repeat:no-repeat!important;
}
.competition-header-cta-epic .competition-cta-main{
  position:relative;
  z-index:3;
  width:100%;
  height:100%;
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-rows:auto auto;
  align-items:center;
  column-gap:10px;
  row-gap:7px;
  padding:14px 14px 12px 20px!important;
}
.competition-header-cta-epic .competition-cta-heading{
  grid-column:1/3;
  grid-row:1;
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  align-self:end;
}
.competition-header-cta-epic .competition-cta-heading strong{
  font-size:15px!important;
  line-height:1!important;
  font-weight:800;
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
  letter-spacing:-.015em;
}
.competition-header-cta-epic .competition-cta-live{
  font-size:8px!important;
  padding:2px 6px!important;
  gap:4px;
}
.competition-header-cta-epic .competition-cta-live i{width:5px;height:5px}
.competition-header-cta-epic .competition-cta-countdown{
  grid-column:1;
  grid-row:2;
  display:flex;
  align-items:center;
  gap:5px!important;
  align-self:start;
}
.competition-header-cta-epic .competition-cta-time{
  width:43px!important;
  min-width:43px!important;
  height:33px!important;
  padding:0 4px!important;
  gap:3px;
  border-radius:6px!important;
  border:1px solid rgba(226,166,55,.72)!important;
  background:rgba(5,7,10,.72)!important;
}
.competition-header-cta-epic .competition-cta-time b{
  font-size:15px!important;
  line-height:1!important;
}
.competition-header-cta-epic .competition-cta-time small{
  font-size:8px!important;
  line-height:1!important;
}
.competition-header-cta-epic .competition-cta-action{
  grid-column:2;
  grid-row:2;
  align-self:center;
  justify-self:end;
  margin:0!important;
  padding:0 0 0 10px!important;
  border-left:1px solid rgba(226,174,71,.58)!important;
  font-size:10px!important;
  line-height:1!important;
  white-space:nowrap;
}
.competition-header-cta-v3.competition-header-cta-epic::after{
  overflow:hidden!important;
  animation-duration:9s!important;
}

@media (min-width:901px) and (max-width:1199px){
  .competition-header-cta-v3.competition-header-cta-epic{width:320px!important;bottom:108px}
  .competition-header-cta-epic .competition-cta-main{padding:13px 12px 11px 17px!important;column-gap:8px;row-gap:6px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:14px!important}
  .competition-header-cta-epic .competition-cta-live{font-size:7px!important;padding:2px 5px!important}
  .competition-header-cta-epic .competition-cta-countdown{gap:4px!important}
  .competition-header-cta-epic .competition-cta-time{width:40px!important;min-width:40px!important;height:31px!important;padding:0 3px!important}
  .competition-header-cta-epic .competition-cta-time b{font-size:14px!important}
  .competition-header-cta-epic .competition-cta-time small{font-size:7px!important}
  .competition-header-cta-epic .competition-cta-action{font-size:9px!important;padding-left:8px!important}
}
@media (min-width:561px) and (max-width:900px){
  .competition-header-cta-v3.competition-header-cta-epic{width:290px!important;left:50%;bottom:126px}
  .competition-header-cta-epic .competition-cta-main{padding:11px 10px 10px 14px!important;column-gap:7px;row-gap:5px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:12.5px!important}
  .competition-header-cta-epic .competition-cta-live{font-size:6px!important;padding:2px 5px!important}
  .competition-header-cta-epic .competition-cta-countdown{gap:3px!important}
  .competition-header-cta-epic .competition-cta-time{width:36px!important;min-width:36px!important;height:28px!important;padding:0 3px!important}
  .competition-header-cta-epic .competition-cta-time b{font-size:12px!important}
  .competition-header-cta-epic .competition-cta-time small{font-size:6px!important}
  .competition-header-cta-epic .competition-cta-action{font-size:8px!important;padding-left:7px!important}
}
@media (max-width:560px){
  .competition-header-cta-v3.competition-header-cta-epic{
    width:min(280px,calc(100vw - 28px))!important;
    left:50%;
    bottom:128px;
    aspect-ratio:2121/741!important;
  }
  .competition-header-cta-epic .competition-cta-main{padding:10px 9px 9px 12px!important;column-gap:6px;row-gap:4px}
  .competition-header-cta-epic .competition-cta-heading{gap:4px}
  .competition-header-cta-epic .competition-cta-heading strong{font-size:12px!important}
  .competition-header-cta-epic .competition-cta-live{font-size:5.5px!important;padding:2px 4px!important}
  .competition-header-cta-epic .competition-cta-countdown{gap:3px!important}
  .competition-header-cta-epic .competition-cta-time{width:34px!important;min-width:34px!important;height:26px!important;padding:0 2px!important}
  .competition-header-cta-epic .competition-cta-time b{font-size:11px!important}
  .competition-header-cta-epic .competition-cta-time small{font-size:5.5px!important}
  .competition-header-cta-epic .competition-cta-action{font-size:0!important;padding-left:6px!important}
  .competition-header-cta-epic .competition-cta-action::before{content:'View';font-size:8px}
  .competition-header-cta-epic .competition-cta-action span{font-size:8px}
}


/* SWORD M3.5.0B166.37 — Competition CTA 350×88 desktop compact-height hotfix */
@media (min-width:1200px){
  .competition-header-cta-v3.competition-header-cta-epic{
    width:350px!important;
    height:88px!important;
    aspect-ratio:auto!important;
    left:55%;
    bottom:104px!important;
    overflow:hidden!important;
    background-size:cover!important;
    background-position:center center!important;
  }

  .competition-header-cta-epic .competition-cta-main{
    grid-template-columns:auto 1fr;
    grid-template-rows:auto auto;
    column-gap:9px;
    row-gap:4px;
    padding:10px 12px 9px 16px!important;
  }

  .competition-header-cta-epic .competition-cta-heading{
    grid-column:1/3;
    gap:6px;
    align-self:end;
  }

  .competition-header-cta-epic .competition-cta-heading strong{
    font-size:14px!important;
    line-height:1!important;
  }

  .competition-header-cta-epic .competition-cta-live{
    font-size:7px!important;
    padding:2px 5px!important;
    gap:4px;
  }

  .competition-header-cta-epic .competition-cta-live i{
    width:5px;
    height:5px;
  }

  .competition-header-cta-epic .competition-cta-countdown{
    grid-column:1;
    grid-row:2;
    gap:5px!important;
    align-self:start;
  }

  .competition-header-cta-epic .competition-cta-time{
    width:40px!important;
    min-width:40px!important;
    height:29px!important;
    padding:0 3px!important;
    gap:2px;
    border-radius:6px!important;
  }

  .competition-header-cta-epic .competition-cta-time b{
    font-size:13px!important;
  }

  .competition-header-cta-epic .competition-cta-time small{
    font-size:7px!important;
  }

  .competition-header-cta-epic .competition-cta-action{
    grid-column:2;
    grid-row:2;
    justify-self:end;
    align-self:center;
    font-size:9px!important;
    padding-left:8px!important;
    margin-right:2px!important;
  }
}

/* Keep the same compact visual hierarchy on narrower breakpoints. */
@media (min-width:901px) and (max-width:1199px){
  .competition-header-cta-v3.competition-header-cta-epic{
    width:320px!important;
    height:80px!important;
    aspect-ratio:auto!important;
    bottom:120px!important;
  }
  .competition-header-cta-epic .competition-cta-main{
    padding:9px 11px 8px 14px!important;
    row-gap:4px;
  }
  .competition-header-cta-epic .competition-cta-heading strong{font-size:13px!important}
  .competition-header-cta-epic .competition-cta-time{
    width:37px!important;
    min-width:37px!important;
    height:27px!important;
  }
  .competition-header-cta-epic .competition-cta-time b{font-size:12px!important}
  .competition-header-cta-epic .competition-cta-action{font-size:8px!important}
}

@media (min-width:561px) and (max-width:900px){
  .competition-header-cta-v3.competition-header-cta-epic{
    width:290px!important;
    height:73px!important;
    aspect-ratio:auto!important;
    bottom:132px!important;
  }
}

@media (max-width:560px){
  .competition-header-cta-v3.competition-header-cta-epic{
    width:min(270px,calc(100vw - 28px))!important;
    height:68px!important;
    aspect-ratio:auto!important;
    bottom:134px!important;
  }
}


/* ==========================================================================
   SWORD M3.5.0B166.42 — Hero Header Layout Optimization + Game Time
   ========================================================================== */

@media (min-width:1200px){
  .hero{
    --brand-logo-left:max(32px,calc((100% - var(--content-max))/2 + 76px));
    --brand-logo-top:46px;
    --brand-logo-size:168px;
    --brand-gap:24px;
    height:350px;
    min-height:350px;
  }

  .hero-logo{
    left:var(--brand-logo-left);
    top:var(--brand-logo-top);
    width:var(--brand-logo-size);
    height:var(--brand-logo-size);
  }

  .brand{
    left:calc(var(--brand-logo-left) + var(--brand-logo-size) + var(--brand-gap));
    top:108px;
    transform:none;
  }

  .brand h1{
    font:700 48px/1 Georgia,serif;
    letter-spacing:-.025em;
  }

  .brand p{
    margin-top:10px;
    font-size:9px;
    letter-spacing:.34em;
  }

  .brand small{
    display:block;
    margin-top:12px;
    color:#315d84;
    font-size:7.5px;
    line-height:1;
    font-weight:800;
    letter-spacing:.30em;
    white-space:nowrap;
  }

  .competition-header-cta-v3.competition-header-cta-epic{
    left:50%!important;
    bottom:76px!important;
    transform:translateX(-50%)!important;
    width:350px!important;
    height:88px!important;
  }

  .hero-stats{
    bottom:10px;
    grid-template-columns:minmax(260px,1fr) minmax(360px,1.15fr) minmax(330px,1.15fr);
    gap:12px;
  }

  .hero-search,
  .stat-card,
  .week-card{
    height:52px;
  }

  .hero-search{
    width:100%;
    max-width:none;
    padding-inline:16px;
  }

  .stat-card{
    grid-template-columns:32px minmax(0,1fr);
    padding-inline:10px;
  }

  .week-card{
    min-width:0;
  }
}

/* Small elegant game-time marker, independent from the hero content flow. */
.hero-game-time{
  position:absolute;
  top:16px;
  left:max(20px,calc((100% - var(--content-max))/2));
  z-index:20;
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:24px;
  padding:0 2px 5px 0;
  border-bottom:1px solid rgba(189,137,34,.42);
  color:#173d68;
  font-size:11px;
  line-height:1;
  font-weight:650;
  font-variant-numeric:tabular-nums;
  text-shadow:0 1px 2px rgba(255,255,255,.42);
  white-space:nowrap;
}
.hero-game-time b{font-weight:800}
.hero-game-time-icon{
  display:grid;
  place-items:center;
  width:17px;
  height:17px;
  color:#a87813;
}
.hero-game-time-icon svg{
  width:100%;
  height:100%;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.hero-brand-link{display:block}
.brand small{display:none}

/* Keep profile exactly in its established top-right position. */
.profile-wrap{z-index:999}

/* Tablet */
@media (min-width:901px) and (max-width:1199px){
  .hero{
    height:330px;
    min-height:330px;
    --brand-logo-left:28px;
    --brand-logo-top:48px;
    --brand-logo-size:145px;
    --brand-gap:18px;
  }
  .brand{
    top:91px;
    transform:none;
  }
  .brand h1{font-size:42px}
  .brand p{font-size:8px;letter-spacing:.30em}
  .brand small{
    display:block;
    margin-top:10px;
    color:#315d84;
    font-size:6.8px;
    font-weight:800;
    letter-spacing:.24em;
  }
  .hero-game-time{top:14px;left:20px;font-size:10.5px}
  .competition-header-cta-v3.competition-header-cta-epic{
    left:50%!important;
    bottom:83px!important;
  }
  .hero-stats{
    bottom:10px;
    grid-template-columns:minmax(220px,1fr) minmax(310px,1.15fr) minmax(300px,1.15fr);
    gap:10px;
  }
  .hero-search,.stat-card,.week-card{height:50px}
}

/* Medium screens */
@media (min-width:561px) and (max-width:900px){
  .hero{
    height:360px;
    min-height:360px;
  }
  .hero-game-time{top:12px;left:16px;font-size:10px}
  .brand small{display:none}
  .competition-header-cta-v3.competition-header-cta-epic{
    left:50%!important;
    bottom:126px!important;
  }
}

/* Mobile */
@media (max-width:560px){
  .hero-game-time{
    top:8px;
    left:12px;
    font-size:9px;
    gap:5px;
    max-width:calc(100% - 118px);
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .hero-game-time-icon{width:14px;height:14px}
  .brand small{display:none}
}

/* Competition page retains its dedicated compact hero dimensions. */
.hero.hero-competition .hero-game-time{display:none}


/* ==========================================================================
   SWORD M3.5.0B166.43 — Hero logo intrinsic-ratio sizing hotfix
   ========================================================================== */

.hero-logo{
  display:block!important;
  width:137px!important;
  height:145px!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  flex:none!important;
}

@media (min-width:1200px){
  .hero{
    --brand-logo-width:158px;
    --brand-logo-height:168px;
  }

  .hero-logo{
    width:var(--brand-logo-width)!important;
    height:var(--brand-logo-height)!important;
  }

  .brand{
    left:calc(var(--brand-logo-left) + var(--brand-logo-width) + var(--brand-gap))!important;
  }
}

@media (min-width:901px) and (max-width:1199px){
  .hero{
    --brand-logo-width:137px;
    --brand-logo-height:145px;
  }

  .hero-logo{
    width:var(--brand-logo-width)!important;
    height:var(--brand-logo-height)!important;
  }

  .brand{
    left:calc(var(--brand-logo-left) + var(--brand-logo-width) + var(--brand-gap))!important;
  }
}

@media (max-width:900px){
  .hero-logo{
    max-width:none!important;
    max-height:none!important;
  }
}


/* ==========================================================================
   SWORD M3.5.0B166.44 — FINAL HERO RESPONSIVE OVERRIDES
   Canonical responsive positioning for hero/brand/competition CTA/stats.
   ========================================================================== */

@media (min-width:1200px){
  .competition-header-cta-v3.competition-header-cta-epic{
    top:175px!important;
    bottom:auto!important;
  }
}

@media (min-width:901px) and (max-width:1199px){
  .brand{
    top:76px!important;
    transform:none!important;
  }

  .competition-header-cta-v3.competition-header-cta-epic{
    top:155px!important;
    bottom:auto!important;
  }
}

@media (min-width:561px) and (max-width:900px){
  .hero{
    min-height:350px!important;
    height:350px!important;
  }

  .hero-logo{
    top:48px!important;
    left:22px!important;
    width:118px!important;
    height:125px!important;
  }

  .brand{
    top:72px!important;
    left:156px!important;
    transform:none!important;
  }

  .brand h1{
    font-size:34px!important;
    line-height:1!important;
  }

  .brand p{
    font-size:7px!important;
    letter-spacing:.22em!important;
  }

  .brand small{
    display:none!important;
  }

  .competition-header-cta-v3.competition-header-cta-epic{
    top:140px!important;
    bottom:auto!important;
  }
}

@media (max-width:560px){
  .hero{
    position:relative!important;
    height:390px!important;
    min-height:390px!important;
    overflow:visible!important;
  }

  .hero-game-time{
    top:8px!important;
    left:12px!important;
    font-size:9px!important;
    max-width:calc(100% - 136px)!important;
    z-index:20!important;
  }

  .hero-logo{
    top:38px!important;
    left:18px!important;
    width:92px!important;
    height:auto!important;
    max-width:none!important;
    max-height:none!important;
    object-fit:contain!important;
    z-index:10!important;
  }

  .brand{
    top:62px!important;
    left:122px!important;
    right:10px!important;
    transform:none!important;
    z-index:10!important;
  }

  .brand h1{
    font-size:28px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }

  .brand p{
    margin-top:7px!important;
    font-size:6px!important;
    letter-spacing:.22em!important;
    white-space:nowrap!important;
  }

  .brand small{
    display:none!important;
  }

  .competition-header-cta-v3.competition-header-cta-epic{
    top:132px!important;
    bottom:auto!important;
    left:50%!important;
    transform:translateX(-50%)!important;
    width:min(300px,calc(100vw - 24px))!important;
    height:76px!important;
    z-index:15!important;
  }

  .competition-header-cta-epic .competition-cta-main{
    padding:8px 10px 7px 12px!important;
    row-gap:3px!important;
    column-gap:7px!important;
  }

  .competition-header-cta-epic .competition-cta-heading strong{
    font-size:12px!important;
  }

  .competition-header-cta-epic .competition-cta-live{
    font-size:6px!important;
    padding:2px 4px!important;
  }

  .competition-header-cta-epic .competition-cta-countdown{
    gap:4px!important;
  }

  .competition-header-cta-epic .competition-cta-time{
    width:36px!important;
    min-width:36px!important;
    height:25px!important;
    padding:0 2px!important;
  }

  .competition-header-cta-epic .competition-cta-time b{
    font-size:11px!important;
  }

  .competition-header-cta-epic .competition-cta-time small{
    font-size:6px!important;
  }

  .competition-header-cta-epic .competition-cta-action{
    font-size:8px!important;
    padding-left:6px!important;
  }

  .hero-stats{
    position:absolute!important;
    top:218px!important;
    left:12px!important;
    right:12px!important;
    bottom:auto!important;
    width:auto!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-areas:
      "week week week"
      "members events pending"
      "search search search"!important;
    gap:8px!important;
    z-index:20!important;
  }

  .week-card{
    grid-area:week!important;
    width:100%!important;
    min-width:0!important;
    height:48px!important;
  }

  .hero-stats .stat-card:nth-of-type(1){grid-area:members!important;}
  .hero-stats .stat-card:nth-of-type(2){grid-area:events!important;}
  .hero-stats .stat-card:nth-of-type(3){grid-area:pending!important;}

  .stat-card{
    min-width:0!important;
    width:100%!important;
    height:48px!important;
    padding:6px 7px!important;
    grid-template-columns:28px minmax(0,1fr)!important;
  }

  .stat-card .stat-icon{
    width:28px!important;
    height:28px!important;
  }

  .stat-card strong{
    font-size:16px!important;
  }

  .stat-card span{
    font-size:8px!important;
  }

  .hero-search{
    grid-area:search!important;
    position:static!important;
    width:100%!important;
    max-width:none!important;
    height:44px!important;
    margin:0!important;
    padding-inline:14px!important;
  }

  .profile-wrap{
    z-index:999!important;
  }

  .main{
    position:relative;
    z-index:1;
  }
}


/* ==========================================================================
   SWORD M3.5.0B166.45 — Mobile Hero Layout Corrective Hotfix
   Corrects B166.44 assumptions about .hero-stats markup:
   actual structure = hero-search + kpi-cluster + week-card.
   ========================================================================== */

@media (max-width:560px){
  .hero{
    height:342px!important;
    min-height:342px!important;
    overflow:hidden!important;
  }

  /* Keep the approved top area compact. */
  .hero-game-time{
    top:8px!important;
    left:12px!important;
    z-index:30!important;
  }

  .profile-wrap{
    top:8px!important;
    right:10px!important;
    z-index:999!important;
  }

  .hero-logo{
    top:38px!important;
    left:18px!important;
    width:92px!important;
    height:auto!important;
  }

  .brand{
    top:62px!important;
    left:122px!important;
    right:8px!important;
    transform:none!important;
  }

  .brand h1{
    font-size:28px!important;
    line-height:1!important;
  }

  .brand p{
    display:none!important;
  }

  /* CTA sits cleanly below brand. */
  .competition-header-cta-v3.competition-header-cta-epic{
    top:132px!important;
    bottom:auto!important;
    left:50%!important;
    transform:translateX(-50%)!important;
    width:min(300px,calc(100vw - 28px))!important;
    height:76px!important;
    z-index:20!important;
  }

  /* Remove legacy mobile pseudo-label which caused "ViewView event". */
  .competition-header-cta-epic .competition-cta-action{
    font-size:8px!important;
    white-space:nowrap!important;
  }
  .competition-header-cta-epic .competition-cta-action::before{
    content:none!important;
    display:none!important;
  }

  /* Actual markup:
       .hero-stats
         .hero-search
         .kpi-cluster
           .stat-card x3
         .week-card
     Do not assign grid areas to the stat-cards directly. */
  .hero-stats{
    position:absolute!important;
    top:216px!important;
    left:12px!important;
    right:12px!important;
    bottom:auto!important;
    width:auto!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-areas:
      "date"
      "kpis"!important;
    gap:8px!important;
    z-index:25!important;
  }

  .week-card{
    grid-area:date!important;
    position:static!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:48px!important;
    margin:0!important;
  }

  .kpi-cluster{
    grid-area:kpis!important;
    position:static!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }

  .kpi-cluster .stat-card{
    position:static!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:48px!important;
    margin:0!important;
    padding:5px 6px!important;
    grid-template-columns:26px minmax(0,1fr)!important;
  }

  .kpi-cluster .stat-icon{
    width:26px!important;
    height:26px!important;
  }

  .kpi-cluster .stat-value{
    font-size:15px!important;
    line-height:1!important;
  }

  .kpi-cluster .stat-label{
    font-size:8px!important;
    line-height:1.05!important;
    white-space:normal!important;
  }

  /* Search stays hidden on mobile as in the original stable responsive design.
     This prevents the hero from growing into a large empty block. */
  .hero-search{
    display:none!important;
  }

  /* Neutralize invalid B166.44 direct-card grid assignments. */
  .hero-stats .stat-card:nth-of-type(1),
  .hero-stats .stat-card:nth-of-type(2),
  .hero-stats .stat-card:nth-of-type(3){
    grid-area:auto!important;
  }
}

@media (max-width:419px){
  .hero{
    height:334px!important;
    min-height:334px!important;
  }

  .hero-logo{
    width:82px!important;
    top:40px!important;
  }

  .brand{
    left:108px!important;
    top:64px!important;
  }

  .brand h1{
    font-size:24px!important;
  }

  .competition-header-cta-v3.competition-header-cta-epic{
    top:128px!important;
    width:min(286px,calc(100vw - 22px))!important;
    height:72px!important;
  }

  .hero-stats{
    top:208px!important;
    left:10px!important;
    right:10px!important;
  }

  .week-card{
    height:46px!important;
  }

  .kpi-cluster{
    gap:5px!important;
  }

  .kpi-cluster .stat-card{
    height:46px!important;
    padding:4px!important;
    grid-template-columns:23px minmax(0,1fr)!important;
  }

  .kpi-cluster .stat-icon{
    width:23px!important;
    height:23px!important;
  }

  .kpi-cluster .stat-value{
    font-size:13px!important;
  }

  .kpi-cluster .stat-label{
    font-size:7.5px!important;
  }
}


/* ==========================================================================
   SWORD M3.5.0B166.46 — Tablet Competition CTA Position Hotfix
   ========================================================================== */

@media (min-width:901px) and (max-width:1199px){
  .competition-header-cta-v3.competition-header-cta-epic{
    top:126px!important;
    bottom:auto!important;
  }
}


/* ==========================================================================
   SWORD M3.5.0B166.47 — Medium-width Hero Controls Corrective Hotfix
   Fixes 561–900 px layout using the actual .hero-stats DOM structure.
   ========================================================================== */

@media (min-width:561px) and (max-width:900px){
  .hero{
    height:340px!important;
    min-height:340px!important;
    overflow:hidden!important;
  }

  .competition-header-cta-v3.competition-header-cta-epic{
    top:140px!important;
    bottom:auto!important;
    left:50%!important;
    transform:translateX(-50%)!important;
    z-index:20!important;
  }

  /* Actual DOM:
     .hero-stats
       .hero-search
       .kpi-cluster
         .stat-card x3
       .week-card
  */
  .hero-stats{
    position:absolute!important;
    top:224px!important;
    left:14px!important;
    right:14px!important;
    bottom:auto!important;
    width:auto!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-areas:
      "week"
      "kpis"!important;
    gap:8px!important;
    z-index:25!important;
  }

  .week-card{
    grid-area:week!important;
    position:static!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:48px!important;
    margin:0!important;
  }

  .kpi-cluster{
    grid-area:kpis!important;
    position:static!important;
    width:100%!important;
    min-width:0!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    margin:0!important;
  }

  .kpi-cluster .stat-card{
    position:static!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:48px!important;
    margin:0!important;
    padding:6px 8px!important;
    grid-template-columns:28px minmax(0,1fr)!important;
  }

  .kpi-cluster .stat-icon{
    width:28px!important;
    height:28px!important;
  }

  .kpi-cluster .stat-value{
    font-size:15px!important;
    line-height:1!important;
  }

  .kpi-cluster .stat-label{
    font-size:8px!important;
    line-height:1.05!important;
    white-space:normal!important;
  }

  /* Hide search in this compact hero width; it returns on desktop/tablet-wide. */
  .hero-search{
    display:none!important;
  }

  /* Neutralize legacy grid-area rules targeting cards as direct children. */
  .hero-stats .stat-card:nth-of-type(1),
  .hero-stats .stat-card:nth-of-type(2),
  .hero-stats .stat-card:nth-of-type(3){
    grid-area:auto!important;
  }
}

/* Extra tightening for the lower half of the medium range. */
@media (min-width:561px) and (max-width:680px){
  .hero{
    height:332px!important;
    min-height:332px!important;
  }

  .hero-stats{
    top:216px!important;
    left:10px!important;
    right:10px!important;
  }

  .week-card{
    height:46px!important;
  }

  .kpi-cluster{
    gap:6px!important;
  }

  .kpi-cluster .stat-card{
    height:46px!important;
    padding:5px 6px!important;
    grid-template-columns:25px minmax(0,1fr)!important;
  }

  .kpi-cluster .stat-icon{
    width:25px!important;
    height:25px!important;
  }

  .kpi-cluster .stat-value{
    font-size:14px!important;
  }

  .kpi-cluster .stat-label{
    font-size:7.5px!important;
  }
}


/* ==========================================================================
   SWORD M3.5.0B166.48 — Responsive Hero Transform/Flow Corrective Hotfix
   Root cause: legacy responsive rules still applied translate(-50%, -80px)
   and negative main margins below 900px, overriding the new absolute geometry.
   ========================================================================== */

@media (max-width:900px){
  /* New responsive layouts use explicit left/right/top coordinates.
     Legacy translate centering must not remain active. */
  .hero-stats{
    transform:none!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  /* Legacy M3.3.x vertical-lift rules pulled the results table back upward.
     The current hero has its own explicit height, so return document flow
     to normal below it. */
  .main{
    margin-top:0!important;
  }
}

@media (min-width:561px) and (max-width:900px){
  .hero-stats{
    left:14px!important;
    right:14px!important;
    width:auto!important;
    max-width:none!important;
    top:224px!important;
    bottom:auto!important;
  }
}

@media (min-width:561px) and (max-width:680px){
  .hero-stats{
    left:10px!important;
    right:10px!important;
    top:216px!important;
  }
}

@media (max-width:560px){
  .hero-stats{
    left:12px!important;
    right:12px!important;
    width:auto!important;
    max-width:none!important;
    top:216px!important;
    bottom:auto!important;
    transform:none!important;
  }
}

@media (max-width:419px){
  .hero-stats{
    left:10px!important;
    right:10px!important;
    top:208px!important;
  }
}

/* ========================================================================== */
/* SWORD M3.6.0A2.39 — Competition mobile hero + leaderboard scroll hotfix    */
/* ========================================================================== */
@media (max-width:560px){
  /* Competition uses a compact header hero. Later global mobile hero rules
     must not reserve the dashboard KPI/search height on this page. */
  .hero.hero-competition{
    height:170px!important;
    min-height:170px!important;
    overflow:hidden!important;
  }

  /* Keep the leaderboard genuinely horizontally scrollable on touch devices. */
  .competition-table-scroll.competition-table-scroll-v2{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
  }

  .competition-table-unified{
    width:820px!important;
    min-width:820px!important;
    table-layout:fixed;
  }

  /* Only rank + avatar stay frozen. A sticky nickname consumed almost the
     entire iPhone viewport and made the remaining columns appear immovable. */
  .competition-table-unified .col-rank{
    position:sticky!important;
    left:0!important;
    width:42px!important;
    min-width:42px!important;
    max-width:42px!important;
    z-index:3;
  }
  .competition-table-unified .col-avatar{
    position:sticky!important;
    left:42px!important;
    width:52px!important;
    min-width:52px!important;
    max-width:52px!important;
    z-index:3;
  }
  .competition-table-unified .col-name{
    position:static!important;
    left:auto!important;
    width:158px!important;
    min-width:158px!important;
    max-width:158px!important;
    z-index:auto!important;
  }
  .competition-table-unified .col-name>strong{
    display:block;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .competition-table-unified .col-score{
    width:170px!important;
    min-width:170px!important;
  }

  .competition-table-unified thead .col-rank,
  .competition-table-unified thead .col-avatar{z-index:5;background:#eff5fa}

  /* Name is no longer sticky, so it must use the row's normal background. */
  .competition-table-unified tbody tr.rank-1 .col-name{background:#fff7d8!important}
  .competition-table-unified tbody tr.rank-2 .col-name{background:#f2f6f9!important}
  .competition-table-unified tbody tr.rank-3 .col-name{background:#fff0e6!important}

  /* Header metadata wraps instead of being clipped to the right. */
  .competition-results-head{
    white-space:normal!important;
    overflow:visible!important;
    flex-wrap:wrap;
    row-gap:4px;
  }
  .competition-results-head h2{white-space:nowrap}
}

/* ========================================================================== */
/* SWORD M3.6.0A2.40 — Competition dark podium rows + sticky table header     */
/* ========================================================================== */

/* Give the leaderboard its own scroll viewport so the column header remains
   visible while browsing long standings. Horizontal scrolling is preserved. */
.competition-table-scroll.competition-table-scroll-v2{
  position:relative;
  overflow:auto!important;
  max-height:min(72vh,720px);
  scrollbar-gutter:stable;
}

.competition-table-unified thead th{
  position:sticky;
  top:0;
  z-index:7;
  box-shadow:0 1px 0 rgba(151,171,190,.28);
}

/* Frozen rank/avatar cells must remain above the rest of the sticky header. */
.competition-table-unified thead .col-rank,
.competition-table-unified thead .col-avatar{
  z-index:9!important;
}

/* Dark mode: podium rows keep gold/silver/bronze identity without bright
   light-theme cells breaking the table surface. */
html[data-theme="dark"] .competition-table-unified tbody tr.rank-1 td{
  background:#2c2718!important;
  border-color:#54471f!important;
}
html[data-theme="dark"] .competition-table-unified tbody tr.rank-2 td{
  background:#172635!important;
  border-color:#314557!important;
}
html[data-theme="dark"] .competition-table-unified tbody tr.rank-3 td{
  background:#2b211d!important;
  border-color:#55372a!important;
}
html[data-theme="dark"] .competition-table-unified tbody tr.rank-1:hover td{background:#352f1b!important}
html[data-theme="dark"] .competition-table-unified tbody tr.rank-2:hover td{background:#1c2e40!important}
html[data-theme="dark"] .competition-table-unified tbody tr.rank-3:hover td{background:#35271f!important}

html[data-theme="dark"] .competition-table-unified tbody tr.rank-1 .col-name>strong{color:#f3df98!important}
html[data-theme="dark"] .competition-table-unified tbody tr.rank-2 .col-name>strong{color:#d7e2eb!important}
html[data-theme="dark"] .competition-table-unified tbody tr.rank-3 .col-name>strong{color:#e8b494!important}

@media (max-width:560px){
  .competition-table-scroll.competition-table-scroll-v2{
    max-height:68svh;
    overflow-x:auto!important;
    overflow-y:auto!important;
  }

  /* A2.39 had explicit light backgrounds for these cells; override them in
     dark mode so the podium row remains a single coherent dark surface. */
  html[data-theme="dark"] .competition-table-unified tbody tr.rank-1 .col-rank,
  html[data-theme="dark"] .competition-table-unified tbody tr.rank-1 .col-avatar,
  html[data-theme="dark"] .competition-table-unified tbody tr.rank-1 .col-name{background:#2c2718!important}
  html[data-theme="dark"] .competition-table-unified tbody tr.rank-2 .col-rank,
  html[data-theme="dark"] .competition-table-unified tbody tr.rank-2 .col-avatar,
  html[data-theme="dark"] .competition-table-unified tbody tr.rank-2 .col-name{background:#172635!important}
  html[data-theme="dark"] .competition-table-unified tbody tr.rank-3 .col-rank,
  html[data-theme="dark"] .competition-table-unified tbody tr.rank-3 .col-avatar,
  html[data-theme="dark"] .competition-table-unified tbody tr.rank-3 .col-name{background:#2b211d!important}
}

/* ========================================================================== */
/* SWORD M3.6.0A2.41 — Competition single-scroll + complete sticky header     */
/* ========================================================================== */

/* Do not create a second vertical scroll area inside the leaderboard.
   The page owns vertical scrolling; this wrapper is only for horizontal table
   navigation on narrow screens. */
.competition-table-scroll.competition-table-scroll-v2{
  max-height:none!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  scrollbar-gutter:auto!important;
}

@media (max-width:560px){
  .competition-table-scroll.competition-table-scroll-v2{
    max-height:none!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
  }

  /* A2.39 intentionally made body nickname cells non-sticky. Its !important
     position rule also caught the TH, so restore sticky positioning only for
     the Nickname header cell. Body nickname cells remain horizontally movable. */
  .competition-table-unified thead .col-name{
    position:sticky!important;
    top:0!important;
    left:auto!important;
    z-index:8!important;
  }

  .competition-table-unified tbody .col-name{
    position:static!important;
    left:auto!important;
    z-index:auto!important;
  }
}

/* ========================================================================== */
/* SWORD M3.6.0A2.42 — Competition viewport-sticky synced leaderboard header  */
/* ========================================================================== */

/* A horizontally scrollable ancestor traps native position:sticky on thead.
   Keep horizontal scrolling on the table wrapper, but let a synchronized
   header proxy stick against the page viewport. */
.competition-results-card{
  overflow:visible!important;
}
.competition-results-card::before,
.competition-results-card::after{
  border-radius:inherit;
}
.competition-table-scroll.competition-table-scroll-v2{
  border-radius:0 0 12px 12px;
}

.competition-sticky-header-proxy{
  position:sticky;
  top:0;
  z-index:40;
  width:100%;
  height:34px;
  margin-bottom:-34px;
  overflow:hidden;
  pointer-events:none;
  background:#eff5fa;
  border-bottom:1px solid rgba(151,171,190,.34);
  box-shadow:0 2px 7px rgba(25,49,72,.10);
}
.competition-sticky-header-proxy[hidden]{display:none!important}
.competition-sticky-header-track{
  position:relative;
  height:34px;
  will-change:transform;
}
.competition-sticky-header-proxy .competition-table-unified{
  margin:0!important;
  table-layout:fixed!important;
  border-collapse:collapse;
  background:transparent!important;
}
.competition-sticky-header-proxy .competition-table-unified thead th{
  position:static!important;
  top:auto!important;
  height:34px!important;
  box-sizing:border-box;
  background:#eff5fa!important;
  box-shadow:none!important;
}

html[data-theme="dark"] .competition-sticky-header-proxy{
  background:#132639;
  border-bottom-color:#37516a;
  box-shadow:0 3px 9px rgba(0,0,0,.30);
}
html[data-theme="dark"] .competition-sticky-header-proxy .competition-table-unified thead th{
  background:#132639!important;
  color:#dce8f3!important;
  border-color:#37516a!important;
}

/* The original header stays in the document for table sizing/accessibility and
   is covered by the proxy at its natural position. Native vertical sticky is
   deliberately disabled to avoid competing sticky layers. */
.competition-table-unified thead th{
  top:auto!important;
}

@media (max-width:560px){
  .competition-sticky-header-proxy{
    height:34px;
    margin-bottom:-34px;
  }
}

/* ========================================================================== */
/* SWORD M3.6.0A2.43 — Competition fixed viewport header + 140px mobile hero  */
/* ========================================================================== */

@media (max-width:560px){
  .hero.hero-competition{
    height:140px!important;
    min-height:140px!important;
  }
}

/* A2.42 used CSS sticky for the proxy. Some parent layout/overflow contexts
   can still prevent that from sticking to the viewport. A2.43 switches the
   proxy to an explicit fixed layer only while the real table header has
   scrolled above the viewport and the table is still visible. */
.competition-sticky-header-proxy{
  position:fixed!important;
  top:0!important;
  left:0;
  z-index:1000!important;
  margin:0!important;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  box-sizing:border-box;
}
.competition-sticky-header-proxy.is-fixed{
  visibility:visible;
  opacity:1;
}

/* ========================================================================== 
   M3.6.0A2.44 — FRONTEND RANKING FIXED IDENTITY + FULL VIEWPORT HEADER
   Only rank + avatar stay fixed horizontally. Nickname and every metric move
   with the main horizontal scroller. The mirrored THEAD overlay is enabled at
   every viewport width so all column headers stay visible on page scroll.
   ========================================================================== */
:root{
  --identity-fixed-w:96px;
  --nickname-w:164px;
}

.performance-grid{
  grid-template-columns:
    var(--identity-fixed-w)
    var(--nickname-w)
    var(--score-w)
    var(--week-w)
    max-content !important;
}

.identity-block{
  position:sticky !important;
  left:0 !important;
  z-index:40 !important;
  width:var(--identity-fixed-w) !important;
  min-width:var(--identity-fixed-w) !important;
  max-width:var(--identity-fixed-w) !important;
}
.identity-table .rank-head,
.identity-table tbody td:first-child{
  width:40px !important;
  min-width:40px !important;
  max-width:40px !important;
}
.identity-table .avatar-head,
.identity-table tbody td:nth-child(2){
  width:56px !important;
  min-width:56px !important;
  max-width:56px !important;
  padding-left:4px !important;
  padding-right:4px !important;
}
.identity-table .avatar-cell{text-align:center}
.identity-table .member-avatar{
  margin-right:0;
  width:28px;
  height:28px;
}

.nickname-block{
  width:var(--nickname-w) !important;
  min-width:var(--nickname-w) !important;
  max-width:var(--nickname-w) !important;
  z-index:4;
}
.nickname-table .nickname-head,
.nickname-table tbody td{
  width:var(--nickname-w) !important;
  min-width:var(--nickname-w) !important;
  max-width:var(--nickname-w) !important;
}
.nickname-table th,
.nickname-table td.nick{
  text-align:left;
  padding-left:12px;
}
.nickname-table .nick-label{
  display:block;
  max-width:calc(var(--nickname-w) - 24px);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* The two ranking group labels read as one visual group without making the
   nickname column sticky. */
.identity-block .metric-group-title{
  border-right:0;
  border-radius:8px 0 0 0;
}
.nickname-block .ranking-title-continuation{
  color:transparent;
  border-left:0;
  border-radius:0 8px 0 0;
}

/* Keep the fixed identity panel above horizontally moving blocks. */
.identity-block::after{
  content:"";
  position:absolute;
  top:0;
  right:-1px;
  bottom:0;
  width:1px;
  background:#cbdce8;
  pointer-events:none;
}

/* A2.44: enable the viewport header clone on mobile as well. */
@media(max-width:599px){
  .frontend-sticky-columns{display:block!important}
  :root{
    --identity-fixed-w:92px;
    --nickname-w:158px;
  }
  .identity-table .rank-head,
  .identity-table tbody td:first-child{
    width:38px!important;
    min-width:38px!important;
    max-width:38px!important;
  }
  .identity-table .avatar-head,
  .identity-table tbody td:nth-child(2){
    width:54px!important;
    min-width:54px!important;
    max-width:54px!important;
  }
}

/* Preserve dark-mode surfaces for the newly split nickname block. */
html[data-theme="dark"] .nickname-block,
body[data-theme="dark"] .nickname-block,
html.dark .nickname-block,
body.dark .nickname-block{
  background:var(--surface, #102131);
}

/* ========================================================================== 
   M3.6.0A2.45 — FRONTEND RANKING VISUAL MERGE + GRID TAIL FIX
   Keep rank/avatar structurally fixed and nickname horizontally movable, but
   present both as one continuous Ranking panel. Also size the Events track to
   its real event columns so the grid cannot create a trailing empty column.
   ========================================================================== */
.performance-grid{
  grid-template-columns:
    var(--identity-fixed-w)
    calc(var(--nickname-w) - var(--table-gap))
    var(--score-w)
    var(--week-w)
    calc(var(--event-count,1) * var(--event-w)) !important;
  width:max-content !important;
  min-width:max-content !important;
  max-width:none !important;
}

/* Structurally separate, visually one Ranking table. The nickname track starts
   exactly where the fixed avatar track ends; the regular table gap resumes
   only after Nickname. */
.identity-block{
  border-right:0 !important;
  border-radius:9px 0 0 9px !important;
  box-shadow:0 7px 22px rgba(30,65,96,.06) !important;
}
.nickname-block{
  transform:translateX(calc(-1 * var(--table-gap)));
  width:var(--nickname-w) !important;
  min-width:var(--nickname-w) !important;
  max-width:var(--nickname-w) !important;
  border-left:0 !important;
  border-radius:0 9px 9px 0 !important;
  box-shadow:9px 0 18px -15px rgba(29,61,91,.65),0 7px 22px rgba(30,65,96,.06) !important;
}
.identity-block::after{
  right:0 !important;
  background:#cbdce8 !important;
}
.identity-block .metric-group-title{
  border-right:0 !important;
  border-radius:8px 0 0 0 !important;
}
.nickname-block .ranking-title-continuation{
  border-left:0 !important;
  border-radius:0 8px 0 0 !important;
  background:inherit;
}

/* The last grid track must equal the actual event table width. Do not let it
   grow to 1fr / viewport remainder, which produced the long empty tail. */
.performance-grid .events-block,
.performance-grid .events-block > .events-scroll,
.performance-grid .events-block .events-table{
  width:calc(var(--event-count,1) * var(--event-w)) !important;
  min-width:calc(var(--event-count,1) * var(--event-w)) !important;
  max-width:calc(var(--event-count,1) * var(--event-w)) !important;
}

html[data-theme="dark"] .identity-block,
body[data-theme="dark"] .identity-block,
html.dark .identity-block,
body.dark .identity-block,
html[data-theme="dark"] .nickname-block,
body[data-theme="dark"] .nickname-block,
html.dark .nickname-block,
body.dark .nickname-block{
  border-color:var(--line,#29465d) !important;
}

/* ========================================================================== 
   M3.6.0A2.46 — FRONTEND RANKING NICKNAME TITLE CLEANUP
   Keep the Nickname continuation cell visually merged with Ranking, but render
   the top group-title strip as a plain neutral surface with no label.
   ========================================================================== */
.nickname-block .ranking-title-continuation{
  color:transparent !important;
  font-size:0 !important;
  line-height:0 !important;
  text-indent:-9999px !important;
  overflow:hidden !important;
  background:rgba(235,244,250,.82) !important;
  border-bottom:1px solid rgba(153,180,201,.26) !important;
}

html[data-theme="dark"] .nickname-block .ranking-title-continuation,
body[data-theme="dark"] .nickname-block .ranking-title-continuation,
html.dark .nickname-block .ranking-title-continuation,
body.dark .nickname-block .ranking-title-continuation{
  background:var(--surface-soft,#162a3b) !important;
  border-bottom-color:var(--line,#29465d) !important;
}

/* ========================================================================== */
/* SWORD M3.6.0A2.48 — SUBMISSION REVIEW OVERLAY RESTORE                      */
/* ========================================================================== */
.admin-tab-submissions .submission-review-workspace,
.admin-tab-submissions .submission-review-workspace.has-detail{grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
.admin-tab-submissions .submission-review-backdrop{display:none;position:fixed;inset:0;z-index:1180;background:rgba(18,38,57,.24);backdrop-filter:blur(1.5px);-webkit-backdrop-filter:blur(1.5px)}
.admin-tab-submissions .submission-review-workspace.has-detail .submission-review-backdrop{display:block}
.admin-tab-submissions .submission-detail-panel{position:fixed!important;top:88px!important;right:24px!important;bottom:auto!important;left:auto!important;z-index:1190!important;width:min(600px,calc(100vw - 48px))!important;max-width:600px!important;height:auto!important;max-height:calc(100dvh - 112px)!important;margin:0!important;overflow:hidden!important;border:1px solid #d5e1ea!important;border-radius:16px!important;background:#fff;box-shadow:0 24px 70px rgba(12,37,59,.24)!important;visibility:hidden!important;opacity:0;pointer-events:none;transform:translateY(8px) scale(.992)!important;transition:opacity .14s ease,transform .14s ease,visibility 0s linear .14s!important;display:flex!important;flex-direction:column!important}
.admin-tab-submissions .submission-review-workspace.has-detail .submission-detail-panel,
.admin-tab-submissions .submission-detail-panel.open{visibility:visible!important;opacity:1;pointer-events:auto;transform:none!important;transition:opacity .14s ease,transform .14s ease,visibility 0s!important}
.admin-tab-submissions .submission-detail-panel .admin-drawer-head{position:sticky!important;top:0!important;z-index:5!important;flex:0 0 auto}
.admin-tab-submissions .submission-detail-panel .admin-drawer-body.submission-detail-content{min-height:0;overflow-y:auto!important;overscroll-behavior:contain}
html:has(.admin-tab-submissions .submission-review-workspace.has-detail),body:has(.admin-tab-submissions .submission-review-workspace.has-detail){overflow:hidden}
@media(max-width:900px){.admin-tab-submissions .submission-detail-panel{top:72px!important;right:12px!important;width:calc(100vw - 24px)!important;max-width:none!important;max-height:calc(100dvh - 84px)!important}}
@media(max-width:680px){.admin-tab-submissions .submission-review-backdrop{display:none!important}.admin-tab-submissions .submission-detail-panel{inset:0!important;width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;border:0!important;border-radius:0!important;box-shadow:none!important}}

/* ========================================================================== 
   M3.6.0A2.51 — CHEST DATA SEARCH + API RESULT CORRECTIONS
   ========================================================================== */
.ct-event-participant-row[hidden]{display:none!important}
.ct-source-member-search-empty{padding:18px 14px;text-align:center;color:#73889a;font-size:13px;background:#f8fbfd}
.ct-source-member-search-empty[hidden]{display:none!important}

.member-performance-table td.has-result-correction{position:relative}
.member-performance-source-value{display:inline-flex;align-items:center;gap:4px;min-width:0}
.member-performance-correction-tools{display:inline-flex;align-items:center;gap:5px;margin-left:7px;vertical-align:middle}
.member-performance-correction-info{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#e9f4ff;border:1px solid #9fc8ec;color:#1267ad;font-size:11px;font-weight:900;font-style:normal;cursor:help;line-height:1}
.member-performance-correction-btn{display:inline-grid;place-items:center;width:24px;height:24px;padding:0;border:1px solid #bfd2e2;border-radius:7px;background:#fff;color:#1a679f;font-size:13px;line-height:1;cursor:pointer;transition:.12s ease}
.member-performance-correction-btn:hover{border-color:#70afe0;background:#eef8ff;color:#0875cc}
.member-performance-table td.has-result-correction .member-performance-source-value{font-weight:800;color:#1269aa}

.member-result-correction-modal[hidden]{display:none!important}
.member-result-correction-modal{position:fixed;inset:0;z-index:1400;display:grid;place-items:center;padding:24px}
.member-result-correction-backdrop{position:absolute;inset:0;background:rgba(14,35,52,.38);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}
.member-result-correction-card{position:relative;z-index:1;width:min(620px,calc(100vw - 32px));max-height:calc(100dvh - 48px);overflow:auto;background:#fff;border:1px solid #d1deea;border-radius:16px;box-shadow:0 28px 80px rgba(11,34,53,.28);padding:0}
.member-result-correction-card>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid #dce6ee}
.member-result-correction-card>header small{display:block;color:#7890a5;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-bottom:3px}
.member-result-correction-card>header h3{margin:0;color:#143b5d;font-size:21px}
.member-result-correction-card>header button{border:0;background:transparent;color:#183c5a;font-size:26px;cursor:pointer;padding:2px 6px}
.member-result-correction-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:18px 20px 8px}
.member-result-correction-meta>div{background:#f6f9fc;border:1px solid #e0e8ef;border-radius:10px;padding:10px 12px}
.member-result-correction-meta span{display:block;color:#788ca0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.member-result-correction-meta strong{display:block;color:#183d5d;font-size:14px;margin-top:3px}
.member-result-correction-card>label{display:grid;gap:6px;margin:12px 20px;color:#264864;font-size:13px;font-weight:800}
.member-result-correction-card input,.member-result-correction-card textarea{width:100%;box-sizing:border-box;border:1px solid #c6d7e4;border-radius:9px;background:#fff;color:#173b59;padding:11px 12px;font:inherit;font-weight:500;outline:none}
.member-result-correction-card input:focus,.member-result-correction-card textarea:focus{border-color:#2f8bd8;box-shadow:0 0 0 3px rgba(47,139,216,.12)}
.member-result-correction-error{margin:10px 20px 0;padding:10px 12px;border-radius:9px;background:#fff0f0;border:1px solid #efc2c2;color:#b6373d;font-size:13px}
.member-result-correction-error[hidden]{display:none!important}
.member-result-correction-card>footer{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:10px;padding:16px 20px 20px}
.member-result-correction-remove{color:#b43a42!important;border-color:#e3aeb2!important}

html[data-theme="dark"] .ct-source-member-search-empty,
body[data-theme="dark"] .ct-source-member-search-empty{background:#102131;color:#90a6b8}
html[data-theme="dark"] .member-performance-correction-info,
body[data-theme="dark"] .member-performance-correction-info{background:#17344b;border-color:#346383;color:#8fc7ef}
html[data-theme="dark"] .member-performance-correction-btn,
body[data-theme="dark"] .member-performance-correction-btn{background:#13283a;border-color:#31516a;color:#8fc7ef}
html[data-theme="dark"] .member-result-correction-card,
body[data-theme="dark"] .member-result-correction-card{background:#102131;border-color:#2c465b;color:#d9e5ee}
html[data-theme="dark"] .member-result-correction-card>header,
body[data-theme="dark"] .member-result-correction-card>header{border-color:#29465d}
html[data-theme="dark"] .member-result-correction-card>header h3,
body[data-theme="dark"] .member-result-correction-card>header h3,
html[data-theme="dark"] .member-result-correction-card>header button,
body[data-theme="dark"] .member-result-correction-card>header button{color:#e7f1f8}
html[data-theme="dark"] .member-result-correction-meta>div,
body[data-theme="dark"] .member-result-correction-meta>div{background:#152a3b;border-color:#29465d}
html[data-theme="dark"] .member-result-correction-meta strong,
body[data-theme="dark"] .member-result-correction-meta strong{color:#e3edf5}
html[data-theme="dark"] .member-result-correction-card>label,
body[data-theme="dark"] .member-result-correction-card>label{color:#c7d9e6}
html[data-theme="dark"] .member-result-correction-card input,
html[data-theme="dark"] .member-result-correction-card textarea,
body[data-theme="dark"] .member-result-correction-card input,
body[data-theme="dark"] .member-result-correction-card textarea{background:#0d1d2a;border-color:#31516a;color:#e7f1f8}
@media(max-width:640px){.member-result-correction-modal{padding:10px}.member-result-correction-card{width:100%;max-height:calc(100dvh - 20px)}.member-result-correction-meta{grid-template-columns:1fr}.member-result-correction-card>footer{grid-template-columns:1fr 1fr}.member-result-correction-card>footer>span{display:none}.member-result-correction-remove{grid-column:1/-1}}


/* A2.52 — Event Analysis: API-vs-manual difference indicator */
.analysis-difference{display:inline-flex;align-items:center;justify-content:flex-end;min-width:62px;font-weight:800;font-variant-numeric:tabular-nums;cursor:help}
.analysis-difference.is-ok{color:#15834b}
.analysis-difference.is-warning{color:#a66708}
.analysis-difference.is-critical{color:#c43f36}
.analysis-difference.is-empty{color:#8193a3;cursor:default}
html[data-theme="dark"] .analysis-difference.is-ok,body.theme-dark .analysis-difference.is-ok{color:#5fd58f}
html[data-theme="dark"] .analysis-difference.is-warning,body.theme-dark .analysis-difference.is-warning{color:#f0bd5c}
html[data-theme="dark"] .analysis-difference.is-critical,body.theme-dark .analysis-difference.is-critical{color:#ff8a82}

/* A2.54 — Analysis sorting, Excel export and approved-manual override. */
.analysis-sort-button{appearance:none;border:0;background:transparent;color:inherit;font:inherit;font-weight:800;padding:0;display:inline-flex;align-items:center;gap:4px;cursor:pointer;white-space:nowrap}
.analysis-sort-button:hover,.analysis-sort-button.is-active{color:#1478c9}
.analysis-sort-button span{min-width:10px;font-variant-numeric:tabular-nums}
.analysis-manual-score-btn{border:1px solid #b9d4e8;background:#f7fbff;color:#176eaf;border-radius:8px;padding:6px 9px;font-size:11px;font-weight:800;white-space:nowrap;cursor:pointer}
.analysis-manual-score-btn:hover{background:#eaf5fd;border-color:#7bb8e4}
.analysis-action-empty{color:#8a9aa8}
.analysis-correction-info{display:inline-grid;place-items:center;width:18px;height:18px;margin-left:6px;border-radius:50%;background:#eaf4fc;border:1px solid #b8d6eb;color:#176fae;font-size:11px;font-weight:900;cursor:help;vertical-align:middle}
.event-analysis-table tbody tr.has-result-correction>td{background:#fffaf0}
.member-result-correction-card input[readonly]{background:#f3f7fa;color:#31516a;cursor:not-allowed}
html[data-theme="dark"] .analysis-sort-button:hover,html[data-theme="dark"] .analysis-sort-button.is-active,body.theme-dark .analysis-sort-button:hover,body.theme-dark .analysis-sort-button.is-active{color:#74c2ff}
html[data-theme="dark"] .analysis-manual-score-btn,body.theme-dark .analysis-manual-score-btn{background:#142a3b;border-color:#34556d;color:#8fd0ff}
html[data-theme="dark"] .analysis-manual-score-btn:hover,body.theme-dark .analysis-manual-score-btn:hover{background:#18364b;border-color:#4b7a9b}
html[data-theme="dark"] .analysis-correction-info,body.theme-dark .analysis-correction-info{background:#17354a;border-color:#3e6b89;color:#8dd1ff}
html[data-theme="dark"] .event-analysis-table tbody tr.has-result-correction>td,body.theme-dark .event-analysis-table tbody tr.has-result-correction>td{background:#2a271d}
html[data-theme="dark"] .member-result-correction-card input[readonly],body[data-theme="dark"] .member-result-correction-card input[readonly]{background:#152534;color:#9fb4c4}

/* A2.57 — Analysis resizable columns */
#eventAnalysisTable th.is-resizable-col{position:relative}
#eventAnalysisTable .admin-col-resize-handle{position:absolute;z-index:12;top:0;right:-4px;width:9px;height:100%;cursor:col-resize;touch-action:none;user-select:none}
#eventAnalysisTable .admin-col-resize-handle::after{content:"";position:absolute;top:22%;bottom:22%;left:4px;width:1px;background:transparent;transition:background-color .12s ease}
#eventAnalysisTable .admin-col-resize-handle:hover::after,#eventAnalysisTable .admin-col-resize-handle:focus-visible::after,#eventAnalysisTable .admin-col-resize-handle.is-dragging::after{background:#2281dc}
#eventAnalysisTable .admin-col-resize-handle:focus-visible{outline:2px solid #2281dc;outline-offset:-2px}
body.is-resizing-admin-column,body.is-resizing-admin-column *{cursor:col-resize!important;user-select:none!important}
#eventAnalysisTable th,#eventAnalysisTable td{overflow:hidden;text-overflow:ellipsis}
#eventAnalysisTable th[data-col="action"],#eventAnalysisTable td[data-col="action"]{overflow:visible}

/* ========================================================================== */
/* SWORD M3.6.0A2.59 — Analysis compact modal workspace + source-aware table */
/* ========================================================================== */
.event-center-body-compact:has(> .event-tab-panel[data-event-panel="analysis"].active){
  overflow:hidden;
}
.event-tab-panel[data-event-panel="analysis"].active{
  height:100%;
  min-height:0;
  overflow:hidden;
}
.event-tab-panel[data-event-panel="analysis"].active .event-analysis-calibration-workspace{
  height:100%;
  min-height:0;
  display:grid;
  grid-template-rows:auto auto auto minmax(0,1fr);
  gap:8px;
}
.event-analysis-toolbar-calibration{
  display:grid;
  grid-template-columns:minmax(210px,1.05fr) minmax(190px,.82fr) minmax(240px,1.35fr);
  gap:8px;
  padding:8px 10px;
  border:1px solid #d1dde7;
  border-radius:8px;
  background:#fff;
}
.event-analysis-toolbar-calibration select,
.event-analysis-toolbar-calibration input[type="search"]{
  width:100%;
  min-width:0;
  height:34px;
}
.event-analysis-control-strip{
  display:grid;
  grid-template-columns:minmax(360px,.92fr) minmax(520px,1.35fr);
  align-items:stretch;
  gap:8px;
}
.event-analysis-control-strip[hidden]{display:none!important}
.event-analysis-kpis-compact{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.event-analysis-kpis-compact .event-analysis-kpi{
  min-height:58px;
  padding:8px 10px;
  border-radius:8px;
  justify-content:center;
}
.event-analysis-kpis-compact .event-analysis-kpi span{
  font-size:10px;
  line-height:1.15;
  letter-spacing:.01em;
}
.event-analysis-kpis-compact .event-analysis-kpi strong{
  font-size:16px;
  line-height:1.05;
}
.event-analysis-current-kpi .event-analysis-history-value{
  font-size:9px;
  line-height:1.15;
  margin-top:1px;
}
.event-analysis-apply-row{
  display:grid;
  grid-template-columns:minmax(180px,1fr) minmax(145px,180px) auto;
  align-items:end;
  gap:8px;
  padding:8px 10px;
  min-height:58px;
  border-radius:8px;
}
.event-analysis-apply-row>label{gap:3px}
.event-analysis-apply-row>label>span{font-size:10px}
.event-analysis-apply-row input{height:34px}
.event-analysis-apply-row .event-analysis-score-actions{
  gap:7px;
  min-height:34px;
}
.event-analysis-apply-row .event-analysis-score-actions .admin-text-link{
  white-space:nowrap;
  font-size:10px;
}
.event-analysis-apply-row .event-analysis-score-actions .admin-primary-btn{
  min-height:34px;
  height:34px;
  padding:0 12px;
  font-size:10px;
}
.event-analysis-apply-message{
  grid-column:1/-1;
  margin-top:-2px;
  font-size:10px;
}
.event-analysis-table-tools{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:3px 6px 3px 10px;
  border:1px solid #d1dde7;
  border-bottom:0;
  border-radius:8px 8px 0 0;
  background:#fff;
}
.event-analysis-table-tools .event-analysis-empty-note{
  flex:1 1 auto;
  min-width:0;
  margin:0;
  font-size:10px;
  line-height:1.25;
  color:#6a7f92;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.event-analysis-table-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex:0 0 auto;
}
.event-analysis-table-actions .admin-check-label{
  min-height:30px;
  margin:0;
  font-size:10px;
}
.event-analysis-icon-btn{
  width:32px;
  height:30px!important;
  min-width:32px;
  padding:0!important;
  display:inline-grid!important;
  place-items:center;
  font-size:16px!important;
  line-height:1;
  border-radius:6px!important;
}
.event-analysis-table-scroll{
  min-height:0;
  height:100%;
  max-height:none!important;
  overflow:auto;
  border:1px solid #d1dde7;
  border-radius:0 0 8px 8px;
  background:#fff;
  scrollbar-gutter:stable;
}
#eventAnalysisTable{
  margin:0;
}
#eventAnalysisTable thead th,
#eventAnalysisTable thead th.is-resizable-col{
  position:sticky!important;
  top:0;
  z-index:20;
  background:#f2f6f9;
  box-shadow:0 1px 0 #cfdbe5;
}
#eventAnalysisTable thead th.is-resizable-col .admin-col-resize-handle{
  z-index:24;
}
#eventAnalysisTable th,
#eventAnalysisTable td{
  padding-top:6px;
  padding-bottom:6px;
}
#eventAnalysisTable td[data-col="member"] strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
}
#eventAnalysisTable td[data-col="member"] small{
  display:block;
  margin-top:1px;
  color:#8194a5;
  font-size:9px;
  line-height:1.05;
  font-weight:500;
  overflow:hidden;
  text-overflow:ellipsis;
}
#eventAnalysisTable th[data-col="member"],#eventAnalysisTable td[data-col="member"]{min-width:150px}
#eventAnalysisTable th[data-col="army"],#eventAnalysisTable td[data-col="army"]{min-width:68px}
#eventAnalysisTable th[data-col="manual"],#eventAnalysisTable td[data-col="manual"]{min-width:145px}
#eventAnalysisTable th[data-col="achievement"],#eventAnalysisTable td[data-col="achievement"]{min-width:105px}
#eventAnalysisTable th[data-col="contribution"],#eventAnalysisTable td[data-col="contribution"]{min-width:120px}

@media(max-width:1250px){
  .event-analysis-control-strip{
    grid-template-columns:1fr;
  }
  .event-analysis-kpis-compact .event-analysis-kpi{min-height:52px}
  .event-analysis-apply-row{min-height:52px}
}
@media(max-width:980px){
  .event-analysis-toolbar-calibration{
    grid-template-columns:1fr 1fr;
  }
  .event-analysis-toolbar-calibration input[type="search"]{grid-column:1/-1}
  .event-analysis-apply-row{
    grid-template-columns:1fr 1fr;
  }
  .event-analysis-apply-row .event-analysis-score-actions{
    grid-column:1/-1;
    justify-content:flex-start;
  }
  .event-analysis-table-tools{
    align-items:flex-start;
  }
}
@media(max-width:720px){
  .event-analysis-toolbar-calibration{grid-template-columns:1fr}
  .event-analysis-toolbar-calibration input[type="search"]{grid-column:auto}
  .event-analysis-kpis-compact{grid-template-columns:1fr 1fr}
  .event-analysis-kpis-compact .event-analysis-current-kpi{grid-column:1/-1}
  .event-analysis-apply-row{grid-template-columns:1fr}
  .event-analysis-apply-row .event-analysis-score-actions{grid-column:auto;flex-wrap:wrap}
  .event-analysis-table-tools{flex-wrap:wrap}
  .event-analysis-table-tools .event-analysis-empty-note{flex-basis:100%;order:2}
  .event-analysis-table-actions{margin-left:auto}
}

html[data-theme="dark"] .event-analysis-toolbar-calibration,
html[data-theme="dark"] .event-analysis-table-tools,
html[data-theme="dark"] .event-analysis-table-scroll,
body.theme-dark .event-analysis-toolbar-calibration,
body.theme-dark .event-analysis-table-tools,
body.theme-dark .event-analysis-table-scroll{
  background:#102333;
  border-color:#29465d;
}
html[data-theme="dark"] #eventAnalysisTable thead th,
body.theme-dark #eventAnalysisTable thead th{
  background:#142b3d;
  box-shadow:0 1px 0 #31516a;
}

/* SWORD M3.6.0A2.64 — Chests Data Current / Historical */
.ct-subtabs{display:flex;gap:8px;margin:14px 0 16px;padding:4px;width:max-content;max-width:100%;border:1px solid var(--admin-border,#d8dde6);border-radius:10px;background:var(--admin-soft,#f7f8fa)}
.ct-subtabs a{display:inline-flex;align-items:center;justify-content:center;min-width:104px;padding:8px 14px;border-radius:7px;text-decoration:none;font-size:13px;font-weight:700;color:inherit}
.ct-subtabs a.active{background:var(--admin-card,#fff);box-shadow:0 1px 3px rgba(0,0,0,.08)}

/* A2.64.1 — source-centric Chests Data history */
.ct-history-source-layout{display:grid;grid-template-columns:minmax(360px,.95fr) minmax(620px,1.55fr);gap:14px;align-items:start}
.ct-history-source-list-wrap{max-height:720px;overflow:auto}
.ct-history-source-list tr.selected td{background:rgba(57,119,216,.07)}
.ct-history-source-list tr.selected td:first-child{box-shadow:inset 3px 0 0 currentColor}
.ct-history-source-list td:first-child{min-width:220px}
.ct-history-source-list td:nth-child(2){min-width:140px}
.ct-history-source-detail-card .ct-work-card-head h3{text-transform:none}
.ct-source-history-table td:first-child{min-width:145px}
.ct-source-history-table td:nth-child(2){min-width:155px}
.ct-source-history-table td:nth-child(6){min-width:170px}
@media (max-width:1180px){.ct-history-source-layout{grid-template-columns:1fr}.ct-history-source-list-wrap{max-height:460px}}

/* A2.64.3 · Historical Submission Editing */
.admin-tab-submissions .submission-history-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}
.admin-tab-submissions .submission-history-metrics .is-corrected b{color:#9a6700}
.admin-tab-submissions .submission-history-editable-table{min-width:1120px}
.admin-tab-submissions .submission-history-editable-table th:last-child,
.admin-tab-submissions .submission-history-editable-table td:last-child{width:132px}
.admin-tab-submissions .submission-history-edit{position:relative}
.admin-tab-submissions .submission-history-edit>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;min-width:62px;padding:7px 11px;border:1px solid #c9d7e5;border-radius:8px;background:#fff;color:#2767c7;font-weight:700;font-size:12px}
.admin-tab-submissions .submission-history-edit>summary::-webkit-details-marker{display:none}
.admin-tab-submissions .submission-history-edit[open]>summary{background:#eef5ff;border-color:#82abe8}
.admin-tab-submissions .submission-history-edit form{position:absolute;right:0;top:calc(100% + 7px);z-index:30;width:310px;padding:14px;background:#fff;border:1px solid #cdd9e6;border-radius:12px;box-shadow:0 16px 38px rgba(23,48,73,.18);display:grid;gap:10px;text-align:left}
.admin-tab-submissions .submission-history-edit form label{display:grid;gap:5px;color:#51667c;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.02em}
.admin-tab-submissions .submission-history-edit form input,
.admin-tab-submissions .submission-history-edit form select,
.admin-tab-submissions .submission-history-edit form textarea{width:100%;box-sizing:border-box;border:1px solid #cad7e4;border-radius:8px;background:#fff;color:#19324b;padding:8px 9px;font:inherit;text-transform:none;letter-spacing:0}
.admin-tab-submissions .submission-history-edit form textarea{resize:vertical;min-height:58px}
.admin-tab-submissions .submission-history-edit form small{color:#7c8b9a;line-height:1.35}
.admin-tab-submissions .submission-history-edit form .admin-primary-btn{justify-self:end;padding:8px 12px}
@media(max-width:900px){.admin-tab-submissions .submission-history-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-tab-submissions .submission-history-edit form{position:fixed;left:16px;right:16px;top:auto;bottom:16px;width:auto;z-index:1400}}

/* M3.6.0A2.64.4 — Submission History interaction + manual result entry */
.submission-history-drawer-head-actions{display:flex;align-items:center;gap:10px}
.submission-history-add-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 12px;border:0;border-radius:9px;background:#2f74dc;color:#fff;font-size:10px;font-weight:800;line-height:1;cursor:pointer;box-shadow:0 4px 12px rgba(47,116,220,.16)}
.submission-history-add-btn:hover{filter:brightness(.97)}
.submission-history-add-btn>span{white-space:nowrap}
.submission-history-detail-panel.is-loading{opacity:.72;pointer-events:none}
.submission-history-editable-table tbody tr[data-history-submission-row]{cursor:pointer;transition:background .12s ease}
.submission-history-editable-table tbody tr[data-history-submission-row]:hover,.submission-history-editable-table tbody tr[data-history-submission-row]:focus-visible{background:#f5f9fd;outline:none}
.submission-history-editable-table td:first-child strong{display:block}
.submission-history-editable-table td:first-child small{display:block;margin-top:2px;color:#8194a7;font-size:8px;font-weight:650}
.submission-history-row-open{width:30px;text-align:center!important;color:#2f74dc!important;font-size:18px!important;font-weight:700}

.submission-history-modal-backdrop{position:fixed;inset:0;z-index:1500;background:rgba(13,37,58,.34);backdrop-filter:blur(1px)}
.submission-history-modal{position:fixed;z-index:1510;top:50%;left:50%;width:min(520px,calc(100vw - 32px));max-height:min(760px,calc(100dvh - 32px));overflow:auto;transform:translate(-50%,-50%);background:#fff;border:1px solid #d9e3eb;border-radius:14px;box-shadow:0 24px 70px rgba(18,48,73,.24)}
.submission-history-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:20px 22px 16px;border-bottom:1px solid #e3ebf1}
.submission-history-modal-head small{display:block;margin-bottom:3px;color:#7d91a2;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.submission-history-modal-head h3{margin:0;color:#173a5a;font-size:20px;line-height:1.15}
.submission-history-modal-head p{margin:5px 0 0;color:#5f788d;font-size:10px;font-weight:650}
.submission-history-modal-head>button{display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:8px;background:transparent;color:#47667f;font-size:22px;cursor:pointer}
.submission-history-modal-head>button:hover{background:#f0f5f8}
.submission-history-modal-form,.submission-history-add-body{padding:20px 22px}
.submission-history-modal-form>label,.submission-history-add-score-form>label,.submission-history-member-search{display:block;margin-bottom:15px}
.submission-history-modal-form label>span,.submission-history-add-score-form label>span,.submission-history-member-search>span{display:block;margin-bottom:6px;color:#48667e;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.03em}
.submission-history-modal-form input,.submission-history-modal-form select,.submission-history-modal-form textarea,.submission-history-add-score-form input,.submission-history-member-search input{box-sizing:border-box;width:100%;border:1px solid #cddce7;border-radius:9px;background:#fff;color:#173f63;font-size:12px;font-weight:700;line-height:1.35;outline:none}
.submission-history-modal-form input,.submission-history-modal-form select,.submission-history-add-score-form input,.submission-history-member-search input{height:42px;padding:0 12px}
.submission-history-modal-form textarea{min-height:82px;padding:10px 12px;resize:vertical}
.submission-history-modal-form input:focus,.submission-history-modal-form select:focus,.submission-history-modal-form textarea:focus,.submission-history-add-score-form input:focus,.submission-history-member-search input:focus{border-color:#2f74dc;box-shadow:0 0 0 3px rgba(47,116,220,.1)}
.submission-history-modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}
.submission-history-modal-actions .admin-primary-btn,.submission-history-modal-actions .admin-secondary-btn{min-width:112px}
.submission-history-modal-note{margin:0;padding:10px 12px;border-radius:8px;background:#f6f8fa;color:#6f8292;font-size:9px}

.submission-history-member-results{display:flex;flex-direction:column;gap:6px;min-height:64px;max-height:340px;overflow:auto}
.submission-history-member-result{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:54px;padding:8px 12px;border:1px solid #d9e4ec;border-radius:9px;background:#fff;color:#234a6a;text-align:left;cursor:pointer}
.submission-history-member-result:hover:not(:disabled){border-color:#94bce8;background:#f7fbff}
.submission-history-member-result span{min-width:0}
.submission-history-member-result strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.submission-history-member-result small{display:block;margin-top:3px;color:#8295a5;font-size:8.5px}
.submission-history-member-result em{flex:0 0 auto;color:#2f74dc;font-size:9px;font-style:normal;font-weight:800}
.submission-history-member-result.is-existing{opacity:.55;cursor:not-allowed}
.submission-history-member-result.is-existing em{color:#7e8d99}
.submission-history-member-hint,.submission-history-member-empty{padding:18px 10px;text-align:center;color:#8093a3;font-size:10px}
.submission-history-selected-member{margin-bottom:18px;padding:12px 14px;border:1px solid #dce6ee;border-radius:10px;background:#f7fafc}
.submission-history-selected-member span{display:block;color:#7c90a0;font-size:8.5px;font-weight:800;text-transform:uppercase}
.submission-history-selected-member strong{display:block;margin-top:3px;color:#173f63;font-size:13px}
.submission-history-add-score-form{margin:0}

@media(max-width:700px){
  .submission-history-add-btn{width:36px;padding:0}.submission-history-add-btn>span{display:none}
  .submission-history-modal{top:auto;bottom:0;left:0;width:100vw;max-height:88dvh;transform:none;border-radius:16px 16px 0 0;border-width:1px 0 0}
  .submission-history-modal-actions{position:sticky;bottom:0;background:#fff;padding-top:10px}
}

/* ========================================================================== */
/* SWORD M3.6.0A2.64.4a — Submission History drawer width/layout hotfix      */
/* ========================================================================== */
/* The A2.64.4 interaction columns no longer fit comfortably in the old 500px
   archive drawer. Give the detail view enough room for seven columns and keep
   the desktop layout readable without horizontal scrolling. */
.submission-history-detail-panel,
.admin-tab-submissions .submission-history-detail-panel{
  width:min(760px,94vw);
}
.submission-history-drawer-head,
.admin-tab-submissions .submission-history-drawer-head{
  padding:20px 24px 17px;
}
.submission-history-drawer-body,
.admin-tab-submissions .submission-history-drawer-body{
  padding:18px 22px 24px;
}
.submission-history-editable-table,
.admin-tab-submissions .submission-history-editable-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}
.submission-history-editable-table th,
.submission-history-editable-table td,
.admin-tab-submissions .submission-history-editable-table th,
.admin-tab-submissions .submission-history-editable-table td{
  padding-left:10px;
  padding-right:10px;
  white-space:normal;
  vertical-align:middle;
}
.submission-history-editable-table th:nth-child(1),
.admin-tab-submissions .submission-history-editable-table th:nth-child(1){width:21%}
.submission-history-editable-table th:nth-child(2),
.admin-tab-submissions .submission-history-editable-table th:nth-child(2){width:16%}
.submission-history-editable-table th:nth-child(3),
.admin-tab-submissions .submission-history-editable-table th:nth-child(3){width:17%}
.submission-history-editable-table th:nth-child(4),
.admin-tab-submissions .submission-history-editable-table th:nth-child(4){width:11%}
.submission-history-editable-table th:nth-child(5),
.admin-tab-submissions .submission-history-editable-table th:nth-child(5){width:15%}
.submission-history-editable-table th:nth-child(6),
.admin-tab-submissions .submission-history-editable-table th:nth-child(6){width:15%}
.submission-history-editable-table th:nth-child(7),
.admin-tab-submissions .submission-history-editable-table th:nth-child(7){width:5%}
.submission-history-editable-table td:first-child strong,
.admin-tab-submissions .submission-history-editable-table td:first-child strong{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.submission-history-editable-table td:first-child small,
.admin-tab-submissions .submission-history-editable-table td:first-child small{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.submission-history-detail-table-wrap,
.admin-tab-submissions .submission-history-detail-table-wrap{
  overflow-x:hidden;
}

@media(max-width:900px){
  .submission-history-detail-panel,
  .admin-tab-submissions .submission-history-detail-panel{width:min(680px,96vw)}
  .submission-history-drawer-head,
  .admin-tab-submissions .submission-history-drawer-head{padding:17px 18px 14px}
  .submission-history-drawer-body,
  .admin-tab-submissions .submission-history-drawer-body{padding:15px 16px 20px}
}
@media(max-width:700px){
  .submission-history-detail-panel,
  .admin-tab-submissions .submission-history-detail-panel{width:100vw;max-width:100vw}
  .submission-history-detail-table-wrap,
  .admin-tab-submissions .submission-history-detail-table-wrap{overflow-x:auto}
  .submission-history-editable-table,
  .admin-tab-submissions .submission-history-editable-table{min-width:720px}
}

/* A2.64.4b — history search focus + submission review parity */
.submission-history-modal.is-submission-review{
  width:min(900px,calc(100vw - 48px));
  max-height:min(900px,calc(100dvh - 32px));
}
.submission-history-modal.is-submission-review .submission-history-review-form{
  padding:18px 22px 22px;
}
.submission-history-modal.is-submission-review .submission-history-review-image-shell{
  position:relative;
  min-height:280px;
  max-height:430px;
  margin:0 0 16px;
  overflow:hidden;
  border:1px solid #dce6ed;
  border-radius:11px;
  background:#10161c;
}
.submission-history-modal.is-submission-review .submission-history-review-image-shell img{
  width:100%;
  height:min(390px,43dvh);
  max-height:none;
  object-fit:contain;
  border-radius:0;
  background:#10161c;
}
.submission-history-modal.is-submission-review .submission-history-review-image-shell .submission-image-placeholder{
  display:grid;
  min-height:280px;
  place-items:center;
  margin:0;
  border-radius:0;
}
.submission-history-modal.is-submission-review .submission-history-review-compare{
  grid-template-columns:repeat(5,minmax(0,1fr));
  margin:0 0 16px;
}
.submission-history-modal.is-submission-review .submission-score-field{
  margin-top:2px;
}
@media(max-width:760px){
  .submission-history-modal.is-submission-review{
    width:100vw;
    max-height:92dvh;
  }
  .submission-history-modal.is-submission-review .submission-history-review-compare{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .submission-history-modal.is-submission-review .submission-history-review-image-shell img{
    height:300px;
  }
}
