body { font-family: sans-serif; text-align: center; background-color: #f0f0f0; margin: 0; padding: 20px; }

#stage {
    width: 900px; height: 550px; background-color: white; 
    background-image: 
        linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px), 
        linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 20px 20px; border: 2px solid #333; margin: 20px auto; 
    position: relative; /* 子要素の配置基準 */
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ホール背景の設定 */
#stage.hhf {
    background-image: url('hhf_pult.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

#stage.none {
    background-image: 
        linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px),
        linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px);
}

/* センターライン（赤色） */
#stage::after { 
    content: ""; position: absolute; left: 50%; top: 0; bottom: 0; 
    width: 1px; background-color: rgba(255, 0, 0, 0.3); pointer-events: none; 
}

/* 楽器・椅子のスタイル */
.item { 
    position: absolute; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    user-select: none; 
    font-weight: bold; 
    box-sizing: border-box; 
    cursor: move;
    z-index: 5;
}

/* 名前ラベルのスタイル */
.label { 
    position: absolute; 
    top: 105%; /* アイコンのすぐ下に配置 */
    font-size: 11px; 
    color: #333; 
    background: rgba(255,255,255,0.9); 
    padding: 1px 4px; 
    border-radius: 3px; 
    border: none;
    white-space: nowrap; 
    pointer-events: none; /* ラベルを掴んでしまわないように */
}

.controls { background: white; padding: 15px; border-radius: 8px; max-width: 900px; margin: 0 auto; }

/* 選択された時の青枠 */
.selected { outline: 3px solid #007bff; z-index: 10 !important; }

button { padding: 8px 12px; cursor: pointer; border: 1px solid #ccc; background: #fff; border-radius: 4px; margin: 2px; }
button:hover { background: #eee; }

.delete-btn { background-color: #ffcccc; border-color: #ff8888; color: #990000; }

#counter-display {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    text-align: left;
}