/*!
 * Sllina - apple-design.css
 * ------------------------
 * Extracted verbatim from the old single-file index.html.
 * Overrides that must win over main.css.
 * Content below keeps its ORIGINAL order; navigate via the
 * banner comments inside this file.
 */

/* NOTE: MUST load AFTER main.css. */

      :root, html.dark {
        --apple-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
        --apple-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
        --apple-green: #34c759;
        --apple-green-rgb: 52, 199, 89;
        --apple-glass: rgba(24, 22, 20, 0.72);
        --apple-glass-strong: rgba(20, 18, 16, 0.86);
        --apple-hairline: rgba(255, 255, 255, 0.09);
        --apple-shadow-pop: 0 28px 80px rgba(0, 0, 0, 0.55);
      }
      html:not(.dark) {
        --apple-glass: rgba(255, 255, 255, 0.72);
        --apple-glass-strong: rgba(255, 255, 255, 0.85);
        --apple-hairline: rgba(0, 0, 0, 0.08);
        --apple-shadow-pop: 0 28px 80px rgba(28, 25, 23, 0.28);
      }

      html { -webkit-tap-highlight-color: transparent; }

      /* ── Top bar: liquid glass (default nav; custom nav-style choices are preserved) ── */
      .bbx-top:not([class*="nav-style-"]),
      .site-header:not([class*="nav-style-"]) {
        background: var(--apple-glass) !important;
        -webkit-backdrop-filter: blur(26px) saturate(180%) !important;
        backdrop-filter: blur(26px) saturate(180%) !important;
        box-shadow: 0 1px 0 var(--apple-hairline), 0 8px 32px rgba(0, 0, 0, 0.12) !important;
        border-bottom: none !important;
        /* Pin the frosted app bar: matches main.css fixed bar, floats above games on scroll. */
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
      }

      /* ── Buttons: Apple iOS style ── */
      .btn-primary {
        border-radius: 16px !important;
        min-height: 48px !important;
        font-size: 1rem !important;
        font-weight: 700 !important;
        background: #ff6f2e !important;
        color: #fff !important;
        text-shadow: none !important;
        border: none !important;
        box-shadow: 0 2px 10px rgba(var(--orange-rgb), 0.35) !important;
        transition: transform 0.22s var(--apple-spring), box-shadow 0.25s var(--apple-ease), filter 0.2s !important;
      }
      .btn-primary:hover { transform: translateY(-1px) !important; filter: brightness(1.05) !important; box-shadow: 0 4px 16px rgba(var(--orange-rgb), 0.40) !important; }
      .btn-primary:active { transform: scale(0.965) !important; filter: brightness(0.97) !important; }
      .btn-ghost {
        border-radius: 14px !important;
        background: rgba(var(--orange-rgb), 0.10) !important;
        border: 1px solid rgba(var(--orange-rgb), 0.22) !important;
        transition: transform 0.2s var(--apple-spring), background 0.2s var(--apple-ease) !important;
      }
      .btn-ghost:hover { background: rgba(var(--orange-rgb), 0.16) !important; }
      .btn-ghost:active { transform: scale(0.965) !important; }
      .btn-dark {
        border-radius: 14px !important;
        background: #1c1c1e !important;
        color: #fff !important;
        text-shadow: none !important;
      }
      .btn-danger {
        border-radius: 14px !important;
        background: #ff3b30 !important;
        color: #fff !important;
        text-shadow: none !important;
      }
      .btn-google { transition: transform 0.2s var(--apple-spring), border-color 0.2s, background 0.2s !important; }
      .btn-google:hover { border-color: rgba(var(--orange-rgb), 0.45) !important; }
      .btn-google:active { transform: scale(0.975) !important; }

      /* ── Press feedback: every interactive button squeezes + dims on tap
         (loaded after main.css, later rules with !important win) ── */
      .btn-primary:active,
      .btn-ghost:active,
      .btn-dark:active,
      .btn-danger:active,
      .btn-google:active,
      .pill-btn:active,
      .wc-chip:active,
      .wc-chip.on:active,
      .wc-mic:active,
      .wc-mic.rec:active,
      .bbx-chip:active,
      .assist-pill:active,
      button[data-action]:active {
        transform: scale(0.92) translateY(1px) !important;
        filter: brightness(0.88) saturate(0.9) !important;
        box-shadow: none !important;
        transition: transform 0.12s var(--apple-spring), filter 0.12s var(--apple-ease), box-shadow 0.12s var(--apple-ease) !important;
      }

      /* ── Game buttons: squares + Apple soft fills, not pills ── */
      .bbx-chip { border-radius: 999px !important; background: rgba(120, 120, 128, 0.14) !important; border-color: rgba(120, 120, 128, 0.20) !important; color: var(--ink) !important; }
      .bbx-chip:hover { border-color: rgba(var(--orange-rgb), 0.45) !important; }
      .pill-btn,
      .assist-pill,
      .player-tag,
      .assist-team { border-radius: 14px !important; }
      .pill-btn { background: rgba(120, 120, 128, 0.14) !important; border-color: rgba(120, 120, 128, 0.20) !important; color: var(--ink) !important; }
      .summary-card [data-action='games-fav'] { border-radius: 14px !important; }
      .summary-card [data-action='games-fav']::before { border-radius: 14px !important; }
      button[data-action='show-rules'] { border-radius: 14px !important; }
      button[data-action='inv-theme'] { border-radius: 10px !important; }
      select[data-action='wti-set-category'],
      select[data-action='ai-set-category'] { border-radius: 14px !important; }

      /* ── Cards & tiles ── */
      .summary-card {
        border-radius: 18px !important;
        transition: transform 0.3s var(--apple-spring), box-shadow 0.3s var(--apple-ease) !important;
      }
      .summary-card:hover {
        transform: translateY(-4px) scale(1.015) !important;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(var(--orange-rgb), 0.18) !important;
      }

      /* ── Game cube tiles: larger emoji (responsive, mirrors .summary-grid breakpoints) ── */
      .summary-card > strong,
      .summary-card[class*='color-'] > strong {
        font-size: 2.6rem !important;
      }
      @media (min-width: 520px) {
        .summary-card > strong,
        .summary-card[class*='color-'] > strong {
          font-size: 3.1rem !important;
        }
      }
      @media (min-width: 820px) {
        .summary-card > strong,
        .summary-card[class*='color-'] > strong {
          font-size: 3.5rem !important;
        }
      }

      /* ── Game cube tiles: soft Apple shadow (was a heavy dark drop) ── */
      .summary-card > strong,
      .summary-card[class*='color-'] > strong {
        box-shadow: 0 4px 14px rgba(28, 25, 23, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.30) !important;
      }
      .summary-card:hover > strong {
        box-shadow: 0 12px 26px rgba(28, 25, 23, 0.22), 0 0 16px rgba(var(--orange-rgb), 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;
      }

      /* ── Chips / banner (identity: Sllina orange) ── */
      .bbx-chip {
        min-height: 44px !important;
        height: 44px !important;
        font-size: 0.875rem !important;
        padding-inline: 18px !important;
      }
      .bbx-chip.on {
        background: #ff6f2e !important;
        color: #fff !important;
        text-shadow: none;
        box-shadow: 0 2px 10px rgba(var(--orange-rgb), 0.35) !important;
      }
      .bbx-random-btn {
        height: 46px !important;
        min-height: 46px !important;
        width: auto !important;
        padding-inline: 18px !important;
        justify-content: center !important;
        font-size: 0.875rem !important;
        gap: 6px !important;
        background: rgba(120, 120, 128, 0.14) !important;
        border: 1px solid rgba(120, 120, 128, 0.20) !important;
        color: var(--ink) !important;
        box-shadow: none !important;
      }
      .bbx-random-btn:hover {
        color: var(--ink) !important;
        background: rgba(120, 120, 128, 0.22) !important;
        border-color: rgba(var(--orange-rgb), 0.45) !important;
        box-shadow: none !important;
        transform: translateY(-1px);
      }
      .bbx-random-btn:active {
        transform: scale(0.97) !important;
      }
      .bbx-room-btn {
        height: 46px !important;
        min-height: 46px !important;
        width: 46px !important;
        padding-inline: 0 !important;
        justify-content: center !important;
        font-size: 1.05rem !important;
        gap: 0 !important;
        background: linear-gradient(140deg, #ff8c46, #ff6f2e) !important;
        border-color: transparent !important;
        color: #fff !important;
        box-shadow: 0 3px 14px rgba(var(--orange-rgb), 0.32) !important;
      }
      .bbx-room-btn:hover {
        color: #fff !important;
        border-color: transparent !important;
        box-shadow: 0 5px 18px rgba(var(--orange-rgb), 0.45) !important;
        transform: translateY(-1px);
      }
      .bbx-room-btn:active {
        transform: scale(0.97) !important;
      }
      .bbx-chip-sep {
        flex-shrink: 0;
        width: 1px;
        height: 26px;
        align-self: center;
        background: rgba(120, 120, 128, 0.30) !important;
        margin: 0 2px;
      }
      .bbx-banner {
        border-radius: 32px !important;
        min-height: 118px !important;
        padding: 10px 14px 12px !important;
        background: linear-gradient(135deg, #ffb27d 0%, #ff8c46 48%, #ff6f2e 100%) !important;
      }
      .bbx-banner-actions { flex-wrap: nowrap !important; gap: 8px !important; }
      .bbx-banner > .bbx-banner-art { width: clamp(120px, 16vw, 144px) !important; }
      .bbx-banner-kick { text-shadow: 0 1px 6px rgba(140, 55, 10, 0.55); }
      .bbx-banner-slide p { text-shadow: 0 1px 6px rgba(140, 55, 10, 0.55); }

      /* ── Home search icon (sits in the chips/pills row, circular) ── */
      .bbx-home-search { flex: 0 0 auto; display: grid; place-items: center; }
      .bbx-home-search button {
        width: 40px; height: 40px;
        display: grid; place-items: center;
        border-radius: 50%;
        border: 1px solid var(--stroke);
        background: rgba(255, 255, 255, 0.06);
        color: var(--orange);
        cursor: pointer;
        transition: transform 0.2s var(--apple-spring), background 0.2s var(--apple-ease);
      }
      .bbx-home-search button:active { transform: scale(0.9); }
      .bbx-home-search button svg { width: 18px; height: 18px; }

      /* ── Favourite heart: 44px Apple hit target, keeps the small corner circle ── */
      .summary-card [data-action='games-fav'] {
        width: 44px !important;
        height: 44px !important;
        top: -5px !important;
        inset-inline-end: -5px !important;
        border-radius: 50%;
        background: transparent !important;
        border: none !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        font-size: 1.05rem !important;
      }
      .summary-card [data-action='games-fav']::before {
        content: "";
        position: absolute;
        inset: 10px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.20);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        z-index: -1;
      }
      .summary-card [data-action='games-fav']:active { transform: scale(0.9); }

      /* ── Apple type scale & minimum readable text ── */
      .bbx-head { margin: 24px 0 12px !important; }
      .bbx-head h2 {
        font-size: clamp(1.3rem, 4.6vw, 1.75rem) !important;
        font-weight: 800 !important;
        letter-spacing: -0.02em !important;
        line-height: 1.2 !important;
      }
      .bbx-more { font-size: 0.72rem !important; min-height: 30px !important; padding: 3px 10px !important; }
      .bbx-more svg { width: 10px !important; height: 10px !important; }
      .bbx-banner-cta { min-height: 44px !important; font-size: 0.76rem !important; padding-inline: 14px !important; }
      .eyebrow { font-size: 0.75rem !important; }
      .bbx-banner-kick { font-size: 0.82rem !important; }
      .bbx-banner-slide p { font-size: 0.82rem !important; }
      .bbx-count { font-size: 0.82rem !important; }
      .summary-card p { font-size: 0.78rem !important; line-height: 1.45 !important; }
      .bbx-wallet { height: 32px !important; min-height: 32px !important; font-size: 0.78rem !important; padding-inline-start: 10px !important; padding-inline-end: 3px !important; gap: 5px !important; }
      .bbx-wallet .plus { min-width: 22px !important; height: 22px !important; font-size: 0.7rem !important; padding: 0 6px !important; }

      /* ── Bottom dock ── */
      .bottom-nav { border-radius: 24px 24px 0 0 !important; }
      .bnav-link span.t { font-size: 0.72rem !important; }
      .bnav-link { transition: transform 0.2s var(--apple-spring), background 0.2s var(--apple-ease), color 0.2s !important; }
      .bnav-link:active, .bnav-center:active { transform: scale(0.92) !important; }

      /* ── Sheets / modals / consent ── */
      .modal-overlay, .wd-modal-overlay, .settings-overlay, .consent-overlay {
        background: rgba(15, 12, 20, 0.42) !important;
        -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
        backdrop-filter: blur(24px) saturate(160%) !important;
      }
      .modal-card, .wd-modal-card, .settings-panel, .consent-card {
        border-radius: 24px !important;
        box-shadow: var(--apple-shadow-pop) !important;
        animation: appleModalIn 0.42s var(--apple-spring) !important;
      }
      .consent-card { border-radius: 18px !important; }
      .consent-card .consent-buttons, .consent-card .consent-actions { display: flex; gap: 10px; }
      @keyframes appleModalIn {
        from { transform: scale(0.92) translateY(14px); opacity: 0; }
        to   { transform: scale(1) translateY(0); opacity: 1; }
      }

      /* ── Contact page: Apple ── */
      .card.form {
        border: 1px solid var(--line) !important;
        border-radius: 24px !important;
        background: var(--surface) !important;
        box-shadow: 0 10px 30px rgba(28, 25, 23, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
      }
      html.dark .card.form {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
      }
      .card.form label {
        display: flex;
        flex-direction: column;
        gap: 8px;
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--muted);
      }
      .card.form input,
      .card.form textarea {
        background: var(--surface-2) !important;
        border: 1.5px solid var(--line) !important;
        color: var(--ink) !important;
      }
      #contact-form .btn-ghost {
        border-radius: 999px !important;
        border: 1.5px solid var(--line) !important;
        background: transparent !important;
      }
      .faq-item {
        border: 1px solid var(--line) !important;
        border-radius: 20px !important;
        background: var(--surface) !important;
        box-shadow: 0 1px 2px rgba(28, 25, 23, 0.03) !important;
        padding: 16px 18px;
      }
      .faq-item:hover {
        transform: none !important;
        border-color: var(--line) !important;
        box-shadow: 0 6px 20px rgba(28, 25, 23, 0.06) !important;
      }
      .faq-item summary {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }
      .faq-item summary:after {
        content: '';
        width: 9px; height: 9px;
        flex-shrink: 0;
        border-right: 2px solid var(--muted);
        border-bottom: 2px solid var(--muted);
        transform: rotate(-45deg);
        margin-bottom: 4px;
        transition: transform 0.25s var(--apple-ease);
      }
      .faq-item[open] summary:after {
        content: '';
        transform: rotate(45deg);
        margin-bottom: -2px;
      }
      .faq-item:hover summary { color: var(--orange); }
      .faq-item[open] {
        border-color: rgba(var(--orange-rgb), 0.4) !important;
        background: var(--surface) !important;
      }
      .legal-row a {
        background: rgba(120, 120, 128, 0.08) !important;
        border: 1px solid rgba(120, 120, 128, 0.18) !important;
        color: var(--ink) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
        transition: background 0.2s var(--apple-ease), color 0.2s var(--apple-ease), border-color 0.2s var(--apple-ease), transform 0.15s var(--apple-ease);
      }
      .legal-row a:hover {
        background: rgba(var(--orange-rgb), 0.10) !important;
        border-color: rgba(var(--orange-rgb), 0.35) !important;
        color: var(--orange) !important;
        transform: translateY(-1px);
      }
      html.dark .legal-row a {
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.10) !important;
        box-shadow: none;
      }
      html.dark .legal-row a:hover {
        background: rgba(var(--orange-rgb), 0.16) !important;
        border-color: rgba(var(--orange-rgb), 0.45) !important;
        color: #ffb28a !important;
      }
      .legal-pills .legal-row { margin-top: 0; }

      /* ── Apple auth card ── */
      .apple-auth-card {
        border-radius: 32px !important;
        overflow: hidden;
        position: relative;
        box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45), 0 2px 12px rgba(var(--orange-rgb), 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
        animation: appleCardIn 0.5s var(--apple-spring) !important;
      }
      html:not(.dark) .apple-auth-card {
        box-shadow: 0 36px 90px rgba(28, 25, 23, 0.30), 0 2px 12px rgba(var(--orange-rgb), 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
      }
      .apple-auth-card::before {
        content: "";
        display: block;
        width: 72px; height: 72px;
        margin: 10px auto 26px;
        border-radius: 20px;
        background: #fff;
        background-position: center;
        background-size: 82% auto;
        background-repeat: no-repeat;
        box-shadow: 0 12px 28px rgba(var(--orange-rgb), 0.30), 0 2px 8px rgba(28, 25, 23, 0.10), inset 0 0 0 1px rgba(28, 25, 23, 0.05);
      }
      @keyframes appleCardIn {
        from { transform: translateY(16px) scale(0.97); opacity: 0; }
        to   { transform: translateY(0) scale(1); opacity: 1; }
      }
      .apple-auth-card .btn-primary {
        min-height: 60px !important;
        border-radius: 18px !important;
        font-size: 1.1rem !important;
      }
      .apple-auth-card .btn-google {
        min-height: 58px !important;
        border-radius: 18px !important;
      }

      /* ── Apple fields ── */
      input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]) {
        -webkit-appearance: none; appearance: none;
        border-radius: 14px !important;
        transition: border-color 0.2s var(--apple-ease), box-shadow 0.25s var(--apple-ease), background 0.2s !important;
      }
      input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):focus {
        outline: none !important;
        border-color: var(--orange) !important;
        box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.22), 0 0 0 1px rgba(var(--orange-rgb), 0.45) inset !important;
      }

      /* ── Verified badge: Apple green ── */
      .apple-verified {
        display: inline-flex;
        align-items: center; justify-content: center;
        width: 24px; height: 24px;
        flex-shrink: 0;
        border-radius: 50%;
        background: radial-gradient(circle at 30% 25%, #4cd964, var(--apple-green) 60%, #28a745);
        color: #fff;
        box-shadow: 0 4px 10px rgba(var(--apple-green-rgb), 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
        animation: appleBadgePop 0.5s var(--apple-spring);
      }
      .apple-verified svg { width: 15px; height: 15px; }
      .apple-ava { position: relative; display: inline-flex; }
      .apple-ava-badge {
        position: absolute;
        bottom: -2px; inset-inline-end: -2px;
        width: 15px; height: 15px;
        border-radius: 50%;
        background: radial-gradient(circle at 30% 25%, #4cd964, var(--apple-green) 60%, #28a745);
        color: #fff;
        display: flex; align-items: center; justify-content: center;
        box-shadow: 0 0 0 2px var(--bg-base), 0 3px 8px rgba(var(--apple-green-rgb), 0.5);
      }
      .apple-ava-badge svg { width: 9px; height: 9px; }
      @keyframes appleBadgePop {
        from { transform: scale(0); }
        to   { transform: scale(1); }
      }
      .apple-verified-chip {
        display: inline-flex; align-items: center; gap: 6px;
        margin: 0;
        padding: 6px 14px;
        border-radius: 999px;
        background: rgba(var(--apple-green-rgb), 0.12);
        border: 1px solid rgba(var(--apple-green-rgb), 0.30);
        color: var(--apple-green);
        font-weight: 800;
        font-size: 0.82rem;
      }

      /* ── Apple notice (unverified email) ── */
      .apple-notice {
        width: 100%; max-width: 440px;
        padding: 18px;
        border-radius: 20px;
        background: rgba(255, 149, 0, 0.10);
        border: 1px solid rgba(255, 149, 0, 0.30);
        color: var(--ink);
        font-size: 0.88rem;
        line-height: 1.7;
        text-align: start;
      }
      .apple-notice-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
      .apple-notice-head svg { width: 20px; height: 20px; flex-shrink: 0; color: #ff9500; }
      .apple-notice p { margin: 0 0 12px; }
      .apple-notice-actions { display: flex; gap: 10px; flex-wrap: wrap; }
      .apple-notice-actions .btn-ghost, .apple-notice-actions .btn-primary { flex: 1; min-height: 44px; }
      .apple-notice-status { margin: 10px 0 0; font-size: 0.85rem; color: var(--muted); min-height: 1.2em; }

      /* ── Page hero: Apple large title ── */
      html:not(.in-game) .page-hero h1 {
        font-size: clamp(1.65rem, 5.2vw, 2.5rem) !important;
        letter-spacing: -0.03em !important;
        font-weight: 800 !important;
      }

      /* ── Scrollbars (Chrome/Edge) ── */
      ::-webkit-scrollbar { width: 10px; height: 10px; }
      ::-webkit-scrollbar-thumb { background: rgba(120, 113, 108, 0.4); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
      ::-webkit-scrollbar-thumb:hover { background: rgba(120, 113, 108, 0.6); border: 2px solid transparent; background-clip: padding-box; }

      /* ── Reduced motion ── */
      @media (prefers-reduced-motion: reduce) {
        .apple-auth-card, .modal-card, .wd-modal-card, .settings-panel, .consent-card, .apple-verified {
          animation: none !important;
        }
        .summary-card, .btn-primary, .btn-ghost, .btn-google, .bnav-link, .bnav-center { transition: none !important; }
      }

      /* ── Tier 1: section-head + wallet icons ── */
      .hico { width: 18px; height: 18px; flex-shrink: 0; color: #ff9a5a; }
      .bbx-wallet .gem svg { width: 17px; height: 17px; display: block; color: #ff9a5a; }
      .bbx-wallet .gem img { width: 18px; height: 18px; display: block; border-radius: 50%; object-fit: cover; }
      .bbx-wallet:not(.bbx-wallet-diamond) .gem img { border-radius: 6px; }

      /* ── Tier 1: settings bottom sheet (slides up from the bottom) ── */
      .settings-panel {
        position: fixed !important;
        inset-inline: 0 !important;
        top: auto !important;
        right: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        width: min(100%, 460px) !important;
        height: auto !important;
        max-height: 78vh !important;
        margin: 0 auto !important;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        will-change: transform;
        z-index: 2000 !important;
        border-radius: 24px 24px 0 0 !important;
        padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
        background: var(--apple-glass-strong) !important;
        -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
        backdrop-filter: blur(40px) saturate(180%) !important;
        border: none !important;
        box-shadow: 0 -12px 60px rgba(0, 0, 0, 0.4), 0 1px 0 var(--apple-hairline) !important;
        display: none;
        flex-direction: column;
        gap: 12px;
      }
      html:not(.dark) .settings-panel { box-shadow: 0 -12px 60px rgba(28, 25, 23, 0.22), 0 1px 0 var(--apple-hairline) !important; }
      .settings-panel.show {
        display: flex;
        animation: settingsSlideUp 0.4s var(--apple-spring) !important;
      }
      @keyframes settingsSlideUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
      }
      .settings-grab {
        display: flex;
        justify-content: center;
        padding: 8px 0 4px;
        cursor: grab;
        touch-action: none;
        flex-shrink: 0;
        -webkit-user-select: none;
        user-select: none;
      }
      .settings-grab:active { cursor: grabbing; }
      .settings-handle {
        width: 44px;
        height: 5px;
        border-radius: 999px;
        background: rgba(120, 120, 128, 0.4);
      }
      .settings-head {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 5;
        flex-shrink: 0;
        margin: 0 -12px;
        padding: 6px 12px 12px;
        border-bottom: 1px solid var(--apple-hairline);
        background: var(--apple-glass-strong);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
        backdrop-filter: blur(40px) saturate(180%);
      }
      .settings-title {
        font-size: 1.15rem;
        font-weight: 700;
        letter-spacing: -0.01em;
        color: var(--ink);
        text-align: center;
      }
      .settings-close {
        width: 34px;
        height: 34px;
        border: none;
        border-radius: 50%;
        background: rgba(120, 120, 128, 0.16);
        color: var(--ink);
        font-size: 1rem;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.2s var(--apple-ease), transform 0.2s var(--apple-spring);
      }
      .settings-close:hover { background: rgba(120, 120, 128, 0.28); }
      .settings-close:active { transform: scale(0.9); }
      .settings-group {
        border-radius: 16px;
        overflow: hidden;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid var(--apple-hairline);
      }
      html:not(.dark) .settings-group { background: rgba(0, 0, 0, 0.04); }
      .settings-group .settings-item + .settings-item { border-top: 1px solid var(--apple-hairline); }
      .settings-item.settings-vol-row { cursor: default; }
      .settings-slider {
        flex: 1;
        min-height: 32px;
        margin: 0;
        direction: ltr;
        -webkit-appearance: none;
        appearance: none;
        background: transparent;
        cursor: pointer;
      }
      .settings-slider::-webkit-slider-runnable-track {
        height: 6px;
        border-radius: 999px;
        background: linear-gradient(to right, var(--orange) var(--slider-pct, 50%), var(--line) var(--slider-pct, 50%));
      }
      .settings-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        margin-top: -7px;
        border-radius: 50%;
        background: #fff;
        border: 2px solid var(--orange);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
      }
      .settings-slider::-moz-range-track {
        height: 6px;
        border-radius: 999px;
        background: var(--line);
      }
      .settings-slider::-moz-range-progress {
        height: 6px;
        border-radius: 999px;
        background: var(--orange);
      }
      .settings-slider::-moz-range-thumb {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #fff;
        border: 2px solid var(--orange);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
      }
      .settings-item {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 13px 16px;
        min-height: 52px;
        background: none;
        border: none;
        color: var(--ink);
        font: inherit;
        font-size: 0.95rem;
        font-weight: 500;
        text-align: start;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.15s ease;
      }
      .settings-item:hover { background: rgba(255, 255, 255, 0.04); }
      .settings-item:active { background: rgba(255, 255, 255, 0.08); }
      html:not(.dark) .settings-item:hover { background: rgba(0, 0, 0, 0.03); }
      .settings-item .s-icon {
        width: 30px; height: 30px;
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0;
        border-radius: 8px;
        color: #ff9a5a;
        background: rgba(255, 165, 105, 0.16);
        box-shadow: none;
      }
      .settings-item .s-icon svg { width: 16px; height: 16px; }
      .settings-item .s-label { flex: 1; }
      .settings-item .s-chev { color: var(--text-secondary); opacity: 0.7; display: flex; flex-shrink: 0; }
      .settings-item .s-chev svg { width: 14px; height: 14px; }
      .settings-item .switch {
        width: 46px; height: 28px;
        border-radius: 999px;
        background: rgba(120, 120, 128, 0.32);
        position: relative;
        flex-shrink: 0;
        transition: background 0.25s ease;
        display: inline-block;
      }
      .settings-item .switch i {
        position: absolute;
        top: 2px;
        inset-inline-start: 2px;
        width: 24px; height: 24px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
        transition: inset-inline-start 0.25s var(--apple-spring), transform 0.25s var(--apple-spring);
      }
      .settings-item .switch.on { background: var(--apple-green); }
      .settings-item .switch.on i { inset-inline-start: calc(100% - 26px); }

      /* ── Tier 1: settings social icons row (Apple-style glass tiles) ── */
      .settings-platform-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 14px;
        padding: 14px 12px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid var(--apple-hairline);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 16px rgba(0, 0, 0, 0.2);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        backdrop-filter: blur(20px) saturate(180%);
      }
      html:not(.dark) .settings-platform-row { background: rgba(255, 255, 255, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 4px 16px rgba(28, 25, 23, 0.08); }
      .settings-platform-link {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        flex-shrink: 0;
        color: #fff;
        text-decoration: none;
        border: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 2px 6px rgba(0, 0, 0, 0.18);
        -webkit-backdrop-filter: blur(12px) saturate(160%);
        backdrop-filter: blur(12px) saturate(160%);
        transition: transform 0.2s var(--apple-spring), background 0.2s var(--apple-ease), border-color 0.2s var(--apple-ease), filter 0.2s var(--apple-ease), box-shadow 0.2s var(--apple-ease);
      }
      html:not(.dark) .settings-platform-link { border-color: rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 2px 6px rgba(28, 25, 23, 0.08); }
      .settings-platform-link .pt-icon {
        width: 20px;
        height: 20px;
        display: grid;
        place-items: center;
        background: none;
        color: inherit;
        box-shadow: none;
      }
      .settings-platform-link .pt-icon svg {
        width: 18px;
        height: 18px;
      }
      .settings-platform-link.p-instagram { background: rgba(225, 48, 108, 0.10); color: #ff8eaf; }
      .settings-platform-link.p-tiktok   { background: rgba(37, 244, 238, 0.10); color: #7af0e6; }
      .settings-platform-link.p-github   { background: rgba(140, 150, 160, 0.10); color: #aeb7c0; }
      .settings-platform-link.p-play     { background: rgba(52, 199, 89, 0.10); color: #74f0a0; }
      html:not(.dark) .settings-platform-link.p-instagram { background: rgba(225, 48, 108, 0.06); color: #d81b60; }
      html:not(.dark) .settings-platform-link.p-tiktok   { background: rgba(20, 184, 166, 0.06); color: #0d9488; }
      html:not(.dark) .settings-platform-link.p-github   { background: rgba(88, 96, 105, 0.06); color: #57606a; }
      html:not(.dark) .settings-platform-link.p-play     { background: rgba(22, 163, 74, 0.06); color: #15803d; }
      .settings-platform-link:hover {
        transform: translateY(-2px);
        filter: brightness(1.12);
        border-color: rgba(255, 255, 255, 0.35);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 16px rgba(0, 0, 0, 0.25);
      }
      html:not(.dark) .settings-platform-link:hover { border-color: rgba(0, 0, 0, 0.22); }
      .settings-platform-link:active { transform: scale(0.94); }
      .settings-platform-link:focus-visible {
        outline: 2px solid var(--orange);
        outline-offset: 3px;
      }

      /* ── Tier 1: dock active pill ── */
      .bnav-link { transition: color 0.2s var(--apple-ease), background 0.2s var(--apple-ease), transform 0.2s var(--apple-ease); }
      .bnav-link.active {
        background: linear-gradient(180deg, rgba(255, 143, 71, 0.16), rgba(255, 111, 46, 0.24)) !important;
        box-shadow: inset 0 0 0 1px rgba(255, 111, 46, 0.30) !important;
        border-radius: 18px;
        color: #ff8c46 !important;
      }

      /* ── Tier 1: iOS page transition (all views) ── */
      .fade-in {
        animation: appleFadeIn 0.45s var(--apple-spring) both;
      }
      @keyframes appleFadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to   { opacity: 1; transform: translateY(0); }
      }

      /* ── Tier 1: boot skeleton ── */
      .boot-skeleton {
        max-width: 560px;
        margin: 0 auto;
        padding: 16px 16px 120px;
        display: flex;
        flex-direction: column;
        gap: 16px;
      }
      .sk-chips { display: flex; gap: 8px; }
      .sk-chip, .sk-banner, .sk-head, .sk-card {
        border-radius: 14px;
        background: linear-gradient(100deg, rgba(120, 120, 128, 0.14) 40%, rgba(120, 120, 128, 0.26) 50%, rgba(120, 120, 128, 0.14) 60%);
        background-size: 200% 100%;
        animation: appleShimmer 1.4s ease-in-out infinite;
      }
      @keyframes appleShimmer {
        0%   { background-position: 200% 0; }
        100% { background-position: -200% 0; }
      }
      .sk-chip { height: 34px; width: 74px; }
      .sk-banner { height: 210px; }
      .sk-head { height: 22px; width: 140px; margin: 10px 0 4px; }
      .sk-row { display: flex; gap: 12px; }
      .sk-card { height: 148px; width: 108px; flex-shrink: 0; }

      /* ── Loading Screen ── */
      #boot-splash {
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        align-items: center;
        background: #09090b;
        overflow: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
      }
      #boot-splash.splash-hide { opacity: 0; visibility: hidden; pointer-events: none; }

      .ls-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 22px;
        flex: 1;
        justify-content: center;
        padding: 24px 24px 16px;
        max-height: 100%;
        overflow: auto;
      }
      .ls-logo-wrap {
        position: relative;
        width: 88px;
        height: 88px;
        animation: lsPopIn 0.6s cubic-bezier(0.16,1,0.3,1) both;
      }
      .ls-logo {
        position: relative;
        width: 100%;
        height: 100%;
        border-radius: 22px;
        object-fit: cover;
      }

      .ls-spinner {
        position: relative;
        width: 64px;
        height: 64px;
        animation: lsFadeIn 0.4s ease 0.5s both;
      }
      .ls-spinner svg {
        width: 100%;
        height: 100%;
        transform: rotate(-90deg);
        animation: lsSpinRotate 2s linear infinite;
      }
      .ls-spinner-bg {
        stroke: rgba(255,255,255,0.1);
      }
      .ls-spinner-ring {
        stroke: #ff6b2b;
        stroke-linecap: round;
        transition: stroke-dashoffset 0.4s cubic-bezier(0.16,1,0.3,1);
      }
      .ls-spinner .ls-pct {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.68rem;
        font-weight: 800;
        color: rgba(255,255,255,0.9);
        font-variant-numeric: tabular-nums;
      }
      .ls-pct {
        font-size: 0.65rem;
        font-weight: 600;
        color: rgba(255,255,255,0.2);
        font-variant-numeric: tabular-nums;
      }

      .ls-error {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 0 32px;
        text-align: center;
      }
      .ls-err-icon { font-size: 2.5rem; }
      .ls-err-msg {
        font-family: 'Cairo', sans-serif;
        font-size: 1.1rem;
        font-weight: 700;
        color: #fff;
      }
      .ls-err-sub {
        font-size: 0.85rem;
        color: rgba(255,255,255,0.55);
        line-height: 1.5;
      }
      .ls-retry-btn, .ls-offline-btn {
        margin-top: 8px;
        padding: 12px 32px;
        border: none;
        border-radius: 12px;
        font-family: 'Cairo', sans-serif;
        font-size: 0.95rem;
        font-weight: 700;
        cursor: pointer;
        transition: transform 0.15s, opacity 0.15s;
      }
      .ls-retry-btn {
        background: linear-gradient(135deg, #ff6b2b, #ff5c1a);
        color: #fff;
        box-shadow: 0 4px 16px rgba(255,107,43,0.35);
      }
      .ls-retry-btn:active { transform: scale(0.96); }
      .ls-offline-btn {
        background: rgba(255,255,255,0.06);
        color: rgba(255,255,255,0.6);
        border: 1px solid rgba(255,255,255,0.08);
      }
      .ls-offline-btn:active { transform: scale(0.96); }

      @keyframes lsPopIn {
        from { opacity: 0; transform: scale(0.6); }
        to   { opacity: 1; transform: scale(1); }
      }
      @keyframes lsSpinRotate {
        to { transform: rotate(270deg); }
      }
      @keyframes lsFadeIn {
        from { opacity: 0; transform: translateY(8px); }
        to   { opacity: 1; transform: translateY(0); }
      }

      html:not(.dark) #boot-splash { background: linear-gradient(180deg, #ffffff, #f5f1ec); }
      html:not(.dark) .ls-pct { color: rgba(0,0,0,0.3); }
      html:not(.dark) .ls-spinner-bg { stroke: rgba(0,0,0,0.08); }
      html:not(.dark) .ls-spinner .ls-pct { color: rgba(0,0,0,0.75); }
      html:not(.dark) .ls-err-msg { color: #1a1a1a; }
      html:not(.dark) .ls-err-sub { color: rgba(0,0,0,0.5); }
      html:not(.dark) .ls-offline-btn { background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.5); border-color: rgba(0,0,0,0.08); }

      @media (prefers-reduced-motion: reduce) {
        .ls-logo-wrap, .ls-pct, .ls-spinner svg, .ls-logo, .ls-msg, .ls-ver { animation: none !important; opacity: 1 !important; transform: none !important; }
        .ls-spinner-ring { transition: none !important; }
      }

      /* ══ Sllina loading screen — logo + circular progress ring ══ */
      .ls-logo-wrap { animation: lsPopIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
      .ls-logo {
        width: 100%;
        height: 100%;
        display: block;
        border-radius: 22px;
        object-fit: cover;
      }
      .ls-msg {
        min-height: 1.4em;
        font-family: 'Cairo', sans-serif;
        font-size: 0.92rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.55);
        text-align: center;
        line-height: 1.45;
        animation: lsFadeIn 0.4s ease 0.7s both;
      }
      .ls-bottom {
        padding: 0 32px calc(16px + env(safe-area-inset-bottom));
        text-align: center;
      }
      .ls-ver {
        font-size: 0.65rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.15);
        letter-spacing: 0.04em;
      }
      .ls-spinner { width: 64px; height: 64px; }
      .ls-spinner svg { animation: lsSpinRotate 2s linear infinite; }
      .ls-spinner .ls-pct { font-size: 0.68rem; }
      html:not(.dark) .ls-msg { color: rgba(20, 18, 16, 0.5); }
      html:not(.dark) .ls-ver { color: rgba(0, 0, 0, 0.2); }
      html:not(.dark) .ls-pct { color: rgba(20, 18, 16, 0.5); }

      /* ── Tier 1: designed games empty state ── */
      .games-empty-msg {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        text-align: center;
        padding: 40px 20px;
      }
      .games-empty-msg .empty-icon {
        width: 64px; height: 64px;
        display: flex; align-items: center; justify-content: center;
        border-radius: 50%;
        background: rgba(120, 120, 128, 0.12);
        color: var(--text-secondary);
        margin-bottom: 8px;
      }
      .games-empty-msg .empty-icon svg { width: 30px; height: 30px; }
      .games-empty-msg h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
      .games-empty-msg p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }
      .games-empty-msg .empty-clear { min-height: 44px; margin-top: 10px; }

      /* ── How to Play: Apple guide ── */
      #howtoplay-page .theme-section {
        background: var(--surface);
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-bottom: 0 !important;
        animation: none !important;
        padding: 0;
      }
      #howtoplay-page .htp-intro { padding: 4px 6px 0; margin-bottom: 20px; }
      #howtoplay-page .htp-intro h3 {
        margin: 0 0 6px;
        font-size: 1rem;
        font-weight: 800;
        letter-spacing: -0.01em;
      }
      #howtoplay-page .htp-intro p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 0.95rem; }
      #howtoplay-page .htp-search-wrap {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 44px;
        margin-bottom: 26px;
        padding: 0 14px !important;
        border-radius: 14px !important;
        background: rgba(120, 120, 128, 0.12) !important;
        transition: background 0.2s var(--apple-ease), box-shadow 0.2s var(--apple-ease);
      }
      #howtoplay-page .htp-search-wrap:focus-within {
        background: rgba(120, 120, 128, 0.16) !important;
        box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.22);
      }
      #howtoplay-page .htp-search-ico { width: 17px; height: 17px; flex-shrink: 0; color: var(--muted); }
      #howtoplay-page #htp-search {
        flex: 1;
        min-width: 0;
        min-height: 40px;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        font-size: 0.92rem;
        color: var(--ink);
      }
      #howtoplay-page #htp-search:focus { box-shadow: none !important; }
      #howtoplay-page .htp-list {
        overflow: hidden;
        border-radius: 22px !important;
        border: 1px solid var(--line);
        background: var(--surface);
      }
      #howtoplay-page details.theme-section.htp-item {
        padding: 0 !important;
        border-radius: 0 !important;
        background: var(--surface);
        border-inline-start: 0 !important;
        border-inline-end: 0 !important;
      }
      #howtoplay-page details.theme-section.htp-item + details.theme-section.htp-item {
        border-top: 0.5px solid rgba(120, 120, 128, 0.28) !important;
      }
      #howtoplay-page .htp-item > summary {
        list-style: none;
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 52px;
        padding-inline: 16px;
        -webkit-user-select: none;
        user-select: none;
        cursor: pointer;
      }
      #howtoplay-page .htp-item > summary::-webkit-details-marker { display: none; }
      #howtoplay-page .htp-item > summary:active { background: rgba(120, 120, 128, 0.08); }
      #howtoplay-page .htp-ico {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
        background: rgba(120, 120, 128, 0.10);
        font-size: 17px;
      }
      #howtoplay-page .htp-name {
        flex: 1;
        font-weight: 600;
        font-size: 1rem;
        color: var(--ink);
      }
      #howtoplay-page .htp-chev {
        width: 9px;
        height: 9px;
        flex-shrink: 0;
        border-right: 2px solid rgba(120, 120, 128, 0.55);
        border-bottom: 2px solid rgba(120, 120, 128, 0.55);
        transform: rotate(-45deg);
        transition: transform 0.25s var(--apple-ease);
      }
      #howtoplay-page details[open] .htp-chev { transform: rotate(45deg); }
      #howtoplay-page[dir='rtl'] .htp-chev { transform: rotate(135deg); }
      #howtoplay-page[dir='rtl'] details[open] .htp-chev { transform: rotate(-45deg); }
      #howtoplay-page .htp-item > p,
      #howtoplay-page .htp-item > div {
        margin: 0 !important;
        padding-block-start: 6px;
        padding-block-end: 20px;
        padding-inline-start: 62px;
        padding-inline-end: 18px;
        color: var(--muted);
        line-height: 1.65 !important;
        font-size: 0.92rem !important;
      }
      #howtoplay-page .htp-footer { text-align: center; padding: 28px 16px 8px; }
      #howtoplay-page .htp-footer p { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }
      #howtoplay-page .htp-footer .btn-primary { min-height: 48px; min-width: 200px; }
      html.dark #howtoplay-page details.theme-section.htp-item + details.theme-section.htp-item {
        border-top-color: rgba(255, 255, 255, 0.12) !important;
      }

      @media (prefers-reduced-motion: reduce) {
        .settings-panel.show { animation: none !important; }
        .fade-in { animation: none !important; }
        .sk-chip, .sk-banner, .sk-head, .sk-card { animation: none !important; }
        #boot-splash { transition: none !important; }
        .settings-item .switch i { transition: none !important; }
        .bnav-link.active { border-radius: 18px; }
      }

      .bbx-home-searchbar { padding: 2px 0 6px; display: flex; gap: 6px; align-items: center; }
      .bbx-home-search-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        height: 38px;
        padding: 0 12px;
        border-radius: 12px;
        border: 1px solid rgba(120, 120, 128, 0.22) !important;
        background: rgba(120, 120, 128, 0.12) !important;
        color: var(--ink) !important;
        font-size: 0.85rem;
        font-weight: 600;
        text-align: start;
        cursor: pointer;
        font-family: inherit;
      }
      .bbx-home-search-btn svg {
        width: 16px;
        height: 16px;
        flex: none;
        color: var(--orange) !important;
      }
      .bbx-home-search-btn:hover {
        background: rgba(120, 120, 128, 0.18) !important;
      }

      .all-games-more {
        justify-content: flex-start !important;
        text-decoration: none !important;
      }
      .all-games-more > strong.am-arrow {
        aspect-ratio: 1/1;
        width: 100% !important;
        height: auto !important;
        margin: 0 0 7px !important;
        border-radius: 15px !important;
        font-size: 2.1rem !important;
        line-height: 1 !important;
        color: var(--orange) !important;
        background: rgba(120, 120, 128, 0.12) !important;
        border: 1.5px dashed rgba(120, 120, 128, 0.4) !important;
        box-shadow: none !important;
        transition: background 0.18s, border-color 0.18s;
      }
      .all-games-more > strong.am-arrow::before,
      .all-games-more > strong.am-arrow::after { display: none !important; }
      .all-games-more .am-txt {
        display: none;
        margin: 8px 0 0 !important;
        font-size: 0.76rem !important;
        font-weight: 800;
        line-height: 1.3;
        text-align: center;
        color: var(--orange) !important;
      }
      .all-games-more:hover .am-txt,
      .all-games-more:active .am-txt,
      .all-games-more:focus-visible .am-txt { display: block; }
      .all-games-more:hover > strong.am-arrow,
      .all-games-more:active > strong.am-arrow {
        background: rgba(255, 149, 0, 0.16) !important;
        border-color: rgba(255, 149, 0, 0.5) !important;
      }

      .bbx-follow { display: flex; flex-wrap: wrap; gap: 12px; padding: 2px 0; }      .platform-chip {
        width: 46px;
        height: 46px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(120, 120, 128, 0.12) !important;
        border: 1px solid rgba(120, 120, 128, 0.2) !important;
        text-decoration: none;
        transition: transform 0.18s;
      }
      .platform-chip svg { width: 22px; height: 22px; }
      .platform-chip:hover { transform: translateY(-2px); }
      .p-instagram { color: #e4405f !important; }
      .p-tiktok { color: #000 !important; }
      .p-github { color: #24292f !important; }
      .p-play { color: #00b0f0 !important; }
      html.dark .p-tiktok { color: #fff !important; }
      html.dark .p-github { color: #e6edf3 !important; }

      .settings-appearance {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--line);
      }
      .settings-appearance:last-of-type { border-bottom: 0; }
      .settings-appearance .s-label { flex: none; font-size: 0.9rem; }
      .acc-swatches { display: flex; gap: 10px; }
      .acc-swatch {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        border: 2px solid transparent;
        cursor: pointer;
        padding: 0;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
        transition: transform 0.15s;
      }
      .acc-swatch.on { border-color: var(--ink); transform: scale(1.14); }
      .acc-pills { display: flex; gap: 8px; }
      .acc-pills button {
        min-width: 44px;
        height: 34px;
        border-radius: 10px;
        border: 1px solid var(--line);
        background: rgba(120, 120, 128, 0.12);
        color: var(--ink);
        font-weight: 700;
        font-size: 0.85rem;
        cursor: pointer;
        font-family: inherit;
      }
      .acc-pills button.on {
        background: var(--orange);
        border-color: var(--orange);
        color: #fff;
      }

    /* ===== CENTRALIZED GAME SETUP BANNER (real banner card per game) =====
       Injected in app.js during each game's 'setup' phase. Reuses the shared
       .faker-banner frosted-glass styling; class setup-banner on <html> marks
       the active setup screen so each game's native .page-hero (which would
       duplicate the title/buttons) is suppressed only in that phase. */
    html.setup-banner .page-hero {
      display: none !important;
    }
    .faker-banner.gen-banner {
      display: block;
      box-sizing: border-box;
    }

    /* ══════════════════════════════════════════════════════════════════════
       APPLE-STYLE GAMES PAGE  (scoped under .games-apple)
       ══════════════════════════════════════════════════════════════════════ */

    /* ── Header ── */
    .games-apple-head {
      margin: 20px 0 8px !important;
      display: flex;
      align-items: baseline;
      gap: 10px;
    }
    .games-apple-head h2 {
      font-size: clamp(1.6rem, 5.5vw, 2.1rem) !important;
      font-weight: 800 !important;
      letter-spacing: -0.03em !important;
      line-height: 1.15 !important;
      margin: 0 !important;
    }
    .games-apple-count {
      font-size: 0.82rem !important;
      font-weight: 600 !important;
      color: var(--muted) !important;
      background: none !important;
      padding: 0 !important;
      border-radius: 0 !important;
      min-height: auto !important;
      line-height: 1 !important;
      border: none !important;
    }
    .games-apple-count::before { display: none !important; }

    /* ── Grid ── */
    .games-apple {
      gap: 14px !important;
      padding: 0 !important;
    }

    /* ── Card base ── */
    .games-apple .summary-card {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 20px 16px 16px !important;
      border-radius: 20px !important;
      border: 1px solid rgba(0,0,0,0.05) !important;
      background: var(--surface) !important;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 4px 16px rgba(0,0,0,0.04) !important;
      transition: border-color 0.15s ease !important;
      position: relative;
      overflow: hidden;
      contain: layout style;
      animation: cardFadeIn 0.15s var(--apple-ease) both;
      transition: none !important;
    }
    .games-apple .summary-card:nth-child(1)  { animation-delay: 0.01s; }
    .games-apple .summary-card:nth-child(2)  { animation-delay: 0.01s; }
    .games-apple .summary-card:nth-child(3)  { animation-delay: 0.01s; }
    .games-apple .summary-card:nth-child(4)  { animation-delay: 0.01s; }
    .games-apple .summary-card:nth-child(5)  { animation-delay: 0.01s; }
    .games-apple .summary-card:nth-child(6)  { animation-delay: 0.01s; }
    .games-apple .summary-card:nth-child(7)  { animation-delay: 0.01s; }
    .games-apple .summary-card:nth-child(8)  { animation-delay: 0.01s; }
    .games-apple .summary-card:nth-child(9)  { animation-delay: 0.01s; }
    .games-apple .summary-card:nth-child(10) { animation-delay: 0.01s; }
    .games-apple .summary-card:nth-child(11) { animation-delay: 0.01s; }
    .games-apple .summary-card:nth-child(12) { animation-delay: 0.01s; }
    .games-apple .summary-card:nth-child(n+13) { animation-delay: 0.01s; }
    @keyframes cardFadeIn {
      from { opacity: 0; transform: translateY(14px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }
    .games-apple .summary-card::after { display: none !important; }
    .games-apple .summary-card:hover {
      transform: translateY(-4px) scale(1.02) !important;
      border-color: rgba(0,0,0,0.08) !important;
    }
    .games-apple .summary-card:active {
      transform: scale(0.96) !important;
      transition-duration: 0.1s !important;
    }

    /* ── Remove colored backgrounds from all color classes, add subtle tint ── */
    .games-apple .summary-card[class*='color-'] {
      box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 4px 16px rgba(0,0,0,0.04) !important;
    }
    .games-apple .summary-card.color-one  { background: linear-gradient(160deg, #fff8f4, #fff3ed) !important; }
    .games-apple .summary-card.color-two  { background: linear-gradient(160deg, #f8f9ff, #f0f2ff) !important; }
    .games-apple .summary-card.color-three { background: linear-gradient(160deg, #f4faf6, #eef8f1) !important; }
    .games-apple .summary-card.color-four  { background: linear-gradient(160deg, #fffcf0, #fff9e6) !important; }
    .games-apple .summary-card.color-five  { background: linear-gradient(160deg, #f4f8ff, #edf2ff) !important; }
    .games-apple .summary-card.color-six   { background: linear-gradient(160deg, #f9f5ff, #f3eeff) !important; }
    .games-apple .summary-card.color-seven { background: linear-gradient(160deg, #fdf4f8, #f8edf4) !important; }
    .games-apple .summary-card.color-eight { background: linear-gradient(160deg, #f2fbfd, #ebf7fa) !important; }
    .games-apple .summary-card.color-nine  { background: linear-gradient(160deg, #fef4f5, #fdeef0) !important; }
    .games-apple .summary-card.color-ten   { background: linear-gradient(160deg, #fef7f0, #fdf2e6) !important; }
    .games-apple .summary-card.color-eleven { background: linear-gradient(160deg, #f2f9fe, #ebf5fc) !important; }
    .games-apple .summary-card.color-twelve { background: linear-gradient(160deg, #f6f4fe, #f0ecfd) !important; }
    .games-apple .summary-card.color-thirteen { background: linear-gradient(160deg, #fef4f5, #fdeef0) !important; }
    .games-apple .summary-card.color-fourteen { background: linear-gradient(160deg, #fef8f0, #fdf3e5) !important; }
    .games-apple .summary-card.color-fifteen { background: linear-gradient(160deg, #f2faf6, #eaf6f0) !important; }
    .games-apple .summary-card.color-sixteen { background: linear-gradient(160deg, #fef4f4, #fdeeed) !important; }
    .games-apple .summary-card.color-seventeen { background: linear-gradient(160deg, #fdf4f8, #f8edf4) !important; }
    .games-apple .summary-card.color-eighteen { background: linear-gradient(160deg, #fef7f0, #fdf2e6) !important; }
    .games-apple .summary-card.color-nineteen { background: linear-gradient(160deg, #f2faf6, #eaf6f0) !important; }
    .games-apple .summary-card.color-nh  { background: linear-gradient(160deg, #f2faf4, #eaf5ec) !important; }

    /* ── Colored hover glow per card ── */
    .games-apple .summary-card.color-one:hover   { box-shadow: 0 8px 32px rgba(var(--orange-rgb), 0.15), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-two:hover    { box-shadow: 0 8px 32px rgba(99,102,241,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-three:hover  { box-shadow: 0 8px 32px rgba(34,197,94,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-four:hover   { box-shadow: 0 8px 32px rgba(245,158,11,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-five:hover   { box-shadow: 0 8px 32px rgba(59,130,246,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-six:hover    { box-shadow: 0 8px 32px rgba(168,85,247,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-seven:hover  { box-shadow: 0 8px 32px rgba(236,72,153,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-eight:hover  { box-shadow: 0 8px 32px rgba(6,182,212,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-nine:hover   { box-shadow: 0 8px 32px rgba(244,63,94,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-ten:hover    { box-shadow: 0 8px 32px rgba(234,88,12,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-eleven:hover { box-shadow: 0 8px 32px rgba(14,165,233,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-twelve:hover { box-shadow: 0 8px 32px rgba(139,92,246,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-thirteen:hover { box-shadow: 0 8px 32px rgba(225,29,72,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-fourteen:hover { box-shadow: 0 8px 32px rgba(217,119,6,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-fifteen:hover { box-shadow: 0 8px 32px rgba(5,150,105,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-sixteen:hover { box-shadow: 0 8px 32px rgba(220,38,38,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-seventeen:hover { box-shadow: 0 8px 32px rgba(236,72,153,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-eighteen:hover { box-shadow: 0 8px 32px rgba(249,115,22,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-nineteen:hover { box-shadow: 0 8px 32px rgba(16,185,129,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }
    .games-apple .summary-card.color-nh:hover   { box-shadow: 0 8px 32px rgba(46,125,50,0.13), 0 2px 8px rgba(0,0,0,0.04) !important; }

    /* ── Icon container ── */
    .games-apple-icon {
      width: 54px;
      height: 54px;
      border-radius: 15px;
      display: grid;
      place-items: center;
      font-size: 1.5rem;
      background: rgba(var(--orange-rgb), 0.08);
      flex-shrink: 0;
      overflow: hidden;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 1px 3px rgba(0,0,0,0.06);
      transition: transform 0.35s var(--apple-spring);
    }
    .games-apple .summary-card:hover .games-apple-icon {
      transform: scale(1.08) rotate(-2deg);
    }
    .games-apple-icon img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .games-apple-emoji {
      font-size: 1.65rem;
      line-height: 1;
      filter: drop-shadow(0 1px 1px rgba(0,0,0,0.06));
    }

    /* ── Per-color subtle icon tints ── */
    .games-apple .summary-card.color-one .games-apple-icon   { background: rgba(var(--orange-rgb), 0.10); }
    .games-apple .summary-card.color-two .games-apple-icon    { background: rgba(99,102,241,0.10); }
    .games-apple .summary-card.color-three .games-apple-icon  { background: rgba(34,197,94,0.10); }
    .games-apple .summary-card.color-four .games-apple-icon   { background: rgba(245,158,11,0.10); }
    .games-apple .summary-card.color-five .games-apple-icon   { background: rgba(59,130,246,0.10); }
    .games-apple .summary-card.color-six .games-apple-icon    { background: rgba(168,85,247,0.10); }
    .games-apple .summary-card.color-seven .games-apple-icon  { background: rgba(236,72,153,0.10); }
    .games-apple .summary-card.color-eight .games-apple-icon  { background: rgba(6,182,212,0.10); }
    .games-apple .summary-card.color-nine .games-apple-icon   { background: rgba(244,63,94,0.10); }
    .games-apple .summary-card.color-ten .games-apple-icon    { background: rgba(234,88,12,0.10); }
    .games-apple .summary-card.color-eleven .games-apple-icon { background: rgba(14,165,233,0.10); }
    .games-apple .summary-card.color-twelve .games-apple-icon { background: rgba(139,92,246,0.10); }
    .games-apple .summary-card.color-thirteen .games-apple-icon { background: rgba(225,29,72,0.10); }
    .games-apple .summary-card.color-fourteen .games-apple-icon { background: rgba(217,119,6,0.10); }
    .games-apple .summary-card.color-fifteen .games-apple-icon { background: rgba(5,150,105,0.10); }
    .games-apple .summary-card.color-sixteen .games-apple-icon { background: rgba(220,38,38,0.10); }
    .games-apple .summary-card.color-seventeen .games-apple-icon { background: rgba(236,72,153,0.10); }
    .games-apple .summary-card.color-eighteen .games-apple-icon { background: rgba(249,115,22,0.10); }
    .games-apple .summary-card.color-nineteen .games-apple-icon { background: rgba(16,185,129,0.10); }
    .games-apple .summary-card.color-nh .games-apple-icon { background: rgba(46,125,50,0.10); }

    /* ── Text ── */
    .games-apple-text {
      flex: 1;
      min-width: 0;
    }
    .games-apple .summary-card h3 {
      font-size: 0.95rem !important;
      font-weight: 700 !important;
      line-height: 1.25 !important;
      color: var(--ink) !important;
      margin: 0 0 2px !important;
      letter-spacing: -0.015em !important;
    }
    .games-apple .summary-card p {
      font-size: 0.78rem !important;
      line-height: 1.4 !important;
      color: var(--muted) !important;
      margin: 0 !important;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    /* ── Favourite button ── */
    .games-apple-fav {
      position: absolute !important;
      top: 10px !important;
      inset-inline-end: 10px !important;
      width: 36px !important;
      height: 36px !important;
      border: none !important;
      background: rgba(0,0,0,0.03) !important;
      border-radius: 50% !important;
      font-size: 0.95rem !important;
      display: grid !important;
      place-items: center !important;
      cursor: pointer;
      transition: transform 0.25s var(--apple-spring), background 0.2s !important;
      z-index: 2;
    }
    .games-apple-fav::before { display: none !important; }
    .games-apple-fav:hover { background: rgba(0,0,0,0.06) !important; }
    .games-apple-fav:active { transform: scale(0.8) !important; }

    /* ── Popular pulse: soft colored breathing ── */
    .games-apple .game-pop {
      animation: applePopPulse 3s ease-in-out infinite !important;
    }
    .games-apple .game-pop:hover { animation-play-state: paused !important; }
    @keyframes applePopPulse {
      0%, 100% { box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 4px 16px rgba(0,0,0,0.04); }
      50%      { box-shadow: 0 2px 8px rgba(var(--orange-rgb), 0.14), 0 6px 20px rgba(var(--orange-rgb), 0.06); }
    }

    /* ── Responsive ── */
    @media (max-width: 900px) {
      .games-apple {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
      }
    }
    @media (max-width: 600px) {
      .games-apple {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
      }
      .games-apple .summary-card {
        padding: 16px 12px 12px !important;
        border-radius: 16px !important;
      }
      .games-apple-icon {
        width: 46px;
        height: 46px;
        border-radius: 13px;
      }
      .games-apple-emoji { font-size: 1.35rem; }
      .games-apple .summary-card h3 { font-size: 0.85rem !important; }
      .games-apple .summary-card p { font-size: 0.72rem !important; }
      .games-apple-head h2 { font-size: 1.4rem !important; }
    }

    /* ── Dark mode ── */
    html.dark .games-apple .summary-card {
      border-color: rgba(255,255,255,0.06) !important;
      box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.18) !important;
    }
    html.dark .games-apple .summary-card:hover {
      box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.2) !important;
      border-color: rgba(255,255,255,0.10) !important;
    }
    html.dark .games-apple .summary-card.color-one  { background: linear-gradient(160deg, #1f1610, #1a1410) !important; }
    html.dark .games-apple .summary-card.color-two   { background: linear-gradient(160deg, #14131f, #11101c) !important; }
    html.dark .games-apple .summary-card.color-three { background: linear-gradient(160deg, #0f1a13, #0c1710) !important; }
    html.dark .games-apple .summary-card.color-four  { background: linear-gradient(160deg, #1f1a0f, #1c180c) !important; }
    html.dark .games-apple .summary-card.color-five  { background: linear-gradient(160deg, #12161f, #0f141c) !important; }
    html.dark .games-apple .summary-card.color-six   { background: linear-gradient(160deg, #18131f, #15101c) !important; }
    html.dark .games-apple .summary-card.color-seven { background: linear-gradient(160deg, #1f1219, #1c0f16) !important; }
    html.dark .games-apple .summary-card.color-eight { background: linear-gradient(160deg, #0f1b1e, #0c181b) !important; }
    html.dark .games-apple .summary-card.color-nine  { background: linear-gradient(160deg, #1f1214, #1c0f11) !important; }
    html.dark .games-apple .summary-card.color-ten   { background: linear-gradient(160deg, #1f1710, #1c140d) !important; }
    html.dark .games-apple .summary-card.color-eleven { background: linear-gradient(160deg, #0f181f, #0c151c) !important; }
    html.dark .games-apple .summary-card.color-twelve { background: linear-gradient(160deg, #16131f, #13101c) !important; }
    html.dark .games-apple .summary-card.color-thirteen { background: linear-gradient(160deg, #1f1214, #1c0f11) !important; }
    html.dark .games-apple .summary-card.color-fourteen { background: linear-gradient(160deg, #1f1810, #1c150d) !important; }
    html.dark .games-apple .summary-card.color-fifteen { background: linear-gradient(160deg, #0f1a15, #0c1712) !important; }
    html.dark .games-apple .summary-card.color-sixteen { background: linear-gradient(160deg, #1f1212, #1c0f0f) !important; }
    html.dark .games-apple .summary-card.color-seventeen { background: linear-gradient(160deg, #1f1219, #1c0f16) !important; }
    html.dark .games-apple .summary-card.color-eighteen { background: linear-gradient(160deg, #1f1710, #1c140d) !important; }
    html.dark .games-apple .summary-card.color-nineteen { background: linear-gradient(160deg, #0f1a15, #0c1712) !important; }
    html.dark .games-apple .summary-card.color-nh  { background: linear-gradient(160deg, #0f1a12, #0c170f) !important; }
    html.dark .games-apple-icon {
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 1px 3px rgba(0,0,0,0.2);
    }
    html.dark .games-apple .summary-card.color-one:hover   { box-shadow: 0 8px 32px rgba(var(--orange-rgb), 0.20), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-two:hover    { box-shadow: 0 8px 32px rgba(99,102,241,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-three:hover  { box-shadow: 0 8px 32px rgba(34,197,94,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-four:hover   { box-shadow: 0 8px 32px rgba(245,158,11,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-five:hover   { box-shadow: 0 8px 32px rgba(59,130,246,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-six:hover    { box-shadow: 0 8px 32px rgba(168,85,247,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-seven:hover  { box-shadow: 0 8px 32px rgba(236,72,153,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-eight:hover  { box-shadow: 0 8px 32px rgba(6,182,212,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-nine:hover   { box-shadow: 0 8px 32px rgba(244,63,94,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-ten:hover    { box-shadow: 0 8px 32px rgba(234,88,12,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-eleven:hover { box-shadow: 0 8px 32px rgba(14,165,233,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-twelve:hover { box-shadow: 0 8px 32px rgba(139,92,246,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-thirteen:hover { box-shadow: 0 8px 32px rgba(225,29,72,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-fourteen:hover { box-shadow: 0 8px 32px rgba(217,119,6,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-fifteen:hover { box-shadow: 0 8px 32px rgba(5,150,105,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-sixteen:hover { box-shadow: 0 8px 32px rgba(220,38,38,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-seventeen:hover { box-shadow: 0 8px 32px rgba(236,72,153,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-eighteen:hover { box-shadow: 0 8px 32px rgba(249,115,22,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-nineteen:hover { box-shadow: 0 8px 32px rgba(16,185,129,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }
    html.dark .games-apple .summary-card.color-nh:hover   { box-shadow: 0 8px 32px rgba(46,125,50,0.18), 0 2px 8px rgba(0,0,0,0.1) !important; }

    /* ══════════════════════════════════════════════════════════════════════
       GAMES PAGE — APPLE INSET-GROUPED LIST  (toggled by the layout button)
       Overrides the text-chip `.summary-grid.list-view` from main.css.
       Rows: squircle icon tile · title + description · heart · chevron ›
       ══════════════════════════════════════════════════════════════════════ */
    .summary-grid.list-view {
      display: flex !important;
      flex-direction: column !important;
      gap: 0 !important;
      border-radius: 18px !important;
      overflow: hidden !important;
      border: 1px solid var(--line, rgba(127,127,128,.20)) !important;
      background: var(--surface) !important;
      box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 6px 20px rgba(0,0,0,.06) !important;
      margin-top: 12px !important;
    }
    html.dark .summary-grid.list-view {
      background: var(--surface-2) !important;
      box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.22) !important;
    }

    /* ── Row ── */
    .summary-grid.list-view .summary-card,
    .summary-grid.list-view .summary-card[class*='color-'] {
      position: relative !important;
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important;
      gap: 14px !important;
      width: auto;
      min-height: 64px !important;
      padding: 10px 16px !important;
      margin: 0 !important;
      border-radius: 0 !important;
      border: none !important;
      border-bottom: 1px solid var(--line, rgba(127,127,128,.16)) !important;
      background: var(--surface) !important;
      box-shadow: none !important;
      overflow: visible !important;
      color: var(--ink) !important;
      cursor: pointer;
      text-align: start;
      animation: none !important;
      transition: background 0.18s ease !important;
    }
    html.dark .summary-grid.list-view .summary-card,
    html.dark .summary-grid.list-view .summary-card[class*='color-'] {
      background: var(--surface-2) !important;
    }
    .summary-grid.list-view .summary-card:last-child { border-bottom: none !important; }
    .summary-grid.list-view .summary-card:hover,
    .summary-grid.list-view .summary-card[class*='color-']:hover {
      transform: none !important;
      box-shadow: none !important;
      background: rgba(127,127,128,.08) !important;
    }
    html.dark .summary-grid.list-view .summary-card:hover { background: rgba(255,255,255,.06) !important; }
    .summary-grid.list-view .summary-card:active,
    .summary-grid.list-view .summary-card[class*='color-']:active {
      transform: none !important;
      background: rgba(127,127,128,.14) !important;
    }
    html.dark .summary-grid.list-view .summary-card:active { background: rgba(255,255,255,.10) !important; }

    /* keep live-search hiding working */
    .summary-grid.list-view .summary-card.hidden { display: none !important; }

    /* ── Leading icon tile (rendered as .glist-ico; hidden in grid mode) ── */
    .summary-card .glist-ico { display: none !important; }
    .summary-grid:not(.list-view) .summary-card > .glist-ico {
      display: grid !important;
      place-items: center !important;
      position: relative !important;
      overflow: hidden !important;
      width: 100% !important;
      height: auto !important;
      aspect-ratio: 1/1;
      margin: 0 0 7px !important;
      border-radius: 15px !important;
      font-size: 2.6rem !important;
      line-height: 1 !important;
      background: rgba(var(--orange-rgb, 255,107,43), .10) !important;
      border: 1px solid rgba(28, 25, 23, 0.06);
      box-shadow: 0 4px 14px rgba(28, 25, 23, 0.16), inset 0 1px 0 rgba(255,255,255,0.30);
      transition: box-shadow 0.26s, border-color 0.26s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    /* glass sheen (mirrors home-page .summary-card > strong::before) */
    .summary-grid:not(.list-view) .summary-card > .glist-ico::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(158deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.05) 38%, transparent 60%);
      pointer-events: none;
    }
    /* diagonal shine sweep (mirrors home-page .summary-card > strong::after) */
    .summary-grid:not(.list-view) .summary-card > .glist-ico::after {
      content: '';
      position: absolute;
      inset-inline-start: -38%;
      top: -58%;
      width: 52%;
      height: 210%;
      transform: rotate(22deg);
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.24), transparent);
      transition: inset-inline-start 0.55s ease;
      pointer-events: none;
    }
    /* cube hover (exact home-page copy) */
    .summary-grid:not(.list-view) .summary-card:hover > .glist-ico {
      border-color: rgba(255,255,255,0.3);
      box-shadow: 0 12px 26px rgba(28,25,23,0.22), 0 0 16px rgba(var(--orange-rgb),0.22), inset 0 1px 0 rgba(255,255,255,0.34) !important;
      transform: scale(1.12) rotate(-4deg);
    }
    .summary-grid:not(.list-view) .summary-card:hover > .glist-ico::after { inset-inline-start: 120%; }
    @media (min-width: 520px) {
      .summary-grid:not(.list-view) .summary-card > .glist-ico { font-size: 3.1rem !important; }
    }
    @media (min-width: 820px) {
      .summary-grid:not(.list-view) .summary-card > .glist-ico { font-size: 3.5rem !important; }
    }
    .summary-card .glist-text { display: contents; }
    .summary-grid.list-view .summary-card > .glist-ico {
      flex-shrink: 0 !important;
      position: relative !important;
      overflow: hidden !important;
      width: 46px !important;
      height: 46px !important;
      aspect-ratio: unset !important;
      margin: 0 !important;
      border-radius: 13px !important;
      border: 1px solid rgba(0,0,0,.04) !important;
      display: grid !important;
      place-items: center !important;
      font-size: 1.8rem !important;
      line-height: 1 !important;
      background: rgba(var(--orange-rgb, 255,107,43), .10) !important;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 3px rgba(0,0,0,.06) !important;
    }
    html.dark .summary-grid.list-view .summary-card > .glist-ico { border-color: rgba(255,255,255,.08) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 3px rgba(0,0,0,.25) !important; }

    /* per-game cube colors (exact home-page .summary-card.color-N strong palette, 150deg) */
    .summary-grid .summary-card.color-one   > .glist-ico { background: linear-gradient(150deg, #7c3aed, #c026d3) !important; }
    .summary-grid .summary-card.color-two   > .glist-ico { background: linear-gradient(150deg, #2563eb, #22d3ee) !important; }
    .summary-grid .summary-card.color-three > .glist-ico { background: linear-gradient(150deg, #059669, #84cc16) !important; }
    .summary-grid .summary-card.color-four  > .glist-ico { background: linear-gradient(150deg, #d97706, #fbbf24) !important; }
    .summary-grid .summary-card.color-five  > .glist-ico { background: linear-gradient(150deg, #db2777, #f472b6) !important; }
    .summary-grid .summary-card.color-six   > .glist-ico { background: linear-gradient(150deg, #4f46e5, #818cf8) !important; }
    .summary-grid .summary-card.color-seven > .glist-ico { background: linear-gradient(150deg, #0891b2, #38bdf8) !important; }
    .summary-grid .summary-card.color-eight > .glist-ico { background: linear-gradient(150deg, #b91c1c, #f97316) !important; }
    .summary-grid .summary-card.color-nine  > .glist-ico { background: linear-gradient(150deg, #7e22ce, #a78bfa) !important; }
    .summary-grid .summary-card.color-ten   > .glist-ico { background: linear-gradient(150deg, #0f766e, #2dd4bf) !important; }
    .summary-grid .summary-card.color-eleven > .glist-ico { background: linear-gradient(150deg, #9333ea, #f0abfc) !important; }
    .summary-grid .summary-card.color-twelve > .glist-ico { background: linear-gradient(150deg, #1d4ed8, #60a5fa) !important; }
    .summary-grid .summary-card.color-thirteen > .glist-ico { background: linear-gradient(150deg, #c2410c, #fdba74) !important; }
    .summary-grid .summary-card.color-fourteen > .glist-ico { background: linear-gradient(150deg, #15803d, #4ade80) !important; }
    .summary-grid .summary-card.color-fifteen > .glist-ico { background: linear-gradient(150deg, #be123c, #fb7185) !important; }
    .summary-grid .summary-card.color-sixteen > .glist-ico { background: linear-gradient(150deg, #6d28d9, #c4b5fd) !important; }
    .summary-grid .summary-card.color-seventeen > .glist-ico { background: linear-gradient(150deg, #0369a1, #7dd3fc) !important; }
    .summary-grid .summary-card.color-eighteen > .glist-ico { background: linear-gradient(150deg, #a16207, #fde047) !important; }
    .summary-grid .summary-card.color-nineteen > .glist-ico { background: linear-gradient(150deg, #86198f, #e879f9) !important; }
    .summary-grid .summary-card.color-nh > .glist-ico { background: linear-gradient(150deg, #166534, #65a30d) !important; }

    /* ── Title + description (wrapped by .glist-text, which is display:contents in grid mode) ── */
    .summary-grid.list-view .summary-card .glist-text {
      flex: 1;
      min-width: 0;
      display: flex !important;
      flex-direction: column;
      padding-inline-end: 48px;
    }
    .summary-grid.list-view .summary-card h3 {
      margin: 0 !important;
      font-size: 0.95rem !important;
      font-weight: 800 !important;
      color: var(--ink) !important;
      line-height: 1.25 !important;
      letter-spacing: -0.015em !important;
      text-align: start !important;
      display: block !important;
      -webkit-line-clamp: unset !important;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .summary-grid.list-view .summary-card p {
      margin: 2px 0 0 !important;
      font-size: 0.78rem !important;
      line-height: 1.35 !important;
      text-align: start !important;
      display: -webkit-box !important;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      overflow: hidden;
    }

    /* ── Favourite heart (middle of trailing stacking) ── */
    .summary-grid.list-view .summary-card button[data-action='games-fav'] {
      position: absolute !important;
      top: 50% !important;
      inset-inline-end: 12px !important;
      inset-inline-start: auto !important;
      transform: translateY(-50%) !important;
      width: 34px !important;
      height: 34px !important;
      margin: 0 !important;
      border-radius: 50% !important;
      border: none !important;
      background: rgba(127,127,128,.10) !important;
      -webkit-backdrop-filter: none !important;
      backdrop-filter: none !important;
      font-size: 0.95rem !important;
      display: grid !important;
      place-items: center !important;
      z-index: 2;
    }
    .summary-grid.list-view .summary-card button[data-action='games-fav']:active { transform: translateY(-50%) scale(0.82) !important; }

    .summary-grid.list-view .summary-card { animation: none !important; }

    /* ── Chevron: removed per request ── */
    .summary-grid.list-view .summary-card::after { display: none !important; }
    [dir='rtl'] .summary-grid.list-view .summary-card::after { display: none !important; }

    /* ── Layout toggle button: Apple-style grid ↔ list icons ── */
    .bbx-layout-btn .bbx-ico-list { display: block; }
    .bbx-layout-btn .bbx-ico-grid { display: none; }
    .bbx-layout-btn.active .bbx-ico-list { display: none; }
    .bbx-layout-btn.active .bbx-ico-grid { display: block; }

    /* ── Social hub: Friends / Open Parties / WhatsApp groups ── */
    .friends-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-inline-start: auto; }
    .friends-hero-actions .btn-primary, .friends-hero-actions .btn-ghost { min-height: 40px !important; margin-inline-start: 0; }
    .friends-groups-head { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 10px; }
    .friends-groups-new-btn { flex-shrink: 0; padding: 8px 14px !important; border-radius: 12px !important; font-size: .8rem !important; }

    /* Open Parties list (public rooms) */
    .parties-row {
      display: flex; align-items: center; gap: 12px; padding: 12px 14px;
      border-bottom: 1px solid var(--line, rgba(128,128,128,.18));
      transition: background .15s ease;
    }
    .parties-row:last-child { border-bottom: none; }
    .parties-row:active { background: rgba(127,127,127,.08); }
    .parties-avatar { flex-shrink: 0; }
    .parties-info { flex: 1; min-width: 0; }
    .parties-name { font-weight: 700; font-size: .95rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .parties-meta { font-size: .78rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
    .parties-join { flex-shrink: 0; padding: 10px 18px !important; border-radius: 14px !important; font-size: .85rem !important; }
    .parties-join:active { transform: scale(.97) !important; }

    /* ── 1:1 chat (DM) page — Apple iMessage-style bubbles ── */
    a.friends-chat-btn { text-decoration: none !important; white-space: nowrap !important; display: inline-flex !important; align-items: center !important; }

    /* ── Chat header: circular back, centered name ── */
    .chat-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
    .chat-top-back {
      width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
      border: 1px solid var(--line);
      background: var(--soft); color: var(--ink); font-size: 1.45rem; line-height: 1;
      display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
      transition: transform .12s ease;
    }
    .chat-top-back:active { transform: scale(.92); }
    .chat-top-head { flex: 1; min-width: 0; text-align: center; }
    .chat-top-name { font-weight: 800; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .chat-top-sub { font-size: .74rem; color: var(--muted); font-weight: 600; margin-top: 1px; }
    .chat-top-spacer { width: 42px; flex-shrink: 0; }

    /* ── Shared chat pieces: day dividers, names, timestamps ── */
    .chat-day {
      align-self: center; padding: 5px 14px; border-radius: 999px;
      border: 1px solid var(--line);
      background: var(--soft); color: var(--muted); font-size: .72rem; font-weight: 700;
      margin: 10px 0 2px;
    }
    .chat-msg-name { font-size: .72rem; color: var(--muted); font-weight: 700; margin-bottom: 3px; padding: 0 6px; }
    .chat-msg-time { font-size: .66rem; color: var(--muted); margin-top: 3px; padding: 0 6px; }

    /* ── DM messages area ── */
    .dm-messages { padding: 12px 16px; max-height: 62vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
    .dm-msg { max-width: 80%; display: flex; flex-direction: column; }
    .dm-msg.mine { align-self: flex-end; align-items: flex-end; }
    .dm-msg.theirs { align-self: flex-start; align-items: flex-start; }
    .dm-msg.flush { margin-top: -3px; }
    .dm-bubble {
      padding: 9px 14px; border-radius: 18px; font-size: .95rem; line-height: 1.4; word-break: break-word;
      border: 1px solid var(--line);
      background: var(--soft); color: var(--ink);
    }
    .dm-msg.theirs .dm-bubble { border-end-start-radius: 6px; }
    .dm-msg.mine .dm-bubble {
      background: linear-gradient(150deg, #ff8a3d, #ff6f2e); color: #fff; font-weight: 600;
      border-color: transparent;
      border-end-end-radius: 6px;
    }
    .dm-input-bar {
      display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line);
      align-items: center; position: sticky; bottom: 0;
    }
    /* DM chat fills the viewport — no free space below messages */
    main .selina-page.dm-chat {
      height: calc(100dvh - var(--bbx-bar) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
      display: flex;
      flex-direction: column;
      padding-bottom: 0;
      min-height: 0;
    }
    main .selina-page.dm-chat .dm-messages {
      flex: 1;
      min-height: 0;
      max-height: none;
    }
    main .selina-page.dm-chat .dm-input-bar {
      position: static;
    }
    .dm-input-bar input { flex: 1; min-width: 0; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: .9rem; color: var(--ink); outline: none; }
    .dm-input-bar input:focus { border-color: var(--orange); }
    .dm-send { flex-shrink: 0; padding: 12px 20px !important; border-radius: 14px !important; }

    /* ── Group chat bubbles — Apple iMessage system (overrides main.css) ── */
    .groups-chat { gap: 4px; }
    .groups-msg.flush { margin-top: -3px; }
    .groups-msg-bubble { border-radius: 18px; font-size: .95rem; line-height: 1.4; }
    .groups-msg:not(.mine) .groups-msg-bubble {
      background: var(--soft); border: 1px solid var(--line); border-end-start-radius: 6px;
    }
    .groups-msg.mine .groups-msg-bubble {
      background: linear-gradient(150deg, #ff8a3d, #ff6f2e); color: #fff; font-weight: 600;
      border: 1px solid transparent; border-end-end-radius: 6px;
    }

    /* ── Party chat bubbles — same system (shape rules live below in the party section) ── */
    .party-chat-msg.flush { margin-top: -3px; }
    .party-chat-msg .party-chat-msg-bubble { border: 1px solid var(--line); }
    .party-chat-msg.mine .party-chat-msg-bubble { border-color: transparent; }

    /* ── Chats list rows (My Chats) ── */
    .chat-row { gap: 12px; padding: 12px 14px; }
    .chat-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
    .chat-row-name { font-weight: 700; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .chat-row-preview { font-size: .78rem; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .chat-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
    .chat-row-time { font-size: .7rem; color: var(--muted); font-weight: 600; }

    /* ── Dark-mode chat overrides ── */
    html.dark .dm-bubble,
    html.dark .groups-msg:not(.mine) .groups-msg-bubble,
    html.dark .party-chat-msg-bubble { background: var(--soft); }
    html.dark .chat-top-back, html.dark .chat-day { background: var(--surface); }

    /* ── Profile sheet action list ── */
    .friends-profile-actions { display: flex; flex-direction: column; gap: 8px; padding: 12px 4px 4px; }
    .fp-row {
      display: flex; align-items: center; gap: 12px; width: 100%;
      padding: 13px 16px; border: none; border-radius: 14px;
      background: var(--soft); color: var(--ink); font-size: .92rem; font-weight: 700;
      cursor: pointer; transition: background .15s ease, transform .12s ease;
      text-align: start;
    }
    .fp-row:active { transform: scale(.98); background: var(--line); }
    .fp-row-ico { font-size: 1.15rem; width: 24px; text-align: center; flex-shrink: 0; }
    .fp-row-lbl { flex: 1; }
    .fp-row-primary { background: var(--accent, #FF6B2B); color: #fff; }
    .fp-row-primary:active { background: var(--line); transform: scale(.98); }
    html.dark .fp-row { background: var(--surface); }
    .fp-row.is-fav { outline: 2px solid rgba(255, 180, 0, .45); }
    .fp-row.is-fav .fp-row-ico { color: #f59e0b; }

    /* ── Group chat screen: WhatsApp-style header ── */
    .groups-chat-top {
      display: flex; align-items: center; gap: 10px; padding: 12px 16px;
      position: sticky; top: 0; z-index: 5;
      background: var(--bg); border-bottom: 1px solid var(--line);
    }
    .groups-top-back, .groups-top-more {
      width: 42px; height: 42px; border-radius: 50%; border: none; flex-shrink: 0;
      background: var(--soft); color: var(--ink); font-size: 1.3rem; line-height: 1;
      display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
      transition: background .15s ease, transform .12s ease;
    }
    .groups-top-back:active, .groups-top-more:active, .groups-bar-btn:active { transform: scale(.92); }
    .groups-chat-head { flex: 1; min-width: 0; }
    .groups-chat-name { font-weight: 800; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .groups-detail-h1 { font-size: .8rem; color: var(--muted); font-weight: 700; }
    .groups-detail-sub { font-size: .74rem; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .groups-detail-avatar { display: inline-flex; flex-shrink: 0; }
    .groups-avatar-img { object-fit: cover; }

    /* ── Chat input bar extra buttons ── */
    .groups-chat-inputbar { align-items: center; gap: 8px; }
    .groups-bar-btn {
      width: 42px; height: 42px; border-radius: 50%; border: none; flex-shrink: 0;
      background: var(--soft); color: var(--ink); font-size: 1.15rem; line-height: 1;
      display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
      transition: background .15s ease, transform .12s ease;
    }
    .groups-msg-send { border-radius: 50%; min-width: 44px; height: 42px; width: 46px; display: inline-flex; align-items: center; justify-content: center; }
    .groups-chat { scrollbar-width: thin; }

    /* ── Emoji palette ── */
    .groups-emoji-pop {
      position: fixed; left: 50%; transform: translateX(-50%); bottom: 92px; z-index: 60;
      display: flex; flex-wrap: wrap; gap: 4px; max-width: 300px; padding: 10px;
      background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
      box-shadow: 0 12px 40px rgba(0,0,0,.16);
    }
    .groups-emoji { width: 38px; height: 38px; border: none; background: transparent; cursor: pointer; font-size: 1.3rem; border-radius: 10px; transition: background .15s ease; }
    .groups-emoji:hover { background: var(--soft); }

    /* ── Two-step create sheet ── */
    .groups-create-step { display: flex; flex-direction: column; gap: 10px; }
    .groups-create-head-row { display: flex; align-items: center; gap: 10px; }
    .groups-create-head-row .btn-ghost { flex-shrink: 0; }
    .groups-create-photo-row { display: flex; justify-content: center; padding: 6px 0 10px; }
    .groups-create-photo {
      width: 96px; height: 96px; border-radius: 50%; cursor: pointer; color: var(--muted);
      border: 2px dashed var(--line); background: var(--soft);
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
      font-size: 1.9rem; background-size: cover; background-position: center;
      transition: border-color .15s ease;
    }
    .groups-create-photo:hover { border-color: var(--blue); }
    .groups-create-photo small { font-size: .62rem; font-weight: 700; }
    .groups-file-input {
      position: fixed; left: -9999px; top: 0; width: 1px; height: 1px;
      opacity: 0; border: 0; padding: 0; margin: 0;
    }
    .groups-create-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
    .groups-selected-count { font-size: .82rem; font-weight: 800; color: var(--muted); }

    /* ── Group settings sheet ── */
    .groups-settings-sheet { max-height: 88vh; overflow-y: auto; }
    .groups-settings-info { display: flex; align-items: center; gap: 14px; padding: 6px 6px 14px; }
    .groups-settings-av { flex-shrink: 0; }
    .groups-settings-name { font-weight: 800; font-size: 1.1rem; }
    .groups-settings-desc { font-size: .84rem; color: var(--muted); margin-top: 2px; }
    .groups-settings-section { font-size: .78rem; font-weight: 800; color: var(--muted); padding: 16px 6px 8px; text-transform: uppercase; letter-spacing: .04em; }
    .groups-settings-menu {
      display: flex; flex-direction: column; gap: 2px; padding: 6px;
      background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    }
    .groups-settings-row {
      display: flex; align-items: center; gap: 10px; width: 100%;
      padding: 12px 12px; border-radius: 12px; font-size: .9rem; font-weight: 650; color: var(--ink);
    }
    .groups-settings-row > span:first-child { flex: 1; min-width: 0; }
    .groups-settings-row .btn-ghost { flex-shrink: 0; }
    .groups-settings-you {
      font-size: .68rem; font-weight: 800; color: #fff; background: var(--blue);
      padding: 2px 9px; border-radius: 999px; flex-shrink: 0;
    }
    .groups-settings-edit { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-top: 10px; }
    .groups-settings-leave {
      display: block; width: 100%; margin-top: 14px; padding: 14px; text-align: center;
      font-size: .9rem; font-weight: 800; color: #ef4444;
      background: var(--surface); border: 1px solid var(--line); border-radius: 16px; cursor: pointer;
      transition: background .15s ease, transform .12s ease;
    }
    .groups-settings-leave:active { transform: scale(.98); }

    /* ── Mute switch ── */
    .groups-switch {
      width: 50px; height: 29px; border-radius: 999px; border: none; flex-shrink: 0;
      background: var(--line); display: inline-flex; align-items: center; justify-content: flex-start;
      cursor: pointer; padding: 0 3px; transition: background .2s ease;
    }
    .groups-switch span { display: block; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: margin .2s ease; margin-inline-start: 1px; }
    .groups-switch.on { background: #34C759; }
    .groups-switch.on span { margin-inline-start: calc(100% - 25px); }

    /* ── Game-start message chip in chat ── */
    .groups-msg-game {
      display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 18px;
      background: rgba(255, 107, 43, .14); color: #B74A16; font-weight: 800; font-size: .92rem;
      border: 1px solid rgba(255, 107, 43, .3);
    }
    html.dark .groups-msg-game { color: #FFB78D; }
    .groups-msg-game-hint { font-weight: 600; font-size: .74rem; opacity: .75; }

    html.dark .groups-chat-top { background: var(--surface); }
    html.dark .groups-top-back, html.dark .groups-top-more, html.dark .groups-bar-btn { background: var(--surface); }

    /* ═══════════ Open Parties (حفلات مفتوحة) — Apple HIG ═══════════ */
    .parties-page { padding-bottom: 120px; }

    /* ── Large-title top bar (iOS Large Title + circular nav buttons) ── */
    .parties-top { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; }
    .parties-top-title { flex: 1; font-size: clamp(1.5rem, 5vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
    .parties-page .friends-back { border-radius: 50%; }
    .parties-nav-btn {
      width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
      border-radius: 50%; border: none; background: var(--soft); color: var(--ink); font-size: 1.1rem; cursor: pointer;
      transition: transform 0.2s var(--apple-spring), background 0.2s var(--apple-ease);
    }
    .parties-nav-btn:active { transform: scale(0.88); }

    /* ── Search field (iOS searchResults-style gray fill) ── */
    .parties-search { position: relative; margin-bottom: 14px; }
    .parties-search .ico { position: absolute; top: 50%; inset-inline-start: 13px; transform: translateY(-50%); width: 17px; height: 17px; opacity: 0.5; pointer-events: none; }
    .parties-search input {
      width: 100%; box-sizing: border-box; padding: 13px 16px; padding-inline-start: 40px;
      border-radius: 14px; background: var(--soft); border: none; font: inherit; font-size: 1rem; color: var(--ink); outline: none;
      transition: box-shadow 0.2s var(--apple-ease), background 0.2s;
    }
    .parties-search input::placeholder { color: var(--muted); }
    .parties-search input:focus { box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.25); }

    /* ── Filter segmented control (iOS UISegmentedControl) ── */
    .parties-seg { display: flex; background: var(--soft); border-radius: 12px; padding: 3px; margin: 4px 0 18px; gap: 2px; }
    .parties-seg-btn {
      flex: 1; min-height: 38px; border: none; background: transparent; color: var(--muted);
      font: inherit; font-size: 0.84rem; font-weight: 700; border-radius: 9px; cursor: pointer; white-space: nowrap;
      transition: background 0.25s var(--apple-ease), color 0.2s, box-shadow 0.25s var(--apple-ease), transform 0.2s var(--apple-spring);
    }
    .parties-seg-btn.on {
      background: var(--surface); color: var(--orange, #ff6f2e);
      box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 1px rgba(0,0,0,0.05);
    }
    html.dark .parties-seg-btn.on { color: #ff8a3d; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
    .parties-seg-btn:active { transform: scale(0.95); }

    /* ── Party cards (inset-grouped iOS list cards) ── */
    .parties-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
    .party-card {
      display: flex; align-items: center; gap: 13px; padding: 15px;
      border-radius: 20px; background: var(--surface);
      border: 1px solid var(--apple-hairline, rgba(0,0,0,0.06));
      box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 6px 18px rgba(0,0,0,0.045);
      transition: transform 0.35s var(--apple-spring), box-shadow 0.35s var(--apple-ease), border-color 0.3s;
    }
    .party-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,0.10); }
    .party-card:active { transform: scale(0.975); }
    html.dark .party-card { border-color: var(--apple-hairline, rgba(255,255,255,0.09)); }
    .party-card-ico {
      width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px;
      display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
      background: linear-gradient(150deg, rgba(var(--orange-rgb), 0.16), rgba(var(--orange-rgb), 0.04));
    }
    .party-card-body { flex: 1; min-width: 0; }
    .party-card-name { font-size: 1.02rem; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .party-card-game { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
    .party-card-meta { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-top: 4px; flex-wrap: wrap; }
    .party-card-dot { opacity: 0.45; }
    .party-status { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 800; padding: 3px 9px; border-radius: 20px; white-space: nowrap; margin-top: 6px; }
    .party-status.live { color: #34c759; background: rgba(52,199,89,0.14); }
    .party-status.hot  { color: #ff9500; background: rgba(255,149,0,0.14); }
    .party-status.full { color: #ff3b30; background: rgba(255,59,48,0.14); }

    /* ── Trailing join button (iOS tinted primary, 42px min target) ── */
    .party-card-join {
      flex-shrink: 0; min-height: 42px; padding: 10px 16px; border-radius: 14px; border: none;
      background: var(--orange, #ff6f2e); color: #fff; font: inherit; font-weight: 800; font-size: 0.84rem;
      box-shadow: 0 2px 10px rgba(var(--orange-rgb), 0.35); cursor: pointer;
      transition: transform 0.2s var(--apple-spring), filter 0.2s, box-shadow 0.2s var(--apple-ease);
    }
    .party-card-join:hover { filter: brightness(1.06); box-shadow: 0 4px 14px rgba(var(--orange-rgb), 0.45); }
    .party-card-join:active { transform: scale(0.93); }

    /* ── Create FAB (circular iOS floaty) ── */
    .parties-fab {
      position: fixed; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px + var(--bbx-dock, 74px) + 14px); inset-inline-end: 20px; z-index: 4000;
      width: 60px; height: 60px; border-radius: 50%; border: none;
      display: flex; align-items: center; justify-content: center;
      background: linear-gradient(150deg, #ff8a3d, #ff6f2e); color: #fff; font-size: 1.75rem; font-weight: 300; line-height: 1;
      box-shadow: 0 10px 26px rgba(var(--orange-rgb), 0.45), 0 2px 8px rgba(0,0,0,0.16); cursor: pointer;
      transition: transform 0.3s var(--apple-spring), box-shadow 0.3s var(--apple-ease);
    }
    .parties-fab:active { transform: scale(0.88); }

    /* ── Create / Join-by-code sheets (iOS pageSheet) ── */
    .parties-page .friends-profile-overlay {
      background: rgba(0,0,0,0.4); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
      z-index: 9990;
      padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 92px + var(--kb-inset, 0px));
      transition: opacity 0.3s;
    }
    .parties-page .friends-profile-sheet {
      border-radius: 26px 26px 0 0; padding: 12px 24px 34px;
      max-height: calc(85vh - env(safe-area-inset-bottom, 0px) - 92px - var(--kb-inset, 0px));
    }
    .parties-create-sheet { padding-bottom: 26px; }
    .parties-create-head { font-size: 1.06rem; font-weight: 800; text-align: center; margin: 4px 0 0; }
    .parties-create-head-row { display: flex; align-items: center; justify-content: space-between; text-align: start; gap: 10px; }
    .parties-create-sub { text-align: center; font-size: 0.82rem; font-weight: 600; color: var(--muted); margin: 2px 0 16px; }
    .parties-create-games { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 46vh; overflow: auto; }
    .parties-game-pick {
      display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px;
      background: var(--surface); border: 1.5px solid var(--apple-hairline, rgba(127,127,127,0.16));
      font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; color: inherit; text-align: start;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
      transition: transform 0.2s var(--apple-spring), border-color 0.2s, box-shadow 0.2s var(--apple-ease);
    }
    .parties-game-pick:active { transform: scale(0.96); }
    .parties-game-pick-ico {
      width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; font-size: 1.35rem;
      display: flex; align-items: center; justify-content: center;
      background: linear-gradient(150deg, rgba(var(--orange-rgb), 0.14), rgba(var(--orange-rgb), 0.03));
    }
    .parties-game-pick.on { border-color: var(--orange, #ff6f2e); background: rgba(var(--orange-rgb), 0.07); box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.18); }
    .parties-create-selected { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1rem; font-weight: 800; padding: 8px 0 12px; }
    .parties-create-input {
      width: 100%; box-sizing: border-box; padding: 14px 16px; border-radius: 14px;
      background: var(--soft); border: none; font: inherit; font-size: 0.98rem; color: var(--ink); outline: none; margin-bottom: 12px;
    }
    .parties-create-input::placeholder { color: var(--muted); }
    .parties-create-input:focus { box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.25); }
    .parties-create-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px; }
    .parties-create-row-label { font-weight: 700; font-size: 0.94rem; }
    .parties-stepper { display: flex; align-items: center; gap: 10px; }
    .parties-step-btn {
      width: 38px; height: 38px; border-radius: 12px; border: none; background: var(--soft);
      font: inherit; font-size: 1.15rem; font-weight: 700; cursor: pointer; color: var(--ink);
      transition: transform 0.15s var(--apple-spring), background 0.2s;
    }
    .parties-step-btn:active { transform: scale(0.9); background: var(--line); }
    .parties-stepper input {
      width: 54px; text-align: center; font: inherit; font-weight: 800; border: none; background: transparent; color: var(--ink);
      -moz-appearance: textfield;
    }
    .parties-stepper input::-webkit-outer-spin-button, .parties-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .parties-type-badge, .party-chat-on-badge { font-size: 0.82rem; font-weight: 800; color: #34c759; background: rgba(52,199,89,0.12); padding: 5px 12px; border-radius: 20px; }

    /* ── Party chat inside the room lobby (iMessage-style bubbles) ── */
    .party-chat { display: flex; flex-direction: column; background: var(--surface); border-radius: 20px; overflow: hidden; border: 1px solid var(--apple-hairline, rgba(0,0,0,0.06)); box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 6px 18px rgba(0,0,0,0.045); }
    .party-chat-msgs { height: 230px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
    .party-chat-empty { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 34px 0; }
    .party-chat-msg { max-width: 82%; align-self: flex-start; }
    .party-chat-msg.mine { align-self: flex-end; }
    .party-chat-msg-meta { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
    .party-chat-msg-meta b { font-weight: 800; }
    .party-chat-msg-bubble { background: var(--soft); padding: 9px 13px; border-radius: 18px; border-bottom-start-radius: 6px; font-size: 0.88rem; line-height: 1.45; word-break: break-word; }
    .party-chat-msg.mine .party-chat-msg-meta { justify-content: flex-end; }
    .party-chat-msg.mine .party-chat-msg-bubble { background: linear-gradient(150deg, #ff8a3d, #ff6f2e); color: #fff; font-weight: 600; border-radius: 18px; border-bottom-end-radius: 6px; }
    .party-chat-inputbar {
      display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--apple-hairline, rgba(127,127,127,0.12));
      position: sticky; bottom: calc(var(--kb-inset, 0px) + env(safe-area-inset-bottom, 0px) + 96px);
      background: var(--surface); z-index: 60;
      box-shadow: 0 -6px 18px rgba(0,0,0,0.05);
    }
    .party-chat-inputbar input { margin-bottom: 0; padding: 12px 16px; }

    /* ══════════════════════════════════════════════════════════════
       Wallet design variants (points + diamonds, same icons).
       Selected by <html class="wallet-style-A..E"> (set in app.js).
       Covers: top-bar wallet, profile pills, shop prices & wallet bar.
       ────────────────────────────────────────────────────────────── */
    .sloom-price-ico { width: 15px; height: 15px; vertical-align: -2px; display: inline-block; }
    .sloom-btn.cant .sloom-price-ico { vertical-align: -1px; }
    .prof-pill-ico svg { width: 18px; height: 18px; display: block; }

    /* ---- A · Gold chip: icons on chip discs; count pill matches ---- */
    html.wallet-style-a .bbx-wallet .gem {
      display: grid; place-items: center;
      width: 24px; height: 24px; margin: -1px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 28%, #fff3c4, #ffc42e 55%, #eba500);
      box-shadow: inset 0 0 0 2px rgba(255, 236, 170, 0.8), 0 0 10px rgba(255, 196, 46, 0.5);
    }
    html.wallet-style-a .bbx-wallet .gem img { width: 16px !important; height: 16px !important; border-radius: 50% !important; }
    html.wallet-style-a .bbx-wallet-diamond .gem {
      background: radial-gradient(circle at 35% 28%, #c9f7ff, #22d3ee 55%, #0284c7);
      box-shadow: inset 0 0 0 2px rgba(190, 242, 255, 0.85), 0 0 10px rgba(34, 211, 238, 0.45);
    }
    html.wallet-style-a .bbx-wallet .plus {
      background: linear-gradient(145deg, #ffcf4d, #f59a00) !important;
      box-shadow: 0 2px 10px rgba(245, 154, 0, 0.55) !important;
    }
    html.wallet-style-a .bbx-wallet-diamond .plus {
      background: linear-gradient(145deg, #22d3ee, #0284c7) !important;
      box-shadow: 0 2px 10px rgba(2, 132, 199, 0.55) !important;
    }
    html.wallet-style-a .prof-pill {
      background: linear-gradient(135deg, rgba(255, 196, 46, 0.22), rgba(245, 154, 0, 0.1));
      border: 1px solid rgba(255, 196, 46, 0.5);
      font-weight: 800;
    }
    html.wallet-style-a .prof-pill.p-dia { background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(2, 132, 199, 0.08)); border-color: rgba(34, 211, 238, 0.45); }
    html.wallet-style-a .prof-pill-ico {
      display: grid; place-items: center;
      width: 26px; height: 26px; border-radius: 50%;
      background: radial-gradient(circle at 35% 28%, #fff3c4, #ffc42e 55%, #eba500);
      box-shadow: inset 0 0 0 2px rgba(255, 236, 170, 0.85), 0 2px 8px rgba(255, 196, 46, 0.45);
    }
    html.wallet-style-a .prof-pill.p-dia .prof-pill-ico {
      background: radial-gradient(circle at 35% 28%, #c9f7ff, #22d3ee 55%, #0284c7);
      box-shadow: inset 0 0 0 2px rgba(190, 242, 255, 0.85), 0 2px 8px rgba(34, 211, 238, 0.4);
    }
    html.wallet-style-a .sloom-price {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 4px 10px; border-radius: 999px;
      background: linear-gradient(135deg, rgba(255, 196, 46, 0.16), rgba(245, 154, 0, 0.05));
      border: 1px solid rgba(255, 196, 46, 0.4);
      color: #b15e00; font-weight: 800;
    }
    html.wallet-style-a .sloom-price-ico { width: 16px; height: 16px; }
    html.wallet-style-a .sloom-price b { color: #d97706; font-weight: 900; }
    html.wallet-style-b .sloom-price { color: #f5a21c; font-weight: 800; }
    html.wallet-style-c .sloom-price { color: #f0a100; font-weight: 800; }
    html.wallet-style-d .sloom-price { color: #eba500; font-weight: 800; }
    html.wallet-style-e .sloom-price { color: #f97316; font-weight: 800; }

    /* ---- B · Icon in circle: big filled disc, count as plain text ---- */
    html.wallet-style-b .bbx-wallet { height: 40px !important; padding-inline: 4px 10px !important; gap: 8px !important; background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
    html.wallet-style-b .bbx-wallet .gem {
      display: grid; place-items: center;
      width: 30px; height: 30px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 28%, #fff3c4, #ffc42e 55%, #eba500);
      box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.8), 0 3px 10px rgba(255, 196, 46, 0.45);
    }
    html.wallet-style-b .bbx-wallet .gem img { width: 18px !important; height: 18px !important; border-radius: 50% !important; }
    html.wallet-style-b .bbx-wallet-diamond .gem {
      background: radial-gradient(circle at 35% 28%, #c9f7ff, #22d3ee 55%, #0284c7);
      box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.85), 0 3px 10px rgba(34, 211, 238, 0.45);
    }
    html.wallet-style-b .bbx-wallet .plus {
      background: transparent !important; box-shadow: none !important;
      color: #f5a21c !important; font-size: 0.9rem !important;
      height: auto !important; min-width: 0 !important; padding: 0 2px !important;
    }
    html.wallet-style-b .bbx-wallet-diamond .plus { color: #0ea5e9 !important; }
    html.wallet-style-b .prof-pill { border: 1px solid rgba(255, 196, 46, 0.45); background: linear-gradient(135deg, rgba(255, 196, 46, 0.1), rgba(255, 196, 46, 0.03)); }
    html.wallet-style-b .prof-pill.p-dia { border-color: rgba(34, 211, 238, 0.45); background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(34, 211, 238, 0.03)); }
    html.wallet-style-b .prof-pill-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #fff3c4, #ffc42e 55%, #eba500); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7); }
    html.wallet-style-b .prof-pill.p-dia .prof-pill-ico { background: radial-gradient(circle at 35% 28%, #c9f7ff, #22d3ee 55%, #0284c7); }

    /* ---- C · Stacked tile: icon tile up top, count beneath ---- */
    html.wallet-style-c .bbx-wallet { flex-direction: column !important; gap: 2px !important; height: 48px !important; padding: 4px 10px !important; border-radius: 12px !important; background: rgba(255, 255, 255, 0.06) !important; }
    html.wallet-style-c .bbx-wallet-diamond { background: rgba(2, 132, 199, 0.08) !important; }
    html.wallet-style-c .bbx-wallet .gem { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px; background: linear-gradient(145deg, #ffe9a8, #f59a00); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 2px 6px rgba(245, 154, 0, 0.35); }
    html.wallet-style-c .bbx-wallet-diamond .gem { background: linear-gradient(145deg, #a5f3ff, #0284c7); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 2px 6px rgba(2, 132, 199, 0.35); }
    html.wallet-style-c .bbx-wallet .gem img { width: 17px !important; height: 17px !important; border-radius: 6px !important; }
    html.wallet-style-c .bbx-wallet .plus { background: transparent !important; box-shadow: none !important; color: #f5a21c !important; height: auto !important; min-width: 0 !important; padding: 0 !important; font-size: 0.7rem !important; line-height: 1 !important; flex-shrink: 0 !important; }
    html.wallet-style-c .bbx-wallet-diamond .plus { color: #0ea5e9 !important; }
    html.wallet-style-c .prof-pill { border: 1.5px solid rgba(255, 196, 46, 0.5); background: transparent; }
    html.wallet-style-c .prof-pill.p-dia { border-color: rgba(34, 211, 238, 0.5); }

    /* ---- D · Glass duo: frosted translucent buttons ---- */
    html.wallet-style-d .bbx-wallet {
      height: 34px !important;
      background: rgba(255, 255, 255, 0.14) !important;
      -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
      backdrop-filter: blur(14px) saturate(160%) !important;
      border: 1px solid rgba(255, 255, 255, 0.25) !important;
      box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
    }
    html.dark.wallet-style-d .bbx-wallet { background: rgba(255, 255, 255, 0.1) !important; border-color: rgba(255, 255, 255, 0.18) !important; }
    html.wallet-style-d .bbx-wallet .gem { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); }
    html.wallet-style-d .bbx-wallet-diamond .gem { border-color: rgba(125, 230, 255, 0.45); }
    html.wallet-style-d .bbx-wallet .gem img { width: 16px !important; height: 16px !important; border-radius: 50% !important; }
    html.wallet-style-d .bbx-wallet .plus { color: #ffe9a8 !important; background: rgba(255, 255, 255, 0.14) !important; box-shadow: none !important; border: 1px solid rgba(255, 255, 255, 0.28) !important; height: 22px !important; min-width: 22px !important; font-size: 0.78rem !important; }
    html.wallet-style-d .bbx-wallet-diamond .plus { color: #a5f3ff !important; border-color: rgba(125, 230, 255, 0.35) !important; }
    html.wallet-style-d .prof-pill { background: rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); border: 1px solid rgba(255, 255, 255, 0.25); }
    html.wallet-style-d .prof-pill.p-dia { border-color: rgba(125, 230, 255, 0.35); }

    /* ---- E · Pill: soft tinted, straight letters (sloom-wallet-pill look) ---- */
    html.wallet-style-e .bbx-wallet { height: 34px !important; border-radius: 12px !important; background: linear-gradient(135deg, rgba(255, 196, 46, 0.16), rgba(245, 154, 0, 0.05)) !important; border: 1px solid rgba(255, 196, 46, 0.35) !important; }
    html.wallet-style-e .bbx-wallet-diamond { background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(2, 132, 199, 0.04)) !important; border-color: rgba(34, 211, 238, 0.3) !important; }
    html.wallet-style-e .bbx-wallet .gem img { border-radius: 50% !important; }
    html.wallet-style-e .bbx-wallet .plus { color: #d97706 !important; background: rgba(255, 255, 255, 0.85) !important; box-shadow: none !important; border: none !important; font-weight: 800 !important; }
    html.dark.wallet-style-e .bbx-wallet .plus { background: rgba(255, 255, 255, 0.14) !important; color: #fbbf24 !important; }
    html.wallet-style-e .bbx-wallet-diamond .plus { color: #0369a1 !important; }
    html.dark.wallet-style-e .bbx-wallet-diamond .plus { color: #a5f3ff !important; }
    html.wallet-style-e .prof-pill { background: linear-gradient(135deg, rgba(255, 196, 46, 0.14), rgba(245, 154, 0, 0.05)); border: 1px solid rgba(255, 196, 46, 0.35); }
    html.wallet-style-e .prof-pill.p-dia { background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(2, 132, 199, 0.04)); border-color: rgba(34, 211, 238, 0.3); }

    /* ── Room game picker (Apple-style tiles + slim search) ── */
    .room-game-searchbar {
      display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px;
      background: var(--soft); border: 1.5px solid transparent; margin-bottom: 12px;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .room-game-searchbar svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
    .room-game-searchbar input {
      flex: 1; min-width: 0; background: none; border: none; outline: none;
      font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--ink);
    }
    .room-game-searchbar input::placeholder { color: var(--muted); }
    .room-game-searchbar:focus-within { border-color: var(--orange, #ff6f2e); box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.16); }
    .room-game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 42vh; overflow: auto; padding-bottom: 6px; }
    .room-game-pick {
      display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 16px;
      background: var(--surface); border: 1.5px solid var(--apple-hairline, rgba(127,127,127,0.16));
      font: inherit; font-weight: 700; font-size: 0.86rem; cursor: pointer; color: inherit; text-align: start;
      box-shadow: 0 1px 2px rgba(0,0,0,0.03);
      transition: transform 0.2s var(--apple-spring), border-color 0.2s, box-shadow 0.2s var(--apple-ease);
    }
    .room-game-pick:active { transform: scale(0.96); }
    .room-game-pick-ico {
      width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; font-size: 1.3rem;
      display: flex; align-items: center; justify-content: center;
      background: linear-gradient(150deg, rgba(var(--orange-rgb), 0.14), rgba(var(--orange-rgb), 0.03));
    }
    .room-game-pick-label { flex: 1; min-width: 0; line-height: 1.25; }
    .room-game-pick-check {
      width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0;
      display: grid; place-items: center; font-size: 0.7rem; color: transparent;
      transition: all 0.2s;
    }
    .room-game-pick.on {
      border-color: var(--orange, #ff6f2e); background: rgba(var(--orange-rgb), 0.07);
      box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.18);
    }
    .room-game-pick.on .room-game-pick-check { background: var(--orange, #ff6f2e); border-color: var(--orange, #ff6f2e); color: #fff; }
    .room-game-empty { text-align: center; color: var(--muted); font-size: 0.8rem; font-weight: 600; padding: 12px 0 8px; }
    .rules-icon img.rules-pay-ico { width: 44px; height: 44px; object-fit: contain; vertical-align: middle; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2)); }

    /* ═══ Profile "You" page — Apple/Jawaker overhaul ═══ */
    .prof-page {
      padding-top: 10px;
      padding-bottom: calc(var(--bbx-dock, 92px) + 24px);
      -webkit-tap-highlight-color: transparent;
    }

    .prof-guest {
      margin: 4px 0 6px;
      padding: 26px 22px 22px;
      text-align: center;
      border-radius: 24px;
      background: rgba(255,255,255,0.06);
      border: 1px solid var(--apple-hairline, rgba(127,127,127,0.16));
      box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 8px 24px rgba(0,0,0,0.05);
    }
    html:not(.dark) .prof-guest { background: rgba(0,0,0,0.04); }
    .prof-guest-ico { font-size: 2.1rem; line-height: 1; }
    .prof-guest-title { margin: 12px 0 6px; font-size: 1.02rem; font-weight: 800; color: var(--ink); }
    .prof-guest-sub { margin: 0 auto 18px; max-width: 300px; font-size: 0.85rem; font-weight: 500; color: var(--muted); line-height: 1.7; }
    .prof-guest .btn-primary { display: inline-block; padding: 12px 30px; border-radius: 15px; text-decoration: none; font-weight: 800; }

    .prof-hero { display: flex; flex-direction: column; align-items: center; }
    .prof-avatar-ring {
      width: 118px; height: 118px; padding: 5px;
      background: conic-gradient(var(--orange, #ff6f2e) calc(var(--lvl, 0) * 1%), rgba(127,127,127,0.16) 0);
      box-shadow: 0 10px 30px rgba(var(--orange-rgb, 255,111,46), 0.35);
    }
    .prof-avatar-inner { background: var(--bg); }
    .prof-name { font-size: 1.5rem; margin-bottom: 4px; }
    .prof-handle { font-size: 0.84rem; margin-bottom: 12px; }
    .prof-level-chip {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 6px 14px; border-radius: 999px;
      background: linear-gradient(135deg, rgba(var(--orange-rgb), 0.16), rgba(var(--orange-rgb), 0.04));
      border: 1px solid rgba(var(--orange-rgb), 0.25);
      color: var(--ink); font-size: 0.8rem; font-weight: 700; margin-bottom: 14px;
    }
    .prof-level-chip b { color: var(--orange, #ff6f2e); font-size: 0.95rem; }
    .prof-level-chip .prof-level-emblem { font-size: 0.68rem; font-weight: 800; opacity: 0.9; }

    .prof-xp-wrap {
      display: flex; align-items: center; gap: 8px; width: 100%; max-width: 320px;
      margin: 0 auto 14px;
    }
    .prof-xp-bar {
      flex: 1; height: 8px; border-radius: 999px;
      background: rgba(127,127,127,0.12); overflow: hidden;
    }
    .prof-xp-bar i {
      display: block; height: 100%; border-radius: 999px;
      background: linear-gradient(90deg, var(--orange, #ff8a3d), #ff6f2e);
      transition: width 0.4s ease;
    }
    .prof-xp-pct {
      font-size: 0.7rem; font-weight: 800; color: var(--muted, #999);
      min-width: 24px; text-align: end;
    }
    .prof-xp-next {
      font-size: 0.64rem; font-weight: 600; color: var(--muted-foreground, #888);
    }
    .bnav-profile {
      position: relative; width: 28px; height: 28px;
      display: grid; place-items: center;
    }
    .bnav-profile svg { width: 20px; height: 20px; position: relative; z-index: 1; }
    .bnav-level-ring {
      position: absolute; inset: 0; border-radius: 50%;
      background: conic-gradient(var(--orange, #ff6f2e) calc(var(--lvl, 0) * 1%), rgba(127,127,127,0.16) 0);
      -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
              mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
      pointer-events: none;
    }
    html.dark .bnav-level-ring {
      background: conic-gradient(var(--orange, #ff6f2e) calc(var(--lvl, 0) * 1%), rgba(255,255,255,0.14) 0);
    }

    .rank-row .rk-lvl {
      display: inline-flex; align-items: center; gap: 2px;
      font-size: 0.7rem; font-weight: 800; color: var(--orange, #ff6f2e);
      min-width: 36px;
    }
    .rank-row .rk-lvl b { font-size: 0.74rem; }

    .prof-stats-row {
      display: grid; grid-template-columns: repeat(4, 1fr);
      border-radius: 20px; overflow: hidden;
      background: rgba(255,255,255,0.06);
      border: 1px solid var(--apple-hairline, rgba(127,127,127,0.16));
      box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 6px 18px rgba(0,0,0,0.045);
      margin-bottom: 4px;
    }
    html:not(.dark) .prof-stats-row { background: rgba(0,0,0,0.04); }
    .prof-stats-row .prof-stat {
      background: none; border: none; border-radius: 0;
      padding: 14px 6px 12px;
      transition: background 0.15s ease, transform 0.15s ease;
      cursor: default;
    }
    .prof-stats-row .prof-stat:hover { background: rgba(255,255,255,0.05); }
    html:not(.dark) .prof-stats-row .prof-stat:hover { background: rgba(0,0,0,0.03); }
    .prof-stats-row .prof-stat:active { transform: scale(0.97); }
    .prof-stats-row .prof-stat:focus-visible { outline: 2px solid var(--orange, #ff6f2e); outline-offset: -2px; border-radius: 6px; }
    .prof-stats-row .prof-stat + .prof-stat { border-inline-start: 1px solid var(--apple-hairline, rgba(127,127,127,0.14)); }
    .prof-stats-row .prof-stat-ico { font-size: 1.05rem; margin-bottom: 5px; display: block; }
    .prof-stats-row .prof-stat-num { font-size: 1.15rem; display: flex; align-items: baseline; justify-content: center; gap: 1px; }
    .prof-stats-row .prof-stat-num small { font-size: 0.68rem; font-weight: 700; color: var(--muted); }
    .prof-stats-row .prof-stat-label { font-size: 0.68rem; margin-top: 4px; font-weight: 700; }
    .prof-stats-row .stat-progress { height: 5px; margin: 7px 10px 0; }
    .prof-stats-row .prof-stat-sub { font-size: 0.56rem; font-weight: 700; color: var(--muted, #999); margin-top: 3px; line-height: 1.3; }
    .prof-rank-note { text-align: center; font-size: 0.78rem; font-weight: 500; color: var(--muted); margin: 10px 0 4px; line-height: 1.5; }

    .prof-section { margin: 0 2px 24px; }
    .prof-section-title {
      display: flex; align-items: center; justify-content: space-between; gap: 8px;
      padding: 0 6px 12px;
    }
    .prof-ach-count {
      font-size: 0.72rem; font-weight: 800; color: var(--orange, #ff6f2e);
      padding: 3px 10px; border-radius: 999px;
      background: rgba(var(--orange-rgb), 0.12);
    }

    .prof-played {
      display: flex; gap: 10px; overflow-x: auto;
      padding: 4px 2px 8px; scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    .prof-played::-webkit-scrollbar { display: none; }
    .prof-played::-webkit-scrollbar-thumb { display: none; }
    .prof-played-tile {
      flex: 0 0 auto; min-width: 96px;
      display: flex; flex-direction: column; align-items: center; gap: 6px;
      padding: 16px 12px 13px; border-radius: 20px;
      background: rgba(255,255,255,0.06);
      border: 1px solid var(--apple-hairline, rgba(127,127,127,0.16));
      box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 6px 18px rgba(0,0,0,0.045);
      transition: transform 0.3s var(--apple-spring), box-shadow 0.3s var(--apple-ease);
    }
    html:not(.dark) .prof-played-tile { background: rgba(0,0,0,0.04); }
    .prof-played-tile:active { transform: scale(0.94); }
    .prof-played-tile:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.12), 0 0 0 1px rgba(var(--orange-rgb), 0.15); }
    .prof-played-tile:focus-visible { outline: 2px solid var(--orange, #ff6f2e); outline-offset: 2px; }
    .prof-played-ico {
      width: 46px; height: 46px; border-radius: 15px;
      display: flex; align-items: center; justify-content: center; font-size: 1.45rem;
      background: linear-gradient(150deg, rgba(var(--orange-rgb), 0.16), rgba(var(--orange-rgb), 0.04));
      flex-shrink: 0;
    }
    .prof-played-label { font-size: 0.74rem; font-weight: 700; color: var(--ink); max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .prof-played-count { font-size: 0.7rem; font-weight: 800; color: var(--orange, #ff6f2e); }
    .prof-empty { text-align: center; color: var(--muted); font-size: 0.84rem; font-weight: 600; padding: 18px 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--apple-hairline, rgba(127,127,127,0.12)); border-radius: 18px; }

    .prof-ach-band {
      display: flex; gap: 12px; overflow-x: auto;
      padding: 4px 2px 8px; scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    .prof-ach-band::-webkit-scrollbar { display: none; }
    .prof-ach {
      position: relative; flex: 0 0 auto;
      width: 52px; height: 52px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
      background: linear-gradient(150deg, rgba(var(--orange-rgb), 0.22), rgba(var(--orange-rgb), 0.06));
      border: 1px solid rgba(var(--orange-rgb), 0.28);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 4px 12px rgba(var(--orange-rgb), 0.14);
    }
    .prof-ach i { font-style: normal; }
    .prof-ach.locked {
      filter: grayscale(1); opacity: 0.4;
      background: rgba(120,120,128,0.14);
      border-color: var(--apple-hairline, rgba(127,127,127,0.2));
      box-shadow: none;
    }
    .prof-ach.locked b {
      position: absolute; bottom: -2px; inset-inline-end: -2px;
      width: 20px; height: 20px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      background: rgba(120,120,128,0.75); color: #fff;
      font-size: 0.55rem; box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    }
    .prof-ach.locked b svg, .prof-ach.locked b i, .prof-ach.locked b span { font-size: 0.55rem; }
    .prof-ach:active { transform: scale(0.9); }
    .prof-ach:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 6px 16px rgba(var(--orange-rgb), 0.25); }
    .prof-ach:focus-visible { outline: 2px solid var(--orange, #ff6f2e); outline-offset: 2px; }

    .prof-group {
      border-radius: 20px;
      background: rgba(255,255,255,0.06);
      border: 1px solid var(--apple-hairline, rgba(127,127,127,0.16));
      box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 6px 18px rgba(0,0,0,0.045);
    }
    html:not(.dark) .prof-group { background: rgba(0,0,0,0.04); }
    .prof-group-row {
      min-height: 56px; padding: 12px 16px; gap: 12px;
      border-bottom: 1px solid var(--apple-hairline, rgba(127,127,127,0.16));
      transition: background 0.15s ease;
    }
    .prof-group-row:hover { background: rgba(255,255,255,0.06); }
    html:not(.dark) .prof-group-row:hover { background: rgba(0,0,0,0.05); }
    .prof-group-row:focus-visible { outline: 2px solid var(--orange, #ff6f2e); outline-offset: -2px; border-radius: 8px; }
    .prof-group-row:last-child { border-bottom: none; }
    .prof-group-ico {
      width: 34px; height: 34px; border-radius: 10px; font-size: 1rem;
      background: linear-gradient(150deg, rgba(var(--orange-rgb), 0.18), rgba(var(--orange-rgb), 0.06));
      box-shadow: inset 0 0 0 1px rgba(var(--orange-rgb), 0.10);
    }
    .prof-group-name { font-size: 0.92rem; }
    .prof-group-count { font-size: 0.84rem; font-weight: 800; color: var(--orange, #ff6f2e); }
    .prof-group-arrow { font-size: 1.05rem; opacity: 0.5; }
    html:not(.dark) .prof-group-arrow { color: #8e8e93; }

    .prof-season-chip {
      font-size: 0.72rem; font-weight: 800; padding: 5px 12px; border-radius: 999px;
      border: 1px solid; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0;
    }
    .prof-season-row, .prof-notif-row { cursor: default; }

    .prof-switch {
      width: 51px; height: 31px; border-radius: 999px; background: rgba(120,120,128,0.32);
      border: none; padding: 0; position: relative; flex-shrink: 0; cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: background 0.25s ease;
      display: inline-block;
    }
    .prof-switch i {
      position: absolute; top: 2px; inset-inline-start: 2px;
      width: 27px; height: 27px; border-radius: 50%;
      background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.3);
      transition: inset-inline-start 0.25s var(--apple-spring), transform 0.25s var(--apple-spring);
    }
    .prof-switch.on { background: var(--apple-green, #34c759); }
    .prof-switch.on i { inset-inline-start: calc(100% - 29px); }
    .prof-switch:focus-visible { outline: 2px solid var(--apple-green, #34c759); outline-offset: 2px; }

    @media (max-width: 370px) {
      .prof-stats-row .prof-stat-num { font-size: 1.02rem; }
      .prof-stats-row .prof-stat { padding-inline: 3px; }
      .prof-avatar-ring { width: 106px; height: 106px; }
    }

    /* Player level-up modal */
    .lvl-modal-overlay {
      position: fixed; inset: 0; z-index: 10000;
      display: flex; align-items: center; justify-content: center;
      padding: 20px;
      background: rgba(10,8,6,0.55);
      -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    }
    .lvl-modal {
      width: min(92vw, 360px); border-radius: 24px; text-align: center;
      background: var(--bg, #1a1513); color: var(--ink, #f4ede6);
      border: 1px solid rgba(255,255,255,0.10);
      padding: 26px 20px 20px;
      box-shadow: 0 24px 60px rgba(0,0,0,0.45);
      animation: lvl-pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
      max-height: 86vh; overflow-y: auto;
    }
    html:not(.dark) .lvl-modal { background: #fff7f2; color: #221a14; border-color: rgba(0,0,0,0.06); }
    @keyframes lvl-pop { from { transform: scale(0.86); opacity: 0; } to { transform: scale(1); opacity: 1; } }
    .lvl-modal-emoji { font-size: 2.6rem; line-height: 1; }
    .lvl-modal-title { margin: 10px 0 2px; font-size: 1.4rem; font-weight: 900; }
    .lvl-modal-level { font-size: 3.2rem; font-weight: 900; color: var(--orange, #ff6f2e); line-height: 1.1; margin: 6px 0 4px; }
    .lvl-modal-level span { display: block; font-size: 0.72rem; font-weight: 700; color: var(--muted, #999); }
    .lvl-modal-bar { height: 10px; border-radius: 999px; background: rgba(127,127,127,0.14); overflow: hidden; margin: 14px 0; }
    .lvl-modal-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--orange, #ff8a3d), #ff6f2e); }
    .lvl-modal-reward { font-size: 0.9rem; font-weight: 800; margin: 8px 0 4px; }
    .lvl-milestone {
      display: inline-flex; align-items: center; gap: 6px;
      margin: 4px; padding: 7px 12px; border-radius: 999px;
      border: 1px solid rgba(var(--orange-rgb), 0.28);
      background: rgba(var(--orange-rgb), 0.10);
      font-size: 0.8rem; font-weight: 800; color: var(--ink);
    }
    .lvl-modal-intro {
      margin-top: 14px; padding: 12px 14px; border-radius: 14px;
      background: rgba(127,127,127,0.08);
      border: 1px solid rgba(127,127,127,0.14);
      font-size: 0.78rem; line-height: 1.6; color: var(--muted);
      text-align: start;
    }
    .lvl-modal-close { width: 100%; margin-top: 16px; }

/* ============================================================
   Score counters - app-bar wallet (coin + medal)
   Replaces the old .bbx-wallet chips: tap the pill for info,
   tap + to open the rewarded-ad flow
   (coin -> +20 diamonds, medal -> +25 points).
   ============================================================ */
.sc-hud {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
}

.sc-counter {
  --sc-h: 34px;
  --sc-icon: 46px;
  --sc-plus: 30px;
  position: relative;
  flex: 0 0 auto;
  height: var(--sc-h);
  border-radius: 999px;
  background: #f2f2f7;
  border: 1px solid rgba(120, 120, 128, 0.16);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-inline: calc(var(--sc-icon) + 14px) 9px;
}
html.dark .sc-counter {
  background: #0f0f12;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  color: #fff;
}

.sc-icon {
  position: absolute;
  inset-inline-start: -2px;
  top: 50%;
  width: var(--sc-icon);
  height: var(--sc-icon);
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  pointer-events: none;
  z-index: 2;
  will-change: transform;
}
.sc-coin .sc-icon { background-image: url('../icons/sllina_s_coin.svg'); }
.sc-medal .sc-icon { background-image: url('../icons/sllina_medal_s.svg'); }

  .sc-plus {
  display: none;
}
.sc-plus::after {
  content: "";
  position: absolute;
  inset-block: -11px;
  inset-inline: -8px -14px;
  border-radius: 999px;
}
@media (hover: hover) {
  .sc-plus:hover {
    transform: scale(1.08);
    color: var(--green);
  }
}
.sc-plus:focus-visible { outline: 3px solid rgba(var(--green-rgb, 34, 197, 94), 0.5); outline-offset: 2px; }

.sc-value {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  color: inherit;
  min-width: 2ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
  will-change: transform;
}

.sc-info {
  appearance: none;
  border: 0;
  background: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-radius: 999px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sc-info::after {
  content: "";
  position: absolute;
  inset: 0;
  inset-inline-start: calc(-1 * 8px);
  inset-block: calc(-1 * (44px - var(--sc-h)) / 2);
  border-radius: 999px;
}
.sc-info:focus-visible {
  outline: 3px solid rgba(var(--orange-rgb), 0.5);
  outline-offset: 2px;
}
.sc-value.is-pop { animation: sc-value-pop 200ms ease; }
.sc-plus.is-pressed { animation: sc-plus-press 200ms var(--apple-spring, cubic-bezier(0.34, 1.56, 0.64, 1)); }
.sc-icon.is-bump { animation: sc-icon-bump 220ms ease; }
@keyframes sc-plus-press {
  0% { transform: scale(1); }
  30% { transform: scale(0.85); }
  65% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
@keyframes sc-icon-bump {
  0% { transform: translateY(-50%); }
  40% { transform: translateY(calc(-50% - 6px)); }
  100% { transform: translateY(-50%); }
}
@keyframes sc-value-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

@media (max-width: 480px) {
  .sc-hud { gap: 8px; }
  .sc-counter {
    --sc-h: 26px;
    --sc-icon: 38px;
    --sc-plus: 26px;
    padding-inline: calc(var(--sc-icon) + 8px) 5px;
  }
  .sc-icon { inset-inline-start: -2px; }
  .sc-value { font-size: 0.76rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-plus, .sc-value, .sc-icon { transition: none !important; }
  .sc-plus.is-pressed, .sc-icon.is-bump, .sc-value.is-pop { animation: none !important; }
}

/* ═══ Route transition layer (smooth page swaps) ═══ */
#root { position: relative; }
#root > * { animation-duration: 0.35s; animation-fill-mode: both; }
.route-fade-in { animation-name: routeFadeIn; }
.route-fade-out { animation-name: routeFadeOut; }
@keyframes routeFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes routeFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}

/* No bottom dock on game routes & chat room (nav removed there) */
html.in-game body,
html.no-bottom-dock body {
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* ═══ Word Chain (سلسلة الكلمات) ═══ */
.wc-page { max-width: 560px; margin: 0 auto; padding-bottom: 28px; }

/* big countdown */
.wc-cd {
  display: flex; align-items: center; justify-content: center;
  width: 108px; height: 108px; margin: 18px auto 6px;
  border-radius: 50%;
  font-size: 3rem; font-weight: 900;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(var(--orange-rgb), 0.18), rgba(var(--orange-rgb), 0.05));
  border: 1px solid rgba(var(--orange-rgb), 0.35);
  box-shadow: 0 10px 30px rgba(var(--orange-rgb), 0.18);
  animation: wcCdPop .5s cubic-bezier(.2, .9, .3, 1.4);
}
@keyframes wcCdPop { from { transform: scale(1.25); opacity: .3; } to { transform: scale(1); opacity: 1; } }

/* current word display */
.wc-curword {
  text-align: center; margin: 6px 0 10px;
  font-size: clamp(1.5rem, 7vw, 2.1rem); font-weight: 800; line-height: 1.25;
  color: var(--ink);
  word-break: break-word;
  animation: wcWordPop .32s ease-out;
}
@keyframes wcWordPop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* players strip */
.wc-players-strip {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 2px 10px; margin: 8px 0 2px;
  scrollbar-width: none;
}
.wc-players-strip::-webkit-scrollbar { display: none; }
.wc-player {
  flex: 0 0 auto; min-width: 74px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 6px; border-radius: var(--radius, 14px);
  background: var(--surface); border: 1px solid var(--line);
  text-align: center; transition: border-color .2s, opacity .2s;
}
.wc-player.on { border-color: rgba(var(--orange-rgb), 0.6); box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.16); }
.wc-player.dead { opacity: .45; }
.wc-player-av {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; overflow: hidden;
  background: rgba(var(--orange-rgb), 0.12);
}
.wc-player-av img { width: 100%; height: 100%; object-fit: cover; }
.wc-player-nm { font-size: .7rem; font-weight: 600; color: var(--ink); max-width: 74px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-player-hp { font-size: .62rem; letter-spacing: 1px; min-height: 13px; }
.wc-player-sc { font-size: .68rem; color: var(--muted); font-weight: 700; }

/* turn timer + shrink bar */
.wc-turn-timer { margin: 2px 0 6px; }
.wc-turn-label {
  font-size: .8rem; font-weight: 600; color: var(--muted);
  text-align: center; margin-bottom: 6px; min-height: 18px;
}
.wc-tbar {
  position: relative; display: block;
  height: 6px; margin: 0 auto; max-width: 320px;
  border-radius: 999px; overflow: hidden; background: var(--line);
}
.wc-tbar i {
  position: absolute; inset-inline-start: 0; top: 0; bottom: 0;
  display: block; background: var(--orange, #ff6f2e);
  animation-timing-function: linear; animation-iteration-count: 1;
  animation-fill-mode: both; animation-name: wcShrink;
}
@keyframes wcShrink { from { width: 100%; } to { width: 0%; } }
.wc-sec {
  text-align: center; font-size: .9rem; font-weight: 800;
  color: var(--orange, #ff6f2e); margin-top: 4px; font-variant-numeric: tabular-nums;
}
.wc-elim-pulse {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 14px; margin-bottom: 8px;
  font-size: .9rem; font-weight: 800; color: var(--ink);
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius, 12px);
  animation: wcElim 1.3s ease-in-out infinite;
}
.wc-elim-pulse b { color: #dc2626; }
@keyframes wcElim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .65; transform: scale(.99); }
}

/* header bars (pending / challenge / pick) */
.wc-bar-head {
  display: flex; align-items: center; gap: 10px;
  font-size: .82rem; font-weight: 700; color: var(--ink);
  margin-bottom: 8px;
}
.wc-bar-head .wc-tbar { flex: 1; height: 5px; max-width: none; margin: 0; }
.wc-pend-word {
  text-align: center; font-size: 1.15rem; font-weight: 800;
  padding: 12px; border-radius: var(--radius, 14px);
  background: rgba(var(--orange-rgb), 0.07);
  border: 1px dashed rgba(var(--orange-rgb), 0.4);
  margin-bottom: 10px; word-break: break-word;
}

/* challenge votes */
.wc-votecounts { display: flex; justify-content: center; gap: 18px; margin-bottom: 10px; font-weight: 800; font-size: .95rem; }
.wc-vote-yes { color: #16a34a; }
.wc-vote-no { color: #dc2626; }

/* input card */
.wc-inputcard { padding: 14px; }
/* pick-start hint: how many words can still link to the word being typed */
.wc-hint {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; padding: 7px 11px;
  font-size: .78rem; font-weight: 600; line-height: 1.45;
  color: var(--muted);
  background: rgba(var(--orange-rgb), .06);
  border: 1px solid var(--line); border-radius: 12px;
  text-align: start;
}
.wc-hint-meter { letter-spacing: 2px; font-size: .72rem; color: var(--muted); }
.wc-hint-good { color: #15803d; border-color: rgba(22, 163, 74, .45); background: rgba(22, 163, 74, .08); }
.wc-hint-good .wc-hint-meter { color: #16a34a; }
.wc-hint-ok { color: #a16207; border-color: rgba(234, 179, 8, .45); background: rgba(234, 179, 8, .08); }
.wc-hint-ok .wc-hint-meter { color: #ca8a04; }
.wc-hint-weak { color: #b91c1c; border-color: rgba(220, 38, 38, .45); background: rgba(220, 38, 38, .08); }
.wc-hint-weak .wc-hint-meter { color: #dc2626; }
.wc-hint-free { color: var(--muted); border-style: dashed; }
html.dark .wc-hint-good { color: #4ade80; }
html.dark .wc-hint-ok { color: #facc15; }
html.dark .wc-hint-weak { color: #f87171; }
html.dark .wc-hint { background: rgba(var(--orange-rgb), .10); }
.wc-suggest { align-items: center; margin-top: 10px; }
.wc-suggest-lbl { font-size: .74rem; font-weight: 600; color: var(--muted); }
.wc-suggest .wc-chip { font-weight: 800; color: var(--ink); }
.wc-input {
  width: 100%; box-sizing: border-box;
  min-height: 52px; padding: 12px 14px;
  font-size: 1.08rem; font-weight: 600; text-align: center;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius, 14px);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.wc-input:focus {
  border-color: rgba(var(--orange-rgb), 0.65);
  box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.22);
}
.wc-btnrow { display: flex; gap: 10px; margin-top: 12px; }
.wc-btnrow .btn-primary, .wc-btnrow .btn-ghost { flex: 1; min-height: 46px; font-weight: 700; }

/* speech input (mic button beside the word input) */
.wc-inputrow { display: flex; gap: 8px; align-items: stretch; }
.wc-inputrow .wc-input { flex: 1 1 auto; }
.wc-mic {
  appearance: none; border: 0; cursor: pointer; flex: 0 0 auto;
  min-width: 52px; min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; line-height: 1;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius, 14px);
  transition: border-color .2s, box-shadow .2s, transform .1s, background .2s;
}
.wc-mic:hover { border-color: rgba(var(--orange-rgb), 0.6); }
.wc-mic:active { transform: scale(0.95); }
.wc-mic:focus-visible { outline: 3px solid rgba(var(--orange-rgb), 0.4); outline-offset: 2px; }
.wc-mic.rec {
  background: rgba(var(--red-rgb, 239, 68, 68), 0.12);
  border-color: rgba(var(--red-rgb, 239, 68, 68), 0.7);
  animation: wc-micpulse 1.1s ease-in-out infinite;
}
@keyframes wc-micpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--red-rgb, 239, 68, 68), 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(var(--red-rgb, 239, 68, 68), 0); }
}
.wc-mic:disabled { opacity: .45; cursor: not-allowed; }
.wc-mic.blocked { background: rgba(var(--red-rgb, 239, 68, 68), 0.1); border-color: rgba(var(--red-rgb, 239, 68, 68), 0.5); }

/* config */
.wc-chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.wc-chip {
  appearance: none; cursor: pointer;
  min-height: 44px; padding: 8px 14px;
  font-size: .86rem; font-weight: 700; font-family: inherit;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 999px;
  transition: border-color .2s, background .2s, transform .1s;
}
.wc-chip:hover { border-color: rgba(var(--orange-rgb), 0.5); }
.wc-chip:active { transform: scale(.96); }
.wc-chip.on { border-color: rgba(var(--orange-rgb), 0.75); background: rgba(var(--orange-rgb), 0.10); box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.14); }
html.dark .wc-chip { background: #251f1a; }
.wc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; }
.wc-row + .wc-row { border-top: 1px solid var(--line); }
.wc-row-l { font-size: .9rem; font-weight: 700; color: var(--ink); }
.wc-stepper { display: flex; gap: 6px; }
.wc-stepper .btn-ghost { min-height: 40px; padding: 4px 12px; font-weight: 800; border-radius: 999px; }
.wc-stepper .btn-ghost.on { border-color: rgba(var(--orange-rgb), 0.75); background: rgba(var(--orange-rgb), 0.12); color: var(--ink); }
.wc-stepper .btn-ghost:disabled { opacity: .4; }

/* ⬆️ أعلى / ⬇️ أقل arrow stepper (Higher/Lower style) */
.wc-arrowstep { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.wc-arrowstep .wc-arrow { min-height: 44px; padding: 4px 14px; font-weight: 800; border-radius: 14px; }
.wc-arrowstep .wc-arrow:disabled { opacity: .4; }
.wc-arrowstep .wc-stepval { display: flex; align-items: baseline; justify-content: center; gap: 3px; min-width: 56px; padding: 0 12px; border-radius: 14px; border: 1px solid rgba(var(--orange-rgb), 0.45); background: rgba(var(--orange-rgb), 0.12); color: var(--ink); }
.wc-arrowstep .wc-stepval b { font-size: 1.15rem; font-weight: 900; line-height: 44px; }
.wc-arrowstep .wc-stepval i { font-style: normal; font-size: .72rem; color: var(--muted); }

/* Apple-style settings: grouped optgroups + segmented control */
.wc-optgroup { margin: 8px 0 14px; }
.wc-optgroup + .wc-optgroup { padding-top: 14px; border-top: 1px solid var(--line); }
.wc-optgroup-t { margin: 0 0 10px; font-size: .78rem; font-weight: 800; letter-spacing: .05em; color: var(--muted); }
.wc-optgroup .theme-row { margin-bottom: 4px; padding: 6px 0; }
.wc-optgroup .theme-row + .theme-row { border-top: 1px solid var(--line); }
.wc-chiprow.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.wc-chiprow.modes .wc-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.wc-modep { margin: 10px 0 2px; font-size: .8rem; line-height: 1.5; color: var(--muted); }
.wc-seg { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: rgba(120, 120, 128, 0.12); }
.wc-seg button {
  appearance: none; border: 0; cursor: pointer; flex: 1 1 0; min-width: 0; min-height: 40px;
  padding: 8px 10px; border-radius: 9px; font-family: inherit; font-size: .85rem; font-weight: 800;
  color: var(--muted); background: transparent; transition: background .18s, color .18s, box-shadow .18s;
}
.wc-seg button:hover { color: var(--ink); }
.wc-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); }
html.dark .wc-seg button.on { background: #2c2726; }
.wc-seg button:focus-visible { outline: 3px solid rgba(var(--orange-rgb), 0.45); outline-offset: 1px; }
.wc-seg button:disabled { opacity: .4; }

/* how-to + chain */
.wc-howto { border: 1px solid var(--line); border-radius: var(--radius, 14px); background: var(--surface); margin-top: 12px; overflow: hidden; }
.wc-howto summary { cursor: pointer; padding: 12px 14px; font-weight: 800; font-size: .86rem; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 8px; }
.wc-howto summary::-webkit-details-marker { display: none; }
.wc-howto > div { padding: 2px 14px 14px; font-size: .84rem; color: var(--muted); line-height: 1.6; }
.wc-chain { display: flex; flex-wrap: wrap; gap: 4px 2px; align-items: center; }
.wc-link { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 10px; border-radius: 12px; background: rgba(var(--orange-rgb), 0.08); border: 1px solid rgba(var(--orange-rgb), 0.22); }
.wc-link b { font-size: .86rem; color: var(--ink); }
.wc-link i { font-style: normal; font-size: .62rem; color: var(--muted); }
.wc-link-arr { color: rgba(var(--orange-rgb), 0.7); font-weight: 900; margin: 0 2px; }
[dir="rtl"] .wc-link-arr { transform: scaleX(-1); display: inline-block; }

/* fail flash bar */
.wc-fail-bar {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 12px; margin-bottom: 8px;
  font-size: .82rem; font-weight: 700; color: var(--ink);
  background: rgba(220, 38, 38, 0.10);
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: var(--radius, 12px);
  animation: wcWordPop .3s ease-out;
}

/* results */
.wc-scorelist { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.wc-score-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius, 14px);
  background: var(--surface); border: 1px solid var(--line);
  font-weight: 700; color: var(--ink);
}
.wc-score-row.win { border-color: rgba(var(--orange-rgb), 0.6); background: rgba(var(--orange-rgb), 0.10); box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.12); }
.wc-score-row b { color: var(--orange, #ff6f2e); }

/* transient toast overlay */
.wc-fx {
  position: fixed; inset-inline-start: 50%; top: 20vh;
  transform: translateX(-50%) translateX(var(--fx-shift, 0));
  transform: translate(calc(-50% + var(--fx-shift, 0px)), 0);
  z-index: 1200;
  min-width: min(320px, 84vw); max-width: 92vw;
  padding: 15px 20px; text-align: center;
  background: var(--surface); color: var(--ink);
  border: 1px solid rgba(var(--orange-rgb), 0.35);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  animation: wcFxIn .18s ease-out;
}
.wc-fx-ico { font-size: 1.9rem; margin-bottom: 4px; }
.wc-fx-tx { font-size: .95rem; font-weight: 800; line-height: 1.3; }
.wc-fx-tx small { display: block; margin-top: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); }
.wc-fx-duplicate { border-color: rgba(220, 38, 38, 0.45); }
.wc-fx-invalid { border-color: rgba(234, 88, 12, 0.5); }
.wc-fx-info { border-color: rgba(var(--orange-rgb), 0.4); }
@keyframes wcFxIn { from { opacity: 0; transform: translate(calc(-50% + var(--fx-shift, 0px)), -8px) scale(.94); } to { opacity: 1; transform: translate(calc(-50% + var(--fx-shift, 0px)), 0) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .wc-tbar i, .wc-cd, .wc-curword, .wc-fail-bar, .wc-fx, .wc-elim-pulse { animation: none !important; }
}

    