:root {
  --bg: #080510;
  --text: #e6e0f5;
  --accent: #a78bfa;
  --line: #4a4060;
}
* { box-sizing: border-box; }

body {
  margin: 0; height: 100vh;
  background: var(--bg);
  font-family: 'VT323', monospace;
  overflow: hidden; color: var(--text);
}


/* 📵 Mobile lock screen */
.mobile-blocker {
  position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center;
  padding: 28px; text-align: center; overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(167,139,250,.24), transparent 34%),
    linear-gradient(180deg, rgba(8,5,16,.97), rgba(12,6,28,.99));
}
body.mobile-blocked { overflow: hidden !important; }
body.mobile-blocked .mobile-blocker { display: flex; }
body.mobile-blocked #splash-screen,
body.mobile-blocked #fixed-header,
body.mobile-blocked #auth-content,
body.mobile-blocked #menu-content,
body.mobile-blocked #music-widget,
body.mobile-blocked .language-switch { pointer-events: none !important; }
.mobile-blocker::before, .mobile-blocker::after {
  content: ''; position: absolute; width: 220px; height: 220px; border: 2px solid rgba(167,139,250,.16);
  transform: rotate(45deg); box-shadow: 0 0 30px rgba(124,58,237,.18);
}
.mobile-blocker::before { top: -90px; left: -80px; }
.mobile-blocker::after { right: -95px; bottom: -80px; }
.mobile-blocker-card {
  position: relative; z-index: 1; width: min(100%, 420px); padding: 28px 22px 30px;
  border: 2px solid rgba(190,160,255,.42); border-radius: 22px;
  background: linear-gradient(180deg, rgba(20,12,42,.88), rgba(10,5,22,.95));
  box-shadow: 0 0 0 4px rgba(59,25,118,.32), 0 26px 70px rgba(0,0,0,.55), inset 0 0 24px rgba(167,139,250,.08);
}
.mobile-blocker-kicker { margin: 18px 0 10px; color: rgba(211,193,255,.64); font-size: 1.18rem; letter-spacing: .18em; }
.mobile-blocker h1 { margin: 0 auto; max-width: 350px; color: #f3eaff; font-size: clamp(2.15rem, 9vw, 3.15rem); line-height: .95; letter-spacing: .035em; text-shadow: 0 0 20px rgba(167,139,250,.46); }
.mobile-blocker-note { margin: 16px auto 0; max-width: 330px; color: rgba(232,219,255,.62); font-size: 1.28rem; line-height: 1.08; }
.mobile-stop-sign {
  position: relative; width: min(48vw, 180px); aspect-ratio: 1; margin: 0 auto;
  display: grid; place-items: center; clip-path: polygon(29% 0, 71% 0, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0 71%, 0 29%);
  background: linear-gradient(135deg, #d9c4ff, #8b5cf6 42%, #4c1d95);
  box-shadow: 0 0 0 6px #1d1234, 0 0 0 12px #a78bfa, 0 0 36px rgba(167,139,250,.66);
  image-rendering: pixelated;
}
.mobile-stop-sign::before {
  content: ''; position: absolute; inset: 18px;
  clip-path: inherit; border: 9px solid rgba(255,255,255,.82);
  box-shadow: inset 0 0 0 5px rgba(34,12,72,.3);
}
.mobile-stop-sign span {
  position: relative; z-index: 1; color: #130920; font-size: clamp(5rem, 22vw, 8rem); line-height: .75; font-weight: 900;
  text-shadow: 4px 0 #efe7ff, -4px 0 #efe7ff, 0 4px #efe7ff, 0 -4px #efe7ff;
}

/* 🌊 SPLASH */
#splash-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: var(--bg); transition: opacity 0.7s ease, transform 0.7s ease;
}
#splash-screen.fade-out { opacity: 0; transform: scale(1.05); pointer-events: none; }
#splash-circle {
  width: 110px; height: 110px;
  background: radial-gradient(circle at 30% 30%, #a78bfa, #5b21b6);
  border-radius: 50%; box-shadow: 0 0 25px rgba(167, 139, 250, 0.5), inset 0 0 10px rgba(255,255,255,0.2);
  cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#splash-circle:hover { transform: scale(1.08); box-shadow: 0 0 40px rgba(167, 139, 250, 0.8); }
#splash-circle.ripple { animation: water-drop 0.8s ease-out forwards; }
@keyframes water-drop {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.8); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 60px rgba(167, 139, 250, 0.4); }
  100% { transform: scale(1.2); box-shadow: 0 0 0 120px rgba(167, 139, 250, 0); }
}
#splash-hint { margin-top: 22px; font-size: 1.3rem; color: #777; letter-spacing: 2px; animation: pulse-hint 2s ease-in-out infinite; }
@keyframes pulse-hint { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.9; } }

/* 👁️ HEADER FISSO */
#fixed-header {
  position: fixed; top: 6vh; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; z-index: 10;
  pointer-events: none;
}
.eyes-container { display: flex; justify-content: center; gap: 55px; margin-bottom: 15px; }
.eye { width: 60px; height: 60px; background: #fff; border: 2px solid #222; border-radius: 50%; display: flex; justify-content: center; align-items: center; position: relative; box-shadow: 0 3px 8px rgba(0,0,0,0.4); }
.pupil { width: 20px; height: 20px; background: #222; border-radius: 50%; transition: transform 0.12s ease-out; position: relative; }
.pupil::after { content: ''; position: absolute; top: 4px; left: 4px; width: 7px; height: 7px; background: #fff; border-radius: 50%; }
.eye::before { content: ''; position: absolute; width: 100%; height: 0; background: #fff; top: 0; border-radius: 50% 50% 0 0; animation: blink 4s infinite; z-index: 2; }
@keyframes blink { 0%, 86%, 100% { height: 0; } 90%, 94% { height: 100%; } }
#fixed-header h1 { font-size: 3.8rem; margin: 0; letter-spacing: 8px; color: var(--text); text-shadow: 0 0 12px rgba(167, 139, 250, 0.3); }

/* 🔐 & 🎮 CONTENT (Crossfade) */
#auth-content, #menu-content {
  position: fixed; top: 42vh; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 380px; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 20;
}
#auth-content.visible, #menu-content.visible { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
#auth-content.hidden, #menu-content.hidden { transform: translateX(-50%) translateY(15px); }

/* 🔲 Input */
input { width: 100%; padding: 16px 20px; margin: 16px 0; background: rgba(255, 255, 255, 0.03); border: 2px solid var(--line); border-radius: 12px; color: var(--text); font-size: 1.9rem; text-align: center; outline: none; transition: all 0.3s ease; font-family: 'VT323', monospace; }
input:focus { border-color: var(--accent); background: rgba(167, 139, 250, 0.06); box-shadow: 0 0 12px rgba(167, 139, 250, 0.15); }
input::placeholder { color: rgba(211, 193, 255, .42); opacity: 1; letter-spacing: .08em; font-family: 'VT323', monospace; }

/* Auth refinement: two-step registration and readable V!be$ field hints */
.auth-step { width: 100%; }
.auth-step.hidden { display: none !important; }
.auth-step-title { margin: 0 0 4px; color: rgba(204,184,255,.68); font-size: 1.3rem; letter-spacing: .18em; text-align: center; }
.auth-back { width: 100%; padding: 10px 16px; margin: 3px 0 12px; font-family: 'VT323', monospace; font-size: 1.42rem; letter-spacing: .13em; color: rgba(219,202,255,.76); background: rgba(167,139,250,.06); border: 1px solid rgba(167,139,250,.2); border-radius: 10px; }
.auth-back:hover { color: #f1e9ff; border-color: rgba(191,159,255,.48); background: rgba(167,139,250,.13); }

.auth-link { width: 100%; margin: -2px 0 11px; padding: 4px 10px; border: 0; background: transparent; color: rgba(188,164,245,.64); font: 1.25rem 'VT323', monospace; letter-spacing: .12em; text-align: center; cursor: pointer; transition: color .2s ease, text-shadow .2s ease; }
.auth-link:hover { color: #dbbfff; text-shadow: 0 0 16px rgba(191,133,255,.52); }
.auth-step-help { margin: 4px 0 12px; color: rgba(202,187,235,.62); font-size: 1.18rem; line-height: 1.15; letter-spacing: .06em; text-align: center; }

.otp-input { text-align: center; letter-spacing: .45em; font-size: 2.15rem !important; padding-left: .45em !important; }

.auth-step-action { width: 100%; padding: 11px 16px; margin: 5px 0 9px; font-family: 'VT323', monospace; font-size: 1.62rem; letter-spacing: .16em; color: #f3eaff; background: linear-gradient(110deg, rgba(102,43,193,.35), rgba(212,76,183,.22)); border: 1px solid rgba(191,139,250,.46); border-radius: 11px; cursor: pointer; box-shadow: inset 0 0 22px rgba(144,75,234,.12), 0 0 18px rgba(143,75,218,.14); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.auth-step-action:hover { transform: translateY(-1px); border-color: rgba(236,171,255,.7); box-shadow: inset 0 0 26px rgba(176,91,242,.18), 0 0 23px rgba(202,92,231,.27); }
.auth-step-action:disabled { opacity: .5; pointer-events: none; }
#auth-trigger.hidden-control { display: none; }

/* 🔘 Bottoni */
#auth-trigger, .menu-btn {
  display: block; margin: 12px auto 0; width: 220px; font-size: 1.9rem; color: var(--text); cursor: pointer;
  padding: 14px 0; border: 2px solid var(--line); border-radius: 14px; background: transparent;
  transition: all 0.2s; user-select: none; font-family: 'VT323', monospace;
}
#auth-trigger:hover, .menu-btn:hover { border-color: var(--accent); color: var(--accent); transform: scale(1.04); }
#auth-trigger:active, .menu-btn:active { transform: scale(0.97); }

/* 📝 Messaggi */
#idle-msg, #menu-msg { margin-top: 28px; font-size: 1.7rem; color: #b0a6c5; min-height: 2.2em; letter-spacing: 1px; line-height: 1.2; font-family: 'VT323', monospace; }
.cursor { animation: blink-cursor 0.7s step-end infinite; }
@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* 🎵 MUSIC WIDGET (ABSOLUTE & STABLE) */
#music-widget {
  position: fixed; bottom: 25px; right: 25px; z-index: 50;
  display: flex; flex-direction: column; align-items: center;
}

#music-icon {
  width: 40px; height: 40px; font-size: 24px; cursor: pointer;
  background: rgba(20,15,30,0.85); border-radius: 50%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, background 0.2s;
}
#music-icon:hover { background: rgba(167,139,250,0.25); transform: scale(1.1); }
#music-icon.muted { opacity: 0.4; filter: grayscale(1); }

/* Wrapper posizionato ASSOLUTO sopra l'icona */
#vol-slider-wrap {
  position: absolute; bottom: 46px; left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: bottom center;
  width: 40px; height: 160px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none; z-index: 1;
}

/* Area hover invisibile che collega l'icona allo slider (evita il collasso) */
#vol-slider-wrap::after {
  content: ''; position: absolute; bottom: -20px; left: 0; right: 0; height: 20px;
}

#music-widget:hover #vol-slider-wrap {
  transform: translateX(-50%) scaleY(1);
  pointer-events: auto;
}

/* Input range personalizzato */
#bgm-slider {
  -webkit-appearance: none; appearance: none;
  width: 140px; height: 6px;
  background: transparent;
  transform: rotate(-90deg);
  cursor: pointer;
}
/* 🔹 TRACCIA */
#bgm-slider::-webkit-slider-runnable-track { height: 6px; background: rgba(255,255,255,0.15); border-radius: 3px; }
#bgm-slider::-moz-range-track { height: 6px; background: rgba(255,255,255,0.15); border-radius: 3px; border: none; }
/* 🔸 PALLINA */
#bgm-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  border: 2px solid #fff; box-shadow: 0 0 8px rgba(167,139,250,0.6);
  margin-top: -6px;
}
#bgm-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  border: 2px solid #fff;
}

/* Player profile settings ------------------------------------------------ */
.profile-settings { position: fixed; z-index: 45; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(5,2,12,.86); backdrop-filter: blur(12px); }
.profile-settings.hidden { display: none; }
.profile-settings-sheet { width: min(1000px, calc(100vw - 36px)); height: min(706px, calc(100dvh - 36px)); overflow: hidden; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 14px; border: 1px solid rgba(168,139,232,.33); border-radius: 27px; padding: 20px; color: #ede6ff; background: radial-gradient(circle at 14% 0, rgba(117,72,181,.24), transparent 43%), rgba(10,7,18,.985); box-shadow: 0 34px 96px rgba(0,0,0,.76), inset 0 0 0 1px rgba(207,183,255,.035); font-family: 'VT323', monospace; }
.profile-titlebar { display: flex; justify-content: space-between; align-items: start; gap: 18px; border-bottom: 1px solid rgba(167,139,250,.17); padding: 2px 3px 13px; margin: 0; }
.profile-titlebar p { color: #a991f1; letter-spacing: .27em; margin: 0 0 4px; font-size: 1.06rem; }
.profile-titlebar h2 { margin: 0 0 3px; font-weight: 400; font-size: 2.62rem; letter-spacing: .065em; }
.profile-titlebar small { color: rgba(223,212,255,.48); font-size: 1.08rem; letter-spacing: .04em; }
.profile-close { width: 45px; height: 45px; border-radius: 50%; padding: 0; font-size: 1.95rem; line-height: 1; color: #e8dcff; border: 1px solid rgba(191,159,255,.34); background: rgba(76,48,122,.25); transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.profile-close:hover { transform: rotate(90deg); background: rgba(134,85,204,.32); border-color: rgba(221,197,255,.65); }
.profile-content { min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 12px; }
.profile-layout { min-height: 0; display: grid; grid-template-columns: 1.08fr .92fr; gap: 12px; margin: 0; }
.profile-preview-pane { min-height: 0; border-radius: 18px; border: 1px solid rgba(167,139,250,.19); background: radial-gradient(circle at 50% 38%, rgba(141,82,221,.16), transparent 56%), rgba(0,0,0,.18); padding: 12px; display: flex; flex-direction: column; }
.profile-kicker { margin: 0 0 8px; color: rgba(194,171,255,.7); letter-spacing: .22em; font-size: 1.02rem; }
.profile-skin-carousel { display: grid; grid-template-columns: 44px 1fr 44px; gap: 9px; align-items: center; height: 156px; min-height: 156px; flex: none; border-radius: 14px; border: 1px solid rgba(164,132,225,.17); background: rgba(26,17,43,.43); padding: 9px; }
.profile-skin-arrow { height: 82px; padding: 0; font-size: 2.6rem; color: #d3bbff; background: rgba(120,75,189,.12); border-color: rgba(183,146,249,.25); }
.profile-skin-arrow:hover { background: rgba(120,75,189,.3); border-color: rgba(214,188,255,.58); }
.profile-skin-stage { display: grid; justify-items: center; gap: 5px; }
.profile-lanes { height: 62px; width: min(250px, 100%); border-radius: 12px; position: relative; overflow: hidden; display: grid; grid-template-columns: repeat(6,1fr); background: linear-gradient(180deg, rgba(20,13,33,.64), rgba(40,25,58,.54)); border: 1px solid rgba(167,139,250,.14); }
.profile-lanes span { border-right: 1px solid rgba(167,139,250,.13); }
.profile-lanes span:last-of-type { border: 0; }
.profile-note { position: absolute; display: block; width: 72%; left: 14%; top: 22px; height: 27px; }
.profile-note.classic { border-radius: 999px; background: linear-gradient(90deg,#69d9ff,#9866ff 19%,#d17eff 52%,#ff75cc 81%,#8edfff); box-shadow: 0 0 16px rgba(181,104,255,.6); }
.profile-note.comet { height: 30px; top: 20px; border-radius: 9px; background: linear-gradient(90deg,#e55ae0,#a35cff 27%,#805dff 59%,#f371db); border: 2px solid rgba(255,181,255,.7); box-shadow: 0 0 16px rgba(226,80,255,.53); }
.profile-note.neon { height: 29px; top: 20px; border-radius: 15px; background: linear-gradient(90deg,#7450df,#c36bff,#8b5aff); box-shadow: 0 5px 0 rgba(55,230,255,.83), 0 0 19px rgba(70,225,255,.5); }
.profile-note.blossom { height: 29px; top: 20px; border-radius: 999px; background: linear-gradient(90deg,#ff84d6,#e27dff 35%,#b864ff 68%,#ff98e6); box-shadow: 0 0 21px rgba(255,102,211,.58); }
.profile-note.aurora { height: 29px; top: 20px; border-radius: 15px; background: linear-gradient(90deg,#46edff,#8172ff 26%,#d768ff 53%,#52dcff 79%,#d874ff); border: 1px solid rgba(195,249,255,.65); box-shadow: 0 0 19px rgba(75,226,255,.54); }
.profile-note.prism { height: 30px; top: 20px; border-radius: 12px; background: linear-gradient(90deg,#67dcff,#865dff 20%,#ff65c9 43%,#ffd06a 66%,#8f6aff 84%,#55edff); box-shadow: 0 0 20px rgba(226,101,255,.54); }
.profile-note.voltage { height: 31px; top: 19px; border-radius: 8px; background: linear-gradient(180deg,#dc62ff 0 69%,#47eaff 69% 100%); border: 3px solid #542db0; box-shadow: 0 0 21px rgba(71,239,255,.56); }
.profile-note.velvet { height: 30px; top: 20px; border-radius: 999px; background: linear-gradient(90deg,#3c267c,#7540c5 28%,#9a4cdd 52%,#713cc0 76%,#362170); border: 2px solid rgba(223,183,255,.67); box-shadow: 0 0 16px rgba(156,84,235,.56); }
.profile-note.eclipse { height: 30px; top: 20px; border-radius: 15px; background: linear-gradient(90deg,#ff5fd1 0%,#432078 13%,#160d2d 50%,#442075 87%,#53e8ff); border: 2px solid rgba(219,119,255,.62); box-shadow: 0 0 20px rgba(182,86,255,.52); }
.profile-note.pixel { height: 31px; top: 19px; border-radius: 5px; background: linear-gradient(180deg,#cc66ff 0 70%,#47eaff 70% 100%); box-shadow: 0 0 16px rgba(187,90,255,.62); }
.profile-skin-stage strong { color: #f1eaff; font-size: 1.48rem; letter-spacing: .19em; font-weight: 400; }
.profile-skin-stage > small { color: rgba(221,208,255,.53); font-size: 1.02rem; }
.profile-option-card { padding: 12px 13px; display: flex; gap: 12px; border-radius: 14px; border: 1px solid rgba(167,139,250,.19); background: linear-gradient(110deg, rgba(86,52,130,.18), rgba(19,13,30,.31)); }
.profile-toggle-card { margin-top: 0; min-height: 0; align-items: center; cursor: pointer; }
.profile-toggle-card input, .profile-option-toggle input { accent-color: #ac84f8; width: 17px; height: 17px; margin: 0; padding: 0; flex: none; }
.profile-toggle-card span, .profile-option-toggle span { display: grid; gap: 2px; }
.profile-toggle-card b, .profile-option-toggle b { font-weight: 400; color: #eadfff; font-size: 1.18rem; letter-spacing: .12em; }
.profile-toggle-card small, .profile-option-toggle small { color: rgba(221,208,255,.54); font-size: 1.02rem; }
.profile-settings-column { min-height: 0; display: grid; grid-template-rows: 1fr 1.08fr .78fr; gap: 10px; }
.profile-control { min-height: 0; padding: 12px 13px; border-radius: 16px; border: 1px solid rgba(167,139,250,.19); background: rgba(0,0,0,.19); display: flex; flex-direction: column; gap: 10px; }
.profile-control > label:first-child, .profile-control-title label { display: flex; justify-content: space-between; letter-spacing: .2em; font-size: 1.1rem; color: #baa9d8; }
.profile-control b { color: #e9d9ff; font-weight: 400; }
.profile-control input[type=range], .profile-speed-card input[type=range] { width: 100%; accent-color: #a78bfa; margin: 4px 0 0; padding: 0; }
.profile-control input[type=range]:disabled, .profile-speed-card input[type=range]:disabled { opacity: .35; }
.profile-control small { color: #9989b8; font-size: 1.03rem; line-height: 1.2; }
.profile-volume-control { justify-content: space-between; }
.profile-speed-card { flex-direction: column; justify-content: space-between; gap: 10px; }
.profile-option-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.profile-option-toggle { min-width: 0; display: flex; align-items: center; gap: 11px; cursor: pointer; }
.profile-speed-card strong { align-self: flex-start; font-weight: 400; color: #e9d9ff; font-size: 1.3rem; letter-spacing: .13em; }
.profile-bindings-panel { min-height: 112px; padding: 10px 13px; gap: 8px; }
.profile-control-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.profile-control-title small { white-space: nowrap; }
.profile-bindings { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.profile-binding { border-radius: 10px; min-height: 46px; display: grid; place-items: center; background: rgba(130,88,194,.12); border: 1px solid rgba(190,157,255,.28); color: #f0e9ff; font-size: 1.55rem; }
.profile-binding:hover { background: rgba(143,96,208,.23); border-color: rgba(210,183,255,.45); }
.profile-binding.capturing { background: rgba(168,109,240,.3); box-shadow: 0 0 16px rgba(167,139,250,.28); }
.profile-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid rgba(167,139,250,.18); margin: 0; padding: 13px 0 0; }
.profile-actions button { height: 52px; min-width: 187px; border-radius: 14px; font-family: 'VT323', monospace; font-size: 1.34rem; letter-spacing: .13em; color: #f2eaff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .17s ease, box-shadow .17s ease, border-color .17s ease, background .17s ease; }
.profile-actions button span { font-size: 1.45rem; color: #dac7ff; }
.profile-reset { background: rgba(36,24,53,.64); border: 1px solid rgba(157,127,214,.32); }
.profile-reset:hover { transform: translateY(-2px); border-color: rgba(201,171,255,.6); background: rgba(69,43,105,.56); }
.profile-save { background: linear-gradient(108deg, #4f327c, #7650ad 56%, #a768d4); border: 1px solid rgba(222,198,255,.52); box-shadow: 0 11px 25px rgba(89,42,155,.23); }
.profile-save:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(137,72,212,.38), 0 0 22px rgba(165,114,237,.19); }
@media(max-height:700px) { .profile-settings-sheet { height: calc(100dvh - 18px); padding: 13px; gap: 9px; } .profile-titlebar { padding-bottom: 8px; } .profile-titlebar h2 { font-size: 2.2rem; } .profile-skin-carousel { min-height: 120px; } .profile-bindings-panel { min-height: 98px; } .profile-actions { padding-top: 8px; } .profile-actions button { height: 44px; } }
@media(max-width:720px){ .profile-settings-sheet { height: calc(100dvh - 18px); width: calc(100vw - 18px); } .profile-layout { grid-template-columns: 1fr; } .profile-preview-pane { display: none; } .profile-control-title { display: block; } }

.profile-note.diamond { height: 32px; top: 18px; clip-path: polygon(10% 50%,20% 0,80% 0,90% 50%,80% 100%,20% 100%); background: linear-gradient(90deg,#53eaff,#cf62ff 50%,#ff66ce); box-shadow: 0 0 20px rgba(229,94,255,.6); }
.profile-note.hex { height: 34px; top: 18px; clip-path: polygon(8% 50%,17% 0,83% 0,92% 50%,83% 100%,17% 100%); background: linear-gradient(180deg,#51228f,#d85cff); outline: 2px solid rgba(81,233,255,.74); box-shadow: 0 0 20px rgba(77,232,255,.52); }
.profile-note.capsule { height: 32px; top: 18px; border-radius: 999px; background: linear-gradient(90deg,#d76aff 0 47%,#392067 47% 53%,#55e8ff 53%); border: 3px solid rgba(105,53,196,.9); box-shadow: 0 0 20px rgba(255,96,206,.56); }
.profile-note.arrow { height: 33px; top: 18px; clip-path: polygon(0 0,70% 0,100% 50%,70% 100%,0 100%,22% 50%); background: linear-gradient(90deg,#8f5aff,#fc66d6); box-shadow: 0 0 21px rgba(207,89,255,.6); }
.profile-note.pulse { height: 33px; top: 18px; border-radius: 999px; background: radial-gradient(circle,#fa69d4 0 18%,#762bd1 20% 100%); box-shadow: 0 0 23px rgba(255,84,199,.6); border-bottom: 3px solid #58edff; }
.profile-note.split { height: 31px; top: 19px; border-radius: 9px; background: linear-gradient(90deg,#ff65cd 0 48%,#6a42d9 48% 52%,#43e5ff 52%); box-shadow: 0 0 19px rgba(112,216,255,.56); }

.profile-note.nova { clip-path: polygon(0 50%,12% 29%,20% 0,34% 22%,50% 0,66% 22%,80% 0,88% 29%,100% 50%,88% 71%,80% 100%,20% 100%,12% 71%); background: linear-gradient(90deg,#50eaff,#ef61ff 50%,#ff72c6); box-shadow: 0 0 22px rgba(255,99,224,.66); }
.profile-note.crown { clip-path: polygon(0 100%,0 28%,22% 58%,38% 0,53% 57%,69% 0,83% 58%,100% 28%,100% 100%); background: linear-gradient(90deg,#7839d0,#ff61d1 54%,#53edff); box-shadow: 0 0 21px rgba(240,100,255,.6); }
.profile-note.meteor { clip-path: polygon(16% 0,100% 0,84% 100%,0 100%); background: linear-gradient(90deg,rgba(87,238,255,.45),#7c55eb 33%,#e95dff 73%,#ff71c9); box-shadow: 0 0 22px rgba(90,235,255,.62); }
.profile-note.orbit { height: 35px; border-radius: 999px; background: rgba(80,43,150,.9); border: 3px solid #58ebff; box-shadow: inset 0 0 0 7px rgba(13,8,29,.54), 0 0 23px rgba(98,230,255,.58); }
.profile-note.lotus { border-radius: 999px; background: radial-gradient(ellipse at 31% 50%,#ff70d2 0 18%,transparent 19%), radial-gradient(ellipse at 50% 40%,#ff70d2 0 21%,transparent 22%), radial-gradient(ellipse at 69% 50%,#ff70d2 0 18%,transparent 19%), #692dc4; border-bottom: 3px solid #58eeff; box-shadow: 0 0 21px rgba(255,108,208,.62); }
.profile-note.blade { clip-path: polygon(9% 0,100% 16%,91% 100%,0 84%); background: linear-gradient(90deg,#50e9ff,#7251ee 39%,#fb5fd0); box-shadow: 0 0 22px rgba(78,232,255,.62); }
.profile-note.wave { border-radius: 13px; background: linear-gradient(180deg,#5c32b7,#8f54e6); border-bottom: 3px solid #56ecff; box-shadow: 0 0 21px rgba(111,209,255,.6); }
.profile-note.rune { border-radius: 8px; background: linear-gradient(90deg,#1a0c30,#4e277d,#1a0c30); border: 3px solid #bf67ff; box-shadow: inset 0 0 0 2px rgba(82,236,255,.58), 0 0 23px rgba(198,103,255,.62); }

/* Lane theme carousel ------------------------------------------------------ */
.profile-lane-theme { margin-top: 10px; flex: none; }
.profile-lane-theme .profile-kicker { margin: 0 0 5px; }
.profile-theme-carousel { min-height: 76px; display:grid; grid-template-columns:42px 1fr 42px; gap:8px; align-items:center; border-radius:14px; border:1px solid rgba(167,139,250,.18); background:rgba(9,6,18,.24); padding:6px; }
.profile-theme-stage { display:grid; justify-items:center; gap:3px; min-width:0; }
.profile-theme-stage strong { font-weight:400; letter-spacing:.17em; font-size:1.12rem; color:#efe2ff; }
.profile-theme-stage small { font-size:.92rem; color:rgba(221,208,255,.53); }
.theme-preview { position:relative; width:min(174px,95%); height:35px; display:grid; grid-template-columns:repeat(6,1fr); gap:3px; padding:3px; border-radius:8px; overflow:hidden; background:rgba(6,5,14,.5); }
.theme-preview i { display:block; border-radius:3px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.11); }
.theme-preview b { position:absolute; left:4px; right:4px; bottom:5px; height:2px; border-radius:99px; background:#d0beff; box-shadow:0 0 8px rgba(167,139,250,.7); }
.theme-preview.runway { background:linear-gradient(#160c29,#090514); box-shadow:0 0 10px rgba(169,92,255,.18); }
.theme-preview.runway i { background:linear-gradient(transparent,rgba(122,70,193,.25)); border-color:rgba(210,167,255,.16); }
.theme-preview.runway b { height:4px; background:linear-gradient(90deg,#58ebff,#dfadff,#ff73d4,#58ebff); }
.theme-preview.glass { background:linear-gradient(#171a38,#0d1d32); }
.theme-preview.glass i { background:linear-gradient(rgba(255,255,255,.1),rgba(86,214,255,.1)); border-color:rgba(126,230,255,.28); }
.theme-preview.glass b { background:#80f4ff; }
.theme-preview.pulsegrid { background:repeating-linear-gradient(0deg,#090516 0,#090516 8px,rgba(225,80,255,.12) 9px); }
.theme-preview.pulsegrid i { border-color:rgba(202,67,255,.24); background:rgba(104,35,171,.14); }
.theme-preview.pulsegrid b { background:linear-gradient(90deg,#ff59d1,#ad5eff,#55eaff); }
.theme-preview.midnight { background:#03050e; }
.theme-preview.midnight i { background:transparent; border-color:rgba(85,100,154,.18); }
.theme-preview.midnight b { background:#55eaff; }
.theme-preview.candy { background:linear-gradient(#24102e,#16091f); }
.theme-preview.candy i:nth-child(odd) { background:rgba(255,112,201,.12); border-color:rgba(255,112,201,.2); }
.theme-preview.candy i:nth-child(even) { background:rgba(93,232,255,.12); border-color:rgba(93,232,255,.2); }
.theme-preview.candy b { height:4px; background:linear-gradient(90deg,#ff74d6,#f6caff,#62eaff,#ff74d6); }


/* Theme expansion + fixed-height settings layout */
.profile-preview-pane { display:grid; grid-template-rows:auto 112px auto 66px 54px; gap:6px; align-content:start; padding:10px; }
.profile-skin-carousel { min-height:0; height:112px; flex:none; padding:6px; }
.profile-skin-arrow { height:62px; }
.profile-lanes { height:54px; }
.profile-note { top:18px; }
.profile-lane-theme { margin-top:0; min-height:0; }
.profile-lane-theme .profile-kicker { margin:0 0 3px; }
.profile-theme-carousel { min-height:0; height:62px; padding:4px; }
.profile-theme-stage { gap:1px; }
.profile-theme-stage small { font-size:.85rem; line-height:1; }
.profile-toggle-card { margin-top:0; min-height:54px; height:54px; padding:7px 10px; align-self:end; }
.profile-toggle-card small { line-height:1; }
.profile-settings-column { grid-template-rows:.82fr 1fr; }
.profile-bindings-panel { min-height:102px; }
@media(max-height:700px) {
  .profile-preview-pane { grid-template-rows:auto 96px auto 57px 50px; padding:7px; gap:4px; }
  .profile-skin-carousel { height:96px; }
  .profile-theme-carousel { height:55px; }
  .profile-toggle-card { height:50px; min-height:50px; }
}
.theme-preview.galaxy { background:radial-gradient(circle at 15% 30%,rgba(255,255,255,.7) 0 1px,transparent 2px),radial-gradient(circle at 75% 45%,rgba(94,236,255,.7) 0 1px,transparent 2px),linear-gradient(#130e2d,#080617); }
.theme-preview.galaxy i { background:linear-gradient(transparent,rgba(111,65,190,.16)); border-color:rgba(174,126,248,.16); }
.theme-preview.galaxy b { height:3px; background:linear-gradient(90deg,#7c53ee,#fa65d5,#64eaff); }
.theme-preview.inferno { background:linear-gradient(#280a20,#14050d); }
.theme-preview.inferno i { background:linear-gradient(transparent,rgba(255,84,65,.19)); border-color:rgba(255,124,76,.24); }
.theme-preview.inferno b { height:4px; background:linear-gradient(90deg,#ff3c65,#ff8b40,#ff54d5); }
.theme-preview.aquarium { background:linear-gradient(#071d30,#031323); }
.theme-preview.aquarium i { background:linear-gradient(rgba(65,244,255,.05),rgba(31,122,178,.18)); border-color:rgba(68,231,255,.18); }
.theme-preview.aquarium b { height:3px; background:linear-gradient(90deg,#20aaff,#52efff,#20aaff); }
.theme-preview.terminal { background:repeating-linear-gradient(0deg,#020d0b 0,#020d0b 7px,rgba(69,255,136,.09) 8px); }
.theme-preview.terminal i { background:rgba(39,222,113,.045); border-color:rgba(69,255,136,.18); }
.theme-preview.terminal b { background:#43ff91; }
.theme-preview.cathedral { background:linear-gradient(#180d27,#090615); }
.theme-preview.cathedral i:nth-child(odd) { background:rgba(231,175,58,.1); border-color:rgba(255,201,79,.23); }
.theme-preview.cathedral i:nth-child(even) { background:rgba(152,72,237,.13); border-color:rgba(201,120,255,.25); }
.theme-preview.cathedral b { height:3px; background:linear-gradient(90deg,#f5bf55,#c564ff,#f5bf55); }
.theme-preview.monochrome { background:linear-gradient(#11131b,#05060c); }
.theme-preview.monochrome i { background:rgba(255,255,255,.035); border-color:rgba(255,255,255,.18); }
.theme-preview.monochrome b { background:#f1f2ff; }
.theme-preview.sunset { background:linear-gradient(#29102d,#130818); }
.theme-preview.sunset i { background:linear-gradient(transparent,rgba(255,91,150,.14)); border-color:rgba(255,139,107,.22); }
.theme-preview.sunset b { height:4px; background:linear-gradient(90deg,#ff9a45,#ff4b9f,#8558ff); }
.theme-preview.void { background:#07050e; }
.theme-preview.void i { background:rgba(120,25,51,.07); border-color:rgba(211,49,81,.19); }
.theme-preview.void b { height:3px; background:linear-gradient(90deg,#ff335f,transparent 35%,#ff335f 38%,#ff335f 70%,transparent); }


/* Hotfix: stable settings layout after lane theme expansion ---------------- */
.profile-preview-pane { overflow: hidden; }
.profile-settings-column .profile-toggle-card { justify-content: flex-start; padding: 12px 14px; }
.profile-settings-column .profile-toggle-card span { align-content: center; }
@media (max-height: 790px) and (min-width: 721px) {
  .profile-settings-sheet { height: min(690px, calc(100dvh - 24px)); padding: 16px 19px; gap: 10px; }
  .profile-titlebar { padding-bottom: 9px; }
  .profile-titlebar h2 { font-size: 2.35rem; }
  .profile-layout { gap: 10px; }
  .profile-preview-pane, .profile-control, .profile-option-card { padding: 10px 12px; }
  .profile-skin-carousel { height: 124px; min-height: 124px; padding: 7px; }
  .profile-lanes { height: 53px; }
  .profile-note { top: 18px; }
  .profile-skin-arrow { height: 66px; }
  .profile-lane-theme { margin-top: 7px; }
  .profile-theme-carousel { min-height: 67px; }
  .profile-bindings-panel { min-height: 99px; }
  .profile-actions { padding-top: 9px; }
  .profile-actions button { height: 45px; }
}

/* Matched style sets: new note previews for legacy lane themes */
.profile-note.runway { border-radius:12px; background:linear-gradient(90deg,#55ebff,#c873ff 48%,#ff65cc); box-shadow:0 5px 0 rgba(88,235,255,.92),0 0 20px rgba(88,235,255,.58); }
.profile-note.glass { border-radius:16px; background:rgba(125,217,255,.17); border:2px solid rgba(180,248,255,.90); box-shadow:inset 0 7px 4px rgba(255,255,255,.22),0 0 18px rgba(82,240,255,.56); }
.profile-note.pulsegrid { border-radius:7px; background:linear-gradient(90deg,#5b26b1,#ff59d1,#55eaff); border:2px solid rgba(255,89,209,.72); box-shadow:0 0 21px rgba(255,89,209,.6); }
.profile-note.midnight { height:24px; top:22px; border-radius:6px; background:#040711; border:2px solid #55eaff; box-shadow:0 0 15px rgba(85,234,255,.62); }
.profile-note.candy { border-radius:999px; background:linear-gradient(90deg,#ff74d6,#f6caff,#62eaff); box-shadow:0 0 22px rgba(255,116,214,.62); }
.profile-note.galaxy { border-radius:14px; background:radial-gradient(circle at 30% 34%,#fff 0 2px,transparent 3px),linear-gradient(90deg,#30226f,#ff63d2,#55eaff); box-shadow:0 0 23px rgba(117,84,237,.68); }
.profile-note.inferno { clip-path:polygon(8% 100%,13% 0,100% 17%,92% 100%); background:linear-gradient(90deg,#ff365b,#ff993d,#ff51ce); box-shadow:0 0 23px rgba(255,61,91,.68); }
.profile-note.aquarium { border-radius:999px; background:radial-gradient(circle at 28% 35%,rgba(255,255,255,.72) 0 4px,transparent 5px),linear-gradient(90deg,#1baaff,#58f3ff,#147bd9); box-shadow:0 0 22px rgba(45,220,255,.65); }
.profile-note.terminal { height:27px; top:21px; border-radius:4px; background:repeating-linear-gradient(0deg,#09271d 0 5px,#123d2c 6px); border:2px solid #44ff91; box-shadow:0 0 17px rgba(68,255,145,.62); }
.profile-note.cathedral { border-radius:18px 18px 10px 10px; background:linear-gradient(90deg,#f2be58,#c066ff,#f2be58); border:2px solid rgba(255,226,158,.8); box-shadow:0 0 22px rgba(242,190,88,.58); }
.profile-note.monochrome { height:26px; top:22px; border-radius:10px; background:#10131c; border:2px solid #f1f2ff; box-shadow:0 0 14px rgba(255,255,255,.5); }
.profile-note.sunset { border-radius:14px; background:linear-gradient(90deg,#ffa04c,#ff4c9e,#7358ff); box-shadow:0 0 23px rgba(255,76,158,.62); }
.profile-note.void { border-radius:7px; background:linear-gradient(90deg,#090611 0 18%,#ff335d 19% 22%,#090611 23% 67%,#ff335d 68% 73%,#090611 74%); border:2px solid #ff335d; box-shadow:0 0 18px rgba(255,51,93,.62); }

/* Matched style sets: lane-theme previews created for every original note skin */
.theme-preview.comet { background:linear-gradient(#16091f,#0b0615); } .theme-preview.comet i { background:linear-gradient(150deg,transparent,rgba(247,103,218,.16)); border-color:rgba(247,103,218,.2); } .theme-preview.comet b { background:linear-gradient(90deg,#e55ae0,#f371db); }
.theme-preview.neon { background:linear-gradient(#170d31,#080816); } .theme-preview.neon i:nth-child(odd){ background:rgba(116,80,223,.12); } .theme-preview.neon i:nth-child(even){ background:rgba(55,230,255,.1); } .theme-preview.neon b { background:#55eaff; }
.theme-preview.blossom { background:linear-gradient(#251020,#100817); } .theme-preview.blossom i { background:radial-gradient(circle,rgba(255,132,214,.16),transparent 66%); border-color:rgba(255,132,214,.2); } .theme-preview.blossom b { background:#ff8fdf; }
.theme-preview.aurora { background:linear-gradient(110deg,#071b2e,#26113c,#082331); } .theme-preview.aurora i { background:linear-gradient(transparent,rgba(70,237,255,.09)); border-color:rgba(215,104,255,.17); } .theme-preview.aurora b { background:linear-gradient(90deg,#46edff,#d768ff,#52dcff); }
.theme-preview.prism { background:linear-gradient(#140d25,#080611); } .theme-preview.prism i { background:rgba(135,83,219,.08); border-color:rgba(255,208,106,.19); } .theme-preview.prism b { background:linear-gradient(90deg,#67dcff,#ff65c9,#ffd06a,#55edff); }
.theme-preview.voltage { background:#0d071a; } .theme-preview.voltage i { background:rgba(220,98,255,.08); border-color:rgba(71,234,255,.18); } .theme-preview.voltage b { background:linear-gradient(90deg,#dc62ff,#47eaff,#dc62ff); }
.theme-preview.velvet { background:linear-gradient(#170d2c,#080611); } .theme-preview.velvet i { background:rgba(117,64,197,.12); border-color:rgba(218,177,255,.13); } .theme-preview.velvet b { background:#dab1ff; }
.theme-preview.eclipse { background:radial-gradient(ellipse at center,rgba(255,95,209,.1),#05030c 58%); } .theme-preview.eclipse i { background:rgba(35,18,58,.22); border-color:rgba(83,232,255,.14); } .theme-preview.eclipse b { background:linear-gradient(90deg,#ff5fd1,#53e8ff); }
.theme-preview.pixel { background:repeating-linear-gradient(0deg,#0e081c 0 8px,rgba(204,102,255,.08) 9px); } .theme-preview.pixel i { border-color:rgba(71,234,255,.2); } .theme-preview.pixel b { background:#47eaff; }
.theme-preview.diamond { background:linear-gradient(#10091d,#07050e); } .theme-preview.diamond i { background:linear-gradient(135deg,transparent,rgba(207,98,255,.14),transparent); border-color:rgba(83,234,255,.16); } .theme-preview.diamond b { background:linear-gradient(90deg,#53eaff,#cf62ff,#ff66ce); }
.theme-preview.hex { background:#0d0719; } .theme-preview.hex i { background:rgba(81,34,143,.22); border-color:rgba(81,233,255,.22); } .theme-preview.hex b { background:#51e9ff; }
.theme-preview.capsule { background:linear-gradient(#160a28,#080510); } .theme-preview.capsule i:nth-child(odd){ background:rgba(215,106,255,.12); } .theme-preview.capsule i:nth-child(even){ background:rgba(85,232,255,.12); } .theme-preview.capsule b { background:linear-gradient(90deg,#d76aff,#55e8ff); }
.theme-preview.arrow { background:#12091e; } .theme-preview.arrow i { background:linear-gradient(140deg,transparent 35%,rgba(252,102,214,.16) 36% 48%,transparent 49%); border-color:rgba(143,90,255,.14); } .theme-preview.arrow b { background:#fc66d6; }
.theme-preview.pulse { background:#10081c; } .theme-preview.pulse i { background:rgba(118,43,209,.14); border-color:rgba(250,105,212,.17); } .theme-preview.pulse b { background:linear-gradient(90deg,#fa69d4,#58edff,#fa69d4); }
.theme-preview.split { background:linear-gradient(90deg,#16091e,#071421); } .theme-preview.split i:nth-child(odd){ background:rgba(255,103,207,.12); } .theme-preview.split i:nth-child(even){ background:rgba(83,234,255,.12); } .theme-preview.split b { background:linear-gradient(90deg,#ff67cf,#53eaff); }
.theme-preview.nova { background:radial-gradient(circle at 50% 35%,rgba(239,97,255,.17),#080511 65%); } .theme-preview.nova i { border-color:rgba(80,234,255,.15); } .theme-preview.nova b { background:linear-gradient(90deg,#50eaff,#ef61ff,#ff72c6); }
.theme-preview.crown { background:linear-gradient(#190c28,#090614); } .theme-preview.crown i { background:rgba(120,57,208,.12); border-color:rgba(246,190,77,.22); } .theme-preview.crown b { background:#f6be4d; }
.theme-preview.meteor { background:linear-gradient(145deg,#0b1329,#220c29); } .theme-preview.meteor i { background:linear-gradient(150deg,transparent,rgba(83,234,255,.11)); border-color:rgba(255,113,201,.16); } .theme-preview.meteor b { background:linear-gradient(90deg,#53eaff,#ff71c9); }
.theme-preview.orbit { background:radial-gradient(ellipse at center,rgba(88,235,255,.13),#090613 62%); } .theme-preview.orbit i { background:rgba(80,43,150,.17); border-color:rgba(88,235,255,.19); } .theme-preview.orbit b { background:#58ebff; }
.theme-preview.lotus { background:linear-gradient(#210c26,#0c0716); } .theme-preview.lotus i { background:radial-gradient(circle,rgba(255,112,210,.16),transparent 60%); border-color:rgba(88,238,255,.12); } .theme-preview.lotus b { background:linear-gradient(90deg,#ff70d2,#58eeff); }
.theme-preview.blade { background:#080716; } .theme-preview.blade i { background:linear-gradient(155deg,transparent 43%,rgba(80,233,255,.19) 44% 48%,transparent 49%); border-color:rgba(251,95,208,.13); } .theme-preview.blade b { background:linear-gradient(90deg,#50e9ff,#fb5fd0); }
.theme-preview.wave { background:linear-gradient(#10092a,#071520); } .theme-preview.wave i { background:rgba(92,50,183,.16); border-color:rgba(86,236,255,.13); } .theme-preview.wave b { background:#56ecff; }
.theme-preview.rune { background:#070411; } .theme-preview.rune i { background:rgba(26,12,48,.28); border-color:rgba(191,103,255,.23); } .theme-preview.rune b { background:linear-gradient(90deg,#bf67ff,#52ecff,#bf67ff); }


/* Timing calibration ----------------------------------------------------- */
.profile-actions-three { justify-content: stretch; display:grid; grid-template-columns: 1.18fr .95fr 1.16fr; }
.profile-actions-three button { min-width: 0; }
.profile-calibrate { height:52px; border-radius:14px; border:1px solid rgba(91,234,255,.48); background:linear-gradient(100deg,rgba(26,56,95,.72),rgba(88,37,133,.65)); color:#e9faff; font-family:'VT323',monospace; font-size:1.26rem; letter-spacing:.12em; display:flex; align-items:center; justify-content:center; gap:9px; cursor:pointer; transition:transform .17s ease, box-shadow .17s ease, border-color .17s ease; }
.profile-calibrate > span:first-child { font-size:1.65rem; color:#65ebff; text-shadow:0 0 10px rgba(91,234,255,.72); }
.profile-calibrate > span:last-child { display:grid; gap:0; line-height:1; text-align:left; }
.profile-calibrate small { font-size:.92rem; color:rgba(115,239,255,.82); letter-spacing:.1em; }
.profile-calibrate:hover { transform:translateY(-2px); border-color:rgba(102,237,255,.86); box-shadow:0 0 22px rgba(76,212,255,.22); }
.timing-calibration { position:fixed; inset:0; z-index:80; display:grid; place-items:center; background:rgba(5,3,12,.86); backdrop-filter:blur(8px); }
.timing-calibration.hidden { display:none; }
.calibration-sheet { width:min(720px,calc(100vw - 32px)); border-radius:23px; border:1px solid rgba(177,128,255,.4); background:radial-gradient(circle at 50% 20%,rgba(84,42,128,.34),transparent 43%),linear-gradient(145deg,rgba(17,11,32,.98),rgba(8,6,17,.99)); box-shadow:0 26px 85px rgba(0,0,0,.62),0 0 32px rgba(154,80,255,.16); padding:21px; display:grid; gap:16px; }
.calibration-titlebar { display:flex; justify-content:space-between; align-items:start; border-bottom:1px solid rgba(167,139,250,.18); padding-bottom:13px; }
.calibration-titlebar p { margin:0; color:#64eaff; letter-spacing:.22em; font-size:1.1rem; }
.calibration-titlebar h2 { margin:4px 0 0; color:#f1e9ff; letter-spacing:.12em; font-size:2.45rem; font-weight:400; }
.calibration-titlebar small { color:rgba(223,207,255,.65); font-size:1.08rem; }
.calibration-body { display:grid; justify-items:center; gap:15px; padding:8px 20px 5px; }
.calibration-instruction { min-height:46px; margin:0; max-width:560px; color:rgba(236,226,255,.86); text-align:center; font-size:1.25rem; letter-spacing:.04em; line-height:1.25; }
.calibration-instruction strong { color:#6defff; letter-spacing:.15em; font-weight:400; }
.calibration-pulse { width:174px; height:174px; border-radius:50%; display:grid; place-items:center; border:2px solid rgba(167,139,250,.46); background:radial-gradient(circle,rgba(116,65,192,.35),rgba(26,14,47,.4) 52%,transparent 70%); box-shadow:inset 0 0 30px rgba(171,84,255,.23),0 0 25px rgba(88,235,255,.06); transition:transform .1s ease, border-color .1s ease, box-shadow .1s ease; }
.calibration-pulse span { color:#d8c8ff; font-size:2rem; letter-spacing:.15em; }
.calibration-pulse.beat { transform:scale(1.08); border-color:#65edff; box-shadow:inset 0 0 36px rgba(98,235,255,.29),0 0 34px rgba(98,235,255,.35); }
.calibration-pulse.hit { border-color:#ff76d2; box-shadow:inset 0 0 40px rgba(255,95,210,.26),0 0 35px rgba(255,95,210,.33); }
.calibration-meter { width:min(470px,100%); height:9px; border-radius:999px; border:1px solid rgba(167,139,250,.25); background:rgba(0,0,0,.28); overflow:hidden; }
.calibration-meter div { height:100%; width:0%; border-radius:inherit; background:linear-gradient(90deg,#7656db,#ef61d6,#5cecff); box-shadow:0 0 14px rgba(98,235,255,.45); transition:width .18s ease; }
.calibration-status { margin:0; min-height:32px; color:rgba(207,190,244,.76); font-size:1.18rem; letter-spacing:.07em; }
.calibration-result { display:grid; justify-items:center; gap:3px; padding:12px 24px; border-radius:16px; border:1px solid rgba(96,234,255,.32); background:rgba(33,25,60,.38); }
.calibration-result.hidden { display:none; }
.calibration-result p { margin:0; color:rgba(214,197,255,.78); letter-spacing:.18em; }
.calibration-result strong { font-size:3.25rem; line-height:1; font-weight:400; color:#68edff; text-shadow:0 0 19px rgba(91,234,255,.48); }
.calibration-result small { max-width:520px; text-align:center; font-size:1.06rem; color:rgba(232,221,255,.82); }
.calibration-actions { display:flex; justify-content:flex-end; gap:10px; border-top:1px solid rgba(167,139,250,.18); padding-top:14px; }
.calibration-actions button {
  min-width:170px; height:52px; border-radius:14px; display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-family:'VT323',monospace; font-size:1.32rem; letter-spacing:.13em; color:#f2eaff; cursor:pointer;
  transition:transform .17s ease, box-shadow .17s ease, border-color .17s ease, background .17s ease;
}
.calibration-actions button::before { font-size:1.48rem; line-height:1; text-shadow:0 0 12px currentColor; }
#cancel-calibration::before { content:'×'; color:#d8c5ff; }
#start-calibration::before { content:'◎'; color:#65ebff; }
#apply-calibration::before { content:'✓'; color:#f6dcff; }
.calibration-actions .profile-reset { background:linear-gradient(110deg,rgba(37,25,58,.74),rgba(48,27,76,.76)); border:1px solid rgba(171,135,232,.38); }
.calibration-actions .profile-reset:hover { transform:translateY(-2px); border-color:rgba(214,180,255,.7); box-shadow:0 0 20px rgba(153,93,224,.18); }
.calibration-actions .profile-calibrate { background:linear-gradient(106deg,rgba(18,60,92,.82),rgba(75,31,129,.78)); border:1px solid rgba(91,234,255,.54); box-shadow:0 10px 27px rgba(38,157,206,.1); }
.calibration-actions .profile-calibrate:hover { transform:translateY(-2px); border-color:rgba(102,237,255,.9); box-shadow:0 0 26px rgba(76,212,255,.25); }
.calibration-actions .profile-save { background:linear-gradient(108deg,#4f327c,#7650ad 56%,#a768d4); border:1px solid rgba(222,198,255,.6); box-shadow:0 11px 25px rgba(89,42,155,.28); }
.calibration-actions .profile-save:hover { transform:translateY(-2px); box-shadow:0 16px 36px rgba(137,72,212,.42),0 0 22px rgba(165,114,237,.22); }
@media (max-height:720px) { .calibration-pulse { width:130px; height:130px; } .calibration-sheet { padding:15px; gap:10px; } .calibration-body { gap:9px; } }


/* Full-page main-menu player profile -------------------------------------- */
body.main-profile-open { overflow: hidden; }
.main-user-profile {
  position: fixed; inset: 0; z-index: 46; display: block; overflow-y: auto;
  background: radial-gradient(circle at 16% 12%, rgba(161,67,220,.18), transparent 34%),
              radial-gradient(circle at 82% 2%, rgba(76,227,255,.07), transparent 29%),
              rgba(6,3,12,.985);
  backdrop-filter: blur(16px);
}
.main-user-profile.hidden { display: none; }
.main-profile-page { width: min(1340px, calc(100vw - 54px)); min-height: 100dvh; margin: 0 auto; padding: 30px 0 38px; }
.main-profile-pagebar { height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.main-profile-brand { display:flex; align-items:baseline; gap:16px; }
.main-profile-brand span { color:#f5e7ff; font-size:2.45rem; letter-spacing:.15em; text-shadow:0 0 18px rgba(204,111,255,.3); }
.main-profile-brand small { color:rgba(204,183,235,.55); font-size:1.1rem; letter-spacing:.28em; }
.main-profile-pageactions { display:flex; gap:10px; }
.main-profile-navplay, .main-profile-close { height:46px; padding:0 22px; border-radius:12px; font:1.27rem 'VT323',monospace; letter-spacing:.15em; color:#ecdefc; cursor:pointer; transition:transform .17s ease, border-color .17s ease, box-shadow .17s ease, background .17s ease; }
.main-profile-navplay { border:1px solid rgba(220,146,255,.5); background:linear-gradient(104deg,rgba(111,40,174,.65),rgba(215,58,166,.34)); }
.main-profile-close { border:1px solid rgba(150,128,188,.33); background:rgba(28,17,47,.66); }
.main-profile-navplay:hover, .main-profile-close:hover { transform:translateY(-2px); border-color:rgba(237,190,255,.78); box-shadow:0 0 24px rgba(173,73,226,.2); }
.main-profile-banner { position:relative; min-height:278px; border-radius:24px; overflow:hidden; border:1px solid rgba(197,122,239,.28); background:
  linear-gradient(180deg, rgba(9,5,18,.06) 0 34%, rgba(8,4,16,.94) 90%),
  radial-gradient(ellipse at 26% 45%, rgba(204,74,232,.38), transparent 28%),
  linear-gradient(108deg, #2b1251 0%, #170b2e 41%, #15132c 68%, #27123e 100%);
  box-shadow: 0 28px 80px rgba(0,0,0,.38), inset 0 -1px rgba(218,158,255,.15);
}
.main-profile-banner::before { content:""; position:absolute; inset:0; opacity:.47; background-image:linear-gradient(110deg, transparent 35%, rgba(229,91,235,.13) 35.2%, transparent 36%, transparent 62%, rgba(71,228,255,.12) 62.2%, transparent 63%), repeating-linear-gradient(0deg, transparent 0 20px, rgba(255,255,255,.018) 21px); }
.main-profile-banner-glow { position:absolute; width:470px; height:240px; left:-40px; bottom:-70px; border-radius:50%; filter:blur(45px); background:rgba(202,74,242,.22); }
.main-profile-identity { position:absolute; left:33px; right:31px; bottom:26px; display:flex; align-items:end; gap:23px; }
#main-profile-avatar { width:146px; height:146px; object-fit:cover; flex:none; border-radius:18px; background:#140a27; border:3px solid rgba(242,189,255,.72); box-shadow:0 0 0 5px rgba(14,7,25,.82),0 13px 34px rgba(0,0,0,.54),0 0 36px rgba(192,77,237,.22); }
.main-profile-nameblock { flex:1; min-width:0; padding-bottom:8px; }
.main-profile-kicker { margin:0 0 5px; color:rgba(191,168,234,.64); font-size:1.07rem; letter-spacing:.25em; }
.main-profile-nameblock h2 { margin:0 0 9px; color:#faebff; font-weight:400; line-height:.9; letter-spacing:.12em; font-size:4.05rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow:0 0 19px rgba(198,104,245,.17); }
.main-profile-role { display:inline-flex; margin:0; padding:3px 14px; border-radius:999px; border:1px solid rgba(198,148,239,.42); color:rgba(232,210,254,.85); background:rgba(44,20,72,.37); font-size:1.12rem; letter-spacing:.2em; }
.main-profile-role.admin { color:#ffcf74; border-color:rgba(255,199,86,.54); background:rgba(255,190,60,.12); }
.main-profile-presence { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; width: max-content; max-width: min(560px, 72vw); padding: 5px 13px; border-radius: 999px; border: 1px solid rgba(131,123,159,.4); background: rgba(11,9,20,.48); color: rgba(181,172,204,.82); font: inherit; font-size: 1.02rem; letter-spacing: .12em; text-transform: uppercase; }
.main-profile-presence.online { color:#74efba; border-color:rgba(57,221,151,.46); background:rgba(16,90,66,.24); }
.main-profile-presence.playing { color:#79d9ff; border-color:rgba(53,191,255,.50); background:rgba(16,74,111,.28); cursor:pointer; }
.main-profile-presence.playing:hover { background:rgba(25,104,146,.4); border-color:rgba(107,220,255,.74); }
.main-profile-presence:disabled { cursor:default; opacity:1; }
.main-profile-edit-toggle { align-self:center; margin-top:42px; height:46px; padding:0 21px; border-radius:12px; border:1px solid rgba(204,144,244,.42); background:rgba(42,22,67,.65); color:#e9dcf9; font:1.2rem 'VT323',monospace; letter-spacing:.14em; cursor:pointer; transition:all .16s ease; }
.main-profile-edit-toggle:hover, .main-profile-edit-toggle.active { background:rgba(116,43,153,.47); border-color:rgba(234,164,255,.75); box-shadow:0 0 20px rgba(197,80,239,.18); }
.main-profile-body { display:grid; grid-template-columns:345px minmax(0,1fr); align-items:start; gap:18px; margin-top:19px; }
.main-profile-sidebar { display:grid; gap:13px; }
.main-profile-about, .main-profile-panel, .main-profile-edit { border:1px solid rgba(173,109,219,.23); border-radius:16px; overflow:hidden; background:linear-gradient(145deg, rgba(32,15,53,.78), rgba(16,9,28,.76)); }
.main-profile-about header, .main-profile-edit > header { padding:12px 15px; color:rgba(222,196,248,.75); background:rgba(79,35,111,.32); font-size:1.14rem; letter-spacing:.2em; }
.main-profile-bio { min-height:74px; margin:0; padding:15px; color:rgba(232,214,248,.76); font-size:1.31rem; line-height:1.3; }
.main-profile-stats { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.main-profile-stats div { position:relative; overflow:hidden; min-height:83px; padding:11px 12px; border:1px solid rgba(169,107,213,.23); border-radius:13px; background:rgba(31,15,49,.66); }
.main-profile-stats div::after { content:""; position:absolute; left:0; top:0; bottom:0; width:2px; background:#ce61f1; opacity:.6; }
.main-profile-stats span { display:block; color:rgba(195,172,226,.59); font-size:.94rem; letter-spacing:.13em; }
.main-profile-stats strong { display:block; margin-top:7px; color:#f6e8ff; font-size:2.12rem; font-weight:400; }
.main-profile-content { display:grid; gap:13px; }
.main-profile-panel > header { height:50px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 17px; background:linear-gradient(90deg, rgba(79,35,111,.41), rgba(42,19,65,.2)); }
.main-profile-panel > header span { color:#eadcff; font-size:1.27rem; letter-spacing:.16em; }
.main-profile-panel > header small { color:rgba(198,175,226,.52); font-size:1rem; letter-spacing:.12em; }
.main-profile-items { display:grid; max-height:314px; overflow-y:auto; scrollbar-color:rgba(181,91,228,.39) transparent; }
.main-profile-map, .main-profile-run { display:grid; align-items:center; gap:13px; min-height:82px; padding:10px 15px; border:0; border-bottom:1px solid rgba(255,255,255,.055); background:transparent; color:#ede1fb; text-align:left; font:inherit; cursor:pointer; transition:background .16s ease, transform .16s ease; }
.main-profile-map { grid-template-columns:72px minmax(0,1fr); }
.main-profile-run { grid-template-columns:72px minmax(0,1fr) 126px; }
.main-profile-map:hover, .main-profile-run:hover { background:linear-gradient(90deg,rgba(178,75,228,.17),rgba(178,75,228,.035)); transform:translateX(2px); }
.main-profile-thumb { width:72px; height:59px; border-radius:10px; background-size:cover; background-position:center; border:1px solid rgba(218,151,247,.31); box-shadow:inset 0 0 15px rgba(0,0,0,.27),0 0 13px rgba(204,85,237,.08); }
.main-profile-copy { display:grid; gap:5px; min-width:0; }
.main-profile-copy strong { color:#f6e8ff; font-size:1.45rem; font-weight:400; line-height:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.main-profile-copy small { color:rgba(211,188,235,.65); font-size:1.02rem; letter-spacing:.06em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.main-profile-tag { padding:4px 10px 3px; border-radius:999px; border:1px solid; font-size:.89rem; letter-spacing:.12em; font-style:normal; }
.main-profile-tag.ranked { color:#8effbb; background:rgba(36,191,104,.13); border-color:rgba(80,243,146,.52); }
.main-profile-tag.unranked { color:rgba(220,218,233,.8); background:rgba(145,140,159,.12); border-color:rgba(189,182,204,.3); }
.main-profile-tag.loved { color:#ffb5e7; background:rgba(245,60,171,.12); border-color:rgba(255,102,198,.48); }
.main-profile-badges { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.main-profile-map-badges { margin-top:2px; }
.main-profile-diff, .main-profile-rank, .main-profile-mods, .main-profile-private { border-radius:999px; border:1px solid; padding:2px 7px; font-style:normal; letter-spacing:.13em; font-size:.88rem; white-space:nowrap; }
.main-profile-diff.easy { color:#76f1cf; border-color:rgba(93,237,196,.45); background:rgba(50,190,155,.1); }
.main-profile-diff.normal { color:#83caff; border-color:rgba(101,189,255,.48); background:rgba(68,148,215,.11); }
.main-profile-diff.hard { color:#ff8fd8; border-color:rgba(250,116,204,.48); background:rgba(225,65,166,.12); }
.main-profile-rank.rank-ss { color:#80f1ff; border-color:rgba(87,232,255,.65); background:rgba(42,190,214,.15); box-shadow:0 0 12px rgba(88,231,255,.26); }
.main-profile-rank.rank-s { color:#fff2a4; border-color:rgba(255,222,105,.56); background:rgba(241,195,54,.12); }
.main-profile-rank.rank-a { color:#9ef8be; border-color:rgba(86,229,134,.48); background:rgba(50,180,93,.12); }
.main-profile-rank.rank-b { color:#86daff; border-color:rgba(81,194,250,.46); background:rgba(48,143,203,.12); }
.main-profile-rank.rank-c { color:#d0b2ff; border-color:rgba(169,124,255,.45); background:rgba(111,70,192,.14); }
.main-profile-rank.rank-d, .main-profile-rank.rank-f { color:#ffb2c6; border-color:rgba(255,106,143,.44); background:rgba(190,54,90,.14); }
.main-profile-mods { color:#9df3ff; border-color:rgba(87,222,241,.39); background:rgba(39,150,172,.12); }
.main-profile-private { color:#d6c0f1; border-color:rgba(172,137,210,.34); background:rgba(80,48,112,.16); }
.main-profile-score { display:grid; justify-items:end; align-content:center; min-width:110px; }
.main-profile-score small { color:rgba(204,180,231,.58); font-size:.84rem; letter-spacing:.18em; }
.main-profile-score b { font-weight:400; color:#f7e9ff; font-size:1.62rem; font-variant-numeric:tabular-nums; }
.main-profile-empty { padding:23px 17px; margin:0; color:rgba(205,187,229,.6); font-size:1.2rem; }
.main-profile-edit.hidden { display:none; }
.main-profile-edit { padding:0 13px 14px; }
.main-profile-edit-field, .main-profile-file-field { display:grid; gap:7px; margin-top:13px; color:rgba(204,182,235,.7); font-size:1.02rem; letter-spacing:.16em; }
.main-profile-edit-field textarea { min-height:76px; resize:none; border-radius:10px; border:1px solid rgba(172,113,219,.35); background:rgba(6,4,13,.48); color:#eee2ff; font:1.16rem 'VT323',monospace; padding:10px 11px; outline:none; }
.main-profile-edit-field textarea:focus { border-color:rgba(221,147,252,.67); box-shadow:0 0 18px rgba(180,75,222,.15); }
.main-profile-file-field { position:relative; }
.main-profile-file-field input { position:absolute; opacity:0; width:1px; height:1px; }
.main-profile-file-button { display:grid; gap:3px; padding:10px 12px; border-radius:10px; border:1px dashed rgba(207,138,249,.46); background:rgba(73,31,105,.24); cursor:pointer; transition:border-color .15s ease, background .15s ease; }
.main-profile-file-field:hover .main-profile-file-button { border-color:rgba(229,172,255,.75); background:rgba(101,42,140,.33); }
.main-profile-file-button strong { color:#f0deff; font-weight:400; font-size:1.2rem; }
.main-profile-file-button small { color:rgba(203,180,229,.6); font-size:1rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.main-profile-edit-message { margin:12px 0 0; min-height:19px; color:#83efff; font-size:1.05rem; }
.main-profile-edit-actions { display:flex; gap:8px; margin-top:10px; }
.main-profile-edit-actions button { flex:1; height:41px; border-radius:10px; border:1px solid rgba(174,123,222,.36); background:rgba(50,27,76,.51); color:#eadcff; font:1.12rem 'VT323',monospace; letter-spacing:.12em; cursor:pointer; }
.main-profile-edit-actions button:last-child { border-color:rgba(219,147,249,.52); background:linear-gradient(106deg,rgba(100,42,152,.59),rgba(205,63,167,.32)); }
.main-profile-edit-actions button:hover { border-color:rgba(229,175,255,.72); }
.main-avatar-crop { position:fixed; inset:0; z-index:58; display:grid; place-items:center; background:rgba(3,2,8,.8); backdrop-filter:blur(10px); }
.main-avatar-crop.hidden { display:none; }
.main-avatar-crop-sheet { width:min(474px,calc(100vw - 34px)); padding:19px; border-radius:22px; border:1px solid rgba(207,139,249,.42); background:#11091c; box-shadow:0 25px 75px rgba(0,0,0,.68); }
.main-avatar-crop-sheet header { display:flex; align-items:start; justify-content:space-between; margin-bottom:15px; }
.main-avatar-crop-sheet header p { margin:0 0 3px; color:#ad91ef; letter-spacing:.22em; }
.main-avatar-crop-sheet header h2 { margin:0; font-size:2rem; font-weight:400; color:#f2e3ff; }
.main-avatar-crop-sheet header button { border:0; background:transparent; color:#ddcaf0; font:2.1rem 'VT323',monospace; cursor:pointer; }
.main-avatar-crop-stage { position:relative; width:min(366px,100%); margin:0 auto; aspect-ratio:1; overflow:hidden; border-radius:13px; background:#06040d; border:1px solid rgba(201,131,245,.36); touch-action:none; }
.main-avatar-crop-stage canvas { display:block; width:100%; height:100%; cursor:grab; }
.main-avatar-crop-stage canvas:active { cursor:grabbing; }
.main-avatar-crop-stage span { position:absolute; inset:11px; border:1px dashed rgba(255,221,255,.68); border-radius:10px; pointer-events:none; }
.main-avatar-crop-zoom { display:grid; gap:7px; margin:14px 0 8px; color:rgba(207,185,237,.74); letter-spacing:.16em; }
.main-avatar-crop-zoom input { accent-color:#bd62eb; }
.main-avatar-crop-sheet > p { margin:10px 0 15px; color:rgba(212,190,239,.67); font-size:1.1rem; }
.main-avatar-crop-sheet footer { display:flex; gap:9px; }
.main-avatar-crop-sheet footer button { flex:1; height:45px; border-radius:11px; border:1px solid rgba(177,118,224,.37); background:rgba(48,26,72,.58); color:#ebddff; font:1.15rem 'VT323',monospace; letter-spacing:.12em; cursor:pointer; }
.main-avatar-crop-sheet footer button:last-child { border-color:rgba(219,145,252,.57); background:linear-gradient(107deg,rgba(105,43,159,.62),rgba(207,59,171,.35)); }
@media (max-width:920px) { .main-profile-page { width:min(100% - 24px,720px); padding-top:14px; } .main-profile-body { grid-template-columns:1fr; } .main-profile-banner { min-height:255px; } .main-profile-identity { left:20px; right:20px; } .main-profile-content { order:2; } }
@media (max-width:640px) { .main-profile-pagebar { height:auto; align-items:start; } .main-profile-brand small { display:none; } .main-profile-pageactions { flex-direction:column-reverse; } .main-profile-banner { min-height:328px; } .main-profile-identity { align-items:start; flex-wrap:wrap; bottom:18px; } #main-profile-avatar { width:108px; height:108px; } .main-profile-nameblock h2 { font-size:2.8rem; } .main-profile-edit-toggle { flex-basis:100%; margin-top:4px; } .main-profile-map, .main-profile-run { grid-template-columns:58px minmax(0,1fr); } .main-profile-thumb { width:58px; height:50px; } .main-profile-score { grid-column:2; justify-self:start; } }
/* Profile interaction polish: avatar editing, inline bio and private account settings */
.main-profile-avatar-button { position:relative; width:132px; height:132px; flex:0 0 132px; padding:0; overflow:hidden; border:1px solid rgba(221,153,255,.52); border-radius:22px; background:rgba(35,17,56,.82); cursor:pointer; box-shadow:0 0 30px rgba(193,76,228,.23); }
.main-profile-avatar-button #main-profile-avatar { width:100%; height:100%; object-fit:cover; display:block; transition:transform .2s ease, filter .2s ease; }
.main-profile-avatar-button span { position:absolute; left:8px; right:8px; bottom:8px; padding:5px 3px 4px; border-radius:8px; opacity:0; transform:translateY(7px); color:#f7eaff; background:rgba(8,5,16,.78); border:1px solid rgba(221,145,251,.34); font:1rem 'VT323',monospace; letter-spacing:.13em; transition:opacity .16s ease, transform .16s ease; }
.main-profile-avatar-button:hover #main-profile-avatar { transform:scale(1.04); filter:brightness(.72); }
.main-profile-avatar-button:hover span, .main-profile-avatar-button:focus-visible span { opacity:1; transform:none; }
.main-profile-avatar-input.hidden { display:none; }
.main-profile-about > header { display:flex; align-items:center; justify-content:space-between; padding-right:10px; }
.main-profile-pencil { width:33px; height:33px; border-radius:9px; border:1px solid rgba(205,131,241,.34); background:rgba(73,30,102,.26); color:#e6c8ff; font:1.35rem 'VT323',monospace; cursor:pointer; transition:background .16s ease,border-color .16s ease,box-shadow .16s ease; }
.main-profile-pencil:hover, .main-profile-pencil.active { border-color:rgba(232,166,255,.68); background:rgba(123,46,156,.42); box-shadow:0 0 15px rgba(206,87,239,.18); }
.main-profile-about .main-profile-edit { margin:0; padding:0 13px 14px; border:0; background:transparent; }
.main-profile-account { margin-top:13px; padding-bottom:12px; border:1px solid rgba(171,106,215,.23); border-radius:15px; background:rgba(19,10,31,.6); overflow:hidden; }
.main-profile-account > header { height:45px; display:flex; align-items:center; justify-content:space-between; padding:0 13px; background:linear-gradient(90deg,rgba(80,35,112,.43),rgba(42,19,65,.2)); color:#ecddff; font-size:1.18rem; letter-spacing:.16em; }
.main-profile-account > header small { padding:3px 8px 2px; border-radius:99px; color:#cfbded; border:1px solid rgba(172,139,208,.35); font-size:.85rem; }
.main-profile-email { display:grid; gap:4px; margin:12px 13px 8px; padding:10px; border-radius:10px; border:1px solid rgba(164,116,204,.2); background:rgba(52,25,77,.24); }
.main-profile-email span, .main-profile-account-form span { color:rgba(204,182,235,.68); font-size:.95rem; letter-spacing:.14em; }
.main-profile-email strong { color:#efddff; font-size:1.14rem; font-weight:400; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.main-profile-account-form { display:grid; gap:8px; margin:11px 13px 0; padding-top:11px; border-top:1px solid rgba(255,255,255,.06); }
.main-profile-account-form header { color:rgba(228,205,248,.86); font-size:1.05rem; letter-spacing:.16em; }
.main-profile-account-form label { display:grid; gap:5px; }
.main-profile-account-form input { width:100%; box-sizing:border-box; padding:9px 10px; border-radius:9px; border:1px solid rgba(172,113,219,.32); background:rgba(6,4,13,.49); color:#eee2ff; font:1.15rem 'VT323',monospace; outline:none; }
.main-profile-account-form input:focus { border-color:rgba(221,147,252,.66); box-shadow:0 0 14px rgba(180,75,222,.12); }
.main-profile-account-form button { height:38px; border-radius:9px; border:1px solid rgba(215,137,248,.45); background:linear-gradient(106deg,rgba(91,38,140,.58),rgba(187,55,158,.28)); color:#efe1ff; font:1.08rem 'VT323',monospace; letter-spacing:.13em; cursor:pointer; }
.main-profile-account-form p { min-height:17px; margin:0; color:#84f0ff; font-size:1.02rem; }
@media (max-width:640px) { .main-profile-avatar-button { width:108px; height:108px; flex-basis:108px; } }

/* Profile banner + focused edit polish */
.main-profile-banner { background-size:cover; background-position:center; }
.main-profile-banner-button { position:absolute; inset:0; z-index:1; border:0; background:transparent; cursor:pointer; }
.main-profile-banner-button span { position:absolute; top:16px; right:16px; opacity:0; transform:translateY(-5px); padding:8px 13px; border-radius:10px; border:1px solid rgba(222,150,250,.4); background:rgba(9,5,16,.7); color:#f4e4ff; font:1.05rem 'VT323',monospace; letter-spacing:.15em; transition:opacity .16s ease, transform .16s ease; }
.main-profile-banner:hover .main-profile-banner-button span { opacity:1; transform:none; }
.main-profile-identity, .main-profile-account-toggle { z-index:2; }
.main-profile-account-toggle { position:absolute; right:18px; bottom:18px; height:42px; padding:0 16px; border-radius:11px; border:1px solid rgba(221,145,252,.5); background:rgba(19,10,31,.78); color:#f0dcff; font:1.12rem 'VT323',monospace; letter-spacing:.14em; cursor:pointer; }
.main-profile-account-toggle:hover { background:rgba(97,38,134,.7); box-shadow:0 0 17px rgba(201,86,237,.18); }
.main-profile-bio.hidden { display:none; }
.main-profile-account-dialog { position:fixed; inset:0; z-index:57; display:grid; place-items:center; background:rgba(3,2,8,.7); backdrop-filter:blur(8px); }
.main-profile-account-dialog.hidden { display:none; }
.main-profile-account-sheet { position:relative; width:min(390px,calc(100vw - 30px)); }
.main-profile-account-dialog .main-profile-account { margin:0; background:#10091a; box-shadow:0 25px 65px rgba(0,0,0,.65); }
.main-profile-account-close { position:absolute; top:8px; right:10px; z-index:2; border:0; background:transparent; color:#eddcff; font:2rem 'VT323',monospace; cursor:pointer; }


/* Banner input/click layering and account modal polish */
#main-profile-banner-input { display: none !important; }
.main-profile-banner-button { z-index: 1; }
.main-profile-identity { z-index: 3; pointer-events: none; }
.main-profile-avatar-button, .main-profile-nameblock { pointer-events: auto; }
.main-profile-account-toggle { z-index: 6; pointer-events: auto; isolation: isolate; }
.main-profile-account-dialog { z-index: 80; }
.main-profile-account-sheet { width: min(760px, calc(100vw - 34px)); }
.main-profile-account-dialog .main-profile-account {
  display: grid; grid-template-columns: minmax(245px, .9fr) minmax(310px, 1.15fr);
  grid-template-areas: "head head" "email password" "username password";
  align-items: start; gap: 0 17px; padding: 0 18px 18px;
  border-radius: 21px; border: 1px solid rgba(203,130,241,.35);
  background: radial-gradient(circle at 12% 2%, rgba(145,61,197,.25), transparent 35%), rgba(12,7,21,.98);
  box-shadow: 0 30px 95px rgba(0,0,0,.78), inset 0 0 0 1px rgba(237,190,255,.035);
}
.main-profile-account-dialog .main-profile-account > header {
  grid-area: head; margin: 0 -18px 17px; height: 58px; padding: 0 22px;
  border-bottom: 1px solid rgba(205,135,239,.22);
  background: linear-gradient(90deg, rgba(92,38,127,.52), rgba(29,13,46,.18));
  font-size: 1.34rem;
}
.main-profile-account-dialog .main-profile-email {
  grid-area: email; margin: 0 0 12px; min-height: 66px; align-content: center;
  border-color: rgba(194,129,231,.28); background: rgba(57,25,84,.28);
}
.main-profile-account-dialog .main-profile-account-form { margin: 0; padding-top: 0; border: 0; }
.main-profile-account-dialog .main-profile-account-form:not(.password) { grid-area: username; }
.main-profile-account-dialog .main-profile-account-form.password {
  grid-area: password; margin: 0; padding: 15px; border-radius: 13px;
  border: 1px solid rgba(178,112,218,.2); background: rgba(28,13,43,.52);
}
.main-profile-account-dialog .main-profile-account-form.password header { margin: 0 0 6px; color: #ead7ff; }
.main-profile-account-dialog .main-profile-account-form input { height: 43px; background: rgba(6,3,13,.72); }
.main-profile-account-dialog .main-profile-account-form button { height: 44px; margin-top: 4px; }
.main-profile-account-close { top: 12px; right: 17px; }
@media (max-width: 680px) {
  .main-profile-account-dialog .main-profile-account { display: block; padding-bottom: 17px; }
  .main-profile-account-dialog .main-profile-account > header { margin-bottom: 14px; }
  .main-profile-account-dialog .main-profile-email, .main-profile-account-dialog .main-profile-account-form { margin-bottom: 12px; }
}

/* Non-destructive banner crop editor: preserves animated GIF files */
.main-profile-banner-image { position:absolute; inset:0; z-index:0; width:100%; height:100%; object-fit:cover; object-position:50% 50%; transform-origin:center center; transition:object-position .18s ease, transform .18s ease; }
.main-profile-banner-image.hidden { display:none; }
.main-banner-crop { position:fixed; inset:0; z-index:91; display:grid; place-items:center; padding:18px; background:rgba(3,2,8,.82); backdrop-filter:blur(11px); }
.main-banner-crop.hidden { display:none; }
.main-banner-crop-sheet { width:min(820px,calc(100vw - 34px)); padding:20px 21px; border-radius:23px; border:1px solid rgba(207,139,249,.42); background:#100819; box-shadow:0 29px 84px rgba(0,0,0,.73),0 0 25px rgba(181,72,228,.15); }
.main-banner-crop-sheet header { display:flex; justify-content:space-between; align-items:start; margin-bottom:16px; }
.main-banner-crop-sheet header p { margin:0 0 3px; color:#ad91ef; letter-spacing:.22em; }
.main-banner-crop-sheet header h2 { margin:0; color:#f2e3ff; font-size:2rem; font-weight:400; }
.main-banner-crop-sheet header button { border:0; background:transparent; color:#ddcaf0; font:2.1rem 'VT323',monospace; cursor:pointer; }
.main-banner-crop-stage { position:relative; height:min(280px,38vw); min-height:172px; overflow:hidden; border-radius:15px; border:1px solid rgba(201,131,245,.36); background:#070410; cursor:grab; touch-action:none; }
.main-banner-crop-stage:active { cursor:grabbing; }
.main-banner-crop-stage img { width:100%; height:100%; object-fit:cover; object-position:50% 50%; transform-origin:center; display:block; pointer-events:none; }
.main-banner-crop-stage span { position:absolute; inset:12px; border:1px dashed rgba(255,221,255,.68); border-radius:10px; pointer-events:none; }
.main-banner-crop-zoom { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:18px; margin:15px 0 8px; color:rgba(207,185,237,.74); letter-spacing:.16em; }
.main-banner-crop-zoom input { accent-color:#bd62eb; }
.main-banner-crop-sheet > p { margin:10px 0 15px; text-align:center; color:rgba(212,190,239,.67); font-size:1.1rem; }
.main-banner-crop-sheet footer { display:flex; justify-content:flex-end; gap:9px; }
.main-banner-crop-sheet footer button { height:45px; min-width:155px; border-radius:11px; border:1px solid rgba(177,118,224,.37); background:rgba(48,26,72,.58); color:#ebddff; font:1.15rem 'VT323',monospace; letter-spacing:.12em; cursor:pointer; }
.main-banner-crop-sheet footer button:last-child { border-color:rgba(219,145,252,.57); background:linear-gradient(107deg,rgba(105,43,159,.62),rgba(207,59,171,.35)); }

/* Banner readability: keep player identity legible over bright photos/GIFs. */
.main-profile-nameblock {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  max-width: min(700px, calc(100% - 130px));
  padding: 12px 18px 13px;
  border-radius: 15px;
  background: linear-gradient(100deg, rgba(8,5,15,.78), rgba(8,5,15,.48));
  border: 1px solid rgba(218,157,251,.14);
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
  backdrop-filter: blur(5px);
}
.main-profile-kicker, .main-profile-nameblock h2, .main-profile-role { position: relative; z-index: 1; }


/* V!be$ cursor + osu!-style trail ------------------------------------------ */
@media (pointer: fine) {
  body.has-vibe-cursor, body.has-vibe-cursor * { cursor: none !important; }
  .vibe-cursor-ui {
    position: fixed; left: -18px; top: -18px; width: 34px; height: 34px;
    z-index: 10000; pointer-events: none; opacity: 0;
    transition: opacity .14s ease, filter .15s ease;
    will-change: transform;
  }
  .vibe-cursor-ui.visible { opacity: 1; }
  .vibe-cursor-ui::before {
    content: ''; position: absolute; inset: 5px; border-radius: 50%;
    border: 2px solid rgba(242, 220, 255, .96);
    background: radial-gradient(circle, rgba(248,235,255,.84) 0 17%, rgba(169,87,243,.47) 18% 49%, rgba(111,39,173,.1) 50%);
    box-shadow: 0 0 9px rgba(222,140,255,.9), 0 0 22px rgba(145,69,230,.58);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  }
  .vibe-cursor-ui::after {
    content: ''; position: absolute; left: 15px; top: 15px; width: 4px; height: 4px;
    border-radius: 50%; background: #fff; box-shadow: 0 0 8px #f2d6ff;
  }
  .vibe-cursor-ui.interactive::before { transform: scale(1.18); border-color: #fff; box-shadow: 0 0 13px rgba(239,183,255,.95), 0 0 27px rgba(171,64,247,.66); }
  .vibe-cursor-ui.pressed::before { transform: scale(.82); }
}

/* Likes received in the full-page profile -------------------------------- */
.main-profile-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.main-profile-stats .likes-received strong { color: #ff82cf; text-shadow: 0 0 12px rgba(255, 77, 184, .24); }
@media (max-width: 980px) { .main-profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Main-menu profile stats compact layout fix ----------------------------- */
/* Keep the sidebar cards readable after adding LIKES RICEVUTI. */
.main-profile-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.main-profile-stats div {
  min-height: 82px;
  height: auto;
  padding: 11px 13px;
}
.main-profile-stats span {
  line-height: 1.14;
}
@media (max-width: 520px) {
  .main-profile-stats { grid-template-columns: 1fr 1fr; }
}

/* Guitar Stage preview support retained while restoring OTP/profile menu handlers. */
.profile-note.guitar {
  width: 38px;
  height: 38px;
  left: calc(50% - 19px);
  top: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 28%, rgba(255,255,255,.48) 0 12%, transparent 13%), #43e36d;
  border: 2px solid rgba(255,238,197,.86);
  box-shadow: 0 0 19px rgba(67,227,109,.6);
}
.theme-preview.guitar { background: linear-gradient(180deg,#25150f,#070609); border-color: rgba(255,201,104,.47); }
.theme-preview.guitar i { background: rgba(0,0,0,.16); border-color: rgba(224,166,85,.22); position: relative; }
.theme-preview.guitar i::after { content:''; position:absolute; left:50%; bottom:10%; transform:translateX(-50%); width:14px; height:14px; border-radius:50%; background:#43e36d; box-shadow:0 0 9px #43e36d; }
.theme-preview.guitar i:nth-child(2)::after { background:#eb3b54; box-shadow:0 0 9px #eb3b54; }
.theme-preview.guitar i:nth-child(3)::after { background:#f0d34a; box-shadow:0 0 9px #f0d34a; }
.theme-preview.guitar i:nth-child(4)::after { background:#438ff5; box-shadow:0 0 9px #438ff5; }
.theme-preview.guitar i:nth-child(5)::after { background:#ff8739; box-shadow:0 0 9px #ff8739; }
.theme-preview.guitar i:nth-child(6)::after { background:#cb64ff; box-shadow:0 0 9px #cb64ff; }
@media (max-width: 760px) {
  .profile-note.guitar { width:32px; height:32px; left:calc(50% - 16px); top:5px; }
}

/* Account deletion OTP danger zone */
.main-profile-account-dialog .main-profile-danger-zone { grid-area: danger; margin-top: 17px; padding: 14px 15px 15px; border-radius: 13px; border: 1px solid rgba(232,72,101,.32); background: linear-gradient(115deg, rgba(70,16,32,.54), rgba(27,8,20,.58)); }
.main-profile-account-dialog .main-profile-account { grid-template-areas: "head head" "email password" "username password" "danger danger"; }
.main-profile-danger-zone header { color:#ff94ac; font-size:1.18rem; letter-spacing:.18em; }
.main-profile-danger-zone > p { margin:7px 0 12px; color:rgba(242,194,209,.76); font-size:1.05rem; }
.main-profile-danger-zone button { height:42px; padding:0 15px; border-radius:9px; color:#ffe7ee; font:1.08rem 'VT323',monospace; letter-spacing:.14em; cursor:pointer; }
.main-profile-danger-zone button.danger { border:1px solid rgba(244,92,119,.55); background:linear-gradient(105deg,rgba(137,27,53,.72),rgba(69,11,30,.68)); }
.main-profile-danger-zone button.danger:hover { box-shadow:0 0 18px rgba(230,51,90,.25); background:linear-gradient(105deg,rgba(163,32,63,.78),rgba(82,15,35,.72)); }
.main-profile-delete-otp { margin-top:13px; padding-top:13px; border-top:1px solid rgba(242,90,116,.2); display:grid; gap:9px; }
.main-profile-delete-otp.hidden { display:none; }
.main-profile-delete-otp .otp-hint { margin:0; color:#f4ced7; font-size:1.05rem; }
.main-profile-delete-otp input { width:min(230px,100%); height:44px; box-sizing:border-box; padding:8px 13px; border-radius:9px; border:1px solid rgba(241,92,119,.45); background:rgba(8,3,10,.62); color:#ffe8ef; font:1.35rem 'VT323',monospace; letter-spacing:.3em; outline:none; }
.main-profile-delete-actions { display:flex; flex-wrap:wrap; gap:9px; }
.main-profile-delete-actions button:not(.danger) { border:1px solid rgba(181,137,210,.35); background:rgba(31,15,45,.66); color:#e8daf6; }
#main-profile-delete-message { min-height:17px; margin:0; color:#ffabbc; font-size:1.02rem; }

/* Opera GX / Chromium range compatibility: explicit V!be$ sliders without changing layout. */
input[type="range"]:not(#bgm-slider) {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 18px;
  padding: 0;
  margin: 4px 0 0;
  background: transparent;
  cursor: pointer;
  outline: none;
}
input[type="range"]:not(#bgm-slider)::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  border: 1px solid rgba(183, 145, 255, .25);
  background: linear-gradient(90deg, rgba(108, 67, 177, .58), rgba(167, 139, 250, .36));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .38), 0 0 9px rgba(167, 139, 250, .13);
}
input[type="range"]:not(#bgm-slider)::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 2px solid rgba(249, 242, 255, .95);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 14%, #d5bcff 15% 35%, #a978f1 36% 100%);
  box-shadow: 0 0 0 2px rgba(103, 63, 160, .38), 0 0 13px rgba(167, 139, 250, .56);
}
input[type="range"]:not(#bgm-slider)::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  border: 1px solid rgba(183, 145, 255, .25);
  background: rgba(72, 47, 104, .7);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .38);
}
input[type="range"]:not(#bgm-slider)::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7650ad, #b18cf6);
}
input[type="range"]:not(#bgm-slider)::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(249, 242, 255, .95);
  border-radius: 50%;
  background: #a978f1;
  box-shadow: 0 0 0 2px rgba(103, 63, 160, .38), 0 0 13px rgba(167, 139, 250, .56);
}
input[type="range"]:not(#bgm-slider):focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(232, 218, 255, .36), 0 0 17px rgba(167, 139, 250, .74);
}
input[type="range"]:not(#bgm-slider):focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(232, 218, 255, .36), 0 0 17px rgba(167, 139, 250, .74);
}

/* 🌐 Language switcher — explicit event-driven translation, no DOM observer. */
.language-switch {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 3200;
  min-width: 86px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(167, 139, 250, 0.48);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(12, 8, 23, 0.86);
  color: var(--text);
  font-family: 'VT323', monospace;
  font-size: 1.35rem;
  letter-spacing: 2px;
  box-shadow: 0 0 16px rgba(98, 65, 168, 0.2), inset 0 0 12px rgba(167, 139, 250, 0.04);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.language-switch:hover {
  border-color: rgba(216, 180, 254, 0.9);
  box-shadow: 0 0 22px rgba(167, 139, 250, 0.38), inset 0 0 16px rgba(167, 139, 250, 0.08);
  transform: translateY(-1px);
}
.language-switch:active { transform: translateY(1px); }
#language-flag { font-size: 1.15rem; line-height: 1; letter-spacing: 0; }
#language-code { line-height: 1; }

/* Settings visual preview alignment ------------------------------------------------
   Both cosmetic selectors use the same centred carousel geometry. This prevents
   the compact lane-theme row from appearing shifted or compressed under the note skin. */
.profile-preview-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-content: unset;
  padding: 12px;
}
.profile-preview-pane > .profile-kicker,
.profile-lane-theme .profile-kicker {
  margin: 0;
  flex: none;
}
.profile-skin-carousel,
.profile-theme-carousel {
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 10px;
  padding: 8px;
}
.profile-skin-carousel {
  height: 126px;
  min-height: 126px;
}
.profile-skin-stage {
  height: 100%;
  display: grid;
  grid-template-rows: 58px auto auto;
  justify-items: center;
  align-items: center;
  gap: 3px;
}
.profile-lanes {
  width: min(250px, 100%);
  height: 56px;
}
.profile-note {
  top: 18px;
}
.profile-lane-theme {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
  min-height: 0;
}
.profile-theme-carousel {
  height: 76px;
  min-height: 76px;
}
.profile-theme-stage {
  height: 100%;
  display: grid;
  grid-template-rows: 34px auto auto;
  justify-items: center;
  align-items: center;
  gap: 1px;
}
.theme-preview {
  width: min(174px, 100%);
  height: 34px;
}
.profile-skin-arrow {
  height: 62px;
  align-self: center;
}
@media (max-height: 700px) and (min-width: 721px) {
  .profile-preview-pane { padding: 8px; gap: 5px; }
  .profile-skin-carousel { height: 106px; min-height: 106px; padding: 6px; }
  .profile-skin-stage { grid-template-rows: 48px auto auto; }
  .profile-lanes { height: 48px; }
  .profile-note { top: 15px; }
  .profile-theme-carousel { height: 66px; min-height: 66px; padding: 5px; }
  .profile-theme-stage { grid-template-rows: 28px auto auto; }
  .theme-preview { height: 28px; }
  .profile-skin-arrow { height: 54px; }
}

/* Cosmetics carousel alignment hotfix: keep controls centred and text inside card */
.profile-theme-carousel {
  height: 104px;
  min-height: 104px;
  padding: 8px;
  align-items: center;
}
.profile-theme-carousel .profile-skin-arrow,
.profile-skin-carousel .profile-skin-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  padding: 0;
  line-height: 1;
}
.profile-theme-carousel .profile-skin-arrow {
  height: 62px;
}
.profile-theme-stage {
  min-width: 0;
  height: 82px;
  align-self: center;
  display: grid;
  grid-template-rows: 36px 24px 18px;
  justify-items: center;
  align-items: center;
  gap: 2px;
}
.profile-theme-stage strong,
.profile-theme-stage small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
  margin: 0;
}
.profile-theme-stage strong {
  font-size: 1.22rem;
}
.profile-theme-stage small {
  font-size: .94rem;
}
.profile-lane-theme {
  padding-bottom: 2px;
}
@media (max-height: 700px) and (min-width: 721px) {
  .profile-theme-carousel {
    height: 91px;
    min-height: 91px;
    padding: 6px;
  }
  .profile-theme-stage {
    height: 75px;
    grid-template-rows: 30px 23px 17px;
  }
  .profile-theme-carousel .profile-skin-arrow {
    height: 54px;
  }
}

/* SOCIAL V1 // friends and blocked users on the full-page profile */
.main-profile-social { padding:14px; display:grid; gap:12px; }
.main-social-group { display:grid; gap:7px; }
.main-social-group > h3 { margin:0; color:rgba(206,184,235,.7); letter-spacing:.13em; font-size:1rem; font-weight:400; }
.main-social-empty { margin:0; padding:10px 12px; border:1px dashed rgba(152,106,198,.26); border-radius:10px; color:rgba(196,180,218,.6); font-size:1.08rem; letter-spacing:.07em; }
.main-social-row { display:flex; align-items:center; gap:9px; padding:8px 9px; border:1px solid rgba(147,93,196,.26); background:rgba(19,10,34,.54); border-radius:10px; }
.main-social-avatar { width:32px; height:32px; border-radius:50%; object-fit:cover; border:1px solid rgba(195,135,242,.36); }
.main-social-copy { min-width:0; flex:1; display:grid; gap:2px; }
.main-social-copy strong { color:#eee0ff; font-size:1.12rem; letter-spacing:.08em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.main-social-status { color:rgba(186,173,211,.72); font-size:.92rem; letter-spacing:.12em; }
.main-social-status.online { color:#74efba; } .main-social-status.playing { color:#79d9ff; }
.main-social-actions { display:flex; gap:5px; }
.main-social-actions button { padding:5px 8px; min-width:auto; border:1px solid rgba(163,103,213,.44); border-radius:7px; background:rgba(57,29,79,.58); color:#eadbff; font:inherit; font-size:.92rem; letter-spacing:.08em; cursor:pointer; }
.main-social-actions button.danger { border-color:rgba(229,87,117,.42); color:#f6b0c3; }

/* SOCIAL V2 // friends moved from profile feed into a banner modal -------- */
.main-profile-banner-tools {
  position: absolute; right: 18px; bottom: 18px; z-index: 7;
  display: flex; align-items: center; gap: 9px; pointer-events: auto;
}
.main-profile-banner-tools .main-profile-account-toggle,
.main-profile-friends-toggle {
  position: static; height: 42px; padding: 0 16px; border-radius: 11px;
  border: 1px solid rgba(221,145,252,.5); background: rgba(19,10,31,.78);
  color: #f0dcff; font: 1.12rem 'VT323',monospace; letter-spacing: .14em; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.main-profile-friends-toggle:hover,
.main-profile-banner-tools .main-profile-account-toggle:hover {
  background: rgba(97,38,134,.7); box-shadow: 0 0 17px rgba(201,86,237,.18);
}
.main-profile-friends-toggle em,
.main-profile-social-tabs em {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e355bc; color: #fff; font-style: normal; font-size: .98rem;
  letter-spacing: .04em; box-shadow: 0 0 13px rgba(241,74,190,.42);
}
.main-profile-friends-toggle em.hidden,
.main-profile-social-tabs em.hidden { display: none; }
.main-profile-social-dialog {
  position: fixed; inset: 0; z-index: 83; display: grid; place-items: center;
  padding: 18px; background: rgba(3,2,8,.72); backdrop-filter: blur(9px);
}
.main-profile-social-dialog.hidden { display: none; }
.main-profile-social-sheet {
  width: min(760px, calc(100vw - 34px)); max-height: min(680px, calc(100dvh - 36px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 21px;
  border: 1px solid rgba(203,130,241,.35);
  background: radial-gradient(circle at 12% 2%, rgba(145,61,197,.25), transparent 35%), rgba(12,7,21,.99);
  box-shadow: 0 30px 95px rgba(0,0,0,.78), inset 0 0 0 1px rgba(237,190,255,.035);
}
.main-profile-social-header {
  min-height: 70px; padding: 13px 20px 12px 23px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(205,135,239,.22); background: linear-gradient(90deg, rgba(92,38,127,.52), rgba(29,13,46,.18));
}
.main-profile-social-header p { margin: 0; color: rgba(205,178,233,.6); letter-spacing: .2em; font-size: 1rem; }
.main-profile-social-header h2 { margin: 3px 0 0; color: #f0deff; font-size: 2rem; font-weight: 400; letter-spacing: .15em; }
.main-profile-social-header button { border: 0; background: transparent; color: #eddcff; font: 2rem 'VT323', monospace; cursor: pointer; }
.main-profile-social-tabs {
  display: flex; align-items: stretch; gap: 6px; padding: 11px 14px 0;
}
.main-profile-social-tabs button {
  flex: 1; min-height: 47px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid rgba(162,96,210,.25); border-radius: 11px 11px 0 0; background: rgba(34,15,50,.34);
  color: rgba(214,192,237,.7); font: 1.13rem 'VT323', monospace; letter-spacing: .14em; cursor: pointer;
}
.main-profile-social-tabs button.active { color: #f5e8ff; border-color: rgba(208,133,248,.49); background: rgba(80,33,110,.58); box-shadow: inset 0 -2px 0 #d982ff; }
.main-profile-social-dialog .main-profile-social { padding: 17px; min-height: 210px; overflow-y: auto; display: grid; align-content: start; gap: 9px; }
@media (max-width: 700px) {
  .main-profile-banner-tools { left: 18px; right: 18px; bottom: 12px; flex-wrap: wrap; }
  .main-profile-banner { min-height: 375px; }
  .main-profile-identity { bottom: 72px; }
}


/* SOCIAL/profile navigation and long artist metadata safety ------------------ */
.main-social-user { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.main-social-user:hover .main-social-copy strong { color: #fff; text-shadow: 0 0 10px rgba(211,139,255,.28); }
.main-profile-map-meta { display: flex !important; align-items: center; gap: 7px; min-width: 0; overflow: hidden; }
.main-profile-artist { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-profile-likes { flex: none; white-space: nowrap; color: #efadd6; }

/* Main-menu messages ----------------------------------------------------- */
.menu-messages-btn { position: relative; }
.menu-messages-btn em { position:absolute; top:-7px; right:-8px; min-width:21px; height:21px; display:grid; place-items:center; padding:0 6px; border-radius:99px; background:#d6509d; color:#fff; font-style:normal; font-size:1rem; line-height:1; }
.menu-messages-btn em.hidden { display:none; }
.main-messages-dialog { position:fixed; inset:0; z-index:140; display:grid; place-items:center; padding:30px; background:rgba(5,3,10,.78); backdrop-filter:blur(9px); }
.main-messages-dialog.hidden { display:none; }
.main-messages-sheet { width:min(940px,94vw); height:min(640px,82vh); border:1px solid rgba(163,105,210,.42); border-radius:18px; background:#10091d; box-shadow:0 22px 64px rgba(0,0,0,.48); display:grid; grid-template-rows:auto 1fr; overflow:hidden; }
.main-messages-header { display:flex; align-items:center; justify-content:space-between; padding:17px 22px; border-bottom:1px solid rgba(163,105,210,.22); }
.main-messages-header p { margin:0 0 4px; color:rgba(204,184,255,.62); letter-spacing:.25em; font-size:1.15rem; }
.main-messages-header h2 { margin:0; font-size:2rem; font-weight:400; letter-spacing:.2em; }
.main-messages-header button { border:0; background:none; color:rgba(204,184,255,.62); font:inherit; font-size:2.3rem; cursor:pointer; }
.main-messages-layout { min-height:0; display:grid; grid-template-columns:290px minmax(0,1fr); }
.main-message-threads { min-height:0; overflow:auto; padding:10px; border-right:1px solid rgba(163,105,210,.2); }
.main-message-thread { width:100%; display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:9px; padding:9px; margin-bottom:7px; border:1px solid transparent; border-radius:11px; background:rgba(41,22,60,.42); color:inherit; text-align:left; font:inherit; cursor:pointer; }
.main-message-thread.active, .main-message-thread:hover { border-color:rgba(168,111,221,.48); background:rgba(67,36,99,.52); }
.main-message-thread img, .main-message-peer img { width:42px; height:42px; border-radius:50%; object-fit:cover; }
.main-message-thread span { min-width:0; display:grid; gap:2px; }
.main-message-thread strong, .main-message-thread small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.main-message-thread strong { font-size:1.35rem; font-weight:400; }
.main-message-thread small { color:rgba(204,184,255,.62); font-size:1.08rem; }
.main-message-thread em { min-width:20px; height:20px; display:grid; place-items:center; padding:0 5px; border-radius:99px; background:#d6509d; color:#fff; font-style:normal; }
.main-message-conversation { min-height:0; display:grid; grid-template-rows:auto 1fr auto; }
.main-message-peer { display:flex; align-items:center; gap:10px; padding:12px 17px; border-bottom:1px solid rgba(163,105,210,.18); font-size:1.5rem; letter-spacing:.1em; }
.main-message-list { min-height:0; overflow:auto; display:flex; flex-direction:column; gap:8px; padding:18px; }
.main-messages-empty { color:rgba(204,184,255,.62); margin:auto; text-align:center; font-size:1.3rem; letter-spacing:.06em; }
.main-message-bubble { position:relative; max-width:min(72%,430px); margin:0; padding:10px 13px; border-radius:12px; font-size:1.32rem; line-height:1.35; word-break:break-word; letter-spacing:.04em; }
.main-message-text { white-space:pre-wrap; }
.main-message-bubble.mine { margin-left:auto; background:rgba(121,60,171,.65); border:1px solid rgba(198,136,255,.35); }
.main-message-bubble.theirs { background:rgba(43,25,62,.82); border:1px solid rgba(147,99,192,.24); }
.main-message-bubble.mine:not(.deleted) { padding-right:58px; }
.main-message-bubble.deleted { color:rgba(204,187,220,.66); font-style:italic; background:rgba(48,35,60,.38); }
.main-message-edited { display:block; margin-top:4px; color:rgba(222,199,240,.62); font-size:1.05rem; letter-spacing:.08em; }
.main-message-actions { position:absolute; right:7px; top:7px; display:flex; gap:4px; opacity:0; transition:opacity .14s ease; }
.main-message-bubble.mine:hover .main-message-actions { opacity:1; }
.main-message-actions button { width:23px; height:23px; border:1px solid rgba(206,145,245,.24); border-radius:6px; background:rgba(30,15,46,.48); color:rgba(241,222,255,.8); font:inherit; line-height:1; cursor:pointer; }
.main-message-composer { display:flex; align-items:flex-end; gap:9px; padding:13px; border-top:1px solid rgba(163,105,210,.18); }
.main-message-composer textarea { flex:1; min-width:0; height:48px; max-height:116px; resize:none; overflow-y:auto; border:1px solid rgba(155,105,207,.34); border-radius:9px; background:rgba(10,5,18,.6); padding:12px; color:var(--text); font:1.38rem 'VT323', monospace; line-height:1.32; outline:none; }
.main-message-composer textarea:focus, .main-message-edit-form textarea:focus { border-color:var(--accent); box-shadow:0 0 12px rgba(167,139,250,.15); }
.main-message-composer button { min-height:48px; padding:0 22px; border:1px solid rgba(182,112,232,.55); border-radius:9px; background:rgba(77,38,111,.7); color:var(--text); font:1.35rem 'VT323', monospace; letter-spacing:.14em; cursor:pointer; }
.main-message-edit-form { display:grid; gap:8px; }
.main-message-edit-form textarea { min-width:240px; width:100%; max-width:100%; min-height:52px; max-height:150px; resize:none; overflow-y:auto; padding:8px 10px; border:1px solid rgba(210,143,249,.45); border-radius:7px; background:rgba(10,5,18,.72); color:var(--text); font:1.28rem 'VT323', monospace; line-height:1.32; outline:none; }
.main-message-edit-form div { display:flex; justify-content:flex-end; gap:6px; }
.main-message-edit-form button { border:1px solid rgba(182,112,232,.4); border-radius:6px; padding:5px 10px; background:rgba(61,31,90,.6); color:var(--text); font:1.2rem 'VT323', monospace; cursor:pointer; }
@media (max-width:760px) { .main-messages-layout { grid-template-columns:1fr; grid-template-rows:180px 1fr; } .main-message-threads { border-right:0; border-bottom:1px solid rgba(163,105,210,.2); } }

/* Social v3: message privacy and requests */
.main-message-sidebar { min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); border-right:1px solid rgba(163,105,210,.2); }
.main-message-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:10px; border-bottom:1px solid rgba(163,105,210,.2); }
.main-message-tabs button { position:relative; min-height:35px; border:1px solid rgba(163,105,210,.24); border-radius:8px; background:rgba(29,15,46,.52); color:rgba(204,184,255,.65); font:1.05rem 'VT323',monospace; letter-spacing:.12em; cursor:pointer; }
.main-message-tabs button.active { color:#f4e7ff; border-color:rgba(203,123,246,.55); background:rgba(105,43,152,.42); }
.main-message-tabs em { position:absolute; top:-7px; right:-5px; min-width:19px; height:19px; display:grid; place-items:center; padding:0 5px; border-radius:99px; background:#df569f; color:#fff; font-style:normal; font-size:.82rem; }
.main-message-tabs em.hidden, .main-message-requests.hidden { display:none; }
.main-message-threads, .main-message-requests { min-height:0; overflow:auto; padding:10px; border-right:0; }
.main-message-request { display:grid; grid-template-columns:40px minmax(0,1fr); gap:9px; align-items:center; margin-bottom:8px; padding:10px; border:1px solid rgba(163,105,210,.2); border-radius:10px; background:rgba(30,16,47,.46); }
.main-message-request img { width:40px; height:40px; object-fit:cover; border-radius:8px; }
.main-message-request strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.main-message-request div { grid-column:1 / -1; display:flex; gap:7px; }
.main-message-request button { flex:1; min-height:31px; border:1px solid rgba(175,104,215,.35); border-radius:7px; background:rgba(47,24,68,.7); color:#f0e3ff; font:1rem 'VT323',monospace; cursor:pointer; }
.main-profile-message-privacy { grid-area:privacy; display:grid; gap:8px; padding:13px 15px; border:1px solid rgba(171,106,215,.23); border-radius:12px; background:rgba(12,7,22,.48); }
.main-profile-message-privacy label { display:grid; gap:6px; }
.main-profile-message-privacy span { color:rgba(204,182,235,.68); font-size:.95rem; letter-spacing:.14em; }
.main-profile-message-privacy select { height:43px; padding:0 10px; border-radius:9px; border:1px solid rgba(172,113,219,.32); background:rgba(6,3,13,.72); color:#eee2ff; font:1.12rem 'VT323',monospace; outline:none; }
.main-profile-message-privacy button { height:40px; border-radius:9px; border:1px solid rgba(215,137,248,.45); background:linear-gradient(106deg,rgba(91,38,140,.58),rgba(187,55,158,.28)); color:#efe1ff; font:1.08rem 'VT323',monospace; letter-spacing:.13em; cursor:pointer; }
.main-profile-message-privacy p { min-height:17px; margin:0; color:#84f0ff; font-size:1rem; }
.main-profile-account-dialog .main-profile-account { grid-template-areas:"head head" "email password" "privacy password" "username password" "danger danger"; }
@media (max-width:760px) { .main-message-sidebar { border-right:0; border-bottom:1px solid rgba(163,105,210,.2); } }


/* Social v3 hotfix: styled privacy menu, separate request tab, profile links */
.main-message-threads.hidden { display: none; }
.main-profile-message-privacy select {
  appearance: none;
  padding: 0 38px 0 13px;
  background-color: rgba(8,4,16,.88);
  background-image: linear-gradient(45deg, transparent 50%, #cf8dff 50%), linear-gradient(135deg, #cf8dff 50%, transparent 50%);
  background-position: calc(100% - 17px) 18px, calc(100% - 11px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(230,175,255,.05);
}
.main-profile-message-privacy select:hover,
.main-profile-message-privacy select:focus { border-color: rgba(213,132,248,.62); box-shadow: 0 0 13px rgba(168,74,228,.17); }
.main-message-peer-profile { padding: 0; border: 0; background: transparent; color: #f3e5ff; font: inherit; letter-spacing: inherit; cursor: pointer; }
.main-message-peer-profile:hover { color: #fff; text-shadow: 0 0 13px rgba(205,120,254,.38); }
.main-social-add-form { display:grid; gap:7px; margin:0 0 13px; padding:12px; border:1px solid rgba(178,111,224,.28); border-radius:11px; background:rgba(27,13,42,.5); }
.main-social-add-form label { color:rgba(218,193,242,.72); letter-spacing:.14em; font-size:1rem; }
.main-social-add-form div { display:flex; gap:7px; }
.main-social-add-form input { flex:1; min-width:0; height:38px; padding:0 11px; border:1px solid rgba(172,113,219,.34); border-radius:8px; background:rgba(7,4,14,.7); color:#efe2ff; font:1.15rem 'VT323',monospace; outline:none; }
.main-social-add-form input:focus { border-color:rgba(210,129,248,.6); box-shadow:0 0 11px rgba(176,79,225,.16); }
.main-social-add-form button { min-width:136px; border:1px solid rgba(203,126,244,.46); border-radius:8px; background:linear-gradient(106deg,rgba(91,38,140,.66),rgba(187,55,158,.28)); color:#f1e3ff; font:1.03rem 'VT323',monospace; letter-spacing:.08em; cursor:pointer; }
.main-social-add-form p { min-height:16px; margin:0; color:#80efff; font-size:1rem; letter-spacing:.06em; }

/* Social v4: pending friends and Instagram-style message requests */
.main-message-request-group { display:grid; gap:8px; margin-bottom:16px; }
.main-message-request-group > h3 { margin:0; color:rgba(206,184,235,.72); letter-spacing:.14em; font:1rem 'VT323', monospace; font-weight:400; }
.main-message-request { display:block; }
.main-message-request-peer { width:100%; display:grid; grid-template-columns:40px minmax(0,1fr); gap:9px; align-items:center; border:0; padding:0; margin:0 0 9px; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.main-message-request-peer img { width:40px; height:40px; object-fit:cover; border-radius:8px; }
.main-message-request-peer span { display:grid; min-width:0; gap:2px; }
.main-message-request-peer strong, .main-message-request-peer small { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.main-message-request-peer small { color:rgba(199,183,222,.72); font:1rem 'VT323',monospace; letter-spacing:.05em; }
.main-message-request-waiting { flex:1; color:rgba(211,193,232,.82); align-content:center; font:1rem 'VT323',monospace; letter-spacing:.1em; }
.main-messages-request-notice { margin:10px auto 2px; padding:8px 12px; max-width:88%; border:1px dashed rgba(190,129,234,.32); border-radius:8px; color:rgba(211,193,232,.82); text-align:center; font:1.02rem 'VT323',monospace; letter-spacing:.05em; }
