body[data-theme='salon'] {
  background: radial-gradient(ellipse at 49% -7%, #fff8f0 7%, transparent 59%), linear-gradient(145deg, #f6cbef, #e2d5fb 60%, #d9f0f4);
  --salon-outline: #83538c;
  --salon-cocoa: #562955;
  color: var(--salon-cocoa);
  user-select: none;
}

[data-theme='salon'] .game-shell { max-width: 1180px; padding-inline: clamp(10px, 3vw, 34px); }
[data-theme='salon'] .game-header { margin-block: 5px clamp(12px, 2vw, 26px); position: relative; }
[data-theme='salon'] .game-title {
  font-size: clamp(2.1rem, 5.3vw, 4.5rem);
  color: #fff7eb;
  text-shadow: 0 5px 0 #ae5da7, 0 9px 13px #8e4d9b2b;
  -webkit-text-stroke: 2px #783f88;
}
[data-theme='salon'] .game-toolbar { gap: clamp(7px, 1vw, 11px); }
[data-theme='salon'] .toolbar-button {
  width: 50px;
  height: 50px;
  padding: 0;
  flex: 0 0 50px;
  border-radius: 100%;
  border: 2px solid #a564aa;
  background: linear-gradient(#fff6fc, #f8bce4);
  box-shadow: inset 0 0 0 2px #fff8f9, 0 4px 0 #9f70ab;
}
[data-theme='salon'] .toolbar-button[aria-pressed='true'] { background: linear-gradient(#fff8fa, #e5d1ff); }
[data-theme='salon'] .control-label { display: none; }
[data-theme='salon'] .back-button { margin-inline-end: auto; }
[data-theme='salon'] :focus-visible { outline-color: #773192; outline-offset: 3px; }

.salon-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 12px);
  margin: 0 auto clamp(10px, 1.7vw, 18px);
  width: min(100%, 790px);
}
.salon-steps button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 4px 8px;
  min-height: 54px;
  border: 2px solid #ae86be;
  border-radius: 20px;
  background: linear-gradient(#fff9fa, #ecdaf9);
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 #ae87bb;
  font-weight: 800;
  font-size: clamp(.88rem, 1.5vw, 1.15rem);
  line-height: 1.1;
}
.salon-steps svg { width: 34px; height: 34px; flex: 0 0 auto; }
.salon-steps [aria-current='step'] {
  background: linear-gradient(#fffcf6, #ffc7e5);
  border-color: #ad5ba2;
  box-shadow: inset 0 0 0 2px #fff, 0 4px 0 #ad66aa;
}

.salon-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(208px, 24vw, 282px);
  gap: clamp(8px, 1.2vw, 15px);
  padding: clamp(7px, 1.2vw, 14px);
  border: 2px solid var(--salon-outline);
  border-radius: 28px;
  background: #fff7fb;
  box-shadow: inset 0 0 0 3px #fbe2f6, 0 7px 0 #b28bbd, 0 15px 30px #86518c28;
}
.salon-stage {
  position: relative;
  aspect-ratio: 640 / 470;
  overflow: hidden;
  isolation: isolate;
  border-radius: 19px;
  outline: 2px solid #c298c7;
  outline-offset: -2px;
  align-self: center;
  background: #f4d6ee;
}
.salon-stage canvas { touch-action: none; display: block; width: 100%; height: 100%; }
.salon-scene { position: absolute; inset: 0; }
[data-step='2'] .salon-scene { transform: scale(1.28); transform-origin: 44% 27%; }
.salon-hair, .salon-nails button {
  position: absolute;
  border: 0;
  padding: 0;
  background: transparent;
}
.salon-hair {
  top: 13%;
  left: 19%;
  width: 62%;
  height: 64%;
  border-radius: 44% 48% 38% 39%;
  touch-action: none;
  cursor: grab;
}
.salon-hair:active { cursor: grabbing; }
.salon-nails button {
  left: var(--nail-x);
  top: var(--nail-y);
  width: max(48px, 9%);
  height: max(48px, 17.5%);
  border-radius: 999px;
  touch-action: none;
  transform: translate(-50%, -50%) rotate(var(--nail-angle)) !important;
}
.salon-nails button:focus-visible, .salon-nails button:active { box-shadow: 0 0 0 2px #fff7f7; }
.salon-hand-target {
  position: absolute;
  left: var(--target-x);
  top: var(--target-y);
  width: clamp(48px, 9.5%, 70px);
  height: clamp(48px, 13%, 70px);
  padding: 0;
  border: 2px dashed #91588f;
  border-radius: 50%;
  background: #fff3f22b;
  box-shadow: 0 0 0 2px #fff7f5ac;
  transform: translate(-50%, -50%) !important;
  touch-action: none;
}
.salon-hand-target[aria-pressed='true'] { border-color: #91588f77; background: transparent; box-shadow: none; }
.salon-tool-preview {
  position: absolute;
  z-index: 2;
  width: clamp(37px, 10%, 78px);
  transform: translate(-14%, -78%) rotate(var(--tool-tilt, 0deg)) scale(var(--tool-scale, 1));
  transform-origin: 18% 76%;
  filter: drop-shadow(0 2px 2px #65265c69);
  pointer-events: none;
  animation: salon-tool-enter .16s ease-out both;
}
.salon-tool-preview svg { display: block; width: 100%; }
@keyframes salon-tool-enter {
  from { opacity: 0; scale: .75; }
  to { opacity: 1; scale: 1; }
}
.salon-gesture-progress {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 4%;
  width: clamp(90px, 24%, 180px);
  height: 13px;
  accent-color: #ce4fa4;
  transform: translateX(-50%);
  pointer-events: none;
}
.salon-hand-guide {
  position: absolute;
  left: 54%;
  top: 29%;
  transform: rotate(-31deg);
  color: #fff;
  filter: drop-shadow(0 2px 3px #64345ebf);
  font-size: clamp(26px, 5vw, 53px);
  pointer-events: none;
  animation: salon-show-gesture 1.4s ease-in-out 4;
}
[data-step='2'] .salon-hand-guide { left: 64%; top: 24%; }
@keyframes salon-show-gesture {
  50% { transform: translate(-14px, -8px) rotate(-25deg) scale(.91); }
}

.salon-tray {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: clamp(9px, 1.5vw, 20px);
  gap: clamp(9px, 1.8vw, 18px);
  border: 2px solid #c79ac7;
  border-radius: 19px;
  background: linear-gradient(155deg, #ffe8f7, #f6e1fb 80%);
  box-shadow: inset 0 2px 0 #fff;
}
.salon-step-copy { text-align: center; }
.salon-step-copy h2 {
  margin: 0;
  color: #73337a;
  font-size: clamp(1.35rem, 2.8vw, 2.25rem);
  font-weight: 800;
  line-height: 1.05;
  text-wrap: balance;
}
.salon-prompt { margin: 4px 0 0; color: #66356e; line-height: 1.1; font-weight: 700; font-size: .98rem; }
.salon-tools {
  align-content: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.salon-tools button {
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 1px 5px;
  color: var(--salon-cocoa);
  border: 2px solid #ad78b4;
  border-radius: 15px;
  background: linear-gradient(#fffdf5, #f9e9fb);
  box-shadow: inset 0 0 0 2px #fff8fb, 0 3px 0 #bf92c4;
  font-size: .94rem;
  font-weight: 800;
  line-height: 1.03;
}
.salon-tools svg { width: min(88%, 50px); height: 46px; }
.salon-tools [aria-pressed='true'] { border-color: #8d3b8c; background: linear-gradient(#fff8d0, #ffdbed); box-shadow: inset 0 0 0 2px #fff, 0 3px 0 #a957a2; }
.salon-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.salon-actions button {
  flex: 1 1 auto;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 3px 11px;
  color: #2c4f31;
  border: 2px solid #478452;
  border-radius: 22px;
  background: linear-gradient(#e9ffa6, #a6e779);
  box-shadow: inset 0 0 0 2px #fbffe9, 0 4px 0 #6aaa69;
  font-size: clamp(1rem, 1.9vw, 1.3rem);
  font-weight: 800;
}
.salon-actions svg { width: 30px; height: 30px; flex: 0 0 auto; }
.salon-arrow { color: #226637; font-size: 1.35em; }
.salon-actions .salon-save { color: #702756; border-color: #b363a0; background: linear-gradient(#fff0f8, #ffacd8); box-shadow: inset 0 0 0 2px #fff9fa, 0 4px 0 #cc78b2; }
.salon-quiet {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 760px) {
  [data-theme='salon'] .game-toolbar { position: absolute; inset: 0 0 auto; }
  [data-theme='salon'] .game-title { padding-inline: 180px; }
}
@media (max-width: 760px) {
  .salon-steps span { display: none; }
  .salon-steps button { min-height: 48px; }
  .salon-workbench { grid-template-columns: minmax(0, 1fr); padding: 7px; border-radius: 22px; }
  .salon-tray { gap: 8px; padding: 8px; }
  .salon-step-copy { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 3px 12px; }
  .salon-step-copy h2 { font-size: 1.25rem; }
  .salon-prompt { margin: 0; font-size: .87rem; }
  .salon-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .salon-tools button { min-width: 48px; padding: 3px 0; font-size: .8rem; }
  .salon-tools svg { height: 32px; }
  .salon-actions button { min-height: 48px; }
  [data-step='3'] .salon-tools { grid-template-columns: repeat(3, minmax(48px, 1fr)); }
}

[data-salon-tool] { touch-action: none; }
