@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600 900; font-display: swap; src: url(fonts/nunito-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600 900; font-display: swap; src: url(fonts/nunito-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #f2f4f6; color: #222;
  font-family: 'Nunito', "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; font-weight: 700;
  touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
body.in-game { background: #060919; }
[hidden] { display: none !important; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }


#stage { position: fixed; inset: 0; --sw: 100vw; --sh: 100vh; --sw: 100dvw; --sh: 100dvh; --st: env(safe-area-inset-top); --sr: env(safe-area-inset-right); --sb: env(safe-area-inset-bottom); --sl: env(safe-area-inset-left); }

body.force-landscape #stage { --st: 0px; --sr: 0px; --sb: 0px; --sl: 0px; }

body.safe-sides #stage { --sl: 0px; --sr: 0px; transform: translateX(0); }
body.force-landscape #stage { inset: auto; top: 0; transform: rotate(90deg); transform-origin: top left; }
button, input, select { font-family: inherit; }
button { font: inherit; border: 0; cursor: pointer; touch-action: manipulation; color: inherit; }
svg { display: block; }

.screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  overflow-y: auto;
}
.home-inner { width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.title {
  margin: 0; font-size: clamp(56px, 13vw, 120px); font-weight: 800; letter-spacing: -1px; line-height: 1;
  color: #5d5d5d; text-shadow: 0 6px 0 rgba(0,0,0,.08);
}
.server-name { margin: -6px 0 0; color: #8a8f99; font-size: 14px; }
.name-input {
  width: 100%; max-width: 520px; font: inherit; font-size: clamp(22px, 5vw, 34px); font-weight: 600;
  padding: 12px 22px; border-radius: 8px; border: 3px solid #d6d9de; background: #fff; color: #333;
  outline: none; user-select: text; -webkit-user-select: text;
}
.name-input::placeholder { color: #b5b8bd; }
.name-input:focus { border-color: #9aa3ad; }

.setting {
  width: 100%; max-width: 520px; display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 8px; background: #fff; border: 3px solid #d6d9de;
  font-weight: 700; color: #5d5d5d;
}
.setting label { white-space: nowrap; }
.skins-setting { flex-wrap: wrap; }
.skin-list { display: flex; gap: 6px; overflow-x: auto; flex: 1; padding: 2px; scrollbar-width: thin; touch-action: pan-x; }
.skin-choice { flex: 0 0 auto; width: 46px; height: 46px; padding: 0; border-radius: 50%; background: transparent; border: 3px solid transparent; }
.skin-choice canvas { width: 100%; height: 100%; display: block; }
.skin-choice.selected { border-color: #f1590f; transform: scale(1.08); }
.toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: #f1590f; }
.setting input:disabled { opacity: .4; }
.setting input[type=range] { flex: 1; min-width: 60px; accent-color: #f1590f; touch-action: pan-x; }
.setting-number {
  width: 92px; font: inherit; font-size: 18px; font-weight: 700; text-align: right; padding: 6px 8px;
  border: 2px solid #d6d9de; border-radius: 6px; color: #333; user-select: text; -webkit-user-select: text;
}

.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; width: 100%; }
.tile {
  flex: 1 1 200px; max-width: 240px; min-height: 150px; padding: 18px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border-radius: 8px; color: #fff; font-size: 22px; font-weight: 800; text-align: center; line-height: 1.15;
  text-shadow: 0 2px 0 rgba(0,0,0,.18);
}
.tile svg { width: 56px; height: 56px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.15)); }
.tile:active, .tile-small:active { transform: translateY(3px); box-shadow: none; }
.tile-orange { background: #f1590f; box-shadow: 0 6px 0 #b8400a; }
.tile-blue { background: #1f63dc; box-shadow: 0 6px 0 #1546a3; }
.tile-green { background: #5cc41d; box-shadow: 0 6px 0 #3f8f10; }
.tile-small {
  padding: 14px 22px; border-radius: 8px; color: #fff; font-size: 19px; font-weight: 800;
  text-shadow: 0 1px 0 rgba(0,0,0,.18);
}
.join-box { display: flex; gap: 10px; width: 100%; max-width: 520px; }
.code-input { flex: 1; min-width: 0; text-align: center; letter-spacing: 6px; }
.error { min-height: 1.2em; margin: 0; color: #d62d4a; font-weight: 600; text-align: center; }

@media (max-width: 560px) {
  .tile { flex-basis: 100%; max-width: none; min-height: 0; flex-direction: row; font-size: 20px; padding: 14px; }
  .tile svg { width: 34px; height: 34px; }
}

.dim { background: rgba(0,0,0,.6); }
.card {
  width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; padding: 24px;
  border-radius: 10px; background: #fff; color: #333; box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.card h2 { margin: 0; text-align: center; color: #5d5d5d; }
.results { max-width: 420px; padding: 22px 26px; }
.results h2 { text-align: left; font-size: 24px; color: #4a4a4a; }
.results dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 4px 0 6px; font-size: 20px; }
.results dt { color: #8d9198; }
.results dd { margin: 0; font-weight: 800; color: #4a4a4a; text-align: right; }
.results-buttons { display: flex; gap: 12px; }
.results-buttons button { flex: 1; }

#hud {
  position: fixed; top: calc(9px + var(--st)); left: calc(9px + var(--sl));
  right: calc(9px + var(--sr));
  display: flex; align-items: flex-start; gap: 11px; pointer-events: none; color: #fff;
}
#hud button { pointer-events: auto; }
.hud-left { display: flex; flex-direction: column; gap: 10px; position: relative; }
.square {
  width: 65px; height: 65px; display: flex; align-items: center; justify-content: center; padding: 0;
  border: 2px solid rgba(255,255,255,.26); border-radius: 12px; background: rgba(255,255,255,.04); color: rgba(255,255,255,.95);
}
.square svg { width: 36px; height: 36px; }
.square:active { background: rgba(255,255,255,.16); }
.score { font-size: 22px; font-weight: 700; color: rgba(255,255,255,.5); line-height: 34px; margin-top: 2px; }
.hud-right { margin-left: auto; display: flex; align-items: flex-start; gap: 18px; }
.mode-select {
  pointer-events: auto; height: 65px; max-width: 240px; padding: 0 10px; font: inherit; font-size: 15px; font-weight: 700;
  border: 2px solid rgba(255,255,255,.26); border-radius: 12px; background: rgba(20,14,40,.75); color: #fff;
}
.mode-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 6px; pointer-events: none; }
.verdict-box { display: flex; gap: 6px; pointer-events: auto; }
.verdict-box[hidden] { display: none; }
.verdict-box button { flex: 1; height: 44px; font-size: 22px; font-weight: 800; border-radius: 10px; border: 2px solid rgba(255,255,255,.26); background: rgba(20,14,40,.75); color: #fff; }
.verdict-box button:active { background: rgba(255,255,255,.25); }
.verdict-msg { min-height: 18px; text-align: center; font-size: 14px; font-weight: 700; color: #ffd23f; text-shadow: 0 1px 2px #000; }
body.small-screen .verdict-box button { height: 38px; font-size: 18px; }
.mode-select optgroup, .mode-select option { background: #1a1030; color: #fff; }
body.small-screen .mode-select { height: 52px; max-width: 230px; font-size: 12px; }
body.theme-light .mode-select { background: rgba(255,255,255,.85); color: #333; border-color: #b9c2c7; }
.friends { display: flex; align-items: center; gap: 7px; height: 65px; font-size: 18px; font-weight: 700; color: rgba(255,255,255,.62); }
.friends svg { width: 30px; height: 25px; }

.action {
  position: fixed; left: 0; top: 0; width: 92px; height: 92px; padding: 0; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  border: 2px solid rgba(255,255,255,.26); background: rgba(255,255,255,.02); color: rgba(255,255,255,.9);  touch-action: none;
}
.action svg { width: 60%; height: 60%; }
#btn-split, #btn-feed, #btn-master, #btn-double { width: 115px; height: 115px; }
#btn-split svg, #btn-feed svg { width: 58%; height: 58%; }
.master-label { font-size: 17px; font-weight: 900; letter-spacing: 0; }
.size-label { display: flex; align-items: center; gap: 6px; }
.size-label input { width: 110px; accent-color: #5cc41d; }
.size-label output { min-width: 44px; }
body.editing .action.selected { border-color: #5cc41d; border-style: solid; }
.my-server {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  width: 100%; max-width: 520px; padding: 10px 14px; border-radius: 8px;
  background: #fff; border: 3px solid #1f63dc; font-weight: 700; color: #333;
}
.my-server strong { letter-spacing: 4px; color: #1f63dc; font-size: 20px; }
.link-button { background: none; color: #8a8f99; text-decoration: underline; font-weight: 600; padding: 4px; }
.zoom-panel {
  display: flex; align-items: center; gap: 10px; padding: 8px 4px;
  color: #5d5d5d; font-weight: 800; pointer-events: auto;
}
.pause-card { gap: 12px; min-width: 280px; }
.pause-card button { width: 100%; }
.zoom-panel input { flex: 1; accent-color: #4fd1c5; }
.zoom-panel span { min-width: 40px; text-align: right; }
#btn-master svg { width: 54%; height: 54%; }
.action { transition: transform .08s ease-out, opacity .15s; }
.action.pressed, .action:not(.joystick):active { background: rgba(255,255,255,.18); } 
.action.disabled { opacity: .35; }
.lb-box { position: relative; pointer-events: auto; }
.lb-box.collapsed .leaderboard { display: none; }
.leaderboard {
  position: absolute; right: 0; top: 73px; min-width: 190px;
  margin: 0; padding: 6px 12px 8px; border-radius: 12px; list-style-position: inside;
  background: rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.18); color: #ddd; font-size: 15px; font-weight: 600; line-height: 1.45;
  pointer-events: none;
}
.leaderboard:empty { display: none; }
.leaderboard li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.leaderboard li.me { color: #ffd23f; }
.leaderboard li.gap { list-style: none; margin-left: -18px; }
body.small-screen .lb-box { min-width: 150px; }
body.small-screen .leaderboard { font-size: 12px; line-height: 1.35; }
body.small-screen .leaderboard li:nth-child(n+6):not(.me) { display: none; }
body.small-screen .square { width: 52px; height: 52px; }
body.small-screen .square svg { width: 29px; height: 29px; }
body.small-screen .friends { height: 52px; font-size: 15px; }
body.small-screen .leaderboard { top: 60px; }
body.small-screen .score { font-size: 18px; }
.joystick { width: 150px; height: 150px; border: none; background: radial-gradient(circle, rgba(128,128,128,.3) 0 69%, rgba(128,128,128,0) 70%); }
.joystick-knob {
  width: 48px; height: 48px; border-radius: 50%; pointer-events: none;
  background: rgba(60,60,60,.6);
}
.joystick.active { background: radial-gradient(circle, rgba(128,128,128,.38) 0 69%, rgba(128,128,128,0) 70%); }
body.editing .action { border-style: dashed; border-color: #ffd23f; animation: wiggle .9s ease-in-out infinite; cursor: grab; }

#hud .square.hud-libre { position: fixed; z-index: 3; }
body.editing #hud .square { border-style: dashed; border-color: #ffd23f; animation: wiggle .9s ease-in-out infinite; cursor: grab; touch-action: none; }
@keyframes wiggle { 50% { transform: scale(1.06); } }

.layout-bar {
  position: fixed; left: 50%; top: calc(80px + var(--st)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 10px 14px; border-radius: 12px; background: rgba(20,20,20,.9); color: #fff; font-weight: 600;
  
  width: max-content; max-width: calc(var(--sw) - 170px);
}
.layout-bar button { padding: 8px 14px; border-radius: 8px; background: #333; color: #fff; font-weight: 700; }
.layout-bar button.primary { background: #5cc41d; }

#connection {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); margin: 0;
  background: #ff4d6d; color: #fff; padding: 10px 16px; border-radius: 10px;
}

.mode-choice { display: flex; gap: 8px; flex: 1; }
.mode-btn {
  flex: 1; padding: 8px 10px; border-radius: 8px; border: 3px solid #d6d9de; background: #f6f7f8;
  font: inherit; font-weight: 800; color: #6b6f75; cursor: pointer;
}
.mode-btn.selected { border-color: #f1590f; background: #fff3ec; color: #f1590f; }

.emote-panel {
  position: absolute; left: 76px; top: 76px; z-index: 2; pointer-events: auto;
  display: grid; grid-template-columns: repeat(4, 48px); gap: 6px; padding: 8px; border-radius: 12px;
  background: rgba(0,0,0,.65); border: 2px solid rgba(255,255,255,.3);
}
.emote-panel button {
  width: 48px; height: 48px; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff;
  font-size: 26px; font-weight: 800; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.emote-panel button:active { background: rgba(255,255,255,.25); }

#pause { z-index: 20; }

body.theme-light .square { background: #d6dde1; border-color: #b9c2c7; color: #fff; }
body.theme-light .square svg { filter: drop-shadow(0 0 1px rgba(90,100,110,.55)); }
body.theme-light .score, body.theme-light .friends { color: #8c9095; }
body.theme-light .action { border-color: rgba(120,130,140,.35); background: rgba(150,160,170,.12); color: #fff; }
body.theme-light .action svg { filter: drop-shadow(0 0 1.5px rgba(90,100,110,.7)); }
body.theme-light .joystick { background: radial-gradient(circle, rgba(120,128,136,.22) 0 69%, rgba(120,128,136,0) 70%); }
body.theme-light .joystick.active { background: radial-gradient(circle, rgba(120,128,136,.3) 0 69%, rgba(120,128,136,0) 70%); }
body.theme-light .joystick-knob { background: rgba(110,118,126,.45); }
body.theme-light .leaderboard { background: rgba(255,255,255,.75); border-color: #b9c2c7; color: #555; }
body.theme-light .leaderboard li.me { color: #d08a00; }
.pause-theme { width: 100%; }

.tile-admin { background: #7b3fe4; box-shadow: 0 6px 0 #5a2bb0; }
.tile-red { background: #d93a3a; box-shadow: 0 6px 0 #a52626; }
#admin { z-index: 21; }
.admin-card { max-width: 560px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; gap: 10px; }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-room { border: 2px solid #e3e6ea; border-radius: 10px; padding: 10px 12px; }
.admin-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-head strong { font-size: 17px; color: #333; }
.admin-tag { padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: 700; background: #eef2f6; color: #6b737b; }
.admin-meta { margin-top: 4px; color: #7a828a; font-size: 13px; }
.admin-player { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-top: 1px solid #f0f2f4; margin-top: 4px; font-weight: 600; color: #444; }
.admin-player small { color: #8a9199; font-weight: 600; margin-left: 6px; }
.admin-reset, .admin-kick { margin-left: auto; padding: 6px 10px; border-radius: 8px; font-weight: 800; font-size: 13px; color: #fff; background: #f1590f; }
.admin-kick { background: #8a9199; }
.admin-empty { color: #8a9199; text-align: center; margin: 16px 0; }
.admin-msg { min-height: 18px; margin: 0; color: #1f63dc; font-weight: 700; text-align: center; }
.admin-buttons { display: flex; gap: 10px; }
.admin-buttons button { flex: 1; }

.lobbies { width: 100%; max-width: 520px; background: #fff; border: 3px solid #d6d9de; border-radius: 10px; padding: 10px 14px; }
.lobbies-title { font-weight: 800; color: #5d5d5d; margin-bottom: 6px; }
.lobbies table { width: 100%; border-collapse: collapse; font-weight: 700; color: #4a4a4a; }
.lobbies th { text-align: left; font-size: 13px; color: #8a8f99; font-weight: 700; padding: 2px 0 4px; }
.lobbies td { padding: 5px 0; border-top: 1px solid #eef0f2; }
.lobbies th:not(:first-child), .lobbies td:not(:first-child) { text-align: right; }

:root {
  --c-bg1: #070b1f; --c-bg2: #160f3a;
  --c-glass: rgba(255,255,255,.07); --c-glass-2: rgba(255,255,255,.12); --c-line: rgba(160,180,255,.22);
  --c-text: #eef1ff; --c-muted: #9aa3c7;
  --c-cyan: #22e3ff; --c-violet: #8b5cff; --c-pink: #ff3dbb; --c-lime: #39f2a0;
}
html, body { background: var(--c-bg1); color: var(--c-text); }
.title {
  color: transparent; background: linear-gradient(90deg, var(--c-cyan), var(--c-violet) 55%, var(--c-pink));
  -webkit-background-clip: text; background-clip: text; text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(139,92,255,.45)); letter-spacing: 1px;
}
.server-name { color: var(--c-muted); }
.name-input, .setting, .lobbies, .my-server {
  background: var(--c-glass); border: 1px solid var(--c-line); color: var(--c-text);
  border-radius: 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
}
.name-input { color: #fff; }
.name-input::placeholder { color: #7f88b3; }
.name-input:focus { border-color: var(--c-cyan); box-shadow: 0 0 0 3px rgba(34,227,255,.18), 0 8px 28px rgba(0,0,0,.35); }
.setting { color: var(--c-text); }
.setting-number, .code-input {
  background: rgba(0,0,0,.28); border: 1px solid var(--c-line); color: #fff; border-radius: 10px;
}
.setting input[type=range], .toggle input, .zoom-panel input { accent-color: var(--c-cyan); }
.skin-choice.selected { border-color: var(--c-cyan); box-shadow: 0 0 14px rgba(34,227,255,.6); }
.mode-btn { background: rgba(0,0,0,.25); border: 1px solid var(--c-line); color: var(--c-muted); border-radius: 12px; }
.mode-btn.selected { border-color: var(--c-cyan); background: rgba(34,227,255,.12); color: #fff; box-shadow: 0 0 16px rgba(34,227,255,.35); }

.tile, .tile-small { border-radius: 16px; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.tile-orange { background: linear-gradient(135deg, #22e3ff, #2f6bff); box-shadow: 0 6px 0 #1a3fa8, 0 10px 30px rgba(34,160,255,.35); }
.tile-blue { background: linear-gradient(135deg, #8b5cff, #ff3dbb); box-shadow: 0 6px 0 #6a1f9e, 0 10px 30px rgba(200,70,255,.35); }
.tile-green { background: linear-gradient(135deg, #39f2a0, #10b5c9); box-shadow: 0 6px 0 #0a7f86, 0 10px 30px rgba(40,230,190,.3); }
.tile-red { background: linear-gradient(135deg, #ff5577, #e0245e); box-shadow: 0 6px 0 #9c1740; }
.tile-admin { background: linear-gradient(135deg, #b06bff, #6b3cff); box-shadow: 0 6px 0 #4a24b0; }
.tile:active, .tile-small:active { transform: translateY(3px); box-shadow: 0 0 22px rgba(255,255,255,.25); }
.link-button { color: var(--c-muted); }
.error { color: #ff6b8b; }

.lobbies-title { color: #fff; }
.lobbies table { color: var(--c-text); }
.lobbies th { color: var(--c-muted); }
.lobbies td { border-top: 1px solid rgba(160,180,255,.14); }
.my-server strong { color: var(--c-cyan); }

.dim { background: rgba(5,8,25,.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.card {
  background: linear-gradient(160deg, rgba(30,26,70,.96), rgba(12,14,38,.96)); color: var(--c-text);
  border: 1px solid var(--c-line); border-radius: 18px; box-shadow: 0 18px 60px rgba(0,0,0,.55), 0 0 40px rgba(139,92,255,.15);
}
.card h2, .results h2 { color: #fff; }
.results dt { color: var(--c-muted); }
.results dd { color: #fff; }
.zoom-panel { color: var(--c-text); }
.admin-room { border-color: var(--c-line); background: rgba(255,255,255,.04); }
.admin-head strong, .admin-player { color: var(--c-text); }
.admin-tag { background: rgba(255,255,255,.08); color: var(--c-muted); }
.admin-meta, .admin-player small, .admin-empty { color: var(--c-muted); }
.admin-player { border-top-color: rgba(160,180,255,.12); }
.admin-msg { color: var(--c-cyan); }
* { scrollbar-color: rgba(139,92,255,.55) rgba(255,255,255,.04); }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.04); border-radius: 8px; }
::-webkit-scrollbar-thumb { background: linear-gradient(90deg, rgba(34,227,255,.6), rgba(139,92,255,.6)); border-radius: 8px; }
#home { align-items: flex-start; }
#home .home-inner { margin: auto 0; }
#btn-quit { background: linear-gradient(135deg, #ff5577, #e0245e); box-shadow: 0 6px 0 #9c1740, 0 10px 26px rgba(255,60,110,.3); }

.joystick { opacity: 0; transition: opacity .18s ease-out; }
.joystick.active { opacity: 1; transition: opacity .06s ease-out; }
body.editing .joystick { opacity: 1; }

.joystick { background: radial-gradient(circle, rgba(128,128,128,.16) 0 69%, rgba(128,128,128,0) 70%); }
.joystick.active { background: radial-gradient(circle, rgba(128,128,128,.2) 0 69%, rgba(128,128,128,0) 70%); }
.joystick-knob { background: rgba(70,70,70,.38); }
body.theme-light .joystick, body.theme-light .joystick.active { background: radial-gradient(circle, rgba(120,128,136,.14) 0 69%, rgba(120,128,136,0) 70%); }
body.theme-light .joystick-knob { background: rgba(110,118,126,.3); }
.joystick { position: fixed; }
.joystick-touch {
  position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.55); background: rgba(255,255,255,.12); pointer-events: none;
}
body.theme-light .joystick-touch { border-color: rgba(70,80,90,.5); background: rgba(70,80,90,.1); }

#params { z-index: 22; }
.params-card { max-width: 720px; width: 100%; max-height: calc(100vh - 30px); max-height: calc(100dvh - 30px); gap: 10px; }
.params-search { width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--c-line); background: rgba(0,0,0,.28); color: #fff; user-select: text; -webkit-user-select: text; }
.params-list { overflow-y: auto; flex: 1; min-height: 120px; max-height: calc(100vh - 260px); padding-right: 4px; touch-action: pan-y; }
.params-sec { margin: 12px 0 4px; font-weight: 800; color: var(--c-cyan); }
.params-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(160,180,255,.12); }
.params-row.changed b { color: #ffd23f; }
.params-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.params-text b { font-size: 14px; color: #fff; }
.params-text small { color: #ffd23f; font-weight: 700; }
.params-text span { color: var(--c-muted); line-height: 1.25; }
.params-row input[type=number] { width: 96px; font: inherit; font-weight: 700; text-align: right; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--c-line); background: rgba(0,0,0,.3); color: #fff; user-select: text; -webkit-user-select: text; }
.params-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--c-cyan); }
.params-undo { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,.1); color: #fff; font-size: 16px; }
.params-profiles { display: flex; gap: 8px; flex-wrap: wrap; }
.params-profiles:empty { display: none; }
.params-profile { flex: 1; min-width: 120px; padding: 10px 12px; border-radius: 10px; font-weight: 800; color: #fff; background: linear-gradient(135deg, rgba(34,227,255,.35), rgba(139,92,255,.45)); border: 1px solid var(--c-line); }

.notes-box { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--c-line); }
.notes-title { font-weight: 700; color: var(--c-text); }
.notes-title b { color: var(--c-cyan); }
.notes-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 4px 12px; }
.notes-cat { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--c-text); }
.notes-cat span { flex: 1; }
.notes-cat button { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.08); color: var(--c-muted); font-weight: 800; }
.notes-cat button.on { background: linear-gradient(135deg, #ffd23f, #ff9f1a); color: #1a1030; }
.notes-comment { width: 100%; font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--c-line); background: rgba(0,0,0,.28); color: #fff; resize: vertical; user-select: text; -webkit-user-select: text; }
.notes-history { font-size: 12px; color: var(--c-muted); display: flex; flex-direction: column; gap: 2px; }
.notes-history b { color: #fff; }

.quit-card h2 { font-size: 22px; text-align: center; }

.play-myserver { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.groupe-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.groupe-nb { font-size: 13px; font-weight: 800; color: var(--c-muted, #9fb4ff); }
.groupe-membres { display: flex; flex-wrap: wrap; gap: 10px; }
.groupe-membres:empty { display: none; }
.groupe-membre { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 72px; padding: 6px 2px; border-radius: 12px; background: rgba(255,255,255,.05); color: inherit; }
.groupe-membre:active { background: rgba(255,255,255,.14); }
.groupe-membre b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 800; }
.groupe-membre small { font-size: 11px; font-weight: 700; color: var(--c-muted, #9fb4ff); }
.photo-ronde { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; flex: 0 0 auto;
  background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.25); font-size: 20px; font-weight: 900; color: #fff; }
.photo-ronde img { width: 100%; height: 100%; object-fit: cover; }
.fiche-card { align-items: center; text-align: center; }
.fiche-photo.photo-ronde { width: 88px; height: 88px; font-size: 38px; }
.fiche-niveau { margin: -6px 0 0; font-weight: 800; color: var(--c-muted, #9fb4ff); }
.fiche-stats { grid-template-columns: repeat(3, 1fr); width: 100%; }
.quit-row { display: flex; gap: 12px; }
.quit-row button { flex: 1; }
#quit-confirm .tile-red { background: linear-gradient(135deg, #ff4d6d, #d92b4b); color: #fff; }

.action:not(.joystick) { opacity: var(--btn-alpha, 1); }
.action.disabled:not(.joystick) { opacity: calc(var(--btn-alpha, 1) * .35); }

.settings-card { max-height: 90vh; overflow-y: auto; }
.settings-sub { margin: 6px 0 0; font-size: 15px; opacity: .75; font-weight: 700; }

.skin-bar {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 6px 14px 6px 6px; border-radius: 14px;
  background: rgba(0,0,0,.25); border: 1px solid var(--c-line); color: #fff; font-weight: 800; text-align: left;
}
.skin-bar:hover, .skin-bar:focus-visible { border-color: var(--c-cyan); box-shadow: 0 0 16px rgba(34,227,255,.3); }
.skin-bar:active { transform: scale(.98); }
.skin-bar canvas { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 50%; filter: drop-shadow(0 0 10px rgba(34,227,255,.35)); }
.skin-bar-name { flex: 1; min-width: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skin-bar-go { flex: 0 0 auto; color: var(--c-cyan); font-size: 14px; }
.skins-card { max-width: 760px; max-height: min(92vh, 900px); padding: 18px; gap: 12px; overflow: hidden; }
.skins-card > * { min-width: 0; }
.skins-head { display: flex; align-items: center; justify-content: space-between; }
.skins-head h2 { font-size: 26px; }
.skins-close { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid var(--c-line); font-size: 18px; }
.skin-tabs { display: flex; gap: 8px; overflow-x: auto; flex: 0 0 auto; padding-bottom: 2px; scrollbar-width: none; }
.skin-tab {
  flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid var(--c-line);
  color: var(--c-muted); font-weight: 800; font-size: 15px;
}
.skin-tab.selected { color: #fff; border-color: var(--c-cyan); background: rgba(34,227,255,.12); box-shadow: 0 0 14px rgba(34,227,255,.3); }
.skin-grid {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px; padding: 4px; scrollbar-width: thin; touch-action: pan-y;
}
.skin-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px 10px; border-radius: 16px;
  background: rgba(255,255,255,.05); border: 2px solid transparent; color: var(--c-text); font-weight: 800; font-size: 14px;
  transition: transform .12s, background .12s;
}
.skin-card canvas { width: 88px; height: 88px; border-radius: 50%; }
.skin-card:hover { background: rgba(255,255,255,.09); }
.skin-card:active { transform: scale(.96); }
.skin-card.selected { border-color: var(--c-cyan); background: rgba(34,227,255,.1); box-shadow: 0 0 18px rgba(34,227,255,.35); }
.skin-card.selected canvas { filter: drop-shadow(0 0 12px rgba(34,227,255,.55)); }
@media (max-width: 420px) { .skin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .skin-card canvas { width: 72px; height: 72px; } }
@media (max-height: 500px) { .skins-card { max-height: 96vh; padding: 12px; gap: 8px; } .skin-card canvas { width: 64px; height: 64px; } }

.skin-grid.color-grid { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 12px; align-content: start; }
.color-swatch {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(255,255,255,.14);
  box-shadow: inset 0 -6px 12px rgba(0,0,0,.25), inset 0 6px 10px rgba(255,255,255,.25); transition: transform .12s;
}
.color-swatch:active { transform: scale(.92); }
.color-swatch.selected { border-color: #fff; box-shadow: 0 0 0 3px var(--c-cyan), 0 0 18px rgba(34,227,255,.55), inset 0 -6px 12px rgba(0,0,0,.25); }
.swatch-random { background: conic-gradient(#ff3b5c, #ffcc00, #00e07a, #00d5e0, #1e90ff, #b44dff, #ff4fd8, #ff3b5c); }
.swatch-random::after { content: '?'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 22px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.swatch-custom:not([style]) { background: radial-gradient(circle at 50% 50%, #fff 0 18%, transparent 19%), conic-gradient(from 90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.swatch-custom::after { content: '+'; position: absolute; inset: 0; display: grid; place-items: center; color: #222; font-weight: 800; font-size: 22px; }
.swatch-custom[style]::after { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.swatch-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.color-note { grid-column: 1 / -1; margin: 4px 0 0; color: var(--c-muted); font-size: 13px; text-align: center; }

.skin-grid.duo-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); align-content: start; }
.skin-duo { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 18px; background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid var(--c-line); }
.skin-duo-title { text-align: center; font-weight: 800; font-size: 15px; color: #fff; letter-spacing: .3px; }
.skin-duo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 420px) { .skin-grid.duo-grid { grid-template-columns: 1fr; } }

.watch-btn { padding: 5px 10px; border-radius: 10px; border: 1px solid var(--c-line); background: rgba(34,227,255,.12); color: #fff; font-weight: 800; font-size: 13px; }
.watch-btn:active { transform: scale(.95); }
.spec-bar {
  position: fixed; left: 50%; bottom: max(14px, var(--sb)); transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-radius: 999px;
  background: rgba(10,12,34,.78); border: 1px solid var(--c-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; font-weight: 800; box-shadow: 0 8px 28px rgba(0,0,0,.45); max-width: calc(var(--sw) - 24px);
}
.spec-label { max-width: calc(var(--sw) * .38); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spec-bar button { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid var(--c-line); color: #fff; font-weight: 800; font-size: 17px; }
.spec-bar button:active { transform: scale(.94); }
#spec-quit { background: linear-gradient(135deg, #ff5577, #e0245e); border: 0; font-size: 15px; }
body.spectating .action, body.spectating #btn-emote, body.spectating #score { display: none !important; }
body.spectating #leaderboard li { cursor: pointer; }

.settings-tabs { display: flex; gap: 8px; justify-content: center; }
.settings-pane { display: flex; flex-direction: column; gap: 12px; }
.settings-pane[hidden] { display: none; }
.settings-help { margin: 0; font-size: 12.5px; color: var(--c-muted); line-height: 1.4; }
.settings-card { overflow-x: hidden; }
.settings-tabs .skin-tab { width: auto !important; flex: 1 1 0; min-width: 0; }
.settings-pane .zoom-panel label { white-space: nowrap; }

#joy-avance .zoom-panel { flex-wrap: wrap; row-gap: 2px; }
#joy-avance .zoom-panel label { order: 1; flex: 1 1 auto; }
#joy-avance .zoom-panel span { order: 2; }
#joy-avance .zoom-panel input { order: 3; flex: 1 1 100%; width: 100%; }
.settings-pane .zoom-panel span { white-space: nowrap; }

.account-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.account-btn {
  display: inline-flex; align-items: center; gap: 8px; max-width: 220px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: rgba(0,0,0,.25); border: 1px solid var(--c-line); color: #fff; font-weight: 800; font-size: 15px;
}
.account-btn svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--c-cyan); }
.account-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-btn:hover, .account-btn:focus-visible { border-color: var(--c-cyan); box-shadow: 0 0 14px rgba(34,227,255,.3); }
.wallet {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px 7px 9px; border-radius: 999px;
  background: rgba(0,0,0,.3); border: 1px solid color-mix(in srgb, var(--coin, #4de3ff) 45%, transparent);
  color: #fff; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums;
}
.coin {
  width: 16px; height: 16px; flex: 0 0 auto; margin: 0 2px; transform: rotate(45deg); border-radius: 4px;
  background: linear-gradient(135deg, #fff 0%, var(--coin, #4de3ff) 38%, color-mix(in srgb, var(--coin, #4de3ff) 55%, #1a1060) 100%);
  box-shadow: 0 0 10px color-mix(in srgb, var(--coin, #4de3ff) 70%, transparent);
}
.wallet-big { align-self: center; font-size: 26px; padding: 10px 20px 10px 14px; gap: 12px; }
.wallet-big .coin { width: 22px; height: 22px; border-radius: 6px; }
.wallet-cur { color: var(--c-muted); font-size: 16px; }
.skins-wallet { margin-left: auto; margin-right: 10px; }
.account-card { max-width: 400px; }
.account-status { margin: 0; color: var(--c-muted); text-align: center; line-height: 1.35; }
.account-form { display: flex; flex-direction: column; gap: 10px; }
.account-form[hidden] { display: none; }
.account-form .name-input { user-select: text; -webkit-user-select: text; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.account-actions button { flex: 1 1 140px; }
.account-msg, .shop-msg { margin: 0; min-height: 1.3em; text-align: center; font-weight: 700; color: var(--c-lime); }
.account-msg.error, .shop-msg.error { color: #ff8a80; }
.skin-card { position: relative; }
.skin-card.locked canvas { filter: saturate(.75) brightness(.8); }
.skin-price {
  position: absolute; top: 6px; right: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px;
  background: rgba(0,0,0,.6); border: 1px solid color-mix(in srgb, var(--coin, #4de3ff) 55%, transparent); color: var(--coin, #4de3ff);
}
.skin-card.previewing { border-color: var(--coin, #4de3ff); background: color-mix(in srgb, var(--coin, #4de3ff) 12%, transparent); }
.skin-card.previewing canvas { filter: none; }
#skins-done.buy { background: linear-gradient(135deg, var(--coin, #4de3ff), #8b5cff); box-shadow: 0 6px 0 #3b2a99, 0 10px 30px rgba(77,227,255,.3); }
#skins-done.buy.short { background: rgba(255,255,255,.1); box-shadow: none; color: var(--c-muted); }

body.in-game button, body.in-game .action, body.in-game #hud * { touch-action: none; }

.fs-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; line-height: 1.4; }
.fs-steps svg { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; color: var(--c-cyan); }

body.tap-mode:not(.editing) #joystick { visibility: hidden; }
.tap-mark {
  position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; pointer-events: none; z-index: 5;
  border: 2px solid rgba(255,255,255,.55); background: rgba(255,255,255,.08); box-shadow: 0 0 14px rgba(34,227,255,.35);
}
body.theme-light .tap-mark { border-color: rgba(70,80,90,.5); background: rgba(70,80,90,.1); }


#hud { --hud-glass: linear-gradient(160deg, rgba(36,30,86,.62), rgba(12,14,40,.62)); --hud-line: rgba(140,170,255,.32); --hud-glow: 0 6px 18px rgba(0,0,0,.35), 0 0 16px rgba(139,92,255,.18); }
#hud .square {
  width: 56px; height: 56px; border-radius: 18px; border: 1.5px solid var(--hud-line); background: var(--hud-glass);
  color: #eaf6ff; box-shadow: var(--hud-glow); 
}
#hud .square svg { width: 30px; height: 30px; filter: drop-shadow(0 0 6px rgba(34,227,255,.35)); }
#hud .square:active { transform: scale(.94); background: linear-gradient(160deg, rgba(34,227,255,.35), rgba(139,92,255,.45)); }
#hud .square[aria-expanded="true"] { border-color: #22e3ff; box-shadow: 0 0 0 2px rgba(34,227,255,.25), var(--hud-glow); }

.score {
  display: inline-flex; align-items: center; height: 44px; margin-top: 6px; padding: 0 4px;
  color: #fff; font-size: 20px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums;
}
.friends {
  height: 44px; margin-top: 6px; padding: 0 14px 0 10px; gap: 8px; border-radius: 999px; font-size: 18px; font-weight: 900; color: #fff;
  background: var(--hud-glass); border: 1.5px solid var(--hud-line); box-shadow: var(--hud-glow);
}
.friends svg { width: 28px; height: 24px; color: #22e3ff; }
.leaderboard {
  top: 66px; min-width: 200px; padding: 34px 8px 8px; border-radius: 18px; list-style: none; counter-reset: none;
  background: var(--hud-glass); border: 1.5px solid var(--hud-line); box-shadow: var(--hud-glow); color: #e6ecff;
  font-size: 15px; font-weight: 800; line-height: 1.2; 
}
.leaderboard::before {
  content: attr(data-titre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: absolute; left: 12px; right: 12px; top: 9px; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  background: linear-gradient(90deg, #22e3ff, #8b5cff 60%, #ff3dbb); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.leaderboard li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; max-width: 240px; }
.leaderboard li.gap { margin: 4px 0 0; border-top: 1px dashed rgba(140,170,255,.3); border-radius: 0 0 10px 10px; }
.lb-rank {
  flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  font-size: 12px; font-weight: 900; color: #c9d4ff; background: rgba(255,255,255,.08);
}
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard li.r1 .lb-rank { color: #3a2400; background: linear-gradient(135deg, #fff1a8, #ffc53d); }
.leaderboard li.r2 .lb-rank { color: #1e2333; background: linear-gradient(135deg, #f4f7ff, #aeb9d6); }
.leaderboard li.r3 .lb-rank { color: #2c1406; background: linear-gradient(135deg, #ffd2a8, #d9864a); }
.leaderboard li.me { color: #fff; background: linear-gradient(90deg, rgba(34,227,255,.28), rgba(139,92,255,.28)); box-shadow: inset 0 0 0 1px rgba(34,227,255,.45); }
body.small-screen .leaderboard { top: 54px; font-size: 12px; padding-top: 28px; min-width: 160px; }
body.small-screen .leaderboard::before { font-size: 10px; top: 7px; }
body.small-screen #hud .square { width: 48px; height: 48px; border-radius: 15px; }
body.small-screen #hud .square svg { width: 26px; height: 26px; }
body.small-screen .score, body.small-screen .friends { height: 40px; font-size: 17px; }


.action {
  border: 2px solid rgba(255,255,255,.28);
  background: rgba(20,22,30,.35);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  color: rgba(255,255,255,.9);
}
.action svg { filter: none; }
.action.pressed, .action:not(.joystick):active { background: rgba(255,255,255,.18); }
.joystick {
  border: 1.5px solid rgba(255,255,255,.22); box-shadow: none;
  background: radial-gradient(circle, rgba(20,22,30,.22) 0 66%, rgba(255,255,255,.08) 67% 69%, rgba(0,0,0,0) 70%);
}
.joystick.active { background: radial-gradient(circle, rgba(20,22,30,.30) 0 66%, rgba(255,255,255,.14) 67% 69%, rgba(0,0,0,0) 70%); }
.joystick-knob { background: rgba(255,255,255,.55); box-shadow: 0 2px 8px rgba(0,0,0,.3); }

body.theme-light #hud { --hud-glass: linear-gradient(160deg, rgba(255,255,255,.88), rgba(232,238,255,.82)); --hud-line: rgba(110,90,220,.28); --hud-glow: 0 6px 16px rgba(60,70,140,.18); }
body.theme-light #hud .square { color: #5b3fd6; background: var(--hud-glass); border-color: var(--hud-line); }
body.theme-light #hud .square svg { filter: none; }
body.theme-light .score, body.theme-light .friends { color: #2a2560; }
body.theme-light .friends svg { color: #5b3fd6; }
body.theme-light .leaderboard { color: #2a2560; background: var(--hud-glass); border-color: var(--hud-line); }
body.theme-light .lb-rank { color: #4a4380; background: rgba(90,70,200,.1); }
body.theme-light .leaderboard li.me { color: #1b1650; background: linear-gradient(90deg, rgba(34,227,255,.22), rgba(139,92,255,.22)); }
body.theme-light .action { background: rgba(255,255,255,.6); border-color: rgba(60,66,80,.25); color: #3c4250; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
body.theme-light .action svg { filter: none; }
body.theme-light .joystick, body.theme-light .joystick.active { background: radial-gradient(circle, rgba(60,66,80,.10) 0 66%, rgba(60,66,80,.16) 67% 69%, rgba(0,0,0,0) 70%); border-color: rgba(60,66,80,.22); }
body.theme-light .joystick-knob { background: rgba(60,66,80,.4); box-shadow: none; }


.hub-inner { width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hub-wallet { font-size: 18px; }
.hub-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; }
.hub-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 230px; padding: 20px 16px;
  border-radius: 24px; color: #fff; text-align: center; border: 1px solid rgba(160,180,255,.28);
  background: linear-gradient(160deg, rgba(36,30,86,.78), rgba(12,14,40,.78)); box-shadow: 0 14px 40px rgba(0,0,0,.45);
  transition: transform .12s, box-shadow .12s;
}
.hub-tile:active { transform: scale(.97); }
.hub-tile:hover { box-shadow: 0 14px 40px rgba(0,0,0,.45), 0 0 26px rgba(139,92,255,.35); }
.hub-tile-play { background: linear-gradient(135deg, #22e3ff, #2f6bff 55%, #8b5cff); border-color: rgba(255,255,255,.25); box-shadow: 0 8px 0 #22309a, 0 18px 44px rgba(34,160,255,.35); }
.hub-tile-play svg { width: 92px; height: 92px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.3)); }
.hub-tile canvas { width: 92px; height: 92px; border-radius: 50%; filter: drop-shadow(0 0 14px rgba(34,227,255,.45)); }
.hub-tile-title { font-size: 24px; font-weight: 900; }
.hub-tile-rank svg { width: 92px; height: 92px; color: #b9a6ff; filter: drop-shadow(0 4px 10px rgba(0,0,0,.3)); }
.chest-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(255,170,60,.18), rgba(139,92,255,.16)); border: 1px solid rgba(255,200,120,.35); }
.chest-box::before { content: ''; flex: 0 0 44px; height: 44px; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='6' y='26' width='52' height='30' rx='5' fill='%23c46a1c'/%3E%3Cpath d='M6 26 Q6 10 32 10 Q58 10 58 26 Z' fill='%23e8892e'/%3E%3Crect x='6' y='24' width='52' height='6' fill='%23ffd34d'/%3E%3Crect x='27' y='22' width='10' height='14' rx='2' fill='%23ffd34d'/%3E%3C/svg%3E"); }
.chest-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chest-next { font-size: 13px; font-weight: 700; color: rgba(230,236,255,.75); }
#chest-result { z-index: 30; }
.chest-card { max-width: 420px; padding: 22px; gap: 12px; text-align: center; align-items: center; }
.chest-icon { width: 96px; height: 96px; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='6' y='26' width='52' height='30' rx='5' fill='%23c46a1c'/%3E%3Cpath d='M6 26 Q6 10 32 10 Q58 10 58 26 Z' fill='%23e8892e'/%3E%3Crect x='6' y='24' width='52' height='6' fill='%23ffd34d'/%3E%3Crect x='27' y='22' width='10' height='14' rx='2' fill='%23ffd34d'/%3E%3C/svg%3E"); filter: drop-shadow(0 0 18px rgba(255,200,80,.6)); animation: chest-pop .45s ease-out; }
@keyframes chest-pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.chest-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.chest-items li { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.07); font-weight: 800; font-size: 18px; }
.hub-top { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 620px; }
.hub-road { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 14px; border-radius: 999px; color: #fff;
  background: linear-gradient(90deg, rgba(139,92,255,.35), rgba(34,227,255,.22)); border: 1px solid rgba(185,166,255,.45); font-weight: 900; }
.hub-road-bar { flex: 1; height: 10px; min-width: 40px; border-radius: 999px; background: rgba(0,0,0,.35); overflow: hidden; }
.hub-road-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #22e3ff, #8b5cff); }
.hub-road-chests { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: #ff9a3d; color: #2c1406; font-size: 13px; animation: road-pulse 1.2s ease-in-out infinite; }
.hub-road-go { font-size: 14px; color: rgba(230,236,255,.85); white-space: nowrap; }
.road-info { font-weight: 800; color: rgba(230,236,255,.8); font-size: 14px; text-align: right; }
.road-scroll { flex: 1; overflow-y: auto; border-radius: 18px; background: radial-gradient(ellipse at 50% 100%, rgba(139,92,255,.25), transparent 60%), rgba(6,8,26,.55); scrollbar-width: thin; }
.road-track { position: relative; width: 100%; }
@keyframes road-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes road-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (max-height: 520px) { .hub-road { padding: 5px 12px; } }
.rank-me { padding: 12px 14px; border-radius: 14px; background: rgba(139,92,255,.22); border: 1px solid rgba(185,166,255,.4); font-weight: 800; }
.rank-me:empty { display: none; }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank-list li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.06); }
.rank-list li.me { background: rgba(34,227,255,.16); outline: 1px solid rgba(34,227,255,.5); }
.rank-list .rk { font-weight: 900; text-align: center; color: rgba(230,236,255,.7); }
.rank-list li:nth-child(1) .rk { color: #ffd34d; } .rank-list li:nth-child(2) .rk { color: #d9e2f2; } .rank-list li:nth-child(3) .rk { color: #e3a36b; }
.rank-list .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .lv { font-weight: 800; color: #b9a6ff; white-space: nowrap; }
.hub-tile-sub { font-size: 14px; font-weight: 700; color: rgba(230,236,255,.75); }
@media (max-height: 520px) { .hub-tile { min-height: 170px; } .hub-tile canvas, .hub-tile-play svg, .hub-tile-rank svg { width: 64px; height: 64px; } .hub .title { font-size: 64px; } }
@media (max-width: 480px) { .hub-tiles { grid-template-columns: 1fr; } .hub-tile { min-height: 150px; } }
.home-back {
  align-self: flex-start; min-height: 44px; padding: 8px 16px; border-radius: 999px; font-weight: 900; color: #fff;
  background: rgba(0,0,0,.28); border: 1px solid var(--c-line);
}
.profile-card { max-width: 720px; max-height: min(94vh, 920px); padding: 18px; gap: 14px; overflow-y: auto; }
.profile-card .skins-head { gap: 10px; }
.profile-card .skins-head h2 { flex: 1; text-align: left; font-size: 26px; }
.profile-top { display: flex; align-items: center; gap: 18px; }
.profile-top canvas { width: 110px; height: 110px; flex: 0 0 auto; border-radius: 50%; filter: drop-shadow(0 0 16px rgba(34,227,255,.45)); }
.profile-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.profile-name { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 900; color: #fff; overflow: hidden; }
.profile-name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-admin { flex: 0 0 auto; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #2c1406; background: linear-gradient(135deg, #ffe08a, #ff9a3d); }
.profile-account { color: var(--c-muted); font-size: 14px; font-weight: 700; }
.xp-row { display: flex; justify-content: space-between; font-size: 14px; color: #c9d4ff; }
.xp-row b { color: #fff; font-size: 16px; }
.xp-bar { height: 12px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 4px; }
.xp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22e3ff, #8b5cff 60%, #ff3dbb); box-shadow: 0 0 12px rgba(139,92,255,.6); }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.profile-stats div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(160,180,255,.15); }
.profile-stats b { font-size: 20px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.profile-stats span { font-size: 12px; font-weight: 700; color: var(--c-muted); text-align: center; }
@media (max-width: 520px) { .profile-stats { grid-template-columns: repeat(2, 1fr); } .profile-top canvas { width: 84px; height: 84px; } .profile-name { font-size: 21px; } }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; min-height: 60px; }
.inv-grid.inv-emotes { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.inv-emote { display: grid; place-items: center; aspect-ratio: 1; border-radius: 16px; font-size: 30px; font-weight: 900; color: #fff; background: rgba(255,255,255,.06); border: 1px solid rgba(160,180,255,.18); }
.skin-equipped { position: absolute; top: 6px; left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 900; color: #04202a; background: #22e3ff; }
.res-xp { margin: 0 0 6px; text-align: center; font-size: 22px; font-weight: 900; background: linear-gradient(90deg, #22e3ff, #8b5cff 60%, #ff3dbb); -webkit-background-clip: text; background-clip: text; color: transparent; }

.admin-key-box { border-top: 1px solid var(--c-line); padding-top: 10px; color: var(--c-muted); font-weight: 800; }
.admin-key-box summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 6px; }
.admin-key-box.active summary::after { content: 'activé'; padding: 1px 8px; border-radius: 999px; font-size: 11px; color: #2c1406; background: linear-gradient(135deg, #ffe08a, #ff9a3d); }
.admin-key-row { display: flex; gap: 8px; margin: 8px 0; }
.admin-key-row .name-input { flex: 1; min-width: 0; font-size: 16px; padding: 10px 12px; user-select: text; -webkit-user-select: text; }
.admin-key-row button { flex: 0 0 auto; min-width: 96px; }

.hub-tiles { grid-template-columns: 1fr 1fr 1fr 1.25fr; }
.hub-inner { max-width: 960px; }
.hub-tile-shop { background: linear-gradient(160deg, rgba(139,92,255,.85), rgba(255,61,187,.78)); border-color: rgba(255,255,255,.22); box-shadow: 0 8px 0 #6a1f9e, 0 18px 44px rgba(200,70,255,.3); }
.hub-tile-shop svg { width: 92px; height: 92px; color: #fff; filter: drop-shadow(0 4px 10px rgba(0,0,0,.3)); }
@media (max-height: 520px) { .hub-tile-shop svg { width: 64px; height: 64px; } .hub-tile-title { font-size: 20px; } .hub-tile-sub { font-size: 12px; } }
@media (max-width: 640px) { .hub-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hub-tile { padding: 16px 10px; } }
@media (max-width: 400px) { .hub-tiles { grid-template-columns: 1fr; } }


.emote-panel {
  left: 66px; top: 0; grid-template-columns: repeat(6, 54px); gap: 6px; padding: 10px; max-height: min(calc(var(--sh) * .78), 420px); overflow-y: auto;
  border-radius: 18px; background: linear-gradient(160deg, rgba(36,30,86,.92), rgba(12,14,40,.92)); border: 1.5px solid rgba(140,170,255,.32);
  box-shadow: 0 10px 30px rgba(0,0,0,.45); scrollbar-width: thin; touch-action: pan-y;
}
.emote-cat { grid-column: 1 / -1; margin: 4px 2px 0; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #9fb4ff; }
.emote-panel button { width: 54px; height: 54px; padding: 3px; border-radius: 14px; background: rgba(255,255,255,.05); }
.emote-panel button img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.emote-panel button:active { transform: scale(.9); background: rgba(34,227,255,.25); }
body.small-screen .emote-panel { grid-template-columns: repeat(6, 44px); max-height: calc(var(--sh) * .74); }
body.small-screen .emote-panel button { width: 44px; height: 44px; }
.inv-grid.inv-emotes { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.inv-emote { display: flex; flex-direction: column; align-items: center; gap: 4px; aspect-ratio: auto; padding: 8px 4px; font-size: 11px; font-weight: 800; color: #c9d4ff; text-align: center; }
.inv-emote img { width: 56px; height: 56px; object-fit: contain; }


body.in-game #pause, body.in-game #settings, body.in-game #quit-confirm {
  background: none; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none;
  justify-content: flex-start; align-items: flex-start; overflow: hidden;
  z-index: 30; 
  padding: max(10px, var(--st)) 12px 12px max(72px, calc(var(--sl) + 72px));
}
body.in-game.hand-left #pause, body.in-game.hand-left #settings, body.in-game.hand-left #quit-confirm {
  justify-content: flex-end; padding-left: 12px; padding-right: max(12px, var(--sr));
}
body.in-game #pause > .card, body.in-game #settings > .card, body.in-game #quit-confirm > .card {
  pointer-events: auto; width: min(340px, calc(var(--sw) * .46)); min-width: 0; max-height: min(calc(var(--sh) - 24px), 520px); overflow-y: auto; padding: 12px; gap: 10px;
  background: rgba(14,16,44,.94); box-shadow: 0 10px 34px rgba(0,0,0,.55);
}
body.in-game #pause h2, body.in-game #settings h2, body.in-game #quit-confirm h2 { font-size: 19px; margin: 0; }
body.in-game #pause > .card, body.in-game #settings > .card, body.in-game #pause > .card *, body.in-game #settings > .card * { touch-action: none; } 


.hub { flex-direction: column; justify-content: center; gap: 2vh; --orb: #4de3ff; --orb-line: rgba(77,227,255,.22); }
.hub-head { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); pointer-events: none; z-index: 2; }
.hub-head > * { pointer-events: auto; }
.hub-brand { display: flex; flex-direction: column; }
.hub-title { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: 4px; text-transform: uppercase; color: #e8f6ff; }
.hub-sub { font-size: 14px; font-weight: 700; color: #8fb3cf; }
.hub .hub-top { width: auto; max-width: none; flex: 0 1 460px; }
.hub .hub-road { background: rgba(10,30,52,.75); border-color: rgba(77,227,255,.35); }
.hub .hub-road-bar i { background: var(--orb); }
.hub-orbit { --o: min(74vh, 62vw, 560px); position: relative; width: var(--o); height: var(--o); margin-top: 5vh; }
.orb-ring { position: absolute; border-radius: 50%; border: 1px solid var(--orb-line); pointer-events: none; }
.orb-r1 { inset: -6%; }
.orb-r2 { inset: 8%; border-style: dashed; animation: orb-spin 90s linear infinite; }
.orb-r3 { inset: 26%; animation: orb-spin 55s linear infinite reverse; }
.orb-moon { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--orb); box-shadow: 0 0 10px var(--orb); opacity: .75; }
.orb-moon.m1 { left: calc(50% - 6px); top: -6px; }
.orb-moon.m2 { right: 4%; bottom: 22%; width: 8px; height: 8px; background: #3ddc97; box-shadow: 0 0 8px #3ddc97; }
.orb-moon.m3 { left: 10%; bottom: 14%; width: 10px; height: 10px; background: #ff9a3d; box-shadow: 0 0 8px #ff9a3d; }
.orb-moon.m4 { left: -5px; top: calc(50% - 5px); width: 10px; height: 10px; }
.orb-moon.m5 { right: 10%; top: 8%; width: 7px; height: 7px; background: #9ff4ff; }
@keyframes orb-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .orb-r2, .orb-r3 { animation: none; } }
.orb-play { position: absolute; left: 50%; top: 50%; width: 38%; height: 38%; transform: translate(-50%, -50%); border-radius: 22px; border: 0;
  background: var(--orb); color: #04223a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 0 0 10px rgba(77,227,255,.12), 0 0 50px rgba(77,227,255,.5); transition: transform .12s; }
.orb-play:active { transform: translate(-50%, -50%) scale(.96); }
.orb-play svg { width: 34%; height: auto; }
.orb-play-title { font-size: calc(var(--o) * .075); font-weight: 900; letter-spacing: 3px; text-transform: uppercase; line-height: 1; }
.orb-xp { width: 70%; height: 6px; border-radius: 999px; background: rgba(4,34,58,.25); overflow: hidden; }
.orb-xp i { display: block; height: 100%; width: 0; border-radius: inherit; background: #04223a; }
.orb-play-sub { font-size: 12px; font-weight: 800; opacity: .8; }
.orb-sat { position: absolute; width: 24%; height: 24%; min-width: 74px; min-height: 74px; transform: translate(-50%, -50%); border-radius: 18px;
  border: 1px solid rgba(77,227,255,.45); background: rgba(12,26,52,.88); color: #e8f6ff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); transition: transform .12s, border-color .12s; }
.orb-sat:hover { border-color: var(--orb); }
.orb-sat:active { transform: translate(-50%, -50%) scale(.95); }
.orb-sat svg, .orb-sat canvas { width: 38%; height: auto; color: var(--orb); }
.orb-sat canvas { border-radius: 50%; aspect-ratio: 1; }
.orb-sat-title { font-size: 15px; font-weight: 900; }
.orb-sat-sub { font-size: 11px; font-weight: 700; color: #8fb3cf; white-space: nowrap; }
.orb-tl { left: 8%; top: 16%; } .orb-tr { left: 92%; top: 16%; } .orb-bl { left: 8%; top: 84%; } .orb-br { left: 92%; top: 84%; }
.orb-chest { border-color: rgba(255,154,61,.55); }
.orb-chest svg { color: #ff9a3d; }
.orb-badge { position: absolute; top: -8px; right: -8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: #ff9a3d; color: #2c1406;
  font-weight: 900; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; animation: road-pulse 1.2s ease-in-out infinite; }
@media (max-height: 520px) { .hub-title { font-size: 22px; letter-spacing: 3px; } .hub-sub { font-size: 12px; } .hub-orbit { --o: min(72vh, 62vw); margin-top: 7vh; } .orb-sat-title { font-size: 13px; } .orb-sat-sub { display: none; } .orb-play-sub { font-size: 10px; } }
@media (max-width: 640px) and (orientation: portrait) { .hub-head { flex-direction: column; align-items: stretch; } .hub .hub-top { flex: none; } .hub-orbit { --o: min(86vw, 60vh); margin-top: 12vh; } }



#btn-resume, #quit-confirm #btn-quit-no, #btn-settings-close {
  background: #4de3ff; color: #04223a; text-shadow: none; box-shadow: 0 5px 0 #1b8ab0, 0 0 22px rgba(77,227,255,.3);
}
#btn-quit, #quit-confirm #btn-quit-yes {
  background: rgba(12,26,52,.92); color: #ffb0a0; text-shadow: none; border: 1.5px solid rgba(255,122,96,.65); box-shadow: 0 5px 0 rgba(0,0,0,.35);
}
#btn-quit:hover, #btn-quit-yes:hover { border-color: #ff7a60; color: #ffd0c4; }


.road-screen { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; padding: max(10px, env(safe-area-inset-top)) 0 max(10px, env(safe-area-inset-bottom)); overflow: hidden;
  background-color: #050816; background-image: radial-gradient(rgba(220,235,255,.55) 1px, transparent 1.4px), radial-gradient(rgba(200,225,255,.3) 1px, transparent 1.4px); background-size: 97px 89px, 41px 47px; background-position: 13px 7px, 0 0; }
.road-head { display: flex; align-items: center; gap: 14px; padding: 0 max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); }
.road-back { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 14px; border: 1px solid rgba(77,227,255,.4); background: rgba(12,26,52,.88); color: #e8f6ff; font-size: 28px; font-weight: 900; line-height: 1; }
.road-titles { display: flex; flex-direction: column; min-width: 0; }
.road-titles h2 { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: 3px; text-transform: uppercase; color: #e8f6ff; }
.road-info { font-size: 13px; font-weight: 700; color: #8fb3cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.road-xp { margin-left: auto; display: flex; align-items: center; gap: 12px; padding: 6px 16px 6px 8px; border-radius: 16px; background: rgba(12,26,52,.88); border: 1px solid rgba(77,227,255,.35); width: min(360px, 42vw); }
.road-lvl { width: 46px; height: 46px; border-radius: 12px; background: #4de3ff; color: #04223a; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.road-lvl small { font-size: 10px; font-weight: 800; } .road-lvl b { font-size: 20px; font-weight: 900; }
.road-xpcol { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.road-xpbar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.road-xpbar i { display: block; height: 100%; width: 0; border-radius: inherit; background: #4de3ff; box-shadow: 0 0 12px rgba(77,227,255,.7); }
.road-xptext { font-size: 12px; font-weight: 800; color: #b8d8ea; white-space: nowrap; }
.road-scroll { flex: 1; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: rgba(77,227,255,.5) transparent; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.road-track { position: relative; height: 100%; }
.road-track > svg.rn-path { position: absolute; left: 0; top: 0; pointer-events: none; }
.rn { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rn-lvl { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900;
  background: rgba(12,26,52,.92); color: rgba(232,246,255,.55); border: 1px solid rgba(77,227,255,.25); }
.rn.done .rn-lvl { background: #4de3ff; color: #04223a; border-color: #9ff4ff; }
.rn.here .rn-lvl { width: 48px; height: 48px; font-size: 18px; border: 3px solid #ffffff; box-shadow: 0 0 22px rgba(77,227,255,.9); }
.rn-ten .rn-lvl { width: 42px; height: 42px; font-size: 15px; }
.rn-chest { width: 124px; padding: 10px 8px 9px; border-radius: 16px; border: 1px solid rgba(77,227,255,.3); background: rgba(12,26,52,.94);
  color: #e8f6ff; display: flex; flex-direction: column; align-items: center; gap: 3px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.rn-chest svg { width: 54px; height: 54px; }
.rn-chest .rc-name { font-size: 13px; font-weight: 900; }
.rn-chest .rc-gift { font-size: 11px; font-weight: 700; color: #8fb3cf; text-align: center; line-height: 1.25; }
.rn-chest .rc-state { margin-top: 3px; font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: #8fb3cf; }
.rn.ready .rn-chest { border: 2px solid #ff9a3d; box-shadow: 0 0 26px rgba(255,154,61,.55); cursor: pointer; animation: road-bounce 1.1s ease-in-out infinite; }
.rn.ready .rc-state { background: #ff9a3d; color: #2c1406; }
.rn.opened .rn-chest { opacity: .55; }
.rn.opened .rc-state { color: #7dffb0; }
.rn.locked .rn-chest svg { filter: grayscale(1) brightness(.7); }
.rn.gold .rn-chest { border-color: rgba(255,211,77,.7); background: rgba(40,32,8,.94); }
.rn.gold .rc-name { color: #ffd34d; }
.rn-me { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.rn-me canvas { width: 50px; height: 50px; border-radius: 50%; border: 3px solid #ffffff; box-shadow: 0 0 18px rgba(77,227,255,.9); background: #050816; }
.rn-me span { font-size: 11px; font-weight: 900; padding: 1px 8px; border-radius: 999px; background: #ffffff; color: #04223a; }
@media (max-height: 520px) { .road-titles h2 { font-size: 19px; } .road-back { width: 40px; height: 40px; } .road-lvl { width: 40px; height: 40px; } .rn-chest { width: 112px; padding: 7px 6px; } .rn-chest svg { width: 40px; height: 40px; } .rn-chest .rc-gift { font-size: 10px; } }

.rn.locked.gold .rn-chest svg { filter: grayscale(.25) brightness(.85); }
.rn.tier-rare .rn-chest { border-color: rgba(255,122,61,.8); background: rgba(48,20,10,.94); }
.rn.tier-rare .rc-name { color: #ff9a6a; }
.rn.locked.tier-rare .rn-chest svg { filter: hue-rotate(-25deg) saturate(1.4) brightness(.8); }
.rn-skin { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.rn-skin canvas { width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(77,227,255,.35); background: #050816; filter: grayscale(.85) brightness(.6); }
.rn-skin.got canvas { filter: none; border-color: #4de3ff; box-shadow: 0 0 12px rgba(77,227,255,.6); }
.rn-skin span { font-size: 10px; font-weight: 800; color: #8fb3cf; white-space: nowrap; }
.rn-skin.got span { color: #7dffb0; }
#chest-result[data-tier="gold"] .chest-icon { filter: hue-rotate(15deg) saturate(1.3) drop-shadow(0 0 18px rgba(255,211,77,.8)); }
#chest-result[data-tier="rare"] .chest-icon { filter: hue-rotate(-20deg) saturate(1.6) drop-shadow(0 0 22px rgba(255,122,61,.9)); }


.orb-profile { left: 6%; top: 50%; width: 30%; height: 40%; }
.orb-shop { left: 90%; top: 20%; } .orb-rank { left: 90%; top: 80%; }
.orb-xp-sat { width: 74%; height: 7px; margin-top: 4px; background: rgba(255,255,255,.12); }
.orb-xp-sat i { background: var(--orb, #4de3ff); box-shadow: 0 0 8px rgba(77,227,255,.7); }
.orb-profile .orb-sat-sub { display: block; color: #e8f6ff; font-size: 13px; }
.orb-play-sub { font-size: 12px; font-weight: 800; opacity: .8; }
@media (max-height: 520px) { .orb-profile .orb-sat-sub { display: block; font-size: 12px; } }

.orb-play-sub { white-space: nowrap; font-size: 11px; }

#profile .xp-bar i { background: #4de3ff; box-shadow: 0 0 10px rgba(77,227,255,.6); }
#chest-open { background: #ff9a3d; color: #2c1406; text-shadow: none; box-shadow: 0 5px 0 #a3501b; }
#profile-road { background: #0c1a34; color: #e8f6ff; text-shadow: none; border: 1.5px solid rgba(77,227,255,.45); box-shadow: 0 5px 0 rgba(0,0,0,.35); }

.hub-brand { flex-direction: row; align-items: center; gap: 12px; }
.hub-brand-txt { display: flex; flex-direction: column; }
.hub-logo { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 18px rgba(125,255,61,.35); }
@media (max-height: 520px) { .hub-logo { width: 44px; height: 44px; border-radius: 11px; } }


.br-card { max-width: 520px; }
.br-none { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.br-join-row { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.br-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 10px; }
.br-slot { min-height: 88px; padding: 12px; border-radius: 14px; background: #0c1a34; border: 1.5px solid rgba(77,227,255,.35); color: #e8f6ff; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.br-slot.empty { border-style: dashed; color: #7f93b8; align-items: center; }
.br-slot b { font-size: 17px; }
.br-slot small { color: #9fb4ff; font-weight: 800; }
.br-slot .br-ok { color: #6dffa8; font-weight: 900; }
.br-slot .br-wait { color: #ffb48f; font-weight: 900; }
.br-invite { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; color: #e8f6ff; }
.br-queue { text-align: center; font-weight: 900; color: #4de3ff; font-size: 18px; }
.br-hud { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 5; }
.br-status { padding: 4px 12px; border-radius: 10px; background: rgba(6,12,28,.62); color: #e8f6ff; font-weight: 800; font-size: 14px; white-space: nowrap; }
.br-status .br-loss { color: #ff8f7a; }
.br-mate { padding: 3px 10px; border-radius: 10px; background: rgba(6,12,28,.55); color: #6dffa8; font-weight: 800; font-size: 13px; }
.br-map { z-index: 5; pointer-events: none; position: fixed; top: 64px; right: 10px; width: 84px; height: 84px; border-radius: 10px; background: rgba(6,12,28,.55); border: 1px solid rgba(77,227,255,.35); }
.br-count { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 96px; font-weight: 900; color: #fff; text-shadow: 0 0 24px rgba(77,227,255,.8); pointer-events: none; z-index: 6; }
.br-out { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; align-items: center; padding: 8px 14px; border-radius: 14px; background: rgba(6,12,28,.75); color: #e8f6ff; font-weight: 800; z-index: 7; }
.br-end-list { margin: 8px 0; padding-left: 0; list-style: none; max-height: calc(var(--sh) * .4); overflow-y: auto; color: #e8f6ff; }
.br-end-list li { display: flex; gap: 10px; padding: 4px 8px; border-radius: 8px; }
.br-end-list li.me { background: rgba(77,227,255,.18); }
.br-end-list .pl { width: 34px; font-weight: 900; color: #4de3ff; }
.br-end-card { max-width: 600px; padding: 14px 20px; gap: 8px; max-height: calc(var(--sh) - 16px); overflow-y: auto; }
.br-end-card h2 { font-size: 22px; }
.br-end-card .res-xp { margin: 0; font-size: 15px; }
.br-end-card .br-end-list { max-height: calc(var(--sh) * .24); margin: 0; }
.br-end-card .br-rp { padding: 6px 12px; gap: 2px; }
.br-end-card .br-rp b { font-size: 22px; }
.tile-sub { display: block; font-size: 12px; font-weight: 800; opacity: .85; }
.br-rp { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: 14px; background: #0c1a34; border: 1.5px solid rgba(77,227,255,.35); color: #e8f6ff; }
.br-rp b { font-size: 26px; font-weight: 900; text-align: center; }
.br-rp b.up { color: #4de3ff; } .br-rp b.down { color: #ff8f7a; }
.br-rp-detail { text-align: center; font-size: 13px; font-weight: 800; color: #9fb4ff; }
.br-rp-league { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; }
.br-rp .xp-bar i { background: #4de3ff; box-shadow: 0 0 10px rgba(77,227,255,.6); }
.rank-tabs { display: flex; gap: 8px; justify-content: center; }
.settings-pane .zoom-panel input { min-width: 0; } 

body:not(.editing) .joystick-knob { opacity: .35; }
