.ws-page,
.ws-player-page,
body.dk-kids {
  --ws-blue: #2f7dff;
  --ws-purple: #8b5cf6;
  --ws-ink: var(--dk-ink, #14213d);
  --ws-muted: var(--dk-text-72, #64748b);
  --ws-card: var(--dk-category-card-bg, rgba(255, 255, 255, 0.86));
  --ws-panel: var(--dk-panel-bg, rgba(255, 255, 255, 0.9));
  --ws-soft: var(--dk-glass-70, rgba(255, 255, 255, 0.7));
  --ws-border: var(--dk-stroke, rgba(15, 23, 42, 0.1));
  --ws-shadow: var(--dk-shadow, 0 14px 40px rgba(15, 23, 42, 0.1));
  --ws-shadow-strong: var(--dk-shadow-2, 0 22px 60px rgba(15, 23, 42, 0.14));
  --ws-page-bg:
    radial-gradient(circle at 12% 10%, rgba(255, 214, 102, 0.35), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(125, 211, 252, 0.35), transparent 30%),
    linear-gradient(135deg, #fff7ed 0%, #eff6ff 46%, #fdf2f8 100%);
  --ws-icon-bg: linear-gradient(135deg, #dbeafe, #fef3c7);
  --ws-icon-soft-bg: linear-gradient(135deg, #fff, #eff6ff);
  --ws-thumb-bg: linear-gradient(135deg, #eff6ff, #fef3c7);
  --ws-chip-bg: rgba(47, 125, 255, 0.1);
  --ws-chip-border: rgba(47, 125, 255, 0.16);
  --ws-progress-track: rgba(15, 23, 42, 0.08);
  --ws-playfield-bg: #ffffff;
  --ws-pdf-stage-bg: #e2e8f0;
  color: var(--ws-ink);
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html[data-dk-theme="dark"] .ws-page,
html[data-dk-theme="dark"] .ws-player-page,
html[data-dk-theme="dark"] body.dk-kids {
  --ws-page-bg: var(--dk-page-bg, linear-gradient(185deg, #0c0a14 0%, #12101c 42%, #0f1828 100%));
  --ws-icon-bg: linear-gradient(135deg, rgba(47, 125, 255, 0.28), rgba(251, 191, 36, 0.18));
  --ws-icon-soft-bg: linear-gradient(135deg, rgba(34, 31, 52, 0.98), rgba(30, 58, 88, 0.64));
  --ws-thumb-bg: linear-gradient(135deg, rgba(47, 125, 255, 0.18), rgba(251, 191, 36, 0.12));
  --ws-chip-bg: rgba(147, 197, 253, 0.14);
  --ws-chip-border: rgba(147, 197, 253, 0.28);
  --ws-progress-track: rgba(255, 255, 255, 0.1);
  --ws-playfield-bg: #ffffff;
  --ws-pdf-stage-bg: rgba(15, 23, 42, 0.76);
}

@media (prefers-color-scheme: dark) {
  html[data-dk-theme="system"] .ws-page,
  html[data-dk-theme="system"] .ws-player-page,
  html[data-dk-theme="system"] body.dk-kids {
    --ws-page-bg: var(--dk-page-bg, linear-gradient(185deg, #0c0a14 0%, #12101c 42%, #0f1828 100%));
    --ws-icon-bg: linear-gradient(135deg, rgba(47, 125, 255, 0.28), rgba(251, 191, 36, 0.18));
    --ws-icon-soft-bg: linear-gradient(135deg, rgba(34, 31, 52, 0.98), rgba(30, 58, 88, 0.64));
    --ws-thumb-bg: linear-gradient(135deg, rgba(47, 125, 255, 0.18), rgba(251, 191, 36, 0.12));
    --ws-chip-bg: rgba(147, 197, 253, 0.14);
    --ws-chip-border: rgba(147, 197, 253, 0.28);
    --ws-progress-track: rgba(255, 255, 255, 0.1);
    --ws-playfield-bg: #ffffff;
    --ws-pdf-stage-bg: rgba(15, 23, 42, 0.76);
  }
}

.ws-module-grid {
  display: grid !important;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 18px 0 28px;
}

.ws-module-grid .ws-module-item {
  background: var(--ws-card);
  border: 1px solid var(--ws-border);
  border-radius: 22px;
  box-shadow: var(--ws-shadow);
  margin: 0 !important;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  width: auto !important;
}

.ws-module-grid .ws-module-item a {
  align-items: center;
  color: var(--ws-ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 230px;
  text-align: center;
  text-decoration: none;
}

.ws-module-grid .ws-module-item .title {
  color: var(--ws-ink);
  font-family: "Baloo 2", "Nunito", system-ui, sans-serif;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.12;
  margin-top: 10px;
}

.ws-module-icon {
  align-items: center;
  background: var(--ws-icon-bg);
  border: 6px solid var(--ws-soft);
  border-radius: 32px;
  box-shadow: var(--ws-shadow);
  color: var(--ws-ink);
  display: flex;
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 900;
  height: 150px;
  justify-content: center;
  margin: 0 auto 10px;
  max-width: 190px;
  overflow: hidden;
  text-align: center;
}

.ws-module-icon img,
.ws-category-card__icon img,
.ws-category-hero__icon img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ws-module-icon--sheet {
  background: var(--ws-icon-soft-bg);
  color: #2f7dff;
}

.ws-module-progress {
  color: var(--ws-muted);
  font-size: 0.85rem;
  font-weight: 800;
  margin: 6px 0 0;
  text-align: center;
}

.ws-section--game-list {
  margin-top: 1rem;
}

.ws-worksheet-grid .ws-worksheet-item a {
  gap: 8px;
}

.ws-page--category-list {
  background: transparent;
  padding: 0;
}

.ws-worksheet-thumb {
  align-items: center;
  aspect-ratio: 4 / 3;
  background: var(--ws-thumb-bg);
  border: 1px solid var(--ws-border);
  border-radius: 18px;
  display: flex;
  justify-content: center;
  margin: 0 auto 8px;
  max-width: 220px;
  overflow: hidden;
  width: 100%;
}

.ws-worksheet-thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ws-worksheet-thumb canvas {
  display: none;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ws-worksheet-thumb--pdf.is-loaded {
  background: var(--ws-playfield-bg);
}

.ws-worksheet-thumb--pdf.is-loaded canvas {
  display: block;
}

.ws-worksheet-thumb--pdf.is-loaded span {
  display: none;
}

.ws-worksheet-thumb span {
  color: #2f7dff;
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.ws-worksheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}

.ws-worksheet-actions span {
  background: var(--ws-chip-bg);
  border: 1px solid var(--ws-chip-border);
  border-radius: 999px;
  color: #2f7dff;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 5px 9px;
}

.ws-featured-title {
  margin-top: 28px;
}

.ws-featured-title h2 {
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin: 0;
}

.ws-page {
  background: var(--ws-page-bg);
  min-height: 100vh;
  padding: clamp(18px, 4vw, 42px);
}

.ws-hero,
.ws-category-hero,
.ws-dashboard {
  background: var(--ws-panel);
  border: 1px solid var(--ws-border);
  border-radius: 32px;
  box-shadow: var(--ws-shadow-strong);
  overflow: hidden;
  position: relative;
}

.ws-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  padding: clamp(24px, 5vw, 58px);
}

.ws-kicker {
  background: rgba(47, 125, 255, 0.12);
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  text-transform: uppercase;
}

.ws-hero h1,
.ws-category-hero h1,
.ws-dashboard h1 {
  font-family: "Baloo 2", "Nunito", sans-serif;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 0.94;
  margin: 16px 0 14px;
}

.ws-hero p,
.ws-category-hero p,
.ws-section__head p,
.ws-dashboard p {
  color: var(--ws-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
  max-width: 760px;
}

.ws-hero__actions,
.ws-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.ws-btn {
  align-items: center;
  background: var(--ws-soft);
  border: 1px solid var(--ws-border);
  border-radius: 999px;
  color: var(--ws-ink);
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ws-btn:hover {
  box-shadow: var(--ws-shadow);
  transform: translateY(-2px);
}

.ws-btn--primary {
  background: linear-gradient(135deg, #2f7dff, #9b5cff);
  border-color: transparent;
  color: #fff;
}

.ws-hero__art {
  min-height: 320px;
  position: relative;
}

.ws-floating-card {
  align-items: center;
  background: var(--ws-icon-soft-bg);
  border: 6px solid var(--ws-soft);
  border-radius: 34px;
  box-shadow: var(--ws-shadow-strong);
  display: flex;
  font-family: "Baloo 2", sans-serif;
  font-size: 4.8rem;
  font-weight: 900;
  height: 170px;
  justify-content: center;
  position: absolute;
  right: 18%;
  top: 12%;
  transform: rotate(-8deg);
  width: 210px;
}

.ws-floating-card--two {
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  font-family: "Noto Sans Devanagari", "Baloo 2", sans-serif;
  font-size: 3.4rem;
  left: 5%;
  right: auto;
  top: 48%;
  transform: rotate(8deg);
}

.ws-floating-card--three {
  background: linear-gradient(135deg, #fce7f3, #e0e7ff);
  bottom: 6%;
  font-size: 4rem;
  height: 120px;
  right: 6%;
  top: auto;
  width: 150px;
}

.ws-section {
  margin-top: 32px;
}

.ws-section__head {
  margin-bottom: 16px;
}

.ws-section__head h2 {
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin: 0 0 4px;
}

.ws-category-grid,
.ws-card-grid,
.ws-stat-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.ws-category-card,
.ws-card,
.ws-empty,
.ws-stat {
  background: var(--ws-card);
  border: 1px solid var(--ws-border);
  border-radius: 24px;
  box-shadow: var(--ws-shadow);
  padding: 20px;
}

.ws-category-card {
  color: inherit;
  display: grid;
  min-height: 180px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ws-category-card:hover,
.ws-card:hover {
  box-shadow: 0 24px 58px rgba(47, 125, 255, 0.18);
  transform: translateY(-4px);
}

.ws-category-card__icon,
.ws-category-hero__icon {
  align-items: center;
  background: var(--ws-icon-bg);
  border-radius: 20px;
  display: inline-flex;
  font-family: "Baloo 2", "Noto Sans Devanagari", sans-serif;
  font-size: 1.65rem;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  overflow: hidden;
  width: 70px;
}

.ws-category-card strong,
.ws-card h3 {
  font-family: "Baloo 2", sans-serif;
  font-size: 1.35rem;
  line-height: 1.1;
  margin-top: 12px;
}

.ws-category-card small,
.ws-card p {
  color: var(--ws-muted);
  line-height: 1.5;
}

.ws-mini-progress,
.ws-progress {
  background: var(--ws-progress-track);
  border-radius: 999px;
  display: block;
  height: 10px;
  overflow: hidden;
}

.ws-mini-progress i,
.ws-progress i {
  background: linear-gradient(90deg, #22c55e, #2f7dff);
  display: block;
  height: 100%;
}

.ws-card {
  position: relative;
}

.ws-card__badge {
  background: rgba(47, 125, 255, 0.12);
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 6px 10px;
}

.ws-card__meta,
.ws-card__progress {
  color: var(--ws-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.88rem;
  gap: 8px;
  margin-top: 12px;
}

.ws-card__meta span {
  background: var(--ws-progress-track);
  border-radius: 999px;
  padding: 5px 9px;
}

.ws-card__progress {
  align-items: center;
  justify-content: space-between;
}

.ws-category-hero,
.ws-dashboard {
  padding: clamp(22px, 5vw, 48px);
  text-align: center;
}

.ws-back {
  color: #1d4ed8;
  font-weight: 900;
  text-decoration: none;
}

.ws-empty {
  color: var(--ws-muted);
  display: grid;
  gap: 8px;
}

.ws-empty strong {
  color: var(--ws-ink);
}

.ws-stat {
  text-align: center;
}

.ws-stat strong {
  display: block;
  font-family: "Baloo 2", sans-serif;
  font-size: 2.2rem;
}

.ws-stat span {
  color: var(--ws-muted);
  font-weight: 900;
}

.ws-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}

.ws-reward-badge {
  background: var(--ws-chip-bg);
  border: 1px solid var(--ws-chip-border);
  border-radius: 999px;
  font-weight: 900;
  padding: 8px 12px;
}

.ws-player-page {
  background: transparent;
  min-height: auto;
}

.ws-player-wrap {
  display: none;
  padding: 0;
}

#game_container.dk-ws-playfield,
#game.dk-ws-game {
  background: transparent !important;
  color-scheme: inherit;
}

#game.dk-ws-game {
  width: 100%;
}

.ws-digital,
.ws-result__card {
  background: var(--ws-panel);
  border: 1px solid var(--ws-border);
  border-radius: 28px;
  box-shadow: var(--ws-shadow-strong);
  margin: 0 auto;
  max-width: 1060px;
  padding: clamp(14px, 3vw, 28px);
}

#game #wsDigitalRoot {
  --wl-primary: var(--dk-blue, #2f7dff);
  --wl-accent: var(--dk-yellow, #fbbf24);
  --wl-success: var(--dk-green, #22c55e);
  --wl-ink: var(--dk-ink, #14213d);
  --wl-ink-muted: var(--dk-text-72, rgba(43, 58, 103, 0.72));
  --wl-surface: var(--dk-glass-94, #ffffff);
  --wl-surface-soft: var(--dk-glass-70, rgba(255, 255, 255, 0.7));
  --wl-border: var(--dk-stroke, rgba(20, 33, 61, 0.12));
  --wl-radius: var(--dk-radius-lg, 16px);
  --wl-shadow: var(--dk-shadow, 0 14px 40px rgba(15, 23, 42, 0.1));
  --wl-playfield-bg: var(--ws-playfield-bg, #ffffff);
  background: var(--dk-panel-bg, rgba(255, 255, 255, 0.92));
  border: 1px solid var(--wl-border);
  border-radius: var(--dk-radius-xl, 20px);
  box-shadow: var(--wl-shadow);
  box-sizing: border-box;
  color: var(--wl-ink);
  font-family: "Nunito", system-ui, sans-serif;
  margin: 0 auto;
  max-width: 1080px;
  min-height: min(85vh, 720px);
  padding: 16px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ws-digital__top {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.ws-digital__meta {
  flex: 1;
  min-width: 0;
}

.ws-digital__top h1 {
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1;
  margin: 4px 0;
}

.ws-game-back {
  align-items: center;
  background: var(--wl-surface-soft, rgba(255, 255, 255, 0.7));
  border: 1px solid var(--wl-border, rgba(20, 33, 61, 0.12));
  border-radius: var(--wl-radius, 16px);
  color: var(--wl-ink, #14213d);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.2rem;
  height: 44px;
  justify-content: center;
  min-width: 44px;
  padding: 8px 12px;
}

.ws-player-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ws-player-hud span {
  background: var(--wl-surface, #fff);
  border: 1px solid var(--wl-border, var(--ws-border));
  border-radius: 12px;
  color: var(--wl-ink, #14213d);
  font-size: 0.8rem;
  font-weight: 900;
  padding: 7px 10px;
}

.ws-digital__progress {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr;
  margin: 18px 0;
}

.ws-progress {
  height: 18px;
  position: relative;
}

.ws-progress em {
  color: #fff;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.ws-sequence {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.ws-sequence span {
  background: var(--wl-surface, #fff);
  border: 1px solid var(--wl-border, var(--ws-border));
  border-radius: 14px;
  flex: 0 0 auto;
  font-weight: 900;
  padding: 8px 12px;
}

.ws-sequence span.is-active {
  background: #2f7dff;
  color: #fff;
}

.ws-trace-card {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(96px, 0.2fr) minmax(260px, 1fr);
}

.ws-trace-card__glyph {
  align-items: center;
  background: linear-gradient(135deg, rgba(47, 125, 255, 0.12), rgba(251, 191, 36, 0.18));
  border: 1px solid var(--wl-border, rgba(20, 33, 61, 0.12));
  border-radius: var(--wl-radius, 16px);
  display: flex;
  font-family: "Baloo 2", "Noto Sans Devanagari", sans-serif;
  font-size: clamp(2.5rem, 8vw, 5.2rem);
  font-weight: 900;
  justify-content: center;
  min-height: 190px;
}

.ws-stage-wrap {
  aspect-ratio: 1 / 1;
  background: var(--wl-playfield-bg, #fff);
  border: 0;
  border-radius: var(--wl-radius, 16px);
  box-shadow: inset 0 0 0 2px var(--wl-border, rgba(20, 33, 61, 0.12)), var(--wl-shadow, 0 14px 40px rgba(15, 23, 42, 0.1));
  grid-column: 2;
  max-height: min(56vh, 480px);
  overflow: hidden;
  position: relative;
  touch-action: none;
}

.ws-svg,
.ws-canvas {
  inset: 0;
  position: absolute;
  width: 100%;
  height: 100%;
}

.ws-canvas {
  z-index: 2;
}

.ws-success-flash {
  background: #22c55e;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  left: 50%;
  padding: 10px 16px;
  position: absolute;
  top: 18px;
  transform: translateX(-50%);
  z-index: 4;
}

.ws-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 2;
}

.ws-tool,
.ws-select {
  background: var(--wl-surface-soft, rgba(255, 255, 255, 0.7));
  border: 1px solid var(--wl-border, var(--ws-border));
  border-radius: var(--wl-radius, 16px);
  color: var(--wl-ink, #14213d);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  min-height: 44px;
  padding: 10px 14px;
}

.ws-tool {
  align-items: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ws-tool:hover {
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.13);
  transform: translateY(-1px);
}

.ws-tool__icon,
.ws-btn span[aria-hidden="true"] {
  align-items: center;
  background: rgba(47, 125, 255, 0.12);
  border-radius: 10px;
  display: inline-flex;
  font-size: 1rem;
  height: 24px;
  justify-content: center;
  line-height: 1;
  min-width: 24px;
}

.ws-tool__icon svg {
  display: block;
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 17px;
}

.ws-tool--icon-only {
  min-width: 46px;
  padding: 10px;
}

.ws-tool--icon-only .ws-tool__icon {
  background: transparent;
}

.ws-tool.is-active {
  background: linear-gradient(135deg, var(--wl-primary, #2f7dff), var(--dk-purple, #8b5cf6));
  border-color: transparent;
  color: #fff;
}

.ws-tool.is-active .ws-tool__icon,
.ws-tool--primary .ws-tool__icon,
.ws-btn--primary span[aria-hidden="true"] {
  background: rgba(255, 255, 255, 0.2);
}

.ws-tool--primary {
  box-shadow: 0 14px 30px rgba(47, 125, 255, 0.24);
}

.ws-result {
  align-items: center;
  display: flex;
  min-height: 100vh;
  padding: 20px;
}

.ws-result__card {
  text-align: center;
}

.ws-result__mascot {
  font-size: 4rem;
}

.ws-stat-grid--compact {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  margin: 18px 0;
}

.ws-pdf-player {
  background: var(--ws-panel);
  border: 1px solid var(--ws-border);
  border-radius: 28px;
  box-shadow: var(--ws-shadow-strong);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 104px);
  margin: 0 auto;
  max-width: 1180px;
  min-height: 560px;
  overflow: hidden;
  padding: clamp(14px, 3vw, 28px);
  width: 100%;
}

.ws-pdf-player .ws-digital__top,
.ws-pdf-toolbar,
.ws-pdf-hint {
  flex: 0 0 auto;
}

.ws-pdf-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.ws-pdf-timer {
  background: var(--wl-surface, var(--ws-soft));
  border: 1px solid var(--wl-border, rgba(20, 33, 61, 0.12));
  border-radius: 14px;
  color: var(--wl-ink, var(--ws-ink));
  font-weight: 900;
  min-height: 44px;
  padding: 10px 14px;
}

.ws-tool--primary {
  background: linear-gradient(135deg, #2f7dff, #9b5cff) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.ws-pdf-stage {
  background: var(--ws-pdf-stage-bg);
  border: 1px solid var(--ws-border);
  border-radius: 20px;
  flex: 1 1 auto;
  margin: 0 auto;
  max-width: 100%;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  position: relative;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.ws-pdf-canvas,
.ws-pdf-ink {
  display: block;
  left: 0;
  top: 0;
}

.ws-pdf-ink {
  position: absolute;
  touch-action: none;
  z-index: 2;
}

.ws-pdf-hint {
  color: var(--ws-muted);
  font-weight: 800;
  margin: 12px 0 0;
  text-align: center;
}

@media (max-width: 700px) {
  .ws-player-page,
  .dk-ws-playfield,
  .dk-ws-game,
  .ws-pdf-player {
    max-width: 100vw;
  }

  .ws-pdf-player {
    border-radius: 18px;
    height: calc(100vh - 86px);
    min-height: 0;
    padding: 8px;
    width: calc(100vw - 18px);
  }

  .ws-pdf-toolbar {
    justify-content: center;
  }

  .ws-pdf-stage {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
  }
}

.ws-maker-grid {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

.ws-maker-form {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.1);
  padding: 20px;
}

.ws-maker-form h2 {
  font-family: "Baloo 2", sans-serif;
  font-size: 1.6rem;
  margin: 0 0 12px;
}

.ws-maker-form label {
  color: #334155;
  display: block;
  font-weight: 900;
  margin: 12px 0 6px;
}

.ws-maker-form input,
.ws-maker-form select {
  background: #fff;
  border: 1px solid var(--ws-border);
  border-radius: 14px;
  color: #14213d;
  font: inherit;
  font-weight: 800;
  padding: 11px 12px;
  width: 100%;
}

.ws-maker-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ws-maker-check {
  align-items: center;
  display: flex !important;
  gap: 10px;
}

.ws-maker-check input {
  width: auto;
}

.ws-maker-preview {
  min-width: 0;
}

.ws-maker .ws-print-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 14px;
}

.ws-maker .ws-print-actions button {
  background: var(--ws-accent);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 10px 16px;
}

.ws-maker .ws-print-sheet {
  background: radial-gradient(circle at top left, color-mix(in srgb, var(--ws-accent) 12%, transparent), transparent 34%), #fff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: 0 18px 58px rgba(15, 23, 42, 0.14);
  color: #14213d;
  margin: 0 auto;
  max-width: 210mm;
  min-height: 287mm;
  overflow: hidden;
  padding: 13mm;
}

.ws-maker .ws-print-header {
  align-items: flex-start;
  border-bottom: 3px solid color-mix(in srgb, var(--ws-accent) 32%, #e2e8f0);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.ws-maker .ws-print-brand,
.ws-maker .ws-print-theme {
  align-items: center;
  background: color-mix(in srgb, var(--ws-accent) 12%, #fff);
  border-radius: 999px;
  color: var(--ws-accent);
  display: inline-flex;
  font-size: 10pt;
  gap: 8px;
  font-weight: 900;
  padding: 6px 10px;
}

.ws-maker .ws-print-brand img {
  border-radius: 10px;
  display: block;
  height: 34px;
  object-fit: contain;
  width: 34px;
}

.ws-maker .ws-print-header h1 {
  color: var(--ws-accent);
  font-family: "Baloo 2", sans-serif;
  font-size: 30pt;
  line-height: 0.95;
  margin: 8px 0 4px;
}

.ws-maker .ws-print-header p,
.ws-maker .ws-print-section p {
  color: #64748b;
  margin: 0;
}

.ws-maker .ws-print-meta {
  border: 2px dashed #dbeafe;
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, 1fr);
  margin: 12px 0 14px;
  padding: 10px;
}

.ws-maker .ws-print-meta span {
  color: #64748b;
  font-size: 10pt;
}

.ws-maker .ws-print-section {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  break-inside: avoid;
  margin-top: 12px;
  padding: 12px;
}

.ws-maker .ws-print-section h2 {
  font-family: "Baloo 2", sans-serif;
  font-size: 18pt;
  margin: 0;
}

.ws-maker .ws-print-section__head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.ws-maker .ws-math-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}

.ws-maker .ws-math-problem {
  align-items: center;
  border: 2px solid #dbeafe;
  border-radius: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, 1fr) 120px;
  min-height: 54px;
  padding: 10px 12px;
}

.ws-maker .ws-math-problem strong {
  color: #14213d;
  font-size: 18pt;
}

.ws-maker .ws-math-problem span {
  border-bottom: 2px solid #cbd5e1;
  height: 28px;
}

.ws-maker .ws-answer-key {
  display: grid;
  font-size: 12pt;
  gap: 7px;
  grid-template-columns: repeat(4, 1fr);
}

.ws-maker .ws-print-footer {
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  font-size: 9pt;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 10px;
}

@media (max-width: 820px) {
  .ws-hero,
  .ws-trace-card {
    grid-template-columns: 1fr;
  }

  .ws-hero__art {
    min-height: 240px;
  }

  .ws-stage-wrap,
  .ws-tools {
    grid-column: auto;
  }

  .ws-digital__top {
    display: grid;
  }

  .ws-maker-grid,
  .ws-maker-row {
    grid-template-columns: 1fr;
  }

  .ws-maker .ws-print-sheet {
    padding: 18px;
  }

  .ws-maker .ws-print-meta,
  .ws-maker .ws-math-grid,
  .ws-maker .ws-answer-key {
    grid-template-columns: 1fr;
  }
}

@media print {
  body:has(.ws-maker) {
    background: #fff;
  }

  body:has(.ws-maker) header,
  body:has(.ws-maker) footer,
  .ws-maker .ws-hero,
  .ws-maker .ws-maker-form,
  .ws-maker .ws-print-actions {
    display: none !important;
  }

  .ws-maker,
  .ws-maker-grid,
  .ws-maker-preview {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ws-maker .ws-print-sheet {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    max-width: none;
    min-height: auto;
    padding: 0;
  }
}

@media (max-width: 560px) {
  .ws-page {
    padding: 12px;
  }

  .ws-hero,
  .ws-category-hero,
  .ws-dashboard,
  .ws-digital,
  .ws-result__card {
    border-radius: 20px;
  }

  .ws-floating-card {
    font-size: 3rem;
    height: 118px;
    width: 145px;
  }
}
