/* ==========================================================
   PWDB (V2) — Solid panels (Option B)
   Single source of truth (no legacy)
   + Shared "list page" components (admin + public)
   ========================================================== */

:root{
  /* Palette */
  --bg:#0f172a;
  --fg:#e5e7eb;
  --muted:#9ca3af;
  --accent:#e11d48;

  /* Solid surfaces */
  --panel:#0b1224;
  --panel-2:#0e1730;
  --panel-3:#111d3a;
  --border:rgba(255,255,255,0.08);

  /* Effects */
  --shadow:0 14px 34px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.04);

  /* Radii + spacing scale */
  --r1:10px;
  --r2:14px;
  --r3:18px;

  --s1:4px;
  --s2:8px;
  --s3:12px;
  --s4:16px;
  --s5:20px;
  --s6:24px;
  --s7:32px;
  --s8:44px;

  --max:1240px;

  /* Links */
  --link: var(--fg);

  /* Typography tokens (LOCKED) */
  --w-body:500;
  --w-strong:700;
  --w-head:800;

  --t-h1:2.1rem;
  --t-h2:1.15rem;
  --t-body:0.95rem;
  --t-meta:0.9rem;
  --t-small:0.85rem;
  --t-label:0.72rem;

  /* You reference var(--line) in a few places */
  --line: rgba(255,255,255,0.08);
}

*{ box-sizing:border-box; }

/* IMPORTANT: on mobile Safari the "rubber band" can reveal the HTML background.
   If html has no background, you get a white flash. */
html,body{ height:100%; background:var(--bg); }

body{
  margin:0;
  color:var(--fg);
  font-family:"Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size:15px;
  line-height:1.55;

  /* Dark fallback + gradient (fallback prevents white flashes) */
  background-color: var(--bg);
  background-image: radial-gradient(circle at top, #1e293b 0%, var(--bg) 65%);
  background-repeat: no-repeat;

  position:relative;
  overflow-x:hidden;

  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}

/* Fixed background layer used by your templates: <div class="site-bg"> */
.site-bg{
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;

  /* Cover viewport even during mobile address-bar resize */
  min-height:100vh;
  min-height:100dvh;

  background-color: var(--bg);
  background-image: radial-gradient(circle at top, #1e293b 0%, var(--bg) 65%);
  background-repeat:no-repeat;

  transform: translateZ(0);
}

/* containers */
.container{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  padding:0 18px;
}

.wrap{
  width:100%;
  max-width:var(--max);
  margin:0 auto;
  padding:24px 16px 60px;
}

/* ----------------------------------------------------------
   Typography (LOCKED)
---------------------------------------------------------- */
h1, .h1{
  margin:0 0 10px;
  font-size:var(--t-h1);
  line-height:1.15;
  font-weight:var(--w-head);
  letter-spacing:-0.03em;
}

h2, .h2{
  margin:0 0 10px;
  font-size:var(--t-h2);
  line-height:1.25;
  font-weight:var(--w-head);
  letter-spacing:-0.01em;
}

h3, h4, h5, h6{
  margin:0 0 10px;
  font-size:1rem;
  line-height:1.35;
  font-weight:var(--w-head);
  letter-spacing:-0.01em;
}

p{
  margin:0 0 14px;
  color:var(--muted);
  line-height:1.6;
  font-size:var(--t-body);
  font-weight:var(--w-body);
}

.muted{ color:var(--muted); }
.small{
  font-size:var(--t-small);
  font-weight:var(--w-body);
  line-height:1.45;
  margin-top:6px;  
}

.strong{
  color:var(--fg);
  font-weight:var(--w-strong);
}

.label{
  display:inline-block;
  font-size:var(--t-label);
  font-weight:var(--w-head);
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}
.value{
  font-weight:var(--w-head);
  color:var(--fg);
}

.name{
  font-weight:var(--w-head);
  letter-spacing:-0.01em;
}

/* Links (LOCKED) */
a,
a:visited{
  color:var(--link);
  text-decoration:none;
  font-weight:var(--w-strong);
}
a:hover{ opacity:.78; }

/* Prevent <strong>/<b> from creating random weight bumps */
strong,
b{ font-weight:inherit; }

/* Numeric alignment helper */
.mono{ font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------
   Layout utilities
---------------------------------------------------------- */
.row{ display:flex; align-items:center; gap:var(--s3); }
.row.wrap-flex{ flex-wrap:wrap; }
.row.between{ justify-content:space-between; }
.row.end{ justify-content:flex-end; }
.col{ display:flex; flex-direction:column; gap:var(--s3); }
.min-0{ min-width:0; }

.gap-8{ gap:var(--s2); }
.gap-10{ gap:10px; }
.gap-12{ gap:var(--s3); }
.gap-16{ gap:var(--s4); }

.stack{ display:flex; flex-direction:column; gap:var(--s3); }
.stack.sm{ gap:var(--s2); }
.stack.lg{ gap:var(--s5); }

.grid{
  display:grid;
  gap:var(--s3);
}
.grid.cols-2{ grid-template-columns:repeat(2, minmax(0,1fr)); }
.grid.cols-3{ grid-template-columns:repeat(3, minmax(0,1fr)); }
.grid.cols-4{ grid-template-columns:repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px){
  .grid.cols-4{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px){
  .grid.cols-2,
  .grid.cols-3{ grid-template-columns:1fr; }
}
@media (max-width: 640px){
  .grid.cols-4{ grid-template-columns:1fr; }
}

/* ----------------------------------------------------------
   Surfaces
---------------------------------------------------------- */
.panel{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--r2);
  box-shadow:var(--shadow);
}

.section{
  padding:var(--s4);
  min-width:0;
}

.section-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:var(--s3);
  margin-bottom:var(--s3);
  padding-bottom: var(--s3);
  margin-bottom: var(--s2);
  border-bottom: 1px solid var(--border);

}

.section-title{
  margin:0;
  font-size:var(--t-h2);
  font-weight:var(--w-head);
  color:var(--fg);
}

.section-sub{
  margin:0 0 var(--s4);
  color:var(--muted);
}

.panel.is-raised{
  background:var(--panel-2);
}

/* Consistent spacing after section titles inside panels */
.panel.section > .section-title { margin: 0 0 var(--s3); }
.panel.section > .section-sub   { margin: calc(var(--s2) * -1) 0 var(--s3); }

/* ----------------------------------------------------------
   Buttons
---------------------------------------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid transparent;
  padding:.55rem .9rem;
  border-radius:999px;
  font-weight:var(--w-head);
  white-space:nowrap;
  background:transparent;
  color:inherit;
  cursor:pointer;
  min-height:42px;
  line-height:1;
}

.btn-ghost{
  border-color:var(--border);
  background:rgba(255,255,255,0.03);
}
.btn-ghost:hover{
  background:rgba(255,255,255,0.06);
  border-color:rgba(255,255,255,0.16);
}

.btn-danger{
  border-color:rgba(225,29,72,0.35);
  background:rgba(225,29,72,0.10);
  color:#fff;
}
.btn-danger:hover{
  background:rgba(225,29,72,0.18);
  border-color:rgba(225,29,72,0.55);
}

/* Primary button polish (single source of truth) */
.btn-primary{
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(225,29,72,0.95),
    rgba(185,28,60,0.95)
  );
  border-color: rgba(255,255,255,0.18);
  color: #fff;

  box-shadow:
    0 10px 22px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.18);

  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}
.btn-primary:hover{
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn-primary:active{
  transform: translateY(0);
  box-shadow:
    0 8px 18px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.14);
}

.btn:focus-visible{
  outline:2px solid rgba(225,29,72,0.65);
  outline-offset:2px;
}

/* Pagination: current page */
.btn-current{
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: none;
  cursor: default;
}
.btn-current:hover,
.btn-current:focus{
  background: var(--accent);
  color: #fff;
}

/* Disabled button polish */
.btn[aria-disabled="true"],
span.btn[aria-disabled="true"]{
  opacity:.45;
  cursor:not-allowed;
  pointer-events:none;
}

/* ----------------------------------------------------------
   Lists
---------------------------------------------------------- */
.list{
  display:flex;
  flex-direction:column;
  gap:var(--s3);
  min-width:0;
}

.item{
  padding:12px 14px;
  border-radius:var(--r1);
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.03);
  min-width:0;
}

.item .top{
  display:flex;
  justify-content:space-between;
  gap:var(--s3);
  align-items:baseline;
  min-width:0;
}

.item .name{
  font-weight:var(--w-head);
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.item .desc{
  margin-top:6px;
  color:var(--muted);
  font-size:var(--t-body);
  line-height:1.55;
  font-weight:var(--w-body);
}

/* List items as links */
.item-link{
  display:block;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
  position: relative;
}
.item-link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.045);
  border-color: rgba(255,255,255,0.14);
  opacity: 1; /* override link hover opacity change */
}
.item-link:focus-visible{
  outline: 2px solid rgba(225,29,72,0.65);
  outline-offset: 2px;
}

.item-link::before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  bottom:8px;
  width:3px;
  border-radius:2px;
  background:transparent;
  transition: background 140ms ease;
}
.item-link:hover::before{
  background: rgba(225,29,72,0.55);
}

/* Optional right-hand meta on list rows */
.item .meta{
  color: var(--muted);
  font-weight: var(--w-body);
  font-size: var(--t-meta);
  min-width: 0;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  opacity: 0.6;
}

@media (max-width: 640px){
  .item .meta{
    max-width: 100%;
    text-align: left;
    margin-top: 4px;
  }
  .item .top{
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ----------------------------------------------------------
   Forms
---------------------------------------------------------- */
.form{
  width:100%;
  padding:10px 12px;
  border-radius:var(--r1);
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.03);
  color:inherit;
  outline:none;
  font-weight:var(--w-body);
  min-height:42px;
}

/* Native selects (dark) */
select.form{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;

  background-color:rgba(255,255,255,0.03);
  color:var(--fg);

  padding-right:38px;
  cursor:pointer;

  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size:6px 6px;
  background-repeat:no-repeat;
}

select.form option{
  background:var(--panel-2);
  color:var(--fg);
}

/* Red focus ring (your brand choice) */
.form:focus{
  border-color: rgba(225,29,72,0.45);
  box-shadow: 0 0 0 2px rgba(225,29,72,0.10);
}

.form-label{
  display:block;
  margin-bottom:6px;
  font-weight:var(--w-head);
}

/* Align form actions with input fields */
.form-actions{
  display:flex;
  align-items:flex-end;
  gap:10px;
}

/* Variant: align children to the bottom */
.row-bottom{ align-items:flex-end; }

/* Search field sizing helper */
.search{
  width: 100%;
  max-width: 420px;
}
@media (max-width: 900px){
  .search{ max-width: 100%; }
}

/* Search wrapper + custom clear button */
.search-wrap{ position: relative; }
.search-wrap .form{ padding-right: 44px; }

.pw-clear-x{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: var(--muted);

  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.pw-clear-x:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.16);
  color: var(--fg);
}
.pw-clear-x:focus-visible{
  outline: 2px solid rgba(225,29,72,0.65);
  outline-offset: 2px;
}

/* Hide native "x" clear button in WebKit */
input[type="search"]::-webkit-search-cancel-button{
  -webkit-appearance: none;
  appearance: none;
}
input[type="search"]::-webkit-search-decoration{
  -webkit-appearance: none;
  appearance: none;
}

#wrestlerSearchMeta{
  margin-top: 4px;
  opacity: 0.75;
}

/* ----------------------------------------------------------
   Modal (one system)
---------------------------------------------------------- */
.pwdb-modal{ display:none; }
.pwdb-modal.is-open{ display:block; }

.pwdb-modal__backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  z-index:9998;
}

.pwdb-modal__dialog{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.pwdb-modal__card{
  width:min(560px, 100%);
  background:var(--panel-2);
  border:1px solid var(--border);
  border-radius:var(--r3);
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  padding:14px;
}

.pwdb-modal__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:var(--s3);
  padding-bottom:12px;
  border-bottom:1px solid rgba(255,255,255,0.08);
}

.pwdb-modal__title{
  margin:0;
  font-weight:var(--w-head);
  font-size:1.05rem;
}

.pwdb-modal__body{
  padding:12px 2px;
  font-weight:var(--w-body);
}

.pwdb-modal__foot{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,0.08);
}

/* ----------------------------------------------------------
   Header
---------------------------------------------------------- */
.site-header{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter:blur(8px);
  background:rgba(15,23,42,0.75);
  border-bottom:1px solid var(--border);
}

.navbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
  gap:12px;
  min-width:0;
}

.nav-brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.nav-logo{
  width:60px;
  height:60px;
  display:block;
  object-fit:contain;
}

.nav-brand-text{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:var(--w-head);
  letter-spacing:-0.015em;
  font-size:1.25rem;
  min-width:0;
}

.nav-links{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.nav-links a{
  font-weight:var(--w-strong);
  letter-spacing:0.02em;
  text-transform:uppercase;
  font-size:0.75rem;
  padding:8px 12px;
  border-radius:10px;
  color:#fff;
}

.nav-links a.active,
.nav-links a:hover{
  background:rgba(255,255,255,0.08);
  color:#fff;
}

/* Burger hidden on desktop */
.nav-toggle{ display:none; }

/* Mobile dropdown */
@media (max-width: 820px){
  .nav-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,0.10);
    background:rgba(255,255,255,0.03);
    color:inherit;
    cursor:pointer;
    flex: 0 0 auto;
  }

  .nav-toggle-lines{
    width:18px;
    height:2px;
    background:currentColor;
    position:relative;
    display:block;
    border-radius:2px;
    opacity:0.9;
  }
  .nav-toggle-lines::before,
  .nav-toggle-lines::after{
    content:"";
    position:absolute;
    left:0;
    width:18px;
    height:2px;
    background:currentColor;
    border-radius:2px;
  }
  .nav-toggle-lines::before{ top:-6px; }
  .nav-toggle-lines::after{ top:6px; }

  .navbar{ flex-wrap:wrap; }

  .nav-links{
    width:100%;
    display:none;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
    margin-top:10px;
    padding-top:10px;
    border-top:1px solid rgba(255,255,255,0.08);
  }

  /* Your JS toggles this class */
  .navbar.nav-open .nav-links{ display:flex; }

  .nav-links a{
    padding:10px 12px;
    border-radius:12px;
  }
  .nav-links a:hover{
    background:rgba(255,255,255,0.04);
  }

  h1{ font-size:1.9rem; }
}

/* ----------------------------------------------------------
   Footer
---------------------------------------------------------- */
.site-footer{
  margin-top:32px;
  padding:28px 0;
  color:var(--muted);
  border-top:1px solid var(--border);
  background:rgba(15,23,42,0.35);
}

/* ----------------------------------------------------------
   Shared: list page header (public + admin)
---------------------------------------------------------- */
.list-page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.list-page-title{
  margin:0;
  font-size:var(--t-h1);
  line-height:1.1;
}

.list-page-meta{ margin-top:6px; }

.list-page-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

@media (max-width: 900px){
  .list-page-head{
    flex-direction:column;
    align-items:stretch;
  }
  .list-page-actions{
    justify-content:flex-start;
  }
}

/* Admin: legacy class aliases (compat) */
.admin-list-head,
.list-page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.admin-title,
.list-page-title{
  margin:0;
  font-size:var(--t-h1);
  line-height:1.1;
}

.admin-meta,
.list-page-meta{ margin-top:6px; }

.admin-actions,
.list-page-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

@media (max-width: 900px){
  .admin-list-head,
  .list-page-head{
    flex-direction:column;
    align-items:stretch;
  }
  .admin-actions,
  .list-page-actions{
    justify-content:flex-start;
  }
}

/* ----------------------------------------------------------
   Filters (component)
---------------------------------------------------------- */
.filters{
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.02);
  border-radius:var(--r2);
  padding:12px;
  align-items:end;
  gap:var(--s3);
}

.filters .filter{ min-width:0; }

.filters .filter-actions{
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  gap:10px;
  white-space:nowrap;
}

.filters .filter-actions .btn{ min-height:42px; }

@media (max-width: 980px){
  .filters .filter-actions{ justify-content:flex-start; }
}
@media (max-width: 640px){
  .filters .filter-actions{ justify-content:flex-start; flex-wrap:wrap; }
}

/* Filters: collapsible (details/summary) */
.filters-summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  user-select:none;
}
.filters-summary::-webkit-details-marker{ display:none; }

.filters.is-raised{
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.05),
    rgba(255,255,255,0.02)
  );
  border: 1px solid rgba(255,255,255,0.08);
}

.filters-summary-left{
  display:flex;
  align-items:center;
  gap:10px;
}

.filters-summary-right{ opacity: 0.6; }

.filters-title{
  letter-spacing:0.04em;
  text-transform:uppercase;
  font-size:12px;
  opacity:0.85;
}

.filters-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 6px;
  font-size:12px;
  font-weight:600;
  line-height:1;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.06);
  color:var(--fg);
  border-radius:999px;
}

.filters[open] .filters-chip{
  border-color:rgba(255,255,255,0.25);
  background:rgba(255,255,255,0.10);
}

.filters-body{ margin-top:12px; }
.filters-grid{ margin-top:0; }

.filter-actions{
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  gap:10px;
}

/* ----------------------------------------------------------
   List header (older component) — compatibility
---------------------------------------------------------- */
.list-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:var(--s3);
  margin-bottom:var(--s3);
}

.list-head .title{
  margin:0;
  font-size:var(--t-h1);
  font-weight:var(--w-head);
  letter-spacing:-0.02em;
}

.list-head .meta{
  color:var(--muted);
  font-weight:var(--w-strong);
  white-space:nowrap;
}

.list-actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  margin-top:var(--s2);
}

@media (max-width: 720px){
  .list-head{ flex-direction:column; align-items:flex-start; }
  .list-actions{ justify-content:flex-start; }
}

/* Pagination polish */
.btn[aria-current="page"],
span.btn[aria-current="page"]{
  background:rgba(225,29,72,0.85);
  border-color:rgba(255,255,255,0.12);
  box-shadow:none;
}

.pagination .btn,
.pagination span.btn{
  padding:.48rem .78rem;
}

.list + .row.pagination,
.list + .pagination{
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.pagination .btn.btn-primary,
.row .btn.btn-primary[aria-current="page"]{
  box-shadow: none;
}

.pagination-meta{ opacity: .75; }

.pagination .btn{
  min-width: 38px;
  justify-content: center;
}

/* ----------------------------------------------------------
   Flash messages
---------------------------------------------------------- */
.flash{
  transition:
    opacity 260ms ease,
    transform 260ms ease,
    margin 260ms ease,
    padding 260ms ease;
}

.flash.is-hiding{
  opacity: 0;
  transform: translateY(-6px);
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* ----------------------------------------------------------
   UI v2: pw-combo (custom select)
---------------------------------------------------------- */
.pw-combo{ position: relative; }

.pw-combo .pw-combo-list{
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;

  max-height: 280px;
  overflow: auto;

  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}

.pw-combo.is-open .pw-combo-list{ display: block; }

.pw-combo .pw-combo-item{
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
}

.pw-combo .pw-combo-item:hover{ background: rgba(255,255,255,.06); }
.pw-combo .pw-combo-item.is-active{ background: rgba(255,255,255,.09); }
.pw-combo .pw-combo-item.is-selected{ outline: 1px solid rgba(255,255,255,.14); }

.pw-combo.is-disabled .pw-combo-input{
  opacity: .55;
  cursor: not-allowed;
}
.pw-combo.is-disabled{ pointer-events:none; }

/* ----------------------------------------------------------
   UI v2: pw-lookup (AJAX combo)
---------------------------------------------------------- */
.pw-lookup{ position:relative; }

.pw-lookup .pw-lookup-list{
  display:none;
  position:absolute;
  left:0; right:0;
  top: calc(100% + 8px);
  z-index: 60;

  max-height: 320px;
  overflow: auto;

  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}

.pw-lookup.is-open .pw-lookup-list{ display:block; }

.pw-lookup .pw-lookup-item{
  padding: 10px 12px;
  border-radius: 10px;
  cursor:pointer;
  user-select:none;
  display:flex;
  justify-content:space-between;
  gap:12px;
}

.pw-lookup .pw-lookup-item:hover{ background: rgba(255,255,255,.06); }
.pw-lookup .pw-lookup-item.is-active{ background: rgba(255,255,255,.09); }
.pw-lookup .pw-lookup-item .meta{ opacity:.65; font-size: 12px; }

.pw-lookup .pw-lookup-empty,
.pw-lookup .pw-lookup-loading{
  padding: 10px 12px;
  opacity:.7;
}

.pw-lookup .pw-lookup-clear{
  position:absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity:.7;
  cursor:pointer;
  padding: 6px 8px;
  border-radius: 10px;
}
.pw-lookup .pw-lookup-clear:hover{ background: rgba(255,255,255,.06); opacity:1; }

.pw-lookup .has-clear{ padding-right: 44px; }

.pw-lookup.is-disabled .pw-lookup-input{
  opacity: .55;
  cursor: not-allowed;
}
.pw-lookup.is-disabled .pw-lookup-clear{
  display: none !important;
}

/* ----------------------------------------------------------
   File input helper
---------------------------------------------------------- */
.file-input-native{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
}

/* Remove number input spinners (year/height/weight) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"]{
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ----------------------------------------------------------
   Floating Save Bar
---------------------------------------------------------- */
.save-bar{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;

  padding: 10px 14px;
  background: linear-gradient(
    180deg,
    rgba(15,23,42,0.75),
    rgba(15,23,42,0.9)
  );

  border-top: 1px solid var(--border);
  backdrop-filter: blur(8px);

  transform: translateY(100%);
  transition: transform 220ms ease, opacity 220ms ease;
  opacity: 0;
}

.save-bar.is-visible{
  transform: translateY(0);
  opacity: 1;
}

.save-bar-inner{
  max-width: var(--max);
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}

.save-bar-left{
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-weight: var(--w-strong);
}

.save-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(225,29,72,0.18);
}

.save-text{ color: var(--fg); }

.save-bar-actions{
  display: flex;
  gap: var(--s2);
}

.has-save-bar{ padding-bottom: 84px; }

@media (max-width: 640px){
  .save-bar-inner{
    flex-direction: column;
    align-items: stretch;
  }
  .save-bar-actions .btn{
    width: 100%;
    justify-content: center;
  }
}

/* Page header panel: tighter than default .section */
.page-head.section{ padding: var(--s5) var(--s5); }
@media (max-width: 640px){
  .page-head.section{ padding: var(--s4); }
}

/* ----------------------------------------------------------
   PWDB toggle (checkbox replacement)
---------------------------------------------------------- */
.pw-toggle{
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
}

.pw-toggle input{
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.pw-toggle-ui{
  width: 44px;
  height: 24px;
  border-radius: 999px;

  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);

  position: relative;
  cursor: pointer;

  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.pw-toggle-ui::after{
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;

  width: 18px;
  height: 18px;
  border-radius: 50%;

  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);

  transition: transform 160ms ease;
}

.pw-toggle input:checked + .pw-toggle-ui{
  background: rgba(225,29,72,0.9);
  border-color: rgba(225,29,72,0.9);
}
.pw-toggle input:checked + .pw-toggle-ui::after{
  transform: translateX(20px);
}

.pw-toggle input:focus-visible + .pw-toggle-ui{
  outline: 2px solid rgba(225,29,72,0.6);
  outline-offset: 2px;
}

/* ----------------------------------------------------------
   Login bits (page-local helpers you ended up keeping here)
---------------------------------------------------------- */
.primary-card{
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 14px 16px;
}

.login-grid{
  max-width: 560px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.login-actions{
  margin-top: 6px;
}

.login-actions .btn{
  min-width: 120px;
}

.login-field{ gap: 6px; }

/* On wider screens, align actions with fields nicely */
@media (min-width: 900px){
  .login-grid{ max-width: 620px; }
}

/* Public page header panel: make it stack nicely on mobile */
@media (max-width: 640px){
  /* Whatever wrapper you use for that header panel row */
  .admin-list-head,
  .page-head,
  .hero-head,
  .panel-head{
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    gap:12px;
  }

  /* Actions row should not float right on mobile */
  .admin-actions,
  .page-actions,
  .hero-actions{
    width:100%;
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:10px;
  }

  /* Make the back button feel like a normal primary action on mobile */
  .admin-actions .btn,
  .page-actions .btn,
  .hero-actions .btn{
    width:auto;
  }

  /* Reduce the “big empty card” feel */
  .panel.section.admin-list,
  .panel.section.hero,
  .panel.section.page-hero{
    padding:18px !important;
  }

  /* If your title is huge, tone it down slightly on mobile */
  .admin-title,
  .page-title,
  .hero-title{
    font-size:34px;
    line-height:1.1;
  }
}
/* List page header panel (public) */
.list-page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
}

/* Mobile: stack title + actions */
@media (max-width: 640px){
  .list-page-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .list-page-head .row.end{
    width:100%;
    justify-content:flex-start;
  }

  /* Optional: make the back button full-width for nicer mobile UX */
  .list-page-head .row.end .btn{
    width:100%;
    text-align:center;
  }

  /* Optional: slightly reduce padding so it doesn’t feel like an empty slab */
  .panel.section.page-head{
    padding:18px;
  }
}
@media (max-width: 900px){
  .panel.section.page-head{ padding:18px !important; }

  .list-page-head{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:flex-start !important;
    gap:12px !important;
  }

  .list-page-head > .row.end{
    width:100% !important;
    justify-content:flex-start !important;
  }

  .list-page-head > .row.end .btn{
    width:100% !important;
    text-align:center !important;
  }
}
/* Wrestlers list header (mobile) */
@media (max-width: 900px){
  .list-page-head{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:flex-start !important;
    gap:12px !important;
  }

  .list-page-head > div:last-child{
    width:100% !important;
    display:flex !important;
    justify-content:flex-start !important;
  }

  .list-page-head > div:last-child .btn{
    width:100% !important;
    text-align:center !important;
  }

  .panel.section.page-head{
    padding:18px !important;
  }
}
/* ----------------------------------------------------------
   UI v2: pw-multi (multi-select combo)
---------------------------------------------------------- */
.pw-multi{ position:relative; min-width:0; }

.pw-multi-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:8px;
}

.pw-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.04);
  max-width:100%;
}
.pw-chip-text{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pw-chip-x{
  border:0;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  padding:0;
  line-height:1;
}
.pw-chip-x:hover{ color:var(--fg); }

.pw-multi-list{
  display:none;
  position:absolute;
  left:0; right:0;
  top: calc(100% + 8px);
  z-index: 60;

  max-height: 320px;
  overflow:auto;

  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.pw-multi.is-open .pw-multi-list{ display:block; }

.pw-multi-item{
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  user-select:none;
  display:flex;
  justify-content:space-between;
  gap:12px;
}
.pw-multi-item:hover{ background: rgba(255,255,255,.06); }
.pw-multi-item.is-disabled{ opacity:.45; cursor:not-allowed; }

.pw-multi-empty,
.pw-multi-loading{
  padding:10px 12px;
  opacity:.7;
}
/* Field label row: label left, helper action right */
.field-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:6px;
}
.field-head .form-label{ margin:0; }

/* Tiny button variant (so it doesn’t dominate the field) */
.btn-sm{
  min-height:36px;
  padding:.45rem .75rem;
  font-size:0.85rem;
}
@media (max-width: 900px){
  .field-head{
    align-items:flex-start;
  }
}
@media (max-width: 640px){
  .field-head{
    flex-direction:column;
    align-items:flex-start;
  }
  .field-head .btn{
    width:auto;
  }
}
#cards .row.between{
  align-items: flex-start;
}

#cards .admin-actions{
  margin-top: 2px;
}
/* Filters actions: keep buttons consistent + aligned */
.filters .filter-actions{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:flex-start;
  padding-top: 8px; /* matches your screenshot spacing */
}

/* If your global .btn has variants, keep these from inflating in filters */
.filters .filter-actions .btn{
  height: 44px;              /* match .form height */
  padding: 0 16px;
  border-radius: 999px;      /* keeps the nice pill but not the weird blob */
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height: 1;
}

/* Ensure primary isn't getting "CTA mega" styles in this context */
.filters .filter-actions .btn.btn-primary{
  box-shadow: none;
  transform: none;
}
/* ---------------------------------
   Team type segmented control
---------------------------------- */

.team-type-toggle{
  display:flex;
  gap:8px;
  margin-top:4px;
}

.team-type-option{
  position:relative;
  cursor:pointer;
}

.team-type-option input{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
}

.team-type-option span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,0.03);
  color:var(--fg);
  font-weight:600;
  transition:
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    color .15s ease;
}

/* Hover */
.team-type-option:hover span{
  border-color:rgba(255,255,255,0.18);
}

/* Checked */
.team-type-option input:checked + span{
  background:linear-gradient(
    180deg,
    rgba(225,29,72,0.18),
    rgba(225,29,72,0.08)
  );
  border-color:var(--accent);
  color:#fff;
  box-shadow:
    0 0 0 1px rgba(225,29,72,0.35),
    0 6px 14px rgba(0,0,0,0.4);
}

/* Focus (keyboard accessibility) */
.team-type-option input:focus-visible + span{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

/* 3-column row: Wrestler | Alter ego | Remove */
.map-grid-3{
 display:grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--s4, 14px);
  align-items:start;
}
.map-remove-col{
  display:flex;
  justify-content:flex-end;
  align-items:flex-start;
  padding-top: 28px;
}
  
.map-row .pw-combo{ margin-top:8px; }
.map-row .row .form-label{ display:block; }

@media (max-width: 860px){
  .map-grid-3{ grid-template-columns: 1fr; }
  .map-remove-col{ padding-top:0; justify-content:flex-start; }}

/* ==========================================
   Venue name history row
   ========================================== */

.venue-name-row{
  display:grid;
  grid-template-columns: 2.2fr 1fr 1fr auto auto;
  gap:12px;
  align-items:end;
}

/* Mobile stacking */
@media (max-width: 720px){
  .venue-name-row{
    grid-template-columns: 1fr;
    gap:10px;
  }

  .venue-name-row .venue-primary,
  .venue-name-row .venue-remove{
    justify-content:flex-start;
    padding-top:4px;
  }
}

.champ-details-grid{
  display:grid;
  gap:14px;
}

/* Desktop: Name + Sort wide, Active compact */
@media (min-width: 900px){
  .champ-details-grid{
    grid-template-columns: 1fr 340px 260px;
    align-items:start;
  }
  .champ-details-help{
    grid-column: 1 / -1; /* notes span full width */
    margin-top:-2px;
  }
}

/* Mobile: stacks naturally */
@media (max-width: 899.98px){
  .champ-details-grid{
    grid-template-columns: 1fr;
  }
}

  .alias-add-grid{
    display:grid;
    gap:14px;
  }
  @media (min-width: 900px){
    .alias-add-grid{
      grid-template-columns: 1fr 260px;
      align-items:start;
    }
  }

  .alias-date-grid{
    display:grid;
    gap:14px;
  }
  @media (min-width: 900px){
    .alias-date-grid{
      grid-template-columns: 160px 1fr 1fr 160px 1fr 1fr;
      align-items:start;
    }
  }

  .alias-row-grid{
    display:grid;
    gap:14px;
  }
  @media (min-width: 900px){
    .alias-row-grid{
      grid-template-columns: 1fr 260px;
      align-items:start;
    }
  }

  .teamBlock .membersWrap > .memberRow:first-child{
  border-top:0;
}

.memberRow{
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.topbar-ux{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--s3);
  flex-wrap:wrap;
}

.topbar-left,
.topbar-right{
  display:flex;
  align-items:center;
  gap:var(--s2);
}
/* ----------------------------------------------------------
   Wrestler profile (PUBLIC) — V2 page layer
   Uses your V2 tokens/components; only profile-specific bits live here.
---------------------------------------------------------- */

.profile-hero{
  overflow:hidden;
}
.profile-hero .hero-grid{
  display:grid;
  grid-template-columns: 140px minmax(0,1fr);
  gap: var(--s5);
  align-items: start;
  padding: var(--s5);
}
@media (max-width: 720px){
  .profile-hero .hero-grid{
    grid-template-columns: 1fr;
    padding: var(--s4);
  }
}

.avatar{
  width:140px;
  height:140px;
  border-radius: var(--r2);
  border: 1px solid var(--border);
  object-fit: cover;
  background: rgba(255,255,255,0.03);
}
@media (max-width: 720px){
  .avatar{ width: 120px; height: 120px; }
}
.avatar.is-deceased{
  filter: grayscale(0.9);
  opacity: 0.85;
}

.hero-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: var(--s3);
  flex-wrap: wrap;
}
.hero-title{
  display:flex;
  align-items:center;
  gap: 10px;
  margin:0;
  min-width:0;
}
.hero-real{
  margin-top: 6px;
  color: var(--muted);
}

.status-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: var(--w-head);
  font-size: 12px;
  opacity: 0.95;
}

/* Pills row (reuse your pill pattern, but keep it local in case site.css doesn't include it) */
.pill-row{
  display:flex;
  flex-wrap:wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:4px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: var(--t-small);
  line-height: 1.1;
}
.pill b{
  color: var(--fg);
  font-weight: var(--w-head);
}
.pill-small{
  padding: 6px 10px;
  font-size: 12px;
}
.pill-flag,
.matches-pill-flag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.pill-flag img,
.matches-pill-flag img{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display:block;
  opacity: 0.95;
}
.pill-loc{ display:inline; }
.link-muted{ color: var(--fg); opacity: 0.88; }
.link-muted:hover{ opacity: 0.72; }

/* Tabs */
.profile-nav{
  position: sticky;
  top: 86px; /* sits under sticky header */
  z-index: 5;
  margin-top: var(--s4);
  margin-bottom: var(--s4);

  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border:1px solid var(--border);
  background: rgba(11,18,36,0.92);
  backdrop-filter: blur(8px);
  border-radius: var(--r2);
}
@media (max-width: 820px){
  .profile-nav{ top: 74px; }
}
.profile-nav a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 999px;
  border:1px solid transparent;
  background: rgba(255,255,255,0.03);
  color: var(--fg);
  font-weight: var(--w-head);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.profile-nav a:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  opacity: 1;
}
.profile-nav a.is-active{
  background: rgba(225,29,72,0.18);
  border-color: rgba(225,29,72,0.45);
}

/* Sections (tab panes) */
.profile-section{ display:none; }
.profile-section.is-active{ display:block; }

/* Metric cards */
.metric-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: var(--s3);
}
@media (max-width: 980px){
  .metric-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .metric-grid{ grid-template-columns: 1fr; }
}

.metric{
  padding: 12px 14px;
  border-radius: var(--r1);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  min-width:0;
}
.metric-k{
  font-size: var(--t-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: var(--w-head);
}
.metric-v{
  font-weight: var(--w-head);
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.metric-v.small{
  font-size: var(--t-body);
  font-weight: var(--w-body);
  color: var(--muted);
  margin: 0;
}
.record-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: var(--s2);
  margin-top: 8px;
}
.record-block{
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  padding: 10px;
}
.record-label{
  display:block;
  font-size: 12px;
  color: var(--muted);
  font-weight: var(--w-head);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.record-value{
  display:block;
  font-weight: var(--w-head);
  font-size: 1.15rem;
  margin-top: 4px;
}

.tag-row{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  margin-top: 6px;
}
.tag{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  font-size: 12px;
  color: var(--fg);
  opacity: 0.9;
}

/* Breakdown pills */
.breakdown-row{
  display:flex;
  flex-wrap:wrap;
  gap: var(--s2);
}
.breakdown-pill{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}
.breakdown-label{
  color: var(--muted);
  font-weight: var(--w-head);
  font-size: 12px;
}
.breakdown-count{
  font-weight: var(--w-head);
}

/* Matches layout */
.match-grid{
  display:grid;
  grid-template-columns: 180px minmax(0,1fr);
  gap: var(--s4);
  align-items: start;
}
@media (max-width: 720px){
  .match-grid{ grid-template-columns: 1fr; gap: var(--s3); }
}
.mg-card .card-name{ font-weight: var(--w-head); }
.mg-champs{
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.mg-display-name{
  font-weight: var(--w-head);
  margin-bottom: 6px;
  color: var(--muted);
}
.mg-outcome{
  color: var(--muted);
  line-height: 1.6;
}
.text-strong{ color: var(--fg); font-weight: var(--w-head); }
.vs-sep{ opacity: 0.7; }
.team-parens{ opacity: 0.9; }

.champ-mark{
  opacity: 0.9;
  font-weight: var(--w-head);
}

/* Simple amp span (you already output it) */
.amp{
  opacity: 0.65;
}

/* Team member tiles (stables) */
.team-members{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  margin-top: 8px;
}
.team-member{
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}
/* --- HERO micro row (under pills) --- */
.hero-micro{
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid rgba(255,255,255,0.08);

  display:grid;
  grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr);
  gap: var(--s4);
  align-items:start;
}

@media (max-width: 980px){
  .hero-micro{
    grid-template-columns: 1fr;
    gap: var(--s2);
  }
}

.micro-left{ min-width:0; }
.micro-right{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  justify-items:start;
}
@media (max-width: 980px){
  .micro-right{ grid-template-columns: 1fr; gap: var(--s2); }
}

.micro-label{
  display:block;
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: var(--w-head);
  margin-bottom: 8px;
}

/* chips should look like your pills, but smaller */
.micro-chips{
  display:flex;
  flex-wrap:wrap;
  gap: var(--s2);
  min-width:0;
}

.micro-chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: var(--fg);
  font-size: 12px;
  line-height: 1.1;
  text-decoration:none;
  opacity: .95;
}
.micro-chip:hover{ opacity: .75; }

.micro-muted{
  color: var(--muted);
  font-size: 12px;
  align-self:center;
}

.micro-link{
  color: var(--fg);
  opacity: .9;
  text-decoration:none;
  font-size: 13px;
  display:inline-block;
  margin-top: 2px;
}
.micro-link:hover{ opacity: .72; }

.micro-chip-muted{
  opacity:.7;
  border-style:dashed;
}
/* Wrestler profile > Recent Matches row layout */
.matches-list .match-grid{
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr); /* left fixed-ish, right flexible */
  gap: 18px;
  align-items: start;
}

/* Stop the left column from getting squashed */
.matches-list .mg-left{
  min-width: 280px;
}

/* Make sure the right column can shrink/wrap correctly */
.matches-list .mg-mid{
  min-width: 0;
}

/* Optional: keep the date from wrapping into multiple tiny lines */
.matches-list .mg-date{
  white-space: nowrap;
}

/* Responsive: stack on small screens */
@media (max-width: 720px){
  .matches-list .match-grid{
    grid-template-columns: 1fr;
  }
  .matches-list .mg-left{
    min-width: 0;
  }
}
.mg-date{
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mg-card .card-name{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.matches-list .match-grid{
  position: relative;
}

/* Divider lives in the column gap, not on content */
.matches-list .match-grid::after{
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;

  /* LEFT COLUMN WIDTH (280px) + HALF THE GAP (18px / 2) */
  left: calc(290px + 9px);

  width: 1px;
  background: rgba(255,255,255,0.035);
  pointer-events: none;
}

@media (max-width: 720px){
  .matches-list .match-grid::after,
  .matches-list .match-grid::before{
    content: none !important;
    display: none !important;
  }

  /* In case the “divider” is actually a border on a column */
  .matches-list .mg-mid{
    border-left: 0 !important;
  }
}

/* Only when champs + display name are missing (so outcome is the first element) */
.mg-mid > .mg-outcome:first-child{
  margin-top: 12px; /* tweak 12–18px to taste */
}

@media (max-width: 720px){
  .mg-mid > .mg-outcome:first-child{
    margin-top: 0;
  }
}

/* Recent matches: keep flag + card name together on one line,
   but allow the card name text to wrap within its own box. */
.matches-list .mg-card .row{
  flex-wrap: nowrap;          /* prevents flag/name from splitting */
  align-items: center;
}

.matches-list .matches-pill-flag{
  flex: 0 0 auto;             /* never shrink the flag */
}

.matches-list .card-name{
  flex: 1 1 auto;             /* take remaining space */
  min-width: 0;               /* critical for wrapping inside flex */
  white-space: normal;        /* allow wrapping */
  overflow-wrap: anywhere;    /* break very long words if needed */
}

.matches-list .card-name{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  line-clamp: 2;              /* standard (future) */
  overflow: hidden;

  line-height: 1.35;
}

.micro-link {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  line-clamp: 2;              /* standard (future) */
  overflow: hidden;

  line-height: 1.35;
}

.breakdown-pill.is-muted{
  opacity:0.55;
}

.metric-grid{
  display:grid;
  gap:var(--s4);
}

/* default: 3-up (highlights) */
.metric-grid{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

/* 4-up variant */
.metric-grid.cols-4{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px){
  .metric-grid,
  .metric-grid.cols-4{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px){
  .metric-grid,
  .metric-grid.cols-4{
    grid-template-columns:1fr;
  }
}
.metric .desc{
  font-size:0.85em;
  opacity:0.7;
}


:root{ --css_live_marker: 20260122; }
