.playground {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 590px;
  padding: 30px;
  border: 1px solid #173d2a20;
  border-radius: 30px;
  background: #fffaf0;
  color: #18352a;
  box-shadow: 0 14px 0 #18352a09, 0 30px 80px #18352a0a;
  text-align: left;
}
.playground [hidden] { display: none !important; }
.pg-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
}
.pg-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pg-brand img { display: block; flex: 0 0 36px; border-radius: 10px; }
.pg-label {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.pg-example { flex: none; font-size: 11px; font-weight: 800; color: #526757; white-space: nowrap; }
.pg-goal {
  margin: 0 0 9px;
  font-family: var(--display, 'Fredoka', sans-serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.pg-rule { max-width: 450px; margin: 0; font-size: 13px; line-height: 1.7; color: #53695c; }
.pg-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 355px;
  margin: 23px 0 18px;
  padding: 16px 10px 23px;
  border-radius: 21px;
  background: #f6e7e0;
  background-image: radial-gradient(#9e503c14 1px, transparent 1px);
  background-size: 15px 15px;
  overflow: hidden;
}
.pg-moves { display: flex; align-items: baseline; justify-content: center; gap: 7px; margin: 0 0 22px; color: #70594e; }
.pg-moves-value { font-family: var(--display, 'Fredoka', sans-serif); font-size: 24px; font-weight: 600; color: #18352a; }
.pg-moves-label { font-size: 11px; font-weight: 700; }
.pg-board { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; min-width: 0; max-width: 100%; }
.pg-word-row { display: flex; justify-content: center; gap: 9px; max-width: 100%; }
.pg-letter {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #fffdf8;
  border-radius: 12px;
  background: #fff8e8;
  color: #8b8478;
  box-shadow: 0 4px 0 #d6c0aa, inset 0 2px 0 #fffdf8;
  font-family: var(--display, 'Fredoka', sans-serif);
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
  transition: background .2s, color .2s, box-shadow .2s;
}
.pg-letter.pg-letter-next { background: #fffdf8; color: #18352a; box-shadow: 0 4px 0 #d6a394, 0 0 0 2px #ff6b57; }
.pg-letter.pg-letter-done { background: #ffd0c4; color: #9c3428; box-shadow: 0 4px 0 #e49b8c, inset 0 2px 0 #ffe3dc; }
.pg-row-done .pg-letter { background: #ff6b57; color: #fffaf0; border-color: #ffb0a0; box-shadow: 0 4px 0 #c85242, inset 0 2px 0 #ff9584; }
.pg-letter.pg-preview { background: #ffdb9d; color: #18352a; box-shadow: 0 4px 0 #d6a394, 0 0 0 3px #ff6b57; }
.pg-keyboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: calc(var(--pg-key-cols) * 64px - 12px);
  margin-top: 28px;
}
.pg-key {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid #fffdf7;
  border-radius: 14px;
  background: #fffaf0;
  color: #18352a;
  box-shadow: 0 5px 0 #d1b898, inset 0 2px 0 #fffdf7;
  font-family: var(--display, 'Fredoka', sans-serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .18s, opacity .18s, box-shadow .18s, transform .18s;
}
.pg-key.pg-key-multi { background: #ffefbf; box-shadow: 0 5px 0 #d6b26a, 0 0 0 2px #ff6b57; }
.pg-key.pg-key-off { opacity: .42; }
.pg-key:focus-visible { outline: 3px solid #18352a; outline-offset: 5px; }
.pg-key:not(:disabled):active { transform: translateY(3px); box-shadow: 0 2px 0 #d1b898; }
.pg-key-count {
  position: absolute;
  top: -7px;
  right: -6px;
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 5px;
  border-radius: 99px;
  background: #cf4b39;
  color: #fffaf0;
  box-shadow: 0 0 0 2px #f6e7e0;
  font-size: 13px;
}
.pg-key-multi .pg-key-count { background: #ffc23a; color: #18352a; }
.pg-key.pg-hint { outline: 3px dashed #18352a; outline-offset: 4px; background: #ffc23a; color: #18352a; box-shadow: 0 5px 0 #c59325, inset 0 2px 0 #ffe094; }
.pg-progress { height: 4px; border-radius: 4px; overflow: hidden; background: #18352a12; }
.pg-progress-fill { height: 100%; border-radius: inherit; background: #ff6b57; transition: width .3s; }
.pg-status { display: flex; align-items: center; justify-content: center; min-height: 45px; margin: 8px 0 12px; text-align: center; font-size: 12px; line-height: 1.6; color: #4b6254; }
.pg-controls { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pg-control { padding: 10px 14px; border: 1px solid #18352a25; border-radius: 99px; background: transparent; color: #18352a; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; transition: background .15s, transform .15s; }
.pg-control-hint { background: #f7df91; border-color: #f7df91; }
.pg-control:disabled { opacity: .35; cursor: default; }
.pg-control:not(:disabled):hover { background: #e2eadf; transform: translateY(-2px); }
.pg-control:focus-visible, .pg-next:focus-visible, .pg-win-link:focus-visible { outline: 3px solid #d95742; outline-offset: 4px; }
.pg-next { display: block; margin: 17px auto 0; padding: 7px; border: 0; background: transparent; color: #425b4d; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; text-underline-offset: 4px; }
.pg-next:hover { text-decoration: underline; }
.pg-win { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 25px; background: #f6e7e0; text-align: center; animation: pg-appear .4s ease both; }
.pg-win-stars { display: block; margin-bottom: 18px; color: #bc7e08; font-size: 36px; letter-spacing: 7px; animation: pg-stars .6s cubic-bezier(.2,.8,.2,1) both; }
.pg-win-title { max-width: 340px; margin: 0 0 12px; font-family: var(--display, 'Fredoka', sans-serif); font-size: 35px; font-weight: 500; line-height: 1.1; letter-spacing: -.025em; }
.pg-win-copy { max-width: 280px; margin: 0 0 23px; color: #6b584f; font-size: 13px; line-height: 1.6; }
.pg-win-link { display: inline-flex; align-items: center; gap: 18px; padding: 11px 11px 11px 22px; border-radius: 99px; background: #18352a; color: #fff8e8; text-decoration: none; font-size: 13px; font-weight: 800; }
.pg-win-link b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #ffc23a; color: #18352a; font-size: 20px; }
.pg-solved .pg-progress-fill { background: #cf4b39; }
.pg-failed .pg-moves-value, .pg-failed .pg-status { color: #a52f24; }
.pg-failed .pg-status { font-weight: 900; }
.playground[data-motion="false"] * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@keyframes pg-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes pg-stars { from { transform: scale(.6) rotate(-10deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
@media (max-width: 420px) {
  .playground { padding: 21px 17px; border-radius: 23px; }
  .pg-topline { gap: 9px; }
  .pg-label { font-size: 9px; }
  .pg-example { font-size: 10px; }
  .pg-brand { gap: 7px; }
  .pg-brand img { width: 30px; height: 30px; flex-basis: 30px; }
  .pg-goal { font-size: 23px; }
  .pg-rule { font-size: 12px; }
  .pg-stage { min-height: 350px; padding-inline: 8px; }
  .pg-word-row { gap: 7px; }
  .pg-letter { width: 42px; height: 42px; border-radius: 10px; font-size: 24px; }
  .pg-keyboard { gap: 10px; max-width: calc(var(--pg-key-cols) * 56px - 10px); }
  .pg-key { flex-basis: 46px; width: 46px; height: 46px; border-radius: 12px; font-size: 25px; }
  .pg-control { padding: 9px 11px; font-size: 11px; }
  .pg-win-title { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  .playground * { animation: none !important; transition: none !important; }
}
