:root { background: #fff0f7; }

body[data-theme='helados'] {
  --ice-outline: #693b75;
  background: radial-gradient(ellipse at 14% 18%, #fff8d8 0%, transparent 41%),
    radial-gradient(ellipse at 95% 48%, #c9f2f9 0%, transparent 54%),
    linear-gradient(140deg, #ffdbed, #f3ddfd 65%, #dcf3f6);
}
[data-theme='helados'] .game-shell { max-width: 1176px; }
[data-theme='helados'] .game-header {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
[data-theme='helados'] .game-title {
  color: #ffeb9f;
  font-size: clamp(2.28rem, 5vw, 4.25rem);
  margin: 0;
  text-align: start;
}
[data-theme='helados'] .game-toolbar { order: 0; flex-wrap: nowrap; }
[data-theme='helados'] .toolbar-button {
  flex: 0 0 51px;
  width: 51px;
  height: 51px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(#ffcde8, #f477b4 83%, #ed68a7);
  box-shadow: inset 0 3px 0 #fff5fb, 0 4px 0 #ad6197;
}
[data-theme='helados'] .toolbar-button[aria-pressed='true'] { background: linear-gradient(#fff7cd, #ffda8d); }
[data-theme='helados'] .control-label { display: none; }
[data-theme='helados'] .game-instruction {
  margin-block: 23px 13px;
  border: 3px solid #693b75;
  border-radius: 20px;
  padding: 5px clamp(19px, 4vw, 47px);
  background: linear-gradient(#a77ae4, #8557c4);
  color: white;
  box-shadow: inset 0 3px #d4b1ff, 0 4px 0 #693b75;
  text-shadow: 0 2px 0 #663884;
}
[data-theme='helados'] .game-status {
  min-height: 0;
  margin-top: 12px;
  padding: 4px 15px;
  border: 2px solid #d4a8c8;
  color: #59275a;
  background: #fffaf5;
}
[data-theme='helados'] .game-status:empty { display: none; }
[data-theme='helados'] .game-status.success { border-color: #84ac8b; background: #ecffe9; }

.ice-progress {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(6px, 2.4vw, 29px);
  margin: 0 auto 11px;
  padding: 0;
  list-style: none;
}
.ice-progress li { display: flex; align-items: center; gap: 5px; color: #693e78; font-size: .95rem; font-weight: 800; }
.ice-progress li span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid #a682b9;
  border-radius: 50%;
  background: #fff3fb;
  font-size: .85em;
  line-height: 1;
}
.ice-progress li[aria-current='step'] { color: #50236d; }
.ice-progress li[aria-current='step'] span { border-color: #78469a; background: #ffe791; }

.ice-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(179px, 23%, 232px);
  align-items: center;
  gap: clamp(12px, 2.2vw, 23px);
  padding: clamp(9px, 1.2vw, 14px);
  border: 3px solid #ab78bc;
  border-radius: 32px;
  background: #fde7f662;
  box-shadow: inset 0 4px 0 #fffcffb0, 0 6px 0 #d19dc9, 0 17px 27px #6b4c8429;
}
.ice-scene {
  overflow: hidden;
  display: block;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 4px solid var(--ice-outline);
  border-radius: 24px;
  background: #ffe6b8;
  box-shadow: 0 5px 0 #9a62a3;
}
.ice-scene:disabled { opacity: 1; }
.ice-scene { touch-action: none; cursor: grab; }
.ice-scene.ice-target { cursor: grabbing; }
.ice-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; margin: -1px; clip-path: inset(50%); }
.ice-scene canvas { touch-action: none; display: block; width: 100%; height: auto; }
button.ice-scene:not(:disabled):hover { filter: none; }
button.ice-scene:not(:disabled):active { transform: none; }
.ice-scene.ice-target { border-color: #5449a9; outline: 4px solid #a7f7fa; outline-offset: -9px; }

.ice-shelf {
  min-width: 0;
  padding: 10px 10px 8px;
  border: 3px solid #8f61a4;
  border-radius: 22px;
  background: linear-gradient(#fff4fc, #e6ccfa);
  box-shadow: inset 0 0 0 3px #fff6fb, 0 5px 0 #ba8abf;
}
.ice-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.ice-tools[data-count='3'] { grid-template-columns: 1fr; }
.ice-tools[data-count='6'] { grid-template-columns: repeat(3, minmax(48px, 1fr)); }
.ice-tools[data-count='6'] .ice-tool { font-size: .72rem; }
.ice-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 48px;
  min-height: 76px;
  padding: 3px;
  border: 2px solid #b684c4;
  border-radius: 15px;
  background: linear-gradient(#fffafa, #ffe5fa);
  box-shadow: inset 0 2px 0 white, 0 2px 0 #c798c8;
  color: #562661;
  text-align: center;
  text-wrap: balance;
  font-size: .83rem;
  line-height: 1.06;
  font-weight: 800;
  touch-action: none;
}
.ice-tool:nth-child(3n + 2) { background: linear-gradient(#fffff1, #ffe8ae); }
.ice-tool:nth-child(3n) { background: linear-gradient(#f0fffe, #c6f0f7); }
.ice-tool[aria-pressed='true'] { border-color: #6d3b84; background: linear-gradient(#fffae0, #ffd989); box-shadow: 0 0 0 2px #fff4ab, 0 3px 0 #9362a8; }
.ice-tool canvas { width: 55px; height: 55px; max-width: 100%; pointer-events: none; }
.ice-tools[data-count='3'] .ice-tool {
  flex-direction: row;
  justify-content: start;
  gap: 8px;
  min-height: 72px;
  padding-inline: 8px;
  text-align: start;
  font-size: 1rem;
  touch-action: none;
}
.ice-tools[data-count='3'] .ice-tool canvas { flex: 0 0 auto; width: 59px; height: 59px; }
.ice-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 9px 0 0;
  color: #5b356c;
  font-size: .83rem;
  font-weight: 800;
  line-height: 1.1;
}
.ice-hand {
  display: inline-block;
  flex-shrink: 0;
  transform: rotate(-18deg);
  color: #fef9ff;
  -webkit-text-stroke: 1px #714575;
  text-shadow: 0 2px #714575;
  font: 31px/1 'Segoe UI Symbol', sans-serif;
  animation: ice-point 1.5s cubic-bezier(.4, 0, .35, 1) 5;
}
.ice-used .ice-hand { animation: none; }
@keyframes ice-point { 50% { transform: translate(3px, -5px) rotate(-25deg); } }

.ice-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px; margin-top: 17px; }
.ice-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 5px 18px;
  border: 3px solid #713875;
  border-radius: 26px;
  color: #55245d;
  background: linear-gradient(#ffdcf0, #ff90c4);
  box-shadow: inset 0 3px 0 #fff2f9, 0 4px 0 #bc6aab;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.08;
}
.ice-actions button span { font-size: 1.28em; }
.ice-actions :is(.ice-next, .ice-finish) {
  border-color: #38743e;
  background: linear-gradient(#d9ffaf, #81df6d);
  color: #204b29;
  box-shadow: inset 0 3px 0 #f0ffcf, 0 4px 0 #5b9960;
}
.ice-camera {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 22px;
  height: 16px;
  border: 2px solid #753766;
  border-radius: 5px;
  background: #fff3fa;
}
.ice-camera::before { content: ''; width: 6px; height: 6px; border: 2px solid #753766; border-radius: 50%; }
.ice-camera::after { content: ''; position: absolute; top: -4px; width: 8px; height: 3px; border-radius: 3px 3px 0 0; background: #753766; }
.ice-ghost { pointer-events: none; position: fixed; z-index: 5; width: 68px; height: 68px; transform: translate(-50%, -67%); filter: drop-shadow(0 4px 3px #6b427d62); }

@media (max-width: 650px) {
  [data-theme='helados'] .game-header { flex-direction: column-reverse; gap: 11px; }
  [data-theme='helados'] .game-toolbar { justify-content: center; }
  [data-theme='helados'] .game-title { text-align: center; }
  [data-theme='helados'] .game-instruction { margin-block: 16px 10px; }
  .ice-progress { gap: 8px; margin-bottom: 8px; }
  .ice-progress li { gap: 4px; font-size: .75rem; }
  .ice-progress li span { width: 19px; height: 19px; }
  .ice-workbench { grid-template-columns: minmax(0, 1fr); gap: 9px; border-radius: 25px; }
  .ice-scene { border-radius: 18px; border-width: 3px; }
  .ice-shelf { border-width: 2px; padding: 6px; border-radius: 15px; }
  .ice-tools { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .ice-tools[data-count='3'] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ice-tool, .ice-tools[data-count='3'] .ice-tool { flex-direction: column; justify-content: center; gap: 1px; min-height: 63px; padding: 2px 1px 5px; font-size: .69rem; text-align: center; }
  .ice-tool canvas, .ice-tools[data-count='3'] .ice-tool canvas { width: 43px; height: 43px; }
  .ice-hint { margin-top: 5px; font-size: .76rem; }
  .ice-hand { font-size: 23px; }
  .ice-actions { margin-top: 14px; }
  .ice-actions button { min-height: 49px; padding-inline: 13px; font-size: .94rem; }
}
