@layer components {
  .sheet__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
  }

  .sheet__bg--events {
    background: radial-gradient(120% 70% at 50% 0%, #8b3fd4 0%, #4a1478 55%, #22063f 100%);
  }

  .sheet__bg--social {
    background: radial-gradient(120% 70% at 50% 0%, #2f8ee0 0%, #184f9e 55%, #0c2452 100%);
  }

  .sheet__bg--shop {
    background: radial-gradient(120% 70% at 50% 0%, #ff7ac6 0%, #b8338f 45%, #4a0f6e 100%);
  }

  .sheet__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.04) 0 26px, rgba(255, 255, 255, 0) 26px 52px);
  }

  .sheet__head {
    display: flex;
    justify-content: center;
    padding: 4px 16px 8px;
  }

  .sheet__title {
    font-size: 34px;
    --ol: #3b0d4a;
  }

  .sheet__scroll {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 6px 12px 24px;
    display: grid;
    align-content: start;
    gap: 16px;
  }

  .sheet__foot {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
  }

  .ev {
    width: min(620px, 100%);
    justify-self: center;
  }

  .ev.is-flash .evcard {
    animation: mm-hit 0.5s var(--ease-pop) 0.4s;
  }

  .evcard {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 26px;
    background: linear-gradient(180deg, #fff9fd, #ffe6f3);
    border: 5px solid #c2358f;
    box-shadow: 0 0 0 3px #fff, 0 12px 26px rgba(10, 0, 30, 0.45);
    color: var(--ink);
    animation: mm-rise 0.45s var(--ease-pop) both;
  }

  .ev--goals .evcard { animation-delay: 0.06s; border-color: #1a70d4; }
  .ev--journey .evcard { animation-delay: 0.12s; border-color: #e0a21a; }
  .ev--milestones .evcard { animation-delay: 0.18s; border-color: #14b27a; }

  .evcard__head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .evcard__head h3 {
    font-size: 22px;
    color: #3b0d4a;
    -webkit-text-stroke: 0;
    text-shadow: 0 2px 0 rgba(194, 53, 143, 0.25);
  }

  .evcard__icon {
    width: 48px;
    height: 48px;
  }

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

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

  .evcard__timer {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 99px;
    background: #3b0d4a;
    color: #fff;
    font-size: 13px;
  }

  .evcard__timer .ico {
    width: 16px;
    height: 16px;
  }

  .evcard__foot {
    display: flex;
    justify-content: center;
  }

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

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

  .puzzle__body {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, #2a2a6e, #151540);
    color: #fff;
  }

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

  .puzzle__tier span {
    margin-right: 8px;
  }

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

  .puzzle__tier i.is-on {
    opacity: 1;
    filter: none;
  }

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

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

  .puzzle__goals li {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .puzzle__goals li span {
    width: 30px;
    height: 30px;
  }

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

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

  .dgoals {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .dgoal {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 0 2px rgba(26, 112, 212, 0.2);
  }

  .dgoal.is-done {
    background: linear-gradient(180deg, #fffbd0, #fff0a0);
  }

  .dgoal.is-claimed {
    opacity: 0.65;
  }

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

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

  .dgoal__main {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .dgoal__label {
    font-weight: 700;
    font-size: 15px;
  }

  .dgoal .bar {
    height: 20px;
  }

  .dgoal__num {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  }

  .dgoal__tick {
    width: 34px;
    height: 34px;
  }

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

  .dbonus {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, #e8e0f0, #cfc2de);
  }

  .dbonus.is-ready {
    background: linear-gradient(180deg, #fff6c6, #ffd65a);
    box-shadow: 0 0 18px rgba(255, 210, 60, 0.8);
  }

  .dbonus__chest {
    width: 54px;
    height: 54px;
  }

  .dbonus.is-ready .dbonus__chest {
    animation: mm-wiggle 0.6s ease-in-out infinite;
  }

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

  .dbonus__text {
    display: grid;
    gap: 6px;
  }

  .dbonus__text b {
    font-size: 17px;
  }

  .journey {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 8px 4px 14px;
    scroll-snap-type: x proximity;
  }

  .journey__track {
    position: relative;
    display: flex;
    gap: 16px;
    width: max-content;
    padding: 0 8px;
  }

  .journey__track::before {
    content: '';
    position: absolute;
    left: 24px;
    right: 24px;
    top: 22px;
    height: 10px;
    border-radius: 99px;
    background: repeating-linear-gradient(90deg, #ffd44a 0 16px, #fff 16px 26px);
    box-shadow: 0 0 0 3px #8a4700;
  }

  .jstep {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 8px;
    width: 128px;
    scroll-snap-align: start;
  }

  .jstep__num {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 30%, #fff, #d9cde8 70%);
    border: 4px solid #fff;
    box-shadow: 0 0 0 3px #3b0d4a;
    font-size: 24px;
    color: #3b0d4a;
  }

  .jstep__num .ico {
    width: 70%;
    height: 70%;
  }

  .jstep[data-state='claimed'] .jstep__num {
    background: radial-gradient(circle at 50% 30%, #d9ffc2, #3fbf12 70%);
    color: #fff;
  }

  .jstep[data-state='current'] .jstep__num {
    background: radial-gradient(circle at 50% 30%, #fffbd0, #ffc21a 70%);
    animation: mm-pulse 1.1s ease-in-out infinite;
  }

  .jstep__card {
    display: grid;
    justify-items: center;
    gap: 10px;
    width: 100%;
    min-height: 136px;
    align-content: space-between;
    padding: 12px 8px 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 0 0 2px rgba(224, 162, 26, 0.35), 0 6px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
  }

  .jstep[data-state='locked'] .jstep__card {
    filter: grayscale(0.5);
    opacity: 0.8;
  }

  .jstep[data-state='current'] .jstep__card {
    background: linear-gradient(180deg, #fffbe8, #fff0b0);
    box-shadow: inset 0 0 0 3px #ffb21f, 0 0 20px rgba(255, 200, 60, 0.7);
  }

  .jstep__rewards .rchips {
    justify-content: center;
  }

  .jstep__done,
  .jstep__lock {
    display: grid;
    justify-items: center;
    width: 30px;
    height: 30px;
  }

  .jstep__done .ico,
  .jstep__lock .ico {
    width: 100%;
    height: 100%;
  }

  .jstep__lock {
    width: auto;
    font-size: 12px;
    font-weight: 700;
  }

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

  .jstep--end .jstep__card {
    font-size: 13px;
  }

  .miles {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mile {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
  }

  .mile.is-ready {
    background: linear-gradient(180deg, #fff6c6, #ffe07a);
    box-shadow: 0 0 14px rgba(255, 200, 60, 0.7);
  }

  .mile__lvl {
    font-size: 20px;
    color: #14b27a;
  }

  .mile__left {
    font-size: 12px;
    font-weight: 700;
    color: #7a3a8e;
  }

  .social__you {
    width: min(620px, 100%);
    justify-self: center;
  }

  .syou {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 24px;
    background: linear-gradient(180deg, #fff9fd, #e3f1ff);
    border: 4px solid #1a70d4;
    box-shadow: 0 0 0 3px #fff, 0 10px 22px rgba(0, 0, 0, 0.35);
    color: var(--ink);
    animation: mm-rise 0.4s var(--ease-pop) both;
  }

  .syou__text {
    display: grid;
    gap: 4px;
    font-size: 14px;
    --text: #3b0d4a;
  }

  .syou__text .cos-name {
    font-size: 20px;
  }

  .syou__text .ico {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: -2px;
  }

  .syou__rank {
    display: grid;
    justify-items: center;
    font-size: 12px;
    color: #1a70d4;
  }

  .syou__rank b {
    font-size: 28px;
    color: #1a70d4;
  }

  .social__tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
  }

  .social__tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-weight: 700;
    color: #fff;
  }

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

  .social__tab.is-on {
    background: linear-gradient(180deg, #fff, #d9ecff);
    color: #1a70d4;
  }

  .social__list {
    display: grid;
    gap: 8px;
    width: min(620px, 100%);
    justify-self: center;
  }

  .social__loading {
    display: grid;
    place-items: center;
    padding: 30px;
  }

  .social__empty,
  .social__guest {
    padding: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
  }

  .social__guest .ico {
    width: 22px;
    height: 22px;
    display: inline-block;
    vertical-align: -5px;
  }

  .srow {
    display: grid;
    grid-template-columns: 42px auto 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    text-align: left;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
    animation: mm-rise 0.35s var(--ease-pop) both;
    animation-delay: calc(var(--i) * 0.03s);
    --text: #3b0d4a;
  }

  .srow--r1 { background: linear-gradient(180deg, #fff6c6, #ffe07a); }
  .srow--r2 { background: linear-gradient(180deg, #f4f7ff, #d6dcf0); }
  .srow--r3 { background: linear-gradient(180deg, #ffe2c8, #f5b98a); }

  .srow__rank {
    position: relative;
    display: grid;
    place-items: center;
    font-size: 20px;
    color: #1a70d4;
  }

  .srow__rank .ico {
    position: absolute;
    top: -14px;
    width: 26px;
    height: 26px;
  }

  .srow__who {
    display: grid;
    min-width: 0;
  }

  .srow__who .cos-name {
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .srow__who small {
    font-size: 12px;
    color: #7a6a8e;
  }

  .srow__who .cos-badge {
    width: 18px;
    height: 18px;
  }

  .srow__lvl {
    display: grid;
    justify-items: center;
    font-size: 11px;
    color: #7a6a8e;
  }

  .srow__lvl b {
    font-size: 20px;
    color: #c2358f;
  }

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

  .srow__stars .ico {
    width: 20px;
    height: 20px;
  }
}
