#tangible-layer {
  position: absolute;
  inset: 0;

  width: auto;
  height: auto;
  min-height: 0;

  background: transparent;
  overflow: hidden;

  pointer-events: none;
  z-index: 1000;

  contain: layout paint;
  isolation: isolate;
}

#tangible-layer img {
  -webkit-user-drag: none;
  -moz-user-select: none; 
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: auto;
}

.tangible-menu {
  position: absolute;
  bottom: 2px;
  right: 2px;
  display: flex;
  gap: 2px;
  pointer-events: auto;
  z-index: 1001;
}

.tangible-action-btn {
    width: 25px;
    height: 25px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.tangible-action-btn img {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: auto;
}

#mess-layer {
  position: absolute;
  inset: -180 -150;
  pointer-events: none;
  z-index: 0;
}

.tangible-dock {
  position: relative;
  border-radius:8px;
}

/* ✨ White flash effect */
.tangible-dock.flash {
  background-color: rgba(255, 251, 0, 0.9);
}

/* Optional smooth fade-out with pseudo-element (extra polish) */
.tangible-dock::after {
  content: "";
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  border-radius:8px;
}

.tangible-dock.flash::after {
  opacity: 0.9;
  border-radius:8px;
}

.tangible-object {
  position: absolute;
  pointer-events: auto;
  user-select: none;
  transition: transform 0.1s ease-out;
  filter: drop-shadow(4px 8px 10px rgba(0, 0, 0, 0.6));
  z-index: 5;
}

.tangible-object,
.tangible-object img {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    user-select: none;
}

.tangible-object .object-layer {
  position: relative;
  z-index: 5;
  line-height: 0;
}

.tangible-object .animation-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

#mug-dock,
#pen-dock {
  position: absolute;
}

#mug-dock {
  width: 298px;
  height: 365px;
  bottom: 20px;
  right: 40px;
}

@media (max-width: 500px) {
  #mug-dock {
    top: auto !important;
  }
}

@media (max-width: 1024px) {
  #mug-dock {
    top: 30px;
    right: -210px !important;
  }
}

#pen-dock {
  width: 80px;
  height: 433px;
  bottom: -250px;
  left: -10px;
}

.ring {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 5px solid rgba(120, 60, 20, 0.25); /* brownish stain */
  transform: rotate( var(--angle, 0deg) );
  opacity: 0.6;
  filter: blur(1px);
  animation: fadeRing 60s ease-out forwards;
}

@keyframes fadeRing {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.1); }
}

.ink-spot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(15, 25, 70, 0.8) 100%, rgba(10, 20, 60, 0.4) 60%, transparent 100%);
  opacity: 1;
  animation: fadeInk 25s ease-out forwards;
  filter: blur(0.2px);
  pointer-events: none;
  z-index: 0;
}

@keyframes fadeInk {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* Steam styling */
.steam {
  position: absolute;
  width: 70px;
  height: 60px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.9) 0%, transparent 70%);
  opacity: 0.25;
  animation: rise 8s ease-in-out infinite;
  filter: blur(6px);
  outline: 1px solid red;
}

@keyframes rise {
  0%   { transform: translateY(15px) scale(0.8); opacity: 0.2; }
  50%  { opacity: 0.5; }
  100% { transform: translateY(-60px) scale(1.3); opacity: 0; }
}