* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: linear-gradient(165deg, #7EB8D4 0%, #A8D5E5 35%, #E8F4F8 70%, #F7B5C2 100%);
  background-attachment: fixed;
}

.bg-salon-gradient {
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(125, 207, 182, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 45% at 85% 15%, rgba(247, 181, 194, 0.5), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 90%, rgba(244, 211, 94, 0.35), transparent 55%),
    linear-gradient(160deg, #5B8FA8 0%, #7EB8D4 40%, #B8DCE8 100%);
}

.shake-screen {
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.step-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.45);
  color: rgba(45, 58, 74, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: all 0.25s ease;
}

.step-chip.is-active {
  background: #7EB8D4;
  color: white;
  border-color: #5B8FA8;
  box-shadow: 0 2px 8px rgba(94, 143, 168, 0.35);
  transform: scale(1.05);
}

.step-chip.is-done {
  background: #7DCFB6;
  color: white;
  border-color: #5bb89a;
}

/* Queue pet cards */
.queue-card {
  flex-shrink: 0;
  width: 5.5rem;
  min-height: 5.25rem;
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  padding: 0.4rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .queue-card {
    width: 100%;
  }
}

.queue-card:hover,
.queue-card:active {
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(45, 58, 74, 0.12);
}

.queue-card.is-selected {
  border-color: #7EB8D4;
  box-shadow: 0 0 0 3px rgba(126, 184, 212, 0.45);
}

.queue-card.is-urgent {
  border-color: #E07A8C;
  animation: wiggle 0.6s ease-in-out infinite;
}

.queue-patience {
  width: 100%;
  height: 4px;
  background: rgba(45, 58, 74, 0.12);
  border-radius: 9999px;
  overflow: hidden;
}

.queue-patience-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #E07A8C, #7DCFB6);
  transition: width 0.2s linear;
}

/* Tools */
.tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 4.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.95);
  font-weight: 800;
  color: #2D3A4A;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s, opacity 0.2s, border-color 0.15s;
  user-select: none;
  -webkit-user-select: none;
}

.tool-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(45, 58, 74, 0.12);
}

.tool-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.tool-btn.is-selected {
  border-color: #5B8FA8;
  background: #E8F4F8;
  box-shadow: 0 0 0 3px rgba(126, 184, 212, 0.4);
}

.tool-btn.is-next {
  border-color: #F4D35E;
  box-shadow: 0 0 12px rgba(244, 211, 94, 0.45);
}

.tool-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.tool-btn .tool-icon {
  font-size: 1.65rem;
  line-height: 1;
}

.tool-btn .tool-label {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.tool-btn .tool-key {
  font-size: 0.55rem;
  opacity: 0.4;
  font-weight: 700;
}

/* Mess badges */
.mess-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: rgba(45, 58, 74, 0.75);
  color: white;
  backdrop-filter: blur(4px);
}

.mess-badge.is-clear {
  background: rgba(125, 207, 182, 0.9);
}

/* Shop */
.shop-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(45, 58, 74, 0.08);
  border-radius: 1rem;
  padding: 0.75rem;
}

.shop-item-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: #E8F4F8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.shop-buy-btn {
  flex-shrink: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 0.75rem;
  font-weight: 800;
  font-size: 0.8rem;
  background: #F4D35E;
  color: #2D3A4A;
  transition: all 0.15s;
}

.shop-buy-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: scale(1.03);
}

.shop-buy-btn:disabled {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

.shop-buy-btn.is-maxed {
  background: #7DCFB6;
  color: white;
}

/* Menu floating bubbles */
.menu-bubble {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.35);
  animation: floatUp linear infinite;
  pointer-events: none;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-110vh) scale(1.4); opacity: 0; }
}

#pet-canvas {
  width: min(100%, 340px);
  height: auto;
  aspect-ratio: 1;
}

@media (min-width: 768px) {
  #pet-canvas {
    width: min(100%, 380px);
  }
}
