.wc {
  --wc-ink: #183149;
  --wc-muted: #546679;
  --wc-action: #86421e;
  --wc-line: #eadbd0;
  --wc-orange: #f9b887;
  --wc-soft: #fff0e5;
  color: var(--wc-ink);
}
.wc :is(button, summary, a, input):focus-visible { outline: 3px solid #ac5424; outline-offset: 3px; }
.wc [tabindex="-1"]:focus { outline: none; }
.wc h2, .wc h3, .wc p { margin: 0; }
.wc h2 { font-size: clamp(1.62rem, 5vw, 2.65rem); line-height: 1.17; letter-spacing: -.035em; }
.wc h3 { font-size: clamp(1.15rem, 3.7vw, 1.36rem); }
.wc-button, .wc-sound {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--wc-line);
  border-radius: 12px;
  padding: 9px 14px;
  background: #fff;
  color: var(--wc-ink);
  font: inherit;
  font-weight: 720;
  cursor: pointer;
}
.wc-button[data-primary] {
  border-color: #e8a06c;
  background: var(--wc-orange);
  color: #512812;
  box-shadow: 0 3px 0 #df9562;
}
.wc :is(.wc-button, .wc-sound):hover:not(:disabled) { border-color: #ce885a; }
.wc-button[data-primary]:hover:not(:disabled) { background: #f6aa73; }
.wc-button:disabled { cursor: default; }
.wc-button[data-primary]:disabled {
  border-color: #ebdfd4;
  background: #f7f0e9;
  color: #665e57;
  box-shadow: none;
  opacity: 1;
}
.wc :is(.wc-button, .wc-sound)[aria-pressed="true"] {
  border-color: #cb8552;
  background: var(--wc-soft);
  color: var(--wc-action);
  box-shadow: inset 0 0 0 1px #cb8552;
}
.wc progress {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #f0e6de;
  accent-color: #e98149;
}
.wc progress::-webkit-progress-bar { background: #f0e6de; border-radius: 999px; }
.wc progress::-webkit-progress-value { background: #e98149; border-radius: 999px; }
.wc progress::-moz-progress-bar { background: #e98149; border-radius: 999px; }

.wc-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(12px, 2.1vw, 24px);
  color: #183149;
}
.wc-topbar a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.wc-topbar a:hover { text-decoration: underline; text-underline-offset: 4px; }
.wc-topbar a svg { rotate: 180deg; }
.wc-topbar img { width: clamp(72px, 13vw, 106px); height: auto; }

.wc-path {
  padding: clamp(10px, 2.3vw, 22px);
  border: 1px solid #ede9e5;
  border-radius: 21px;
  background: #fff;
}
.wc-path-head, .wc-pages { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wc-path-head { margin-block: 2px 14px; }
.wc-path-head .wc-button, .wc-pages .wc-button { border-radius: 999px; }
.wc-pages { margin-block-start: 14px; color: var(--wc-muted); font-size: .92rem; }
.wc-pages button:disabled { color: #665e57; background: #f7f0e9; opacity: 1; }
.wc-collection { display: inline-flex; margin-block-start: 14px; color: var(--wc-action); text-decoration: underline; text-underline-offset: 3px; }

.wc-landscape {
  --wc-disc-light: #ffd6aa;
  --wc-disc-face: #faac77;
  --wc-disc-edge: #d98653;
  --wc-disc-ink: #743714;
  background: #fff;
}
.wc-landscape[data-stage="primary"] {
  --wc-disc-light: #ffd8ca;
  --wc-disc-face: #f6a08f;
  --wc-disc-edge: #d58072;
  --wc-disc-ink: #73342d;
}
.wc-landscape[data-stage="middle"] {
  --wc-disc-light: #c5eaf3;
  --wc-disc-face: #8bc9e2;
  --wc-disc-edge: #5899b3;
  --wc-disc-ink: #184a68;
}
.wc-levels {
  --wc-tile: clamp(78px, 17vw, 110px);
  width: min(100%, 674px);
  margin: 0 auto;
  padding: 17px 0 8px;
  list-style: none;
}
.wc-levels > li {
  position: relative;
  min-height: calc(var(--wc-tile) + 52px);
  padding-bottom: 17px;
}
.wc-levels > li:last-child { min-height: 0; }
.wc-level {
  --wc-depth: clamp(6px, 1vw, 9px);
  z-index: 1;
  position: relative;
  left: var(--stop);
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: calc(var(--wc-depth) + 5px);
  width: min(130px, 38%);
  min-height: 44px;
  padding: 3px 1px 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--wc-ink);
  font: inherit;
  cursor: pointer;
}
.wc-level-disc {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: var(--wc-tile);
  aspect-ratio: 1.18;
  border: 1px solid color-mix(in srgb, var(--wc-disc-edge) 53%, transparent);
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 13%, var(--wc-disc-light), var(--wc-disc-face) 74%);
  color: var(--wc-disc-ink);
  box-shadow: inset 0 2px 1px #fff8, 0 var(--wc-depth) 0 var(--wc-disc-edge), 0 calc(var(--wc-depth) + 3px) 9px #59452d25;
  transition: transform .14s ease, box-shadow .14s ease;
}
.wc-level-disc::before {
  content: "";
  position: absolute;
  top: 13%;
  left: 17%;
  width: 32%;
  height: 17%;
  border-radius: 50%;
  background: #fff9;
  transform: rotate(-23deg);
}
.wc-level-disc svg {
  position: relative;
  width: clamp(24px, 5vw, 34px);
  height: auto;
  stroke-width: 2.3;
}
.wc-level-label {
  display: grid;
  gap: 2px;
  justify-items: center;
  max-width: 100%;
  color: var(--wc-ink);
  line-height: 1.23;
}
.wc-level-label small { display: block; color: #576675; font-size: .8rem; font-weight: 570; }
.wc-level[data-state="available"] .wc-level-disc {
  outline: 2px solid color-mix(in srgb, var(--wc-disc-edge) 38%, white);
  outline-offset: 4px;
}
.wc-level[data-state="available"] .wc-level-label small:last-child { color: var(--wc-disc-ink); font-weight: 720; }
.wc-level:disabled {
  --wc-disc-light: #f4f5f7;
  --wc-disc-face: #e0e5eb;
  --wc-disc-edge: #c8cfd8;
  --wc-disc-ink: #667483;
  opacity: 1;
  cursor: default;
}
.wc-level:disabled .wc-level-disc::before { opacity: .6; }
.wc-level:not(:disabled):active .wc-level-disc {
  transform: translateY(calc(var(--wc-depth) - 2px));
  box-shadow: inset 0 2px 1px #fff8, 0 2px 0 var(--wc-disc-edge), 0 4px 5px #59452d19;
}

.wc-trail-friend {
  position: absolute;
  inset-block-start: 8px;
  left: 18%;
  display: grid;
  justify-items: center;
  align-items: end;
  width: clamp(62px, 20vw, 132px);
  height: clamp(78px, 24vw, 138px);
  transform: translateX(-50%);
  pointer-events: none;
}
.wc-trail-friend[data-side="end"] { left: 80%; }
.wc-trail-friend::after {
  content: "";
  grid-area: 1 / 1;
  width: 51%;
  height: 8%;
  border-radius: 50%;
  background: #63758b20;
  transform: translateY(35%);
}
.wc-trail-friend img {
  grid-area: 1 / 1;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
}
.wc-friend-moving img { animation: wc-friend-hop 1.45s ease-in-out .13s 2; }
.wc-friend-moving[data-side="start"] img { animation-delay: .37s; }
@keyframes wc-friend-hop {
  0%, 74%, 100% { transform: translateY(0); }
  42% { transform: translateY(-10px); }
}

#main.ws-cloud-page:has(.wc-warmup-stage) { background: linear-gradient(#fff0e2, #fff8f0 460px, #fffdfb); }
#main.ws-cloud-page:has(.wc-round) { background: #fff; }
#main.ws-cloud-page .ws-cloud-content:has(.wc-warmup-stage, .wc-round) { padding-block-end: 14px; }
#main .ws-cloud-content:has(.wc-warmup-stage, .wc-round) > .wc-topbar { display: none; }

.wc-warmup-stage { max-width: 628px; margin-inline: auto; }
.wc-warmup-nav { display: flex; align-items: center; gap: 11px; margin-block-end: 15px; color: var(--wc-muted); }
.wc-warmup-nav button, .wc-round-head button { width: 44px; flex-shrink: 0; padding: 0; border-radius: 50%; }
.wc-bookmark {
  position: relative;
  padding: 0 clamp(13px, 4vw, 29px) 8px;
  border: 1px solid #eed6c1;
  border-radius: 17px 17px 13px 13px;
  background: #fff;
  box-shadow: 0 5px 0 #f4e0ce, 0 12px 30px #a16a3a14;
}
.wc-bookmark::before {
  content: "";
  position: absolute;
  inset: -1px clamp(17px, 4vw, 35px) auto auto;
  width: clamp(21px, 5vw, 32px);
  height: clamp(32px, 7vw, 50px);
  background: var(--wc-orange);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 73%, 0 100%);
}
.wc-bookmark-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  min-height: 106px;
  padding: 10px 22px 7px 0;
  border-block-end: 1px dashed #e8ceba;
}
.wc-bookmark-head h2 { width: fit-content; background: linear-gradient(transparent 70%, #ffe0c8 70%); }
.wc-bookmark-head p { margin-block-start: 7px; color: var(--wc-muted); }
.wc-bookmark-head img { flex: 0 0 auto; width: clamp(70px, 19vw, 106px); height: auto; margin-inline-end: 13px; }
.wc-warmup { margin: 0; padding: 0; list-style: none; }
.wc-warmup li {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 63px;
  padding: 9px 1px;
  overflow-wrap: anywhere;
}
.wc-warmup li + li { border-block-start: 1px dashed #eadbcf; }
.wc-warmup li:has(details) .wc-word-main { padding-inline-end: 52px; }
.wc-word-main strong { color: var(--wc-ink); font-size: clamp(1.08rem, 5vw, 1.35rem); line-height: 1.25; }
.wc-gloss { display: block; margin-block-start: 2px; color: var(--wc-muted); line-height: 1.3; }
.wc summary { width: fit-content; color: var(--wc-action); font-size: .88rem; cursor: pointer; }
.wc-word-example summary { position: absolute; inset-inline-end: 0; inset-block-start: 14px; padding: 4px 0; }
.wc-word-example > div {
  display: grid;
  gap: 3px;
  margin-block-start: 7px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff5ed;
  font-size: .92rem;
}
.wc-word-example .wc-sound { margin-block-start: 2px; }
.wc-warmup-foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 14px 0 max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, #fff8f1 25%);
}
.wc-warmup-foot .wc-button { width: 100%; min-height: 49px; border-radius: 999px; }

.wc-round {
  display: flex;
  flex-direction: column;
  max-width: 634px;
  min-height: calc(100dvh - clamp(27px, 7vw, 51px));
  margin-inline: auto;
  padding: 0 clamp(3px, 2.6vw, 26px);
  background: #fff;
}
.wc-round-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.wc-round-head > span { min-width: 5ch; color: var(--wc-muted); text-align: right; font-variant-numeric: tabular-nums; }
.wc-round .wc-round-label { margin: 20px 0 7px; color: var(--wc-muted); font-size: .9rem; }
.wc-round .wc-hint { margin: 7px 0 10px; color: var(--wc-muted); }
.wc-sound { border-color: #f1c5a6; background: #fff0e4; color: #8e441f; }
.wc-sound-small { width: 44px; padding: 0; }
.wc-prompt {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  min-height: clamp(118px, 26vw, 178px);
  padding: 10px 6px 17px;
  text-align: center;
}
.wc-word-prompt { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 3vw, 16px); max-width: 100%; }
.wc-word-prompt div { min-width: 0; text-align: left; }
.wc-word-prompt .wc-sound { flex-shrink: 0; border-radius: 50%; }
.wc-prompt-word { font-size: clamp(1.8rem, 8vw, 3.4rem); font-weight: 790; line-height: 1.14; overflow-wrap: anywhere; }
.wc-prompt-zh { font-size: 1.18rem; font-weight: 690; }
.wc-ipa { color: var(--wc-muted); font-size: .94rem; }
.wc-sentence { font-size: clamp(1.05rem, 4vw, 1.35rem); }
.wc-blank { color: var(--wc-action); font-weight: 800; }
.wc-listen-text p { margin-top: 4px; font-size: 1.15rem; }
.wc-choices, .wc-pair-column { display: grid; gap: 9px; }
.wc-foot:empty { display: none; }
.wc-choices button, .wc-pairs button {
  min-height: 51px;
  border-color: #ecdfd6;
  border-radius: 15px;
  box-shadow: 0 2px 0 #f4eae2;
  overflow-wrap: anywhere;
}
.wc-picture-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wc-picture-choices button { min-height: clamp(80px, 23vw, 128px); padding: 5px; }
.wc-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.wc .wc-pair-status { min-height: 1.5em; margin-top: 8px; }
.wc-button[data-state="right"], .wc-feedback[data-state="right"] {
  border-color: #a9d2b7;
  background: #e7f5eb;
  color: #195735;
  opacity: 1;
}
.wc-button[data-state="wrong"], .wc-feedback[data-state="wrong"] {
  border-color: #e8b498;
  background: #ffebe1;
  color: #7f3d23;
  opacity: 1;
}
.wc-button[data-wc="science-pick"][data-state="wrong"],
.wc-feedback[data-state="wrong"]:has(+ .wc-foot:empty) {
  border-color: #d99595;
  background: #ffeded;
  color: #8d2626;
}
.wc-feedback .wc-confetti {
  position: relative;
  display: inline-block;
  margin-inline-start: .55em;
  transform-origin: bottom left;
  animation: wc-celebrate .7s ease-out both;
}
.wc-confetti::after {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  box-shadow: -12px -6px #e4902f, -5px -15px #45a487, 6px -12px #df6a85, 13px -1px #6a7cce;
  content: "";
  animation: wc-sprinkle .7s ease-out both;
}
@keyframes wc-celebrate {
  0% { opacity: 0; transform: translateY(4px) scale(.35); }
  42% { opacity: 1; transform: translateY(-7px) scale(1.35); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes wc-sprinkle {
  0% { opacity: 0; transform: scale(.25); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(8px) scale(1.65); }
}
@media (prefers-reduced-motion: reduce) {
  .wc-feedback .wc-confetti { animation: none; }
  .wc-confetti::after { display: none; }
}
.wc-spelling { display: grid; justify-items: center; gap: 8px; }
.wc-spell-hint { color: var(--wc-muted); }
.wc-letter-row {
  display: flex;
  align-items: center;
  max-width: 100%;
  gap: 4px;
  font-size: clamp(1.2rem, 5.5vw, 1.65rem);
  font-family: ui-monospace, monospace;
  font-weight: 750;
}
.wc-letter-row input {
  width: calc(var(--letters) * 1ch + 26px);
  min-width: 0;
  min-height: 49px;
  padding: 8px;
  border: 1px solid #e6b897;
  border-radius: 10px;
  background: #fffaf6;
  color: var(--wc-ink);
  font: inherit;
  text-align: center;
}
.wc-feedback, .wc-error { margin-top: 13px; padding: 10px 13px; border: 1px solid; border-radius: 12px; }
.wc-feedback span { display: block; }
.wc .wc-error { margin-top: 13px; border-color: #e6bf9c; background: #fff2e2; color: #744216; }
.wc-foot { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; margin-top: auto; padding: 24px 0 8px; }
.wc-foot .wc-button { min-width: 138px; border-radius: 999px; }
.wc-foot .wc-button:only-child { width: 100%; min-height: 49px; }
.wc-result { margin-top: 18px; }
.wc-result-mark {
  overflow: hidden;
  width: min(100%, 390px);
  margin-bottom: 14px;
  border: 1px solid #ecc0ad;
  border-radius: 16px;
}
.wc-result-mark img { display: block; width: 100%; height: auto; }
.wc-result p strong { color: var(--wc-action); font-size: 1.35rem; }
.wc-result h3 { margin-top: 13px; }
.wc-result ul { display: grid; gap: 7px; padding-left: 0; list-style: none; }
.wc-result li { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }

@media (max-width: 510px) {
  .wc-path-head .wc-button, .wc-pages .wc-button { padding-inline: 10px; }
  .wc-bookmark-head { min-height: 95px; }
  .wc-foot .wc-button { flex: 1; }
}
@media (max-width: 350px) {
  .wc-bookmark-head img { width: 58px; margin-inline-end: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .wc-level-disc { transition: none; }
  .wc-friend-moving img { animation: none; }
}

.wc-game {
  --wc-map-ink:#315f5a; --wc-map-wash:#e7f4df; --wc-map-far:#d7ebeb;
  --wc-trail:#dfc487;
}
.wc-game[data-stage="primary"] {
  --wc-map-ink:#773f60; --wc-map-wash:#fbe3ee; --wc-map-far:#fbecd7;
  --wc-trail:#e8b6ae;
}
.wc-game[data-stage="middle"] {
  --wc-map-ink:#2d5e88; --wc-map-wash:#e2f4fb; --wc-map-far:#e8e5fa;
  --wc-trail:#a7ccde;
}
.wc-game-banner {
  display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); align-items:center;
  min-height:182px; margin-bottom:20px; overflow:hidden;
  border:1px solid #cbdad7; border-radius:22px;
  background:linear-gradient(150deg,var(--wc-map-wash),var(--wc-map-far));
  box-shadow:0 5px 0 color-mix(in srgb,var(--wc-map-ink) 16%,white);
}
.wc-game-copy { padding:clamp(14px,3vw,32px); color:var(--wc-map-ink); }
.wc-game-copy h1 { font-size:clamp(1.35rem,4.5vw,2.72rem); line-height:1.14; }
.wc-game-copy p { margin-top:5px; font-weight:650; }
.wc-game-progress { display:grid; gap:4px; margin-top:10px; font-size:.86rem; }
.wc-game-progress progress { width:min(100%,230px); height:11px; accent-color:var(--wc-map-ink); }
.wc-game-cover { align-self:stretch; position:relative; min-width:0; }
.wc-game-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.wc-game .wc-path {
  padding:clamp(9px,2vw,18px); border-color:#d4e2dd; border-radius:22px; background:#fffdf4;
}
.wc-game .wc-path-head {
  padding:6px 6px 10px; margin-bottom:6px; border-bottom:1px dashed #d6e4d9;
  color:var(--wc-map-ink);
}
.wc-path-head h2 { font-size:clamp(1.21rem,2.7vw,1.75rem); }
.wc-game .wc-path-head [data-primary] {
  min-height:44px; color:white; background:var(--wc-map-ink); border-color:var(--wc-map-ink);
  box-shadow:0 3px 0 color-mix(in srgb,var(--wc-map-ink) 72%,#132c2b);
}
.wc-game .wc-path-head [data-primary]:hover { filter:brightness(1.12); }
.wc-game .wc-landscape {
  position:relative; isolation:isolate; min-height:180px; overflow:hidden; border-radius:15px;
  background:
    radial-gradient(ellipse 78px 44px at 12% 15%,#ffffffa0 53%,transparent 56%),
    radial-gradient(ellipse 95px 54px at 87% 36%,#ffffff90 53%,transparent 55%),
    radial-gradient(ellipse 90px 51px at 12% 65%,#ffffff9c 53%,transparent 55%),
    radial-gradient(ellipse 66px 43px at 88% 82%,#ffffffa0 53%,transparent 55%),
    radial-gradient(circle,#ffffffc9 2px,transparent 3px) 0 0 / 38px 38px,
    linear-gradient(150deg,var(--wc-map-wash),var(--wc-map-far));
}
.wc-trail { position:absolute; z-index:-1; width:100%; height:100%; inset:0; pointer-events:none; }
.wc-game .wc-levels { --wc-tile:clamp(72px,13vw,101px); }
.wc-game .wc-levels > li { min-height:calc(var(--wc-tile) + 41px); }
.wc-game .wc-levels > li:last-child { min-height:0; }
.wc-game .wc-level-label {
  padding:4px 7px; border:1px solid #fff; border-radius:11px; background:#fffcf0ed; box-shadow:0 2px 5px #2d45401b;
}
.wc-game .wc-level[data-state="available"] .wc-level-disc {
  outline:3px solid #ffffffce; outline-offset:5px; animation:wc-active-node 2.6s ease-in-out infinite;
}
@keyframes wc-active-node {
  0%,100% { outline-offset:4px; } 50% { outline-offset:8px; }
}
@media(max-width:600px) {
  .wc-game-banner { min-height:139px; grid-template-columns:minmax(0,1.16fr) minmax(0,.85fr); margin-bottom:16px; border-radius:16px; }
  .wc-game-copy { padding:12px; }
  .wc-game-copy p { font-size:.79rem; }
  .wc-game-progress { font-size:.77rem; }
  .wc-game .wc-path { border-radius:16px; }
  .wc-game .wc-path-head [data-primary] { padding-inline:9px; font-size:.88rem; }
}
@media(prefers-reduced-motion:reduce) {
  .wc-game .wc-level[data-state="available"] .wc-level-disc { animation:none; }
}

.wc-game {
  --wb-serif: Georgia, "Times New Roman", serif;
  --wb-muted: #595c71;
  --wb-line: #e2deeb;
}
.wc-picture { display: block; width: 100%; }
.wc-picture-choices .wb-art { min-height: 0; aspect-ratio: 1.14; }
.wc-warmup .wc-picture { width: 72px; margin-block: 4px; }
.wc-warmup .wc-picture .wb-art { min-height: 0; }

.wc-decks, .wc-study { max-width: 960px; margin: auto; padding: 0 5px 24px; }
/* Each topic is a pocket holding a row of illustrated vocabulary cards. */
.wc-drawers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
  margin-top: 15px;
}
.wc-drawer {
  --pocket: #d8eeee;
  --edge: #a6ccc9;
  --ink: #24565a;
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 10px 0 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.wc-drawer:nth-child(3n + 2) { --pocket: #f4dfcb; --edge: #dbba9b; --ink: #774c2b; }
.wc-drawer:nth-child(3n) { --pocket: #e5dff2; --edge: #c3b6d9; --ink: #57446c; }
.wc-drawer::before {
  content: "";
  position: absolute;
  inset: 34% 5px 5px;
  z-index: -1;
  border: 1px solid var(--edge);
  border-radius: 15px;
  background: var(--pocket);
}
.wc-drawer:is(:hover, :focus-visible) .wc-pocket-front { border-color: var(--ink); }
.wc-pocket-cards {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 93px;
  overflow: hidden;
}
.wc-pocket-card {
  display: block;
  width: min(31%, 106px);
  padding: 4px 4px 12px;
  border: 1px solid #e0d6c4;
  border-radius: 9px;
  background: #fffaf1;
  box-shadow: 1px 2px 6px #59452d24;
  transform: translateY(10px) rotate(-8deg);
  text-align: center;
}
.wc-pocket-card + .wc-pocket-card { margin-left: -8px; }
.wc-pocket-card:nth-child(2) { transform: translateY(4px) rotate(2deg); }
.wc-pocket-card:nth-child(3) { transform: translateY(10px) rotate(9deg); }
.wc-pocket-card .wb-art { min-height: 0; height: 54px; aspect-ratio: auto; }
.wc-pocket-card b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: bold 14px Georgia, serif; }
.wc-pocket-front {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--edge);
  border-top: 3px solid var(--edge);
  border-radius: 9px 9px 15px 15px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--pocket), white 27%), var(--pocket));
  box-shadow: 0 3px 0 var(--edge);
}
.wc-pocket-front small { margin-left: auto; white-space: nowrap; }
html:has(.wc-group-panel[open]) { overflow: hidden; }
.wc-group-panel {
  position: fixed;
  inset: 0 0 0 auto;
  box-sizing: border-box;
  width: min(440px, calc(100% - 34px));
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e5ded3;
  border-radius: 22px 0 0 22px;
  background: #fffcf7;
  color: #183149;
  box-shadow: -12px 0 36px #28233c30;
}
.wc-group-panel[open] { display: flex; flex-direction: column; animation: wc-groups-in .22s ease-out; }
.wc-group-panel::backdrop { background: #1e28375e; }
.wc-group-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: max(15px, env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid #e9e1d7;
}
.wc-group-panel h2 { margin: 0; font-size: 1.25rem; }
.wc-group-panel header p { margin: 4px 0 0; color: var(--wc-muted); }
.wc-group-panel header button { flex: none; width: 44px; padding: 0; }
.wc-group-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 8px 10px max(14px, env(safe-area-inset-bottom));
  list-style: none;
}
.wc-group-list li + li { margin-top: 4px; }
.wc-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.wc-group[aria-current="true"], .wc-group:hover { background: #f3ecfa; }
.wc-group :is(strong, [lang]) { display: block; }
.wc-group [lang] { margin-top: 3px; font-size: .9rem; color: var(--wc-muted); overflow-wrap: anywhere; }
.wc-group :is(small, svg) { flex: none; }
.wc-group-error { margin: 6px 16px 14px; color: #872c25; }
@keyframes wc-groups-in { from { transform: translateX(100%); } }
.wc-study { text-align: center; }
.wc-study-head { display: flex; align-items: center; gap: 12px; text-align: left; }
.wc-study-head h2 { font-size: clamp(1.1rem, 4vw, 1.6rem); }
.wc-study .wc-foot { justify-content: center; }
.wc-study .wc-foot button { width: min(100%, 310px); }
.wc-hand {
  display: grid;
  width: min(65%, 260px);
  margin: 35px auto 30px;
  isolation: isolate;
}
.wc-hand .wc-study-card {
  grid-area: 1 / 1;
  rotate: none;
  translate: none;
  padding: 10px 10px 18px;
  transform-origin: 50% 95%;
  transform: translate(calc(var(--depth) * 2px), calc(var(--depth) * 2px)) rotate(calc(var(--depth) * 1.2deg));
  background: #fffdf6;
  text-align: center;
}
.wc-hand-opening .wc-study-card { animation: wc-open-hand 1.65s ease-in-out; }
@keyframes wc-open-hand {
  0% { transform: scale(.91); }
  35%, 65% { transform: translateX(calc(var(--fan) * min(2.3vw, 13px))) rotate(calc(var(--fan) * 6deg)) scale(.76); }
}
.wc-study-card .wb-term { display: flex; align-items: center; justify-content: center; gap: 6px; }
.wc-study-nav { display: flex; align-items: center; justify-content: center; gap: 15px; }
.wc-study .wc-sound, .wc-quiz-card .wc-sound {
  flex: none; min-height: 40px; width: 40px; padding: 0; border-radius: 50%;
  background: #f1ede4; border-color: #e2d9c9; color: #51463c;
}
.wc-round:has(.wc-quiz-card) { min-height: auto; padding-bottom: 16px; }
.wc-quiz-card {
  align-items: center;
  gap: 9px;
  padding: clamp(9px, 2vw, 16px);
  margin: 13px 3px 17px;
  color: #242944;
  text-align: center;
  animation: wc-slide-card .22s ease-out;
}
.wc-quiz-card .wb-art { height: clamp(86px, 23dvh, 194px); min-height: 0; aspect-ratio: auto; }
.wc-card-line { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.wc-card-line .wc-prompt-word { min-width: 0; font: bold clamp(1.65rem, 6vw, 2.8rem)/1.08 var(--wb-serif); }
.wc-card-line .wc-sentence { font-size: clamp(.95rem, 3.7vw, 1.2rem); line-height: 1.35; overflow-wrap: anywhere; }
.wc-quiz-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wc-quiz-choices button { white-space: normal; }
@keyframes wc-slide-card {
  from { transform: translateX(18px); opacity: .7; }
  to { transform: none; opacity: 1; }
}
@media (max-width: 650px) { .wc-drawers { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  .wc-hand-opening .wc-study-card, .wc-quiz-card { animation: none; }
  .wc-group-panel[open] { animation: none; }
}
