:root {
  color-scheme: light;

  /* --w is the width of the whole interface; every size is derived from it
     so the layout keeps the proportions of the PAD / web mockup. */
  --w: min(1280px, calc(100vw - 40px), calc((100vh - 20px) * 1.34));
  --w: min(1280px, calc(100vw - 40px), calc((100dvh - 20px) * 1.34));

  --ink: #3a1170;
  --ink-soft: #5d3d8a;

  /* 标题/按钮：Baloo 2 接管英文数字，jf open 粉圓接管繁体中文 */
  --font-title: "Baloo 2", "Fredoka", "jf-openhuninn",
                "PingFang TC", "Microsoft JhengHei", sans-serif;

  /* 正文/题目：Nunito 英文数字 + 资源圆体/系统繁体 */
  --font-body: "Nunito", "Resource Han Rounded", "Noto Sans TC",
               "PingFang TC", "Microsoft JhengHei", sans-serif;

  /* 纯数字/算式专用 */
  --font-number: "Baloo 2", "Fredoka", "Nunito", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

[v-cloak] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: "Yuanti TC", "Hiragino Maru Gothic ProN", "PingFang TC",
    "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(90% 70% at 4% 0%, #ffd3e9 0%, rgba(255, 211, 233, 0) 58%),
    radial-gradient(78% 66% at 99% 0%, #9dc9ff 0%, rgba(157, 201, 255, 0) 60%),
    radial-gradient(90% 80% at 4% 100%, #ffcbe9 0%, rgba(255, 203, 233, 0) 62%),
    radial-gradient(82% 72% at 97% 97%, #cbd8ff 0%, rgba(203, 216, 255, 0) 60%),
    linear-gradient(148deg, #ffd0e9 0%, #f0c2f6 32%, #d6b5ff 64%, #b7c8ff 100%);
  background-attachment: fixed;
}

/* ---------------------------------------------------------------- sky ---- */

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.cloud {
  --size: 24vw;
  position: absolute;
  width: var(--size);
  height: calc(var(--size) * 0.42);
  border-radius: 999px;
  background: #fff;
  box-shadow:
    inset 0 calc(var(--size) * -0.035) calc(var(--size) * 0.028) rgba(255, 214, 238, 0.7),
    0 calc(var(--size) * 0.03) calc(var(--size) * 0.05) rgba(185, 145, 220, 0.12);
  filter: blur(0.6px);
  opacity: 0.95;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 calc(var(--size) * -0.05) calc(var(--size) * 0.04) rgba(255, 214, 238, 0.7);
}

.cloud::before {
  width: 46%;
  height: 128%;
  left: 7%;
  bottom: 20%;
}

.cloud::after {
  width: 58%;
  height: 172%;
  right: 8%;
  bottom: 24%;
}

.cloud--a {
  --size: 27vw;
  top: 1.5%;
  right: 4%;
}

.cloud--b {
  --size: 13vw;
  top: 45%;
  right: -2.5%;
  opacity: 0.8;
}

.cloud--c {
  --size: 26vw;
  bottom: -1%;
  left: -4%;
  opacity: 0.9;
}

.cloud--d {
  --size: 16vw;
  bottom: 15%;
  right: -1%;
  opacity: 0.75;
}

.spark {
  --size: clamp(9px, 1.1vw, 18px);
  position: absolute;
  width: var(--size);
  height: var(--size);
  background: #fff;
  clip-path: polygon(50% 0%, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0% 50%, 42% 42%);
  opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.85));
  animation: twinkle 3.6s ease-in-out infinite;
}

.spark--1 { top: 9%; left: 5%; }
.spark--2 { top: 17%; left: 27%; --size: clamp(7px, 0.85vw, 13px); animation-delay: 0.4s; }
.spark--3 { top: 26%; left: 48%; --size: clamp(6px, 0.7vw, 11px); animation-delay: 1.1s; }
.spark--4 { top: 12%; right: 26%; --size: clamp(8px, 0.95vw, 15px); animation-delay: 0.8s; }
.spark--5 { top: 38%; right: 12%; animation-delay: 1.7s; }
.spark--6 { top: 55%; left: 8%; --size: clamp(7px, 0.8vw, 12px); animation-delay: 2.2s; }
.spark--7 { bottom: 27%; right: 22%; --size: clamp(8px, 0.9vw, 14px); animation-delay: 1.4s; }
.spark--8 { bottom: 9%; left: 40%; --size: clamp(7px, 0.8vw, 12px); animation-delay: 2.8s; }

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

/* ---------------------------------------------------------- app shell ---- */

.app {
  position: relative;
  z-index: 1;
  width: var(--w);
  min-height: calc(var(--w) * 0.7275);
  padding: 0 calc(var(--w) * 0.028) calc(var(--w) * 0.006);
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.008);
}

/* ------------------------------------------------------------- header ---- */

.topbar {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.014);
  min-height: calc(var(--w) * 0.1304);
}

.avatar {
  flex: none;
  width: calc(var(--w) * 0.1304);
  height: calc(var(--w) * 0.1304);
  border-radius: 50%;
  background: url("../home/avatar.png") center / cover no-repeat;
  filter: drop-shadow(0 calc(var(--w) * 0.008) calc(var(--w) * 0.014) rgba(158, 109, 190, 0.3));
}

.greeting {
  position: relative;
  margin: 0 0 0 calc(var(--w) * 0.008);
  padding: calc(var(--w) * 0.015) calc(var(--w) * 0.028);
  border-radius: calc(var(--w) * 0.028);
  background: #fff;
  font-size: max(16px, calc(var(--w) * 0.033));
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ink);
  box-shadow:
    0 calc(var(--w) * 0.008) calc(var(--w) * 0.02) rgba(150, 105, 185, 0.2),
    inset 0 calc(var(--w) * -0.002) 0 rgba(238, 224, 248, 0.9);
}

.greeting::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(var(--w) * -0.011);
  transform: translateY(-50%);
  border: calc(var(--w) * 0.012) solid transparent;
  border-left: 0;
  border-right-color: #fff;
}

.star-bank {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.014);
  padding: calc(var(--w) * 0.009) calc(var(--w) * 0.010) calc(var(--w) * 0.009)
    calc(var(--w) * 0.017);
  border-radius: 999px;
  background: linear-gradient(180deg, #ab7ef0 0%, #7b4fd6 48%, #6134b8 100%);
  box-shadow:
    0 calc(var(--w) * 0.005) 0 rgba(92, 52, 160, 0.4),
    0 calc(var(--w) * 0.011) calc(var(--w) * 0.022) rgba(110, 64, 190, 0.3),
    inset 0 calc(var(--w) * 0.002) 0 rgba(255, 255, 255, 0.55),
    inset 0 calc(var(--w) * -0.002) 0 rgba(70, 35, 130, 0.35);
}

.star-bank__icon {
  width: calc(var(--w) * 0.038);
  filter: drop-shadow(0 calc(var(--w) * 0.002) calc(var(--w) * 0.002) rgba(120, 60, 0, 0.35));
}

.star-bank__count {
  padding: 0 calc(var(--w) * 0.002);
  font-size: max(16px, calc(var(--w) * 0.029));
  font-weight: 800;
  line-height: 1;
  color: #fff;
  text-shadow: 0 calc(var(--w) * 0.002) 0 rgba(70, 30, 130, 0.45);
}

.star-bank__add {
  width: calc(var(--w) * 0.036);
  height: calc(var(--w) * 0.036);
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #6b3fc4;
  font-family: inherit;
  font-size: max(13px, calc(var(--w) * 0.022));
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 calc(var(--w) * 0.002) 0 rgba(90, 50, 160, 0.28),
    inset 0 calc(var(--w) * -0.002) 0 rgba(215, 200, 245, 0.9);
  transition: transform 0.15s ease;
}

.star-bank__add:hover {
  transform: translateY(-1px) scale(1.05);
}

.star-bank__add:active {
  transform: scale(0.95);
}

/* ------------------------------------------------------------- board ---- */

.board {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: calc(var(--w) * 0.007);
}

.subjects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--w) * 0.0145);
}

.subject {
  position: relative;
  display: block;
  aspect-ratio: 780 / 721;
  border-radius: calc(var(--w) * 0.024);
  filter: drop-shadow(0 calc(var(--w) * 0.012) calc(var(--w) * 0.018) rgba(130, 90, 175, 0.25));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.subject img {
  display: block;
  width: 100%;
  height: 100%;
}

.subject:hover {
  transform: translateY(calc(var(--w) * -0.005));
  filter: drop-shadow(0 calc(var(--w) * 0.018) calc(var(--w) * 0.024) rgba(130, 90, 175, 0.32));
}

a.progress {
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

a.progress:hover {
  transform: translateY(calc(var(--w) * -0.003));
  box-shadow:
    0 calc(var(--w) * 0.016) calc(var(--w) * 0.030) rgba(140, 105, 190, 0.2),
    inset 0 calc(var(--w) * 0.002) 0 rgba(255, 255, 255, 0.9);
}

.progress__arrow {
  flex: none;
  width: calc(var(--w) * 0.016);
  height: calc(var(--w) * 0.016);
  margin-left: calc(var(--w) * 0.010);
  border-top: calc(var(--w) * 0.0035) solid #a63a8f;
  border-right: calc(var(--w) * 0.0035) solid #a63a8f;
  border-radius: 2px;
  transform: rotate(45deg);
}

.subject:focus-visible,
.challenge:focus-visible,
.progress:focus-visible,
.tabbar a:focus-visible,
.star-bank__add:focus-visible {
  outline: calc(var(--w) * 0.003) solid rgba(255, 255, 255, 0.95);
  outline-offset: calc(var(--w) * 0.005);
}

/* ---------------------------------------------------------- progress ---- */

.progress {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.012);
  min-height: calc(var(--w) * 0.104);
  margin-inline: calc(var(--w) * 0.012);
  padding: calc(var(--w) * 0.006) calc(var(--w) * 0.022);
  border-radius: calc(var(--w) * 0.032);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(228, 208, 255, 0.58));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 calc(var(--w) * 0.012) calc(var(--w) * 0.024) rgba(140, 105, 190, 0.16),
    inset 0 calc(var(--w) * 0.002) 0 rgba(255, 255, 255, 0.9);
}

.progress__mascot {
  flex: none;
  width: calc(var(--w) * 0.105);
  margin: calc(var(--w) * -0.012) 0;
  filter: drop-shadow(0 calc(var(--w) * 0.008) calc(var(--w) * 0.01) rgba(150, 100, 20, 0.28));
}

.progress__copy h2 {
  margin: 0 0 calc(var(--w) * 0.002);
  font-size: max(16px, calc(var(--w) * 0.0215));
  letter-spacing: 0.04em;
  color: var(--ink);
}

.progress__copy p {
  margin: 0;
  font-size: max(12px, calc(var(--w) * 0.0155));
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.progress__meter {
  margin-left: auto;
  flex: 0 1 calc(var(--w) * 0.335);
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.0085);
}

.meter {
  height: calc(var(--w) * 0.025);
  padding: calc(var(--w) * 0.0035);
  border-radius: 999px;
  background: #fff;
  box-shadow:
    inset 0 calc(var(--w) * 0.0015) calc(var(--w) * 0.003) rgba(120, 80, 160, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.9);
}

.meter__fill {
  display: block;
  width: 60%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb187 0%, #ff8fb0 28%, #db6fe2 64%, #8b5cf6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  animation: fill 1.1s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

@keyframes fill {
  from {
    width: 0;
  }
  to {
    width: 60%;
  }
}

.meter__stars {
  display: flex;
  gap: calc(var(--w) * 0.0184);
  margin: 0;
  padding: 0 0 0 calc(var(--w) * 0.008);
  list-style: none;
}

.meter__stars img {
  display: block;
  width: calc(var(--w) * 0.0304);
  filter: drop-shadow(0 calc(var(--w) * 0.002) calc(var(--w) * 0.002) rgba(150, 100, 0, 0.25));
}

.meter__stars .is-empty img {
  filter: grayscale(1) brightness(0.72) opacity(0.85);
}

.progress__score {
  flex: none;
  margin: 0 0 0 auto;
  text-align: center;
  line-height: 1.15;
}

.progress__score strong {
  display: block;
  font-size: max(15px, calc(var(--w) * 0.019));
  letter-spacing: 0.02em;
  color: #a63a8f;
}

.progress__score span {
  display: block;
  margin-top: calc(var(--w) * 0.002);
  font-size: max(11px, calc(var(--w) * 0.0125));
  font-weight: 700;
  color: #8a5aa8;
}

/* --------------------------------------------------------- challenge ---- */

.challenge {
  width: min(100%, calc(var(--w) * 0.63));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.014);
  padding: calc(var(--w) * 0.003) calc(var(--w) * 0.014) calc(var(--w) * 0.003)
    calc(var(--w) * 0.003);
  border: calc(var(--w) * 0.0035) solid #f0881e;
  border-radius: calc(var(--w) * 0.042);
  background: linear-gradient(180deg, #ffae37 0%, #ff8f1f 46%, #fa7c12 100%);
  box-shadow:
    0 calc(var(--w) * 0.006) 0 rgba(206, 105, 10, 0.38),
    0 calc(var(--w) * 0.014) calc(var(--w) * 0.02) rgba(214, 120, 30, 0.26),
    inset 0 calc(var(--w) * 0.002) 0 rgba(255, 255, 255, 0.45);
  color: #fff;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.challenge:hover {
  transform: translateY(calc(var(--w) * -0.003));
  box-shadow:
    0 calc(var(--w) * 0.008) 0 rgba(206, 105, 10, 0.38),
    0 calc(var(--w) * 0.018) calc(var(--w) * 0.026) rgba(214, 120, 30, 0.3),
    inset 0 calc(var(--w) * 0.002) 0 rgba(255, 255, 255, 0.45);
}

.challenge__badge {
  flex: none;
  width: calc(var(--w) * 0.082);
  filter: drop-shadow(0 calc(var(--w) * 0.003) calc(var(--w) * 0.004) rgba(150, 70, 0, 0.3));
}

.challenge__badge img {
  display: block;
  width: 100%;
}

.challenge__copy strong {
  display: block;
  font-size: max(17px, calc(var(--w) * 0.026));
  letter-spacing: 0.07em;
  line-height: 1.15;
  text-shadow:
    0 calc(var(--w) * 0.002) 0 rgba(180, 80, 0, 0.5),
    0 calc(var(--w) * 0.004) calc(var(--w) * 0.008) rgba(160, 70, 0, 0.35);
}

.challenge__copy small {
  display: block;
  margin-top: calc(var(--w) * 0.002);
  font-size: max(11px, calc(var(--w) * 0.015));
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.96);
}

.challenge__arrow {
  margin-left: auto;
  margin-right: calc(var(--w) * 0.014);
  width: calc(var(--w) * 0.017);
  height: calc(var(--w) * 0.017);
  flex: none;
  border-top: calc(var(--w) * 0.0038) solid #fff;
  border-right: calc(var(--w) * 0.0038) solid #fff;
  border-radius: 2px;
  transform: rotate(45deg);
  filter: drop-shadow(0 calc(var(--w) * 0.002) 0 rgba(170, 80, 0, 0.35));
}

/* ------------------------------------------------------------ tabbar ---- */

.tabbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--w) * 0.004);
}

.tabbar ul {
  width: 100%;
  margin: 0;
  padding: calc(var(--w) * 0.0035) calc(var(--w) * 0.02);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  list-style: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 calc(var(--w) * 0.008) calc(var(--w) * 0.018) rgba(150, 110, 200, 0.2),
    inset 0 calc(var(--w) * 0.002) 0 #fff;
}

.tabbar li {
  display: flex;
  justify-content: center;
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--w) * 0.001);
  padding: calc(var(--w) * 0.0025) calc(var(--w) * 0.01);
  border-radius: calc(var(--w) * 0.018);
  text-decoration: none;
  transition: transform 0.16s ease;
}

/* The artwork ships with a baked-in label; clip it away and render the
   label as real text so it stays correct and selectable. */
.tab-icon {
  display: block;
  height: calc(var(--w) * 0.039);
  overflow: hidden;
}

.tab-icon img {
  display: block;
  height: calc(var(--w) * 0.059);
  width: auto;
  filter: drop-shadow(0 calc(var(--w) * 0.002) calc(var(--w) * 0.003) rgba(110, 70, 160, 0.2));
}

.tab-label {
  font-size: max(11px, calc(var(--w) * 0.0135));
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  color: var(--tab-ink);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65),
    0 calc(var(--w) * 0.002) calc(var(--w) * 0.002) rgba(110, 60, 150, 0.28);
}

.tab--home {
  --tab-ink: #8a2b83;
}

.tab--learn,
.tab--achiev,
.tab--my {
  --tab-ink: #3f2168;
}

.tabbar a:hover {
  transform: translateY(calc(var(--w) * -0.003));
}

.home-indicator {
  width: calc(var(--w) * 0.11);
  height: calc(var(--w) * 0.0035);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 2px rgba(150, 110, 200, 0.2);
}

/* -------------------------------------------------------- responsive ---- */

@media (max-width: 900px) {
  :root {
    --w: calc(100vw - 32px);
  }

  .app {
    height: auto;
    min-height: 100dvh;
    padding-bottom: 12px;
  }

  .board {
    justify-content: center;
    gap: 16px;
    padding-block: 14px;
  }

  .topbar {
    gap: 10px;
    min-height: 0;
    padding-top: 8px;
  }

  .avatar {
    width: 68px;
    height: 68px;
  }

  .greeting {
    margin-left: 8px;
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 15px;
    box-shadow: 0 6px 14px rgba(150, 105, 185, 0.2);
  }

  .greeting::before {
    left: -9px;
    border-width: 9px;
  }

  .star-bank {
    gap: 4px;
    padding: 4px 4px 4px 10px;
  }

  .star-bank__icon {
    width: 24px;
  }

  .star-bank__count {
    font-size: 16px;
  }

  .star-bank__add {
    width: 26px;
    height: 26px;
    font-size: 15px;
  }

  .subjects {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 2px 12px;
    margin-inline: -2px;
    scrollbar-width: none;
  }

  .subjects::-webkit-scrollbar {
    display: none;
  }

  .subject {
    flex: 0 0 76%;
    scroll-snap-align: center;
  }

  .progress {
    flex-wrap: wrap;
    padding: 10px 16px 14px;
    border-radius: 24px;
    row-gap: 10px;
  }

  .progress__mascot {
    width: 66px;
    margin: -6px 0;
  }

  .progress__copy h2 {
    margin-bottom: 2px;
    font-size: 16px;
  }

  .progress__copy p {
    font-size: 12px;
  }

  .progress__score {
    margin-left: auto;
  }

  .progress__score strong {
    font-size: 16px;
  }

  .progress__meter {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
    gap: 8px;
  }

  .meter {
    height: 16px;
    padding: 3px;
  }

  .meter__stars {
    gap: 12px;
    padding-left: 6px;
  }

  .meter__stars img {
    width: 20px;
  }

  .challenge {
    width: 100%;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-width: 3px;
    border-radius: 26px;
  }

  .challenge__badge {
    width: 46px;
  }

  .challenge__copy strong {
    font-size: 17px;
  }

  .challenge__copy small {
    font-size: 11px;
  }

  .challenge__arrow {
    width: 12px;
    height: 12px;
    border-width: 3px;
    margin-right: 6px;
  }

  .tabbar {
    position: sticky;
    bottom: 0;
    gap: 6px;
    padding-bottom: 4px;
    background: linear-gradient(180deg, rgba(225, 212, 255, 0), rgba(225, 212, 255, 0.75) 40%);
    backdrop-filter: blur(6px);
  }

  .tabbar ul {
    padding: 6px 12px;
  }

  .tab-icon {
    height: 34px;
  }

  .tab-icon img {
    height: 52px;
  }

  .tab-label {
    font-size: 12px;
  }

  .home-indicator {
    width: 110px;
    height: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}


/* ------------- Lists ------------ */

.ListArea {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--w) * 0.0145);
  display: block;
  padding: calc(var(--w) * 0.03) calc(var(--w) * 0) 0 calc(var(--w) * 0.34);
}
.ListArea article {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2.9;
}
.ListArea article::before {
  content: "";
  position: absolute;
  top: calc(var(--w) * -0.024);
  left: calc(var(--w) * -0.397);
  width: calc(var(--w) * 0.4);
  height: calc(var(--w) * 0.6);
  background: url(../home/GirlListEng.png) left center no-repeat;
  background-size: contain;
  display: none;
}
.ListAreaCn {
  padding: calc(var(--w) * 0.03) calc(var(--w) * 0) 0 calc(var(--w) * 0.23);
}
.ListAreaCn article {
  aspect-ratio: 3 / 2.4;
}
.ListAreaCn article ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-content: center;
  gap: calc(var(--w) * 0.01);
  margin: 0;
  height: 100%;
  list-style: none;
}
.ListAreaCn article ul li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: calc(var(--w) * 0.014);
  gap: calc(var(--w) * 0.014);
  border-radius: calc(var(--w) * 0.024);
  background-color: #ffecf0;
  border: calc(var(--w) * 0.006) solid rgba(250, 208, 218, 0.9);
  outline: calc(var(--w) * 0.002) solid #fb839e;
  box-shadow: 0 calc(var(--w) * 0.004) calc(var(--w) * 0.003) rgba(85, 15, 25, 0.28);
}
.ListAreaCn article ul li i {
  display: block;
  width: calc(var(--w) * 0.1);
  aspect-ratio: 1 / 1;
  background: url(../home/imgCn01.png) left 0 no-repeat;
  background-size: cover;
  border-radius: calc(var(--w) * 0.014);
  border: calc(var(--w) * 0.002) solid #ff7f9b;
}
.ListAreaCn article ul li div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(var(--w) * 0.004);
}
.ListAreaCn article ul li div h3 {
  font-size: max(18px, calc(var(--w) * 0.03));
  font-weight: 400;
  color: #df3359;
}
.ListAreaCn article ul li div h6 {
  font-size: max(16px, calc(var(--w) * 0.02));
  font-weight: 400;
  color: #df3359;
}
.ListAreaCn article ul li div p {
  padding-top: calc(var(--w) * 0.014);
}
.ListAreaCn article ul li div p b {
  margin-right: calc(var(--w) * 0.014);
}
.ListAreaCn article ul li:nth-child(2) {
  background-color: #fbeffd;
  border-color: #edd3ff;
  outline-color: #9979de;
}
.ListAreaCn article ul li:nth-child(2) div h3,
.ListAreaCn article ul li:nth-child(2) div h6 {
  color: #df3359;
}
.ListAreaCn article ul li:nth-child(2) i {
  background-image: url(../home/imgCn02.png);
  border-color: #be9ef1;
}
.ListAreaCn article ul li:nth-child(2) div h3,
.ListAreaCn article ul li:nth-child(2) div h6 {
  color: #6a36a4;
}
.ListAreaCn article ul li:nth-child(3) {
  background-color: #fef8e2;
  border-color: #feeab5;
  outline-color: #f5ae56;
}
.ListAreaCn article ul li:nth-child(3) i {
  background-image: url(../home/imgCn03.png);
  border-color: #f7bf72;
}
.ListAreaCn article ul li:nth-child(3) div h3 {
  color: #df8b19;
}
.ListAreaCn article ul li:nth-child(3) div h6 {
  color: #df8b19;
}
.ListAreaCn article ul li:nth-child(4) {
  background-color: #fcfdf7;
  border-color: #d7f8dd;
  outline-color: #76caa8;
}
.ListAreaCn article ul li:nth-child(4) i {
  background-image: url(../home/imgCn04.png);
  border-color: #a4e7b4;
}
.ListAreaCn article ul li:nth-child(4) div h3,
.ListAreaCn article ul li:nth-child(4) div h6 {
  color: #13894d;
}
.ListAreaCn article ul li:nth-child(5) {
  background-color: #f0f7ff;
  border-color: #cfe7ff;
  outline-color: #70a3f2;
}
.ListAreaCn article ul li:nth-child(5) i {
  background-image: url(../home/imgCn05.png);
  border-color: #6ca5f2;
}
.ListAreaCn article ul li:nth-child(5) div h3,
.ListAreaCn article ul li:nth-child(5) div h6 {
  color: #0a51b9;
}
.ListAreaCn article ul li:nth-child(6) {
  background-color: #fef0ef;
  border-color: #ffd6da;
  outline-color: #fb8488;
}
.ListAreaCn article ul li:nth-child(6) i {
  background-image: url(../home/imgCn06.png);
  border-color: #fd98a8;
}
.ListAreaCn article ul li:nth-child(6) div h3,
.ListAreaCn article ul li:nth-child(6) div h6 {
  color: #e64459;
}


.ListAreaMath {
  padding: calc(var(--w) * 0.03) 0 0 calc(var(--w) * 0.23);
}
.ListAreaMath article {
  aspect-ratio: 3 / 2.4;
}
.ListAreaMath article ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-content: center;
  gap: calc(var(--w) * 0.01);
  margin: 0;
  height: 100%;
  list-style: none;
}
.ListAreaMath article ul li {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: calc(var(--w) * 0.014);
  gap: calc(var(--w) * 0.014);
  border-radius: calc(var(--w) * 0.024);
  background-color: #feeef1;
  border: calc(var(--w) * 0.002) solid #ef94a3;
  box-shadow: 0 calc(var(--w) * 0.004) calc(var(--w) * 0.003) rgba(85, 15, 25, 0.18);
}
.ListAreaMath article ul li dl {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  gap: calc(var(--w) * 0.014);
}
.ListAreaMath article ul li dt {
  display: block;
  width: calc(var(--w) * 0.1);
  aspect-ratio: 1 / 1;
  background: url(../home/imgMath01.png) left 0 no-repeat;
  background-size: cover;
  border-radius: 50%;
  border: calc(var(--w) * 0.002) solid #c7919f;
}
.ListAreaMath article ul li dd {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(var(--w) * 0.004);
}
.ListAreaMath article ul li dd h3 {
  font-size: max(18px, calc(var(--w) * 0.03));
  font-weight: 600;
  color: #692e8c;
}
.ListAreaMath article ul li dd h6 {
  font-size: max(16px, calc(var(--w) * 0.02));
  font-weight: 400;
  color: #692e8c;
}
.ListAreaMath article ul li dd cite {
  color: #972988;
  padding-bottom: calc(var(--w) * 0.004);
}
.ListAreaMath article ul li div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.ListAreaMath article ul li div p {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(var(--w) * 0.014);
}
.ListAreaMath article ul li div a {
  padding: calc(var(--w) * 0.012) calc(var(--w) * 0.02);
  font-size: max(16px, calc(var(--w) * 0.02));
  font-weight: 600;
  color: #fff;
  background-color: #ff6893;
  border-radius: calc(var(--w) * 0.01);
  border: 2px solid #e74577;
  box-shadow: 0 calc(var(--w) * 0.004) calc(var(--w) * 0.003) rgba(85, 15, 25, 0.28), inset 0 calc(var(--w) * 0.002) 0 rgba(255, 255, 255, 0.45);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ListAreaMath article ul li div a::before {
  padding-right: calc(var(--w) * 0.006);
  content: "▶";
  margin-right: calc(var(--w) * 0.004);
  font-size: max(14px, calc(var(--w) * 0.018));
  border-radius: calc(var(--w) * 0.01);
}
.ListAreaMath article ul li:nth-child(2) {
  background-color: #ecf4ff;
  border-color: #91b0e6;
}
.ListAreaMath article ul li:nth-child(2) dt {
  background-image: url(../home/imgMath02.png);
  border-color: #4096df;
}
.ListAreaMath article ul li:nth-child(2) dd h3,
.ListAreaMath article ul li:nth-child(2) dd h6 {
  color: #195eac;
}
.ListAreaMath article ul li:nth-child(2) dd cite {
  color: #195eac;
}
.ListAreaMath article ul li:nth-child(3) {
  background-color: #fafef0;
  border-color: #5b8a60;
}
.ListAreaMath article ul li:nth-child(3) dt {
  background-image: url(../home/imgMath03.png);
  border-color: #96e9b5;
}
.ListAreaMath article ul li:nth-child(3) dd h3,
.ListAreaMath article ul li:nth-child(3) dd h6,
.ListAreaMath article ul li:nth-child(3) dd cite {
  color: #297946;
}
.ListAreaMath article ul li:nth-child(4) {
  background-color: #fdf6e3;
  border-color: #f9d2ab;
}
.ListAreaMath article ul li:nth-child(4) dt {
  background-image: url(../home/imgMath04.png);
  border-color: #e9c881;
}
.ListAreaMath article ul li:nth-child(4) dd h3,
.ListAreaMath article ul li:nth-child(4) dd h6,
.ListAreaMath article ul li:nth-child(4) dd cite {
  color: #b97313;
}
.ListAreaMath article ul li:nth-child(5) {
  background-color: #faeffd;
  border-color: #b76ad8;
}
.ListAreaMath article ul li:nth-child(5) dt {
  background-image: url(../home/imgMath05.png);
  border-color: #c497e8;
}
.ListAreaMath article ul li:nth-child(5) dd h3,
.ListAreaMath article ul li:nth-child(5) dd h6,
.ListAreaMath article ul li:nth-child(5) dd cite {
  color: #5f3193;
}
.ListAreaMath article ul li:nth-child(6) {
  background-color: #ffeef4;
  border-color: #f49dbd;
}
.ListAreaMath article ul li:nth-child(6) dt {
  background-image: url(../home/imgMath06.png);
  border-color: #fc95c2;
}
.ListAreaMath article ul li:nth-child(6) dd h3,
.ListAreaMath article ul li:nth-child(6) dd h6,
.ListAreaMath article ul li:nth-child(6) dd cite {
  color: #713098;
}

.ListAreaEng {
  padding: calc(var(--w) * 0.03) calc(var(--w) * 0) 0 calc(var(--w) * 0.34);
}
.ListAreaEng article {
  border-color: rgba(232, 203, 249, 0.8);
  border-radius: calc(var(--w) * 0.03);
  filter: drop-shadow(0 calc(var(--w) * 0.012) calc(var(--w) * 0.018) rgba(130, 90, 175, 0.25));
  transition: transform 0.2s ease, filter 0.2s ease;
  border: rgba(214, 152, 205, 0.45) solid calc(var(--w) * 0.007);
  background-color: #fff;
  box-shadow:
    0 calc(var(--w) * 0.004) calc(var(--w) * 0.003) rgba(85, 15, 25, 0.28),
    0 calc(var(--w) * 0.016) calc(var(--w) * 0.03) rgba(214, 30, 94, 0.16 ),
    inset 0 calc(var(--w) * 0.002) 0 rgba(253, 249, 249, 0.45);
}
.ListAreaEng article::before {
  display: block;
  top: calc(var(--w) * 0.024);
  left: calc(var(--w) * -0.347);
  width: calc(var(--w) * 0.36);
  height: calc(var(--w) * 0.5);
  background: url(../home/GirlListEng2.png) left center no-repeat;
  background-size: contain;
}
.ListAreaEng article ul {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(var(--w) * 0.01);
  margin: 0;
  padding: calc(var(--w) * 0.024) calc(var(--w) * 0.024);
  height: 100%;
  list-style: none;
}
.ListAreaEng article ul li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--w) * 0.004);
  border: 1px solid rgba(214, 152, 205, 0.45);
  border-radius: calc(var(--w) * 0.014);
}
.ListAreaEng article ul li dl {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.ListAreaEng article ul li dt {
  display: block;
  height: calc(var(--w) * 0.08);
  aspect-ratio: 19 / 14;
  background: url(../home/IconProject.png) left 0 no-repeat;
  background-size: cover;
  border-radius: calc(var(--w) * 0.014);
}
.ListAreaEng article ul li dd {
  margin-left: calc(var(--w) * 0.014);
}
.ListAreaEng article ul li h3 {
  margin-bottom: calc(var(--w) * 0.014);
  font-size: max(16px, calc(var(--w) * 0.02));
  font-weight: 600;
  color: #e74577;
}
.ListAreaEng article ul li dd b {
  margin-right: calc(var(--w) * 0.014);
}
.ListAreaEng article ul li button {
  margin-right: calc(var(--w) * 0.014);
  padding: calc(var(--w) * 0.014) calc(var(--w) * 0.024);
  font-size: max(14px, calc(var(--w) * 0.018));
  font-weight: 600;
  color: #fff;
  background-color: #ff6893;
  border-radius: calc(var(--w) * 0.01);
  border: 2px solid #e74577;
  box-shadow: 0 calc(var(--w) * 0.004) calc(var(--w) * 0.003) rgba(85, 15, 25, 0.28), inset 0 calc(var(--w) * 0.002) 0 rgba(255, 255, 255, 0.45);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ListAreaEng article ul li button:active {
  transform: translateY(calc(var(--w) * 0.004));
  box-shadow: inset 0 calc(var(--w) * 0.002) 0 rgba(255, 255, 255, 0.45);
}
.ListAreaEng article ul li:first-child {
  background-color: #ffe1e9;
  border-color: #f3c7d8;
}
.ListAreaEng article ul li:nth-child(2) {
  background-color: #f3dbfd;
  border-color: #d8aff2;
}
.ListAreaEng article ul li:nth-child(2) dt {
  background: url(../home/IconProject_002.png) left 0 no-repeat;
  background-size: cover;
}
.ListAreaEng article ul li:nth-child(3) {
  background-color: #dceffe;
  border-color: #c3d1eb;
}
.ListAreaEng article ul li:nth-child(3) dt {
  background: url(../home/IconProject_003.png) left 0 no-repeat;
  background-size: cover;
}
.ListAreaEng article ul li:nth-child(4) {
  background-color: #ecf8e2;
  border-color: #d4e4c5;
}
.ListAreaEng article ul li:nth-child(4) dt {
  background: url(../home/IconProject_004.png) left 0 no-repeat;
  background-size: cover;
}
.ListAreaEng article ul li:nth-child(5) {
  background-color: #fff2cd;
  border-color: #ead9b6;
}
.ListAreaEng article ul li:nth-child(5) dt {
  background: url(../home/IconProject_005.png) left 0 no-repeat;
  background-size: cover;
}


/* ------------- Details ------------ */

body.detail {
  background: url(../home/BgDetail.jpg) center / cover no-repeat;
}

.DetArea {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--w) * 0.0145);
}
.DetArea article {
  position: relative;
  align-items: center;
  display: block;
  aspect-ratio: 2 / 1.2;
  border-radius: calc(var(--w) * 0.04);
  filter: drop-shadow(0 calc(var(--w) * 0.012) calc(var(--w) * 0.018) rgba(130, 90, 175, 0.25));
  transition: transform 0.2s ease, filter 0.2s ease;
  border: rgba(214, 152, 205, 0.45) solid calc(var(--w) * 0.007);
  background-color: #fff;
  box-shadow:
    0 calc(var(--w) * 0.004) calc(var(--w) * 0.003) rgba(85, 15, 25, 0.28),
    0 calc(var(--w) * 0.016) calc(var(--w) * 0.03) rgba(214, 30, 94, 0.16),
    inset 0 calc(var(--w) * 0.002) 0 rgba(253, 249, 249, 0.45);
}
.DetArea article::before {
  content: "";
  position: absolute;
  top: calc(var(--w) * -0.11);
  left: calc(var(--w) * -0.36);
  width: calc(var(--w) * 0.5);
  height: calc(var(--w) * 0.5);
  background: url(../home/GirlDetEng.png) left center no-repeat;
  background-size: contain;
}

.DetArea .subject {
  position: relative;
  display: block;
  aspect-ratio: 780 / 721;
  border-radius: calc(var(--w) * 0.024);
  filter: drop-shadow(0 calc(var(--w) * 0.012) calc(var(--w) * 0.018) rgba(130, 90, 175, 0.25));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.TopBarBackArea {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.014);
}
.topbarDetail,.toolBarTop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: calc(var(--w) * 0.012);
}
.IconBack {
  display: block;
  width: calc(var(--w) * 0.072);
  height: calc(var(--w) * 0.072);
  background: url(../home/IconDet.png) left center no-repeat;
  background-size: cover;
  text-indent: -9999%;
}
.titleDet {
  width: calc(var(--w) * 0.32);
  height: calc(var(--w) * 0.062);
  background: url(../home/titleDet.png) left center no-repeat;
  background-size: contain;
  text-indent: -9999%;
}
.topbarDetail dl {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.014);
}
.topbarDetail dl dt,
.topbarDetail dl dd {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.014);
  padding: calc(var(--w) * 0.004) calc(var(--w) * 0.02);
  border-radius: calc(var(--w) * 0.038);
  background: #fff;
  box-shadow:
    0 calc(var(--w) * 0.004) calc(var(--w) * 0.003) rgba(85, 15, 25, 0.28),
    0 calc(var(--w) * 0.016) calc(var(--w) * 0.03) rgba(214, 30, 94, 0.16),
    inset 0 calc(var(--w) * 0.002) 0 rgba(253, 249, 249, 0.45);
  border: calc(var(--w) * 0.004) solid rgba(250, 125, 234, 0.45);
  font-size: max(16px, calc(var(--w) * 0.029));
  font-weight: 600;
  color: var(--ink);
  width: calc(var(--w) * 0.26);
}
.topbarDetail dl dt {
  justify-content: space-between;
}
.topbarDetail dl dd {
  padding-right: calc(var(--w) * 0.024);
  width: calc(var(--w) * 0.19);
}
.topbarDetail dl dt::before,
.topbarDetail dl dd::before,
.topbarDetail dl dt::after {
  content: "";
  display: block;
  width: calc(var(--w) * 0.05);
  height: calc(var(--w) * 0.05);
  background: url(../home/IconDet.png) left center no-repeat;
  background-size: auto 140%;
}
.topbarDetail dl dt::before {
  background-position: calc(var(--w) * -0.269) center;
}
.topbarDetail dl dt::after {
  margin-left:  calc(var(--w) * -0.006);
  width: calc(var(--w) * 0.03);
  height: calc(var(--w) * 0.03);
  background-position: calc(var(--w) * -0.157) center;
  background-size: auto 190%;
}
.topbarDetail dl dd::before {
  background-position: calc(var(--w) * -0.108) center;
}
.topbarDetail dl cite {
  display: block;
  width: calc(var(--w) * 0.06);
  height: calc(var(--w) * 0.06);
  border-radius: 50%;
  background: url(../home/iconTool.png) right center no-repeat;
  background-size: cover;
  box-shadow:
    0 calc(var(--w) * 0.004) calc(var(--w) * 0.003) rgba(85, 15, 25, 0.28),
    0 calc(var(--w) * 0.016) calc(var(--w) * 0.03) rgba(214, 30, 94, 0.16);
}


.toolBarTop .state {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.014);
}
.toolBarTop dl {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.018);
  padding: calc(var(--w) * 0.009) calc(var(--w) * 0.010) calc(var(--w) * 0.009)
    calc(var(--w) * 0.017);
  border-radius: 999px;
  background: linear-gradient(180deg, #ab7ef0 0%, #7b4fd6 48%, #6134b8 100%);
  background: #ffe4f0;
  border: #fff solid calc(var(--w) * 0.004);
  box-shadow:
    0 calc(var(--w) * 0.004) calc(var(--w) * 0.008) rgba(110, 64, 190, 0.3),
    inset 0 calc(var(--w) * 0.002) calc(var(--w) * 0.01) rgba(70, 35, 130, 0.05);
}
.toolBarTop dt {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.014);
  padding: 0 calc(var(--w) * 0.002);
  font-size: max(16px, calc(var(--w) * 0.029));
  font-weight: 800;
  line-height: 1;
  color: #563085;
  background-image: linear-gradient(0deg, var(--ink), #563085, rgba(70, 30, 130, 0.95));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* 更穩妥的透明寫法： */
  -webkit-text-fill-color: transparent;
  text-shadow: 0 calc(var(--w) * 0.001) calc(var(--w) * 0.002) rgba(70, 30, 130, 0.25);
  filter: drop-shadow(0 calc(var(--w) * 0.012) calc(var(--w) * 0.018) rgba(130, 90, 175, 0.25));
}
.toolBarTop dt::before {
  content: "";
  display: block;
  height: calc(var(--w) * 0.034);
  width: calc(var(--w) * 0.034);
  background: url(../home/iconStar.png) left center no-repeat;
  background-size: auto 100%;
}
.toolBarTop .heart dt::before {
  content: "";
  display: block;
  height: calc(var(--w) * 0.034);
  width: calc(var(--w) * 0.034);
  background: url(../home/iconHeart.png) left center no-repeat;
  background-size: contain;
}
.toolBarTop dd {
  flex: none;
  display: grid;
  margin: 0;
  place-items: center;
  width: calc(var(--w) * 0.036);
  height: calc(var(--w) * 0.036);
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-family: inherit;
  font-size: max(13px, calc(var(--w) * 0.024));
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  background: linear-gradient(180deg, #fabccf 0%, #fd84af 48%, #ff689d 100%);
  box-shadow:
    0 calc(var(--w) * 0.002) calc(var(--w) * 0.002) rgba(90, 50, 160, 0.28),
    inset 0 calc(var(--w) * 0.002) 0 rgba(254, 244, 248, 0.4);
  transition: transform 0.15s ease;
  text-shadow: 0 calc(var(--w) * 0.002) 0 rgba(70, 30, 130, 0.45);
  border: #d63a6a solid calc(var(--w) * 0.001);
}
.toolBarTop dd:hover {
  transform: translateY(-1px) scale(1.05);
}
.toolBarTop dd:active {
  transform: scale(0.95);
}


.BottomBar {
  /* width: fit-content; */
  max-width: 100%;
  gap: calc(var(--w) * 0.014);
  display: flex;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  justify-content: flex-end;
}
.BottomBar button {
  --ico-h: calc(var(--w) * 0.034);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: calc(var(--w) * 0.012);
  padding: calc(var(--w) * 0.014) calc(var(--w) * 0.022);
  border-radius: calc(var(--w) * 0.018);
  text-decoration: none;
  box-shadow:
    0 calc(var(--w) * 0.006) 0 rgba(85, 15, 25, 0.28),
    0 calc(var(--w) * 0.014) calc(var(--w) * 0.02) rgba(214, 30, 94, 0.16),
    inset 0 calc(var(--w) * 0.002) 0 rgba(253, 249, 249, 0.45);
  background-color: #4cc4c3;
  border: calc(var(--w) * 0.004) solid #fff;
  background: linear-gradient(180deg, #59dddb 0%, #3bb9b7 46%, #4cc4c3 100%);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  font-family: inherit;
  font-size: calc(var(--w) * 0.04);
  font-weight: 600;
  line-height: 1;
  color: #fff;
  text-shadow: 0 calc(var(--w) * 0.002) 0 rgba(70, 30, 130, 0.45);
  cursor: pointer;
  appearance: none;
}
.BottomBar button:active:not(:disabled) {
  transform: translateY(calc(var(--w) * 0.004));
  box-shadow:
    0 calc(var(--w) * 0.002) 0 rgba(85, 15, 25, 0.28),
    inset 0 calc(var(--w) * 0.002) 0 rgba(253, 249, 249, 0.45);
}
.BottomBar button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.5);
  opacity: 0.62;
}
.BottomBar button.next {
  background: linear-gradient(180deg, #ff7ead 0%, #fb6998 46%, #d73d73 100%);
}

/* Leading icon: one sprite sheet, cropped per button. */
.BottomBar button::before {
  content: "";
  display: block;
  flex: none;
  height: var(--ico-h);
  aspect-ratio: var(--ico-ratio, 1);
  background-image: url(../home/IconDet.png);
  background-repeat: no-repeat;
  background-size: calc(var(--ico-h) * 13.5147) auto;
  background-position: calc(var(--ico-h) * var(--ico-x, 0) * -1) center;
}
.BottomBar .rest {
  display: none;
}
.BottomBar .rest::before {
  --ico-ratio: 191 / 146;
  --ico-x: 8.4371;
}
.BottomBar .IconPlay::before {
  --ico-ratio: 102 / 118;
  --ico-x: 11.5629;
}
.BottomBar .again::before {
  --ico-ratio: 122 / 121;
  --ico-x: 12.7665;
}
.BottomBar .next::before {
  --ico-ratio: 132 / 104;
  --ico-x: 10.1737;
}

.BottomBar button.origin::before {
  content: none;
}
.BottomBar .IconPlay.is-playing::before {
  width: calc(var(--ico-h) * 0.62);
  aspect-ratio: auto;
  background-image: linear-gradient(90deg, #fff 0 34%, transparent 34% 66%, #fff 66% 100%);
  background-size: 100% 100%;
  background-position: 0 0;
  border-radius: calc(var(--w) * 0.004);
}
.BottomBar i {
  display: inline-block;
  width: calc(var(--w) * 0.024);
  height: calc(var(--w) * 0.024);
  /* filter: drop-shadow(0 calc(var(--w) * 0.003) calc(var(--w) * 0.004) rgba(150, 70, 0, 0.3)); */
  background: url(../home/IconDet.png) calc(var(--w) * -0.652) center no-repeat;
  background-size: auto 360%;
  /* border: #3a1170 1px solid; */
}

.DetArea {
  display: block;
  padding: calc(var(--w) * 0.1) calc(var(--w) * 0) 0 calc(var(--w) * 0.3);
  ;
}
.DetArea div,
.DetArea article > p {
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.014);
  text-decoration: none;
  color: var(--ink);
  height: 100%;
  justify-content: center;
  align-items: center;
}
.DetArea div span,
.DetArea article > p span {
  display: block;
  padding: calc(var(--w) * 0.014);
  font-size: calc(var(--w) * 0.06);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 calc(var(--w) * 0.002) 0 rgba(70, 30, 130, 0.15);
  color: #563085;
  background-image: linear-gradient(90deg, var(--ink), #563085, #895EA7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* 更穩妥的透明寫法： */
  -webkit-text-fill-color: transparent;
}
.FontT0 {
  font-size: calc(var(--w) * 0.2);
}
.DetArea article > p.FontT0 span {
  text-shadow: 0 calc(var(--w) * 0.006) 0 rgba(70, 30, 130, 0.15);
}
/* .DetArea div span sets its own size, so the opt-in class on the wrapper has to
   be passed down explicitly. */
.DetArea div.FontT0 span,
.DetArea article > p.FontT0 span {
  font-size: inherit;
}
.DetArea div span.is-sentence,
.DetArea article > p span.is-sentence {
  font-size: calc(var(--w) * 0.042);
  line-height: 1.4;
  text-align: center;
}
.DetArea div span.is-done,
.DetArea article > p span.is-done {
  padding-inline: calc(var(--w) * 0.04);
  font-size: calc(var(--w) * 0.045);
  line-height: 1.4;
  text-align: center;
}
/* 英文題目：主字詞下方顯示翻譯。 */
.DetArea article.generalArea {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.DetArea article.generalArea > p {
  flex: 1 1 auto;
  height: auto;
  width: 100%;
}
.DetArea article.generalArea > q {
  position: relative;
  flex: none;
  display: block;
  margin-bottom: calc(var(--w) * 0.04);
  width: 92%;
  padding: calc(var(--w) * 0.02) calc(var(--w) * 0.022);
  text-align: center;
  font-size: max(14px, calc(var(--w) * 0.028));
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink-soft);
  quotes: none;
  border-top: calc(var(--w) * .004) dotted #BD84E7;
  letter-spacing: 2px;
}
.DetArea article.generalArea > q::before {
  position: absolute;
  content: '';
  display: block;
  top: calc(var(--w) * -0.024);
  left: 50%;
  margin-left: calc(var(--w) * -0.01);
  width: calc(var(--w) * 0.02);
  height: calc(var(--w) * 0.04);
  background: #fff url(../home/IconDet.png) calc(var(--w) * -0.215) center no-repeat;
  background-size: auto 100%;
}
.DetArea article.generalArea > q::after {
  content: none;
}

/* Dictation mode: keep the word's space, hide only the text. */
.is-dictation-hidden {
  visibility: hidden;
}
.DetArea article .RateArea {
  position: absolute;
  right: 0;
  top: 0;
}
.DetArea article .RateArea a {
  display: block;
  width: calc(var(--w) * 0.1);
  height: calc(var(--w) * 0.1);
  background: url(../home/IconDet.png) calc(var(--w) * -0.652) center no-repeat;
  background-size: auto 360%;
}

.DetArea article .RateArea__value {
  display: block;
  margin-top: calc(var(--w) * 0.006);
  font-size: max(12px, calc(var(--w) * 0.016));
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
  white-space: nowrap;
}


/* ------------- Records ------------ */

.record .board {
  justify-content: flex-start;
  gap: calc(var(--w) * 0.02);
  /* Same gutter as the list page so the artwork on the background stays clear. */
  padding: 0 calc(var(--w) * 0.02) calc(var(--w) * 0.01) calc(var(--w) * 0.32);
}

.titleRecord {
  margin: 0;
  padding: calc(var(--w) * 0.010) calc(var(--w) * 0.028);
  border-radius: calc(var(--w) * 0.024);
  background: #fff;
  font-size: max(16px, calc(var(--w) * 0.028));
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
  box-shadow:
    0 calc(var(--w) * 0.006) calc(var(--w) * 0.014) rgba(150, 105, 185, 0.22),
    inset 0 calc(var(--w) * -0.002) 0 rgba(238, 224, 248, 0.9);
}

.RecordSum__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: calc(var(--w) * 0.0145);
  margin: 0;
}

.RecordSum__item {
  padding: calc(var(--w) * 0.016) calc(var(--w) * 0.012);
  border-radius: calc(var(--w) * 0.024);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(228, 208, 255, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 calc(var(--w) * 0.010) calc(var(--w) * 0.020) rgba(140, 105, 190, 0.16),
    inset 0 calc(var(--w) * 0.002) 0 rgba(255, 255, 255, 0.9);
  text-align: center;
}

.RecordSum__item dt {
  font-size: max(12px, calc(var(--w) * 0.0155));
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.RecordSum__item dd {
  margin: calc(var(--w) * 0.006) 0 0;
  font-size: max(16px, calc(var(--w) * 0.026));
  font-weight: 800;
  color: #e74577;
  white-space: nowrap;
}

.RecordSum__item dd span {
  margin-left: calc(var(--w) * 0.004);
  font-size: max(11px, calc(var(--w) * 0.014));
  font-weight: 700;
  color: var(--ink-soft);
}

.RecordTitle {
  margin: 0 0 calc(var(--w) * 0.012);
  font-size: max(15px, calc(var(--w) * 0.021));
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.RecordTopics ul,
.RecordList ul {
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.01);
  margin: 0;
  padding: 0;
  list-style: none;
}

.RecordIcon {
  flex: none;
  display: block;
  height: calc(var(--w) * 0.07);
  aspect-ratio: 19 / 14;
  border-radius: calc(var(--w) * 0.012);
  background: url(../home/IconProject.png) left 0 no-repeat;
  background-size: cover;
}

.RecordIcon.topic--commands {
  background-image: url(../home/IconProject_002.png);
}

.RecordIcon.topic--greeting {
  background-image: url(../home/IconProject_003.png);
}

.RecordIcon.topic--numbers {
  background-image: url(../home/IconProject_004.png);
}

.RecordIcon.topic--vocabulary {
  background-image: url(../home/IconProject_005.png);
}

.RecordIcon.topic--cn-numbers {
  background-image: url(../home/imgCn01.png);
}

.RecordIcon.topic--cn-words {
  background-image: url(../home/imgCn03.png);
}

.RecordIcon.topic--math-numbers {
  background-image: url(../home/imgMath01.png);
}

.RecordIcon.topic--math-addition {
  background-image: url(../home/imgMath02.png);
}

.RecordIcon.topic--math-subtraction {
  background-image: url(../home/imgMath03.png);
}

.RecordIcon.topic--math-time {
  background-image: url(../home/imgMath06.png);
}

.RecordTopics li {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.014);
  padding: calc(var(--w) * 0.008) calc(var(--w) * 0.014);
  border: 1px solid rgba(214, 152, 205, 0.45);
  border-radius: calc(var(--w) * 0.014);
  background-color: #fff;
  box-shadow: 0 calc(var(--w) * 0.004) calc(var(--w) * 0.008) rgba(130, 90, 175, 0.12);
}

.RecordTopics__copy,
.RecordList__copy {
  min-width: 0;
}

.RecordTopics__copy h3 {
  margin: 0 0 calc(var(--w) * 0.004);
  font-size: max(14px, calc(var(--w) * 0.019));
  font-weight: 700;
  color: #e74577;
}

.RecordTopics__copy p {
  margin: 0;
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 700;
  color: var(--ink-soft);
}

.RecordTopics__count {
  margin-left: auto;
  font-size: max(15px, calc(var(--w) * 0.024));
  font-weight: 800;
  color: #c4aed8;
}

.RecordTopics__count.is-done {
  color: #e74577;
}

.RecordTopics__count small {
  margin-left: calc(var(--w) * 0.002);
  font-size: 0.62em;
  font-weight: 700;
}

.RecordTopics__go {
  flex: none;
  padding: calc(var(--w) * 0.010) calc(var(--w) * 0.020);
  border-radius: calc(var(--w) * 0.01);
  background: linear-gradient(180deg, #ff8fb0 0%, #fb6998 46%, #e74577 100%);
  box-shadow:
    0 calc(var(--w) * 0.004) 0 rgba(180, 50, 90, 0.35),
    inset 0 calc(var(--w) * 0.002) 0 rgba(255, 255, 255, 0.45);
  font-size: max(13px, calc(var(--w) * 0.016));
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: transform 0.18s ease;
}

.RecordTopics__go:hover {
  transform: translateY(calc(var(--w) * -0.002));
}

.RecordTopics__go:active {
  transform: translateY(calc(var(--w) * 0.004));
}

.RecordEmpty {
  margin: 0;
  padding: calc(var(--w) * 0.05) calc(var(--w) * 0.03);
  border-radius: calc(var(--w) * 0.024);
  border: 1px dashed rgba(214, 152, 205, 0.75);
  background: rgba(255, 255, 255, 0.72);
  font-size: max(13px, calc(var(--w) * 0.018));
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
  color: var(--ink-soft);
}

.RecordList li {
  padding: calc(var(--w) * 0.012) calc(var(--w) * 0.016);
  border: 1px solid rgba(214, 152, 205, 0.45);
  border-radius: calc(var(--w) * 0.018);
  background-color: #fff;
  box-shadow:
    0 calc(var(--w) * 0.004) calc(var(--w) * 0.003) rgba(85, 15, 25, 0.18),
    0 calc(var(--w) * 0.010) calc(var(--w) * 0.020) rgba(214, 30, 94, 0.1);
}

.RecordList__head {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.012);
}

.RecordList__copy h3 {
  margin: 0;
  font-size: max(14px, calc(var(--w) * 0.018));
  font-weight: 700;
  color: #e74577;
}

.RecordList__copy p {
  margin: calc(var(--w) * 0.003) 0 0;
  font-size: max(12px, calc(var(--w) * 0.0145));
  font-weight: 700;
  color: var(--ink-soft);
}

.RecordList__star {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.004);
  font-size: max(14px, calc(var(--w) * 0.020));
  font-weight: 800;
  color: #e98320;
}

.RecordList__star img {
  width: calc(var(--w) * 0.026);
}

.RecordList__star.is-heart {
  color: #e74577;
}

.RecordList__adjustIcon {
  flex: none;
  width: calc(var(--w) * 0.07);
  height: calc(var(--w) * 0.07);
  object-fit: contain;
}

.RecordList__item--adjust {
  border-color: rgba(168, 121, 230, 0.45);
  background: linear-gradient(180deg, #fff 0%, #fbf4ff 100%);
}

.RecordList__item--adjust .RecordList__copy h3 {
  color: #8a4bd6;
}

.RecordList__meta {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--w) * 0.02);
  margin: calc(var(--w) * 0.008) 0 0;
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 700;
  color: var(--ink-soft);
}

.RecordList__items {
  margin: calc(var(--w) * 0.006) 0 0;
  padding: calc(var(--w) * 0.008) calc(var(--w) * 0.012);
  border-radius: calc(var(--w) * 0.012);
  background: rgba(243, 219, 253, 0.45);
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 700;
  line-height: 1.5;
  color: #6f4d9c;
  word-break: break-word;
}

.RecordMore,
.RecordClear {
  display: block;
  margin: calc(var(--w) * 0.014) auto 0;
  padding: calc(var(--w) * 0.010) calc(var(--w) * 0.028);
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: max(13px, calc(var(--w) * 0.016));
  font-weight: 700;
  cursor: pointer;
}

.RecordMore {
  background: #fff;
  color: #a63a8f;
  box-shadow: 0 calc(var(--w) * 0.004) 0 rgba(180, 120, 200, 0.28);
}

.RecordMore:active {
  transform: translateY(calc(var(--w) * 0.003));
}

.RecordClear {
  background: transparent;
  color: #9a7ab5;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .RecordSum__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 中文列表：只有已備內容的列可以點進詳情頁 */
.ListAreaCn article ul li.is-ready {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ListAreaCn article ul li.is-ready:hover {
  transform: translateY(calc(var(--w) * -0.003));
  box-shadow:
    0 calc(var(--w) * 0.008) calc(var(--w) * 0.014) rgba(150, 100, 120, 0.28);
}

.ListAreaCn article ul li.is-ready:active {
  transform: translateY(calc(var(--w) * 0.003));
}

.ListAreaCn article ul li.is-ready:focus-visible {
  outline: calc(var(--w) * 0.004) solid #fff;
  outline-offset: calc(var(--w) * 0.004);
}
.DetAreaMath {
  padding: calc(var(--w) * 0.024) calc(var(--w) * 0) 0 calc(var(--w) * 0.24);
}
.DetAreaMath article.makeTenArea {
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.0145);
  aspect-ratio: 2 / 1.4;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.DetAreaMath article::before {
  top: calc(var(--w) * 0);
  background: url(../home/GirlDetMath.PNG) left center no-repeat;
  background-size: contain;
  width: calc(var(--w) * 0.4);
  z-index: 3;
  left: calc(var(--w) * -0.3);
  pointer-events: none; 
}
.DetAreaMath article.makeTenArea > div {
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.DetAreaMath article.makeTenArea > div > section {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: calc(var(--w) * 0.02) calc(var(--w) * 0.02);
  border-radius: calc(var(--w) * 0.04);
  filter: drop-shadow(0 calc(var(--w) * 0.012) calc(var(--w) * 0.018) rgba(130, 90, 175, 0.25));
  transition: transform 0.2s ease, filter 0.2s ease;
  border: rgba(249, 218, 236, 1) solid calc(var(--w) * 0.007);
  background-color: #fff;
  box-shadow:
    0 calc(var(--w) * 0.004) calc(var(--w) * 0.003) rgba(85, 15, 25, 0.28),
    0 calc(var(--w) * 0.016) calc(var(--w) * 0.03) rgba(214, 30, 94, 0.16),
    inset 0 calc(var(--w) * 0.002) 0 rgba(253, 249, 249, 0.45);
  width: 100%;
}
.DetAreaMath article div .mathModel {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: calc(var(--w) * 0.01);
  font-size: calc(var(--w) * 0.05);
  width: 90%;
}
.DetAreaMath article div .mathModel u,
.DetAreaMath article div .mathModel s,
.DetAreaMath article div .mathModel b,
.DetAreaMath article div .mathModel i {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: calc(var(--w) * 0.06);
  aspect-ratio: 1 / 1;
  font-family: var(--font-number);
  font-weight: 800;
  font-size: calc(var(--w) * 0.08);
  line-height: 1;
}
.DetAreaMath article div .mathModel u {
  color: #FB7CA5;
}
.DetAreaMath article div .mathModel s {
  color: #C895F3;
}
.DetAreaMath article div .mathModel i {
  color: #F67FA7;
}
.DetAreaMath article div .mathModel b {
  border: calc(var(--w) * .004) dotted #C5B2CD;
  border-radius: calc(var(--w) * 0.02);
}
/* 加／減法的運算數和答案可以是兩位數，按內容加寬才不會壓住旁邊的符號。 */
.DetAreaMath article .ModelCommon .mathModel u,
.DetAreaMath article .ModelCommon .mathModel i,
.DetAreaMath article .ModelCommon .mathModel b {
  width: auto;
  min-width: calc(var(--w) * 0.06);
  aspect-ratio: auto;
  min-height: calc(var(--w) * 0.06);
  padding: 0 calc(var(--w) * 0.006);
}
.IconZoo {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 74%;
  border-bottom: #C5B2CD dotted calc(var(--w) * 0.004);
  margin-bottom: calc(var(--w) * 0.02);
  padding: calc(var(--w) * 0.02) 0;
}
.IconZoo li {
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1 / 1;
  margin-left: calc(var(--w) * -0.002);
  border: #C5B2CD solid calc(var(--w) * 0.002);
}
.IconZoo li:nth-child(1) {
  border-radius: calc(var(--w) * 0.02) 0 0 0;
}
.IconZoo li:nth-child(5) {
  border-radius: 0 calc(var(--w) * 0.02) 0 0;
}
.IconZoo li:nth-child(6) {
  margin-top: calc(var(--w) * -0.002);
  border-radius: 0 0 0 calc(var(--w) * 0.02);
}
.IconZoo li:nth-child(10) {
  border-radius: 0 0 calc(var(--w) * 0.02) 0;
}
.IconZoo li:nth-child(6),
.IconZoo li:nth-child(7),
.IconZoo li:nth-child(8),
.IconZoo li:nth-child(9),
.IconZoo li:nth-child(10) {
  margin-top: calc(var(--w) * -0.002);
}
.IconZoo li i {
  width: calc(var(--w) * 0.08);
  aspect-ratio: 1 / 1;
  background: url(../home/IconZoo.png) no-repeat;
  background-size: auto 230%;
}
.IconZoo li i.monkey {
  background-position: calc(var(--w) * 0.001) calc(var(--w) * -0.006);
}/* 1 */
.IconZoo li i.lion {
  background-position: calc(var(--w) * 0) calc(var(--w) * -0.006);
}/* 2 */
.IconZoo li i.rabbit {
  background-position: calc(var(--w) * -0.167) calc(var(--w) * -0.006);
}/* 3 */
.IconZoo li i.horse {
  background-position: calc(var(--w) * -0.26) calc(var(--w) * -0.006);
}/* 4 */
.IconZoo li i.tiger {
  background-position: calc(var(--w) * -0.338) calc(var(--w) * -0.006);
}/* 5 */
.IconZoo li i.eagle {
  background-position: calc(var(--w) * -0.001) calc(var(--w) * -0.097);
}/* 6 */
.IconZoo li i.cat {
  background-position: calc(var(--w) * -0.087) calc(var(--w) * -0.097);
}/* 7 */
.IconZoo li i.elephant {
  background-position: calc(var(--w) * -0.17) calc(var(--w) * -0.097);
}/* 8 */
.IconZoo li i.dog {
  background-position: calc(var(--w) * -0.26) calc(var(--w) * -0.097);
}/* 9 */
.IconZoo li i.owl {
  background-position: calc(var(--w) * -0.338) calc(var(--w) * -0.097);
}/* 10 */

.miniKeyboard {
  width: calc(var(--w) * 0.24);
  height: auto!important;
  border: rgba(249, 218, 236, 1) solid calc(var(--w) * 0.004)!important;
}
.miniKeyboard ol {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(var(--w) * 0.01);
}
.numKeyboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-content: center;
  align-items: center;
  gap: calc(var(--w) * 0.01);
  border-top: #C5B2CD dotted calc(var(--w) * 0.004);
  margin-top: calc(var(--w) * 0.02);
  padding: calc(var(--w) * 0.02) calc(var(--w) * 0.15);
}
.numKeyboard li,
.miniKeyboard ol li {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1 / 1;
  width: calc(var(--w) * 0.06);
  border: rgba(255, 255, 255, 0.28) solid calc(var(--w) * 0.002);
  outline: calc(var(--w) * 0.0024) solid #fff;
  font-size: max(16px, calc(var(--w) * 0.04));
  border-radius: calc(var(--w) * 0.018);
  font-family: var(--font-number);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 calc(var(--w) * 0.002) calc(var(--w) * 0.003) rgba(70, 30, 130, 0.45);
}
.numKeyboard li:nth-child(1),
.miniKeyboard ol li:nth-child(1) {
  background-color: #FC9AC0;
  outline-color: #D2A6BD;
}
.numKeyboard li:nth-child(2),
.miniKeyboard ol li:nth-child(2) {
  background-color: #C895F3;
  outline-color: #9F81C3;
}
.numKeyboard li:nth-child(3),
.miniKeyboard ol li:nth-child(3) {
  background-color: #FCD877;
  outline-color: #D8C578;
}
.numKeyboard li:nth-child(4),
.miniKeyboard ol li:nth-child(4) {
  background-color: #B1DD92;
  outline-color: #9ACF7D;
}
.numKeyboard li:nth-child(5),
.miniKeyboard ol li:nth-child(5) {
  background-color: #98CAFB;
  outline-color: #8CA5CD;
}
.numKeyboard li:nth-child(6),
.miniKeyboard ol li:nth-child(6) {
  background-color: #F9A4C4;
  outline-color: #D98AA4;
}
.numKeyboard li:nth-child(7),
.miniKeyboard ol li:nth-child(7) {
  background-color: #C99DF6;
  outline-color: #9F81C3;
}
.numKeyboard li:nth-child(8),
.miniKeyboard ol li:nth-child(8) {
  background-color: #FFDA6F;
  outline-color: #D8C578;
}
.numKeyboard li:nth-child(9),
.miniKeyboard ol li:nth-child(9) {
  background-color: #AFDF95;
  outline-color: #9ACF7D;
}
.numKeyboard li:nth-child(10) {
  background-color: #98CAFB;
  outline-color: #8CA5CD;
}
.numKeyboard li.Clear {
  grid-column: span 2;
  background-color: #FE87B1;
  outline-color: #C896AF;
  width: calc(var(--w) * 0.13);
  aspect-ratio: 2 / 1;
}
.numKeyboard li,
.miniKeyboard ol li {
  cursor: pointer;
}
.numKeyboard li:focus-visible,
.miniKeyboard ol li:focus-visible {
  outline: calc(var(--w) * 0.003) solid #fff;
  outline-offset: calc(var(--w) * 0.003);
}




/* ------------- Settings panel (gear in the detail header) ------------ */

.SettingArea {
  position: relative;
  flex: none;
}

.topbarDetail dl cite {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.topbarDetail dl cite:hover {
  transform: scale(1.06);
}

.topbarDetail dl cite:focus-visible {
  outline: calc(var(--w) * 0.003) solid #fff;
  outline-offset: calc(var(--w) * 0.004);
}

.SettingPanel {
  position: absolute;
  top: calc(100% + calc(var(--w) * 0.012));
  right: 0;
  z-index: 20;
  width: calc(var(--w) * 0.29);
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.008);
  padding: calc(var(--w) * 0.014);
  border-radius: calc(var(--w) * 0.022);
  border: calc(var(--w) * 0.004) solid rgba(250, 125, 234, 0.45);
  background: #fff;
  box-shadow:
    0 calc(var(--w) * 0.006) calc(var(--w) * 0.004) rgba(85, 15, 25, 0.22),
    0 calc(var(--w) * 0.018) calc(var(--w) * 0.032) rgba(160, 90, 200, 0.28);
}

.SettingPanel__title {
  margin: 0 0 calc(var(--w) * 0.004);
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.SettingPanel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--w) * 0.01);
  padding: calc(var(--w) * 0.010) calc(var(--w) * 0.014);
  border: 0;
  border-radius: calc(var(--w) * 0.012);
  background: #fdf0f7;
  font-family: inherit;
  font-size: max(13px, calc(var(--w) * 0.017));
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.SettingPanel__row:hover {
  background: #fbe2ef;
}

.SettingPanel__row:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.SettingPanel__row b {
  flex: none;
  padding: 0 calc(var(--w) * 0.012);
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8fb0 0%, #fb6998 100%);
  font-size: max(11px, calc(var(--w) * 0.014));
  font-weight: 800;
  line-height: 1.8;
  color: #fff;
}

.SettingPanel__row b.is-off {
  background: #bdb0cc;
}

.SettingPanel__row--reset {
  justify-content: center;
  background: #fff0f5;
  color: #d3396d;
}

/* ------------- Manual star / heart editor ------------- */

.toolBarTop dd.add {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.toolBarTop dd.add:hover {
  transform: scale(1.08);
}

.toolBarTop dd.add:active {
  transform: scale(0.94);
}

.toolBarTop dd.add:focus-visible {
  outline: calc(var(--w) * 0.003) solid #fff;
  outline-offset: calc(var(--w) * 0.003);
}

body.is-count-modal-open {
  overflow: hidden;
}

.CountModal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: calc(var(--w) * 0.02);
  background: rgba(58, 17, 112, 0.42);
  backdrop-filter: blur(calc(var(--w) * 0.004));
  animation: countModalFade 0.16s ease-out;
}

.CountModal__dialog {
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.016);
  width: min(92vw, calc(var(--w) * 0.42));
  max-height: 90vh;
  overflow-y: auto;
  padding: calc(var(--w) * 0.028);
  border-radius: calc(var(--w) * 0.028);
  border: rgba(249, 218, 236, 1) solid calc(var(--w) * 0.005);
  background: #fff;
  box-shadow:
    0 calc(var(--w) * 0.004) calc(var(--w) * 0.006) rgba(58, 17, 112, 0.18),
    0 calc(var(--w) * 0.024) calc(var(--w) * 0.05) rgba(58, 17, 112, 0.32);
  animation: countModalPop 0.18s ease-out;
}

.CountModal__title {
  margin: 0;
  text-align: center;
  font-size: max(18px, calc(var(--w) * 0.032));
  font-weight: 800;
  color: var(--ink);
}

.CountModal__summary {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: calc(var(--w) * 0.008);
  margin: calc(var(--w) * -0.004) 0 0;
  font-size: max(13px, calc(var(--w) * 0.018));
  font-weight: 700;
  color: var(--ink-soft);
}

.CountModal__summary b {
  font-size: max(14px, calc(var(--w) * 0.02));
  color: #e74577;
}

.CountModal__arrow {
  color: #a879e6;
  font-weight: 800;
}

.CountModal__field {
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.008);
  font-size: max(14px, calc(var(--w) * 0.02));
  font-weight: 700;
  color: var(--ink-soft);
}

.CountModal__field input,
.CountModal__field select {
  width: 100%;
  height: calc(var(--w) * 0.062);
  padding: 0 calc(var(--w) * 0.018);
  border: calc(var(--w) * 0.003) solid #d9c8ef;
  border-radius: calc(var(--w) * 0.014);
  background: #fdf7ff;
  font-family: inherit;
  font-size: max(16px, calc(var(--w) * 0.026));
  font-weight: 700;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.CountModal__field input:focus,
.CountModal__field select:focus {
  outline: none;
  border-color: #a879e6;
  box-shadow: 0 0 0 calc(var(--w) * 0.004) rgba(168, 121, 230, 0.18);
}

.CountModal__select {
  cursor: pointer;
}

.CountModal__password {
  letter-spacing: calc(var(--w) * 0.006);
}

.CountModal__error {
  min-height: calc(var(--w) * 0.024);
  margin: 0;
  text-align: center;
  font-size: max(13px, calc(var(--w) * 0.019));
  font-weight: 700;
  line-height: 1.3;
  color: #d02f6a;
}

.CountModal__actions {
  display: flex;
  justify-content: flex-end;
  gap: calc(var(--w) * 0.012);
}

.CountModal__actions button {
  padding: calc(var(--w) * 0.012) calc(var(--w) * 0.026);
  border: 0;
  border-radius: calc(var(--w) * 0.014);
  font-family: inherit;
  font-size: max(15px, calc(var(--w) * 0.022));
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.CountModal__actions button:active:not(:disabled) {
  transform: translateY(calc(var(--w) * 0.002));
}

.CountModal__actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.CountModal__cancel {
  background: #f1e7fb;
  color: #6b3fc4;
}

.CountModal__save {
  color: #fff;
  background: linear-gradient(180deg, #ff7ead 0%, #fb6998 46%, #d73d73 100%);
  text-shadow: 0 calc(var(--w) * 0.002) 0 rgba(70, 30, 130, 0.45);
  box-shadow: 0 calc(var(--w) * 0.004) 0 rgba(85, 15, 25, 0.28);
}

@keyframes countModalFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes countModalPop {
  from {
    opacity: 0;
    transform: translateY(calc(var(--w) * 0.01)) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .CountModal,
  .CountModal__dialog {
    animation: none;
  }
}

/* Admin */
.ListAreaEleven .MenuAdmin {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(var(--w) * 0.012);
  margin-top: calc(var(--w) * 0.02);
}
.ListAreaEleven .MenuAdmin li {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: calc(var(--w) * 0.004);
}
.ListAreaEleven .MenuAdmin li span {
  padding: calc(var(--w) * 0.012) calc(var(--w) * 0.028);
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: max(13px, calc(var(--w) * 0.016));
  font-weight: 700;
  cursor: pointer;
  line-height: calc(var(--w) * 0.024);
  border: calc(var(--w) * 0.004) solid rgba(250, 125, 234, 0.65);
}
.ListAreaEleven .MenuAdmin li ol {
  display: none;
}
.ListAreaEleven .MenuAdmin li.current span {
  background: fixed linear-gradient(180deg, #fff 0%, #fdf7ff 100%);
}
.ListAreaEleven .MenuAdmin li.current ol {
  position: absolute;
  top: calc(var(--w) * 0.064);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(var(--w) * 0.012);
  width: calc(var(--w) * 0.6);
  border: rgba(250, 125, 234, 1) solid calc(var(--w) * 0.004);
}

/* ------------- Admin (eleven.html) ------------- */

.AdminSession {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.012);
}

.AdminSession span {
  font-size: max(13px, calc(var(--w) * 0.018));
  font-weight: 800;
  color: var(--ink);
}

.AdminLogout {
  padding: calc(var(--w) * 0.009) calc(var(--w) * 0.022);
  border: calc(var(--w) * 0.004) solid rgba(250, 125, 234, 0.65);
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: max(13px, calc(var(--w) * 0.016));
  font-weight: 700;
  color: #a63a8f;
  cursor: pointer;
}

.ListAreaEleven {
  padding: calc(var(--w) * 0.03) calc(var(--w) * 0.05) calc(var(--w) * 0.03);
}

.ListAreaEleven article {
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.014);
  aspect-ratio: auto;
  min-height: calc(var(--w) * 0.86);
  max-height: 76vh;
  padding: calc(var(--w) * 0.018) calc(var(--w) * 0.022) calc(var(--w) * 0.022);
  border: 1px solid rgba(214, 152, 205, 0.45);
  border-radius: calc(var(--w) * 0.03);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 calc(var(--w) * 0.004) calc(var(--w) * 0.006) rgba(85, 15, 25, 0.18),
    0 calc(var(--w) * 0.016) calc(var(--w) * 0.03) rgba(214, 30, 94, 0.12);
  overflow: visible;
}

.ListAreaEleven .MenuAdmin {
  position: relative;
  z-index: 10;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: calc(var(--w) * 0.014);
  margin-top: 0;
}

.ListAreaEleven .MenuAdmin > li {
  align-items: flex-start;
  gap: calc(var(--w) * 0.006);
}

.ListAreaEleven .MenuAdmin li.current ol {
  position: static;
  top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: calc(var(--w) * 0.008);
  width: auto;
  min-width: calc(var(--w) * 0.46);
  padding: calc(var(--w) * 0.010);
  border: rgba(250, 125, 234, 1) solid calc(var(--w) * 0.004);
  border-radius: 0 calc(var(--w) * 0.018) calc(var(--w) * 0.018) calc(var(--w) * 0.018);
  background: #fff;
  box-shadow: 0 calc(var(--w) * 0.008) calc(var(--w) * 0.016) rgba(150, 90, 175, 0.2);
}

.ListAreaEleven .MenuAdmin ol li {
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: calc(var(--w) * 0.007) calc(var(--w) * 0.016);
  border-radius: 999px;
  background: #f7ecff;
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 700;
  line-height: 1.2;
  color: #6b3fc4;
  white-space: nowrap;
  cursor: pointer;
}

.ListAreaEleven .MenuAdmin ol li.active {
  background: linear-gradient(180deg, #ff8fb0 0%, #fb6998 46%, #e74577 100%);
  color: #fff;
}

.ListAreaEleven .AdminContent {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.010);
  padding: calc(var(--w) * 0.014);
  border: 1px solid rgba(214, 152, 205, 0.35);
  border-radius: calc(var(--w) * 0.018);
  background: #fff;
  overflow: hidden;
}

.AdminContent__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: calc(var(--w) * 0.012);
  flex: none;
}

.AdminContent__head h2 {
  margin: 0;
  font-size: max(16px, calc(var(--w) * 0.024));
  font-weight: 800;
  color: #e74577;
}

.add-word {
  flex: none;
  padding: calc(var(--w) * 0.009) calc(var(--w) * 0.024);
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8fb0 0%, #fb6998 46%, #e74577 100%);
  box-shadow: 0 calc(var(--w) * 0.004) 0 rgba(180, 50, 90, 0.35);
  font-family: inherit;
  font-size: max(13px, calc(var(--w) * 0.016));
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.AdminList {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0 calc(var(--w) * 0.006) 0 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.008);
  overflow-y: auto;
}

.AdminItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: calc(var(--w) * 0.012);
  padding: calc(var(--w) * 0.012) calc(var(--w) * 0.016);
  border: 1px solid rgba(214, 152, 205, 0.4);
  border-radius: calc(var(--w) * 0.014);
  background: linear-gradient(180deg, #fff 0%, #fdf7ff 100%);
}

.AdminItem__copy {
  min-width: 0;
  flex: 1 1 auto;
}

.AdminItem__copy h6 {
  margin: 0;
  font-size: max(15px, calc(var(--w) * 0.021));
  font-weight: 800;
  color: #563085;
  word-break: break-word;
}

.AdminItem__copy p {
  margin: calc(var(--w) * 0.004) 0 0;
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 700;
  color: var(--ink-soft);
  word-break: break-word;
}

.AdminItem__copy label {
  font-weight: 800;
  color: #a63a8f;
}

.AdminItem__translation {
  color: #e74577 !important;
}

.AdminItem__actions {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.006);
}

.AdminItem__actions button {
  padding: calc(var(--w) * 0.006) calc(var(--w) * 0.014);
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 700;
  cursor: pointer;
}

.AdminEdit {
  background: #f1e7fb;
  color: #6b3fc4;
}

.AdminDelete {
  background: #ffe6ee;
  color: #d3396d;
}

.AdminEditor {
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.008);
  padding: calc(var(--w) * 0.014);
  border: calc(var(--w) * 0.003) dashed rgba(214, 152, 205, 0.8);
  border-radius: calc(var(--w) * 0.014);
  background: #fdf7ff;
}

.AdminEditor h3 {
  margin: 0;
  font-size: max(14px, calc(var(--w) * 0.018));
  font-weight: 800;
  color: #a63a8f;
}

.AdminEditor label {
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.005);
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 700;
  color: var(--ink-soft);
}

.AdminEditor input {
  width: 100%;
  height: calc(var(--w) * 0.05);
  padding: 0 calc(var(--w) * 0.014);
  border: calc(var(--w) * 0.003) solid #d9c8ef;
  border-radius: calc(var(--w) * 0.012);
  background: #fff;
  font-family: inherit;
  font-size: max(14px, calc(var(--w) * 0.018));
  font-weight: 700;
  color: var(--ink);
}

.AdminEditor input:focus {
  outline: none;
  border-color: #a879e6;
  box-shadow: 0 0 0 calc(var(--w) * 0.003) rgba(168, 121, 230, 0.18);
}

.AdminEditor__actions {
  display: flex;
  justify-content: flex-end;
  gap: calc(var(--w) * 0.01);
}

.AdminEditor__actions button {
  padding: calc(var(--w) * 0.008) calc(var(--w) * 0.022);
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: max(13px, calc(var(--w) * 0.016));
  font-weight: 700;
  cursor: pointer;
}

.AdminSave {
  background: linear-gradient(180deg, #ff8fb0 0%, #fb6998 46%, #e74577 100%);
  color: #fff;
}

.AdminCancel {
  background: #f1e7fb;
  color: #6b3fc4;
}

.AdminError {
  margin: 0;
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 700;
  color: #d02f6a;
}

.AdminEmpty {
  margin: 0;
  padding: calc(var(--w) * 0.03);
  border: 1px dashed rgba(214, 152, 205, 0.7);
  border-radius: calc(var(--w) * 0.014);
  text-align: center;
  font-size: max(13px, calc(var(--w) * 0.017));
  font-weight: 700;
  color: var(--ink-soft);
}

.ListAreaEleven article.AdminLogin {
  width: min(92%, calc(var(--w) * 0.48));
  max-height: none;
  min-height: calc(var(--w) * 0.4);
  margin: auto;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.AdminLogin h2 {
  margin: 0;
  font-size: max(20px, calc(var(--w) * 0.032));
  font-weight: 800;
  color: #e74577;
}

.AdminLogin p {
  margin: 0;
  font-size: max(13px, calc(var(--w) * 0.018));
  font-weight: 700;
  color: var(--ink-soft);
}

.AdminLogin form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--w) * 0.01);
  width: min(100%, calc(var(--w) * 0.3));
}

.AdminLogin input {
  width: 100%;
  height: calc(var(--w) * 0.06);
  padding: 0 calc(var(--w) * 0.018);
  border: calc(var(--w) * 0.003) solid #d9c8ef;
  border-radius: calc(var(--w) * 0.014);
  background: #fff;
  font-family: inherit;
  font-size: max(16px, calc(var(--w) * 0.022));
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}

.AdminLogin input:focus {
  outline: none;
  border-color: #a879e6;
  box-shadow: 0 0 0 calc(var(--w) * 0.004) rgba(168, 121, 230, 0.18);
}

.AdminLogin button,
.AdminLogout {
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.AdminLogin button:disabled,
.AdminEditor__actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.AdminLogin button[type="submit"] {
  padding: calc(var(--w) * 0.012) calc(var(--w) * 0.04);
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8fb0 0%, #fb6998 46%, #e74577 100%);
  box-shadow: 0 calc(var(--w) * 0.004) 0 rgba(180, 50, 90, 0.35);
  font-family: inherit;
  font-size: max(15px, calc(var(--w) * 0.02));
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}
/* 英文列表的第六個類目：選擇題 */
.ListAreaEng article ul li:nth-child(6) {
  background-color: #e9f8ff;
  border-color: #bfe3f2;
}

.ListAreaEng article ul li:nth-child(6) dt {
  background: url(../home/IconProject.png) left 0 no-repeat;
  background-size: cover;
}

/* ------------- English quiz (Quiz.html) ------------- */

.QuizState {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(var(--w) * 0.01);
}

.QuizBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--w) * 0.008) calc(var(--w) * 0.02);
  border: calc(var(--w) * 0.003) solid rgba(250, 125, 234, 0.55);
  border-radius: 999px;
  background: #fff;
  font-size: max(13px, calc(var(--w) * 0.016));
  font-weight: 800;
  color: #a63a8f;
  white-space: nowrap;
}

.QuizBadge--light {
  border-color: #e2cff7;
  background: #f7ecff;
  color: #6b3fc4;
}

.QuizArea {
  padding: calc(var(--w) * 0.03) calc(var(--w) * 0.06) 0;
}

.QuizCard {
  width: min(96%, calc(var(--w) * 0.74));
  margin: 0 auto;
  padding: calc(var(--w) * 0.03) calc(var(--w) * 0.04);
  border: 1px solid rgba(214, 152, 205, 0.45);
  border-radius: calc(var(--w) * 0.03);
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 calc(var(--w) * 0.004) calc(var(--w) * 0.006) rgba(85, 15, 25, 0.16),
    0 calc(var(--w) * 0.018) calc(var(--w) * 0.035) rgba(214, 30, 94, 0.14);
  text-align: center;
}

.QuizProgress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(var(--w) * 0.012);
  margin-bottom: calc(var(--w) * 0.018);
}

.QuizProgress span {
  width: calc(var(--w) * 0.016);
  height: calc(var(--w) * 0.016);
  border-radius: 999px;
  background: #eadcf7;
  transition: transform 0.18s ease, background 0.18s ease;
}

.QuizProgress span.done {
  background: #ff9ab8;
}

.QuizProgress span.current {
  background: #a879e6;
  transform: scale(1.35);
}

.QuizCounter {
  margin: 0 0 calc(var(--w) * 0.012);
  font-size: max(13px, calc(var(--w) * 0.017));
  font-weight: 700;
  color: #8a6aa8;
}

.QuizPrompt {
  margin: 0;
  font-size: max(36px, calc(var(--w) * 0.055));
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: calc(var(--w) * 0.002);
  color: #563085;
}

.QuizHint {
  margin: calc(var(--w) * 0.012) 0 0;
  font-size: max(13px, calc(var(--w) * 0.017));
  font-weight: 700;
  color: #a78bbd;
}

.QuizOptions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(var(--w) * 0.018);
  margin: calc(var(--w) * 0.028) 0 calc(var(--w) * 0.014);
}

.QuizOption {
  min-width: calc(var(--w) * 0.16);
  padding: calc(var(--w) * 0.014) calc(var(--w) * 0.03);
  border: calc(var(--w) * 0.004) solid #d9c8ef;
  border-radius: calc(var(--w) * 0.018);
  background: #fdf7ff;
  font-family: inherit;
  font-size: max(22px, calc(var(--w) * 0.03));
  font-weight: 800;
  color: #6b3fc4;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.QuizOption:hover:not(:disabled) {
  transform: translateY(calc(var(--w) * -0.003));
  box-shadow: 0 calc(var(--w) * 0.008) calc(var(--w) * 0.016) rgba(120, 70, 180, 0.16);
}

.QuizOption.is-correct {
  border-color: #52b788;
  background: #dff7e8;
  color: #1b7a48;
}

.QuizOption.is-wrong {
  border-color: #e74577;
  background: #ffe1e9;
  color: #c92d62;
}

.QuizOption.is-muted {
  opacity: 0.5;
}

.QuizOption:disabled {
  cursor: default;
}

.QuizFeedback {
  width: min(100%, calc(var(--w) * 0.54));
  margin: calc(var(--w) * 0.014) auto 0;
  padding: calc(var(--w) * 0.014) calc(var(--w) * 0.02);
  border-radius: calc(var(--w) * 0.016);
  text-align: left;
}

.QuizFeedback--correct {
  border: 1px solid #b9e6cc;
  background: #eafaf0;
  color: #1b7a48;
}

.QuizFeedback--wrong {
  border: 1px solid #f3bfd2;
  background: #fff0f4;
  color: #c92d62;
}

.QuizFeedback strong {
  font-size: max(16px, calc(var(--w) * 0.021));
}

.QuizFeedback p {
  margin: calc(var(--w) * 0.006) 0 0;
  font-size: max(14px, calc(var(--w) * 0.018));
  font-weight: 700;
}

.QuizComplete {
  color: #563085 !important;
  font-size: max(17px, calc(var(--w) * 0.023)) !important;
}

.QuizNext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: calc(var(--w) * 0.018);
  padding: calc(var(--w) * 0.014) calc(var(--w) * 0.04);
  border: calc(var(--w) * 0.004) solid #e74577;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8fb0 0%, #fb6998 46%, #e74577 100%);
  box-shadow: 0 calc(var(--w) * 0.004) 0 rgba(85, 15, 25, 0.28);
  font-family: inherit;
  font-size: max(16px, calc(var(--w) * 0.021));
  font-weight: 800;
  color: #fff;
  cursor: pointer;
}

.QuizBack {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: calc(var(--w) * 0.018);
  padding: calc(var(--w) * 0.014) calc(var(--w) * 0.04);
  border: calc(var(--w) * 0.004) solid #d9c8ef;
  border-radius: 999px;
  background: #f7ecff;
  font-size: max(16px, calc(var(--w) * 0.021));
  font-weight: 800;
  color: #6b3fc4;
  text-decoration: none;
}

.QuizResult {
  padding-bottom: calc(var(--w) * 0.04);
}

.QuizResult__eyebrow {
  margin: 0;
  font-size: max(14px, calc(var(--w) * 0.018));
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #a879e6;
  text-transform: uppercase;
}

.QuizResult__score {
  margin: calc(var(--w) * 0.008) 0 0;
  font-size: max(64px, calc(var(--w) * 0.09));
  line-height: 1;
  font-weight: 800;
  color: #e74577;
}

.QuizResult__score span {
  font-size: max(26px, calc(var(--w) * 0.036));
  color: #a879e6;
}

.QuizResult__message {
  margin: calc(var(--w) * 0.01) 0 calc(var(--w) * 0.022);
  font-size: max(15px, calc(var(--w) * 0.02));
  font-weight: 700;
  color: #563085;
}

.QuizReview {
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.008);
  width: min(100%, calc(var(--w) * 0.58));
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: left;
}

.QuizReview li {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.012);
  padding: calc(var(--w) * 0.01) calc(var(--w) * 0.016);
  border: 1px solid rgba(214, 152, 205, 0.35);
  border-radius: calc(var(--w) * 0.012);
  background: #fdf7ff;
}

.QuizReview__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: calc(var(--w) * 0.03);
  height: calc(var(--w) * 0.03);
  border-radius: 999px;
  background: #eadcf7;
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 800;
  color: #6b3fc4;
}

.QuizReview p {
  flex: 1;
  margin: 0;
  font-size: max(14px, calc(var(--w) * 0.018));
  font-weight: 700;
  color: #563085;
}

.QuizReview p b {
  color: #e74577;
}

.QuizReview__selected {
  margin-left: calc(var(--w) * 0.006);
  font-size: max(12px, calc(var(--w) * 0.015));
  color: #a78bbd;
}

.QuizReview__mark {
  flex: none;
  font-size: max(18px, calc(var(--w) * 0.024));
  font-weight: 800;
}

.QuizReview__mark.is-correct {
  color: #1b7a48;
}

.QuizReview__mark.is-wrong {
  color: #c92d62;
}

.QuizResult__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(var(--w) * 0.014);
}

@media (max-width: 720px) {
  .QuizCard {
    width: 100%;
    padding: calc(var(--w) * 0.04) calc(var(--w) * 0.03);
  }

  .QuizArea {
    padding: calc(var(--w) * 0.03) 0 0;
  }

  .QuizOption {
    min-width: calc(var(--w) * 0.2);
  }
}

/* 後台：每個類目的練習設置 */
.AdminSettings {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: calc(var(--w) * 0.008);
  padding: calc(var(--w) * 0.012) calc(var(--w) * 0.016);
  border: 1px solid rgba(214, 152, 205, 0.4);
  border-radius: calc(var(--w) * 0.014);
  background: #fdf7ff;
}

.AdminSettings__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: calc(var(--w) * 0.012);
}

.AdminSettings__head h3 {
  margin: 0;
  font-size: max(14px, calc(var(--w) * 0.018));
  font-weight: 800;
  color: #a63a8f;
}

.AdminSettings__fields {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(var(--w) * 0.018);
}

.AdminSettings__fields label {
  display: flex;
  align-items: center;
  gap: calc(var(--w) * 0.008);
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 700;
  color: var(--ink-soft);
}

.AdminSettings__fields input {
  width: calc(var(--w) * 0.08);
  height: calc(var(--w) * 0.044);
  padding: 0 calc(var(--w) * 0.01);
  border: calc(var(--w) * 0.003) solid #d9c8ef;
  border-radius: calc(var(--w) * 0.01);
  background: #fff;
  font-family: inherit;
  font-size: max(14px, calc(var(--w) * 0.018));
  font-weight: 700;
  color: var(--ink);
}

.AdminSettings__fields input:focus {
  outline: none;
  border-color: #a879e6;
  box-shadow: 0 0 0 calc(var(--w) * 0.003) rgba(168, 121, 230, 0.18);
}

.AdminSettings__save {
  padding: calc(var(--w) * 0.007) calc(var(--w) * 0.018);
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8fb0 0%, #fb6998 46%, #e74577 100%);
  box-shadow: 0 calc(var(--w) * 0.003) 0 rgba(180, 50, 90, 0.3);
  font-family: inherit;
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.AdminSettings__save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.AdminSettings__ok {
  margin: 0;
  font-size: max(12px, calc(var(--w) * 0.015));
  font-weight: 700;
  color: #1b7a48;
}

/* Math voice input */
.VoiceInput {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: calc(var(--w) * 0.01);
  margin-top: calc(var(--w) * 0.014);
  font-family: inherit;
}

.VoiceInput__mic {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--w) * 0.008);
  padding: calc(var(--w) * 0.011) calc(var(--w) * 0.02);
  border: calc(var(--w) * 0.003) solid #fff;
  border-radius: 999px;
  background: linear-gradient(180deg, #b892ff 0%, #9a6bf0 100%);
  box-shadow: 0 calc(var(--w) * 0.005) 0 rgba(85, 15, 25, 0.25);
  font-family: inherit;
  font-size: max(13px, calc(var(--w) * 0.019));
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  appearance: none;
}

.VoiceInput__mic.is-listening {
  background: linear-gradient(180deg, #ff8fb0 0%, #fb6998 100%);
  animation: VoicePulse 1s ease-in-out infinite;
}

.VoiceInput__lang {
  min-width: calc(var(--w) * 0.048);
  padding: calc(var(--w) * 0.008) calc(var(--w) * 0.012);
  border: calc(var(--w) * 0.003) solid #d7c4ef;
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: max(12px, calc(var(--w) * 0.017));
  font-weight: 800;
  color: #7d4fb8;
  cursor: pointer;
  appearance: none;
}

.VoiceInput__hint {
  flex-basis: 100%;
  margin: 0;
  text-align: center;
  font-size: max(11px, calc(var(--w) * 0.015));
  font-weight: 600;
  color: #d3396d;
}

@keyframes VoicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 105, 152, 0.45); }
  50% { box-shadow: 0 0 0 calc(var(--w) * 0.008) rgba(251, 105, 152, 0); }
}

/* Voice control lives in the bottom bar, so it must beat the shared
   .BottomBar button styles (which are meant for Again/Next). */
.BottomBar .VoiceInput {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  gap: calc(var(--w) * 0.01);
  margin: 0;
  font-family: inherit;
}

.BottomBar .VoiceInput__mic {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: calc(var(--w) * 0.008);
  padding: calc(var(--w) * 0.011) calc(var(--w) * 0.02);
  border: calc(var(--w) * 0.003) solid #fff;
  border-radius: 999px;
  background: linear-gradient(180deg, #b892ff 0%, #9a6bf0 100%);
  box-shadow: 0 calc(var(--w) * 0.005) 0 rgba(85, 15, 25, 0.25);
  font-family: inherit;
  font-size: max(13px, calc(var(--w) * 0.019));
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: 0 calc(var(--w) * 0.002) 0 rgba(70, 30, 130, 0.35);
  cursor: pointer;
  appearance: none;
}

.BottomBar .VoiceInput__mic.is-listening {
  background: linear-gradient(180deg, #ff8fb0 0%, #fb6998 100%);
  animation: VoicePulse 1s ease-in-out infinite;
}

.BottomBar .VoiceInput__lang {
  min-width: calc(var(--w) * 0.048);
  padding: calc(var(--w) * 0.008) calc(var(--w) * 0.012);
  border: calc(var(--w) * 0.003) solid #d7c4ef;
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: max(12px, calc(var(--w) * 0.017));
  font-weight: 800;
  line-height: 1;
  color: #7d4fb8;
  text-shadow: none;
  cursor: pointer;
  appearance: none;
}

.BottomBar .VoiceInput__mic::before,
.BottomBar .VoiceInput__lang::before {
  content: none;
}

.BottomBar .VoiceInput__hint {
  flex-basis: 100%;
  margin: 0;
  text-align: center;
  font-size: max(11px, calc(var(--w) * 0.015));
  font-weight: 600;
  color: #d3396d;
}
