/* =============================================
   RESET & VARIABLES
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --phone-w: 393px;
  --phone-h: 852px;
  --screen-radius: 54px;
  --font-main: 'DM Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --bg-dark: #0a0a0f;
  --bg-card: #13131a;
  --text-primary: #f0f0f5;
  --text-muted: #7a7a90;
  --accent-blue: #00e5ff;
  --accent-pink: #ff2d55;
  --accent-yellow: #FFFC00;
  --shadow-phone: 0 55px 120px rgba(0,0,0,.55), 0 18px 32px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.08);
  --transition: .35s cubic-bezier(.4,0,.2,1);
}

body {
  font-family: var(--font-main);
  background:
    radial-gradient(circle at top, rgba(72,110,255,.22), transparent 30%),
    radial-gradient(circle at bottom left, rgba(255,120,90,.18), transparent 28%),
    linear-gradient(180deg, #0c1020 0%, #111a2f 45%, #05070d 100%);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  overflow-x: hidden;
}

/* =============================================
   FOND ANIMÉ DU SITE
============================================= */
.site-bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .3;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob1 { width: 400px; height: 400px; background: #1a0533; top: -100px; left: -100px; animation-delay: 0s; }
.blob2 { width: 300px; height: 300px; background: #001a33; bottom: -50px; right: 20%; animation-delay: -3s; }
.blob3 { width: 350px; height: 350px; background: #0a1a00; top: 30%; right: -80px; animation-delay: -6s; }

@keyframes blobFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(20px,-20px) scale(1.05); }
}

/* Label présentation */
.presentation-label {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 11px;
  letter-spacing: .05em;
  color: rgba(255,255,255,.6);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.label-dot {
  width: 6px; height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.3; } }

/* =============================================
   PANNEAU LATÉRAL
============================================= */
.side-panel {
  position: fixed;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 24px 20px;
  z-index: 50;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.show-message-overlay .presentation-label,
.show-message-overlay .side-panel {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.side-panel-logo {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.side-panel-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 2px;
}
.side-panel-sub { font-size: 10px; color: var(--text-muted); margin-bottom: 0; }
.side-divider { height: 1px; background: rgba(255,255,255,.08); margin: 14px 0; }
.side-apps-guide { display: flex; flex-direction: column; gap: 8px; }
.side-guide-item { display: flex; align-items: center; gap: 8px; font-size: 11px; line-height: 1.3; }
.side-guide-dot {
  width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0;
}
.side-tip {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 8px;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
}

/* =============================================
   PHONE CONTAINER
============================================= */
.phone-wrap {
  position: relative;
  z-index: 10;
  filter: drop-shadow(0 30px 70px rgba(5, 12, 28, 0.45));
}

.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  background: linear-gradient(160deg, #0b0b10 0%, #0f1016 45%, #050508 100%);
  border-radius: var(--screen-radius);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow:
    0 24px 60px rgba(0,0,0,.45),
    inset 0 0 0 1px rgba(255,255,255,.04),
    inset 0 -8px 20px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  animation: phoneAppear .8s cubic-bezier(.34,1.56,.64,1) both;
}
.phone::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: calc(var(--screen-radius) - 6px);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 30%);
  pointer-events: none;
  opacity: .7;
}
.phone::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--screen-radius) - 1px);
  border: 1px solid rgba(255,255,255,.05);
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
}

@keyframes phoneAppear {
  from { transform: scale(.8) translateY(30px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Encoche */
.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 122px;
  height: 30px;
  background: transparent;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notch-pill {
  width: 122px;
  height: 30px;
  background: #060606;
  border-radius: 999px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.03);
  position: relative;
}
.notch-pill::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #3d4d67, #0a0a0d 60%);
  right: 14px;
  top: 10px;
}
.notch-pill::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  left: 18px;
  top: 11px;
}

/* Barre de statut */
.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 26px 0;
  height: 44px;
  z-index: 110;
  pointer-events: none;
}
.status-time {
  font-size: 13px;
  font-weight: 700;
  color: white;
  letter-spacing: -.01em;
  padding-left: 6px;
  text-shadow: 0 2px 10px rgba(0,0,0,.24);
}
.status-icons { display: flex; align-items: center; gap: 6px; color: white; padding-right: 6px; text-shadow: 0 2px 10px rgba(0,0,0,.24); }
.status-icon { display: flex; align-items: center; }
.status-battery {
  width: 21px;
  height: 10px;
  border: 1.4px solid white;
  border-radius: 3px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 1.2px;
}
.status-battery::after {
  content: '';
  position: absolute;
  right: -5px;
  width: 3px;
  height: 5px;
  background: white;
  border-radius: 0 2px 2px 0;
}
.battery-level {
  height: 100%;
  width: 80%;
  background: #4caf50;
  border-radius: 1px;
  display: block;
}

/* =============================================
   ÉCRAN (zone scrollable)
============================================= */
.phone-screen {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: calc(var(--screen-radius) - 2px);
  margin: 2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), inset 0 10px 25px rgba(0,0,0,.35);
}

/* Bouton home physique */
.phone-home-btn {
  display: none;
}
.phone-home-btn:hover { background: rgba(255,255,255,.95); }

/* =============================================
   VUES (système de navigation)
============================================= */
.view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #060606 0%, #0b0b0f 100%);
  transition: transform var(--transition), opacity var(--transition);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.05), 0 6px 14px rgba(0,0,0,.35);
}
.view.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}
.view.slide-out {
  transform: translateX(-30%);
  opacity: 0;
}

/* =============================================
   ACCUEIL
============================================= */
#view-home {
  background: linear-gradient(180deg, #1b2e63 0%, #365fa8 38%, #5b8fd2 70%, #7eb6f1 100%);
}
.home-wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 14%, rgba(255,255,255,.55) 0%, rgba(255,255,255,.12) 14%, transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(163,119,255,.28) 0%, transparent 22%),
    radial-gradient(circle at 80% 72%, rgba(18,140,255,.28) 0%, transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,0) 22%),
    linear-gradient(180deg, #1d3167 0%, #3f68b0 38%, #6498d8 70%, #89bdf3 100%);
}
.home-wallpaper::before {
  content: '';
  position: absolute;
  inset: 10% auto auto 8%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.55), rgba(255,255,255,0) 68%);
  filter: blur(18px);
  opacity: .85;
}
.home-wallpaper::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 26%),
    linear-gradient(180deg, rgba(0,15,40,.04), rgba(0,18,38,.12) 76%, rgba(4,9,17,.18));
}
.home-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 58px 16px 0;
  gap: 18px;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px 8px 10px;
  color: #fff;
  text-shadow: 0 10px 28px rgba(0, 19, 54, .28);
}
.home-hero-date {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,.82);
}
.home-hero-time {
  font-size: 54px;
  line-height: .95;
  font-weight: 700;
  letter-spacing: -.06em;
  margin-top: 4px;
}
.home-hero-title {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 700;
}
.home-hero-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
}

/* Grille d'apps */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 10px;
  padding: 6px 2px 0;
  align-content: start;
}
.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
}
.app-icon-img {
  width: 62px;
  height: 62px;
  border-radius: 19px;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(10,31,58,.16), inset 0 1px 0 rgba(255,255,255,.18);
}
.app-icon-img svg { width: 100%; height: 100%; }
.app-icon-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
.clipflow-icon img,
.flashgram-icon img,
.ghostchat-icon img {
  width: 118%;
  height: 118%;
  max-width: none;
  max-height: none;
}
.clipflow-icon img { transform: scale(1.08); }
.flashgram-icon img {
  width: 128%;
  height: 128%;
  transform: scale(1.22);
}
.ghostchat-icon img { transform: scale(1.1); }
.app-icon:hover .app-icon-img,
.app-icon:active .app-icon-img {
  transform: scale(.9);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.passive-app { cursor: default; }
.passive-app:hover .app-icon-img,
.passive-app:active .app-icon-img { transform: none; box-shadow: 0 10px 22px rgba(10,31,58,.16), inset 0 1px 0 rgba(255,255,255,.18); }
.app-name {
  font-size: 11px;
  color: rgba(255,255,255,.92);
  text-align: center;
  font-weight: 600;
  text-shadow: 0 3px 12px rgba(0,0,0,.18);
}
.app-notif {
  position: absolute;
  top: -4px;
  right: 12px;
  background: #ff2d55;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  border: 1.5px solid #0f0f14;
}

.ios-white-icon { background: #fff; }

.home-search-pill {
  width: 138px;
  margin: auto auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.92);
}
.home-search-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.8px solid currentColor;
  position: relative;
}
.home-search-dot::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 1.6px;
  background: currentColor;
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
  border-radius: 999px;
}

/* Dock */
.home-dock {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 12px 18px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,.14));
  backdrop-filter: blur(34px) saturate(1.45);
  border: 1px solid rgba(255,255,255,.28);
  margin: 0 2px 10px;
  border-radius: 32px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 14px 28px rgba(39,39,56,.14);
}
.dock-icon .app-icon-img { width: 58px; height: 58px; border-radius: 18px; }
.dock-icon .app-name { display: none; }

/* =============================================
   EN-TÊTES D'APPLICATIONS
============================================= */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  z-index: 10;
  min-height: 64px;
}
.btn-back {
  background: rgba(255,255,255,.1);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
}
.btn-back:hover { background: rgba(255,255,255,.2); }
.app-header-title { font-size: 15px; font-weight: 700; }

/* =============================================
   CLIPFLOW (TikTok)
============================================= */
.clipflow-header {
  background: linear-gradient(180deg, rgba(0,0,0,.96), rgba(0,0,0,.28));
  color: white;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 14px;
}
.clip-back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: inherit;
  position: relative;
  z-index: 2;
}
.clip-back-btn svg,
.clip-top-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.clip-header-center {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  pointer-events: none;
}
.header-for-you {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.68);
  position: static;
  transform: none;
}
.clipflow-header .app-header-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clip-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.clip-top-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#view-clipflow.clip-light-shell .clipflow-header {
  background: #fff;
  color: #0f172a;
  border-bottom: 1px solid #eceef3;
}
#view-clipflow.clip-light-shell .clip-back-btn,
#view-clipflow.clip-light-shell .clip-top-btn {
  background: #f4f5f8;
  border-color: #eceef3;
}
#view-clipflow.clip-light-shell .header-for-you {
  color: #64748b;
}
#view-clipflow.clip-light-shell .clipflow-header .app-header-title {
  font-size: 15px;
}
#view-clipflow.clip-camera-shell .clipflow-header {
  background: linear-gradient(180deg, rgba(0,0,0,.96), rgba(0,0,0,.15));
}
#view-clipflow.clip-home-shell .clipflow-header {
  height: 108px;
  padding: 18px 14px 14px;
  background: linear-gradient(180deg, #000 0%, rgba(0,0,0,.82) 62%, rgba(0,0,0,0) 100%);
  align-items: flex-start;
}
#view-clipflow.clip-home-shell .clip-back-btn {
  display: inline-flex;
}
#view-clipflow.clip-home-shell .clip-header-center {
  position: static;
  transform: none;
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
}
.clip-live-pill {
  display: none;
}
#view-clipflow.clip-home-shell .clip-live-pill {
  width: 38px;
  height: 32px;
  border: 3px solid #fff;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
.clip-tab-muted {
  display: none;
}
#view-clipflow.clip-home-shell .clip-tab-muted {
  display: inline-block;
  min-width: 0;
  color: rgba(255,255,255,.58);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#view-clipflow.clip-home-shell .header-for-you {
  color: rgba(255,255,255,.66);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  position: relative;
}
#view-clipflow.clip-home-shell .header-for-you::after {
  content: "";
  position: absolute;
  right: -9px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2d55;
}
#view-clipflow.clip-home-shell .clipflow-header .app-header-title {
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  position: relative;
  padding-bottom: 11px;
}
#view-clipflow.clip-home-shell .clipflow-header .app-header-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 30px;
  height: 3px;
  border-radius: 999px;
  background: #fff;
  transform: translateX(-50%);
}
#view-clipflow.clip-home-shell .clip-header-actions {
  margin-left: 8px;
}
#view-clipflow.clip-home-shell .clip-header-actions .clip-top-btn:last-child {
  display: none;
}
#view-clipflow.clip-home-shell .clip-top-btn {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
}
#view-clipflow.clip-home-shell .clip-top-btn svg {
  width: 28px;
  height: 28px;
}

.clip-feed {
  flex: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  background: #000;
}
.clip-feed::-webkit-scrollbar { display: none; }
.clip-feed.is-panel {
  scroll-snap-type: none;
  padding: 76px 0 12px;
}
.clip-feed.panel-light {
  background: #fff;
  padding-bottom: 16px;
}
.clip-feed.panel-dark {
  background: #050505;
  padding-bottom: 0;
}

/* Carte vidéo */
.clip-card {
  height: 100%;
  min-height: 460px;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  flex-shrink: 0;
  padding-top: 72px;
}
#view-clipflow.clip-home-shell .clip-card {
  padding-top: 108px;
}
#view-clipflow.clip-home-shell .clip-card-bg {
  top: 108px;
  bottom: 78px;
  background: #000 !important;
}
#view-clipflow.clip-home-shell .clip-card-video {
  object-fit: contain;
}
.clip-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .3s;
  overflow: hidden;
}
.clip-card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #050505;
  opacity: 1;
  transition: opacity .18s ease;
}
.clip-card-video.loading {
  opacity: 0;
}
.clip-card-bg:has(.clip-card-video.loading)::after {
  content: "Chargement...";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, rgba(0,0,0,.16), rgba(0,0,0,.46));
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}
.clip-card:hover .clip-card-bg { transform: scale(1.02); }
.clip-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.12) 46%, rgba(0,0,0,.08) 100%);
}

/* Infos auteur (bas gauche) */
.clip-author {
  position: relative;
  z-index: 2;
  padding: 12px 54px 18px 14px;
  flex: 1;
}
#view-clipflow.clip-home-shell .clip-author {
  padding: 0 82px 86px 12px;
}
.clip-username {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
#view-clipflow.clip-home-shell .clip-username {
  font-size: 17px;
  margin-bottom: 10px;
}
#view-clipflow.clip-home-shell .clip-follow-btn,
#view-clipflow.clip-home-shell .clip-why,
#view-clipflow.clip-home-shell .clip-fictional-tag {
  display: none;
}
#view-clipflow.clip-home-shell .clip-description {
  font-size: 15px;
  line-height: 1.28;
  color: rgba(255,255,255,.82);
  margin-bottom: 0;
}
#view-clipflow.clip-home-shell .clip-hashtags {
  font-size: 15px;
  line-height: 1.22;
  color: rgba(255,255,255,.78);
  margin-top: 4px;
  max-height: 40px;
  overflow: hidden;
}
.clip-follow-btn {
  font-size: 9px;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 999px;
  padding: 3px 8px;
  opacity: .92;
  font-weight: 700;
}
.clip-description { font-size: 11px; opacity: .94; line-height: 1.45; margin-bottom: 5px; }
.clip-hashtags { font-size: 10px; color: #d1f2ff; opacity: .9; }
.clip-why {
  font-size: 9px;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 3px 8px;
  margin-top: 6px;
  display: inline-block;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.clip-why:hover { background: rgba(255,255,255,.25); }
.clip-fictional-tag {
  font-size: 8px;
  opacity: .5;
  margin-top: 4px;
}

/* Boutons actions (droite) */
.clip-actions {
  position: absolute;
  right: 10px;
  bottom: 98px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
#view-clipflow.clip-home-shell .clip-actions {
  right: 12px;
  bottom: 118px;
  gap: 15px;
}
.clip-action-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.clip-action-btn .action-icon {
  width: 38px;
  height: 38px;
  background: rgba(20,20,20,.58);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform .2s, background .2s;
  backdrop-filter: blur(4px);
}
#view-clipflow.clip-home-shell .clip-action-btn .action-icon {
  width: 38px;
  height: 38px;
  background: transparent;
  backdrop-filter: none;
  color: #fff;
}
#view-clipflow.clip-home-shell .clip-action-btn .action-icon svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
}
#view-clipflow.clip-home-shell .clip-action-btn .action-avatar {
  width: 44px;
  height: 44px;
  border: 3px solid #fff !important;
  font-size: 10px !important;
}
#view-clipflow.clip-home-shell .clip-action-count {
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0,0,0,.7);
}
.clip-action-btn .action-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
.clip-action-btn .action-icon svg path {
  transition: fill .18s ease, stroke .18s ease;
}
.clip-action-btn .action-avatar {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.clip-action-btn:hover .action-icon { background: rgba(255,255,255,.3); transform: scale(1.1); }
.clip-action-btn.liked .action-icon {
  background: rgba(255,45,85,.24);
  color: #ff5c80;
}
.clip-sound-btn.active .action-icon {
  background: rgba(0,229,255,.24);
  color: #8ff5ff;
}
.clip-action-btn.liked .action-icon svg path {
  fill: currentColor;
  stroke: currentColor;
}
.clip-action-count { font-size: 10px; opacity: .94; font-weight: 700; }

/* Nav bas ClipFlow */
.clip-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 8px 8px 18px;
  background: #050505;
  border-top: 1px solid #1a1a1a;
  flex-shrink: 0;
}
#view-clipflow.clip-home-shell .clip-bottom-nav {
  padding: 9px 6px 13px;
  background: #000;
  border-top: 1px solid rgba(255,255,255,.1);
}
#view-clipflow.clip-home-shell .clip-nav-item {
  font-size: 11px;
  gap: 3px;
  opacity: .72;
}
#view-clipflow.clip-home-shell .clip-nav-item svg {
  width: 28px;
  height: 28px;
}
#view-clipflow.clip-home-shell .clip-nav-item.active {
  opacity: 1;
}
.clip-nav-item {
  border: none;
  background: none;
  color: #fff;
  opacity: .58;
  cursor: pointer;
  text-align: center;
  font-family: var(--font-main);
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 54px;
  font-size: 9px;
}
.clip-nav-item svg {
  width: 23px;
  height: 23px;
  display: block;
}
.clip-nav-item.active { opacity: 1; }
.clip-nav-item-create { opacity: 1; }
.clip-plus-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 5px;
  border-radius: 8px;
  background: linear-gradient(90deg, #25f4ee 0 18%, #ffffff 18% 82%, #fe2c55 82% 100%);
}
.clip-plus {
  width: 24px;
  height: 22px;
  background: white;
  color: black;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  border-radius: 6px;
}
#view-clipflow.clip-light-shell .clip-bottom-nav {
  background: #fff;
  border-top: 1px solid #eceef3;
}
#view-clipflow.clip-light-shell .clip-nav-item {
  color: #111827;
  opacity: .48;
}
#view-clipflow.clip-light-shell .clip-nav-item.active {
  opacity: 1;
}
.clip-settings-screen {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 12px 12px;
}
.clip-settings-title {
  margin: 0 0 8px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}
.clip-settings-list {
  border: 1px solid #eceef3;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.clip-settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid #eceef3;
}
.clip-settings-row:first-child {
  border-top: none;
}
.clip-settings-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.clip-settings-copy strong {
  font-size: 14px;
  color: #101828;
}
.clip-settings-copy span {
  font-size: 11px;
  line-height: 1.45;
  color: #64748b;
}
.clip-settings-chevron {
  font-size: 16px;
  color: #94a3b8;
}

.clip-activity-screen {
  min-height: 100%;
  background: #fff;
}
.clip-activity-filters {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
}
.clip-activity-filters span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f4f7;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
}
.clip-activity-filters .active {
  background: #111827;
  color: #fff;
}
.clip-activity-list {
  border-top: 1px solid #eceef3;
}
.clip-activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border-bottom: 1px solid #f1f3f7;
}
.clip-activity-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d6d9e2, #f3f4f7);
  color: #475467;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.clip-activity-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.clip-activity-copy strong {
  font-size: 14px;
  color: #101828;
}
.clip-activity-copy span {
  font-size: 11px;
  line-height: 1.45;
  color: #64748b;
}
.clip-activity-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.clip-activity-side em {
  font-style: normal;
  font-size: 10px;
  color: #98a2b3;
}
.clip-activity-side button {
  border: 1px solid #ff4d67;
  background: #fff;
  color: #ff3152;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-main);
}
.clip-activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d0d5dd;
}

.clip-camera-screen {
  min-height: 100%;
  background: linear-gradient(180deg, #050506, #0d0d10 55%, #050506);
  color: #fff;
  padding: 0 14px 18px;
  position: relative;
}
.clip-camera-preview {
  min-height: 368px;
  margin: 0 48px 18px 0;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.08);
  background: radial-gradient(circle at top, rgba(255,255,255,.14), transparent 34%), linear-gradient(180deg, #1e293b, #09090b 65%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.clip-camera-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
  opacity: .28;
}
.clip-camera-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.clip-camera-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: rgba(255,255,255,.6);
}
.clip-camera-copy strong {
  font-size: 20px;
  font-weight: 800;
}
.clip-camera-copy span {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255,255,255,.74);
}
.clip-camera-tools {
  position: absolute;
  top: 92px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.clip-camera-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: rgba(255,255,255,.78);
}
.clip-camera-tool-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
}
.clip-camera-bottom {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.clip-camera-pills,
.clip-camera-tabs {
  display: flex;
  gap: 10px;
}
.clip-camera-pills span,
.clip-camera-tabs span {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.74);
}
.clip-camera-pills .active,
.clip-camera-tabs .active {
  background: rgba(255,255,255,.16);
  color: #fff;
}
.clip-camera-record-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.clip-camera-side-pill {
  min-width: 60px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.76);
}
.clip-record-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,.82);
  background: linear-gradient(135deg, #fe2c55, #ff5d78);
  box-shadow: 0 0 0 8px rgba(255,255,255,.08);
  cursor: pointer;
}

.clip-profile-screen {
  min-height: 100%;
  background: #fff;
}
.clip-profile-hero {
  padding: 8px 14px 18px;
  text-align: center;
}
.clip-profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  margin: 0 auto 10px;
  background: linear-gradient(135deg,#00f0ea,#ff0050);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}
.clip-profile-avatar.has-image {
  background: #f3f4f6;
  overflow: hidden;
}
.clip-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.clip-profile-handle {
  font-size: 15px;
  font-weight: 700;
  color: #101828;
  margin-bottom: 12px;
}
.clip-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.clip-profile-stats div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.clip-profile-stats strong {
  font-size: 15px;
  color: #101828;
}
.clip-profile-stats span {
  font-size: 10px;
  color: #667085;
}
.clip-profile-actions-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 46px;
  gap: 8px;
  margin-top: 14px;
}
.clip-profile-actions-bar button {
  border: 1px solid #dde3ea;
  background: #fff;
  color: #111827;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-main);
}
.clip-profile-bio {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #667085;
}
.clip-profile-note {
  margin-top: 12px;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
}
.clip-profile-note.warn {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
}
.clip-profile-note.error {
  background: #fef2f2;
  color: #b42318;
  border: 1px solid #fda29b;
}
.clip-profile-auth-card {
  margin-top: 14px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  padding: 14px;
  text-align: left;
  background: #f8fafc;
}
.clip-profile-auth-card.success {
  background: linear-gradient(180deg, #f8fffe 0%, #eefcf9 100%);
  border-color: #99f6e4;
}
.clip-profile-auth-card strong {
  display: block;
  font-size: 13px;
  color: #101828;
  margin-bottom: 6px;
}
.clip-profile-auth-card p {
  font-size: 11px;
  line-height: 1.45;
  color: #475467;
}
.clip-profile-auth-card code,
.clip-profile-empty-state code {
  font-family: var(--font-mono);
  font-size: 10px;
}
.clip-profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #eceef3;
  border-bottom: 1px solid #eceef3;
}
.clip-profile-tabs span {
  padding: 11px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #98a2b3;
}
.clip-profile-tabs .active {
  color: #111827;
}
.clip-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.clip-profile-grid.real-grid {
  gap: 6px;
  padding: 6px;
}
.clip-profile-tile {
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: rgba(255,255,255,.92);
  padding: 10px;
}
.clip-profile-tile-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(6px);
}
.clip-profile-tile-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.clip-profile-tile-copy strong {
  font-size: 13px;
  font-weight: 800;
}
.clip-profile-tile-copy span {
  font-size: 10px;
  color: rgba(255,255,255,.78);
}
.clip-profile-tile.real {
  text-decoration: none;
  color: white;
  border-radius: 14px;
  overflow: hidden;
  min-height: 168px;
}
.clip-profile-tile.real img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.clip-profile-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.06) 10%, rgba(0,0,0,.72) 100%);
}
.clip-profile-empty-state {
  grid-column: 1 / -1;
  border: 1px dashed #d0d5dd;
  border-radius: 16px;
  background: #f8fafc;
  color: #475467;
  font-size: 11px;
  line-height: 1.5;
  padding: 18px 14px;
  text-align: center;
}
.clip-profile-actions-bar.auth {
  grid-template-columns: 1fr 1fr;
}

/* Indicateur algo */
.algo-indicator {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.7);
  border: 1px solid rgba(0,229,255,.3);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 9px;
  z-index: 20;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.algo-label { color: var(--accent-blue); margin-right: 4px; }

/* Pop-up pédagogique */
.edu-popup {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.edu-popup-inner {
  background: #1a1a2e;
  border: 1px solid rgba(0,229,255,.3);
  border-radius: 16px;
  padding: 20px;
  max-width: 260px;
  text-align: center;
  animation: popIn .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn {
  from { transform: scale(.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.edu-popup-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: var(--accent-blue); }
.edu-popup-text { font-size: 12px; line-height: 1.5; opacity: .9; margin-bottom: 14px; }
.edu-popup-close {
  background: var(--accent-blue);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-main);
}

/* =============================================
   FLASHGRAM (Instagram)
============================================= */
.flashgram-header {
  background: white;
  color: #111;
  border-bottom: 1px solid #efefef;
}
.fg-logo-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 700;
}
.fg-header-icons {
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.fg-icon-btn,
.fg-sub-back,
.fg-compose-btn,
.fg-thread-call,
.fg-nav-item,
.fg-dm-item,
.fg-profile-actions button,
.fg-thread-send {
  border: none;
  background: none;
  font-family: var(--font-main);
}
.fg-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #111;
  cursor: pointer;
}
.fg-screen {
  display: none;
  flex: 1;
  min-height: 0;
  background: #fff;
}
.fg-screen.active {
  display: flex;
  flex-direction: column;
}
.fg-explore-scroll,
.fg-reels-scroll {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  scrollbar-width: none;
}
.fg-explore-scroll::-webkit-scrollbar,
.fg-reels-scroll::-webkit-scrollbar { display: none; }
.fg-create-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff, #faf7ff);
  padding: 20px;
}
.fg-explore-search {
  margin: 12px 12px 10px;
  border-radius: 14px;
  background: #f3f4f7;
  padding: 12px 14px;
  font-size: 12px;
  color: #7b7b7b;
}
.fg-explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.fg-explore-tile {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  background: #efefef;
  cursor: pointer;
}
.fg-explore-tile.tall {
  grid-row: span 2;
  aspect-ratio: auto;
  min-height: 220px;
}
.fg-explore-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fg-explore-fill {
  width: 100%;
  height: 100%;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  color: #fff;
}
.fg-explore-fill strong,
.fg-explore-overlay strong {
  font-size: 13px;
  font-weight: 700;
}
.fg-explore-fill span {
  font-size: 10px;
  opacity: .82;
}
.fg-explore-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 10px 10px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.58));
  color: white;
}
.fg-create-card {
  width: 100%;
  max-width: 250px;
  background: #fff;
  border: 1px solid #ece7f5;
  border-radius: 24px;
  padding: 26px 18px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(145, 99, 255, .08);
}
.fg-create-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 22px;
  background: linear-gradient(135deg,#ff8a5b,#d6249f 72%,#285AEB);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
}
.fg-create-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
}
.fg-create-copy {
  font-size: 12px;
  line-height: 1.5;
  color: #6f6f6f;
}
.fg-create-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.fg-create-actions button {
  border: none;
  border-radius: 999px;
  background: #f4f4f6;
  color: #111;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.fg-reels-scroll {
  background: #050505;
  padding-bottom: 12px;
  scroll-snap-type: y mandatory;
}
.fg-reel-card {
  position: relative;
  min-height: 100%;
  height: 100%;
  margin-bottom: 0;
  overflow: hidden;
  background: #111;
  scroll-snap-align: start;
}
.fg-reel-video {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
}
.fg-reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.68));
}
.fg-reel-copy {
  position: absolute;
  left: 14px;
  right: 90px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: white;
}
.fg-reel-copy strong {
  font-size: 14px;
}
.fg-reel-copy span {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255,255,255,.84);
}
.fg-reel-actions {
  position: absolute;
  right: 14px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: white;
}
.fg-reel-actions div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.fg-reel-actions b {
  font-size: 12px;
}
.fg-reel-actions span {
  font-size: 9px;
  opacity: .76;
}
.fg-sound-btn {
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,.54);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.fg-sound-btn svg {
  width: 15px;
  height: 15px;
}
.fg-sound-btn.active {
  background: rgba(0,149,246,.9);
}

/* Stories */
.fg-stories {
  display: flex;
  gap: 10px;
  padding: 10px 12px 12px;
  overflow-x: auto;
  background: white;
  border-bottom: 1px solid #eee;
  scrollbar-width: none;
  flex-shrink: 0;
}
.fg-stories::-webkit-scrollbar { display: none; }
.fg-story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.fg-story-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  padding: 2.5px;
  transition: transform .2s;
}
.fg-story-ring:hover { transform: scale(1.08); }
.fg-story-ring.seen {
  background: #ccc;
}
.fg-story-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .08em;
  overflow: hidden;
}
.fg-story-username { font-size: 9px; color: #333; max-width: 54px; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Feed FlashGram */
.fg-feed {
  flex: 1;
  overflow-y: auto;
  background: white;
  color: #111;
  scrollbar-width: none;
}
.fg-feed::-webkit-scrollbar { display: none; }

.fg-post { border-bottom: 1px solid #f0f0f0; margin-bottom: 10px; background: white; }
.fg-post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.fg-post-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.fg-post-user { font-size: 12px; font-weight: 700; color: #111; flex: 1; }
.fg-post-more { font-size: 18px; color: #555; cursor: pointer; }
.fg-post-image {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.fg-post-image.is-video {
  background: #050505;
}
.fg-post-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050505;
}
.fg-post-video-overlay {
  position: absolute;
  inset: auto 0 0 0;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.16));
  pointer-events: none;
}
.fg-post-stage > .fg-sound-btn {
  position: absolute;
  right: 14px;
  bottom: 54px;
  z-index: 4;
}
.fg-post-cover-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #111;
  text-align: center;
}
.fg-post-cover-text b {
  font-size: 44px;
  letter-spacing: .12em;
}
.fg-post-cover-text span {
  font-size: 12px;
  letter-spacing: .35em;
  text-transform: uppercase;
  opacity: .72;
}
.fg-post-location {
  font-size: 10px;
  color: #555;
  margin-top: 2px;
}
.fg-post-actions {
  display: flex;
  gap: 14px;
  padding: 10px 12px 6px;
  font-size: 18px;
  color: #111;
  align-items: center;
}
.fg-post-actions .save { margin-left: auto; }
.fg-post-action { cursor: pointer; transition: transform .2s; }
.fg-post-action:hover { transform: scale(1.2); }
.fg-post-likes { font-size: 11px; font-weight: 700; padding: 0 12px 4px; color: #111; }
.fg-post-caption { font-size: 11px; padding: 0 12px 4px; color: #111; line-height: 1.4; }
.fg-post-comments { font-size: 10px; color: #888; padding: 0 12px 8px; cursor: pointer; }
.fg-post-time { font-size: 9px; color: #aaa; padding: 0 12px 10px; text-transform: uppercase; }
.fg-inbox-header,
.fg-thread-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #efefef;
  background: #fff;
}
.fg-inbox-title,
.fg-thread-name {
  font-size: 15px;
  font-weight: 700;
  color: #111;
}
.fg-inbox-subtitle,
.fg-thread-status {
  font-size: 10px;
  color: #888;
  margin-top: 2px;
}
.fg-sub-back,
.fg-compose-btn,
.fg-thread-call {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f6f6f6;
  color: #111;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fg-dm-list,
.fg-thread-messages,
.fg-profile-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}
.fg-dm-list::-webkit-scrollbar,
.fg-thread-messages::-webkit-scrollbar,
.fg-profile-scroll::-webkit-scrollbar { display: none; }
.fg-dm-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #f2f2f2;
  cursor: pointer;
  text-align: left;
}
.fg-dm-avatar,
.fg-thread-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.fg-dm-main { flex: 1; min-width: 0; }
.fg-dm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.fg-dm-name { font-size: 13px; font-weight: 700; color: #111; }
.fg-dm-time,
.fg-dm-preview { font-size: 11px; color: #7a7a7a; }
.fg-dm-preview {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fg-dm-item.unread .fg-dm-name,
.fg-dm-item.unread .fg-dm-preview { color: #111; }
.fg-dm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3797f0;
  flex-shrink: 0;
}
.fg-dm-camera {
  font-size: 12px;
  font-weight: 700;
  color: #999;
}
.fg-thread-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.fg-thread-messages {
  padding: 16px 14px;
  background: linear-gradient(180deg, #fff, #fbfbfb);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fg-thread-bubble {
  max-width: 78%;
  padding: 12px 14px 18px;
  border-radius: 20px;
  font-size: 12px;
  line-height: 1.45;
  position: relative;
}
.fg-thread-bubble.them {
  align-self: flex-start;
  background: #f1f1f1;
  color: #111;
}
.fg-thread-bubble.me {
  align-self: flex-end;
  background: #3797f0;
  color: #fff;
}
.fg-thread-bubble span {
  position: absolute;
  right: 12px;
  bottom: 6px;
  font-size: 9px;
  opacity: .72;
}
.fg-thread-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 16px;
  border-top: 1px solid #efefef;
  background: #fff;
  pointer-events: auto;
}
.fg-thread-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 11px 14px;
  font-size: 12px;
  font-family: var(--font-main);
  outline: none;
  pointer-events: auto;
  user-select: text;
}
.fg-thread-send {
  background: #3797f0;
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}
.fg-thread-send:disabled,
.fg-thread-send.disabled {
  opacity: .55;
  cursor: not-allowed;
}
.fg-profile-scroll {
  padding: 14px;
  background: #fff;
}
.fg-profile-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.fg-profile-avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd7d7, #f8d7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  flex-shrink: 0;
}
.fg-profile-stats {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fg-profile-stat {
  text-align: center;
  color: #111;
}
.fg-profile-stat b {
  display: block;
  font-size: 15px;
}
.fg-profile-stat span,
.fg-profile-bio p,
.fg-profile-bio span {
  font-size: 11px;
  color: #666;
}
.fg-profile-name {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
}
.fg-profile-bio { margin-bottom: 14px; }
.fg-profile-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.fg-profile-actions button {
  flex: 1;
  background: #f4f4f4;
  border-radius: 10px;
  padding: 10px 12px;
  color: #111;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.fg-profile-highlights {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}
.fg-highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #444;
}
.fg-highlight span {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.fg-profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  border-top: 1px solid #efefef;
  border-bottom: 1px solid #efefef;
  margin-bottom: 2px;
}
.fg-profile-tabs span {
  padding: 10px 0;
  color: #888;
}
.fg-profile-tabs span.active {
  color: #111;
  font-weight: 700;
}
.fg-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.fg-profile-tile {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #fff;
}
.fg-profile-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fg-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0 14px;
  background: #fff;
  border-top: 1px solid #efefef;
  flex-shrink: 0;
}
.fg-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #111;
  opacity: .9;
  cursor: pointer;
}
.fg-nav-item svg {
  width: 22px;
  height: 22px;
  display: block;
}
.fg-nav-item.active { opacity: 1; }

/* Note pédagogique FlashGram */
.fg-edu-note {
  font-size: 10px;
  background: #fff8e1;
  border-top: 1px solid #ffe082;
  color: #6d4c41;
  padding: 8px 12px;
  line-height: 1.5;
  flex-shrink: 0;
}

/* FlashGram home mode override */
#view-flashgram.fg-home-mode {
  background: #05080d;
}
#view-flashgram.fg-home-mode .flashgram-header {
  background: #05080d;
  color: #fff;
  border-bottom: none;
  padding: 12px 14px 10px;
  position: relative;
}
#view-flashgram .fg-logo-title {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fg-title-chevron {
  font-size: 16px;
  line-height: 1;
}
#view-flashgram .fg-icon-btn svg {
  width: 24px;
  height: 24px;
  display: block;
}
#view-flashgram.fg-home-mode .fg-icon-btn,
#view-flashgram.fg-home-mode .fg-logo-title {
  color: #fff;
}
#view-flashgram.fg-home-mode .fg-logo-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.fg-header-btn {
  width: 36px;
  height: 36px;
}
#fgHomeScreen {
  position: relative;
  background: #05080d;
}
#view-flashgram.fg-home-mode .fg-stories {
  gap: 14px;
  padding: 8px 14px 14px;
  background: #05080d;
  border-bottom: none;
}
#view-flashgram.fg-home-mode .fg-story-ring {
  width: 82px;
  height: 82px;
  padding: 4px;
}
.fg-story-ring-me {
  background: transparent;
}
#view-flashgram.fg-home-mode .fg-story-inner {
  border: 2px solid #05080d;
  background: #1d222b;
}
.fg-story-me {
  position: relative;
  background: #f5f5f7;
}
.fg-story-me-head,
.fg-story-me-body {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #a5abb6;
}
.fg-story-me-head {
  top: 18px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.fg-story-me-body {
  bottom: 10px;
  width: 44px;
  height: 24px;
  border-radius: 24px 24px 14px 14px;
}
.fg-story-add-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #05080d;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}
#view-flashgram.fg-home-mode .fg-story-username {
  max-width: 84px;
  font-size: 10px;
  color: rgba(255,255,255,.92);
}
#view-flashgram.fg-home-mode .fg-feed {
  background: #05080d;
  padding-bottom: 120px;
}
#view-flashgram.fg-home-mode .fg-post {
  border-bottom: none;
  margin-bottom: 16px;
  background: #05080d;
}
#view-flashgram.fg-home-mode .fg-post-stage {
  min-height: 620px;
  aspect-ratio: auto;
}
#view-flashgram.fg-home-mode .fg-post-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 14px 12px 0;
  gap: 8px;
}
#view-flashgram.fg-home-mode .fg-post-avatar {
  width: 38px;
  height: 38px;
  color: #fff;
  border: 2px solid rgba(255,255,255,.2);
}
#view-flashgram.fg-home-mode .fg-post-video-overlay {
  inset: 0;
  height: auto;
  background: linear-gradient(180deg, rgba(0,0,0,.38) 0%, rgba(0,0,0,.12) 26%, rgba(0,0,0,.06) 44%, rgba(0,0,0,.34) 78%, rgba(0,0,0,.72) 100%);
}
.fg-post-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.fg-post-meta-copy {
  min-width: 0;
  flex: 1;
}
.fg-post-user-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
  color: #fff;
}
.fg-post-user-line strong {
  font-size: 12px;
}
.fg-post-user-line span {
  font-size: 11px;
  color: rgba(255,255,255,.9);
}
#view-flashgram.fg-home-mode .fg-post-location {
  color: rgba(255,255,255,.84);
  font-size: 10px;
}
.fg-follow-pill {
  border: 2px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.12);
  color: #fff;
  border-radius: 18px;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
#view-flashgram.fg-home-mode .fg-post-more {
  color: rgba(255,255,255,.9);
  font-size: 28px;
  line-height: 1;
}
.fg-post-caption-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 3;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: #fff;
  text-shadow: 0 3px 10px rgba(0,0,0,.6);
}
.fg-post-home-footer {
  padding: 12px 14px 4px;
  color: #fff;
}
.fg-post-home-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.fg-home-action {
  border: none;
  background: none;
  color: #fff;
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.fg-home-action svg {
  width: 24px;
  height: 24px;
  display: block;
}
.fg-post-home-likes {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.fg-post-home-comments {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fg-post-home-comment {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255,255,255,.92);
}
.fg-post-home-comment b {
  color: #fff;
}
.fg-post-home-more {
  margin-top: 2px;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  font-size: 10px;
  color: rgba(255,255,255,.56);
  cursor: pointer;
}
.fg-post-home-more.active,
.fg-home-action.active {
  color: #fff;
  opacity: 1;
}
.fg-post-comment-box {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.fg-post-comment-box.open {
  display: block;
}
.fg-post-comment-input {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 11px;
  color: rgba(255,255,255,.52);
}
#view-flashgram .fg-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 12px;
  background: rgba(22,25,30,.94);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 28px;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  backdrop-filter: blur(16px);
}
#view-flashgram #fgInboxScreen.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg,#0b0c0e,#0f1113);
}

/* Inbox - search bar and stories (Instagram-like) */
#view-flashgram #fgInboxScreen .fg-inbox-search {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  background: transparent;
}
#view-flashgram #fgInboxScreen .fg-inbox-search input {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  padding: 12px 14px;
  border-radius: 22px;
  outline: none;
  font-size: 14px;
}

#view-flashgram #fgInboxScreen .fg-inbox-stories {
  display: flex;
  gap: 12px;
  padding: 12px 12px 6px 14px;
  overflow-x: auto;
  align-items: center;
}
#view-flashgram #fgInboxScreen .fg-inbox-story { flex: 0 0 auto; }
#view-flashgram #fgInboxScreen .fg-inbox-story-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(180deg,#1f1f1f,#111);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.88);
  font-size: 12px;
  text-align: center;
  padding: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}

/* Dark DM list styling */
#view-flashgram .fg-dm-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 0 96px;
}
#view-flashgram .fg-dm-item {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  background: transparent;
}
#view-flashgram .fg-dm-avatar { width: 54px; height: 54px; }
#view-flashgram .fg-dm-name { color: #fff; font-size: 15px; }
#view-flashgram .fg-dm-preview, #view-flashgram .fg-dm-time { color: rgba(255,255,255,.6); }
#view-flashgram .fg-dm-dot { background: #2ea0ff; }
#view-flashgram .fg-dm-camera { color: rgba(255,255,255,.45); }

/* subtle search + header adjustments */
#view-flashgram .fg-inbox-header { background: transparent; border-bottom: 0; padding: 10px 14px; }
#view-flashgram .fg-inbox-title { color: #fff; font-size: 18px; }
#view-flashgram .fg-inbox-subtitle { color: rgba(255,255,255,.5); }

/* ensure floating bottom nav remains visible */
#view-flashgram .fg-bottom-nav { bottom: 12px; }

/* small adjustments for very small screens */
@media (max-width:420px) {
  #view-flashgram #fgInboxScreen .fg-inbox-story-avatar { width: 56px; height: 56px; }
  #view-flashgram .fg-dm-avatar { width: 46px; height: 46px; }
  #view-flashgram .fg-inbox-search input { padding: 10px 12px; font-size: 13px; }
}
#view-flashgram .fg-explore-scroll,
#view-flashgram .fg-reels-scroll,
#view-flashgram .fg-profile-scroll,
#view-flashgram .fg-dm-list,
#view-flashgram .fg-thread-messages {
  padding-bottom: 92px;
}
#view-flashgram #fgThreadScreen .fg-thread-input-bar {
  margin-bottom: 92px;
}
#view-flashgram .fg-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 40px;
  border-radius: 999px;
  color: #fff;
  opacity: .92;
  transition: background .18s ease, transform .18s ease;
}
#view-flashgram .fg-nav-item svg {
  width: 24px;
  height: 24px;
}
#view-flashgram .fg-nav-item.active {
  opacity: 1;
  background: rgba(255,255,255,.18);
}
#view-flashgram .fg-nav-item:hover {
  transform: translateY(-1px);
}

/* Bulle comparaison sociale */
.social-compare-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,.6);
  color: white;
  font-size: 9px;
  padding: 3px 7px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  cursor: pointer;
}

/* =============================================
   STORY VIEWER
============================================= */
#view-story { background: #000; z-index: 200; }
.story-viewer {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.story-progress-bars {
  display: flex;
  gap: 4px;
  padding: 8px 10px 0;
  z-index: 10;
}
.story-progress-bar {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,.3);
  border-radius: 2px;
  overflow: hidden;
}
.story-progress-fill {
  height: 100%;
  background: white;
  width: 0%;
  transition: width linear;
}
.story-progress-fill.done { width: 100%; }

.story-back { position: absolute; top: 30px; left: 10px; z-index: 10; }
.story-avatar-top {
  position: absolute;
  top: 24px;
  left: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
  font-size: 12px;
  font-weight: 600;
}
.story-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 2px solid white;
}
.story-time-ago { font-size: 10px; opacity: .6; }

.story-content-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.story-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.story-text-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
}
.story-sticker {
  font-size: 14px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  padding: 8px 16px;
  line-height: 1.4;
  max-width: 240px;
}

.story-tap-zones {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 5;
}
.story-tap-left, .story-tap-right { flex: 1; cursor: pointer; }

.story-reply-bar {
  padding: 10px 14px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 10;
}
.story-reply-input {
  flex: 1;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 24px;
  padding: 8px 14px;
  color: white;
  font-size: 11px;
  font-family: var(--font-main);
  outline: none;
}
.story-reply-input::placeholder { color: rgba(255,255,255,.6); }

/* =============================================
   GHOSTCHAT (Snapchat)
============================================= */
.ghostchat-header {
  background: #fffc00;
  color: #111;
  border-bottom: none;
  padding-top: 20px;
  padding-bottom: 10px;
}
.ghostchat-header .btn-back {
  background: rgba(0,0,0,.88);
  color: #fff;
}
.ghostchat-header .app-header-title {
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13px;
  letter-spacing: .02em;
}
.gc-header-actions {
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  padding: 6px 10px;
}
.gc-tabs {
  display: flex;
  background: #fffc00;
  border-bottom: none;
  flex-shrink: 0;
  gap: 10px;
  justify-content: center;
  padding: 6px 14px 12px;
}
.gc-tab {
  text-align: center;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  transition: color .2s, background .2s, transform .2s;
  background: rgba(0,0,0,.74);
  border-radius: 999px;
}
.gc-tab.active {
  color: #111;
  background: #fff;
  border-bottom: none;
  margin-bottom: 0;
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
}

.gc-content {
  flex: 1;
  overflow-y: auto;
  background: #0b0b0b; /* plus sombre, style Snapchat */
  scrollbar-width: none;
  margin: 0 6px 10px 6px;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 28px rgba(0,0,0,.28);
}
.gc-content::-webkit-scrollbar { display: none; }

/* Item de conversation */
.gc-chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.03);
  cursor: pointer;
  transition: background .12s, transform .12s;
}
.gc-chat-item:hover { background: rgba(255,255,255,.03); transform: translateY(-1px); }
.gc-chat-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 12px rgba(0,0,0,.28);
  position: relative;
  overflow: hidden;
}
.gc-bitmoji-face {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .08em;
  background: radial-gradient(circle at 35% 25%, rgba(255,255,255,.18), transparent 35%);
}
.gc-bitmoji-photo {
  width: 106%;
  height: 106%;
  object-fit: contain;
  display: block;
  transform: scale(1.08);
}
.gc-bitmoji-badge {
  position: absolute;
  left: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #111;
  border: 2px solid #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.gc-chat-info { flex: 1; }
.gc-chat-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.gc-chat-name {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  min-width: 0;
}
.gc-chat-streak {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 800;
  color: #f3f3f3;
  letter-spacing: .01em;
}
.gc-chat-preview { font-size: 12px; color: #9a9aa0; max-width: calc(100% - 120px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-chat-preview-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 16px;
  flex-wrap: wrap;
}
.gc-preview-icon {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}
.gc-preview-icon.snap-red,
.gc-preview-text.snap-red { color: #ff5b57; }
.gc-preview-icon.snap-opened,
.gc-preview-text.snap-opened { color: #a970ff; }
.gc-preview-icon.chat-received,
.gc-preview-text.chat-received,
.gc-preview-icon.chat-opened,
.gc-preview-text.chat-opened,
.gc-preview-icon.chat-sent,
.gc-preview-text.chat-sent { color: #78a8ff; }
.gc-preview-icon.typing,
.gc-preview-text.typing { color: #50d890; }
.gc-preview-text.unread { color: #35a7ff; font-weight: 800; }
.gc-preview-meta {
  color: #a4a4a4;
  font-size: 11px;
  font-weight: 600;
}
.gc-chat-quick-action {
  color: #111;
  font-size: 12px;
  font-weight: 700;
  opacity: 1;
  background: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
  flex-shrink: 0;
}
.gc-chat-status {
  width: 11px; height: 11px; border-radius: 50%;
  flex-shrink: 0;
}
.gc-chat-status.snap-received { background: #ff3b30; }
.gc-chat-status.snap-opened { background: transparent; border: 2px solid #aaa; }
.gc-chat-status.snap-pending { background: #fffc00; border: 1px solid #111; }

/* Time / meta on the right of the row */
.gc-chat-name-row .gc-chat-streak {
  font-size: 12px;
  font-weight: 600;
  color: #bdbdbd;
}

/* small camera icon text replacement if present */
.gc-chat-quick-action::after { content: none; }
.gc-chat-quick-action svg { display: block; width: 18px; height: 18px; }
.gc-chat-quick-action svg path,
.gc-chat-quick-action svg circle { stroke: #111; }

.gc-map-view,
.gc-camera-view,
.gc-discover-view {
  min-height: 100%;
}

.gc-map-view {
  background: linear-gradient(180deg, #f7f9ff, #eef4ff);
}
.gc-map-header {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #111;
}
.gc-map-canvas {
  position: relative;
  height: 420px;
  margin: 0 14px 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 90%, #8fd0ff 0, #8fd0ff 18%, transparent 19%),
    linear-gradient(135deg, #d8ead5 0 45%, #dce9f6 45% 100%);
  overflow: hidden;
}
.gc-map-road {
  position: absolute;
  background: rgba(255,255,255,.95);
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}
.road-a {
  width: 140%;
  height: 16px;
  top: 48%;
  left: -12%;
  transform: rotate(-28deg);
}
.road-b {
  width: 120%;
  height: 14px;
  top: 28%;
  left: -5%;
  transform: rotate(14deg);
}
.gc-map-pin {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fffc00;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0,0,0,.15);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}
.pin-1 { top: 18%; left: 22%; }
.pin-2 { top: 30%; right: 18%; }
.pin-3 { bottom: 24%; left: 42%; }
.pin-4 { bottom: 16%; right: 24%; }

.gc-camera-view {
  position: relative;
  background: linear-gradient(180deg, #6b5b54, #2b2523);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gc-camera-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  color: white;
  font-size: 12px;
  font-weight: 700;
}
.gc-camera-preview {
  width: calc(100% - 24px);
  height: calc(100% - 32px);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255,255,255,.22), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.15)),
    linear-gradient(160deg, #725e56, #3a302c);
  position: relative;
  overflow: hidden;
}
.gc-camera-face {
  position: absolute;
  width: 160px;
  height: 220px;
  border-radius: 90px 90px 70px 70px;
  background: linear-gradient(180deg, #6f4f3d, #c98d68 55%, #7e5a44 100%);
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  box-shadow: 0 24px 40px rgba(0,0,0,.2);
}
.gc-camera-ring {
  position: absolute;
  width: 82px;
  height: 82px;
  border: 4px solid rgba(255,255,255,.9);
  border-radius: 50%;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
}
.gc-camera-tools {
  position: absolute;
  right: 18px;
  top: 62px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.gc-discover-view {
  background: #111;
  color: white;
  padding: 14px;
}
.gc-discover-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}
.gc-discover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.gc-discover-card {
  min-height: 150px;
  border-radius: 20px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(160deg, #3d7cff, #111827);
}
.gc-discover-card.alt {
  background: linear-gradient(160deg, #ff7a59, #441b53);
}
.gc-discover-card.alt2 {
  background: linear-gradient(160deg, #ffd84d, #8f3fff);
}
.gc-discover-card b {
  font-size: 16px;
  margin-bottom: 4px;
}
.gc-discover-card span {
  font-size: 11px;
  opacity: .85;
}

.gc-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 10px 16px;
  background: #050505;
  border-top: none;
  flex-shrink: 0;
  margin: 0 10px;
  border-radius: 0 0 24px 24px;
}
.gc-bottom-item {
  width: auto;
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  opacity: .9;
  background: transparent;
}
.gc-bottom-item svg { display: block; width: 20px; height: 20px; }
.gc-bottom-item[aria-label="Camera"] svg { width: 20px; height: 20px; }
.gc-bottom-item svg path,
.gc-bottom-item svg circle { stroke: rgba(255,255,255,.95); fill: none; }
.gc-bottom-item.active svg path,
.gc-bottom-item.active svg circle { stroke: #fff; }
.gc-bottom-item[aria-label="Camera"] { background: #fff; width: 56px; height: 56px; border-radius: 999px; display:flex; align-items:center; justify-content:center; box-shadow:0 8px 20px rgba(0,0,0,.35); transform: translateY(-6px); }
.gc-bottom-item[aria-label="Camera"] svg path,
.gc-bottom-item[aria-label="Camera"] svg circle { stroke: #051018; }
.gc-bottom-item.active {
  opacity: 1;
  background: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.gc-edu-note {
  font-size: 10px;
  background: #fffc00;
  border-top: none;
  color: rgba(0,0,0,.68);
  padding: 8px 14px 12px;
  line-height: 1.5;
  flex-shrink: 0;
}

/* =============================================
   CONVERSATION
============================================= */
.conv-header-user { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-start; }
.conv-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 6px 12px rgba(0,0,0,.22);
}
.conv-avatar img {
  width: 106%;
  height: 106%;
  object-fit: contain;
  display: block;
  transform: scale(1.08);
}
.conv-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #050505;
  scrollbar-width: none;
  margin: 0 10px;
  border-radius: 28px 28px 0 0;
}
.conv-messages::-webkit-scrollbar { display: none; }

.conv-msg {
  max-width: 86%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
  position: relative;
  animation: msgPop .25s cubic-bezier(.34,1.56,.64,1);
  border-left: 3px solid transparent;
}
@keyframes msgPop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.conv-msg.them { background: #1a1a1a; color: #f3f3f3; align-self: flex-start; border-left-color: #00a6ff; }
.conv-msg.me { background: #151515; color: #f3f3f3; align-self: flex-start; border-left-color: #ff4d7a; }
.conv-msg.disappearing { background: #171717; color: #e8e8e8; font-style: normal; }
.conv-msg.snap-card {
  max-width: 100%;
  width: 100%;
  border-left: none;
  border-radius: 10px;
  background: #171717;
  padding: 12px 14px;
}
.msg-status { font-size: 10px; opacity: .62; margin-top: 5px; text-align: left; }
.msg-disappear-note {
  font-size: 10px;
  color: #8a8a8a;
  text-align: center;
  padding: 4px 0;
  font-style: normal;
}
.snap-state-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.snap-state-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.snap-state-title {
  font-size: 13px;
  font-weight: 700;
  color: #f3f3f3;
  line-height: 1.1;
}
.snap-state-subtitle {
  margin-top: 3px;
  font-size: 10px;
  color: #8f8f8f;
  line-height: 1.2;
}
.snap-state-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.snap-state-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.snap-state-icon.received { color: #ff4b55; }
.snap-state-icon.sent { color: #b25cff; }

.conv-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 14px;
  background: #050505;
  border-top: none;
  flex-shrink: 0;
  margin: 0 10px;
  border-radius: 0 0 24px 24px;
}
.conv-input {
  flex: 1;
  background: #111;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 12px;
  font-family: var(--font-main);
  outline: none;
  color: #fff;
}
.conv-input::placeholder { color: rgba(255,255,255,.5); }
.conv-send {
  width: 38px;
  height: 38px;
  background: #fffc00;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  color: #111;
}
.conv-send svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  transform: translateX(1px);
}
.conv-send:disabled {
  opacity: .45;
  cursor: default;
}

/* =============================================
   NOTIFICATIONS
============================================= */
.notifs-header { background: #111; color: white; }
.notifs-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: none;
}
.notifs-list::-webkit-scrollbar { display: none; }

.notif-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.05);
  border-radius: 12px;
  padding: 10px 12px;
  border-left: 3px solid transparent;
  animation: notifSlide .3s ease both;
  cursor: pointer;
  transition: background .2s;
}
.notif-item:hover { background: rgba(255,255,255,.1); }
@keyframes notifSlide { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.notif-icon { font-size: 22px; flex-shrink: 0; width: 36px; text-align: center; }
.notif-info { flex: 1; }
.notif-title { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.notif-desc { font-size: 10px; opacity: .7; line-height: 1.3; }
.notif-time { font-size: 9px; opacity: .5; }
.notif-dot { width: 8px; height: 8px; background: #ff2d55; border-radius: 50%; flex-shrink: 0; }

.notif-item.clipflow { border-left-color: #00f0ea; }
.notif-item.flashgram { border-left-color: #e91e63; }
.notif-item.ghostchat { border-left-color: #f9a825; }
.notif-item.system { border-left-color: #888; }

.notifs-edu-note {
  font-size: 10px;
  background: rgba(255,45,85,.1);
  border-top: 1px solid rgba(255,45,85,.2);
  color: rgba(255,255,255,.7);
  padding: 8px 12px;
  line-height: 1.5;
  flex-shrink: 0;
}

/* =============================================
   DATATRACK
============================================= */
.datatrack-header { background: #0f2027; color: #00e5ff; }
.datatrack-content {
  flex: 1;
  overflow-y: auto;
  background: #0d1117;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}
.datatrack-content::-webkit-scrollbar { display: none; }

.data-section {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(0,229,255,.15);
  border-radius: 14px;
  padding: 12px;
}
.data-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.data-big-stat {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

/* Barres temps d'écran */
.screen-time-bars {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 40px;
}
.stb-bar {
  flex: 1;
  background: var(--accent-blue);
  border-radius: 3px 3px 0 0;
  opacity: .7;
  transition: opacity .2s;
}
.stb-bar:hover { opacity: 1; }

/* Tags centres d'intérêt */
.data-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.data-tag {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid;
}

/* Grille stats */
.data-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.data-stat {
  text-align: center;
  background: rgba(255,255,255,.05);
  border-radius: 10px;
  padding: 8px 4px;
}
.data-stat-num {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: white;
}
.data-stat-label { font-size: 8px; opacity: .6; margin-top: 2px; }

/* Localisation */
.data-location {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  opacity: .8;
}
.location-dot {
  width: 10px;
  height: 10px;
  background: #4caf50;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(76,175,80,.2);
  animation: locationPulse 2s infinite;
  flex-shrink: 0;
}
@keyframes locationPulse { 0%,100% { box-shadow: 0 0 0 4px rgba(76,175,80,.2); } 50% { box-shadow: 0 0 0 8px rgba(76,175,80,.05); } }

.data-edu-box {
  background: rgba(255,193,7,.08);
  border: 1px solid rgba(255,193,7,.2);
  border-radius: 12px;
  padding: 12px;
  font-size: 11px;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
}

/* DataTrack iPhone-like overrides */
.datatrack-header {
  background: #f6f7fb;
  color: #111827;
  border-bottom: 1px solid rgba(15,23,42,.08);
}
.datatrack-header .btn-back {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #3b82f6;
  font-size: 20px;
  padding: 0;
}
.datatrack-header .btn-back:hover { background: transparent; }
.datatrack-header .app-header-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 17px;
  font-weight: 700;
}
.dt-header-action {
  font-size: 12px;
  color: #3b82f6;
  font-weight: 600;
}
.datatrack-content {
  background: #f3f4f8;
  padding: 10px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dt-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 2px;
  background: #e6eaf4;
  border-radius: 10px;
}
.dt-segment {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #5b6b8b;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background .18s ease, color .18s ease;
}
.dt-segment.active {
  background: #4f8df7;
  color: white;
}
.dt-summary-card,
.dt-list-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.06);
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
.dt-summary-card {
  padding: 14px 14px 12px;
}
.dt-summary-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.dt-summary-device {
  font-size: 19px;
  font-weight: 700;
  color: #111827;
}
.dt-summary-updated {
  font-size: 11px;
  color: #9098a8;
}
.dt-summary-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9aa1af;
}
.dt-main-time {
  margin-top: 4px;
  font-size: 38px;
  font-weight: 700;
  color: #121826;
  letter-spacing: -.04em;
}
.dt-main-caption {
  margin-top: 2px;
  font-size: 13px;
  color: #7d8697;
}
.dt-week-chart {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  margin-top: 16px;
  min-height: 152px;
}
.dt-week-chart.single-day {
  justify-content: center;
}
.dt-week-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  cursor: pointer;
  border-radius: 12px;
  padding: 6px 3px;
  transition: background .18s ease, transform .18s ease;
}
.dt-week-col-single {
  max-width: 84px;
  width: 84px;
  flex: 0 0 auto;
  cursor: default;
}
.dt-week-col-single:hover {
  background: rgba(79, 141, 247, .10);
}
.dt-week-col:hover {
  background: rgba(79, 141, 247, .06);
}
.dt-week-col.active {
  background: rgba(79, 141, 247, .10);
}
.dt-week-col.active .dt-week-day {
  color: #2f69df;
}
.dt-week-day {
  font-size: 10px;
  font-weight: 700;
  color: #97a0b2;
}
.dt-week-stack {
  width: 100%;
  max-width: 28px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  border-radius: 9px 9px 4px 4px;
  overflow: hidden;
  background: #edf1f8;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.04);
}
.dt-week-col.active .dt-week-stack {
  box-shadow: inset 0 0 0 1px rgba(79,141,247,.24), 0 10px 20px rgba(79,141,247,.12);
}
.dt-week-segment {
  width: 100%;
  display: block;
}
.dt-week-segment.social { background: #4f8df7; }
.dt-week-segment.creative { background: #7a6cff; }
.dt-week-segment.productive { background: #ff9f2d; }
.dt-week-segment.other { background: #d8deeb; }
.dt-category-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf1f7;
}
.dt-category-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dt-category-name {
  font-size: 11px;
  font-weight: 700;
}
.dt-category-item strong {
  font-size: 13px;
  color: #111827;
}
.dt-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf1f7;
  font-size: 13px;
  color: #5f687a;
}
.dt-total-row strong {
  color: #111827;
  font-size: 15px;
}
.dt-list-card {
  padding: 12px 14px;
}
.dt-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.dt-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #98a0af;
}
.dt-card-link {
  font-size: 11px;
  font-weight: 700;
  color: #4f8df7;
}
.dt-app-list,
.dt-settings-list {
  display: flex;
  flex-direction: column;
}
.dt-app-row,
.dt-setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid #eef2f8;
}
.dt-app-row {
  margin: 0 -6px;
  padding: 11px 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.dt-app-row:hover {
  background: #f7f9fc;
}
.dt-app-row.active {
  background: #eef5ff;
}
.dt-app-row.active .dt-app-time {
  color: #2c68dd;
}
.dt-app-row.active .dt-app-bar span {
  background: linear-gradient(90deg, #7da9ff, #2f69df);
}
.dt-app-row:first-child,
.dt-setting-item:first-child { border-top: none; }
.dt-app-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.dt-app-icon,
.dt-setting-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.dt-app-icon.youtube { background: #111111; }
.dt-app-icon.instagram { background: linear-gradient(135deg,#ff6f61,#c837ab 70%,#6a5cff); }
.dt-app-icon.snapchat { background: #ffcf1f; color: #1a1a1a; }
.dt-app-icon.messages { background: #32d74b; }
.dt-app-icon.browser { background: #4f8df7; }
.dt-setting-icon.purple { background: #7a6cff; }
.dt-setting-icon.orange { background: #ff9f2d; }
.dt-setting-icon.green { background: #32b76b; }
.dt-setting-icon.red { background: #ff5b57; }
.dt-app-copy,
.dt-setting-copy {
  min-width: 0;
  flex: 1;
}
.dt-app-copy strong,
.dt-setting-copy strong {
  font-size: 14px;
  color: #111827;
}
.dt-setting-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dt-setting-copy span {
  font-size: 11px;
  color: #818a9b;
  line-height: 1.3;
}
.dt-app-bar {
  margin-top: 4px;
  width: 100%;
  height: 4px;
  background: #edf1f8;
  border-radius: 999px;
  overflow: hidden;
}
.dt-app-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8fb5ff, #4f8df7);
}
.dt-app-time {
  font-size: 12px;
  font-weight: 600;
  color: #70798c;
  flex-shrink: 0;
}
.dt-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dt-detail-app {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dt-detail-card .dt-app-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 12px;
}
.dt-detail-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dt-detail-copy strong {
  font-size: 15px;
  color: #111827;
}
.dt-detail-copy span {
  font-size: 12px;
  color: #7b8495;
  line-height: 1.35;
}
.dt-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dt-detail-stat {
  background: #f6f8fc;
  border: 1px solid #e6ebf5;
  border-radius: 14px;
  padding: 12px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.dt-detail-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -.03em;
}
.dt-detail-stat-label {
  font-size: 11px;
  color: #7f8898;
  line-height: 1.35;
}
.dt-setting-chevron {
  color: #b0b7c3;
  font-size: 18px;
  line-height: 1;
}
.data-edu-box {
  background: #fff7dd;
  border: 1px solid rgba(228,186,62,.28);
  border-radius: 14px;
  padding: 12px;
  font-size: 11px;
  color: #6d5a1c;
  line-height: 1.5;
}

/* =============================================
   ALGOVIEW
============================================= */
.algoview-header { background: #1a0533; color: white; }
.algoview-content {
  flex: 1;
  overflow-y: auto;
  background: linear-gradient(160deg, #0d0020, #1a0040);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: none;
}
.algoview-content::-webkit-scrollbar { display: none; }

.algo-title {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: white;
}
.algo-live-card,
.algo-section-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 14px;
}
.algo-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #b9b3ff;
  margin-bottom: 8px;
  font-weight: 700;
}
.algo-live-headline {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  color: #fff;
}
.algo-live-copy {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,.82);
}

.algo-schema {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.algo-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: algoStepIn .5s ease forwards;
  width: 100%;
}
.algo-step[data-delay="0"] { animation-delay: .1s; }
.algo-step[data-delay="1"] { animation-delay: .4s; }
.algo-step[data-delay="2"] { animation-delay: .7s; }
.algo-step[data-delay="3"] { animation-delay: 1s; }
.algo-step[data-delay="4"] { animation-delay: 1.3s; }

@keyframes algoStepIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.algo-step-icon {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 2px solid rgba(255,255,255,.15);
}
.algo-step.highlight .algo-step-icon {
  background: linear-gradient(135deg, rgba(127,0,255,.4), rgba(225,0,255,.4));
  border-color: rgba(225,0,255,.5);
  box-shadow: 0 0 20px rgba(225,0,255,.3);
}
.algo-step-label { font-size: 11px; margin: 6px 0 4px; font-weight: 600; text-align: center; }
.algo-arrow { font-size: 16px; opacity: .5; margin: 0; }

.algo-bubble-box {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 12px;
}
.algo-bubble-title { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.algo-bubble-box p { font-size: 11px; line-height: 1.5; opacity: .85; }
.algo-section-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}
.algo-signal-list,
.algo-score-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.algo-signal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}
.algo-signal-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.algo-signal-name {
  font-size: 13px;
  color: #fff;
}
.algo-signal-note {
  font-size: 10px;
  line-height: 1.35;
  color: rgba(255,255,255,.64);
}
.algo-signal-meta {
  font-size: 10px;
  font-weight: 700;
  color: #ffb6ff;
  text-align: right;
  flex-shrink: 0;
}
.algo-score-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}
.algo-score-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}
.algo-score-head strong {
  color: #fff;
}
.algo-score-head span {
  color: #c7bbff;
  font-weight: 700;
}
.algo-score-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.algo-score-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8c7bff, #f355ff);
}
.algo-score-why {
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.45;
  color: rgba(255,255,255,.68);
}
.algo-empty-state {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.68);
  font-size: 11px;
  line-height: 1.5;
}

.algo-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.algo-stat-item {
  background: rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.algo-stat-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: #e100ff;
}
.algo-stat-desc { font-size: 10px; opacity: .7; margin-top: 4px; line-height: 1.3; }

.algo-conclusion {
  background: rgba(255,45,85,.1);
  border: 1px solid rgba(255,45,85,.25);
  border-radius: 12px;
  padding: 12px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255,255,255,.85);
}

/* AlgoView modern override */
.algoview-header {
  background: linear-gradient(180deg, #0d1023, #131834);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.algoview-content {
  background:
    radial-gradient(circle at top right, rgba(111,82,255,.24), transparent 32%),
    radial-gradient(circle at top left, rgba(0,228,255,.12), transparent 26%),
    linear-gradient(180deg, #080b18, #11172c 55%, #0c1120);
  padding: 18px 14px 22px;
  gap: 16px;
}
.algo-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.algo-topline {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #89a2ff;
  font-weight: 700;
}
.algo-title {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -.04em;
  text-align: left;
}
.algo-subtitle {
  margin-top: -6px;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,.74);
}
.algo-hero-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(22,29,58,.96), rgba(14,19,39,.94)),
    rgba(255,255,255,.04);
  border: 1px solid rgba(144,161,255,.22);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 24px 44px rgba(0,0,0,.28);
}
.algo-hero-card::after {
  content: '';
  position: absolute;
  top: -36px;
  right: -30px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125,92,255,.42), rgba(125,92,255,0));
  pointer-events: none;
}
.algo-hero-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  color: #dce2ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.algo-live-headline {
  position: relative;
  margin-top: 12px;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.04em;
}
.algo-live-copy {
  position: relative;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,.82);
}
.algo-metric-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.algo-metric-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.07);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.algo-metric-card strong {
  font-size: 20px;
  line-height: 1;
  color: #fff;
}
.algo-metric-card span {
  font-size: 10px;
  color: rgba(255,255,255,.62);
}
.algo-section-card,
.algo-note-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 18px 32px rgba(0,0,0,.18);
}
.algo-section-title,
.algo-note-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #c7d0ff;
  font-weight: 700;
  margin-bottom: 10px;
}
.algo-example-card {
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(118,92,255,.16), rgba(0,217,255,.08));
  border: 1px solid rgba(150,163,255,.16);
}
.algo-example-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.algo-example-copy {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,.82);
}
.algo-dominance-line {
  margin-top: 10px;
  font-size: 11px;
  color: #b9c6ff;
}
.algo-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.algo-breakdown-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.algo-breakdown-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.algo-breakdown-main strong {
  font-size: 14px;
  color: #fff;
}
.algo-breakdown-main span {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255,255,255,.64);
}
.algo-breakdown-math {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.algo-mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(118,92,255,.18);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 10px;
  font-weight: 700;
  color: #f1f3ff;
}
.algo-mini-pill.muted {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.8);
}
.algo-mini-pill.total {
  background: rgba(0,228,255,.14);
  color: #c9fbff;
}
.algo-flow-grid {
  display: grid;
  gap: 10px;
}
.algo-flow-step {
  opacity: 0;
  animation: algoModernIn .45s ease forwards;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.algo-flow-step[data-delay="0"] { animation-delay: .06s; }
.algo-flow-step[data-delay="1"] { animation-delay: .15s; }
.algo-flow-step[data-delay="2"] { animation-delay: .24s; }
.algo-flow-step[data-delay="3"] { animation-delay: .33s; }
.algo-flow-step[data-delay="4"] { animation-delay: .42s; }
@keyframes algoModernIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.algo-flow-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(118,92,255,.34), rgba(0,217,255,.16));
  border: 1px solid rgba(255,255,255,.1);
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}
.algo-flow-title {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.algo-flow-copy {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.55;
  color: rgba(255,255,255,.72);
}
.algo-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.algo-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.algo-history-tag {
  min-width: 48px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
}
.algo-history-tag.like {
  background: rgba(255,92,146,.18);
  color: #ffb9d1;
}
.algo-history-tag.view {
  background: rgba(0,228,255,.14);
  color: #bdf9ff;
}
.algo-history-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.algo-history-copy strong {
  font-size: 13px;
  color: #fff;
}
.algo-history-copy span {
  font-size: 10px;
  line-height: 1.4;
  color: rgba(255,255,255,.64);
}
.algo-history-weight {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}
.algo-score-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.algo-score-card {
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.04);
}
.algo-score-track {
  height: 10px;
}
.algo-score-fill {
  background: linear-gradient(90deg, #7d6bff, #f355ff);
}
.algo-note-card p,
.algo-conclusion {
  font-size: 12px;
  line-height: 1.6;
}
.algo-note-card p {
  color: rgba(255,255,255,.82);
}
.algo-empty-state {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.12);
}

/* AlgoView simple override */
.algo-simple-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.algo-simple-hero,
.algo-simple-card,
.algo-simple-note {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 16px 30px rgba(0,0,0,.18);
}
.algo-simple-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #9ab0ff;
  font-weight: 700;
}
.algo-simple-title {
  margin-top: 8px;
  font-size: 23px;
  line-height: 1.1;
  letter-spacing: -.04em;
  color: #fff;
  font-weight: 800;
}
.algo-simple-copy {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,.82);
}
.algo-simple-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.algo-simple-stat {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.algo-simple-stat.wide {
  grid-column: 1 / -1;
}
.algo-simple-stat strong {
  font-size: 22px;
  color: #fff;
  line-height: 1;
}
.algo-simple-stat span {
  font-size: 10px;
  color: rgba(255,255,255,.64);
}
.algo-simple-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #c7d0ff;
  font-weight: 700;
  margin-bottom: 10px;
}
.algo-simple-formula-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.algo-simple-formula-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 11px;
  font-weight: 700;
  color: #e5e7ff;
}
.algo-simple-formula-pill.strong {
  background: rgba(118,92,255,.18);
  color: #fff;
}
.algo-simple-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.algo-simple-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
.algo-simple-badge {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(118,92,255,.5), rgba(0,217,255,.22));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.algo-simple-step strong {
  display: block;
  font-size: 13px;
  color: #fff;
}
.algo-simple-step p {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255,255,255,.72);
}
.algo-simple-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.algo-simple-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
.algo-simple-row-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.algo-simple-row-copy strong {
  font-size: 13px;
  color: #fff;
}
.algo-simple-row-copy span {
  font-size: 10px;
  line-height: 1.4;
  color: rgba(255,255,255,.68);
}
.algo-simple-row-formula {
  font-size: 10px;
  font-weight: 700;
  color: #c9d4ff;
}
.algo-simple-row-score {
  width: 96px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-end;
  flex-shrink: 0;
}
.algo-simple-row-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.algo-simple-row-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7d6bff, #f355ff);
}
.algo-simple-row-score em {
  font-style: normal;
  font-size: 10px;
  color: #dfe4ff;
  font-weight: 700;
}
.algo-simple-empty {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.12);
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255,255,255,.72);
}
.algo-simple-note {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,.84);
}

/* =============================================
   LOADING OVERLAY
============================================= */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: #0a0a0f;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s;
}
.loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loading-content { text-align: center; }
.loading-phone-icon { font-size: 48px; margin-bottom: 16px; animation: float 1s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.loading-text { font-size: 14px; opacity: .6; margin-bottom: 20px; }
.loading-bar {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,.1);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
}
.loading-bar-fill {
  height: 100%;
  background: var(--accent-blue);
  animation: loadBar 1.5s ease forwards;
  border-radius: 3px;
}
@keyframes loadBar { from { width: 0%; } to { width: 100%; } }

/* =============================================
   UTILITAIRES
============================================= */
.scrollbar-hidden { scrollbar-width: none; }
.scrollbar-hidden::-webkit-scrollbar { display: none; }

/* Responsive minimal */
@media (max-width: 700px) {
  .side-panel { display: none; }
  .presentation-label { display: none; }
  body {
    min-height: 100svh;
    padding: 12px;
    overflow-y: auto;
    align-items: flex-start;
  }
  .phone-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .phone {
    width: min(393px, calc(100vw - 24px), calc((100svh - 24px) * 0.4613));
    height: auto;
    aspect-ratio: 393 / 852;
    transform: none;
  }
}

/* Mobile-first adjustments for small phones */
@media (max-width: 480px) {
  .phone {
    width: min(calc(100vw - 20px), calc((100svh - 20px) * 0.4613));
    height: auto;
    border-radius: 28px;
    box-shadow: 0 10px 24px rgba(0,0,0,.28);
    margin: 0 auto;
  }

  .phone-screen { margin: 0; }

  /* reduce heavy background blobs on mobile */
  .site-bg { display: none; }

  /* compact content */
  .home-content { padding: 48px 10px 8px; gap: 12px; }
  .home-hero { padding: 4px 6px 2px; }
  .home-hero-time { font-size: 44px; }
  .home-hero-title { font-size: 16px; }
  .home-hero-subtitle { font-size: 11px; }

  /* smaller app icons grid */
  .app-grid { gap: 12px 6px; padding: 2px; }
  .app-icon-img { width: 48px; height: 48px; border-radius: 14px; }
  .app-icon { gap: 4px; }
  .app-name { font-size: 11px; }
  .app-notif { font-size: 11px; padding: 2px 6px; }

  /* dock and bottom nav adjustments */
  .home-dock { padding: 8px 6px; gap: 8px; }
  .dock-icon .app-icon-img.small { width: 44px; height: 44px; }

  /* headers and toolbars */
  .app-header { padding: 8px 10px; height: 44px; align-items: center; }
  .clip-header-center .app-header-title, .app-header-title { font-size: 14px; }

  /* reduce some decorative effects */
  .bg-blob { display: none; }

  /* ensure overlays fit */
  .edu-popup-inner { width: calc(100% - 32px); margin: 0 8px; }

  /* make immersive feeds scrollable comfortably */
  .clip-feed, .fg-feed, .fg-reels-scroll { padding-bottom: 80px; }
}
