/* ============================================================
    【フォント設定】
    ============================================================ */
/* 自前で用意したフォントファイルを定義する */
@font-face {
    font-family: 'Chicago'; /* CSS内で使う名前（自由に変えられます） */
    src: url('/fonts/Chicago_Plain.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Helvetica'; /* CSS内で使う名前（自由に変えられます） */
    src: url('/fonts/helvetica-narrow.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Monaco'; /* CSS内で使う名前（自由に変えられます） */
    src: url('/fonts/Monaco 400.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
/* 実際に適用するクラス */
.legacy-mac-text {
    font-family: 'Chicago', sans-serif; /* 定義した名前を指定 */
    font-smooth: never;
    -webkit-font-smoothing: none; /* アンチエイリアスを切るとドット感が出ます */
    letter-spacing: 0.5px;
}
.mac-text {
    font-family: 'Monaco', sans-serif; /* 定義した名前を指定 */
    font-smooth: never;
    -webkit-font-smoothing: none; /* アンチエイリアスを切るとドット感が出ます */
    letter-spacing: 0.1px;
    font-size: 8pt;
}
/* ここまで */

:root { --sys-font: 'Chicago', 'Monaco', 'Helvetica', 'Geneva', 'Arial', sans-serif; }
body, html {
    margin: 0; padding: 0; height: 100%; overflow: hidden;
    background-color: #55aaaa;
    background-size: 2px 2px;
    font-family: var(--sys-font);
    cursor: default; user-select: none;
}

/*******************
 メニューバー
 *******************/
.menu-bar {
    height: 24px; background: white; border-bottom: 2px solid black;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 12px; font-size: 14px; z-index: 9999;
}
.menu-left, .menu-right { display: flex; align-items: center; }
.menu-item { padding: 4px 12px 4px 12px; height: 24px; line-height: 24px; position: relative; }
.menu-item:active { background: black; color: white; }      /* hover -> active */
.dropdown {
    display: none; position: absolute; top: 28px; left: 0;
    background: white; border: 1px solid black; box-shadow: 3px 3px 0 black;
    min-width: 180px; color: black; z-index: 10000;
}
.menu-item:active .dropdown { display: block; }      /* hover -> active */
/* .menu-itemx { padding: 0 12px 0 12px; height: 24px; line-height: 24px; position: relative; } */
.dropdown-item { padding: 0 12px 0 12px; font-weight: normal; font-size: 13px; cursor: pointer; }
.dropdown-item:hover { background: black; color: white; }
.separator { border-bottom: 1px dotted black; margin: 3px 0; }
.inactive { color: #999999; }

/* --- ウィンドウ --- */
.window {
    position: absolute; background: purple; border: 1px solid black;
    box-shadow: 3px 3px 0 black; display: flex; flex-direction: column;
    z-index: 1000; min-width: 250px; min-height: 200px;
}
.window-header {
    height: 22px; background-image: linear-gradient(black 1px, transparent 1px);
    background-size: 100% 4px; border-bottom: 1px solid black;
    display: flex; align-items: center; justify-content: center;
    position: relative; cursor: move; flex-shrink: 0;
}
.window-title { background: white; padding: 0 12px; font-size: 13px; }

/* --- 閉じるボタン --- */
.close-box {
    position: absolute; left: 6px; top: 4px; width: 12px; height: 12px;
    border: 1px solid black; background: white; cursor: pointer; z-index: 10;
}
.close-box.pressed { background: black; border-color: white; }

/* --- ウィンドウコンテント --- */
.window-content {
    padding: 15px; overflow: auto; flex-grow: 1; background: white;
}
.window-info {
    position: absolute; right: 0px; top: 23px; width: 100%; height: 22px;
    background: white; border-bottom: 1px solid black;
    display: flex; justify-content: space-between; align-items: center;
}
.vscrollbar {
    position: absolute; right: 0; bottom: 0; width: 16px; height: calc(100% - 46px);
    background: white; border-left: 1px solid black; border-top: 1px solid black;
}
.hscrollbar {
    position: absolute; right: 0; bottom: 0; width: 100%; height: 16px;
    background: white; border-left: 1px solid black; border-top: 1px solid black;
}
.resize-handle {
    position: absolute; right: 0; bottom: 0; width: 16px; height: 16px;
    background: white; border-left: 1px solid black; border-top: 1px solid black;
    cursor: nwse-resize; z-index: 10;
    background-image: url('/imgs/resize-handle.ico');
}

/* --- Aboutダイアログスタイル --- */
.about-layout { display: flex; gap: 20px; }
.memory-bar-container { margin-top: 10px; border: 1px solid black; width: 100%; height: 14px; background: white; }
.memory-bar-fill { background: black; height: 100%; width: 45%; }

/* --- アイコン --- */
.desktop { height: calc(100vh - 30px); position: relative; width: 100%; }
.icon {
    width: 80px; text-align: center; position: absolute; font-size: 10pt;
    cursor: pointer; padding: 5px; z-index: 10;
}
.icon svg { width: 32px; height: 32px; margin-bottom: 4px; display: block; margin-left: auto; margin-right: auto; }
.icon span { background: white; padding: 0 2px; display: inline-block; }
.icon.selected span { background: black; color: white; }
.icon16 { width: 16px; height: 16px; }
.icon32 { width: 32px; height: 32px; }
.icon48 { width: 48px; height: 48px; }

/* フォルダ内（HD等）のグリッドレイアウト */
.folder-grid { display: flex; flex-wrap: wrap; gap: 20px; align-content: flex-start; }
.view-list .folder-grid { flex-direction: column; gap: 0; }
.view-list .icon { position: static !important; width: 100%; display: flex; align-items: center; text-align: left; padding: 2px 5px; border-bottom: 1px solid #eee; }
.view-list .icon svg { width: 16px; height: 16px; margin: 0 10px 0 0; }

.drag-ghost { position: absolute; border: 1px dashed black; pointer-events: none; z-index: 20000; }
.drag-ghost::before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; outline: 1px dashed white; outline-offset: -1px; }
