:root {
  --bg: #0f131a;
  --panel: #e9ecef;
  --ink: #ffffff;
  --line: #d4d8df;
  --active: #19bf88;
  --stage-gap-y: clamp(18px, 4vh, 36px);
  --stage-gap-x: clamp(10px, 2vw, 24px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
}

.stage {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--stage-gap-y) var(--stage-gap-x);
}

.phone-shell {
  width: min(calc(100vw - 2 * var(--stage-gap-x)), calc((100vh - 2 * var(--stage-gap-y)) * 0.628));
  height: min(calc(100vh - 2 * var(--stage-gap-y)), calc((100vw - 2 * var(--stage-gap-x)) / 0.628));
  background: var(--panel);
  overflow: hidden;
  border-radius: clamp(8px, 1.2vh, 14px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.phone-status-bar {
  height: 4.6%;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3.4%;
  color: #5f6470;
  font-size: clamp(10px, 1.8vh, 16px);
  background: #efefef;
}

.phone-top-nav {
  height: 10.2%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 2%;
  padding: 0 3%;
  background: #efefef;
}

.nav-circle {
  position: relative;
  width: clamp(38px, 7.3vh, 58px);
  height: clamp(38px, 7.3vh, 58px);
  border-radius: 50%;
  border: none;
  background: #dfe5ec;
  color: #6f7d95;
  font-size: clamp(18px, 3.2vh, 28px);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.nav-circle i {
  line-height: 1;
  transform: translateY(1px);
}

.nav-circle.active[data-screen="home"] { background: #1dbf8c; color: #fff; }
.nav-circle.active[data-screen="homework"] { background: #2d95ea; color: #fff; }
.nav-circle.active[data-screen="library"] { background: #8d56c4; color: #fff; }
.nav-circle.active[data-screen="favorites"] { background: #f05f72; color: #fff; }
.nav-circle.active[data-screen="settings"] { background: #6c7d97; color: #fff; }

.nav-circle.with-badge::after {
  content: attr(data-badge);
  position: absolute;
  right: -3px;
  top: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 5px;
  background: #ff4d5f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.phone-divider {
  height: 0.24%;
  min-height: 1px;
  background: #cfd4db;
}

.phone-shell.player-mode .phone-top-nav,
.phone-shell.player-mode .phone-divider {
  display: none;
}

.phone-shell.player-mode .phone-screen {
  height: 95.4%;
}

.phone-shell.minimal-mode .phone-status-bar,
.phone-shell.minimal-mode .phone-top-nav,
.phone-shell.minimal-mode .phone-divider {
  display: none;
}

.phone-shell.minimal-mode .phone-screen {
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.phone-shell.appearance-mode .phone-top-nav,
.phone-shell.appearance-mode .phone-divider {
  display: none;
}

.phone-shell.appearance-mode .phone-screen {
  height: 95.4%;
  padding: 0;
  overflow: hidden;
}

.phone-screen {
  height: 85%;
  padding: 2.7% 3%;
  overflow: auto;
}

.app-screen {
  display: none;
}

.app-screen.active {
  display: block;
}

.profile-card {
  position: relative;
  border-radius: 18px;
  padding: 2.8%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.8%;
  align-items: start;
  color: var(--ink);
  background: linear-gradient(160deg, #f9a55a 0%, #f68f4f 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 6px 14px rgba(26, 30, 38, 0.22);
}

.profile-card.clickable {
  cursor: pointer;
}

.profile-card.clickable:active {
  transform: scale(0.998);
}

.minimal-screen {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 54% 79%, rgba(52, 74, 112, 0.46) 0%, rgba(14, 24, 45, 0.18) 42%, transparent 72%),
    linear-gradient(180deg, #020718 0%, #071126 48%, #172943 100%);
  color: #dbe2f2;
}

.app-screen.minimal-screen.active {
  display: block;
}

.minimal-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 64px;
  padding: 14px 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.minimal-top-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(12px, 1.7vh, 15px);
  font-weight: 700;
  color: rgba(238, 244, 255, 0.9);
}

.minimal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(239, 244, 255, 0.72);
  font-size: 30px;
  display: grid;
  place-items: center;
  padding: 0;
}

.minimal-counter {
  position: absolute;
  left: 0;
  right: 0;
  top: 86px;
  color: rgba(222, 230, 242, 0.75);
  font-size: clamp(13px, 1.8vh, 16px);
  font-weight: 700;
  text-align: center;
}

.minimal-main {
  position: absolute;
  left: 0;
  right: 0;
  top: 43%;
  transform: translateY(-36%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0 18px;
}

.minimal-control-row {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 18px;
}

.minimal-skip-btn {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(91, 103, 124, 0.55);
  color: rgba(242, 246, 255, 0.92);
  font-size: 28px;
}

.minimal-play-btn {
  width: clamp(126px, 21vh, 164px);
  height: clamp(126px, 21vh, 164px);
  border-radius: 50%;
  border: none;
  background: linear-gradient(165deg, #4f8ef2 0%, #3f7ee8 100%);
  color: #eef5ff;
  font-size: clamp(52px, 7.4vh, 64px);
  display: grid;
  place-items: center;
  box-shadow: none;
  padding-left: 4px;
}

.minimal-screen.focus-active .minimal-play-btn {
  background: #343e52;
  color: rgba(238, 245, 255, 0.72);
  font-size: clamp(50px, 7vh, 62px);
}

.minimal-time-line {
  margin-top: 0;
  color: rgba(218, 226, 241, 0.65);
  font-size: clamp(13px, 1.8vh, 16px);
  font-weight: 600;
}

.minimal-track-title {
  margin: 48px 0 0;
  color: rgba(218, 226, 241, 0.56);
  font-size: clamp(16px, 2.4vh, 22px);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
}

.minimal-bottom {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  transform: none;
  width: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.minimal-source-switch {
  width: fit-content;
  padding: 4px;
  border-radius: 18px;
  background: rgba(89, 103, 126, 0.58);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.minimal-source-btn {
  border: none;
  min-width: 68px;
  height: 40px;
  border-radius: 13px;
  background: transparent;
  color: #c7d0df;
  font-size: clamp(13px, 1.85vh, 16px);
  font-weight: 700;
  padding: 0 11px;
}

.minimal-source-btn.active {
  background: #f1f4f9;
  color: #2c374c;
  box-shadow: 0 2px 5px rgba(16, 26, 45, 0.24);
}

.minimal-focus-btn {
  min-width: 104px;
  height: 44px;
  border: 1px solid rgba(179, 151, 79, 0.5);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(115, 96, 54, 0.2);
  color: rgba(219, 191, 112, 0.82);
  font-size: clamp(13px, 1.75vh, 15px);
  font-weight: 800;
}

.minimal-focus-btn.active {
  min-width: 88px;
  background: #d5a520;
  border-color: rgba(255, 232, 146, 0.7);
  color: #fff;
}

.minimal-screen.focus-active .minimal-source-switch {
  opacity: 0.34;
}

.focus-challenge-modal {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 7, 18, 0.58);
}

.focus-challenge-modal.hidden {
  display: none;
}

.focus-challenge-card {
  width: min(408px, 100%);
  border-radius: 22px;
  background: #1f2d43;
  color: #eef4ff;
  padding: 24px 20px 26px;
  text-align: center;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.focus-lock-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  color: #e8eef8;
  font-size: 29px;
}

.focus-challenge-card h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.focus-challenge-card p {
  margin: 10px 0 22px;
  color: rgba(226, 233, 244, 0.72);
  font-size: 14px;
}

.focus-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.focus-options button {
  min-height: 64px;
  border: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  gap: 4px;
  background: #3b485a;
  color: #fff;
}

.focus-options strong {
  font-size: 16px;
  line-height: 1;
}

.focus-options span {
  color: rgba(225, 233, 245, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.focus-cancel {
  margin-top: 30px;
  border: none;
  background: transparent;
  color: rgba(225, 233, 245, 0.6);
  font-size: 15px;
}

.focus-confirm-card {
  width: min(432px, 100%);
  border-radius: 22px;
  background: #1f2d43;
  color: #eef4ff;
  padding: 26px 24px 24px;
  text-align: center;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.focus-confirm-lock {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(160, 45, 72, 0.52);
  color: #ff7d94;
  font-size: 31px;
}

.focus-confirm-card h3 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.focus-confirm-message {
  margin-top: 18px;
  border-radius: 10px;
  padding: 17px 18px;
  background: #2b3a4f;
  color: #ffe75a;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

.focus-confirm-message strong {
  color: #fff;
}

.focus-confirm-actions {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 14px;
  align-items: center;
}

.focus-confirm-cancel,
.focus-confirm-submit {
  min-height: 50px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
}

.focus-confirm-cancel {
  background: transparent;
  color: rgba(225, 233, 245, 0.62);
}

.focus-confirm-submit {
  background: #3f82ee;
  color: #fff;
}

.minimal-exit-modal {
  z-index: 70;
  background: rgba(2, 8, 21, 0.68);
}

.minimal-exit-card {
  width: min(440px, 92%);
  border-radius: 18px;
  background: #efecf4;
  padding: 24px 24px 20px;
}

.minimal-exit-card h3 {
  margin: 0;
  text-align: center;
  color: #1f2a3a;
  font-size: clamp(22px, 3.4vh, 34px);
  font-weight: 700;
}

.minimal-exit-dots {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.minimal-exit-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #dde3eb;
}

.minimal-exit-dots span.filled {
  background: #8ea0b8;
}

.minimal-exit-pad {
  margin: 18px auto 0;
  width: min(246px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 12px;
}

.minimal-exit-key {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border: none;
  border-radius: 50%;
  background: #e8edf2;
  color: #1f2b3d;
  font-size: clamp(18px, 2.8vh, 30px);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.minimal-exit-key.weak {
  color: #667994;
  font-size: clamp(14px, 2vh, 21px);
}

.minimal-exit-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 20px;
}

.minimal-exit-action-btn {
  border: none;
  background: transparent;
  color: #2f8dff;
  font-size: clamp(16px, 2.2vh, 24px);
  padding: 8px 2px;
}

.profile-card::before {
  content: "";
  position: absolute;
  right: 3%;
  top: 8%;
  width: 27%;
  height: 64%;
  border-radius: 999px;
  background: rgba(255, 191, 143, 0.28);
}

.avatar {
  width: clamp(34px, 5.8vh, 54px);
  height: clamp(34px, 5.8vh, 54px);
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: clamp(16px, 3.2vh, 28px);
  z-index: 1;
}

.profile-main,
.profile-side {
  z-index: 1;
}

.profile-main h2 {
  margin: 0;
  font-size: clamp(15px, 2.8vh, 27px);
  font-weight: 700;
}

.profile-main p {
  margin: 1.2% 0 0;
  display: inline-block;
  font-size: clamp(10px, 1.7vh, 18px);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.profile-side {
  display: grid;
  justify-items: end;
  gap: 8%;
}

.seed-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  font-size: clamp(10px, 1.6vh, 18px);
}

.points-pill {
  font-size: clamp(10px, 1.8vh, 20px);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.profile-line {
  grid-column: 1 / -1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

.feature-grid {
  margin-top: 2.7%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5%;
}

.feature-card {
  border: none;
  border-radius: 22px;
  color: #fff;
  padding: 6%;
  min-height: clamp(150px, 29vh, 255px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14%;
  cursor: pointer;
  box-shadow: 0 8px 14px rgba(35, 41, 55, 0.24);
}

.feature-icon {
  width: clamp(42px, 8.4vh, 78px);
  height: clamp(42px, 8.4vh, 78px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: clamp(22px, 4vh, 40px);
  background: rgba(255, 255, 255, 0.2);
}

.feature-icon i {
  line-height: 1;
}

.feature-card h3 {
  margin: 0;
  font-size: clamp(16px, 3.3vh, 34px);
  font-weight: 700;
}

.card-orange { background: linear-gradient(160deg, #ff9a45, #ff8240); }
.card-purple { background: linear-gradient(160deg, #9a5ac4, #8a49b7); }
.card-red { background: linear-gradient(160deg, #ff6172, #ff4d62); }
.card-green { background: linear-gradient(160deg, #33c673, #28b55f); }

.battery-row {
  margin-top: 2.5%;
  border-radius: 12px;
  background: #f7f9fb;
  color: #6e7584;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.3% 3.2%;
  font-size: clamp(11px, 2vh, 22px);
}

.member-page {
  margin: -2.7% -3%;
  padding: 12px 12px 16px;
}

.member-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.member-level-pill {
  border: none;
  border-radius: 999px;
  background: linear-gradient(160deg, #a8d873, #8fc85d);
  color: #f4ffe7;
  box-shadow: 0 3px 8px rgba(62, 103, 38, 0.28);
  min-height: 40px;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(13px, 1.9vh, 18px);
  font-weight: 700;
}

.member-level-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  font-size: 14px;
}

.member-level-num {
  font-size: clamp(11px, 1.45vh, 14px);
  opacity: 0.88;
}

.member-points-pill {
  border: none;
  border-radius: 999px;
  background: linear-gradient(160deg, #ffc200, #f7a800);
  color: #fff;
  box-shadow: 0 4px 8px rgba(160, 108, 0, 0.3);
  min-height: 40px;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.member-points-pill b {
  font-size: clamp(18px, 2.7vh, 30px);
  line-height: 1;
}

.member-points-pill small {
  font-size: clamp(12px, 1.6vh, 15px);
  font-weight: 700;
}

.member-total-card {
  margin-top: 12px;
  border-radius: 16px;
  background: linear-gradient(140deg, #28bea8 0%, #68c879 58%, #98d05e 100%);
  color: #fff;
  min-height: 170px;
  padding: 16px 16px 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 10px rgba(46, 82, 67, 0.22);
}

.member-total-card::after {
  content: "🐉";
  position: absolute;
  right: 28px;
  top: 18px;
  font-size: clamp(58px, 10vh, 92px);
  opacity: 0.12;
}

.member-total-head {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(13px, 1.75vh, 17px);
  opacity: 0.95;
}

.member-total-time {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-size: clamp(27px, 4.4vh, 42px);
  line-height: 1.05;
  font-weight: 800;
}

.member-sub-cards {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.member-sub-card {
  min-width: 58px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.19);
  padding: 8px 8px;
  display: grid;
  gap: 2px;
}

.member-sub-card span {
  font-size: clamp(11px, 1.4vh, 13px);
  opacity: 0.9;
}

.member-sub-card b {
  font-size: clamp(12px, 1.65vh, 16px);
}

.member-sync-line {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(11px, 1.45vh, 14px);
  opacity: 0.95;
}

.member-award {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.36);
  font-size: 25px;
}

.member-section-title {
  margin: 18px 4px 10px;
  color: #7a8393;
  font-size: clamp(13px, 1.8vh, 17px);
  font-weight: 500;
}

.stats-card {
  border: 1px solid #dfe4eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(41, 48, 64, 0.08);
}

.weekly-card {
  margin-top: 12px;
  padding: 14px 16px 16px;
}

.weekly-card h3 {
  margin: 0 0 14px;
  color: #1e2838;
  font-size: clamp(15px, 2.1vh, 19px);
}

.week-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: end;
}

.week-day {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #8fa0ba;
}

.week-track {
  position: relative;
  display: block;
  width: min(24px, 5.1vw);
  height: clamp(80px, 13vh, 116px);
  border-radius: 5px;
  background: #eef2f7;
  overflow: hidden;
}

.week-track i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 4px;
  border-radius: 5px;
  background: #ff7a1a;
}

.week-day b {
  color: #53647e;
  font-size: clamp(11px, 1.55vh, 14px);
  font-weight: 500;
}

.week-day small {
  min-height: 12px;
  color: #9badc6;
  font-size: clamp(10px, 1.25vh, 12px);
}

.week-day.active b,
.week-day.active small {
  color: #ff7a1a;
  font-weight: 700;
}

.rank-card {
  overflow: hidden;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 12px 16px 4px;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border-bottom: 1px solid #eef2f6;
  cursor: pointer;
}

.rank-row:last-child {
  border-bottom: none;
}

.rank-row:active {
  background: #f4f8fd;
}

.rank-medal,
.rank-number {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #94a4bc;
  font-size: 15px;
  font-weight: 700;
}

.rank-user strong {
  display: block;
  color: #1f2a3a;
  font-size: clamp(14px, 1.9vh, 18px);
}

.rank-user small {
  display: block;
  margin-top: 4px;
  color: #9aa9c0;
  font-size: clamp(10px, 1.35vh, 12px);
  letter-spacing: 0;
}

.rank-minutes {
  color: #1e75ff;
  font-size: clamp(12px, 1.65vh, 15px);
  font-weight: 600;
}

.rank-detail-card {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(440px, calc(100vw - 36px));
  max-height: min(620px, calc(100vh - 54px));
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.rank-detail-hero {
  min-height: 100px;
  padding: 20px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  color: #fff;
  background: linear-gradient(135deg, #80c946 0%, #aed879 100%);
}

.rank-detail-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.28);
  font-size: 34px;
}

.rank-detail-hero h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.rank-detail-hero p {
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 14px;
}

.rank-detail-hero b {
  min-width: 64px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 13px;
}

.rank-detail-hero b::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
}

.rank-detail-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: #fff;
  font-size: 22px;
}

.rank-detail-body {
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  background: #fff;
}

.rank-detail-stats {
  border-radius: 15px;
  background: #f6f9fd;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 76px;
  align-items: center;
}

.rank-detail-stats div {
  display: grid;
  justify-items: center;
  gap: 7px;
}

.rank-detail-stats strong {
  color: #10b982;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
}

.rank-detail-stats div:nth-child(3) strong {
  color: #f59a00;
}

.rank-detail-stats span {
  color: #60708a;
  font-size: 13px;
}

.rank-detail-section {
  margin-top: 18px;
}

.rank-detail-section h4 {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1f2a3a;
  font-size: 16px;
  font-weight: 900;
}

.rank-detail-section h4 i {
  color: #f3a000;
}

.rank-detail-section h4 em {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: #8fa0b8;
  font-size: 12px;
  font-style: normal;
}

.rank-card-preview {
  border: 1px solid #dfe5ed;
  border-radius: 13px;
  min-height: 80px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  background: #fff;
}

.rank-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff9dc, #ffd98a);
  border: 1px solid #edd09a;
  font-size: 27px;
  filter: drop-shadow(0 1px 0 rgba(31, 33, 42, 0.35));
}

.rank-card-preview strong {
  display: block;
  color: #243044;
  font-size: 17px;
}

.rank-card-preview small {
  display: block;
  margin-top: 6px;
  color: #7b8ea8;
  font-size: 13px;
}

.rank-card-preview em {
  border-radius: 10px;
  padding: 10px 12px;
  background: #f0f3f7;
  color: #9aabc1;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.rank-empty-achievement {
  min-height: 98px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  gap: 7px;
  background: #f6f9fd;
  color: #b8c6d6;
}

.rank-empty-achievement i {
  font-size: 24px;
}

.rank-empty-achievement span {
  font-size: 14px;
}

.rank-like-button {
  width: 100%;
  min-height: 50px;
  margin-top: 36px;
  border: none;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ff474f;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.level-info-card {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(440px, calc(100vw - 36px));
  max-height: min(720px, calc(100vh - 48px));
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.level-modal-hero {
  min-height: 120px;
  padding: 24px 24px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: #fff;
  background: linear-gradient(135deg, #82c642 0%, #b5dd7c 100%);
}

.level-modal-hero h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 800;
}

.level-modal-hero p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 600;
}

.level-modal-icon {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.28);
  font-size: 40px;
}

.level-modal-body {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 20px 18px;
  background: #fff;
}

.level-progress-card,
.level-list-card {
  border-radius: 10px;
  background: #f7f9fc;
  padding: 16px;
}

.level-progress-card h4,
.level-list-card h4 {
  margin: 0 0 14px;
  color: #5f6d84;
  font-size: 14px;
  font-weight: 600;
}

.level-progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #e7edf4;
  overflow: hidden;
}

.level-progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: #86c944;
}

.level-progress-track i {
  position: absolute;
  right: 2px;
  top: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #86c944;
}

.level-progress-meta {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #40516a;
  font-size: 14px;
}

.level-progress-meta strong {
  color: #86c944;
  font-weight: 700;
}

.level-progress-card p {
  margin: 12px 0 0;
  color: #9aa9bf;
  font-size: 14px;
}

.level-list-card {
  margin-top: 20px;
}

.level-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.level-list li {
  min-height: 58px;
  border-radius: 9px;
  padding: 10px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
}

.level-list li.current {
  background: #eaf4df;
}

.level-list-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf2f7;
  font-size: 17px;
}

.level-list li.current .level-list-icon {
  background: #d8ecc5;
}

.level-list strong {
  display: block;
  color: #53637a;
  font-size: 14px;
}

.level-list li.current strong {
  color: #86c944;
}

.level-list small {
  display: block;
  margin-top: 4px;
  color: #8ea1bb;
  font-size: 12px;
}

.level-list em {
  color: #8ea1bb;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.level-list li.current em {
  color: #86c944;
}

.level-modal-footer {
  padding: 14px 18px 18px;
  background: #fff;
}

.level-modal-footer button {
  width: 100%;
  min-height: 40px;
  border: none;
  border-radius: 10px;
  background: #86c944;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}

.points-detail-card {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(440px, calc(100vw - 36px));
  max-height: min(620px, calc(100vh - 54px));
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.points-detail-hero {
  min-height: 125px;
  padding: 22px 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: start;
  gap: 12px;
  color: #fff;
  background: linear-gradient(145deg, #ff9b00 0%, #ffb400 100%);
}

.points-detail-hero p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.points-detail-hero strong {
  display: block;
  margin-top: 4px;
  font-size: 35px;
  line-height: 1;
  font-weight: 800;
}

.points-detail-hero small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
}

.points-bank-btn,
.points-detail-close {
  border: none;
  color: #fff;
}

.points-bank-btn {
  height: 38px;
  border-radius: 10px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.points-bank-btn i {
  font-size: 17px;
}

.points-detail-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  font-size: 22px;
}

.points-detail-body {
  min-height: 0;
  overflow-y: auto;
  padding: 8px 0 18px;
  background: #fff;
}

.points-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.points-list li {
  min-height: 72px;
  padding: 12px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.points-list strong {
  display: block;
  color: #1f2a3a;
  font-size: 16px;
  font-weight: 500;
}

.points-list small {
  display: block;
  margin-top: 8px;
  color: #8da0ba;
  font-size: 13px;
  letter-spacing: 0;
}

.points-list span {
  font-size: 17px;
  font-weight: 800;
}

.points-list .positive {
  color: #ff8a00;
}

.points-list .negative {
  color: #ff3b48;
}

.points-detail-footer {
  padding: 12px 16px 16px;
  background: #f7f9fc;
}

.points-detail-footer button {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(145deg, #ffb200, #ffb900);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.points-bank-card {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(440px, calc(100vw - 36px));
  max-height: min(655px, calc(100vh - 54px));
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.points-bank-hero {
  position: relative;
  min-height: 162px;
  padding: 22px 20px 20px;
  color: #fff;
  background: linear-gradient(145deg, #ff9b00 0%, #ffb400 100%);
}

.points-bank-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(209, 121, 0, 0.36);
  color: #fff;
  font-size: 22px;
}

.points-bank-hero p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.points-bank-hero > strong {
  display: block;
  margin-top: 6px;
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 1px;
}

.bank-asset-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.bank-asset-grid div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: center;
}

.bank-asset-icon {
  grid-row: span 2;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  font-size: 14px;
}

.bank-asset-icon.solid::after {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
}

.bank-asset-grid small {
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
}

.bank-asset-grid b {
  margin-top: 4px;
  color: #fff;
  font-size: 14px;
}

.points-bank-body {
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px 16px;
  background: #fff;
}

.bank-rate-row {
  min-height: 40px;
  border: 1px solid #ffe08a;
  border-radius: 10px;
  padding: 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff9e8;
  color: #262d3b;
}

.bank-rate-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.bank-rate-row span i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffb400;
  color: #fff;
  font-size: 16px;
}

.bank-rate-row strong {
  color: #b95a1a;
  font-size: 12px;
  white-space: nowrap;
}

.bank-action-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
}

.bank-action {
  min-height: 44px;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.bank-action.current {
  background: #ffb300;
}

.bank-action.fixed {
  background: #16a34a;
}

.bank-withdraw {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  border: none;
  border-radius: 10px;
  background: #f4f7fb;
  color: #9eb0c7;
  font-size: 16px;
  font-weight: 700;
}

.points-bank-body h3 {
  margin: 22px 0 12px;
  color: #1f2a3a;
  font-size: 16px;
  font-weight: 800;
}

.bank-term-list {
  display: grid;
  gap: 10px;
}

.bank-term-card {
  min-height: 66px;
  border: 1px solid #cfeedd;
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  background: #ecfbf2;
}

.term-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d6f5e3;
  color: #15a550;
  font-size: 20px;
}

.bank-term-card strong {
  color: #146b36;
  font-size: 15px;
}

.bank-term-card small {
  display: block;
  margin-top: 5px;
  color: #66819a;
  font-size: 12px;
}

.bank-term-card em {
  border-radius: 8px;
  padding: 9px 12px;
  background: #d8f8e4;
  color: #087c35;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.bank-ledger-card {
  min-height: 70px;
  border-radius: 10px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  background: #f6f9fd;
}

.ledger-date-icon {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef3f8;
  font-size: 16px;
}

.bank-ledger-card strong {
  display: block;
  color: #1f2a3a;
  font-size: 15px;
}

.bank-ledger-card small {
  display: block;
  margin-top: 5px;
  color: #7990ac;
  font-size: 12px;
}

.bank-ledger-card em {
  color: #10a047;
  font-size: 17px;
  font-style: normal;
  font-weight: 900;
}

.card-shop-card {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(440px, calc(100vw - 36px));
  max-height: min(670px, calc(100vh - 54px));
  border-radius: 20px;
  background: #fff8e8;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.card-shop-hero {
  position: relative;
  min-height: 86px;
  padding: 22px 20px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  background: linear-gradient(135deg, #8f6515 0%, #f1cd63 100%);
  color: #fff;
  overflow: hidden;
}

.shop-points-pill {
  position: relative;
  z-index: 1;
  min-width: 92px;
  min-height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(114, 76, 16, 0.42);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.shop-hero-glow {
  position: absolute;
  left: 50%;
  top: 19px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.2);
  filter: blur(6px);
}

.card-shop-close {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: #fff;
  font-size: 24px;
}

.card-shop-body {
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 18px;
  background: #fff8e8;
}

.shop-card-item {
  border: 2px solid #e3b64b;
  border-radius: 20px;
  padding: 12px;
  background: #fff7dc;
  box-shadow: 0 2px 6px rgba(138, 91, 15, 0.18);
}

.shop-card-item + .shop-card-item {
  margin-top: 16px;
}

.shop-art {
  position: relative;
  height: 172px;
  border-radius: 17px;
  overflow: hidden;
  background: linear-gradient(140deg, #fff9d8 0%, #ffd05b 58%, #d99a17 100%);
  border: 1px solid rgba(215, 165, 45, 0.58);
}

.shop-card-item.rose .shop-art {
  background: linear-gradient(140deg, #fff0e0 0%, #ffc2cb 52%, #e87993 100%);
}

.shop-card-item.mint .shop-art {
  background: linear-gradient(140deg, #efffe8 0%, #bfecc0 55%, #76c69f 100%);
}

.shop-art::before,
.shop-art::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.46);
  pointer-events: none;
}

.shop-art::before {
  right: 18px;
  top: 56px;
  width: 91px;
  height: 34px;
  border-radius: 999px;
  transform: rotate(-15deg);
}

.shop-art::after {
  right: 24px;
  bottom: -18px;
  width: 70px;
  height: 96px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(-18deg);
}

.shop-rarity {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 244, 203, 0.9);
  color: #b48216;
  font-size: 12px;
  font-weight: 800;
}

.shop-icon {
  position: absolute;
  left: 50%;
  top: 44px;
  z-index: 1;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 0 rgba(32, 34, 42, 0.45));
  font-size: 76px;
  line-height: 1;
}

.shop-icon.comet-card {
  top: 48px;
  font-size: 72px;
  transform: translateX(-50%) rotate(-12deg);
}

.shop-icon.planet-card {
  top: 48px;
  font-size: 70px;
}

.shop-number {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  min-width: 104px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(190, 144, 49, 0.46);
  color: #fff8d5;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.shop-card-meta {
  padding: 14px 0 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.shop-card-meta h3 {
  margin: 0;
  color: #7a4d11;
  font-size: 18px;
  font-weight: 900;
}

.shop-card-meta h3 small {
  margin-left: 8px;
  border-radius: 999px;
  padding: 4px 9px;
  background: #fff0c1;
  color: #b48216;
  font-size: 11px;
  font-weight: 800;
}

.shop-card-meta p {
  margin: 8px 0 0;
  color: #805e2a;
  font-size: 13px;
  line-height: 1.55;
}

.shop-owned,
.shop-exchange {
  border: none;
  border-radius: 11px;
  min-width: 62px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

.shop-owned {
  background: #ffe9ae;
  color: #9d6f12;
}

.shop-exchange {
  background: #ffbd22;
  color: #fff;
}

.shop-source {
  margin: 16px 0 0;
  color: #aa9462;
  font-size: 10px;
  letter-spacing: 1px;
}

.panel {
  background: #f7f9fc;
  border: 1px solid #dce2eb;
  border-radius: 14px;
  color: #343a47;
  padding: 2.6%;
}

.panel h2 { margin: 0; font-size: clamp(16px, 2.6vh, 22px); }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.desc {
  margin: 8px 0 0;
  color: #67738a;
  font-size: clamp(11px, 1.6vh, 13px);
}

.progress-wrap,
.quota-block {
  margin-top: 10px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: clamp(11px, 1.5vh, 13px);
  color: #566482;
  margin-bottom: 5px;
}

.progress-head strong { color: #2c3853; }

.bar {
  height: clamp(8px, 1.2vh, 10px);
  border-radius: 999px;
  background: #dfe6f1;
  overflow: hidden;
}

.bar > i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ff9e3d, #18bf88);
}

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

.list li {
  border: 1px solid #dce3ed;
  border-radius: 11px;
  padding: 10px;
  background: #fff;
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.item-meta {
  margin-top: 6px;
  font-size: clamp(10px, 1.4vh, 12px);
  color: #6a7792;
}

.favorites-page {
  margin: -2.7% -3%;
}

.favorites-head {
  min-height: 78px;
  padding: 10px 16px 10px;
  border-bottom: 1px solid #ccd2db;
  background: #edeff2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.favorites-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.favorites-head-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fbe4eb;
  color: #f0486a;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.favorites-head h2 {
  margin: 0;
  color: #1f2a3a;
  font-size: clamp(18px, 2.7vh, 28px);
  font-weight: 800;
}

.favorites-head p {
  margin: 4px 0 0;
  color: #64758f;
  font-size: clamp(13px, 1.8vh, 17px);
  font-weight: 500;
}

.favorites-clear {
  border: none;
  background: transparent;
  color: #6b7d98;
  font-size: clamp(14px, 2vh, 20px);
  padding: 8px 4px;
}

.favorites-card-list {
  list-style: none;
  margin: 0;
  padding: 12px 14px 0;
  display: grid;
  gap: 10px;
}

.favorites-card {
  border: 1px solid #ccd3dc;
  border-radius: 12px;
  background: #f1f3f5;
  min-height: 78px;
  padding: 10px 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 4px rgba(36, 42, 56, 0.1);
}

.favorites-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #e3e8ef;
  color: #7f8ea6;
  font-size: 24px;
  display: grid;
  place-items: center;
  padding: 0 0 0 2px;
}

.favorites-main {
  min-width: 0;
}

.favorites-main h3 {
  margin: 0;
  color: #252f40;
  font-size: clamp(16px, 2.3vh, 24px);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.favorites-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7d8ea7;
  font-size: clamp(13px, 1.7vh, 16px);
}

.favorites-grade {
  border-radius: 5px;
  padding: 3px 6px;
  background: #e1e6ed;
  color: #71839f;
  font-size: clamp(11px, 1.4vh, 13px);
  line-height: 1;
}

.favorites-trash {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #d1d8e2;
  font-size: 20px;
  display: grid;
  place-items: center;
  padding: 0;
}

.favorites-empty {
  border-radius: 10px;
  border: 1px dashed #c8cfdb;
  padding: 18px 12px;
  text-align: center;
  color: #75839c;
  font-size: clamp(14px, 2vh, 18px);
}

.small-btn {
  border: none;
  border-radius: 999px;
  background: #dfe6f2;
  color: #30415f;
  cursor: pointer;
  font-size: clamp(10px, 1.4vh, 12px);
  padding: 6px 10px;
}

.small-btn.primary {
  background: #26c793;
  color: #08271b;
  font-weight: 700;
}

.small-btn.done {
  background: #d7dce4;
  color: #5f6d86;
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 16px;
}

.small-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.badge-ok { background: #daf5e8; color: #0f7141; }
.badge-wait { background: #ffeec9; color: #8b6311; }

.stat-line {
  margin-top: 10px;
  font-size: clamp(11px, 1.5vh, 13px);
  color: #526281;
}

.settings-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-page {
  margin: -2.7% -3%;
  padding: 14px 14px 28px;
  background: #f4f7fa;
  min-height: 100%;
}

.settings-theme-card {
  position: relative;
  width: 100%;
  min-height: 180px;
  border: none;
  border-radius: 20px;
  margin: 4px 0 20px;
  padding: 22px 22px;
  display: grid;
  align-content: end;
  justify-items: start;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #ff9b3b 0%, #ff6a35 100%);
  box-shadow: 0 4px 10px rgba(41, 48, 64, 0.16);
  text-align: left;
}

.settings-theme-card::before {
  content: "";
  position: absolute;
  right: -4%;
  top: 6%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 198, 121, 0.24);
}

.settings-theme-emoji {
  position: relative;
  z-index: 1;
  font-size: 54px;
  line-height: 1;
  margin-bottom: 12px;
}

.settings-theme-text {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
}

.settings-theme-text strong {
  color: #fff;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
}

.settings-theme-text small {
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  font-weight: 700;
}

.settings-theme-action {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 1;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 27px;
}

.settings-section-title {
  margin: 10px 4px 10px;
  color: #75859d;
  font-size: clamp(13px, 1.8vh, 16px);
  font-weight: 500;
}

.settings-group + .settings-section-title {
  margin-top: 22px;
}

.settings-group {
  border: 1px solid #d7dee8;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(21, 27, 38, 0.05);
}

.settings-row {
  width: 100%;
  border: none;
  border-top: 1px solid #eef2f6;
  background: transparent;
  min-height: 74px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  text-align: left;
}

.settings-group > .settings-row:first-child {
  border-top: none;
}

.settings-row-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #101722;
  font-size: 19px;
}

.settings-row-main strong {
  display: block;
  font-size: clamp(15px, 2.05vh, 20px);
  font-weight: 800;
  color: #1d2737;
}

.settings-row-main p {
  margin: 4px 0 0;
  font-size: clamp(12px, 1.55vh, 14px);
  color: #6f819c;
}

.settings-row.wifi.ok {
  background: #d8f9e3;
  border: 1px solid #bdecca;
  border-radius: 11px;
  margin: 0;
  min-height: 78px;
}

.settings-row.wifi.ok .settings-row-icon,
.settings-row.wifi.ok .settings-row-main strong,
.settings-row.wifi.ok .settings-row-main p {
  color: #0e9650;
}

.settings-row.interactive {
  cursor: pointer;
}

.settings-row.disabled {
  cursor: default;
  opacity: 0.45;
}

.row-arrow {
  color: #bfccdd;
  font-size: 22px;
}

.settings-switch {
  width: 56px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: #d6dde8;
  position: relative;
  cursor: pointer;
}

.settings-switch::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f2f5f9;
  transition: transform 0.18s ease;
}

.settings-switch.on {
  background: #2f97eb;
}

.settings-switch.on::after {
  transform: translateX(22px);
  background: #eef6ff;
}

.settings-brightness {
  border-top: 1px solid #e4e9f0;
  padding: 6px 16px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.brightness-side {
  font-size: 14px;
}

.settings-brightness input[type="range"] {
  width: 100%;
  accent-color: #2a80d8;
  height: 22px;
}

.settings-row.danger .settings-row-icon,
.settings-row.danger .settings-row-main strong {
  color: #ff5f5f;
}

.appearance-page {
  position: relative;
  min-height: 100%;
  padding: 22px 20px 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 220, 121, 0.44) 0 74px, transparent 75px),
    radial-gradient(circle at 0 78%, rgba(255, 151, 73, 0.18) 0 145px, transparent 146px),
    linear-gradient(145deg, #fff9f2 0%, #fff4f9 100%);
}

.appearance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.appearance-header h2 {
  margin: 0;
  color: #1f2a3a;
  font-size: 25px;
  font-weight: 900;
}

.appearance-close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #75859d;
  font-size: 24px;
  box-shadow: 0 2px 8px rgba(35, 45, 66, 0.2);
}

.appearance-hero-card {
  position: relative;
  min-height: 154px;
  margin-top: 24px;
  border-radius: 24px;
  padding: 28px 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 26px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #ffad62 0%, #ff7841 100%);
  box-shadow: 0 8px 15px rgba(187, 96, 35, 0.28);
}

.appearance-hero-card::before,
.appearance-hero-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.appearance-hero-card::before {
  width: 170px;
  height: 170px;
  left: -6px;
  top: -64px;
}

.appearance-hero-card::after {
  width: 165px;
  height: 165px;
  right: -46px;
  bottom: -38px;
}

.appearance-hero-icon {
  position: relative;
  z-index: 1;
  font-size: 74px;
  line-height: 1;
}

.appearance-hero-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.appearance-hero-card p {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.appearance-points-pill {
  width: max-content;
  margin: 18px 0 14px auto;
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff;
  color: #8997aa;
  box-shadow: 0 2px 7px rgba(35, 45, 66, 0.14);
  font-size: 13px;
  font-weight: 700;
}

.appearance-points-pill strong {
  color: #ff9d00;
  margin-left: 4px;
}

.appearance-grid-card {
  border-radius: 22px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 26px;
  background: rgba(255, 255, 255, 0.92);
}

.appearance-avatar {
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #f6d8ca;
  font-size: 38px;
  line-height: 1;
}

.appearance-avatar:nth-child(2),
.appearance-avatar:nth-child(10) { background: #ffe3f4; }
.appearance-avatar:nth-child(3),
.appearance-avatar:nth-child(11) { background: #ffe8ca; }
.appearance-avatar:nth-child(4),
.appearance-avatar:nth-child(8) { background: #d8f0f2; }
.appearance-avatar:nth-child(5),
.appearance-avatar:nth-child(6) { background: #e9d7c9; }
.appearance-avatar:nth-child(7) { background: #e5dcf2; }
.appearance-avatar:nth-child(9) { background: #d8f0df; }
.appearance-avatar:nth-child(12) { background: #d9e7f1; }

.appearance-avatar.active {
  outline: 3px solid #ff8b38;
  outline-offset: -3px;
  background: #ffc18d;
}

.appearance-switch-btn {
  width: 100%;
  min-height: 58px;
  margin-top: 22px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffad49, #ff9c3d);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.homework-summary {
  background: #f3f5f7;
  border: 1px solid #d4d9e0;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.homework-summary.completed {
  border-color: #c8ddd4;
}

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

.summary-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e2e7ee;
  color: #7c879a;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.summary-left h2 {
  margin: 0;
  font-size: clamp(15px, 2.2vh, 20px);
}

.summary-left p {
  margin: 2px 0 0;
  color: #6f7d96;
  font-size: clamp(12px, 1.7vh, 16px);
}

.homework-summary.completed .summary-icon {
  background: #d6ece4;
  color: #0a8f63;
}

.homework-summary.completed .summary-left h2 {
  color: #0a8f63;
}

.homework-summary.completed .summary-left p {
  color: #4d5f7c;
}

.assignment-card {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #c8d2df;
  background: #f3f5f7;
}

.assignment-head {
  background: linear-gradient(120deg, #2f9be6, #257ed5);
  color: #fff;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.assignment-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assignment-head-left i {
  font-size: 18px;
}

.assignment-head h3 {
  margin: 0;
  font-size: clamp(15px, 2.1vh, 22px);
  font-weight: 700;
}

.assignment-date {
  font-size: clamp(12px, 1.7vh, 16px);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.assignment-list {
  list-style: none;
  margin: 0;
  padding: 2px 0;
}

.assignment-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  cursor: pointer;
}

.assignment-list li + li {
  border-top: 1px solid #d7dce4;
}

.track-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #dbe1ea;
  color: #f4f7fb;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.assignment-list li.downloaded .track-play {
  background: #00744f;
  color: #d8f7eb;
}

.track-main {
  min-width: 0;
}

.track-title {
  color: #202634;
  font-weight: 700;
  font-size: clamp(13px, 1.9vh, 22px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-status {
  margin-top: 3px;
  color: #737f95;
  font-size: clamp(12px, 1.7vh, 18px);
}

.assignment-list li.downloaded .track-status {
  color: #00744f;
  font-weight: 600;
}

.track-action {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f6e9c9;
  color: #e5ac2e;
  display: grid;
  place-items: center;
  font-size: 15px;
}

.track-action.done {
  background: #d6ece4;
  color: #0a8f63;
}

.player-screen {
  padding: 0 1% 2%;
}

.player-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
}

.player-back {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #d0d7e1;
  background: #f4f6f9;
  color: #6a7fb4;
  font-size: 24px;
  display: grid;
  place-items: center;
}

.player-header h2 {
  margin: 0;
  text-align: center;
  color: #233148;
  font-size: clamp(16px, 2.6vh, 30px);
}

.player-counter {
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e2e7f5;
  color: #5e73c2;
  font-weight: 700;
  font-size: clamp(12px, 1.8vh, 18px);
}

.player-art-wrap {
  display: grid;
  place-items: center;
  margin-top: 10px;
}

.player-art {
  width: clamp(140px, 25vh, 190px);
  height: clamp(140px, 25vh, 190px);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #7f71d7 0%, #7f6bcb 40%, #cc4ca6 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(84, 66, 126, 0.32);
}

.player-art-inner {
  width: 72%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(circle at 46% 45%, #b994dc, #e89ad2);
  display: grid;
  place-items: center;
  color: #5b7cff;
  font-size: clamp(30px, 5vh, 46px);
  box-shadow: inset 0 0 0 8px rgba(143, 104, 197, 0.25);
}

.player-art-inner i {
  width: 38%;
  height: 38%;
  border-radius: 50%;
  background: #f4f6f8;
  color: #6f85dd;
  display: grid;
  place-items: center;
  font-size: clamp(18px, 3vh, 28px);
}

.player-track-title {
  margin: 18px 0 0;
  text-align: center;
  color: #212a3b;
  font-size: clamp(18px, 3vh, 36px);
}

.player-progress {
  margin-top: 10px;
  padding: 0 2px;
}

.player-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #d2d8e3;
}

.player-time {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  color: #6f7c95;
  font-weight: 700;
  font-size: clamp(12px, 1.6vh, 18px);
}

.player-controls {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(22px, 4vh, 38px);
}

.ctrl-btn {
  width: clamp(54px, 9vh, 78px);
  height: clamp(54px, 9vh, 78px);
  border-radius: 50%;
  border: 1px solid #d4dbe5;
  background: #f5f7fa;
  color: #6a7fe0;
  font-size: clamp(25px, 4.4vh, 38px);
  display: grid;
  place-items: center;
}

.ctrl-btn.play-main {
  width: clamp(70px, 12vh, 98px);
  height: clamp(70px, 12vh, 98px);
  border: none;
  color: #f1f3ff;
  background: radial-gradient(circle at 30% 30%, #6f80e2 0%, #665fcf 60%, #6550ba 100%);
  box-shadow: 0 8px 20px rgba(77, 74, 140, 0.34);
}

.playlist-panel {
  margin-top: 16px;
  border-radius: 16px 16px 0 0;
  background: #f4f6f8;
  border: 1px solid #d4dae2;
  padding: 10px 10px 6px;
}

.playlist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.playlist-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #253650;
  font-weight: 700;
  font-size: clamp(15px, 2.2vh, 26px);
}

.playlist-title i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e6ebf6;
  color: #5f75d6;
  display: grid;
  place-items: center;
  font-size: 17px;
}

.playlist-count {
  padding: 5px 10px;
  border-radius: 999px;
  background: #e4e9f2;
  color: #7a879c;
  font-size: clamp(12px, 1.6vh, 17px);
  font-weight: 700;
}

.player-playlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.player-playlist li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 12px 10px;
  color: #2e3b54;
  cursor: pointer;
}

.player-playlist li + li {
  margin-top: 6px;
}

.player-playlist li.active {
  background: #dfe3ef;
  color: #5068dc;
  font-weight: 700;
}

.player-index {
  min-width: 22px;
  text-align: center;
  color: #8795ac;
  font-weight: 700;
}

.favorites-player-screen {
  margin: -2.7% -3%;
  padding: 8px 14px 0;
  background: #d7e4e2;
  min-height: calc(100% + 5.4%);
}

.fav-player-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 2px 0 0;
}

.fav-player-back {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #c9d6d4;
  background: #eef3f2;
  color: #12bc86;
  font-size: 24px;
  display: grid;
  place-items: center;
}

.fav-player-header h2 {
  margin: 0;
  text-align: center;
  color: #2a374b;
  font-size: clamp(18px, 2.6vh, 30px);
  font-weight: 800;
}

.fav-player-counter {
  justify-self: end;
  padding: 7px 12px;
  border-radius: 999px;
  background: #bfe7dc;
  color: #0eb379;
  font-size: clamp(12px, 1.8vh, 18px);
  font-weight: 700;
}

.fav-player-art-wrap {
  display: grid;
  place-items: center;
  margin-top: 16px;
}

.fav-player-art {
  width: clamp(146px, 26vh, 196px);
  height: clamp(146px, 26vh, 196px);
  border-radius: 50%;
  background: radial-gradient(circle at 42% 36%, #08b684 0%, #09996d 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 20px rgba(25, 106, 83, 0.26);
}

.fav-player-art-inner {
  width: 74%;
  height: 74%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, #4bc8a7, #3ba98b);
  display: grid;
  place-items: center;
}

.fav-player-art-inner i {
  width: 36%;
  height: 36%;
  border-radius: 50%;
  background: #f3f7f7;
  color: #0eb77f;
  display: grid;
  place-items: center;
  font-size: clamp(18px, 3vh, 28px);
}

.fav-player-track-title {
  margin: 16px 0 0;
  text-align: center;
  color: #253044;
  font-size: clamp(22px, 3.6vh, 38px);
  font-weight: 700;
}

.fav-player-progress {
  margin-top: 10px;
  padding: 0 6px;
}

.fav-player-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #ccd5df;
}

.fav-player-time {
  margin-top: 7px;
  display: flex;
  justify-content: space-between;
  color: #687b95;
  font-weight: 700;
  font-size: clamp(12px, 1.8vh, 18px);
}

.fav-player-controls {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(22px, 4vh, 38px);
}

.fav-ctrl-btn {
  width: clamp(56px, 9vh, 78px);
  height: clamp(56px, 9vh, 78px);
  border-radius: 50%;
  border: 1px solid #d6dee5;
  background: #f3f6f7;
  color: #10b77f;
  font-size: clamp(24px, 4.2vh, 38px);
  display: grid;
  place-items: center;
}

.fav-ctrl-btn.play-main {
  width: clamp(72px, 12vh, 100px);
  height: clamp(72px, 12vh, 100px);
  border: none;
  color: #e9fffa;
  background: radial-gradient(circle at 34% 30%, #17c48f 0%, #0ea677 100%);
  box-shadow: 0 10px 20px rgba(24, 123, 94, 0.26);
}

.fav-playlist-panel {
  margin-top: 18px;
  border-radius: 22px 22px 0 0;
  background: #f2f4f6;
  border: 1px solid #d6dce4;
  border-bottom: none;
  padding: 12px 12px 14px;
}

.fav-playlist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fav-playlist-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2c3b54;
  font-size: clamp(16px, 2.4vh, 24px);
  font-weight: 700;
}

.fav-playlist-title i:first-child {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #d9efe9;
  color: #13b57f;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.fav-playlist-title i:last-child {
  color: #808ca2;
  font-size: 15px;
}

.fav-playlist-count {
  padding: 5px 10px;
  border-radius: 999px;
  background: #dfe5eb;
  color: #6f7e97;
  font-size: clamp(12px, 1.7vh, 17px);
  font-weight: 700;
}

.fav-player-playlist {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.fav-player-playlist li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 10px 12px;
  color: #34435b;
  cursor: pointer;
  font-size: clamp(16px, 2.3vh, 24px);
}

.fav-player-playlist li + li {
  margin-top: 3px;
}

.fav-player-playlist li.active {
  background: #d4e7e2;
  color: #12aa7a;
  font-weight: 700;
}

.fav-index {
  min-width: 20px;
  text-align: center;
  color: #90a0b8;
  font-weight: 700;
}

.fav-eq {
  min-width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.fav-eq i {
  width: 3px;
  border-radius: 2px;
  background: #0fb57f;
}

.fav-eq i:nth-child(1) { height: 12px; }
.fav-eq i:nth-child(2) { height: 16px; }
.fav-eq i:nth-child(3) { height: 10px; }

.library-categories-wrap {
  padding: 6px 2px 0;
}

.library-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cat-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  cursor: pointer;
  border-radius: 10px;
}

.cat-row.clickable {
  background: #e2e8f1;
}

.cat-row.clickable:active {
  background: #d5deeb;
}

.cat-row.not-clickable {
  background: #eef1f5;
  opacity: 0.9;
}

.cat-row.level-1 {
  margin-left: 16px;
  padding-left: 14px;
}

.cat-row.level-2 {
  margin-left: 32px;
  padding-left: 18px;
}

.cat-row.level-3 {
  margin-left: 48px;
  padding-left: 18px;
}

.cat-row.level-1::before,
.cat-row.level-2::before,
.cat-row.level-3::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d6dde8;
}

.cat-row.level-1::before { left: 8px; }
.cat-row.level-2::before { left: 8px; }
.cat-row.level-3::before { left: 8px; }

.cat-row.level-1::after,
.cat-row.level-2::after,
.cat-row.level-3::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: #d6dde8;
}

.cat-row.tone-blue {
  background: #dceaff;
}

.cat-row.tone-green {
  background: #d9f0e8;
}

.cat-row.tone-gray {
  background: #e0e5ec;
}

.cat-title {
  color: #2a3446;
  font-weight: 700;
  font-size: clamp(14px, 2.3vh, 31px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-meta {
  padding: 7px 10px;
  border-radius: 10px;
  background: #e7e9ee;
  color: #6f7786;
  font-size: clamp(11px, 1.6vh, 17px);
  font-weight: 700;
  white-space: nowrap;
}

.cat-arrow {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #2b3445;
  font-size: 19px;
  display: grid;
  place-items: center;
}

.cat-row.tone-blue .cat-title {
  color: #2f8fe7;
}

.cat-row.tone-blue .cat-meta {
  background: #c9e0ff;
  color: #2d7fd4;
}

.cat-row.tone-green .cat-title {
  color: #16b788;
}

.cat-row.tone-green .cat-meta {
  background: #c8efe3;
  color: #13a77a;
}

.cat-row.tone-gray .cat-title {
  color: #616775;
}

.cat-row.tone-gray .cat-meta {
  background: #dde1e8;
  color: #697387;
}

.cat-row.level-2 .cat-left-icon,
.cat-row.level-3 .cat-left-icon {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.cat-left-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e3e8f0;
  color: #283141;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.cat-row.level-0 .cat-left-icon {
  background: #e1e7ef;
}

.cat-row.level-1 .cat-left-icon {
  background: #d9ecff;
  color: #2b7fce;
}

.cat-row.level-2 .cat-left-icon {
  background: #d9f3ea;
  color: #12a679;
}

.cat-row.level-3 .cat-left-icon {
  background: #e4e8ef;
  color: #5f6778;
}

.cat-row.level-3 .cat-title {
  font-weight: 600;
}

.cat-row.level-2 .cat-arrow,
.cat-row.level-3 .cat-arrow {
  color: #687083;
}

.cat-row.expanded .cat-arrow {
  color: #3f547f;
}

.library-level-wrap {
  padding: 4px 0 0;
}

.library-level-header {
  border: 1px solid #cfd6df;
  background: #eef0f3;
  border-radius: 0;
  min-height: 56px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.library-level-back {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #1f2939;
  font-size: 20px;
  display: grid;
  place-items: center;
  padding: 0;
}

.library-level-header h2 {
  margin: 0;
  color: #202734;
  font-size: clamp(14px, 2.3vh, 24px);
  font-weight: 800;
}

.library-level-header span {
  color: #8b9099;
  font-size: clamp(11px, 1.5vh, 14px);
  font-weight: 600;
}

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

.library-level-item {
  min-height: 60px;
  border-radius: 12px;
  border: 1px solid #cbd2dc;
  background: #eceef1;
  box-shadow: 0 2px 6px rgba(31, 39, 56, 0.08);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  cursor: pointer;
}

.library-level-item:active {
  background: #e4e8ee;
}

.library-level-no {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #e0e5eb;
  color: #8f9db2;
  font-size: clamp(12px, 1.7vh, 16px);
  font-weight: 800;
  display: grid;
  place-items: center;
}

.library-level-track-title {
  color: #2a3343;
  font-size: clamp(14px, 2vh, 20px);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-level-heart {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #8ca0bb;
  font-size: 22px;
  display: grid;
  place-items: center;
  padding: 0;
}

.library-level-heart.liked {
  color: #ef5d74;
}

.library-fav-card {
  width: min(420px, 92%);
  border-radius: 30px;
  background: #f8f4fb;
  padding: 22px 24px 20px;
}

.library-fav-icon {
  display: grid;
  place-items: center;
  color: #ef4564;
  font-size: 32px;
  line-height: 1;
}

.library-fav-card h3 {
  margin: 8px 0 0;
  text-align: center;
  color: #1f2738;
  font-size: clamp(21px, 3.4vh, 32px);
  font-weight: 700;
}

.library-fav-track-name {
  margin: 16px 0 0;
  color: #2e3b55;
  font-size: clamp(15px, 2.3vh, 20px);
  font-weight: 700;
}

.library-fav-warning {
  margin-top: 14px;
  border-radius: 10px;
  background: #f6ecbd;
  color: #be6b1d;
  padding: 14px 14px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.library-fav-warning i {
  font-size: 22px;
  color: #f2a11e;
}

.library-fav-warning p {
  margin: 0;
  color: #b65d17;
  font-size: clamp(13px, 1.9vh, 17px);
}

.library-fav-warning strong {
  display: block;
  margin-top: 3px;
  color: #b04910;
  font-size: clamp(14px, 2vh, 18px);
}

.library-fav-hint {
  margin: 12px 0 0;
  color: #7683a0;
  font-size: clamp(12px, 1.8vh, 16px);
}

.library-fav-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}

.library-fav-cancel {
  border: none;
  background: transparent;
  color: #8593ad;
  font-size: clamp(15px, 2.2vh, 20px);
  padding: 8px 10px;
}

.library-fav-confirm {
  min-width: 110px;
  border: none;
  border-radius: 999px;
  background: #f3406a;
  color: #fff;
  font-size: clamp(15px, 2.2vh, 20px);
  padding: 9px 18px;
  font-weight: 600;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  isolation: isolate;
  background: rgba(11, 14, 22, 0.56);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal.hidden { display: none; }

.modal-card {
  width: min(420px, 100%);
  background: #fff;
  color: #35415a;
  border-radius: 14px;
  padding: 16px;
}

.modal-card h3 { margin: 0; }
.modal-card p { margin: 8px 0 0; color: #60708e; }

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

.done-card {
  width: min(340px, 90%);
  border-radius: 28px;
  padding: 26px 24px 22px;
}

.done-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 2px solid #11c38a;
  color: #11c38a;
  display: grid;
  place-items: center;
  font-size: 17px;
}

.done-card h3 {
  text-align: center;
  margin: 0;
  color: #20283a;
  font-size: clamp(30px, 4.5vh, 44px);
}

.done-card p {
  text-align: left;
  margin: 16px 0 0;
  color: #667593;
  font-size: clamp(18px, 2.8vh, 30px);
}

.done-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 34px;
}

.done-btn {
  border: none;
  background: transparent;
  color: #288dff;
  font-size: clamp(24px, 3.6vh, 34px);
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #1f2f49;
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  padding: 9px 14px;
  opacity: 0;
  transition: all 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Demo controls: back + reset */
.demo-controls {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 10px;
  z-index: 9999;
}

.demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.15s ease;
}

.demo-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.demo-btn:active {
  transform: translateY(0);
}

.demo-btn i {
  font-size: 16px;
}

/* Demo tooltip panel */
.demo-tooltip {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  background: rgba(30, 35, 48, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 24px 26px;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.7;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9998;
  transition: opacity 0.25s ease, left 0.2s ease;
}

.demo-tooltip-title {
  font-weight: 700;
  font-size: 16px;
  color: #a8b0c5;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.demo-tooltip-text {
  color: #ffffff;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .demo-tooltip {
    display: none;
  }
}

/* Left guide panel */
:root {
  --guide-width: min(42vw, 640px);
}

.guide-panel {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--guide-width);
  height: 100vh;
  overflow-y: auto;
  background: #ffffff;
  color: #1f2937;
  z-index: 90;
  border-right: 1px solid #e5e7eb;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.guide-panel::-webkit-scrollbar {
  width: 6px;
}

.guide-panel::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.guide-content {
  padding: 28px 24px 40px;
}

.guide-header {
  margin-bottom: 22px;
}

.guide-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px;
}

.guide-header p {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
}

.guide-slogan {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}

.guide-section {
  margin-bottom: 22px;
}

.guide-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 12px;
  padding-left: 8px;
  border-left: 3px solid #764ba2;
}

.guide-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.guide-card {
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 10px;
  padding: 12px;
}

.guide-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  margin-bottom: 8px;
  color: white;
}

.guide-card h4 {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 4px;
}

.guide-card p {
  font-size: 11px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

.guide-steps {
  display: flex;
  gap: 8px;
}

.guide-step {
  flex: 1;
  background: #f9fafb;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}

.guide-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.guide-step h4 {
  font-size: 11px;
  font-weight: 600;
  margin: 0 0 2px;
  color: #111827;
}

.guide-step p {
  font-size: 10px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.guide-entrances {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.guide-entrance {
  text-align: center;
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px 4px;
}

.guide-entrance-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-bottom: 4px;
  color: white;
}

.guide-entrance h5 {
  font-size: 10px;
  font-weight: 600;
  margin: 0 0 2px;
  color: #111827;
}

.guide-entrance p {
  font-size: 9px;
  color: #6b7280;
  margin: 0;
  line-height: 1.3;
}

.guide-highlight {
  background: linear-gradient(135deg, #f3e8ff 0%, #e0e7ff 100%);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.guide-highlight h4 {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 6px;
}

.guide-highlight p {
  font-size: 11px;
  color: #6b7280;
  margin: 0 0 10px;
  line-height: 1.6;
}

.guide-highlight a {
  font-size: 11px;
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
}

.guide-faq-item {
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 6px;
  overflow: hidden;
}

.guide-faq-q {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.guide-faq-q::after {
  content: "▼";
  font-size: 9px;
  color: #9ca3af;
  transition: transform 0.2s;
}

.guide-faq-item.active .guide-faq-q::after {
  transform: rotate(180deg);
}

.guide-faq-a {
  padding: 0 12px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: all 0.25s ease;
}

.guide-faq-item.active .guide-faq-a {
  padding: 0 12px 10px;
  max-height: 100px;
}

.guide-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #f3f4f6;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.guide-table th,
.guide-table td {
  padding: 7px 9px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}

.guide-table th {
  background: #f9fafb;
  color: #374151;
  font-weight: 600;
}

.guide-table tr:last-child td {
  border-bottom: none;
}

.guide-tip {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 8px 10px;
  border-radius: 0 8px 8px 0;
  font-size: 11px;
  color: #92400e;
  margin-top: 10px;
  line-height: 1.5;
}

.stage {
  width: calc(100vw - var(--guide-width));
  margin-left: var(--guide-width);
}

@media (max-width: 980px) {
  .guide-panel {
    display: none;
  }
  .stage {
    width: 100vw;
    margin-left: 0;
  }
}

/* Guide panel toggle */
.guide-panel {
  transition: transform 0.35s ease, opacity 0.25s ease;
}
.guide-panel.collapsed {
  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
}
.stage {
  transition: width 0.35s ease, margin-left 0.35s ease;
}
.stage.expanded {
  width: 100vw;
  margin-left: 0;
}

/* Standalone demo mode: keep the phone simulation full-screen without the guide panel. */
.guide-panel,
#guide-toggle {
  display: none !important;
}

.stage {
  width: 100vw;
  margin-left: 0;
}
