/* Rewrite activity styles.
   1. Shared maker layout (copied from cloze/create.css, lines 1-567)
   2. Rewrite creator, my activities, delete
   3. Examples and ideas page (copied from multi/multi.css, scoped to .rw-about)
   4. Player */

.lh-maker {
  max-width: 760px;
  margin: 0 auto;
  color: #212529;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

.lh-maker button,
.lh-maker input,
.lh-maker select,
.lh-maker textarea {
  font-family: inherit;
  font-size: 16px;
}

.lh-maker .page-header {
  padding: 0;
  margin: 0;
}

.lh-maker form {
  margin-top: 0;
}

.lh-maker h1 {
  margin: 0;
  padding: 8px 0 4px;
  font-size: 30px;
  line-height: 1.2;
  text-align: left;
  color: #212529;
}

.lh-maker .lh-intro {
  margin: 0 0 8px;
  color: #212529;
}

.lh-maker .lh-links {
  margin: 0 0 48px;
  color: #6c757d;
  font-size: 14px;
}

.lh-maker .lh-links a {
  color: #1875d0;
  text-decoration: none;
}

.lh-maker .lh-links a:hover {
  text-decoration: underline;
}

.lh-maker .lh-field {
  margin: 0 0 24px;
}

.lh-maker .create_formhead {
  display: block;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #212529;
}

.lh-maker input[type="text"],
.lh-maker select,
.lh-maker textarea,
.lh-maker .create_textinput,
.lh-maker .create_textarea,
.lh-maker .ai-generate-select {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  margin: 0 !important;
  color: #212529;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 16px;
}

.lh-maker input[type="text"],
.lh-maker select,
.lh-maker .ai-generate-select {
  height: 44px;
}

.lh-maker textarea,
.lh-maker .create_textarea {
  height: auto;
  min-height: 96px;
  resize: vertical;
}

.lh-maker .lh-count {
  margin: 6px 0 0;
  color: #6c757d;
  font-size: 13px;
  text-align: right;
}

.lh-maker .lh-count.is-over {
  color: #b42318;
}

.lh-maker input[type="text"]:focus,
.lh-maker select:focus,
.lh-maker textarea:focus {
  outline: none;
  border-color: #1875d0;
  box-shadow: 0 0 0 3px rgba(24, 117, 208, 0.25);
}

.lh-maker ::placeholder {
  color: #6c757d;
  opacity: 1;
}

.lh-maker .form-section {
  margin: 32px 0;
  padding: 24px;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: 12px;
}

.lh-maker .form-section h2 {
  margin: 0 0 16px;
  color: #212529;
  font-size: 22px;
}

.lh-maker .lh-tabs {
  display: flex;
  margin: 0 0 20px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  overflow: hidden;
}

.lh-maker .lh-tabs .method-toggle {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 8px;
  border: none;
  border-right: 1px solid #ced4da;
  border-radius: 0;
  background: #fff;
  color: #212529;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
  transform: none;
}

.lh-maker .lh-tabs .method-toggle:last-child {
  border-right: none;
}

.lh-maker .lh-tabs .method-toggle.active,
.lh-maker .lh-tabs .method-toggle.active:hover {
  background: #1875d0;
  border-color: #ced4da;
  color: #fff;
  box-shadow: none;
  transform: none;
}

.lh-maker .lh-tabs .method-toggle:hover {
  background: #f4f8fc;
  color: #1875d0;
  box-shadow: none;
  transform: none;
}

.lh-maker .lh-tabs .method-toggle:focus {
  outline: 2px solid #1875d0;
  outline-offset: -2px;
  z-index: 1;
}

.lh-maker .lh-tab-short {
  display: none;
}

.lh-maker .ai-generate-fields {
  display: flex;
  gap: 16px;
  margin: 0;
}

.lh-maker .ai-generate-fields > div {
  flex: 1 1 0;
  min-width: 0;
}

.lh-maker .ai-generate-panel {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.lh-maker .lh-secondary,
.lh-maker .create_button.secondary,
.lh-maker #processBulk,
.lh-maker #aiReplaceYes,
.lh-maker #aiReplaceCancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #1875d0;
  border-radius: 8px;
  background: #fff;
  color: #1875d0;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
  transform: none;
  cursor: pointer;
}

.lh-maker .lh-secondary:hover,
.lh-maker .create_button.secondary:hover,
.lh-maker #processBulk:hover,
.lh-maker #aiReplaceYes:hover,
.lh-maker #aiReplaceCancel:hover {
  background: #f4f8fc;
  border-color: #1875d0;
  color: #1875d0;
  box-shadow: none;
  transform: none;
}

.lh-maker #aiGenerateBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: #1875d0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  transform: none;
  cursor: pointer;
}

.lh-maker #aiGenerateBtn:hover {
  background: #135ba2;
  border: none;
  color: #fff;
  box-shadow: none;
  transform: none;
}

.lh-maker #aiGenerateBtn:disabled,
.lh-maker #aiReplaceYes:disabled {
  background: #e9ecef;
  border-color: #ced4da;
  color: #6c757d;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.lh-maker .lh-text-button,
.lh-maker .lh-text-button:hover,
.lh-maker input[type="button"].lh-text-button {
  display: inline;
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #1875d0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  box-shadow: none;
  transform: none;
  cursor: pointer;
}

.lh-maker .lh-text-button:hover {
  text-decoration: underline;
}

.lh-maker .create_container {
  margin: 0;
}

.lh-maker .create_container p {
  margin: 2px 0 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.4;
}

.lh-maker .bulk-help {
  margin: 8px 0 16px;
  color: #6c757d;
  font-size: 14px;
  font-style: normal;
}

.lh-maker .ai-generate-note {
  margin: 0 0 16px;
}

.lh-maker .ai-replace {
  margin-top: 16px;
  padding: 12px;
  background: #fff8e8;
  border: 1px solid #e2e6ea;
  border-radius: 8px;
}

.lh-maker .ai-replace p {
  margin: 0 0 10px;
}

.lh-maker .ai-replace-actions {
  display: flex;
  gap: 10px;
}

.lh-maker .lh-options {
  margin: 0 0 32px;
  padding: 0;
  background: transparent;
  border: none;
}

.lh-maker .lh-options summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #212529;
}

.lh-maker .lh-options summary:focus {
  outline: 2px solid #1875d0;
  outline-offset: 3px;
}

.lh-maker .lh-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
}

.lh-maker .lh-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex: 0 0 auto;
}

.lh-maker .lh-check label {
  display: inline;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: #212529;
}

.lh-maker .lh-submit {
  margin: 0 0 24px;
}

.lh-maker #submitButton,
.lh-maker #createBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: #1875d0;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  transform: none;
  cursor: pointer;
}

.lh-maker #submitButton:hover,
.lh-maker #createBtn:hover {
  background: #135ba2;
  border: none;
  box-shadow: none;
  transform: none;
}

.lh-maker #submitButton:disabled,
.lh-maker #createBtn:disabled {
  background: #6c757d;
  color: #fff;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.lh-maker .lh-status {
  margin: 10px 0 0;
  color: #6c757d;
  font-size: 14px;
}

.lh-maker .exercise-creator > .success-message {
  margin: 0 0 24px;
  padding: 12px 14px;
  text-align: left;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: 8px;
}

.lh-maker .exercise-creator > .success-message,
.lh-maker #urlSection.success-message h2 {
  color: #212529;
}

.lh-maker #urlSection.success-message {
  height: auto;
  margin: 8px 0 32px;
  padding: 32px 24px;
  overflow: visible;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: 12px;
}

.lh-maker #urlSection .url-display {
  display: block;
  max-width: 100%;
  box-sizing: border-box;
}

.lh-maker #urlSection .activity-url {
  overflow-wrap: anywhere;
}

.lh-maker #urlSection .lh-success-ad {
  margin-top: 24px;
  text-align: center;
}

.lh-maker #urlSection .lh-success-ad .adsbygoogle {
  position: static !important;
  display: inline-block !important;
  width: 336px !important;
  height: 280px !important;
}

.lh-maker .action-buttons .create_button,
.lh-maker .action-buttons button.create_button,
.lh-maker .action-buttons a.create_button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  border: 1px solid #1875d0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #1875d0 !important;
  font-weight: 600 !important;
  margin: 0 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transform: none !important;
}

.lh-maker .error,
.lh-maker .form-success {
  margin: 0 0 16px;
}

@media (max-width: 359px) {
  .lh-maker #urlSection .lh-success-ad .adsbygoogle {
    width: 300px !important;
    height: 250px !important;
  }

  .lh-maker #urlSection.success-message {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (min-width: 360px) and (max-width: 430px) {
  .lh-maker #urlSection.success-message {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 480px) {
  #mainDiv {
    padding-left: 16px;
    padding-right: 16px;
  }

  .lh-maker .lh-tab-long {
    display: none;
  }

  .lh-maker .lh-tab-short {
    display: inline;
  }

  .lh-maker .lh-tabs .method-toggle {
    font-size: 14px;
    padding: 0 4px;
  }

  .lh-maker .ai-generate-fields {
    display: block;
  }

  .lh-maker .form-section {
    padding: 16px;
  }

  .lh-maker #submitButton,
  .lh-maker #createBtn,
  .lh-maker #aiGenerateBtn {
    width: 100%;
  }
}

/* ===== Success box (same as boardgames/create.css) ===== */

.lh-maker #urlSection.success-message {
  height: auto;
  margin: 8px 0 32px;
  padding: 32px 24px;
  overflow: visible;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: 12px;
  text-align: center;
}

.lh-maker #urlSection.success-message h2 {
  margin: 0 0 15px;
  font-size: 28px;
  font-weight: 600;
  text-align: center;
}

.lh-maker #urlSection.success-message p {
  margin: 0 0 20px;
  color: #666;
  font-size: 16px;
  text-align: center;
}

.lh-maker #urlSection .url-display {
  display: block;
  max-width: 100%;
  margin: 20px 0;
  padding: 15px;
  box-sizing: border-box;
  background: #fff;
  border: 2px solid #28a745;
  border-radius: 6px;
}

.lh-maker #urlSection .activity-url {
  color: #007bff;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.lh-maker #urlSection .activity-url:hover {
  color: #0056b3;
  text-decoration: underline;
}

.lh-maker #urlSection .action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
}

.lh-maker #urlSection .lh-success-ad {
  margin-top: 24px;
  text-align: center;
}

.lh-maker #urlSection .lh-success-ad .adsbygoogle {
  position: static !important;
  display: inline-block !important;
  width: 336px !important;
  height: 280px !important;
}

.lh-maker .action-buttons .create_button,
.lh-maker .action-buttons button.create_button,

@media (max-width: 359px) {
  .lh-maker #urlSection .lh-success-ad .adsbygoogle {
    width: 300px !important;
    height: 250px !important;
  }

  .lh-maker #urlSection.success-message {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (min-width: 360px) and (max-width: 430px) {
  .lh-maker #urlSection.success-message {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 768px) {
  .lh-maker #urlSection.success-message h2 {
    font-size: 24px;
  }

  .lh-maker #urlSection .activity-url {
    font-size: 16px;
  }

  .lh-maker #urlSection .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .lh-maker #urlSection .action-buttons .create_button {
    width: 100%;
    max-width: 300px;
  }
}


/* Copy link is the main action: solid blue, sized to its text like the other buttons.
   Same rule in boardgames/create.css and reveal/create.css. */
.lh-maker #urlSection #copyLinkBtn {
  width: auto !important;
  background: #1875d0 !important;
  color: #fff !important;
}

.lh-maker #urlSection #copyLinkBtn:hover {
  background: #1366b8 !important;
  border-color: #1366b8 !important;
}

@media (max-width: 768px) {
  .lh-maker #urlSection #copyLinkBtn {
    width: 100% !important;
  }
}

/* ===== Rewrite creator ===== */

[hidden] {
  display: none !important;
}

.lh-maker .lh-help {
  margin: -6px 0 16px;
  color: #495057;
  font-size: 14px;
  line-height: 1.5;
}

.lh-maker .rw-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rwrow;
}

.lh-maker .rw-row {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 12px;
  padding: 18px 0;
  border-top: 1px solid #eef0f2;
  counter-increment: rwrow;
}

.lh-maker .rw-row:first-child {
  border-top: none;
  padding-top: 4px;
}

.lh-maker .rw-row::before {
  content: counter(rwrow);
  grid-row: 1 / span 4;
  width: 28px;
  height: 28px;
  margin-top: 8px;
  border-radius: 50%;
  background: #e9eef3;
  color: #243140;
  font-weight: 700;
  font-size: 14px;
  line-height: 28px;
  text-align: center;
}

.lh-maker .rw-row-error::before {
  background: #b42318;
  color: #fff;
}

.lh-maker .rw-row-error input[name="answer[]"] {
  border-color: #b42318;
}

.lh-maker .rw-field {
  display: block;
  margin: 0 0 10px;
}

.lh-maker .rw-field-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.lh-maker .rw-count {
  font-weight: 600;
  color: #1875d0;
}

.lh-maker .rw-count.is-empty {
  color: #adb5bd;
  font-weight: 400;
}

.lh-maker .rw-answer-input {
  background: #f8fbff !important;
}

.lh-maker .rw-warn {
  margin: 0 0 8px;
  color: #b35c00;
  font-size: 14px;
  font-weight: 600;
}

.lh-maker .rw-add {
  margin-top: 8px;
}

/* ===== My rewrite activities ===== */

.lh-maker .rw-flash {
  margin: 0 0 24px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #e8f5ee;
  color: #1e6b43;
  font-weight: 600;
}

.lh-maker .rw-flash.is-error {
  background: #fdecea;
  color: #b42318;
}

.lh-maker .rw-empty {
  padding: 40px 24px;
  text-align: center;
  background: #fff;
  border: 1px dashed #ced4da;
  border-radius: 12px;
  color: #495057;
}

.lh-maker .rw-empty p {
  margin: 0 0 16px;
}

.lh-maker .rw-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lh-maker .rw-card {
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: 12px;
}

.lh-maker .rw-card h2 {
  margin: 0 0 4px;
  font-size: 19px;
  line-height: 1.3;
}

.lh-maker .rw-card h2 a {
  color: #212529;
  text-decoration: none;
}

.lh-maker .rw-card h2 a:hover {
  color: #1875d0;
}

.lh-maker .rw-card-meta {
  margin: 0 0 14px;
  color: #6c757d;
  font-size: 14px;
}

.lh-maker .rw-card-link {
  display: block;
  margin: 0 0 16px;
  padding: 8px 12px;
  background: #f5f7f9;
  border-radius: 8px;
  color: #495057;
  font-size: 14px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lh-maker .rw-card-link:hover {
  color: #1875d0;
}

.lh-maker .rw-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lh-maker .rw-card-actions form {
  margin: 0;
}

.lh-maker .rw-act {
  display: inline-flex;
  align-items: center;
  height: 38px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  background: #fff;
  color: #212529;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.lh-maker .rw-act:hover {
  border-color: #1875d0;
  color: #1875d0;
}

.lh-maker .rw-act-primary {
  background: #1875d0;
  border-color: #1875d0;
  color: #fff;
}

.lh-maker .rw-act-primary:hover {
  background: #1366b8;
  border-color: #1366b8;
  color: #fff;
}

.lh-maker .rw-act-danger {
  margin-left: auto;
  border-color: transparent;
  color: #b42318;
}

.lh-maker .rw-act-danger:hover {
  border-color: #b42318;
  color: #b42318;
}

.lh-maker .rw-act-danger-solid {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}

.lh-maker .rw-act-danger-solid:hover {
  background: #8f1c13;
  border-color: #8f1c13;
  color: #fff;
}

.lh-maker .rw-delete-list {
  margin: 0 0 24px;
  padding-left: 22px;
  color: #495057;
}

.lh-maker .rw-delete-list li {
  margin: 0 0 6px;
}

@media (max-width: 480px) {
  .lh-maker .rw-card {
    padding: 16px;
  }
  .lh-maker .rw-act-danger {
    margin-left: 0;
  }
}

/* ===== Examples and ideas page ===== */
/* ---------------------------------- */
/* Examples and ideas page (/multi/index-new.php). Scoped to the creator column. */

.lh-maker.rw-about .lh-intro {
  margin: 4px 0 20px;
  line-height: 1.45;
}

.lh-maker.rw-about .lh-cta {
  margin: 0;
}

.lh-maker.rw-about a.lh-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 200px;
  min-height: 48px;
  margin: 0;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: #1875d0;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
}

.lh-maker.rw-about a.lh-primary:hover,
.lh-maker.rw-about a.lh-primary:focus {
  background: #135ba2;
  color: #fff;
  text-decoration: none;
}

.lh-maker.rw-about a.lh-primary:focus {
  outline: 2px solid #1875d0;
  outline-offset: 2px;
}

.lh-maker.rw-about h2 {
  margin: 28px 0 12px;
  color: #212529;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.lh-maker.rw-about .level-a {
  --lh-level: #2e9e5b;
  --lh-level-tint: #e8f6ee;
}

.lh-maker.rw-about .level-b {
  --lh-level: #1875d0;
  --lh-level-tint: #e7f1fb;
}

.lh-maker.rw-about .level-c {
  --lh-level: #7b4fc9;
  --lh-level-tint: #f3eef9;
}

.lh-maker.rw-about .lh-samples {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

.lh-maker.rw-about a.lh-sample {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-top: 4px solid var(--lh-level, #1875d0);
  border-radius: 12px;
  color: #212529;
  text-decoration: none;
  box-shadow: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lh-maker.rw-about a.lh-sample:hover {
  color: #212529;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(33, 37, 41, 0.12);
}

.lh-maker.rw-about a.lh-sample:focus {
  outline: 2px solid var(--lh-level, #1875d0);
  outline-offset: 2px;
}

.lh-maker.rw-about .lh-sample h3 {
  margin: 0 0 8px;
  color: #212529;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

.lh-maker.rw-about .lh-level {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--lh-level, #1875d0);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.lh-maker.rw-about .lh-q {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 8px;
  background: var(--lh-level-tint, #e7f1fb);
}

.lh-maker.rw-about .lh-q p {
  margin: 0;
  color: #212529;
  font-size: 15px;
  line-height: 1.45;
}

.lh-maker.rw-about .lh-blank {
  display: inline-block;
  width: 2.5em;
  height: 0;
  margin: 0 0.15em;
  border-bottom: 2px solid #212529;
  vertical-align: baseline;
  position: relative;
  top: -0.15em;
}

.lh-maker.rw-about .lh-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.lh-maker.rw-about .lh-q p.lh-pills {
  margin-top: 10px;
}

.lh-maker.rw-about .lh-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 8px;
  background: #fff;
  border: 1px solid var(--lh-level, #1875d0);
  border-radius: 999px;
  color: #212529;
  font-size: 13px;
  line-height: 1.2;
}

.lh-maker.rw-about .lh-try {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  height: 36px;
  margin-top: auto;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--lh-level, #1875d0);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.lh-maker.rw-about .lh-ad {
  margin: 28px 0;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
}

.lh-maker.rw-about .lh-ad-label {
  margin: 0 0 6px;
  color: #6c757d;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

.lh-maker.rw-about .lh-ad .adsbygoogle {
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

.lh-maker.rw-about .lh-ideas,
.lh-maker.rw-about .lh-tips,
.lh-maker.rw-about .lh-more ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 16px;
  line-height: 1.45;
  list-style: disc;
}

.lh-maker.rw-about .lh-ideas li,
.lh-maker.rw-about .lh-tips li,
.lh-maker.rw-about .lh-more li {
  margin: 0 0 12px;
}

.lh-maker.rw-about .lh-ideas li:last-child,
.lh-maker.rw-about .lh-tips li:last-child,
.lh-maker.rw-about .lh-more li:last-child {
  margin-bottom: 0;
}

.lh-maker.rw-about .lh-collection-links {
  margin: 0;
}

.lh-maker.rw-about .lh-collection-links a {
  font-weight: 700;
}

.lh-maker.rw-about .lh-more {
  margin: 28px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e2e6ea;
}

.lh-maker.rw-about .lh-more summary {
  cursor: pointer;
  color: #212529;
  font-weight: 700;
}

.lh-maker.rw-about .lh-more ul {
  margin-top: 12px;
}

.lh-maker.rw-about .lh-placeholder {
  color: #6c757d;
}

@media (min-width: 768px) {
  .lh-maker.rw-about .lh-samples {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .lh-maker.rw-about .lh-ad-desktop {
    display: none;
  }
}

@media (max-width: 480px) {
  .lh-maker.rw-about a.lh-primary {
    width: 100%;
  }
}



/* Sample cards: equal title height so the preview boxes line up, and mini word chips */
.lh-maker.rw-about .lh-sample h3 {
  min-height: 2.6em;
}

.lh-maker.rw-about .rw-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 10px 0 0;
}

.lh-maker.rw-about .rw-mini span {
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.lh-maker.rw-about .rw-mini-g { background: #2e9d5b; }
.lh-maker.rw-about .rw-mini-a { background: #e0a100; }
.lh-maker.rw-about .rw-mini-x { background: #8a96a3; }

/* Ready-made list (same as cloze/index.css) */
.lh-maker.rw-about #ready-made {
  scroll-margin-top: 24px;
}

.lh-maker.rw-about .lh-ready p {
  margin: 0 0 8px;
}

.lh-maker.rw-about .lh-ready a {
  font-weight: 700;
}

.lh-maker.rw-about .lh-ready h3 {
  margin: 18px 0 6px;
  color: #212529;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.lh-maker.rw-about .lh-rows {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0 28px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.lh-maker.rw-about .lh-rows li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #eef0f2;
}

.lh-maker.rw-about .lh-rows li > a:first-child {
  flex: 1;
  min-width: 0;
}

.lh-maker.rw-about .lh-lvl {
  flex: none;
  color: #6c757d;
  font-size: 12px;
  font-weight: 600;
}

/* ================= Rewrite: player ================= */

.rw-play {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 12px 60px;
}

.rw-play h1 {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 8px 0 8px;
  text-align: left;
  color: #212529;
}

.rw-instruction {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #243140;
}

.rw-rule {
  margin: 0 0 22px;
  color: #5c6b7a;
  font-size: 0.95rem;
}

.rw-missing {
  color: #842029;
  background: #f8d7da;
  border-radius: 8px;
  padding: 12px 14px;
}

.rw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rw-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e3e8ee;
  background: #fff;
  transition: background 0.2s, opacity 0.2s, box-shadow 0.2s;
}

.rw-num {
  flex: 0 0 auto;
  min-width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: #e9eef3;
  color: #243140;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 2.1em;
  text-align: center;
}

.rw-body {
  flex: 1 1 auto;
  min-width: 0;
}

/* upcoming */
.rw-todo {
  opacity: 0.5;
  cursor: pointer;
}

.rw-todo:hover,
.rw-todo:focus {
  opacity: 0.85;
  outline: none;
  border-color: #b7c3ce;
}

.rw-prompt-small {
  color: #5c6b7a;
}

/* finished */
.rw-done,
.rw-shown {
  background: #f7f9fb;
}

.rw-done .rw-num {
  background: #2e9d5b;
  color: #fff;
}

.rw-shown .rw-num {
  background: #8a96a3;
  color: #fff;
}

.rw-todo .rw-body,
.rw-done .rw-body,
.rw-shown .rw-body {
  line-height: 1.5;
  padding-top: 0.3em;
}

.rw-arrow {
  margin: 0 8px;
  color: #8a96a3;
}

.rw-answer-final {
  font-weight: 700;
  color: #1d2b39;
}

.rw-mark {
  margin-left: 8px;
  color: #2e9d5b;
  font-weight: 700;
}

.rw-shown .rw-mark {
  color: #8a96a3;
}

/* current */
.rw-current {
  border: 2px solid #1875d0;
  box-shadow: 0 6px 20px rgba(24, 117, 208, 0.12);
  padding: 18px 18px 16px;
}

.rw-current .rw-num {
  background: #1875d0;
  color: #fff;
  font-size: 1.25rem;
}

.rw-prompt {
  margin: 2px 0 8px;
  font-size: 1.35rem;
  line-height: 1.4;
  color: #1d2b39;
}

.rw-meta {
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.rw-need {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff4d6;
  color: #7a5200;
  font-weight: 700;
  font-size: 0.9rem;
}

.rw-inputline {
  position: relative;
}

.rw-input {
  box-sizing: border-box;
  width: 100%;
  font: inherit;
  font-size: 1.2rem;
  padding: 12px 70px 12px 14px;
  border: 2px solid #c5ced6;
  border-radius: 10px;
  background: #fff;
  color: #1d2b39;
}

.rw-input:focus {
  outline: none;
  border-color: #1875d0;
  box-shadow: 0 0 0 3px rgba(24, 117, 208, 0.18);
}

.rw-counter {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  font-weight: 700;
  color: #8a96a3;
  pointer-events: none;
}

.rw-counter-ok {
  color: #2e9d5b;
}

.rw-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.rw-btn {
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  border: 2px solid #1875d0;
  background: #1875d0;
  color: #fff;
  cursor: pointer;
}

.rw-btn:hover {
  background: #1366b8;
}

.rw-btn:disabled {
  background: #c5ced6;
  border-color: #c5ced6;
  cursor: not-allowed;
}

.rw-btn-secondary {
  background: #fff;
  color: #1875d0;
}

.rw-btn-secondary:hover {
  background: #e7f1ff;
}

.rw-btn-link {
  margin-left: auto;
  border-color: transparent;
  background: none;
  color: #5c6b7a;
  font-weight: 600;
}

.rw-btn-link:hover {
  background: none;
  color: #1875d0;
  text-decoration: underline;
}

.rw-btn:focus-visible {
  outline: 3px solid #0b5ed7;
  outline-offset: 2px;
}

.rw-feedback {
  margin-top: 14px;
}

.rw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rw-chip {
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  animation: rwFlip 0.35s ease both;
}

.rw-chip:nth-child(2) { animation-delay: 0.05s; }
.rw-chip:nth-child(3) { animation-delay: 0.1s; }
.rw-chip:nth-child(4) { animation-delay: 0.15s; }
.rw-chip:nth-child(5) { animation-delay: 0.2s; }
.rw-chip:nth-child(6) { animation-delay: 0.25s; }
.rw-chip:nth-child(n+7) { animation-delay: 0.3s; }

.rw-green { background: #2e9d5b; }
.rw-amber { background: #e0a100; }
.rw-grey  { background: #8a96a3; }

@keyframes rwFlip {
  from { transform: rotateX(90deg); opacity: 0; }
  to   { transform: rotateX(0); opacity: 1; }
}

.rw-msg {
  margin: 10px 0 0;
  color: #243140;
  font-weight: 600;
}

.rw-finished {
  margin-top: 24px;
  text-align: center;
}

.rw-finished p {
  font-size: 1.4rem;
  font-weight: 800;
  color: #2e9d5b;
  margin: 0 0 12px;
}

@media (max-width: 560px) {
  .rw-item { gap: 10px; padding: 10px; }
  .rw-current { padding: 14px 12px; }
  .rw-prompt { font-size: 1.15rem; }
  .rw-input { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rw-chip { animation: none; }
  .rw-item { transition: none; }
}

.rw-live-hint {
  margin: 8px 0 0;
  color: #b35c00;
  font-weight: 600;
}
