body { font-family: sans-serif; margin: 0; padding: 10px; background-color: #f4f4f9; text-align: center; }
.btn-base { padding: 6px 10px; font-size: 13px; font-weight: bold; border: none; border-radiubody { font-family: sans-serif; margin: 0; padding: 10px; background-color: #f4f4f9; text-align: center; }
.btn-base { padding: 6px 10px; font-size: 13px; font-weight: bold; border: none; border-radius: 4px; cursor: pointer; color: white; margin: 2px; }
.toolbar { display: flex; gap: 4px; justify-content: center; margin-bottom: 10px; padding: 10px; background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); flex-wrap: wrap; align-items: center; }
select, input[type="number"] { padding: 4px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; cursor: pointer; margin: 2px; }

.color-btn { display: inline-block; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid #ccc; vertical-align: middle; margin: 0 2px; }
.color-btn.active { border: 2px solid #ff9800; transform: scale(1.2); }

.btn-blue { background-color: #007bff; }
.btn-red { background-color: #dc3545; }
.btn-yellow { background-color: #ffca28; color: #333; }
.btn-purple { background-color: #9c27b0; }
.btn-gray { background-color: #6c757d; }
.btn-green { background-color: #28a745; }
.btn-orange { background-color: #fd7e14; }
.btn-dark { background-color: #343a40; }

#page-list-container { display: inline-flex; max-width: 250px; overflow-x: auto; white-space: nowrap; padding-bottom: 4px; align-items: center; }
#page-list-container::-webkit-scrollbar { height: 6px; }
#page-list-container::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.page-btn { background-color: #e0e0e0; color: #333; border: 1px solid #ccc; padding: 4px 8px; font-size: 13px; border-radius: 4px; cursor: pointer; margin: 0 2px; }
.page-btn.active { background-color: #007bff; color: white; border-color: #007bff; }

#canvas-wrapper { width: 100%; height: 85vh; overflow: auto; border: 2px solid #ccc; background-color: white; border-radius: 8px; position: relative; }

/* ギャラリーモーダル */
#gallery-modal { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.9); z-index: 1000; overflow-y: auto; padding: 20px; box-sizing: border-box; text-align: left; }
.gallery-item { position: relative; background: white; padding: 10px; border-radius: 8px; margin-bottom: 20px; display: inline-block; width: 350px; margin-right: 20px; vertical-align: top; border: 4px solid transparent; transition: 0.3s; cursor: pointer; }
.gallery-item:hover { transform: scale(1.05); }
.gallery-item h3 { margin: 0 0 10px 0; font-size: 18px; color: #333; text-align: center; }
.gallery-item img { width: 100%; border: 1px solid #ccc; border-radius: 4px; background-color: white; }

/* セーブ・ロード管理モーダル */
#save-load-modal { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); z-index: 1000; padding: 50px; box-sizing: border-box; text-align: left; }
.save-modal-content { background: white; padding: 20px; border-radius: 8px; max-width: 600px; margin: 0 auto; max-height: 80vh; overflow-y: auto; }
.save-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #eee; }
.save-item:hover { background-color: #f8f9fa; }
.save-item-info { display: flex; flex-direction: column; }
.save-item-title { font-size: 18px; font-weight: bold; color: #333; }
.save-item-date { font-size: 12px; color: #666; margin-top: 5px; }
.save-item-actions button { margin-left: 8px; padding: 8px 15px; }s: 4px; cursor: pointer; color: white; margin: 2px; }
.toolbar { display: flex; gap: 4px; justify-content: center; margin-bottom: 10px; padding: 10px; background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); flex-wrap: wrap; align-items: center; }
select, input[type="number"] { padding: 4px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; cursor: pointer; margin: 2px; }

.color-btn { display: inline-block; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid #ccc; vertical-align: middle; margin: 0 2px; }
.color-btn.active { border: 2px solid #ff9800; transform: scale(1.2); }

.btn-blue { background-color: #007bff; }
.btn-red { background-color: #dc3545; }
.btn-yellow { background-color: #ffca28; color: #333; }
.btn-purple { background-color: #9c27b0; }
.btn-gray { background-color: #6c757d; }
.btn-green { background-color: #28a745; }
.btn-orange { background-color: #fd7e14; }
.btn-dark { background-color: #343a40; }

#page-list-container { display: inline-flex; max-width: 250px; overflow-x: auto; white-space: nowrap; padding-bottom: 4px; align-items: center; }
#page-list-container::-webkit-scrollbar { height: 6px; }
#page-list-container::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.page-btn { background-color: #e0e0e0; color: #333; border: 1px solid #ccc; padding: 4px 8px; font-size: 13px; border-radius: 4px; cursor: pointer; margin: 0 2px; }
.page-btn.active { background-color: #007bff; color: white; border-color: #007bff; }

#canvas-wrapper { width: 100%; height: 85vh; overflow: auto; border: 2px solid #ccc; background-color: white; border-radius: 8px; position: relative; }

#gallery-modal { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.9); z-index: 1000; overflow-y: auto; padding: 20px; box-sizing: border-box; text-align: left; }
.gallery-item { position: relative; background: white; padding: 10px; border-radius: 8px; margin-bottom: 20px; display: inline-block; width: 350px; margin-right: 20px; vertical-align: top; border: 4px solid transparent; transition: 0.3s; cursor: pointer; }
.gallery-item:hover { transform: scale(1.05); }
.gallery-item h3 { margin: 0 0 10px 0; font-size: 18px; color: #333; text-align: center; }
.gallery-item img { width: 100%; border: 1px solid #ccc; border-radius: 4px; background-color: white; }