* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #root {
  height: 100%;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

/* Floating bottom-right admin controls (Catalog / Review / UserBadge) are hidden
   while a modal is open so they don't occlude the modal's scrolling content. */
body[data-picker-open="1"] .floating-admin-btn { display: none !important; }

/* Floating × close button anchored to the top-right of large modals.
   44x44 meets Apple HIG touch-target minimum for iPad. */
.modal-close-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 22px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  touch-action: manipulation;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.modal-close-x:hover:not(:disabled) {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
.modal-close-x:disabled { opacity: 0.5; cursor: not-allowed; }

input, textarea, select {
  -webkit-user-select: auto;
  user-select: auto;
}

@keyframes tutPulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.6); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes modeBorderPulse {
  0%   { box-shadow: inset 0 0 0 3px rgba(249,115,22,0.9); }
  50%  { box-shadow: inset 0 0 0 3px rgba(249,115,22,0.25); }
  100% { box-shadow: inset 0 0 0 3px rgba(249,115,22,0.9); }
}
.mode-border-active {
  animation: modeBorderPulse 1.1s ease-in-out infinite;
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 500;
}

.tut-pulse {
  position: fixed;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.3);
  border: 3px solid #2563EB;
  animation: tutPulse 1.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 7003;
}

@keyframes placeBorder {
  0% { border-color: #2563EB; }
  50% { border-color: #93C5FD; }
  100% { border-color: #2563EB; }
}
