

@layer components {

  
  .mh-plan-container {
    width: 100%;
    height: 380px;
    background-color: #fdfdfd;
    border: 2px solid var(--mh-black);
    box-shadow: 8px 8px 0px var(--mh-black);
    background-image:
      linear-gradient(#e0e0e0 1px, transparent 1px),
      linear-gradient(90deg, #e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
    position: relative;
    overflow: hidden;
  }
  .mh-plan-grid {
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-columns: repeat(20, 1fr);
    grid-template-rows: repeat(20, 1fr);
    padding: 20px;
  }
  .mh-room {
    background: #fff;
    border: 3px solid var(--mh-black);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: scale(0.95);
    animation: popOnGrid 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
  }
  .mh-room-living   { grid-column: 2 / 12;  grid-row: 3 / 11;  animation-delay: 0.2s; }
  .mh-room-kitchen  { grid-column: 12 / 19; grid-row: 3 / 9;   animation-delay: 0.8s; }
  .mh-room-bath     { grid-column: 12 / 16; grid-row: 9 / 13;  animation-delay: 1.4s; font-size: 0.7rem; }
  .mh-room-corridor { grid-column: 8 / 12;  grid-row: 11 / 18; animation-delay: 2.0s; border-top: none; }
  .mh-room-bed      { grid-column: 12 / 19; grid-row: 13 / 18; animation-delay: 2.6s; }

  .mh-room-name {
    font-weight: 700;
    font-size: 0.7rem;
    margin-bottom: 4px;
    text-transform: uppercase;
  }
  .mh-room-task {
    font-size: 0.6rem;
    background: var(--mh-neon);
    color: #000;
    padding: 2px 4px;
    opacity: 0;
    transform: translateY(5px);
    animation: taskFadeIn 0.4s ease forwards;
  }
  .mh-room-living   .mh-room-task { animation-delay: 0.6s; }
  .mh-room-kitchen  .mh-room-task { animation-delay: 1.2s; }
  .mh-room-bath     .mh-room-task { animation-delay: 1.8s; }
  .mh-room-corridor .mh-room-task { animation-delay: 2.4s; }
  .mh-room-bed      .mh-room-task { animation-delay: 3.0s; }

  .mh-plan-worker {
    grid-column: 14 / 17;
    grid-row: 10 / 14;
    font-size: 2.5rem;
    z-index: 20;
    opacity: 0;
    animation: popOnGrid 0.5s ease forwards 3.2s;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  
  @keyframes taskFadeIn { to { opacity: 1; transform: translateY(0); } }

  
  @media (prefers-reduced-motion: reduce) {
    .mh-room, .mh-room-task, .mh-plan-worker {
      animation: none !important;
      opacity: 1 !important;
      transform: none !important;
    }
  }
}
