/* 共通スタイル */

/* CSS変数定義 */
:root {
    --primary-color: #f89000;
}

/* 基本設定 */
html, body { 
    height: 100%; 
    margin: 0; 
    padding: 0; 
    font-family: sans-serif; 
    box-sizing: border-box; 
}

/* ヘッダー */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-color);
    color: #fff;
    padding: 1em;
    margin: 0;
}

.header h1 { 
    margin: 0; 
    font-size: 1.2em; 
}

.header a { 
    color: #fff; 
    text-decoration: none; 
    margin-left: 1em; 
    padding: 0.5em 1em; 
    background: rgba(0,0,0,0.07); 
    border-radius: 4px; 
}

.header a:hover {
    background: rgba(255,255,255,0.2);
}

.header button { 
    color: #fff; 
    text-decoration: none; 
    margin-left: 1em; 
    padding: 0.5em 1em; 
    background: rgba(0,0,0,0.07); 
    border-radius: 4px; 
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    transition: background 0.2s;
}

.header button:hover {
    background: rgba(255,255,255,0.2);
}

/* 画像モーダル */
#imageModal { 
    display: none; 
    position: fixed; 
    z-index: 10000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.8); 
}

#imageModal img { 
    display: block; 
    margin: auto; 
    max-width: 90%; 
    max-height: 90%; 
    margin-top: 5%; 
}

#imageModal .close { 
    position: absolute; 
    top: 15px; 
    right: 35px; 
    color: #fff; 
    font-size: 40px; 
    font-weight: bold; 
    cursor: pointer; 
}

#imageModal .close:hover {
    color: var(--primary-color);
}

/* ボタン共通スタイル */
button {
    padding: 0.8em 2em;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    margin-right: 0.5em;
}

button:hover { 
    background: #e0a000; 
}

/* フォーム要素共通 */
input[type="text"], 
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"], 
input[type="number"], 
input[type="file"], 
textarea {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .header { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 0.5em; 
    }
    
    .header h1 { 
        font-size: 1em; 
    }
    
    .header div {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5em;
        width: 100%;
    }
    
    .header a {
        margin-left: 0;
        padding: 0.4em 0.8em;
        font-size: 0.8em;
    }
    
    .header button {
        margin-left: 0;
        padding: 0.4em 0.8em;
        font-size: 0.8em;
    }
}