/* --- アプリ専用 基本 & レイアウト --- */
.app-body {
    background-color: #f0f0f0;
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    height: 100vh;
}
.app-main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.full-width-container {
    max-width: 95%;
    width: 100%;
    height: calc(100vh - 110px); /* ヘッダーと上下のpadding分を引く */
    display: flex;
    flex-direction: column;
}

/* --- ツール本体のスタイル --- */
.full-width-container h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.5rem;
}
.full-width-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 1rem;
}

.editor-main-container {
    display: flex;
    flex-grow: 1;
    gap: 20px;
    height: calc(100% - 80px); /* h1, h2の高さを引く */
}
.editor-column {
    display: flex;
    flex-direction: column;
    width: 50%;
    gap: 15px;
}
.editor-section {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.editor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.editor-label { font-weight: 600; }
.tool-bar { display: flex; gap: 8px; }
.tool-button { padding: 4px 8px; background-color: #4285f4; color: white; border: none; border-radius: 4px; font-size: 12px; cursor: pointer; transition: background-color 0.2s; }
.tool-button:hover { background-color: #3367d6; }
textarea { width: 100%; height: 100%; padding: 10px; font-family: monospace; font-size: 14px; border: 1px solid #ccc; border-radius: 4px; resize: none; }
.preview-column { width: 50%; display: flex; flex-direction: column; background: #fff; padding: 10px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05);}
.preview-label { font-weight: 600; margin-bottom: 5px; }
.preview-area { flex-grow: 1; border: 1px solid #ccc; border-radius: 4px; overflow: auto; }
.preview-area iframe { width: 100%; height: 100%; border: none; }

/* カラーピッカー */
.color-picker-container { position: absolute; background: white; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.2); padding: 10px; z-index: 1000; display: none; width: 250px;}
.color-picker-container.visible { display: block; }
.color-picker-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.color-picker-title { font-weight: 600; }
.close-button { background: none; border: none; cursor: pointer; font-size: 16px; }
.color-preview { width: 100%; height: 30px; border: 1px solid #ccc; border-radius: 4px; margin-bottom: 10px; }
.color-input-group { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.color-input { flex-grow: 1; }
.color-input input[type="color"] { width: 100%; height: 30px; border: 1px solid #ccc; border-radius: 4px; padding: 0; }
.hex-input { width: 80px; padding: 5px; border: 1px solid #ccc; border-radius: 4px; }
.button-group { display: flex; justify-content: flex-end; gap: 8px; }
.apply-button { padding: 5px 10px; background-color: #4caf50; color: white; border: none; border-radius: 4px; cursor: pointer; }
.apply-button:hover { background-color: #388e3c; }
.color-presets { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin-bottom: 10px; }
.color-preset { width: 100%; padding-top: 100%; border: 1px solid #ccc; border-radius: 2px; cursor: pointer; }

/* レスポンシブ */
@media (max-width: 768px) {
    .editor-main-container { flex-direction: column; height: auto; }
    .editor-column, .preview-column { width: 100%; }
    .editor-column { height: 50vh; }
    .preview-column { height: 40vh; }
}