:root {
      --bg: #0f172a;
      --card: #1e293b;
      --card-border: rgba(255, 255, 255, 0.08);
      --text: #f8fafc;
      --muted: #94a3b8;
      --accent: #6366f1;
      --accent-hover: #4f46e5;
      --accent-soft: rgba(99, 102, 241, 0.15);
      --player-a: #38bdf8;
      --player-b: #f472b6;
      --progress-bg: #334155;
      --success: #10b981;
      --warning: #f59e0b;
      --danger: #ef4444;
    }

    [data-theme="oled"] {
      --bg: #000000;
      --card: #111111;
      --card-border: rgba(255, 255, 255, 0.15);
      --text: #ffffff;
      --muted: #a1a1aa;
      --accent: #818cf8;
      --accent-hover: #6366f1;
      --accent-soft: rgba(129, 140, 248, 0.2);
      --player-a: #38bdf8;
      --player-b: #f472b6;
      --progress-bg: #27272a;
      --success: #10b981;
      --warning: #f59e0b;
      --danger: #ef4444;
    }

    [data-theme="romantic"] {
      --bg: #1e1b4b;
      --card: #312e81;
      --card-border: rgba(165, 180, 252, 0.15);
      --text: #e0e7ff;
      --muted: #c7d2fe;
      --accent: #818cf8;
      --accent-hover: #6366f1;
      --accent-soft: rgba(129, 140, 248, 0.2);
      --player-a: #38bdf8;
      --player-b: #a78bfa;
      --progress-bg: #4338ca;
      --success: #34d399;
      --warning: #fbbf24;
      --danger: #f87171;
    }

    [data-theme="paper"] {
      --bg: #f5f0e6;
      --card: #ffffff;
      --card-border: rgba(0, 0, 0, 0.08);
      --text: #2c2523;
      --muted: #78716c;
      --accent: #b45309;
      --accent-hover: #92400e;
      --accent-soft: rgba(180, 83, 9, 0.12);
      --player-a: #0284c7;
      --player-b: #db2777;
      --progress-bg: #e7dfd5;
      --success: #059669;
      --warning: #d97706;
      --danger: #dc2626;
    }

    [data-theme="neon"] {
      --bg: #090614;
      --card: #150d2a;
      --card-border: rgba(0, 240, 255, 0.25);
      --text: #f0f9ff;
      --muted: #8b9bb4;
      --accent: #00f0ff;
      --accent-hover: #00c8d7;
      --accent-soft: rgba(0, 240, 255, 0.18);
      --player-a: #ff007f;
      --player-b: #00f0ff;
      --progress-bg: #211540;
      --success: #10b981;
      --warning: #f59e0b;
      --danger: #ff0055;
    }

    [data-theme="arcade"] {
      --bg: #1a0933;
      --card: #281048;
      --card-border: rgba(255, 0, 128, 0.3);
      --text: #ffffff;
      --muted: #bda3e6;
      --accent: #ff007f;
      --accent-hover: #e0006c;
      --accent-soft: rgba(255, 0, 127, 0.22);
      --player-a: #ff9900;
      --player-b: #00e5ff;
      --progress-bg: #3c186b;
      --success: #00ffcc;
      --warning: #ffcc00;
      --danger: #ff2a6d;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
    }

    body {
      background-color: var(--bg);
      color: var(--text);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      padding: 0.8rem;
      padding-top: 4.6rem;
      padding-bottom: 2rem;
      transition: background-color 0.4s ease, color 0.4s ease;
      overflow-x: hidden;
    }

    /* --- TOP BAR (Centralisée & Épurée) --- */
    .top-bar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      width: 100%;
      height: 56px;
      display: flex;
      justify-content: center;
      align-items: center;
      background: rgba(15, 23, 42, 0.85);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--card-border);
      z-index: 1000;
      padding: 0 1rem;
      transition: background-color 0.3s ease, border-color 0.3s ease;
    }

    .top-bar-inner {
      width: 100%;
      max-width: 900px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.5rem;
    }

    .top-bar-brand {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      cursor: pointer;
      user-select: none;
      transition: transform 0.2s ease;
      padding: 0.25rem 0.5rem;
      border-radius: 0.8rem;
    }

    .top-bar-brand:hover {
      transform: scale(1.04);
    }

    .brand-text {
      font-size: 1.25rem;
      font-weight: 900;
      letter-spacing: -0.4px;
      color: var(--text);
    }

    .top-actions {
      display: flex;
      gap: 0.4rem;
      align-items: center;
      flex-wrap: nowrap;
    }

    .icon-btn {
      background: var(--card);
      border: 1px solid var(--card-border);
      color: var(--text);
      width: 38px;
      height: 38px;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.05rem;
      transition: all 0.2s ease;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
      flex-shrink: 0;
    }

    @media (max-width: 480px) {
      .top-bar {
        padding: 0 0.5rem;
        height: 52px;
      }
      .top-bar-inner {
        gap: 0.3rem;
      }
      .top-bar-brand {
        padding: 0.2rem 0.3rem;
        gap: 0.35rem;
      }
      .brand-text {
        font-size: 1.05rem;
      }
      .top-actions {
        gap: 0.22rem;
      }
      .icon-btn {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
      }
      .network-badge {
        font-size: 0.68rem;
        padding: 0.2rem 0.4rem;
        gap: 0.25rem;
      }
      .modal {
        padding: 1.1rem 0.9rem;
        max-height: 86vh;
        gap: 0.8rem;
      }
      #avatar-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.4rem;
      }
    }

    @media (min-width: 480px) {
      .icon-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
      }

      body {
        padding: 1rem;
        padding-top: 5rem;
      }
    }

    .icon-btn:hover {
      transform: scale(1.06);
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .icon-btn.active {
      background: var(--accent);
      color: white;
      border-color: var(--accent);
    }

    .container {
      background-color: var(--card);
      border: 1px solid var(--card-border);
      border-radius: 1.5rem;
      padding: 1.5rem;
      max-width: 880px;
      width: 100%;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
      display: flex;
      flex-direction: column;
      gap: 1.3rem;
      text-align: center;
      position: relative;
      margin-bottom: 2rem;
    }

    @media (min-width: 600px) {
      .container {
        padding: 2.2rem;
        gap: 1.5rem;
      }
    }

    .hub-title {
      font-size: 2.2rem;
      font-weight: 800;
      color: var(--accent);
      letter-spacing: -0.5px;
    }

    .hub-subtitle {
      color: var(--muted);
      font-size: 0.95rem;
      margin-top: 0.2rem;
    }

    /* Permanent Hub Leaderboard Card */
    .hub-leaderboard-box {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--card-border);
      border-radius: 1.2rem;
      padding: 1rem 1.4rem;
      display: flex;
      flex-direction: column;
      gap: 0.8rem;
      width: 100%;
    }

    .hub-lb-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.85rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--accent);
    }

    .hub-lb-scores {
      display: flex;
      justify-content: space-around;
      align-items: center;
      gap: 1rem;
    }

    .hub-lb-player {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.2rem;
    }

    .hub-lb-name {
      font-size: 1rem;
      font-weight: 700;
      max-width: 130px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .hub-lb-val {
      font-size: 1.8rem;
      font-weight: 800;
      line-height: 1;
    }

    .hub-lb-vs {
      font-size: 1.1rem;
      font-weight: 800;
      color: var(--muted);
    }

    /* --- HUB CONTROLS & CATEGORY FILTERING --- */
    .hub-controls {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      width: 100%;
      margin: 0.2rem 0;
    }

    .hub-search-bar {
      display: flex;
      gap: 0.8rem;
      width: 100%;
      align-items: center;
      flex-wrap: wrap;
    }

    .search-input-wrapper {
      flex: 1;
      min-width: 220px;
      position: relative;
      display: flex;
      align-items: center;
    }

    .search-input-wrapper .search-icon {
      position: absolute;
      left: 1rem;
      font-size: 1.1rem;
      color: var(--muted);
      pointer-events: none;
    }

    #game-search-input {
      width: 100%;
      padding: 0.75rem 1rem 0.75rem 2.8rem;
      border-radius: 2rem;
      border: 1px solid var(--card-border);
      background: rgba(0, 0, 0, 0.25);
      color: var(--text);
      font-size: 0.95rem;
      outline: none;
      transition: all 0.2s ease;
    }

    #game-search-input:focus {
      border-color: var(--accent);
      background: rgba(0, 0, 0, 0.4);
      box-shadow: 0 0 12px var(--accent-soft);
    }

    .surprise-btn {
      background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
      color: white;
      border: none;
      padding: 0.75rem 1.4rem;
      border-radius: 2rem;
      font-weight: 700;
      font-size: 0.92rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      transition: all 0.25s ease;
      box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
      white-space: nowrap;
    }

    .surprise-btn:hover {
      transform: translateY(-2px) scale(1.03);
      box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    }

    .category-tabs-wrapper {
      display: flex;
      gap: 0.5rem;
      overflow-x: auto;
      padding: 0.3rem 0 0.6rem 0;
      width: 100%;
      scrollbar-width: thin;
      scrollbar-color: var(--accent) rgba(255, 255, 255, 0.05);
      -webkit-overflow-scrolling: touch;
    }

    .category-tabs-wrapper::-webkit-scrollbar {
      height: 6px;
      display: block;
    }

    .category-tabs-wrapper::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 10px;
    }

    .category-tabs-wrapper::-webkit-scrollbar-thumb {
      background: var(--accent);
      border-radius: 10px;
      box-shadow: 0 0 10px var(--accent-soft);
    }

    .category-tabs-wrapper::-webkit-scrollbar-thumb:hover {
      background: #ffffff;
    }

    .cat-tab {
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid var(--card-border);
      color: var(--muted);
      padding: 0.55rem 1.1rem;
      border-radius: 1.5rem;
      font-size: 0.88rem;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      gap: 0.35rem;
    }

    .cat-tab:hover {
      color: var(--text);
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .cat-tab.active {
      background: var(--accent);
      color: white;
      border-color: var(--accent);
      box-shadow: 0 4px 12px var(--accent-soft);
    }

    .fav-star-btn {
      position: absolute;
      top: 0.8rem;
      right: 0.8rem;
      background: transparent;
      border: none;
      color: var(--muted);
      font-size: 1.35rem;
      cursor: pointer;
      transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
      z-index: 5;
      padding: 0.2rem;
      line-height: 1;
      opacity: 0.45;
    }

    .fav-star-btn:hover,
    .game-card:hover .fav-star-btn {
      opacity: 0.9;
      transform: scale(1.1);
    }

    .fav-star-btn.active,
    .fav-star-btn.is-fav,
    .game-card.is-favorite .fav-star-btn {
      color: #fbbf24 !important;
      opacity: 1 !important;
      text-shadow: 0 0 10px rgba(251, 191, 36, 0.75), 0 0 20px rgba(245, 158, 11, 0.4);
      transform: scale(1.18);
    }

    /* --- FLUID VIEW TRANSITIONS --- */
    .view {
      display: none;
      opacity: 0;
      transform: scale(0.985);
      transition: opacity 0.28s ease, transform 0.28s ease;
    }

    .view.active {
      display: flex;
      flex-direction: column;
      gap: 1.2rem;
      opacity: 1;
      transform: scale(1);
    }

    .games-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
      gap: 1.1rem;
      margin-top: 0.5rem;
      width: 100%;
    }

    .game-card {
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--card-border);
      border-radius: 1.2rem;
      padding: 1.3rem;
      text-align: left;
      cursor: pointer;
      transition: transform 0.12s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      position: relative;
      transform-style: preserve-3d;
      perspective: 1000px;
      overflow: hidden;
    }

    .game-card::before,
    .uno-card::before {
      content: '';
      position: absolute;
      inset: -50%;
      background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.3) 50%, transparent 65%);
      background-size: 200% 200%;
      background-position: var(--holo-x, 50%) var(--holo-y, 50%);
      opacity: 0;
      transition: opacity 0.3s ease;
      pointer-events: none;
      border-radius: inherit;
      z-index: 3;
    }

    .game-card:hover::before,
    .uno-card:hover::before {
      opacity: 0.9;
    }

    .game-card:hover {
      border-color: var(--accent);
      background: var(--accent-soft);
      box-shadow: 0 14px 35px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-soft);
    }

    .game-card-header {
      display: flex;
      align-items: center;
      gap: 0.6rem;
    }

    .game-card-icon {
      font-size: 1.8rem;
      line-height: 1;
    }

    .game-card-title {
      font-size: 1.1rem;
      font-weight: 700;
    }

    .game-card-desc {
      font-size: 0.82rem;
      color: var(--muted);
      line-height: 1.4;
    }

    .game-card-footer {
      display: flex;
      margin-top: auto;
      padding-top: 0.4rem;
      width: 100%;
    }

    .game-card-badge {
      font-size: 0.78rem;
      font-weight: 500;
      padding: 0.4rem 0.8rem;
      border-radius: 0.8rem;
      background: var(--accent-soft);
      color: var(--accent);
      line-height: 1.4;
      width: 100%;
      text-align: left;
    }

    .game-card-count {
      font-size: 0.72rem;
      color: var(--muted);
      font-weight: 600;
      margin-top: 0.15rem;
    }

    .view {
      display: none;
      width: 100%;
      flex-direction: column;
      gap: 1.4rem;
      align-items: center;
    }

    .view.active {
      display: flex;
    }

    .lobby-connect-prompt {
      background: var(--accent-soft);
      border: 1px dashed var(--accent);
      border-radius: 1rem;
      padding: 1.1rem;
      display: flex;
      flex-direction: column;
      gap: 0.6rem;
      align-items: center;
      width: 100%;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .lobby-connect-prompt:hover {
      background: rgba(99, 102, 241, 0.25);
    }

    .progress-bar-container {
      width: 100%;
      height: 6px;
      background-color: var(--progress-bg);
      border-radius: 9999px;
      overflow: hidden;
    }

    .progress-bar {
      height: 100%;
      background: var(--accent);
      width: 0%;
      transition: width 0.3s ease;
    }

    .header-info {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.85rem;
      font-weight: 600;
    }

    .badge-tag {
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--accent);
      font-weight: 700;
    }

    .score-badge {
      background: rgba(255, 255, 255, 0.06);
      padding: 0.3rem 0.8rem;
      border-radius: 1rem;
      font-size: 0.85rem;
      color: var(--text);
      font-weight: 700;
      border: 1px solid var(--card-border);
    }

    .turn-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.45rem 1.3rem;
      border-radius: 2rem;
      font-size: 0.9rem;
      font-weight: 600;
      background-color: var(--accent-soft);
      border: 1px solid transparent;
    }

    .turn-badge.player-a {
      color: var(--player-a);
      border-color: var(--player-a);
      background-color: rgba(56, 189, 248, 0.1);
    }

    .turn-badge.player-b {
      color: var(--player-b);
      border-color: var(--player-b);
      background-color: rgba(244, 114, 182, 0.1);
    }

    .question-box {
      min-height: 140px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
      padding: 0.5rem 0;
      transition: all 0.25s ease;
    }

    .question {
      font-size: 1.35rem;
      line-height: 1.6;
      font-weight: 500;
    }

    .sub-hint {
      color: var(--muted);
      font-size: 0.9rem;
      line-height: 1.5;
    }

    .controls {
      display: flex;
      gap: 0.8rem;
      justify-content: center;
      flex-wrap: wrap;
      width: 100%;
    }

    button {
      background-color: var(--accent);
      color: white;
      border: none;
      border-radius: 0.6rem;
      padding: 0.75rem 1.4rem;
      font-size: 0.95rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
    }

    button:hover:not(:disabled) {
      background-color: var(--accent-hover);
      transform: translateY(-1px);
    }

    button:disabled {
      opacity: 0.3;
      cursor: not-allowed;
      transform: none;
    }

    .btn-secondary {
      background-color: transparent;
      border: 1px solid var(--muted);
      color: var(--text);
    }

    .btn-secondary:hover:not(:disabled) {
      background-color: rgba(255, 255, 255, 0.08);
      border-color: var(--text);
    }

    .btn-success {
      background-color: var(--success);
      color: white;
    }

    .btn-success:hover:not(:disabled) {
      background-color: #059669;
    }

    .btn-danger {
      background-color: var(--danger);
      color: white;
    }

    .btn-danger:hover:not(:disabled) {
      background-color: #dc2626;
    }

    .btn-choice {
      width: 100%;
      padding: 1.2rem;
      font-size: 1.05rem;
      line-height: 1.4;
      text-align: center;
      border-radius: 1rem;
      background: rgba(255, 255, 255, 0.04);
      border: 2px solid var(--card-border);
      color: var(--text);
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .btn-choice:hover {
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .btn-choice.selected {
      border-color: var(--accent);
      background: var(--accent);
      color: white;
    }

    .taboo-card {
      background: rgba(255, 255, 255, 0.03);
      border: 2px solid var(--accent);
      border-radius: 1.2rem;
      padding: 1.5rem;
      width: 100%;
      max-width: 440px;
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .taboo-word {
      font-size: 1.9rem;
      font-weight: 800;
      color: var(--accent);
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .taboo-forbidden-list {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      background: rgba(0, 0, 0, 0.25);
      padding: 1rem;
      border-radius: 0.8rem;
    }

    .taboo-forbidden-item {
      font-size: 1.15rem;
      font-weight: 600;
      color: #ef4444;
      text-decoration: line-through;
    }

    .timer-big {
      font-size: 4rem;
      font-weight: 800;
      color: var(--accent);
      font-variant-numeric: tabular-nums;
      margin: 0.5rem 0;
    }

    .category-pills {
      display: flex;
      gap: 0.5rem;
      justify-content: center;
      flex-wrap: wrap;
    }

    .pill {
      padding: 0.45rem 1.1rem;
      border-radius: 1.5rem;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--card-border);
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .pill.active {
      background: var(--accent);
      color: white;
      border-color: var(--accent);
    }

    /* Wavelength Spectrum Slider & UI */
    .spectrum-container {
      width: 100%;
      max-width: 600px;
      display: flex;
      flex-direction: column;
      gap: 1.2rem;
      margin: 1rem 0;
      position: relative;
    }

    .spectrum-labels {
      display: flex;
      justify-content: space-between;
      font-size: 1.15rem;
      font-weight: 700;
      color: var(--text);
    }

    .spectrum-track {
      position: relative;
      height: 56px;
      /* Bug 4 fix: 56px for better mobile tap zone (was 48px) */
      background: rgba(255, 255, 255, 0.06);
      border: 2px solid var(--card-border);
      border-radius: 2rem;
      overflow: hidden;
      cursor: pointer;
      touch-action: none;
      /* Bug 1+2 fix: let JS fully control touch on this element */
      user-select: none;
    }

    .spectrum-target-zone {
      position: absolute;
      top: 0;
      bottom: 0;
      background: linear-gradient(90deg, #f59e0b 0%, #10b981 50%, #f59e0b 100%);
      opacity: 0.85;
      border-radius: 4px;
      transition: opacity 0.3s ease;
    }

    .spectrum-needle {
      position: absolute;
      top: -4px;
      bottom: -4px;
      width: 6px;
      background: #ffffff;
      box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
      border-radius: 3px;
      transform: translateX(-50%);
      pointer-events: none;
    }

    .wave-clue-badge {
      background: var(--accent-soft);
      border: 1px solid var(--accent);
      padding: 0.6rem 1.2rem;
      border-radius: 0.8rem;
      font-size: 1.1rem;
      font-weight: 700;
      color: var(--text);
    }

    /* Pendu UI */
    .pendu-canvas-box {
      width: 200px;
      height: 180px;
      margin: 0.5rem auto;
    }

    .pendu-word-display {
      font-size: 2.2rem;
      font-weight: 800;
      letter-spacing: 0.35em;
      color: var(--accent);
      margin: 1rem 0;
      font-family: monospace;
    }

    .keyboard-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(36px, 1fr));
      gap: 0.4rem;
      width: 100%;
      max-width: 500px;
      margin: 0.5rem auto;
    }

    .key-btn {
      padding: 0.6rem 0.2rem;
      font-size: 1rem;
      font-weight: 700;
      border-radius: 0.4rem;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid var(--card-border);
      color: var(--text);
      cursor: pointer;
    }

    .key-btn.used {
      opacity: 0.25;
      pointer-events: none;
      background: transparent;
    }


    /* ===== UNO / DUO CARDS — TABLE CIRCULAIRE ===== */

    .uno-wrap {
      width: 100%;
      max-width: 580px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.8rem;
      position: relative;
      padding: 30px 80px 10px; /* espace généreux pour les sièges extérieurs */
      box-sizing: border-box;
      overflow: visible;
    }

    /* La "table" ronde — carré qui grandit selon le nombre de joueurs */
    .uno-table-circle {
      position: relative;
      width: var(--uno-table-size, 240px);
      height: var(--uno-table-size, 240px);
      border-radius: 50%;
      overflow: visible; /* Les sièges débordent en dehors du cercle */
      background: radial-gradient(ellipse at 50% 50%,
        rgba(30, 41, 70, 0.9) 0%,
        rgba(10, 16, 35, 0.97) 70%
      );
      border: 3px solid rgba(255, 255, 255, 0.1);
      box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.8),
        0 0 0 5px rgba(255, 255, 255, 0.04),
        0 14px 35px rgba(0, 0, 0, 0.5);
      flex-shrink: 0;
      transition: width 0.5s ease, height 0.5s ease;
    }

    /* Centre de la table : Pioche + Flèche + Défausse */
    .uno-center-zone {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      display: flex;
      align-items: center;
      gap: 0.6rem;
      z-index: 5;
    }

    /* Flèche de direction de tour */
    .uno-dir-arrow {
      font-size: 1.4rem;
      color: rgba(255, 255, 255, 0.55);
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.15);
      display: flex;
      align-items: center;
      justify-content: center;
      user-select: none;
      transition: transform 0.4s ease, color 0.3s ease;
      flex-shrink: 0;
    }

    /* Siège d'un adversaire — positionné absolument par JS */
    .uno-seat {
      position: absolute;
      transform: translate(-50%, -50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.15rem;
      z-index: 10;
      pointer-events: none;
    }

    /* Étiquette du joueur (avatar + nom) */
    .uno-seat-label {
      display: flex;
      flex-direction: column;
      align-items: center;
      background: rgba(10, 18, 42, 0.88);
      border: 2px solid rgba(255, 255, 255, 0.12);
      border-radius: 0.8rem;
      padding: 0.25rem 0.45rem;
      min-width: 56px;
      max-width: 90px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
      transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

    .uno-seat.active-seat .uno-seat-label {
      border-color: #38bdf8;
      box-shadow: 0 0 18px rgba(56, 189, 248, 0.55);
    }

    .uno-seat-emoji {
      font-size: 1.1rem;
      line-height: 1;
    }

    .uno-seat-name-txt {
      font-size: 0.65rem;
      font-weight: 800;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 82px;
      text-align: center;
    }

    .uno-seat-count-txt {
      font-size: 0.6rem;
      font-weight: 700;
      color: var(--muted);
    }

    .uno-seat-playing-txt {
      font-size: 0.56rem;
      font-weight: 800;
      color: #facc15;
      background: rgba(250, 204, 21, 0.15);
      border-radius: 4px;
      padding: 1px 4px;
    }

    /* Éventail de cartes face cachée pour chaque adversaire */
    .uno-seat-fan {
      position: relative;
      width: 56px;
      height: 42px;
    }

    .uno-fan-card {
      position: absolute;
      width: 24px;
      height: 36px;
      border-radius: 4px;
      background: linear-gradient(135deg, #4338ca 0%, #1e1b4b 100%);
      border: 1.5px solid rgba(255, 255, 255, 0.35);
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
      top: 3px;
      left: 16px; /* centré dans la fan zone */
      transform-origin: bottom center;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.65rem;
    }

    /* Main du joueur local — en bas, séparée de la table */
    .uno-my-hand-area {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      padding: 0.5rem 0.2rem 0;
    }

    .uno-hand {
      display: flex;
      gap: 0.35rem;
      overflow-x: auto;
      max-width: 100%;
      padding: 0.5rem 0.3rem 0.8rem;
      justify-content: flex-start;
      scrollbar-width: thin;
    }

    .uno-color-picker {
      display: flex;
      gap: 0.8rem;
      justify-content: center;
      margin-top: 0.5rem;
    }

    /* ===== CARTES UNO ===== */
    .uno-card {
      width: 58px;
      height: 88px;
      border-radius: 0.75rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 1.25rem;
      font-weight: 900;
      color: white;
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
      cursor: pointer;
      position: relative;
      transition: transform 0.12s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.25s ease, border-color 0.25s ease;
      border: 3px solid rgba(255, 255, 255, 0.85);
      flex-shrink: 0;
      overflow: hidden;
    }

    .uno-card.playable {
      transform: translateY(-10px);
      border-color: #38bdf8;
      box-shadow: 0 0 20px rgba(56, 189, 248, 0.75);
      animation: unoPulse 1.6s infinite ease-in-out;
    }

    @keyframes unoPulse {
      0%, 100% { transform: translateY(-10px) scale(1); }
      50%       { transform: translateY(-14px) scale(1.04); }
    }

    .uno-card.disabled {
      opacity: 0.42;
      cursor: not-allowed;
      transform: none !important;
      animation: none !important;
    }

    .uno-card.red    { background: linear-gradient(135deg, #ef4444, #dc2626); }
    .uno-card.blue   { background: linear-gradient(135deg, #3b82f6, #2563eb); }
    .uno-card.green  { background: linear-gradient(135deg, #10b981, #059669); }
    .uno-card.yellow { background: linear-gradient(135deg, #f59e0b, #d97706); }
    .uno-card.wild   { background: linear-gradient(135deg, #ef4444, #3b82f6, #10b981, #f59e0b); }
    .uno-card.back   { background: linear-gradient(135deg, #1e293b, #0f172a); border-color: var(--accent); }

    /* Special card animation overlay */
    #uno-special-overlay {
      display: none;
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.55);
      border-radius: 1.4rem;
      z-index: 20;
      align-items: center;
      justify-content: center;
      pointer-events: none;
    }

    .uno-special-anim {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
      animation: specialPop 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }

    .uno-special-icon {
      font-size: 4rem;
      filter: drop-shadow(0 0 12px rgba(255, 200, 0, 0.9));
    }

    .uno-special-label {
      font-size: 1.3rem;
      font-weight: 800;
      color: #fff;
      text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
      letter-spacing: 0.05em;
    }

    @keyframes specialPop {
      0% {
        transform: scale(0.3) rotate(-10deg);
        opacity: 0;
      }

      40% {
        transform: scale(1.15) rotate(3deg);
        opacity: 1;
      }

      70% {
        transform: scale(1.0) rotate(0deg);
        opacity: 1;
      }

      100% {
        transform: scale(1.05) rotate(0deg);
        opacity: 0;
      }
    }

    /* EP correct answer reveal */
    .ep-correct-reveal {
      display: none;
      width: 100%;
      max-width: 440px;
      padding: 0.75rem 1rem;
      border-radius: 0.8rem;
      background: rgba(16, 185, 129, 0.12);
      border: 1px solid var(--success);
      color: var(--success);
      font-size: 0.95rem;
      font-weight: 700;
      text-align: center;
      margin: 0.4rem auto 0;
    }

    .color-pick-btn {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      cursor: pointer;
      border: 3px solid white;
      transition: transform 0.2s ease;
    }

    .color-pick-btn:hover {
      transform: scale(1.15);
    }

    /* Direct Theme Palette Grid in Modal */
    .theme-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.8rem;
      margin: 0.5rem 0;
    }

    .theme-card-option {
      border-radius: 0.8rem;
      padding: 1rem;
      border: 2px solid var(--card-border);
      cursor: pointer;
      font-weight: 700;
      font-size: 0.95rem;
      transition: all 0.2s ease;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.4rem;
    }

    .theme-card-option:hover {
      border-color: var(--accent);
      transform: scale(1.03);
    }

    .theme-card-option.active {
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    /* Modals & Helpers */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.78);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 2000;
      padding: 0.8rem;
      box-sizing: border-box;
    }

    .modal {
      background: var(--card);
      border: 1px solid var(--card-border);
      border-radius: 1.2rem;
      padding: 1.4rem;
      max-width: 500px;
      max-height: 88vh;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      width: 100%;
      text-align: center;
      display: flex;
      flex-direction: column;
      gap: 1rem;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
      box-sizing: border-box;
    }

    /* Bug 3 fix: prevent iOS auto-zoom on any input (requires font-size >= 16px) */
    input,
    select,
    textarea {
      font-size: 1rem;
    }

    .modal input,
    .modal select {
      padding: 0.8rem 1rem;
      border-radius: 0.5rem;
      border: 1px solid var(--muted);
      background: transparent;
      color: var(--text);
      font-size: 1rem;
      text-align: center;
    }

    .peer-badge {
      font-size: 0.85rem;
      color: var(--player-a);
      word-break: break-all;
      background: rgba(0, 0, 0, 0.2);
      padding: 0.6rem;
      border-radius: 0.4rem;
    }

    #qrcode-container {
      display: flex;
      justify-content: center;
      margin: 0.8rem auto;
      padding: 10px;
      background: white;
      border-radius: 0.6rem;
      width: 170px;
      height: 170px;
    }

    .result-comparison {
      display: flex;
      justify-content: space-around;
      width: 100%;
      gap: 1rem;
      margin: 1rem 0;
    }

    .player-result-box {
      flex: 1;
      padding: 1rem;
      border-radius: 0.8rem;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--card-border);
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .player-result-box.match {
      border-color: var(--success);
      background: rgba(16, 185, 129, 0.1);
    }

    .souvenir-card {
      background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
      border: 2px solid var(--accent);
      border-radius: 1rem;
      padding: 1.5rem;
      margin-top: 1rem;
      text-align: center;
      color: #f8fafc;
      width: 100%;
    }

    .network-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      font-size: 0.75rem;
      font-weight: 600;
      padding: 0.25rem 0.6rem;
      border-radius: 1rem;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--card-border);
      flex-shrink: 0;
    }

    .network-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #ef4444;
    }

    .network-dot.online {
      background: var(--success);
    }

    .asym-guesser-box {
      background: rgba(255, 255, 255, 0.03);
      border: 2px dashed var(--accent);
      border-radius: 1.2rem;
      padding: 2rem 1.5rem;
      width: 100%;
      max-width: 440px;
      display: flex;
      flex-direction: column;
      gap: 1rem;
      align-items: center;
    }

    /* Floating Reactions Anim */

    .floating-reaction {
      position: fixed;
      font-size: 3rem;
      pointer-events: none;
      z-index: 9999;
      animation: floatUp 2.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
      user-select: none;
    }

    @keyframes floatUp {
      0% {
        transform: translateY(0) translateX(0) scale(0.3);
        opacity: 0;
      }

      10% {
        opacity: 1;
        transform: translateY(-50px) translateX(0) scale(1.1);
      }

      100% {
        transform: translateY(-500px) translateX(var(--drift)) scale(1.5);
        opacity: 0;
      }
    }

    /* Doodle Overlay Styles */
    .doodle-toolbar {
      position: fixed;
      top: 15px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(15, 23, 42, 0.94);
      backdrop-filter: blur(16px);
      border: 1px solid var(--accent);
      border-radius: 2rem;
      padding: 0.4rem 1rem;
      display: flex;
      align-items: center;
      gap: 0.8rem;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-soft);
      z-index: 9995;
      animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .doodle-col-btn {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      border: 2px solid transparent;
      cursor: pointer;
      transition: transform 0.2s ease;
    }

    .doodle-col-btn.active {
      border-color: #ffffff;
      transform: scale(1.25);
    }

    .doodle-action-btn {
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid var(--card-border);
      color: #fff;
      border-radius: 50%;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 0.9rem;
      transition: all 0.2s ease;
    }

    .doodle-action-btn:hover {
      background: var(--accent-soft);
      transform: scale(1.1);
    }

    /* Animated Avatars System */
    .avatar-badge {
      width: 46px;
      height: 46px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 1.6rem;
      background: rgba(255, 255, 255, 0.08);
      border: 2px solid var(--accent);
      box-shadow: 0 0 12px var(--accent-soft);
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      animation: avatarFloat 3s ease-in-out infinite;
      margin-bottom: 0.3rem;
      user-select: none;
    }

    @keyframes avatarFloat {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-5px);
      }
    }

    .avatar-badge.victory {
      animation: avatarVictory 0.6s ease infinite alternate !important;
    }

    @keyframes avatarVictory {
      0% {
        transform: translateY(0) scale(1);
      }

      100% {
        transform: translateY(-10px) scale(1.25);
      }
    }

    .avatar-badge.defeat {
      animation: avatarDefeat 0.5s ease !important;
    }

    @keyframes avatarDefeat {

      0%,
      100% {
        transform: rotate(0deg);
      }

      25% {
        transform: rotate(-15deg);
      }

      75% {
        transform: rotate(15deg);
      }
    }

    .avatar-option-btn {
      font-size: 1.5rem;
      padding: 0.4rem;
      border-radius: 0.6rem;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--card-border);
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .avatar-option-btn:hover {
      transform: scale(1.15);
      background: rgba(255, 255, 255, 0.12);
    }

    .avatar-option-btn.active {
      background: var(--accent-soft);
      border-color: var(--accent);
      box-shadow: 0 0 10px var(--accent-soft);
      transform: scale(1.18);
    }

    .avatar-color-dot {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid transparent;
      transition: transform 0.2s ease;
    }

    .avatar-color-dot.active {
      border-color: #ffffff;
      transform: scale(1.2);
    }

    /* --- Quick Reactions Popover (Sous le bouton 😀 du Header) --- */
    .reactions-popover-container {
      position: relative;
    }

    .quick-reactions-popover {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      background: var(--card);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid var(--card-border);
      border-radius: 2rem;
      padding: 0.35rem 0.6rem;
      display: flex;
      gap: 0.35rem;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
      opacity: 0;
      pointer-events: none;
      transform: translateY(-6px) scale(0.92);
      transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
      z-index: 1100;
    }

    .quick-reactions-popover.active {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0) scale(1);
    }

    .quick-reactions-popover button {
      background: transparent;
      border: none;
      font-size: 1.35rem;
      cursor: pointer;
      padding: 0.2rem 0.25rem;
      line-height: 1;
      transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .quick-reactions-popover button:hover {
      transform: scale(1.3);
    }

    .quick-reactions-popover button:active {
      transform: scale(0.9);
    }

    /* --- Responsive Avatar Grid & Color Picker --- */
    .avatar-grid-responsive {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
      gap: 0.4rem;
      justify-content: center;
      margin-bottom: 0.8rem;
    }

    .avatar-color-picker-responsive {
      display: flex;
      flex-wrap: wrap;
      gap: 0.45rem;
      justify-content: center;
    }

    .modal-sticky-footer {
      display: flex;
      gap: 0.5rem;
      margin-top: 1rem;
      padding-top: 0.6rem;
      border-top: 1px solid var(--card-border);
      position: sticky;
      bottom: 0;
      background: var(--card);
      z-index: 10;
    }

    /* --- TUSMO 1V1 (MOTUS DUEL) --- */
    .tusmo-arena {
      display: flex;
      gap: 1.2rem;
      align-items: flex-start;
      justify-content: center;
      width: 100%;
    }

    .tusmo-main-board {
      flex: 1;
      display: flex;
      justify-content: center;
    }

    .tusmo-grid-container {
      display: flex;
      flex-direction: column;
      gap: 6px;
      align-items: center;
      justify-content: center;
    }

    .tusmo-row {
      display: flex;
      gap: 6px;
      justify-content: center;
    }

    .tusmo-cell {
      width: clamp(34px, 8.5vw, 48px);
      height: clamp(34px, 8.5vw, 48px);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: clamp(1.1rem, 4vw, 1.5rem);
      font-weight: 900;
      color: #ffffff;
      background: rgba(30, 41, 59, 0.9);
      border: 2px solid rgba(255, 255, 255, 0.18);
      border-radius: 8px;
      text-transform: uppercase;
      user-select: none;
      transition: transform 0.12s ease, background-color 0.2s ease, border-color 0.2s ease;
    }

    .tusmo-cell.filled {
      border-color: rgba(255, 255, 255, 0.55);
      transform: scale(1.05);
    }

    .tusmo-cell.revealed-hint {
      color: #38bdf8;
      border-color: rgba(56, 189, 248, 0.45);
    }

    .tusmo-cell.correct {
      background: #e11d48 !important;
      border-color: #f43f5e !important;
      color: #ffffff !important;
      box-shadow: 0 0 12px rgba(225, 29, 72, 0.6);
    }

    .tusmo-cell.present {
      background: #eab308 !important;
      border-color: #fde047 !important;
      color: #0f172a !important;
      border-radius: 50% !important;
      box-shadow: 0 0 12px rgba(234, 179, 8, 0.55);
    }

    .tusmo-cell.absent {
      background: #0f172a !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
      color: #64748b !important;
      opacity: 0.65;
    }

    @keyframes tusmoFlip {
      0% { transform: scaleY(1); }
      50% { transform: scaleY(0); }
      100% { transform: scaleY(1); }
    }

    .tusmo-cell.flip {
      animation: tusmoFlip 0.35s ease forwards;
    }

    .tusmo-opp-section {
      background: rgba(15, 23, 42, 0.7);
      border: 1px solid var(--card-border);
      border-radius: 0.8rem;
      padding: 0.5rem 0.8rem;
      min-width: 120px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.35rem;
    }

    .tusmo-opp-title {
      font-size: 0.78rem;
      font-weight: 700;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .tusmo-opp-grid {
      display: flex;
      flex-direction: column;
      gap: 3px;
      align-items: center;
      margin: 0.2rem 0;
    }

    .tusmo-opp-row {
      display: flex;
      gap: 3px;
    }

    .tusmo-opp-cell {
      width: 12px;
      height: 12px;
      border-radius: 2px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .tusmo-opp-cell.correct {
      background: #e11d48 !important;
      border-color: #f43f5e !important;
    }

    .tusmo-opp-cell.present {
      background: #eab308 !important;
      border-color: #fde047 !important;
      border-radius: 50% !important;
    }

    .tusmo-opp-cell.absent {
      background: #334155 !important;
      border-color: transparent !important;
    }

    .tusmo-opp-status {
      font-size: 0.72rem;
      color: var(--muted);
      font-weight: 600;
    }

    .tusmo-alert {
      background: rgba(239, 68, 68, 0.15);
      border: 1px solid var(--danger);
      color: #fca5a5;
      padding: 0.35rem 0.8rem;
      border-radius: 0.6rem;
      font-weight: 700;
      font-size: 0.85rem;
    }

    .tusmo-keyboard {
      display: flex;
      flex-direction: column;
      gap: clamp(3px, 0.8vw, 5px);
      align-items: center;
      width: 100%;
      max-width: 480px;
      margin: 0.2rem auto 0;
      padding: 0;
      box-sizing: border-box;
      user-select: none;
    }

    .tusmo-kb-row {
      display: flex;
      gap: clamp(2px, 0.9vw, 4px);
      justify-content: center;
      width: 100%;
      box-sizing: border-box;
    }

    .tusmo-key {
      flex: 1 1 0;
      min-width: 0 !important;
      padding: 0 !important;
      margin: 0;
      box-sizing: border-box;
      max-width: 42px;
      height: clamp(38px, 9vw, 44px);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: clamp(0.82rem, 3.2vw, 1rem);
      font-weight: 700;
      color: var(--text);
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid var(--card-border);
      border-radius: 6px;
      cursor: pointer;
      user-select: none;
      touch-action: manipulation;
      transition: all 0.12s ease;
    }

    .tusmo-key:hover {
      background: rgba(255, 255, 255, 0.16);
      transform: scale(1.06);
    }

    .tusmo-key:active {
      transform: scale(0.92);
    }

    .tusmo-key.wide {
      flex: 1.45 1 0;
      min-width: 0 !important;
      padding: 0 !important;
      max-width: 54px;
      font-size: clamp(0.72rem, 2.6vw, 0.85rem);
    }

    .tusmo-key.correct {
      background: #e11d48 !important;
      color: #ffffff !important;
      border-color: #f43f5e !important;
    }

    .tusmo-key.present {
      background: #eab308 !important;
      color: #0f172a !important;
      border-color: #fde047 !important;
    }

    .tusmo-key.absent {
      background: rgba(15, 23, 42, 0.9) !important;
      color: #475569 !important;
      opacity: 0.45;
      border-color: transparent !important;
    }

    /* --- TUSMO 3-ROUNDS RECAP --- */
    .tusmo-round-recap-card {
      background: rgba(15, 23, 42, 0.85);
      border: 1px solid var(--card-border);
      border-radius: 1rem;
      padding: 0.8rem 1rem;
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
      text-align: left;
    }

    .tusmo-round-recap-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.92rem;
      font-weight: 700;
      color: var(--text);
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      padding-bottom: 0.35rem;
      flex-wrap: wrap;
      gap: 0.3rem;
    }

    .tusmo-round-recap-body {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.6rem;
    }

    .tusmo-round-recap-col {
      flex: 1;
      background: rgba(255, 255, 255, 0.04);
      border-radius: 0.7rem;
      padding: 0.55rem 0.75rem;
      border: 1px solid rgba(255, 255, 255, 0.06);
    }

    .tusmo-round-recap-col.player-a-col {
      border-left: 3px solid var(--player-a);
    }

    .tusmo-round-recap-col.player-b-col {
      border-left: 3px solid var(--player-b);
    }

    .recap-player-label {
      font-size: 0.78rem;
      font-weight: 700;
      margin-bottom: 0.2rem;
    }

    .recap-status {
      font-size: 0.88rem;
      font-weight: 600;
    }

    .recap-status.win {
      color: #34d399;
    }

    .recap-status.loss {
      color: #f87171;
    }

    .recap-pts {
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--muted);
      margin-top: 0.2rem;
    }

    .recap-vs {
      font-weight: 800;
      color: var(--muted);
      font-size: 0.8rem;
    }

    /* =========================================================
       HIGHER OR LOWER
       ========================================================= */
    .hl-cards-container {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.8rem;
      position: relative;
      width: 100%;
    }

    .hl-card {
      flex: 1;
      background: var(--card);
      border: 2px solid var(--card-border);
      border-radius: 1.2rem;
      padding: 1.2rem 0.8rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
      min-height: 230px;
      justify-content: space-between;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
      transition: transform 0.3s ease, border-color 0.3s ease;
    }

    .hl-card-icon {
      font-size: 2.8rem;
    }

    .hl-card-title {
      font-size: 1.05rem;
      font-weight: 800;
      color: var(--text);
      line-height: 1.3;
      min-height: 2.6em;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .hl-card-val-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.2rem;
      margin: 0.4rem 0;
    }

    .hl-card-value {
      font-size: 1.6rem;
      font-weight: 900;
      color: var(--accent);
      letter-spacing: -0.5px;
    }

    .hl-card-value.hl-hidden {
      font-size: 2rem;
      color: var(--muted);
      letter-spacing: 3px;
    }

    .hl-card-unit {
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--muted);
      text-transform: uppercase;
    }

    .hl-card-hint {
      font-size: 0.78rem;
      color: var(--muted);
      font-style: italic;
      max-width: 90%;
      line-height: 1.2;
    }

    .hl-vs-badge {
      background: linear-gradient(135deg, #ef4444, #f59e0b);
      color: #fff;
      font-weight: 900;
      font-size: 0.95rem;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
      z-index: 2;
      flex-shrink: 0;
    }

    .hl-buttons-group {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
      width: 100%;
      max-width: 160px;
    }

    .hl-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      padding: 0.55rem 0.8rem;
      border-radius: 0.7rem;
      font-weight: 800;
      font-size: 0.85rem;
      border: none;
      cursor: pointer;
      transition: all 0.2s ease;
      color: #fff;
    }

    .hl-btn-higher {
      background: linear-gradient(135deg, #10b981, #059669);
      box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

    .hl-btn-lower {
      background: linear-gradient(135deg, #ef4444, #dc2626);
      box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }

    .hl-btn:hover {
      transform: translateY(-2px);
      filter: brightness(1.1);
    }

    .hl-btn:active {
      transform: translateY(1px);
    }

    .hl-feedback-card {
      background: var(--card);
      border: 2px solid var(--accent);
      border-radius: 1.1rem;
      padding: 1.1rem;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
      animation: popIn 0.3s ease-out;
    }

    /* =========================================================
       LE TRIBUNAL
       ========================================================= */
    .tribunal-card {
      background: var(--card);
      border: 2px solid rgba(234, 179, 8, 0.35);
      border-radius: 1.3rem;
      padding: 1.4rem 1.1rem;
      position: relative;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }

    .tribunal-gavel {
      font-size: 2.8rem;
      margin-bottom: 0.2rem;
    }

    .tribunal-case-num {
      font-size: 0.75rem;
      font-weight: 800;
      letter-spacing: 2px;
      color: #f59e0b;
      text-transform: uppercase;
      margin-bottom: 0.3rem;
    }

    .tribunal-title {
      font-size: 1.25rem;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 0.6rem;
    }

    .tribunal-accusation {
      font-size: 1.02rem;
      line-height: 1.45;
      color: var(--text);
      font-style: italic;
      background: rgba(0, 0, 0, 0.25);
      padding: 0.9rem;
      border-radius: 0.8rem;
      border-left: 4px solid #f59e0b;
      margin-bottom: 0.8rem;
    }

    .tribunal-penalty-box {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      font-size: 0.85rem;
      background: rgba(239, 68, 68, 0.08);
      border: 1px dashed rgba(239, 68, 68, 0.3);
      padding: 0.6rem 0.8rem;
      border-radius: 0.6rem;
    }

    .tribunal-penalty-label {
      font-weight: 800;
      color: #f87171;
      text-transform: uppercase;
      font-size: 0.72rem;
      letter-spacing: 1px;
    }

    .tribunal-penalty-text {
      font-weight: 600;
      color: var(--text);
    }

    .tribunal-vote-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.8rem;
    }

    .tribunal-vote-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.3rem;
      padding: 1.1rem 0.8rem;
      border-radius: 1.1rem;
      border: 2px solid transparent;
      cursor: pointer;
      transition: all 0.2s ease;
      color: #fff;
    }

    .tribunal-vote-btn .vote-icon {
      font-size: 2.2rem;
    }

    .tribunal-vote-btn .vote-title {
      font-size: 1.1rem;
      font-weight: 900;
      letter-spacing: 0.5px;
    }

    .tribunal-vote-btn .vote-sub {
      font-size: 0.75rem;
      opacity: 0.85;
    }

    .tribunal-vote-btn.btn-acquitte {
      background: linear-gradient(135deg, #10b981, #059669);
      box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
    }

    .tribunal-vote-btn.btn-coupable {
      background: linear-gradient(135deg, #ef4444, #dc2626);
      box-shadow: 0 6px 18px rgba(239, 68, 68, 0.3);
    }

    .tribunal-vote-btn:hover {
      transform: translateY(-3px);
      filter: brightness(1.1);
    }

    .tribunal-vote-btn:active {
      transform: translateY(1px);
    }

    .tribunal-verdict-card {
      background: var(--card);
      border: 2px solid #f59e0b;
      border-radius: 1.2rem;
      padding: 1.3rem;
      animation: popIn 0.3s ease-out;
    }

    .tribunal-votes-comparison {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.8rem;
      margin: 0.8rem 0;
    }

    .tribunal-vote-pill {
      background: rgba(0, 0, 0, 0.3);
      padding: 0.8rem;
      border-radius: 0.8rem;
      border: 1px solid var(--card-border);
    }

    .tribunal-vote-pill .pill-name {
      font-size: 0.85rem;
      font-weight: 700;
      margin-bottom: 0.3rem;
    }

    .tribunal-vote-pill .pill-verdict {
      font-size: 1.15rem;
      font-weight: 900;
    }

    /* =========================================================
       LE JUSTE PRIX
       ========================================================= */
    .jp-item-card {
      background: var(--card);
      border: 2px solid rgba(239, 68, 68, 0.35);
      border-radius: 1.3rem;
      padding: 1.3rem 1rem;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }

    .jp-item-icon {
      font-size: 3rem;
      margin-bottom: 0.2rem;
    }

    .jp-item-cat {
      font-size: 0.78rem;
      font-weight: 800;
      letter-spacing: 1px;
      color: #f87171;
      text-transform: uppercase;
      margin-bottom: 0.2rem;
    }

    .jp-item-title {
      font-size: 1.2rem;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 0.5rem;
    }

    .jp-item-desc {
      font-size: 0.92rem;
      line-height: 1.4;
      color: var(--muted);
    }

    .jp-input-card {
      background: rgba(0, 0, 0, 0.25);
      border: 1px solid var(--card-border);
      border-radius: 1.1rem;
      padding: 1.1rem;
    }

    .jp-input-wrapper {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0.6rem 0;
    }

    .jp-number-input {
      width: 100%;
      max-width: 240px;
      background: rgba(255, 255, 255, 0.08);
      border: 2px solid var(--accent);
      border-radius: 0.8rem;
      padding: 0.6rem 2.5rem 0.6rem 1rem;
      font-size: 1.6rem;
      font-weight: 900;
      color: #fff;
      text-align: center;
    }

    .jp-currency-symbol {
      position: absolute;
      right: calc(50% - 105px);
      font-size: 1.4rem;
      font-weight: 900;
      color: var(--accent);
      pointer-events: none;
    }

    .jp-quick-buttons {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      justify-content: center;
      margin-bottom: 0.8rem;
    }

    .jp-quick-btn {
      background: rgba(255, 255, 255, 0.07);
      border: 1px solid var(--card-border);
      color: var(--text);
      border-radius: 0.6rem;
      padding: 0.35rem 0.65rem;
      font-size: 0.82rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .jp-quick-btn:hover {
      background: rgba(255, 255, 255, 0.15);
      transform: translateY(-1px);
    }

    .jp-clear-btn {
      background: rgba(239, 68, 68, 0.15);
      color: #f87171;
      border-color: rgba(239, 68, 68, 0.3);
    }

    .jp-verdict-card {
      background: var(--card);
      border: 2px solid #10b981;
      border-radius: 1.2rem;
      padding: 1.3rem;
      animation: popIn 0.3s ease-out;
    }

    .jp-true-price {
      font-size: 2.5rem;
      font-weight: 900;
      color: #fbbf24;
      margin: 0.3rem 0 0.8rem 0;
      letter-spacing: -1px;
    }

    .jp-estimates-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.8rem;
    }

    .jp-estimate-pill {
      background: rgba(0, 0, 0, 0.3);
      padding: 0.8rem;
      border-radius: 0.8rem;
      border: 1px solid var(--card-border);
    }

    .jp-pill-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.3rem;
      font-weight: 700;
      font-size: 0.85rem;
    }

    .jp-pill-val {
      font-size: 1.3rem;
      font-weight: 900;
      color: var(--text);
    }

    .jp-pill-diff {
      font-size: 0.78rem;
      font-weight: 700;
      margin-top: 0.2rem;
    }

    /* =========================================================
       LE TRAQUEUR AVEUGLE
       ========================================================= */
    .traq-prompt-box {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: rgba(0, 0, 0, 0.35);
      border: 1px solid var(--card-border);
      border-radius: 0.8rem;
      padding: 0.6rem 0.9rem;
      font-size: 0.88rem;
      font-weight: 700;
    }

    .traq-prompt-text {
      color: #38bdf8;
    }

    .traq-pings-indicator {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      color: var(--muted);
      font-size: 0.78rem;
    }

    .traq-dots-container {
      display: flex;
      gap: 4px;
    }

    .traq-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.15);
      transition: all 0.2s ease;
    }

    .traq-dot.active {
      background: #38bdf8;
      box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
    }

    .traq-arena-wrapper {
      position: relative;
      width: 100%;
      background: radial-gradient(circle at center, #091522 0%, #030712 100%);
      border: 2px solid rgba(56, 189, 248, 0.4);
      border-radius: 1.2rem;
      overflow: hidden;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(14, 165, 233, 0.1);
      touch-action: none;
      user-select: none;
    }

    .traq-canvas {
      display: block;
      width: 100%;
      height: auto;
      aspect-ratio: 600 / 420;
      cursor: crosshair;
    }

    .traq-overlay-msg {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(15, 23, 42, 0.92);
      border: 2px solid #38bdf8;
      border-radius: 1rem;
      padding: 1.2rem 1.5rem;
      font-size: 1.1rem;
      font-weight: 800;
      color: #f8fafc;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
      pointer-events: none;
      animation: popIn 0.3s ease-out;
      text-align: center;
      max-width: 85%;
    }

    .traq-prox-gauge {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.6rem;
      background: rgba(0, 0, 0, 0.35);
      border: 1px solid var(--card-border);
      border-radius: 0.8rem;
      padding: 0.6rem;
      font-size: 0.92rem;
      color: var(--text);
      animation: fadeIn 0.2s ease;
    }

    .traq-result-card {
      background: var(--card);
      border: 2px solid #38bdf8;
      border-radius: 1.2rem;
      padding: 1.2rem;
      animation: popIn 0.3s ease-out;
    }

    /* =========================================================
       LE CRAYON PARTAGÉ (PHYSICS DRAW)
       ========================================================= */
    .crayon-accuracy-bar-container {
      width: 100%;
      height: 8px;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 4px;
      overflow: hidden;
      border: 1px solid var(--card-border);
    }

    .crayon-accuracy-bar {
      height: 100%;
      background: linear-gradient(90deg, #10b981, #34d399);
      transition: width 0.2s ease, background 0.2s ease;
    }

    .crayon-info-pill {
      font-size: 0.84rem;
      color: var(--muted);
      background: rgba(0, 0, 0, 0.25);
      border: 1px solid var(--card-border);
      border-radius: 0.6rem;
      padding: 0.4rem 0.8rem;
    }

    .crayon-canvas-wrapper {
      position: relative;
      width: 100%;
      background: radial-gradient(circle at center, #1e1b4b 0%, #0f172a 100%);
      border: 2px solid rgba(236, 72, 153, 0.4);
      border-radius: 1.2rem;
      overflow: hidden;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 40px rgba(236, 72, 153, 0.1);
      touch-action: none;
      user-select: none;
    }

    .crayon-canvas {
      display: block;
      width: 100%;
      height: auto;
      aspect-ratio: 600 / 440;
      cursor: pointer;
    }

    .crayon-result-card {
      background: var(--card);
      border: 2px solid #ec4899;
      border-radius: 1.2rem;
      padding: 1.2rem;
      animation: popIn 0.3s ease-out;
    }

    @media (max-width: 480px) {
      body {
        padding: 0.5rem;
        padding-top: 4.5rem;
        padding-bottom: 1.8rem;
      }
      .tusmo-arena {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
      }
      .tusmo-opp-section {
        flex-direction: row;
        width: 100%;
        max-width: 320px;
        justify-content: space-between;
        padding: 0.35rem 0.75rem;
      }
      .tusmo-opp-grid {
        flex-direction: row;
        gap: 2px;
      }
      .tusmo-opp-row {
        flex-direction: column;
        gap: 2px;
      }
      .tusmo-keyboard {
        gap: 3px;
        padding: 0 1px;
        width: 100%;
      }
      .tusmo-kb-row {
        gap: 2px;
        width: 100%;
      }
      .tusmo-key {
        height: 39px;
        font-size: 0.88rem;
        min-width: 0 !important;
        padding: 0 !important;
      }
      .tusmo-key.wide {
        font-size: 0.78rem;
        padding: 0 !important;
      }
      .tusmo-round-recap-body {
        flex-direction: column;
        gap: 0.4rem;
      }
      .tusmo-round-recap-col {
        width: 100%;
      }
      .recap-vs {
        display: none;
      }

      /* New Games Responsive */
      .hl-cards-container {
        flex-direction: column;
        gap: 0.5rem;
      }
      .hl-card {
        min-height: auto;
        padding: 0.9rem 0.6rem;
        width: 100%;
        box-sizing: border-box;
      }
      .hl-vs-badge {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        margin: -4px 0;
      }
      .hl-buttons-group {
        max-width: 100%;
        flex-direction: row;
      }
      .hl-btn {
        flex: 1;
        padding: 0.65rem 0.4rem;
      }
      .tribunal-vote-grid,
      .tribunal-votes-comparison,
      .jp-estimates-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
      }
      .traq-canvas {
        aspect-ratio: 600 / 480;
      }
      .crayon-canvas {
        aspect-ratio: 600 / 500;
      }

      /* 3 New Games Responsive */
      .march-chests-arena {
        gap: 0.5rem;
      }
      .port-studio-layout {
        flex-direction: column;
        align-items: center;
      }
      .port-compare-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
      }
      .spot-arena-wrapper {
        flex-direction: column;
        gap: 0.8rem;
      }
      .spot-card-disk {
        width: 220px;
        height: 220px;
      }
    }

    /* ==========================================
       1. LE MARCHAND ET LE VOLEUR STYLES
       ========================================== */
    .march-prompt-box {
      background: rgba(30, 41, 59, 0.7);
      border: 1px solid rgba(234, 179, 8, 0.25);
      border-radius: 1rem;
      padding: 0.75rem 1rem;
    }
    .march-prompt-text {
      font-size: 0.98rem;
      font-weight: 700;
      color: var(--text);
      line-height: 1.4;
    }
    .march-speech-bubble {
      display: flex;
      align-items: center;
      gap: 0.8rem;
      background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(245, 158, 11, 0.08));
      border: 2px solid rgba(234, 179, 8, 0.4);
      border-radius: 1.1rem;
      padding: 0.8rem 1rem;
      text-align: left;
    }
    .speech-avatar {
      font-size: 2.2rem;
      flex-shrink: 0;
    }
    .speech-author {
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: #facc15;
      font-weight: 800;
      margin-bottom: 0.15rem;
    }
    .speech-text {
      font-size: 1.05rem;
      font-weight: 800;
      color: #fff;
      margin-bottom: 0.2rem;
    }
    .speech-mood {
      font-size: 0.86rem;
      color: var(--muted);
      font-style: italic;
    }
    .march-chests-arena {
      display: flex;
      justify-content: center;
      align-items: stretch;
      gap: 1rem;
      margin: 0.4rem 0;
    }
    .march-chest {
      flex: 1;
      max-width: 170px;
      background: rgba(15, 23, 42, 0.75);
      border: 2px solid var(--card-border);
      border-radius: 1rem;
      padding: 0.8rem 0.5rem;
      cursor: pointer;
      position: relative;
      transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
      display: flex;
      flex-direction: column;
      align-items: center;
      user-select: none;
    }
    .march-chest:hover {
      transform: translateY(-4px) scale(1.03);
      border-color: rgba(234, 179, 8, 0.5);
      box-shadow: 0 8px 24px rgba(234, 179, 8, 0.15);
    }
    .march-chest.disabled {
      pointer-events: none;
      opacity: 0.85;
    }
    .march-chest.selected {
      border-color: #38bdf8;
      box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    }
    .march-chest.is-gold {
      border-color: #facc15;
      background: rgba(234, 179, 8, 0.15);
      box-shadow: 0 0 25px rgba(250, 204, 21, 0.45);
    }
    .march-chest.is-empty {
      border-color: #64748b;
      opacity: 0.65;
    }
    .chest-box {
      width: 64px;
      height: 54px;
      position: relative;
      margin-bottom: 0.5rem;
    }
    .chest-lid {
      width: 64px;
      height: 22px;
      background: linear-gradient(180deg, #92400e, #78350f);
      border: 2px solid #d97706;
      border-radius: 8px 8px 2px 2px;
      position: relative;
      transition: transform 0.4s ease;
      transform-origin: top center;
    }
    .march-chest.open .chest-lid {
      transform: translateY(-8px) rotateX(40deg);
    }
    .chest-body {
      width: 64px;
      height: 32px;
      background: linear-gradient(180deg, #78350f, #451a03);
      border: 2px solid #b45309;
      border-radius: 2px 2px 8px 8px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .chest-lock {
      font-size: 0.9rem;
    }
    .chest-content {
      position: absolute;
      top: -12px;
      font-size: 1.8rem;
      opacity: 0;
      transition: all 0.3s ease;
    }
    .march-chest.open .chest-content {
      opacity: 1;
      transform: translateY(-10px) scale(1.2);
    }
    .chest-label {
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--text);
    }
    .chest-secret-tag {
      font-size: 0.7rem;
      font-weight: 800;
      color: #facc15;
      background: rgba(234, 179, 8, 0.2);
      padding: 0.15rem 0.4rem;
      border-radius: 0.4rem;
      margin-top: 0.3rem;
    }
    .march-decl-card {
      background: rgba(30, 41, 59, 0.85);
      border: 1px solid rgba(234, 179, 8, 0.3);
      border-radius: 1.1rem;
      padding: 0.9rem;
      text-align: center;
    }
    .march-target-buttons {
      display: flex;
      gap: 0.5rem;
      justify-content: center;
    }
    .march-target-buttons .btn-choice {
      flex: 1;
      padding: 0.6rem 0.4rem;
      font-size: 0.88rem;
      font-weight: 700;
    }
    .march-mood-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
      justify-content: center;
      max-height: 120px;
      overflow-y: auto;
    }
    .march-mood-pill,
    .mood-pill {
      font-size: 0.78rem;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid var(--card-border);
      color: var(--text);
      padding: 0.35rem 0.6rem;
      border-radius: 1rem;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .march-mood-pill:hover,
    .march-mood-pill.active,
    .mood-pill:hover,
    .mood-pill.active {
      background: rgba(234, 179, 8, 0.25);
      border-color: #facc15;
      color: #fef08a;
    }
    .march-waiting-box {
      background: rgba(30, 41, 59, 0.6);
      border: 1px dashed var(--card-border);
      border-radius: 1rem;
      padding: 1.2rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
    }
    .march-spinner {
      font-size: 2rem;
      animation: spinSlow 3s infinite linear;
    }
    @keyframes spinSlow {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    .march-result-card {
      background: rgba(15, 23, 42, 0.92);
      border: 2px solid rgba(234, 179, 8, 0.4);
      border-radius: 1.1rem;
      padding: 1.2rem;
    }

    /* ==========================================
       2. LE TÉMOIN OCULAIRE STYLES
       ========================================== */
    .port-wanted-card {
      background: #fbf0d9;
      color: #1e1e1e;
      border: 3px solid #854d0e;
      border-radius: 1.2rem;
      padding: 1.2rem;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
      position: relative;
    }
    .wanted-stamp {
      font-family: 'Impact', sans-serif;
      font-size: 1.8rem;
      letter-spacing: 2px;
      color: #991b1b;
      border-bottom: 2px solid #854d0e;
      padding-bottom: 0.3rem;
      margin-bottom: 0.6rem;
      text-transform: uppercase;
    }
    .wanted-timer-wrap {
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
      font-size: 0.88rem;
      font-weight: 700;
      color: #78350f;
      margin-bottom: 0.8rem;
    }
    .wanted-timer-bar {
      height: 8px;
      background: rgba(0, 0, 0, 0.12);
      border-radius: 4px;
      overflow: hidden;
    }
    .wanted-timer-bar-fill {
      height: 100%;
      width: 100%;
      background: linear-gradient(90deg, #10b981, #ef4444);
      transition: width 1s linear;
    }
    .wanted-avatar-box {
      width: 200px;
      height: 220px;
      margin: 0 auto 0.6rem auto;
      background: #fdf6e7;
      border: 2px solid #854d0e;
      border-radius: 0.8rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .wanted-hint {
      font-size: 0.85rem;
      font-weight: 600;
      color: #854d0e;
      font-style: italic;
    }
    .port-guide-box {
      background: rgba(30, 41, 59, 0.85);
      border: 2px dashed rgba(99, 102, 241, 0.4);
      border-radius: 1.1rem;
      padding: 1.2rem;
    }
    .port-studio-card {
      background: rgba(30, 41, 59, 0.9);
      border: 1px solid rgba(99, 102, 241, 0.3);
      border-radius: 1.2rem;
      padding: 1rem;
    }
    .port-studio-layout {
      display: flex;
      gap: 1rem;
      align-items: center;
      justify-content: center;
    }
    .port-preview-box {
      width: 180px;
      height: 200px;
      background: rgba(15, 23, 42, 0.8);
      border: 2px solid rgba(99, 102, 241, 0.4);
      border-radius: 0.8rem;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .port-selectors-grid {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
      text-align: left;
    }
    .port-feature-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: rgba(15, 23, 42, 0.6);
      padding: 0.35rem 0.6rem;
      border-radius: 0.6rem;
      border: 1px solid var(--card-border);
    }
    .feature-label {
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--muted);
    }
    .feature-ctrl {
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }
    .btn-ctrl {
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid var(--card-border);
      color: var(--text);
      width: 26px;
      height: 26px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .btn-ctrl:hover {
      background: rgba(99, 102, 241, 0.3);
      border-color: #818cf8;
      color: #fff;
    }
    .feature-val {
      font-size: 0.82rem;
      font-weight: 800;
      color: #818cf8;
      min-width: 90px;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .port-result-card {
      background: rgba(15, 23, 42, 0.92);
      border: 2px solid rgba(99, 102, 241, 0.4);
      border-radius: 1.2rem;
      padding: 1.2rem;
    }
    .port-compare-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
      margin-bottom: 0.8rem;
    }
    .port-compare-col {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.4rem;
    }
    .compare-tag {
      font-size: 0.72rem;
      font-weight: 800;
      padding: 0.2rem 0.5rem;
      border-radius: 0.4rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .compare-box {
      width: 150px;
      height: 170px;
      background: rgba(30, 41, 59, 0.7);
      border: 2px solid var(--card-border);
      border-radius: 0.8rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .port-similarity-box {
      background: rgba(30, 41, 59, 0.6);
      border-radius: 0.8rem;
      padding: 0.6rem 0.8rem;
      margin-bottom: 0.6rem;
    }
    .port-sim-bar {
      height: 10px;
      background: rgba(0, 0, 0, 0.3);
      border-radius: 5px;
      overflow: hidden;
    }
    .port-sim-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, #6366f1, #10b981);
      transition: width 0.6s ease;
    }
    .port-breakdown-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
      justify-content: center;
      margin-bottom: 0.6rem;
    }
    .port-breakdown-pill {
      font-size: 0.75rem;
      font-weight: 700;
      padding: 0.2rem 0.5rem;
      border-radius: 0.4rem;
    }
    .port-breakdown-pill.match {
      background: rgba(16, 185, 129, 0.2);
      color: #34d399;
      border: 1px solid rgba(16, 185, 129, 0.4);
    }
    .port-breakdown-pill.miss {
      background: rgba(239, 68, 68, 0.15);
      color: #f87171;
      border: 1px solid rgba(239, 68, 68, 0.3);
    }
    .port-police-stamp {
      font-family: 'Impact', sans-serif;
      font-size: 1.3rem;
      color: #38bdf8;
      letter-spacing: 1px;
      margin-top: 0.4rem;
    }

    /* ==========================================
       3. SPOT IT DUO STYLES
       ========================================== */
    .spot-prompt-pill {
      background: rgba(245, 158, 11, 0.15);
      border: 1px solid rgba(245, 158, 11, 0.3);
      color: #fbbf24;
      font-size: 0.9rem;
      font-weight: 700;
      padding: 0.4rem 0.8rem;
      border-radius: 1rem;
    }
    .spot-arena-wrapper {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 1rem;
      position: relative;
      margin: 0.5rem 0;
    }
    .spot-card-disk {
      width: 250px;
      height: 250px;
      background: radial-gradient(circle, #ffffff, #f1f5f9);
      border: 5px solid #cbd5e1;
      border-radius: 50%;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(0, 0, 0, 0.05);
      position: relative;
      overflow: hidden;
      user-select: none;
      touch-action: manipulation;
    }
    .spot-symbol-item,
    .spot-symbol-btn {
      position: absolute;
      transform: translate(-50%, -50%) !important;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(0, 0, 0, 0.02);
      border: 2px solid transparent;
      border-radius: 50%;
      width: 56px;
      height: 56px;
      padding: 0;
      margin: 0;
      outline: none;
      user-select: none;
      touch-action: manipulation;
      transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    }
    .spot-emoji {
      font-size: 2.1rem;
      line-height: 1;
      display: inline-block;
      pointer-events: none;
      user-select: none;
    }
    .spot-symbol-item:hover,
    .spot-symbol-btn:hover {
      background: rgba(245, 158, 11, 0.22);
      border-color: rgba(245, 158, 11, 0.6);
      filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.95)) brightness(1.15);
      transform: translate(-50%, -50%) !important;
    }
    .spot-symbol-item:active,
    .spot-symbol-btn:active {
      background: rgba(245, 158, 11, 0.45);
      border-color: #f59e0b;
      transform: translate(-50%, -50%) !important;
    }
    .spot-symbol-btn.match-flash {
      animation: matchPulse 0.4s ease;
    }
    @keyframes matchPulse {
      0% { transform: scale(1); filter: brightness(1); }
      50% { transform: scale(1.5); filter: brightness(1.8) drop-shadow(0 0 16px #10b981); }
      100% { transform: scale(1); filter: brightness(1); }
    }
    .spot-vs-badge {
      background: linear-gradient(135deg, #ec4899, #8b5cf6);
      color: #fff;
      font-weight: 900;
      font-size: 1.1rem;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 15px rgba(236, 72, 153, 0.5);
      flex-shrink: 0;
      z-index: 2;
    }
    .spot-freeze-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(15, 23, 42, 0.85);
      backdrop-filter: blur(4px);
      border-radius: 1.2rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      z-index: 10;
      animation: shakeFreeze 0.3s ease;
    }
    @keyframes shakeFreeze {
      0%, 100% { transform: translateX(0); }
      20%, 60% { transform: translateX(-8px); }
      40%, 80% { transform: translateX(8px); }
    }

    /* ==========================================
       4. WANTED ! (MARIO 64 DS STYLE)
       ========================================== */
    .wanted-mario-poster {
      background: linear-gradient(135deg, #fdf4dc, #f7e1b5);
      border: 3px solid #854d0e;
      border-radius: 1rem;
      padding: 0.6rem 1rem;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
      position: relative;
      text-align: center;
    }
    .wanted-mario-stamp {
      font-family: 'Impact', sans-serif;
      font-size: 1.5rem;
      letter-spacing: 2px;
      color: #991b1b;
      text-transform: uppercase;
      line-height: 1;
      margin-bottom: 0.2rem;
    }
    .wanted-target-display {
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 0.2rem 0;
    }
    .wanted-target-emoji {
      font-size: 3rem;
      line-height: 1;
      display: inline-block;
      animation: wantedPulse 1.8s infinite ease-in-out;
      filter: drop-shadow(0 4px 10px rgba(133, 77, 14, 0.4));
    }
    @keyframes wantedPulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.15) rotate(4deg); }
    }
    .wanted-mario-subtext {
      font-size: 0.8rem;
      font-weight: 700;
      color: #78350f;
    }
    .wanted-arena-wrapper {
      position: relative;
      width: 100%;
      height: 440px;
      max-height: 65vh;
      border-radius: 1.2rem;
      overflow: hidden;
      border: 2px solid var(--accent);
      background: radial-gradient(circle at center, #1e293b, #090d16);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.6);
      user-select: none;
      touch-action: none;
      cursor: crosshair;
    }
    .wanted-heads-container {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: auto;
    }
    .wanted-head-item {
      position: absolute;
      top: 0;
      left: 0;
      font-size: 2.35rem;
      line-height: 1;
      opacity: 1 !important;
      filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.75)) !important;
      cursor: pointer;
      user-select: none;
      touch-action: none;
      will-change: transform;
      transform-origin: center center;
    }
    .wanted-head-item:active {
      transform: scale(1.25) !important;
    }
    .wanted-particle-spark {
      position: absolute;
      border-radius: 50%;
      pointer-events: none;
      transform: translate(-50%, -50%);
    }

    /* ================= SALONS DUO VS MULTI-JOUEURS ================= */
    .room-mode-selector {
      display: flex;
      gap: 0.5rem;
      background: rgba(15, 23, 42, 0.6);
      padding: 0.35rem;
      border-radius: 12px;
      border: 1px solid var(--card-border);
      margin-bottom: 0.8rem;
    }

    .room-mode-btn {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 0.6rem 0.5rem;
      border-radius: 9px;
      background: transparent;
      border: 1px solid transparent;
      color: var(--muted);
      cursor: pointer;
      transition: all 0.2s ease;
      font-weight: 700;
      font-size: 0.88rem;
      gap: 0.2rem;
    }

    .room-mode-btn .mode-icon {
      font-size: 1.3rem;
    }

    .room-mode-btn.active {
      background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(168, 85, 247, 0.18));
      border-color: var(--accent);
      color: #fff;
      box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
    }

    .room-capacity-wrapper {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(255, 255, 255, 0.03);
      border: 1px solid var(--card-border);
      border-radius: 10px;
      padding: 0.5rem 0.8rem;
      margin-bottom: 0.8rem;
    }

    .room-capacity-chips {
      display: flex;
      gap: 0.35rem;
    }

    .cap-chip {
      padding: 0.3rem 0.65rem;
      font-size: 0.8rem;
      font-weight: 800;
      border-radius: 6px;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid var(--card-border);
      color: var(--text);
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .cap-chip:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    .cap-chip.active {
      background: var(--accent);
      border-color: var(--accent);
      color: #0f172a;
      box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
    }

    .room-roster-box {
      background: rgba(15, 23, 42, 0.7);
      border: 1px solid var(--card-border);
      border-radius: 12px;
      padding: 0.75rem;
      margin-bottom: 0.8rem;
      text-align: left;
    }

    .roster-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.78rem;
      font-weight: 800;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 0.5rem;
    }

    .roster-players-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
      gap: 0.45rem;
    }

    .roster-player-chip {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      background: rgba(255, 255, 255, 0.04);
      border: 1.5px solid var(--card-border);
      border-radius: 8px;
      padding: 0.4rem 0.6rem;
      font-size: 0.82rem;
      font-weight: 700;
      position: relative;
      overflow: hidden;
    }

    .roster-player-chip .player-avatar {
      font-size: 1.15rem;
      line-height: 1;
    }

    .roster-player-chip .player-name {
      flex: 1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-size: 0.8rem;
    }

    .roster-player-chip .host-badge {
      font-size: 0.7rem;
      color: #f59e0b;
      margin-left: auto;
    }

    .game-card-tag {
      font-size: 0.68rem;
      font-weight: 800;
      padding: 0.15rem 0.45rem;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.4px;
      margin-left: auto;
    }

    .tag-multi {
      background: rgba(16, 185, 129, 0.15);
      border: 1px solid rgba(16, 185, 129, 0.4);
      color: #34d399;
    }

    .tag-duo {
      background: rgba(244, 63, 94, 0.15);
      border: 1px solid rgba(244, 63, 94, 0.4);
      color: #fb7185;
    }