/* Spark Agency HR — Spark Fun (v45). */
@media screen {
  /* ---------- level up ---------- */
  .fun-up {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 45%, #0f2a36cc, #071419ee);
    animation: fun-fade 0.35s ease both;
    cursor: pointer;
  }
  .fun-up.is-out {
    animation: fun-fade 0.35s ease reverse both;
  }
  .fun-up-card {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 36px 48px;
    color: #fff;
    text-align: center;
    animation: fun-pop 0.7s cubic-bezier(0.2, 1.4, 0.3, 1) both;
  }
  .fun-up-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 520px;
    height: 520px;
    margin: -330px 0 0 -260px;
    background: repeating-conic-gradient(from 0deg, #ffffff18 0 10deg, transparent 10deg 20deg);
    border-radius: 50%;
    mask: radial-gradient(circle, #000 30%, transparent 70%);
    animation: fun-spin 12s linear infinite;
    pointer-events: none;
  }
  .fun-up-badge {
    position: relative;
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(from 200deg, #c4ced3, #fff, #8fa1aa, #fff, #c4ced3);
    box-shadow: 0 0 0 8px #ffffff22, 0 20px 60px #0008;
    animation: fun-shine 2.2s ease-in-out infinite;
  }
  .fun-up.is-gold .fun-up-badge {
    background: conic-gradient(from 200deg, #e2b04a, #fff3c4, #b37c12, #ffe39a, #e2b04a);
  }
  .fun-up.is-diamond .fun-up-badge {
    background: conic-gradient(from 200deg, #7cc7f0, #fff, #b9a6ff, #e3f8ff, #7cc7f0);
  }
  .fun-up-badge span {
    font-size: 64px;
    font-weight: 800;
    color: #0f2a36;
  }
  .fun-up-kicker {
    margin: 18px 0 0;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ffe08a;
    font-size: 18px;
  }
  .fun-up h2 {
    margin: 0;
    font-size: clamp(32px, 5vw, 56px);
  }
  .fun-up p {
    margin: 0;
    font-size: 20px;
  }
  .fun-up small {
    opacity: 0.7;
  }
  @keyframes fun-fade {
    from {
      opacity: 0;
    }
  }
  @keyframes fun-pop {
    from {
      opacity: 0;
      transform: scale(0.4) rotate(-6deg);
    }
  }
  @keyframes fun-spin {
    to {
      transform: rotate(360deg);
    }
  }
  @keyframes fun-shine {
    50% {
      filter: brightness(1.18);
      transform: scale(1.04);
    }
  }

  /* ---------- race ---------- */
  .fun-race {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #0f2a36, #0b1f27);
    color: #e9f4f3;
  }
  .fun-race:fullscreen {
    padding: 5vh 4vw;
    display: grid;
    align-content: center;
    font-size: 1.4em;
  }
  .fun-race-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 18px;
  }
  .fun-race-day b {
    font-variant-numeric: tabular-nums;
    font-size: 1.3em;
  }
  .fun-race-call {
    min-height: 30px;
    text-align: center;
    font-weight: 800;
    font-size: 20px;
    color: #ffe08a;
    opacity: 0;
  }
  .fun-race-call.is-on {
    animation: fun-call 2.2s ease both;
  }
  @keyframes fun-call {
    10%,
    80% {
      opacity: 1;
      transform: scale(1.05);
    }
    to {
      opacity: 0;
    }
  }
  .fun-lanes {
    display: grid;
    gap: 14px;
  }
  .fun-lane {
    display: grid;
    grid-template-columns: 130px 1fr 110px;
    gap: 12px;
    align-items: center;
  }
  .fun-lane-name {
    font-weight: 750;
  }
  .fun-road {
    position: relative;
    height: 54px;
    border-radius: 12px;
    background: repeating-linear-gradient(90deg, #ffffff22 0 24px, transparent 24px 48px) center / 100% 2px no-repeat, #1d3a45;
    box-shadow: inset 0 0 0 1px #ffffff14;
  }
  .fun-finish {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(100% / 1.04);
    width: 12px;
    background: repeating-conic-gradient(#fff 0 25%, #0f2a36 0 50%) 0 0 / 6px 6px;
    opacity: 0.85;
  }
  .fun-car {
    position: absolute;
    top: 6px;
    left: calc(var(--p, 0) / 1.04 * (100% - 74px));
    width: 72px;
    filter: drop-shadow(0 6px 6px #0006);
    transition: left 0.6s cubic-bezier(0.3, 0.8, 0.3, 1);
  }
  .fun-lane.is-done .fun-car {
    animation: fun-bounce 0.6s ease infinite alternate;
  }
  @keyframes fun-bounce {
    to {
      transform: translateY(-4px) rotate(-2deg);
    }
  }
  .fun-lane-val {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .fun-lane-val b {
    font-size: 20px;
  }
  .fun-lane-val small {
    display: block;
    color: #a9c7c6;
  }
  .fun-race-live {
    margin: 14px 0 0;
    color: #ff8aa0;
    font-weight: 700;
  }

  /* ---------- universe ---------- */
  .fun-uni {
    position: relative;
    height: min(72vh, 720px);
    border-radius: var(--radius);
    overflow: hidden;
    background: #071419;
  }
  .fun-uni:fullscreen {
    height: 100vh;
    border-radius: 0;
  }
  .fun-uni canvas {
    display: block;
    width: 100%;
    height: 100%;
  }
  .fun-uni-legend {
    position: absolute;
    left: 14px;
    bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: #e9f4f3;
    font-size: 13px;
  }
  .fun-uni-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--c, #ff5a7a);
  }
  .fun-uni-legend .is-live i {
    background: #ff5a7a;
    box-shadow: 0 0 0 4px #ff5a7a44;
  }

  /* ---------- wrapped ---------- */
  .fun-wr-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
  }
  .fun-wr-host {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    min-height: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--text);
    text-align: left;
  }
  .fun-wr-cover {
    position: relative;
    display: grid;
    align-content: end;
    aspect-ratio: 9 / 14;
    padding: 16px;
    border-radius: 18px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(150deg, var(--c, #0a9a9c), #0f2a36 75%);
    box-shadow: 0 10px 26px #0f2a3626;
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
  }
  .fun-wr-cover::before {
    content: "";
    position: absolute;
    width: 160%;
    aspect-ratio: 1;
    top: -60%;
    right: -70%;
    border-radius: 50%;
    background: #ffffff1f;
  }
  .fun-wr-host:hover .fun-wr-cover {
    transform: translateY(-4px) rotate(-1deg);
    box-shadow: 0 16px 34px #0f2a3640;
  }
  .fun-wr-cover b {
    font-size: 30px;
    line-height: 1;
  }
  .fun-wr-cover i {
    font-style: normal;
    font-weight: 700;
    opacity: 0.85;
  }
  .fun-wr-meta {
    display: grid;
  }
  .fun-wr-meta small {
    color: var(--text-2);
    letter-spacing: 0;
  }
  .fun-wr-player {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    grid-template-rows: 1fr auto;
    justify-items: center;
    gap: 12px;
    padding: 16px;
    background: #050d10f2;
    animation: fun-fade 0.3s ease;
  }
  .fun-wr-stage {
    position: relative;
    height: 100%;
    max-height: calc(100vh - 90px);
    aspect-ratio: 9 / 16;
    max-width: 100%;
  }
  .fun-wr-stage canvas {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 60px #0009;
  }
  .fun-wr-prev,
  .fun-wr-next {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    margin: 0;
    background: none;
    border: 0;
    box-shadow: none;
    cursor: pointer;
  }
  .fun-wr-prev {
    left: 0;
  }
  .fun-wr-next {
    right: 0;
  }
  .fun-wr-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  /* ---------- wheel ---------- */
  .fun-wheel-wrap {
    display: grid;
    grid-template-columns: minmax(280px, 560px) minmax(260px, 1fr);
    gap: 14px;
    align-items: start;
  }
  .fun-wheel {
    position: relative;
    display: grid;
    justify-items: center;
    overflow: hidden;
  }
  .fun-wheel-box {
    position: relative;
    width: 100%;
    max-width: 520px;
  }
  .fun-wheel-box canvas {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 14px 24px #0f2a3640);
  }
  .fun-wheel-pin {
    position: absolute;
    top: -4px;
    left: 50%;
    z-index: 2;
    width: 0;
    height: 0;
    margin-left: -18px;
    border: 18px solid transparent;
    border-top: 34px solid #f43f5e;
    filter: drop-shadow(0 3px 3px #0005);
  }
  .fun-wheel-win {
    min-height: 70px;
    text-align: center;
  }
  .fun-wheel-win h3 {
    margin: 0;
    font-size: 28px;
    color: var(--teal-deep);
    animation: fun-pop 0.6s cubic-bezier(0.2, 1.4, 0.3, 1) both;
  }
  .fun-wheel-win p {
    margin: 6px 0 2px;
  }
  .fun-wheel-list,
  .fun-wheel-hist {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    gap: 6px;
  }
  .fun-wheel-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--mist);
    border-left: 4px solid var(--c);
  }
  .fun-wheel-list li span {
    display: grid;
  }
  .fun-wheel-list small,
  .fun-wheel-hist small {
    color: var(--text-2);
    letter-spacing: 0;
  }
  .fun-wheel-list li.is-spun {
    opacity: 0.6;
  }
  .fun-wheel-list em {
    font-style: normal;
    color: var(--teal-deep);
    font-weight: 700;
  }
  .fun-wheel-hist li {
    display: block;
  }
  .fun-wheel-hist li small {
    display: block;
  }
  .fun-prizes {
    display: grid;
    gap: 6px;
    margin-top: 8px;
  }
  .fun-prize {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 6px;
    align-items: center;
  }
  .fun-prize input[type="color"] {
    width: 44px;
    height: 36px;
    padding: 2px;
  }

  /* ---------- fans ---------- */
  .fun-fans {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
    gap: 14px;
  }
  .fun-map {
    position: relative;
  }
  .fun-map img {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.9;
  }
  .fun-bubble {
    position: absolute;
    left: var(--x);
    top: var(--y);
    display: grid;
    place-items: center;
    width: calc(var(--s) * 92px);
    height: calc(var(--s) * 92px);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 35% 35%, #ff8aa0, #f43f5ecc 60%, #f43f5e55);
    color: #fff;
    font-size: 12px;
    box-shadow: 0 0 0 0 #f43f5e66;
    animation: fun-bubble 0.8s cubic-bezier(0.2, 1.4, 0.3, 1) var(--d) both, fun-ping 2.4s ease-out calc(var(--d) + 0.8s) infinite;
  }
  @keyframes fun-bubble {
    from {
      transform: translate(-50%, -50%) scale(0);
    }
  }
  @keyframes fun-ping {
    to {
      box-shadow: 0 0 0 22px #f43f5e00;
    }
  }
  .fun-countries,
  .fun-topfans {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: grid;
    gap: 6px;
  }
  .fun-countries li {
    display: grid;
    grid-template-columns: 110px 1fr 44px;
    gap: 8px;
    align-items: center;
    font-size: 13px;
  }
  .fun-cbar {
    height: 10px;
    border-radius: 99px;
    background: linear-gradient(90deg, #f43f5e, #ff8aa0);
    width: var(--w);
    min-width: 4px;
  }
  .fun-topfans {
    counter-reset: fan;
  }
  .fun-topfans li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0 8px;
    padding: 6px 10px;
    border-radius: 10px;
    background: var(--mist);
  }
  .fun-topfans small {
    grid-column: 1;
    color: var(--text-2);
    letter-spacing: 0;
  }
  .fun-topfans span {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    font-weight: 800;
  }
  .fun-topfans button {
    grid-row: 1 / span 2;
    grid-column: 3;
  }

  /* ---------- trophies ---------- */
  .fun-room {
    display: grid;
    gap: 16px;
    padding: 22px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #2a1c10, #3b2716 40%, #2a1c10);
    perspective: 900px;
  }
  .fun-wall h3 {
    margin: 0 0 8px;
    color: #f6e7c8;
    display: flex;
    gap: 8px;
    align-items: baseline;
  }
  .fun-wall h3 i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c);
  }
  .fun-wall h3 small {
    color: #c9b28a;
    font-weight: 500;
    letter-spacing: 0;
  }
  .fun-shelf {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
    min-height: 110px;
    padding: 12px 14px 0;
    border-bottom: 14px solid #8a5a2b;
    box-shadow: 0 10px 0 -2px #5c3a1b, 0 18px 24px #0007;
    transform: rotateX(8deg);
    transform-origin: bottom;
  }
  .fun-shelf p {
    color: #c9b28a;
  }
  .fun-trophy {
    display: grid;
    justify-items: center;
    width: 96px;
    padding-bottom: 6px;
    color: #f6e7c8;
    text-align: center;
    animation: fun-rise 0.6s cubic-bezier(0.2, 1.3, 0.3, 1) var(--d) both;
    transition: transform 0.25s var(--ease-out);
  }
  .fun-trophy:hover {
    transform: translateY(-6px) scale(1.06);
  }
  .fun-cup {
    font-size: 46px;
    line-height: 1.1;
    filter: drop-shadow(0 6px 6px #0008);
    animation: fun-glint 3.5s ease-in-out infinite;
    animation-delay: var(--d);
  }
  .fun-trophy.is-team .fun-cup {
    font-size: 58px;
  }
  .fun-trophy b {
    font-size: 12px;
  }
  .fun-trophy small {
    font-size: 11px;
    color: #c9b28a;
    letter-spacing: 0;
  }
  @keyframes fun-rise {
    from {
      opacity: 0;
      transform: translateY(20px) scale(0.6);
    }
  }
  @keyframes fun-glint {
    50% {
      filter: drop-shadow(0 6px 6px #0008) brightness(1.3);
    }
  }

  /* ---------- digital card ---------- */
  .fun-card-wrap {
    display: grid;
    justify-items: center;
    gap: 10px;
    perspective: 1000px;
  }
  .fun-card {
    position: relative;
    width: min(380px, 86vw);
    aspect-ratio: 1.586;
    padding: 18px 20px;
    border-radius: 20px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #0f2a36, #0a9a9c);
    box-shadow: 0 24px 50px #0f2a3655;
    transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0));
    transition: transform 0.15s ease-out;
    display: grid;
    grid-template-rows: auto 1fr;
  }
  .fun-card.is-gold {
    background: linear-gradient(135deg, #4a3100, #e2b04a);
  }
  .fun-card.is-diamond {
    background: linear-gradient(135deg, #0b3550, #7cc7f0 70%, #b9a6ff);
  }
  .fun-card-shine {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--sx, 50%) 0%, #ffffff55, transparent 55%);
    pointer-events: none;
  }
  .fun-card header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
  }
  .fun-card header img {
    height: 26px;
    filter: brightness(0) invert(1);
  }
  .fun-card-body {
    display: flex;
    gap: 12px;
    align-items: center;
    align-self: end;
    padding-right: 110px;
  }
  .fun-card-body div {
    display: grid;
  }
  .fun-card-body b {
    font-size: 20px;
  }
  .fun-card-body small {
    opacity: 0.85;
    letter-spacing: 0;
  }
  .fun-card-body em {
    font-style: normal;
    font-weight: 800;
    color: #ffe08a;
  }
  .fun-card-face {
    display: grid;
    place-items: center;
    flex: none;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #ffffff2b;
    font-weight: 800;
    font-size: 20px;
  }
  .fun-card-qr {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 96px;
    border-radius: 10px;
    overflow: hidden;
  }
  .fun-card-qr .qr-svg {
    display: block;
    width: 100%;
  }
  #me-chip.is-card {
    cursor: pointer;
  }
  .fun-verify {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    background: #0f2a36;
    color: #fff;
    text-align: center;
  }
  .fun-verify div {
    display: grid;
    justify-items: center;
    gap: 10px;
  }
  .fun-verify img {
    height: 50px;
    filter: brightness(0) invert(1);
  }
  .fun-verify span {
    display: grid;
    place-items: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    font-size: 48px;
    background: #10b981;
    animation: fun-pop 0.6s cubic-bezier(0.2, 1.4, 0.3, 1) both;
  }
  .fun-verify.is-bad span {
    background: var(--rose);
  }

  /* ---------- voice ---------- */
  .fun-mic {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 900;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background: radial-gradient(circle at 30% 30%, #3fc6c0, #0a9a9c 60%, #067377);
    color: #fff;
    box-shadow: 0 10px 26px #0a9a9c66;
    transition: transform 0.2s var(--ease-out);
  }
  .fun-mic:hover {
    transform: scale(1.08);
  }
  .fun-mic svg {
    width: 26px;
    height: 26px;
  }
  .fun-voice {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
  }
  .fun-orb {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 6px;
  }
  .fun-orb i {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #9be7e3, #0a9a9c 60%, #0f2a36);
    opacity: 0.9;
    animation: fun-breathe 3s ease-in-out infinite;
  }
  .fun-orb i:nth-child(2) {
    inset: -10px;
    opacity: 0.25;
    animation-delay: 0.4s;
  }
  .fun-orb i:nth-child(3) {
    inset: -22px;
    opacity: 0.12;
    animation-delay: 0.8s;
  }
  .fun-orb.is-listen i {
    background: radial-gradient(circle at 35% 35%, #ffb4c2, #f43f5e 60%, #4a0614);
    animation-duration: 0.9s;
  }
  .fun-orb.is-talk i {
    animation-duration: 0.5s;
  }
  @keyframes fun-breathe {
    50% {
      transform: scale(1.08);
    }
  }
  .fun-voice-hint {
    color: var(--text-2);
    max-width: 44ch;
    margin: 0;
  }
  .fun-voice-out {
    min-height: 40px;
    max-width: 52ch;
  }
  .fun-q {
    color: var(--text-2);
    margin: 0;
  }
  .fun-a {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    margin: 6px 0 0;
  }
  .fun-voice-ask {
    display: flex;
    gap: 6px;
    width: 100%;
    max-width: 420px;
  }
  .fun-voice-ask input {
    flex: 1;
  }

  /* ---------- stories ---------- */
  .fun-stories {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 6px 2px 10px;
    margin-bottom: 6px;
    scrollbar-width: none;
  }
  .fun-st {
    display: grid;
    justify-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    min-height: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--text);
    cursor: pointer;
  }
  .fun-st-ring {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(#f6c453, #f43f5e, #a855f7, #0a9a9c, #f6c453);
    animation: fun-spin 6s linear infinite;
  }
  .fun-st.is-seen .fun-st-ring {
    background: var(--line-strong);
    animation: none;
  }
  .fun-st-ring i {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--mist);
    background: var(--teal-soft);
    color: var(--teal-deep);
    font-style: normal;
    font-weight: 800;
    animation: fun-spin 6s linear infinite reverse;
  }
  .fun-st.is-seen .fun-st-ring i {
    animation: none;
  }
  .fun-st-add .fun-st-ring {
    background: var(--line-strong);
    animation: none;
  }
  .fun-st-add .fun-st-ring i {
    font-size: 26px;
    animation: none;
  }
  .fun-st small {
    font-size: 12px;
    letter-spacing: 0;
  }
  .fun-st-view {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    background: #050d10f2;
    animation: fun-fade 0.25s ease;
  }
  .fun-st-frame {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
    width: min(420px, 100vw);
    height: min(780px, 100vh);
    padding: 12px;
    border-radius: 18px;
    background: #0f2a36;
    color: #fff;
    overflow: hidden;
  }
  .fun-st-bars {
    display: flex;
    gap: 4px;
  }
  .fun-st-bars i {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: #ffffff44;
    overflow: hidden;
  }
  .fun-st-bars i.is-done {
    background: #fff;
  }
  .fun-st-bars i.is-now::after {
    content: "";
    display: block;
    height: 100%;
    background: #fff;
    animation: fun-bar 5s linear both;
  }
  @keyframes fun-bar {
    from {
      width: 0;
    }
    to {
      width: 100%;
    }
  }
  .fun-st-frame header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 2px;
  }
  .fun-st-frame header small {
    opacity: 0.7;
  }
  .fun-st-x {
    margin-left: auto;
    background: none;
    border: 0;
    color: #fff;
    font-size: 28px;
    box-shadow: none;
    z-index: 3;
  }
  .fun-st-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    min-height: 0;
    animation: fun-zoom 5s ease-out both;
  }
  @keyframes fun-zoom {
    from {
      transform: scale(1.06);
    }
  }
  .fun-st-cap {
    margin: 8px 4px;
    font-size: 16px;
    font-weight: 600;
  }
  .fun-st-reacts {
    position: relative;
    z-index: 3;
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
  }
  .fun-st-reacts button {
    display: grid;
    justify-items: center;
    margin: 0;
    padding: 6px 8px;
    min-height: 0;
    border-radius: 12px;
    border: 0;
    background: #ffffff18;
    color: #fff;
    font-size: 22px;
    box-shadow: none;
    transition: transform 0.2s;
  }
  .fun-st-reacts button small {
    font-size: 10px;
  }
  .fun-st-reacts button.is-on {
    background: #ffffff38;
  }
  .fun-st-reacts button.is-pop {
    animation: fun-pop 0.45s cubic-bezier(0.2, 1.6, 0.3, 1);
  }
  .fun-st-prev,
  .fun-st-next {
    position: absolute;
    top: 60px;
    bottom: 80px;
    width: 40%;
    margin: 0;
    background: none;
    border: 0;
    box-shadow: none;
    z-index: 2;
  }
  .fun-st-prev {
    left: 0;
  }
  .fun-st-next {
    right: 0;
  }
  .fun-st-new img {
    width: 100%;
    max-height: 50vh;
    object-fit: contain;
    border-radius: 12px;
  }

  @media (max-width: 860px) {
    .fun-wheel-wrap,
    .fun-fans {
      grid-template-columns: 1fr;
    }
    .fun-lane {
      grid-template-columns: 1fr 80px;
    }
    .fun-lane-name {
      grid-column: 1 / -1;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .fun-up-rays,
    .fun-st-ring,
    .fun-st-ring i,
    .fun-bubble,
    .fun-cup,
    .fun-orb i,
    .fun-lane.is-done .fun-car {
      animation: none !important;
    }
  }
}

/* ---------- v56: stories like Instagram (photos + videos, several at once) ---------- */
@media screen {
  .fun-st { position: relative; }
  .fun-st-name { font-size: 12px; max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fun-st-plus {
    position: absolute; top: 46px; inset-inline-end: 2px; display: grid; place-items: center;
    width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--mist, #fff);
    background: var(--teal, #0a9a9c); color: #fff; font-weight: 800; font-size: 15px; line-height: 1;
  }
  .fun-st-vid, .fun-st-n {
    position: absolute; top: 0; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 99px; border: 2px solid var(--mist, #fff); font-size: 11px; font-weight: 800; color: #fff;
  }
  .fun-st-vid { inset-inline-start: 0; background: #f43f5e; }
  .fun-st-n { inset-inline-end: 0; background: #21345a; }
  .fun-stories.is-portal { margin: 0 0 14px; padding: 12px 14px; border-radius: 18px; background: #fff; border: 1px solid #d9e4e3; }

  body.fun-st-open { overflow: hidden; }
  .fun-st-view { outline: none; }
  .fun-st-view.is-swap .fun-st-frame { animation: fun-st-swap .38s cubic-bezier(.2,.8,.2,1); }
  @keyframes fun-st-swap { from { transform: perspective(900px) rotateY(-28deg) translateX(30%); opacity: .3; } }
  .fun-st-frame { grid-template-rows: auto auto minmax(0, 1fr) auto auto; background: #0b1d25; }
  .fun-st-frame.is-in { animation: fun-st-in .28s ease both; }
  @keyframes fun-st-in { from { transform: scale(.96); opacity: 0; } }
  .fun-st-bars i.is-now::after { animation: none; width: calc(var(--p, 0) * 100%); }
  .fun-st-frame header { gap: 10px; }
  .fun-st-av {
    display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
    background: conic-gradient(#f6c453, #f43f5e, #a855f7, #0a9a9c, #f6c453); color: #fff; font-weight: 800; font-size: 12px;
  }
  .fun-st-ago { opacity: .7; font-size: 13px; }
  .fun-st-ic {
    margin: 0 0 0 auto; padding: 6px; min-height: 0; border: 0; border-radius: 50%; background: #ffffff1f; color: #fff; box-shadow: none; z-index: 3;
  }
  .fun-st-ic + .fun-st-x { margin-left: 4px; }
  .fun-st-media { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; border-radius: 12px; background: #050d10; }
  .fun-st-media > img, .fun-st-media > video { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
  .fun-st-media > video { animation: none; }
  .fun-st-poster { filter: blur(6px) brightness(.7); }
  .fun-st-spin {
    width: 34px; height: 34px; border-radius: 50%; border: 3px solid #ffffff33; border-top-color: #fff; animation: fun-spin .8s linear infinite;
  }
  .fun-st-gone { color: #ffffffb3; }
  .fun-st-view.is-held .fun-st-bars, .fun-st-view.is-held header, .fun-st-view.is-held .fun-st-reacts, .fun-st-view.is-held .fun-st-cap { opacity: .25; transition: opacity .2s; }
  .fun-st-reacts { flex-wrap: wrap; padding-top: 8px; }
  .fun-st-reacts button span { font-size: 10px; min-height: 12px; }
  .fun-st-seen, .fun-st-del {
    display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: 5px; font-size: 13px !important; font-weight: 700;
  }
  .fun-st-del { background: #f43f5e33 !important; }
  .fun-st-sheet {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; max-height: 60%; overflow: auto;
    padding: 14px 16px 18px; border-radius: 18px 18px 0 0; background: #fff; color: #10262f; animation: fun-st-up .25s ease both;
  }
  @keyframes fun-st-up { from { transform: translateY(100%); } }
  .fun-st-sheet-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
  .fun-st-sheet-h b { display: inline-flex; align-items: center; gap: 6px; }
  .fun-st-sheet .fun-st-x { color: #10262f; }
  .fun-st-sheet ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  .fun-st-sheet li { display: flex; align-items: center; gap: 10px; }
  .fun-st-sheet li small { margin-inline-start: auto; color: #6b7f86; }

  .fun-st-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-height: 58vh; overflow: auto; padding: 2px; }
  .fun-st-item { display: grid; gap: 6px; animation: fun-st-in .3s ease both; }
  .fun-st-thumb { position: relative; aspect-ratio: 9 / 14; border-radius: 14px; overflow: hidden; background: #0b1d25; }
  .fun-st-thumb img, .fun-st-thumb video { width: 100%; height: 100%; object-fit: cover; max-height: none; border-radius: 0; }
  .fun-st-len {
    position: absolute; left: 8px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
    border-radius: 99px; background: #000a; color: #fff; font-size: 12px; font-weight: 700;
  }
  .fun-st-rm {
    position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; min-height: 0; padding: 0; margin: 0;
    border: 0; border-radius: 50%; background: #000a; color: #fff; font-size: 18px; box-shadow: none;
  }
  .fun-st-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #ffffff33; opacity: 0; }
  .fun-st-bar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: #0a9a9c; transition: width .3s; }
  .fun-st-item.is-up .fun-st-bar { opacity: 1; }
  .fun-st-item.is-done .fun-st-thumb::after {
    content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; background: #0a9a9c99; color: #fff; font-size: 40px; font-weight: 800;
    animation: fun-pop .4s ease both;
  }
  .fun-st-item.is-err .fun-st-thumb { outline: 3px solid #f43f5e; }
  .fun-st-new .hub-buttons { margin-top: 12px; }
  @media (max-width: 560px) {
    .fun-st-frame { width: 100vw; height: 100dvh; border-radius: 0; }
    .fun-st-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (prefers-reduced-motion: reduce) {
    .fun-st-frame.is-in, .fun-st-view.is-swap .fun-st-frame, .fun-st-item, .fun-st-sheet, .fun-st-spin { animation: none !important; }
  }
}
