@layer overlays {
  .popups {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
  }

  .pop-shell {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: calc(var(--safe-top) + 30px) 14px calc(var(--safe-bottom) + 18px);
    pointer-events: auto;
  }

  .pop-shade {
    position: absolute;
    inset: 0;
    background: rgba(20, 0, 40, 0);
    transition: background 0.3s ease;
  }

  .pop-shell.is-open .pop-shade {
    background: rgba(20, 0, 40, 0.62);
  }

  .pop-shell.is-leaving .pop-shade {
    background: rgba(20, 0, 40, 0);
  }

  .pop {
    position: relative;
    width: min(410px, 100%);
    max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 56px);
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    border-radius: 30px;
    background: linear-gradient(180deg, #fff9fd 0%, #ffe6f3 100%);
    border: 6px solid #c2358f;
    box-shadow: 0 0 0 4px #fff, 0 0 0 8px #7a0f53, 0 24px 48px rgba(10, 0, 30, 0.55), inset 0 -6px 0 rgba(214, 39, 143, 0.12);
    color: var(--ink);
    opacity: 0;
    scale: 0.6;
    rotate: -3deg;
  }

  .pop--wide {
    width: min(560px, 100%);
  }

  .pop-shell.is-open .pop {
    animation: pop-in 0.45s var(--ease-pop) forwards;
  }

  .pop-shell.is-leaving .pop {
    animation: pop-out 0.28s var(--ease-in) forwards;
  }

  .pop__ribbon {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: -30px;
    translate: -50% 0;
    max-width: calc(100% - 60px);
  }

  .pop__ribbon .ribbon {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: ribbon-drop 0.55s var(--ease-pop) 0.12s both;
  }

  .ribbon.ribbon--tier {
    background: linear-gradient(180deg, var(--tier-a) 0%, var(--tier-b) 50%, var(--tier-c) 100%);
    border-color: var(--tier-c);
    -webkit-text-stroke-color: var(--tier-c);
    text-shadow: 0 3px 0 var(--tier-c);
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), 0 5px 0 var(--tier-c), 0 9px 14px rgba(40, 0, 30, 0.35);
  }

  .ribbon.ribbon--tier::before,
  .ribbon.ribbon--tier::after {
    background: linear-gradient(180deg, var(--tier-b), var(--tier-c));
    border-color: var(--tier-c);
  }

  :root[data-motion='reduced'] .help__flame,
  :root[data-motion='reduced'] .pre__hard .ico,
  :root[data-motion='reduced'] .help__badge .ico {
    animation: none;
  }

  .pop__close {
    top: -18px;
    right: -16px;
  }

  .pop__body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 40px 20px 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    justify-items: center;
    text-align: center;
    -webkit-user-select: text;
    user-select: text;
  }

  .pop__text {
    font-size: 16px;
    font-weight: 600;
    color: #5a2a6e;
    line-height: 1.4;
  }

  .pop__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
  }

  .pop__actions--stack {
    display: grid;
  }

  .pre__stars {
    display: flex;
    gap: 6px;
    margin-top: -4px;
  }

  .pre__star {
    width: 44px;
    height: 44px;
    animation: mm-pop-in 0.5s var(--ease-pop) both;
    animation-delay: calc(0.15s + var(--i) * 0.08s);
  }

  .pre__star:nth-child(2) {
    width: 54px;
    height: 54px;
    margin-top: -8px;
  }

  .pre__star .ico {
    width: 100%;
    height: 100%;
  }

  .pre__episode {
    font-family: var(--font-display);
    font-size: 17px;
    color: var(--accent);
    -webkit-text-stroke: 0.6px rgba(59, 13, 74, 0.35);
  }

  .pop--tier-hard {
    --tier-a: #d38bff;
    --tier-b: #9d3fe0;
    --tier-c: #4d0d85;
    --tier-glow: rgba(190, 90, 255, 0.55);
    --tier-soft: rgba(157, 63, 224, 0.12);
  }

  .pop--tier-super {
    --tier-a: #ffb07a;
    --tier-b: #ec2f24;
    --tier-c: #7a0508;
    --tier-glow: rgba(255, 90, 40, 0.6);
    --tier-soft: rgba(236, 47, 36, 0.1);
  }

  .pop--tier-nightmare {
    --tier-a: #a9b8ff;
    --tier-b: #4b2bb8;
    --tier-c: #10053a;
    --tier-glow: rgba(110, 90, 255, 0.65);
    --tier-soft: rgba(75, 43, 184, 0.12);
  }

  .pop[class*='pop--tier-'] {
    border-color: var(--tier-b);
    box-shadow: 0 0 0 4px #fff, 0 0 0 8px var(--tier-c), 0 0 36px 10px var(--tier-glow), 0 24px 48px rgba(10, 0, 30, 0.55), inset 0 -6px 0 var(--tier-soft);
  }

  .help__fire {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 22px;
    top: -44px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
  }

  .help__flame {
    width: 34px;
    height: 46px;
    transform-origin: 50% 100%;
    filter: drop-shadow(0 0 6px rgba(255, 150, 40, 0.8));
    animation: help-flicker 0.85s ease-in-out infinite alternate;
    animation-delay: calc(var(--i) * -0.23s);
  }

  .help__flame:nth-child(even) {
    width: 26px;
    height: 36px;
    margin-top: 10px;
  }

  .help__flame .ico {
    width: 100%;
    height: 100%;
  }

  .pop--tier-hard .help__flame {
    width: 26px;
    height: 34px;
    margin-top: 10px;
  }

  .pop--tier-nightmare .help__flame {
    filter: hue-rotate(215deg) saturate(1.3) drop-shadow(0 0 6px rgba(120, 110, 255, 0.9));
  }

  .pre__tierbox {
    display: grid;
    justify-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--tier-soft, rgba(157, 63, 224, 0.12)), rgba(255, 255, 255, 0.6));
    box-shadow: inset 0 0 0 2px var(--tier-b, #9d3fe0);
  }

  .pre__hard,
  .help__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px 6px;
    border-radius: 99px;
    background: linear-gradient(180deg, var(--tier-a, #d38bff), var(--tier-b, #9d3fe0) 55%, var(--tier-c, #4d0d85));
    border: 2px solid #fff;
    box-shadow: 0 3px 0 var(--tier-c, #4d0d85), 0 0 14px var(--tier-glow, rgba(190, 90, 255, 0.55));
    color: #fff;
    font-size: 16px;
    white-space: nowrap;
  }

  .pre__hard b,
  .help__badge b {
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    -webkit-text-stroke: 1px var(--tier-c, #4d0d85);
    paint-order: stroke fill;
  }

  .pre__hard .ico,
  .help__badge .ico {
    width: 20px;
    height: 20px;
    flex: none;
    transform-origin: 50% 100%;
    animation: help-flicker 0.7s ease-in-out infinite alternate;
  }

  .pre__hard .ico:last-child,
  .help__badge .ico:last-child {
    animation-delay: -0.35s;
  }

  .pop--tier-nightmare .pre__hard .ico,
  .pop--tier-nightmare .help__badge .ico {
    filter: hue-rotate(215deg) saturate(1.3);
  }

  .pre__tries,
  .help__tries {
    font-size: 14px;
    font-weight: 600;
    color: #5a2a6e;
    text-align: center;
  }

  .help__tries {
    display: grid;
    justify-items: center;
    gap: 4px;
  }

  .pre__tries b,
  .help__tries b {
    color: var(--tier-b, #9d3fe0);
  }

  .pre__tip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    text-align: left;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    color: #3b0d4a;
  }

  .pre__tipicon {
    width: 26px;
    height: 26px;
  }

  .pre__tipicon .ico {
    width: 100%;
    height: 100%;
  }

  .pre__helpbtn,
  .lose__help {
    --b-hi: var(--tier-a, #d38bff);
    --b-mid: var(--tier-b, #9d3fe0);
    --b-lo: var(--tier-c, #4d0d85);
    --b-edge: var(--tier-c, #4d0d85);
    font-size: 16px;
  }

  .pre__helpbtn .btn__icon,
  .lose__help .btn__icon {
    width: 1.1em;
    height: 1.1em;
  }

  .pop--help .pop__body {
    gap: 12px;
  }

  .help__head {
    display: grid;
    justify-items: center;
    gap: 6px;
  }

  .help__badge {
    font-size: 18px;
  }

  .help__title {
    font-size: 36px;
    --ol: var(--tier-c, #8e0f5c);
    line-height: 1;
  }

  .help__hearts {
    display: inline-flex;
    gap: 2px;
  }

  .help__hearts .ico {
    width: 22px;
    height: 22px;
  }

  .help__note {
    width: 100%;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 2px var(--tier-soft, rgba(194, 53, 143, 0.2));
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #6a1a4e;
  }

  .help__note--recap {
    background: linear-gradient(180deg, #fff8d6, #ffeaa0);
    box-shadow: inset 0 0 0 2px #e0a21a;
    color: #6a3a00;
  }

  .help__main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 10px;
    width: 100%;
  }

  .help__main .help__tips {
    width: 100%;
  }

  .help__board {
    display: grid;
    place-items: center;
    padding: 6px;
    border-radius: 14px;
    background: linear-gradient(180deg, #3a1a6e, #1d0c40);
  }

  .help__boardcanvas {
    max-width: 128px;
    height: auto;
  }

  .help__tips {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
  }

  .help__tip {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #3b0d4a;
    animation: mm-rise 0.4s var(--ease-pop) both;
    animation-delay: calc(0.2s + var(--i) * 0.1s);
  }

  .help__tart {
    width: 32px;
    height: 32px;
  }

  .help__tart img,
  .help__tart .ico {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .help__boosters {
    width: 100%;
    text-align: left;
  }

  .help__h {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 16px;
    color: #c2358f;
  }

  .help__h .ico {
    width: 22px;
    height: 22px;
  }

  .help__boosters ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .help__booster {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 14px;
    background: linear-gradient(180deg, #fffbe0, #ffeaa0);
    box-shadow: inset 0 0 0 2px #e0a21a;
  }

  .help__bart {
    position: relative;
    width: 40px;
    height: 40px;
  }

  .help__bart img,
  .help__bart .ico {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .help__bart b {
    position: absolute;
    right: -6px;
    bottom: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 99px;
    background: #3b0d4a;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
  }

  .help__btext {
    display: grid;
    gap: 1px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    color: #5a2a6e;
  }

  .help__btext b {
    font-size: 15px;
    font-weight: 400;
    color: #3b0d4a;
  }

  .help__bnote {
    margin-top: 6px;
    font-size: 12px;
    color: #7a3a8e;
  }


  .pre__tier {
    display: flex;
    gap: 2px;
  }

  .pre__tier span {
    width: 24px;
    height: 24px;
    opacity: 0.25;
    filter: grayscale(1);
  }

  .pre__tier span.is-on {
    opacity: 1;
    filter: none;
  }

  .pre__tier .ico {
    width: 100%;
    height: 100%;
  }

  .pre__main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 0 0 2px rgba(194, 53, 143, 0.25);
    text-align: left;
  }

  .pre__h {
    font-size: 17px;
    color: #c2358f;
    margin-bottom: 6px;
  }

  .pre__goals ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .pre__goals li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
  }

  .pre__gicon {
    flex: none;
    width: 34px;
    height: 34px;
  }

  .pre__gicon img,
  .pre__gicon .ico {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .pre__warn {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: #c41414;
  }

  .pre__warn .ico,
  .pre__warn img {
    flex: none;
    width: 30px;
    height: 30px;
    object-fit: contain;
  }

  .pre__moves {
    margin-top: 8px;
    font-size: 15px;
  }

  .pre__moves b {
    font-size: 24px;
    color: #c2358f;
  }

  .pre__preview {
    display: grid;
    place-items: center;
    padding: 6px;
    border-radius: 14px;
    background: linear-gradient(180deg, #3a1a6e, #1d0c40);
  }

  .pre__board {
    max-width: 128px;
    height: auto;
  }

  .pre__reward {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #8e0f5c;
  }

  .pre__board-scores {
    width: 100%;
    min-height: 20px;
  }

  .pre__loading {
    display: grid;
    place-items: center;
  }

  .pre__loading .spinner {
    border-color: rgba(194, 53, 143, 0.25);
    border-top-color: #c2358f;
  }

  .pre__podium {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .pre__rank {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 2px;
    width: 92px;
    padding: 8px 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 0 0 2px rgba(194, 53, 143, 0.2);
    font-size: 13px;
  }

  .pre__rank[data-rank='1'] {
    background: linear-gradient(180deg, #fff6c6, #ffe07a);
  }

  .pre__rname {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #3b0d4a;
    --text: #3b0d4a;
  }

  .pre__nobody,
  .pre__best {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: #7a3a8e;
  }

  .pre__nobody .ico {
    width: 24px;
    height: 24px;
  }

  .pre__boosters {
    width: 100%;
    text-align: left;
  }

  .pre__boostrow {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .pbooster {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 2px;
    width: 104px;
    padding: 8px 6px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #ffe3f1);
    border: 3px solid #e58bc3;
    box-shadow: 0 4px 0 #c2358f;
    font-size: 12px;
    font-weight: 700;
    transition: transform 0.12s var(--ease-pop);
  }

  .pbooster:active {
    transform: translateY(3px);
  }

  .pbooster.is-empty {
    filter: grayscale(0.6);
    opacity: 0.85;
  }

  .pbooster.is-on {
    background: linear-gradient(180deg, #fffbd0, #ffe14d);
    border-color: #ffb21f;
    box-shadow: 0 4px 0 #b86400, 0 0 18px rgba(255, 210, 60, 0.9);
  }

  .pbooster__art {
    position: relative;
    width: 48px;
    height: 48px;
  }

  .pbooster__art img {
    width: 100%;
    height: 100%;
  }

  .pbooster__play {
    position: absolute;
    right: -6px;
    bottom: -4px;
    width: 22px;
    height: 22px;
  }

  .pbooster__count {
    font-family: var(--font-display);
    color: #c2358f;
  }

  .pbooster__check {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    opacity: 0;
    scale: 0.3;
    transition: opacity 0.2s, scale 0.3s var(--ease-pop);
  }

  .pbooster.is-on .pbooster__check {
    opacity: 1;
    scale: 1;
  }

  .pbooster__check .ico {
    width: 100%;
    height: 100%;
  }

  .pre__kit {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
  }

  .pre__kitem {
    position: relative;
    width: 34px;
    height: 34px;
  }

  .pre__kitem img,
  .pre__kitem .ico {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .pre__kitem b {
    position: absolute;
    right: -6px;
    bottom: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 99px;
    background: #3b0d4a;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
  }

  .pre__nolives {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #c41414;
  }

  .pre__nolives .ico {
    width: 28px;
    height: 28px;
  }

  .pre__play .btn__icon {
    width: 0.9em;
    height: 0.9em;
  }

  .win__title,
  .lose__title {
    font-size: 40px;
    --ol: #8e0f5c;
    margin-top: 4px;
  }

  .win__stars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
  }

  .win__star {
    position: relative;
    width: 70px;
    height: 70px;
  }

  .win__star:nth-child(2) {
    width: 90px;
    height: 90px;
  }

  .win__star .ico {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .win__fill {
    opacity: 0;
    scale: 2.4;
  }

  .win__star.is-on .win__fill {
    animation: star-land 0.5s var(--ease-pop) forwards;
  }

  .win__score {
    font-size: 17px;
    color: #7a3a8e;
  }

  .win__score b {
    font-size: 30px;
    color: #c2358f;
  }

  .win__best {
    padding: 4px 14px;
    border-radius: 99px;
    background: linear-gradient(180deg, #fff39b, #ffc21a);
    font-weight: 700;
    color: #7a4300;
    animation: mm-pulse 1.1s ease-in-out infinite;
  }

  .win__rewards {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
  }

  .win__unlock {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #1b6608;
  }

  .win__unlock .ico {
    width: 22px;
    height: 22px;
  }

  .win__milestone {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 6px 12px;
    width: 100%;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff6c6, #ffe07a);
    box-shadow: inset 0 0 0 2px #e0a21a;
    text-align: left;
  }

  .win__milestone > div:nth-child(2) {
    display: grid;
  }

  .win__milestone b {
    font-size: 20px;
    color: #8a4700;
  }

  .win__milestone .rchips {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .win__mchest {
    width: 54px;
    height: 54px;
    animation: mm-wiggle 0.7s ease-in-out infinite;
  }

  .win__mchest .ico {
    width: 100%;
    height: 100%;
  }

  .lose__heart {
    width: 96px;
    height: 96px;
    animation: heart-break 1s var(--ease-out) both;
  }

  .lose__heart .ico {
    width: 100%;
    height: 100%;
  }

  .lose__goals {
    display: grid;
    gap: 6px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .lose__goals li {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    text-align: left;
    font-weight: 700;
  }

  .lose__goals li.is-done {
    background: rgba(200, 255, 180, 0.8);
  }

  .lose__gicon {
    width: 30px;
    height: 30px;
  }

  .lose__gicon img,
  .lose__gicon .ico,
  .lose__tick {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .lose__tick {
    width: 22px;
    height: 22px;
  }

  .lose__life {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #8e0f5c;
  }

  .lose__life .ico {
    width: 28px;
    height: 28px;
  }

  .lives__hearts {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 58px);
    justify-content: center;
    gap: 6px;
    width: 100%;
  }

  .lives__heart {
    width: 100%;
    aspect-ratio: 1;
    animation: mm-pop-in 0.45s var(--ease-pop) both;
    animation-delay: calc(0.1s + var(--i) * 0.08s);
  }

  .lives__heart.is-on {
    animation: mm-pop-in 0.45s var(--ease-pop) both, mm-pulse 1.3s ease-in-out 0.6s infinite;
  }

  .lives__heart.is-pop {
    animation: mm-hit 0.45s var(--ease-pop);
  }

  .lives__heart .ico {
    width: 100%;
    height: 100%;
  }

  .lives__status {
    font-size: 26px;
    --ol: #8e0f5c;
  }

  .lives__note {
    font-size: 13px;
    color: #7a3a8e;
  }

  .lives__actions {
    display: grid;
    gap: 10px;
    width: 100%;
  }

  .lives__card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 2px rgba(194, 53, 143, 0.25);
    text-align: left;
  }

  .lives__cardicon {
    width: 44px;
    height: 44px;
  }

  .lives__cardicon .ico {
    width: 100%;
    height: 100%;
  }

  .lives__cardtext {
    display: grid;
    font-size: 13px;
    color: #7a3a8e;
  }

  .lives__cardtext b {
    font-size: 17px;
    color: #3b0d4a;
  }

  .toggles {
    display: grid;
    gap: 8px;
    width: 100%;
  }

  .toggle-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 2px rgba(194, 53, 143, 0.2);
    text-align: left;
    color: #3b0d4a;
    font-weight: 700;
    font-size: 16px;
  }

  .toggle-row__icon {
    width: 36px;
    height: 36px;
  }

  .toggle-row__icon .ico {
    width: 100%;
    height: 100%;
  }

  .toggle-row__label {
    display: grid;
  }

  .toggle-row__label small {
    font-size: 12px;
    font-weight: 600;
    color: #8a5a9e;
  }

  .set__account {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border-radius: 20px;
    background: linear-gradient(180deg, #4a1a78, #2a0845);
    color: #fff;
    text-align: left;
  }

  .set__who {
    display: grid;
    gap: 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
  }

  .set__who .cos-name {
    font-size: 18px;
  }

  .set__h {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
    font-size: 18px;
    color: #c2358f;
  }

  .set__h .ico {
    width: 26px;
    height: 26px;
  }

  .set__boards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    width: 100%;
  }

  .set__board {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    border: 3px solid transparent;
    font-size: 12px;
    font-weight: 700;
    color: #3b0d4a;
  }

  .set__board.is-on {
    border-color: #ff4fae;
    box-shadow: 0 0 12px rgba(255, 79, 174, 0.6);
  }

  .set__bprev {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 0 0 4px #3b0d4a;
  }

  .set__bprev i:nth-child(1),
  .set__bprev i:nth-child(4) {
    background: var(--a);
  }

  .set__bprev i:nth-child(2),
  .set__bprev i:nth-child(3) {
    background: var(--b);
  }

  .set__backdrops {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 8px;
    width: 100%;
  }

  .set__bd {
    display: grid;
    gap: 4px;
    padding: 5px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    border: 3px solid transparent;
    font-size: 12px;
    font-weight: 700;
    color: #3b0d4a;
  }

  .set__bd.is-on {
    border-color: #ff4fae;
    box-shadow: 0 0 12px rgba(255, 79, 174, 0.6);
  }

  .set__bdimg {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #78d25a, #6fc8ff);
  }

  .set__bdimg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .set__bdimg--theme .ico {
    width: 40%;
    height: 60%;
  }

  .set__tip,
  .set__foot {
    font-size: 13px;
    color: #7a3a8e;
  }

  .set__foot a {
    color: #c2358f;
  }

  .dev {
    display: grid;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border-radius: 16px;
    background: #2a0845;
    color: #fff;
  }

  .dev__row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
  }

  .dev__input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    border: 2px solid #b36bff;
    background: #1b0533;
    color: #fff;
    -webkit-user-select: text;
    user-select: text;
  }

  .dev__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .pop--profile .pop__body {
    padding: 0 0 20px;
  }

  .prof {
    width: 100%;
    display: grid;
    gap: 12px;
    justify-items: center;
  }

  .prof__loading {
    padding: 60px;
  }

  .prof__banner {
    width: 100%;
    height: 130px;
    border-radius: 24px 24px 0 0;
  }

  .prof__head {
    display: grid;
    justify-items: center;
    gap: 4px;
    margin-top: -64px;
    padding: 0 18px;
  }

  .prof__name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 24px;
    --text: #3b0d4a;
  }

  .prof__handle {
    font-size: 13px;
    color: #8a5a9e;
  }

  .prof__bio {
    max-width: 320px;
    font-size: 14px;
    color: #5a2a6e;
  }

  .prof__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: calc(100% - 32px);
  }

  .prof__stat {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 10px 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 2px rgba(194, 53, 143, 0.2);
    font-size: 12px;
    color: #7a3a8e;
  }

  .prof__stat b {
    font-size: 24px;
    color: #c2358f;
  }

  .prof__sicon {
    width: 30px;
    height: 30px;
  }

  .prof__sicon .ico {
    width: 100%;
    height: 100%;
  }

  .pop--profile .btn--wide {
    width: calc(100% - 32px);
    font-size: 18px;
    line-height: 1.1;
    white-space: normal;
  }

  .intro__title {
    font-size: 34px;
    --ol: #8e0f5c;
  }

  .intro__art {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px;
    border-radius: 20px;
    background: linear-gradient(180deg, #2a2a6e, #151540);
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.25);
  }

  .intro__piece {
    position: relative;
    width: 50px;
    height: 50px;
    animation: mm-pop-in 0.4s var(--ease-pop) both;
  }

  .intro__piece img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .intro__piece--bomb b {
    position: absolute;
    left: 50%;
    bottom: 4px;
    translate: -50% 0;
    font-family: var(--font-display);
    font-size: 13px;
    color: #fff;
  }

  .intro__arrow {
    font-size: 28px;
    color: #ffe45c;
    font-weight: 800;
    padding: 0 4px;
  }

  .rpop__chest {
    position: relative;
    width: 110px;
    height: 110px;
    animation: chest-bounce 1s var(--ease-pop) both;
  }

  .rpop__chest .ico {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
  }

  .rpop__rays {
    position: absolute;
    inset: -60%;
    background: repeating-conic-gradient(from 0deg, rgba(255, 220, 90, 0.55) 0 10deg, rgba(255, 220, 90, 0) 10deg 20deg);
    border-radius: 50%;
    mask: radial-gradient(circle, #000 20%, transparent 70%);
    animation: mm-spin 6s linear infinite;
  }

  .rpop__list {
    display: grid;
    gap: 8px;
    width: 100%;
  }

  .rpop__item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    text-align: left;
    font-weight: 700;
    animation: mm-rise 0.4s var(--ease-pop) both;
    animation-delay: calc(0.3s + var(--i) * 0.12s);
  }

  .rchips {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .rchip {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
  }

  .rchip__art {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
  }

  .rchip__art img,
  .rchip__art .ico {
    width: 88%;
    height: 88%;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
  }

  .rchip__amt {
    position: absolute;
    left: 50%;
    bottom: -6px;
    translate: -50% 0;
    font-size: 14px;
    white-space: nowrap;
    --ol: #3b0d4a;
  }

  .rchip--big {
    width: 58px;
    height: 58px;
  }

  .rchip--big .rchip__amt {
    font-size: 16px;
  }

  .rart-stack {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
  }

  .rart-stack img {
    width: 100%;
    height: 100%;
  }

  .rart-badge {
    position: absolute;
    right: -4px;
    bottom: -2px;
    width: 45% !important;
    height: 45% !important;
  }

  .unlock__list {
    display: grid;
    gap: 8px;
    width: 100%;
  }

  .unlock__item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #ffe9f5);
    box-shadow: inset 0 0 0 2px rgba(194, 53, 143, 0.25);
    text-align: left;
    animation: mm-rise 0.4s var(--ease-pop) both;
    animation-delay: calc(0.25s + var(--i) * 0.1s);
  }

  .unlock__art {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
  }

  .unlock__art img,
  .unlock__art .ico,
  .unlock__art .rart-stack {
    width: 100%;
    height: 100%;
  }

  .unlock__text {
    display: grid;
    gap: 2px;
    font-size: 13px;
    color: #7a3a8e;
  }

  .unlock__text b {
    font-size: 17px;
    color: #8e0f5c;
  }

  .unlock__amt {
    font-size: 24px;
    color: #ffffff;
    --ol: #8e0f5c;
  }

  .unlock__foot {
    margin: 0;
    font-size: 13px;
    color: #7a3a8e;
  }

  .lose__gift {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 6px 12px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff6c6, #ffe07a);
    box-shadow: inset 0 0 0 2px #e0a21a;
    text-align: left;
    animation: mm-rise 0.45s var(--ease-pop) both;
    animation-delay: 0.4s;
  }

  .lose__gifticon {
    width: 46px;
    height: 46px;
    animation: mm-wiggle 0.7s ease-in-out infinite;
  }

  .lose__gifticon .ico {
    width: 100%;
    height: 100%;
  }

  .lose__gifttext {
    display: grid;
    font-size: 13px;
    color: #7a4300;
  }

  .lose__gifttext b {
    font-size: 18px;
    color: #8a4700;
  }

  .lose__gift .rchips {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .lose__rbs {
    width: min(100%, 280px);
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    justify-items: start;
    gap: 10px;
    padding: 8px 14px;
    font-size: 14px;
    text-align: left;
  }

  .pre__reward {
    flex-wrap: wrap;
    justify-content: center;
  }

  .pre__mile {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #8a4700;
  }

  .pre__mile .ico {
    width: 26px;
    height: 26px;
  }

  .buy__art {
    width: 90px;
    height: 90px;
  }

  .buy__art img,
  .buy__art .ico {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .buy__have {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
  }

  .buy__have .ico,
  .buy__have img {
    width: 22px;
    height: 22px;
  }

  .buy__short {
    font-size: 13px;
    color: #c41414;
  }

  .moves__badge {
    display: grid;
    align-content: center;
    justify-items: center;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 30%, #fff8c4 0%, #ffd23a 50%, #f08a00 100%);
    border: 5px solid #fff;
    box-shadow: 0 0 0 4px #8e0f5c, 0 10px 22px rgba(0, 0, 0, 0.35), 0 0 30px rgba(255, 210, 60, 0.7);
    animation: moves-bob 1.6s ease-in-out infinite;
  }

  .moves__badge b {
    font-size: 50px;
    line-height: 0.95;
    --ol: #8e0f5c;
  }

  .moves__badge span {
    font-size: 17px;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8e0f5c;
  }

  :root[data-motion='reduced'] .moves__badge {
    animation: none;
  }

  .moves__goals {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .moves__goals li {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 7px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
  }

  .moves__gicon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
  }

  .moves__gicon img,
  .moves__gicon .ico {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .moves__goals b {
    font-size: 22px;
    --ol: #8e0f5c;
  }

  .moves__buy {
    flex-wrap: nowrap;
  }

  .moves__buy .btn {
    flex: 1 1 0;
    min-width: 0;
    max-width: 160px;
  }

  .moves__have {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 700;
    color: #5a2a6e;
  }

  .moves__have .ico,
  .moves__have img {
    width: 20px;
    height: 20px;
  }

  .moves__have b + .ico,
  .moves__have b + img {
    margin-left: 10px;
  }

  @media (max-height: 680px) {
    .moves__badge {
      width: 86px;
      height: 86px;
      border-width: 4px;
    }

    .moves__badge b {
      font-size: 36px;
    }

    .moves__badge span {
      font-size: 13px;
    }
  }

  .cbuy__list {
    display: grid;
    gap: 6px;
    width: 100%;
  }

  .cbuy__row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    text-align: left;
    font-weight: 700;
  }

  .cbuy__price b {
    color: #c2358f;
  }

  .cbuy__have {
    font-size: 13px;
    color: #7a3a8e;
  }

  .welcome__title {
    font-size: 40px;
    --ol: #8e0f5c;
    color: #ffe45c;
  }

  .welcome__list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
    font-size: 14px;
    color: #5a2a6e;
  }

  .welcome__list li {
    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
  }

  .welcome__list .ico,
  .welcome__list img {
    width: 32px;
    height: 32px;
  }
}

@layer fx {
  @keyframes pop-in {
    0% { opacity: 0; scale: 0.6; rotate: -3deg; }
    60% { opacity: 1; scale: 1.04; rotate: 1deg; }
    100% { opacity: 1; scale: 1; rotate: 0deg; }
  }

  @keyframes pop-out {
    from { opacity: 1; scale: 1; }
    to { opacity: 0; scale: 0.7; translate: 0 30px; }
  }

  @keyframes ribbon-drop {
    from { opacity: 0; translate: 0 -30px; scale: 0.6; }
  }

  @keyframes star-land {
    0% { opacity: 0; scale: 2.4; rotate: -30deg; }
    70% { opacity: 1; scale: 0.9; rotate: 5deg; }
    100% { opacity: 1; scale: 1; rotate: 0deg; }
  }

  @keyframes moves-bob {
    0%, 100% { translate: 0 0; rotate: -3deg; }
    50% { translate: 0 -6px; rotate: 3deg; }
  }

  @keyframes heart-break {
    0% { scale: 0.3; opacity: 0; }
    40% { scale: 1.15; opacity: 1; }
    55% { rotate: -8deg; }
    70% { rotate: 8deg; }
    100% { scale: 1; rotate: 0deg; }
  }

  @keyframes help-flicker {
    0% { scale: 0.92 1; translate: 0 2px; opacity: 0.9; }
    45% { scale: 1.06 1.14; translate: 0 -1px; opacity: 1; }
    100% { scale: 0.97 0.94; translate: 0 1px; opacity: 0.95; }
  }

  @keyframes chest-bounce {
    0% { scale: 0.3; translate: 0 -40px; opacity: 0; }
    60% { scale: 1.12; translate: 0 6px; opacity: 1; }
    100% { scale: 1; translate: 0 0; }
  }
}
