body.word-search-page {
  --cws-bg-primary: #8b0000;
  --cws-bg-panel: rgba(255, 255, 255, 0.05);
  --cws-bg-panel-strong: rgba(26, 8, 6, 0.72);
  --cws-bg-grid-cell: rgba(255, 255, 255, 0.06);
  --cws-bg-grid-border: rgba(255, 255, 255, 0.12);
  --cws-bg-found: rgba(255, 215, 0, 0.25);
  --cws-bg-answer: rgba(255, 80, 80, 0.2);
  --cws-bg-selected: rgba(255, 215, 0, 0.4);
  --cws-gold: #ffd700;
  --cws-gold-dim: rgba(255, 215, 0, 0.2);
  --cws-paper: #f3e3bf;
  --cws-paper-line: rgba(88, 54, 28, 0.13);
  --cws-paper-dark: #3c2016;
  --cws-text-primary: #ffffff;
  --cws-text-secondary: rgba(255, 255, 255, 0.82);
  --cws-text-muted: rgba(255, 255, 255, 0.48);
  --cws-text-grid: #ffffff;
  --cws-text-found: rgba(255, 255, 255, 0.34);
  --cws-easy: #78e08f;
  --cws-medium: #fdcb6e;
  --cws-hard: #ff7675;
  --cws-expert: #a29bfe;
}

.word-search-page .site {
  position: relative;
}

.cws-skip-link {
  position: absolute;
  left: 18px;
  top: -110px;
  z-index: 40;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--cws-gold);
  color: #2f1504;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.cws-skip-link:focus {
  top: 12px;
}

.cws-page-main {
  width: min(1280px, 100%);
  margin: 30px auto 0;
  display: grid;
  gap: 20px;
}

.cws-breadcrumb,
.cws-hero,
.cws-section-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.cws-breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 0, 0.16);
  background: rgba(255, 244, 230, 0.1);
  color: #ffe7d1;
  font-size: 0.84rem;
}

.cws-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.cws-breadcrumb a:hover,
.cws-breadcrumb a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cws-hero-shell,
.section-block.cws-section-shell {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid rgba(255, 215, 0, 0.18);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.2);
}

.cws-hero-shell {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 214, 153, 0.14), transparent 32%),
    radial-gradient(circle at 84% 20%, rgba(255, 255, 255, 0.08), transparent 26%),
    linear-gradient(135deg, rgba(89, 17, 13, 0.98), rgba(42, 13, 10, 0.94));
  padding: 58px 42px 48px;
}

.cws-hero-shell::before,
.section-block.cws-section-shell::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 26px;
  border: 1px dashed rgba(255, 248, 230, 0.15);
  pointer-events: none;
}

.cws-hero-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.03) 50%, transparent 100%),
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 27px,
      rgba(255, 255, 255, 0.03) 28px,
      rgba(255, 255, 255, 0.03) 29px
    );
  opacity: 0.18;
  pointer-events: none;
}

.cws-snowfall {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cws-snowfall span {
  position: absolute;
  top: -20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  animation: cws-fall linear infinite;
}

.cws-snowfall span:nth-child(1) {
  left: 6%;
  animation-duration: 9s;
  animation-delay: -2s;
}

.cws-snowfall span:nth-child(2) {
  left: 15%;
  animation-duration: 11s;
  animation-delay: -6s;
}

.cws-snowfall span:nth-child(3) {
  left: 26%;
  animation-duration: 8s;
  animation-delay: -1s;
}

.cws-snowfall span:nth-child(4) {
  left: 37%;
  animation-duration: 12s;
  animation-delay: -7s;
}

.cws-snowfall span:nth-child(5) {
  left: 48%;
  animation-duration: 10s;
  animation-delay: -4s;
}

.cws-snowfall span:nth-child(6) {
  left: 58%;
  animation-duration: 13s;
  animation-delay: -8s;
}

.cws-snowfall span:nth-child(7) {
  left: 67%;
  animation-duration: 9s;
  animation-delay: -3s;
}

.cws-snowfall span:nth-child(8) {
  left: 76%;
  animation-duration: 11s;
  animation-delay: -5s;
}

.cws-snowfall span:nth-child(9) {
  left: 86%;
  animation-duration: 10s;
  animation-delay: -2s;
}

.cws-snowfall span:nth-child(10) {
  left: 93%;
  animation-duration: 12s;
  animation-delay: -6s;
}

.cws-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 24px;
  align-items: start;
}

.cws-hero-copy {
  display: grid;
  gap: 14px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: rgba(255, 215, 0, 0.12);
  color: var(--cws-gold);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cws-hero-copy h1 {
  margin: 0;
  max-width: 11ch;
  font-family: "Cinzel", serif;
  font-size: clamp(2.7rem, 6vw, 4.4rem);
  line-height: 1.05;
  color: #fff1d8;
}

.cws-hero-subtitle {
  margin: 0;
  max-width: 28ch;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  line-height: 1.16;
  color: rgba(255, 255, 255, 0.92);
}

.cws-hero-intro {
  width: min(760px, 100%);
  margin: 0;
  color: var(--cws-text-secondary);
  font-size: 1rem;
  line-height: 1.85;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  color: var(--cws-text-muted);
  font-size: 0.84rem;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.countdown-badge {
  display: grid;
  gap: 8px;
  justify-items: center;
  border-radius: 18px;
  border: 1px solid rgba(255, 215, 0, 0.34);
  background:
    radial-gradient(circle at top center, rgba(255, 215, 0, 0.18), transparent 58%),
    rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  padding: 18px 20px;
  color: #fff5e5;
  text-align: center;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

.countdown-badge .star {
  font-size: 1.45rem;
}

.countdown-badge-title {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
}

.days-num {
  display: block;
  font-family: "Cinzel", serif;
  font-size: clamp(2.3rem, 4vw, 3rem);
  line-height: 1;
  color: var(--cws-gold);
}

.days-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.badge-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 0, 0.32);
  color: var(--cws-gold);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.badge-link:hover,
.badge-link:focus-visible {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-1px);
}

.section-block.cws-section-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(48, 14, 11, 0.9);
  padding: 30px;
}

.section-header {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.section-header h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15;
  color: #fff1d8;
}

.section-subtitle {
  margin: 0;
  max-width: 74ch;
  color: var(--cws-text-secondary);
  font-size: 0.98rem;
  line-height: 1.8;
}

.puzzle-tab-bar {
  display: grid;
  gap: 14px;
}

.puzzle-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.puzzle-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 215, 0, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: var(--cws-text-secondary);
  font: inherit;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.puzzle-tab:hover,
.puzzle-tab:focus-visible,
.puzzle-tab.active {
  border-color: rgba(255, 215, 0, 0.42);
  background: rgba(255, 215, 0, 0.12);
  color: #fff8ec;
  transform: translateY(-1px);
}

.puzzle-tab-ornaments {
  font-size: 1rem;
}

.puzzle-tab-text {
  font-size: 0.92rem;
  font-weight: 700;
}

.tab-summary {
  margin: 0;
  color: var(--cws-text-muted);
  font-size: 0.92rem;
}

.puzzle-studio-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

.puzzle-studio-heading {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: start;
}

.puzzle-studio-heading h3 {
  margin: 4px 0 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  color: #fff1d8;
}

.puzzle-kicker {
  margin: 0;
  color: var(--cws-gold);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.puzzle-summary {
  margin: 12px 0 0;
  max-width: 68ch;
  color: var(--cws-text-secondary);
  font-size: 0.98rem;
  line-height: 1.8;
}

.studio-facts {
  display: grid;
  gap: 10px;
}

.studio-fact-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.fact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.fact-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cws-text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
}

.fact-copy {
  margin: 0;
  color: var(--cws-text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.difficulty-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.difficulty-badge.easy {
  background: rgba(120, 224, 143, 0.15);
  color: var(--cws-easy);
  border: 1px solid rgba(120, 224, 143, 0.3);
}

.difficulty-badge.medium {
  background: rgba(253, 203, 110, 0.15);
  color: var(--cws-medium);
  border: 1px solid rgba(253, 203, 110, 0.3);
}

.difficulty-badge.hard {
  background: rgba(255, 118, 117, 0.15);
  color: var(--cws-hard);
  border: 1px solid rgba(255, 118, 117, 0.3);
}

.difficulty-badge.expert {
  background: rgba(162, 155, 254, 0.15);
  color: var(--cws-expert);
  border: 1px solid rgba(162, 155, 254, 0.3);
}

.puzzle-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.07);
  color: var(--cws-text-secondary);
  transition: all 0.18s ease;
}

.ctrl-btn:hover,
.ctrl-btn:focus-visible,
.ctrl-btn.is-active,
.ctrl-btn.primary {
  background: rgba(255, 215, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.4);
  color: var(--cws-gold);
}

.timer-display {
  font-family: "Courier New", "Courier", monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--cws-gold);
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  padding: 8px 14px;
  letter-spacing: 0.1em;
  margin-left: auto;
}

.puzzle-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  margin: 6px 0 0;
}

.puzzle-grid-shell {
  border-radius: 24px;
  padding: 18px;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.26), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)),
    rgba(38, 12, 9, 0.82);
  border: 1px solid rgba(255, 215, 0, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.grid-note {
  margin: 0 0 14px;
  color: var(--cws-text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.grid-paper {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(84, 48, 22, 0.28);
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent),
    repeating-linear-gradient(
      0deg,
      rgba(88, 54, 28, 0.08),
      rgba(88, 54, 28, 0.08) 1px,
      transparent 1px,
      transparent 26px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(88, 54, 28, 0.08),
      rgba(88, 54, 28, 0.08) 1px,
      transparent 1px,
      transparent 26px
    ),
    linear-gradient(180deg, rgba(255, 251, 241, 0.94), rgba(235, 216, 175, 0.92));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.2),
    0 12px 34px rgba(21, 7, 5, 0.18);
}

.word-grid {
  display: grid;
  gap: 2px;
  user-select: none;
  touch-action: none;
  font-family: "Courier New", "Courier", monospace;
}

.word-grid.size-10 {
  grid-template-columns: repeat(10, minmax(0, 1fr));
}

.word-grid.size-15 {
  grid-template-columns: repeat(15, minmax(0, 1fr));
}

.word-grid.size-20 {
  grid-template-columns: repeat(20, minmax(0, 1fr));
}

.grid-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(11px, 2vw, 16px);
  font-weight: 700;
  color: var(--cws-paper-dark);
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(88, 54, 28, 0.16);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.08s ease, border-color 0.12s ease, color 0.12s ease;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.grid-cell:hover,
.grid-cell:focus-visible {
  background: rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.52);
  color: #3a1908;
  outline: none;
}

.grid-cell.selecting {
  background: var(--cws-bg-selected);
  border-color: var(--cws-gold);
  color: #532101;
  transform: scale(1.05);
}

.grid-cell.found {
  background: var(--cws-bg-found);
  border-color: rgba(255, 215, 0, 0.54);
  color: #5d2a00;
  position: relative;
}

.grid-cell.found::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.95), rgba(255, 215, 0, 0.1));
  transform: translateY(-50%);
}

.grid-cell.answer-shown {
  background: var(--cws-bg-answer);
  border-color: rgba(255, 80, 80, 0.45);
}

.word-list {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.word-list-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.word-list-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cws-gold);
}

.progress-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.1);
  color: #ffe8b0;
  font-size: 0.8rem;
  font-weight: 700;
}

.word-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.word-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--cws-text-secondary);
  padding: 5px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.03);
}

.word-item.found {
  color: var(--cws-text-found);
  text-decoration: line-through;
  text-decoration-color: var(--cws-gold);
  background: rgba(255, 215, 0, 0.06);
}

.word-item-check {
  color: var(--cws-gold);
  font-size: 0.88rem;
  line-height: 1;
}

.progress-bar-container {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-label {
  font-size: 12px;
  color: var(--cws-text-muted);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cws-gold), #ff9f43);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.word-list-meta {
  display: grid;
  gap: 12px;
}

.meta-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.meta-card-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cws-gold);
  margin-bottom: 6px;
}

.meta-card-value {
  display: block;
  color: var(--cws-text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.completion-strip {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 215, 0, 0.28);
  background:
    radial-gradient(circle at top left, rgba(255, 215, 0, 0.12), transparent 36%),
    rgba(255, 215, 0, 0.06);
}

.completion-strip-title {
  margin: 0;
  color: #fff2d8;
  font-size: 1rem;
  font-weight: 700;
}

.completion-strip-text {
  margin: 0;
  color: var(--cws-text-secondary);
  line-height: 1.7;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.puzzle-detail-list,
.how-to-columns,
.word-bank-section,
.faq-list,
.related-grid {
  display: grid;
  gap: 16px;
}

.puzzle-guide-card,
.how-to-card,
.word-bank-card,
.print-expectation,
.teacher-card,
.related-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.03);
}

.puzzle-guide-card,
.how-to-card,
.word-bank-card,
.print-expectation,
.teacher-card {
  padding: 22px;
}

.detail-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 14px;
}

.detail-header h3,
.how-to-card h3,
.word-bank-card h3,
.teacher-card h3 {
  margin: 0;
  font-size: 1.18rem;
  color: #fff2da;
  line-height: 1.4;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cws-text-secondary);
  font-size: 0.82rem;
}

.puzzle-guide-card p,
.how-to-card p,
.print-expectation p,
.teacher-card p,
.faq-answer,
.related-card-desc,
.copy-note,
.cws-table td,
.cws-table th {
  color: var(--cws-text-secondary);
  font-size: 0.96rem;
  line-height: 1.82;
}

.word-bank {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 248, 230, 0.12), rgba(255, 248, 230, 0.05)),
    rgba(22, 7, 5, 0.26);
  border: 1px solid rgba(255, 215, 0, 0.12);
  overflow-x: auto;
}

.word-bank pre {
  margin: 0;
  font-family: "Courier New", monospace;
  color: #fff7e2;
  font-size: 0.9rem;
  line-height: 1.9;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.how-to-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.how-to-steps {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--cws-text-secondary);
  line-height: 1.85;
}

.how-to-steps li + li {
  margin-top: 8px;
}

.word-bank-section {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.copy-note {
  margin: 12px 0 0;
}

.print-grid-layout,
.teacher-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
}

.cws-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
}

.cws-table th,
.cws-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.cws-table th {
  color: var(--cws-gold);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
}

.cws-table tr:last-child td {
  border-bottom: 0;
}

.teacher-highlights {
  display: grid;
  gap: 12px;
}

.teacher-callout {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.teacher-callout strong {
  display: block;
  margin-bottom: 6px;
  color: #fff3dd;
}

.faq-item {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  padding: 18px 20px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--cws-gold);
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.24s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 20px 20px;
}

.related-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  min-height: 100%;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.related-card:hover,
.related-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 215, 0, 0.25);
}

.related-card-icon {
  font-size: 1.9rem;
}

.related-card-title {
  margin: 0;
  color: var(--cws-gold);
  font-size: 1.02rem;
}

.related-card-desc {
  margin: 0;
}

.related-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cws-gold);
  font-size: 0.86rem;
  font-weight: 700;
}

.related-card-cta::after {
  content: "→";
}

.cws-print-bundle {
  display: none;
}

.complete-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 5, 4, 0.72);
  backdrop-filter: blur(8px);
}

.complete-modal[hidden] {
  display: none;
}

.complete-dialog {
  width: min(520px, 100%);
  border-radius: 24px;
  border: 1px solid rgba(255, 215, 0, 0.24);
  background:
    radial-gradient(circle at top center, rgba(255, 215, 0, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(52, 15, 11, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  padding: 28px;
  display: grid;
  gap: 14px;
}

.complete-dialog h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  color: #fff1d7;
  font-size: 2rem;
}

.complete-dialog p {
  margin: 0;
  color: var(--cws-text-secondary);
  line-height: 1.8;
}

.complete-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.modal-open {
  overflow: hidden;
}

@keyframes cws-fall {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }

  10%,
  85% {
    opacity: 1;
  }

  100% {
    transform: translateY(360px) translateX(18px);
    opacity: 0;
  }
}

@media (max-width: 1080px) {
  .cws-hero-grid,
  .puzzle-studio-heading,
  .puzzle-container,
  .print-grid-layout,
  .teacher-layout {
    grid-template-columns: 1fr;
  }

  .countdown-badge {
    max-width: 280px;
    justify-self: start;
  }

  .timer-display {
    margin-left: 0;
  }
}

@media (max-width: 880px) {
  .how-to-columns,
  .word-bank-section,
  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .cws-page-main {
    margin-top: 22px;
  }

  .cws-hero-shell,
  .section-block.cws-section-shell {
    padding: 24px 18px;
  }

  .puzzle-tab {
    width: 100%;
    justify-content: space-between;
  }

  .countdown-badge {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    padding: 14px 16px;
    gap: 6px;
  }

  .word-list-grid {
    grid-template-columns: 1fr;
  }

  .puzzle-controls {
    align-items: stretch;
  }

  .ctrl-btn,
  .timer-display {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .cws-breadcrumb {
    border-radius: 18px;
  }

  .cws-hero-shell {
    padding: 42px 20px 32px;
  }

  .grid-paper {
    padding: 12px;
  }

  .puzzle-grid-shell,
  .word-list,
  .puzzle-guide-card,
  .how-to-card,
  .word-bank-card,
  .print-expectation,
  .teacher-card,
  .related-card {
    padding-left: 16px;
    padding-right: 16px;
  }

  .grid-cell {
    font-size: clamp(10px, 2.8vw, 13px);
    border-radius: 4px;
  }

  .cws-table th,
  .cws-table td {
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .puzzle-tab,
  .ctrl-btn,
  .grid-cell,
  .related-card,
  .badge-link,
  .faq-item summary::after {
    transition: none;
  }

  .cws-snowfall span {
    animation: none;
  }
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  body * {
    visibility: hidden !important;
  }

  .cws-print-bundle,
  .cws-print-bundle * {
    visibility: visible !important;
  }

  .cws-print-bundle {
    display: block !important;
    position: static;
    margin: 0;
    padding: 0;
  }

  .print-puzzle-page,
  .answer-key-page {
    page-break-inside: avoid;
    padding: 16px 0 28px;
    color: #111111;
  }

  .answer-key-page {
    page-break-before: always;
    transform: rotate(180deg);
  }

  .print-header {
    margin-bottom: 16px;
  }

  .print-kicker {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #777777;
  }

  .print-header h1 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.2;
  }

  .print-header p,
  .print-directions {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #333333;
  }

  .print-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 16px;
    align-items: start;
  }

  .print-grid {
    display: grid;
    gap: 2px;
  }

  .print-grid.size-10 {
    grid-template-columns: repeat(10, 1fr);
  }

  .print-grid.size-15 {
    grid-template-columns: repeat(15, 1fr);
  }

  .print-grid.size-20 {
    grid-template-columns: repeat(20, 1fr);
  }

  .print-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cccccc;
    font-family: "Courier New", monospace;
    font-size: 13px;
    font-weight: 700;
    background: #ffffff;
    color: #000000;
  }

  .print-cell.answer {
    background: #fff2c5;
    border-color: #f0b332;
  }

  .print-word-bank h2 {
    margin: 0 0 10px;
    font-size: 14px;
  }

  .print-word-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    font-size: 11px;
    text-transform: uppercase;
  }

  .print-footer {
    margin-top: 12px;
    font-size: 10px;
    color: #777777;
    text-align: center;
  }
}
