.elq-word-puzzle {
  max-width: 820px;
  width: calc(100% - 32px);
  margin: clamp(20px, 5vw, 56px) auto;
  padding: clamp(16px, 4vw, 40px);
  border: 1px solid #e8ddf5;
  border-radius: 24px;
  background: #fff;
  color: #252033;
  box-shadow: 0 12px 36px #3c185512;
  overflow-wrap: anywhere;
}
.elq-word-puzzle h1 {
  margin: 0 0 1.25rem;
  color: #4c2475;
  font-size: clamp(1.35rem, 4vw, 2.25rem);
  line-height: 1.4;
}
.elq-word-puzzle ol {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  counter-reset: elq-clue;
}
.elq-word-puzzle li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .7rem;
  align-items: start;
  margin: 0;
  padding: .85rem;
  border-radius: 12px;
  background: var(--clue-bg);
  color: var(--clue-text);
  line-height: 1.7;
  white-space: pre-wrap;
}
.elq-word-puzzle li::before {
  content: counter(elq-clue);
  counter-increment: elq-clue;
  border: 1px solid currentColor;
  border-radius: 50%;
  text-align: center;
  line-height: 1.85rem;
  font-weight: 700;
}
.elq-word-puzzle li:nth-child(1), .elq-word-editor .elq-word-clue:nth-child(1) { --clue-bg: #f0e6ff; --clue-text: #502782; }
.elq-word-puzzle li:nth-child(2), .elq-word-editor .elq-word-clue:nth-child(2) { --clue-bg: #def6ee; --clue-text: #135849; }
.elq-word-puzzle li:nth-child(3), .elq-word-editor .elq-word-clue:nth-child(3) { --clue-bg: #fff0d2; --clue-text: #784306; }
.elq-word-puzzle li:nth-child(4), .elq-word-editor .elq-word-clue:nth-child(4) { --clue-bg: #dfeeff; --clue-text: #214a80; }
.elq-word-puzzle li:nth-child(5), .elq-word-editor .elq-word-clue:nth-child(5) { --clue-bg: #fde5ef; --clue-text: #842750; }
.elq-word-puzzle li:nth-child(6), .elq-word-editor .elq-word-clue:nth-child(6) { --clue-bg: #eaf3d7; --clue-text: #41571a; }
.elq-word-countdown,
.elq-word-answer:not(:empty) {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 14px;
  background: #4c2475;
  color: #fff;
  text-align: center;
}
.elq-word-countdown h2 { color: inherit; font-size: 1rem; margin: 0; }
.elq-word-countdown p,
.elq-word-answer { font-weight: 700; font-size: clamp(1.15rem, 4vw, 1.85rem); }
.elq-word-countdown p { margin: .35rem 0 0; font-variant-numeric: tabular-nums; }
.elq-word-puzzle nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.elq-word-puzzle nav a { color: #4c2475; text-decoration: underline; }
.elq-word-puzzle form { display: grid; gap: 1rem; }
.elq-word-puzzle label { display: grid; gap: .35rem; font-weight: 600; min-width: 0; }
.elq-word-puzzle input,
.elq-word-puzzle textarea {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: .65rem;
  font: inherit;
  color: #252033;
  background: #fff;
  border: 1px solid #aa98b8;
  border-radius: 8px;
}
.elq-word-puzzle button {
  justify-self: start;
  padding: .65rem 1rem;
  border: 0;
  border-radius: 8px;
  background: #4c2475;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.elq-word-puzzle button:disabled { opacity: .6; }
.elq-word-puzzle [hidden] { display: none; }
.elq-word-puzzle [role="status"]:empty { margin: 0; }

.elq-word-puzzle {
  box-sizing: border-box;
  max-width: 1250px;
}
.elq-word-public {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
}
.elq-word-presenter {
  display: grid;
  align-items: center;
  background: linear-gradient(150deg, #361050, #74358c 62%, #393d9a);
}
.elq-word-presenter h1 { margin: 0; }
.elq-word-presenter img {
  display: block;
  width: 100%;
  height: auto;
}
.elq-word-content {
  align-self: center;
  min-width: 0;
  padding: clamp(16px, 3.4vw, 40px);
}
.elq-word-editor {
  padding: 20px;
  background: #faf6ff;
}
.elq-word-editor h1 {
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  margin-bottom: .75rem;
  text-align: center;
}
.elq-word-editor nav {
  justify-content: center;
  font-size: .82rem;
  gap: .5rem 1rem;
}
.elq-word-editor-clues,
.elq-word-editor-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.elq-word-editor-clues {
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
}
.elq-word-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
}
.elq-word-editor-actions button[type="button"] {
  background: #efe4fb;
  color: #4c2475;
}
.elq-word-editor .elq-word-clue {
  padding: .65rem;
  background: var(--clue-bg);
  color: var(--clue-text);
  border-radius: 10px;
}
.elq-word-editor input,
.elq-word-editor textarea {
  box-sizing: border-box;
}
.elq-word-editor textarea { resize: vertical; }
@media (max-width: 700px) {
  .elq-word-public { grid-template-columns: minmax(0, 1fr); }
  .elq-word-presenter h1 { width: min(100%, 360px); margin-inline: auto; }
}
@media (max-width: 700px) {
  .elq-word-editor-clues,
  .elq-word-editor-details {
    grid-template-columns: minmax(0, 1fr);
  }
  .elq-word-editor-clues {
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}
