
:root{
  --bg:#0a0810;
  --bg-grid:#0f0c16;
  --panel:#17141f;
  --panel-2:#211a2d;
  --panel-3:#2a2038;
  --panel-light:#c8c8c8;
  --panel-light-2:#b7b7b7;
  --text:#f4f1f7;
  --text-dark:#232028;
  --muted:#a69eaf;
  --line:#4d3d5e;
  --line-strong:#6a4d84;
  --accent:#5b2f82;
  --accent-2:#7d43ad;
  --accent-3:#a161d2;
  --accent-soft:#2a173d;
  --success:#82c96e;
  --danger:#da6f81;
  --warning:#e6b15a;
  --shadow:0 5px 0 #050407,0 0 0 1px rgba(255,255,255,.03);
  --pixel-border:3px;
}

*{box-sizing:border-box}
html{color-scheme:dark}
body{
  margin:0;
  min-height:100vh;
  color:var(--text);
  font-family:"Courier New",Consolas,monospace;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px),
    var(--bg);
  background-size:32px 32px,32px 32px,auto;
  image-rendering:pixelated;
}
a{color:inherit;text-decoration:none}
button,input{font:inherit}
button{color:inherit}
.shell{
  width:min(1220px,calc(100% - 26px));
  margin:0 auto;
  padding:18px 0 60px;
}

.site-footer{
  margin-top:48px;
  padding:22px 0 0;
  border-top:1px solid #403847;
  color:#858585;
  font:11px/1.6 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  text-align:center;
}
.site-footer-links{
  display:flex;
  justify-content:center;
  gap:18px;
  margin-bottom:8px;
}
.site-footer a{color:#c6bdcc}
.site-footer a:hover,.site-footer a:focus-visible{color:#fff}
.site-footer p{margin:3px 0}

.legal-page{
  width:min(860px,100%);
  margin:34px auto 0;
  padding:28px;
  border:3px solid #9f9a9f;
  background:#101011;
  box-shadow:inset 0 0 0 3px #29282b,5px 5px 0 #67646a,8px 8px 0 #1a181d;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.legal-page h1{margin:0 0 28px;font-size:clamp(32px,5vw,52px)}
.legal-page h2{margin:30px 0 10px;color:#f4f1f7;font-size:18px;line-height:1.25}
.legal-page h3{margin:22px 0 8px;color:#f4f1f7;font-size:14px;line-height:1.3}
.legal-page p,.legal-page li{color:#b8b1bd;font-size:13px;line-height:1.7}
.legal-page p{margin:0 0 12px}
.legal-page ul{margin:0 0 14px;padding-left:20px}
.legal-page a{color:#c58ce9;text-decoration:underline;text-underline-offset:3px}

@media(max-width:768px){
  .legal-page{margin-top:24px;padding:20px 16px}
  .site-footer{margin-top:36px}
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:20px;
  font-weight:900;
  letter-spacing:-.06em;
  text-transform:uppercase;
}
.brand-ball{
  width:22px;
  height:22px;
  border:3px solid #140f1a;
  border-radius:3px;
  background:linear-gradient(135deg,var(--accent-3),var(--accent));
  box-shadow:2px 2px 0 #000;
}
.brand-word>span{color:var(--accent-3)}

.theme-toggle{
  position:fixed;
  right:12px;
  top:10px;
  z-index:50;
  display:flex;
  gap:3px;
  padding:3px;
  border:2px solid var(--line);
  background:var(--panel);
  box-shadow:var(--shadow);
}
.theme-toggle button{
  width:29px;
  height:29px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
}
.theme-toggle button.is-active{
  background:var(--accent);
  color:#fff;
}
.theme-toggle svg{width:14px;height:14px}

.hero{
  min-height:calc(100vh - 80px);
  display:grid;
  place-items:center;
}
.hero-card,.card,.dialog{
  border:var(--pixel-border) solid var(--line);
  border-radius:0;
  background:var(--panel);
  box-shadow:var(--shadow);
}
.hero-card{
  width:min(760px,100%);
  padding:30px;
}
.kicker{
  display:inline-flex;
  padding:5px 8px;
  border:2px solid var(--accent-3);
  background:var(--accent);
  color:#fff;
  font-size:10px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}
h1{
  margin:12px 0 10px;
  font-size:clamp(38px,6vw,66px);
  line-height:.95;
  letter-spacing:-.055em;
}
.lead{
  max-width:62ch;
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}
.home-actions{
  display:grid;
  gap:8px;
  margin-top:24px;
}
.action{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:0 14px;
  border:2px solid var(--line);
  border-radius:0;
  background:var(--panel-2);
  box-shadow:2px 2px 0 #000;
  cursor:pointer;
}
.action:hover{
  border-color:var(--accent-3);
  background:var(--panel-3);
}
.action strong{
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
}
.action small{
  color:var(--muted);
  font-size:10px;
}
.action.primary{
  background:var(--accent);
  border-color:var(--accent-3);
  color:#fff;
}
.action.primary small{color:rgba(255,255,255,.72)}
.action.is-disabled{opacity:.42}

.page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin:26px 0 16px;
}
.page-head h1{
  margin:7px 0 0;
  font-size:clamp(34px,5vw,58px);
}
.pad{padding:18px}
.grid{display:grid;gap:12px}
.game-grid{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}
.game-card{
  min-height:145px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:16px;
  border:3px solid var(--line);
  border-radius:0;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px),
    var(--panel-2);
  background-size:12px 12px;
  box-shadow:3px 3px 0 #050407;
  cursor:pointer;
}
.game-card:hover{
  border-color:var(--accent-3);
}
.game-card:has(input:checked){
  border-color:var(--accent-3);
  box-shadow:0 0 0 2px var(--accent),3px 3px 0 #050407;
}
.game-card strong{
  font-size:15px;
  font-weight:900;
  text-transform:uppercase;
}
.game-card .player-sub{
  margin-top:5px;
  color:var(--muted);
  font-size:10px;
}
.game-card.is-disabled{
  opacity:.42;
  cursor:not-allowed;
}

.label{
  display:block;
  margin-bottom:6px;
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
}
.input{
  width:100%;
  height:44px;
  padding:0 11px;
  border:2px solid var(--line);
  border-radius:0;
  background:#0d0a12;
  color:var(--text);
  outline:0;
}

.input:focus{
  border-color:var(--accent-3);
  box-shadow:inset 0 0 0 1px var(--accent);
}
.form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.btn{
  min-height:38px;
  padding:0 11px;
  border:2px solid var(--line);
  border-radius:0;
  background:var(--panel-2);
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  box-shadow:2px 2px 0 #050407;
  cursor:pointer;
}
.btn:hover{
  border-color:var(--accent-3);
  background:var(--panel-3);
}
.btn.primary{
  background:var(--accent);
  border-color:var(--accent-3);
  color:#fff;
}
.btn.danger{color:var(--danger)}

.run-toolbar,.run-meta{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
}
.pill{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:0 7px;
  border:2px solid var(--line);
  border-radius:0;
  background:var(--panel-2);
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
}

/* old structure retained */
.editor-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:10px;
}
.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
  padding-bottom:7px;
  border-bottom:2px solid var(--line);
}
.section-title h2{
  margin:0;
  font-size:15px;
  text-transform:uppercase;
}
.players{display:grid;gap:7px}
.player-card{
  --player:#9f7aea;
  display:grid;
  grid-template-columns:44px minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:7px;
  border:2px solid var(--line);
  border-left:6px solid var(--player);
  border-radius:0;
  background:var(--panel-2);
}
.avatar{
  width:40px;
  height:44px;
  display:grid;
  place-items:center;
  border:2px solid var(--line);
  border-radius:0;
  background:var(--panel-3);
}
.avatar img,.avatar-option img,.public-player img{
  image-rendering:pixelated;
}
.avatar img{width:27px;height:36px}
.player-name{
  font-size:11px;
  font-weight:900;
}
.player-sub{
  margin-top:2px;
  color:var(--muted);
  font-size:9px;
}
.player-edit{display:grid;gap:12px}
.avatar-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:5px;
}
.avatar-option{
  height:58px;
  display:grid;
  place-items:center;
  border:2px solid var(--line);
  border-radius:0;
  background:var(--panel-2);
  cursor:pointer;
}
.avatar-option img{width:27px;height:41px}
.avatar-option.is-active{
  border-color:var(--accent-3);
  background:var(--accent-soft);
}
.color-grid{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:5px;
}
.color-option{
  height:30px;
  border:2px solid var(--line);
  border-radius:0;
  background:var(--swatch);
  cursor:pointer;
}
.color-option.is-active{
  outline:2px solid #fff;
  outline-offset:-4px;
}

.public-players{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  margin:12px 0;
}
.public-player{
  --player:#9f7aea;
  display:flex;
  align-items:center;
  gap:6px;
  padding:5px 7px;
  border:2px solid var(--line);
  border-left:5px solid var(--player);
  border-radius:0;
  background:var(--panel-2);
}
.public-player img{width:20px;height:27px}
.public-player strong{font-size:10px}

.tm-tabs{
  display:flex;
  gap:0;
  flex-wrap:wrap;
  margin-bottom:10px;
  border:3px solid var(--accent);
  background:var(--panel-2);
}
.tm-tab{
  min-height:34px;
  padding:0 14px;
  border:0;
  border-right:2px solid var(--line);
  border-radius:0;
  background:transparent;
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
}
.tm-tab:last-child{border-right:0}
.tm-tab.active{
  background:var(--accent);
  color:#fff;
}
.tm-route{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:0;
  margin-bottom:10px;
  border:3px solid var(--line);
  background:
    linear-gradient(rgba(0,0,0,.08) 1px,transparent 1px),
    linear-gradient(90deg,rgba(0,0,0,.08) 1px,transparent 1px),
    var(--panel-light);
  background-size:12px 12px;
}
.tm-cell{
  min-height:92px;
  padding:10px;
  border-right:2px solid #8c8c8c;
  border-radius:0;
  background:transparent;
  color:var(--text-dark);
}
.tm-cell:last-child{border-right:0}
.tm-cell strong{
  font-size:11px;
  text-transform:uppercase;
}
.tm-cell small{
  display:block;
  margin-top:6px;
  color:#665f6d;
  font-size:9px;
}
.empty-stage{
  min-height:360px;
  display:grid;
  place-items:center;
  padding:24px;
  border:3px solid var(--line);
  border-radius:0;
  background:
    linear-gradient(rgba(0,0,0,.07) 1px,transparent 1px),
    linear-gradient(90deg,rgba(0,0,0,.07) 1px,transparent 1px),
    var(--panel-light);
  background-size:12px 12px;
  text-align:center;
  color:#5f5867;
}
.empty-stage strong{
  color:#26212c !important;
  font-size:14px;
  text-transform:uppercase;
}

.dialog-backdrop{
  position:fixed;
  inset:0;
  z-index:60;
  display:none;
  place-items:center;
  padding:18px;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(4px);
}
.dialog-backdrop.open{display:grid}
.dialog{
  width:min(480px,100%);
  padding:16px;
}
.dialog h2{
  margin:0 0 7px;
  font-size:17px;
  text-transform:uppercase;
}
.dialog p{
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}
.dialog-actions{
  display:flex;
  justify-content:flex-end;
  gap:6px;
  margin-top:12px;
}
.error{
  margin:9px 0;
  padding:8px 9px;
  border:2px solid #743b48;
  border-radius:0;
  background:#2a151c;
  color:#ffb4bf;
  font-size:10px;
}

@media(max-width:820px){
  .editor-grid{grid-template-columns:1fr}
  .form-row{grid-template-columns:1fr}
  .hero-card{padding:24px}
  .tm-route{grid-template-columns:1fr}
  .tm-cell{
    border-right:0;
    border-bottom:2px solid #8c8c8c;
  }
  .tm-cell:last-child{border-bottom:0}
}




body{
  background:
    linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px),
    var(--bg);
  background-size:32px 32px,32px 32px,auto;
}

/* ---------- Brand / logo ---------- */
.brand{
  position:relative;
  z-index:20;
  gap:7px;
  font-family:"Courier New",Consolas,monospace;
  font-size:18px;
  letter-spacing:.02em;
  text-shadow:2px 2px 0 #000;
}
.brand-ball{
  display:none;
}
.brand-word{
  color:#f5f2f7;
}
.brand-word>span{
  color:var(--accent-3);
}

/* ---------- Home screen ---------- */
.hero{
  min-height:calc(100vh - 56px);
  display:grid;
  place-items:center;
  padding:36px 0 60px;
}

.hero-card{
  width:min(720px,100%);
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  text-align:center;
}

.hero-card .kicker{
  margin-bottom:8px;
  padding:0;
  border:0;
  background:transparent;
  color:#f1edf5;
  font-size:15px;
  font-weight:700;
  text-transform:none;
  letter-spacing:.08em;
}

.hero-card h1{
  margin:0;
  font-family:"Courier New",Consolas,monospace;
  font-size:clamp(46px,8vw,88px);
  line-height:.83;
  letter-spacing:-.08em;
  text-transform:uppercase;
  color:#f0c928;
  text-shadow:
    3px 3px 0 #5b489b,
    6px 6px 0 #1b1630;
}

.hero-card .lead{
  margin:22px auto 0;
  max-width:620px;
  color:#b8b1c0;
  font-size:11px;
  line-height:1.55;
  text-align:center;
}

/* Big menu window */
.home-actions{
  position:relative;
  width:min(540px,100%);
  margin:42px auto 0;
  padding:34px 36px 30px;
  gap:2px;
  border:3px solid #9f9a9f;
  background:#101011;
  box-shadow:
    inset 0 0 0 3px #29282b,
    5px 5px 0 #67646a,
    8px 8px 0 #1a181d;
  text-align:left;
}

.home-actions:before,
.home-actions:after{
  content:"";
  position:absolute;
  width:18px;
  height:18px;
  border-color:#9f9a9f;
  pointer-events:none;
}
.home-actions:before{
  left:-7px;
  top:-7px;
  border-left:3px solid;
  border-top:3px solid;
}
.home-actions:after{
  right:-7px;
  bottom:-7px;
  border-right:3px solid;
  border-bottom:3px solid;
}

.home-actions .action{
  position:relative;
  min-height:43px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:0 12px 0 38px;
  border:0;
  background:transparent;
  box-shadow:none;
  color:#f1edf5;
  font-family:"Courier New",Consolas,monospace;
  text-transform:none;
}

.home-actions .action:hover{
  background:transparent;
  color:#fff;
}

.home-actions .action:before{
  content:"";
  position:absolute;
  left:12px;
  top:50%;
  width:0;
  height:0;
  border-top:7px solid transparent;
  border-bottom:7px solid transparent;
  border-left:10px solid transparent;
  transform:translateY(-50%);
}

.home-actions .action:hover:before,
.home-actions .action.primary:before{
  border-left-color:var(--accent-3);
}

.home-actions .action strong{
  font-size:20px;
  font-weight:900;
  text-transform:none;
  letter-spacing:.01em;
  text-shadow:2px 2px 0 #000;
}

.home-actions .action small{
  margin-left:auto;
  padding-left:16px;
  color:#807889;
  font-size:9px;
  white-space:nowrap;
}

.home-actions .action.primary{
  border:0;
  background:transparent;
  color:#fff;
}

.home-actions .action.primary small{
  color:#9c93a5;
}

/* ---------- Inner pages ---------- */
.page-head{
  max-width:980px;
  margin:46px auto 18px;
  align-items:flex-start;
}

.page-head .kicker{
  padding:0;
  border:0;
  background:transparent;
  color:var(--accent-3);
  font-size:11px;
}

.page-head h1{
  font-family:"Courier New",Consolas,monospace;
  text-transform:uppercase;
  letter-spacing:-.05em;
}

.grid{
  max-width:980px;
  margin-left:auto;
  margin-right:auto;
}

.card{
  border:3px solid #716979;
  border-radius:0;
  background:#111013;
  box-shadow:
    inset 0 0 0 3px #242127,
    5px 5px 0 #0b090d;
}

.game-card{
  border:2px solid #514759;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px),
    #18151d;
  background-size:12px 12px;
  box-shadow:none;
}

.game-card:hover,
.game-card:has(input:checked){
  border-color:var(--accent-3);
  background-color:#21182b;
}

.game-card strong{
  font-family:"Courier New",Consolas,monospace;
}

/* ---------- Run screen, old structure retained ---------- */
.run-page,
.page-head + .public-players,
.editor-grid{
  font-family:"Courier New",Consolas,monospace;
}

.editor-grid > .card{
  background:#111013;
}

.section-title{
  border-bottom:2px solid #3e3546;
}

.section-title h2{
  color:#f3eff5;
}

.tm-tabs{
  border:3px solid #4f3c5e;
  background:#151119;
}

.tm-tab{
  background:#151119;
  color:#9d93a5;
}

.tm-tab.active{
  background:var(--accent);
  color:#fff;
}

.tm-route,
.empty-stage{
  border:3px solid #6e6970;
  background:
    linear-gradient(rgba(0,0,0,.09) 1px,transparent 1px),
    linear-gradient(90deg,rgba(0,0,0,.09) 1px,transparent 1px),
    #bdbdbd;
  background-size:12px 12px;
}

.player-card,
.public-player{
  background:#17131c;
}

.btn{
  font-family:"Courier New",Consolas,monospace;
}

/* ---------- Modal ---------- */
.dialog{
  border:3px solid #8f8991;
  border-radius:0;
  background:#111013;
  box-shadow:
    inset 0 0 0 3px #29262c,
    5px 5px 0 #050405;
}

@media(max-width:768px){
  .home-actions{
    padding:24px 18px;
  }
  .home-actions .action{
    padding-left:28px;
  }
  .home-actions .action strong{
    font-size:17px;
  }
  .home-actions .action small{
    display:none;
  }
}




/* Pointer is interaction feedback only */
.home-actions .action.primary:before{
  border-left-color:transparent;
}
.home-actions .action:hover:before,
.home-actions .action:focus-visible:before{
  border-left-color:var(--accent-3);
}

/* Run header */
.page-head.run-head{
  max-width:none;
  margin:34px 0 12px;
  padding:12px 14px;
  border:3px solid #777179;
  background:#111013;
  box-shadow:
    inset 0 0 0 3px #29262c,
    4px 4px 0 #050405;
}
.page-head.run-head h1{
  margin:2px 0 0;
  font-size:clamp(26px,4vw,44px);
  line-height:1;
  text-transform:uppercase;
  color:#f4f0f5;
  text-shadow:2px 2px 0 #000;
}
.page-head.run-head .kicker{
  color:var(--accent-3);
}
.page-head.run-head .run-toolbar{
  align-self:center;
}

/* Run meta becomes a game status strip */
.run-meta{
  gap:0;
  margin:0 0 8px;
  border:3px solid #51475a;
  background:#151119;
}
.run-meta .pill{
  min-height:31px;
  padding:0 10px;
  border:0;
  border-right:2px solid #51475a;
  background:transparent;
  color:#bdb4c4;
}
.run-meta .pill:last-child{
  border-right:0;
}

/* Public players */
.public-players{
  margin:0 0 8px;
  padding:7px;
  border:3px solid #51475a;
  background:#111013;
}
.public-player{
  margin:0;
  border:2px solid #51475a;
  border-left:5px solid var(--player);
  background:#1a161f;
}

/* Main tracker and player cards: game windows */
.editor-grid{
  grid-template-columns:minmax(0,1fr) 320px;
  gap:8px;
}
.editor-grid > .card,
.run-page > .card,
body > .shell > .card{
  border:3px solid #777179;
  background:#111013;
  box-shadow:
    inset 0 0 0 3px #29262c,
    4px 4px 0 #050405;
}
.editor-grid > .card.pad{
  padding:12px;
}

/* Window headings */
.section-title{
  min-height:34px;
  margin:-2px -2px 10px;
  padding:6px 9px;
  border:0;
  border-bottom:3px solid #5a4a65;
  background:#2b2232;
}
.section-title h2{
  font-size:13px;
  letter-spacing:.04em;
  color:#f4eff7;
  text-shadow:1px 1px 0 #000;
}

/* Tabs look like game category bar */
.tm-tabs{
  min-height:43px;
  align-items:stretch;
  margin-bottom:8px;
  border:3px solid #4f3c5e;
  background:#2b2232;
  box-shadow:inset 0 -3px 0 #17121c;
}
.tm-tab{
  min-height:37px;
  padding:0 16px;
  border-right:2px solid #4f3c5e;
  background:#2b2232;
  color:#d1c9d7;
  font-size:11px;
}
.tm-tab:hover,
.tm-tab:focus-visible{
  background:#3a2946;
  color:#fff;
}
.tm-tab.active{
  position:relative;
  background:var(--accent);
  color:#fff;
}
.tm-tab.active:after{
  content:"";
  position:absolute;
  left:8px;
  right:8px;
  bottom:2px;
  height:3px;
  background:var(--accent-3);
}

/* Tracker content = grey game grid */
.tm-route{
  border-color:#747074;
  box-shadow:inset 0 0 0 3px #aaa;
}
.tm-cell{
  min-height:112px;
  padding:12px;
}
.tm-cell strong{
  font-size:12px;
}
.tm-cell small{
  font-size:10px;
}

/* Placeholder stage follows reference grid instead of dark web panel */
.empty-stage{
  min-height:430px;
  border-color:#747074;
  box-shadow:inset 0 0 0 3px #aaa;
}
.empty-stage > div{
  padding:18px;
  border:3px solid #8b858c;
  background:rgba(226,226,226,.72);
  color:#373139;
}
.empty-stage strong{
  color:#26212c !important;
}
.empty-stage p{
  color:#5d5562;
  font-size:10px;
  line-height:1.5;
}

/* Player side feels like party/menu slots */
.players{
  gap:6px;
}
.player-card{
  min-height:62px;
  padding:7px;
  border:2px solid #51475a;
  border-left:6px solid var(--player);
  background:#18141d;
  box-shadow:inset 0 0 0 1px #28202f;
}
.player-card:hover{
  border-top-color:#75667f;
  border-right-color:#75667f;
  border-bottom-color:#75667f;
}
.player-card .btn{
  min-height:32px;
}
.avatar{
  background:#29212f;
}

/* Add player as menu command */
.players > .action{
  min-height:48px;
  padding:0 10px 0 28px;
  position:relative;
}
.players > .action:before{
  content:"+";
  position:absolute;
  left:10px;
  color:var(--accent-3);
  font-weight:900;
}

/* Buttons */
.btn{
  border-color:#65566f;
  background:#211a27;
}
.btn:hover,
.btn:focus-visible{
  border-color:var(--accent-3);
  background:#30223a;
}
.btn.primary{
  background:var(--accent);
  border-color:var(--accent-3);
}

/* Dialogs */
.dialog h2{
  padding-bottom:8px;
  border-bottom:3px solid #51475a;
}
.avatar-option{
  background:#19151e;
}
.avatar-option:hover{
  border-color:#786487;
}
.avatar-option.is-active{
  border-color:var(--accent-3);
  background:#2c1c38;
}

/* Run pages use the full available game window */
@media(min-width:821px){
  .shell:has(.editor-grid){
    width:min(1380px,calc(100% - 26px));
  }
}

@media(max-width:820px){
  .page-head.run-head{
    align-items:flex-start;
  }
  .run-meta{
    flex-wrap:wrap;
  }
  .run-meta .pill{
    border-bottom:2px solid #51475a;
  }
}





.shell:has(.run-window){
  width:min(1220px,calc(100% - 26px));
}

/* Der äußere Rahmen übernimmt exakt die Logik des Startseiten-Menürahmens. */
.run-window{
  position:relative;
  width:100%;
  margin-top:14px;
  padding:18px;
  border:3px solid #9f9a9f;
  background:#101011;
  box-shadow:
    inset 0 0 0 3px #29282b,
    5px 5px 0 #67646a,
    8px 8px 0 #1a181d;
}
.run-window:before,
.run-window:after{
  content:"";
  position:absolute;
  width:18px;
  height:18px;
  border-color:#9f9a9f;
  pointer-events:none;
}
.run-window:before{
  left:-7px;
  top:-7px;
  border-left:3px solid;
  border-top:3px solid;
}
.run-window:after{
  right:-7px;
  bottom:-7px;
  border-right:3px solid;
  border-bottom:3px solid;
}

/* Spieler stehen oberhalb des Trackers. */
.run-players{
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 0 14px;
  margin-bottom:14px;
  border-bottom:1px solid #454047;
}
.run-players-label{
  flex:0 0 auto;
  color:#8f8795;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.run-player-list{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.run-player{
  --player:#9f7aea;
  min-width:180px;
  display:grid;
  grid-template-columns:40px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:6px 7px;
  border:1px solid #4c4650;
  border-left:4px solid var(--player);
  background:#171518;
}
.run-player .avatar{
  width:36px;
  height:40px;
  border:0;
  background:#211e23;
}
.run-player .avatar img{
  width:25px;
  height:34px;
}
.run-player-copy strong{
  display:block;
  font-size:11px;
}
.run-player-copy small{
  display:block;
  margin-top:2px;
  color:#8e8693;
  font-size:8px;
}
.run-edit,
.run-add-player{
  min-height:30px;
  padding:0 8px;
  border:1px solid #514a56;
  background:#1d1a20;
  color:#d8d2dc;
  font-size:9px;
  font-weight:900;
  cursor:pointer;
}
.run-edit:hover,
.run-add-player:hover{
  border-color:var(--accent-3);
}
.run-add-player{
  min-height:54px;
}


.run-head{
  display:grid;
  grid-template-columns:minmax(150px,.85fr) minmax(180px,1fr) 40px minmax(180px,1fr) minmax(170px,.95fr) 44px;
  gap:8px;
  padding:0 10px 7px;
  color:#837b88;
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.07em;
}

/* Innen nur einfache Rahmen – kein Schatten, keine doppelten Game-Frames. */
.run-rows{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.run-row{
  display:grid;
  grid-template-columns:minmax(150px,.85fr) minmax(180px,1fr) 40px minmax(180px,1fr) minmax(170px,.95fr) 44px;
  gap:8px;
  align-items:center;
  padding:9px;
  border:1px solid #4b454e;
  background:#151316;
}
.run-box{
  height:68px;
  display:flex;
  align-items:center;
  padding:0 11px;
  border:1px solid #454048;
  background:#0f0e10;
}
.run-route{
  color:#f0ebf2;
  font-size:11px;
  font-weight:900;
}
.run-encounter,
.run-fusion{
  justify-content:center;
}
.run-empty{
  color:#69616d;
  font-size:9px;
}
.run-swap{
  width:40px;
  height:34px;
  padding:0;
  border:1px solid #454048;
  background:#0f0e10;
  color:#8f8795;
  font-size:17px;
  cursor:pointer;
}
.run-swap:hover{
  border-color:var(--accent-3);
  color:#fff;
}
.run-tools{
  height:68px;
  display:grid;
  grid-template-rows:1fr 1fr;
  gap:4px;
}
.run-tools button{
  width:44px;
  min-height:0;
  padding:0;
  border:1px solid #454048;
  background:#0f0e10;
  color:#817987;
  cursor:pointer;
}
.run-tools button:hover{
  border-color:var(--accent-3);
  color:#fff;
}
.run-add-row{
  min-height:42px;
  border:1px solid #4b454e;
  background:#151316;
  color:#a69daa;
  font-size:10px;
  font-weight:900;
  cursor:pointer;
}
.run-add-row:hover{
  border-color:var(--accent-3);
  color:#fff;
}

/* Auf der Run-Seite kein alter Sidebar/Grid-Stil mehr. */
.run-window + *{
  clear:both;
}

@media(max-width:900px){
  .run-head{display:none}
  .run-row{
    grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr) 44px;
  }
  .run-route{
    grid-column:1/4;
  }
  .run-encounter:nth-of-type(2){grid-column:1}
  .run-swap{grid-column:2}
  .run-encounter:nth-of-type(3){grid-column:3}
  .run-fusion{
    grid-column:1/4;
  }
  .run-tools{
    grid-column:4;
    grid-row:1/3;
  }
}
@media(max-width:600px){
  .run-window{padding:12px}
  .run-players{
    align-items:flex-start;
    flex-direction:column;
  }
  .run-player-list{width:100%}
  .run-player{width:100%}
}




.run-page-v12,
.run-page-v12 *{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.shell:has(.run-page-v12){
  width:min(1220px,calc(100% - 26px));
}

/* Header frei und ohne Spezialrahmen */
.run-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin:44px 0 24px;
}

.run-game{
  color:var(--accent-3);
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.run-header h1{
  margin:6px 0 10px;
  font-size:clamp(34px,4vw,58px);
  line-height:.95;
  letter-spacing:-.045em;
  font-weight:800;
}

.run-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.run-meta span{
  padding:6px 9px;
  border:1px solid #413a45;
  background:#151217;
  color:#968e9a;
  font-size:10px;
  font-weight:700;
}

.run-actions{
  flex:0 0 auto;
}

.run-btn{
  min-height:40px;
  padding:0 14px;
  border:1px solid #4b4350;
  background:#171419;
  color:#d8d2dc;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}

.run-btn:hover{
  border-color:var(--accent-3);
  color:#fff;
}

.run-btn-primary{
  background:#352044;
  border-color:#704a8d;
}

/* Spieler liegen frei über dem Tracker */
.run-playerbar{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:22px;
}

.run-playerbar-title{
  flex:0 0 auto;
  color:#817987;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.run-player-list{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.run-player{
  --player:#9f7aea;
  min-width:190px;
  display:grid;
  grid-template-columns:44px minmax(0,1fr) auto;
  align-items:center;
  gap:9px;
  padding:7px 8px;
  border:1px solid #403943;
  border-left:4px solid var(--player);
  background:#141116;
}

.run-player-avatar{
  width:40px;
  height:44px;
  display:grid;
  place-items:center;
  background:#211d23;
}

.run-player-avatar img{
  width:27px;
  height:37px;
  image-rendering:pixelated;
}

.run-player-copy strong{
  display:block;
  font-size:12px;
  font-weight:800;
}

.run-player-copy small{
  display:block;
  margin-top:2px;
  color:#88808d;
  font-size:9px;
}

.run-player-edit,
.run-add-player{
  min-height:30px;
  padding:0 9px;
  border:1px solid #49414d;
  background:#1b171d;
  color:#aaa2ae;
  font-size:9px;
  font-weight:700;
  cursor:pointer;
}

.run-player-edit:hover,
.run-add-player:hover{
  border-color:var(--accent-3);
  color:#fff;
}

.run-add-player{
  min-height:58px;
}

/* Tabs / Zusatzinfos bewusst außerhalb des großen Rahmens */
.run-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:10px;
}

.run-toolbar-info{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.run-toolbar-info span{
  padding:6px 8px;
  border:1px solid #3f3843;
  background:#151217;
  color:#7f7784;
  font-size:9px;
  font-weight:700;
}

/* 
   Genau HIER sitzt der Startseiten-Rahmen:
   nur um die eigentliche Encounter-Liste.
*/
.run-tracker-frame{
  position:relative;
  padding:18px;
  border:3px solid #9f9a9f;
  background:#101011;
  box-shadow:
    inset 0 0 0 3px #29282b,
    5px 5px 0 #67646a,
    8px 8px 0 #1a181d;
}

.run-tracker-frame:before,
.run-tracker-frame:after{
  content:"";
  position:absolute;
  width:18px;
  height:18px;
  border-color:#9f9a9f;
  pointer-events:none;
}

.run-tracker-frame:before{
  left:-7px;
  top:-7px;
  border-left:3px solid;
  border-top:3px solid;
}

.run-tracker-frame:after{
  right:-7px;
  bottom:-7px;
  border-right:3px solid;
  border-bottom:3px solid;
}

/* Innen nur einfache Rahmen */
.run-table-head{
  display:grid;
  grid-template-columns:minmax(180px,.9fr) minmax(210px,1fr) 42px minmax(210px,1fr) minmax(200px,1fr) 46px;
  gap:10px;
  padding:0 12px 8px;
  color:#716a75;
  font-size:9px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.run-rows{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.run-row{
  display:grid;
  grid-template-columns:minmax(180px,.9fr) minmax(210px,1fr) 42px minmax(210px,1fr) minmax(200px,1fr) 46px;
  gap:10px;
  align-items:center;
  padding:11px;
  border:1px solid #3d3940;
  background:#17181d;
}

.run-row-demo{
  border-color:#72518c;
  box-shadow:inset 3px 0 0 #a06bca;
}

.run-field{
  height:70px;
  min-width:0;
  display:flex;
  align-items:center;
  padding:0 13px;
  border:1px solid #3f3b43;
  background:#111216;
}

.tracker-route{
  color:#77727b;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.run-encounter,
.run-fusion{
  justify-content:center;
}

.run-placeholder{
  color:#67616a;
  font-size:10px;
}

.run-swap{
  width:42px;
  height:36px;
  border:1px solid #3f3b43;
  background:#111216;
  color:#7e7782;
  font-size:17px;
  cursor:pointer;
}

.run-swap:hover{
  border-color:#765491;
  color:#fff;
}

.run-row-actions{
  height:70px;
  display:grid;
  grid-template-rows:repeat(3,1fr);
  gap:4px;
}

.run-row-actions button{
  width:46px;
  min-height:0;
  padding:0;
  border:1px solid #3f3b43;
  background:#111216;
  color:#79727e;
  cursor:pointer;
}

.run-row-actions button:hover{
  border-color:#765491;
  color:#fff;
}

.run-add-row{
  width:100%;
  min-height:44px;
  margin-top:10px;
  border:1px solid #3f3b43;
  background:#15161a;
  color:#8e8792;
  font-size:10px;
  font-weight:700;
  cursor:pointer;
}

.run-add-row:hover{
  border-color:#765491;
  color:#fff;
}

/* Dialoge auf Run-Seite ebenfalls Inter */
.run-page-v12 ~ .dialog-backdrop,
.run-page-v12 ~ .dialog-backdrop *{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

@media(max-width:1050px){
  .run-table-head{
    display:none;
  }

  .run-row{
    grid-template-columns:minmax(0,1fr) 42px minmax(0,1fr) 46px;
  }

  .tracker-route{
    grid-column:1/4;
  }

  .run-encounter:nth-of-type(2){
    grid-column:1;
  }

  .run-swap{
    grid-column:2;
  }

  .run-encounter:nth-of-type(3){
    grid-column:3;
  }

  .run-fusion{
    grid-column:1/4;
  }

  .run-row-actions{
    grid-column:4;
    grid-row:1/3;
  }
}

@media(max-width:768px){
  .run-header{
    align-items:flex-start;
    flex-direction:column;
  }

  .run-playerbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .run-player-list{
    width:100%;
  }

  .run-player{
    width:100%;
  }

  .run-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .run-tracker-frame{
    padding:12px;
  }

  .run-row{
    grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr) 42px;
    padding:8px;
  }
}



.run-page,.run-page *{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.shell:has(.run-page){width:min(1380px,calc(100% - 26px))}
.run-page{padding:46px 0 70px}

.run-top{
  display:flex;align-items:center;justify-content:space-between;gap:22px;margin-bottom:14px;
}
.run-players{display:flex;gap:10px;flex-wrap:wrap}
.run-player{
  --player:#9f7aea;min-width:180px;height:62px;display:grid;grid-template-columns:42px 1fr auto;
  align-items:center;gap:9px;padding:7px 9px;border:1px solid #4a4053;border-left:3px solid var(--player);
  background:#131118;
}
.run-player-avatar{width:38px;height:44px;display:grid;place-items:center;background:#1d1922}
.run-player-avatar img{width:26px;height:36px;image-rendering:pixelated}
.run-player strong{display:block;font-size:13px;font-weight:800}
.run-player small{display:block;margin-top:2px;color:#817987;font-size:9px}
.run-player>button{
  width:28px;height:28px;padding:0;border:1px solid #443a4c;background:#17131b;color:#8f8598;cursor:pointer
}
.run-add-player{
  min-height:62px;padding:0 15px;border:1px solid #443a4c;background:#131118;color:#918799;font-weight:700;cursor:pointer
}

.run-status{
  min-height:54px;display:flex;align-items:center;gap:0;border:1px solid #403846;background:#131118;
}
.run-status span{
  height:32px;display:flex;align-items:center;padding:0 16px;border-right:1px solid #39313f;color:#aaa2ae;font-size:11px;white-space:nowrap
}
.run-status span:last-child{border-right:0}
.run-status .run-stat{color:#d0c8d5;font-weight:700}.run-edit-mode button{
  min-height:34px;padding:0 13px;border:1px solid #3d3544;background:#131118;color:#89808f;font-size:10px;font-weight:800;cursor:pointer
}.run-edit-mode button:hover{border-color:#75518d;color:#fff}

/* One main game panel around the row area, matching sketch 2 */
.run-tracker{
  position:relative;padding:16px;border:1px solid #4c4452;background:#121116;
}
.run-head{
  display:grid;grid-template-columns:minmax(170px,.8fr) minmax(220px,1fr) 62px minmax(220px,1fr) minmax(220px,1fr) 128px;
  gap:12px;padding:0 10px 10px;color:#c6bdcc;font-size:10px;font-weight:800;text-align:center;text-transform:uppercase;letter-spacing:.04em
}
.run-row{
  display:grid;grid-template-columns:minmax(170px,.8fr) minmax(220px,1fr) 62px minmax(220px,1fr) minmax(220px,1fr) 128px;
  gap:12px;align-items:center;padding:12px 10px;border-top:1px solid #2c2930;
}
.run-row:first-of-type{border-top:0}
.run-row-selected{background:linear-gradient(90deg,rgba(128,76,166,.10),transparent 75%)}

.run-route{
  min-height:78px;display:flex;align-items:center;gap:10px;padding:0 14px;border:1px solid #403847;background:#111015
}
.run-pin{color:#a76cd0;font-size:20px}
.run-route strong{display:block;font-size:12px}
.run-route small{display:block;margin-top:4px;color:#7f7784;font-size:10px}

/* Sketch 2 mon cards: simple dark card with bracket corners, no chunky outer shadow */
.run-mon{
  position:relative;min-height:78px;display:flex;align-items:center;justify-content:center;padding:10px 16px;
  border:1px solid #4a4053;background:#0f0e13;
}
.run-mon:before,.run-mon:after{
  content:"";position:absolute;width:14px;height:14px;pointer-events:none;border-color:#e5e0e8
}
.run-mon:before{left:-2px;top:-2px;border-left:2px solid;border-top:2px solid}
.run-mon:after{right:-2px;bottom:-2px;border-right:2px solid;border-bottom:2px solid}
.run-mon-empty{color:#6f6874;font-size:10px;font-weight:600}

.run-swap{
  width:62px;height:50px;border:1px solid #5c3e70;background:#15111a;color:#a864d0;font-size:21px;cursor:pointer
}
.run-swap:hover{background:#24152e;border-color:#9c61c4}

.run-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.run-actions button{
  height:48px;padding:0;border:1px solid #403847;background:#111015;color:#85808b;font-size:17px;cursor:pointer
}
.run-actions button:hover,.run-actions button.is-active{border-color:#8053a0;background:#271632;color:#c58ce9}

.run-add-row{
  width:100%;min-height:42px;margin-top:8px;border:1px dashed #443a4c;background:transparent;color:#807787;font-size:10px;font-weight:700;cursor:pointer
}
.run-add-row:hover{border-color:#75518d;color:#fff}

/* dialogs still use Inter */
.run-page~.dialog-backdrop,.run-page~.dialog-backdrop *{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif
}

@media(max-width:1024px){
  .run-top{align-items:flex-start;flex-direction:column}
  .run-status{width:100%;overflow:auto}
  .run-head{display:none}
  .run-row{
    grid-template-columns:minmax(0,1fr) 56px minmax(0,1fr);
  }
  .run-route{grid-column:1/-1}
  .run-fusion{grid-column:1/3}
  .run-actions{grid-column:3}
}
@media(max-width:768px){
  .run-player{width:100%}.run-players{width:100%}
  .run-row{grid-template-columns:1fr}
  .run-route,.run-fusion,.run-actions{grid-column:auto}
  .run-swap{width:100%}
}


.tracker-host{padding:0;border:0;background:transparent}


.player-remove-form{
  margin:0;
}
.player-remove-btn{
  min-height:28px;
  padding:0 8px;
  border:1px solid #583842;
  background:#1c1216;
  color:#d98391;
  font-size:9px;
  font-weight:700;
  cursor:pointer;
}
.player-remove-btn:hover{
  border-color:#8b4c5b;
  color:#ffb2bd;
}


/* Spieler entfernen – nur im Bearbeiten-Dialog */
.player-delete-area{
  margin-top:4px;
  padding-top:14px;
  border-top:1px solid #332d37;
}
.player-delete-area form{
  margin:0;
}
.player-delete-area .player-remove-btn{
  width:100%;
  min-height:38px;
  padding:0 12px;
  border:1px solid #583842;
  background:#1c1216;
  color:#d98391;
  font-size:10px;
  font-weight:700;
  cursor:pointer;
}
.player-delete-area .player-remove-btn:hover{
  border-color:#8b4c5b;
  color:#ffb2bd;
}


/* Spielercharakter-Auswahl */
.avatar-option img,
.run-player-avatar img,
.run-player-avatar img{
  object-fit:contain;
  image-rendering:pixelated;
}
.avatar-option img{
  width:auto !important;
  height:48px !important;
  max-width:48px !important;
}


/* Spielerfarben / Highlight-Farben */
.color-option{
  position:relative;
}
.color-option.is-active{
  outline:2px solid #fff;
  outline-offset:-4px;
  box-shadow:0 0 0 2px var(--swatch);
}

.run-player,
.run-player,
.player-card,
.public-player{
  --highlight:var(--player,#9F7AEA);
}

.run-player,
.run-player,
.player-card,
.public-player{
  border-left-color:var(--highlight) !important;
}

.run-player button:hover,
.run-player button:hover,
.player-card .btn:hover{
  border-color:var(--highlight) !important;
  color:var(--highlight) !important;
}


/* ==================================================
   PLAYER / CHARACTER HIGHLIGHT POLISH
   ================================================== */

.player-edit{
  --highlight:var(--run-highlight,#9F7AEA);
}

.player-card,
.run-player,
.run-player,
.public-player{
  --highlight:var(--player,#9F7AEA);
}

/* All player-edit focus/hover states */
.player-edit .input:focus{
  border-color:var(--highlight) !important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--highlight) 18%,transparent) !important;
}

.player-edit .avatar-option:hover,
.player-edit .avatar-option:focus-visible{
  border-color:var(--highlight) !important;
  background:color-mix(in srgb,var(--highlight) 10%,#19151e) !important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--highlight) 18%,transparent) !important;
}

.player-edit .avatar-option.is-active{
  border-color:var(--highlight) !important;
  background:color-mix(in srgb,var(--highlight) 14%,#19151e) !important;
  box-shadow:inset 0 0 0 1px var(--highlight),0 0 0 2px color-mix(in srgb,var(--highlight) 18%,transparent) !important;
}

/* Color swatches */
.player-edit .color-option:hover,
.player-edit .color-option:focus-visible{
  outline:2px solid #fff !important;
  outline-offset:-4px !important;
  box-shadow:0 0 0 2px var(--swatch) !important;
}

.player-edit .color-option.is-active{
  outline:2px solid #fff !important;
  outline-offset:-4px !important;
  box-shadow:0 0 0 3px var(--swatch) !important;
}

/* Buttons inside player edit */
.player-edit .btn:hover,
.player-edit .btn:focus-visible{
  border-color:var(--highlight) !important;
  color:var(--highlight) !important;
}

.player-edit .btn.primary{
  border-color:var(--highlight) !important;
  background:color-mix(in srgb,var(--highlight) 24%,#211a27) !important;
  color:#fff !important;
}

.player-edit .btn.primary:hover,
.player-edit .btn.primary:focus-visible{
  background:color-mix(in srgb,var(--highlight) 34%,#211a27) !important;
  color:#fff !important;
}

/* Player cards */
.player-card:hover,
.run-player:hover,
.run-player:hover,
.public-player:hover{
  border-color:color-mix(in srgb,var(--highlight) 45%,#403847) !important;
  border-left-color:var(--highlight) !important;
}

.player-card .btn:hover,
.run-player button:hover,
.run-player button:hover{
  border-color:var(--highlight) !important;
  color:var(--highlight) !important;
}


/* Exact player-highlight fallback */
.player-edit,
.player-card,
.run-player,
.run-player,
.public-player{
  --highlight:var(--player,var(--run-highlight,#9f7aea));
}


/* ==================================================
   SPIELER BEARBEITEN – SPIELERFARBE ALS HIGHLIGHT
   ================================================== */

.dialog:has(.player-edit) h2{
  border-bottom-color:var(--highlight,#9f7aea) !important;
}

.player-edit .input:hover,
.player-edit .input:focus{
  border-color:var(--highlight,#9f7aea) !important;
}

.player-edit .input:focus{
  box-shadow:0 0 0 2px color-mix(in srgb,var(--highlight,#9f7aea) 20%,transparent) !important;
}

.player-edit .avatar-option{
  border-radius:0 !important;
}

.player-edit .avatar-option:hover,
.player-edit .avatar-option:focus-visible{
  border-color:var(--highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--highlight,#9f7aea) 10%,var(--panel-2)) !important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--highlight,#9f7aea) 16%,transparent) !important;
  outline:none !important;
}

.player-edit .avatar-option.is-active{
  border-color:var(--highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--highlight,#9f7aea) 16%,var(--panel-2)) !important;
  box-shadow:inset 0 0 0 1px var(--highlight,#9f7aea),0 0 0 2px color-mix(in srgb,var(--highlight,#9f7aea) 18%,transparent) !important;
}

.player-edit .color-option{
  border-radius:0 !important;
}

.player-edit .color-option:hover,
.player-edit .color-option:focus-visible{
  border-color:#fff !important;
  box-shadow:0 0 0 2px var(--swatch) !important;
  outline:none !important;
}

.player-edit .color-option.is-active{
  border-color:#fff !important;
  box-shadow:0 0 0 3px var(--swatch) !important;
}

.player-edit .btn:not(.primary):hover,
.player-edit .btn:not(.primary):focus-visible{
  border-color:var(--highlight,#9f7aea) !important;
  color:var(--highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--highlight,#9f7aea) 9%,var(--panel-2)) !important;
}

.player-edit .btn.primary{
  border-color:var(--highlight,#9f7aea) !important;
  background:var(--highlight,#9f7aea) !important;
  color:#17131b !important;
}

.player-edit .btn.primary:hover,
.player-edit .btn.primary:focus-visible{
  background:color-mix(in srgb,var(--highlight,#9f7aea) 82%,#fff) !important;
  border-color:var(--highlight,#9f7aea) !important;
  color:#17131b !important;
}


/* ==================================================
   SAUBERE KLASSENNAMEN / NEUTRALE DIALOGE
   ================================================== */

.run-player,
.player-card,
.public-player{
  background:#0e0e0e !important;
  border-color:#202020;
  border-left-color:var(--highlight,var(--player,#9f7aea)) !important;
}

.dialog:has(.player-edit){
  border-color:#202020 !important;
  background:#0e0e0e !important;
}

.player-edit .avatar-option{
  border:1px solid #202020 !important;
  background:#0a0a0a !important;
}

.player-edit .avatar-option:hover,
.player-edit .avatar-option:focus-visible{
  border-color:var(--highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--highlight,#9f7aea) 8%,#0a0a0a) !important;
}

.player-edit .avatar-option.is-active{
  border-color:var(--highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--highlight,#9f7aea) 14%,#0a0a0a) !important;
}

.player-edit .input{
  border-color:#202020 !important;
  background:#0a0a0a !important;
}/* ==================================================
   HIGHLIGHT – SEITENAKTIONEN
   ================================================== */

/* Spieler hinzufügen */
.run-add-player,
.run-player button,
.run-edit-mode button{
  border-radius:0 !important;
}

.run-add-player{
  border:1px solid #202020 !important;
  background:#0a0a0a !important;
  color:#858585 !important;
}

.run-add-player:hover,
.run-add-player:focus-visible{
  border-color:var(--run-highlight,#9f7aea) !important;
  color:var(--run-highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--run-highlight,#9f7aea) 10%,#0a0a0a) !important;
}/* Edit / Edit beenden / allgemeine Run-Aktionen */
.run-edit-mode button,
.run-top button{
  border:1px solid #202020 !important;
  background:#0a0a0a !important;
  color:#858585 !important;
}.run-edit-mode button:hover,
.run-edit-mode button:focus-visible,
.run-top button:hover,
.run-top button:focus-visible{
  border-color:var(--run-highlight,#9f7aea) !important;
  color:var(--run-highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--run-highlight,#9f7aea) 10%,#0a0a0a) !important;
}

/* Normale Buttons außerhalb des Trackers */
.btn:not(.primary):hover,
.btn:not(.primary):focus-visible{
  border-color:var(--highlight,var(--run-highlight,#9f7aea)) !important;
  color:var(--highlight,var(--run-highlight,#9f7aea)) !important;
  background:color-mix(in srgb,var(--highlight,var(--run-highlight,#9f7aea)) 10%,#0a0a0a) !important;
}

.btn.primary{
  border-radius:0 !important;
}

.btn.primary:hover,
.btn.primary:focus-visible{
  border-color:var(--highlight,var(--run-highlight,#9f7aea)) !important;
}

/* Spielerkarte – Edit-Button */
.run-player > button{
  border:1px solid #202020 !important;
  background:#0a0a0a !important;
  color:#858585 !important;
}

.run-player > button:hover,
.run-player > button:focus-visible{
  border-color:var(--highlight,var(--player,#9f7aea)) !important;
  color:var(--highlight,var(--player,#9f7aea)) !important;
  background:color-mix(in srgb,var(--highlight,var(--player,#9f7aea)) 10%,#0a0a0a) !important;
}


/* ==================================================
   CURRENT MASTER – DARK / NEUTRAL / PLAYER DIALOG
   ================================================== */

:root{
  --bg:#0e0e0e;
  --panel:#0e0e0e;
  --panel-2:#0a0a0a;
  --line:#202020;
  --text:#d5d5d5;
  --muted:#858585;
}

html{
  background:#0e0e0e !important;
  color-scheme:dark;
}

body{
  background:
    linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px),
    #0e0e0e !important;
  background-size:32px 32px,32px 32px,auto !important;
}

.theme-toggle,
[data-theme-choice]{
  display:none !important;
}

/* Global header logo */
.brand{
  display:inline-flex !important;
  align-items:center !important;
  width:auto !important;
  max-width:none !important;
}
.brand-logo{
  display:block !important;
  width:auto !important;
  height:18px !important;
  max-width:none !important;
}
.brand-ball,
.brand-word{
  display:none !important;
}

/* Run uses inline dynamic logo instead */
.shell:has(.run-page) > .brand{
  display:none !important;
}
.run-brand{
  display:inline-flex;
  align-items:center;
  width:auto;
  margin:0 0 14px;
}
.run-brand-logo{
  display:block;
  width:auto;
  height:18px;
  overflow:visible;
}
.run-brand-logo .st1{
  fill:#f5f2f7 !important;
}
.run-brand-logo .st0{
  fill:var(--run-logo-color-1,#9f7aea) !important;
}
.run-brand:has(+ .run-page.is-soullink) .run-brand-logo .st0{
  fill:url(#run-mon-gradient) !important;
}

/* Spieler bearbeiten: genau eine Aktionsreihe */
.player-dialog-actions{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  width:100%;
  margin-top:4px;
}

.player-dialog-actions .btn{
  min-height:38px;
  border-radius:0 !important;
}

/* Entfernen bleibt eigenständig rot */
.player-dialog-actions .player-remove-btn{
  margin-right:auto;
  border:1px solid #583842 !important;
  background:#1c1216 !important;
  color:#d98391 !important;
}
.player-dialog-actions .player-remove-btn:hover,
.player-dialog-actions .player-remove-btn:focus-visible{
  border-color:#8b4c5b !important;
  background:#26161b !important;
  color:#ffb2bd !important;
}

/* Abbrechen neutral, Hover = Spielerfarbe */
.player-dialog-actions .player-cancel-btn{
  border:1px solid #202020 !important;
  background:#0a0a0a !important;
  color:#858585 !important;
}
.player-dialog-actions .player-cancel-btn:hover,
.player-dialog-actions .player-cancel-btn:focus-visible{
  border-color:var(--highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--highlight,#9f7aea) 10%,#0a0a0a) !important;
  color:var(--highlight,#9f7aea) !important;
}

/* Speichern = volle Spieler-Highlightfarbe */
.player-dialog-actions .player-save-btn{
  border:1px solid var(--highlight,#9f7aea) !important;
  background:var(--highlight,#9f7aea) !important;
  color:#0e0e0e !important;
}
.player-dialog-actions .player-save-btn:hover,
.player-dialog-actions .player-save-btn:focus-visible{
  border-color:var(--highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--highlight,#9f7aea) 82%,#fff) !important;
  color:#0e0e0e !important;
}

/* Spieler-Dialog selbst nutzt seine gespeicherte Spielerfarbe */
.dialog:has(.player-edit),
.player-edit{
  --highlight:#9f7aea;
}

.player-edit .input:focus{
  border-color:var(--highlight) !important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--highlight) 18%,transparent) !important;
}

.player-edit .avatar-option:hover,
.player-edit .avatar-option:focus-visible,
.player-edit .avatar-option.is-active{
  border-color:var(--highlight) !important;
}

@media(max-width:620px){
  .player-dialog-actions{
    flex-wrap:wrap;
  }
  .player-dialog-actions .player-remove-btn{
    width:100%;
    margin-right:0;
  }
}




/* ==================================================
   v5 – RUN HEADER
   ================================================== */

.run-brand-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}

.run-brand-block{
  display:flex;
  flex-direction:column;
  align-items:center;
  width:max-content;
  flex:0 0 auto;
}

.run-brand-block .run-brand{
  margin:0 0 4px !important;
}

.run-mode-label{
  margin:0;
  color:#aaa2ae;
  font-size:10px;
  font-weight:400;
  line-height:1;
  letter-spacing:.2em;
  text-transform:uppercase;
  text-align:center;
  white-space:nowrap;
}

.run-brand-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.run-id{
  color:#aaa2ae;
  font-size:11px;
  white-space:nowrap;
}

.run-brand-actions .run-edit-mode,
.run-brand-actions .run-edit-mode form{
  margin:0;
}

.run-brand-actions .run-edit-mode button{
  min-height:34px;
  padding:0 13px;
  border:1px solid #202020 !important;
  border-radius:0 !important;
  background:#0a0a0a !important;
  color:#858585 !important;
  cursor:pointer;
}

.run-brand-actions .run-edit-mode button:hover,
.run-brand-actions .run-edit-mode button:focus-visible{
  border-color:var(--run-highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--run-highlight,#9f7aea) 10%,#0a0a0a) !important;
  color:var(--run-highlight,#9f7aea) !important;
  outline:none;
}

.run-brand-logo .st1{
  fill:#f5f2f7 !important;
}

.run-brand-logo .st0{
  fill:var(--run-logo-color-1,#9f7aea) !important;
}

.run-brand-block.is-soullink .run-brand-logo .st0{
  fill:url(#run-mon-gradient) !important;
}

.run-edition-row{
  display:flex;
  align-items:baseline;
  gap:10px;
  margin:0 0 8px;
}

.run-edition-row strong{
  color:#f5f2f7;
  font-size:16px;
  font-weight:700;
}

.run-edition-row span{
  color:var(--run-highlight,#9f7aea);
  font-size:13px;
}

.run-top{
  margin:0 0 10px;
}

.run-top-content{
  --run-card-height:92px;
  display:flex;
  align-items:stretch;
  gap:8px;
  min-width:0;
}

.run-players{
  display:flex;
  align-items:stretch;
  gap:8px;
  flex:0 0 auto;
  min-height:var(--run-card-height);
}

.run-player{
  width:190px;
  height:var(--run-card-height) !important;
  min-height:var(--run-card-height) !important;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:62px minmax(0,1fr);
  align-items:center;
  gap:12px;
  padding:8px 12px;
  border:1px solid #202020 !important;
  border-left:3px solid var(--player,#9f7aea) !important;
  border-radius:0 !important;
  background:#0e0e0e !important;
}

.run-player.is-clickable{
  cursor:pointer;
}

.run-player.is-clickable:hover,
.run-player.is-clickable:focus-visible{
  border-color:var(--player,#9f7aea) !important;
  border-left-color:var(--player,#9f7aea) !important;
  outline:none;
}

.run-player-avatar{
  width:62px !important;
  height:100% !important;
  min-width:62px !important;
  display:grid !important;
  place-items:center !important;
  align-self:stretch !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

.run-player-avatar img{
  display:block !important;
  width:auto !important;
  height:auto !important;
  max-width:54px !important;
  max-height:74px !important;
  margin:auto !important;
  object-fit:contain !important;
  image-rendering:pixelated;
}

.run-player-info{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:7px;
}

.run-player-info strong{
  color:#f5f2f7;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.run-player-deaths{
  display:flex;
  align-items:center;
  gap:5px;
  color:#aaa2ae;
  font-size:11px;
}

.run-player-deaths svg{
  width:16px;
  height:16px;
  flex:0 0 16px;
  color:var(--player,#9f7aea);
}

.run-add-player{
  width:120px;
  height:var(--run-card-height) !important;
  min-height:var(--run-card-height) !important;
  box-sizing:border-box;
  border:1px dashed #303030 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:#858585 !important;
}

.run-add-player:hover,
.run-add-player:focus-visible{
  border-color:var(--run-highlight,#9f7aea) !important;
  color:var(--run-highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--run-highlight,#9f7aea) 6%,transparent) !important;
  outline:none;
}

.run-team-inline{
  flex:1 1 auto;
  min-width:0;
  height:var(--run-card-height);
}

.run-team-slots{
  width:100%;
  height:var(--run-card-height);
  min-height:var(--run-card-height);
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:8px;
  align-items:stretch;
}

.run-team-slots .team-slot{
  position:relative;
  min-width:0;
  width:100%;
  height:var(--run-card-height) !important;
  min-height:var(--run-card-height) !important;
  box-sizing:border-box;
  display:grid;
  place-items:center;
  padding:2px;
  overflow:hidden;
  border:1px solid #202020 !important;
  border-radius:0 !important;
  background:#0a0a0a !important;
}

.run-team-slots .team-slot.filled{
  border-color:color-mix(in srgb,var(--run-highlight,#9f7aea) 45%,#202020) !important;
}



/* Same rendering model as the previously working bottom team */
.run-team-slots .team-fusion-img{
  width:100% !important;
  height:100% !important;
  max-width:66px !important;
  max-height:66px !important;
  object-fit:contain !important;
  transform:scale(1.08);
  transform-origin:center;
}

.run-team-slots .team-pokemon-img{
  width:100% !important;
  height:100% !important;
  max-width:66px !important;
  max-height:66px !important;
  object-fit:contain !important;
  transform:none !important;
  flex:0 0 auto !important;
}

.run-team-slots .fusion-sprite-frame{
  position:relative !important;
  width:100% !important;
  height:100% !important;
  max-width:70px !important;
  max-height:70px !important;
  display:grid !important;
  place-items:center !important;
  overflow:hidden !important;
}

.run-team-slots .fusion-sheet-scale{
  position:absolute !important;
  left:0 !important;
  top:0 !important;
  width:96px !important;
  height:96px !important;
  transform:scale(.69) !important;
  transform-origin:top left !important;
  overflow:hidden !important;
}

.run-team-slots .fusion-sheet-img{
  position:absolute !important;
  max-width:none !important;
  width:auto !important;
  height:auto !important;
  image-rendering:auto;
}

/* Hide only the old bottom placement; renderer/data stay untouched */
.tracker-app .team-bar{
  display:none !important;
}

.unlock-dialog{
  border:1px solid #202020 !important;
  border-radius:0 !important;
  background:#0e0e0e !important;
  box-shadow:0 12px 34px rgba(0,0,0,.28) !important;
}

.unlock-dialog h2{
  padding-bottom:10px !important;
  border-bottom:1px solid #202020 !important;
}

.unlock-dialog .input{
  border:1px solid #202020 !important;
  border-radius:0 !important;
  background:#0a0a0a !important;
  color:#d5d5d5 !important;
}

.unlock-dialog .input:focus{
  border-color:var(--highlight,#9f7aea) !important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--highlight,#9f7aea) 18%,transparent) !important;
}

.unlock-dialog .btn{
  border-radius:0 !important;
}

.unlock-dialog .btn:not(.primary){
  border-color:#202020 !important;
  background:#0a0a0a !important;
  color:#858585 !important;
}

.unlock-dialog .btn:not(.primary):hover,
.unlock-dialog .btn:not(.primary):focus-visible{
  border-color:var(--highlight,#9f7aea) !important;
  color:var(--highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--highlight,#9f7aea) 10%,#0a0a0a) !important;
}

.unlock-dialog .btn.primary{
  border-color:var(--highlight,#9f7aea) !important;
  background:var(--highlight,#9f7aea) !important;
  color:#0e0e0e !important;
}

.run-delete-dialog{
  border:1px solid #202020 !important;
  border-radius:0 !important;
  background:#0e0e0e !important;
  box-shadow:0 12px 34px rgba(0,0,0,.28) !important;
}

.run-delete-dialog h2{
  padding-bottom:10px !important;
  border-bottom:1px solid #202020 !important;
}


@media(max-width:1050px){
  .run-top-content{
    flex-direction:column;
  }
  .run-team-inline{
    width:100%;
  }
}

@media(max-width:768px){
  .run-brand-row{
    gap:12px;
  }
  .run-id{
    display:none;
  }
  .run-players{
    width:100%;
    flex-direction:column;
  }
  .run-player,
  .run-add-player{
    width:100%;
  }
  .run-team-slots{
    grid-template-columns:repeat(3,minmax(0,1fr));
    height:auto;
  }
  .run-team-slots .team-slot{
    height:var(--run-card-height) !important;
  }
}


/* ==================================================
   v6 – AUSRICHTUNG + TEAMGRÖSSE
   ================================================== */

/* Die gesamte Inhaltsbreite bleibt wie bisher mittig */
.shell{
  width:min(1180px,calc(100% - 32px)) !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* Run selbst füllt die zentrierte Shell aus */
.run-page{
  width:100% !important;
  max-width:none !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

/* Logo links, Run-ID + Edit rechts */
.run-brand-row{
  width:100% !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:20px !important;
  margin-left:0 !important;
  margin-right:0 !important;
}

.run-brand-block{
  margin:0 !important;
  align-items:center !important;
  flex:0 0 auto !important;
}

.run-brand-actions{
  margin-left:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:12px !important;
  flex:0 0 auto !important;
}

/* Spieler + Team bleiben in einer Zeile und werden nicht künstlich zentriert */
.run-top-content{
  --run-card-height:92px;
  width:100% !important;
  display:flex !important;
  align-items:stretch !important;
  justify-content:flex-start !important;
  gap:8px !important;
}

/*
 * Team nicht mehr zusammenschieben:
 * 6 quadratische Slots, jeweils exakt so breit wie hoch.
 */
.run-team-inline{
  flex:0 0 auto !important;
  width:auto !important;
  min-width:0 !important;
  height:var(--run-card-height) !important;
}

.run-team-slots{
  width:auto !important;
  height:var(--run-card-height) !important;
  min-height:var(--run-card-height) !important;
  display:grid !important;
  grid-template-columns:repeat(6,var(--run-card-height)) !important;
  gap:8px !important;
}

.run-team-slots .team-slot{
  width:var(--run-card-height) !important;
  min-width:var(--run-card-height) !important;
  height:var(--run-card-height) !important;
  min-height:var(--run-card-height) !important;
}

/* Bei kleineren Screens darf die Zeile horizontal laufen statt die Mons zu quetschen */
@media(max-width:1050px){
  .run-top-content{
    flex-direction:column !important;
  }

  .run-team-inline{
    width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
  }

  .run-team-slots{
    width:max-content !important;
    grid-template-columns:repeat(6,var(--run-card-height)) !important;
  }
}

@media(max-width:768px){
  .run-brand-row{
    align-items:flex-start !important;
  }

  .run-brand-actions{
    margin-left:auto !important;
  }

  .run-team-slots{
    grid-template-columns:repeat(6,var(--run-card-height)) !important;
    height:var(--run-card-height) !important;
  }
}


/* ==================================================
   v7 – SPIELERKARTE + ADD PLAYER + LEERES TEAM
   ================================================== */

/* Spielerkarte passt sich an die Länge des Namens an */
.run-player{
  width:max-content !important;
  min-width:0 !important;
  max-width:100% !important;
  grid-template-columns:72px max-content !important;
  padding:8px 14px 8px 10px !important;
}

/* Name bestimmt die Kartenbreite */
.run-player-info{
  width:max-content !important;
  max-width:none !important;
}

.run-player-info strong{
  max-width:none !important;
  overflow:visible !important;
  text-overflow:clip !important;
}

/* Charakter etwas größer, weiterhin mittig */
.run-player-avatar{
  width:72px !important;
  min-width:72px !important;
}

.run-player-avatar img{
  max-width:64px !important;
  max-height:82px !important;
}

/* + Spieler sitzt unter den Spielern und sieht wie der Edit-Button aus */
.run-top-content{
  align-items:flex-start !important;
}

.run-players{
  flex-wrap:wrap;
  align-items:flex-start !important;
}

.run-add-player-row{
  flex:0 0 auto;
  align-self:flex-start;
}

.run-add-player{
  width:auto !important;
  height:34px !important;
  min-height:34px !important;
  padding:0 13px !important;
  border:1px solid #202020 !important;
  border-radius:0 !important;
  background:#0a0a0a !important;
  color:#858585 !important;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}

.run-add-player:hover,
.run-add-player:focus-visible{
  border-color:var(--run-highlight,#9f7aea) !important;
  background:color-mix(in srgb,var(--run-highlight,#9f7aea) 10%,#0a0a0a) !important;
  color:var(--run-highlight,#9f7aea) !important;
  outline:none;
}

/* Leerer Team-Slot bleibt gestrichelt, aber in Highlightfarbe */




/* Team bleibt auf Höhe der Spielerkarte */
.run-team-inline{
  align-self:flex-start;
  margin:0 0 16px 0 !important;
}

@media(max-width:768px){
  .run-player{
    width:max-content !important;
    max-width:100% !important;
  }

  .run-add-player-row{
    width:100%;
  }
}


/* ==================================================
   v8 – HOVER + AVATARABSTAND
   ================================================== */

/* Hover wieder im bisherigen Highlight-Stil */
.run-add-player:hover,
.run-add-player:focus-visible{
  border-color:var(--run-highlight,#9f7aea) !important;
  background:#0a0a0a !important;
  color:var(--run-highlight,#9f7aea) !important;
  outline:none;
}

/* Avatar-Spalte 40px breit */
.run-player{
  grid-template-columns:40px max-content !important;
  padding-right:24px !important;
}

.run-player-avatar{
  width:40px !important;
  min-width:40px !important;
}

.run-player-avatar img{
  max-width:40px !important;
}


/* ==================================================
   v10 – SPIELERBEREICH KORRIGIERT
   ================================================== */

.run-player-area{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap:8px !important;
  flex:0 0 auto !important;
}

.run-player-area .run-players{
  display:flex !important;
  align-items:stretch !important;
  gap:8px !important;
  flex-wrap:nowrap !important;
}

.run-player-area .run-add-player-row{
  display:block !important;
  width:auto !important;
  margin:0 !important;
}

/* + Spieler wirklich unter dem vollständigen Spieler-Kasten */
.run-player-area .run-add-player{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  height:34px !important;
  min-height:34px !important;
  padding:0 13px !important;
  margin:0 !important;
  border:1px solid #202020 !important;
  border-radius:0 !important;
  background:#0a0a0a !important;
  color:#858585 !important;
}/* Gleicher Hover wie aktuell */
.run-add-player:hover,
.run-add-player:focus-visible,
.run-brand-actions .run-edit-mode button:hover,
.run-brand-actions .run-edit-mode button:focus-visible,
.btn:not(.primary):not(.danger):not(.player-remove-btn):hover,
.btn:not(.primary):not(.danger):not(.player-remove-btn):focus-visible{
  border-color:var(--highlight,var(--run-highlight,#9f7aea)) !important;
  background:#0a0a0a !important;
  color:var(--highlight,var(--run-highlight,#9f7aea)) !important;
  outline:none !important;
}

/* Einheitlicher globaler Button-Stil */
.btn{
  min-height:38px !important;
  padding:0 12px !important;
  border:1px solid #202020 !important;
  border-radius:0 !important;
  background:#0a0a0a !important;
  color:#858585 !important;
  box-shadow:none !important;
  font:700 10px Inter,ui-sans-serif,system-ui,sans-serif !important;
  text-transform:none !important;
}

.btn:hover,
.btn:focus-visible{
  border-color:var(--highlight,var(--run-highlight,#9f7aea)) !important;
  background:color-mix(in srgb,var(--highlight,var(--run-highlight,#9f7aea)) 10%,#0a0a0a) !important;
  color:var(--highlight,var(--run-highlight,#9f7aea)) !important;
  outline:none !important;
}

.btn.primary{
  border-color:var(--highlight,var(--run-highlight,#9f7aea)) !important;
  background:var(--highlight,var(--run-highlight,#9f7aea)) !important;
  color:#0e0e0e !important;
}

.btn.danger{
  border-color:#583842 !important;
  background:#1c1216 !important;
  color:#d98391 !important;
}

.btn.danger:hover,
.btn.danger:focus-visible{
  border-color:#8b4c5b !important;
  background:#26161b !important;
  color:#ffb2bd !important;
}

/* Run-ID und Team bleiben auch auf kleineren Bildschirmen sichtbar und in einer Zeile. */
.run-id{
  display:inline-flex !important;
}

.run-player-area .run-players{
  border-bottom:0 !important;
  padding-bottom:0 !important;
  margin-bottom:0 !important;
}

@media(max-width:1050px){
  .run-top-content{
    flex-direction:row !important;
  }

  .run-team-inline{
    flex:0 1 auto !important;
    width:592px !important;
    max-width:592px !important;
    min-width:0 !important;
    overflow:visible !important;
  }

  .run-team-slots{
    width:100% !important;
    height:auto !important;
    grid-template-columns:repeat(6,minmax(0,var(--run-card-height))) !important;
  }

  .run-team-slots .team-slot{
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:1;
  }
}

@media(max-width:768px){
  .run-brand-actions{
    flex-direction:column !important;
    align-items:flex-end !important;
  }

  .run-brand-actions .run-edit-mode{
    order:1;
  }

  .run-brand-actions .run-id{
    order:2;
  }

  .run-top-content{
    flex-direction:column !important;
    gap:8px !important;
  }

  .run-top{
    margin-bottom:0 !important;
  }

  .run-player-area{
    width:100% !important;
    height:auto !important;
  }

  .run-player-area .run-players{
    width:100% !important;
    min-height:0 !important;
    flex-direction:column !important;
  }

  .run-player{
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    min-height:var(--run-card-height) !important;
  }

  .run-team-inline{
    width:100% !important;
    max-width:none !important;
    height:auto !important;

  }

  .run-team-slots{
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    margin:0 !important;
  }

  .run-team-slots .team-slot{
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:1;
  }
}/* Feste UI-Hoverfarbe – NICHT die Spielerfarbe */

@media(max-width:480px){
  .run-team-slots{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}
.run-add-player:hover,
.run-add-player:focus-visible,
.run-brand-actions .run-edit-mode button:hover,
.run-brand-actions .run-edit-mode button:focus-visible,
.btn:not(.primary):not(.danger):not(.player-remove-btn):hover,
.btn:not(.primary):not(.danger):not(.player-remove-btn):focus-visible{
  border-color:var(--highlight,var(--run-highlight,#9f7aea)) !important;
  background:#0a0a0a !important;
  color:var(--highlight,var(--run-highlight,#9f7aea)) !important;
  outline:none !important;
}










/* ==================================================
   v22 – LEERE TEAM-SLOTS NEUTRAL
   ================================================== */

.run-team-slots .team-slot.empty{
  border:1px dashed #303030 !important;
  background:transparent !important;
  color:#596274 !important;
  box-shadow:none !important;
  transform:none !important;
  outline:none !important;
  cursor:default !important;
}

.run-team-slots .empty-team-pokeball{
  width:18px !important;
  height:18px !important;
  display:block !important;
  color:#596274 !important;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  padding:0 !important;
  margin:0 !important;
}


/* ==================================================
   v25 – STATS INFO HOVER FIX
   ================================================== */

/* Encounter-Stats bleibt beim Hover exakt vertikal zentriert. */
.tracker-app .enc-info-btn:hover,
.tracker-app .enc-info-btn:focus-visible{
  transform:translateY(-50%) !important;
}

/* Andere Stats-Buttons: keine Hover-Bewegung. */
.tracker-app .info-icon-btn:hover:not(.enc-info-btn),
.tracker-app .info-icon-btn:focus-visible:not(.enc-info-btn),
.tracker-app .fusion-stats-btn:hover,
.tracker-app .fusion-stats-btn:focus-visible{
  translate:none !important;
}

/* ---------- Typography: Inter outside homepage ---------- */
body:not(:has(.hero)){
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
body:not(:has(.hero)) .page-head h1,
body:not(:has(.hero)) .game-card strong,
body:not(:has(.hero)) .run-page,
body:not(:has(.hero)) .page-head + .public-players,
body:not(:has(.hero)) .editor-grid,
body:not(:has(.hero)) .btn{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
