/* Extra haunting chores (chores-extra.js) + touch support for every chore. */
#chore {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#chore button {
  touch-action: manipulation;
}
@media (pointer: coarse) {
  .wire-node {
    stroke-width: 10px;
    stroke: rgba(255, 255, 255, 0.35);
  }
}

/* shared progress bar */
.web-progress {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.web-progress div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ffd24d, #7dffa8);
  transition: width 0.1s linear;
}

/* music box */
.mbox-scope {
  background: radial-gradient(ellipse at center, #1c2b2a, #0d1214);
  border-radius: 12px;
  border: 2px solid #5a3f22;
}
.mbox-target {
  fill: none;
  stroke: rgba(125, 255, 225, 0.55);
  stroke-width: 6;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
}
.mbox-cur {
  fill: none;
  stroke-width: 3;
}
.mbox-knobs {
  display: flex;
  justify-content: center;
  gap: 26px;
}
.mbox-knob {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.mbox-dial {
  --r: 0deg;
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d9b06a, #7a5524 70%, #4a3214);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 0 0 3px rgba(0, 0, 0, 0.25);
  transform: rotate(var(--r));
  cursor: grab;
  touch-action: none;
}
.mbox-dial::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 5px;
  width: 4px;
  height: 18px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff6e0;
}
.mbox-wind {
  align-self: center;
  padding: 8px 18px;
  border-radius: 99px;
  border: 2px solid var(--card-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.mbox-wind.ready {
  border-color: #7dffa8;
  box-shadow: 0 0 18px rgba(125, 255, 168, 0.6);
  animation: mboxPulse 0.8s infinite alternate;
}
@keyframes mboxPulse {
  to {
    transform: scale(1.06);
  }
}

/* cobwebs */
.web-canvas {
  width: 100%;
  aspect-ratio: 360 / 210;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, #2a2030, #120a14);
  cursor: none;
  touch-action: none;
}

/* lockpick */
.lock-body {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 14px;
  height: 170px;
  padding: 16px 20px;
  border-radius: 18px;
  background: linear-gradient(#a07a3a, #6b4a1e);
  border: 3px solid #3a2810;
  cursor: pointer;
  overflow: hidden;
  touch-action: none;
}
.lock-shear {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  background: #ffd24d;
  box-shadow: 0 0 10px #ffd24d;
  z-index: 2;
}
.lock-slot {
  position: relative;
  width: 34px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.lock-pin {
  position: absolute;
  left: 5px;
  right: 5px;
  top: 50%;
  height: 120px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(90deg, #8c8c98, #dcdce6, #8c8c98);
}
.lock-slot.cur .lock-pin {
  background: linear-gradient(90deg, #4fd6b8, #b6fff0, #4fd6b8);
  box-shadow: 0 0 12px #7dffe1;
}
.lock-slot.set .lock-pin {
  background: linear-gradient(90deg, #3dbb6a, #9dffbe, #3dbb6a);
}
.lock-body.open {
  box-shadow: 0 0 30px #7dffa8;
}

/* bones */
.bones-svg {
  border-radius: 12px;
  background: radial-gradient(ellipse at 75% 50%, #2c2040, #120a18);
}
.bone {
  fill: #efe6cf;
  stroke: #8c7c5c;
  stroke-width: 1.2;
}
.bone .hole {
  fill: #2a1e30;
  stroke: none;
}
.bone .line {
  fill: none;
  stroke: #efe6cf;
  stroke-width: 3.5;
  stroke-linecap: round;
}
.bone-slot,
.bone-slot .line,
.bone-slot .hole {
  fill: rgba(255, 255, 255, 0.04);
  stroke: rgba(200, 180, 255, 0.6);
  stroke-dasharray: 3 3;
  stroke-width: 1.4;
}
.bone-slot .line {
  fill: none;
}
.bone.ghostly {
  opacity: 0.4;
}
.bone.loose {
  cursor: grab;
  filter: drop-shadow(0 0 4px rgba(255, 240, 200, 0.4));
}
.bone.dragging {
  cursor: grabbing;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}
.bone.placed {
  filter: drop-shadow(0 0 6px #7dffa8);
}

/* cat feeding */
.cat-lane {
  position: relative;
  height: 110px;
  border-radius: 14px;
  background: linear-gradient(#1c1428, #2a1c34 70%, #3a2614 70%);
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
}
.cat-bowl {
  position: absolute;
  right: 72px;
  bottom: 18px;
  font-size: 34px;
  width: 44px;
  text-align: center;
}
.cat-bowl::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -60px;
  bottom: 0;
  width: 44px;
  margin-left: -22px;
  border-radius: 10px;
  border: 2px dashed rgba(125, 255, 225, 0.4);
}
.cat-cat {
  position: absolute;
  right: 12px;
  bottom: 18px;
  font-size: 46px;
  transform-origin: bottom center;
}
.cat-cat.nom {
  animation: catNom 0.25s;
}
@keyframes catNom {
  50% {
    transform: scale(1.2, 0.85);
  }
}
.cat-fish {
  position: absolute;
  left: 0;
  top: 34px;
  font-size: 28px;
  will-change: transform;
}
.cat-fish.eaten {
  opacity: 0;
  transition: opacity 0.15s;
}
.cat-fish.miss {
  opacity: 0.25;
  filter: grayscale(1);
}
.cat-fed {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.cat-fed span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}
.cat-fed span.on {
  background: #7dffa8;
  box-shadow: 0 0 8px #7dffa8;
}
.cat-fed span.bad {
  background: var(--danger);
}

/* cursed spell */
.spell-slots,
.spell-tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.spell-slot {
  width: 34px;
  height: 42px;
  border-bottom: 3px solid rgba(200, 180, 255, 0.5);
  font-family: 'Creepster', cursive;
  font-size: 30px;
  text-align: center;
  color: #b48cff;
}
.spell-slot.on {
  border-color: #b48cff;
  text-shadow: 0 0 10px #b48cff;
}
.spell-slots.cast .spell-slot {
  color: #7dffa8;
  text-shadow: 0 0 14px #7dffa8;
}
.spell-tile {
  width: 42px;
  height: 48px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(#efe3c4, #cdbb8e);
  color: #3a2416;
  font-family: 'Creepster', cursive;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 3px 0 #7a6440;
}
.spell-tile.used {
  visibility: hidden;
}
.spell-tile.wrong {
  animation: spellWrong 0.35s;
  background: #ff8a9a;
}
@keyframes spellWrong {
  25% {
    transform: translateX(-5px) rotate(-6deg);
  }
  75% {
    transform: translateX(5px) rotate(6deg);
  }
}

/* vase */
.vase-stage {
  position: relative;
  height: 130px;
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 100%, #3a2a1c, #140c18 70%);
  overflow: hidden;
  touch-action: none;
  cursor: pointer;
}
.vase-pot {
  position: absolute;
  left: 50%;
  bottom: 22px;
  font-size: 70px;
  line-height: 1;
  transform-origin: 50% 95%;
}
.vase-shelf {
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 12px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(#7a5524, #4a3214);
}
.vase-push {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.25);
}
.vase-push.l {
  left: 0;
}
.vase-push.r {
  right: 0;
  justify-content: flex-end;
}
.vase-push.on {
  color: #7dffe1;
  background: rgba(125, 255, 225, 0.08);
}
.vase-gauge {
  position: relative;
  height: 16px;
  border-radius: 99px;
  background: linear-gradient(90deg, #ff6b81, #ffd24d 30%, #7dffa8 50%, #ffd24d 70%, #ff6b81);
}
.vase-safe {
  display: none;
}
.vase-mark {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 6px;
  margin-left: -3px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 8px #fff;
}
.vase-gauge.warn .vase-mark {
  background: #ff6b81;
  box-shadow: 0 0 10px #ff6b81;
}

/* portrait */
.portrait-row {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.portrait {
  width: calc(50% - 5px);
  max-width: 170px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  cursor: crosshair;
  touch-action: none;
}
.portrait-hit {
  fill: none;
  stroke: #7dffa8;
  stroke-width: 3;
}
