:root {
  --bg: #07111f;
  --panel: rgba(13, 25, 45, .84);
  --panel-2: rgba(19, 37, 66, .78);
  --border: rgba(126, 168, 255, .18);
  --line: rgba(148, 163, 184, .18);
  --text: #e8f2ff;
  --muted: #89a3c7;
  --gold: #f5b52e;
  --blue: #3aa7ff;
  --red: #ff5d5d;
  --green: #44d18c;
  --orange: #ffae36;
  --shadow: 0 24px 80px rgba(0, 0, 0, .28);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 26% 0%, rgba(58, 167, 255, .22), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(255, 93, 93, .14), transparent 26%),
    linear-gradient(135deg, #06101e 0%, #0b1728 45%, #06101e 100%);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
#app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 18px;
  background: rgba(5, 13, 27, .92); border-right: 1px solid var(--border); backdrop-filter: blur(16px);
}
.brand { display: flex; gap: 12px; align-items: center; padding: 2px 4px 24px; border-bottom: 1px solid var(--line); }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px;
  background: linear-gradient(135deg, #ffd56a, #b07216); color: #07111f; font-weight: 900; box-shadow: 0 12px 30px rgba(245, 181, 46, .2);
}
.brand strong { display: block; color: var(--gold); font-size: 18px; }
.brand small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }
nav { display: grid; gap: 8px; margin-top: 18px; }
.nav-item {
  border: 1px solid transparent; background: transparent; color: #c5d7f2;
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 14px; border-radius: 14px; text-align: left;
}
.nav-item:hover, .nav-item.active { background: rgba(41, 86, 154, .28); border-color: var(--border); color: #fff; }
.nav-item.active { color: var(--gold); }
.side-card { position: absolute; left: 18px; right: 18px; bottom: 20px; padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(180deg, rgba(16, 32, 58, .7), rgba(8, 17, 31, .7)); }
.side-card span, .side-card small { color: var(--muted); display: block; }
.side-card strong { display: block; margin: 8px 0; color: #fff; }
.main { padding: 18px 24px 32px; overflow: hidden; }
.glass { background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.topbar { display: grid; grid-template-columns: minmax(180px, 1fr) 150px auto auto auto auto auto auto auto minmax(160px, 1fr); gap: 10px; align-items: center; padding: 12px; border-radius: 18px; }
.selectish, select, input {
  min-height: 42px; border-radius: 10px; border: 1px solid var(--border); background: rgba(7, 17, 31, .78); color: #e9f4ff; padding: 0 14px; outline: none;
}
.selectish { display: grid; place-items: center; font-weight: 700; }
.selectish.compact { color: #fff; }
.week-pill { min-height: 42px; padding: 0 12px; display: grid; place-items: center; color: var(--gold); white-space: nowrap; }
.week-pill b { font-size: 20px; }
button { border: 0; color: #fff; border-radius: 10px; min-height: 40px; padding: 0 16px; transition: transform .16s ease, border .16s ease, opacity .16s ease, background .16s ease; }
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
.ghost { background: rgba(14, 27, 49, .78); border: 1px solid var(--border); }
.primary { background: linear-gradient(135deg, #49b8ff, #1d75d8); }
.success { background: linear-gradient(135deg, #3ddc91, #158456); }
.success.done { opacity: .65; }
.warn { background: linear-gradient(135deg, #ffbe4d, #d98314); }
.danger { background: linear-gradient(135deg, #ff6a6a, #d93636); }
.phase { margin-top: 16px; padding: 14px 18px; border-radius: 18px; display: grid; grid-template-columns: 180px 1fr 180px; align-items: center; gap: 18px; }
.win { height: 48px; font-weight: 900; letter-spacing: .03em; opacity: .82; border: 1px solid transparent; }
.win.active { opacity: 1; box-shadow: 0 0 0 3px rgba(255,255,255,.12) inset; }
.blue-win { background: linear-gradient(135deg, #3bb4ff, #1b6cd8); }
.red-win { background: linear-gradient(135deg, #ff7474, #e03a3a); }
.phase-center { text-align: center; }
.phase-center span { color: var(--muted); font-size: 12px; }
.phase-center strong { display: block; margin-top: 3px; color: var(--gold); font-size: 17px; }
.phase-track { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dot { width: 16px; min-height: 8px; height: 8px; padding: 0; border-radius: 999px; background: rgba(134, 153, 183, .25); }
.dot.done { background: rgba(68, 209, 140, .85); }
.dot.current { width: 28px; background: var(--gold); }
.draft-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr) 240px; gap: 18px; margin-top: 18px; }
.team-panel { border: 1px solid var(--border); border-radius: 18px; background: rgba(8, 18, 35, .76); overflow: hidden; align-self: start; position: sticky; top: 18px; }
.team-panel.blue { box-shadow: inset 4px 0 0 rgba(58, 167, 255, .75); }
.team-panel.red { box-shadow: inset -4px 0 0 rgba(255, 93, 93, .75); }
.team-head { padding: 16px; background: linear-gradient(180deg, rgba(24, 44, 77, .88), rgba(10, 20, 38, .68)); }
.team-head span { color: var(--muted); font-size: 12px; }
.team-head strong { display: block; margin-top: 4px; font-size: 20px; }
.slot-block { padding: 14px; border-top: 1px solid var(--line); }
.slot-block h3 { margin: 0 0 10px; color: var(--gold); font-size: 15px; }
.mini-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pick-list { display: grid; gap: 8px; }
.slot { border: 1px solid rgba(135, 161, 202, .22); background: rgba(4, 12, 24, .55); color: #d9e9ff; min-height: 48px; padding: 6px; border-radius: 12px; overflow: hidden; }
.slot.empty { color: #6d86aa; font-size: 12px; }
.slot.filled { display: flex; align-items: center; gap: 8px; justify-content: flex-start; }
.mini-row .slot.filled { padding: 3px; }
.mini-row .slot.filled span { display: none; }
.slot img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.pick-list .slot img { width: 42px; height: 42px; }
.team-foot { padding: 12px 14px 16px; color: var(--muted); font-size: 12px; }
.pool { min-width: 0; border-radius: 18px; padding: 18px; }
.pool-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; }
.pool h2 { margin: 0; font-size: 20px; }
.pool h2 span { color: #ff6b6b; font-size: 14px; margin-left: 8px; }
.pool p { margin: 6px 0 0; color: var(--muted); }
.search { min-width: 280px; }
.search input { width: 100%; }
.role-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.role-tabs button { background: rgba(8, 18, 35, .78); border: 1px solid var(--border); color: #c7dbff; }
.role-tabs button.active { background: linear-gradient(135deg, #f8c45a, #b88316); color: #08111f; font-weight: 900; }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 14px; max-height: calc(100vh - 270px); overflow: auto; padding: 4px 6px 12px 2px; }
.hero-card { min-height: 100px; padding: 0; background: transparent; color: #eaf4ff; border-radius: 14px; position: relative; }
.hero-card .portrait { display: block; width: 58px; height: 58px; margin: 0 auto 6px; border-radius: 16px; border: 1px solid rgba(255,255,255,.18); overflow: hidden; background: linear-gradient(135deg, #233653, #101a2b); box-shadow: 0 12px 26px rgba(0,0,0,.22); }
.hero-card .portrait.fallback::before { content: 'LOL'; display: grid; place-items: center; height: 100%; color: var(--gold); font-weight: 900; }
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-card small { display: block; margin-top: 2px; color: #9fb5d4; font-size: 12px; }
.hero-card:hover .portrait { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,181,46,.14), 0 18px 34px rgba(0,0,0,.3); }
.hero-card.used { opacity: .34; filter: grayscale(1); }
.hero-card.used::after { content: none; position: absolute; inset: 18px 6px auto; margin: auto; background: rgba(0,0,0,.62); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 2px 6px; font-size: 11px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.page-head span { color: var(--gold); letter-spacing: .18em; text-transform: uppercase; font-weight: 800; font-size: 12px; }
.page-head h1 { margin: 4px 0 0; font-size: 24px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { border: 1px solid var(--border); border-radius: 18px; padding: 18px; background: linear-gradient(180deg, rgba(20, 39, 70, .8), rgba(9, 18, 34, .76)); box-shadow: var(--shadow); }
.kpi span, .kpi small { color: var(--muted); }
.kpi strong { display: block; margin: 8px 0 4px; font-size: 28px; color: #fff; }
.table-card { border-radius: 18px; padding: 18px; overflow: auto; }
.table-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 12px; }
.table-title h2 { margin: 0; color: var(--gold); }
.table-title p { margin: 6px 0 0; color: var(--muted); }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th { color: var(--gold); text-align: left; font-weight: 800; background: rgba(25, 45, 78, .76); }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); }
td { color: #f3f8ff; }
.champ-cell { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.champ-cell img { width: 34px; height: 34px; border-radius: 10px; }
.rate { display: inline-block; width: 90px; height: 8px; margin-right: 8px; background: rgba(129, 151, 184, .2); border-radius: 99px; overflow: hidden; vertical-align: middle; }
.rate span { display: block; height: 100%; background: linear-gradient(90deg, #3aa7ff, #44d18c); }
.empty-table { color: var(--muted); text-align: center; padding: 40px !important; }
.blue-text { color: #6fc4ff; }
.red-text { color: #ff8585; }
.summary-line { max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #bed1ee; }
.manage-grid { display: grid; grid-template-columns: 320px 320px 1fr; gap: 18px; }
.form-card, .user-list { border-radius: 18px; padding: 18px; }
.form-card h2, .user-list h2 { margin: 0 0 16px; color: var(--gold); }
label { display: grid; gap: 8px; margin-bottom: 14px; color: #bfd1ec; }
label input, label select { width: 100%; }
.full { width: 100%; }
.user-list { display: grid; align-content: start; gap: 10px; }
.user-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: rgba(7, 17, 31, .5); }
.user-card > div { display: flex; align-items: center; gap: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #f8c45a, #9c6a15); color: #08111f; font-weight: 900; }
.user-card strong, .user-card small { display: block; }
.user-card small { color: var(--muted); margin-top: 3px; }
.small { min-height: 32px; padding: 0 10px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: rgba(9, 18, 34, .94); border: 1px solid var(--border); color: #fff; border-radius: 999px; padding: 12px 18px; box-shadow: var(--shadow); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.hero-grid::-webkit-scrollbar { width: 10px; }
.hero-grid::-webkit-scrollbar-track { background: rgba(255,255,255,.04); border-radius: 99px; }
.hero-grid::-webkit-scrollbar-thumb { background: rgba(135,161,202,.28); border-radius: 99px; }
@media (max-width: 1320px) {
  #app { grid-template-columns: 220px 1fr; }
  .topbar { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .draft-shell { grid-template-columns: 1fr; }
  .team-panel { position: static; }
  .pool { order: -1; }
  .hero-grid { max-height: none; }
  .team-panel.blue, .team-panel.red { box-shadow: inset 4px 0 0 rgba(58, 167, 255, .75); }
}
@media (max-width: 760px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .side-card { position: static; margin-top: 16px; }
  .main { padding: 14px; }
  .topbar, .phase, .kpi-grid, .manage-grid { grid-template-columns: 1fr; }
  .pool-head { display: block; }
  .search { min-width: 0; margin-top: 12px; }
  .hero-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
}

/* login and compact layout fixes */
.login-screen {
  grid-column: 1 / -1;
  min-height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(460px, calc(100vw - 48px));
  max-width: 100%;
  overflow: hidden;
}
.login-card .brand {
  padding: 0 0 16px;
  margin-bottom: 14px;
}
.login-card .brand strong,
.login-card .brand small,
.login-card p {
  white-space: normal;
  overflow-wrap: anywhere;
}
.login-card button.full {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: center;
}
.login-card input {
  width: 100%;
  min-width: 0;
}
@media (min-width: 1321px) {
  .draft-shell { grid-template-columns: 280px minmax(520px, 1fr) 280px; }
}
@media (max-width: 1320px) {
  .draft-shell { grid-template-columns: minmax(260px, .78fr) minmax(420px, 1.4fr); }
  .team-panel.red { grid-column: 1; }
  .pool { grid-column: 2; grid-row: 1 / span 2; order: 0; }
}
@media (max-width: 980px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .side-card { position: static; margin-top: 16px; }
  .main { padding: 14px; overflow: visible; }
  .topbar, .phase, .kpi-grid, .manage-grid, .draft-shell { grid-template-columns: 1fr; }
  .pool { grid-column: auto; grid-row: auto; order: -1; }
  .pool-head { display: block; }
  .search { min-width: 0; margin-top: 12px; }
  .hero-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); max-height: none; }
}

/* Premium esports broadcast skin */
:root {
  --bg: #050914;
  --panel: rgba(9, 18, 35, .82);
  --panel-2: rgba(11, 23, 43, .9);
  --border: rgba(198, 156, 70, .26);
  --line: rgba(198, 156, 70, .13);
  --text: #edf4ff;
  --muted: #8da2c1;
  --gold: #c99b3b;
  --gold-2: #f4d27a;
  --blue: #2f80ed;
  --red: #d94f55;
  --green: #3ccf91;
  --shadow: 0 28px 90px rgba(0, 0, 0, .45);
}
html { background: #050914; }
body {
  position: relative;
  overflow-x: hidden;
  letter-spacing: .01em;
  background:
    radial-gradient(circle at 20% -12%, rgba(198,156,70,.24), transparent 28%),
    radial-gradient(circle at 82% 4%, rgba(47,128,237,.2), transparent 30%),
    radial-gradient(circle at 50% 118%, rgba(217,79,85,.16), transparent 35%),
    linear-gradient(135deg, #040711 0%, #071326 42%, #050812 100%);
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 72%);
  opacity: .34;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 13%, transparent 82%, rgba(0,0,0,.32));
  z-index: 0;
}
#app { position: relative; z-index: 1; }
.glass,
.team-panel,
.table-card,
.kpi,
.form-card,
.user-list,
.side-card {
  border-color: rgba(198,156,70,.22) !important;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.055);
}
.sidebar {
  width: 280px;
  background:
    linear-gradient(180deg, rgba(8,16,31,.96), rgba(3,8,18,.96)),
    radial-gradient(circle at 0 0, rgba(201,155,59,.18), transparent 40%);
  border-right: 1px solid rgba(201,155,59,.2);
}
#app { grid-template-columns: 280px 1fr; }
.brand { border-bottom-color: rgba(201,155,59,.18); }
.brand-mark {
  border-radius: 12px;
  background: linear-gradient(145deg, #f7d87f 0%, #c99b3b 42%, #815d17 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 18px 34px rgba(201,155,59,.22);
}
.brand strong {
  font-size: 17px;
  color: #f6d57c;
  text-shadow: 0 0 26px rgba(246,213,124,.18);
}
.nav-item {
  min-height: 48px;
  border-radius: 8px;
  color: #b7c6db;
  position: relative;
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 3px;
  background: transparent;
  border-radius: 99px;
}
.nav-item:hover,
.nav-item.active {
  background: linear-gradient(90deg, rgba(201,155,59,.18), rgba(47,128,237,.09));
  border-color: rgba(201,155,59,.28);
}
.nav-item.active::before { background: var(--gold-2); }
.side-card {
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(11,24,45,.92), rgba(5,11,23,.92));
}
.main { padding: 22px 28px 36px; }
.topbar {
  border-radius: 12px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(13,28,53,.92), rgba(6,14,29,.9)),
    radial-gradient(circle at 20% 0%, rgba(201,155,59,.18), transparent 35%);
}
input, select, .selectish {
  border-radius: 6px;
  border-color: rgba(166, 190, 226, .22);
  background: rgba(2, 9, 20, .74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
input:focus, select:focus {
  border-color: rgba(244,210,122,.65);
  box-shadow: 0 0 0 3px rgba(201,155,59,.12), inset 0 1px 0 rgba(255,255,255,.05);
}
button {
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: .02em;
}
.ghost {
  background: linear-gradient(180deg, rgba(17,33,58,.86), rgba(7,15,29,.86));
  border: 1px solid rgba(166,190,226,.2);
}
.primary {
  background: linear-gradient(135deg, #f4d27a 0%, #b8872c 56%, #7b5516 100%);
  color: #07111f;
}
.success { background: linear-gradient(135deg, #4ee6a5, #128457); }
.warn { background: linear-gradient(135deg, #dfad4a, #9a6419); }
.danger { background: linear-gradient(135deg, #e76469, #9b2730); }
.phase {
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(47,128,237,.15), rgba(13,28,53,.9) 34%, rgba(13,28,53,.9) 66%, rgba(217,79,85,.15));
  border-color: rgba(201,155,59,.18);
}
.phase-center strong {
  color: #f6d57c;
  font-size: 19px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.win { border-radius: 6px; text-transform: uppercase; }
.blue-win { background: linear-gradient(135deg, #59b2ff, #245ec9); }
.red-win { background: linear-gradient(135deg, #ff787d, #bf2532); }
.dot { height: 7px; min-height: 7px; background: rgba(121,141,170,.26); }
.dot.done { background: linear-gradient(90deg, #f4d27a, #c99b3b); }
.dot.current { background: #fff0a7; box-shadow: 0 0 16px rgba(244,210,122,.5); }
.draft-shell { grid-template-columns: 292px minmax(620px, 1fr) 292px; gap: 22px; }
.team-panel {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(11,24,45,.92), rgba(5,12,25,.88));
}
.team-panel.blue { box-shadow: inset 4px 0 0 #2f80ed, var(--shadow); }
.team-panel.red { box-shadow: inset -4px 0 0 #d94f55, var(--shadow); }
.team-head {
  padding: 18px 18px 20px;
  background:
    linear-gradient(180deg, rgba(23,44,78,.96), rgba(9,18,35,.72)),
    radial-gradient(circle at 20% 0%, rgba(244,210,122,.18), transparent 38%);
}
.team-head strong { font-size: 24px; color: #fff; }
.slot-block h3 {
  color: #f4d27a;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 13px;
}
.slot {
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(5,14,28,.88), rgba(1,7,16,.72));
  border-color: rgba(166,190,226,.18);
}
.slot.empty { color: #7890b1; }
.slot.filled {
  background: linear-gradient(90deg, rgba(201,155,59,.14), rgba(8,18,34,.75));
  border-color: rgba(201,155,59,.34);
}
.slot img { border-radius: 7px; }
.pool {
  border-radius: 14px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(12,26,49,.93), rgba(6,14,29,.9)),
    radial-gradient(circle at 20% 0%, rgba(47,128,237,.16), transparent 40%);
}
.pool h2 {
  font-size: 24px;
  letter-spacing: .04em;
}
.pool h2 span {
  color: #f6d57c;
  font-size: 13px;
  padding: 5px 10px;
  border: 1px solid rgba(201,155,59,.3);
  border-radius: 999px;
  background: rgba(201,155,59,.08);
  vertical-align: middle;
}
.pool p { color: #9baed0; }
.role-tabs button {
  min-height: 40px;
  border-radius: 6px;
  background: rgba(5,14,28,.88);
}
.role-tabs button.active {
  background: linear-gradient(135deg, #f4d27a, #c99b3b);
  color: #07111f;
}
.hero-grid {
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 12px;
  max-height: calc(100vh - 292px);
  padding-right: 8px;
}
.hero-card {
  min-height: 108px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(10,21,39,.22), rgba(4,10,21,.42));
}
.hero-card .portrait {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border-color: rgba(201,155,59,.22);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.hero-card:hover {
  border-color: rgba(244,210,122,.42);
  background: linear-gradient(180deg, rgba(201,155,59,.14), rgba(5,14,28,.42));
}
.hero-card:hover .portrait {
  border-color: rgba(244,210,122,.76);
  box-shadow: 0 0 0 3px rgba(201,155,59,.13), 0 20px 34px rgba(0,0,0,.42);
}
.hero-card strong { font-size: 12px; }
.hero-card small { font-size: 11px; }
.hero-card.used::after {
  content: 'LOCKED';
  border-color: rgba(244,210,122,.38);
  color: #f6d57c;
}
.page-head span {
  color: #f4d27a;
}
.kpi, .table-card {
  background: linear-gradient(180deg, rgba(12,26,49,.92), rgba(6,14,29,.9));
  border-radius: 14px;
}
th {
  color: #f4d27a;
  background: rgba(16,31,56,.92);
}
.login-screen {
  background:
    radial-gradient(circle at 28% 15%, rgba(201,155,59,.24), transparent 28%),
    radial-gradient(circle at 74% 0%, rgba(47,128,237,.2), transparent 32%);
}
.login-card {
  border-radius: 16px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(13,28,53,.96), rgba(5,12,25,.94)),
    radial-gradient(circle at 0 0, rgba(244,210,122,.18), transparent 38%);
}
.login-card::before {
  content: '赛事控制台';
  display: block;
  margin-bottom: 18px;
  color: #f4d27a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .28em;
}
.login-card .brand { margin-bottom: 20px; }
.login-card button.full { min-height: 46px; }
@media (max-width: 1500px) {
  .draft-shell { grid-template-columns: 280px minmax(520px, 1fr) 280px; }
  .hero-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}
@media (max-width: 1180px) {
  #app { grid-template-columns: 240px 1fr; }
  .sidebar { width: 240px; }
  .draft-shell { grid-template-columns: 1fr; }
  .pool { order: -1; }
  .hero-grid { max-height: none; }
}

/* Unified professional sidebar icons */
.brand-mark {
  position: relative;
  isolation: isolate;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background:
    linear-gradient(145deg, #fff1ad 0%, #d6a63c 44%, #7d5818 100%);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -10px 24px rgba(0,0,0,.2),
    0 14px 30px rgba(201,155,59,.28),
    0 0 0 1px rgba(201,155,59,.18);
  color: #07111f;
  overflow: hidden;
}
.brand-mark::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(7,17,31,.2);
  border-radius: 9px;
  z-index: -1;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: -30% auto auto -30%;
  width: 70%;
  height: 170%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent);
  transform: rotate(22deg);
  opacity: .55;
}
.brand-mark span {
  position: relative;
  z-index: 1;
  font-weight: 950;
  font-size: 15px;
  letter-spacing: -.04em;
  transform: translateY(-1px);
}
.nav-item {
  min-height: 54px;
  padding: 0 14px 0 13px;
  gap: 12px;
}
.nav-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: #8fa4c2;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .18s ease, filter .18s ease, transform .18s ease;
}
.nav-label {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
}
.nav-item:hover .nav-icon svg {
  stroke: #f1cb68;
  transform: translateY(-1px);
  filter: drop-shadow(0 0 8px rgba(241,203,104,.22));
}
.nav-item.active .nav-icon svg {
  stroke: #f4d27a;
  filter: drop-shadow(0 0 11px rgba(244,210,122,.32));
}
.nav-item.active .nav-label {
  color: #f4d27a;
}
.nav-item.active {
  box-shadow: inset 0 0 0 1px rgba(244,210,122,.12), 0 10px 26px rgba(0,0,0,.18);
}

/* Streamlined match command UX */
.match-command {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 150px auto;
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(13,28,53,.94), rgba(6,14,29,.92)),
    radial-gradient(circle at 20% 0%, rgba(201,155,59,.14), transparent 36%);
}
.command-label {
  color: #f4d27a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
  margin-bottom: 8px;
}
.match-fields {
  display: grid;
  grid-template-columns: minmax(180px,1fr) 110px minmax(180px,1fr);
  gap: 10px;
}
.match-fields label { margin: 0; gap: 6px; }
.match-fields label span,
.match-status-card span,
.phase-note span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.match-fields input, .match-fields select { min-height: 42px; }
.match-status-card {
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(201,155,59,.22);
  border-radius: 10px;
  background: rgba(5,14,28,.66);
}
.match-status-card strong { color: #f4d27a; font-size: 24px; line-height: 1; margin: 3px 0; }
.match-status-card small { color: #dbe8ff; font-weight: 800; }
.command-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}
.primary-action { min-width: 118px; }
.action-menu { position: relative; }
.action-menu summary {
  list-style: none;
  min-height: 42px;
  padding: 0 16px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(17,33,58,.86), rgba(7,15,29,.86));
  border: 1px solid rgba(166,190,226,.2);
}
.action-menu summary::-webkit-details-marker { display: none; }
.action-menu[open] summary { border-color: rgba(244,210,122,.45); color: #f4d27a; }
.action-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 180px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(201,155,59,.24);
  border-radius: 12px;
  background: rgba(5,12,25,.96);
  box-shadow: var(--shadow);
}
.action-menu > div button { width: 100%; justify-content: center; }
.phase-command {
  grid-template-columns: 360px 1fr 280px;
  padding: 14px 18px;
}
.winner-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.win-choice {
  min-height: 62px;
  padding: 8px 10px;
  display: grid;
  align-content: center;
  border: 1px solid rgba(166,190,226,.16);
  background: rgba(5,14,28,.66);
  text-align: left;
}
.win-choice span { font-size: 11px; color: #9eb2ce; font-weight: 800; }
.win-choice b { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-choice.blue.active { background: linear-gradient(135deg, #59b2ff, #245ec9); }
.win-choice.red.active { background: linear-gradient(135deg, #ff787d, #bf2532); }
.win-choice.active span, .win-choice.active b { color: #fff; }
.phase-note {
  display: grid;
  align-content: center;
  justify-items: end;
  text-align: right;
}
.phase-note strong { color: #dbe8ff; font-size: 13px; max-width: 250px; }
.side-actions { display: grid; gap: 8px; margin-top: 12px; }
.guide-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1,6,14,.66);
  backdrop-filter: blur(10px);
}
.guide-card {
  width: min(760px, 94vw);
  border-radius: 18px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(13,28,53,.97), rgba(5,12,25,.96)),
    radial-gradient(circle at 0 0, rgba(244,210,122,.18), transparent 40%);
}
.guide-kicker { color: #f4d27a; font-weight: 950; letter-spacing: .24em; font-size: 12px; }
.guide-card h2 { margin: 8px 0 8px; font-size: 28px; }
.guide-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.guide-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.guide-steps div { border: 1px solid rgba(201,155,59,.18); border-radius: 14px; padding: 16px; background: rgba(5,14,28,.58); }
.guide-steps b { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; color: #07111f; background: linear-gradient(135deg,#f4d27a,#b8872c); }
.guide-steps strong { display: block; margin: 12px 0 6px; color: #fff; }
.guide-steps span { color: #9eb2ce; font-size: 13px; line-height: 1.55; }
.guide-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 1320px) {
  .match-command { grid-template-columns: 1fr; }
  .command-actions { justify-content: flex-start; align-items: center; flex-wrap: wrap; }
  .phase-command { grid-template-columns: 1fr; }
  .phase-note { justify-items: center; text-align: center; }
}
@media (max-width: 760px) {
  .match-fields, .guide-steps, .winner-segment { grid-template-columns: 1fr; }
  .action-menu > div { left: 0; right: auto; }
}

/* UX pass: simplify match controls and remove bulky status card */
.match-command {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.command-main { min-width: 0; }
.command-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}
.command-title > span {
  color: #f4d27a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .18em;
}
.match-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.match-meta b,
.match-meta em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(201,155,59,.24);
  background: rgba(5,14,28,.58);
}
.match-meta b { color: #f4d27a; }
.match-meta em { color: #dbe8ff; }
.match-status-card { display: none !important; }
.command-actions { align-items: center; }
.command-actions > button,
.action-menu summary { min-height: 42px; }
@media (max-width: 1320px) {
  .match-command { grid-template-columns: 1fr; }
  .command-title { align-items: flex-start; }
}
@media (max-width: 760px) {
  .command-title { display: grid; }
}

/* UX pass 2: compact professional match dock */
.match-dock {
  display: grid;
  grid-template-columns: 170px minmax(520px, 1fr) 150px auto;
  gap: 14px;
  align-items: center;
  min-height: 88px;
  padding: 14px 16px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(13,28,53,.94), rgba(6,14,29,.92)),
    radial-gradient(circle at 20% 0%, rgba(201,155,59,.14), transparent 36%);
}
.dock-title {
  display: grid;
  gap: 4px;
  align-content: center;
}
.dock-title span,
.dock-phase span,
.dock-team span,
.dock-format span {
  color: #9eb2ce;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}
.dock-title strong {
  color: #f4d27a;
  font-size: 22px;
  line-height: 1;
}
.dock-title em {
  width: fit-content;
  padding: 2px 9px;
  border: 1px solid rgba(201,155,59,.24);
  border-radius: 999px;
  color: #dbe8ff;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  background: rgba(5,14,28,.58);
}
.dock-versus {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 104px minmax(180px, 1fr);
  gap: 10px;
  min-width: 0;
}
.dock-team,
.dock-format {
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
}
.dock-team input,
.dock-format select {
  min-height: 42px;
}
.dock-team.blue input { border-left: 3px solid #2f80ed; }
.dock-team.red input { border-left: 3px solid #d94f55; }
.dock-phase {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 58px;
  border: 1px solid rgba(201,155,59,.20);
  border-radius: 10px;
  background: rgba(5,14,28,.50);
}
.dock-phase strong {
  color: #f4d27a;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.dock-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}
.dock-actions > button,
.dock-actions .action-menu summary {
  min-height: 42px;
}
.match-command { display: none !important; }
@media (max-width: 1500px) {
  .match-dock { grid-template-columns: 150px minmax(420px, 1fr) auto; }
  .dock-phase { grid-column: 1 / 2; grid-row: 2; }
  .dock-versus { grid-column: 2 / 3; grid-row: 1 / span 2; }
  .dock-actions { grid-column: 3 / 4; grid-row: 1 / span 2; flex-wrap: wrap; }
}
@media (max-width: 1080px) {
  .match-dock { grid-template-columns: 1fr; }
  .dock-title,
  .dock-phase { justify-items: start; }
  .dock-versus { grid-template-columns: 1fr; grid-column: auto; grid-row: auto; }
  .dock-actions { grid-column: auto; grid-row: auto; justify-content: flex-start; flex-wrap: wrap; }
}

/* UX fix: secondary menu expands inside the dock instead of covering the phase area */
.dock-actions {
  position: relative;
  align-items: center;
}
.dock-actions .action-menu {
  position: static;
}
.dock-actions .action-menu > div {
  position: static !important;
  min-width: 100%;
  margin-top: 8px;
  padding: 8px;
  grid-column: 1 / -1;
  border-radius: 10px;
  background: rgba(5,12,25,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.dock-actions .action-menu[open] {
  flex-basis: 100%;
  display: grid;
  justify-items: end;
}
.dock-actions .action-menu[open] > div {
  width: min(520px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.guide-mask {
  z-index: 9999 !important;
}
.guide-card {
  position: relative;
  z-index: 10000;
}
@media (max-width: 760px) {
  .dock-actions .action-menu[open] > div { grid-template-columns: 1fr; width: 100%; }
}

/* UX request: keep More as a floating dropdown, not an inline expanded block */
.dock-actions .action-menu {
  position: relative !important;
  flex-basis: auto !important;
  display: block !important;
}
.dock-actions .action-menu > div {
  position: absolute !important;
  right: 0 !important;
  left: auto !important;
  top: calc(100% + 8px) !important;
  z-index: 300 !important;
  min-width: 190px !important;
  width: 190px !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  margin-top: 0 !important;
  padding: 10px !important;
  border: 1px solid rgba(201,155,59,.28) !important;
  border-radius: 12px !important;
  background: rgba(5,12,25,.97) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.05) !important;
}
.dock-actions .action-menu[open] {
  flex-basis: auto !important;
  display: block !important;
}
@media (max-width: 760px) {
  .dock-actions .action-menu > div {
    left: 0 !important;
    right: auto !important;
  }
}

/* UX fix: floating More menu must render above phase/cards */
.match-dock {
  position: relative;
  z-index: 1000;
  overflow: visible !important;
}
.dock-actions,
.dock-actions .action-menu {
  position: relative !important;
  z-index: 1100;
}
.dock-actions .action-menu > div {
  z-index: 5000 !important;
}
.phase-command,
.draft-shell,
.team-panel,
.pool {
  position: relative;
  z-index: 1;
}
.main {
  overflow: visible !important;
}

/* Premium analytics and match history pages */
.premium-head p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.7;
}
.analytics-grid,
.history-insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.analytics-card,
.history-insights > div {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201,155,59,.20);
  border-radius: 16px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(12,26,49,.92), rgba(6,14,29,.88)),
    radial-gradient(circle at 100% 0%, rgba(244,210,122,.16), transparent 38%);
  box-shadow: var(--shadow);
}
.analytics-card::after,
.history-insights > div::after {
  content: '';
  position: absolute;
  right: -28px;
  top: -28px;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(244,210,122,.08);
}
.analytics-card span,
.history-insights span {
  color: #9eb2ce;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}
.analytics-card strong,
.history-insights strong {
  display: block;
  margin: 8px 0 4px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
}
.analytics-card small,
.history-insights small {
  color: var(--muted);
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.featured-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(12,26,49,.90), rgba(6,14,29,.88)),
    radial-gradient(circle at 0 0, rgba(47,128,237,.18), transparent 42%);
}
.featured-hero img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(244,210,122,.28);
  box-shadow: 0 16px 36px rgba(0,0,0,.34);
}
.featured-hero span {
  color: #f4d27a;
  font-size: 12px;
  font-weight: 900;
}
.featured-hero strong {
  display: block;
  margin: 4px 0 3px;
  font-size: 18px;
}
.featured-hero small { color: var(--muted); }
.stat-board,
.history-panel { border-radius: 18px; }
.board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}
.board-toolbar h2 { margin: 0; color: #f4d27a; }
.board-toolbar p { margin: 6px 0 0; color: var(--muted); }
.toolbar-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.toolbar-controls input { min-width: 260px; }
.stat-list {
  display: grid;
  gap: 10px;
}
.stat-row {
  display: grid;
  grid-template-columns: 62px minmax(220px, 1fr) repeat(4, 92px) 180px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(166,190,226,.14);
  border-radius: 14px;
  background: rgba(5,14,28,.54);
}
.stat-row:hover {
  border-color: rgba(244,210,122,.30);
  background: rgba(201,155,59,.08);
}
.rank {
  color: #f4d27a;
  font-weight: 950;
  font-size: 16px;
}
.metric span {
  display: block;
  color: #8ea4c7;
  font-size: 11px;
  font-weight: 900;
}
.metric b { color: #fff; }
.metric.winrate b { color: #f4d27a; }
.heat-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(129,151,184,.18);
  overflow: hidden;
}
.heat-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f80ed, #f4d27a);
  box-shadow: 0 0 18px rgba(244,210,122,.24);
}
.match-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}
.match-card {
  border: 1px solid rgba(201,155,59,.18);
  border-radius: 18px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(12,26,49,.88), rgba(6,14,29,.86)),
    radial-gradient(circle at 0 0, rgba(47,128,237,.12), transparent 42%),
    radial-gradient(circle at 100% 0, rgba(217,79,85,.10), transparent 42%);
  box-shadow: var(--shadow);
}
.match-card-head,
.match-card-actions,
.match-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.match-card-head span {
  display: block;
  color: #9eb2ce;
  font-size: 12px;
  font-weight: 900;
}
.match-card-head strong { color: #f4d27a; font-size: 18px; }
.status {
  font-style: normal;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(166,190,226,.18);
  background: rgba(5,14,28,.62);
}
.status.finished { color: #52e0a0; }
.status.drafting { color: #f4d27a; }
.match-versus {
  display: grid;
  grid-template-columns: 1fr 104px 1fr;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
}
.match-versus .blue,
.match-versus .red {
  border: 1px solid rgba(166,190,226,.14);
  border-radius: 14px;
  padding: 12px;
  background: rgba(5,14,28,.58);
}
.match-versus .blue { border-left: 3px solid #2f80ed; }
.match-versus .red { border-left: 3px solid #d94f55; }
.match-versus small { color: #8ea4c7; }
.match-versus b { display:block; margin-top:4px; font-size: 18px; }
.scoreline {
  text-align: center;
  color: #f4d27a;
}
.scoreline span { display:block; font-size: 12px; color: #dbe8ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scoreline strong { font-size: 13px; }
.match-meta-line {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}
.bp-chip-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 34px;
}
.bp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(166,190,226,.14);
  border-radius: 999px;
  background: rgba(5,14,28,.62);
  font-size: 12px;
  max-width: 188px;
}
.bp-chip.blue { border-color: rgba(47,128,237,.26); }
.bp-chip.red { border-color: rgba(217,79,85,.26); }
.bp-chip em { color: #f4d27a; font-style: normal; font-weight: 900; }
.bp-chip img { width: 20px; height: 20px; border-radius: 6px; }
.bp-chip strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-chip,
.muted { color: var(--muted); }
.match-card-actions { margin-top: 14px; justify-content: flex-end; }
.match-detail-mask {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1,6,14,.68);
  backdrop-filter: blur(10px);
}
.match-detail {
  width: min(920px, 94vw);
  max-height: 86vh;
  overflow: auto;
  border-radius: 20px;
  padding: 22px;
}
.match-detail header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(201,155,59,.16);
  padding-bottom: 16px;
}
.match-detail header span { color: #f4d27a; font-size: 12px; font-weight: 950; letter-spacing: .18em; }
.match-detail h2 { margin: 6px 0; }
.match-detail p { color: var(--muted); margin: 0; }
.detail-teams {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}
.detail-teams > div:not(.versus) {
  border: 1px solid rgba(166,190,226,.14);
  border-radius: 14px;
  padding: 14px;
  background: rgba(5,14,28,.56);
}
.detail-teams .blue { border-left: 3px solid #2f80ed; }
.detail-teams .red { border-left: 3px solid #d94f55; }
.detail-teams span { color: var(--muted); }
.detail-teams strong { display:block; margin-top:4px; font-size: 20px; }
.versus { text-align: center; color: #f4d27a; font-weight: 950; }
.bp-replay { display: grid; gap: 8px; }
.replay-row {
  display: grid;
  grid-template-columns: 44px 60px 58px 34px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(5,14,28,.58);
  border: 1px solid rgba(166,190,226,.12);
}
.replay-row.blue { border-left: 3px solid #2f80ed; }
.replay-row.red { border-left: 3px solid #d94f55; }
.replay-row .order { color: #f4d27a; font-weight: 950; }
.replay-row .side { color: #dbe8ff; }
.replay-row .action { color: #f4d27a; font-weight: 900; }
.replay-row img { width: 34px; height: 34px; border-radius: 9px; }
@media (max-width: 1320px) {
  .analytics-grid,
  .featured-grid,
  .history-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row { grid-template-columns: 48px minmax(180px,1fr) repeat(2, 80px); }
  .stat-row .metric:nth-of-type(4),
  .stat-row .metric:nth-of-type(5),
  .stat-row .heat-bar { grid-column: span 1; }
}
@media (max-width: 760px) {
  .analytics-grid,
  .featured-grid,
  .history-insights,
  .match-card-grid,
  .match-versus,
  .detail-teams { grid-template-columns: 1fr; }
  .board-toolbar { display: grid; }
  .toolbar-controls { justify-content: stretch; }
  .toolbar-controls input,
  .toolbar-controls select { width: 100%; min-width: 0; }
  .stat-row { grid-template-columns: 42px 1fr; }
  .stat-row .metric,
  .stat-row .heat-bar { grid-column: 2; }
  .replay-row { grid-template-columns: 38px 52px 52px 30px minmax(0,1fr); }
}

/* Release notes and semantic product version */
.release-mask {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1,6,14,.70);
  backdrop-filter: blur(10px);
}
.release-card {
  width: min(920px, 94vw);
  max-height: 86vh;
  overflow: auto;
  border-radius: 20px;
  padding: 22px;
}
.release-card header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(201,155,59,.16);
}
.release-card header span {
  color: #f4d27a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .18em;
}
.release-card h2 {
  margin: 6px 0;
  font-size: 34px;
  color: #fff;
}
.release-card p { margin: 0; color: var(--muted); }
.release-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.release-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(166,190,226,.14);
  border-radius: 16px;
  background: rgba(5,14,28,.58);
}
.release-version b {
  display: block;
  color: #f4d27a;
  font-size: 20px;
}
.release-version em {
  display: block;
  margin-top: 5px;
  color: #9eb2ce;
  font-style: normal;
  font-size: 12px;
}
.release-item h3 { margin: 0 0 8px; }
.release-item ul {
  margin: 0;
  padding-left: 18px;
  color: #dbe8ff;
  line-height: 1.8;
}
@media (max-width: 720px) {
  .release-card header { display: grid; }
  .release-item { grid-template-columns: 1fr; }
}

/* Match management workspace */
.match-management {
  overflow: visible;
}
.match-manage-list {
  display: grid;
  gap: 10px;
}
.match-manage-head,
.match-manage-row {
  display: grid;
  grid-template-columns: 150px minmax(250px, 1.25fr) minmax(210px, 1fr) 190px 260px;
  gap: 12px;
  align-items: center;
}
.match-manage-head {
  padding: 0 14px 8px;
  color: #8ea4c7;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
}
.match-manage-row {
  padding: 14px;
  border: 1px solid rgba(166,190,226,.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(12,26,49,.82), rgba(5,14,28,.78)),
    radial-gradient(circle at 0 0, rgba(47,128,237,.10), transparent 38%),
    radial-gradient(circle at 100% 0, rgba(217,79,85,.08), transparent 38%);
}
.match-manage-row:hover {
  border-color: rgba(244,210,122,.30);
  background: rgba(201,155,59,.07);
}
.match-summary span,
.match-time small,
.match-progress small,
.match-teams-line small {
  display: block;
  color: #8ea4c7;
  font-size: 12px;
}
.match-summary strong {
  display: block;
  margin: 5px 0;
  color: #f4d27a;
  font-size: 16px;
}
.match-teams-line {
  display: grid;
  grid-template-columns: minmax(0,1fr) 34px minmax(0,1fr);
  gap: 8px;
  align-items: center;
}
.match-teams-line b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(5,14,28,.56);
}
.match-teams-line b.blue { border-left: 3px solid #2f80ed; }
.match-teams-line b.red { border-left: 3px solid #d94f55; }
.match-teams-line em {
  color: #f4d27a;
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}
.match-teams-line small { grid-column: 1 / -1; }
.match-progress strong {
  color: #fff;
}
.match-progress i {
  display: block;
  height: 8px;
  margin: 7px 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(129,151,184,.18);
}
.match-progress i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f80ed, #f4d27a);
}
.match-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.match-edit-mask {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1,6,14,.68);
  backdrop-filter: blur(10px);
}
.match-edit-card {
  width: min(760px, 94vw);
  max-height: 86vh;
  overflow: auto;
  border-radius: 20px;
  padding: 22px;
}
.match-edit-card header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(201,155,59,.16);
}
.match-edit-card header span {
  color: #f4d27a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .18em;
}
.match-edit-card h2 { margin: 6px 0; }
.match-edit-card p { color: var(--muted); margin: 0; }
.edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.edit-grid label:last-child { grid-column: 1 / -1; }
.edit-grid small {
  color: var(--muted);
  display: block;
  margin-top: 6px;
}
.edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
@media (max-width: 1380px) {
  .match-manage-head { display: none; }
  .match-manage-row { grid-template-columns: 1fr 1fr; }
  .match-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .match-manage-row,
  .match-teams-line,
  .edit-grid { grid-template-columns: 1fr; }
  .match-row-actions { justify-content: stretch; }
  .match-row-actions button { flex: 1; }
}

/* UX v1.2: inline top guide and 2x2 match actions */
.match-row-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(104px, 1fr)) !important;
  gap: 8px !important;
  justify-self: end;
  width: min(260px, 100%);
}
.match-row-actions button {
  width: 100%;
  justify-content: center;
  min-height: 40px;
}
.guide-panel {
  position: relative;
  z-index: 12;
  margin: -4px 0 14px;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(244,210,122,.26);
  background:
    linear-gradient(135deg, rgba(12,26,49,.95), rgba(5,14,28,.94)),
    radial-gradient(circle at 0 0, rgba(244,210,122,.17), transparent 36%),
    radial-gradient(circle at 100% 0, rgba(47,128,237,.13), transparent 38%);
  box-shadow: 0 22px 70px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.05);
}
.guide-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.guide-panel-head span {
  color: #f4d27a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .18em;
}
.guide-panel-head h2 {
  margin: 6px 0;
  font-size: 24px;
}
.guide-panel-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 760px;
}
.guide-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.guide-progress button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(166,190,226,.14);
  background: rgba(5,14,28,.54);
  color: #dbe8ff;
  text-align: left;
}
.guide-progress button b {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #07111f;
  background: linear-gradient(135deg,#f4d27a,#b8872c);
  flex: 0 0 auto;
}
.guide-progress button.active {
  border-color: rgba(244,210,122,.44);
  background: rgba(201,155,59,.13);
  box-shadow: 0 0 0 1px rgba(244,210,122,.12) inset;
}
.guide-progress button.done b {
  background: linear-gradient(135deg,#52e0a0,#20a66f);
}
.guide-tip {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(5,14,28,.52);
  border: 1px solid rgba(166,190,226,.12);
}
.guide-tip span {
  color: #8ea4c7;
  font-size: 12px;
  font-weight: 900;
}
.guide-tip strong { color: #f4d27a; }
.guide-tip small { color: var(--muted); }
.guide-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.guide-focus {
  position: relative;
  z-index: 11;
  box-shadow: 0 0 0 2px rgba(244,210,122,.55), 0 24px 70px rgba(244,210,122,.12) !important;
}
.winner-segment.guide-focus {
  border-radius: 16px;
  padding: 4px;
}
@media (max-width: 1380px) {
  .match-row-actions { justify-self: start; }
}
@media (max-width: 760px) {
  .match-row-actions,
  .guide-progress,
  .guide-tip { grid-template-columns: 1fr !important; width: 100%; }
  .guide-panel-head { display: grid; }
  .guide-actions { justify-content: stretch; }
  .guide-actions button { flex: 1; }
}

/* UX v1.2.1: enterprise spotlight guide */
.guide-stage {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
}
.guide-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: auto;
  background:
    radial-gradient(circle at 50% 18%, rgba(244,210,122,.08), transparent 28%),
    rgba(1,6,14,.74);
  backdrop-filter: blur(5px) saturate(1.08);
}
.guide-panel {
  position: fixed !important;
  z-index: 9020 !important;
  right: 28px;
  bottom: 28px;
  width: min(520px, calc(100vw - 40px));
  margin: 0 !important;
  pointer-events: auto;
  animation: guidePanelIn .18s ease-out;
}
.guide-panel-0 { top: 96px; bottom: auto; }
.guide-panel-1,
.guide-panel-3 { right: 28px; top: 50%; bottom: auto; transform: translateY(-50%); }
.guide-panel-2 { left: 50%; right: auto; bottom: 28px; transform: translateX(-50%); }
.guide-panel-1,
.guide-panel-2,
.guide-panel-3 { animation: guidePanelInCentered .18s ease-out; }
@keyframes guidePanelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes guidePanelInCentered {
  from { opacity: 0; }
  to { opacity: 1; }
}
.guide-focus,
.guide-parent-focus {
  position: relative !important;
  z-index: 9010 !important;
  pointer-events: none;
  box-shadow:
    0 0 0 2px rgba(244,210,122,.78),
    0 0 0 8px rgba(244,210,122,.13),
    0 28px 90px rgba(0,0,0,.48),
    0 24px 70px rgba(244,210,122,.16) !important;
  outline: 1px solid rgba(255,255,255,.18);
  animation: guideFocusPulse 1.8s ease-in-out infinite;
}
.guide-parent-focus {
  box-shadow: 0 0 0 1px rgba(244,210,122,.32), 0 24px 70px rgba(0,0,0,.42) !important;
}
.winner-segment.guide-focus {
  z-index: 9011 !important;
  border-radius: 16px;
  padding: 4px;
}
@keyframes guideFocusPulse {
  0%,100% { filter: brightness(1.02); }
  50% { filter: brightness(1.13); }
}
.guide-tip small {
  color: #dbe8ff;
}
@media (max-width: 760px) {
  .guide-panel,
  .guide-panel-0,
  .guide-panel-1,
  .guide-panel-2,
  .guide-panel-3 {
    left: 16px !important;
    right: 16px !important;
    top: auto !important;
    bottom: 16px !important;
    width: auto !important;
    transform: none !important;
  }
}

/* UX v1.2.2: scroll lock, cut-out spotlight and non-overlapping guide panel */
html.guide-lock,
body.guide-lock {
  overflow: hidden !important;
  height: 100% !important;
}
:root {
  --guide-x: 0px;
  --guide-y: 0px;
  --guide-w: 0px;
  --guide-h: 0px;
}
.guide-backdrop {
  background: transparent !important;
  backdrop-filter: none !important;
}
.guide-veil {
  position: fixed;
  z-index: 9000;
  display: block;
  pointer-events: auto;
  background:
    radial-gradient(circle at 50% 18%, rgba(244,210,122,.07), transparent 34%),
    rgba(1,6,14,.74);
  backdrop-filter: blur(5px) saturate(1.08);
}
.guide-veil-top {
  left: 0;
  top: 0;
  right: 0;
  height: var(--guide-y);
}
.guide-veil-left {
  left: 0;
  top: var(--guide-y);
  width: var(--guide-x);
  height: var(--guide-h);
}
.guide-veil-right {
  left: calc(var(--guide-x) + var(--guide-w));
  right: 0;
  top: var(--guide-y);
  height: var(--guide-h);
}
.guide-veil-bottom {
  left: 0;
  right: 0;
  top: calc(var(--guide-y) + var(--guide-h));
  bottom: 0;
}
.guide-panel {
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.pool.guide-focus {
  z-index: 9012 !important;
  background: rgba(13,25,45,.96) !important;
}
.draft-shell:has(.pool.guide-focus) {
  position: relative;
  z-index: 9011;
}
@media (max-width: 760px) {
  .guide-panel {
    max-height: min(76vh, 620px);
  }
}

/* UX v1.2.3: guide panel hierarchy and button text fixes */
.guide-stage {
  z-index: 9200 !important;
}
.guide-veil {
  z-index: 9200 !important;
}
.guide-panel {
  z-index: 9300 !important;
  width: min(760px, calc(100vw - 48px)) !important;
}
.guide-progress {
  grid-template-columns: repeat(4, minmax(136px, 1fr)) !important;
}
.guide-progress button {
  min-width: 0;
  justify-content: center;
  padding: 10px 12px;
}
.guide-progress button span {
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1.15;
}
.guide-focus,
.guide-parent-focus {
  z-index: 9100 !important;
}
.pool.guide-focus {
  z-index: 9102 !important;
}
.draft-shell:has(.pool.guide-focus) {
  z-index: 9101 !important;
}
body.guide-lock .hero-grid,
html.guide-lock .hero-grid,
body.guide-lock .main,
html.guide-lock .main {
  overflow: hidden !important;
}
@media (max-width: 760px) {
  .guide-progress {
    grid-template-columns: 1fr !important;
  }
  .guide-panel {
    width: auto !important;
  }
}

/* UX v1.2.4: user-facing guide copy and calmer match action colors */
.match-row-actions button {
  border-radius: 12px;
  min-height: 42px;
  font-weight: 950;
  letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.match-row-actions .match-action-continue {
  background: linear-gradient(135deg, #f4d27a 0%, #c7942e 68%, #8d651c 100%) !important;
  border: 1px solid rgba(244,210,122,.44) !important;
  color: #07111f !important;
}
.match-row-actions .match-action-view {
  background: linear-gradient(180deg, rgba(47,128,237,.20), rgba(8,20,41,.82)) !important;
  border: 1px solid rgba(96,166,255,.36) !important;
  color: #dcecff !important;
}
.match-row-actions .match-action-edit {
  background: linear-gradient(180deg, rgba(166,190,226,.12), rgba(8,18,34,.82)) !important;
  border: 1px solid rgba(166,190,226,.30) !important;
  color: #f3f7ff !important;
}
.match-row-actions .match-action-delete {
  background: linear-gradient(180deg, rgba(217,79,85,.12), rgba(56,15,23,.62)) !important;
  border: 1px solid rgba(255,118,126,.34) !important;
  color: #ffb8bd !important;
}
.match-row-actions .match-action-continue:hover,
.match-row-actions .match-action-view:hover,
.match-row-actions .match-action-edit:hover,
.match-row-actions .match-action-delete:hover {
  transform: translateY(-1px);
}
.match-row-actions .match-action-delete:hover {
  background: linear-gradient(180deg, rgba(217,79,85,.24), rgba(76,18,28,.78)) !important;
  border-color: rgba(255,118,126,.54) !important;
  color: #ffd6d9 !important;
}
.guide-tip small {
  color: #c6d6ef !important;
}

/* UX v1.3.0: dashboard and series/game hierarchy */
.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.dashboard-kpis > div,
.dashboard-panel,
.series-row {
  border: 1px solid rgba(201,155,59,.20);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(12,26,49,.92), rgba(6,14,29,.88)),
    radial-gradient(circle at 100% 0%, rgba(244,210,122,.12), transparent 38%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04);
}
.dashboard-kpis > div { padding: 18px; }
.dashboard-kpis span,
.dashboard-series-card span,
.recent-series span,
.series-main span {
  color: #9eb2ce;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
}
.dashboard-kpis strong {
  display: block;
  margin: 8px 0 4px;
  color: #fff;
  font-size: 32px;
  line-height: 1;
}
.dashboard-kpis small,
.dashboard-series-card p,
.recent-series small,
.series-main small { color: var(--muted); }
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
  gap: 16px;
  margin-bottom: 16px;
}
.dashboard-grid.lower { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.dashboard-panel { padding: 18px; }
.dashboard-panel h2 { margin: 0 0 12px; color: #f4d27a; }
.dashboard-series-list { display: grid; gap: 10px; }
.dashboard-series-card,
.recent-series {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(166,190,226,.14);
  border-radius: 14px;
  background: rgba(5,14,28,.52);
}
.dashboard-series-card h3,
.recent-series strong,
.series-main h3 {
  margin: 5px 0;
  color: #fff;
}
.dashboard-series-card em,
.series-main em {
  color: #f4d27a;
  font-style: normal;
  margin: 0 8px;
}
.quick-form { display: grid; gap: 12px; }
.series-list { display: grid; gap: 12px; }
.series-row {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.3fr) 250px;
  gap: 14px;
  padding: 16px;
  align-items: start;
}
.series-games { display: grid; gap: 8px; }
.game-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 128px auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(166,190,226,.13);
  background: rgba(5,14,28,.50);
}
.game-row b { color: #f4d27a; }
.game-row span,
.game-row em {
  display: block;
  color: #b8c9e8;
  font-style: normal;
  font-size: 12px;
}
.game-row.finished { opacity: .86; }
.series-actions { align-self: stretch; }
@media (max-width: 1280px) {
  .dashboard-grid,
  .dashboard-grid.lower,
  .series-row { grid-template-columns: 1fr; }
  .series-actions { justify-self: start; }
}
@media (max-width: 760px) {
  .dashboard-kpis,
  .game-row { grid-template-columns: 1fr; }
  .dashboard-series-card,
  .recent-series { display: grid; }
}

/* UX v1.3.1: fast BP interactions and robust next-game handoff */
.hero-card.used { transition: opacity .08s ease, transform .08s ease; }
.slot.filled { transition: transform .08s ease, border-color .08s ease; }

/* UX v1.4.0: complete series model, position tags and unified dialogs */
.slot.filled {
  position: relative;
}
.slot-lane {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: .04em;
  color: #07111f;
  background: linear-gradient(135deg,#f4d27a,#b8872c);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
}
.mini-row .slot-lane {
  display: none;
}
.pick-list .slot.filled span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 6, 14, .68);
  backdrop-filter: blur(6px) saturate(1.08);
}
.app-dialog {
  width: min(520px, calc(100vw - 40px));
  border-radius: 20px;
  padding: 22px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  background:
    linear-gradient(180deg, rgba(12,26,49,.98), rgba(5,14,28,.97)),
    radial-gradient(circle at 100% 0%, rgba(244,210,122,.14), transparent 34%);
  border: 1px solid rgba(244,210,122,.28);
  box-shadow: 0 28px 90px rgba(0,0,0,.56), inset 0 1px 0 rgba(255,255,255,.06);
}
.dialog-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #07111f;
  font-weight: 1000;
  font-size: 24px;
  background: linear-gradient(135deg,#f4d27a,#b8872c);
}
.app-dialog.warn .dialog-icon,
.app-dialog.confirm .dialog-icon { background: linear-gradient(135deg,#f4d27a,#b8872c); }
.app-dialog.error .dialog-icon,
.app-dialog.danger .dialog-icon { background: linear-gradient(135deg,#ff8e94,#d94f55); }
.dialog-body h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #fff;
}
.dialog-body p {
  margin: 0;
  color: #b8c9e8;
  line-height: 1.7;
}
.dialog-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}
.dialog-actions button {
  min-width: 104px;
}
@media (max-width: 560px) {
  .app-dialog { grid-template-columns: 1fr; }
  .dialog-actions { display: grid; grid-template-columns: 1fr; }
}

/* UX v1.5.0: team management and global BP mode */
.form-hint {
  display: block;
  color: #f4d27a;
  font-weight: 800;
  line-height: 1.6;
}
.team-manage {
  grid-template-columns: minmax(320px, .55fr) minmax(0, 1fr);
}
.team-list {
  display: grid;
  gap: 10px;
  align-content: start;
}
.team-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(166,190,226,.14);
  background: rgba(5,14,28,.52);
}
.team-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}
.team-card .avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg,#f4d27a,#b8872c);
  color: #07111f;
  font-size: 14px;
  font-weight: 1000;
}
.team-card strong { color: #fff; }
.team-card small { color: var(--muted); }
.team-card > div:last-child {
  display: flex;
  gap: 8px;
}
.series-main small::first-letter { text-transform: uppercase; }
@media (max-width: 900px) {
  .team-manage { grid-template-columns: 1fr; }
  .team-card { display: grid; }
  .team-card > div:last-child { justify-content: stretch; }
  .team-card > div:last-child button { flex: 1; }
}

/* UX v1.6.0: professional draft order, rollback by avatar, detailed hero states */
.slot.cancelable {
  cursor: pointer;
}
.slot.cancelable .slot-avatar {
  position: relative;
  display: grid;
  place-items: center;
}
.slot.cancelable:hover {
  border-color: rgba(244,210,122,.85);
  box-shadow: 0 0 0 1px rgba(244,210,122,.25), 0 12px 34px rgba(0,0,0,.28);
}
.slot-cancel {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 950;
  font-size: 11px;
  color: #f4d27a;
  background: rgba(244,210,122,.10);
  border: 1px solid rgba(244,210,122,.25);
  opacity: 0;
  transform: translateX(4px);
  transition: .16s ease;
}
.slot.cancelable:hover .slot-cancel {
  opacity: 1;
  transform: translateX(0);
}
.mini-row .slot-cancel {
  display: none;
}
.hero-card .portrait {
  position: relative;
}
.hero-state {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  padding: 2px 4px;
  border-radius: 8px;
  font-style: normal;
  font-size: 11px;
  font-weight: 1000;
  text-align: center;
  color: #07111f;
  background: linear-gradient(135deg,#f4d27a,#b8872c);
  box-shadow: 0 3px 12px rgba(0,0,0,.28);
}
.hero-card.banned .hero-state {
  background: linear-gradient(135deg,#ff8e94,#d94f55);
  color: #fff;
}
.hero-card.picked .hero-state {
  background: linear-gradient(135deg,#5ee1ad,#2eb67d);
  color: #06130f;
}
.hero-card.global-picked .hero-state {
  background: linear-gradient(135deg,#9db4ff,#6078db);
  color: #fff;
}
.hero-card.banned,
.hero-card.picked,
.hero-card.global-picked {
  opacity: .62;
}

/* UX v1.6.1: clean hero state labels, fixed lane column, ban avatar fix, dock title split */
.hero-card.used::after {
  content: none !important;
  display: none !important;
}
.slot.filled {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) 62px auto;
  align-items: center;
  gap: 10px;
}
.pick-list .slot.filled {
  grid-template-columns: 54px minmax(0, 1fr) 64px auto;
}
.mini-row .slot.filled {
  display: grid !important;
  grid-template-columns: 1fr !important;
  place-items: center;
  gap: 0;
}
.slot-avatar,
.slot-avatar img {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  object-fit: cover;
  overflow: hidden;
}
.mini-row .slot-avatar,
.mini-row .slot-avatar img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}
.mini-row .slot.filled > span:not(.slot-avatar),
.mini-row .slot-lane {
  display: none !important;
}
.pick-list .slot.filled > span:not(.slot-avatar) {
  display: block !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slot-lane {
  justify-self: end;
  margin-left: 0 !important;
  width: 56px;
  text-align: center;
}
.slot-cancel {
  justify-self: end;
}
.dock-title strong {
  display: grid !important;
  gap: 2px;
  line-height: .98;
}
.dock-title strong b,
.dock-title strong i {
  display: block;
  font-style: normal;
  white-space: nowrap;
}
.dock-title strong i {
  color: #f4d27a;
}

/* UX v1.6.1-r2: ensure mini ban avatar wrapper is never hidden by legacy span rule */
.mini-row .slot.filled .slot-avatar {
  display: block !important;
}

/* UX v1.6.2: readonly dock fields, focus-safe search, far-right lane labels */
.dock-versus.readonly input,
.dock-versus.readonly select {
  cursor: default;
  opacity: 1;
  color: #dcecff;
  background: rgba(4,12,24,.58);
}
.dock-versus.readonly input:disabled,
.dock-versus.readonly select:disabled {
  -webkit-text-fill-color: #dcecff;
}
.pick-list .slot.filled {
  position: relative;
  grid-template-columns: 54px minmax(0, 1fr) 70px !important;
  padding-right: 14px;
}
.pick-list .slot.filled > span:not(.slot-avatar) {
  padding-right: 8px;
}
.pick-list .slot-lane {
  grid-column: 3;
  justify-self: end;
  width: 64px !important;
}
.pick-list .slot-cancel {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  pointer-events: none;
}
.pick-list .slot.cancelable:hover .slot-cancel {
  transform: translateY(-50%) translateX(0);
}
.pick-list .slot.cancelable:hover .slot-lane {
  opacity: 0;
}

/* UX v1.6.3: pure readonly summary cards and IME-safe search layout */
.dock-versus.readonly {
  align-items: stretch;
}
.dock-display {
  min-height: 64px;
  border: 1px solid rgba(166,190,226,.18);
  background: linear-gradient(180deg, rgba(5,14,28,.76), rgba(3,10,22,.58));
  border-radius: 14px;
  padding: 10px 14px;
  display: grid;
  align-content: center;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.dock-display span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.dock-display strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 21px;
  letter-spacing: .02em;
}
.dock-display.blue {
  border-left: 3px solid #3aa7ff;
}
.dock-display.red {
  border-left: 3px solid #ff5d6c;
}
.dock-display.dock-format strong {
  text-align: center;
}
.pick-list .slot.filled {
  grid-template-columns: 54px minmax(0, 1fr) 66px !important;
  column-gap: 12px;
  padding-right: 16px;
}
.pick-list .slot-name {
  display: block !important;
  min-width: 0;
  max-width: none !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pick-list .slot-lane {
  grid-column: 3;
  justify-self: end;
  width: 64px !important;
  flex: 0 0 64px;
}

/* UX v1.7.0: direct Series/Game selection in BP console */
.draft-switcher {
  display: grid;
  grid-template-columns: minmax(300px, 1.35fr) minmax(420px, 2fr) 150px;
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(10,24,46,.92), rgba(5,13,27,.9));
}
.draft-series-select,
.draft-game-switch {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
}
.draft-series-select > span,
.draft-game-switch > span,
.draft-series-meta > span {
  color: #9eb2ce;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}
.draft-series-select select {
  width: 100%;
  min-height: 44px;
  color: #eef5ff;
  border-color: rgba(201,155,59,.28);
  background: rgba(3,10,22,.78);
  font-weight: 800;
}
.draft-game-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(78px, 1fr));
  gap: 8px;
}
.draft-game-tab {
  min-width: 0;
  min-height: 44px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 6px;
  align-items: center;
  text-align: left;
  border: 1px solid rgba(158,178,206,.18);
  background: rgba(3,10,22,.58);
  color: #dcecff;
}
.draft-game-tab b {
  font-size: 13px;
  white-space: nowrap;
}
.draft-game-tab em {
  justify-self: end;
  color: #9eb2ce;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.draft-game-tab small {
  grid-column: 1 / -1;
  color: #7087a6;
  font-size: 10px;
  white-space: nowrap;
}
.draft-game-tab.active {
  border-color: rgba(244,210,122,.76);
  background: linear-gradient(180deg, rgba(201,155,59,.22), rgba(16,30,50,.82));
  box-shadow: 0 0 0 1px rgba(244,210,122,.12), inset 0 1px 0 rgba(255,255,255,.06);
}
.draft-game-tab.active b,
.draft-game-tab.drafting em { color: #f4d27a; }
.draft-game-tab.finished em { color: #72d5a1; }
.draft-game-tab.pending em { color: #8ea2bf; }
.draft-series-meta {
  min-height: 44px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding-left: 14px;
  border-left: 1px solid rgba(158,178,206,.16);
}
.draft-series-meta strong { color: #f4d27a; font-size: 18px; }
.draft-series-meta small { color: #9eb2ce; white-space: nowrap; }
.draft-no-games { color: #9eb2ce; align-self: center; }
.draft-readonly .hero-card:not(.used) { opacity: .58; }
.draft-readonly .hero-card { cursor: default; }
@media (max-width: 1380px) {
  .draft-switcher { grid-template-columns: minmax(280px, 1fr) minmax(400px, 1.6fr); }
  .draft-series-meta { grid-column: 1 / -1; grid-template-columns: auto auto 1fr; align-items: center; min-height: auto; padding: 0; border-left: 0; gap: 10px; }
  .draft-series-meta small { justify-self: end; }
}
@media (max-width: 900px) {
  .draft-switcher { grid-template-columns: 1fr; align-items: stretch; }
  .draft-series-meta { grid-column: auto; }
  .draft-game-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .draft-game-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .draft-series-meta { grid-template-columns: auto auto; }
  .draft-series-meta small { grid-column: 1 / -1; justify-self: start; }
}

/* UX v1.8.0: professional team and permission management workspaces */
.management-head { margin-bottom: 16px; }
.management-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.management-stats article {
  position: relative;
  min-height: 104px;
  padding: 17px 18px;
  overflow: hidden;
  border: 1px solid rgba(166,190,226,.16);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(17,36,65,.88), rgba(5,14,28,.84));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 14px 40px rgba(0,0,0,.18);
}
.management-stats article::after {
  content: '';
  position: absolute;
  width: 84px;
  height: 84px;
  right: -28px;
  top: -34px;
  border-radius: 50%;
  background: rgba(201,155,59,.09);
}
.management-stats span,
.management-stats small { display: block; color: var(--muted); }
.management-stats span { font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.management-stats strong { display: block; margin: 8px 0 4px; color: #fff; font-size: 28px; }
.management-workspace {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(166,190,226,.16);
}
.management-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.management-toolbar h2 { margin: 0; color: #fff; }
.management-toolbar p { margin: 6px 0 0; color: var(--muted); line-height: 1.6; }
.management-filters {
  display: flex;
  align-items: end;
  gap: 10px;
}
.management-filters label { min-width: 150px; margin: 0; }
.management-filters label span { color: var(--muted); font-size: 11px; font-weight: 900; }
.management-filters .admin-search { min-width: 280px; }
.management-filters input,
.management-filters select { min-height: 40px; }
.refresh-users { min-height: 40px; }
.admin-table-wrap {
  display: block;
  overflow-x: auto;
  border: 1px solid rgba(166,190,226,.12);
  border-radius: 14px;
  background: rgba(3,10,22,.34);
}
.admin-table { min-width: 760px; }
.admin-table th {
  padding: 12px 16px;
  color: #a9bdd9;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(14,31,56,.84);
}
.admin-table td { padding: 13px 16px; vertical-align: middle; }
.admin-table tbody tr { transition: background .18s ease, box-shadow .18s ease; }
.admin-table tbody tr:hover { background: rgba(28,53,87,.34); box-shadow: inset 3px 0 0 rgba(201,155,59,.52); }
.admin-identity { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.admin-identity strong,
.admin-identity small { display: block; }
.admin-identity strong { color: #fff; }
.admin-identity small { margin-top: 4px; color: var(--muted); }
.team-logo,
.user-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244,210,122,.32);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(244,210,122,.95), rgba(157,105,21,.92));
  color: #08111f;
  font-size: 12px;
  font-weight: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.team-logo.large { width: 78px; height: 78px; border-radius: 22px; font-size: 16px; }
.team-logo img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #07111f;
}
.team-logo b { position: relative; z-index: 1; }
.user-avatar { border-color: rgba(94,169,255,.3); background: linear-gradient(145deg,#6bbcff,#315ea8); color: #fff; font-size: 16px; }
.region-chip,
.usage-chip,
.role-badge,
.current-account {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.region-chip { color: #dcecff; border: 1px solid rgba(166,190,226,.18); background: rgba(91,126,172,.13); }
.usage-chip.active { color: #8be2b6; border: 1px solid rgba(68,209,140,.24); background: rgba(68,209,140,.1); }
.usage-chip.idle { color: #aebed2; border: 1px solid rgba(166,190,226,.14); background: rgba(166,190,226,.07); }
.role-badge.admin { color: #f6d888; border: 1px solid rgba(244,210,122,.3); background: rgba(201,155,59,.13); }
.role-badge.operator { color: #81c8ff; border: 1px solid rgba(58,167,255,.3); background: rgba(58,167,255,.12); }
.role-badge.viewer { color: #b9c7d9; border: 1px solid rgba(166,190,226,.2); background: rgba(166,190,226,.09); }
.current-account { color: #8be2b6; border: 1px solid rgba(68,209,140,.25); background: rgba(68,209,140,.1); }
.permission-copy strong,
.permission-copy small { display: block; }
.permission-copy strong { color: #e8f2ff; }
.permission-copy small { max-width: 300px; margin-top: 4px; color: var(--muted); line-height: 1.45; }
.muted-cell { color: var(--muted); white-space: nowrap; }
.table-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.row-menu { position: relative; }
.row-menu summary {
  list-style: none;
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  cursor: pointer;
  border: 1px solid rgba(166,190,226,.18);
  border-radius: 9px;
  color: #cbd9ec;
  background: rgba(6,15,29,.72);
  font-size: 12px;
  font-weight: 900;
}
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 200;
  width: 150px;
  padding: 8px;
  border: 1px solid rgba(166,190,226,.18);
  border-radius: 11px;
  background: rgba(4,12,24,.98);
  box-shadow: 0 18px 48px rgba(0,0,0,.46);
}
.row-menu button { width: 100%; }
.row-menu button:disabled { opacity: .42; cursor: not-allowed; }
.admin-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  justify-content: flex-end;
  background: rgba(1,6,14,.7);
  backdrop-filter: blur(8px);
}
.admin-drawer {
  width: min(520px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  border-radius: 0;
  border-left: 1px solid rgba(244,210,122,.22);
  background: linear-gradient(180deg, rgba(11,25,47,.99), rgba(4,12,24,.99));
  box-shadow: -28px 0 90px rgba(0,0,0,.42);
}
.admin-drawer header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.admin-drawer header span { color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.admin-drawer h2 { margin: 5px 0 0; color: #fff; font-size: 25px; }
.admin-drawer header p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.drawer-close { width: 38px; min-width: 38px; padding: 0; font-size: 22px; }
.brand-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid rgba(244,210,122,.17);
  border-radius: 16px;
  background: radial-gradient(circle at 12% 0%, rgba(201,155,59,.14), transparent 42%), rgba(4,12,24,.54);
}
.brand-preview span,
.brand-preview strong,
.brand-preview small { display: block; }
.brand-preview > div:last-child > span { color: var(--gold); font-size: 11px; font-weight: 900; }
.brand-preview strong { margin-top: 5px; color: #fff; font-size: 20px; }
.brand-preview small { margin-top: 4px; color: var(--muted); }
.drawer-form { padding: 20px 0; }
.drawer-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drawer-form label > small { color: var(--muted); line-height: 1.5; }
.admin-drawer footer { position: sticky; bottom: -24px; display: flex; justify-content: flex-end; gap: 10px; margin: 10px -24px -24px; padding: 18px 24px 24px; border-top: 1px solid var(--line); background: rgba(4,12,24,.97); }
.role-matrix {
  display: grid;
  grid-template-columns: minmax(220px,.65fr) minmax(0,2fr);
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 18px;
}
.role-matrix-intro h2 { margin: 6px 0 0; color: #fff; }
.role-matrix-intro > span { color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.role-matrix-intro p { color: var(--muted); line-height: 1.65; }
.role-matrix-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.role-card { padding: 15px; border: 1px solid rgba(166,190,226,.14); border-radius: 15px; background: rgba(4,12,24,.5); }
.role-card.admin { border-color: rgba(244,210,122,.2); }
.role-card.operator { border-color: rgba(58,167,255,.2); }
.role-card h3 { margin: 12px 0 6px; color: #fff; font-size: 15px; }
.role-card p { min-height: 42px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.role-card ul { margin: 12px 0 0; padding-left: 18px; color: #c7d7eb; font-size: 12px; line-height: 1.8; }
.role-picker { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.role-picker legend { margin-bottom: 10px; color: #bfd1ec; }
.role-choice { position: relative; display: block; margin: 0; cursor: pointer; }
.role-choice input { position: absolute; opacity: 0; pointer-events: none; }
.role-choice > span { display: block; padding: 14px 15px; border: 1px solid rgba(166,190,226,.16); border-radius: 14px; background: rgba(4,12,24,.48); transition: .18s ease; }
.role-choice b,
.role-choice small { display: block; }
.role-choice b { color: #fff; }
.role-choice small { margin-top: 5px; color: var(--muted); line-height: 1.45; }
.role-choice input:checked + span { border-color: rgba(244,210,122,.58); background: rgba(201,155,59,.12); box-shadow: 0 0 0 1px rgba(244,210,122,.14); }
@media (max-width: 1100px) {
  .management-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .management-toolbar { align-items: stretch; flex-direction: column; }
  .management-filters { flex-wrap: wrap; }
  .role-matrix { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .management-head { align-items: stretch; flex-direction: column; gap: 14px; }
  .management-head > button { width: 100%; }
  .management-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .management-stats article { min-height: 92px; padding: 14px; }
  .management-filters { display: grid; grid-template-columns: 1fr; }
  .management-filters label,
  .management-filters .admin-search { min-width: 0; }
  .admin-table { min-width: 0; }
  .admin-table thead { display: none; }
  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td { display: block; width: 100%; }
  .admin-table tbody { display: grid; gap: 12px; padding: 12px; }
  .admin-table tr { overflow: visible; border: 1px solid rgba(166,190,226,.15); border-radius: 14px; background: rgba(5,14,28,.62); }
  .admin-table td { display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid rgba(166,190,226,.08); }
  .admin-table td:last-child { border-bottom: 0; }
  .admin-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 900; }
  .admin-table .empty-table { display: block; }
  .admin-table .empty-table::before { display: none; }
  .table-actions { justify-content: flex-start; }
  .row-menu > div { left: 0; right: auto; }
  .role-matrix-grid { grid-template-columns: 1fr; }
  .role-card p { min-height: 0; }
  .drawer-form-row { grid-template-columns: 1fr; gap: 0; }
  .admin-drawer { padding: 18px; }
  .admin-drawer footer { margin: 10px -18px -18px; padding: 16px 18px 18px; }
}
@media (max-width: 430px) {
  .management-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .management-stats strong { font-size: 23px; }
  .management-workspace,
  .role-matrix { padding: 14px; }
  .brand-preview { align-items: flex-start; }
}

/* v1.8.0 sidebar capacity fix: admin navigation must never sit behind the permission card */
.sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar .brand { flex: 0 0 auto; }
.sidebar nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
  padding-bottom: 10px;
}
.sidebar .side-card {
  position: static;
  flex: 0 0 auto;
  margin-top: 12px;
}
.sidebar nav::-webkit-scrollbar { width: 6px; }
.sidebar nav::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(166,190,226,.2); }
@media (max-width: 760px) {
  .sidebar { overflow: visible; }
  .sidebar nav { overflow: visible; }
}

/* Keep row actions reliable inside responsive table containers. */
.row-menu[open] > div {
  position: static;
  margin-top: 6px;
  width: 160px;
}
html.admin-drawer-lock,
body.admin-drawer-lock { overflow: hidden !important; }

/* UX v1.8.1: component-scoped fixed control sizes; never stretch action buttons with content rows */
.sidebar nav {
  align-content: start;
  grid-auto-rows: 54px;
}
.sidebar .nav-item {
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  flex: 0 0 54px;
}
.series-actions {
  align-self: start;
  align-content: start;
  grid-auto-rows: 42px;
}
.series-actions button {
  height: 42px;
  min-height: 42px;
  max-height: 42px;
}
.game-row > div:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.game-row > div:last-child button,
.table-actions > button,
.table-actions .row-menu summary,
.row-menu button.small {
  height: 32px;
  min-height: 32px;
  max-height: 32px;
}
.dock-actions > button,
.dock-actions .action-menu summary {
  height: 42px;
  min-height: 42px;
  max-height: 42px;
}
.edit-actions button,
.dialog-actions button,
.admin-drawer footer button,
.guide-actions button,
.management-head > button,
.refresh-users {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
}
.side-actions button {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
}
@media (max-width: 760px) {
  .sidebar .nav-item {
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    flex-basis: 50px;
  }
  .sidebar nav { grid-auto-rows: 50px; }
  .series-actions { grid-auto-rows: 42px; }
  .management-head > button { width: 100%; }
}
