/* Joined by the server from the files named below, in page order (static-delivery.mjs). */

/* Source: css/style.css */
/* ============================================================
   Picture reveal — ClassPlay 样式
   设计令牌
   ============================================================ */
:root {
  --violet-900: #1b0f3d;
  --violet-800: #2a1860;
  --violet-700: #3d2390;
  --violet-600: #5b32c9;
  --violet-500: #7c4dff;
  --violet-300: #b39dff;
  --violet-100: #ece5ff;

  --teal: #00c2a8;
  --teal-dark: #009882;
  --orange: #ff8a3d;
  --orange-dark: #e0701f;
  --pink: #ff4d8d;
  --yellow: #ffc93c;
  --green: #2fbf71;
  --green-dark: #1e9a57;
  --red: #f2545b;
  --red-dark: #cf3a41;

  --ink: #1f1436;
  --ink-soft: #5b5175;
  --ink-mute: #8b83a3;
  --line: #e7e2f5;
  --paper: #ffffff;
  --page: #f6f4ff;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --sh-1: 0 1px 2px rgba(45, 22, 100, .06), 0 4px 12px rgba(45, 22, 100, .06);
  --sh-2: 0 6px 20px rgba(45, 22, 100, .12);
  --sh-3: 0 18px 44px rgba(45, 22, 100, .18);

  --font: "Nunito", "Baloo 2", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  font-weight: 700;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-weight: 800; cursor: pointer; border: 0; }

/* ============================================================
   通用组件
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: var(--violet-500);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18);
  transition: transform .08s ease, filter .15s ease;
  user-select: none;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.btn.teal { background: var(--teal); }
.btn.orange { background: var(--orange); }
.btn.pink { background: var(--pink); }
.btn.green { background: var(--green); }
.btn.ghost {
  background: #fff;
  color: var(--violet-600);
  box-shadow: inset 0 0 0 2px var(--violet-100), inset 0 -4px 0 rgba(124, 77, 255, .12);
}
.btn.ghost:hover { background: #faf8ff; }
.btn.sm { padding: 8px 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn.lg { padding: 16px 34px; font-size: 19px; border-radius: var(--r-lg); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.card {
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: var(--violet-100);
  color: var(--violet-600);
}

.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--violet-500);
  box-shadow: 0 0 0 4px rgba(124, 77, 255, .14);
}
.textarea { resize: vertical; min-height: 52px; line-height: 1.45; }
.label { display: block; font-size: 13px; font-weight: 800; color: var(--ink-soft); margin: 0 0 6px; }
.field { margin-bottom: 16px; }

/* ============================================================
   顶栏
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 26px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 900; letter-spacing: -.3px; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--violet-500), var(--pink));
  color: #fff; font-size: 19px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18);
}
.brand small { display: block; font-size: 11px; font-weight: 800; color: var(--ink-mute); letter-spacing: .5px; }
.topbar .spacer { flex: 1; }

/* ============================================================
   首页（活动库）
   ============================================================ */
.page { max-width: 1140px; margin: 0 auto; padding: 28px 26px 80px; }

.hero {
  border-radius: var(--r-xl);
  padding: 34px 38px;
  color: #fff;
  background:
    radial-gradient(900px 300px at 88% -30%, rgba(255, 201, 60, .35), transparent 60%),
    radial-gradient(600px 320px at 6% 120%, rgba(0, 194, 168, .40), transparent 62%),
    linear-gradient(120deg, var(--violet-700), var(--violet-500) 55%, #a06bff);
  box-shadow: var(--sh-3);
}
.hero h1 { margin: 0 0 8px; font-size: 30px; font-weight: 900; letter-spacing: -.4px; }
.hero p { margin: 0 0 20px; max-width: 640px; font-size: 15px; font-weight: 700; color: rgba(255, 255, 255, .88); line-height: 1.6; }
.hero .row { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn.ghost { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .1); color: #fff; }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, .2); }

.sec-title {
  display: flex; align-items: baseline; gap: 10px;
  margin: 34px 0 16px;
  font-size: 19px; font-weight: 900;
}
.sec-title span { font-size: 14px; font-weight: 700; color: var(--ink-mute); }

.grid-quiz { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 18px; }

.quiz-card {
  position: relative;
  display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--sh-1);
  transition: transform .16s ease, box-shadow .16s ease;
}
.quiz-card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.quiz-card .thumb {
  position: relative; height: 158px;
  background: linear-gradient(135deg, #efe8ff, #dcd0ff);
  overflow: hidden;
}
.quiz-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quiz-card .badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 900; color: #fff;
  background: rgba(27, 15, 61, .62);
  backdrop-filter: blur(3px);
}
.quiz-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.quiz-card h3 { margin: 0; font-size: 16.5px; font-weight: 900; line-height: 1.35; }
.quiz-card .meta { font-size: 12.5px; font-weight: 700; color: var(--ink-mute); }
.quiz-card .acts { display: flex; gap: 8px; margin-top: auto; }
.quiz-card .acts .btn { flex: 1; }
.icon-btn {
  width: 36px; height: 36px; flex: 0 0 36px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: #f4f1ff; color: var(--violet-600);
  font-size: 15px;
}
.icon-btn:hover { background: var(--violet-100); }
.icon-btn.danger { background: #fff1f2; color: var(--red); }
.icon-btn.danger:hover { background: #ffe1e3; }

.empty {
  padding: 46px 20px; text-align: center;
  border: 2px dashed var(--line); border-radius: var(--r-lg);
  color: var(--ink-mute); font-weight: 800;
}

/* ============================================================
   编辑器
   ============================================================ */
.editor-wrap { max-width: 1240px; margin: 0 auto; padding: 22px 26px 130px; }
.editor-cols { display: grid; grid-template-columns: 1fr 366px; gap: 22px; align-items: start; }
@media (max-width: 1000px) { .editor-cols { grid-template-columns: 1fr; } }

.panel { padding: 20px 22px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--sh-1); margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 900; }
.panel-head .hint { font-size: 12.5px; font-weight: 700; color: var(--ink-mute); }

.q-item { border: 2px solid var(--line); border-radius: var(--r-md); padding: 16px; margin-bottom: 14px; background: #fcfbff; }
.q-item .qh { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.q-item .no {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--violet-500); color: #fff; font-size: 14px; font-weight: 900;
}
.q-item .qh .grow { flex: 1; font-size: 13px; font-weight: 800; color: var(--ink-mute); }

.img-pick { display: flex; gap: 12px; align-items: flex-start; }
.img-prev {
  width: 128px; height: 96px; flex: 0 0 128px;
  border-radius: var(--r-sm); border: 2px dashed var(--line);
  background: #fff center/cover no-repeat;
  display: grid; place-items: center;
  color: var(--ink-mute); font-size: 12px; text-align: center; overflow: hidden;
}
.img-prev img { width: 100%; height: 100%; object-fit: cover; }
.img-tools { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.img-tools .row { display: flex; gap: 8px; flex-wrap: wrap; }
.samples { display: flex; gap: 6px; flex-wrap: wrap; }
.samples button {
  width: 40px; height: 34px; border-radius: 8px; padding: 0;
  background: #fff center/cover no-repeat;
  box-shadow: inset 0 0 0 2px var(--line);
}
.samples button:hover { box-shadow: inset 0 0 0 2px var(--violet-500); }

.opt-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.opt-row .letter {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px;
  display: grid; place-items: center;
  background: #efeaff; color: var(--violet-600); font-size: 14px; font-weight: 900;
}
.opt-row.correct .letter { background: var(--green); color: #fff; }
.opt-row .pick {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px;
  display: grid; place-items: center;
  background: #fff; box-shadow: inset 0 0 0 2px var(--line);
  color: transparent; font-size: 15px;
}
.opt-row.correct .pick { background: var(--green); box-shadow: none; color: #fff; }
.opt-row .del { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; background: transparent; color: var(--ink-mute); font-size: 15px; }
.opt-row .del:hover { background: #fff1f2; color: var(--red); }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .t { font-size: 14px; font-weight: 800; }
.switch-row .d { font-size: 12px; font-weight: 700; color: var(--ink-mute); margin-top: 2px; }
.switch { position: relative; width: 50px; height: 28px; flex: 0 0 50px; border-radius: 999px; background: #ddd7ee; transition: background .18s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s; }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(22px); }

.theme-row { display: flex; gap: 10px; }
.theme-dot { width: 40px; height: 40px; border-radius: 12px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.9), var(--sh-1); }
.theme-dot.sel { outline: 3px solid var(--ink); outline-offset: 2px; }

.save-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 26px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.save-bar .spacer { flex: 1; }
.save-bar .status { font-size: 13px; font-weight: 800; color: var(--ink-mute); }

.preview-stage {
  position: relative;
  border-radius: var(--r-lg);
  padding: 18px;
  background: linear-gradient(150deg, var(--tw-a, #2a1860), var(--tw-b, #1b0f3d));
  min-height: 260px;
  display: grid; place-items: center;
}
.preview-stage .pv-title { position: absolute; top: 12px; left: 16px; font-size: 12px; font-weight: 800; color: rgba(255,255,255,.6); }
.pv-img { position: relative; width: 100%; border-radius: 12px; overflow: hidden; background: #2a1860; aspect-ratio: 4/3; }
.pv-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(4, 1fr); gap: 3px; }
.pv-grid i { background: linear-gradient(160deg, var(--tw-c, #6a4ad6), var(--tw-d, #4a2fa8)); border-radius: 2px; opacity: 1; transition: opacity .5s; }
.pv-grid i.gone { opacity: 0; }
.pv-opts { margin-top: 10px; display: grid; gap: 6px; }
.pv-opts span {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 9px;
  font-size: 12.5px; font-weight: 800;
  background: rgba(255,255,255,.94); color: var(--ink);
}
.pv-opts span b { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; background: #efeaff; color: var(--violet-600); font-size: 11px; }
.pv-opts span.ok { background: var(--green); color: #fff; }
.pv-opts span.ok b { background: rgba(255,255,255,.35); color: #fff; }

/* ============================================================
   游戏界面
   ============================================================ */
body.game {
  --tw-a: #2a1860;
  --tw-b: #180d3a;
  --tw-c: #7c4dff;
  --tw-d: #5b32c9;
  --tw-g1: rgba(124, 77, 255, .42);
  --tw-g2: rgba(0, 194, 168, .22);
  --tw-g3: rgba(255, 77, 141, .28);
  background:
    radial-gradient(1000px 460px at 12% -12%, var(--tw-g1), transparent 62%),
    radial-gradient(880px 420px at 92% 4%, var(--tw-g2), transparent 60%),
    radial-gradient(700px 400px at 50% 118%, var(--tw-g3), transparent 60%),
    linear-gradient(165deg, var(--tw-a), var(--tw-b) 62%, var(--tw-b));
  color: #fff;
  min-height: 100vh;
}
body.game::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.10) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
}
.game-shell { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 16px 20px 40px; }

.hud {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; margin-bottom: 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  backdrop-filter: blur(8px);
}
.hud .g-title { font-size: 15px; font-weight: 900; }
.hud .g-title small { display: block; font-size: 11px; font-weight: 800; color: rgba(255,255,255,.55); }
.hud .spacer { flex: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 900;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  white-space: nowrap;
}
.pill.score { background: linear-gradient(180deg, var(--yellow), #f0a800); color: #4a2d00; box-shadow: inset 0 -3px 0 rgba(0,0,0,.16); }
.pill.lives { letter-spacing: 1px; }
.pill.mute { cursor: pointer; padding: 7px 11px; }

.stage {
  padding: 18px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13), var(--sh-3);
  backdrop-filter: blur(10px);
}
.qtext { font-size: 19px; font-weight: 900; text-align: center; margin: 2px 0 14px; line-height: 1.4; }

.reveal-wrap { display: grid; grid-template-columns: 1fr 108px; gap: 16px; align-items: stretch; }
@media (max-width: 780px) { .reveal-wrap { grid-template-columns: 1fr; } }

.pic {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: #241350; aspect-ratio: 4 / 3;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.16);
}
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.buzz-hint { font-size: 11.5px; font-weight: 800; color: rgba(255,255,255,.62); text-align: center; }

.timerbar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.16); overflow: hidden; margin-top: 14px; }
.timerbar > i { display: block; height: 100%; width: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--yellow)); transition: width .25s linear; }
.timerbar.low > i { background: linear-gradient(90deg, var(--orange), var(--red)); }

.options { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 700px) { .options { grid-template-columns: 1fr; } }
.opt {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-md);
  background: #fff; color: var(--ink);
  font-size: 16px; font-weight: 900; text-align: left;
  box-shadow: inset 0 -4px 0 rgba(45, 22, 100, .12), var(--sh-2);
  transition: transform .1s, background .18s, color .18s;
}
.opt:hover { transform: translateY(-2px); }
.opt .k {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--violet-100); color: var(--violet-600); font-size: 14px;
}
.opt.correct { background: var(--green); color: #fff; box-shadow: inset 0 -4px 0 var(--green-dark), var(--sh-2); }
.opt.correct .k { background: rgba(255,255,255,.3); color: #fff; }
.opt.wrong { background: var(--red); color: #fff; box-shadow: inset 0 -4px 0 var(--red-dark), var(--sh-2); }
.opt.wrong .k { background: rgba(255,255,255,.3); color: #fff; }
.opt.dim { opacity: .45; }
.opt.locked { pointer-events: none; }
.options.hidden, .hidden { display: none !important; }

.flypoints {
  position: fixed; z-index: 80; pointer-events: none;
  font-size: 34px; font-weight: 900; color: var(--yellow);
  text-shadow: 0 3px 0 rgba(0, 0, 0, .35);
  animation: fly 1.05s ease-out forwards;
}
@keyframes fly {
  0% { opacity: 0; transform: translateY(10px) scale(.7); }
  22% { opacity: 1; transform: translateY(-6px) scale(1.15); }
  100% { opacity: 0; transform: translateY(-84px) scale(1); }
}

.toast-msg {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 90; padding: 12px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 900; color: #fff;
  background: rgba(27, 15, 61, .92); box-shadow: var(--sh-3);
  opacity: 0; transition: opacity .25s, transform .25s;
}
.toast-msg.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

.next-row { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }

/* 开始页 / 结束页 */
.center-card {
  max-width: 640px; margin: 34px auto;
  padding: 30px 32px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), var(--sh-3);
  backdrop-filter: blur(10px);
  text-align: center;
}
.center-card h1 { margin: 0 0 8px; font-size: 27px; font-weight: 900; }
.center-card .sub { font-size: 14.5px; font-weight: 700; color: rgba(255,255,255,.72); margin-bottom: 20px; line-height: 1.6; }
.start-thumb { width: 100%; max-width: 400px; margin: 0 auto 20px; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-3); aspect-ratio: 4/3; }
.start-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stat-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.big-score { font-size: 62px; font-weight: 900; line-height: 1; color: var(--yellow); text-shadow: 0 4px 0 rgba(0,0,0,.25); margin: 6px 0 4px; }
.review { margin: 20px 0; display: grid; gap: 10px; text-align: left; max-height: 320px; overflow: auto; padding-right: 4px; }
.rv-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-md); background: rgba(255,255,255,.07); }
.rv-item img { width: 62px; height: 48px; object-fit: cover; border-radius: 8px; flex: 0 0 62px; }
.rv-item .info { flex: 1; font-size: 13px; font-weight: 800; line-height: 1.5; }
.rv-item .info .ok { color: #7ef0b4; }
.rv-item .info .no { color: #ff9aa2; }
.rv-item .mark { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; }
.rv-item .mark.ok { background: var(--green); }
.rv-item .mark.no { background: var(--red); }

.lb { text-align: left; margin: 18px 0 8px; }
.lb h4 { margin: 0 0 10px; font-size: 14px; font-weight: 900; color: rgba(255,255,255,.75); }
.lb ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-sm); background: rgba(255,255,255,.07); font-size: 14px; font-weight: 800; }
.lb li .n { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 7px; display: grid; place-items: center; background: rgba(255,255,255,.14); font-size: 12px; }
.lb li .spacer { flex: 1; }
.name-row { display: flex; gap: 10px; margin-top: 12px; }
.name-row .input { background: rgba(255,255,255,.92); color: var(--ink); }

.footer-note { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-mute); margin-top: 26px; line-height: 1.7; }

/* ============================================================
   v2 — 模板画廊 / 类型徽章
   ============================================================ */
.grid-tpl { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 16px; }
.tpl-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 18px; border-radius: var(--r-lg); overflow: hidden;
  background: #fff; box-shadow: var(--sh-1); cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.tpl-card:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.tpl-card .ic {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; font-size: 23px;
  background: linear-gradient(135deg, var(--violet-500), var(--pink));
  color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}
.tpl-card h3 { margin: 0; font-size: 16px; font-weight: 900; }
.tpl-card p { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--ink-mute); line-height: 1.5; }
.tpl-card .go { margin-top: auto; font-size: 12.5px; font-weight: 900; color: var(--violet-600); }
.tpl-card .go::after { content: " →"; }

.quiz-card .thumb .big-ic {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 58px; color: rgba(255,255,255,.92);
}

/* ============================================================
   v2 — 通用游戏容器 / 弹层
   ============================================================ */
.gstage {
  position: relative;
  padding: 20px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13), var(--sh-3);
  backdrop-filter: blur(10px);
  min-height: 420px;
}
.gprompt { font-size: 20px; font-weight: 900; text-align: center; margin: 4px 0 16px; line-height: 1.4; }
.gmodal {
  position: absolute; inset: 0; z-index: 30;
  display: grid; place-items: center;
  background: rgba(15, 8, 38, .72);
  border-radius: var(--r-xl);
  animation: gm-in .22s ease;
}
@keyframes gm-in { from { opacity: 0; } to { opacity: 1; } }
.gmodal .box {
  width: min(520px, 92%); max-height: 86%; overflow: auto;
  padding: 24px; border-radius: var(--r-lg);
  background: #fff; color: var(--ink); text-align: center;
  box-shadow: var(--sh-3);
  animation: gm-pop .26s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes gm-pop { from { transform: scale(.82); } to { transform: scale(1); } }
.gmodal h3 { margin: 0 0 12px; font-size: 21px; font-weight: 900; }
.gmodal img { max-width: 100%; border-radius: var(--r-sm); }

.confetti-piece {
  position: fixed; z-index: 120; top: 46%; width: 10px; height: 14px;
  border-radius: 2px; pointer-events: none;
  animation: confetti-fly 1.4s ease-out forwards;
}
@keyframes confetti-fly {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

/* ============================================================
   What's inside? (openbox)
   ============================================================ */

/* ============================================================
   Quiz show
   ============================================================ */
.gs-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.gs-q {
  flex: 1; padding: 18px 22px; border-radius: var(--r-md);
  background: #fff; color: var(--ink);
  font-size: 20px; font-weight: 900; line-height: 1.4; text-align: center;
  box-shadow: var(--sh-2);
}
.gs-timer {
  position: relative; width: 84px; height: 84px; flex: 0 0 84px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--tw-c, #7c4dff) 360deg, rgba(255,255,255,.14) 0deg);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.16), var(--sh-2);
}
.gs-timer::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--tw-b, #180d3a); }
.gs-timer b { position: relative; z-index: 1; font-size: 26px; font-weight: 900; }
.gs-timer.danger b { color: #ff9aa2; }
.gs-img { max-width: 300px; max-height: 150px; margin: 0 auto 14px; display: block; border-radius: var(--r-sm); box-shadow: var(--sh-2); }
.gs-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .gs-opts { grid-template-columns: 1fr; } }
.gs-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 18px; border-radius: var(--r-md);
  font-size: 18px; font-weight: 900; color: #fff; text-align: left;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.20), var(--sh-2);
  transition: transform .1s, filter .15s, opacity .2s;
}
.gs-opt:hover { transform: translateY(-2px); filter: brightness(1.08); }
.gs-opt .k { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.28); font-size: 15px; }
.gs-opt.c1 { background: linear-gradient(150deg, #7c4dff, #5b32c9); }
.gs-opt.c2 { background: linear-gradient(150deg, #00c2a8, #079c88); }
.gs-opt.c3 { background: linear-gradient(150deg, #ff8a3d, #e0701f); }
.gs-opt.c4 { background: linear-gradient(150deg, #ff4d8d, #d62f6c); }
.gs-opt.c5 { background: linear-gradient(150deg, #2f9be0, #1c74b5); }
.gs-opt.c6 { background: linear-gradient(150deg, #8bc34a, #5f9a24); }
.gs-opt.correct { outline: 4px solid #7ef0b4; outline-offset: 2px; }
.gs-opt.wrong { opacity: .35; }
.gs-opt.locked { pointer-events: none; }
.gs-streak { font-size: 13px; font-weight: 900; color: var(--yellow); text-align: center; margin-top: 10px; min-height: 18px; }

/* ============================================================
   Anagram
   ============================================================ */
.ag-clue { font-size: 19px; font-weight: 900; text-align: center; margin: 4px 0 18px; }
.ag-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; min-height: 64px; }
.ag-slots { margin-bottom: 20px; }
.ag-tile, .ag-slot {
  width: 54px; height: 60px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 26px; font-weight: 900; user-select: none;
}
.ag-tile {
  background: #fff; color: var(--ink); cursor: pointer;
  box-shadow: inset 0 -5px 0 rgba(45,22,100,.16), var(--sh-2);
  transition: transform .1s, opacity .18s;
}
.ag-tile:hover { transform: translateY(-3px); }
.ag-tile.used { opacity: .22; pointer-events: none; transform: scale(.9); }
.ag-slot {
  background: rgba(255,255,255,.10); color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.30);
  cursor: pointer;
}
.ag-slot.filled { background: linear-gradient(150deg, var(--tw-c, #7c4dff), var(--tw-d, #5b32c9)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.2); }
.ag-word-ok .ag-slot { background: var(--green); box-shadow: inset 0 -4px 0 var(--green-dark); }
.ag-shake { animation: ag-shake .45s ease; }
@keyframes ag-shake {
  0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px); }
  40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); }
}

/* ============================================================
   Spin the Wheel
   ============================================================ */
.wheel-area { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.wheel-frame { position: relative; width: min(430px, 82vw); aspect-ratio: 1; }
.wheel-frame canvas { width: 100%; height: 100%; display: block; filter: drop-shadow(0 14px 26px rgba(0,0,0,.35)); }
.wheel-pointer {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 2;
  border-left: 17px solid transparent; border-right: 17px solid transparent;
  border-top: 30px solid #fff;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.35));
}
.wheel-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #e7e2f5);
  box-shadow: 0 4px 10px rgba(0,0,0,.3), inset 0 -4px 0 rgba(0,0,0,.08);
  display: grid; place-items: center; font-size: 22px; cursor: pointer; z-index: 2;
  user-select: none;
}
.wheel-result { text-align: center; }

/* ============================================================
   Category sort
   ============================================================ */
.sort-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
@media (max-width: 700px) { .sort-cols { grid-template-columns: 1fr; } }
.sort-col {
  min-height: 240px; padding: 14px; border-radius: var(--r-lg);
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.14);
  transition: box-shadow .15s, background .15s;
}
.sort-col.over { background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 3px var(--tw-c, #7c4dff); }
.sort-col h4 {
  margin: 0 0 12px; padding: 10px; border-radius: var(--r-sm);
  background: linear-gradient(150deg, var(--tw-c, #7c4dff), var(--tw-d, #5b32c9));
  font-size: 16px; font-weight: 900; text-align: center;
}
.sort-col .pile { display: flex; flex-direction: column; gap: 8px; }
.sort-card {
  padding: 13px 16px; border-radius: var(--r-md);
  background: #fff; color: var(--ink);
  font-size: 17px; font-weight: 900; text-align: center;
  box-shadow: inset 0 -4px 0 rgba(45,22,100,.14), var(--sh-2);
  cursor: grab; user-select: none;
  transition: transform .12s, opacity .2s;
}
.sort-card:active { cursor: grabbing; }
.sort-card.in-col { cursor: default; box-shadow: var(--sh-1); }
.sort-card.ok { background: var(--green); color: #fff; }
.sort-card.no { background: var(--red); color: #fff; }
.sort-deck { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 64px; margin-bottom: 14px; }
.sort-deck:empty::after { content: "All cards sorted. Tap Check."; font-size: 13px; font-weight: 800; opacity: .6; }

/* ============================================================
   v3 — 在线搜图弹窗（编辑器）
   ============================================================ */
.emodal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(27, 15, 61, .55);
  backdrop-filter: blur(4px);
  animation: gm-in .2s ease;
}
.emodal .box {
  width: min(680px, 94vw); max-height: 84vh; overflow: auto;
  padding: 22px 24px; border-radius: var(--r-lg);
  background: #fff; box-shadow: var(--sh-3);
  animation: gm-pop .24s cubic-bezier(.2, 1.4, .4, 1);
}
.emodal h3 { margin: 0 0 12px; font-size: 18px; font-weight: 900; color: var(--ink); }
.esearch-row { display: flex; gap: 10px; margin-bottom: 14px; }
.esearch-row .input { flex: 1; }
.esearch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; min-height: 120px; }
@media (max-width: 640px) { .esearch-grid { grid-template-columns: repeat(3, 1fr); } }
.esearch-grid button {
  padding: 0; border-radius: var(--r-sm); overflow: hidden;
  aspect-ratio: 4/3; background: #f4f1ff center/cover no-repeat;
  box-shadow: inset 0 0 0 2px var(--line);
  transition: transform .12s, box-shadow .12s;
}
.esearch-grid button:hover { transform: scale(1.04); box-shadow: inset 0 0 0 3px var(--violet-500); }
.esearch-status { grid-column: 1 / -1; align-self: center; text-align: center; font-size: 13.5px; font-weight: 800; color: var(--ink-mute); padding: 26px 10px; line-height: 1.6; }
.esearch-credit { margin-top: 10px; font-size: 11px; font-weight: 700; color: var(--ink-mute); text-align: right; }

/* ============================================================
   v3 — 语音（编辑器音频行 + 播放页扬声器）
   ============================================================ */
.audio-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r-sm); background: #f6f3ff; margin-bottom: 12px; }
.audio-row .tag { font-size: 12.5px; font-weight: 900; color: var(--violet-600); }
.audio-row .cur { font-size: 12.5px; font-weight: 800; color: var(--ink-soft); flex: 1; }
.audio-row .rec-on { color: var(--red); animation: rec-blink 1s infinite; }
@keyframes rec-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.gspeak {
  position: absolute; top: 14px; right: 16px; z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 18px;
  background: rgba(255,255,255,.14); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.gspeak:hover { background: rgba(255,255,255,.26); }

/* ============================================================
   v3 — 选项改单列长条
   ============================================================ */
.options { grid-template-columns: 1fr; max-width: 620px; margin-left: auto; margin-right: auto; }
.reveal-wrap { grid-template-columns: 1fr 118px; }

/* 设置分组小标题 */
.set-sec {
  margin: 16px 0 8px; padding-bottom: 6px;
  font-size: 12px; font-weight: 900; letter-spacing: .6px;
  text-transform: uppercase; color: var(--violet-600);
  border-bottom: 1px solid var(--line);
}
.set-sec:first-child { margin-top: 0; }

/* Quiz show 生命线 */
.ll-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.ll-btn {
  padding: 9px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 900; color: #fff;
  background: linear-gradient(150deg, rgba(255,255,255,.22), rgba(255,255,255,.10));
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35), inset 0 -3px 0 rgba(0,0,0,.14);
  transition: transform .1s, filter .15s;
}
.ll-btn:hover { transform: translateY(-2px); filter: brightness(1.15); }
.ll-btn[disabled] { opacity: .35; pointer-events: none; }

/* 游戏级计时器样式由 play.js 的 .pill 提供（position 需要） */
.stage { position: relative; }

/* Quiz show 生命线 */
.gs-lifelines { display: flex; gap: 8px; justify-content: center; margin: 0 0 10px; flex-wrap: wrap; }
.gs-life {
  padding: 6px 14px; border-radius: 999px; border: 2px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.12); color: #fff; font-weight: 900; font-size: 13px;
  cursor: pointer; transition: transform .12s, background .12s;
}
.gs-life:hover:not(:disabled) { transform: scale(1.06); background: rgba(255,255,255,.24); }
.gs-life:disabled { opacity: .35; cursor: default; text-decoration: line-through; }
.gs-bonus-banner {
  position: absolute; inset: 0; z-index: 40; display: grid; place-items: center;
  background: rgba(10,6,30,.82); backdrop-filter: blur(4px);
}
.gs-bonus-banner .inner {
  text-align: center; color: #fff; animation: gm-pop .45s cubic-bezier(.2,1.6,.4,1);
}
.gs-bonus-banner h2 { font-size: 40px; margin: 0 0 8px; color: var(--yellow); text-shadow: 0 4px 18px rgba(255,201,60,.5); }
.gs-bonus-banner p { font-size: 18px; font-weight: 800; margin: 0 0 18px; }

/* Anagram 逐字母判定色 */
.ag-slot.right { background: var(--green); border-color: var(--green-dark); color: #fff; }
.ag-slot.bad { background: var(--red); border-color: #c62f45; color: #fff; animation: ag-shake .3s; }
.ag-next-row { display: flex; justify-content: center; margin-top: 14px; }

/* Category sort — Table 布局 */
.sort-cols.table { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sort-cols.table .sort-col { border: 3px solid rgba(255,255,255,.5); border-radius: 6px; background: rgba(255,255,255,.08); }
.sort-cols.table .sort-col h4 { border-bottom: 3px solid rgba(255,255,255,.5); border-radius: 0; margin: 0; padding: 10px; background: rgba(0,0,0,.22); }
.sort-cols.table .pile { padding: 10px; }

/* ================= 界面对齐（2026-09-30） ================= */
:root { --brand: #1f9bf0; --brand-dark: #1583d6; --navy: #22304a; }

/* 品牌蓝按钮（New activity / Done） */
.btn.blue, a.btn.blue {
  background: linear-gradient(180deg, var(--brand), var(--brand-dark)) !important;
  color: #fff !important;
  box-shadow: inset 0 -3px 0 rgba(0, 60, 120, .28), var(--sh-1) !important;
}
.btn.blue:hover { filter: brightness(1.06); }

/* 主页 Hero：白底深蓝字 */
.hero { background: #fff !important; border: 1px solid var(--line); box-shadow: var(--sh-1); }
.hero h1 { color: var(--navy); }
.hero p { color: #5a6b85 !important; }
.hero .btn.ghost {
  box-shadow: inset 0 0 0 2px var(--brand) !important;
  background: #fff !important; color: var(--brand-dark) !important;
}
.hero .btn.ghost:hover { background: #eef7ff !important; }
.hero .ww-stat { margin-top: 16px; font-size: 13px; font-weight: 800; color: #8aa0bd; }

/* 模板卡：顶部彩色图块 */
.tpl-card { padding: 0 !important; overflow: hidden; }
.tpl-card .ic {
  width: 100%; height: 108px; border-radius: 0 !important;
  font-size: 44px !important; display: grid; place-items: center;
  background: linear-gradient(150deg, #7c4dff, #4b23b8) !important;
  color: #fff; text-shadow: 0 3px 10px rgba(0, 0, 0, .3);
}
.tpl-card h3 { padding: 12px 16px 0; color: var(--navy); }
.tpl-card p { padding: 4px 16px 0; }
.tpl-card .go { padding: 10px 16px 14px; color: var(--brand-dark) !important; }
.tpl-card[href*="type=imagequiz"] .ic { background: linear-gradient(150deg, #38b6ff, #1f6feb) !important; }
.tpl-card[href*="type=openbox"] .ic { background: linear-gradient(150deg, #ffb24d, #f2711c) !important; }
.tpl-card[href*="type=speakingcards"] .ic { background: linear-gradient(150deg, #2fd4b6, #0fa48a) !important; }
.tpl-card[href*="type=gameshow"] .ic { background: linear-gradient(150deg, #b06bff, #6a2fc9) !important; }
.tpl-card[href*="type=anagram"] .ic { background: linear-gradient(150deg, #ff6f91, #e63950) !important; }
.tpl-card[href*="type=wheel"] .ic { background: linear-gradient(150deg, #ffd54d, #f2a71c) !important; }
.tpl-card[href*="type=groupsort"] .ic { background: linear-gradient(150deg, #5cc8ff, #2f7de1) !important; }

/* 编辑器：面包屑 */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; margin-left: 18px; }
.crumbs a { color: var(--brand-dark); }
.crumbs a:hover { text-decoration: underline; }
.crumbs b { color: var(--navy); }
.crumbs .sep { color: #b7c4d6; }
.crumbs .dim { color: #b7c4d6; }

/* 模板 chip（编辑器右上） */
.tpl-chip {
  background: #eef7ff; color: var(--brand-dark);
  border: 1.5px solid #cfe7fb; font-weight: 900;
}

/* "+ Instruction" 折叠链 */
.instr-toggle {
  background: none; padding: 0; font-size: 13.5px; font-weight: 900;
  color: var(--brand-dark); cursor: pointer;
}
.instr-toggle:hover { text-decoration: underline; }
#instrBox { margin-top: 8px; }

/* 内容列底部 Done 行 */
.done-row { display: flex; justify-content: flex-end; margin-top: 16px; }

/* 开始/结算卡：白卡 */
.center-card {
  background: #fff;
  box-shadow: 0 18px 50px rgba(8, 14, 40, .38);
  backdrop-filter: none;
}
.center-card h1 { color: var(--navy); }
.center-card .sub { color: #5a6b85; }
.center-card .stat-row .pill,
.center-card .pill {
  background: #eef7ff; color: var(--brand-dark);
  box-shadow: inset 0 0 0 1.5px #cfe7fb;
  text-shadow: none;
}
.center-card #startBtn {
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  box-shadow: inset 0 -3px 0 rgba(0, 60, 120, .28), 0 10px 24px rgba(31, 155, 240, .35);
  font-size: 19px; padding: 14px 46px;
}
.center-card .btn.ghost { color: var(--brand-dark); box-shadow: inset 0 0 0 2px #cfe7fb; background: #fff; }
.center-card .review { text-align: left; }
.center-card .rv-item { background: #f6faff; border: 1px solid #e2eefb; }
.center-card .rv-item .info { color: var(--navy); }
.center-card .lb { background: #f6faff; border: 1px solid #e2eefb; color: var(--navy); }
.center-card .big-score { color: var(--brand-dark); text-shadow: none; }
.center-card .name-row .input { background: #fff; color: var(--navy); }

/* ============================================================
   ClassPlay library, authoring workspace and classic game frame
   ============================================================ */
:root {
  --brand: #168bce;
  --brand-dark: #096da9;
  --navy: #273b4e;
  --violet-600: #096da9;
  --violet-500: #168bce;
  --violet-100: #e8f4fc;
  --ink: #273b4e;
  --ink-soft: #52677a;
  --ink-mute: #6b7e8d;
  --line: #dce4e9;
  --page: #f5f7f9;
  --r-sm: 5px;
  --r-md: 7px;
  --r-lg: 9px;
  --r-xl: 12px;
  --sh-1: 0 2px 5px rgba(30, 55, 75, .05);
  --sh-2: 0 4px 12px rgba(30, 55, 75, .12);
  --sh-3: 0 14px 32px rgba(20, 40, 60, .18);
  --font: "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
}
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { font-weight: 400; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #eeae24; outline-offset: 3px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 300; padding: 12px 20px; background: #fff; color: var(--brand-dark); border-radius: 6px; box-shadow: var(--sh-2); }
.skip-link:focus { top: 8px; }
.btn { min-height: 42px; padding: 10px 19px; gap: 8px; border-radius: 5px; font-size: 15px; font-weight: 600; line-height: 1.3; background: var(--brand); box-shadow: none; transition: background .16s, box-shadow .16s; }
.btn:hover { filter: none; background: var(--brand-dark); }
.btn:active { transform: none; box-shadow: none; }
.btn.blue, a.btn.blue { background: var(--brand) !important; box-shadow: none !important; }
.btn.blue:hover, a.btn.blue:hover { background: var(--brand-dark) !important; filter: none; }
.btn.ghost { background: #fff; color: var(--brand-dark); border: 1px solid #cadde9; box-shadow: none; }
.btn.ghost:hover { background: #edf6fc; }
.btn.sm { min-height: 36px; padding: 7px 12px; font-size: 13px; border-radius: 5px; }
.btn.lg { padding: 13px 26px; font-size: 17px; border-radius: 6px; }
.input, .select, .textarea { min-width: 0; max-width: 100%; border: 1px solid #bbcbd6; padding: 10px 12px; font-size: 14px; font-weight: 400; border-radius: 5px; min-height: 42px; }
.input::placeholder, .textarea::placeholder { color: #80909c; opacity: 1; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22,139,206,.12); }
.label { color: var(--ink); font-weight: 600; }
.topbar { min-height: 72px; padding: 0 max(24px, calc((100vw - 1200px) / 2)); gap: 28px; background: #fff; border-color: #dce4e9; }
.brand { gap: 9px; font-size: 25px; font-weight: 700; color: #293c4c; letter-spacing: -.8px; white-space: nowrap; }
.brand .logo { width: 30px; height: 30px; padding: 0; gap: 3px; grid-template-columns: 1fr 1fr; background: none; color: var(--brand); border-radius: 0; box-shadow: none; }
.brand .logo:has(i) { display: grid; }
.brand .logo i { width: 13px; height: 13px; background: var(--brand); border-radius: 2px; }
.brand .logo i:nth-child(2) { opacity: .68; }
.brand .logo i:nth-child(3) { opacity: .46; }
.main-nav { align-self: stretch; display: flex; gap: 26px; align-items: stretch; }
.main-nav a { display: flex; align-items: center; padding: 2px 0 0; font-size: 14px; font-weight: 600; color: #6b7e8d; border-bottom: 3px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--brand-dark); }
.main-nav a.active { border-bottom-color: var(--brand); }
.page { max-width: 1200px; padding: 34px 24px 30px; }
.library-intro { display: grid; grid-template-columns: 1.15fr 1fr; gap: 55px; align-items: center; padding: 36px 40px; background: #fff; border: 1px solid #e3e9ed; border-radius: 9px; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.8px; color: #60849b; margin: 0 0 8px; }
.library-intro h1 { font-size: clamp(28px, 3vw, 36px); line-height: 1.17; margin: 0 0 14px; letter-spacing: -1.1px; font-weight: 700; }
.library-intro p:not(.eyebrow) { font-size: 14px; line-height: 1.7; color: var(--ink-soft); max-width: 460px; margin: 0 0 22px; }
.create-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 0; padding: 0; }
.create-steps li { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.create-steps li:not(:last-child)::after { content: "→"; position: absolute; top: 39px; right: -18px; color: #a6c3d6; font-size: 22px; }
.create-steps b { font-size: 13px; font-weight: 600; color: var(--ink); margin: 12px 0 3px; }
.create-steps li > span:last-child { font-size: 11px; color: #6b7e8d; }
.step-art { width: 80px; height: 80px; background: #ecf6fd; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.art-template { display: grid; grid-template-columns: 20px 20px; grid-template-rows: 20px 20px; gap: 5px; align-content: center; }
.art-template i { width: 20px; height: 20px; background: #1b90d2; border-radius: 3px; }
.art-template i:nth-child(2) { background: #4faf8c; }.art-template i:nth-child(3) { background: #e9ae4c; }.art-template i:nth-child(4) { background: #bc85cc; }
.art-content { flex-direction: column; gap: 6px; }
.art-content i { width: 44px; height: 8px; border-radius: 2px; background: #61b3df; }
.art-content i:first-child { height: 13px; background: #1b90d2; }
.art-content i:last-child { width: 31px; align-self: flex-start; margin-left: 18px; }
.art-play { color: #1b90d2; font-size: 34px; padding-left: 5px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 37px 0 18px; }
.sec-title { margin: 0; font-size: 23px; line-height: 1.2; font-weight: 650; letter-spacing: -.4px; gap: 11px; }
.sec-title span#count { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; height: 25px; padding: 0 7px; background: #e4edf3; color: #55748b; border-radius: 5px; font-size: 12px; font-weight: 600; }
.section-count, .device-note { color: var(--ink-mute); font-size: 12px; white-space: nowrap; }
.device-note span { color: #58a49a; font-size: 10px; margin-right: 5px; }
.grid-tpl { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.tpl-card { gap: 0; border: 1px solid #dce4e9; border-radius: 7px; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.tpl-card:hover { transform: none; border-color: #78b7dc; box-shadow: 0 4px 14px rgba(19,111,164,.1); }
.template-art { display: block; width: 100%; background: #3d9cda; aspect-ratio: 16 / 9; overflow: hidden; }
.template-art svg { display: block; width: 100%; height: 100%; }
.art-imagequiz { background: #4caae2 !important; }.art-openbox { background: #d98532 !important; }.art-speakingcards { background: #2ea99b !important; }
.art-gameshow { background: #65419d !important; }.art-anagram { background: #d57369 !important; }.art-wheel { background: #f0d99d !important; }.art-groupsort { background: #65b0d3 !important; }
.template-copy { display: flex; flex-direction: column; flex: 1; padding: 16px 15px 15px; }
.tpl-card h3 { padding: 0; color: var(--ink); font-size: 15px; font-weight: 650; line-height: 1.3; }
.tpl-card p { padding: 0; font-size: 12px; font-weight: 400; color: var(--ink-soft); margin: 6px 0 16px; line-height: 1.5; }
.tpl-card .go { padding: 0; font-size: 12px; font-weight: 600; color: var(--brand-dark) !important; }
.library-toolbar { display: flex; gap: 12px; margin: 0 0 20px; }
.search-field { position: relative; flex: 1; }
.search-field > span { position: absolute; left: 13px; top: 4px; color: #8ba0b0; font-size: 27px; pointer-events: none; }
.search-field .input { padding-left: 41px; }
.library-toolbar .select { width: 204px; }
.grid-quiz { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.quiz-card { border: 1px solid #dce4e9; border-radius: 7px; box-shadow: none; }
.quiz-card:hover { transform: none; box-shadow: 0 4px 14px rgba(19,111,164,.1); border-color: #78b7dc; }
.quiz-card .thumb { height: auto; aspect-ratio: 16 / 9; background: #edf4f9; }
.quiz-card .thumb img { object-fit: contain; background: #edf4f9; }
.thumb-play { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 35px; height: 35px; padding-left: 2px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--brand-dark); box-shadow: 0 2px 7px rgba(0,0,0,.12); font-size: 13px; }
.quiz-card .body { padding: 16px; gap: 6px; }
.activity-template { color: #7b8e9a; font-size: 10px; text-transform: uppercase; font-weight: 600; letter-spacing: .6px; }
.quiz-card h3 { font-size: 16px; font-weight: 600; color: #243c4f; line-height: 1.35; }
.quiz-card h3, .editor-heading h1, .center-card h1, .gprompt, .gs-q, .sort-card, .sort-col h4 { overflow-wrap: anywhere; }
.quiz-card h3 a:hover { color: var(--brand-dark); }
.quiz-card .meta { font-size: 12px; font-weight: 400; margin-bottom: 9px; }
.quiz-card .acts { gap: 7px; }
.icon-btn { border-radius: 5px; background: #f1f6f9; width: 34px; height: 36px; flex-basis: 34px; font-size: 18px; font-weight: 500; color: #47748d; }
.icon-btn:hover { background: #e5f2fa; }
.icon-btn.danger { background: #fff; color: #8a9ba6; }
.icon-btn.danger:hover { background: #fff0ee; color: #bf5548; }
.empty { grid-column: 1 / -1; background: #fff; border: 1px dashed #b9ccd9; padding: 38px 20px; font-weight: 400; }
.empty b { color: var(--ink); font-size: 17px; font-weight: 600; }
.empty p { margin: 7px 0 18px; font-size: 14px; }
.footer-note { display: flex; gap: 22px; align-items: center; justify-content: space-between; margin-top: 45px; padding: 24px 0 0; border-top: 1px solid #dce4e9; text-align: left; font-size: 11px; font-weight: 400; line-height: 1.7; }
.footer-note p { margin: 0; flex: 1; }
.footer-brand { font-size: 16px; font-weight: 600; color: #68849a; }

/* Editor: content at left, optional controls at right. */
.editor-wrap { max-width: 1248px; padding: 26px 24px 120px; }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 24px; }
.editor-heading h1 { margin: 0; font-size: 27px; line-height: 1.2; font-weight: 600; letter-spacing: -.6px; }
.crumbs { margin-left: 8px; gap: 12px; font-size: 12px; font-weight: 400; }
.crumbs a, .crumbs b, .crumbs .dim { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.crumbs b { font-weight: 600; color: var(--brand-dark); }
.step-number { display: inline-grid; place-items: center; width: 19px; height: 19px; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; }
.crumbs .dim { color: #8b9eac; }
.chip.tpl-chip { border: 1px solid #c8e3f5; border-radius: 5px; padding: 6px 10px; font-size: 12px; font-weight: 600; }
.editor-cols { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
.editor-cols > *, .library-intro > *, .search-field, .img-tools { min-width: 0; }
.panel { border: 1px solid #dce4e9; padding: 21px 23px; border-radius: 7px; box-shadow: none; }
.panel-head { align-items: flex-start; margin-bottom: 14px; }
.panel-head h2 { font-size: 15px; font-weight: 650; }
.panel-head .hint, .hint { font-size: 11px; font-weight: 400; color: var(--ink-mute); line-height: 1.6; }
.content-panel > .panel-head { display: block; margin-bottom: 22px; }
.content-panel > .panel-head h2 { margin-bottom: 6px; }
.content-panel > .panel-head .hint { font-size: 12px; }
.activity-title { font-size: 17px; min-height: 47px; font-weight: 500; }
.author-field { margin: 17px 0; }
.author-field .label span { color: #899ba7; font-weight: 400; }
.instr-toggle { font-size: 12px; font-weight: 600; }
#instrBox .hint { margin: 5px 0 0; }
.q-item { border: 1px solid #d7e2ea; background: #fbfcfd; padding: 18px; border-radius: 6px; margin-bottom: 18px; }
.q-item .no { background: #168bce; width: 27px; height: 27px; flex-basis: 27px; border-radius: 4px; font-size: 13px; font-weight: 600; }
.q-item .qh .grow { font-size: 12px; font-weight: 500; color: #788e9c; }
.editor-content .row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.img-pick { gap: 15px; }
.img-prev { background-color: #f0f5f8; border: 1px dashed #afc9d9; border-radius: 5px; width: 144px; height: 110px; flex-basis: 144px; font-size: 11px; }
.img-prev img { object-fit: contain; }
.img-tools .row { gap: 6px; }
.samples button { border-radius: 4px; box-shadow: inset 0 0 0 1px #cbdde8; }
.opt-row { gap: 8px; }
.opt-row .letter { background: #e9f3fa; color: #39799f; border-radius: 4px; font-weight: 600; font-size: 13px; }
.opt-row .pick { box-shadow: inset 0 0 0 1px #c3d5e0; border-radius: 50%; }
.opt-row.correct .pick, .opt-row.correct .letter { background: #2d9b69; }
.audio-row { background: #edf6fb; border-radius: 5px; border: 1px solid #dcebf4; font-size: 12px; }
.audio-row .tag, .audio-row .cur { font-size: 11px; font-weight: 500; }
.editor-sidebar .panel { padding: 18px; margin-bottom: 17px; }
.preview-stage { min-height: 228px; padding: 38px 16px 22px; border-radius: 5px; }
.preview-stage .pv-title { font-size: 10px; font-weight: 500; opacity: .8; }
.preview-content { width: 100%; color: #fff; text-align: center; }
#pvThumb { margin: 0 auto 12px; }
#pvThumb img { object-fit: contain !important; }
#pvTitle { font-size: 20px; font-weight: 600; line-height: 1.35; }
#pvChips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
#pvChips .pill { font-size: 10px; padding: 4px 7px; font-weight: 500; }
.preview-note { margin: 10px 0 0; color: var(--ink-mute); font-size: 11px; text-align: center; }
.switch-row { padding: 11px 0; border-bottom: 1px solid #eaf0f4; }
.switch-row .t { font-size: 12px; font-weight: 600; }
.switch-row .d { font-size: 11px; font-weight: 400; }
.switch { width: 40px; height: 23px; flex-basis: 40px; background: #c4d0d8; padding: 0; border: 0; }
.switch::after { width: 17px; height: 17px; }
.switch.on { background: var(--brand); }.switch.on::after { transform: translateX(17px); }
.theme-row { flex-wrap: wrap; gap: 8px; }
.theme-dot { width: 34px; height: 34px; border-radius: 5px; }
.theme-dot.sel { outline: 2px solid var(--brand-dark); }
.font-field { margin-top: 17px; }
.set-sec { color: #54809b; font-size: 10px; font-weight: 600; letter-spacing: .7px; margin-top: 20px; border-bottom-color: #e1eaf0; }
.done-row { margin-top: 20px; padding-top: 18px; border-top: 1px solid #e3ebf0; }
.save-bar { gap: 12px; padding: 13px max(24px, calc((100vw - 1200px) / 2)); background: #fff; backdrop-filter: none; box-shadow: 0 -3px 12px rgba(35,62,80,.04); }
.save-bar .status { color: #597384; font-size: 12px; font-weight: 500; }
.storage-note { margin: 2px 0 0; font-size: 10px; color: #889ba7; }
.toast-msg { max-width: calc(100vw - 30px); bottom: 90px; border-radius: 6px; font-size: 13px; font-weight: 500; padding: 12px 18px; text-align: center; background: #294355; }

/* Game stage: broad play area and clear controls without glass layers. */
body.game { background: linear-gradient(155deg, var(--tw-a), var(--tw-b)); font-weight: 500; }
body.game::before { background: none; opacity: 0; }
.game-shell { max-width: 1120px; padding: 20px 24px 36px; }
.hud { padding: 12px 18px; border-radius: 7px; background: rgba(0,0,0,.16); box-shadow: none; backdrop-filter: none; gap: 10px; }
.hud .g-title { font-size: 15px; font-weight: 600; }
.hud .g-title small { font-size: 11px; font-weight: 400; color: rgba(255,255,255,.7); }
.pill { border-radius: 5px; font-size: 12px; font-weight: 600; padding: 6px 10px; }
.pill.score { background: #ffe099; color: #634820; box-shadow: none; }
.gstage { min-height: 560px; padding: 38px 30px 30px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.04); border-radius: 8px; box-shadow: none; backdrop-filter: none; }
.gprompt, .qtext { font-size: 24px; font-weight: 600; line-height: 1.4; margin-bottom: 22px; }
.center-card { padding: 34px 40px; border-radius: 10px; box-shadow: 0 15px 45px rgba(0,0,0,.2); }
.center-card h1 { font-size: 28px; font-weight: 650; }
.center-card .sub { font-weight: 400; color: #5b7386; }
.center-card .pill { background: #eff5f9; color: #426781; font-size: 11px; font-weight: 500; box-shadow: none; }
.center-card #startBtn { font-size: 18px; border-radius: 6px; padding: 14px 45px; background: var(--brand); box-shadow: none; }
.center-card .btn.ghost { border: 1px solid #cadde9; box-shadow: none; }
.center-card .big-score { font-weight: 700; }
.center-card .rv-item .info .ok { color: #238354; }.center-card .rv-item .info .no { color: #bc4d43; }
.center-card .lb { padding: 14px; border-radius: 6px; }
.center-card .lb h4 { color: #597284; font-size: 12px; }
.center-card .lb li { background: #fff; color: #38566c; font-weight: 500; }
.start-thumb { max-width: 330px; aspect-ratio: 16 / 10; box-shadow: none; background: #eaf4fa; }
.start-thumb img { object-fit: contain; }
.pic { max-height: 420px; background: #edf5fa; border: 4px solid rgba(255,255,255,.85); border-radius: 6px; box-shadow: 0 4px 13px rgba(0,0,0,.15); }
.pic img { object-fit: contain; }
.reveal-wrap { max-width: 850px; margin: auto; grid-template-columns: minmax(0, 1fr) 118px; }
.buzz-hint { font-size: 11px; font-weight: 400; color: rgba(255,255,255,.85); }
.timerbar { max-width: 740px; margin: 14px auto 0; height: 6px; }
.options { max-width: 740px; gap: 10px; margin-top: 20px; }
.opt { border-radius: 6px; padding: 13px 17px; font-size: 17px; font-weight: 600; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.opt:hover { transform: none; background: #f0f8ff; }
.opt .k { border-radius: 4px; font-weight: 600; background: #dfedf7; color: #376d91; }
.opt.correct:hover, .opt.correct { background: #2d9b69; color: #fff; }
.opt.wrong:hover, .opt.wrong { background: #d8544b; color: #fff; }
.gmodal { border-radius: 8px; background: rgba(18,35,50,.74); }
.gmodal .box { border-radius: 9px; padding: 26px; }
.gmodal h3 { font-size: 23px; font-weight: 600; }
.gs-head { gap: 16px; }.gs-q { font-size: 24px; padding: 22px; border-radius: 6px; font-weight: 600; }
.gs-opt { padding: 19px; border-radius: 6px; font-weight: 600; font-size: 19px; box-shadow: 0 4px 0 rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.4); }
.gs-opt.c1 { background: #307eca; }.gs-opt.c2 { background: #229679; }.gs-opt.c3 { background: #cf863c; }.gs-opt.c4 { background: #b4547e; }.gs-opt.c5 { background: #2b8fb3; }.gs-opt.c6 { background: #6d9b2f; }
.gs-opt .k { border-radius: 4px; }
.gs-life { font-weight: 500; font-size: 12px; border-width: 1px; }
.gs-img { max-width: min(300px, 100%); }
.ag-clue { font-size: 23px; font-weight: 600; margin-bottom: 28px; }
.ag-row { gap: 10px; }.ag-slots { margin-bottom: 30px; }
.ag-tile, .ag-slot { border-radius: 5px; width: 59px; height: 65px; font-size: 30px; font-weight: 600; }
.ag-tile { box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.ag-tile:disabled, .ag-tile.used { opacity: .25; transform: none; }
.ag-slot { box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.wheel-frame { width: min(460px, 76vw); }.wheel-frame canvas { filter: drop-shadow(0 8px 18px rgba(0,0,0,.2)); }
.wheel-hub { font-size: 18px; font-weight: 500; }
.sort-cols { gap: 20px; margin-bottom: 28px; }
.sort-col { min-width: 0; border-radius: 5px; padding: 0 14px 14px; min-height: 250px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 2px rgba(255,255,255,.45); }
.sort-col h4 { background: rgba(0,0,0,.18); margin: 0 -14px 13px; border-radius: 5px 5px 0 0; padding: 14px; font-size: 19px; font-weight: 600; }
.sort-col.over { background: rgba(255,255,255,.17); box-shadow: inset 0 0 0 3px #e3d6a0; }
.sort-col:focus-visible { outline: 3px solid #eeae24; outline-offset: 4px; }
.sort-card { border-radius: 5px; padding: 11px 19px; font-weight: 600; font-size: 18px; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.sort-card.selected { outline: 3px solid #f4d178; outline-offset: 3px; }
.sort-card img { max-width: 90px; max-height: 65px; object-fit: contain; }
.sort-deck { margin: 22px 0 15px; gap: 13px; }
.sort-deck:empty::after { color: #fff; opacity: .85; }
.next-row { flex-wrap: wrap; }
.game .btn.green { background: #258d60; }
.game .btn.green:hover { background: #207852; }

@media (max-width: 1050px) {
  .topbar { padding: 0 20px; gap: 20px; }
  .grid-tpl { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .library-intro { gap: 25px; padding: 30px; }
  .editor-cols { grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; }
  .crumbs { gap: 6px; font-size: 11px; margin-left: 0; }
  .editor-page .brand { font-size: 21px; }
  .panel { padding: 18px; }
}
@media (max-width: 820px) {
  .library-intro { grid-template-columns: 1fr; gap: 28px; }
  .library-intro p:not(.eyebrow) { max-width: none; }
  .create-steps { max-width: 460px; }
  .grid-quiz { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .editor-cols { grid-template-columns: minmax(0,1fr); }
  .editor-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
  .editor-sidebar .panel { margin: 0; }
  .editor-page .crumbs { display: none; }
  .panel-head { flex-wrap: wrap; gap: 4px; }
  .gstage { padding: 35px 20px 24px; min-height: 520px; }
  .hud { flex-wrap: wrap; }.hud .g-title { max-width: 100%; }
}
@media (max-width: 580px) {
  html { scroll-padding-top: 82px; }
  .topbar { padding: 12px 16px; min-height: 64px; gap: 10px; }
  .brand { font-size: 22px; }.brand .logo { width: 25px; height: 25px; gap: 3px; }.brand .logo i { width: 11px; height: 11px; }
  .topbar > .btn { font-size: 12px; padding: 9px 10px; min-height: 36px; }
  .main-nav { display: none; }
  .page, .editor-wrap { padding-left: 16px; padding-right: 16px; }
  .page { padding-top: 20px; }
  .library-intro { padding: 24px 20px; gap: 24px; }
  .library-intro h1 { font-size: 28px; letter-spacing: -.8px; }
  .create-steps { gap: 9px; }.create-steps li:not(:last-child)::after { right: -11px; top: 29px; font-size: 17px; }
  .step-art { width: 63px; height: 63px; border-radius: 12px; }
  .art-content i { width: 35px; }.art-content i:last-child { width: 25px; margin-left: 14px; }
  .create-steps b { font-size: 11px; }.create-steps li > span:last-child { font-size: 10px; }
  .section-heading { margin-top: 28px; align-items: flex-start; }.section-count { max-width: 80px; text-align: right; white-space: normal; font-size: 10px; line-height: 1.6; }
  .sec-title { font-size: 22px; }.device-note { display: none; }
  .grid-tpl { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .template-copy { padding: 12px; }.tpl-card h3 { font-size: 14px; }.tpl-card p { font-size: 11px; margin-bottom: 12px; }.tpl-card .go { font-size: 11px; }
  .library-toolbar { flex-wrap: wrap; gap: 8px; }.library-toolbar .search-field { flex-basis: 100%; }.library-toolbar .select { width: 100%; }
  .grid-quiz { grid-template-columns: minmax(0,1fr); gap: 18px; }.quiz-card .thumb { aspect-ratio: 16 / 8; }
  .footer-note { flex-direction: column; gap: 8px; align-items: flex-start; }
  .editor-wrap { padding-bottom: 140px; }.editor-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 18px; }.editor-heading h1 { font-size: 25px; }
  .editor-sidebar { grid-template-columns: minmax(0,1fr); }
  .panel { padding: 16px; }.q-item { padding: 13px; }.img-pick { flex-direction: column; gap: 11px; }.img-prev { width: 100%; height: 150px; flex-basis: auto; }.img-tools { width: 100%; }
  .opt-row { gap: 6px; }.opt-row .letter { width: 26px; flex-basis: 26px; }.opt-row .pick { width: 27px; height: 27px; flex-basis: 27px; }.opt-row .input { min-width: 0; padding: 9px; }
  .save-bar { padding: 10px 16px; gap: 9px; flex-wrap: wrap; }.save-bar > div { width: 100%; }.save-bar .spacer { display: none; }.save-bar > .btn { flex: 1; font-size: 12px; padding: 10px; }.storage-note { display: none; }
  .game-shell { padding: 12px 10px 24px; }.hud { padding: 11px 12px; gap: 7px; }.hud .g-title { width: 100%; font-size: 14px; }.hud .spacer { display: none; }.hud .pill { padding: 5px 8px; font-size: 11px; }.hud .pill.mute { margin-left: auto; }
  .center-card { padding: 26px 20px; margin: 20px auto; }.center-card h1 { font-size: 23px; }.center-card .sub { font-size: 13px; }.center-card .stat-row { gap: 7px; }
  .gstage { padding: 42px 12px 22px; border-radius: 6px; min-height: 460px; }.gprompt, .qtext { font-size: 20px; }.gmodal .box { max-height: 92%; padding: 20px; }
  .reveal-wrap { grid-template-columns: minmax(0,1fr); gap: 16px; }.pic { aspect-ratio: 4 / 3; }.buzz-hint { max-width: 100px; text-align: left; }
  .opt { padding: 12px 13px; font-size: 15px; }.gs-head { gap: 10px; }.gs-q { font-size: 18px; padding: 14px; }.gs-timer { width: 63px; height: 63px; flex-basis: 63px; }.gs-timer b { font-size: 21px; }.gs-opt { padding: 14px; font-size: 16px; }
  .ag-tile, .ag-slot { width: 41px; height: 49px; font-size: 23px; }.ag-row { gap: 7px; }.ag-clue { font-size: 20px; }.wheel-frame { width: min(390px, 79vw); }
  .sort-cols, .sort-cols.table { grid-template-columns: minmax(0,1fr); gap: 14px; }.sort-col { min-height: 130px; }.sort-col h4 { font-size: 17px; }.sort-card { font-size: 16px; }.sort-deck { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html:where(:not([data-motion-managed])) { scroll-behavior: auto; }
  :where(:root:not([data-motion-managed])) *, :where(:root:not([data-motion-managed])) *::before, :where(:root:not([data-motion-managed])) *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* The player's own "No movement" choice (html[data-reduce-motion], js/motion-preference.js) applies the same rules. */
html:where([data-reduce-motion]) { scroll-behavior: auto; }
:where(:root[data-reduce-motion]) *, :where(:root[data-reduce-motion]) *::before, :where(:root[data-reduce-motion]) *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
/* Crossword uses the remaining stage height; oversized grids and clue lists keep scrolling. */
.activity-player[data-game="crossword"] #gameStage[data-crossword-fit="yes"] .puzzle-shell {
  display: flex; flex-direction: column; height: 100%; min-height: 0;
}
.activity-player[data-game="crossword"] #gameStage[data-crossword-fit="yes"] .crossword-layout {
  flex: 1; min-height: 0; align-items: stretch;
}
.activity-player[data-game="crossword"] #gameStage[data-crossword-fit="yes"] :is(.puzzle-scroll,.crossword-clues) {
  height: 100%; max-height: 100%; min-height: 0;
}
.activity-player[data-game="crossword"] #gameStage[data-crossword-fit="yes"] .crossword-grid {
  grid-template-columns: repeat(var(--puzzle-columns),var(--crossword-cell-size,36px));
  min-width: 0; max-width: none;
}
.activity-player[data-game="crossword"] #gameStage[data-crossword-fit="yes"] :is(.crossword-cell,.crossword-block) {
  width: var(--crossword-cell-size,36px); height: var(--crossword-cell-size,36px);
}
.activity-player[data-game="crossword"] #gameStage[data-crossword-fit="yes"] .crossword-cell input {
  font-size: clamp(18px,calc(var(--crossword-cell-size,36px)*.6),38px); padding-top: 4px;
}
.activity-player[data-game="crossword"] #gameStage[data-crossword-fit="yes"] .crossword-number {
  font-size: clamp(9px,calc(var(--crossword-cell-size,36px)*.23),14px);
}
@media (max-width:650px) {
  .activity-player[data-game="crossword"] #gameStage[data-crossword-fit="yes"] .crossword-layout {
    grid-template-rows: minmax(0,1fr) minmax(105px,31%);
  }
}

/* Source: css/site.css */
/* Compact library and template picker. These styles are independent of game themes. */
button, input, select, textarea { font: inherit; }
/* The round font in two parts (5.266.0). Its Latin letters, figures and punctuation (assets/fonts/Nunito-Variable-latin.woff2,
   40 KB, made with fontTools from the whole font for the first range below) are all most pages need; the whole font
   (101 KB) is fetched only for a page that shows one of its other characters (the second range: every other character
   it has, such as Vietnamese, Cyrillic or Polish letters). Latin text draws pixel for pixel as with the whole font. */
@font-face { font-family: "ClassPlay Round"; src: url("../assets/fonts/Nunito-Variable-latin.woff2") format("woff2"); font-style: normal; font-weight: 200 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "ClassPlay Round"; src: url("../assets/fonts/Nunito-Variable.woff2") format("woff2"); font-style: normal; font-weight: 200 1000; font-display: swap; unicode-range: U+0100-0130, U+0132, U+0134-0151, U+0154-017E, U+0181, U+018A, U+018F, U+0192, U+01A0-01A1, U+01AF-01B0, U+01B3-01B4, U+01C4-01CE, U+01D4, U+01E5-01E7, U+01E9-01EB, U+01EF, U+01FA-021B, U+021F, U+0226-0228, U+022A-022D, U+0230-0233, U+0237, U+0253, U+0257, U+0259, U+0292, U+02B9-02BA, U+02BE-02BF, U+02C7-02CC, U+02D8-02D9, U+02DB, U+02DD, U+0300-0303, U+0306-0307, U+0309-030C, U+030F, U+0311-0312, U+031B, U+0323-0324, U+0326-0328, U+032E, U+0331, U+0335, U+0337-0338, U+0394, U+03A3, U+03A9, U+03BC, U+03C0, U+0400-045F, U+0462-0463, U+046A-046B, U+0472-0475, U+048A-04A5, U+04A8-04FF, U+0510-0513, U+051A-051D, U+0524-0529, U+052E-052F, U+1E08-1E09, U+1E0C-1E0F, U+1E14-1E17, U+1E1C-1E1D, U+1E20-1E21, U+1E24-1E25, U+1E2A-1E2B, U+1E2E-1E2F, U+1E36-1E37, U+1E3A-1E3B, U+1E42-1E49, U+1E4C-1E53, U+1E5A-1E5B, U+1E5E-1E69, U+1E6C-1E6F, U+1E78-1E7B, U+1E80-1E85, U+1E8E-1E8F, U+1E92-1E93, U+1E97, U+1E9E, U+1EA0-1EF9, U+2070, U+2074-2079, U+2080-2089, U+20A1, U+20A3-20A4, U+20A6-20A7, U+20A9, U+20AB, U+20AD-20AE, U+20B1-20B2, U+20B4-20B5, U+20B8-20BA, U+20BC-20BD, U+2113, U+2116, U+2126, U+212E, U+2202, U+2205-2206, U+220F, U+2211, U+2219-221A, U+221E, U+222B, U+2248, U+2260, U+2264-2265, U+25CA, U+27E8-27E9, U+F8FF, U+FB01-FB02; }
@font-face { font-family: "ClassPlay Display"; src: url("../assets/fonts/Baloo2-Variable.woff2") format("woff2"); font-style: normal; font-weight: 400 800; font-display: swap; }
body.site-page { margin: 0; background: linear-gradient(#cce6f3, #e8f5fb 450px); color: #222; font-family: Arial, "Microsoft YaHei", sans-serif; font-size: 14px; font-weight: 400; }
.site-header { background: #fff; border-bottom: 1px solid #dae8ef; }
.site-header-inner { min-height: 50px; display: flex; align-items: center; gap: 22px; padding: 0 30px; max-width: 1600px; margin: auto; }
.site-brand { display: inline-flex; align-items: center; gap: 5px; color: #222; font-size: 24px; font-weight: 700; letter-spacing: -1.1px; line-height: 1; white-space: nowrap; }
.site-brand { font-family: "ClassPlay Round", Arial, sans-serif; font-weight: 900; }
.iq-activity-svg text { font-family: "ClassPlay Round", Nunito, Arial, sans-serif; }
.site-logo { display: grid; grid-template-columns: 9px 9px; grid-template-rows: 9px 9px; gap: 2px; margin-right: 1px; }
.site-logo i { display: block; width: 9px; height: 9px; background: #33a4e4; }
.site-logo i:nth-child(2) { opacity: .58; }.site-logo i:nth-child(3) { opacity: .72; }
.site-nav { display: flex; align-items: center; gap: 25px; margin-left: auto; align-self: stretch; }
.site-nav a { display: flex; align-items: center; border-bottom: 2px solid transparent; font-size: 13px; color: #222; padding: 0 2px; }
.site-nav a:hover, .site-nav a[aria-current] { border-bottom-color: #39a4e5; color: #1573ad; }
/* Tool navigation uses the same soft sage pill as every other teacher page. */
.site-page:is(.tools-page, .tracing-page) .site-header .site-nav a[aria-current="page"] { color: #155f69; border-bottom: 0; background: #e6efe9; box-shadow: none; }
.site-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid #bbb; background: linear-gradient(#fff, #f6f6f6); color: #222; font: inherit; font-size: 13px; font-weight: 400; padding: 7px 12px; border-radius: 0; min-height: 34px; line-height: 1.25; cursor: pointer; white-space: nowrap; }
.site-button:hover { background: #eef6fc; border-color: #7cb9dd; }
.site-button.primary { color: #fff; background: #39a5e8; border-color: #339add; font-weight: 600; }
.site-button.primary:hover { background: #268ecb; }
.site-create { min-height: 32px; font-size: 13px; padding: 6px 13px; }
.site-main { width: calc(100% - 72px); max-width: 1280px; min-height: calc(100vh - 136px); margin: 24px auto 0; background: #fff; box-shadow: 0 1px 5px rgba(70,95,110,.08); }
.site-page .site-input, .site-page .site-select { font-family: inherit; font-size: 13px; font-weight: 400; color: #333; height: 35px; min-width: 0; border: 1px solid #c6c6c6; border-radius: 0; background: #fff; outline: none; padding: 7px 10px; box-shadow: none; }
.site-page .site-input:focus, .site-page .site-select:focus { border-color: #40a6e0; box-shadow: 0 0 0 1px #40a6e0; }
.site-input::placeholder { color: #aaa; }
.site-input[type=search]::-webkit-search-cancel-button { cursor: pointer; }
.site-page button:focus-visible, .site-page a:focus-visible { outline: 2px solid #267fb6; outline-offset: 3px; }
.picker-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 25px; border-bottom: 1px solid #e4e4e4; padding: 27px 32px 24px; }
.picker-steps { display: flex; align-items: center; gap: 16px; font-size: 20px; color: #898989; line-height: 1.2; white-space: nowrap; }
.picker-steps h1 { font-size: 20px; font-weight: 400; color: #111; line-height: inherit; margin: 0; letter-spacing: 0; }
.step-chevron { color: #8e8e8e; font-size: 30px; font-weight: 300; line-height: .6; }
.compact-search { position: relative; flex: 0 1 250px; }
.compact-search .site-input { width: 100%; padding-right: 34px; text-overflow: ellipsis; }
.compact-search > span { display: grid; place-items: center; position: absolute; right: 10px; top: 0; height: 35px; color: #444; pointer-events: none; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 22px; padding: 26px 32px 40px; }
.template-card { display: flex; min-width: 0; min-height: 122px; border: 1px solid #d7d7d7; background: #fff; color: #111; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: background .15s, border-color .15s; overflow: hidden; }
.template-card:hover { border-color: #72bce9; background: #f3faff; }
.template-thumb { flex: 0 0 120px; width: 120px; min-height: 120px; align-self: stretch; display: grid; place-items: center; background: #f5f2e9; }
.template-thumb > .iq-template-svg { width: 120px; height: 120px; }
.iq-template-svg { display: block; width: 100%; height: 100%; }
.template-card .template-copy { display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; min-width: 0; padding: 18px 14px 16px 18px; }
.template-copy h2 { font-size: 16px; font-weight: 400; line-height: 1.15; margin: 0; }
.template-copy p { margin: 0; font-size: 13px; font-weight: 400; line-height: 1.35; color: #696969; }
.site-empty { grid-column: 1 / -1; padding: 50px 20px; text-align: center; color: #777; }
.site-empty h2 { font-weight: 400; color: #333; font-size: 20px; }
.site-empty p { font-size: 14px; }
.library-heading { display: flex; align-items: center; gap: 22px; min-height: 75px; padding: 19px 27px; border-bottom: 4px solid #d4e8f2; }
.library-heading h1 { font-size: 25px; font-weight: 600; letter-spacing: 0; margin: 0 auto 0 0; line-height: 1.25; }
.library-title { margin-right: auto; min-width: 0; }
.library-title h1 { overflow-wrap: anywhere; }
.library-tools { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.library-view-controls { display: flex; gap: 3px; }
.library-view-controls .site-button { width: 34px; padding: 0; color: #7895a6; }
.library-view-controls .site-button[aria-pressed=true] { color: #258fc9; border-color: #83b9da; background: #eaf6fc; }
.library-search { position: relative; width: 240px; }
.library-search .site-input { width: 100%; padding-right: 37px; }
.library-search > span { display: grid; place-items: center; position: absolute; right: 0; top: 0; width: 35px; height: 35px; border-left: 1px solid #c6c6c6; font-size: 24px; color: #333; pointer-events: none; }
.library-order-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 50px; padding: 12px 27px 7px; color: #555; font-size: 12px; }
.library-sort-options { display: flex; align-items: center; gap: 17px; }
.library-sort-options button { font: inherit; font-size: 12px; font-weight: 400; padding: 2px 0; border: none; background: none; color: #666; }
.library-sort-options button[aria-pressed=true] { color: #111; }
.library-sort-options button[aria-pressed=true]::after { content: " ▴"; }
.library-order-row .site-select { height: 29px; padding-top: 4px; padding-bottom: 4px; font-size: 12px; }
.library-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 19px 15px; padding: 16px 27px 40px; align-content: start; }
.library-card { position: relative; min-width: 0; border: 1px solid #ccc; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.library-card:hover { border-color: #79bde5; }
.activity-thumb { display: block; width: 100%; aspect-ratio: 4/3; background: #d4eaf7; overflow: hidden; }
.activity-thumb svg, .activity-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.activity-details { padding: 8px 9px 28px; min-height: 81px; }
.activity-details h2 { margin: 0 0 5px; font-size: 15px; font-weight: 400; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-details h2 a { color: #111; }
.activity-details h2 a:hover { color: #197cba; }
.activity-template-name { margin: 0; font-size: 11px; color: #888; line-height: 1.25; }
.activity-meta { position: absolute; bottom: 7px; left: 9px; right: 40px; margin: 0; font-size: 10px; font-weight: 400; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-menu { position: absolute; right: 3px; bottom: 4px; }
.activity-menu > summary { list-style: none; display: grid; place-items: center; width: 32px; height: 28px; border-left: 1px solid #eee; color: #555; cursor: pointer; font-size: 21px; line-height: 1; }
.activity-menu > summary::-webkit-details-marker { display: none; }
.activity-menu[open] > summary { color: #1887c8; background: #eef8ff; }
.activity-actions { position: absolute; z-index: 15; right: 0; top: 32px; width: 150px; display: flex; flex-direction: column; background: #fff; padding: 4px 0; border: 1px solid #bbb; box-shadow: 0 3px 12px rgba(0,0,0,.14); }
.activity-action { display: block; text-align: left; width: 100%; border: 0; background: #fff; font: inherit; font-size: 13px; font-weight: 400; color: #333; padding: 9px 14px; cursor: pointer; }
.activity-action:hover { color: #147bb9; background: #edf8ff; }
.activity-action.delete-action { color: #a04e49; border-top: 1px solid #eee; }
.folder-card { position: relative; align-self: start; min-height: 112px; margin-top: 8px; padding: 21px 18px 32px; border-radius: 0 4px 4px 4px; background: #8cc7e9; border-top: 7px solid #6dafd5; color: #111; box-shadow: inset 6px 0 #67afd8; }
.folder-card::before { content: ""; position: absolute; width: 38%; height: 9px; left: 0; top: -15px; border-radius: 6px 8px 0 0; background: #6dafd5; }
.folder-card h2 { font-size: 15px; font-weight: 400; margin: 0 0 7px; line-height: 1.2; overflow-wrap: anywhere; }
.folder-card p { margin: 0; font-size: 11px; color: #557c93; }
.folder-card .activity-menu > summary { border-left: 1px solid rgba(43,104,141,.2); }
.folder-open::after { content: ""; position: absolute; inset: 0; }
.folder-card .activity-menu { z-index: 3; }
.library-breadcrumb { color: #777; font-size: 12px; margin: 0 0 7px; }
.library-breadcrumb a { color: #333; }.library-breadcrumb span { padding: 0 10px; }
.folder-up { display: grid; place-items: center; min-height: 112px; padding: 14px; font-size: 35px; width: 145px; color: #579bbb; border: 0; font-weight: 400; }
.library-notice { padding: 16px 27px 0; font-size: 12px; color: #888; }
.library-notice a { color: #1789cb; }
.site-dialog { width: min(460px, calc(100vw - 32px)); border: 1px solid #bbb; background: #fff; color: #333; padding: 24px; box-shadow: 0 10px 40px rgba(0,0,0,.18); }
.site-dialog::backdrop { background: rgba(30,55,75,.4); }
.site-dialog h2 { font-size: 21px; font-weight: 400; margin: 0 0 22px; }
.site-dialog label { display: block; color: #555; font-size: 13px; margin-bottom: 8px; }
.site-dialog .site-input, .site-dialog .site-select { width: 100%; }
.site-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.site-page .toast-msg { bottom: 25px; font-family: Arial, sans-serif; }
.library-list[data-view=list] { grid-template-columns: minmax(0, 1fr); }
.library-list[data-view=list] .library-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); max-width: none; }
.library-list[data-view=list] .activity-thumb { height: 96px; }
.library-list[data-view=list] .activity-details { padding: 17px 50px 27px 20px; min-height: 96px; }
.library-list[data-view=list] .activity-meta { left: 148px; bottom: 14px; }
.library-list[data-view=list] .folder-card { max-width: none; min-height: 90px; }
.site-footer { max-width: 1280px; margin: 0 auto; padding: 17px 0 24px; color: #7490a2; font-size: 10px; text-align: center; line-height: 1.5; }
.site-footer p { margin: 3px 0; }
@media (max-width: 1100px) {
  .template-grid { gap: 17px; padding: 24px; }.picker-toolbar { padding-left: 24px; padding-right: 24px; }
  .template-thumb { flex-basis: 105px; width: 105px; }.template-thumb > .iq-template-svg { width: 105px; height: 105px; }.template-copy p { font-size: 12px; }.template-card .template-copy { padding-left: 13px; }
  .library-heading { flex-wrap: wrap; }.library-tools { flex: 1; }.library-heading h1 { font-size: 24px; }
  .library-search { width: 210px; }
}
@media (max-width: 900px) {
  .site-main { width: calc(100% - 40px); margin-top: 20px; }.template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-thumb { flex-basis: 120px; width: 120px; }.picker-steps, .picker-steps h1 { font-size: 18px; }.picker-steps { gap: 12px; }.compact-search { flex-basis: 180px; }
  .library-list { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }.library-search { width: 180px; }.library-heading { gap: 15px; }
}
@media (max-width: 650px) {
  .site-header-inner { padding: 0 15px; gap: 12px; min-height: 51px; }.site-brand { font-size: 21px; }.site-nav { gap: 13px; }.site-nav a { font-size: 11px; }.site-create { font-size: 11px; padding: 6px 9px; }
  .site-main { width: calc(100% - 24px); margin-top: 14px; }.picker-toolbar { padding: 23px 17px 19px; flex-wrap: wrap; gap: 18px; }.picker-steps { gap: 11px; font-size: 16px; }.picker-steps h1 { font-size: 16px; }.step-chevron { font-size: 24px; }.compact-search { flex-basis: 100%; }
  .template-grid { padding: 19px 17px 30px; gap: 13px; grid-template-columns: minmax(0, 1fr); }.template-card .template-copy { padding-left: 18px; }.template-copy p { font-size: 13px; }
  .library-heading { padding: 17px; }.library-heading h1 { font-size: 23px; }.library-tools { justify-content: flex-start; flex-basis: 100%; }.library-search { flex: 1; width: auto; min-width: 130px; }
  .library-order-row { padding: 12px 17px; gap: 12px; flex-wrap: wrap; }.library-sort-options { gap: 11px; margin-left: auto; font-size: 11px; }.library-sort-options button { font-size: 11px; }
  .library-list { padding: 10px 17px 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }.activity-details { padding: 8px 8px 29px; }.activity-details h2 { font-size: 13px; }.activity-template-name { font-size: 10px; }.activity-meta { font-size: 9px; left: 8px; }
  .folder-card { min-height: 100px; padding: 16px 12px 30px; }.folder-card h2 { font-size: 13px; }.folder-card p { font-size: 10px; }.folder-up { width: 100%; }
  .site-footer { padding: 15px 20px 20px; }
}
@media (max-width: 420px) {
  .site-nav a#templatesNav { display: none; }.site-header-inner { gap: 8px; }.site-nav { gap: 0; }
  .picker-steps, .picker-steps h1 { font-size: 14px; }.picker-steps { gap: 7px; }.step-chevron { font-size: 20px; }
  .template-thumb { flex-basis: 100px; width: 100px; }.template-thumb > .iq-template-svg { width: 100px; height: 100px; }.template-card .template-copy { padding: 11px 10px 11px 12px; }.template-copy p { font-size: 12px; }
  .library-list { grid-template-columns: minmax(0, 1fr); }.library-card { max-width: 260px; width: 100%; }.folder-card { max-width: 260px; }.folder-up { width: 130px; }
}
@media (prefers-reduced-motion: reduce) { :where(:root:not([data-motion-managed])) .template-card { transition: none; } }/* The player's own "No movement" choice (html[data-reduce-motion], js/motion-preference.js) applies the same rules. */:where(:root[data-reduce-motion]) .template-card { transition: none; }

/* A game being tested (js/store.js isTestingGame): its badge in the picker, and the notice that covers
   the editor for everyone but the site's administrator. */
.template-testing, .testing-pill { display: inline-block; align-self: flex-start; padding: 2px 9px; border: 1px solid #8fb7d6; border-radius: 999px; background: #e7f3fb; color: #17466b; font-size: 12px; font-weight: 800; line-height: 1.5; letter-spacing: .03em; }
.template-testing { margin-top: -2px; }
.testing-gate { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); background: #f4f7f6; }
.testing-gate-card { display: grid; justify-items: center; gap: 12px; width: min(100%, 460px); padding: 28px 24px; border: 1px solid #d5e2e6; border-radius: 16px; background: #fff; text-align: center; box-shadow: 0 10px 30px rgba(23, 73, 75, .1); }
.testing-gate-card h1 { margin: 0; font-size: 24px; line-height: 1.2; color: #17494b; text-wrap: balance; }
.testing-gate-card p { margin: 0; color: #4d6466; }
.testing-gate-card .testing-pill { align-self: center; }

/* Source: css/account.css */
.account-page { font-size: 16px; line-height: 1.5; }
.account-page .site-header-inner { min-height: 64px; }
.account-page .site-nav a { font-size: 14px; }
.account-layout { width: calc(100% - 48px); max-width: 1020px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); margin: 40px auto 28px; align-items: stretch; background: #fffdf9; border: 1px solid #dfe6dc; border-radius: 18px; box-shadow: 0 8px 28px #163d5010; overflow: hidden; }
.account-panel { padding: 40px 44px 44px; min-width: 0; }
.account-heading h1 { color: #173b43; font-family: "ClassPlay Round", Arial, "Microsoft YaHei", sans-serif; font-size: 32px; font-weight: 800; line-height: 1.25; letter-spacing: -.4px; margin: 0 0 10px; }
.account-heading > p { color: #52696d; font-size: 16px; line-height: 1.6; margin: 0 0 28px; }
.account-emblem { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 0 20px; border-radius: 14px; color: #155f69; background: #e6f2ec; }
.account-emblem svg { width: 31px; height: 31px; }
.account-language { display: flex; gap: 0; align-items: center; margin-left: 2px; border: 1px solid #c5d6d3; border-radius: 10px; background: #fff; padding: 0; overflow: hidden; }
.account-language button { min-width: 42px; min-height: 40px; background: transparent; border: 0; border-radius: 0; color: #52696d; font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; padding: 6px 9px; cursor: pointer; }
.account-language button + button { border-left: 1px solid #d9e2e8; }
.account-language button[aria-pressed=true] { color: #155f69; background: #e6efe9; font-weight: 800; }
.account-tabs { display: flex; gap: 4px; margin: 0 0 26px; padding: 4px; border: 1px solid #dfe6dc; border-radius: 10px; background: #f2f5ee; }
.account-tabs button { flex: 1; min-height: 42px; border: 1px solid transparent; border-radius: 7px; padding: 9px 8px; background: transparent; font: inherit; font-size: 15px; color: #52696d; cursor: pointer; }
.account-tabs button[aria-current] { background: #fff; border-color: #c5d6d3; color: #155f69; font-weight: 700; box-shadow: 0 1px 3px #163d500d; }
.account-form { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.account-form label { color: #173b43; font-size: 15px; margin: 0 0 8px; font-weight: 700; }
.account-page .account-form .site-input { width: 100%; height: 48px; border-color: #b9cbc6; border-radius: 8px; font-size: 16px; padding: 10px 13px; margin: 0 0 22px; color: #173b43; }
.account-page .account-form .site-input:focus { border-color: #155f69; box-shadow: 0 0 0 3px #155f6918; }
.account-form input[aria-invalid=true] { border-color: #bb3b45; background: #fffafa; }
.account-form .password-field { position: relative; margin-bottom: 22px; }
.account-form .password-field .site-input { margin: 0; padding-right: 51px; }
.password-toggle { display: grid; place-items: center; position: absolute; right: 2px; top: 2px; height: 44px; width: 44px; border-radius: 6px; background: transparent; border: 0; cursor: pointer; color: #52696d; }
.password-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.password-toggle[aria-pressed=true] { color: #155f69; background: #e6efe9; }
.account-form .field-note { font-size: 14px; color: #52696d; line-height: 1.6; margin: -13px 0 22px; }
.account-link { font: inherit; font-size: 14px; color: #155f69; background: none; border: 0; padding: 5px 0; cursor: pointer; text-align: left; }
.account-link:hover { text-decoration: underline; }
.account-form .forgot-link { align-self: flex-end; margin: -10px 0 18px; min-height: 36px; }
.account-form .confirmation-link { align-self: center; margin: 12px 0 0; min-height: 36px; text-align: center; }
.account-page .site-button { min-height: 44px; padding: 10px 18px; border-color: #c5d6d3; border-radius: 8px; color: #173b43; background: #fff; font-size: 15px; font-weight: 600; white-space: normal; }
.account-page .site-button:hover { background: #f1f6f2; border-color: #9fbab3; }
.account-page .site-button.primary { color: #fff; background: #155f69; border-color: #155f69; }
.account-page .site-button.primary:hover { background: #114e57; border-color: #114e57; }
.account-submit { width: 100%; margin: 4px 0 0; }
.account-page button:disabled { cursor: wait; opacity: .6; }
.account-page button[data-email-disabled]:disabled, .account-page #redeemSubmit:disabled, .account-page #membershipCode:disabled { cursor: not-allowed; }
.account-page :is(button, a, input):focus-visible { outline: 3px solid #155f69; outline-offset: 3px; }
.account-back { align-self: center; text-align: center; min-height: 40px; margin: 16px 0 0; }
.account-form-intro { font-size: 16px; color: #52696d; line-height: 1.65; margin: 0 0 24px; }
.confirmation-address { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 16px; align-items: center; padding: 15px 16px; margin: 0 0 26px; border: 1px solid #dfe6dc; border-radius: 9px; background: #f5f8f2; }
.confirmation-address > span { grid-column: 1; color: #52696d; font-size: 13px; }
.confirmation-address > strong { grid-column: 1; color: #173b43; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.confirmation-address > button { grid-column: 2; grid-row: 1 / 3; min-height: 40px; }
.account-page .account-form .confirmation-code { height: 58px; font-size: 25px; font-variant-numeric: tabular-nums; letter-spacing: .28em; text-align: center; padding-left: calc(13px + .28em); }
.account-form .confirmation-resend-hint { margin: 10px 0 0; font-size: 13px; }
.account-page #resendCode:disabled { cursor: default; }
.account-privacy { margin: 0 0 20px; font-size: 14px; color: #52696d; line-height: 1.6; }
.account-message { margin: 0 0 24px; font-size: 15px; line-height: 1.6; color: #22545c; background: #eef6f2; border: 1px solid #c7ddd5; border-radius: 9px; padding: 13px 16px; overflow-wrap: anywhere; }
.account-message[data-kind=error] { color: #8d3039; border-color: #e8bcc2; background: #fff3f3; }
.account-message[data-kind=success] { color: #30623c; border-color: #bcdbbf; background: #f0faf2; }
.account-loading { color: #52696d; font-size: 15px; line-height: 1.6; padding: 12px 0; margin: 0; }
.account-unavailable h2 { font-size: 21px; color: #173b43; margin: 0 0 12px; line-height: 1.4; }
.account-unavailable p { font-size: 16px; color: #52696d; line-height: 1.7; margin: 0 0 25px; }
.account-explainer { background: linear-gradient(155deg, #e7f2ec, #f2f4ea); padding: 48px 38px 36px; border-left: 1px solid #dfe6dc; }
.account-explainer h2 { font-family: "ClassPlay Round", Arial, "Microsoft YaHei", sans-serif; font-size: 27px; line-height: 1.3; margin: 20px 0 14px; color: #173b43; font-weight: 800; }
.account-explainer > p { color: #3e5866; font-size: 16px; line-height: 1.7; margin: 0 0 18px; }
.account-explainer ul { margin: 24px 0; padding: 0; list-style: none; color: #2c4a55; font-size: 15px; }
.account-explainer li { margin-bottom: 15px; line-height: 1.6; padding-left: 23px; position: relative; }
.account-explainer li::before { content: "✓"; position: absolute; left: 0; color: #1e7a52; font-weight: 700; }
.account-explainer .account-data-note { font-size: 14px; color: #52696d; border-top: 1px solid #d3ddd8; padding-top: 21px; margin-top: 24px; }
.account-folder-art { width: 184px; height: 120px; display: block; position: relative; margin: 12px 0 31px; }
.account-folder-art > span { position: absolute; left: 7px; top: 25px; width: 139px; height: 85px; border-radius: 2px 6px 6px 6px; background: #9edac6; box-shadow: inset 5px 0 #247d74; transform: rotate(-6deg); }
.account-folder-art > span::before { content: ""; width: 58px; height: 9px; background: #247d74; position: absolute; top: -8px; left: 0; border-radius: 4px 6px 0 0; }
.account-folder-art i { width: 55px; height: 70px; background: #fffdf7; border: 1px solid #c5d8cf; box-shadow: 0 2px 4px #163d501a; border-radius: 4px; transform: rotate(10deg); position: absolute; left: 117px; top: 32px; }
.account-folder-art i::before, .account-folder-art i::after { content: ""; position: absolute; width: 28px; height: 4px; border-radius: 3px; background: #a6d9c6; left: 12px; top: 48px; }
.account-folder-art i::after { top: 56px; width: 19px; }
.account-folder-art b { width: 21px; height: 21px; background: #f2c861; border-radius: 50%; position: absolute; top: 46px; left: 135px; }
.account-folder-art em { position: absolute; width: 25px; height: 25px; background: #fff; box-shadow: 0 1px 5px #163d5024; border-radius: 50%; right: 0; top: 94px; }
.account-folder-art em::after { content: "+"; font-size: 24px; color: #155f69; position: absolute; left: 5px; top: -2px; line-height: 28px; font-style: normal; }

.account-pending .account-layout, .account-signed-in .account-layout { max-width: 1060px; grid-template-columns: minmax(0, 1fr); }
.account-pending .account-panel, .account-signed-in .account-panel { padding: 36px 40px 40px; }
.account-pending .account-explainer, .account-pending .account-emblem, .account-signed-in .account-explainer, .account-signed-in .account-emblem { display: none; }
.account-pending .account-heading > p:empty { display: none; }
.account-pending #accountLoading { min-height: 124px; padding: 24px; border: 1px solid #dfe6dc; border-radius: 12px; background: #eef3e8; display: flex; align-items: center; }
.account-signed-in #passwordForm { max-width: 480px; }
.account-user-summary { display: flex; gap: 18px; align-items: center; padding: 22px 24px; margin: 0 0 24px; min-width: 0; border: 1px solid #dfe6dc; border-radius: 12px; background: #eef3e8; }
.account-avatar { display: grid; place-items: center; width: 58px; height: 58px; background: #e6efe9; color: #155f69; font-family: "ClassPlay Round", Arial, sans-serif; font-size: 26px; font-weight: 800; border-radius: 50%; flex-shrink: 0; }
.account-user-copy { min-width: 0; flex: 1; }
.account-user-summary strong { display: block; font-size: 21px; font-weight: 700; color: #173b43; overflow-wrap: anywhere; line-height: 1.4; }
.account-user-copy > span { display: block; font-size: 16px; color: #52696d; margin-top: 5px; overflow-wrap: anywhere; }
.account-page .account-library-link { color: #155f69; border-color: #9dbcae; gap: 10px; flex-shrink: 0; }
.account-library-link > span:last-child { font-size: 21px; line-height: 1; }
.account-settings-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 24px; }
.account-section { min-width: 0; padding: 25px 26px; border: 1px solid #dfe6dc; border-radius: 12px; background: #fff; }
.account-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.account-section h2 { color: #173b43; font-family: "ClassPlay Round", Arial, "Microsoft YaHei", sans-serif; font-size: 22px; font-weight: 800; line-height: 1.3; margin: 0; }
.account-section-intro { color: #52696d; font-size: 15px; line-height: 1.6; margin: 0 0 23px; }
.account-form-actions { display: flex; align-items: center; gap: 12px; }
.account-form-actions .account-submit { width: auto; min-width: 128px; margin: 0; }
.account-session { border-top: 1px solid #dfe6dc; margin-top: 26px; padding-top: 23px; }
.account-session h3 { color: #173b43; font-size: 16px; margin: 0 0 6px; font-weight: 700; }
.account-session p { color: #52696d; font-size: 15px; line-height: 1.6; margin: 0 0 16px; }
.account-page .account-logout { color: #8b3741; border-color: #ddbbc1; }
.account-page .account-logout:hover { color: #802b36; background: #fff5f5; border-color: #c38e97; }
.account-membership { margin-bottom: 24px; background: #fcfcf8; }
.account-devices { margin-bottom: 24px; }
.device-count { color: #155f69; background: #eef3e8; border-radius: 20px; padding: 5px 11px; font-size: 14px; white-space: nowrap; }
.device-list { display: grid; gap: 12px; }
.device-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; padding: 18px 0; border-top: 1px solid #dfe6dc; align-items: center; min-width: 0; }
.device-row-info { min-width: 0; }
.device-name-label { display: block; font-size: 13px; color: #52696d; margin-bottom: 6px; }
.account-page .device-name { width: 100%; max-width: 380px; min-height: 42px; margin: 0; }
.device-dates { font-size: 13px; color: #52696d; line-height: 1.6; margin: 7px 0 0; }
.device-current { display: inline-block; margin-top: 5px; border-radius: 5px; padding: 2px 7px; font-size: 12px; color: #155f69; background: #e6efe9; }
.device-row-actions, .device-gate-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.account-page .device-remove { color: #8b3741; border-color: #ddbbc1; }
.account-page .device-remove:hover { background: #fff5f5; border-color: #c38e97; }
.device-gate { padding: 16px 18px; background: #edf7fc; border: 1px solid #bedfeb; border-radius: 9px; margin-bottom: 18px; }
.device-gate > p { font-size: 15px; line-height: 1.65; color: #295b73; margin: 0 0 14px; }
.device-confirmation { grid-column: 1 / -1; background: #fff6f3; border-radius: 7px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.device-confirmation p { flex: 1 1 100%; color: #75463f; line-height: 1.6; font-size: 14px; margin: 0; }
.device-message { margin: 16px 0 0; }
@media (max-width: 600px) { .device-row { grid-template-columns: minmax(0, 1fr); gap: 12px; } .account-page .device-name { max-width: none; } }
.account-admin-link { font-weight: 700; flex-shrink: 0; }
.owner-phone-login { margin-top: 18px; }
.owner-phone-divider { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: #6c7d89; font-size: 13px; }
.owner-phone-divider::before, .owner-phone-divider::after { content: ""; height: 1px; background: #dce7ee; flex: 1; }
.account-page .owner-phone-button { width: 100%; display: flex; justify-content: center; align-items: center; gap: 9px; }
.owner-phone-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; flex-shrink: 0; }
.owner-passkey-note { color: #526b7b; font-size: 13px; line-height: 1.6; margin: 10px 0 0; }
.owner-passkey-message { margin: 14px 0 0; }
.account-passkeys { margin-bottom: 24px; }
.account-passkeys > summary { color: #50697a; font-size: 15px; font-weight: 600; cursor: pointer; min-height: 24px; }
.account-passkeys[open] > summary { margin-bottom: 22px; }
.owner-qr-pane { box-sizing: border-box; width: min(384px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 48px 24px 24px; border: 1px solid #d7e5ee; border-radius: 18px; background: #fff; color: #223f51; box-shadow: 0 20px 80px #163b5333; overflow: auto; text-align: center; }
.owner-qr-pane::backdrop { background: #17374b70; }
.owner-qr-close { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; color: #526b7b; cursor: pointer; }
.owner-qr-close:hover { background: #edf5fa; color: #236d9f; }
.owner-qr-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.owner-qr-surface { display: grid; place-items: center; aspect-ratio: 1; width: 100%; }
.owner-qr-pane img { display: block; width: 100%; height: auto; margin: 0; image-rendering: pixelated; }
.owner-qr-accessible, .owner-qr-status:not([data-kind=error]) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.owner-qr-pane .owner-qr-status[data-kind=error] { margin: 0 0 16px; text-align: left; }
.owner-qr-pane:has(.owner-qr-status[data-kind=error]:not([hidden])) .owner-qr-surface { display: none; }
.owner-qr-pane .owner-qr-recovery { width: 100%; margin: 0; }
.owner-passkey-badge { color: #176b9b; background: #eaf6fd; border-radius: 6px; padding: 3px 9px; font-size: 12px; white-space: nowrap; }
.owner-passkey-register { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.owner-passkey-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; border-top: 1px solid #e1ebf2; margin-top: 18px; padding-top: 18px; }
.owner-passkey-row-info { flex: 1 1 200px; min-width: 0; }
.owner-passkey-row-info strong { color: #294b60; font-size: 15px; overflow-wrap: anywhere; }
.owner-passkey-row-info p { color: #526b7b; font-size: 13px; margin: 5px 0 0; }
.account-page .owner-passkey-remove { color: #8b3741; border-color: #ddbbc1; }
.owner-passkey-confirmation { flex-basis: 100%; border-radius: 7px; background: #fff6f3; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.owner-passkey-confirmation p { flex-basis: 100%; color: #75463f; font-size: 14px; margin: 0; }
.membership-content { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 28px; align-items: start; margin-top: 18px; }
.membership-badge { display: inline-block; padding: 5px 12px; border: 1px solid #c3deed; border-radius: 7px; color: #196d9d; background: #eaf6fd; font-size: 17px; font-weight: 700; line-height: 1.4; }
.membership-badge[data-status=expired], .membership-badge[data-status=suspended] { color: #8d4a29; background: #fff6e9; border-color: #e9d5b4; }
.membership-count { font-size: 16px; font-weight: 700; color: #294b60; margin: 12px 0 5px; }
.membership-expiry, .membership-note { color: #50697a; font-size: 14px; line-height: 1.6; margin: 5px 0 0; }
.membership-redeem-controls { display: flex; gap: 10px; align-items: stretch; }
.account-page .account-redeem-form .site-input { flex: 1; min-width: 0; margin: 0; height: 44px; }
.account-redeem-form .site-button { flex-shrink: 0; }
.account-form.account-redeem-form .field-note { margin: 9px 0 0; font-size: 13px; }
.membership-message { margin: 20px 0 0; }
.membership-unavailable p { color: #50697a; font-size: 15px; margin: 14px 0; line-height: 1.6; }
.account-page .site-footer { font-size: 12px; color: #526b7b; }
.account-panel [hidden] { display: none !important; }
@media (max-width: 860px) {
  .account-panel { padding: 34px 32px; }
  .account-explainer { padding: 40px 28px 30px; }
  .account-pending .account-panel, .account-signed-in .account-panel { padding: 30px; }
  .account-user-summary { flex-wrap: wrap; }
  .account-library-link { margin-left: 76px; }
  .membership-content { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .account-settings-grid { gap: 18px; }
  .account-section { padding: 22px; }
}
@media (max-width: 700px) {
  .account-layout { width: calc(100% - 28px); margin: 24px auto; grid-template-columns: minmax(0, 1fr); max-width: 520px; border-radius: 14px; }
  .account-panel, .account-pending .account-panel, .account-signed-in .account-panel { padding: 28px 24px; }
  .account-heading h1 { font-size: 29px; }
  .account-heading > p { margin-bottom: 24px; }
  .account-explainer { padding: 26px 24px; border-left: 0; border-top: 1px solid #dfe6dc; }
  .account-folder-art { display: none; }
  .account-explainer h2 { margin-top: 0; font-size: 23px; }
  .account-explainer ul { margin: 18px 0; }
  .account-explainer .account-data-note { margin-top: 18px; padding-top: 18px; }
  .account-page .site-header-inner { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 18px; }
  .account-page .site-nav { grid-row: 2; grid-column: 1 / -1; margin: 0; gap: 22px; min-height: 34px; }
  .account-language { grid-column: 2; grid-row: 1; }
  .account-user-summary { gap: 14px; padding: 20px; }
  .account-avatar { width: 50px; height: 50px; font-size: 24px; }
  .account-user-summary strong { font-size: 20px; }
  .account-library-link { margin-left: 0; }
  .account-user-copy { flex-basis: calc(100% - 64px); }
  .account-settings-grid { grid-template-columns: minmax(0, 1fr); }
  .account-section { padding: 22px 20px; }
  .account-section h2 { font-size: 21px; }
  .account-section-heading { flex-wrap: wrap; gap: 8px 14px; }
  .account-session { margin-top: 23px; padding-top: 21px; }
}
@media (max-width: 400px) {
  .account-layout { width: calc(100% - 20px); margin-top: 20px; }
  .account-panel, .account-pending .account-panel, .account-signed-in .account-panel { padding: 25px 18px; }
  .account-page .site-nav { gap: 16px; }
  .account-page .site-nav a { font-size: 13px; }
  .account-user-summary { padding: 18px 16px; }
  .account-section { padding: 21px 17px; }
  .membership-redeem-controls { flex-direction: column; }
  .account-redeem-form .site-button { align-self: flex-start; }
}

/* Signed out, the page is quiet but never a dead end: logo · Back to home · language. */
.account-page .site-header-inner { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
.account-home-link { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid #c5d6d3; border-radius: 10px; background: #fff; color: #173b43; font-weight: 800; font-size: 14px; text-decoration: none; white-space: nowrap; }
.account-home-link:hover { background: #f1f6f2; border-color: #9fbab3; }
.account-home-link:focus-visible { outline: 3px solid #173b43; outline-offset: 2px; }
.account-home-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.account-signed-in .account-home-link { display: none; }
.account-page .account-language { border-color: #c5d6d3; border-radius: 10px; }
.account-page .account-language button[aria-pressed=true] { background: #e6efe9; color: #155f69; font-weight: 800; box-shadow: none; }
@media (max-width: 420px) { .account-home-link { padding: 0 11px; font-size: 13px; gap: 6px; } .account-page .site-header-inner { gap: 8px; padding: 12px 14px; } }

.account-home-link .for-teacher { display: none; }
@media (max-width: 700px) {
  /* Signed in on a phone: one "My library" link instead of a wrapping row of links. */
  body.account-signed-in .account-home-link { display: inline-flex; }
  body.account-signed-in .account-home-link .for-guest { display: none; }
  body.account-signed-in .account-home-link .for-teacher { display: inline; }
  body.account-signed-in #accountSiteNav { display: none !important; }
}
@media (max-width: 520px) {
  .account-page .account-language button[aria-pressed=true] { display: none; }
  .account-page .account-language { padding: 0; }
  .account-page .account-language button { min-width: 44px; min-height: 42px; }
  .account-page .account-language button + button { border-left: 0; }
  .account-page .site-header-inner > .site-brand { min-width: 0; }
}
/* Language always sits at the end of the bar, as on every other page. */
.account-page .site-header-inner > .account-home-link { grid-column: 2; grid-row: 1; }
.account-page .site-header-inner > .account-language { grid-column: 3; grid-row: 1; }

/* Buying full access (account-billing.js): a reminder, a card subscription's state, the two plans and two ways to pay. */
.membership-buy { margin-top: 24px; padding-top: 22px; border-top: 1px solid #dfe6dc; }
.buy-reminder { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #e9d5b4; border-radius: 10px; color: #7a4320; background: #fff6e9; font-size: 15px; font-weight: 700; line-height: 1.5; }
.buy-subscription { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid #c5d6d3; border-radius: 10px; background: #f5f8f2; }
.buy-subscription-status { flex: 1 1 260px; margin: 0; color: #173b43; font-size: 15px; font-weight: 700; line-height: 1.5; }
.buy-title { margin: 0 0 4px; color: #173b43; font-size: 18px; font-weight: 800; line-height: 1.35; }
.buy-intro { margin: 0 0 14px; color: #52696d; font-size: 14px; line-height: 1.6; }
.buy-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; min-width: 0; margin: 0 0 16px; padding: 0; border: 0; }
.buy-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.buy-plan { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; padding: 14px 16px; border: 2px solid #dfe6dc; border-radius: 12px; background: #fff; cursor: pointer; }
.buy-plan:has(input:checked) { border-color: #155f69; background: #f3f8f4; }
.buy-plan:focus-within { outline: 3px solid #155f69; outline-offset: 2px; }
.buy-plan input { width: 18px; height: 18px; margin: 0; accent-color: #155f69; }
.buy-plan-name { color: #173b43; font-size: 16px; font-weight: 700; }
.buy-plan-price { color: #155f69; font-size: 21px; font-weight: 800; }
.buy-plan-note { grid-column: 2 / 4; color: #52696d; font-size: 13px; }
.buy-actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* The chosen plan's Weidian product as a code to scan with WeChat. On a computer or classroom board (at least 700 wide,
   and at least 500 tall, used with a mouse or 960 wide, so a short laptop window counts too) it takes the Weidian button's place,
   with the steps beside it; on a phone it sits below the button, to screenshot and open from WeChat Scan's album. */
.buy-qr { display: none; }
.buy-qr:not([hidden]) { display: flex; align-items: center; gap: 14px; margin: 12px 0 0; padding: 12px; border: 1px solid #d7e5ee; border-radius: 12px; background: #fff; }
@media (min-width: 700px) and (min-height: 500px), (min-width: 700px) and (pointer: fine), (min-width: 960px) {
  .buy-qr:not([hidden]) { gap: 18px; width: fit-content; max-width: 100%; margin: 2px 0 0; padding: 12px 20px 12px 12px; }
  .buy-choose[data-qr="shown"] #buyShop { display: none; }
}
.buy-qr img { display: block; flex: none; width: 104px; height: 104px; }
@media (min-width: 700px) and (min-height: 500px), (min-width: 700px) and (pointer: fine), (min-width: 960px) { .buy-qr img { width: 128px; height: 128px; } }
.buy-qr figcaption { display: grid; gap: 8px; max-width: 300px; color: #294b60; font-size: 14px; line-height: 1.5; }
.buy-qr .buy-qr-title { color: #173246; font-size: 15px; font-weight: 800; }
.buy-qr .buy-qr-steps { margin: 0; padding-left: 1.25em; color: #3d5868; font-size: 13.5px; line-height: 1.6; }
.buy-qr figcaption a { color: #196d9d; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.buy-actions a.site-button { text-decoration: none; }
.buy-note { margin: 12px 0 0; color: #50697a; font-size: 13px; line-height: 1.6; }
.buy-links { margin: 6px 0 0; font-size: 13px; }
.buy-links a { color: #196d9d; }
.buy-message { margin: 16px 0 0; }
@media (max-width: 560px) { .buy-actions .site-button, .buy-subscription .site-button { width: 100%; } }
.buy-qr .buy-qr-actions { flex-wrap: wrap; align-items: center; gap: 8px; }
.buy-qr .buy-qr-paid { min-height: 34px; padding: 6px 14px; font-size: 14px; }
/* Phones: one line on how to scan a code shown on the same phone; computers: the steps, the buttons and the link. */
.buy-qr .buy-qr-title, .buy-qr .buy-qr-steps, .buy-qr .buy-qr-actions, .buy-qr #buyQrWeb { display: none; }
.buy-qr .buy-qr-phone { display: grid; gap: 4px; color: #3d5868; font-size: 13.5px; line-height: 1.55; }
.buy-qr .buy-qr-phone strong { color: #173246; font-size: 15px; font-weight: 800; }
@media (min-width: 700px) and (min-height: 500px), (min-width: 700px) and (pointer: fine), (min-width: 960px) {
  .buy-qr .buy-qr-title, .buy-qr .buy-qr-steps { display: block; }
  .buy-qr .buy-qr-actions { display: flex; }
  .buy-qr #buyQrWeb { display: inline; }
  .buy-qr .buy-qr-phone { display: none; }
}
/* "Where do I find the code?" under the code box is for phones; on a computer it sits beside the WeChat code instead. */
.account-redeem-form .redeem-guide { align-self: flex-start; margin-top: 8px; }
@media (min-width: 700px) and (min-height: 500px), (min-width: 700px) and (pointer: fine), (min-width: 960px) { .account-membership:has(.buy-choose[data-qr="shown"]:not([hidden])) .redeem-guide { display: none; } }

/* After a code is redeemed: a window that says so, with the new end date (js/account.js). */
.redeem-done { width: min(420px, calc(100vw - 32px)); max-width: none; padding: 30px 28px 24px; border: 0; border-radius: 20px; background: #fff; color: #1c3a4c; text-align: center; box-shadow: 0 24px 60px rgba(16, 40, 60, .28); }
.redeem-done[hidden] { display: none; }
.redeem-done::backdrop { background: rgba(16, 32, 44, .45); }
.redeem-done-mark { width: 76px; height: 76px; margin: 0 auto 14px; }
.redeem-done-mark svg { display: block; width: 100%; height: 100%; }
.redeem-done-mark circle { fill: #e7f6ee; stroke: #2e9e62; stroke-width: 3; }
.redeem-done-mark path { fill: none; stroke: #2e9e62; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 34; stroke-dashoffset: 0; }
.redeem-done h2 { margin: 0 0 8px; color: #173246; font-size: 24px; }
.redeem-done p { margin: 0 0 22px; color: #3b5868; font-size: 16px; line-height: 1.55; }
.redeem-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@media (prefers-reduced-motion: no-preference) {
  .redeem-done[open] { animation: redeem-done-in .32s cubic-bezier(.2, .8, .3, 1.15); }
  .redeem-done[open] .redeem-done-mark path { animation: redeem-done-tick .45s .18s ease-out both; }
}
@keyframes redeem-done-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes redeem-done-tick { from { stroke-dashoffset: 34; } }

/* 5.95 — The account page in the site's own teal: a name card with the name edited in place, Membership beside
   Sign-in & security, the code box right after buying, browser rows with a picture and "Signs out next",
   a quiet owner link, small game previews when signed out, and a titled phone sign-in window. */
.account-page { --acct-ink: #173b43; --acct-muted: #526976; --acct-action: #155f69; --acct-teal: #087b72; --acct-line: #dfe6dc; --acct-mint: #eef3e8; --acct-mint-2: #e6efe9; }
.account-heading h1, .account-section h2, .account-explainer h2, .account-unavailable h2 { color: var(--acct-ink); }
.account-heading > p, .account-section-intro, .account-form .field-note, .account-form-intro, .account-privacy, .membership-expiry, .membership-note, .device-dates, .account-loading, .account-unavailable p { color: var(--acct-muted); }
.account-form label { color: var(--acct-ink); }
.account-link { color: var(--acct-action); }
.account-page .site-button { border-color: #c5d6d3; border-radius: 10px; color: var(--acct-ink); font-weight: 700; }
.account-page .site-button:hover { background: #f1f6f2; border-color: #9fbab3; }
.account-page .site-button.primary { color: #fff; background: var(--acct-action); border-color: var(--acct-action); }
.account-page .site-button.primary:hover { background: #114e57; border-color: #114e57; }
.account-page :is(button, a, input, summary):focus-visible { outline: 3px solid var(--acct-action); outline-offset: 3px; }
.account-page .account-form .site-input { border-color: #b9cbc6; border-radius: 10px; color: var(--acct-ink); }
.account-page .account-form .site-input:focus { border-color: var(--acct-action); box-shadow: 0 0 0 3px #155f6918; }
.account-tabs { border-color: var(--acct-line); background: #f4f6f0; }
.account-tabs button { color: var(--acct-muted); }
.account-tabs button[aria-current] { color: var(--acct-action); border-color: #c5d6d3; font-weight: 800; }
.password-toggle { color: var(--acct-muted); }
.password-toggle[aria-pressed=true] { color: var(--acct-action); background: var(--acct-mint-2); }
.account-message { color: #22545c; background: #eef6f2; border-color: #c7ddd5; }
.account-pending #accountLoading { border-color: var(--acct-line); background: var(--acct-mint); }
.account-section { border-color: var(--acct-line); border-radius: 16px; }

/* The name card: avatar, name with a pencil, email, and the name form when editing. */
.account-user-summary { flex-wrap: wrap; gap: 16px 20px; padding: 22px 24px; border-color: var(--acct-line); border-radius: 16px; background: var(--acct-mint); }
.account-avatar { width: 64px; height: 64px; background: var(--acct-action); color: #fff; font-size: 28px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #a6d9c6; }
.account-user-copy { flex: 1 1 260px; }
.account-name-row { display: flex; align-items: center; gap: 2px; min-width: 0; }
.account-user-summary strong { font-size: 24px; font-weight: 800; color: var(--acct-ink); line-height: 1.3; }
.account-user-copy > span { color: var(--acct-muted); margin-top: 2px; }
.account-icon-button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--acct-muted); cursor: pointer; }
.account-icon-button:hover, .account-icon-button[aria-expanded=true] { background: #fff; color: var(--acct-action); }
.account-icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.account-form.account-name-form { max-width: 440px; margin-top: 14px; }
.account-page .account-name-form .site-input { margin-bottom: 18px; background: #fff; }
.account-form.account-name-form .field-note { margin: -10px 0 14px; font-size: 14px; }
.account-name-form .account-form-actions .account-submit { min-width: 0; }
.account-page .account-library-link { color: var(--acct-ink); border-color: #c5d6d3; background: #fff; }
.account-user-summary:has(#profileForm:not([hidden])) { align-items: flex-start; }

/* Membership beside Sign-in & security; both stack on narrower screens. */
.account-overview { display: contents; }
.account-overview[hidden] { display: none; }
.account-overview > .account-membership { margin: 0; background: #fff; }
.membership-content { display: block; margin-top: 8px; }
.membership-badge { padding: 4px 14px; border-color: #c5d6d3; border-radius: 999px; color: var(--acct-action); background: var(--acct-mint-2); font-size: 16px; font-weight: 800; }
.membership-badge[data-status=lifetime]::before { content: "★"; margin-right: 6px; color: #c98f12; }
.membership-count { color: var(--acct-ink); margin: 14px 0 6px; }
.membership-meter { max-width: 520px; height: 10px; margin: 0 0 8px; border-radius: 999px; background: var(--acct-mint-2); overflow: hidden; }
.membership-meter span { display: block; width: 0; height: 100%; border-radius: 999px; background: var(--acct-teal); transition: width .45s ease; }
.membership-meter span[data-full=true] { background: #b5651d; }
.membership-buy { margin-top: 20px; padding: 20px; border-top: 0; border-radius: 14px; background: var(--acct-mint); }
.buy-title { color: var(--acct-ink); font-size: 20px; font-weight: 800; }
.buy-intro, .buy-note { color: #3e5866; }
.buy-plan { border-color: #d3ddd8; background: #fff; }
.buy-plan:has(input:checked) { border-color: var(--acct-action); background: #fff; box-shadow: 0 0 0 4px #155f6914; }
.buy-plan:focus-within { outline-color: #8fc2b9; }
.buy-plan input { accent-color: var(--acct-action); }
.buy-plan-name { color: var(--acct-ink); }
.buy-plan-price { color: var(--acct-action); font-family: "ClassPlay Display", "ClassPlay Round", Arial, sans-serif; }
.buy-plan-note { color: var(--acct-muted); }
.buy-qr .buy-qr-title { color: var(--acct-ink); }
.buy-qr .buy-qr-steps { color: #3e5866; }
.buy-qr .buy-qr-steps li::marker { color: var(--acct-action); font-weight: 800; }
.buy-qr figcaption a, .buy-links a { color: var(--acct-action); }
.buy-qr:not([hidden]) { border-color: var(--acct-line); }
.buy-subscription { border-color: #c5d6d3; background: #fff; }
.buy-subscription-status { color: var(--acct-ink); }
.account-form.account-redeem-form { margin-top: 18px; }
.membership-message { margin: 14px 0 0; }

/* Sign-in & security: one row per setting, each with its own button. */
.account-setting-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--acct-line); }
.account-security .account-section-heading + .account-setting-row { border-top: 0; padding-top: 2px; }
.account-setting-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 11px; background: var(--acct-mint); color: var(--acct-action); }
.account-setting-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.account-setting-copy { flex: 1 1 auto; min-width: 0; }
.account-setting-copy h3 { margin: 0; color: var(--acct-ink); font-size: 16px; font-weight: 800; line-height: 1.4; }
.account-setting-copy p { margin: 2px 0 0; color: var(--acct-muted); font-size: 14px; line-height: 1.5; }
.account-setting-row > .site-button { flex: 0 0 auto; }
.account-session.account-setting-row { margin-top: 0; padding-top: 14px; border-top-color: var(--acct-line); }
.account-passkeys.account-setting-row { display: block; margin: 0; }
.account-passkeys > summary { color: var(--acct-muted); font-size: 14px; font-weight: 700; min-height: 40px; display: flex; align-items: center; }
.account-passkeys[open] > summary { margin-bottom: 10px; }
.account-passkeys h3 { margin: 0; color: var(--acct-ink); font-size: 16px; font-weight: 800; }
.account-passkeys .account-section-intro { margin-bottom: 14px; font-size: 14px; }
.owner-passkey-badge { color: #7a4a0c; background: #fbf1e2; border-radius: 999px; font-weight: 800; }

/* Signed-in browsers: a picture for phone or computer, the name, its badges and the sign-in time. */
.account-devices { margin: 0; }
.device-count { color: var(--acct-action); background: var(--acct-mint); font-size: 13px; font-weight: 800; }
.device-list { gap: 0; }
.device-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px 16px; padding: 14px 0; border-top-color: var(--acct-line); }
.device-row::before { content: ""; grid-column: 1; grid-row: 1; align-self: start; width: 44px; height: 44px; border-radius: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23155f69' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='11' rx='2'/%3E%3Cpath d='M2 19h20'/%3E%3C/svg%3E") center / 22px no-repeat, var(--acct-mint); }
.device-row[data-kind=phone]::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23155f69' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2.5' width='10' height='19' rx='2.5'/%3E%3Cpath d='M11 18.5h2'/%3E%3C/svg%3E") center / 22px no-repeat, var(--acct-mint); }
.device-row[data-current=true]::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='11' rx='2'/%3E%3Cpath d='M2 19h20'/%3E%3C/svg%3E") center / 22px no-repeat, var(--acct-action); }
.device-row[data-current=true][data-kind=phone]::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2.5' width='10' height='19' rx='2.5'/%3E%3Cpath d='M11 18.5h2'/%3E%3C/svg%3E") center / 22px no-repeat, var(--acct-action); }
.device-row-info { grid-column: 2; }
.device-row-actions { grid-column: 3; gap: 4px; }
.device-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; }
.device-title[hidden], .device-editor[hidden], .device-row-actions[hidden] { display: none; }
.device-label { color: var(--acct-ink); font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.device-current { margin: 0; padding: 2px 9px; border-radius: 999px; color: var(--acct-action); background: var(--acct-mint-2); font-size: 12px; font-weight: 800; }
.device-current.device-next { color: #7a4a0c; background: #fbf1e2; cursor: help; }
.device-dates { margin: 3px 0 0; font-size: 14px; }
.device-editor { display: grid; gap: 6px; max-width: 460px; }
.device-name-label { margin: 0; color: var(--acct-ink); font-weight: 700; }
.device-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 2px; }
.account-page .device-name { max-width: none; border-color: #b9cbc6; border-radius: 10px; }
.account-page .device-row-actions .site-button { min-height: 44px; padding: 6px 12px; border-color: transparent; background: transparent; color: var(--acct-action); font-weight: 800; }
.account-page .device-row-actions .site-button:hover { background: var(--acct-mint); border-color: transparent; }
.account-page .device-row-actions .device-remove { color: #8d3039; }
.account-page .device-row-actions .device-remove:hover { background: #fff5f5; }
.device-gate { border-color: #c7ddd5; background: #eef6f2; }
.device-gate > p { color: #22545c; }

/* Signed out: the owner's phone sign-in is a small link under the form, not a second big button. */
.owner-phone-login { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--acct-line); text-align: center; }
.owner-phone-login .owner-phone-divider { display: none; }
.account-page .owner-phone-login .owner-phone-button { width: auto; min-height: 44px; margin: 0 auto; padding: 6px 12px; border-color: transparent; background: transparent; color: var(--acct-muted); font-size: 13px; font-weight: 700; }
.account-page .owner-phone-login .owner-phone-button:hover { color: var(--acct-action); background: var(--acct-mint); border-color: transparent; }
.owner-phone-button svg { width: 17px; height: 17px; }
.owner-passkey-note { color: var(--acct-muted); }

/* Signed out: two small, original previews of ClassPlay games above the explanation. */
.account-explainer h2 { margin-top: 0; }
.account-explainer > p { color: #3e5866; }
.account-explainer ul { color: #2c4a55; }
.account-explainer li::before { color: var(--acct-teal); }
.account-explainer .account-data-note { color: var(--acct-muted); border-top-color: #d3ddd8; }
.account-game-previews { display: flex; gap: 14px; align-items: flex-end; margin: 4px 0 28px; }
.account-preview { flex: 1 1 0; min-width: 0; padding: 14px; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px #163d5014; }
.account-preview-maze { transform: rotate(-3deg); }
.account-preview-talk { transform: rotate(3deg); padding: 14px 16px 18px; }
.account-preview-name { display: block; margin: 0 0 8px; color: var(--acct-teal); font-size: 12px; font-weight: 900; }
.account-preview-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; font: 800 15px/28px "ClassPlay Display", "ClassPlay Round", Arial, sans-serif; text-align: center; }
.account-preview-grid > * { border-radius: 6px; background: var(--acct-mint-2); color: var(--acct-ink); font-style: normal; font-weight: 800; }
.account-preview-grid > b { background: var(--acct-action); color: #fff; }
.account-preview-grid > em { background: #f2c861; }
.account-preview-talk strong { display: block; color: var(--acct-ink); font: 800 18px/1.3 "ClassPlay Display", "ClassPlay Round", "PingFang SC", "Microsoft YaHei", sans-serif; }
.account-preview-talk small { display: block; margin-top: 10px; color: var(--acct-muted); font-size: 12px; }

/* The phone sign-in window says what it is and shows where the sign-in has got to. */
.owner-qr-pane { width: min(368px, calc(100vw - 32px)); padding: 26px 24px 22px; text-align: left; color: var(--acct-ink); }
.owner-qr-title { margin: 0 44px 4px 0; color: var(--acct-ink); font: 800 22px/1.3 "ClassPlay Round", "PingFang SC", "Microsoft YaHei", Arial, sans-serif; }
.owner-qr-hint { margin: 0 0 14px; color: var(--acct-muted); font-size: 14px; line-height: 1.5; }
.owner-qr-pick { margin: 14px 0 0; color: var(--acct-muted); font-size: 14px; line-height: 1.5; text-align: center; }
.owner-qr-pick strong { display: block; margin-top: 2px; color: var(--acct-ink); font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
/* A compact code: about 200px, still easy for a phone camera or WeChat to scan from a desk. */
.owner-qr-surface { box-sizing: border-box; width: min(224px, 100%); margin: 4px auto 0; padding: 10px; border: 1px solid var(--acct-line); border-radius: 14px; }
.owner-qr-pane .owner-qr-status:not([data-kind=error]) { position: relative; width: auto; height: auto; margin: 14px 0 0; padding: 10px 14px 10px 34px; overflow: visible; clip-path: none; white-space: normal; border: 0; border-radius: 12px; background: var(--acct-mint); color: #22545c; font-size: 14px; line-height: 1.5; text-align: left; }
.owner-qr-pane .owner-qr-status:not([data-kind=error])::before { content: ""; position: absolute; left: 14px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: var(--acct-teal); box-shadow: 0 0 0 4px #087b7226; }
.owner-qr-pane .owner-qr-recovery { margin-top: 14px; }
.owner-qr-close:hover { background: var(--acct-mint); color: var(--acct-action); }
@media (prefers-reduced-motion: no-preference) {
  .owner-qr-pane .owner-qr-status:not([data-kind=error])::before { animation: owner-qr-wait 1.6s ease-in-out infinite; }
}
@keyframes owner-qr-wait { 50% { box-shadow: 0 0 0 7px #087b7210; } }
@media (prefers-reduced-motion: reduce) { .membership-meter span { transition: none; } }

@media (max-width: 860px) {
  .account-library-link { margin-left: 84px; }
}
@media (max-width: 700px) {
  .account-avatar { width: 52px; height: 52px; font-size: 24px; }
  .account-user-summary strong { font-size: 21px; }
  .account-user-copy { flex-basis: calc(100% - 76px); }
  .account-library-link { margin-left: 0; }
  .account-cards { gap: 18px; }
  .account-game-previews { display: none; }
  .membership-buy { padding: 16px; }
}
@media (max-width: 600px) {
  .device-row { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 12px; }
  .device-row::before { width: 40px; height: 40px; }
  .device-row-actions { grid-column: 2; justify-content: flex-start; margin-left: -12px; }
}
@media (max-width: 480px) {
  .account-setting-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 10px; align-items: start; }
  .account-setting-row > .site-button { grid-column: 2; justify-self: start; }
}

/* 5.96 — No empty column. Membership and Sign-in & security share the first row; the browsers card runs full width
   below, or, while a free teacher's buying panel makes Membership tall, fills the column beside it. js/account-billing.js
   sets data-layout. The settings grid dissolves into this grid, so the browsers card can stay outside it for the
   browser check (which hides the settings but keeps the browsers card). */
.account-cards { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 22px; align-items: stretch; }
.account-cards .account-section { margin: 0; }
.account-cards > .account-overview > .account-membership { grid-column: 1; grid-row: 1; }
.account-cards > .account-overview > .account-security { grid-column: 2; grid-row: 1; }
.account-cards > .account-devices { grid-column: 1 / -1; grid-row: 2; }
.account-cards[data-layout=buying] { grid-template-rows: auto 1fr; }
.account-cards[data-layout=buying] > .account-overview > .account-membership { grid-row: 1 / span 2; }
.account-cards[data-layout=buying] > .account-overview > .account-security { align-self: start; }
.account-cards[data-layout=buying] > .account-devices { grid-column: 2; grid-row: 2; align-self: start; }
.account-cards:has(> .account-overview[hidden]) { display: block; }
/* In the narrower column, each browser's buttons go under its name. */
.account-cards[data-layout=buying] .device-row { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; }
.account-cards[data-layout=buying] .device-row::before { width: 40px; height: 40px; }
.account-cards[data-layout=buying] .device-row-actions { grid-column: 2; justify-content: flex-start; margin-left: -12px; }
.account-cards[data-layout=buying] .account-devices .account-section-intro { font-size: 14px; }
@media (max-width: 860px) {
  .account-cards, .account-cards[data-layout=buying] { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .account-cards > .account-overview > .account-membership, .account-cards > .account-overview > .account-security, .account-cards > .account-devices,
  .account-cards[data-layout=buying] > .account-overview > .account-membership, .account-cards[data-layout=buying] > .account-overview > .account-security, .account-cards[data-layout=buying] > .account-devices { grid-column: 1; grid-row: auto; align-self: stretch; }
}

/* Teachers with full access: one quiet "Extend access" line (plan switch + Pay); the WeChat code waits in a window. */
.membership-buy[data-mode=quiet] { margin-top: 6px; padding: 16px 0 0; border-top: 1px solid var(--acct-line); border-radius: 0; background: transparent; }
.membership-buy[data-mode=quiet] .buy-choose:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.membership-buy[data-mode=quiet] .buy-head { flex: 1 1 100%; min-width: 0; }
.membership-buy[data-mode=quiet] .buy-title { margin: 0; font-size: 16px; }
.membership-buy[data-mode=quiet] .buy-intro { margin: 2px 0 0; color: var(--acct-muted); font-size: 14px; }
.membership-buy[data-mode=quiet] .buy-plans { display: flex; gap: 0; margin: 0; padding: 3px; border: 1px solid #c5d6d3; border-radius: 11px; background: #f4f6f0; }
.membership-buy[data-mode=quiet] .buy-plan { position: relative; display: flex; align-items: center; gap: 5px; min-height: 38px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; }
.membership-buy[data-mode=quiet] .buy-plan input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.membership-buy[data-mode=quiet] .buy-plan:has(input:checked) { background: #fff; box-shadow: 0 1px 3px #163d5026; }
.membership-buy[data-mode=quiet] .buy-plan:focus-within { outline: 0; }
.membership-buy[data-mode=quiet] .buy-plan:has(input:focus-visible) { outline: 3px solid var(--acct-action); outline-offset: 1px; }
.membership-buy[data-mode=quiet] .buy-plan-name { color: #3e5866; font-size: 14px; font-weight: 700; }
.membership-buy[data-mode=quiet] .buy-plan-price { color: #3e5866; font-family: inherit; font-size: 14px; font-weight: 800; }
.membership-buy[data-mode=quiet] .buy-plan:has(input:checked) :is(.buy-plan-name, .buy-plan-price) { color: var(--acct-action); }
.membership-buy[data-mode=quiet] .buy-plan-note { display: none; }
.membership-buy[data-mode=quiet] .buy-reminder { margin: 0 0 12px; }
.account-page .membership-buy .buy-open:not(.primary) { color: var(--acct-action); border-color: var(--acct-action); background: #fff; }
.account-page .membership-buy .buy-open:not(.primary):hover { background: var(--acct-mint); }
.buy-open[hidden], .redeem-toggle[hidden] { display: none; }
.membership-buy[data-mode=quiet] .buy-choose > .buy-details { display: none; }
.account-membership[data-buy=quiet]:not([data-code=open]) > .account-redeem-form { display: none; }
.redeem-toggle { align-self: flex-start; min-height: 40px; margin-top: 8px; padding: 0; font-size: 14px; font-weight: 700; }

/* The payment window: the WeChat code, its steps and the code box, for the plan chosen on the page. */
.buy-dialog { width: min(640px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 48px); box-sizing: border-box; padding: 28px 30px 26px; border: 0; border-radius: 20px; background: #fff; color: var(--acct-ink, #173b43); box-shadow: 0 24px 70px rgba(11, 31, 36, .35); overflow: auto; }
.buy-dialog[hidden] { display: none; }
.buy-dialog::backdrop { background: rgba(11, 31, 36, .55); }
.buy-dialog-head { padding-right: 44px; }
.buy-dialog-head h2 { margin: 0; color: #173b43; font-size: 23px; line-height: 1.3; font-weight: 800; }
.buy-dialog-head p { margin: 4px 0 0; color: #526976; font-size: 14px; line-height: 1.5; }
.buy-dialog-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #526976; cursor: pointer; }
.buy-dialog-close:hover { background: #eef3e8; color: #155f69; }
.buy-dialog-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.buy-dialog-body { margin-top: 18px; }
.buy-dialog-body .buy-details { display: block; }
.buy-dialog-body .buy-qr:not([hidden]) { width: auto; margin: 14px 0 0; padding: 0; border: 0; }
.buy-dialog-body .buy-qr img { width: 112px; height: 112px; }
@media (min-width: 700px) and (min-height: 500px), (min-width: 700px) and (pointer: fine), (min-width: 960px) { .buy-dialog-body .buy-qr:not([hidden]) { margin: 0; } .buy-dialog-body .buy-qr img { width: 168px; height: 168px; } }
.buy-dialog-body .buy-qr figcaption { max-width: none; }
.buy-dialog-body .account-redeem-form { margin: 18px 0 0; padding-top: 18px; border-top: 1px solid #dfe6dc; }
/* The code box is right below in the window, and its heading already says the pass does not renew. */
.buy-dialog-body .buy-qr-paid, .buy-dialog-body .buy-note { display: none; }
.buy-dialog-body .buy-links { margin-top: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .buy-dialog[open] { animation: buy-dialog-in .24s cubic-bezier(.2, .8, .3, 1); }
}
@keyframes buy-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@media (max-width: 560px) {
  .buy-dialog { padding: 22px 18px 20px; }
  .membership-buy[data-mode=quiet] .buy-plans { flex: 1 1 100%; }
  .membership-buy[data-mode=quiet] .buy-plan { flex: 1 1 0; justify-content: center; }
  .membership-buy[data-mode=quiet] .buy-open { flex: 1 1 100%; }
}
@media (min-width: 700px) and (min-height: 500px), (min-width: 700px) and (pointer: fine), (min-width: 960px) { .buy-details:has(> .buy-qr:not([hidden])) #buyShop { display: none; } }

/* AI credits block inside the Membership card (js/account-ai-credits.js). */
.account-ai-credits { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--acct-line); border-radius: 14px; background: #f8faf5; }
.ai-credits-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.ai-credits-head h3 { margin: 0; color: var(--acct-ink); font-size: 16px; font-weight: 800; line-height: 1.3; }
.ai-credits-badge { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--acct-action); background: var(--acct-mint-2); border: 1px solid #c5d6d3; }
.ai-credits-badge[data-state=low] { color: #8c5210; background: #fff5e3; border-color: #e9cfa0; }
.ai-credits-badge[data-state=empty] { color: #8d3039; background: #fff3f3; border-color: #e8bcc2; }
.ai-credits-meter { margin: 0 0 8px; }
.ai-credits-meta, .ai-credits-bonus { margin: 4px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--acct-muted); }
.ai-credits-bonus { color: var(--acct-action); font-weight: 700; }
.ai-credits-guide { margin-top: 10px; padding-top: 8px; border-top: 1px solid #e3ebe2; }
.ai-credits-guide > summary { color: var(--acct-action); font-size: 13.5px; font-weight: 700; cursor: pointer; list-style-position: outside; margin-left: 16px; }
.ai-credits-guide > summary:hover { text-decoration: underline; }
.ai-credits-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ai-credits-list li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13px; line-height: 1.5; color: #3e5866; }
.ai-credits-list strong { color: var(--acct-ink); font-weight: 800; }
@media (max-width: 520px) { .ai-credits-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
/* 5.266.0: the balance in three parts, what an earlier credit already covers, and this cycle's AI use. */
.ai-credits-stats { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 0 0 10px; }
.ai-credits-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid #e0e9df; border-radius: 12px; background: #fff; }
.ai-credits-stat strong { color: var(--acct-ink); font-size: 20px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ai-credits-stat-main strong { color: var(--acct-action); font-size: 26px; }
.ai-credits-stats[data-state=low] .ai-credits-stat-main strong { color: #8c5210; }
.ai-credits-stats[data-state=empty] .ai-credits-stat-main strong { color: #8d3039; }
.ai-credits-stat span { color: var(--acct-muted); font-size: 12.5px; line-height: 1.4; }
.ai-credits-meta[data-state=stop] { color: #8d3039; font-weight: 700; }
.ai-credits-paid { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: #3e5866; }
.ai-credits-safe { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--acct-muted); }
.ai-credits-history { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #d5e0d4; }
.ai-credits-history h4 { margin: 0 0 4px; color: var(--acct-ink); font-size: 14.5px; font-weight: 800; line-height: 1.35; }
.ai-credits-totals { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--acct-muted); }
.ai-credits-uses { margin: 0; padding: 0; list-style: none; border: 1px solid #e3ebe2; border-radius: 12px; background: #fff; overflow: hidden; }
.ai-credits-uses li { display: grid; grid-template-columns: 124px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 7px 12px; font-size: 13px; line-height: 1.45; color: #3e5866; }
.ai-credits-uses li + li { border-top: 1px solid #eef3ed; }
.ai-credits-uses time { color: var(--acct-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ai-credits-uses b { color: var(--acct-ink); font-weight: 800; white-space: nowrap; }
.ai-credits-uses b[data-free=true] { color: var(--acct-action); font-weight: 700; }
.ai-credits-more { margin-top: 8px; padding: 2px 0; border: 0; background: none; color: var(--acct-action); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.ai-credits-more:hover { text-decoration: underline; }
@media (max-width: 520px) {
  .ai-credits-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ai-credits-stat-main { grid-column: 1 / -1; }
  .ai-credits-uses li { grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; }
  .ai-credits-uses time { grid-column: 1 / -1; font-size: 12px; }
}

/* Source: css/code-guide.css */
/* "Where do I find the code?" (js/code-guide.js): the button that opens it, and the window with three pictures. */
.code-guide-link { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 13px; border: 1px solid #b9d3dc; border-radius: 999px; background: #f3f9fb; color: #155f69; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer; }
.code-guide-link::before { content: "?"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #155f69; color: #fff; font-size: 12px; font-weight: 800; }
.code-guide-link:hover { border-color: #155f69; background: #e7f3f6; }
.code-guide-link:focus-visible { outline: 3px solid #8cc8ef; outline-offset: 2px; }

.code-guide { width: min(860px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 24px); margin: auto; padding: 22px 24px 20px; overflow: auto; border: 0; border-radius: 20px; background: #fff; color: #173246; box-shadow: 0 24px 64px rgba(16, 40, 60, .3); }
.code-guide[hidden] { display: none; }
.code-guide::backdrop { background: rgba(16, 32, 44, .5); }
.code-guide-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.code-guide-head h2 { margin: 0; color: #173246; font-size: 22px; line-height: 1.3; }
.code-guide-x { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f0f4f6; color: #3d5868; font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.code-guide-x:hover { background: #e3eaee; }
.code-guide-intro { margin: 6px 0 16px; color: #3d5868; font-size: 15px; line-height: 1.55; }
.code-guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.code-guide-step { position: relative; padding: 12px 12px 14px; border: 1px solid #e1e9ee; border-radius: 16px; background: #f8fbfc; text-align: center; }
.code-guide-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #155f69; color: #fff; font-size: 12.5px; font-weight: 800; }
.code-guide-step:last-child .code-guide-badge { background: #2e9e62; }
.code-guide-step h3 { margin: 6px 0 4px; color: #173246; font-size: 16px; }
.code-guide-step p { margin: 0; color: #3d5868; font-size: 13.5px; line-height: 1.55; }
.code-guide-art { display: block; width: 100%; max-width: 210px; height: auto; margin: 8px auto 2px; font-family: inherit; }
.code-guide-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.code-guide-done { min-height: 40px; padding: 9px 22px; border: 0; border-radius: 10px; background: #155f69; color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.code-guide-done:hover { background: #10505a; }
.code-guide-done:focus-visible, .code-guide-x:focus-visible { outline: 3px solid #8cc8ef; outline-offset: 2px; }
@media (max-width: 700px) {
  .code-guide { padding: 18px 16px 16px; }
  .code-guide-steps { grid-template-columns: 1fr; }
  .code-guide-step { display: grid; grid-template-columns: 116px 1fr; grid-template-rows: auto auto 1fr; grid-template-areas: "art badge" "art title" "art text"; align-items: start; column-gap: 14px; text-align: left; }
  .code-guide-step .code-guide-badge { grid-area: badge; justify-self: start; align-self: start; margin-top: 4px; }
  .code-guide-step .code-guide-art { grid-area: art; width: 116px; margin: 0; align-self: center; }
  .code-guide-step h3 { grid-area: title; }
  .code-guide-step p { grid-area: text; }
  .code-guide-actions .code-guide-done { width: 100%; }
}

/* The pictures. */
.code-guide-art text { font-size: 9px; fill: #3d5868; }
.code-guide-art .cg-phone { fill: #fff; stroke: #c9d6de; stroke-width: 2; }
.code-guide-art .cg-screen { fill: #f2f5f7; }
.code-guide-art .cg-bar { fill: #fff; }
.code-guide-art .cg-bar-text { font-size: 10px; font-weight: 700; fill: #22323a; text-anchor: middle; }
.code-guide-art .cg-status { font-size: 8.5px; font-weight: 700; fill: #2e9e62; }
.code-guide-art .cg-card { fill: #fff; stroke: #e0e7eb; }
.code-guide-art .cg-thumb { fill: #e3f1ec; }
.code-guide-art .cg-thumb-text { font-size: 10px; font-weight: 800; fill: #155f69; text-anchor: middle; }
.code-guide-art .cg-line { font-size: 8.5px; fill: #22323a; }
.code-guide-art .cg-price { font-size: 9.5px; font-weight: 800; fill: #d6453a; }
.code-guide-art .cg-weidian-button { fill: #fff; stroke: #e0574b; stroke-width: 1.4; }
.code-guide-art .cg-weidian-button-text { font-size: 9.5px; font-weight: 700; fill: #e0574b; text-anchor: middle; }
.code-guide-art .cg-small { font-size: 8px; fill: #7a8b94; }
.code-guide-art .cg-center { text-anchor: middle; }
.code-guide-art .cg-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px; font-weight: 700; fill: #10282c; }
.code-guide-art .cg-code-input { font-size: 8.5px; }
.code-guide-art .cg-copy { fill: #155f69; }
.code-guide-art .cg-copy-text { font-size: 8.5px; font-weight: 700; fill: #fff; text-anchor: middle; }
.code-guide-art .cg-menu { fill: #2b3238; }
.code-guide-art .cg-menu-text { font-size: 9px; fill: #b8c2c8; text-anchor: middle; }
.code-guide-art .cg-menu-on { font-weight: 800; fill: #fff; }
.code-guide-art .cg-bubble { fill: #e6ebee; }
.code-guide-art .cg-select { fill: rgba(61, 141, 247, .2); stroke: #3d8df7; stroke-width: 1.2; }
.code-guide-art .cg-handle { fill: #3d8df7; }
.code-guide-art .cg-text { fill: #b9c4cb; }
.code-guide-art .cg-chip { fill: #fff4dc; stroke: #f0a81a; }
.code-guide-art .cg-chip-text { font-size: 9px; font-weight: 800; fill: #9a6200; text-anchor: middle; }
.code-guide-art .cg-label { font-size: 9px; font-weight: 700; fill: #22323a; }
.code-guide-art .cg-input { fill: #fff; stroke: #155f69; stroke-width: 1.6; }
.code-guide-art .cg-found { font-size: 8.5px; font-weight: 700; fill: #2e9e62; }
.code-guide-art .cg-redeem { fill: #155f69; }
.code-guide-art .cg-redeem-text { font-size: 10px; font-weight: 700; fill: #fff; text-anchor: middle; }
.code-guide-art .cg-done { fill: #e7f6ee; stroke: #2e9e62; stroke-width: 2; }
.code-guide-art .cg-done-check { fill: none; stroke: #2e9e62; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.code-guide-art .cg-done-text { font-size: 11px; font-weight: 800; fill: #2e9e62; text-anchor: middle; }
.code-guide-art .cg-arrow { fill: none; stroke: #9aaab3; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.code-guide-art .cg-ring { fill: none; stroke: #f0a81a; stroke-width: 2.5; }
.code-guide-art .cg-tap { fill: rgba(16, 40, 44, .16); stroke: rgba(16, 40, 44, .45); stroke-width: 1.2; }
@media (prefers-reduced-motion: no-preference) {
  .code-guide[open] .cg-ring { animation: cg-ring 1.6s ease-in-out infinite; }
  .code-guide[open] .cg-tap { animation: cg-tap 1.6s ease-in-out infinite; }
}
@keyframes cg-ring { 50% { stroke-opacity: .35; } }
@keyframes cg-tap { 50% { transform: scale(.82); opacity: .6; } }
.code-guide-art .cg-tap { transform-box: fill-box; transform-origin: center; }

/* Source: css/quality.css */
/* Phones must not enlarge text on their own: sizes stay the same on every page and orientation. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
/* ClassPlay's teacher surfaces. Game scenery and authored content keep their own styles. */
:root {
  --cp-ink: #173b43;
  --cp-muted: #526976;
  --cp-action: #155f69;
  --cp-action-hover: #114e57;
  --cp-teal: #087b72;
  --cp-line: #dfe6dc;
  --cp-paper: #fff;
  --cp-radius: 14px;
  --cp-shadow: 0 4px 20px #163d5010;
}
body.site-page:not(.welcome-page), body.resource-page {
  min-height: 100dvh;
  background: radial-gradient(ellipse at 8% 0%, #e7f4ef 0, transparent 46%) no-repeat, #f7f6ef;
  color: var(--cp-ink);
  font-family: "ClassPlay Round", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
html:not([data-community=on]) [data-classroom-nav=community] { display: none !important; }
.site-page .site-header, .resource-page .site-header { background: #fffdf9; border-bottom: 1px solid var(--cp-line); }
.site-header .site-header-inner { box-sizing: border-box; min-height: 72px; gap: 22px; padding: 10px 28px; }
.site-header .site-brand { color: var(--cp-ink); gap: 9px; font-size: 26px; letter-spacing: -.9px; text-decoration: none; }
.site-logo { position: relative; display: block; width: 33px; height: 33px; flex: 0 0 33px; transform: none; }
.site-logo i { position: absolute; display: block; width: 17px; height: 27px; left: 5px; bottom: 3px; opacity: 1; border-radius: 5px 5px 2px 5px; transform-origin: 8px 24px; background: var(--cp-teal); }
.site-logo i:nth-child(1) { transform: rotate(-30deg); background: #a6d9c6; }
.site-logo i:nth-child(2) { transform: rotate(-9deg); background: #eeb697; }
.site-logo i:nth-child(3) { transform: rotate(14deg); background: #247d74; }
.site-logo i:nth-child(4) { width: 8px; height: 9px; left: 12px; bottom: 13px; border-radius: 0; background: #f2c861; clip-path: polygon(0 0,100% 50%,0 100%); transform: rotate(14deg); }
.site-header .site-nav { align-items: center; gap: 8px; }
.site-header .site-nav a, .resource-page .site-header nav a {
  box-sizing: border-box; min-height: 44px; padding: 10px 13px; border: 0; border-radius: 9px; text-decoration: none;
  font: 700 14px/1.35 "ClassPlay Round", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--cp-muted); white-space: nowrap;
}
.site-header .site-nav a:hover { color: var(--cp-action); background: #eef3e8; }
.site-header .site-nav a[aria-current] { color: var(--cp-action); background: #e6efe9; }
.site-page .site-button, .resource-page .site-button {
  min-height: 44px; padding: 10px 16px; border-radius: 9px; border-color: #c5d6d3; text-decoration: none;
  background: #fff; color: var(--cp-ink); font-size: 14px; font-weight: 700; line-height: 1.3;
  transition: background .16s, border-color .16s, box-shadow .16s;
}
.site-page .site-button:hover:not(:disabled), .resource-page .site-button:hover:not(:disabled) { background: #eef3e8; border-color: #8fb3a6; }
.site-page:not(.welcome-page) .site-button.primary, .resource-page .site-button.primary,
.resource-page .resource-primary, .resource-page .site-header .site-create {
  color: #fff !important; background: var(--cp-action) !important; border-color: var(--cp-action) !important;
  border-radius: 9px; box-shadow: 0 3px 8px #155f691c;
}
.site-page:not(.welcome-page) .site-button.primary:hover:not(:disabled), .resource-page .site-button.primary:hover:not(:disabled),
.resource-page .resource-primary:hover:not(:disabled) { background: var(--cp-action-hover) !important; border-color: var(--cp-action-hover) !important; }
.site-page :is(button, a, input, select, textarea, summary):focus-visible,
.resource-page :is(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid #155f69; outline-offset: 3px; }
.site-page .site-input, .site-page .site-select { height: 44px; border-color: #c5d6d3; border-radius: 9px; font-size: 15px; }
.site-page .site-input::placeholder { color: #637581; opacity: 1; }
.site-page .site-input:focus, .site-page .site-select:focus { border-color: var(--cp-action); box-shadow: 0 0 0 3px #155f6918; }
.cp-account-nav .cp-account-button, .cp-account-nav .cp-account-signin { min-height: 44px; border-radius: 10px; font-size: 14px; }
.cp-account-nav .cp-account-avatar { border-radius: 8px; background: var(--cp-action); }
.cp-account-nav .cp-account-menu, .lib-context-menu { border-color: var(--cp-line); border-radius: 12px; padding: 6px; box-shadow: 0 10px 30px #15374724; }
.cp-account-nav .cp-account-menu button, .lib-context-menu button { min-height: 44px; border-radius: 7px; }
.site-header :is(.cp-language-switch, .account-language, .admin-language) { border-radius: 9px; border-color: #c5d6d3; }
.site-header :is(.cp-language-switch, .account-language, .admin-language) button { min-height: 40px; min-width: 42px; font-size: 13px; }
.site-header :is(.cp-language-switch, .account-language, .admin-language) button[aria-pressed=true] { background: #e6efe9; color: var(--cp-action); font-weight: 800; }
.site-page .site-footer { color: var(--cp-muted); font-size: 12px; padding: 24px 20px 28px; }
.site-page .site-dialog { border: 1px solid var(--cp-line); border-radius: 18px; padding: 28px; }
.site-page .site-dialog h2 { color: var(--cp-ink); font-weight: 800; }
.site-page .site-dialog::backdrop { background: #102d4963; }
.site-page .cloud-status { border-radius: 12px; font-size: 14px; padding: 12px 16px; }
.cloud-status .cloud-action { min-height: 40px; padding: 8px 12px; border-radius: 7px; }

/* A calm, legible workbench with the owner's folder colours preserved. */
.activity-library-page .site-main { margin-top: 28px; max-width: 1280px; }
.activity-library-page .library-page .library-heading { border-radius: var(--cp-radius); padding: 26px 28px; box-shadow: var(--cp-shadow); align-items: center; }
.activity-library-page .library-page h1 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; color: var(--cp-ink); letter-spacing: -.7px; }
.activity-library-page .library-page .library-tools .site-button { min-height: 44px; border-radius: 9px; border-color: #c5d6d3; color: var(--cp-ink); }
.activity-library-page .library-page .library-search .site-input { height: 44px; border-radius: 9px 0 0 9px; font-size: 15px; }
.activity-library-page .library-page .library-search .site-button { border-radius: 0 9px 9px 0; }
.activity-library-page .library-page .library-view-controls .site-button { min-width: 44px; }
.activity-library-page .library-page .library-view-controls .site-button:first-child { border-radius: 9px 0 0 9px; }
.activity-library-page .library-page .library-view-controls .site-button:last-child { border-radius: 0 9px 9px 0; }
.activity-library-page .library-page .library-view-controls .site-button[aria-pressed=true] { background: #e6efe9; color: var(--cp-action); box-shadow: inset 0 -3px var(--cp-action); }
.activity-library-page .library-page .library-body { margin-top: 18px; padding: 20px 28px 32px; border-radius: var(--cp-radius); box-shadow: var(--cp-shadow); }
.activity-library-page .library-page .library-order-row { gap: 16px; flex-wrap: wrap; font-size: 14px; padding-bottom: 16px; }
.activity-library-page .library-page .library-order-row button { min-height: 40px; padding: 8px 10px; border-radius: 8px; color: var(--cp-muted); }
.activity-library-page .library-page .library-order-row button[aria-pressed=true] { color: var(--cp-action); background: #eef3e8; }
.activity-library-page .library-count { margin: 0 auto 0 0; color: var(--cp-muted); font-size: 13px; line-height: 1.5; }
.activity-library-page .library-page .library-list { gap: 22px 20px; }
.activity-library-page .lib-folder .folder-shape { width: 100%; min-width: 0; aspect-ratio: auto; height: 128px; min-height: 0; }
.activity-library-page .folder-back { border-radius: 9px 13px 12px 12px; }
.activity-library-page .folder-front { border-radius: 9px 9px 12px 12px; box-shadow: inset 0 1px #ffffff45, 0 2px 6px #1537470a; }
.activity-library-page .lib-folder-link { transition: transform .2s ease; }
.activity-library-page .lib-folder-link:hover { transform: translateY(-4px); }
.activity-library-page .lib-folder .lib-name { font-size: 17px; line-height: 1.35; }
.activity-library-page .lib-folder .lib-sub { font-size: 13px; color: #173b43; }
.activity-library-page .lib-activity { border-color: var(--cp-line); border-radius: 12px; overflow: hidden; box-shadow: 0 3px 9px #15374709; transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.activity-library-page .lib-activity:hover { transform: translateY(-3px); box-shadow: 0 8px 22px #15374716; border-color: #9dbcae; }
.activity-library-page .lib-thumb { border-bottom-color: var(--cp-line); }
.activity-library-page .lib-info { min-height: 92px; padding: 13px 58px 14px 14px; gap: 7px; }
.activity-library-page .lib-activity .lib-name { font-size: 15px; line-height: 1.35; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.activity-library-page .lib-activity .lib-sub { color: var(--cp-muted); font-size: 13px; }
.activity-library-page .lib-menu-button { width: 44px; height: 44px; border-radius: 8px; border-color: #b5c7bf; }
.activity-library-page .lib-activity .lib-menu-button { bottom: 14px; right: 10px; }
.activity-library-page .library-list[data-view=small] .folder-shape { height: 112px; min-height: 0; }
.activity-library-page .library-list[data-view=small] .lib-info { min-height: 88px; padding-right: 54px; }
.activity-library-page .library-list[data-view=small] .lib-menu-button { width: 40px; height: 40px; }
.activity-library-page .library-list[data-view=small] .lib-folder .lib-name { font-size: 14px; }
.activity-library-page .library-list[data-view=small] .lib-folder .lib-sub { font-size: 12px; }
.activity-library-page .library-list[data-view=small] .folder-front { padding-right: 48px; }
.site-page .template-card { border-color: var(--cp-line); border-radius: 12px; box-shadow: 0 3px 9px #15374709; }
.site-page .template-card:hover { border-color: #9dbcae; box-shadow: 0 7px 20px #15374712; }
.site-page .template-copy h2 { color: var(--cp-ink); font-weight: 800; }
.site-page .template-copy p { color: var(--cp-muted); }
.site-page .picker-toolbar { padding-top: 28px; }
.site-page .picker-steps h1 { font-weight: 800; color: var(--cp-ink); }

/* Authoring uses the same type and controls; learning content itself is untouched. */
.site-page.editor-page :is(button, input, textarea, select) { font-family: inherit; }
.site-page.editor-page .editor-main, .site-page.editor-page .editor-sheet { background: #fffdf9; border: 1px solid var(--cp-line); border-radius: 18px; box-shadow: var(--cp-shadow); }
.editor-page .item-panel, .editor-page .group-editor { background: #f5f6ef; border: 1px solid #e3e8de; border-radius: 14px; padding: 16px; }
.editor-page .editor-input-box { border-color: #c5d6d3; border-radius: 8px; overflow: hidden; }
.editor-page .editor-input-box:focus-within { border-color: var(--cp-action); box-shadow: 0 0 0 3px #155f6916; }
.editor-page .field-media-btn { width: 44px; height: 44px; border-radius: 7px; }
.editor-page .field-media-btn:hover, .editor-page .field-media-btn.attached { color: var(--cp-action); background: #e6efe9; }
.editor-page #previewBtn { color: var(--cp-ink); }
.editor-page .answer-state { min-width: 36px; width: 36px; height: 36px; border-radius: 50%; border: 2px solid #c2d1ca; background: #fff; color: #738680; font-size: 16px; font-weight: 900; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.editor-page .answer-state:hover { border-color: #1e7a52; background: #edf6f0; color: #1e7a52; }
.editor-page .answer-correct .answer-state { background: #1e7a52; border-color: #1e7a52; color: #fff; box-shadow: 0 2px 0 #135337; }
.editor-page .answer-wrong .answer-state { background: #fff6f5; border-color: #e0bab6; color: #b54b43; }
.editor-page .editor-footer .editor-done { border-radius: 10px; min-height: 44px; font-weight: 800; }
.editor-page .answer-remove { width: 36px; height: 36px; min-width: 36px; display: grid; place-items: center; }
.editor-page .field-picture { background: #faf8f3; border-right: 1px solid #dfe6dc; padding: 5px 34px 5px 5px; min-height: 72px; box-sizing: border-box; gap: 4px; }
.editor-page .field-picture img { width: 72px; height: 62px; max-width: 100%; max-height: 62px; object-fit: contain; border-radius: 6px; background: #fff; }
.editor-page .field-picture button { width: 26px; height: 26px; min-width: 26px; min-height: 26px; top: 4px; right: 4px; padding: 0; display: grid; place-items: center; border-radius: 6px; background: #fff; border: 1px solid #d5e0da; color: #52696d; }
.editor-page .field-picture button:hover { background: #edf4ef; color: #155f69; border-color: #9dbcae; }
.editor-page .field-picture .adjust-picture { top: auto; bottom: 4px; right: 4px; font-size: 16px; color: #155f69; }
.editor-page .group-remove, .editor-page .group-image-button { min-width: 36px; min-height: 36px; }
.editor-page .add-content, .editor-page .add-answer { min-height: 44px; border-radius: 8px; color: var(--cp-action); }
.editor-page .field-format { border-radius: 7px; overflow: hidden; }
.site-page.account-page { min-height: 100dvh; background: radial-gradient(ellipse at 15% 5%, #e4f3ec, transparent 55%) no-repeat, #f7f6ef; }
.account-page .account-layout { box-shadow: 0 12px 45px #163d5010; border-color: var(--cp-line); }
.account-page .account-explainer { background: linear-gradient(155deg, #e6f3ef, #eef3ec); }
.resource-page .resource-info, .resource-page .resource-settings, .resource-page .resource-sidebar>section { border-radius: 12px; border-color: var(--cp-line); }
.resource-page .resource-info h1, .resource-page .resource-details h1 { font-family: "ClassPlay Round", "PingFang SC", "Microsoft YaHei", sans-serif; font-weight: 800; color: var(--cp-ink); }
.resource-page .resource-details, .resource-page .resource-options { border-radius: 16px; border-color: var(--cp-line); background: #fffdf9; box-shadow: 0 4px 20px #163d5008; }
.resource-page .resource-details { min-height: 0; padding: 18px 22px; align-items: center; }
.resource-page .resource-details > div:first-child { flex: 1 1 220px; min-width: 0; }
.resource-page .resource-details h1 { margin: 0 0 4px; font-size: clamp(20px, 2vw, 24px); line-height: 1.25; }
.resource-page .resource-actions { gap: 6px; }
.resource-page .resource-actions :is(a, button) { min-height: 40px; }
.resource-page .resource-actions a, .resource-page .resource-actions button:not(.resource-primary) { font: 700 13.5px/1.3 "ClassPlay Round", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--cp-action); padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.resource-page .resource-actions a:hover, .resource-page .resource-actions button:not(.resource-primary):hover { background: #eef3e8; }
.resource-page .resource-tabs { border-bottom-color: var(--cp-line); gap: 20px; }
.resource-page .resource-tabs button { font: 700 15px/1.3 "ClassPlay Round", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--cp-muted); }
.resource-page .resource-tabs [aria-selected=true] { border-bottom-color: var(--cp-action); color: var(--cp-action); font-weight: 800; }
.resource-page .resource-options > [role=tabpanel] > h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.resource-page #settingsBody { margin-top: 14px; }
.resource-page #leaderboardPanel { padding-top: 14px; }
.resource-page .setting-row input[type=range], .resource-page .setting-row input[type=checkbox] { accent-color: var(--cp-action); }
.resource-page .setting-row select { min-height: 40px; min-width: 170px; padding: 7px 10px; border-radius: 8px; border-color: #c5d6d3; font-family: inherit; color: var(--cp-ink); }
.resource-page .settings-actions button:not(.resource-primary) { min-height: 44px; padding: 10px 16px; border-radius: 9px; border: 1px solid #c5d6d3; background: #fff; color: var(--cp-ink); font: 700 14px/1.3 "ClassPlay Round", "PingFang SC", "Microsoft YaHei", sans-serif; }
.resource-page .settings-actions button:not(.resource-primary):hover { background: #eef3e8; border-color: #8fb3a6; }
.resource-page .resource-sidebar section[hidden] { display: none !important; }
.resource-page .resource-sidebar section:has(#visualStyles[hidden]) .font-label { margin-top: 0; }
.resource-page .font-label { color: var(--cp-muted); font-weight: 800; letter-spacing: .06em; }
.resource-page .resource-more-menu { border-radius: 12px; border-color: var(--cp-line); padding: 6px; box-shadow: 0 10px 30px #15374720; }
.resource-page .resource-actions .resource-more-menu button { border-radius: 7px; font: 600 14px/1.3 "ClassPlay Round", "PingFang SC", "Microsoft YaHei", sans-serif !important; color: var(--cp-ink) !important; }
.resource-page .resource-actions .resource-more-menu button:hover { background: #eef3e8; color: var(--cp-action) !important; }
.resource-page .resource-sidebar .template-switch { border-radius: 8px; }
.resource-page .resource-main>.activity-player { border-radius: 14px; box-shadow: 0 8px 28px #13364b1c; }
.resource-page .activity-player:fullscreen { border-radius: 0; }
#activityPlayer #gameStage :is(.pair-face-picture, .quiz-choice-content, .hm-clue-picture, .dt-picture, .fl-face .pair-face-picture) img,
#activityPlayer #gameStage #agImage { border-radius: 10px; }
@media(min-width:760px) {
  .resource-page .resource-details { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; }
  .resource-page .resource-details #imageCredits { grid-column: 1 / -1; width: auto; }
  .resource-page .resource-actions { flex-wrap: nowrap; flex-shrink: 0; }
  .resource-page #settingsBody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; align-items: center; }
  .resource-page #settingsBody > .set-sec,
  .resource-page #settingsBody > .setting-note { grid-column: 1 / -1; }
  .resource-page #settingsBody > .set-sec { margin-top: 6px; padding-top: 12px; }
  .resource-page #settingsBody > .set-sec:first-child { margin-top: 0; padding-top: 4px; }
  .resource-page #settingsBody > .setting-row { max-width: none; gap: 12px; justify-content: space-between; }
  .resource-page #settingsBody > .setting-row > label:first-child { width: auto; flex: 1 1 140px; }
  .resource-page #settingsBody > .setting-note { max-width: none; margin: 2px 0 8px; }
}

@media(max-width:1100px) {
  .site-header .site-header-inner { gap: 12px; padding-inline: 20px; flex-wrap: wrap; }
  .site-header .site-nav { gap: 3px; }
  .site-header .site-nav a { padding-inline: 9px; }
  .activity-library-page .library-page .library-tools { justify-content: flex-start; }
}
@media(max-width:760px) {
  .site-header .site-header-inner { min-height: 64px; padding: 12px 16px; gap: 10px; }
  .site-header .site-brand { font-size: 24px; }
  .site-header .site-nav { order: 5; flex-basis: 100%; min-height: 44px; flex-wrap: wrap; justify-content: space-between; margin: 0; gap: 2px; }
  .site-header .site-nav a, .resource-page .site-header nav a { font-size: 13px; padding-inline: 10px; }
  .site-header .site-create { margin-left: auto; }
  .site-header .cp-account-nav { margin-left: 0; }
  .site-header .cp-language-switch { margin-left: auto; }
  .activity-library-page .site-main { width: calc(100% - 24px); margin-top: 18px; }
  .activity-library-page .library-page .library-heading { padding: 22px 18px; }
  .activity-library-page .library-page .library-body { padding: 16px 18px 24px; }
  .activity-library-page .library-page .library-tools { gap: 10px; }
  .activity-library-page .library-page .library-search { flex: 1 1 100%; order: 3; }
  .activity-library-page .library-page .library-search .site-input { width: 100%; }
  .activity-library-page .library-page .library-order-row { gap: 4px; }
  .activity-library-page .library-order-label { flex-basis: 100%; margin: 0 0 2px; }
  .activity-library-page .library-count { flex-basis: 100%; margin-bottom: 8px; }
  .activity-library-page .library-page .library-list { gap: 18px 14px; }
  .editor-page .editor-input-box { grid-template-columns: minmax(0,1fr) 44px; }
  .editor-page .field-format { height: 42px; }
  .editor-page .field-format button { width: 40px; height: 40px; line-height: 40px; }
  .editor-page .answer-state { width: 40px; min-width: 40px; height: 40px; }
  .editor-page .answer-remove { width: 36px; min-width: 36px; }
  .editor-page .answer-grid { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:420px) {
  .site-header .site-create { font-size: 13px; padding: 10px 12px; }
  .cp-account-nav .cp-account-label { max-width: 96px; }
  .activity-library-page .library-page .library-order-row { justify-content: space-between; }
  .activity-library-page .library-page .library-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 10px; }
  .activity-library-page .lib-folder .lib-name { font-size: 14px; }
  .activity-library-page .folder-front { padding: 12px 48px 10px 11px; }
  .activity-library-page .lib-folder .lib-sub { font-size: 12px; }
  .activity-library-page .lib-info { min-height: 108px; padding: 11px 12px 52px; }
  .activity-library-page .lib-activity .lib-name { font-size: 14px; }
  .activity-library-page .lib-menu-button { width: 40px; height: 40px; }
  .activity-library-page .lib-activity .lib-menu-button { bottom: 8px; right: 8px; }
  .activity-library-page .library-list[data-view=small] .lib-info { padding: 10px 10px 50px; }
  .editor-page .item-panel { padding: 12px 10px; }
}
@media(prefers-reduced-motion:reduce) {
  :where(:root:not([data-motion-managed])) .site-page .site-button, :where(:root:not([data-motion-managed])) .site-page .template-card, :where(:root:not([data-motion-managed])) .activity-library-page .lib-activity, :where(:root:not([data-motion-managed])) .activity-library-page .lib-folder-link { transition: none; }
  :where(:root:not([data-motion-managed])) .activity-library-page .lib-activity:hover, :where(:root:not([data-motion-managed])) .activity-library-page .lib-folder-link:hover { transform: none; }
}
/* The player's own "No movement" choice (html[data-reduce-motion], js/motion-preference.js) applies the same rules. */
:where(:root[data-reduce-motion]) .site-page .site-button, :where(:root[data-reduce-motion]) .site-page .template-card, :where(:root[data-reduce-motion]) .activity-library-page .lib-activity, :where(:root[data-reduce-motion]) .activity-library-page .lib-folder-link { transition: none; }
:where(:root[data-reduce-motion]) .activity-library-page .lib-activity:hover, :where(:root[data-reduce-motion]) .activity-library-page .lib-folder-link:hover { transform: none; }
@media(forced-colors:active) {
  .site-page .site-button.primary, .resource-page .resource-primary { border: 2px solid ButtonText !important; }
  .site-header .site-nav a[aria-current] { outline: 2px solid LinkText; }
  .folder-front, .folder-back { border: 1px solid CanvasText; }
}
/* Footer links to the privacy notice, terms and contact address on every teacher page. */
.site-footer .site-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 6px; }
.site-footer .site-footer-links a { color: var(--cp-ink); font-weight: 700; text-decoration: none; }
.site-footer .site-footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
