body, html {
    margin: 0;
    padding: 0;
    font-family: monospace;
    background: #ffffff;
    color: #000000;
    height: 100vh;
}

h1 {
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid #222;
    margin: 0;
    font-weight: 500;
}

body { display:flex; flex-direction:column; }

#toolbar {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-right: 20px;
}

#page-edit-btn,#page-reset-btn,#command-add-btn,#modal-save-btn,#modal-cancel-btn {
    font-family: monospace;
    margin-top: 5px;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 5px;
    cursor: pointer;
    color: #000000;
    border-width: 1px;
    border-color: black;
    background-color: #ffffff;
}

#page-edit-btn:hover,#page-reset-btn:hover,#command-add-btn:hover,#modal-save-btn:hover,#modal-cancel-btn:hover {
    background-color: #ededed;
}

main {
    display: flex;
    flex:1;
    height: calc(100vh - 50px);
}

aside {
    width: 260px;
    background-color: #f9f9f9;
    padding: 15px;
    border-right: 1px solid #ddd;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#command-list {
    list-style: none;
    padding:0;
    margin:0;
    flex:1;
    overflow-y:auto;
}

#command-list li {
    padding: 8px 12px;
    margin-bottom:4px;
    cursor:pointer;
    border-radius:5px;
    transition: background 0.2s,color 0.2s;
}

#command-list li:hover { background:hsl(0,0%,83%); }

input, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    margin-top:-1px;
    box-sizing:border-box;
    font-size:14px;
    border:1px solid #333;
    color:#000000;
    border-radius:6px;
}

#command-detail {
    flex:1;
    padding: 25px 30px;
    overflow-y:auto;
}

#command-detail h2 { margin-top:0; margin-bottom:10px; }
#command-detail h3 { margin-bottom:6px; margin-top:18px; font-weight:500; color:#333; }
#command-detail p { margin:0 0 10px 0; }
pre {
    background:#fff;
    padding:12px;
    border-radius:5px;
    overflow-x:auto;
    font-size:13px;
    margin-bottom:10px;
}

#command-list::-webkit-scrollbar,#command-detail::-webkit-scrollbar { width:8px; }
#command-list::-webkit-scrollbar-thumb,#command-detail::-webkit-scrollbar-thumb { background-color:#ccc; border-radius:4px; }
#command-list::-webkit-scrollbar-track,#command-detail::-webkit-scrollbar-track { background:#f9f9f9; }

.card {
    background:#f5f5f5;
    padding:15px 20px;
    margin-bottom:15px;
    border-radius:8px;
    box-shadow:0 1px 3px rgba(0,0,0,0.1);
}

.card img { max-width:100%; border-radius:5px; margin-top:10px; }
.card ul { padding-left:20px; }
.card li { margin-bottom:5px; }
mark { background-color:#fff3b0; color:#111; font-weight:bold; }
.related:hover { text-decoration:underline; }

#command-add-btn { margin:8px 0 10px 0; padding:8px 12px; width:100%; }

.modal {
    display:none;
    position:fixed;
    z-index:1000;
    left:0;
    top:0;
    width:100%;
    height:100%;
    overflow:auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color:#f9f9f9;
    margin:50px auto;
    padding:20px;
    border-radius:10px;
    width:90%;
    max-width:450px;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.modal-buttons {
    display:flex;
    justify-content:flex-end;
    gap:10px;
}
