@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
  --bg:#070b14; --bg-soft:#0b1220; --surface:#0f1726; --surface2:#131d2e; --surface3:#1a263a;
  --surface-hover:#1d2b42; --panel:#0d1626; --panel-strong:#101c30;
  --border:#223149; --border2:#33445f;
  --accent:#facc15; --accent2:#38bdf8; --accent3:#a78bfa;
  --text:#e6edf7; --text-muted:#6f7f95; --text-dim:#aab6c8;
  --red:#f87171; --green:#4ade80; --orange:#fb923c; --teal:#2dd4bf; --pink:#f472b6;
  --radius:8px; --radius-lg:10px; --shadow:0 18px 48px rgba(0,0,0,.28);
  --topbar:58px;
}

/* Team Hub refresh */
.hub-section-title > div > p {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.hub-team-grid.own-teams {
  grid-template-columns: repeat(2, minmax(300px, 1fr));
}

.hub-team-grid.shared-teams {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.hub-team-card,
.hub-team-card.shared {
  width: 100%;
  max-width: none;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(20, 32, 50, .96), rgba(14, 23, 37, .94));
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .17s, transform .17s, box-shadow .17s, background .17s;
}

.hub-team-card.shared {
  padding: 15px;
}

.hub-team-card:hover,
.hub-team-card:focus-visible {
  border-color: rgba(56, 203, 176, .52);
  background: linear-gradient(145deg, rgba(24, 40, 61, .98), rgba(15, 27, 43, .96));
  box-shadow: 0 14px 32px rgba(0, 0, 0, .2);
  transform: translateY(-2px);
  outline: none;
}

.hub-team-card.selected {
  border-color: var(--accent2);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, .18), 0 16px 34px rgba(0, 0, 0, .24);
}

.hub-team-head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.hub-team-copy {
  display: grid;
  min-width: 0;
}

.hub-team-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-team-copy small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.hub-mon-preview,
.hub-mon-preview.grid,
.hub-mon-preview.row {
  display: grid;
  grid-template-columns: repeat(3, 52px);
  gap: 8px;
  width: max-content;
}

.hub-mon-slot {
  width: 52px;
  height: 54px;
}

.hub-mon-slot img {
  width: 51px;
  height: 51px;
}

.hub-team-card.shared .hub-mon-preview {
  grid-template-columns: repeat(3, 46px);
  gap: 7px;
}

.hub-team-card.shared .hub-mon-slot {
  width: 46px;
  height: 48px;
}

.hub-team-card.shared .hub-mon-slot img {
  width: 45px;
  height: 45px;
}

.hub-team-card-footer {
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--accent2);
  font-size: 12px;
  font-weight: 700;
}

.hub-team-card-footer span:last-child {
  font-size: 21px;
  line-height: 1;
}

.hub-team-detail:not(:empty) {
  margin-top: 16px;
}

.hub-team-editor {
  padding: 19px;
  border-color: rgba(56, 189, 248, .28);
}

.hub-team-detail-head,
.hub-team-detail-title,
.hub-team-import-actions {
  display: flex;
  align-items: center;
}

.hub-team-detail-head {
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.hub-team-detail-title {
  gap: 12px;
}

.hub-team-detail-title h2 {
  font-size: 21px;
}

.hub-team-detail-title p {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.hub-team-import {
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(8, 14, 24, .35);
}

.hub-team-import summary {
  padding: 12px 14px;
  color: var(--text-dim);
  font-weight: 700;
  cursor: pointer;
}

.hub-team-import[open] summary {
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.hub-team-import .form-group {
  padding: 14px;
}

.hub-team-import-actions {
  justify-content: space-between;
  gap: 10px;
}

.hub-team-pokemon-detail {
  margin-top: 16px;
}

.hub-inline-warning {
  padding: 11px 14px;
  border: 1px solid rgba(242, 168, 92, .3);
  border-radius: 10px;
  background: rgba(242, 168, 92, .08);
  color: var(--warning);
  font-size: 12px;
}

@media (max-width: 980px) {
  .hub-team-grid.own-teams,
  .hub-team-grid.shared-teams {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .hub-team-card,
  .hub-team-card.shared {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .hub-team-head {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .hub-team-copy strong {
    font-size: 16px;
  }

  .hub-mon-preview,
  .hub-team-card.shared .hub-mon-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .hub-mon-slot,
  .hub-team-card.shared .hub-mon-slot {
    width: 100%;
    height: 50px;
  }

  .hub-team-card-footer {
    justify-content: space-between;
  }

  .hub-team-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hub-team-detail-head .hub-page-actions,
  .hub-team-detail-head .btn {
    width: 100%;
  }

  .hub-team-import-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.draft-config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

@media (max-width: 640px) {
  .draft-config-actions .btn {
    width: 100%;
  }
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Rajdhani',sans-serif;background:
  radial-gradient(circle at 20% -10%, rgba(56,189,248,.12), transparent 34%),
  radial-gradient(circle at 85% 0%, rgba(250,204,21,.08), transparent 28%),
  linear-gradient(180deg, #07101d 0%, var(--bg) 42%, #050811 100%);
  color:var(--text);min-height:100vh;font-size:16px}

/* HEADER */
header{background:rgba(9,15,27,.9);border-bottom:1px solid rgba(51,68,95,.7);padding:0 18px;display:flex;align-items:center;justify-content:space-between;height:var(--topbar);position:sticky;top:0;z-index:100;backdrop-filter:blur(16px);box-shadow:0 1px 0 rgba(255,255,255,.02)}
.logo{font-family:'Space Mono',monospace;font-weight:700;font-size:14px;color:var(--accent);letter-spacing:0}
.logo span{color:var(--accent2)}
nav{display:flex;gap:4px}
.nav-btn{background:none;border:1px solid transparent;color:var(--text-dim);padding:5px 14px;border-radius:6px;cursor:pointer;font-family:'Rajdhani',sans-serif;font-size:13px;font-weight:600;letter-spacing:.5px;transition:all .15s;text-transform:uppercase}
.nav-btn:hover{color:var(--text);border-color:var(--border);background:var(--surface2)}
.nav-btn.active{color:var(--accent);border-color:var(--accent);background:rgba(250,204,21,.08)}
.header-actions{display:flex;gap:8px;align-items:center}

/* MAIN */
main{padding:16px;max-width:1680px;margin:0 auto}
.view{display:none}
.view.active{display:block}

/* BUTTONS */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 13px;border-radius:var(--radius);font-family:'Rajdhani',sans-serif;font-weight:700;font-size:13px;cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .15s,box-shadow .15s;border:none;text-transform:uppercase;letter-spacing:.4px;white-space:nowrap;min-height:34px}
.btn-primary{background:linear-gradient(180deg,#fde047,#facc15);color:#080c14;box-shadow:0 8px 18px rgba(250,204,21,.12)}
.btn-primary:hover{background:#fde047;transform:translateY(-1px);box-shadow:0 12px 26px rgba(250,204,21,.18)}
.btn-ghost{background:rgba(19,29,46,.65);border:1px solid var(--border);color:var(--text-dim)}
.btn-ghost:hover{border-color:var(--accent2);color:var(--accent2);background:rgba(56,189,248,.08)}
.btn-danger{background:transparent;border:1px solid var(--border);color:var(--red)}
.btn-danger:hover{border-color:var(--red);background:rgba(248,113,113,.08)}
.btn-success{background:var(--green);color:#0a0e1a}
.btn-success:hover{background:#86efac;transform:translateY(-1px)}
.btn-sm{padding:5px 10px;font-size:11px;min-height:29px}
.btn-xs{padding:3px 8px;font-size:10px;min-height:24px}

/* SECTION HEADER */
.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;flex-wrap:wrap;gap:10px}
.section-title{font-family:'Space Mono',monospace;font-size:11px;color:var(--text-dim);text-transform:uppercase;letter-spacing:1.4px}

/* MODAL */
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.75);z-index:200;align-items:center;justify-content:center;backdrop-filter:blur(4px)}
.modal-overlay.open{display:flex}
.modal{background:var(--panel-strong);border:1px solid var(--border2);border-radius:var(--radius-lg);padding:22px;width:540px;max-width:95vw;max-height:90vh;overflow-y:auto;box-shadow:var(--shadow)}
.modal-sm{width:380px}
.modal-md{width:420px}
.modal-title{font-family:'Space Mono',monospace;font-size:13px;color:var(--accent);margin-bottom:16px;text-transform:uppercase;letter-spacing:1px}
.modal-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:16px}
.form-group{margin-bottom:12px}
.form-label{display:block;font-size:11px;color:var(--text-muted);margin-bottom:5px;text-transform:uppercase;letter-spacing:1px}
.form-input,.form-select{width:100%;padding:9px 11px;background:#0b1322;border:1px solid var(--border);border-radius:var(--radius);color:var(--text);font-family:'Rajdhani',sans-serif;font-size:14px;transition:border-color .15s,box-shadow .15s,background .15s}
.form-input:focus,.form-select:focus{outline:none;border-color:var(--accent2);box-shadow:0 0 0 3px rgba(56,189,248,.11);background:#0d1728}
.form-select{appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center;background-color:var(--surface2);cursor:pointer;text-overflow:ellipsis}
.form-select option,.form-select optgroup{background:var(--surface);color:var(--text)}
.form-textarea{width:100%;min-height:160px;padding:9px 11px;background:var(--surface2);border:1px solid var(--border);border-radius:6px;color:var(--text);font-family:'Space Mono',monospace;font-size:11px;line-height:1.6;resize:vertical;transition:border-color .15s}
.form-textarea-sm{min-height:80px}
.form-textarea-md{min-height:100px}
.form-textarea:focus{outline:none;border-color:var(--accent2)}
.invite-code-input{text-transform:uppercase}
.invite-result-box{display:none;margin-top:8px;padding:10px;background:var(--surface2);border-radius:8px;text-align:center}
.invite-result-label{margin-bottom:4px;color:var(--text-muted);font-size:11px}
.invite-result-code{color:var(--accent);font-family:'Space Mono',monospace;font-size:18px;font-weight:700}
.drop-zone{border:2px dashed var(--border);border-radius:8px;padding:20px;text-align:center;color:var(--text-muted);font-size:12px;cursor:pointer;transition:all .2s;margin-bottom:12px}
.drop-zone:hover,.drop-zone.drag-over{border-color:var(--accent2);color:var(--accent2);background:rgba(56,189,248,.04)}

/* TABS inside modal */
.modal-tabs{display:flex;gap:4px;margin-bottom:14px;border-bottom:1px solid var(--border);padding-bottom:10px}
.modal-tab{background:none;border:none;color:var(--text-muted);font-family:'Rajdhani',sans-serif;font-size:13px;font-weight:600;cursor:pointer;padding:4px 10px;border-radius:5px;text-transform:uppercase;letter-spacing:.5px;transition:all .15s}
.modal-tab.active{color:var(--accent);background:rgba(250,204,21,.1)}
.tab-pane{display:none}
.tab-pane.active{display:block}

/* ===================== PROFILES VIEW ===================== */
.profiles-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.profile-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden;transition:border-color .2s,transform .2s;cursor:pointer}
.profile-card:hover{border-color:var(--accent2);transform:translateY(-2px)}
.profile-card-header{padding:14px 14px 10px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--border)}
.profile-avatar{width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:'Space Mono',monospace;font-size:16px;font-weight:700;flex-shrink:0}
.profile-name{font-family:'Space Mono',monospace;font-size:13px;font-weight:700;color:var(--text)}
.profile-team-count{font-size:11px;color:var(--text-muted);margin-top:2px}
.profile-sprites{padding:10px 14px;display:flex;gap:3px;flex-wrap:wrap;min-height:52px}
.profile-sprite{width:44px;height:44px;image-rendering:pixelated;filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))}
.profile-card-footer{padding:8px 14px;display:flex;justify-content:space-between;align-items:center;background:var(--surface2);border-top:1px solid var(--border)}

/* PROFILE DETAIL */
.profile-detail-header{display:flex;align-items:center;gap:14px;margin-bottom:20px}
.profile-detail-avatar{width:54px;height:54px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:'Space Mono',monospace;font-size:20px;font-weight:700}
.profile-detail-name{font-family:'Space Mono',monospace;font-size:20px;font-weight:700;color:var(--accent)}
.team-list-item{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:12px 14px;margin-bottom:10px;display:flex;align-items:center;gap:12px;cursor:pointer;transition:border-color .2s}
.team-list-item:hover{border-color:var(--accent2)}
.team-list-sprites{display:flex;gap:2px}
.team-list-sprite{width:38px;height:38px;image-rendering:pixelated}
.team-list-name{font-family:'Space Mono',monospace;font-size:12px;font-weight:700;color:var(--text);margin-bottom:2px}
.team-list-meta{font-size:11px;color:var(--text-muted)}

/* ===================== MATCHUP VIEW ===================== */
.matchup-bar{display:flex;gap:12px;align-items:flex-end;margin-bottom:20px;flex-wrap:wrap}
.select-group{flex:1;min-width:180px}
.matchup-vs{font-family:'Space Mono',monospace;font-size:18px;font-weight:700;color:var(--text-muted);padding-bottom:8px;flex-shrink:0}
.matchup-container{display:grid;grid-template-columns:1fr 1fr;gap:2px}
.matchup-side{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px}
.matchup-side.mine{border-color:rgba(250,204,21,.3)}
.matchup-side.opp{border-color:rgba(248,113,113,.3)}
.matchup-side-title{font-family:'Space Mono',monospace;font-size:10px;text-transform:uppercase;letter-spacing:2px;margin-bottom:12px;padding-bottom:7px;border-bottom:1px solid var(--border)}
.matchup-side.mine .matchup-side-title{color:var(--accent)}
.matchup-side.opp .matchup-side-title{color:var(--red)}
.matchup-pokemon-row{display:flex;align-items:center;gap:8px;padding:7px;border-radius:7px;margin-bottom:5px;background:var(--surface2);border:1px solid transparent;transition:border-color .15s}
.matchup-pokemon-row:hover{border-color:var(--border)}
.matchup-sprite{width:48px;height:48px;image-rendering:pixelated;flex-shrink:0}
.matchup-poke-info{flex:1;min-width:0}
.matchup-poke-name{font-family:'Space Mono',monospace;font-size:11px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.matchup-poke-meta{font-size:10px;color:var(--text-muted);margin-top:2px}
.matchup-poke-item{color:var(--accent3)}
.matchup-moves-mini{display:flex;flex-wrap:wrap;gap:2px;margin-top:3px}
.move-mini{font-size:9px;padding:1px 5px;background:var(--surface3);border-radius:3px;color:var(--text-dim);white-space:nowrap}
.matchup-empty{text-align:center;padding:36px;color:var(--text-muted);font-size:12px}

/* ===================== POKEMON DETAIL ===================== */
.back-btn{display:flex;align-items:center;gap:6px;margin-bottom:18px;color:var(--text-dim);cursor:pointer;font-size:12px;text-transform:uppercase;letter-spacing:1px;font-weight:600;width:fit-content}
.back-btn:hover{color:var(--accent)}
.pokemon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px}
.pokemon-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden}
.pokemon-card-inner{display:flex}
.pokemon-sprite-col{width:106px;min-width:106px;display:flex;align-items:center;justify-content:center;padding:10px 6px;background:var(--surface2)}
.pokemon-sprite-col img{width:90px;height:90px;image-rendering:pixelated;filter:drop-shadow(0 2px 4px rgba(0,0,0,.6))}
.pokemon-info-col{flex:1;padding:10px 12px;min-width:0}
.pokemon-name-row{display:flex;align-items:center;gap:7px;margin-bottom:3px;flex-wrap:wrap}
.pokemon-name{font-family:'Space Mono',monospace;font-size:13px;font-weight:700;color:var(--text)}
.pokemon-types{display:flex;gap:3px}
.type-chip{font-size:9px;padding:2px 6px;border-radius:3px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}
.item-row{font-size:11px;color:var(--text-muted);margin-bottom:4px}
.item-name{color:var(--accent3);font-weight:600}
.ability-row{font-size:11px;color:var(--text-muted);margin-bottom:4px}
.ability-name{color:var(--teal);font-weight:600}
.tera-row{font-size:11px;color:var(--text-muted);margin-bottom:6px}
.tera-name{color:var(--pink);font-weight:600}
.moves-list{display:flex;flex-direction:column;gap:2px}
.move-item{font-size:11px;padding:2px 7px;background:var(--surface3);border-radius:4px;color:var(--text-dim);display:flex;align-items:center;gap:5px}
.move-dot{width:4px;height:4px;border-radius:50%;flex-shrink:0}
.ev-section{padding:8px 12px;border-top:1px solid var(--border);background:var(--surface2)}
.ev-label-row{display:flex;justify-content:space-between;margin-bottom:5px}
.ev-label{font-size:9px;color:var(--text-muted);text-transform:uppercase;letter-spacing:1px}
.ev-nature{font-size:9px;color:var(--text-muted)}
.ev-nature span{color:var(--accent3);font-weight:600}
.ev-bars{display:flex;flex-direction:column;gap:2px}
.ev-bar-row{display:flex;align-items:center;gap:5px}
.ev-stat-name{font-size:9px;color:var(--text-muted);width:26px;flex-shrink:0;font-family:'Space Mono',monospace}
.ev-bar-bg{flex:1;height:4px;background:var(--surface3);border-radius:3px;overflow:hidden}
.ev-bar-fill{height:100%;border-radius:3px;transition:width .4s ease}
.ev-stat-val{font-size:9px;color:var(--text-dim);width:26px;text-align:right;font-family:'Space Mono',monospace}

/* ===================== TOURNAMENT ===================== */
.tournament-setup{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:20px;margin-bottom:20px}
.tournament-setup-title{font-family:'Space Mono',monospace;font-size:12px;color:var(--accent);text-transform:uppercase;letter-spacing:1px;margin-bottom:14px}
.setup-row{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end;margin-bottom:12px}
.setup-group{display:flex;flex-direction:column;gap:5px;flex:1;min-width:160px}
.player-pool{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px;min-height:36px}
.player-tag{display:flex;align-items:center;gap:5px;padding:4px 10px;background:var(--surface2);border:1px solid var(--border);border-radius:5px;font-family:'Space Mono',monospace;font-size:11px;color:var(--text-dim)}
.player-tag button{background:none;border:none;color:var(--text-muted);cursor:pointer;font-size:12px;padding:0;line-height:1}
.player-tag button:hover{color:var(--red)}
.add-player-row{display:flex;gap:6px;align-items:center;margin-bottom:12px}

/* BRACKET */
.bracket-wrap{overflow-x:auto;padding-bottom:10px}
.bracket{display:flex;gap:0;align-items:stretch;min-width:fit-content}
.bracket-round{display:flex;flex-direction:column;justify-content:space-around;min-width:180px;padding:0 10px;position:relative}
.bracket-round::after{content:'';position:absolute;right:0;top:10%;height:80%;width:1px;background:var(--border)}
.bracket-round:last-child::after{display:none}
.round-title{font-family:'Space Mono',monospace;font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:1px;text-align:center;margin-bottom:12px;padding-bottom:6px;border-bottom:1px solid var(--border)}
.bracket-match{background:var(--surface);border:1px solid var(--border);border-radius:8px;overflow:hidden;margin:6px 0;transition:border-color .2s}
.bracket-match.active{border-color:var(--accent2)}
.bracket-player{display:flex;align-items:center;gap:7px;padding:7px 10px;cursor:pointer;transition:background .15s;position:relative}
.bracket-player:first-child{border-bottom:1px solid var(--border)}
.bracket-player:hover{background:var(--surface2)}
.bracket-player.winner{background:rgba(74,222,128,.08)}
.bracket-player.winner .bp-name{color:var(--green)}
.bracket-player.loser .bp-name{color:var(--text-muted);text-decoration:line-through}
.bracket-player.tbd .bp-name{color:var(--text-muted);font-style:italic}
.bp-sprite{width:30px;height:30px;image-rendering:pixelated;flex-shrink:0}
.bp-name{font-family:'Space Mono',monospace;font-size:11px;font-weight:700;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bp-seed{font-size:9px;color:var(--text-muted);margin-right:4px;flex-shrink:0}
.bp-team{font-size:9px;color:var(--accent3);flex-shrink:0;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bp-check{font-size:12px;color:var(--green);margin-left:auto;flex-shrink:0}
.winner-banner{text-align:center;padding:30px;background:var(--surface);border:1px solid var(--accent);border-radius:12px;margin-top:20px}
.winner-banner-title{font-family:'Space Mono',monospace;font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:2px;margin-bottom:8px}
.winner-banner-name{font-family:'Space Mono',monospace;font-size:28px;font-weight:700;color:var(--accent)}
.winner-sprites{display:flex;gap:4px;justify-content:center;margin-top:12px}
.winner-sprite{width:60px;height:60px;image-rendering:pixelated}

.no-tournament{text-align:center;padding:60px 24px;color:var(--text-muted)}
.no-tournament .big{font-size:40px;margin-bottom:12px}
.no-tournament .t{font-size:16px;color:var(--text-dim);font-weight:600;margin-bottom:6px}
.no-tournament .s{font-size:13px}

.empty-state{text-align:center;padding:60px 24px;color:var(--text-muted)}
.empty-icon{font-size:40px;margin-bottom:12px}
.empty-title{font-size:16px;color:var(--text-dim);margin-bottom:6px;font-weight:600}

/* TOAST */
.toast{position:fixed;bottom:20px;right:20px;background:var(--surface2);border:1px solid var(--border);border-radius:8px;padding:10px 18px;font-size:12px;color:var(--text);z-index:999;transform:translateY(100px);opacity:0;transition:all .3s}
.toast.show{transform:translateY(0);opacity:1}
.toast.success{border-color:var(--green);color:var(--green)}
.toast.error{border-color:var(--red);color:var(--red)}

/* TYPE */
.type-normal{background:#A8A878;color:#fff}.type-fire{background:#F08030;color:#fff}
.type-water{background:#6890F0;color:#fff}.type-electric{background:#F8D030;color:#333}
.type-grass{background:#78C850;color:#fff}.type-ice{background:#98D8D8;color:#333}
.type-fighting{background:#C03028;color:#fff}.type-poison{background:#A040A0;color:#fff}
.type-ground{background:#E0C068;color:#333}.type-flying{background:#A890F0;color:#fff}
.type-psychic{background:#F85888;color:#fff}.type-bug{background:#A8B820;color:#fff}
.type-rock{background:#B8A038;color:#fff}.type-ghost{background:#705898;color:#fff}
.type-dragon{background:#7038F8;color:#fff}.type-dark{background:#705848;color:#fff}
.type-steel{background:#B8B8D0;color:#333}.type-fairy{background:#EE99AC;color:#333}

/* ===================== APP REDESIGN LAYER ===================== */
#tournament-context-bar{
  min-width:0;
}

.context-pill{
  display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;
  background:rgba(250,204,21,.1);border:1px solid rgba(250,204,21,.22);
  color:var(--accent);font-family:'Space Mono',monospace;font-size:11px;font-weight:700;
  max-width:46vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

.app-dashboard{
  display:grid;gap:18px;
}

#view-dashboard{
  display:none;
}
#view-dashboard.active{
  display:grid;
  gap:16px;
}
#view-dashboard > .section-header{
  padding:12px 14px;margin:0;border:1px solid var(--border);border-radius:var(--radius-lg);
  background:rgba(13,22,38,.72);
}
#view-dashboard > .section-header:first-child{
  padding:16px;
  background:linear-gradient(135deg,rgba(19,29,46,.95),rgba(11,18,32,.88));
  box-shadow:var(--shadow);
}
#view-dashboard > .section-header:first-child .section-title{
  color:var(--text);font-size:15px;letter-spacing:1px;
}
#view-dashboard > .profiles-grid{
  margin-bottom:4px;
}

.dashboard-hero{
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:18px;
  padding:18px;border:1px solid var(--border);border-radius:var(--radius-lg);
  background:linear-gradient(135deg,rgba(19,29,46,.95),rgba(11,18,32,.88));
  box-shadow:var(--shadow);
}

.dashboard-title{
  font-family:'Space Mono',monospace;font-size:22px;font-weight:700;color:var(--text);
  margin-bottom:6px;
}

.dashboard-subtitle{font-size:14px;color:var(--text-muted);max-width:720px;line-height:1.45}
.dashboard-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.dashboard-section{display:grid;gap:10px}
.dashboard-section + .dashboard-section{margin-top:8px}

.profiles-grid{
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  gap:12px;
}

.profile-card,.pokemon-card,.team-list-item,.tournament-setup,.matchup-side{
  background:linear-gradient(180deg,rgba(19,29,46,.98),rgba(13,22,38,.98));
  border-color:var(--border);
  border-radius:var(--radius-lg);
  box-shadow:0 10px 32px rgba(0,0,0,.16);
}

.profile-card:hover{
  border-color:rgba(56,189,248,.65);
  transform:translateY(-1px);
  box-shadow:0 14px 34px rgba(0,0,0,.22);
}

.profile-card-header{
  padding:12px;border-bottom-color:rgba(51,68,95,.7);
}

.profile-avatar{
  width:38px;height:38px;border-radius:10px;
}

.profile-card-footer{
  padding:8px 12px;background:rgba(10,18,32,.72);border-top-color:rgba(51,68,95,.65);
}

.app-shell{
  display:grid;grid-template-columns:220px minmax(0,1fr);gap:14px;align-items:start;
}

.app-sidebar{
  position:sticky;top:calc(var(--topbar) + 16px);
  display:flex;flex-direction:column;gap:6px;padding:10px;
  background:rgba(13,22,38,.92);border:1px solid var(--border);border-radius:var(--radius-lg);
  box-shadow:var(--shadow);
}

.app-sidebar-title{
  padding:6px 8px 10px;color:var(--text-muted);font-family:'Space Mono',monospace;
  font-size:10px;text-transform:uppercase;letter-spacing:1.4px;border-bottom:1px solid var(--border);
  margin-bottom:4px;
}

.app-sidebar .modal-tab{
  display:flex;width:100%;align-items:center;justify-content:flex-start;text-align:left;gap:11px;
  padding:10px 12px;border-radius:var(--radius);font-size:13px;line-height:1.25;color:var(--text-dim);
  background:transparent;border:1px solid transparent;
}

.app-sidebar .modal-tab:hover{
  color:var(--text);background:rgba(56,189,248,.07);border-color:rgba(56,189,248,.18);
}

.app-sidebar .modal-tab.active{
  color:var(--accent);background:rgba(250,204,21,.1);border-color:rgba(250,204,21,.24);
}

.app-content{
  min-width:0;
}

.tournament-page-title{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start;
  margin-bottom:14px;padding:14px 16px;border:1px solid var(--border);
  border-radius:var(--radius-lg);background:rgba(13,22,38,.72);
}

.tournament-page-title h1{
  font-family:'Space Mono',monospace;font-size:20px;line-height:1.25;margin:0;color:var(--text);
}

.tournament-page-title p{font-size:13px;color:var(--text-muted);margin-top:4px;line-height:1.4}
.meta-row{display:flex;gap:7px;flex-wrap:wrap;align-items:center}

.badge{
  display:inline-flex;align-items:center;gap:5px;padding:3px 8px;border-radius:999px;
  border:1px solid var(--border);background:rgba(15,23,38,.95);color:var(--text-dim);
  font-size:11px;font-weight:700;line-height:1.2;
}
.badge-primary{border-color:rgba(250,204,21,.26);background:rgba(250,204,21,.11);color:var(--accent)}
.badge-info{border-color:rgba(56,189,248,.26);background:rgba(56,189,248,.1);color:var(--accent2)}
.badge-success{border-color:rgba(74,222,128,.28);background:rgba(74,222,128,.1);color:var(--green)}
.badge-danger{border-color:rgba(248,113,113,.28);background:rgba(248,113,113,.1);color:var(--red)}

.stats-grid{
  display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:10px;margin-top:14px;
}
.stat-card{
  padding:12px;border:1px solid var(--border);border-radius:var(--radius);
  background:rgba(10,18,32,.62);
}
.stat-label{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:var(--text-muted)}
.stat-value{font-family:'Space Mono',monospace;font-size:16px;font-weight:700;color:var(--text);margin-top:4px}

.rules-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
#rs-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px}
#rs-list .tournament-setup{margin-bottom:0!important}
#rs-list .tournament-setup > div:first-child{gap:10px;align-items:flex-start!important}
#rs-list .tournament-setup > div:nth-child(2){gap:7px!important;margin-top:8px!important}
#rs-list .tournament-setup > div:nth-child(2) span{
  display:inline-flex;align-items:center;padding:3px 8px;border:1px solid var(--border);
  border-radius:999px;background:rgba(15,23,38,.9);color:var(--text-dim);
}
.rules-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:10px}
.rules-meta{display:flex;gap:7px;flex-wrap:wrap}
.rules-text{margin-top:10px;padding:10px;border:1px solid var(--border);border-radius:var(--radius);background:rgba(7,11,20,.45);font-size:13px;color:var(--text-dim);white-space:pre-wrap;line-height:1.45}

.standings-table-wrap{
  overflow:auto;border:1px solid var(--border);border-radius:var(--radius-lg);
  background:rgba(13,22,38,.9);margin-bottom:18px;
}
.standings-table{width:100%;border-collapse:collapse;font-size:13px;min-width:480px}
.standings-table th{padding:9px 10px;text-align:left;color:var(--text-muted);font-size:10px;text-transform:uppercase;letter-spacing:1px;background:rgba(10,18,32,.72)}
.standings-table td{padding:9px 10px;border-top:1px solid var(--border)}
#t-tab-content > table{
  display:block;overflow:auto;width:100%!important;border:1px solid var(--border);
  border-radius:var(--radius-lg);background:rgba(13,22,38,.9);margin-bottom:18px!important;
}
#t-tab-content > table thead{display:table;width:100%;table-layout:fixed;background:rgba(10,18,32,.72)}
#t-tab-content > table tbody{display:table;width:100%;table-layout:fixed}
#t-tab-content > table th,#t-tab-content > table td{padding:9px 10px!important}

.toolbar{
  display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px;
  padding:10px;border:1px solid var(--border);border-radius:var(--radius-lg);
  background:rgba(13,22,38,.72);
}
.toolbar .form-input{max-width:240px}

.pool-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:14px;align-items:start}
.pool-sidebar{position:sticky;top:calc(var(--topbar) + 16px);display:grid;gap:10px}
.pool-random-card{padding:14px;border:1px solid var(--border);border-radius:var(--radius-lg);background:rgba(13,22,38,.9)}
.pool-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
#pool-grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
#pool-grid .pokemon-card{border-radius:var(--radius-lg)}
#pool-grid .pokemon-card:has(.btn-danger){position:relative}
#pool-random-result .winner-banner{border-radius:var(--radius-lg);background:rgba(250,204,21,.08)}
.pool-card .pokemon-card-inner{min-height:112px}
.pool-card.is-banned{opacity:.62}
.pool-card.is-banned .pokemon-sprite-col{filter:grayscale(1)}
.pool-meta{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}
.tag-list{display:flex;gap:4px;flex-wrap:wrap}
.tag-chip{font-size:10px;padding:2px 6px;border:1px solid var(--border);border-radius:999px;background:rgba(15,23,38,.9);color:var(--text-dim)}

.sheet-layout{display:grid;grid-template-columns:minmax(260px,360px) minmax(0,1fr);gap:14px;align-items:start}
.sheet-list{display:grid;gap:8px}
.sheet-detail-panel{min-width:0}
.sheet-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
#sheets-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px}
#sheets-list .team-list-item{margin-bottom:0}
#sheet-detail .tournament-setup{border-color:rgba(56,189,248,.22)}

.pokemon-grid{
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:12px;
}
.pokemon-card{overflow:hidden}
.pokemon-sprite-col{background:linear-gradient(180deg,rgba(56,189,248,.08),rgba(10,18,32,.7));border-right:1px solid var(--border)}
.pokemon-info-col{padding:11px 12px}
.move-item,.move-mini{background:rgba(26,38,58,.86)}
.ev-section{background:rgba(10,18,32,.7);border-top-color:var(--border)}

.draft-board{
  display:grid;grid-template-columns:260px minmax(360px,1fr) 320px;gap:14px;align-items:start;
}
.draft-panel{
  min-width:0;border:1px solid var(--border);border-radius:var(--radius-lg);
  background:rgba(13,22,38,.92);box-shadow:0 10px 32px rgba(0,0,0,.16);overflow:hidden;
}
.draft-panel-header{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  padding:11px 12px;border-bottom:1px solid var(--border);background:rgba(10,18,32,.66);
}
.draft-panel-title{font-family:'Space Mono',monospace;font-size:11px;text-transform:uppercase;letter-spacing:1.3px;color:var(--text-dim)}
.draft-panel-body{padding:12px}
.draft-player-row,.draft-history-row,.draft-mon-row{
  display:flex;align-items:center;gap:9px;padding:8px;border:1px solid transparent;border-radius:var(--radius);
  background:rgba(15,23,38,.58);margin-bottom:6px;
}
.draft-player-row.current{border-color:rgba(250,204,21,.36);background:rgba(250,204,21,.09)}
.draft-order-number{width:24px;height:24px;border-radius:7px;display:flex;align-items:center;justify-content:center;background:rgba(56,189,248,.12);color:var(--accent2);font-family:'Space Mono',monospace;font-size:10px;font-weight:700}
.draft-player-name{font-weight:700;color:var(--text)}
.draft-player-meta{font-size:11px;color:var(--text-muted)}
.draft-current{
  padding:14px;border:1px solid rgba(250,204,21,.25);border-radius:var(--radius);
  background:linear-gradient(135deg,rgba(250,204,21,.12),rgba(56,189,248,.06));
  margin-bottom:12px;
}
.draft-current-label{font-size:10px;text-transform:uppercase;letter-spacing:1.1px;color:var(--text-muted)}
.draft-current-name{font-family:'Space Mono',monospace;font-size:18px;color:var(--accent);margin-top:3px}

.empty-state{
  border:1px dashed rgba(51,68,95,.75);border-radius:var(--radius-lg);
  background:rgba(13,22,38,.5);
}

.toast{box-shadow:var(--shadow);background:var(--panel-strong)}

/* ===================== DRAFT HUB ===================== */
.draft-empty-shell,.draft-hub{border:1px solid var(--border);border-radius:18px;background:rgba(10,18,32,.72);padding:22px}.draft-empty-shell{max-width:900px}.draft-empty-shell h2,.draft-hub h2{font-size:25px;margin:5px 0 7px}.draft-empty-shell p,.draft-hub-header p,.draft-my-summary p,.draft-trade-create p{color:var(--text-muted);line-height:1.55}.eyebrow{font-family:'Space Mono',monospace;font-size:11px;letter-spacing:1.4px;text-transform:uppercase;color:var(--accent2)}
.draft-setup-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:22px 0}.draft-order-preview{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}.draft-order-preview>strong{width:100%;margin-bottom:4px}.draft-order-preview span{display:flex;align-items:center;gap:8px;padding:8px 11px;border:1px solid var(--border);border-radius:10px;background:var(--panel)}.draft-order-preview b{color:var(--accent2)}.draft-help{font-size:12px}
.draft-hub-header,.draft-my-summary{display:flex;align-items:center;justify-content:space-between;gap:18px}.draft-status-actions{display:flex;align-items:center;gap:9px}.draft-subnav{display:flex;gap:5px;margin:20px -22px 18px;padding:0 22px;border-bottom:1px solid var(--border)}.draft-subnav button{border:0;background:none;color:var(--text-muted);font-weight:700;padding:12px 15px;border-bottom:2px solid transparent;cursor:pointer}.draft-subnav button.active{color:var(--accent);border-color:var(--accent)}.draft-subnav span{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:5px;border-radius:99px;background:rgba(56,189,248,.15);font-size:11px}.draft-hub-view{display:none}.draft-hub-view.active{display:block}
.draft-live-grid{display:grid;grid-template-columns:260px minmax(380px,1fr) 285px;gap:14px;align-items:start}.draft-clock{padding:16px;border:1px solid rgba(250,204,21,.3);border-radius:13px;background:linear-gradient(135deg,rgba(250,204,21,.12),rgba(56,189,248,.06));margin-bottom:10px}.draft-clock span,.draft-clock small{display:block;color:var(--text-muted);font-size:11px}.draft-clock strong{display:block;color:var(--accent);font-size:18px;margin:4px 0}.draft-rosters{display:grid;gap:8px}.draft-roster{padding:10px;border:1px solid var(--border);border-radius:12px;background:rgba(15,23,38,.6)}.draft-roster.current{border-color:rgba(250,204,21,.35)}.draft-roster-head{display:flex;justify-content:space-between;gap:8px}.draft-roster-head strong,.draft-roster-head span{display:block}.draft-roster-head span{color:var(--text-muted);font-size:11px;margin-top:2px}.draft-roster-head>b{font-family:'Space Mono',monospace;font-size:11px;color:var(--accent2)}.draft-roster-mons{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-top:9px}.draft-roster-mons div{min-width:0;text-align:center}.draft-roster-mons img{width:46px;height:46px;object-fit:contain}.draft-roster-mons span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:var(--text-muted)}.draft-roster-mons small{grid-column:1/-1;color:var(--text-muted)}
.draft-pool-toolbar{display:grid;grid-template-columns:1fr 145px auto;gap:8px;align-items:center;margin-bottom:10px}.draft-pool-toolbar>span{font-size:11px;color:var(--text-muted)}.draft-pokemon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(185px,1fr));gap:8px;max-height:650px;overflow:auto;padding-right:4px}.draft-mon-card{display:flex;align-items:center;gap:8px;padding:9px;border:1px solid var(--border);border-radius:12px;background:rgba(15,23,38,.68)}.draft-mon-card img{width:54px;height:54px;object-fit:contain}.draft-mon-card>div{min-width:0;flex:1}.draft-mon-card strong,.draft-mon-card span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draft-mon-card span{font-size:10px;color:var(--text-muted);margin-top:3px}.draft-history{padding:9px}.draft-history>div:not(.empty-state){display:flex;align-items:center;gap:7px;padding:7px;border-bottom:1px solid rgba(51,68,95,.5)}.draft-history img{width:36px;height:36px;object-fit:contain}.draft-history>div>b{font-size:10px;color:var(--accent2)}.draft-history span{min-width:0}.draft-history strong,.draft-history small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draft-history small{font-size:10px;color:var(--text-muted);margin-top:2px}
.draft-my-summary{padding:10px 2px 20px}.draft-my-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.draft-my-summary+.draft-roster{max-width:700px}.draft-my-summary+.draft-roster .draft-roster-mons{grid-template-columns:repeat(3,minmax(90px,1fr))}.draft-my-summary+.draft-roster .draft-roster-mons img{width:92px;height:92px}.draft-my-summary+.draft-roster .draft-roster-mons span{font-size:12px}
.draft-trade-create{display:grid;grid-template-columns:minmax(220px,.7fr) 1.3fr;gap:24px;padding:18px;border:1px solid var(--border);border-radius:14px;background:rgba(15,23,38,.64);margin-bottom:14px}.draft-trade-form{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.draft-trade-form label>span{display:block;color:var(--text-muted);font-size:11px;margin-bottom:5px}.draft-trade-form .wide{grid-column:1/-1}.draft-trade-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:10px}.draft-trade-card{padding:14px;border:1px solid var(--border);border-radius:14px;background:rgba(15,23,38,.62)}.draft-trade-status,.draft-trade-actions{display:flex;justify-content:space-between;align-items:center;gap:7px}.draft-trade-status small{color:var(--text-muted)}.draft-trade-swap{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;margin:14px 0}.draft-trade-swap>div{padding:10px;border-radius:10px;background:rgba(10,18,32,.7)}.draft-trade-swap small,.draft-trade-swap strong{display:block}.draft-trade-swap small{font-size:10px;color:var(--text-muted);margin-bottom:3px}.draft-trade-swap>b{color:var(--accent2)}.draft-trade-card>p{color:var(--text-dim);font-size:12px}
@media(max-width:1150px){.draft-live-grid{grid-template-columns:230px 1fr}.draft-live-grid>aside:last-child{grid-column:1/-1}.draft-history{display:grid;grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.draft-empty-shell,.draft-hub{padding:15px}.draft-subnav{margin:16px -15px;padding:0 15px;overflow:auto}.draft-live-grid,.draft-trade-create{grid-template-columns:1fr}.draft-pool-toolbar,.draft-trade-form{grid-template-columns:1fr}.draft-trade-form .wide{grid-column:auto}.draft-setup-grid{grid-template-columns:1fr}.draft-hub-header,.draft-my-summary{align-items:flex-start;flex-direction:column}.draft-history{grid-template-columns:1fr}.draft-pokemon-grid{max-height:none}}

/* ===================== LIVE DRAFT EXPANDED ===================== */
.draft-hub-expanded{padding:20px;min-height:calc(100vh - 210px)}
.draft-hub-expanded .draft-subnav{margin:18px -20px 18px;padding:0 20px}
.draft-turn-banner{display:grid;grid-template-columns:auto minmax(240px,1fr) auto;align-items:center;gap:18px;padding:13px 16px;margin-bottom:14px;border:1px solid var(--border);border-radius:14px;background:linear-gradient(100deg,rgba(56,189,248,.08),rgba(15,23,38,.58))}
.draft-turn-banner.mine{border-color:rgba(250,204,21,.55);background:linear-gradient(100deg,rgba(250,204,21,.15),rgba(56,189,248,.07));box-shadow:0 0 24px rgba(250,204,21,.06)}
.draft-turn-banner>div span,.draft-turn-banner>div strong{display:block}.draft-turn-banner>div span{font-size:10px;text-transform:uppercase;letter-spacing:1.1px;color:var(--text-muted)}.draft-turn-banner>div strong{font-size:18px;color:var(--accent);margin-top:3px}.draft-turn-banner p{margin:0;color:var(--text-dim);font-size:13px}.draft-turn-banner>b{font-family:'Space Mono',monospace;font-size:11px;color:var(--accent2);white-space:nowrap}
.draft-hub-expanded .draft-live-grid{grid-template-columns:minmax(210px,235px) minmax(560px,1fr) minmax(235px,270px);gap:12px}
.draft-team-rail,.draft-hub-expanded .draft-panel{position:sticky;top:12px}.draft-pool-main{min-width:0}
.draft-hub-expanded .draft-roster{padding:9px}.draft-hub-expanded .draft-roster-mons img{width:40px;height:40px}.draft-hub-expanded .draft-roster-mons span{font-size:8px}
.draft-hub-expanded .draft-pool-toolbar{position:sticky;top:0;z-index:4;grid-template-columns:minmax(220px,1fr) 150px auto;padding:2px 0 10px;background:linear-gradient(var(--bg) 70%,transparent)}.draft-pool-toolbar>span strong{font-size:13px;color:var(--text)}
.draft-hub-expanded .draft-pokemon-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;max-height:calc(100vh - 360px);min-height:420px;padding:2px 8px 8px 2px;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
.draft-hub-expanded .draft-mon-card{position:relative;min-height:92px;padding:10px 11px;gap:10px;border-radius:14px;background:linear-gradient(145deg,rgba(18,30,50,.94),rgba(10,18,32,.9));transition:border-color .16s ease,transform .16s ease,background .16s ease}
.draft-hub-expanded .draft-mon-card.pickable:hover{transform:translateY(-2px);border-color:rgba(250,204,21,.5);background:linear-gradient(145deg,rgba(25,39,62,.98),rgba(13,23,40,.94))}
.draft-mon-sprite{display:grid;place-items:center;flex:0 0 68px;width:68px;height:68px;border-radius:12px;background:radial-gradient(circle,rgba(56,189,248,.12),transparent 68%)}.draft-hub-expanded .draft-mon-sprite img{width:66px;height:66px;object-fit:contain}.draft-mon-info{min-width:0;flex:1}.draft-mon-info>strong{font-size:14px}.draft-mon-info>span{font-size:10px;color:var(--text-muted);margin-top:5px}.draft-mon-types{display:flex;gap:4px;flex-wrap:wrap;margin-top:6px}.draft-type{display:inline-flex!important;width:max-content;padding:2px 6px;border-radius:99px;background:rgba(148,163,184,.13);color:var(--text-dim)!important;font-size:9px!important;line-height:1.3;text-transform:capitalize}.type-fire{background:rgba(249,115,22,.18);color:#fb923c!important}.type-water{background:rgba(56,189,248,.18);color:#7dd3fc!important}.type-grass{background:rgba(34,197,94,.18);color:#86efac!important}.type-electric{background:rgba(250,204,21,.18);color:#fde047!important}.type-psychic,.type-fairy{background:rgba(244,114,182,.18);color:#f9a8d4!important}.type-poison,.type-ghost{background:rgba(168,85,247,.18);color:#c4b5fd!important}.type-ground,.type-rock{background:rgba(180,83,9,.2);color:#fdba74!important}.type-ice{background:rgba(34,211,238,.16);color:#a5f3fc!important}.type-fighting{background:rgba(239,68,68,.17);color:#fca5a5!important}.type-bug{background:rgba(132,204,22,.16);color:#bef264!important}.type-dragon{background:rgba(99,102,241,.2);color:#a5b4fc!important}.type-dark{background:rgba(71,85,105,.35);color:#cbd5e1!important}.type-steel{background:rgba(148,163,184,.2);color:#e2e8f0!important}.type-flying,.type-normal{background:rgba(125,211,252,.1);color:#bae6fd!important}
.draft-hub-expanded .draft-mon-card>.btn{flex:0 0 auto;padding:7px 9px}.draft-grid-empty{grid-column:1/-1;min-height:180px;display:grid;place-items:center}
.draft-hub-expanded .draft-history{max-height:calc(100vh - 390px);overflow:auto}.draft-hub-expanded .draft-history>div:not(.empty-state){padding:8px 5px}
@media(min-width:1650px){.draft-hub-expanded .draft-pokemon-grid{grid-template-columns:repeat(3,minmax(220px,1fr))}}
@media(max-width:1450px){.draft-hub-expanded .draft-live-grid{grid-template-columns:220px minmax(0,1fr)}.draft-hub-expanded .draft-live-grid>aside:last-child{grid-column:1/-1;position:static}.draft-hub-expanded .draft-history{display:grid;grid-template-columns:repeat(3,1fr);max-height:none}}
@media(max-width:820px){.draft-hub-expanded{padding:14px}.draft-hub-expanded .draft-subnav{margin:16px -14px;padding:0 14px}.draft-turn-banner{grid-template-columns:1fr;gap:6px}.draft-hub-expanded .draft-live-grid{grid-template-columns:1fr}.draft-team-rail{position:static}.draft-hub-expanded .draft-pool-toolbar{position:static;grid-template-columns:1fr}.draft-hub-expanded .draft-pokemon-grid{grid-template-columns:1fr;max-height:none;min-height:0}.draft-hub-expanded .draft-history{grid-template-columns:1fr}.draft-hub-expanded .draft-mon-card{min-height:86px}}

/* Desktop draft readability pass. */
@media(min-width:1500px){
  .app-shell{grid-template-columns:240px minmax(0,1fr);gap:20px}
  .draft-hub-expanded{padding:24px}
  .draft-hub-expanded .draft-subnav{margin:20px -24px 22px;padding:0 24px}
  .draft-hub-expanded .draft-live-grid{grid-template-columns:minmax(250px,280px) minmax(0,1fr) minmax(250px,280px);gap:18px}
  .draft-hub-expanded .draft-pool-toolbar{grid-template-columns:minmax(320px,1fr) 180px auto;gap:12px;margin-bottom:14px}
  .draft-hub-expanded .draft-pokemon-grid{grid-template-columns:repeat(3,minmax(220px,1fr));gap:13px;max-height:calc(100vh - 365px)}
  .draft-hub-expanded .draft-mon-card{min-height:108px;padding:12px 13px;gap:12px}
  .draft-hub-expanded .draft-mon-sprite{flex-basis:78px;width:78px;height:78px}
  .draft-hub-expanded .draft-mon-sprite img{width:76px;height:76px}
  .draft-mon-info>strong{font-size:16px}
  .draft-type{padding:3px 8px;font-size:10px!important}
  .draft-hub-expanded .draft-roster{padding:12px}
  .draft-hub-expanded .draft-roster-mons{gap:7px}
  .draft-hub-expanded .draft-roster-mons img{width:48px;height:48px}
  .draft-hub-expanded .draft-roster-mons span{font-size:10px}
}
@media(min-width:1500px){
  .draft-hub-expanded .draft-live-grid{grid-template-columns:minmax(280px,300px) minmax(680px,1fr) minmax(280px,300px);gap:24px}
  .draft-hub-expanded .draft-pokemon-grid{grid-template-columns:repeat(2,minmax(300px,1fr));gap:14px 16px}
  .draft-hub-expanded .draft-mon-card{min-height:150px;align-items:center}
  .draft-hub-expanded .draft-mon-sprite{flex-basis:96px;width:96px;height:96px}
  .draft-hub-expanded .draft-mon-sprite img{width:92px;height:92px}
  .draft-mon-info>strong{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.15}
  .draft-mon-meta{gap:7px}
  .draft-meta-pill{min-width:58px;justify-content:center;white-space:nowrap;overflow:visible;text-overflow:clip}
  .draft-hub-expanded .draft-history{max-height:calc(100vh - 390px);overflow:auto}
}

.draft-mon-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.draft-meta-pill{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border-radius:8px;background:rgba(148,163,184,.1);border:1px solid rgba(148,163,184,.14);color:var(--text-dim);font-family:'Space Mono',monospace;font-size:10px;font-weight:700;line-height:1}
.draft-cost-pill{background:rgba(250,204,21,.12);border-color:rgba(250,204,21,.22);color:var(--accent)}

.draft-hub-header{
  position:relative;
  padding:2px 0 18px;
  border-bottom:1px solid rgba(51,68,95,.75);
}
.draft-hub-header h2{
  line-height:1.15;
}
.draft-hub-header p{
  margin-top:7px;
  color:var(--text-dim);
  font-size:15px;
}
.draft-status-actions{
  align-self:flex-start;
  padding-top:8px;
}
.draft-mon-meta{
  align-items:center;
}
.draft-meta-pill{
  display:inline-grid;
  place-items:center;
  min-width:76px;
  min-height:32px;
  padding:4px 11px;
  border-radius:10px;
  background:rgba(47,61,83,.72);
  border-color:rgba(148,163,184,.22);
  color:#dbe7f8;
  font-size:12px;
  font-weight:800;
  text-align:center;
  box-shadow:inset 0 -10px 18px rgba(0,0,0,.14);
}
.draft-cost-pill{
  background:rgba(250,204,21,.18);
  border-color:rgba(250,204,21,.36);
  color:#fde047;
}

/* ===================== POOL RANKING EDITOR ===================== */
.ranking-editor{margin:0 0 14px;padding:14px;border:1px solid rgba(56,189,248,.28);border-radius:14px;background:linear-gradient(135deg,rgba(56,189,248,.08),rgba(15,23,38,.72))}.ranking-editor[hidden]{display:none}.ranking-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.ranking-editor-head>div:first-child strong,.ranking-editor-head>div:first-child span{display:block}.ranking-editor-head>div:first-child span{margin-top:3px;font-size:11px;color:var(--text-muted)}.ranking-editor-files{display:flex;gap:7px}.ranking-bulk-bar{display:grid;grid-template-columns:auto auto minmax(90px,120px) minmax(100px,130px) minmax(110px,140px) auto auto;gap:8px;align-items:end}.ranking-bulk-bar label>span{display:block;margin-bottom:4px;font-size:10px;color:var(--text-muted)}
.ranking-pokemon-card{position:relative}.ranking-select-wrap{display:none;position:absolute;z-index:2;top:8px;left:8px;align-items:center;gap:5px;padding:4px 7px;border:1px solid var(--border);border-radius:8px;background:rgba(7,13,24,.94);font-size:9px;color:var(--text-muted);cursor:pointer}.ranking-mode .ranking-select-wrap{display:flex}.ranking-pokemon-card.selected{border-color:rgba(56,189,248,.7);box-shadow:0 0 0 1px rgba(56,189,248,.18)}.ranking-mode .ranking-pokemon-card-inner{padding-top:24px}.ranking-inline-editor{display:none;grid-template-columns:70px 78px 1fr;gap:6px;padding:8px;border-top:1px solid var(--border)}.ranking-mode .ranking-inline-editor{display:grid}.ranking-inline-editor .form-select,.ranking-inline-editor .form-input{min-width:0;padding:6px 8px;height:32px}.ranking-mode .ranking-pokemon-card .ev-section{display:none}
@media(min-width:1400px){.pool-ranking-grid{grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:14px}}
.ranking-pokemon-card{border-radius:15px}
.ranking-pokemon-card-inner{min-height:145px}
.ranking-pokemon-card .pokemon-sprite-col{width:126px;min-width:126px}
.ranking-pokemon-card .pokemon-sprite-col img{width:108px;height:108px}
.ranking-pokemon-card .pokemon-info-col{display:grid;align-content:start;gap:9px;padding:14px 15px}
.ranking-pokemon-card .pokemon-name{font-size:17px;line-height:1.1}
.pool-type-row{margin-top:0}
.pool-ranking-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pool-tier-badge,.pool-cost-badge{display:grid;gap:2px;min-height:50px;padding:8px 10px;border:1px solid rgba(148,163,184,.14);border-radius:10px;background:rgba(15,23,38,.72);font-family:'Space Mono',monospace;font-size:20px;font-weight:800;line-height:1;color:var(--text)}
.pool-tier-badge small,.pool-cost-badge small{font-family:'Rajdhani',sans-serif;font-size:10px;letter-spacing:.8px;text-transform:uppercase;color:var(--text-muted)}
.pool-cost-badge{border-color:rgba(250,204,21,.22);background:rgba(250,204,21,.1);color:var(--accent)}
.pool-tags{display:flex;flex-wrap:wrap;gap:5px;max-height:54px;overflow:hidden}
.pool-tags .move-item{font-size:10px}
@media(max-width:1150px){.ranking-bulk-bar{grid-template-columns:repeat(4,minmax(120px,1fr))}.ranking-editor-files{flex-wrap:wrap}}
@media(max-width:700px){.ranking-editor-head{align-items:flex-start;flex-direction:column}.ranking-bulk-bar{grid-template-columns:1fr 1fr}.ranking-editor-files{width:100%}.ranking-editor-files .btn{flex:1}.ranking-inline-editor{grid-template-columns:1fr 1fr}.ranking-inline-editor .btn{grid-column:1/-1}}

/* ===================== POKEMON STYLE PASS ===================== */
.brand-logo{
  display:flex;align-items:center;gap:9px;
}
.brand-logo > span:last-child{
  display:inline-flex;align-items:baseline;gap:2px;
  color:var(--accent);
}
.brand-logo > span:last-child span{color:var(--accent2)}
.pokeball-icon{
  width:26px;height:26px;border-radius:50%;display:inline-block;position:relative;flex:0 0 auto;
  background:
    radial-gradient(circle at 32% 23%,rgba(255,255,255,.9) 0 8%,transparent 9%),
    linear-gradient(180deg,#ef4444 0 45%,#111827 45% 55%,#f8fafc 55% 100%);
  border:2px solid #0a0f1c;
  box-shadow:0 0 0 1px rgba(250,204,21,.34),inset 0 -5px 8px rgba(0,0,0,.22),0 8px 18px rgba(0,0,0,.28);
}
.pokeball-icon::before{
  content:'';position:absolute;left:50%;top:50%;width:9px;height:9px;border-radius:50%;
  transform:translate(-50%,-50%);background:#f8fafc;border:2px solid #111827;
  box-shadow:inset 0 0 0 2px #cbd5e1;
}
.pokeball-icon::after{
  content:'';position:absolute;left:3px;right:3px;top:50%;height:2px;
  transform:translateY(-50%);background:#111827;z-index:0;
}
.topbar::after{
  content:'';position:absolute;left:0;right:0;bottom:-1px;height:1px;
  background:linear-gradient(90deg,transparent,rgba(250,204,21,.65),rgba(56,189,248,.55),transparent);
  pointer-events:none;
}
.profile-card,.pokemon-card,.tournament-setup,.matchup-side,.draft-panel,.login-card,.profile-gate-card{
  position:relative;
}
.profile-card::before,.pokemon-card::before,.tournament-setup::before,.draft-panel::before{
  content:'';position:absolute;left:0;right:0;top:0;height:2px;
  background:linear-gradient(90deg,rgba(250,204,21,.8),rgba(56,189,248,.72),rgba(167,139,250,.45));
  opacity:.65;pointer-events:none;
}
.profile-card:hover::before,.pokemon-card:hover::before{
  opacity:1;
}
.pokemon-card-icon{
  position:relative;overflow:hidden;border-radius:50%;
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.82) 0 8%,transparent 9%),
    linear-gradient(180deg,#ef4444 0 45%,#111827 45% 55%,#f8fafc 55% 100%);
  border:1px solid rgba(250,204,21,.32);
  box-shadow:inset 0 -10px 20px rgba(7,11,20,.28),0 10px 20px rgba(0,0,0,.22);
}
.pokemon-card-icon::before{
  content:'';width:12px;height:12px;border-radius:50%;background:#f8fafc;border:3px solid #111827;
  box-shadow:inset 0 0 0 2px #cbd5e1;
}
.league-icon{
  border-radius:12px;
  background:linear-gradient(145deg,rgba(250,204,21,.95),rgba(251,146,60,.78));
  border:1px solid rgba(250,204,21,.36);
  box-shadow:inset 0 -10px 20px rgba(7,11,20,.18),0 10px 20px rgba(0,0,0,.22);
}
.league-icon::before{
  content:'';width:18px;height:18px;border-radius:4px 4px 10px 10px;
  background:linear-gradient(180deg,#fef3c7,#facc15);
  border:2px solid rgba(7,11,20,.9);
  clip-path:polygon(15% 0,85% 0,78% 56%,60% 56%,60% 100%,40% 100%,40% 56%,22% 56%);
}
.master-ball-icon::after{
  content:'M';position:absolute;left:50%;top:20%;transform:translateX(-50%);
  font-family:'Space Mono',monospace;font-size:8px;font-weight:700;line-height:1;color:#fdf2f8;
  text-shadow:0 1px 1px rgba(0,0,0,.8);
}
.team-icon{
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.72) 0 8%,transparent 9%),
    linear-gradient(180deg,#38bdf8 0 45%,#111827 45% 55%,#f8fafc 55% 100%);
}
.poke-ball-icon{
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.82) 0 8%,transparent 9%),
    linear-gradient(180deg,#ef4444 0 45%,#111827 45% 55%,#f8fafc 55% 100%);
}
.great-ball-icon{
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.72) 0 8%,transparent 9%),
    linear-gradient(135deg,transparent 0 22%,#ef4444 23% 33%,transparent 34% 100%),
    linear-gradient(225deg,transparent 0 22%,#ef4444 23% 33%,transparent 34% 100%),
    linear-gradient(180deg,#2563eb 0 45%,#111827 45% 55%,#f8fafc 55% 100%);
}
.ultra-ball-icon{
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.52) 0 8%,transparent 9%),
    linear-gradient(90deg,transparent 0 25%,#facc15 25% 36%,transparent 36% 64%,#facc15 64% 75%,transparent 75% 100%),
    linear-gradient(180deg,#111827 0 45%,#020617 45% 55%,#f8fafc 55% 100%);
}
.premier-ball-icon{
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.9) 0 8%,transparent 9%),
    linear-gradient(180deg,#f8fafc 0 45%,#991b1b 45% 55%,#f8fafc 55% 100%);
}
.luxury-ball-icon{
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.45) 0 8%,transparent 9%),
    linear-gradient(135deg,transparent 0 24%,#facc15 25% 33%,transparent 34% 100%),
    linear-gradient(225deg,transparent 0 24%,#facc15 25% 33%,transparent 34% 100%),
    linear-gradient(180deg,#020617 0 45%,#facc15 45% 55%,#111827 55% 100%);
}
.dive-ball-icon{
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.8) 0 8%,transparent 9%),
    linear-gradient(135deg,transparent 0 28%,#f8fafc 29% 38%,transparent 39% 100%),
    linear-gradient(225deg,transparent 0 28%,#f8fafc 29% 38%,transparent 39% 100%),
    linear-gradient(180deg,#0ea5e9 0 45%,#075985 45% 55%,#bae6fd 55% 100%);
}
.heal-ball-icon{
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.85) 0 8%,transparent 9%),
    linear-gradient(90deg,transparent 0 27%,#f8fafc 27% 36%,transparent 36% 64%,#f8fafc 64% 73%,transparent 73% 100%),
    linear-gradient(180deg,#f9a8d4 0 45%,#be185d 45% 55%,#fce7f3 55% 100%);
}
.dusk-ball-icon{
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.42) 0 8%,transparent 9%),
    radial-gradient(circle at 50% 27%,#84cc16 0 13%,transparent 14%),
    linear-gradient(180deg,#14532d 0 45%,#020617 45% 55%,#1f2937 55% 100%);
}
.own-team-icon{
  background:
    radial-gradient(circle at 32% 22%,rgba(255,255,255,.72) 0 8%,transparent 9%),
    linear-gradient(180deg,rgba(74,222,128,.86) 0 45%,#111827 45% 55%,#f8fafc 55% 100%);
}
.public-team-card .profile-card-header,.personal-team-card .profile-card-header,.tournament-card .profile-card-header{
  background:
    linear-gradient(90deg,rgba(56,189,248,.06),transparent 55%),
    rgba(10,18,32,.34);
}
.tournament-card .profile-name::before{
  content:'League';display:block;margin-bottom:2px;font-family:'Rajdhani',sans-serif;
  font-size:10px;line-height:1;text-transform:uppercase;letter-spacing:1px;color:var(--accent);
}
.public-team-card .profile-name::before,.personal-team-card .profile-name::before{
  content:'Team Sheet';display:block;margin-bottom:2px;font-family:'Rajdhani',sans-serif;
  font-size:10px;line-height:1;text-transform:uppercase;letter-spacing:1px;color:var(--accent2);
}
.personal-team-card .profile-name::before{color:var(--green)}
.team-list-ball{flex:0 0 auto}
.team-ball-select{padding-left:34px}
.section-header{
  position:relative;
}
.section-header .section-title{
  display:inline-flex;align-items:center;gap:8px;
}
.section-header .section-title::before{
  content:'';width:10px;height:10px;border-radius:50%;display:inline-block;
  background:linear-gradient(180deg,var(--accent) 0 46%,#111827 46% 55%,var(--accent2) 55% 100%);
  box-shadow:0 0 0 1px rgba(250,204,21,.25);
}
.modal-title{
  display:flex;align-items:center;gap:8px;
}
.modal-title::before{
  content:'';width:12px;height:12px;border-radius:50%;display:inline-block;
  background:linear-gradient(180deg,#ef4444 0 45%,#111827 45% 55%,#f8fafc 55% 100%);
  box-shadow:0 0 0 1px rgba(250,204,21,.22);
}
.empty-state{
  position:relative;overflow:hidden;
}
.empty-state:not(:has(.empty-icon))::before{
  content:'';display:block;width:34px;height:34px;border-radius:50%;margin:0 auto 10px;
  background:
    radial-gradient(circle at 50% 50%,#f8fafc 0 16%,#111827 17% 29%,transparent 30%),
    linear-gradient(180deg,rgba(248,113,113,.85) 0 46%,#111827 46% 55%,rgba(248,250,252,.9) 55% 100%);
  border:2px solid rgba(7,11,20,.9);
  box-shadow:0 10px 24px rgba(0,0,0,.28);
}
.empty-state::after,.login-card::after,.profile-gate-card::after{
  content:'';position:absolute;right:-44px;bottom:-44px;width:140px;height:140px;border-radius:50%;
  border:24px solid rgba(56,189,248,.035);box-shadow:inset 0 0 0 2px rgba(250,204,21,.035);
  pointer-events:none;
}
.login-card::before,.profile-gate-card::before{
  content:'';position:absolute;left:0;right:0;top:0;height:3px;
  background:linear-gradient(90deg,#ef4444,var(--accent),var(--accent2));
  pointer-events:none;
}
.login-card > *,.profile-gate-card > *{position:relative;z-index:1}
.profile-gate-kicker{
  display:inline-flex;align-items:center;gap:7px;
}
.profile-gate-kicker::before{
  content:'';width:14px;height:14px;border-radius:50%;display:inline-block;
  background:linear-gradient(180deg,#ef4444 0 45%,#111827 45% 55%,#f8fafc 55% 100%);
  box-shadow:0 0 0 1px rgba(250,204,21,.25);
}
.app-sidebar .modal-tab::before{
  content:'';width:8px;height:8px;border-radius:50%;display:inline-block;flex:0 0 auto;
  background:rgba(111,127,149,.65);box-shadow:0 0 0 1px rgba(255,255,255,.04);
}
.app-sidebar .modal-tab.active::before{
  background:linear-gradient(180deg,var(--accent),var(--accent2));
  box-shadow:0 0 12px rgba(250,204,21,.25);
}
.type-chip{
  border:1px solid rgba(255,255,255,.1);
  box-shadow:inset 0 -6px 12px rgba(0,0,0,.12);
}
.pokemon-sprite-col{
  position:relative;overflow:hidden;
}
.pokemon-sprite-col::before{
  content:'';position:absolute;inset:12px;border-radius:50%;
  background:radial-gradient(circle,rgba(56,189,248,.13),transparent 60%);
  border:1px solid rgba(56,189,248,.08);
}
.pokemon-sprite-col img{position:relative;z-index:1}
.winner-banner{
  position:relative;overflow:hidden;
}
.winner-banner::before{
  content:'';position:absolute;left:50%;top:50%;width:160px;height:160px;border-radius:50%;
  transform:translate(-50%,-50%);border:28px solid rgba(250,204,21,.05);pointer-events:none;
}

.profile-gate{
  display:none;position:fixed;inset:0;z-index:500;align-items:center;justify-content:center;
  padding:18px;background:rgba(3,7,14,.82);backdrop-filter:blur(14px);
}
.login-gate{
  display:none;position:fixed;inset:0;z-index:520;align-items:center;justify-content:center;
  padding:18px;background:
    radial-gradient(circle at 30% 0%, rgba(56,189,248,.16), transparent 34%),
    rgba(3,7,14,.9);
  backdrop-filter:blur(14px);
}
.login-gate.open{display:flex}
.login-card{
  width:min(430px,100%);border:1px solid var(--border2);border-radius:var(--radius-lg);
  background:linear-gradient(180deg,rgba(16,28,48,.98),rgba(8,13,24,.98));
  box-shadow:var(--shadow);padding:22px;
}
.login-card h1{
  font-family:'Space Mono',monospace;font-size:24px;margin:5px 0;color:var(--text);
}
.login-card p{font-size:14px;color:var(--text-muted);line-height:1.45;margin-bottom:16px}
.profile-gate.open{display:flex}
.profile-gate-card{
  width:min(880px,100%);max-height:min(760px,92vh);overflow:auto;
  border:1px solid var(--border2);border-radius:var(--radius-lg);
  background:linear-gradient(180deg,rgba(16,28,48,.98),rgba(8,13,24,.98));
  box-shadow:var(--shadow);padding:18px;
}
.profile-gate-header{
  display:flex;align-items:flex-start;justify-content:space-between;gap:14px;
  padding-bottom:14px;border-bottom:1px solid var(--border);margin-bottom:14px;
}
.profile-gate-kicker{
  font-family:'Space Mono',monospace;font-size:10px;text-transform:uppercase;letter-spacing:1.5px;
  color:var(--accent);
}
.profile-gate h2{
  font-family:'Space Mono',monospace;font-size:22px;line-height:1.25;margin:4px 0;color:var(--text);
}
.profile-gate p{font-size:14px;color:var(--text-muted);line-height:1.45;max-width:620px}
.profile-alert{
  border:1px solid rgba(248,113,113,.28);background:rgba(248,113,113,.09);color:var(--red);
  border-radius:var(--radius);padding:10px 12px;margin-bottom:12px;font-size:13px;
}
.profile-list{display:grid;gap:10px;margin-bottom:14px}
.profile-option{
  display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:center;
  padding:12px;border:1px solid var(--border);border-radius:var(--radius-lg);
  background:rgba(13,22,38,.78);
}
.profile-option.active{border-color:rgba(250,204,21,.42);background:rgba(250,204,21,.08)}
.profile-option-avatar{
  width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;
  background:rgba(56,189,248,.14);color:var(--accent2);font-family:'Space Mono',monospace;font-weight:700;
}
.profile-option-name{font-family:'Space Mono',monospace;font-size:14px;font-weight:700;color:var(--text)}
.profile-option-meta{font-size:12px;color:var(--text-muted);margin-top:3px}
.profile-option-warning{font-size:12px;color:var(--orange);margin-top:4px}
.profile-option-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.profile-create-panel{
  padding:14px;border:1px solid var(--border);border-radius:var(--radius-lg);
  background:rgba(7,11,20,.42);
}
.profile-create-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.profile-note{margin-top:9px;font-size:12px;color:var(--text-muted);line-height:1.45}
.btn:disabled,.form-input:disabled,.form-select:disabled{
  opacity:.55;cursor:not-allowed;transform:none;box-shadow:none;
}

:focus-visible{
  outline:2px solid var(--accent2);
  outline-offset:2px;
}

@media(max-width:700px){
  .matchup-container{grid-template-columns:1fr}
  .pokemon-grid{grid-template-columns:1fr}
  header{padding:0 10px}
  main{padding:10px}
}

@media(max-width:1050px){
  .app-shell,.draft-board,.pool-layout,.sheet-layout{grid-template-columns:1fr}
  .app-sidebar,.pool-sidebar{position:static}
  .app-sidebar{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}
  .app-sidebar-title{grid-column:1/-1}
  .tournament-page-title{grid-template-columns:1fr}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:700px){
  header{height:auto;min-height:var(--topbar);gap:10px;flex-wrap:wrap;padding:10px}
  #tournament-context-bar{order:3;flex:1 0 100%!important;width:100%;min-width:0;margin:0!important;overflow-x:auto;padding-bottom:2px}
  #tournament-context-bar .context-pill{max-width:calc(100vw - 150px)}
  .header-actions{margin-left:auto}
  .header-actions .btn{padding-inline:9px}
  .dashboard-hero{grid-template-columns:1fr}
  .dashboard-actions{justify-content:flex-start}
  .toolbar .form-input{max-width:none}
  .pool-grid,.profiles-grid{grid-template-columns:1fr}
  .stats-grid{grid-template-columns:1fr}
  .sheet-actions{justify-content:flex-start}
  .profile-gate{align-items:flex-start;padding:10px}
  .profile-gate-card{max-height:calc(100vh - 20px);padding:14px}
  .profile-gate-header,.profile-option{grid-template-columns:1fr}
  .profile-gate-header{display:grid}
  .profile-option{display:grid}
  .profile-option-actions,.profile-create-row{grid-template-columns:1fr;justify-content:stretch}
  .profile-option-actions .btn,.profile-create-row .btn{width:100%}
}
/* Sprite fallback helpers */
.sprite-missing{opacity:.78;image-rendering:auto!important;filter:none!important}
.app-version{margin-top:auto}
.team-row{grid-template-columns:42px minmax(125px,.8fr) minmax(196px,1fr) auto auto auto}
.team-sprite-rail{display:flex;align-items:center;gap:5px;min-width:0}
.team-sprite-slot{width:32px;height:34px;flex:0 0 32px;display:grid;place-items:center;overflow:hidden;clip-path:polygon(24% 3%,76% 3%,100% 50%,76% 97%,24% 97%,0 50%);background:#1b2a40;border:1px solid rgba(105,128,159,.3)}
.team-sprite-slot img{width:31px;height:31px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 2px 3px rgba(0,0,0,.45))}
.team-sprite-slot.empty{background:rgba(20,31,48,.52);opacity:.45}
.compact-team-card{grid-template-columns:38px minmax(110px,1fr) auto auto}
.compact-team-card .team-sprite-rail{gap:3px}
.compact-team-card .team-sprite-slot{width:27px;height:29px;flex-basis:27px}
.compact-team-card .team-sprite-slot img{width:27px;height:27px}
@media(max-width:980px){.team-row{grid-template-columns:38px minmax(120px,1fr) auto auto}.team-row .team-sprite-rail{grid-column:2/3}.team-row>.badge{display:none}.compact-team-card{grid-template-columns:38px minmax(110px,1fr) auto}.compact-team-card>.badge{display:none}}
@media(max-width:620px){.team-row .team-sprite-rail,.compact-team-card .team-sprite-rail{display:none}.team-row{grid-template-columns:36px minmax(0,1fr) auto}.compact-team-card{grid-template-columns:38px minmax(0,1fr) auto}.compact-team-card>.badge{display:inline-flex}}
:root{
  --move-normal:#94a3b8; --move-fire:#fb923c; --move-water:#38bdf8; --move-electric:#facc15;
  --move-grass:#4ade80; --move-ice:#98d8d8; --move-fighting:#f87171; --move-poison:#a78bfa;
  --move-ground:#e0c068; --move-flying:#a890f0; --move-psychic:#f472b6; --move-bug:#a8b820;
  --move-rock:#b8a038; --move-ghost:#705898; --move-dragon:#7038f8; --move-dark:#705848;
  --move-steel:#b8b8d0; --move-fairy:#ee99ac;
}

/* ===================== DRAFTHUB SHELL & DASHBOARD ===================== */
:root{
  --bg:#080d16;--bg-soft:#0b121e;--surface:#101827;--surface-elevated:#151f30;
  --surface-glass:rgba(16,24,39,.88);--border:#263449;--border2:#35465f;
  --text:#f1f5f9;--text-muted:#7f8ea5;--text-dim:#b3bfd0;
  --primary:#ff765f;--primary-hover:#ff8b76;--secondary:#38cbb0;--accent-purple:#9b7cff;
  --accent-gold:#f5c95b;--success:#50d890;--warning:#f2a85c;--danger:#f87171;
  --accent:var(--primary);--accent2:var(--secondary);--accent3:var(--accent-purple);
  --green:var(--success);--orange:var(--warning);--red:var(--danger);
  --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:24px;--space-6:32px;
  --radius-sm:8px;--radius-md:12px;--radius-lg:16px;--radius-xl:20px;
  --shadow-card:0 16px 36px rgba(0,0,0,.22);--shadow-glow:0 0 26px rgba(255,118,95,.13);
  --shadow-soft:0 8px 24px rgba(0,0,0,.16);--sidebar-width:252px;--topbar:68px;
}
html{background:var(--bg);scroll-behavior:smooth}
body{background:radial-gradient(circle at 80% -15%,rgba(56,203,176,.07),transparent 32%),linear-gradient(180deg,#09111d,var(--bg) 42%);padding-left:var(--sidebar-width);font-family:'Rajdhani',sans-serif}
button,a{font:inherit}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);z-index:120;display:flex;flex-direction:column;padding:18px 14px 14px;background:linear-gradient(180deg,#0b1422 0%,#09111c 65%,#08101a 100%);border-right:1px solid var(--border);box-shadow:12px 0 40px rgba(0,0,0,.13)}
.sidebar-brand{display:flex;align-items:center;gap:12px;padding:5px 8px 22px;background:none;border:0;color:var(--text);text-align:left;cursor:pointer}
.sidebar-brand>span:last-child{display:grid;gap:2px}.sidebar-brand strong{font-family:'Space Mono',monospace;font-size:14px}.sidebar-brand small{font-size:12px;color:var(--text-muted)}
.brand-mark{position:relative;width:42px;height:42px;display:grid;place-items:center;clip-path:polygon(25% 5%,75% 5%,100% 50%,75% 95%,25% 95%,0 50%);background:linear-gradient(145deg,var(--primary),#ff9a68);filter:drop-shadow(0 8px 16px rgba(255,118,95,.2))}
.brand-mark::before{content:'';position:absolute;inset:5px;clip-path:inherit;background:#111c2c}.brand-mark span{position:relative;width:21px;height:18px;background:linear-gradient(90deg,#e8edf4 0 4px,transparent 4px 8px,#e8edf4 8px 13px,transparent 13px 17px,#e8edf4 17px 21px);border-radius:2px}.brand-mark span::before{content:'';position:absolute;left:2px;right:2px;top:7px;height:3px;background:#111c2c}
.sidebar-nav{display:flex;flex-direction:column;gap:5px}.nav-item{display:flex;align-items:center;gap:12px;min-height:44px;padding:9px 12px;color:var(--text-dim);text-decoration:none;border:1px solid transparent;border-radius:var(--radius-md);font-size:15px;font-weight:600;transition:.18s ease}.nav-item:hover{color:var(--text);background:rgba(255,255,255,.035);border-color:rgba(255,255,255,.05)}.nav-item.active{color:var(--primary);background:linear-gradient(90deg,rgba(255,118,95,.14),rgba(255,118,95,.05));border-color:rgba(255,118,95,.42);box-shadow:var(--shadow-glow),inset 3px 0 var(--primary)}.nav-icon{width:22px;text-align:center;font-family:'Space Mono',monospace;font-size:18px}.nav-item small{margin-left:auto;padding:2px 5px;border-radius:5px;background:rgba(155,124,255,.12);color:var(--accent-purple);font-size:9px;text-transform:uppercase;letter-spacing:.5px}.sidebar-footer{display:grid;gap:13px;margin-top:auto}.group-status-card{display:grid;gap:10px;padding:14px;border:1px solid var(--border);border-radius:var(--radius-lg);background:rgba(16,24,39,.72)}.group-status-card>div{display:flex;align-items:center;gap:7px}.group-status-card strong{font-size:13px}.group-status-card>span{font-size:12px;color:var(--success)}.group-status-card .btn{width:100%}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--success);box-shadow:0 0 10px rgba(80,216,144,.45)}.app-version{padding-left:6px;color:var(--text-muted);font-family:'Space Mono',monospace;font-size:10px}
.topbar{left:var(--sidebar-width);height:var(--topbar);padding:0 22px;background:rgba(8,14,24,.86);border-bottom-color:var(--border);backdrop-filter:blur(18px)}.topbar-location{display:flex;align-items:center;gap:12px;color:var(--text-muted);font-family:'Space Mono',monospace;font-size:11px}.topbar-location strong{color:var(--text);font-family:'Rajdhani',sans-serif;font-size:15px}.header-actions{gap:10px}.topbar-online{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid var(--border);border-radius:999px;color:var(--text-dim);font-size:12px}.icon-button{width:36px;height:36px;display:inline-grid;place-items:center;border:1px solid var(--border);border-radius:10px;background:var(--surface-glass);color:var(--text-dim);cursor:pointer}.mobile-menu-button{display:none}.user-menu{position:relative}.user-menu-trigger{height:44px;min-width:156px;display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:9px;padding:5px 10px;border:1px solid var(--border);border-radius:12px;background:var(--surface-glass);color:var(--text);cursor:pointer;text-align:left}.user-avatar{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,rgba(155,124,255,.28),rgba(56,203,176,.22));border:1px solid rgba(155,124,255,.55);font-family:'Space Mono',monospace;font-size:10px}.user-copy{display:grid}.user-copy strong{font-size:13px}.user-copy small{display:flex;align-items:center;gap:5px;color:var(--text-muted);font-size:10px}.user-copy .status-dot{width:5px;height:5px}.user-menu-popover{display:none;position:absolute;top:calc(100% + 8px);right:0;width:190px;padding:7px;border:1px solid var(--border);border-radius:12px;background:#111b2b;box-shadow:var(--shadow-card)}.user-menu-popover.open{display:grid}.user-menu-popover button{padding:9px 10px;border:0;border-radius:8px;background:none;color:var(--text-dim);text-align:left;cursor:pointer}.user-menu-popover button:hover{background:rgba(255,255,255,.05);color:var(--text)}.user-menu-popover .menu-danger{color:var(--danger);border-top:1px solid var(--border);border-radius:0;margin-top:4px;padding-top:11px}
#tournament-context-bar{display:none;align-items:center;gap:8px;flex:0 1 520px;min-width:0;max-width:520px;margin:0 14px;position:relative;z-index:1}
.topbar-location{flex:0 0 auto}
.header-actions{position:relative;z-index:20;flex:0 0 auto}
.user-menu{position:relative;z-index:40}
.user-menu-popover{z-index:80}
.context-dashboard-link{margin-left:auto;white-space:nowrap}
.app-main{max-width:none;margin:0;padding:22px 24px 40px}.btn{border-radius:10px;text-transform:none;letter-spacing:.1px}.btn-primary{background:linear-gradient(135deg,var(--primary),#ff8b68);color:white;box-shadow:0 8px 20px rgba(255,118,95,.18)}.btn-primary:hover{background:linear-gradient(135deg,var(--primary-hover),#ffa06f);box-shadow:0 11px 25px rgba(255,118,95,.23)}.btn-secondary{background:#172438;border:1px solid #31425b;color:var(--text-dim)}.btn-secondary:hover{border-color:#4b607e;color:var(--text);background:#1b2a41}.btn-ghost:hover{border-color:var(--secondary);color:var(--secondary);background:rgba(56,203,176,.07)}
#view-dashboard.active{display:grid;gap:16px;max-width:1560px;margin:0 auto}.dashboard-header{position:relative;overflow:hidden;display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:24px 26px;border:1px solid var(--border);border-radius:var(--radius-lg);background:linear-gradient(115deg,rgba(17,28,44,.98),rgba(11,19,32,.93))}.dashboard-header::after{content:'';position:absolute;width:440px;height:220px;right:-80px;top:-100px;border:1px solid rgba(56,203,176,.11);border-radius:50%;box-shadow:0 0 0 35px rgba(155,124,255,.025),0 0 0 70px rgba(255,118,95,.018);transform:rotate(-10deg)}.dashboard-header>*{position:relative;z-index:1}.dashboard-header h1{font-size:28px;line-height:1.1;margin-bottom:8px}.dashboard-header p{color:var(--text-muted);font-size:14px}.dashboard-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
#view-dashboard .stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0}.stat-card{display:grid;grid-template-columns:46px 1fr;align-items:center;gap:12px;min-height:104px;padding:15px;border:1px solid var(--border);border-radius:var(--radius-lg);background:linear-gradient(145deg,rgba(20,31,48,.98),rgba(14,23,37,.98));box-shadow:var(--shadow-soft)}.stat-card>div{display:grid}.stat-icon{width:42px;height:46px;display:grid;place-items:center;clip-path:polygon(25% 4%,75% 4%,100% 50%,75% 96%,25% 96%,0 50%);background:rgba(255,255,255,.07);font-size:19px}.stat-label{font-size:11px;color:var(--text-muted)}.stat-value{margin:1px 0;font-family:'Space Mono',monospace;font-size:24px;line-height:1.2}.stat-card small{font-size:11px}.stat-coral .stat-icon,.stat-coral small{color:var(--primary)}.stat-teal .stat-icon,.stat-teal small{color:var(--secondary)}.stat-purple .stat-icon,.stat-purple small{color:var(--accent-purple)}.stat-gold .stat-icon,.stat-gold small{color:var(--accent-gold)}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(330px,.9fr);gap:16px}.dashboard-primary,.dashboard-secondary{display:grid;gap:16px;align-content:start}.section-card{min-width:0;padding:14px;border:1px solid var(--border);border-radius:var(--radius-lg);background:rgba(13,22,36,.78);box-shadow:var(--shadow-soft)}.section-card-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:1px 2px 12px}.section-card-header h2{font-size:18px;line-height:1.2}.section-link{border:0;background:none;color:var(--primary);font-weight:600;font-size:12px;cursor:pointer}.dashboard-list{display:grid;gap:7px}.dashboard-row{width:100%;display:grid;grid-template-columns:42px minmax(160px,1fr) auto auto auto auto;align-items:center;gap:10px;padding:9px 10px;border:1px solid var(--border);border-radius:11px;background:linear-gradient(90deg,rgba(23,35,53,.82),rgba(15,25,40,.8));color:var(--text);text-align:left;cursor:pointer;transition:.17s}.dashboard-row:hover{border-color:rgba(255,118,95,.48);background:#172438;transform:translateY(-1px)}.row-copy{display:grid;min-width:0}.row-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.row-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-muted);font-size:11px}.row-chevron{font-size:21px;color:var(--text-muted)}.league-icon{width:36px;height:40px;display:block;clip-path:polygon(25% 4%,75% 4%,100% 50%,75% 96%,25% 96%,0 50%);background:radial-gradient(circle,#111a29 0 25%,transparent 27%),linear-gradient(145deg,var(--accent-gold),#b77d32);position:relative}.league-icon::after{content:'';position:absolute;inset:3px;clip-path:inherit;background:#111c2b;z-index:-1}.team-list-ball{width:38px!important;height:38px!important}.badge{padding:4px 7px;border-radius:7px;background:#152238;font-size:10px}.badge-success{border-color:rgba(80,216,144,.25);background:rgba(80,216,144,.09);color:var(--success)}.badge-warning{border-color:rgba(242,168,92,.3);background:rgba(242,168,92,.09);color:var(--warning)}.badge-purple{border-color:rgba(155,124,255,.32);background:rgba(155,124,255,.11);color:#bba5ff}.dashboard-detail:not(:empty){margin-top:12px}.empty-state.compact{padding:26px 16px;font-size:12px;border:1px dashed var(--border);border-radius:11px;background:rgba(8,14,24,.3)}.empty-state.compact::before,.empty-state.compact::after{display:none}
.match-list{display:grid}.match-row{display:grid;grid-template-columns:32px minmax(44px,1fr) auto 32px minmax(44px,1fr) auto auto auto;align-items:center;gap:7px;padding:10px 5px;border:0;border-top:1px solid var(--border);background:none;color:var(--text-dim);text-align:left;cursor:pointer}.match-row:first-child{border-top:0}.match-row:hover{background:rgba(255,255,255,.025)}.match-avatar{width:30px;height:33px;display:grid;place-items:center;clip-path:polygon(25% 4%,75% 4%,100% 50%,75% 96%,25% 96%,0 50%);background:#26364b;color:var(--text);font-family:'Space Mono',monospace;font-size:9px}.match-avatar.alt{color:var(--accent-gold)}.match-name{font-size:12px}.match-vs{color:var(--text-muted);font-size:9px}.match-row time{color:var(--text-muted);font-size:11px;white-space:nowrap}.activity-list{display:grid;gap:3px}.activity-item{display:grid;grid-template-columns:16px 1fr;gap:9px;padding:9px 4px;border-top:1px solid rgba(38,52,73,.65)}.activity-item:first-child{border-top:0}.activity-dot{width:9px;height:9px;margin-top:5px;border:2px solid currentColor;border-radius:50%;box-shadow:0 0 0 4px rgba(255,255,255,.025)}.activity-dot.teal{color:var(--secondary)}.activity-dot.purple{color:var(--accent-purple)}.activity-dot.coral{color:var(--primary)}.activity-item p{font-size:12px;color:var(--text-dim)}.activity-item time{font-size:10px;color:var(--text-muted)}
.compact-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px}.compact-team-card{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:9px;padding:10px;border:1px solid var(--border);border-radius:11px;background:rgba(19,31,48,.75);color:var(--text);text-align:left;cursor:pointer}.compact-team-card:hover{border-color:rgba(56,203,176,.4)}.compact-team-card>span:nth-child(2){display:grid;min-width:0}.compact-team-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compact-team-card small{color:var(--text-muted);font-size:10px}.dashboard-bottom-grid{display:grid;grid-template-columns:1fr 1fr .85fr;gap:16px;align-items:stretch}.dashboard-bottom-grid .compact-card-grid{grid-template-columns:1fr}.template-grid{display:grid;gap:7px}.template-card{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:9px;padding:8px;border:1px solid var(--border);border-radius:10px;background:rgba(19,31,48,.65)}.template-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;background:rgba(155,124,255,.12);color:var(--accent-purple);font-family:'Space Mono',monospace}.template-card>div{display:grid}.template-card strong{font-size:13px}.template-card small{color:var(--text-muted);font-size:10px}.template-add{min-height:42px;border:1px dashed #42526a;border-radius:10px;background:none;color:var(--text-muted);cursor:pointer}.template-add:hover{border-color:var(--primary);color:var(--primary)}.champions-teaser{position:relative;overflow:hidden;min-height:100%;padding:22px;border:1px solid rgba(155,124,255,.3);border-radius:var(--radius-lg);background:linear-gradient(135deg,#211c38,#151a32 72%);box-shadow:var(--shadow-soft)}.champions-teaser h2{font-size:22px;margin:30px 0 7px}.champions-teaser p{max-width:280px;color:#a8a6c0;font-size:13px;line-height:1.45}.champion-crown{position:absolute;right:20px;top:12px;color:#b696ff;font-size:54px;opacity:.8}.btn-champion{margin-top:16px;border:1px solid rgba(155,124,255,.7);background:rgba(155,124,255,.08);color:#c7b6ff}.btn-champion:hover{background:rgba(155,124,255,.15)}
@media(max-width:1180px){.topbar-online{display:none}.dashboard-grid{grid-template-columns:1fr}.dashboard-secondary{grid-template-columns:1fr 1fr}.dashboard-bottom-grid{grid-template-columns:1fr 1fr}.champions-teaser{grid-column:1/-1}#view-dashboard .stats-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:820px){body{padding-left:0}.sidebar{transform:translateX(-102%);transition:transform .2s ease}.sidebar.open{transform:translateX(0);box-shadow:24px 0 70px rgba(0,0,0,.55)}.topbar{left:0;padding:0 12px}.mobile-menu-button{display:inline-grid}.topbar-location{display:none}.app-main{padding:14px}.dashboard-header{align-items:flex-start;flex-direction:column}.dashboard-actions{justify-content:flex-start}.dashboard-secondary{grid-template-columns:1fr}.dashboard-bottom-grid{grid-template-columns:1fr}.champions-teaser{grid-column:auto}.dashboard-row{grid-template-columns:38px minmax(120px,1fr) auto auto}.dashboard-row>.badge:nth-of-type(2),.dashboard-row>.type-chip,.dashboard-row>.row-chevron{display:none}.match-row{grid-template-columns:30px 1fr auto 30px 1fr auto}.match-row time{grid-column:2/6}.match-row .badge,.match-row .row-chevron{display:none}}
@media(max-width:560px){.app-main{padding:10px}.topbar-create,.notification-button{display:none}.user-menu-trigger{min-width:128px}.dashboard-header{padding:18px}.dashboard-header h1{font-size:23px}#view-dashboard .stats-grid{grid-template-columns:1fr 1fr;gap:8px}.stat-card{grid-template-columns:1fr;gap:5px;min-height:130px}.stat-icon{width:34px;height:36px}.stat-value{font-size:20px}.dashboard-row{grid-template-columns:36px minmax(0,1fr) auto}.dashboard-row>.badge,.dashboard-row>.row-chevron{display:none}.compact-card-grid{grid-template-columns:1fr}.section-card{padding:11px}.section-card-header h2{font-size:16px}}

/* Functional navigation targets and final team layouts */
#dashboard-tournaments-section,#dashboard-teams-section,#dashboard-shared-teams-section,#dashboard-templates-section{scroll-margin-top:calc(var(--topbar) + 18px)}
.team-row{min-height:70px;padding:12px 14px;grid-template-columns:46px minmax(145px,.8fr) minmax(240px,1fr) auto auto auto;gap:13px}
.team-row .team-list-ball{width:44px!important;height:44px!important}
.team-row .row-copy strong{font-size:16px}
.team-row .row-copy small{font-size:12px}
.team-row .team-sprite-rail{display:flex;grid-column:auto;gap:7px}
.team-row .team-sprite-slot{width:39px;height:41px;flex-basis:39px}
.team-row .team-sprite-slot img{width:38px;height:38px}
#dash-public-teams.compact-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#dash-public-teams .compact-team-card{min-height:154px;display:grid;grid-template-columns:46px minmax(0,1fr) auto;grid-template-rows:auto 1fr;align-items:center;gap:10px 12px;padding:14px}
#dash-public-teams .compact-team-card .team-list-ball{width:44px!important;height:44px!important}
#dash-public-teams .compact-team-card>span:nth-child(2) strong{font-size:15px}
#dash-public-teams .compact-team-card>span:nth-child(2) small{font-size:11px;margin-top:2px}
#dash-public-teams .compact-team-card .team-sprite-rail{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,44px);justify-content:start;gap:7px;width:max-content}
#dash-public-teams .compact-team-card .team-sprite-slot{width:44px;height:46px;display:grid;flex-basis:44px}
#dash-public-teams .compact-team-card .team-sprite-slot img{width:43px;height:43px}
@media(max-width:1100px){#dash-public-teams.compact-card-grid{grid-template-columns:1fr}.team-row{grid-template-columns:44px minmax(130px,1fr) auto auto}.team-row .team-sprite-rail{grid-column:2/3}.team-row>.badge{display:none}}
@media(max-width:620px){.team-row{grid-template-columns:42px minmax(0,1fr) auto;min-height:64px}.team-row .team-sprite-rail{display:none}#dash-public-teams .compact-team-card{min-height:142px}#dash-public-teams .compact-team-card .team-sprite-rail{display:grid;grid-template-columns:repeat(3,38px)}#dash-public-teams .compact-team-card .team-sprite-slot{width:38px;height:40px}#dash-public-teams .compact-team-card .team-sprite-slot img{width:37px;height:37px}}

/* Standalone hub pages */
#view-hub.active{display:grid;gap:18px;max-width:1500px;margin:0 auto}
.hub-page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:24px 26px;border:1px solid var(--border);border-radius:var(--radius-lg);background:linear-gradient(125deg,rgba(18,29,46,.98),rgba(10,18,30,.94));box-shadow:var(--shadow-soft)}
.hub-page-header h1{font-size:30px;line-height:1.1;margin-bottom:7px}.hub-page-header p{color:var(--text-muted);font-size:14px}.hub-page-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.hub-section{display:grid;gap:11px;padding:15px;border:1px solid var(--border);border-radius:var(--radius-lg);background:rgba(13,22,36,.78);box-shadow:var(--shadow-soft)}
.hub-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.hub-section-title h2{font-size:19px}.hub-section-title>span{min-width:26px;height:26px;display:grid;place-items:center;border-radius:8px;background:#172438;color:var(--text-muted);font-family:'Space Mono',monospace;font-size:10px}.hub-section-title p{color:var(--text-muted);font-size:12px;margin-top:2px}
.hub-list,.hub-template-list{display:grid;gap:8px}.hub-tournament-card{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:13px;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:linear-gradient(90deg,rgba(22,34,52,.88),rgba(14,23,37,.78))}.hub-tournament-card.featured{min-height:112px;padding:18px;border-color:rgba(255,118,95,.38);background:linear-gradient(115deg,rgba(255,118,95,.09),rgba(19,31,48,.9) 46%,rgba(13,22,36,.9))}.hub-card-icon{width:42px;height:44px;display:grid;place-items:center;clip-path:polygon(24% 3%,76% 3%,100% 50%,76% 97%,24% 97%,0 50%);background:#24344c;color:var(--text);font-family:'Space Mono',monospace;font-weight:700}.hub-card-icon.tournament{color:var(--primary);background:rgba(255,118,95,.15)}.hub-card-icon.purple{color:var(--accent-purple);background:rgba(155,124,255,.14)}.hub-card-icon.gold{color:var(--accent-gold);background:rgba(245,201,91,.13)}.hub-card-copy{min-width:0}.hub-card-title-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.hub-card-title-row h3{font-size:17px}.hub-card-copy p{margin-top:3px;color:var(--text-muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hub-meta{display:flex;gap:7px;flex-wrap:wrap;margin-top:7px}.hub-meta span{padding:3px 6px;border-radius:6px;background:#172438;color:var(--text-muted);font-size:10px}
.hub-team-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.hub-team-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:13px;padding:15px;border:1px solid var(--border);border-radius:13px;background:linear-gradient(145deg,rgba(20,32,50,.96),rgba(14,23,37,.94));transition:border-color .17s,transform .17s}.hub-team-card:hover{border-color:rgba(56,203,176,.35);transform:translateY(-1px)}.hub-team-card.shared{max-width:380px;padding:12px}.hub-team-head{grid-column:1/-1;display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:10px}.hub-team-head h3{font-size:16px}.hub-team-head p{color:var(--text-muted);font-size:11px}.hub-team-card>.btn{align-self:center}.hub-mon-preview{display:flex;align-items:center;gap:7px}.hub-mon-preview.grid{display:grid;grid-template-columns:repeat(3,42px);gap:6px;width:max-content}.hub-mon-slot{width:42px;height:44px;display:grid;place-items:center;overflow:hidden;clip-path:polygon(24% 3%,76% 3%,100% 50%,76% 97%,24% 97%,0 50%);background:#1b2a40;border:1px solid rgba(105,128,159,.3)}.hub-mon-slot img{width:41px;height:41px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 2px 3px rgba(0,0,0,.45))}.hub-mon-slot.empty{opacity:.4}.hub-team-detail{scroll-margin-top:calc(var(--topbar) + 16px)}.hub-team-detail:empty{display:none}.hub-team-editor{padding:18px}.hub-team-editor .form-textarea{min-height:120px;margin-bottom:8px}
.hub-template-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px}.hub-template-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;padding:11px 12px;border:1px solid var(--border);border-radius:11px;background:rgba(19,31,48,.74)}.hub-template-card h3{font-size:15px}.hub-template-card p{color:var(--text-muted);font-size:11px;margin-top:2px}.hub-empty,.hub-loading{padding:28px 18px;border:1px dashed var(--border);border-radius:12px;color:var(--text-muted);text-align:center;background:rgba(8,14,24,.28)}.hub-empty strong,.hub-empty span{display:block}.hub-empty strong{margin-bottom:4px;color:var(--text);font-size:16px}.hub-empty .btn{display:inline-flex;margin-top:13px}.hub-empty.error{color:var(--text-muted);border-color:rgba(248,113,113,.26)}.hub-empty.error strong{color:var(--danger)}.empty-state.load-error{border-color:rgba(248,113,113,.25)}.empty-state.load-error .empty-title{color:var(--danger)}
.hub-champions-placeholder{position:relative;overflow:hidden;min-height:420px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:48px;border:1px solid rgba(155,124,255,.3);border-radius:var(--radius-xl);background:linear-gradient(135deg,#211c38,#141a30 70%)}.hub-champions-placeholder>span{color:#bba5ff;font-size:12px;text-transform:uppercase;letter-spacing:1px}.hub-champions-placeholder h2{max-width:620px;margin:8px 0;font-size:32px}.hub-champions-placeholder p{max-width:590px;color:#aaa8c1;line-height:1.55}.hub-champions-placeholder .champion-crown{right:50px;top:50%;transform:translateY(-50%);font-size:150px;opacity:.28}
/* Dashboard shared cards stay content-sized instead of stretching across half the page. */
#dash-public-teams.compact-card-grid{grid-template-columns:repeat(auto-fill,minmax(270px,320px));align-items:start}
#dash-public-teams .compact-team-card{min-height:136px;padding:11px 12px}
@media(max-width:900px){.hub-team-grid,.hub-template-columns{grid-template-columns:1fr}.hub-team-card.shared{max-width:none}.hub-page-header{align-items:flex-start;flex-direction:column}.hub-page-actions{justify-content:flex-start}}
@media(max-width:620px){.hub-page-header{padding:18px}.hub-page-header h1{font-size:25px}.hub-section{padding:11px}.hub-tournament-card{grid-template-columns:38px minmax(0,1fr)}.hub-tournament-card>.btn{grid-column:1/-1;width:100%}.hub-team-grid{grid-template-columns:1fr}.hub-team-card{grid-template-columns:1fr}.hub-team-card>.btn{width:100%}.hub-mon-preview.row{display:grid;grid-template-columns:repeat(3,38px)}.hub-mon-preview.grid{grid-template-columns:repeat(3,38px)}.hub-mon-slot{width:38px;height:40px}.hub-mon-slot img{width:37px;height:37px}.hub-template-card{grid-template-columns:38px minmax(0,1fr)}.hub-template-card>.btn{grid-column:1/-1}.hub-champions-placeholder{min-height:340px;padding:28px}.hub-champions-placeholder h2{font-size:26px}.hub-champions-placeholder .champion-crown{font-size:90px;right:18px;top:20%;}}

/* Readability pass: larger type, media and balanced spacing */
:root{--sidebar-width:270px;--topbar:72px}
body{font-size:17px}
.sidebar{padding:21px 16px 16px}
.sidebar-brand{gap:14px;padding:6px 9px 25px}.sidebar-brand strong{font-size:15px}.sidebar-brand small{font-size:13px}.brand-mark{width:46px;height:46px}
.sidebar-nav{gap:6px}.nav-item{min-height:48px;padding:10px 13px;font-size:16px;gap:13px}.nav-icon{width:24px;font-size:20px}.nav-item small{font-size:10px;padding:3px 6px}
.topbar{padding:0 26px}.topbar-location{font-size:12px}.topbar-location strong{font-size:16px}.header-actions{gap:11px}.icon-button{width:40px;height:40px}.user-menu-trigger{height:48px;min-width:168px;grid-template-columns:38px 1fr auto}.user-avatar{width:36px;height:36px;font-size:11px}.user-copy strong{font-size:14px}.user-copy small{font-size:11px}
.app-main{padding:26px 28px 46px}.btn{min-height:38px;padding:9px 15px;font-size:14px}.btn-sm{min-height:32px;padding:6px 11px;font-size:12px}.btn-xs{min-height:27px;font-size:11px}.badge{padding:5px 8px;font-size:11px}
#view-dashboard.active,#view-hub.active{gap:19px}.dashboard-header{padding:27px 29px;min-height:126px}.dashboard-header h1{font-size:31px;margin-bottom:9px}.dashboard-header p{font-size:15px;line-height:1.5}
#view-dashboard .stats-grid{gap:14px}.stat-card{min-height:114px;padding:17px;grid-template-columns:50px 1fr;gap:14px}.stat-icon{width:46px;height:50px;font-size:21px}.stat-label{font-size:12px}.stat-value{font-size:27px;margin:2px 0}.stat-card small{font-size:12px}
.dashboard-grid,.dashboard-primary,.dashboard-secondary{gap:18px}.section-card{padding:17px}.section-card-header{padding:2px 3px 14px}.section-card-header h2{font-size:20px}.section-link{font-size:13px}.dashboard-list{gap:9px}.dashboard-row{padding:11px 12px;min-height:62px}.row-copy strong{font-size:16px}.row-copy small{font-size:12px;line-height:1.35}.match-row{min-height:59px;padding:12px 7px}.match-avatar{width:34px;height:37px;font-size:10px}.match-name{font-size:13px}.match-vs{font-size:10px}.match-row time{font-size:12px}.activity-item{padding:11px 5px}.activity-item p{font-size:13px;line-height:1.35}.activity-item time{font-size:11px}.empty-state.compact{padding:31px 20px;font-size:13px}
.team-row{min-height:78px;padding:14px 16px;grid-template-columns:50px minmax(150px,.8fr) minmax(270px,1fr) auto auto auto;gap:15px}.team-row .team-list-ball{width:48px!important;height:48px!important}.team-row .row-copy strong{font-size:18px}.team-row .row-copy small{font-size:13px}.team-row .team-sprite-rail{gap:8px}.team-row .team-sprite-slot{width:44px;height:46px;flex-basis:44px}.team-row .team-sprite-slot img{width:43px;height:43px}
#dash-public-teams.compact-card-grid{grid-template-columns:repeat(auto-fill,minmax(290px,340px));gap:13px}#dash-public-teams .compact-team-card{min-height:148px;padding:13px 14px;gap:11px 13px}#dash-public-teams .compact-team-card .team-list-ball{width:48px!important;height:48px!important}#dash-public-teams .compact-team-card>span:nth-child(2) strong{font-size:16px}#dash-public-teams .compact-team-card>span:nth-child(2) small{font-size:12px}#dash-public-teams .compact-team-card .team-sprite-rail{grid-template-columns:repeat(3,48px);gap:8px}#dash-public-teams .compact-team-card .team-sprite-slot{width:48px;height:50px;flex-basis:48px}#dash-public-teams .compact-team-card .team-sprite-slot img{width:47px;height:47px}
.template-card{padding:10px;gap:11px}.template-icon{width:37px;height:37px}.template-card strong{font-size:14px}.template-card small{font-size:11px}.champions-teaser{padding:25px}.champions-teaser h2{font-size:24px}.champions-teaser p{font-size:14px}.champion-crown{font-size:60px}
.hub-page-header{padding:28px 30px;min-height:128px}.hub-page-header h1{font-size:33px;margin-bottom:9px}.hub-page-header p{font-size:15px;line-height:1.5}.hub-section{gap:13px;padding:18px}.hub-section-title h2{font-size:21px}.hub-section-title p{font-size:13px}.hub-section-title>span{min-width:30px;height:30px;font-size:11px}.hub-tournament-card{grid-template-columns:50px minmax(0,1fr) auto;gap:15px;padding:15px 17px;min-height:86px}.hub-tournament-card.featured{min-height:124px;padding:20px}.hub-card-icon{width:48px;height:50px;font-size:16px}.hub-card-title-row h3{font-size:19px}.hub-card-copy p{font-size:13px}.hub-meta span{font-size:11px;padding:4px 7px}
.hub-team-grid{gap:14px}.hub-team-card{gap:15px;padding:18px}.hub-team-card.shared{max-width:420px;padding:15px}.hub-team-head{grid-template-columns:50px minmax(0,1fr) auto;gap:12px}.hub-team-head .team-list-ball{width:48px!important;height:48px!important}.hub-team-head h3{font-size:18px}.hub-team-head p{font-size:13px}.hub-mon-preview{gap:8px}.hub-mon-preview.grid{grid-template-columns:repeat(3,48px);gap:8px}.hub-mon-slot{width:48px;height:50px}.hub-mon-slot img{width:47px;height:47px}.hub-template-card{grid-template-columns:48px minmax(0,1fr) auto;gap:13px;padding:14px}.hub-template-card h3{font-size:17px}.hub-template-card p{font-size:13px}.hub-empty,.hub-loading{padding:34px 22px;font-size:14px}
.pokemon-name{font-size:15px}.pokemon-sprite-col{width:118px;min-width:118px}.pokemon-sprite-col img{width:102px;height:102px}.pokemon-info-col{padding:13px 14px}.item-row,.ability-row,.tera-row,.move-item{font-size:12px}.type-chip{font-size:10px}.form-label{font-size:12px}.form-input,.form-select{font-size:15px;padding:10px 12px}.form-textarea{font-size:12px}.modal-title{font-size:15px}.tournament-page-title h1{font-size:23px}.tournament-page-title p{font-size:14px}
@media(max-width:1380px) and (min-width:821px){.dashboard-grid{grid-template-columns:1fr}.dashboard-secondary{grid-template-columns:1fr 1fr}.dashboard-bottom-grid{grid-template-columns:1fr 1fr}.champions-teaser{grid-column:1/-1}.team-row{grid-template-columns:48px minmax(145px,.8fr) minmax(250px,1fr) auto auto auto}}
@media(max-width:820px){:root{--topbar:68px}.app-main{padding:16px}.dashboard-header,.hub-page-header{padding:21px}.dashboard-header h1{font-size:27px}.hub-page-header h1{font-size:29px}.section-card,.hub-section{padding:14px}.team-row{grid-template-columns:44px minmax(125px,1fr) auto auto}.team-row .team-sprite-rail{grid-column:2/3}.team-row>.badge{display:none}.hub-team-card.shared{max-width:none}}
@media(max-width:560px){body{font-size:16px}.app-main{padding:11px}.dashboard-header h1{font-size:25px}.dashboard-header p,.hub-page-header p{font-size:14px}#view-dashboard .stats-grid{gap:9px}.stat-card{min-height:142px;padding:15px}.stat-value{font-size:24px}.section-card-header h2{font-size:18px}.hub-page-header h1{font-size:27px}.hub-section-title h2{font-size:19px}.hub-mon-preview.row,.hub-mon-preview.grid{grid-template-columns:repeat(3,42px)}.hub-mon-slot{width:42px;height:44px}.hub-mon-slot img{width:41px;height:41px}}

/* Öffentlicher Teamlink: eigenständige, anonyme Nur-Lese-Ansicht */
body.public-team-mode{padding-left:0;background:radial-gradient(circle at 18% 2%,rgba(56,203,176,.09),transparent 30%),radial-gradient(circle at 88% 18%,rgba(155,124,255,.09),transparent 28%),var(--bg)}
body.public-team-mode>.sidebar,body.public-team-mode>.topbar,body.public-team-mode>.modal-overlay,body.public-team-mode>.login-gate,body.public-team-mode>.profile-gate,body.public-team-mode>.toast{display:none!important}
body.public-team-mode .app-main{padding:0;max-width:none;margin:0}
.public-team-page{min-height:100vh}
.public-team-header{position:static;height:70px;padding:0 clamp(18px,4vw,64px);border-bottom:1px solid var(--border);background:rgba(8,14,24,.82)}
.public-team-brand{display:flex;align-items:center;gap:11px;color:var(--text);text-decoration:none;font-family:'Rajdhani',sans-serif;font-size:19px}
.public-team-brand .brand-mark{width:34px;height:34px}.public-team-brand .brand-mark span{transform:scale(.72)}
.public-team-content{width:min(1500px,calc(100% - 40px));margin:0 auto;padding:34px 0 56px}
.public-team-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 26px;margin-bottom:16px;border:1px solid var(--border);border-radius:var(--radius-lg);background:linear-gradient(135deg,rgba(22,37,57,.96),rgba(13,23,38,.92));box-shadow:var(--shadow-soft)}
.public-team-title{display:flex;align-items:center;gap:17px}.public-team-ball{width:64px!important;height:64px!important;flex:0 0 64px}.public-team-eyebrow,.public-team-section-title span{display:block;margin-bottom:3px;color:var(--secondary);font-family:'Space Mono',monospace;font-size:10px;text-transform:uppercase;letter-spacing:.8px}.public-team-title h1{font-size:clamp(28px,4vw,42px);line-height:1}.public-team-title p{margin-top:5px;color:var(--text-muted)}
.public-team-roster{padding:22px;border:1px solid var(--border);border-radius:var(--radius-lg);background:rgba(12,21,35,.82);box-shadow:var(--shadow-soft)}
.public-team-section-title{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:17px}.public-team-section-title h2{font-size:23px}.public-team-section-title>strong{min-width:38px;height:32px;display:grid;place-items:center;border:1px solid rgba(56,203,176,.3);border-radius:9px;background:rgba(56,203,176,.08);color:var(--secondary);font-family:'Space Mono',monospace}
.public-team-state{min-height:100vh;display:grid;place-content:center;justify-items:center;gap:12px;padding:24px;text-align:center}.public-team-state-icon{width:54px;height:54px;display:grid;place-items:center;border:1px solid var(--border);border-radius:50%;background:var(--surface2);color:var(--text-muted);font:700 22px 'Space Mono',monospace}.public-team-state h1{font-size:30px}.public-team-state p{max-width:430px;color:var(--text-muted);margin-bottom:8px}
.legal-footer{display:grid;gap:3px;margin:0 28px 24px;padding:13px 16px;border-top:1px solid var(--border);color:var(--text-muted);font-size:11px;line-height:1.45}.legal-footer strong{color:var(--text-dim);font-size:12px}.legal-inline{margin-top:14px;padding-top:11px;border-top:1px solid var(--border);color:var(--text-muted);font-size:10px;line-height:1.45}.public-team-disclaimer{margin:18px 3px 0;color:var(--text-muted);font-size:11px;text-align:center}.public-team-mode>.legal-footer{width:min(1460px,calc(100% - 40px));margin:0 auto 24px}
@media(max-width:820px){.legal-footer{margin:0 14px 18px}.public-team-mode>.legal-footer{width:calc(100% - 20px);margin-bottom:16px}}
@media(max-width:700px){.public-team-header{height:62px;padding:0 14px}.public-team-content{width:calc(100% - 20px);padding:14px 0 28px}.public-team-hero{align-items:flex-start;padding:18px;flex-direction:column}.public-team-title{align-items:flex-start}.public-team-ball{width:52px!important;height:52px!important;flex-basis:52px}.public-team-roster{padding:12px}.public-team-section-title{padding:4px 3px 0}.public-team-section-title h2{font-size:20px}}

/* Matches & league */
.match-page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:22px 24px;border:1px solid var(--border);border-radius:var(--radius-lg);background:linear-gradient(120deg,rgba(22,34,52,.96),rgba(12,21,35,.94));margin-bottom:16px}.match-page-header h2{font-size:27px;line-height:1.1}.match-page-header p{margin-top:6px;color:var(--text-muted);font-size:14px}
.match-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.match-summary-grid article{display:grid;padding:15px 17px;border:1px solid var(--border);border-radius:13px;background:rgba(18,29,46,.9)}.match-summary-grid span{color:var(--text-muted);font-size:12px;text-transform:uppercase;letter-spacing:.7px}.match-summary-grid strong{font-family:'Space Mono',monospace;font-size:25px;margin:2px 0}.match-summary-grid small{color:var(--text-muted);font-size:11px}.match-summary-grid .open strong{color:var(--accent-purple)}.match-summary-grid .done strong{color:var(--success)}.match-summary-grid .players strong{color:var(--secondary)}
.match-create-panel{display:none;padding:18px;margin-bottom:16px;border:1px solid rgba(255,118,95,.28);border-radius:var(--radius-lg);background:linear-gradient(135deg,rgba(255,118,95,.07),rgba(15,25,40,.94))}.match-create-panel.open{display:block}.match-panel-title{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:15px}.match-panel-title h3{font-size:19px}.match-panel-title p{color:var(--text-muted);font-size:12px;margin-top:2px}.match-create-grid{display:grid;grid-template-columns:100px 1fr 1fr 1.2fr;gap:12px}.match-create-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.match-page-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(310px,.7fr);gap:16px;align-items:start}.match-list-panel,.standings-panel{padding:16px;border:1px solid var(--border);border-radius:var(--radius-lg);background:rgba(13,22,36,.78);box-shadow:var(--shadow-soft)}.standings-panel{position:sticky;top:calc(var(--topbar) + 16px)}.match-list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.match-list-toolbar h3{font-size:19px}.match-list-toolbar p{font-size:11px;color:var(--text-muted);margin-top:2px}.match-filter{display:flex;gap:5px;padding:4px;border:1px solid var(--border);border-radius:10px;background:#0c1524}.match-filter button{display:flex;align-items:center;gap:6px;min-height:31px;padding:5px 9px;border:0;border-radius:7px;background:transparent;color:var(--text-muted);font-weight:700;cursor:pointer}.match-filter button:hover{color:var(--text)}.match-filter button.active{background:#1b2a41;color:var(--text)}.match-filter button span{min-width:18px;height:18px;display:grid;place-items:center;border-radius:6px;background:rgba(255,255,255,.06);font-family:'Space Mono',monospace;font-size:9px}
.match-card-list{display:grid;gap:10px}.match-card{padding:13px 14px;border:1px solid var(--border);border-radius:13px;background:linear-gradient(145deg,rgba(21,33,51,.95),rgba(14,23,37,.94))}.match-card.completed{border-color:rgba(80,216,144,.18)}.match-card[hidden]{display:none}.match-card-top{display:flex;align-items:center;gap:8px;padding-bottom:10px;border-bottom:1px solid rgba(38,52,73,.72)}.match-round{font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.7px}.match-card-top .badge{margin-left:auto}.match-delete{width:27px;height:27px;display:grid;place-items:center;border:1px solid transparent;border-radius:7px;background:none;color:var(--text-muted);font-size:18px;cursor:pointer}.match-delete:hover{border-color:rgba(248,113,113,.3);background:rgba(248,113,113,.08);color:var(--danger)}
.match-players{display:grid;grid-template-columns:minmax(0,1fr) 78px minmax(0,1fr);align-items:center;gap:12px;padding:14px 0 8px}.match-player{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:10px;min-width:0}.match-player.right{grid-template-columns:minmax(0,1fr) 40px;text-align:right}.match-player.right .match-player-avatar{grid-column:2;grid-row:1/3}.match-player strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.match-player small{grid-column:2;color:var(--success);font-size:10px}.match-player.right small{grid-column:1}.match-player-avatar{width:40px;height:42px;display:grid;place-items:center;grid-row:1/3;clip-path:polygon(24% 3%,76% 3%,100% 50%,76% 97%,24% 97%,0 50%);background:#24364f;color:var(--text);font-family:'Space Mono',monospace;font-size:10px}.match-player.winner .match-player-avatar{background:rgba(80,216,144,.2);color:var(--success)}.match-score-area{text-align:center;color:var(--text-muted);font-family:'Space Mono',monospace}.match-score-area strong{font-size:22px;color:var(--text)}.match-score-area strong span{padding:0 5px;color:var(--text-muted)}.match-card-notes{padding:7px 9px;margin-top:4px;border-radius:8px;background:rgba(8,14,24,.38);color:var(--text-muted);font-size:11px}
.match-result-form{display:flex;align-items:center;justify-content:flex-end;gap:7px;padding-top:10px;margin-top:8px;border-top:1px solid rgba(38,52,73,.72)}.match-result-form label{margin-right:auto;color:var(--text-muted);font-size:11px;text-transform:uppercase;letter-spacing:.7px}.match-result-form input{width:48px;height:34px;padding:4px;border:1px solid var(--border);border-radius:8px;background:#0b1422;color:var(--text);font-family:'Space Mono',monospace;text-align:center}.match-result-form input:focus{outline:none;border-color:var(--primary)}
.standings-list{display:grid}.standing-row{display:grid;grid-template-columns:24px 36px minmax(0,1fr) 30px 30px 45px;align-items:center;gap:7px;padding:9px 3px;border-top:1px solid rgba(38,52,73,.72)}.standing-row:first-child{border-top:0}.standing-rank{color:var(--text-muted);font-family:'Space Mono',monospace;font-size:10px;text-align:center}.standing-row .match-player-avatar{width:34px;height:36px;font-size:9px}.standing-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:700}.standing-stat{display:grid;text-align:center}.standing-stat b{color:var(--success);font-family:'Space Mono',monospace;font-size:11px}.standing-stat small{color:var(--text-muted);font-size:8px}.standing-stat.loss b{color:var(--danger)}.standing-points{padding:4px 5px;border-radius:6px;background:rgba(245,201,91,.1);color:var(--accent-gold);font-family:'Space Mono',monospace;font-size:9px;text-align:center}.match-empty{display:grid;justify-items:center;padding:40px 18px;border:1px dashed var(--border);border-radius:11px;color:var(--text-muted);text-align:center}.match-empty span{font-size:30px;margin-bottom:8px}.match-empty h3{color:var(--text-dim);font-size:16px}.match-empty p{margin-top:3px;font-size:12px}.match-empty.compact{padding:24px 12px}
@media(max-width:1180px){.match-page-layout{grid-template-columns:1fr}.standings-panel{position:static}.match-create-grid{grid-template-columns:100px 1fr 1fr}.match-notes-field{grid-column:1/-1}}
@media(max-width:700px){.match-page-header{align-items:flex-start;flex-direction:column;padding:18px}.match-page-header .btn{width:100%}.match-summary-grid{grid-template-columns:1fr 1fr}.match-create-grid{grid-template-columns:1fr}.match-notes-field{grid-column:auto}.match-create-actions{display:grid;grid-template-columns:1fr 1fr}.match-list-panel,.standings-panel{padding:11px}.match-list-toolbar{align-items:flex-start;flex-direction:column}.match-filter{width:100%}.match-filter button{flex:1;justify-content:center}.match-players{grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr);gap:7px}.match-player{grid-template-columns:34px minmax(0,1fr);gap:7px}.match-player.right{grid-template-columns:minmax(0,1fr) 34px}.match-player-avatar{width:34px;height:36px}.match-player strong{font-size:13px}.match-result-form{display:grid;grid-template-columns:1fr 44px auto 44px}.match-result-form label{grid-column:1/-1}.match-result-form .btn{grid-column:1/-1;width:100%}.standing-row{grid-template-columns:22px 34px minmax(0,1fr) 28px 28px 42px}}

/* ===================== AUTOMATIC LEAGUE SCHEDULE ===================== */
.match-header-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.match-round-group{display:grid;gap:9px}.match-round-group[hidden]{display:none}.match-round-heading{display:flex;align-items:center;gap:12px;padding:10px 3px 2px}.match-round-heading>div{display:flex;align-items:baseline;gap:8px}.match-round-heading>div span{font-weight:800;font-size:14px}.match-round-heading>div small{font-size:10px;color:var(--text-muted)}.round-progress{position:relative;overflow:hidden;flex:1;height:4px;border-radius:99px;background:rgba(51,68,95,.55)}.round-progress i{position:absolute;inset:0 auto 0 0;border-radius:inherit;background:linear-gradient(90deg,var(--secondary),var(--success))}.match-correction{display:flex;justify-content:flex-end;padding-top:8px;margin-top:7px;border-top:1px solid rgba(38,52,73,.55)}
.standings-list .standing-row{grid-template-columns:22px 34px minmax(0,1fr) 25px 25px 25px 38px 34px;gap:6px;padding:9px 2px}.standings-list .standing-header{padding-top:3px;color:var(--text-muted);font-size:8px;text-transform:uppercase;letter-spacing:.4px}.standings-list .standing-row .match-player-avatar{width:32px;height:34px}.standings-list .standing-name{font-size:12px}.standings-list .standing-stat b{color:var(--text-dim);font-size:10px}.standing-diff{font-family:'Space Mono',monospace;font-size:9px;text-align:center;color:var(--text-muted)}.standing-diff.positive{color:var(--success)}.standing-diff.negative{color:var(--danger)}.standings-list .standing-points{padding:4px;font-size:10px}
@media(max-width:700px){.match-header-actions{display:grid;grid-template-columns:1fr;width:100%}.standings-list .standing-row{grid-template-columns:20px 30px minmax(0,1fr) 22px 22px 22px 34px 30px;gap:4px}.standings-list .standing-row .match-player-avatar{width:29px;height:31px}.standings-list .standing-name{font-size:11px}}

/* Keep refreshed team cards above legacy hub rules. */
#view-hub .hub-team-card.shared{max-width:none}
#view-hub .hub-team-card.own .hub-mon-preview{grid-template-columns:repeat(3,68px)}
#view-hub .hub-team-card.own .hub-mon-slot{width:68px;height:70px}
#view-hub .hub-team-card.own .hub-mon-slot img{width:66px;height:66px}
#view-hub .hub-team-card.shared .hub-mon-preview{grid-template-columns:repeat(3,60px);gap:8px}
#view-hub .hub-team-card.shared .hub-mon-slot{width:60px;height:62px}
#view-hub .hub-team-card.shared .hub-mon-slot img{width:58px;height:58px}
@media(max-width:620px){#view-hub .hub-team-card.own .hub-mon-preview,#view-hub .hub-team-card.shared .hub-mon-preview{grid-template-columns:repeat(3,minmax(0,1fr));width:100%}#view-hub .hub-team-card.own .hub-mon-slot,#view-hub .hub-team-card.shared .hub-mon-slot{width:100%;height:58px}#view-hub .hub-team-card.own .hub-mon-slot img,#view-hub .hub-team-card.shared .hub-mon-slot img{width:56px;height:56px}}

/* Team card layout correction after visual QA. */
#view-hub .hub-team-grid.own-teams{grid-template-columns:repeat(auto-fill,minmax(390px,520px));justify-content:start}
#view-hub .hub-team-grid.shared-teams{grid-template-columns:repeat(auto-fill,minmax(360px,420px));justify-content:start}
#view-hub .hub-team-card,#view-hub .hub-team-card.shared{grid-template-columns:auto minmax(120px,1fr);align-content:start;min-height:205px}
#view-hub .hub-team-card .hub-mon-preview,#view-hub .hub-team-card.shared .hub-mon-preview{display:grid;align-self:start}
#view-hub .hub-team-card-footer{align-self:end;min-width:118px}
@media(max-width:620px){#view-hub .hub-team-grid.own-teams,#view-hub .hub-team-grid.shared-teams{grid-template-columns:1fr}#view-hub .hub-team-card,#view-hub .hub-team-card.shared{grid-template-columns:1fr;min-height:0}#view-hub .hub-team-card-footer{min-width:0}#view-hub .hub-team-card.own .hub-mon-slot,#view-hub .hub-team-card.shared .hub-mon-slot{height:58px}}

/* Readable expanded team details. */
#view-hub .hub-team-pokemon-detail .pokemon-grid{grid-template-columns:repeat(auto-fit,minmax(390px,1fr));gap:16px}
#view-hub .hub-team-pokemon-detail .pokemon-card{position:relative;border-color:#2b3d58;border-radius:14px;background:linear-gradient(145deg,rgba(19,31,49,.98),rgba(12,21,35,.98));box-shadow:0 12px 28px rgba(0,0,0,.2);transition:border-color .18s,transform .18s,box-shadow .18s}
#view-hub .hub-team-pokemon-detail .pokemon-card::before{content:'';position:absolute;z-index:2;left:0;right:0;top:0;height:2px;background:linear-gradient(90deg,var(--accent),var(--accent2),var(--accent3));opacity:.72}
#view-hub .hub-team-pokemon-detail .pokemon-card:hover{border-color:rgba(56,189,248,.42);box-shadow:0 16px 34px rgba(0,0,0,.27);transform:translateY(-2px)}
#view-hub .hub-team-pokemon-detail .pokemon-card-inner{min-height:190px}
#view-hub .hub-team-pokemon-detail .pokemon-sprite-col{width:138px;min-width:138px;padding:16px 10px;background:radial-gradient(circle at 50% 42%,rgba(56,189,248,.12),transparent 48%),linear-gradient(180deg,rgba(24,47,70,.76),rgba(10,18,31,.9))}
#view-hub .hub-team-pokemon-detail .pokemon-sprite-col::before{inset:20px;border-color:rgba(56,189,248,.12);background:radial-gradient(circle,rgba(56,189,248,.1),transparent 64%)}
#view-hub .hub-team-pokemon-detail .pokemon-sprite-col img{width:116px;height:116px;object-fit:contain}
#view-hub .hub-team-pokemon-detail .pokemon-info-col{display:flex;flex-direction:column;padding:16px 16px 14px}
#view-hub .hub-team-pokemon-detail .pokemon-nickname{margin-bottom:3px;color:var(--text-muted);font-size:11px}
#view-hub .hub-team-pokemon-detail .pokemon-name-row{align-items:center;margin-bottom:8px;gap:8px}
#view-hub .hub-team-pokemon-detail .pokemon-name{font-size:17px;line-height:1.25}
#view-hub .hub-team-pokemon-detail .pokemon-types{margin-left:auto}
#view-hub .hub-team-pokemon-detail .type-chip{padding:3px 7px;font-size:9px}
#view-hub .hub-team-pokemon-detail .item-row,#view-hub .hub-team-pokemon-detail .ability-row,#view-hub .hub-team-pokemon-detail .tera-row{margin-bottom:6px;font-size:13px;line-height:1.3}
#view-hub .hub-team-pokemon-detail .moves-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:auto;padding-top:4px}
#view-hub .hub-team-pokemon-detail .move-item{min-width:0;padding:5px 8px;border:1px solid rgba(83,105,136,.14);border-radius:6px;background:rgba(29,44,67,.88);font-size:12px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#view-hub .hub-team-pokemon-detail .move-dot{width:5px;height:5px}
#view-hub .hub-team-pokemon-detail .ev-section{padding:11px 14px 13px;background:rgba(8,16,28,.72)}
#view-hub .hub-team-pokemon-detail .ev-label-row{align-items:center;margin-bottom:8px}
#view-hub .hub-team-pokemon-detail .ev-label{font-size:10px;letter-spacing:.85px}
#view-hub .hub-team-pokemon-detail .ev-nature{font-size:10px}
#view-hub .hub-team-pokemon-detail .ev-bars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 14px}
#view-hub .hub-team-pokemon-detail .ev-bar-row.is-zero{display:none}
#view-hub .hub-team-pokemon-detail .ev-stat-name,#view-hub .hub-team-pokemon-detail .ev-stat-val{font-size:10px}
#view-hub .hub-team-pokemon-detail .ev-bar-bg{height:5px;background:#1b2a40}
@media(max-width:1050px){#view-hub .hub-team-pokemon-detail .pokemon-grid{grid-template-columns:repeat(2,minmax(320px,1fr))}#view-hub .hub-team-pokemon-detail .pokemon-sprite-col{width:120px;min-width:120px}#view-hub .hub-team-pokemon-detail .pokemon-sprite-col img{width:100px;height:100px}}
@media(max-width:760px){#view-hub .hub-team-pokemon-detail .pokemon-grid{grid-template-columns:1fr}#view-hub .hub-team-pokemon-detail .pokemon-card-inner{min-height:0}#view-hub .hub-team-pokemon-detail .pokemon-sprite-col{width:112px;min-width:112px}#view-hub .hub-team-pokemon-detail .pokemon-sprite-col img{width:92px;height:92px}#view-hub .hub-team-pokemon-detail .pokemon-info-col{padding:13px}#view-hub .hub-team-pokemon-detail .pokemon-name{font-size:15px}}
@media(max-width:440px){#view-hub .hub-team-pokemon-detail .pokemon-card-inner{display:grid;grid-template-columns:1fr}#view-hub .hub-team-pokemon-detail .pokemon-sprite-col{width:100%;min-width:0;height:126px;border-right:0;border-bottom:1px solid var(--border)}#view-hub .hub-team-pokemon-detail .moves-list,#view-hub .hub-team-pokemon-detail .ev-bars{grid-template-columns:1fr}}

/* Ruleset-neutral Pokémon set editor. */
#view-hub .pokemon-card.is-editable{cursor:pointer}
#view-hub .pokemon-card.is-editable:focus-visible{border-color:var(--accent2);outline:2px solid rgba(56,189,248,.28);outline-offset:2px}
#view-hub .pokemon-edit-hint{position:absolute;z-index:4;right:10px;top:9px;padding:3px 7px;border:1px solid rgba(56,189,248,.24);border-radius:6px;background:rgba(8,17,29,.88);color:var(--accent2);font-size:9px;font-weight:700;opacity:0;transform:translateY(-2px);transition:.16s;pointer-events:none}
#view-hub .pokemon-card.is-editable:hover .pokemon-edit-hint,#view-hub .pokemon-card.is-editable:focus-visible .pokemon-edit-hint{opacity:1;transform:none}
#hub-pokemon-set-editor{scroll-margin-top:calc(var(--topbar) + 18px)}
#hub-pokemon-set-editor:empty{display:none}
.hub-set-editor{margin:16px 0;padding:18px;border:1px solid rgba(56,189,248,.34);border-radius:14px;background:linear-gradient(145deg,rgba(18,33,51,.98),rgba(10,19,32,.98));box-shadow:0 18px 38px rgba(0,0,0,.25)}
.hub-set-editor-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid var(--border)}
.hub-set-editor-identity{display:flex;align-items:center;gap:12px}.hub-set-editor-identity img{width:66px;height:66px;object-fit:contain;filter:drop-shadow(0 4px 7px rgba(0,0,0,.45))}.hub-set-editor-identity span{color:var(--accent2);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.8px}.hub-set-editor-identity h3{font-size:22px;line-height:1.15}
.hub-set-fields{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px;margin-bottom:14px}.hub-set-field,.hub-set-ev-grid label,.hub-set-move-grid label{display:grid;gap:5px}.hub-set-field>span,.hub-set-ev-grid label>span,.hub-set-move-grid label>span{color:var(--text-muted);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.55px}
.hub-set-editor-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.hub-set-panel{min-width:0;padding:14px;border:1px solid var(--border);border-radius:11px;background:rgba(7,14,25,.38)}.hub-set-panel legend{padding:0 7px;color:var(--text-dim);font-size:12px;font-weight:700}.hub-set-ev-grid{display:grid;grid-template-columns:repeat(3,minmax(90px,1fr));gap:9px}.hub-set-move-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.hub-set-ev-total{margin-top:10px;color:var(--text-muted);font-size:11px;text-align:right}.hub-set-ev-total strong{color:var(--success);font-family:'Space Mono',monospace}.hub-set-ev-total strong.invalid{color:var(--danger)}
.hub-set-editor-actions{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding-top:14px}.hub-set-editor-actions [role="status"]{color:var(--danger);font-size:12px;text-align:center}
@media(max-width:1100px){.hub-set-fields{grid-template-columns:repeat(3,minmax(140px,1fr))}}
@media(max-width:820px){.hub-set-fields{grid-template-columns:1fr 1fr}.hub-set-editor-columns{grid-template-columns:1fr}.hub-set-editor-actions{grid-template-columns:1fr 1fr}.hub-set-editor-actions [role="status"]{grid-column:1/-1;grid-row:1}}
@media(max-width:520px){.hub-set-editor{padding:13px}.hub-set-editor-head{align-items:flex-start}.hub-set-editor-identity img{width:52px;height:52px}.hub-set-editor-identity h3{font-size:18px}.hub-set-fields,.hub-set-ev-grid,.hub-set-move-grid{grid-template-columns:1fr}.hub-set-editor-actions{grid-template-columns:1fr}.hub-set-editor-actions [role="status"]{grid-column:auto;grid-row:auto}.hub-set-editor-actions .btn{width:100%}}

/* Team workspace controls. */
#view-hub .hub-team-editor{padding:22px}
#view-hub .hub-team-detail-head{padding-bottom:18px;border-bottom:1px solid var(--border)}
#view-hub .hub-team-detail-title>div:last-child{min-width:170px}
.hub-team-progress{width:170px;height:5px;margin-top:8px;overflow:hidden;border-radius:99px;background:#1b2a40}
.hub-team-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--primary),var(--accent2));box-shadow:0 0 10px rgba(56,203,176,.35)}
.hub-team-primary-actions{align-items:center}
.hub-team-utility-bar{display:flex;align-items:center;gap:7px;padding:10px 0 12px;border-bottom:1px solid rgba(57,75,101,.55)}
.hub-team-utility-bar .hub-team-import{position:relative;margin:0;border:0}
.hub-team-utility-bar .hub-team-import>summary{min-height:34px;display:flex;align-items:center;padding:0 11px;border-radius:8px;color:var(--text-muted);font-size:11px;cursor:pointer}
.hub-team-utility-bar .hub-team-import>summary:hover{background:rgba(56,189,248,.08);color:var(--text)}
.hub-team-utility-bar .hub-team-import[open]{flex:1}
.hub-team-utility-bar .hub-team-import[open]>summary{margin-bottom:8px}
.hub-team-utility-bar .hub-team-import .form-group{padding:14px;border:1px solid var(--border);border-radius:10px;background:rgba(8,16,28,.7)}
.hub-team-utility-bar .hub-delete-team{margin-left:auto}
.hub-hidden-file{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
.hub-add-pokemon{display:grid;grid-template-columns:minmax(260px,1fr) minmax(360px,1.2fr);align-items:end;gap:24px;margin:16px 0;padding:18px 20px;border:1px dashed rgba(56,189,248,.35);border-radius:13px;background:linear-gradient(120deg,rgba(18,40,57,.75),rgba(10,20,34,.52))}
.hub-add-pokemon-copy>span{color:var(--accent2);font-size:9px;font-weight:700;letter-spacing:.8px;text-transform:uppercase}
.hub-add-pokemon-copy h3{margin:3px 0 5px;font-size:18px}
.hub-add-pokemon-copy p{max-width:560px;color:var(--text-muted);font-size:12px;line-height:1.5}
.hub-add-pokemon-control{display:grid;gap:8px;align-items:end}
.hub-add-pokemon-control .form-label{margin:0}
.hub-add-pokemon-filters{display:grid;grid-template-columns:minmax(180px,1.4fr) minmax(120px,.7fr) minmax(150px,.8fr);gap:8px}
.hub-add-pokemon-result{display:grid;grid-template-columns:minmax(190px,1fr) auto;gap:8px}
.hub-add-pokemon-control .form-select{width:100%;min-height:40px}
.hub-add-pokemon-control>small{color:var(--text-muted);font-size:10px;text-align:right}
.pokemon-order-actions{position:absolute;z-index:5;left:10px;top:9px;display:flex;align-items:center;gap:4px;padding:3px 5px;border:1px solid rgba(56,189,248,.2);border-radius:7px;background:rgba(8,17,29,.92);box-shadow:0 4px 12px rgba(0,0,0,.22)}
.pokemon-order-actions button{width:25px;height:23px;display:grid;place-items:center;border:0;border-radius:5px;background:transparent;color:var(--accent2);font-size:14px;cursor:pointer}
.pokemon-order-actions button:hover:not(:disabled){background:rgba(56,189,248,.14);color:#fff}
.pokemon-order-actions button:disabled{opacity:.25;cursor:default}
.pokemon-order-actions span{min-width:16px;color:var(--text-muted);font:700 9px 'Space Mono',monospace;text-align:center}
.hub-ruleset-context{display:grid;grid-template-columns:minmax(140px,.55fr) minmax(220px,.8fr) minmax(320px,1.65fr);align-items:start;gap:18px;margin:16px 0;padding:17px 19px;border:1px solid rgba(155,124,255,.28);border-radius:13px;background:linear-gradient(125deg,rgba(34,28,58,.7),rgba(11,20,34,.72))}
.hub-ruleset-context>div:first-child>span{color:#b9a3ff;font-size:9px;font-weight:700;letter-spacing:.8px;text-transform:uppercase}
.hub-ruleset-context h3{margin-top:3px;font-size:18px}
.hub-ruleset-context label{display:grid;gap:6px}
.hub-ruleset-details{min-width:0}
.hub-ruleset-facts{display:flex;flex-wrap:wrap;gap:7px}
.hub-ruleset-facts span{padding:6px 9px;border:1px solid rgba(155,124,255,.2);border-radius:7px;background:rgba(155,124,255,.07);color:var(--text-muted);font-size:10px}
.hub-ruleset-facts strong{color:var(--text);font-size:11px;text-transform:capitalize}
.hub-ruleset-note{margin-top:7px;color:var(--text-muted);font-size:11px;line-height:1.45}
.hub-ruleset-warning{margin-top:8px;padding:7px 9px;border-left:2px solid var(--warning);background:rgba(245,158,11,.08);color:#f3ca7a;font-size:11px}
.hub-team-check{margin:16px 0;border:1px solid var(--border);border-radius:12px;background:rgba(8,16,28,.55);overflow:hidden}
.hub-team-check>summary{display:grid;grid-template-columns:36px 1fr auto;align-items:center;gap:11px;padding:13px 15px;cursor:pointer;list-style:none}
.hub-team-check>summary::-webkit-details-marker{display:none}
.hub-team-check-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;font:800 18px 'Space Mono',monospace}
.hub-team-check.complete{border-color:rgba(52,211,153,.28)}.hub-team-check.complete .hub-team-check-icon{background:rgba(52,211,153,.13);color:var(--success)}
.hub-team-check.warning{border-color:rgba(245,158,11,.3)}.hub-team-check.warning .hub-team-check-icon{background:rgba(245,158,11,.12);color:var(--warning)}
.hub-team-check.error{border-color:rgba(248,113,113,.34)}.hub-team-check.error .hub-team-check-icon{background:rgba(248,113,113,.12);color:var(--danger)}
.hub-team-check summary strong{display:block;font-size:13px}.hub-team-check summary small{display:block;margin-top:2px;color:var(--text-muted);font-size:10px}.hub-team-check-toggle{color:var(--text-muted);font-size:10px}
.hub-team-check-group{padding:0 14px 14px}.hub-team-check-group+ .hub-team-check-group{padding-top:2px}.hub-team-check-group h4{display:flex;align-items:center;gap:7px;margin:0 0 7px;color:var(--text-dim);font-size:11px}.hub-team-check-group h4 span{min-width:20px;height:19px;display:grid;place-items:center;border-radius:6px;background:rgba(255,255,255,.06);font:700 9px 'Space Mono',monospace}.hub-team-check-group.error h4{color:var(--danger)}.hub-team-check-group.warning h4{color:var(--warning)}
.hub-team-check ul{display:grid;gap:6px;padding:0;list-style:none}.hub-team-check li{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px 10px;border-radius:8px;background:rgba(18,31,48,.72)}
.hub-team-check li>span{font-size:8px;font-weight:800;letter-spacing:.55px;text-transform:uppercase}.hub-team-check li.error>span{color:var(--danger)}.hub-team-check li.warning>span{color:var(--warning)}.hub-team-check li p{color:var(--text);font-size:12px}.hub-team-check li div small{display:block;margin-top:2px;color:var(--text-muted);font-size:10px;line-height:1.35}.hub-team-check-success{padding:0 15px 14px;color:var(--success);font-size:11px}
#view-hub .hub-team-pokemon-detail>.empty-state{min-height:170px;display:grid;place-items:center;align-content:center;border:1px dashed var(--border);border-radius:13px;background:rgba(8,16,28,.32)}
@media(max-width:900px){.hub-add-pokemon{grid-template-columns:1fr}.hub-team-primary-actions{width:100%}.hub-team-utility-bar{flex-wrap:wrap}.hub-team-utility-bar .hub-delete-team{margin-left:0}}
@media(max-width:980px){.hub-ruleset-context{grid-template-columns:1fr 1.5fr}.hub-ruleset-details{grid-column:1/-1}}
@media(max-width:720px){.hub-add-pokemon-filters{grid-template-columns:1fr 1fr}.hub-add-pokemon-filters .form-input{grid-column:1/-1}}
@media(max-width:620px){#view-hub .hub-team-editor{padding:14px}.hub-team-progress{width:min(170px,55vw)}.hub-add-pokemon{padding:14px}.hub-add-pokemon-result,.hub-add-pokemon-filters{grid-template-columns:1fr}.hub-add-pokemon-filters .form-input{grid-column:auto}.hub-add-pokemon-control .btn{width:100%}.hub-team-utility-bar{display:grid;grid-template-columns:1fr 1fr}.hub-team-utility-bar .btn{width:100%}.hub-team-utility-bar .hub-team-import{grid-column:1/-1}.hub-team-utility-bar .hub-delete-team{grid-column:1/-1}.hub-ruleset-context{grid-template-columns:1fr;padding:14px}.hub-ruleset-details{grid-column:auto}.hub-team-check li{grid-template-columns:48px 1fr}.hub-team-check li .btn{grid-column:1/-1;width:100%}}

/* Public-beta Realtime-Draft states. */
.draft-realtime-state{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:5px 8px;border:1px solid var(--border);border-radius:8px;background:rgba(10,18,32,.72);color:var(--text-muted);font-size:10px;white-space:nowrap}
.draft-realtime-state>span{width:7px;height:7px;border-radius:50%;background:#64748b}
.draft-realtime-state.connected{border-color:rgba(52,211,153,.3);color:var(--success)}.draft-realtime-state.connected>span{background:var(--success);box-shadow:0 0 8px rgba(52,211,153,.6)}
.draft-realtime-state.connecting>span{background:var(--warning);animation:draft-status-pulse 1.2s infinite}
.draft-realtime-state.error,.draft-realtime-state.offline{border-color:rgba(248,113,113,.34);color:var(--danger)}.draft-realtime-state.error>span,.draft-realtime-state.offline>span{background:var(--danger)}
.draft-configuration-error{display:flex;flex-wrap:wrap;align-items:center;gap:7px 12px;margin:12px 0;padding:10px 12px;border:1px solid rgba(248,113,113,.32);border-radius:10px;background:rgba(127,29,29,.1);color:var(--text-dim);font-size:11px}.draft-configuration-error strong{color:var(--danger)}
@keyframes draft-status-pulse{50%{opacity:.35;transform:scale(.85)}}
@media(max-width:620px){.draft-realtime-state{width:100%;justify-content:center}.draft-status-actions{width:100%}.draft-configuration-error{align-items:flex-start;flex-direction:column}}

/* Dedicated Team Builder. */
.team-builder-page{display:grid;gap:18px}
.builder-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:22px;border:1px solid var(--border);border-radius:18px;background:linear-gradient(135deg,rgba(14,27,43,.96),rgba(8,15,26,.96));box-shadow:0 18px 42px rgba(0,0,0,.26)}
.builder-header h1{margin:4px 0 6px;font-size:32px;line-height:1.05}.builder-header p{color:var(--text-muted);font-size:13px;text-transform:capitalize}.builder-header-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}.builder-format-select{width:auto;min-width:120px}
.builder-layout{display:grid;grid-template-columns:260px minmax(0,1fr) 320px;gap:16px;align-items:start}
.builder-sidebar,.builder-card{border:1px solid var(--border);border-radius:16px;background:rgba(10,19,32,.82);box-shadow:0 12px 34px rgba(0,0,0,.22)}
.builder-sidebar{position:sticky;top:calc(var(--topbar) + 16px);display:grid;gap:12px;padding:14px}
.builder-panel-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.builder-panel-title span{color:var(--accent2);font-size:10px;font-weight:800;letter-spacing:.7px;text-transform:uppercase}.builder-panel-title strong{color:var(--text);font:800 13px 'Space Mono',monospace}
.builder-slots{display:grid;gap:8px}.builder-slot{width:100%;display:grid;grid-template-columns:26px 48px minmax(0,1fr);align-items:center;gap:9px;min-height:66px;padding:8px;border:1px solid rgba(57,75,101,.75);border-radius:12px;background:rgba(14,25,41,.86);color:var(--text);text-align:left;cursor:pointer}.builder-slot:hover,.builder-slot.active{border-color:rgba(56,189,248,.58);background:rgba(18,38,58,.95)}.builder-slot img{width:48px;height:48px;object-fit:contain;filter:drop-shadow(0 4px 8px rgba(0,0,0,.35))}.builder-slot strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.builder-slot-index{display:grid;place-items:center;width:24px;height:24px;border-radius:7px;background:rgba(56,189,248,.1);color:var(--accent2);font:800 10px 'Space Mono',monospace}.builder-slot.empty{opacity:.55;cursor:default}
.builder-card{padding:18px}.builder-editor-card{display:grid;gap:18px}.builder-editor-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:14px;border-bottom:1px solid var(--border)}.builder-editor-identity{display:flex;align-items:center;gap:13px}.builder-editor-identity img{width:82px;height:82px;object-fit:contain;filter:drop-shadow(0 6px 12px rgba(0,0,0,.42))}.builder-editor-identity span{color:var(--accent2);font-size:10px;font-weight:800;letter-spacing:.75px;text-transform:uppercase}.builder-editor-identity h2{font-size:26px}
.builder-editor-identity small{display:block;margin-top:2px;color:var(--text-muted);font-size:12px}
.builder-type-row{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.builder-type-row .type-chip{font-size:10px;padding:3px 7px;letter-spacing:.35px}
.builder-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:16px}.builder-fields{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:10px}.builder-field,.builder-move-grid label,.builder-spread-grid label{display:grid;gap:5px}.builder-field>span,.builder-move-grid span,.builder-spread-grid span{color:var(--text-muted);font-size:10px;font-weight:800;letter-spacing:.55px;text-transform:uppercase}
.builder-moves{margin-top:16px}.builder-moves h3,.builder-distribution h3{margin-bottom:8px;font-size:15px}.builder-move-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.builder-move-field{min-width:0;padding:0;border:0;background:transparent}
.builder-move-field .form-select{min-height:46px;font-size:14px;font-weight:800;color:var(--text)}
.builder-move-info{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;margin-top:7px;padding:7px 8px;border:1px solid rgba(83,105,136,.22);border-radius:8px;background:rgba(13,25,41,.42)}
.builder-move-info p{min-width:0;margin:0;color:var(--text-muted);font-size:11px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.builder-move-empty{display:block;color:var(--text-muted);font-size:11px;text-align:left}
.builder-move-meta{display:flex;align-items:center;flex-wrap:nowrap;gap:5px;min-width:0}
.builder-move-meta span:not(.type-chip){display:inline-flex;align-items:center;gap:3px;min-height:20px;padding:2px 6px;border:1px solid rgba(83,105,136,.28);border-radius:6px;background:rgba(26,38,58,.62);color:var(--text-dim);font-size:9px;font-weight:800;text-transform:uppercase;white-space:nowrap}
.builder-move-meta strong{color:var(--text);font-family:'Space Mono',monospace;font-size:9px}
.builder-picker-select{min-width:0}
.builder-picker-help{display:-webkit-box;min-height:28px;margin-top:2px;color:var(--text-muted);font-size:10px;line-height:1.35;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.builder-picker-help:empty::before{content:"";display:block}
.builder-picker-note{margin-top:10px;padding:8px 10px;border:1px solid rgba(56,189,248,.18);border-radius:9px;background:rgba(56,189,248,.06);color:var(--text-muted);font-size:11px;line-height:1.4}
.builder-live-stats{padding:14px;border:1px solid rgba(56,189,248,.2);border-radius:14px;background:radial-gradient(circle at top right,rgba(56,189,248,.12),transparent 38%),rgba(7,14,25,.62)}.builder-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.builder-stat{padding:9px;border:1px solid rgba(57,75,101,.7);border-radius:10px;background:rgba(12,24,39,.8)}.builder-stat span{display:block;color:var(--text-muted);font-size:10px}.builder-stat strong{display:block;margin-top:2px;font:800 20px 'Space Mono',monospace;color:var(--text)}.builder-stat:last-child{border-color:rgba(250,204,21,.32)}.builder-stats-missing{margin-top:12px;padding:12px;border:1px dashed var(--border);border-radius:10px;color:var(--text-muted);font-size:12px;text-align:center}
.builder-distribution{padding:15px;border:1px solid rgba(57,75,101,.65);border-radius:14px;background:rgba(7,14,25,.45)}.builder-distribution p{margin-bottom:12px;color:var(--text-muted);font-size:12px}.builder-spread-grid{display:grid;grid-template-columns:repeat(6,minmax(72px,1fr));gap:8px}.builder-spread-total{margin-top:10px;color:var(--text-muted);font-size:12px;text-align:right}.builder-spread-total strong{color:var(--success);font-family:'Space Mono',monospace}.builder-iv-details{margin-top:12px}.builder-iv-details summary{color:var(--accent2);font-size:12px;cursor:pointer}.builder-iv-details .builder-spread-grid{margin-top:10px}
.builder-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.builder-actions span{color:var(--danger);font-size:12px}
.builder-add-card{display:grid;gap:16px}.builder-add-card p{color:var(--text-muted);font-size:13px}.builder-add-row{display:grid;grid-template-columns:minmax(160px,.75fr) minmax(220px,1fr) auto;gap:9px;align-items:end}.builder-add-card small{color:var(--text-muted);font-size:11px;text-align:right}
.builder-right-rail{display:grid;gap:14px;position:sticky;top:calc(var(--topbar) + 16px)}.builder-speed-list,.builder-check-list{display:grid;gap:7px;margin-top:12px}.builder-speed-row{display:grid;grid-template-columns:38px minmax(0,1fr) 54px;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;background:rgba(15,28,45,.8)}.builder-speed-row b{color:var(--accent2);font:800 11px 'Space Mono',monospace}.builder-speed-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-size:12px}.builder-speed-row strong{text-align:right;color:#facc15;font:800 14px 'Space Mono',monospace}
.builder-check-item{display:grid;grid-template-columns:54px minmax(0,1fr);gap:8px;padding:9px 10px;border-radius:10px;background:rgba(15,28,45,.8)}.builder-check-item b{font-size:9px;text-transform:uppercase}.builder-check-item.error b{color:var(--danger)}.builder-check-item.warning b{color:var(--warning)}.builder-check-item span{color:var(--text-muted);font-size:12px;line-height:1.35}.builder-empty,.builder-empty.error{display:grid;gap:6px;place-items:center;min-height:280px;color:var(--text-muted);text-align:center}.builder-empty strong,.builder-empty.error strong{color:var(--text);font-size:16px}.builder-empty-inline{padding:12px;border:1px dashed var(--border);border-radius:10px;color:var(--text-muted);font-size:12px;text-align:center}
.builder-defense-list{display:grid;gap:5px;margin-top:8px}
.builder-defense-head,.builder-defense-row{display:grid;grid-template-columns:minmax(78px,1fr) 34px 34px 34px 42px;align-items:center;gap:6px}
.builder-defense-head{padding:0 8px;color:var(--text-muted);font-size:9px;text-transform:uppercase;letter-spacing:.45px}
.builder-defense-row{min-height:32px;padding:5px 7px;border-radius:9px;background:rgba(15,28,45,.8)}
.builder-defense-row .type-chip{justify-self:start;font-size:8px;padding:3px 6px}
.builder-defense-row b,.builder-defense-row strong{text-align:center;font-family:'Space Mono',monospace;font-size:11px}
.builder-defense-row b{color:var(--text-muted)}
.builder-defense-row.good strong{color:var(--success)}
.builder-defense-row.bad strong{color:var(--danger)}
.builder-defense-row.even strong{color:var(--text-muted)}
.champions-intro{border-color:rgba(250,204,21,.28);background:linear-gradient(135deg,rgba(43,35,15,.45),rgba(10,19,32,.78))}
.champions-tournament-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;border-color:rgba(155,124,255,.32);background:linear-gradient(135deg,rgba(31,27,55,.72),rgba(10,19,32,.82))}
.champions-tournament-panel p{max-width:720px;margin-top:6px;color:var(--text-muted);font-size:13px;line-height:1.55}
.champions-tournament-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:1280px){.builder-layout{grid-template-columns:230px minmax(0,1fr)}.builder-right-rail{grid-column:1/-1;position:static;grid-template-columns:1fr 1fr}.builder-sidebar{top:calc(var(--topbar) + 10px)}}
@media(max-width:980px){.builder-header{display:grid}.builder-header-actions{justify-content:flex-start}.builder-layout{grid-template-columns:1fr}.builder-sidebar,.builder-right-rail{position:static}.builder-slots{grid-template-columns:repeat(2,minmax(0,1fr))}.builder-editor-grid{grid-template-columns:1fr}.builder-fields{grid-template-columns:1fr 1fr}.builder-spread-grid{grid-template-columns:repeat(3,minmax(72px,1fr))}.builder-right-rail{grid-template-columns:1fr}}
@media(max-width:640px){.builder-header{padding:16px}.builder-header h1{font-size:24px}.builder-header-actions .btn,.builder-format-select{width:100%}.builder-slots{grid-template-columns:1fr}.builder-card{padding:14px}.builder-editor-head{align-items:flex-start}.builder-editor-identity img{width:62px;height:62px}.builder-editor-identity h2{font-size:20px}.builder-fields,.builder-move-grid,.builder-add-row{grid-template-columns:1fr}.builder-spread-grid{grid-template-columns:1fr 1fr}.builder-stat-grid{grid-template-columns:1fr 1fr}.champions-tournament-panel{display:grid}.champions-tournament-actions{display:grid;grid-template-columns:1fr}.champions-tournament-actions .btn{width:100%}}

/* Team Builder polish after visual QA. */
.builder-header{align-items:center;padding:20px 24px}
.builder-header>div:first-child{min-width:0}
.builder-header h1{margin:6px 0 4px}
.builder-header p{margin:0;line-height:1.35}
.builder-header-actions{max-width:620px}
.builder-layout{display:grid;grid-template-columns:1fr;gap:18px}
.builder-detail-layout{display:grid;grid-template-columns:minmax(680px,1fr) 320px;gap:24px;align-items:start}
.builder-team-strip{display:grid;gap:12px;padding:16px;border:1px solid var(--border);border-radius:16px;background:rgba(10,19,32,.82);box-shadow:0 12px 34px rgba(0,0,0,.22)}
.builder-team-strip .builder-slots{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.builder-team-strip .builder-slot{position:relative;grid-template-columns:26px minmax(0,1fr);grid-template-rows:auto auto 1fr;align-items:start;min-height:250px;padding:12px;border-radius:14px}
.builder-team-strip .builder-slot img{grid-column:1/-1;justify-self:center;width:86px;height:86px;margin-top:8px}
.builder-team-strip .builder-slot-index{position:absolute;top:10px;left:10px}
.builder-slot-copy{grid-column:1/-1;display:grid;gap:4px;min-width:0;text-align:center}
.builder-slot-copy strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.builder-slot-copy small{min-height:30px;color:var(--text-muted);font-size:10px;line-height:1.35}
.builder-slot-copy .builder-type-row{justify-content:center;margin-top:0}
.builder-slot-copy .builder-type-row .type-chip{font-size:8px;padding:2px 5px}
.builder-slot-bars{grid-column:1/-1;align-self:end;display:grid;gap:5px;margin-top:8px}
.builder-slot-bars span{display:grid;grid-template-columns:30px minmax(0,1fr) 32px;align-items:center;gap:6px;color:var(--text-muted);font-size:9px}
.builder-slot-bars i{display:block;height:6px;border-radius:999px;background:linear-gradient(90deg,var(--accent2),var(--accent));box-shadow:0 0 10px rgba(56,189,248,.18)}
.builder-slot-bars em{font-style:normal;text-align:right;color:var(--text);font-family:'Space Mono',monospace}
.builder-team-strip .builder-slot.empty{display:grid;place-items:center;grid-template-columns:1fr;grid-template-rows:auto auto auto;min-height:250px;text-align:center}
.builder-team-strip .builder-slot.empty .builder-slot-index{position:static}
.builder-team-strip .builder-slot.empty strong{font-size:34px;color:var(--accent2)}
.builder-team-strip .builder-slot.empty small{color:var(--text-muted);font-size:12px}
.builder-sidebar{gap:14px;padding:16px}
.builder-slots{gap:10px}
.builder-slot{min-height:64px;border-radius:11px}
.builder-slot.empty{min-height:56px;background:rgba(12,22,36,.58);opacity:.7}
.builder-slot.empty strong{color:var(--text-muted);font-size:12px}
.builder-editor-card{gap:16px;padding:22px}
.builder-editor-head{padding-bottom:18px}
.builder-editor-identity img{width:74px;height:74px}
.builder-editor-grid{grid-template-columns:minmax(0,1fr) 300px;gap:18px;align-items:start}
.builder-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.builder-field .form-input,.builder-field .form-select,.builder-move-grid .form-select{min-height:44px}
.builder-move-field .form-select{min-height:46px}
.builder-moves{margin-top:18px}
.builder-move-grid{gap:12px}
.builder-picker-note{margin-top:12px}
.builder-live-stats{align-self:start;padding:16px}
.builder-stat-grid{gap:10px}
.builder-stat{min-height:70px;padding:11px}
.builder-distribution{padding:18px 18px 14px}
.builder-distribution p{margin-bottom:14px}
.builder-spread-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.builder-spread-total{margin-top:12px}
.builder-actions{justify-content:flex-end;padding-top:2px}
.builder-actions span{margin-right:auto}
.builder-right-rail{gap:18px}
.builder-speed-card,.builder-check-card{padding:18px}
.builder-speed-row{grid-template-columns:42px minmax(0,1fr) 58px;padding:11px 12px}
.builder-check-list{gap:8px}
.builder-check-item{grid-template-columns:54px minmax(0,1fr);align-items:start;padding:10px 12px}
.builder-check-item b{display:inline-flex;align-items:center;justify-content:center;min-height:22px;border-radius:6px;background:rgba(245,158,11,.1);font-size:8px}
.builder-check-item span{line-height:1.45}
@media(max-width:1500px){.builder-detail-layout{grid-template-columns:minmax(0,1fr)}.builder-right-rail{position:static;grid-template-columns:1fr 1fr}.builder-editor-grid{grid-template-columns:minmax(0,1fr) 280px}.builder-team-strip .builder-slots{grid-template-columns:repeat(3,minmax(0,1fr))}.builder-team-strip .builder-slot{min-height:230px}}
@media(max-width:980px){.builder-layout{grid-template-columns:1fr;gap:16px}.builder-detail-layout{grid-template-columns:1fr}.builder-right-rail{grid-template-columns:1fr}.builder-sidebar{position:static}.builder-team-strip .builder-slots{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.builder-header{display:grid;padding:16px}.builder-header-actions{max-width:none}.builder-header-actions .btn,.builder-format-select{width:100%}.builder-editor-card{padding:14px}.builder-editor-grid,.builder-fields,.builder-move-grid{grid-template-columns:1fr}.builder-team-strip .builder-slots{grid-template-columns:1fr}.builder-spread-grid{grid-template-columns:1fr 1fr}.builder-live-stats{order:2}}

/* Mid-width desktop readability: keep tournament content wide when browser zoom reduces CSS width. */
@media(max-width:1450px) and (min-width:821px){
  #view-tournament .app-shell{
    grid-template-columns:1fr;
    gap:18px;
  }
  #view-tournament .app-sidebar{
    position:static;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
    padding:12px;
  }
  #view-tournament .app-sidebar-title{
    grid-column:1/-1;
    margin-bottom:0;
  }
  #view-tournament .app-sidebar .modal-tab{
    min-height:42px;
    padding:10px 12px;
    font-size:14px;
  }
  .draft-hub-expanded{
    padding:24px;
  }
  .draft-hub-expanded .draft-live-grid{
    grid-template-columns:minmax(250px,280px) minmax(0,1fr);
    gap:22px;
  }
  .draft-hub-expanded .draft-live-grid>aside:last-child{
    grid-column:1/-1;
    position:static;
  }
  .draft-hub-expanded .draft-pool-toolbar{
    grid-template-columns:minmax(320px,1fr) minmax(170px,210px) auto;
    gap:12px;
  }
  .draft-hub-expanded .draft-pokemon-grid{
    grid-template-columns:repeat(2,minmax(280px,1fr));
    gap:16px;
    padding-right:0;
    overflow-x:hidden;
  }
  .draft-hub-expanded .draft-mon-card{
    display:grid;
    grid-template-columns:96px minmax(0,1fr);
    min-height:132px;
    padding:15px;
    gap:16px;
  }
  .draft-mon-info{
    min-width:0;
    width:100%;
  }
  .draft-hub-expanded .draft-mon-sprite{
    flex-basis:96px;
    width:96px;
    height:96px;
  }
  .draft-hub-expanded .draft-mon-sprite img{
    width:92px;
    height:92px;
  }
  .draft-mon-info>strong{
    display:block;
    width:100%;
    max-width:100%;
    font-size:18px;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
    line-height:1.18;
  }
  .draft-type{
    padding:4px 9px;
    font-size:11px!important;
  }
  .draft-meta-pill{
    min-height:28px;
    min-width:64px;
    justify-content:center;
    font-size:12px;
  }
  .draft-hub-expanded .draft-history{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:9px;
    max-height:none;
    overflow:visible;
  }
  .draft-hub-expanded .draft-history>div:not(.empty-state){
    border:1px solid rgba(51,68,95,.45);
    border-radius:10px;
    background:rgba(15,23,38,.56);
  }
}

/* Wide desktop draft layout for 1920x1080 through 2560x1440. */
@media(min-width:1451px){
  #view-tournament .app-shell{
    grid-template-columns:240px minmax(0,1fr);
    gap:22px;
  }
  .draft-hub-expanded{
    padding:26px;
  }
  .draft-hub-expanded .draft-live-grid{
    grid-template-columns:minmax(280px,300px) minmax(0,1fr) minmax(300px,320px);
    gap:28px;
  }
  .draft-hub-expanded .draft-pool-main{
    min-width:0;
    width:100%;
  }
  .draft-hub-expanded .draft-pool-toolbar{
    grid-template-columns:minmax(360px,1fr) minmax(180px,220px) auto;
    gap:14px;
    margin-bottom:18px;
  }
  .draft-hub-expanded .draft-pokemon-grid{
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:18px;
    padding-right:0;
    overflow-x:hidden;
    max-height:calc(100vh - 390px);
  }
  .draft-hub-expanded .draft-mon-card{
    display:grid;
    grid-template-columns:112px minmax(0,1fr);
    min-height:164px;
    padding:18px;
    gap:18px;
    align-items:center;
  }
  .draft-hub-expanded .draft-mon-sprite{
    width:112px;
    height:112px;
    flex-basis:112px;
  }
  .draft-hub-expanded .draft-mon-sprite img{
    width:106px;
    height:106px;
  }
  .draft-mon-info{
    width:100%;
    min-width:0;
  }
  .draft-mon-info>strong{
    display:block;
    width:100%;
    max-width:100%;
    font-size:20px;
    line-height:1.15;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
  }
  .draft-mon-types{
    gap:6px;
    margin-top:8px;
  }
  .draft-type{
    padding:4px 10px;
    font-size:12px!important;
  }
  .draft-mon-meta{
    gap:8px;
    margin-top:10px;
  }
  .draft-meta-pill{
    min-height:30px;
    min-width:70px;
    justify-content:center;
    font-size:12px;
    white-space:nowrap;
    overflow:visible;
    text-overflow:clip;
  }
  .draft-hub-expanded .draft-roster{
    padding:14px;
  }
  .draft-hub-expanded .draft-roster-mons img{
    width:54px;
    height:54px;
  }
  .draft-hub-expanded .draft-roster-mons span{
    font-size:10px;
  }
  .draft-hub-expanded .draft-history{
    max-height:calc(100vh - 390px);
    overflow:auto;
  }
}

@media(min-width:821px){
  .draft-mon-card .draft-meta-pill{
    display:inline-grid;
    place-items:center;
    min-width:78px;
    min-height:34px;
    padding:5px 12px;
    border-radius:10px;
    background:rgba(47,61,83,.78);
    border:1px solid rgba(148,163,184,.24);
    color:#dbe7f8;
    font-size:12px;
    font-weight:800;
    text-align:center;
    box-shadow:inset 0 -10px 18px rgba(0,0,0,.14);
  }
  .draft-mon-card .draft-cost-pill{
    background:rgba(250,204,21,.2);
    border-color:rgba(250,204,21,.38);
    color:#fde047;
  }
}
