/* wrapped.css - the 点歌总结 cards (static/_share/wrapped.js), in the look of juke.moe's poster: ink outlines, hard shadows, flat colour. Self-contained: it
   brings its own variables, so /me and /share/<id> draw the same. Nothing moves at rest; the cards arrive when scrolled to (`.in`), and `prefers-reduced-motion`
   shows them at once. */
.wr {
  --wr-ink: #1c1847; --wr-line: 3px;
  --wr-sun: #ffb400; --wr-rose: #ff9fb8; --wr-sky: #8ad6ff; --wr-mint: #a6ebb8; --wr-lilac: #cdbcff; --wr-paper: #fffaf0;
  max-width: 640px; margin: 0 auto; display: grid; gap: 22px; color: var(--wr-ink); font: 16px/1.6 system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
.wr-s { position: relative; padding: 26px 24px; border: var(--wr-line) solid var(--wr-ink); box-shadow: 6px 6px 0 var(--wr-ink); background: var(--wr-paper); min-width: 0; overflow-wrap: anywhere; }
.wr-sun { background: var(--wr-sun); } .wr-rose { background: var(--wr-rose); } .wr-sky { background: var(--wr-sky); } .wr-mint { background: var(--wr-mint); } .wr-lilac { background: var(--wr-lilac); }
.wr-ink { background: var(--wr-ink); color: #fff1d6; text-align: center; }
.wr-k { margin: 0 0 6px; font-weight: 800; font-size: 14px; letter-spacing: .06em; }
.wr-title { margin: 0 0 8px; font: 900 clamp(28px, 7vw, 40px)/1.15 system-ui, sans-serif; letter-spacing: -.01em; }
.wr-big { margin: 4px 0 10px; font: 900 clamp(28px, 8vw, 44px)/1.2 system-ui, sans-serif; letter-spacing: -.01em; }
.wr-h { margin: 0 0 8px; font-size: 20px; font-weight: 900; }
.wr-hero { font: 900 clamp(64px, 20vw, 112px)/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: -.02em; margin: 8px 0 0; }
.wr-hero.sm { font-size: clamp(48px, 14vw, 80px); }
.wr-p { margin: 0 0 4px; font-weight: 700; }
.wr-line { margin: 10px 0 0; font-weight: 800; }
.wr-range, .wr-sub2 { margin: 6px 0 0; font-size: 14px; opacity: .72; }
.wr-k2 { margin: 14px 0 6px; font-weight: 800; font-size: 14px; }
.wr-rank { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.wr-rank li { position: relative; isolation: isolate; display: flex; align-items: baseline; gap: 12px; padding: 8px 10px; border: 2px solid var(--wr-ink); background: rgba(255, 255, 255, .45); }
.wr-rank li::before { content: ''; position: absolute; z-index: -1; left: 0; top: 0; bottom: 0; width: var(--w, 100%); background: rgba(28, 24, 71, .14); }
.wr-no { flex: none; min-width: 1.2em; font: 900 18px/1.2 ui-monospace, Menlo, Consolas, monospace; }
.wr-tt { flex: 1 1 auto; min-width: 0; }
.wr-t { font-weight: 800; }
.wr-sub { font-size: 14px; opacity: .72; }
.wr-n { flex: none; font: 800 14px ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.wr-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin: 14px 0 0; padding-bottom: 20px; border-bottom: 3px solid var(--wr-ink); }
.wr-bar { position: relative; flex: 1 1 0; min-width: 0; height: var(--h, 0); background: rgba(28, 24, 71, .35); }
.wr-bar.peak { background: var(--wr-ink); }
.wr-bl { position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%); font-size: 11px; line-height: 20px; white-space: nowrap; font-family: ui-monospace, Menlo, Consolas, monospace; }
.wr-row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 22px; }
.wr-row2 .wr-bars { height: 90px; }
.wr-facts { display: grid; gap: 12px; margin-top: 6px; }
.wr-fact { padding: 10px 12px; border: 2px solid var(--wr-ink); background: rgba(255, 255, 255, .5); }
.wr-fact b { display: block; font: 900 22px/1.3 system-ui, sans-serif; }
.wr-fact span { font-size: 14px; opacity: .8; }
.wr-brand { margin: 0; font: 900 44px/1 system-ui, sans-serif; letter-spacing: -.02em; color: var(--wr-sun); }
.wr-cta { display: inline-block; margin-top: 14px; padding: 10px 18px; color: var(--wr-ink); background: var(--wr-sun); border: var(--wr-line) solid #fff1d6; font-weight: 800; text-decoration: none; transition: transform .12s; }
.wr-cta:hover { transform: translateY(-2px); }
.wr-cta:active { transform: translateY(2px); }
.wr-cta:focus-visible { outline: 3px solid #fff1d6; outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .wr-s { opacity: 0; transform: translateY(24px); transition: opacity .5s, transform .5s cubic-bezier(.3, 1.3, .5, 1); }
  .wr-s.in { opacity: 1; transform: none; }
  .wr-s.in .wr-bar { animation: wr-grow .6s calc(var(--i, 0) * 18ms) cubic-bezier(.3, 1.2, .5, 1) backwards; transform-origin: bottom; }
  .wr-s.in .wr-rank li::before { animation: wr-wide .6s calc(var(--i, 0) * 70ms) cubic-bezier(.22, 1, .36, 1) backwards; transform-origin: left; }
  .wr-rank li { transition: transform .15s; }
  .wr-rank li:hover { transform: translateX(3px); }
}
@keyframes wr-grow { from { transform: scaleY(0); } to { transform: none; } }
@keyframes wr-wide { from { transform: scaleX(0); } to { transform: none; } }

/* covers: the big one of the most requested song, the small ones in the list */
.wr-cover { display: block; width: min(60%, 240px); aspect-ratio: 1; object-fit: cover; margin: 6px 0 10px; border: var(--wr-line) solid var(--wr-ink); box-shadow: 4px 4px 0 var(--wr-ink); background: var(--wr-paper); }
.wr-thumb { flex: none; align-self: center; width: 44px; height: 44px; object-fit: cover; border: 2px solid var(--wr-ink); background: var(--wr-paper); }

/* the playback (Wrapped.play): a full-screen story over the page, one card at a time. Self-contained like the cards. */
.wr-story { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #1c1847; color: #fff1d6; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.wr-prog { display: flex; gap: 4px; padding: max(12px, env(safe-area-inset-top)) 16px 0 16px; padding-right: 64px; }
.wr-seg { flex: 1 1 0; height: 4px; background: rgba(255, 241, 214, .28); overflow: hidden; }
.wr-seg i { display: block; height: 100%; background: #fff1d6; transform: scaleX(0); transform-origin: left; }
.wr-seg.done i, .wr-seg.cur i { transform: none; }
.wr-x { position: absolute; top: max(4px, calc(env(safe-area-inset-top) - 6px)); right: 8px; }
.wr-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; color: #fff1d6; background: transparent; border: 2px solid transparent; border-radius: 50%; cursor: pointer; transition: background-color .15s, transform .12s; }
.wr-btn:hover { background: rgba(255, 241, 214, .16); }
.wr-btn:active { transform: scale(.9); }
.wr-btn:focus-visible { outline: 3px solid #ffb400; outline-offset: 2px; }
.wr-btn:disabled { opacity: .35; cursor: default; background: transparent; transform: none; }
.wr-btn[hidden] { display: none; }
.wr-stage { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; padding: 18px 16px; touch-action: manipulation; }
.wr-stage.wr { display: flex; max-width: none; margin: 0; gap: 0; }
.wr-stage .wr-s { display: none; width: 100%; max-width: 560px; margin: auto; user-select: text; -webkit-user-select: text; }
.wr-stage .wr-s.cur { display: block; }
.wr-stage .wr-ink { border-color: #fff1d6; box-shadow: 6px 6px 0 rgba(255, 241, 214, .35); }
.wr-ctl2 { display: flex; justify-content: center; gap: 10px; padding: 4px 16px max(12px, env(safe-area-inset-bottom)); }
.wr-again { margin: 14px 8px 0; vertical-align: top; font: inherit; font-weight: 800; line-height: 1.5; cursor: pointer; }
.wr-story.paused .wr-seg.cur i { animation-play-state: paused; }
@media (prefers-reduced-motion: no-preference) {
  .wr-seg.cur i { transform: scaleX(0); animation: wr-fill var(--ms, 6000ms) linear forwards; }
  .wr-story { animation: wr-open .22s ease-out; }
  .wr-stage .wr-s.cur .wr-hero { animation: wr-pop .5s cubic-bezier(.3, 1.4, .5, 1) backwards; }
}
@keyframes wr-fill { to { transform: none; } }
@keyframes wr-open { from { opacity: 0; } }
@keyframes wr-pop { from { transform: scale(.8); opacity: 0; } }

/* the playback, dressed: every page is a full-bleed colour with its own shapes behind it, the words large, and what is on a page arriving one after the other */
.wr-story { --bg: #1c1847; --fg: #fff1d6; --dc: rgba(255, 241, 214, .10); --seg: rgba(255, 241, 214, .28); background: var(--bg); color: var(--fg); transition: background-color .4s; }
.wr-story[data-tone="sun"] { --bg: #ffb400; --fg: #1c1847; --dc: rgba(28, 24, 71, .14); --seg: rgba(28, 24, 71, .22); }
.wr-story[data-tone="rose"] { --bg: #ff9fb8; --fg: #1c1847; --dc: rgba(28, 24, 71, .13); --seg: rgba(28, 24, 71, .22); }
.wr-story[data-tone="sky"] { --bg: #8ad6ff; --fg: #1c1847; --dc: rgba(28, 24, 71, .12); --seg: rgba(28, 24, 71, .22); }
.wr-story[data-tone="mint"] { --bg: #a6ebb8; --fg: #1c1847; --dc: rgba(28, 24, 71, .12); --seg: rgba(28, 24, 71, .22); }
.wr-story[data-tone="lilac"] { --bg: #cdbcff; --fg: #1c1847; --dc: rgba(28, 24, 71, .12); --seg: rgba(28, 24, 71, .22); }
.wr-seg { background: var(--seg); }
.wr-seg i { background: var(--fg); }
.wr-btn { color: var(--fg); }
.wr-btn:hover { background: var(--dc); }
.wr-prog, .wr-x, .wr-ctl2 { position: relative; z-index: 3; }
.wr-x { position: absolute; }
.wr-stage { position: relative; z-index: 2; }

/* the shapes behind: a record, a ring and a field of dots; they move with the page number, so turning a page slides them */
.wr-deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.wr-d { position: absolute; display: block; transition: transform .9s cubic-bezier(.22, 1, .36, 1); }
.wr-da { right: 0; bottom: 0; width: 120vmax; height: 120vmax; margin: 0 -50vmax -50vmax 0; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 14px, var(--dc) 14px 16px); transform: rotate(calc(var(--p, 0) * 37deg)) translate(calc(var(--p, 0) * -2vmax), 0); }
.wr-db { left: 6vmin; top: 12vmin; width: 26vmin; height: 26vmin; border: 3px solid var(--dc); border-radius: 50%; transform: translate(calc(var(--p, 0) * 3vmin), calc(var(--p, 0) * 5vmin)); }
.wr-dc { left: 0; top: 0; width: 100%; height: 100%; background: radial-gradient(var(--dc) 2px, transparent 2.5px) 0 0 / 22px 22px; -webkit-mask-image: linear-gradient(135deg, #000, transparent 55%); mask-image: linear-gradient(135deg, #000, transparent 55%); transform: translate(calc(var(--p, 0) * -9px), calc(var(--p, 0) * -6px)); }

/* the strip of words along the bottom of every page */
.wr-marq { position: absolute; left: 0; right: 0; bottom: 74px; z-index: 1; display: flex; white-space: nowrap; overflow: hidden; pointer-events: none; font: 900 clamp(34px, 9vw, 64px)/1 system-ui, sans-serif; letter-spacing: -.01em; color: transparent; -webkit-text-stroke: 2px var(--dc); }
.wr-marq span { flex: none; }

/* the page: no card around it, the colour is the page */
.wr-stage .wr-s, .wr-stage .wr-s.in { opacity: 1; transform: none; transition: none; background: none; border: 0; box-shadow: none; padding: 8px 4px; max-width: 600px; position: relative; text-align: left; overflow-wrap: anywhere; }
.wr-stage .wr-s.wr-ink { text-align: center; }
.wr-stage .wr-k { display: inline-block; margin: 0 0 14px; padding: 5px 14px; font-size: 14px; color: #fff1d6; background: #1c1847; transform: rotate(-2deg); letter-spacing: .08em; }
.wr-stage .wr-title { font-size: clamp(34px, 10vw, 60px); line-height: 1.1; }
.wr-stage .wr-big { font-size: clamp(36px, 11vw, 68px); line-height: 1.1; }
.wr-stage .wr-hero { font-size: clamp(96px, 34vw, 190px); letter-spacing: -.04em; line-height: .95; margin-top: 12px; text-shadow: 6px 6px 0 rgba(255, 255, 255, .55); }
.wr-stage .wr-hero.sm { font-size: clamp(72px, 24vw, 130px); }
.wr-stage .wr-p { font-size: 18px; }
.wr-stage .wr-line { font-size: 18px; margin-top: 18px; }
.wr-stage .wr-range, .wr-stage .wr-sub2 { opacity: .8; }
.wr-stage .wr-rank { gap: 12px; }
.wr-stage .wr-rank li { padding: 12px 14px; border-width: 3px; background: rgba(255, 250, 240, .72); box-shadow: 4px 4px 0 #1c1847; }
.wr-stage .wr-rank li:first-child .wr-t { font-size: 24px; }
.wr-stage .wr-rank li:first-child .wr-no { font-size: 28px; }
.wr-stage .wr-t { font-size: 18px; }
.wr-stage .wr-bars { height: 170px; }
.wr-stage .wr-bar { background: rgba(28, 24, 71, .3); }
.wr-stage .wr-bar.peak { background: #1c1847; box-shadow: 3px 3px 0 rgba(255, 255, 255, .7); }
.wr-stage .wr-row2 .wr-bars { height: 110px; }
.wr-stage .wr-facts { gap: 18px; }
.wr-stage .wr-fact { padding: 14px 16px; border-width: 3px; background: #fffaf0; box-shadow: 5px 5px 0 #1c1847; transform: rotate(-1.4deg); }
.wr-stage .wr-fact:nth-child(even) { transform: rotate(1.2deg); margin-left: 16px; }
.wr-stage .wr-fact b { font-size: 26px; }
.wr-stage .wr-brand { font-size: 64px; }

/* the disc of the song asked for most, with its cover (or the first letter) as the label; and the record of the last page */
.wr-vinyl { position: relative; width: min(62vw, 270px); aspect-ratio: 1; margin: 4px 0 16px; border-radius: 50%; background: repeating-radial-gradient(circle, #14122a 0 2px, #26215a 2px 4px); box-shadow: 6px 6px 0 #1c1847; display: grid; place-items: center; }
.wr-vinyl.big { width: min(52vw, 210px); margin: 0 auto 12px; box-shadow: none; outline: 3px solid #fff1d6; }
.wr-label { width: 54%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #ffb400; color: #1c1847; font: 900 clamp(28px, 9vw, 52px)/1 system-ui, sans-serif; border: 3px solid #14122a; }
.wr-vinyl.big .wr-label { font-size: 30px; }
.wr-lab-img { width: 100%; height: 100%; object-fit: cover; }
.wr-hole { position: absolute; left: 50%; top: 50%; width: 9%; aspect-ratio: 1; margin: -4.5% 0 0 -4.5%; border-radius: 50%; background: #1c1847; border: 2px solid #fff1d6; }
.wr-orb { position: absolute; right: 0; top: -6px; width: 108px; height: 108px; color: #1c1847; }
.wr-stage [data-kind="time"] .wr-big { padding-right: 96px; }

@media (prefers-reduced-motion: no-preference) {
  .wr-stage .wr-s.cur > * { animation: wr-rise .7s cubic-bezier(.2, 1.15, .4, 1) calc(var(--k, 0) * 90ms + 40ms) backwards; }
  .wr-stage .wr-s.cur .wr-rank li { animation: wr-slide .6s cubic-bezier(.2, 1.1, .4, 1) calc(var(--i, 0) * 90ms + 260ms) backwards; }
  .wr-stage .wr-s.cur .wr-fact { animation: wr-stick .55s cubic-bezier(.3, 1.5, .5, 1) calc(var(--i, 0) * 110ms + 200ms) backwards; }
  .wr-stage .wr-s.cur .wr-hero { animation: wr-pop .6s cubic-bezier(.3, 1.4, .5, 1) 80ms backwards; }
  .wr-stage .wr-s.cur .wr-vinyl { animation: wr-rise .7s cubic-bezier(.2, 1.15, .4, 1) backwards; }
  .wr-stage .wr-s.cur .wr-vinyl.big { animation: wr-rise .7s cubic-bezier(.2, 1.15, .4, 1) backwards, wr-spin 16s linear .7s infinite; }
  .wr-stage .wr-s.cur .wr-orb { animation: wr-rise .8s cubic-bezier(.2, 1.15, .4, 1) .2s backwards, wr-bob 4s ease-in-out 1s infinite; }
  .wr-marq span { animation: wr-marq 36s linear infinite; }
  .wr-story.paused * { animation-play-state: paused !important; }
}
@keyframes wr-rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes wr-slide { from { opacity: 0; transform: translateX(-36px); } }
@keyframes wr-stick { from { opacity: 0; transform: scale(.7) rotate(-8deg); } }
@keyframes wr-spin { to { transform: rotate(360deg); } }
@keyframes wr-bob { 50% { transform: translateY(8px) rotate(4deg); } }
@keyframes wr-marq { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .wr-d { transition: none; } .wr-story { transition: none; } }

/* what a page lets the visitor do: the disc to turn, the foil to scratch, the hours to read by dragging */
.wr-story.wait .wr-seg.cur i { animation-play-state: paused; }
.wr-vinyl[data-act] { cursor: grab; touch-action: none; }
.wr-vinyl.grab { cursor: grabbing; }
.wr-hint { margin: 0 0 8px; font-size: 14px; font-weight: 700; opacity: .75; }
.wr-scratch { position: relative; display: block; margin: 4px 0 8px; min-height: 76px; }
.wr-scratch .wr-big { margin: 0; padding: 6px 4px; }
.wr-foil { position: absolute; left: 0; top: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; border: 3px solid #1c1847; box-shadow: 4px 4px 0 #1c1847; transition: opacity .5s; }
.wr-foil.gone { opacity: 0; pointer-events: none; }
.wr-peek { margin: 0 0 14px; min-height: 40px; padding: 0 16px; font: inherit; font-weight: 800; color: #1c1847; background: #fffaf0; border: 3px solid #1c1847; box-shadow: 3px 3px 0 #1c1847; cursor: pointer; }
.wr-peek:active { transform: translate(3px, 3px); box-shadow: none; }
.wr-peek:focus-visible { outline: 3px solid #1c1847; outline-offset: 3px; }
.wr-peek[hidden], .wr-hint[hidden], .wr-read em[hidden] { display: none; }
.wr-read { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 14px 0 2px; min-height: 64px; }
.wr-read b { font: 900 clamp(44px, 14vw, 72px)/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: -.03em; }
.wr-read span { font: 800 22px ui-monospace, Menlo, Consolas, monospace; }
.wr-read em { flex: 1 0 100%; font-style: normal; font-size: 14px; font-weight: 700; opacity: .75; }
.wr-bars[data-act] { cursor: ew-resize; touch-action: pan-y; }
.wr-bars:focus-visible { outline: 3px solid #1c1847; outline-offset: 6px; }
.wr-stage .wr-bar.sel { background: #1c1847; box-shadow: 3px 3px 0 rgba(255, 255, 255, .7); }
.wr-stage .wr-bar.peak:not(.sel) { background: rgba(28, 24, 71, .55); box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
  .wr-bar { transition: background-color .12s; }
  .wr-stage .wr-s.revealed .wr-scratch .wr-big { animation: wr-pop .6s cubic-bezier(.3, 1.4, .5, 1); }
}

/* the pages made for the playback: the opening, the countdown, the artist under foil */
.wr-stage .wr-year { font-size: clamp(110px, 38vw, 210px); letter-spacing: -.05em; margin: 4px 0 6px; }
.wr-stage [data-kind="intro"] .wr-title { margin-top: 0; }
.wr-count { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.wr-count li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: rgba(255, 250, 240, .78); border: 3px solid #1c1847; box-shadow: 5px 5px 0 #1c1847; }
.wr-count .wr-no { flex: none; min-width: 1.1em; font: 900 44px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: -.04em; }
.wr-count .wr-tt { flex: 1 1 auto; min-width: 0; }
.wr-count .wr-t { font-size: 20px; }
.wr-count li.last { background: #1c1847; color: #fff1d6; box-shadow: 5px 5px 0 rgba(255, 255, 255, .6); }
.wr-count li.last .wr-sub { opacity: .8; }
.wr-stage [data-kind="artists"]:not(.revealed) .wr-after { display: none; }
.wr-more { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.wr-chip { padding: 6px 14px; font-weight: 800; background: #fffaf0; border: 3px solid #1c1847; box-shadow: 3px 3px 0 #1c1847; }
@media (prefers-reduced-motion: no-preference) {
  .wr-stage .wr-s.cur .wr-count li { animation: wr-drop .7s cubic-bezier(.3, 1.4, .5, 1) var(--d, 0s) backwards; }
  .wr-stage .wr-s.cur .wr-chip, .wr-stage .wr-s.cur   .wr-stage .wr-s.cur }
@keyframes wr-drop { from { opacity: 0; transform: translateY(-48px) scale(.9); } }
