:root {
  --preview-pink: #ff3cac;
  --preview-orange: #ff8a24;
  --preview-cyan: #35d7e7;
  --preview-yellow: #ffd766;
  --preview-violet: #9b6cff;
  --preview-ink: #09090d;
  --preview-panel: #15151d;
  --preview-line: rgba(255, 255, 255, 0.13);
}

body.app-v2-boot .app-bottom-nav {
  visibility: hidden;
  opacity: 0;
}

body.app-v2-boot #hubHomeView > :not(.app-v2-launch) {
  visibility: hidden;
}

.app-v2-launch {
  display: none;
}

body.app-v2-boot .app-v2-launch {
  display: grid;
  min-height: calc(100dvh - 76px);
  place-content: center;
  justify-items: center;
  gap: 13px;
  color: #fff;
  text-align: center;
}

.app-v2-launch > img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
}

.app-v2-launch > strong {
  font-size: 1rem;
  font-weight: 900;
}

.app-v2-launch > span {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 12px;
}

.app-v2-launch > span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--preview-orange);
  animation: app-v2-launch-pulse 900ms ease-in-out infinite;
}

.app-v2-launch > span i:nth-child(2) { animation-delay: 120ms; }
.app-v2-launch > span i:nth-child(3) { animation-delay: 240ms; }

@keyframes app-v2-launch-pulse {
  50% { opacity: 0.28; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .app-v2-launch > span i { animation: none; }
}

.hub-v2-dashboard[hidden],
body:not(.app-v2-preview) :is(.hub-preview-passport, .hub-preview-missions-view, .hub-v2-games) {
  display: none !important;
}

body.app-v2-preview {
  background: var(--preview-ink);
}

body.app-v2-preview .social-app {
  background-color: var(--preview-ink);
  background-image:
    linear-gradient(rgba(255, 60, 172, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 215, 231, 0.025) 1px, transparent 1px);
  background-size: 46px 46px;
}

body.app-v2-preview .app-header {
  border-bottom-color: rgba(255, 138, 36, 0.35);
  background: rgba(9, 9, 13, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

body.app-v2-preview .app-brand img {
  filter: drop-shadow(0 0 10px rgba(255, 60, 172, 0.3));
}

body.app-v2-preview .app-brand small {
  color: var(--preview-orange);
  font-weight: 800;
}

body.app-v2-preview .hub-home-hero,
body.app-v2-preview #hubKafmillionTeaser,
body.app-v2-preview .hub-community-suite-grid [data-kqm-entry] {
  display: none !important;
}

body.app-v2-preview #hubHomeView > :is(#hubLiveTeaser, #hubLiveNowTeaser, #hubHomeGrid, .hub-community-suite),
body.app-v2-preview #hubCustomizeHome {
  display: none !important;
}

body.app-v2-preview :is(.hub-home-today, .hub-daily-kafmusic, .hub-featured-track, .hub-home-grid > *, .hub-community-suite-grid > *) {
  border-color: var(--preview-line);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

body.app-v2-preview .hub-section-heading small,
body.app-v2-preview .hub-home-today small {
  color: var(--preview-cyan);
}

body.app-v2-preview .hub-daily-kafmusic {
  border-left: 3px solid var(--preview-pink);
  background: #17131d;
}

body.app-v2-preview .hub-community-suite-grid > :nth-child(1) { border-bottom: 3px solid var(--preview-orange); }
body.app-v2-preview .hub-community-suite-grid > :nth-child(2) { border-bottom: 3px solid var(--preview-cyan); }
body.app-v2-preview .hub-community-suite-grid > :nth-child(4) { border-bottom: 3px solid var(--preview-violet); }

.hub-v2-dashboard {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
  color: #fff;
}

.hub-preview-hero {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 215, 102, 0.38);
  background: #08080c;
  isolation: isolate;
}

.hub-preview-hero-media,
.hub-preview-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hub-preview-hero-media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  opacity: 0.94;
}

body[data-home-period="morning"] .hub-preview-hero-media > img,
body[data-home-period="afternoon"] .hub-preview-hero-media > img { object-position: center 64%; }
body[data-home-period="evening"] .hub-preview-hero-media > img { object-position: center 62%; }
body[data-home-period="night"] .hub-preview-hero-media > img { object-position: center 58%; }

.hub-preview-hero-shade {
  z-index: 1;
  background: linear-gradient(90deg, rgba(6, 6, 9, 0.93) 0%, rgba(6, 6, 9, 0.52) 55%, rgba(6, 6, 9, 0.18) 100%);
}

.hub-preview-hero-tools,
.hub-preview-welcome {
  position: relative;
  z-index: 2;
}

.hub-preview-hero-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
}

.hub-preview-hero-tools > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(6, 6, 9, 0.7);
  font-size: 0.67rem;
  font-weight: 900;
}

.hub-preview-hero-tools > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--preview-orange);
  box-shadow: 0 0 12px var(--preview-orange);
  animation: preview-pulse 1.8s ease-in-out infinite;
}

.hub-preview-time-note {
  margin: 6px 0 2px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.92rem;
  font-weight: 700;
}

.hub-preview-hero-tools button,
.hub-preview-screen-heading > button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(7, 7, 10, 0.72);
  color: #fff;
  font-size: 1.2rem;
}

.hub-preview-welcome {
  display: grid;
  align-content: end;
  width: min(620px, 100%);
  min-height: 230px;
  padding: 32px 22px 25px;
}

.hub-preview-welcome > small,
.hub-preview-program header small,
.hub-preview-screen-heading small,
.hub-missions-week header small,
.hub-passport-stats header small,
.hub-v2-game-stats header small {
  color: var(--preview-orange);
  font-size: 0.69rem;
  font-weight: 900;
}

.hub-preview-welcome h1 {
  margin: 5px 0 7px;
  font-size: clamp(2rem, 6vw, 3.3rem);
  line-height: 1;
  letter-spacing: 0;
}

.hub-preview-welcome > p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.hub-preview-welcome > button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(390px, 100%);
  min-height: 54px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 215, 102, 0.52);
  border-radius: 8px;
  background: rgba(12, 12, 17, 0.88);
  color: #fff;
  text-align: left;
}

.hub-preview-welcome > button strong { color: var(--preview-yellow); font-size: 1rem; }
.hub-preview-welcome > button span { color: rgba(255, 255, 255, 0.78); font-size: 0.79rem; font-weight: 800; }
.hub-preview-welcome > button i { color: var(--preview-orange); font-size: 1.3rem; font-style: normal; }

.hub-preview-program,
.hub-preview-games {
  margin-inline: 18px;
}

.hub-preview-program {
  padding: 17px;
  border: 1px solid var(--preview-line);
  border-radius: 8px;
  background: #15151d;
}

.hub-preview-program > header,
.hub-missions-board > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.hub-preview-program h2,
.hub-missions-board h2,
.hub-missions-week h2,
.hub-passport-stats h2,
.hub-v2-game-stats h2 {
  margin: 3px 0 0;
  font-size: 1.18rem;
}

.hub-preview-program > header > span,
.hub-missions-board > header > strong {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--preview-orange);
  color: #140c05;
  font-size: 0.72rem;
  font-weight: 950;
}

.hub-preview-missions,
#hubAllMissions {
  display: grid;
  gap: 8px;
}

.hub-preview-missions-complete {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 215, 102, 0.34);
  border-radius: 7px;
  background: #11130f;
}

.hub-preview-missions-complete > i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 215, 102, 0.14);
  color: var(--preview-yellow);
  font-style: normal;
  font-weight: 950;
  box-shadow: 0 0 18px rgba(255, 215, 102, 0.09);
}

.hub-preview-missions-complete > span {
  display: grid;
  gap: 4px;
}

.hub-preview-missions-complete strong { font-size: 0.83rem; }
.hub-preview-missions-complete small { color: rgba(255, 255, 255, 0.56); font-size: 0.67rem; }

.hub-preview-mission,
.hub-all-mission {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: #0f0f15;
  color: #fff;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.hub-preview-mission:hover,
.hub-all-mission:hover { border-color: rgba(53, 215, 231, 0.52); transform: translateY(-1px); }

.hub-preview-mission > i,
.hub-all-mission > i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(53, 215, 231, 0.13);
  color: var(--preview-cyan);
  font-style: normal;
  font-weight: 950;
}

.hub-preview-mission:nth-child(2) > i,
.hub-all-mission:nth-child(3) > i { background: rgba(255, 60, 172, 0.13); color: var(--preview-pink); }
.hub-preview-mission:nth-child(3) > i,
.hub-all-mission:nth-child(4) > i { background: rgba(255, 138, 36, 0.13); color: var(--preview-orange); }

.hub-preview-mission span,
.hub-all-mission span { display: grid; gap: 3px; min-width: 0; }
.hub-preview-mission strong,
.hub-all-mission strong { font-size: 0.84rem; }
.hub-preview-mission small,
.hub-all-mission small { overflow: hidden; color: rgba(255, 255, 255, 0.55); font-size: 0.66rem; text-overflow: ellipsis; white-space: nowrap; }
.hub-preview-mission > b,
.hub-all-mission > b { color: rgba(255, 255, 255, 0.48); font-size: 0.68rem; }
.hub-preview-mission.is-done,
.hub-all-mission.is-done { border-color: rgba(255, 215, 102, 0.28); }
.hub-preview-mission.is-done > i,
.hub-all-mission.is-done > i { background: rgba(255, 215, 102, 0.14); color: var(--preview-yellow); }
.hub-preview-mission.is-done > b,
.hub-all-mission.is-done > b { color: var(--preview-yellow); }

.hub-preview-all-missions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 9px;
  padding: 10px 11px;
  border: 0;
  background: transparent;
  color: var(--preview-cyan);
  font-size: 0.74rem;
  font-weight: 850;
}

.hub-preview-all-missions i { font-size: 1.15rem; font-style: normal; }

.hub-preview-games {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  overflow: hidden;
  min-height: 126px;
  padding: 4px 18px 4px 4px;
  border: 1px solid rgba(255, 215, 102, 0.38);
  border-radius: 8px;
  background: #17140f;
  color: #fff;
  text-align: left;
  box-shadow: inset 0 0 28px rgba(255, 138, 36, 0.06);
}

.hub-preview-games > img { width: 118px; height: 118px; object-fit: contain; filter: drop-shadow(0 0 14px rgba(255, 215, 102, 0.2)); }
.hub-preview-games > span { display: grid; gap: 4px; min-width: 0; }
.hub-preview-games small { color: var(--preview-orange); font-size: 0.64rem; font-weight: 900; }
.hub-preview-games strong { font-size: 1.25rem; }
.hub-preview-games > b { color: var(--preview-yellow); font-size: 0.76rem; }
.hub-preview-games > b i { font-size: 1rem; font-style: normal; }

.hub-preview-passport,
.hub-preview-missions-view,
.hub-v2-games {
  padding-bottom: 30px;
  color: #fff;
}

.hub-preview-screen-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--preview-line);
}

.hub-preview-screen-heading h1 { margin: 3px 0 5px; font-size: 1.7rem; }
.hub-preview-screen-heading p { margin: 0; color: rgba(255, 255, 255, 0.56); font-size: 0.76rem; }

.hub-passport-card {
  position: relative;
  display: grid;
  gap: 19px;
  margin: 20px 18px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 102, 0.48);
  border-radius: 8px;
  background: #17140f;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.34), inset 0 0 38px rgba(255, 138, 36, 0.05);
}

.hub-passport-generated {
  display: grid;
  gap: 12px;
  max-width: 960px;
  margin: 20px auto 18px;
}

#hubPassportPrivateContent[hidden],
.hub-passport-coming-soon[hidden] { display: none !important; }

.hub-passport-coming-soon {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  margin: 22px 18px;
  padding: 46px 24px;
  overflow: hidden;
  border: 1px solid rgba(216, 180, 105, 0.38);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 15%, rgba(216, 180, 105, 0.13), transparent 42%), #101015;
  text-align: center;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
}

.hub-passport-coming-soon > span {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  margin-bottom: 18px;
  border: 1px solid rgba(216, 180, 105, 0.52);
  border-radius: 50%;
  color: #d8b469;
  font-family: Georgia, serif;
  font-size: 1.9rem;
  box-shadow: inset 0 0 28px rgba(216, 180, 105, 0.08), 0 0 32px rgba(216, 180, 105, 0.08);
}

.hub-passport-coming-soon small { color: var(--preview-orange); font-size: 0.64rem; font-weight: 900; }
.hub-passport-coming-soon h2 { margin: 7px 0 9px; font-size: 1.55rem; }
.hub-passport-coming-soon p { max-width: 520px; margin: 0; color: rgba(255, 255, 255, 0.62); line-height: 1.55; }

.hub-passport-series,
.hub-passport-signature {
  display: grid;
  gap: 12px;
  margin: 20px 18px 4px;
  padding: 16px;
  border: 1px solid rgba(216, 180, 105, 0.3);
  border-radius: 8px;
  background: #111117;
}

.hub-passport-series > header,
.hub-passport-signature > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.hub-passport-series > header small,
.hub-passport-signature > header small { color: var(--preview-orange); font-size: 0.62rem; font-weight: 900; }
.hub-passport-series > header h2,
.hub-passport-signature > header h2 { margin: 3px 0 0; font-size: 1.15rem; }
.hub-passport-series > header > span,
.hub-passport-signature > header > span { color: rgba(255, 255, 255, 0.5); font-size: 0.65rem; font-weight: 800; }

.hub-passport-series-list {
  display: grid;
  grid-auto-columns: minmax(170px, 230px);
  grid-auto-flow: column;
  gap: 10px;
  padding: 1px 1px 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: inline proximity;
}

.hub-passport-series-list > p { color: rgba(255, 255, 255, 0.5); font-size: 0.72rem; }

.hub-passport-series-option {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #09090d;
  color: #fff;
  text-align: left;
  scroll-snap-align: start;
  cursor: pointer;
}

.hub-passport-series-option img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 5px;
  background: #030304;
}

.hub-passport-series-option span { padding: 0 3px 2px; overflow: hidden; font-size: 0.68rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.hub-passport-series-option i { position: absolute; top: 12px; right: 12px; display: none; place-items: center; width: 24px; height: 24px; border: 1px solid rgba(255, 255, 255, 0.72); border-radius: 50%; background: #d8b469; color: #111; font-style: normal; font-weight: 950; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.42); }
.hub-passport-series-option.is-selected { border-color: #d8b469; box-shadow: 0 0 0 1px rgba(216, 180, 105, 0.26), 0 12px 24px rgba(0, 0, 0, 0.26); }
.hub-passport-series-option.is-selected i { display: grid; }
.hub-passport-series-option:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.hub-passport-signature-pad {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(216, 180, 105, 0.42);
  border-radius: 7px;
  background: #070709;
  background-image: linear-gradient(rgba(216, 180, 105, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(216, 180, 105, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.hub-passport-signature-pad::after {
  content: "";
  position: absolute;
  right: 7%;
  bottom: 24%;
  left: 7%;
  height: 1px;
  background: rgba(216, 180, 105, 0.26);
  pointer-events: none;
}

.hub-passport-signature-pad canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: clamp(130px, 20vw, 190px);
  touch-action: none;
  cursor: crosshair;
}

.hub-passport-signature-pad.is-locked {
  border-color: rgba(116, 226, 158, 0.52);
  box-shadow: inset 0 0 0 1px rgba(116, 226, 158, 0.12);
}

.hub-passport-signature-pad.is-locked canvas { cursor: default; }
.hub-passport-signature-pad.is-locked small { color: #74e29e; font-size: 0; }
.hub-passport-signature-pad.is-locked small::before { content: "Signature verrouillée"; font-size: 0.58rem; font-weight: 900; }

.hub-passport-signature-pad small { position: absolute; right: 10px; bottom: 8px; color: rgba(255, 255, 255, 0.34); font-size: 0.58rem; pointer-events: none; }
.hub-passport-signature-actions { display: flex; justify-content: flex-end; gap: 9px; }
.hub-passport-signature-actions button { min-height: 40px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 7px; background: #19191f; color: #fff; font-weight: 850; }
.hub-passport-signature-actions button:last-child { border-color: rgba(216, 180, 105, 0.55); background: #d8b469; color: #111; }
.hub-passport-signature-actions button:disabled { opacity: 0.42; cursor: not-allowed; }

.hub-passport-generated > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.hub-passport-generated > header small { color: var(--preview-orange); font-size: 0.64rem; font-weight: 900; }
.hub-passport-generated > header h2 { margin: 3px 0 0; font-size: 1.2rem; }
.hub-passport-generated > header > span { color: rgba(255, 255, 255, 0.48); font-size: 0.62rem; font-weight: 800; }

.hub-passport-preview {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 102, 0.46);
  border-radius: 8px;
  background: #080808;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
  cursor: zoom-in;
}

.hub-passport-preview img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.hub-passport-preview > span { position: absolute; right: 10px; bottom: 10px; padding: 6px 9px; border: 1px solid rgba(216, 180, 105, 0.38); border-radius: 6px; background: rgba(8, 8, 8, 0.86); color: #e8cb89; font-size: 0.58rem; font-weight: 850; }
.hub-passport-preview.is-ready > span { display: none; }

.hub-passport-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid rgba(216, 180, 105, 0.5);
  border-radius: 8px;
  background: #d8b469;
  color: #111;
  font-weight: 900;
}

.hub-passport-download:disabled { opacity: 0.48; cursor: wait; }

.hub-passport-lightbox {
  position: fixed;
  inset: 0;
  z-index: 4200;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.9);
}

.hub-passport-lightbox[hidden] { display: none; }
.hub-passport-lightbox-backdrop { position: absolute; inset: 0; border: 0; background: transparent; }

.hub-passport-lightbox-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(92vw, 1120px, calc((90dvh - 52px) * 16 / 9));
  max-height: 90dvh;
  overflow: hidden;
  border: 1px solid rgba(216, 180, 105, 0.42);
  border-radius: 7px;
  background: #030303;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.72);
}

.hub-passport-lightbox-panel > header { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 5px 6px 5px 13px; color: #fff; }
.hub-passport-lightbox-panel > header strong { overflow: hidden; font-size: 0.74rem; text-overflow: ellipsis; white-space: nowrap; }
.hub-passport-lightbox-panel > header div { display: flex; gap: 5px; }
.hub-passport-lightbox-panel > header button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 6px; background: #17171c; color: #fff; font-size: 1.12rem; cursor: pointer; }
.hub-passport-lightbox-panel > img { display: block; width: 100%; max-height: calc(90dvh - 52px); aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
body.passport-lightbox-open { overflow: hidden; }

.hub-passport-save-sheet {
  position: fixed;
  inset: 0;
  z-index: 4300;
  display: grid;
  align-items: end;
  padding: 18px 14px max(18px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.66);
}

.hub-passport-save-sheet[hidden] { display: none; }
.hub-passport-save-backdrop { position: absolute; inset: 0; border: 0; background: transparent; }

.hub-passport-save-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  margin-inline: auto;
  padding: 20px;
  border: 1px solid rgba(216, 180, 105, 0.42);
  border-radius: 8px;
  background: #17151c;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.58);
}

.hub-passport-save-panel > small { color: var(--preview-yellow); font-size: 0.63rem; font-weight: 900; letter-spacing: 0.08em; }
.hub-passport-save-panel h2 { margin: 6px 32px 6px 0; color: #fff; font-size: 1.22rem; }
.hub-passport-save-panel > p { margin: 0 0 16px; color: rgba(255, 255, 255, 0.62); font-size: 0.76rem; line-height: 1.45; }
.hub-passport-save-panel > .hub-passport-save-status { margin: -7px 0 14px; padding: 9px 10px; border: 1px solid rgba(116, 226, 158, 0.28); border-radius: 6px; background: rgba(116, 226, 158, 0.08); color: #9cf0bb; font-weight: 800; }
.hub-passport-save-panel > .hub-passport-save-status.is-error { border-color: rgba(255, 149, 105, 0.38); background: rgba(255, 112, 72, 0.1); color: #ffc0a8; }
.hub-passport-save-close { position: absolute; top: 11px; right: 11px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 6px; background: #211f28; color: #fff; font-size: 1.25rem; cursor: pointer; }
.hub-passport-save-panel > div { display: grid; gap: 8px; }
.hub-passport-save-panel > div > button { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 11px; width: 100%; min-height: 62px; padding: 10px 12px; border: 1px solid rgba(255, 215, 102, 0.23); border-radius: 7px; background: #0f1015; color: #fff; text-align: left; cursor: pointer; }
.hub-passport-save-panel > div > button:active { transform: scale(0.99); }
.hub-passport-save-panel > div > button:disabled { opacity: 0.48; cursor: wait; transform: none; }
.hub-passport-save-panel > div > button > i { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 7px; background: rgba(255, 215, 102, 0.12); color: var(--preview-yellow); font-size: 1.14rem; font-style: normal; }
.hub-passport-save-panel > div > button > span { display: grid; gap: 3px; min-width: 0; }
.hub-passport-save-panel > div > button strong { font-size: 0.86rem; }
.hub-passport-save-panel > div > button small { color: rgba(255, 255, 255, 0.55); font-size: 0.67rem; }
.hub-passport-save-panel > div > button > b { color: var(--preview-orange); font-size: 1.25rem; }
body.passport-save-sheet-open { overflow: hidden; }

@media (max-width: 680px) {
  .hub-passport-lightbox { padding: max(4px, env(safe-area-inset-top)) max(4px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left)); }
  .hub-passport-lightbox-panel { width: 100%; border-radius: 5px; }
  .hub-passport-lightbox-panel > header { min-height: 42px; }
}
.hub-passport-download i { font-size: 1.15rem; font-style: normal; }
.hub-passport-legacy { display: none !important; }

.hub-passport-card::after {
  content: "IM";
  position: absolute;
  right: -12px;
  bottom: -34px;
  color: rgba(255, 215, 102, 0.045);
  font-size: 8rem;
  font-weight: 950;
}

.hub-passport-brand { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; }
.hub-passport-brand > span { color: var(--preview-yellow); font-size: 0.76rem; font-weight: 950; }
.hub-passport-brand > strong { font-size: 0.75rem; }
.hub-passport-brand > small { color: rgba(255, 255, 255, 0.5); font-size: 0.58rem; }

.hub-passport-identity { position: relative; z-index: 1; display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 18px; }
.hub-passport-avatar { position: relative; width: 92px; height: 92px; }
.hub-passport-avatar > img:first-child { width: 100%; height: 100%; border: 3px solid #f7df9f; border-radius: 50%; background: #0b0b10; object-fit: cover; }
.hub-passport-avatar > img:last-child { position: absolute; inset: -13%; width: 126%; height: 126%; object-fit: contain; pointer-events: none; }
.hub-passport-identity small { color: var(--preview-orange); font-size: 0.62rem; font-weight: 900; }
.hub-passport-identity h2 { margin: 3px 0; font-size: 1.55rem; }
.hub-passport-identity p { margin: 0 0 6px; color: rgba(255, 255, 255, 0.65); }
.hub-passport-identity em { color: rgba(255, 255, 255, 0.42); font-size: 0.65rem; font-style: normal; }

.hub-passport-level { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hub-passport-level > span,
.hub-passport-equipment > span { display: grid; gap: 4px; padding: 12px; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 7px; background: rgba(6, 6, 9, 0.54); }
.hub-passport-level small,
.hub-passport-equipment small { color: rgba(255, 255, 255, 0.46); font-size: 0.57rem; font-weight: 900; }
.hub-passport-level strong { color: var(--preview-yellow); }
.hub-passport-level em { color: rgba(255, 255, 255, 0.58); font-size: 0.65rem; font-style: normal; }
.hub-passport-progress { position: relative; z-index: 1; height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.09); }
.hub-passport-progress span { display: block; height: 100%; border-radius: inherit; background: var(--preview-yellow); box-shadow: 0 0 12px rgba(255, 215, 102, 0.48); }
.hub-passport-equipment { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hub-passport-equipment strong { font-size: 0.7rem; }

.hub-passport-stats,
.hub-missions-board,
.hub-missions-week,
.hub-v2-game-stats { margin: 0 18px 18px; padding: 17px; border: 1px solid var(--preview-line); border-radius: 8px; background: var(--preview-panel); }
.hub-passport-stats header,
.hub-missions-week header,
.hub-v2-game-stats header { margin-bottom: 13px; }
#hubPassportStats,
#hubV2WeekGrid,
#hubV2GameStats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
#hubPassportStats article,
#hubV2WeekGrid article,
#hubV2GameStats article { display: grid; gap: 5px; padding: 13px 9px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 7px; background: #0f0f15; text-align: center; }
#hubPassportStats strong,
#hubV2WeekGrid strong,
#hubV2GameStats strong { color: var(--preview-cyan); font-size: 1.1rem; }
#hubPassportStats small,
#hubV2WeekGrid small,
#hubV2GameStats small { color: rgba(255, 255, 255, 0.5); font-size: 0.6rem; }
.hub-passport-profile-link { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 36px); margin: 0 18px; padding: 14px 16px; border: 1px solid rgba(53, 215, 231, 0.35); border-radius: 8px; background: #10171a; color: var(--preview-cyan); font-weight: 850; }
.hub-passport-profile-link i { font-size: 1.2rem; font-style: normal; }

.hub-v2-games-hero {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 138, 36, 0.32);
  background: #17140f;
}
.hub-v2-games-hero > img { display: block; width: min(172px, 46vw); height: auto; object-fit: contain; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.42)); }
.hub-v2-game-list { display: grid; gap: 13px; margin: 18px; }
.hub-v2-game-list > button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--preview-line);
  border-radius: 8px;
  background: #050507;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.hub-v2-game-list > button:hover {
  border-color: rgba(255, 215, 102, 0.48);
  box-shadow: 0 17px 34px rgba(0, 0, 0, 0.32);
  transform: translateY(-2px);
}
.hub-v2-game-list img { display: block; width: 100%; height: auto; object-fit: contain; }

.hub-preview-about-card h2 { margin: 3px 0 6px; }
.hub-preview-about-card p:last-child { margin: 0; color: var(--app-muted, #92929d); font-size: 0.78rem; }

@keyframes preview-pulse {
  50% { opacity: 0.45; transform: scale(0.82); }
}

@media (max-width: 620px) {
  .hub-preview-hero { min-height: 290px; }
  .hub-preview-hero-media > img { object-position: center 62%; }
  .hub-preview-hero-shade { background: linear-gradient(90deg, rgba(4, 6, 17, 0.78), rgba(4, 6, 17, 0.4) 70%, rgba(4, 6, 17, 0.18)); }
  .hub-preview-welcome { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9); }
  .hub-preview-welcome { min-height: 214px; padding-inline: 18px; }
  .hub-preview-welcome h1 { font-size: 2rem; }
  .hub-preview-program,
  .hub-preview-games { margin-inline: 12px; }
  .hub-preview-program { padding: 14px; }
  .hub-preview-games { grid-template-columns: 92px minmax(0, 1fr); min-height: 104px; padding: 4px 12px 4px 4px; }
  .hub-preview-games > img { width: 92px; height: 92px; }
  .hub-preview-games > b { grid-column: 2; }
  .hub-preview-games strong { font-size: 1.02rem; }
  .hub-passport-card,
  .hub-passport-generated,
  .hub-passport-signature,
  .hub-passport-coming-soon,
  .hub-passport-stats,
  .hub-missions-board,
  .hub-missions-week,
  .hub-v2-game-stats { margin-inline: 12px; }
  .hub-passport-card { padding: 17px; }
  .hub-passport-generated > header { align-items: start; }
  .hub-passport-generated > header > span { max-width: 96px; text-align: right; }
  .hub-passport-signature > header { align-items: start; }
  .hub-passport-signature > header > span { max-width: 110px; text-align: right; }
  .hub-passport-signature-actions { display: grid; grid-template-columns: 0.8fr 1.2fr; }
  .hub-passport-identity { grid-template-columns: 74px minmax(0, 1fr); gap: 13px; }
  .hub-passport-avatar { width: 74px; height: 74px; }
  .hub-passport-identity h2 { font-size: 1.25rem; }
  .hub-passport-level { grid-template-columns: 1fr; }
  .hub-passport-equipment { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #hubPassportStats,
  #hubV2WeekGrid,
  #hubV2GameStats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-passport-profile-link { width: calc(100% - 24px); margin-inline: 12px; }
  .hub-v2-games-hero { min-height: 150px; padding: 14px; }
  .hub-v2-games-hero > img { width: min(142px, 42vw); }
  .hub-v2-game-list { margin-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-preview-hero-tools > span i { animation: none; }
  .hub-preview-mission,
  .hub-all-mission { transition: none; }
}

/* Identité V2 : une signature commune, discrète et cohérente sur chaque écran. */
body.app-v2-identity {
  --v2-coral: #ff6a3d;
  --v2-gold: #ffd766;
  --v2-cyan: #35d7e7;
}

body.app-v2-identity .app-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg,transparent,var(--v2-coral) 22%,var(--v2-gold) 50%,var(--v2-cyan) 78%,transparent);
  opacity: .52;
  pointer-events: none;
}

.app-v2-badge {
  position: relative;
  display: inline-grid;
  min-width: 30px;
  height: 20px;
  flex: 0 0 auto;
  padding: 0 7px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255,215,102,.4);
  border-radius: 99px;
  background: linear-gradient(120deg,rgba(255,106,61,.22),rgba(255,215,102,.14));
  color: var(--v2-gold);
  font-size: .57rem;
  font-weight: 950;
  letter-spacing: .08em;
  box-shadow: 0 0 18px rgba(255,106,61,.13);
}

.app-v2-badge::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -80%;
  width: 38%;
  height: 180%;
  background: rgba(255,255,255,.48);
  filter: blur(3px);
  transform: rotate(18deg);
  animation: app-v2-badge-shine 5.5s ease-in-out infinite;
}

body.app-v2-identity .app-view.is-active { animation: app-v2-view-in 240ms cubic-bezier(.2,.78,.25,1) both; }
body.app-v2-identity .app-bottom-nav > button:not(.app-compose-button).is-active { color: var(--v2-coral); box-shadow: inset 0 -2px 0 color-mix(in srgb,var(--v2-coral) 74%,transparent),0 0 22px rgba(255,106,61,.08); }
body.app-v2-identity .app-bottom-nav > button:not(.app-compose-button) { transition: color 160ms ease,background-color 160ms ease,transform 140ms ease,box-shadow 160ms ease; }
body.app-v2-identity :is(.hub-session-card,.hub-clip-card,.hub-preview-program,.hub-preview-games) { transition: border-color 180ms ease,box-shadow 180ms ease,transform 180ms ease; }
body.app-v2-identity :is(.hub-session-card,.hub-clip-card):hover { border-color: color-mix(in srgb,var(--v2-coral) 42%,var(--preview-line)); box-shadow: 0 18px 38px rgba(0,0,0,.3); transform: translateY(-1px); }

@keyframes app-v2-view-in {
  from { opacity: .65; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

@keyframes app-v2-badge-shine {
  0%,70% { left: -80%; opacity: 0; }
  76% { opacity: .7; }
  88%,100% { left: 150%; opacity: 0; }
}

html.app-reduced-motion body.app-v2-identity .app-view.is-active,
html.app-reduced-motion .app-v2-badge::after { animation: none; }

@media (prefers-reduced-motion: reduce) {
  body.app-v2-identity .app-view.is-active,
  .app-v2-badge::after { animation: none; }
}

@media (max-width: 370px) {
  .app-v2-badge { min-width: 27px; padding-inline: 5px; }
}

/* V2 polish: a living home, spatial navigation and small tactile details. */
.hub-preview-hero { --home-pointer-x: var(--home-ambient-x,50%); --home-pointer-y: 34%; --home-glow: rgba(255,138,36,.2); }
body[data-home-period="morning"] .hub-preview-hero { --home-glow: rgba(255,197,92,.24); }
body[data-home-period="afternoon"] .hub-preview-hero { --home-glow: rgba(53,215,231,.18); }
body[data-home-period="evening"] .hub-preview-hero { --home-glow: rgba(255,60,172,.2); }
body[data-home-period="night"] .hub-preview-hero { --home-glow: rgba(155,108,255,.23); }
.hub-preview-hero::after { position: absolute; z-index: 1; inset: 0; content: ""; background: radial-gradient(circle at var(--home-pointer-x) var(--home-pointer-y),var(--home-glow),transparent 34%); mix-blend-mode: screen; opacity: .9; pointer-events: none; transition: background-position 180ms ease; animation: app-home-breathe 8s ease-in-out infinite alternate; }
.hub-preview-hero-media > img { transform: scale(1.018); animation: app-home-drift 16s ease-in-out infinite alternate; }
.hub-preview-hero.is-static::after,
.hub-preview-hero.is-static .hub-preview-hero-media > img { animation: none; }
.hub-preview-program { position: relative; overflow: hidden; box-shadow: 0 18px 42px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.035); transform: translateZ(0); }
.hub-preview-program::before { position: absolute; top: 0; left: 0; width: var(--mission-progress,0%); height: 2px; content: ""; background: linear-gradient(90deg,var(--preview-orange),var(--preview-yellow)); box-shadow: 0 0 16px rgba(255,138,36,.46); transition: width 420ms cubic-bezier(.2,.8,.2,1); }
.hub-passport-card { box-shadow: 0 22px 55px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.06); transition: transform 200ms ease,box-shadow 200ms ease; transform: perspective(900px) rotateX(.2deg); }
.hub-passport-card:hover { transform: perspective(900px) rotateX(0) translateY(-2px); box-shadow: 0 27px 66px rgba(0,0,0,.38),inset 0 1px 0 rgba(255,255,255,.08); }

.app-new-badge { position: relative; display: inline-flex; align-items: center; min-height: 17px; margin-left: 4px; padding: 2px 5px; overflow: hidden; border: 1px solid rgba(255,215,102,.48); border-radius: 999px; background: rgba(255,215,102,.12); color: var(--preview-yellow); font-size: .45rem; font-weight: 950; letter-spacing: .04em; vertical-align: middle; }
.app-new-badge::after { position: absolute; inset: 0; content: ""; background: linear-gradient(105deg,transparent 30%,rgba(255,255,255,.45),transparent 70%); transform: translateX(-130%); animation: app-new-badge-shine 2.8s ease-in-out infinite; }
.app-new-badge.is-leaving { animation: app-new-badge-leave 180ms ease forwards; }

body.app-v2-identity .app-bottom-nav > button:not(.app-compose-button)::after { position: absolute; right: calc(50% - 3px); bottom: 1px; width: 6px; height: 6px; content: ""; border-radius: 50%; background: currentColor; opacity: 0; transform: scale(.25); transition: opacity 160ms ease,transform 180ms cubic-bezier(.2,.8,.2,1); }
body.app-v2-identity .app-bottom-nav > button:not(.app-compose-button) > span { display: inline-block; transform-origin: 50% 70%; transition: transform 200ms cubic-bezier(.2,.8,.2,1),filter 180ms ease; }
body.app-v2-identity .app-bottom-nav > button:not(.app-compose-button).is-active::after { opacity: .8; transform: scale(1); }
body.app-v2-identity .app-bottom-nav > button:not(.app-compose-button).is-active > span { transform: translateY(-2px) scale(1.09) rotate(-3deg); filter: drop-shadow(0 4px 8px rgba(255,106,61,.3)); }

body.app-v2-identity .app-view.is-active :is(.hub-preview-program,.hub-preview-games,.hub-track-card,.hub-community-playlist-card,.app-post):nth-child(-n+5) { animation: app-v2-card-arrive 220ms cubic-bezier(.2,.78,.25,1) both; }
body.app-v2-identity .app-view.is-active :is(.hub-preview-program,.hub-preview-games,.hub-track-card,.hub-community-playlist-card,.app-post):nth-child(2) { animation-delay: 35ms; }
body.app-v2-identity .app-view.is-active :is(.hub-preview-program,.hub-preview-games,.hub-track-card,.hub-community-playlist-card,.app-post):nth-child(3) { animation-delay: 70ms; }
body.app-v2-identity .app-view.is-active :is(.hub-preview-program,.hub-preview-games,.hub-track-card,.hub-community-playlist-card,.app-post):nth-child(4) { animation-delay: 105ms; }
body.app-v2-identity .app-view.is-active :is(.hub-preview-program,.hub-preview-games,.hub-track-card,.hub-community-playlist-card,.app-post):nth-child(5) { animation-delay: 140ms; }

::view-transition-old(root),::view-transition-new(root) { animation-duration: 220ms; animation-timing-function: cubic-bezier(.2,.78,.25,1); }
html[data-app-transition="forward"]::view-transition-old(root) { animation-name: app-screen-old-forward; }
html[data-app-transition="forward"]::view-transition-new(root) { animation-name: app-screen-new-forward; }
html[data-app-transition="back"]::view-transition-old(root) { animation-name: app-screen-old-back; }
html[data-app-transition="back"]::view-transition-new(root) { animation-name: app-screen-new-back; }

@keyframes app-home-breathe { to { opacity: .58; transform: scale(1.06); } }
@keyframes app-home-drift { to { transform: scale(1.045) translate3d(-.7%,.3%,0); } }
@keyframes app-new-badge-shine { 55%,100% { transform: translateX(130%); } }
@keyframes app-new-badge-leave { to { opacity: 0; transform: scale(.72); } }
@keyframes app-v2-card-arrive { from { opacity: .35; transform: translateY(7px); } }
@keyframes app-screen-old-forward { to { opacity: 0; transform: translateX(-12px) scale(.995); } }
@keyframes app-screen-new-forward { from { opacity: 0; transform: translateX(14px) scale(.995); } }
@keyframes app-screen-old-back { to { opacity: 0; transform: translateX(12px) scale(.995); } }
@keyframes app-screen-new-back { from { opacity: 0; transform: translateX(-14px) scale(.995); } }

html.app-reduced-motion .hub-preview-hero::after,
html.app-reduced-motion .hub-preview-hero-media > img,
html.app-reduced-motion .app-new-badge::after,
html.app-reduced-motion body.app-v2-identity .app-view.is-active * { animation: none !important; transition-duration: .01ms !important; }

@media (prefers-reduced-motion: reduce) {
  .hub-preview-hero::after,
  .hub-preview-hero-media > img,
  .app-new-badge::after,
  body.app-v2-identity .app-view.is-active *,
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none !important; transition-duration: .01ms !important; }
}
