/* ============================================================
   Image Quiz — Wordwall 风格复刻
   设计令牌
   ============================================================ */
: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; }
.tiles { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(4, 1fr); }
.tiles i {
  background: linear-gradient(160deg, var(--tw-c, #7a5ae0), var(--tw-d, #4b2fae));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
  opacity: 1; transform: scale(1);
  transition: opacity .55s ease, transform .55s ease;
}
.tiles i.gone { opacity: 0; transform: scale(.72); }

.buzz-col { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.buzzer {
  width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center; gap: 2px;
  background: radial-gradient(circle at 35% 28%, #ff9a4d, #f2545b 70%);
  color: #fff; font-size: 15px; font-weight: 900; line-height: 1.1;
  box-shadow: inset 0 -7px 0 rgba(0, 0, 0, .22), 0 0 0 6px rgba(255, 255, 255, .14);
  animation: buzz-pulse 1.5s ease-in-out infinite;
}
.buzzer.themed {
  background: radial-gradient(circle at 35% 28%, var(--tw-c, #ff9a4d), var(--tw-d, #f2545b) 72%);
}
.buzzer span { font-size: 22px; }
.buzzer:active { transform: translateY(3px); box-shadow: inset 0 -3px 0 rgba(0,0,0,.22), 0 0 0 6px rgba(255,255,255,.14); }
@keyframes buzz-pulse {
  0%, 100% { box-shadow: inset 0 -7px 0 rgba(0,0,0,.22), 0 0 0 6px rgba(255,255,255,.14); }
  50% { box-shadow: inset 0 -7px 0 rgba(0,0,0,.22), 0 0 0 14px rgba(255,255,255,.06); }
}
.buzzer.hidden { display: none; }
.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; }
}

/* ============================================================
   Open the Box
   ============================================================ */
.ob-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 720px) { .ob-grid { grid-template-columns: repeat(3, 1fr); } }
.ob-box {
  aspect-ratio: 1 / 1; border-radius: 16px;
  display: grid; place-items: center;
  font-size: 30px; font-weight: 900; color: #fff;
  cursor: pointer; user-select: none;
  box-shadow: inset 0 -7px 0 rgba(0, 0, 0, .20), var(--sh-2);
  transition: transform .15s ease, opacity .3s, filter .3s;
}
.ob-box:hover { transform: translateY(-4px) rotate(-1.5deg); }
.ob-box.opened { opacity: .22; filter: saturate(.3); pointer-events: none; transform: none; }
.ob-score-flash { animation: ob-flash .5s ease; }
@keyframes ob-flash { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ============================================================
   Speaking Cards
   ============================================================ */
.sc-area { display: flex; align-items: center; justify-content: center; gap: 16px; }
.sc-nav {
  width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px;
  background: rgba(255,255,255,.12); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.sc-nav:hover { background: rgba(255,255,255,.22); }
.sc-nav[disabled] { opacity: .3; pointer-events: none; }
.sc-wrap { perspective: 1300px; width: min(430px, 74vw); }
.sc-card {
  position: relative; width: 100%; aspect-ratio: 5 / 3.4;
  transform-style: preserve-3d; transition: transform .62s cubic-bezier(.3, 1.2, .35, 1);
  cursor: pointer;
}
.sc-card.flipped { transform: rotateY(180deg); }
.sc-face {
  position: absolute; inset: 0; border-radius: var(--r-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 22px; text-align: center;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: var(--sh-3);
}
.sc-front { background: #fff; color: var(--ink); }
.sc-front::before, .sc-back::before {
  content: ""; position: absolute; inset: 10px; border-radius: 12px; pointer-events: none;
  border: 2px dashed rgba(91, 50, 201, .25);
}
.sc-back { background: linear-gradient(150deg, var(--tw-c, #7c4dff), var(--tw-d, #5b32c9)); color: #fff; transform: rotateY(180deg); }
.sc-back::before { border-color: rgba(255,255,255,.35); }
.sc-face .word { font-size: 30px; font-weight: 900; line-height: 1.3; word-break: break-word; }
.sc-face img { max-height: 46%; border-radius: 10px; }
.sc-face .hint { font-size: 13px; font-weight: 800; opacity: .55; }
.sc-bar { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.sc-tts {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 14px; font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.sc-tts:hover { background: rgba(255,255,255,.22); }
.sc-stack { position: relative; }
.sc-stack::before, .sc-stack::after {
  content: ""; position: absolute; inset: 8px -7px -8px 7px; z-index: -1;
  border-radius: var(--r-lg); background: rgba(255,255,255,.10);
  transform: rotate(2.5deg);
}
.sc-stack::after { inset: 4px -4px -4px 4px; transform: rotate(-1.8deg); background: rgba(255,255,255,.16); }

/* ============================================================
   Gameshow Quiz
   ============================================================ */
.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.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; }

/* ============================================================
   Group 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 answers"; 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 — 布局逼近：选项改单列长条（Wordwall 风格）
   ============================================================ */
.options { grid-template-columns: 1fr; max-width: 620px; margin-left: auto; margin-right: auto; }
.reveal-wrap { grid-template-columns: 1fr 118px; }

/* Wordwall 风格：设置分组小标题 */
.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; }

/* Gameshow 生命线 */
.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; }

/* Gameshow 生命线 */
.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; }

/* Group 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; }

/* ================= Wordwall 风格对齐（2026-09-30） ================= */
:root { --ww: #1f9bf0; --ww-dark: #1583d6; --navy: #22304a; }

/* 品牌蓝按钮（Create Activity / Done） */
.btn.blue, a.btn.blue {
  background: linear-gradient(180deg, var(--ww), var(--ww-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：Wordwall 白底深蓝字 */
.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(--ww) !important;
  background: #fff !important; color: var(--ww-dark) !important;
}
.hero .btn.ghost:hover { background: #eef7ff !important; }
.hero .ww-stat { margin-top: 16px; font-size: 13px; font-weight: 800; color: #8aa0bd; }

/* 模板卡：Wordwall picker 风格——顶部彩色图块 */
.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(--ww-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; }

/* 编辑器：Wordwall 面包屑 */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; margin-left: 18px; }
.crumbs a { color: var(--ww-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(--ww-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(--ww-dark); cursor: pointer;
}
.instr-toggle:hover { text-decoration: underline; }
#instrBox { margin-top: 8px; }

/* 内容列底部 Done 行（Wordwall 同款位置） */
.done-row { display: flex; justify-content: flex-end; margin-top: 16px; }

/* 开始/结算卡：Wordwall 白卡风格 */
.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(--ww-dark);
  box-shadow: inset 0 0 0 1.5px #cfe7fb;
  text-shadow: none;
}
.center-card #startBtn {
  background: linear-gradient(180deg, var(--ww), var(--ww-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(--ww-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(--ww-dark); text-shadow: none; }
.center-card .name-row .input { background: #fff; color: var(--navy); }

/* ============================================================
   ClassPlay library, authoring workspace and classic game frame
   ============================================================ */
:root {
  --ww: #168bce;
  --ww-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(--ww-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(--ww); box-shadow: none; transition: background .16s, box-shadow .16s; }
.btn:hover { filter: none; background: var(--ww-dark); }
.btn:active { transform: none; box-shadow: none; }
.btn.blue, a.btn.blue { background: var(--ww) !important; box-shadow: none !important; }
.btn.blue:hover, a.btn.blue:hover { background: var(--ww-dark) !important; filter: none; }
.btn.ghost { background: #fff; color: var(--ww-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(--ww); 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(--ww); border-radius: 0; box-shadow: none; }
.brand .logo:has(i) { display: grid; }
.brand .logo i { width: 13px; height: 13px; background: var(--ww); 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(--ww-dark); }
.main-nav a.active { border-bottom-color: var(--ww); }
.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(--ww-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(--ww-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(--ww-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(--ww-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(--ww); }.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(--ww-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(--ww); 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; }
.tiles i { border-radius: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.buzzer { font-size: 14px; animation: none; box-shadow: inset 0 -6px 0 rgba(0,0,0,.2), 0 0 0 5px rgba(255,255,255,.2); }
.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; }
.ob-grid { max-width: 940px; margin: 20px auto; gap: 16px; }
.ob-box { min-width: 0; padding: 0; border-radius: 6px; border: 2px solid rgba(255,255,255,.45); font-size: 36px; font-weight: 600; box-shadow: 0 5px 0 rgba(0,0,0,.2); }
.ob-box:hover { transform: translateY(-2px); }
.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 .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; }
.sc-area { gap: 32px; margin: 22px auto; }
.sc-deck { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 22px; width: 175px; height: 250px; flex: 0 0 175px; color: #fff; border: 5px solid #fff; border-radius: 8px; background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 10px, transparent 10px 20px), var(--tw-d); box-shadow: 5px 5px 0 rgba(255,255,255,.25), 10px 10px 0 rgba(255,255,255,.12), 0 5px 12px rgba(0,0,0,.15); }
.sc-deck > span { font-size: 80px; font-weight: 600; line-height: 1; }
.sc-deck > small { font-size: 12px; font-weight: 400; }
.sc-deck:hover:not(:disabled) { transform: translateY(-3px); }
.sc-deck:disabled { opacity: .35; }
.sc-dealt { width: min(420px, 70vw); }
.sc-dealt .sc-wrap { width: 100%; }
.sc-dealt .sc-card { min-height: 280px; }
.sc-dealt .sc-face { background: #fff; color: var(--ink); border-radius: 7px; box-shadow: 0 6px 0 rgba(0,0,0,.16); }
.sc-dealt .sc-back { background: #e4f2fa; }
.sc-dealt .sc-face::before { display: none; }
.sc-face { overflow-y: auto; justify-content: flex-start; }
.sc-face > :first-child { margin-top: auto; }
.sc-face > :last-child { margin-bottom: auto; }
.sc-face .word { flex-shrink: 0; font-size: 30px; font-weight: 600; }
.sc-face .hint { font-size: 11px; font-weight: 400; }
.sc-face img { flex-shrink: 0; max-width: 90%; max-height: min(190px, 44%); object-fit: contain; }
.sc-bar { flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.next-row { flex-wrap: wrap; }
.sc-tts { font-weight: 500; border-radius: 5px; font-size: 13px; }
.sc-card { border-radius: 7px; }
.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-col { flex-direction: row; }.buzzer { width: 78px; height: 78px; font-size: 12px; }.buzzer span { font-size: 17px; }.buzz-hint { max-width: 100px; text-align: left; }
  .opt { padding: 12px 13px; font-size: 15px; }.ob-grid { gap: 10px; }.ob-box { font-size: clamp(16px, 5vw, 28px); }.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; }
  .sc-area { flex-direction: column; gap: 23px; }.sc-deck { width: 94px; height: 130px; flex-basis: auto; padding: 12px 6px; gap: 8px; border-width: 3px; }.sc-deck > span { font-size: 43px; }.sc-deck > small { font-size: 9px; }.sc-dealt { width: 100%; }.sc-dealt .sc-card { min-height: 280px; }.sc-bar { flex-wrap: wrap; gap: 8px; }.sc-face .word { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
