/* Legacy — the home scene (homescene.js), the legacy vote (votes.js), world records (records.js), the life replay (replay.js) */

/* ---------- your home on the Life tab ---------- */
.hs-card { padding: 0 !important; overflow: hidden; }
.hs-frame { position: relative; aspect-ratio: 360 / 190; border-radius: inherit; overflow: hidden; background: #5fb3ff; }
.hs-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hs-label { position: absolute; left: 10px; top: 10px; padding: 6px 12px 6px 10px; border-radius: 14px; background: rgb(0 0 0 / .38); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 2px 10px rgb(0 0 0 / .2); max-width: 70%; }
.hs-label b { display: block; font-size: .82rem; line-height: 1.2; } .hs-label small { font-size: .68rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.hs-friend { margin: 12px 0 4px; border-radius: 16px; overflow: hidden; position: relative; aspect-ratio: 360 / 190; }
.hs-friend .hs-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hs-friend small { position: absolute; left: 8px; top: 8px; padding: 4px 10px; border-radius: 10px; background: rgb(0 0 0 / .4); color: #fff; font-weight: 700; font-size: .7rem; }

/* ---------- the legacy vote on the death screen ---------- */
.vt { margin: 12px 0 4px; cursor: pointer; }
.vt-skip { margin: -4px 0 8px; text-align: center; font-size: .68rem; opacity: .6; }
.vt.now .vt-skip { display: none; }
.vt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.vt-ballot { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: rgb(127 127 127 / .1); text-align: center; min-width: 0;
  opacity: 0; transform: translateY(14px) rotateX(70deg); animation: vtIn .5s var(--d) cubic-bezier(.2, 1.4, .3, 1) forwards; }
.vt.now .vt-ballot, .vt.now .vt-verdict { animation-delay: 0s !important; animation-duration: .2s; }
.vt-ballot .av { width: 34px; height: 34px; font-size: 18px; }
.vt-crowd { display: grid; place-items: center; border-radius: 50%; background: rgb(127 127 127 / .2); }
.vt-ballot b { font-size: .7rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vt-ballot small { font-size: .6rem; opacity: .65; }
.vt-ballot em { font-style: normal; font-weight: 800; font-size: .66rem; padding: 1px 7px; border-radius: 99px; margin-top: 2px; }
.vt-ballot.vt-hero em { background: #fef3c7; color: #92400e; } .vt-ballot.vt-villain em { background: #fee2e2; color: #991b1b; } .vt-ballot.vt-forgotten em { background: #e5e7eb; color: #4b5563; }
@keyframes vtIn { to { opacity: 1; transform: none; } }
.vt-verdict { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 14px 16px; border-radius: 16px; color: #fff; opacity: 0; transform: scale(.7); animation: vtVerdict .8s var(--d) cubic-bezier(.2, 1.6, .3, 1) forwards; position: relative; overflow: hidden; }
.vt-verdict::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .45) 50%, transparent 65%); background-size: 260% 100%; animation: vtShine 3s calc(var(--d) + .6s) ease-in-out infinite; }
.vt-verdict.vt-hero { background: linear-gradient(135deg, #f59e0b, #fde68a 60%, #fbbf24); color: #3a2400; box-shadow: 0 0 28px rgb(251 191 36 / .55); }
.vt-verdict.vt-villain { background: linear-gradient(135deg, #3b0a14, #991b1b 60%, #450a0a); box-shadow: 0 0 28px rgb(220 38 38 / .5); }
.vt-verdict.vt-forgotten { background: linear-gradient(135deg, #4b5563, #9ca3af 60%, #6b7280); }
.vt-ic { font-size: 40px; line-height: 1; filter: drop-shadow(0 2px 6px rgb(0 0 0 / .3)); }
.vt-verdict small { display: block; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; } .vt-verdict b { display: block; font: 900 1.5rem/1.15 Georgia, serif; text-transform: capitalize; } .vt-verdict em { font-style: normal; font-size: .72rem; opacity: .85; }
@keyframes vtVerdict { to { opacity: 1; transform: none; } }
@keyframes vtShine { 0%, 60% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
.vt-badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .65rem; font-weight: 800; }
.rp-open { width: 100%; margin: 10px 0 2px; }

/* ---------- world records ---------- */
.rc-list { display: grid; gap: 8px; margin-top: 8px; }
.rc-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgb(127 127 127 / .1); }
.rc-row.mine { background: linear-gradient(135deg, rgb(255 216 74 / .22), rgb(255 150 60 / .12)); box-shadow: inset 0 0 0 1.5px rgb(255 200 60 / .7); }
.rc-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: rgb(127 127 127 / .18); }
.rc-txt b { display: block; font-size: .88rem; } .rc-txt small { display: block; font-size: .7rem; opacity: .75; } .rc-txt .rc-my { opacity: .55; }
.rc-v { font-weight: 900; font-size: .9rem; text-align: right; max-width: 120px; overflow-wrap: anywhere; }

/* ---------- the life replay ---------- */
.rp { position: fixed; inset: 0; z-index: 10001; background: #000; display: grid; place-items: center; animation: rpIn .4s ease-out both; }
.rp.out { animation: rpOut .35s ease-in forwards; }
@keyframes rpIn { from { opacity: 0; } } @keyframes rpOut { to { opacity: 0; } }
.rp canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.rp-bar { position: absolute; left: 16px; right: 16px; top: calc(14px + env(safe-area-inset-top)); height: 3px; border-radius: 3px; background: rgb(255 255 255 / .2); overflow: hidden; }
.rp-bar i { display: block; height: 100%; width: 0; background: #fff; }
.rp-skip { position: absolute; right: 14px; top: calc(28px + env(safe-area-inset-top)); padding: 8px 14px; border: 0; border-radius: 99px; background: rgb(255 255 255 / .16); color: #fff; font: 800 13px var(--f-body, sans-serif); cursor: pointer; backdrop-filter: blur(6px); }
.rp.ended .rp-skip { display: none; }
.rp-end { position: absolute; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); display: none; padding: 16px; border-radius: 20px; background: rgb(15 10 30 / .82); color: #fff; backdrop-filter: blur(10px); text-align: center; animation: rpUp .5s cubic-bezier(.2, 1.3, .3, 1) both; }
.rp.ended .rp-end { display: block; }
.rp-end b { display: block; margin-bottom: 10px; } .rp-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rp-auto { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 10px; font-size: .75rem; opacity: .8; }
@keyframes rpUp { from { opacity: 0; transform: translateY(30px); } }
@media (prefers-reduced-motion: reduce) { .vt-ballot, .vt-verdict { animation-duration: .01s !important; animation-delay: 0s !important; } .vt-verdict::after { animation: none; } }

/* ---------- the reputation map (famemap.js) ---------- */
.fm-top { display: flex; align-items: center; gap: 14px; margin: 2px 0 10px; }
.fm-gauge { --v: 0; flex: none; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; align-content: center; text-align: center; position: relative;
  background: conic-gradient(#ffb000 calc(var(--v) * 1%), rgb(127 127 127 / .22) 0); box-shadow: 0 0 18px rgb(255 176 0 / .3); }
.fm-gauge::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--card, #1d1830); }
.fm-gauge b, .fm-gauge small { position: relative; } .fm-gauge b { font: 900 1.5rem/1 Georgia, serif; } .fm-gauge small { font-size: .55rem; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.fm-top-t b { display: block; font-size: .95rem; } .fm-top-t small { font-size: .72rem; opacity: .75; }
.fm-map { position: relative; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgb(0 0 0 / .3), inset 0 0 0 1px rgb(127 180 255 / .25); }
.fm-svg { display: block; width: 100%; height: auto; }
.fm-svg polygon[data-fr] { transition: filter .2s; } .fm-svg polygon[data-fr]:hover { filter: brightness(1.25); }
.fm-legend { position: absolute; left: 8px; bottom: 6px; display: flex; align-items: center; gap: 6px; font-size: .58rem; color: #fff; opacity: .85; }
.fm-legend i { order: 1; width: 60px; height: 6px; border-radius: 6px; background: linear-gradient(90deg, rgb(38 48 77), rgb(61 96 184), rgb(140 90 255), rgb(255 140 40), rgb(255 225 100)); } .fm-legend span:last-child { order: 2; }
.fm-sel { display: flex; align-items: center; gap: 12px; margin: 12px 0 8px; padding: 10px 12px; border-radius: 14px; background: rgb(127 127 127 / .1); }
.fm-sel-ic { font-size: 30px; } .fm-sel > div { flex: 1; min-width: 0; } .fm-sel b { font-size: .92rem; } .fm-sel small { font-size: .7rem; opacity: .7; }
.fm-bar { height: 7px; border-radius: 7px; background: rgb(127 127 127 / .22); overflow: hidden; margin: 5px 0 3px; } .fm-bar i { display: block; height: 100%; border-radius: 7px; transition: width .4s; }
.fm-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .fm-acts .btn { display: grid; gap: 2px; } .fm-acts small { font-size: .62rem; opacity: .8; font-weight: 600; }
.fm-list { display: grid; gap: 4px; margin-top: 12px; }
.fm-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 90px 28px; align-items: center; gap: 8px; padding: 6px 10px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fm-row.on { background: rgb(255 216 74 / .14); box-shadow: inset 0 0 0 1.5px rgb(255 200 60 / .6); } .fm-row b { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fm-row em { font-style: normal; font-weight: 900; font-size: .8rem; text-align: right; } .fm-row .fm-bar { margin: 0; }
.fm-mini { margin: 10px 0 4px; border-radius: 14px; overflow: hidden; position: relative; } .fm-mini small { position: absolute; left: 8px; top: 6px; padding: 3px 9px; border-radius: 10px; background: rgb(0 0 0 / .45); color: #fff; font-weight: 800; font-size: .68rem; }

/* ---------- the home scene, bigger, with a full screen button ---------- */
.hs-card { margin-inline: -8px; border-radius: 22px !important; }
.hs-card .hs-label { left: 8px; top: 8px; padding: 4px 10px 4px 8px; }
.hs-fs { position: absolute; right: 10px; top: 10px; z-index: 2; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 12px; cursor: pointer;
  color: #fff; background: rgb(0 0 0 / .42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 2px 10px rgb(0 0 0 / .25); transition: transform .15s, background .15s; }
.hs-fs svg { width: 20px; height: 20px; } .hs-fs:hover { transform: scale(1.08); background: rgb(0 0 0 / .6); } .hs-fs:active { transform: scale(.94); }
.hs-full { position: fixed; inset: 0; z-index: 10002; background: #000; display: grid; place-items: center; animation: rpIn .3s ease-out both; }
.hs-full-stage { position: relative; width: min(100vw, calc(100vh * 360 / 190)); aspect-ratio: 360 / 190; }
.hs-full-stage .hs-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hs-full-label { position: absolute; left: calc(14px + env(safe-area-inset-left)); top: calc(14px + env(safe-area-inset-top)); font-size: 1.1em; }
.hs-full-x { position: absolute; right: calc(14px + env(safe-area-inset-right)); top: calc(14px + env(safe-area-inset-top)); width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  color: #fff; font-size: 20px; background: rgb(255 255 255 / .16); backdrop-filter: blur(6px); }
.hs-full-tip { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); left: 0; right: 0; margin: 0; text-align: center; color: rgb(255 255 255 / .6); font-size: .75rem; }
@media (orientation: landscape) { .hs-full-tip { display: none; } }
