/* Piggy Lasso — iPhone-first farm cartoon */

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

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #7ec8e3;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  color: #3b2a1a;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 5;
  pointer-events: none;
  padding: max(10px, env(safe-area-inset-top)) 12px 0;
}

.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.brand .title {
  font-size: clamp(1rem, 4.5vw, 1.25rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #5c3317;
}

.brand .round {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b4423;
  opacity: 0.9;
}

.icon-btn {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid #5c3317;
  background: #fff8e7;
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 4px 0 #c9b896;
  cursor: pointer;
}

.icon-btn.off {
  opacity: 0.45;
}

.icon-btn:active {
  transform: scale(0.94);
}

.hint {
  margin: 10px auto 0;
  max-width: 20rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #4a3422;
  background: rgba(255, 248, 231, 0.82);
  border: 2px solid rgba(92, 51, 23, 0.25);
  border-radius: 999px;
  padding: 8px 14px;
  pointer-events: none;
  transition: opacity 0.25s;
}

.hint.dim {
  opacity: 0.35;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom));
  background: rgba(40, 28, 16, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.overlay.hidden {
  display: none;
}

.card {
  width: min(100%, 22rem);
  background: linear-gradient(180deg, #fff8e7, #f5e6c8);
  border: 4px solid #5c3317;
  border-radius: 22px;
  box-shadow: 0 12px 0 #3d2414, 0 20px 40px rgba(0, 0, 0, 0.25);
  padding: 22px 20px 18px;
  text-align: center;
}

.card h1 {
  margin: 0 0 10px;
  font-size: 1.65rem;
  color: #5c3317;
}

.card .body {
  font-size: 0.95rem;
  line-height: 1.45;
  color: #4a3422;
  text-align: left;
}

.card .body p {
  margin: 0 0 10px;
}

.card .body ul {
  margin: 0 0 4px;
  padding-left: 1.2rem;
}

.card .body li {
  margin-bottom: 6px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  min-height: 52px;
  border-radius: 14px;
  border: 3px solid #5c3317;
  background: #fff;
  color: #5c3317;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 #c9b896;
  font-family: inherit;
}

.btn.primary {
  background: linear-gradient(180deg, #f0c14b, #d4a017);
  color: #3b2a1a;
}

.btn:active {
  transform: scale(0.97);
}
