.tree-list, .tree-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.tree-children {
    padding-left: 1.2em;
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 2px 0;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    color: #333;
}

.tree-item:hover { background-color: #e0e0e0; }
.tree-item.selected { background-color: #cce8ff !important; }

.arrow {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    line-height: 1.2em;
    text-align: center;
    flex-shrink: 0;
    color: #666;
    font-size: 10px;
}

.arrow.right::before {
    content: "";
    display: inline-block;
    border-style: solid;
    border-width: 4px 0 4px 6px;
    border-color: transparent transparent transparent #555;
    vertical-align: middle;
}

.arrow.down::before {
    content: "";
    display: inline-block;
    border-style: solid;
    border-width: 6px 4px 0 4px;
    border-color: #555 transparent transparent transparent;
    vertical-align: middle;
}

.arrow.spacer::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 1px;
}

.name {
    margin-left: 2px;
    flex-grow: 1;
}

/* コンテキストメニュー・入力関連 */
#context-menu {
    position: fixed;
    display: none;
    z-index: 1000;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
    min-width: 150px;
    padding: 5px 0;
}
#context-menu div {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 13px;
}
#context-menu div:hover { background-color: #007acc; color: white; }

.rename-input {
    font-size: 14px;
    border: 1px solid #007acc;
    padding: 0 4px;
    border-radius: 2px;
}

/* --- Drag & Drop Visual Feedback --- */

/* ドラッグ中の要素（半透明にするなど） */
.tree-item-container.dragging {
    opacity: 0.5;
}

/* フォルダの中にドロップしようとしている時 */
.tree-item.drop-inside {
    background-color: #d0e7ff !important; /* 薄い青 */
    outline: 2px dashed #1976d2;
}

/* 上に挿入（隙間を作る線） */
.tree-item-container.drop-before > .tree-item {
    border-top: 2px solid #1976d2;
    margin-top: -2px; /* レイアウト崩れ防止 */
}

/* 下に挿入 */
.tree-item-container.drop-after > .tree-item {
    border-bottom: 2px solid #1976d2;
    margin-bottom: -2px;
}

/* フォルダを開くアニメーション用 */
.tree-children {
    transition: all 0.2s ease-in-out;
}