
    /* ── TOKENS ── */
    :root {
      --bg:       #1a1a1a;
      --fg:       #fafafa;
      --card:     #242424;
      --card2:    #2e2e2e;
      --primary:  #f5c518;
      --primary-fg: #1a1a1a;
      --secondary:#333333;
      --muted-fg: #b3b3b3;
      --border:   #383838;
      --input-bg: #252525;
      --auth-bg:  #1f1f1f;
      --auth-in:  #292929;
      --destructive: #ef4444;
      --radius:   0.5rem;
    }

    /* ── RESET ── */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { color-scheme: dark; scroll-behavior: smooth; }
    body {
      font-family: "DM Sans", sans-serif;
      background: var(--bg);
      color: var(--fg);
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
    }
    a { color: inherit; text-decoration: none; }
    img { max-width: 100%; display: block; }
    button, input, select { font-family: inherit; }
    button { cursor: pointer; }

    /* ── LAYOUT ── */
    .page { min-height: 100dvh; background: var(--bg); padding-bottom: 5rem; }
    .wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
    @media(min-width:640px){ .wrap { padding: 0 2rem; } }

    /* ── HEADER ── */
    .hdr {
      background: rgba(36,36,36,.85);
      backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--border);
      position: sticky; top: 0; z-index: 40;
    }
    .hdr-inner {
      display: flex; align-items: center; justify-content: space-between;
      height: 3.75rem;
    }
    .hdr-logo { display: flex; align-items: center; gap: .5rem; }
    .hdr-logo img { height: 1.875rem; width: auto; }
    .hdr-logo-text { font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; color: var(--fg); }
    .hdr-logo-text em { font-style: normal; color: var(--muted-fg); font-weight: 500; }
    .hdr-logo-fallback { display: none; align-items: center; gap: .5rem; }
    .hdr-right { display: flex; align-items: center; gap: .75rem; }
    .hdr-community {
      display: flex; align-items: center; gap: .4rem;
      padding: .4rem .8rem; border-radius: var(--radius);
      color: var(--muted-fg); font-size: .875rem; font-weight: 500;
      transition: color .15s, background .15s;
    }
    .hdr-community:hover { color: var(--fg); background: rgba(255,255,255,.06); }
    .hdr-community svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
    .hdr-community-label { display: none; }
    @media(min-width:500px){ .hdr-community-label { display: inline; } }

    /* ── AVATAR / DROPDOWN ── */
    .avatar {
      width: 2rem; height: 2rem; border-radius: 50%;
      background: var(--primary); color: var(--primary-fg);
      display: flex; align-items: center; justify-content: center;
      font-weight: 700; font-size: .875rem; flex-shrink: 0; overflow: hidden;
    }
    .avatar-btn { background: none; border: none; padding: 0; border-radius: 50%; }
    .dd { position: relative; }
    .dd:hover .dd-menu.hidden { display: block; }
    .dd-menu {
      position: absolute; right: 0; top: calc(100% + .5rem);
      background: var(--card); border: 1px solid var(--border);
      border-radius: .75rem; padding: .4rem; min-width: 13rem;
      box-shadow: 0 8px 32px rgba(0,0,0,.6); z-index: 200;
    }
    .dd-label { padding: .5rem .7rem; }
    .dd-label-name { font-size: .875rem; font-weight: 600; }
    .dd-label-email { font-size: .75rem; color: var(--muted-fg); }
    .dd-sep { height: 1px; background: var(--border); margin: .3rem 0; }
    .dd-item {
      display: flex; align-items: center; gap: .5rem;
      padding: .45rem .7rem; border-radius: .4rem;
      font-size: .875rem; color: var(--fg);
      background: none; border: none; width: 100%; text-align: left;
      cursor: pointer; transition: background .12s;
    }
    .dd-item:hover { background: var(--secondary); }
    .dd-item svg { width: .9rem; height: .9rem; flex-shrink: 0; }

    /* ── BOTTOM NAV ── */
    .bnav {
      position: fixed; bottom: 0; left: 0; right: 0;
      background: var(--card); border-top: 1px solid var(--border); z-index: 50;
    }
    .bnav-inner {
      max-width: 1140px; margin: 0 auto; padding: 0 .5rem;
      display: flex; align-items: center; justify-content: space-around;
      height: 3.75rem;
    }
    .nav-btn {
      display: flex; flex-direction: column; align-items: center; gap: .2rem;
      padding: .4rem .8rem; min-width: 4rem;
      color: var(--muted-fg); background: none; border: none;
      font-family: inherit; cursor: pointer;
      transition: color .15s; text-decoration: none;
    }
    .nav-btn.active { color: var(--primary); }
    .nav-btn:hover:not(.active) { color: var(--fg); }
    .nav-btn svg { width: 1.375rem; height: 1.375rem; }
    .nav-btn span { font-size: .7rem; font-weight: 500; }

    /* ── BUTTONS ── */
    .btn {
      display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
      padding: .5rem 1rem; border-radius: var(--radius);
      font-weight: 600; font-size: .875rem; border: 1px solid transparent;
      transition: opacity .15s, background .15s, transform .1s;
      cursor: pointer; font-family: inherit; line-height: 1;
    }
    .btn:active { transform: scale(.98); }
    .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
    .btn-primary  { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
    .btn-primary:hover:not(:disabled)  { opacity: .9; }
    .btn-outline  { background: transparent; color: var(--fg); border-color: var(--border); }
    .btn-outline:hover:not(:disabled)  { background: var(--secondary); }
    .btn-ghost    { background: transparent; color: var(--fg); border-color: transparent; }
    .btn-ghost:hover:not(:disabled)    { background: rgba(255,255,255,.07); }
    .btn-danger   { background: var(--destructive); color: #fff; border-color: var(--destructive); }
    .btn-danger:hover:not(:disabled)   { opacity: .88; }
    .btn-full { width: 100%; }
    .btn-lg  { padding: .65rem 1.5rem; font-size: 1rem; border-radius: .75rem; }
    .btn-sm  { padding: .3rem .7rem; font-size: .8rem; }
    .btn-ico { padding: .45rem; border-radius: 50%; }

    /* ── FORM CONTROLS ── */
    .field { display: flex; flex-direction: column; gap: .45rem; }
    .lbl { font-size: .875rem; font-weight: 500; display: flex; align-items: center; gap: .4rem; }
    .inp {
      width: 100%; padding: .55rem .8rem;
      background: var(--input-bg); border: 1px solid var(--border);
      border-radius: var(--radius); color: var(--fg); font-size: .875rem;
      outline: none; transition: border-color .15s, box-shadow .15s;
    }
    .inp:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(245,197,24,.18); }
    .inp:disabled { background: var(--card2); opacity: .65; cursor: not-allowed; }
    .sel {
      width: 100%; padding: .55rem .8rem;
      background: var(--input-bg); border: 1px solid var(--border);
      border-radius: var(--radius); color: var(--fg); font-size: .875rem;
      outline: none; cursor: pointer;
    }
    .sel:disabled { background: var(--card2); opacity: .65; }
    .chk-row { display: flex; align-items: center; gap: .5rem; }
    .chk-row input[type=checkbox] { width: 1rem; height: 1rem; accent-color: var(--primary); }
    .chk-row label { font-size: .875rem; font-weight: 500; cursor: pointer; }
    .stack > * + * { margin-top: 1rem; }
    .stack-sm > * + * { margin-top: .6rem; }

    /* ── CARD ── */
    .card { background: var(--card); border: 1px solid var(--border); border-radius: .75rem; overflow: hidden; }
    .card-pad { padding: 1.5rem; }
    .card-hd { padding: 1.25rem 1.5rem 0; }
    .card-title { font-size: 1rem; font-weight: 600; }
    .card-sub { font-size: .85rem; color: var(--muted-fg); margin-top: .2rem; }
    .card-hd-row { display: flex; align-items: flex-start; justify-content: space-between; }

    /* ── TOAST ── */
    #toasts {
      position: fixed; top: .9rem; left: 50%; transform: translateX(-50%);
      z-index: 9999; display: flex; flex-direction: column; gap: .4rem;
      width: 90%; max-width: 22rem; pointer-events: none;
    }
    .toast {
      padding: .7rem 1rem; border-radius: .65rem;
      font-size: .875rem; font-weight: 500;
      box-shadow: 0 4px 20px rgba(0,0,0,.5);
      pointer-events: auto; animation: tIn .25s ease;
    }
    @keyframes tIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }
    .toast-ok  { background: #14532d; color: #bbf7d0; border: 1px solid #16a34a; }
    .toast-err { background: #7f1d1d; color: #fecaca; border: 1px solid #dc2626; }

    /* ── AUTH PAGE ── */
    .auth-wrap {
      min-height: calc(100dvh - 3.75rem);
      display: flex; align-items: center; justify-content: center;
      padding: 1.5rem 1rem;
    }
    .auth-card {
      width: 100%; max-width: 26rem;
      background: var(--auth-bg); border: 1px solid var(--border);
      border-radius: 1rem; padding: 2rem 1.75rem;
      box-shadow: 0 8px 40px rgba(0,0,0,.5);
    }
    .auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; letter-spacing: -.02em; }
    .auth-sub   { font-size: .875rem; color: var(--muted-fg); text-align: center; margin-top: .35rem; }
    .auth-divider { position: relative; margin: 1.25rem 0; }
    .auth-divider::before { content:''; position:absolute; top:50%; left:0; right:0; height:1px; background:var(--border); }
    .auth-divider-text {
      position: relative; display: flex; justify-content: center;
      font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
    }
    .auth-divider-text span { background: var(--auth-bg); padding: 0 .6rem; color: var(--muted-fg); }
    .oauth-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
    .auth-foot { text-align: center; font-size: .875rem; color: var(--muted-fg); margin-top: 1.25rem; }
    .auth-link { color: var(--primary); font-weight: 500; }
    .auth-link:hover { text-decoration: underline; }

    /* ── HOME PAGE ── */
    .home-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2.5rem 0 2rem; }
    .home-logo { width: 5.5rem; height: 5.5rem; margin-bottom: 1.25rem; filter: drop-shadow(0 6px 18px rgba(0,0,0,.45)); }
    .home-title { font-size: 2rem; font-weight: 800; letter-spacing: -.025em; }
    .home-sub { color: var(--muted-fg); margin-top: .35rem; }
    .period-lbl { font-size: .875rem; font-weight: 500; margin-bottom: .5rem; display: block; }
    .stats-2col { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin: 1.5rem 0; }
    @media(min-width:600px){ .stats-2col { grid-template-columns: 1fr 1fr; } }
    .stat-card { padding: 1.25rem 1.5rem; }
    .stat-card-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
    .stat-label { font-size: .8rem; font-weight: 500; color: var(--muted-fg); }
    .stat-icon svg { width: 1.1rem; height: 1.1rem; color: var(--primary); }
    .stat-val { font-size: 2rem; font-weight: 800; line-height: 1; }
    .stat-hint { font-size: .75rem; color: var(--muted-fg); margin-top: .35rem; }
    .chart-card-hd { display: flex; align-items: center; justify-content: space-between; }
    .chart-avg { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted-fg); }
    .chart-box { height: 16rem; position: relative; margin-top: .75rem; }
    .chart-empty { height: 16rem; display: flex; align-items: center; justify-content: center; color: var(--muted-fg); font-size: .875rem; text-align: center; padding: 1rem; }

    /* ── MOVES PAGE ── */
    .moves-hero { padding: 2.5rem 0 2rem; }
    .moves-title { font-size: 2.5rem; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
    @media(min-width:640px){ .moves-title { font-size: 3rem; } }
    .moves-sub { font-size: 1rem; color: var(--muted-fg); margin-top: .6rem; max-width: 60ch; line-height: 1.65; }
    .pl-section { margin-bottom: 4rem; }
    .pl-hd {
      display: flex; align-items: baseline; justify-content: space-between;
      border-bottom: 1px solid rgba(56,56,56,.5); padding-bottom: .85rem; margin-bottom: 1.75rem;
    }
    .pl-name { font-size: 1.625rem; font-weight: 700; letter-spacing: -.02em; }
    .pl-badge {
      font-size: .8rem; font-weight: 500; color: var(--muted-fg);
      background: rgba(51,51,51,.6); padding: .3rem .7rem; border-radius: .4rem;
      display: none;
    }
    @media(min-width:500px){ .pl-badge { display: inline-block; } }
    .vid-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); }
    @media(min-width:768px){ .vid-grid { grid-template-columns: repeat(3, 1fr); } }
    @media(min-width:1024px){ .vid-grid { grid-template-columns: repeat(4, 1fr); } }

    /* ── VIDEO CARD ── */
    .vid-card { cursor: pointer; display: flex; flex-direction: column; gap: .6rem; transition: transform .25s; }
    .vid-card:hover { transform: translateY(-3px); }
    .vid-thumb {
      position: relative; aspect-ratio: 16/9; border-radius: .625rem;
      overflow: hidden; background: var(--card2); border: 1px solid rgba(56,56,56,.4);
    }
    .vid-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
    .vid-card:hover .vid-thumb img { transform: scale(1.07); }
    .vid-overlay {
      position: absolute; inset: 0; background: rgba(0,0,0,.15);
      display: flex; align-items: center; justify-content: center;
      transition: background .25s;
    }
    .vid-card:hover .vid-overlay { background: rgba(0,0,0,.42); }
    .vid-play {
      width: 3.25rem; height: 3.25rem; border-radius: 50%;
      background: rgba(245,197,24,.92); color: var(--primary-fg);
      display: flex; align-items: center; justify-content: center;
      opacity: 0; transform: scale(.7);
      transition: opacity .25s, transform .25s;
      box-shadow: 0 4px 20px rgba(0,0,0,.5);
    }
    .vid-card:hover .vid-play { opacity: 1; transform: scale(1); }
    .vid-dur {
      position: absolute; bottom: .4rem; right: .4rem;
      background: rgba(0,0,0,.82); color: #fff;
      font-size: .7rem; font-weight: 600; padding: .2rem .45rem; border-radius: .3rem;
      backdrop-filter: blur(4px);
    }
    .vid-title {
      font-size: .875rem; font-weight: 500; line-height: 1.4;
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
      transition: color .2s;
    }
    .vid-card:hover .vid-title { color: var(--primary); }

    /* ── SKELETON ── */
    .skel { background: var(--card2); border-radius: var(--radius); animation: pulse 1.4s ease-in-out infinite; }
    @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.45} }
    .skel-thumb { aspect-ratio: 16/9; border-radius: .625rem; }
    .skel-line  { height: 1rem; border-radius: .25rem; }

    /* ── THEATRE ── */
    .theatre-bd {
      position: fixed; inset: 0; z-index: 100;
      background: rgba(0,0,0,.96); backdrop-filter: blur(14px);
      display: flex; align-items: center; justify-content: center;
      padding: 1rem; animation: fadeIn .25s ease;
    }
    @media(min-width:640px){ .theatre-bd { padding: 2rem; } }
    @keyframes fadeIn { from{opacity:0} to{opacity:1} }
    .theatre-box { position: relative; width: 100%; max-width: 68rem; }
    .theatre-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
    .theatre-title { font-size: 1.1rem; font-weight: 600; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: .75rem; }
    .theatre-player {
      position: relative; aspect-ratio: 16/9; background: #000;
      border-radius: .75rem; overflow: hidden;
      box-shadow: 0 20px 60px rgba(0,0,0,.8);
      animation: zoomIn .25s ease;
    }
    @keyframes zoomIn { from{transform:scale(.95)} to{transform:scale(1)} }
    .theatre-player iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
    .theatre-foot { display: flex; justify-content: flex-end; margin-top: .85rem; }

    /* ── ERROR STATE ── */
    .err-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 5rem 1rem; }
    .err-icon { width: 4.5rem; height: 4.5rem; background: rgba(239,68,68,.1); border-radius: .875rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
    .err-title { font-size: 1.375rem; font-weight: 700; margin-bottom: .6rem; }
    .err-msg   { color: var(--muted-fg); margin-bottom: 1.75rem; max-width: 26rem; }

    /* ── PROFILE PAGE ── */
    .profile-header { padding: 2.5rem 0 1.5rem; }
    .profile-h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.025em; }
    .profile-sub { color: var(--muted-fg); margin-top: .3rem; }
    .stats-3col { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-bottom: 1.75rem; }
    @media(min-width:480px){ .stats-3col { grid-template-columns: repeat(3, 1fr); } }
    .stat-sm { padding: 1.125rem 1.25rem; }
    .stat-sm-lbl { font-size: .8rem; color: var(--muted-fg); display: flex; align-items: center; gap: .35rem; margin-bottom: .5rem; }
    .stat-sm-lbl svg { width: .875rem; height: .875rem; }
    .stat-sm-val { font-size: 1.875rem; font-weight: 800; }
    .pi-grid { display: grid; gap: 1rem; }
    .pi-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
    .sep { height: 1px; background: var(--border); margin: 1.25rem 0; }
    .edit-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 1rem; }

    /* ── DASHBOARD ── */
    .dash-layout { display: flex; flex-direction: column; gap: 2rem; padding: 2rem 0; }
    @media(min-width:768px){ .dash-layout { flex-direction: row; align-items: flex-start; } }
    .dash-sidebar { width: 100%; flex-shrink: 0; }
    @media(min-width:768px){ .dash-sidebar { width: 15rem; } }
    .dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1.75rem; }
    .dash-profile-card { padding: 1.75rem 1.5rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
    .dash-av { width: 6rem; height: 6rem; font-size: 2rem; margin-bottom: 1rem; border: 3px solid var(--bg); box-shadow: 0 4px 16px rgba(0,0,0,.4); }
    .dash-name  { font-size: 1.375rem; font-weight: 700; }
    .dash-email { font-size: .8rem; color: var(--muted-fg); margin-top: .2rem; margin-bottom: 1.25rem; }
    .dash-actions { display: flex; flex-direction: column; gap: .6rem; width: 100%; }
    .dash-meta { font-size: .8rem; color: var(--muted-fg); padding: 0 .25rem; }
    .dash-meta-row { display: flex; justify-content: space-between; align-items: center; padding: .35rem 0; }
    .dash-meta-val { font-weight: 500; color: var(--fg); }
    .verified { color: #22c55e; display: flex; align-items: center; gap: .3rem; font-weight: 600; }
    .verified-dot { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
    .section-h2 { font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: .875rem; }
    .dash-tbl { width: 100%; border-collapse: collapse; font-size: .875rem; }
    .dash-tbl th { padding: .6rem 1rem; text-align: left; font-size: .8rem; font-weight: 500; color: var(--muted-fg); background: rgba(46,46,46,.5); border-bottom: 1px solid var(--border); }
    .dash-tbl td { padding: .65rem 1rem; border-bottom: 1px solid rgba(56,56,56,.4); }
    .dash-tbl tr:last-child td { border-bottom: none; }
    .tbl-wrap { border: 1px solid var(--border); border-radius: .6rem; overflow: hidden; }
    .badge { display: inline-flex; align-items: center; padding: .2rem .5rem; border-radius: .35rem; font-size: .75rem; font-weight: 500; background: var(--secondary); }
    .empty-box { display: flex; flex-direction: column; align-items: center; padding: 3rem 1rem; }
    .empty-ico { width: 3.5rem; height: 3.5rem; background: var(--card2); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: .875rem; }
    .empty-ico svg { width: 1.5rem; height: 1.5rem; color: var(--muted-fg); }
    .empty-t { font-weight: 600; }
    .empty-s { font-size: .85rem; color: var(--muted-fg); margin-top: .25rem; }

    /* ── UTILS ── */
    .hidden { display: none !important; }
    .mt1 { margin-top: .35rem; }
    .mt2 { margin-top: .75rem; }
    .mt3 { margin-top: 1.25rem; }
    .gap1 { gap: .5rem; }
    .txt-sm { font-size: .875rem; }
    .txt-xs { font-size: .8rem; }
    .txt-muted { color: var(--muted-fg); }
    .txt-center { text-align: center; }
    .flex { display: flex; }
    .items-center { align-items: center; }
    .justify-between { justify-content: space-between; }