#ls-clothes-game,
#ls-clothes-game * { box-sizing: border-box; }

#ls-clothes-game {
  --lsw-ink: #243044;
  --lsw-muted: #718096;
  --lsw-card: #ffffff;
  --lsw-bg: #f7f8ff;
  --lsw-accent: #7c6ce7;
  --lsw-accent-dark: #6354ce;
  --lsw-soft: #eeebff;
  --lsw-green: #4fa978;
  --lsw-green-soft: #e9f8ef;
  --lsw-red: #d95f69;
  --lsw-red-soft: #fff0f1;
  --lsw-yellow: #ffd66b;
  --lsw-line: #d9deea;
  color: var(--lsw-ink);
  font: inherit;
  padding: 28px 16px 52px;
}

#ls-clothes-game button,
#ls-clothes-game input { font: inherit; }

#ls-clothes-game .lsw-shell {
  width: min(940px, 100%);
  margin: 0 auto;
  background: var(--lsw-bg);
  border: 1px solid #eceef7;
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(60, 70, 110, .08);
}

#ls-clothes-game .lsw-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  min-height: 46px;
}

#ls-clothes-game .lsw-back {
  justify-self: start;
  color: var(--lsw-muted);
  text-decoration: none;
  font-weight: 700;
  border-radius: 12px;
  padding: 8px 10px;
}
#ls-clothes-game .lsw-back:hover { color: var(--lsw-accent-dark); }

#ls-clothes-game .lsw-steps { display: flex; align-items: center; gap: 7px; }
#ls-clothes-game .lsw-step {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e5e8f1;
  color: #8a93a6;
  font-size: 13px;
  font-weight: 800;
  transition: .2s ease;
}
#ls-clothes-game .lsw-step.is-active {
  background: var(--lsw-accent);
  color: #fff;
  transform: scale(1.07);
}
#ls-clothes-game .lsw-step.is-done { background: var(--lsw-green); color: #fff; }

#ls-clothes-game .lsw-hint-btn {
  justify-self: end;
  border: 0;
  background: #fff7d7;
  color: #7f6620;
  border-radius: 999px;
  padding: 9px 13px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(123, 101, 28, .08);
}
#ls-clothes-game .lsw-hint-btn:hover { transform: translateY(-1px); }

#ls-clothes-game .lsw-hint {
  margin: 14px auto 0;
  max-width: 700px;
  padding: 13px 16px;
  border-radius: 15px;
  background: #fff7d7;
  color: #6f591a;
  text-align: center;
  font-weight: 650;
}

#ls-clothes-game .lsw-heading { text-align: center; padding: 30px 10px 24px; }
#ls-clothes-game .lsw-kicker {
  text-transform: none;
  letter-spacing: .04em;
  font-size: 14px;
  font-weight: 650;
  color: var(--lsw-muted);
  margin-top: 8px;
}
#ls-clothes-game .lsw-heading h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 56px);
  line-height: 1.04;
  font-weight: 780;
  letter-spacing: -0.03em;
  color: #2f2a68;
}
#ls-clothes-game .lsw-heading p { margin: 0; color: var(--lsw-muted); }

#ls-clothes-game .lsw-panel {
  width: min(760px, 100%);
  margin: 0 auto;
  background: var(--lsw-card);
  border-radius: 24px;
  padding: clamp(18px, 4vw, 34px);
  box-shadow: 0 12px 30px rgba(68, 78, 118, .08);
}

#ls-clothes-game .lsw-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--lsw-muted);
  font-size: 14px;
  font-weight: 700;
}
#ls-clothes-game .lsw-mini-progress {
  height: 8px;
  flex: 1;
  max-width: 330px;
  background: #eceef5;
  border-radius: 999px;
  overflow: hidden;
}
#ls-clothes-game .lsw-mini-progress > span {
  height: 100%;
  display: block;
  background: var(--lsw-accent);
  border-radius: inherit;
  transition: width .3s ease;
}

#ls-clothes-game .lsw-flashcard {
  position: relative;
  width: min(520px, 100%);
  min-height: 260px;
  margin: 0 auto;
  border: 0;
  border-radius: 26px;
  padding: 28px;
  background: linear-gradient(145deg, #ffffff, #f1efff);
  color: var(--lsw-ink);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px #ebe8ff, 0 12px 30px rgba(92, 79, 170, .11);
  display: grid;
  place-items: center;
  text-align: center;
  transition: transform .22s ease, box-shadow .22s ease;
}
#ls-clothes-game .lsw-flashcard:hover { transform: translateY(-2px); }
#ls-clothes-game .lsw-flashcard.is-revealed {
  background: linear-gradient(145deg, #f3f0ff, #ffffff);
  box-shadow: inset 0 0 0 2px #d9d3ff, 0 14px 34px rgba(92, 79, 170, .14);
}
#ls-clothes-game .lsw-card-main {
  display: block;
  font-size: clamp(32px, 7vw, 56px);
  font-weight: 850;
  line-height: 1.05;
}
#ls-clothes-game .lsw-card-small {
  display: block;
  margin-top: 14px;
  color: var(--lsw-muted);
  font-size: 14px;
  font-weight: 700;
}
#ls-clothes-game .lsw-card-translation {
  display: block;
  margin-top: 10px;
  color: var(--lsw-accent-dark);
  font-size: 18px;
  font-weight: 750;
}

#ls-clothes-game .lsw-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
#ls-clothes-game .lsw-btn {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease;
}
#ls-clothes-game .lsw-btn:hover { transform: translateY(-1px); }
#ls-clothes-game .lsw-btn-primary { background: var(--lsw-accent); color: white; }
#ls-clothes-game .lsw-btn-primary:hover { background: var(--lsw-accent-dark); }
#ls-clothes-game .lsw-btn-soft { background: var(--lsw-soft); color: var(--lsw-accent-dark); }
#ls-clothes-game .lsw-btn-ghost { background: #f2f4f8; color: var(--lsw-ink); }
#ls-clothes-game .lsw-btn[disabled] { opacity: .45; cursor: default; transform: none; }

#ls-clothes-game .lsw-match-note,
#ls-clothes-game .lsw-question-note {
  text-align: center;
  color: var(--lsw-muted);
  margin: 0 0 18px;
}

#ls-clothes-game .lsw-match-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 58px;
  isolation: isolate;
}
#ls-clothes-game .lsw-match-col { display: grid; gap: 10px; position: relative; z-index: 2; }
#ls-clothes-game .lsw-match-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
#ls-clothes-game .lsw-match-svg line {
  stroke: var(--lsw-green);
  stroke-width: 4;
  stroke-linecap: round;
  opacity: .82;
}
#ls-clothes-game .lsw-match-card {
  position: relative;
  min-height: 52px;
  border: 2px solid #e4e7ef;
  border-radius: 14px;
  background: #fff;
  color: var(--lsw-ink);
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
  z-index: 2;
  transition: .18s ease;
}
#ls-clothes-game .lsw-match-card:hover { border-color: #cfc8ff; }
#ls-clothes-game .lsw-match-card.is-selected { border-color: var(--lsw-accent); background: var(--lsw-soft); }
#ls-clothes-game .lsw-match-card.is-matched { border-color: #a9dfbf; background: var(--lsw-green-soft); color: #27734a; }
#ls-clothes-game .lsw-match-card.is-wrong { border-color: #ef9ca3; background: var(--lsw-red-soft); animation: lswShake .22s linear 2; }

@keyframes lswShake {
  0%,100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

#ls-clothes-game .lsw-listen-box {
  text-align: center;
  padding: 8px 0 4px;
}
#ls-clothes-game .lsw-speaker {
  width: 108px;
  height: 108px;
  margin: 0 auto 14px;
  border: 0;
  border-radius: 999px;
  background: var(--lsw-soft);
  color: var(--lsw-accent-dark);
  cursor: pointer;
  font-size: 44px;
  box-shadow: 0 8px 22px rgba(92, 79, 170, .13);
}
#ls-clothes-game .lsw-speaker:hover { transform: scale(1.03); }

#ls-clothes-game .lsw-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 22px;
}
#ls-clothes-game .lsw-option {
  min-height: 58px;
  border: 2px solid #e5e7ef;
  border-radius: 15px;
  background: #fff;
  color: var(--lsw-ink);
  padding: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: .18s ease;
}
#ls-clothes-game .lsw-option:hover { border-color: #cfc8ff; background: #fbfaff; }
#ls-clothes-game .lsw-option.is-wrong { border-color: #ef9ca3; background: var(--lsw-red-soft); }
#ls-clothes-game .lsw-option.is-right { border-color: #a9dfbf; background: var(--lsw-green-soft); }

#ls-clothes-game .lsw-feedback {
  min-height: 26px;
  margin-top: 14px;
  text-align: center;
  font-weight: 800;
}
#ls-clothes-game .lsw-feedback.good { color: var(--lsw-green); }
#ls-clothes-game .lsw-feedback.bad { color: var(--lsw-red); }

#ls-clothes-game .lsw-write-wrap { text-align: center; }
#ls-clothes-game .lsw-write-input {
  width: min(440px, 100%);
  height: 58px;
  border: 2px solid #dfe3ec;
  border-radius: 15px;
  padding: 10px 16px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--lsw-ink);
  outline: none;
}
#ls-clothes-game .lsw-write-input:focus { border-color: var(--lsw-accent); box-shadow: 0 0 0 4px rgba(124,108,231,.10); }
#ls-clothes-game .lsw-write-input.is-wrong { border-color: var(--lsw-red); background: var(--lsw-red-soft); }
#ls-clothes-game .lsw-special-box {
  margin: 14px auto 2px;
  padding: 12px 14px 10px;
  width: min(520px, 100%);
  border: 1px solid #e3e0f8;
  border-radius: 16px;
  background: #faf9ff;
}
#ls-clothes-game .lsw-special-title {
  margin: 0 0 9px;
  color: var(--lsw-muted);
  font-size: 14px;
  font-weight: 800;
}
#ls-clothes-game .lsw-special-letters {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin: 0 auto;
}
#ls-clothes-game .lsw-special-letter {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border: 2px solid #cfc8ff;
  border-radius: 13px;
  background: #eeeaff;
  color: var(--lsw-accent-dark);
  cursor: pointer;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(99,84,206,.08);
}
#ls-clothes-game .lsw-special-letter:hover,
#ls-clothes-game .lsw-special-letter:focus-visible {
  border-color: var(--lsw-accent);
  background: var(--lsw-soft);
  outline: none;
}
#ls-clothes-game .lsw-special-note {
  margin: 7px 0 0;
  color: var(--lsw-muted);
  font-size: 13px;
  font-weight: 650;
}

#ls-clothes-game .lsw-results { text-align: center; }
#ls-clothes-game .lsw-cup { font-size: 58px; margin-bottom: 4px; }
#ls-clothes-game .lsw-results h2 { margin: 0 0 8px; font-size: 30px; }
#ls-clothes-game .lsw-results > p { color: var(--lsw-muted); margin-top: 0; }
#ls-clothes-game .lsw-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-top: 24px;
}
#ls-clothes-game .lsw-score-card {
  background: #fafaff;
  border: 1px solid #ecebfa;
  border-radius: 18px;
  padding: 18px 14px;
}
#ls-clothes-game .lsw-score-icon { font-size: 26px; }
#ls-clothes-game .lsw-score-label { margin: 7px 0 9px; font-weight: 800; }
#ls-clothes-game .lsw-score-value { font-size: 30px; font-weight: 900; color: var(--lsw-accent-dark); }
#ls-clothes-game .lsw-score-bar { height: 8px; background: #e7e8ef; border-radius: 999px; overflow: hidden; margin-top: 10px; }
#ls-clothes-game .lsw-score-bar span { display:block; height:100%; background: var(--lsw-green); border-radius: inherit; }
#ls-clothes-game .lsw-total {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  background: var(--lsw-soft);
  color: var(--lsw-accent-dark);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 850;
}

#ls-clothes-game .lsw-audio-warning {
  margin: 14px auto 0;
  max-width: 620px;
  color: #9a661d;
  background: #fff7e7;
  border-radius: 13px;
  padding: 10px 13px;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 640px) {
  #ls-clothes-game { padding: 14px 8px 38px; }
  #ls-clothes-game .lsw-shell { border-radius: 20px; padding: 14px; }
  #ls-clothes-game .lsw-topbar { grid-template-columns: auto 1fr auto; }
  #ls-clothes-game .lsw-steps { justify-self: center; gap: 5px; }
  #ls-clothes-game .lsw-step { width: 26px; height: 26px; font-size: 12px; }
  #ls-clothes-game .lsw-hint-label { display: none; }
  #ls-clothes-game .lsw-hint-btn { width: 42px; height: 42px; padding: 0; display:grid; place-items:center; font-size:20px; }
  #ls-clothes-game .lsw-heading { padding: 23px 8px 17px; }
  #ls-clothes-game .lsw-panel { padding: 16px 12px; border-radius: 18px; }
  #ls-clothes-game .lsw-flashcard { min-height: 220px; }
  #ls-clothes-game .lsw-match-board { gap: 26px; }
  #ls-clothes-game .lsw-match-card { min-height: 48px; padding: 8px 7px; font-size: 14px; }
  #ls-clothes-game .lsw-options { grid-template-columns: 1fr; }
  #ls-clothes-game .lsw-score-grid { grid-template-columns: 1fr; }
}


/* v6 — выбор отдельных учебных блоков */
#ls-clothes-game [hidden] { display: none !important; }
#ls-clothes-game .lsw-block-panel { width: min(820px, 100%); }
#ls-clothes-game .lsw-block-list { display: grid; gap: 15px; }
#ls-clothes-game .lsw-block-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 2px solid #ececf5;
  border-radius: 20px;
  background: #fff;
}
#ls-clothes-game .lsw-block-card.is-mastered {
  border-color: #b9dfc8;
  background: linear-gradient(135deg, #ffffff, #f2fbf6);
}
#ls-clothes-game .lsw-block-icon {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--lsw-soft);
  font-size: 30px;
}
#ls-clothes-game .lsw-block-copy { min-width: 0; }
#ls-clothes-game .lsw-block-number {
  color: var(--lsw-accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
}
#ls-clothes-game .lsw-block-copy h2 { margin: 3px 0 4px; font-size: 22px; }
#ls-clothes-game .lsw-block-copy p { margin: 0 0 12px; color: var(--lsw-muted); }
#ls-clothes-game .lsw-block-progress-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--lsw-muted);
  font-size: 13px;
  font-weight: 800;
}
#ls-clothes-game .lsw-block-progress-line strong { color: var(--lsw-accent-dark); }
#ls-clothes-game .lsw-block-bar {
  height: 8px;
  background: #eceef5;
  border-radius: 999px;
  overflow: hidden;
}
#ls-clothes-game .lsw-block-bar span {
  display: block;
  height: 100%;
  background: var(--lsw-green);
  border-radius: inherit;
}
#ls-clothes-game .lsw-block-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
#ls-clothes-game .lsw-block-skills span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4f5f9;
  color: #677187;
  font-size: 12px;
  font-weight: 800;
}
#ls-clothes-game .lsw-block-start { white-space: nowrap; }
#ls-clothes-game .lsw-flashcard.is-phrase .lsw-card-main {
  font-size: clamp(24px, 4.6vw, 38px);
  line-height: 1.18;
}
#ls-clothes-game .lsw-match-board.is-phrase .lsw-match-card {
  min-height: 64px;
  font-size: 13px;
  line-height: 1.28;
}
#ls-clothes-game .lsw-options.is-phrase .lsw-option {
  min-height: 70px;
  line-height: 1.3;
}
#ls-clothes-game .lsw-write-input.is-phrase {
  width: min(620px, 100%);
  font-size: 19px;
}
#ls-clothes-game .lsw-best-note {
  margin: 12px 0 0;
  color: var(--lsw-muted);
  font-size: 14px;
}
@media (max-width: 700px) {
  #ls-clothes-game .lsw-block-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 13px;
    padding: 16px;
  }
  #ls-clothes-game .lsw-block-start {
    grid-column: 1 / -1;
    width: 100%;
  }
  #ls-clothes-game .lsw-block-icon { width: 52px; height: 52px; font-size: 26px; }
  #ls-clothes-game .lsw-block-copy h2 { font-size: 20px; }
}
@media (max-width: 520px) {
  #ls-clothes-game .lsw-match-board { gap: 18px; }
  #ls-clothes-game .lsw-match-board.is-phrase { gap: 12px; }
  #ls-clothes-game .lsw-match-board.is-phrase .lsw-match-card {
    padding: 8px 6px;
    font-size: 11.5px;
  }
}


/* v1.1: пятый этап — перевод с русского на испанский */
#ls-clothes-game .lsw-translation-prompt {
  width: min(100%, 720px);
  margin: 6px auto 20px;
  padding: 18px 22px;
  border-radius: 18px;
  background: #f5f3ff;
  border: 1px solid #e3defa;
  color: #2f2a68;
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.3;
  font-weight: 800;
  text-align: center;
}
#ls-clothes-game .lsw-translation-prompt.is-phrase {
  font-size: clamp(18px, 2.6vw, 25px);
}
#ls-clothes-game .lsw-writing-detail {
  margin: 14px auto 0;
  color: var(--lsw-muted);
  font-size: 14px;
  text-align: center;
}


/* v1.2 — пояснения к словам о партнёрах и браке */
#ls-clothes-game .lsw-word-note {
  max-width: 720px;
  margin: 12px auto 2px;
  padding: 12px 15px;
  border: 1px solid #e4def7;
  border-radius: 14px;
  background: #f8f6ff;
  color: #5d5870;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}


/* Одежда — визуальные карточки */
#ls-clothes-game .lsw-clothes-pic {
  display: block;
  margin: 0 auto 12px;
  font-size: clamp(62px, 11vw, 96px);
  line-height: 1;
  filter: drop-shadow(0 5px 8px rgba(47,42,104,.10));
}
#ls-clothes-game .lsw-clothes-pic-small {
  font-size: clamp(42px, 7vw, 66px);
  margin-bottom: 10px;
}
#ls-clothes-game .lsw-flashcard {
  min-height: 285px;
}


/* v1.1 — отдельные SVG-картинки для части основной одежды */
#ls-clothes-game .lsw-clothes-img {
  display: block;
  width: min(150px, 42vw);
  height: 150px;
  object-fit: contain;
  margin: 0 auto 10px;
}
#ls-clothes-game .lsw-clothes-img-small {
  width: min(105px, 30vw);
  height: 105px;
  margin-bottom: 8px;
}
