.pk35-2048, .pk35-2048 * { box-sizing: border-box; }
.pk35-2048 {
  --p48-ink: #17202a;
  --p48-orange: #ef8b22;
  width: 100%;
  max-width: 540px;
  margin: 1.5rem auto;
  color: var(--p48-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  outline: none;
}
.pk35-2048__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pk35-2048__scores { display: flex; gap: 8px; }
.pk35-2048__scores span {
  min-width: 86px; padding: 7px 10px; border-radius: 7px; background: #17202a; color: #fff;
  text-align: center; font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.pk35-2048__scores strong { display: block; margin-top: 2px; color: #fff; font-size: 20px; line-height: 1.1; }
.pk35-2048 button {
  appearance: none !important; opacity: 1 !important; visibility: visible !important;
  border: 0 !important; border-radius: 7px !important; box-shadow: none !important;
  background: var(--p48-orange) !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
  font: 700 16px/1 system-ui, sans-serif !important; text-shadow: none !important; cursor: pointer;
}
.pk35-2048__new { min-height: 45px; padding: 10px 16px !important; white-space: nowrap; }
.pk35-2048__help { margin: 13px 0; font-size: 15px; line-height: 1.45; }
.pk35-2048__board {
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(4, minmax(0, 1fr)) !important; gap: 10px !important;
  width: 100%; aspect-ratio: 1; padding: 10px !important; margin: 0 !important;
  border-radius: 10px; background: #8b8178 !important; touch-action: none; user-select: none;
}
.pk35-2048__tile {
  display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0;
  border-radius: 7px; background: #cdc5bb; color: var(--p48-ink);
  font: 800 clamp(24px, 8vw, 50px)/1 system-ui, sans-serif;
}
.pk35-2048__tile[data-value="2"] { background: #eee4da; }
.pk35-2048__tile[data-value="4"] { background: #ede0c8; }
.pk35-2048__tile[data-value="8"] { background: #f2b179; color: #fff; }
.pk35-2048__tile[data-value="16"] { background: #f59563; color: #fff; }
.pk35-2048__tile[data-value="32"] { background: #f67c5f; color: #fff; }
.pk35-2048__tile[data-value="64"] { background: #f65e3b; color: #fff; }
.pk35-2048__tile[data-value="128"], .pk35-2048__tile[data-value="256"] { background: #edcf72; color: #fff; font-size: clamp(20px, 7vw, 42px); }
.pk35-2048__tile[data-value="512"], .pk35-2048__tile[data-value="1024"], .pk35-2048__tile[data-value="2048"] { background: #edc53f; color: #fff; font-size: clamp(18px, 6vw, 36px); }
.pk35-2048__tile[data-large="true"] { background: #3c3a32; color: #fff; font-size: clamp(15px, 5vw, 30px); }
.pk35-2048__controls { display: none; grid-template-columns: repeat(3, 54px); grid-template-rows: repeat(2, 48px); justify-content: center; gap: 6px; margin-top: 14px; }
.pk35-2048__controls button { min-height: 48px; font-size: 25px !important; }
.pk35-2048__controls [data-move="up"] { grid-column: 2; }
.pk35-2048__controls [data-move="left"] { grid-column: 1; grid-row: 2; }
.pk35-2048__controls [data-move="down"] { grid-column: 2; grid-row: 2; }
.pk35-2048__controls [data-move="right"] { grid-column: 3; grid-row: 2; }
.pk35-2048__message { min-height: 1.5em; margin: 12px 0 0; text-align: center; font-weight: 700; }
@media (max-width: 620px) {
  .pk35-2048 { max-width: 500px; }
  .pk35-2048__board { gap: 7px !important; padding: 7px !important; border-radius: 8px; }
  .pk35-2048__controls { display: grid; }
}
@media (max-width: 380px) {
  .pk35-2048__header { align-items: stretch; }
  .pk35-2048__scores span { min-width: 68px; padding-inline: 6px; }
  .pk35-2048__new { padding-inline: 10px !important; }
}

