@charset "UTF-8";

/* ==================================================
   Google Fonts の読み込み
================================================== */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;600&display=swap');

/* ==================================================
   1. 全体設定 (共通)
================================================== */
:root {
    --bg-color: #f6eede;      /* 背景色 */
    --text-color: #514b40;    /* 基本の文字色 */
    --accent-color: #a79d8a;  /* ボタンや日付バッジなどのアクセント色 */
    --link-color: #909f78;    /* リンクの色 */
    --border-color: #cdc5b4;  /* 枠線などの色 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: "Raleway", "Helvetica", "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", sans-serif;
    line-height: 1.6;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-color);
}

/* --- 共通ヘッダー (PC版) --- */
.site-header { width: 100%; padding: 30px 0; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 40px; display: flex; justify-content: space-between; align-items: center; }
.site-logo img { max-height: 60px; width: auto; display: block; }

.desktop-nav ul { list-style: none; display: flex; gap: 40px; }
.desktop-nav a { font-family: "Raleway", "Helvetica", "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", sans-serif; font-size: 1.1em; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-color); }
.desktop-nav a.active, .desktop-nav a:hover { color: var(--text-color); }

/* --- 共通スマホ用ハンバーガーメニュー --- */
.hamburger-btn { display: none; background: transparent; border: none; color: var(--text-color); cursor: pointer; }
.mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-color); z-index: 2000; display: flex; flex-direction: column; padding: 60px 40px; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; overflow-y: auto;}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }
.close-btn { position: absolute; top: 30px; right: 30px; background: transparent; border: none; color: var(--text-color); cursor: pointer; }

.mobile-nav ul { list-style: none; margin-top: 40px; width: 100%; max-width: 300px; }
.mobile-nav li { border-bottom: 1px solid var(--border-color); }
.mobile-nav a { font-family: "Raleway", "Helvetica", "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", sans-serif; display: block; padding: 20px 0; font-size: 1.2em; color: var(--accent-color); letter-spacing: 1px; text-transform: uppercase; }
.mobile-nav a.active { color: var(--text-color); }

/* --- 共通フッター & スクロールトップ --- */
.site-footer { text-align: center; padding: 60px 20px 40px; border-top: 1px solid var(--border-color); margin-top: 40px; position: relative; }
.copyright { font-size: 0.8em; color: rgba(81,75,64, 0.5); }

#scroll-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background-color: var(--accent-color); color: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 1000; border: none; }
#scroll-to-top.show { opacity: 1; visibility: visible; }
#scroll-to-top:hover { background-color: var(--text-color); }
#scroll-to-top svg { width: 24px; height: 24px; fill: currentColor; }

/* --- 共通SNSボタン (SVG) --- */
.sns-btn { display: inline-flex; align-items: center; padding: 10px 20px; border: 1px solid var(--border-color); border-radius: 30px; font-size: 0.9em; margin: 0 10px 10px 0; }
.sns-btn svg { width: 18px; height: 18px; margin-right: 8px; fill: currentColor; }

.main-content { max-width: 800px; margin: 0 auto; padding: 0 20px; }


/* ==================================================
   2. index (トップページ)
================================================== */
.hero-section { text-align: center; margin-bottom: 40px; }
.hero-image { width: 100%; max-width: 100%; height: auto; display: block; margin: 0 auto; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.site-description { margin-top: 15px; font-size: 0.9em; }

.sns-links { text-align: center; margin-bottom: 40px; font-size: 0.9em; }
.sns-links a { color: var(--link-color); margin: 0 10px; }

.search-box { margin-bottom: 50px; text-align: right; }
.search-box form { display: inline-flex; gap: 10px; width: 100%; max-width: 300px; }
.search-box input { flex: 1; padding: 8px 0; border: none; border-bottom: 1px solid var(--border-color); background: transparent; color: var(--text-color); outline: none; }
.search-box button { background: transparent; border: 1px solid var(--border-color); color: var(--text-color); padding: 5px 15px; border-radius: 20px; cursor: pointer; }

/* News一覧部分 */
.section-title { display: flex; align-items: center; gap: 20px; margin-bottom: 40px; }
.section-title h2 { font-weight: normal; font-size: 1.8em; letter-spacing: 1px; text-transform: uppercase; }
.section-title hr { flex: 1; border: none; border-top: 1px solid var(--border-color); }

.news-list { display: flex; flex-direction: column; gap: 25px; margin-bottom: 60px; }
.news-item { display: flex; align-items: flex-start; gap: 20px; }
.news-date { background-color: var(--accent-color); color: #fff; padding: 4px 12px; font-size: 0.8em; border-radius: 2px; white-space: nowrap; }
.news-title { font-size: 1.1em; line-height: 1.4; padding-top: 2px; }


/* ==================================================
   3. live (ライブスケジュールページ)
================================================== */
.live-item { margin-bottom: 60px; padding-bottom: 40px; border-bottom: 1px solid var(--border-color); }


/* ==================================================
   4. post & profile (個別記事・プロフィールページ)
================================================== */
.post-detail { margin-bottom: 60px; }
.post-header { margin-bottom: 30px; }
.post-title { font-size: 1.6em; margin-top: 15px; }

.post-content p, .post-content div { margin-bottom: 20px; line-height: 1.8; }
.post-content img, .post-content iframe { max-width: 100%; border-radius: 4px; margin-bottom: 20px; }

.tags-list a { display: inline-block; padding: 5px 15px; border: 1px solid var(--border-color); border-radius: 20px; margin: 0 10px 10px 0; font-size: 0.9em; }

.related-posts { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--border-color); }
.related-posts h3 { margin-bottom: 20px; font-weight: normal; }
.related-posts ul { list-style: none; }
.related-posts li { margin-bottom: 10px; }


/* ==================================================
   5. management (管理画面)
================================================== */
.admin-wrap { max-width: 800px; margin: 40px auto; padding: 0 20px; }
.admin-title { text-align: left; margin-bottom: 40px; font-size: 1.8em; letter-spacing: 2px; border-bottom: 2px solid var(--border-color); padding-bottom: 15px; }

.tabs { display: flex; gap: 30px; margin-bottom: 40px; overflow-x: auto; white-space: nowrap; border: none; -webkit-overflow-scrolling: touch; padding-bottom: 5px; }
.tab-btn { padding: 5px 0; font-size: 1.1em; background: none; border: none; color: rgba(81,75,64,0.5); cursor: pointer; font-weight: bold; }
.tab-btn.active { color: var(--text-color); border-bottom: 3px solid var(--text-color); }

.form-group { margin-bottom: 40px; }
.form-group label { display: block; margin-bottom: 10px; font-size: 1.1em; font-weight: bold; }
.form-group input[type="text"], .form-group input[type="date"], .form-group input[type="datetime-local"] { width: 100%; padding: 10px 0; border: none; border-bottom: 1px solid var(--border-color); background: transparent; font-size: 16px; color: var(--text-color); outline: none; transition: 0.3s; }
.form-group input[type="text"]:focus, .form-group input[type="datetime-local"]:focus { border-bottom-color: var(--text-color); }

.checkbox-label { display: inline-flex; align-items: center; margin-right: 20px; cursor: pointer; font-size: 1em; }
.checkbox-label input { margin-right: 8px; width: 18px; height: 18px; cursor: pointer; accent-color: var(--text-color); }

.editor-block { background: transparent; padding: 10px 0 10px 30px; margin-bottom: 20px; border-left: 3px solid var(--accent-color); position: relative; display: flex; flex-direction: column; width: 100%; box-sizing: border-box; }
.editor-block.over { border-left: 3px dashed var(--text-color); opacity: 0.5; }
.drag-handle { cursor: grab; font-size: 1.5em; color: var(--border-color); position: absolute; left: 0; top: 10px; padding: 5px; margin-left: -5px; touch-action: none; }

.editor-block textarea, .editor-block input[type="text"] { width: 100%; min-height: 200px; border: 1px solid var(--border-color); padding: 12px; outline: none; font-size: 16px; resize: vertical; margin-top: 10px; border-radius: 4px; font-family: inherit; background: #fff; box-sizing: border-box; }
.editor-block input[type="text"] { min-height: auto; }
.editor-block img { max-width: 100%; border-radius: 4px; margin-top: 10px; }

.block-controls { position: absolute; top: 5px; right: 0; display: flex; gap: 10px; }
.block-controls button { background: transparent; color: var(--text-color); border: none; cursor: pointer; font-size: 1.1em; font-weight: bold; padding: 5px; }

.add-btns { display: flex; gap: 10px; margin-bottom: 40px; flex-wrap: wrap; }
.add-btns button { flex: 1; min-width: calc(50% - 10px); padding: 10px 20px; background: transparent; border: 1px solid var(--border-color); color: var(--text-color); border-radius: 30px; font-size: 0.95em; cursor: pointer; transition: 0.2s; text-align: center; }
.add-btns button:hover { background: #fff; }

.form-actions { display: flex; gap: 15px; margin-top: 40px; flex-wrap: wrap; }
.submit-btn { flex: 1; min-width: 200px; padding: 15px 40px; background-color: var(--text-color); color: #fff; border: none; border-radius: 30px; font-size: 1.1em; font-weight: bold; cursor: pointer; transition: 0.3s; text-align: center; }
.draft-btn { background-color: transparent; border: 2px solid var(--text-color); color: var(--text-color); }
.submit-btn:hover { opacity: 0.8; }

.manage-list-item { background: transparent; padding: 20px 0; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.manage-actions { display: flex; gap: 5px; flex-shrink: 0; }
.manage-actions button { padding: 8px 15px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; white-space: nowrap; }
.btn-edit { background: var(--text-color); color: #fff; }
.btn-delete { background: #ffeeee; color: #cc3333; }

.setting-card { background: transparent; padding: 0 0 30px 0; margin-bottom: 30px; border-bottom: 1px solid var(--border-color); }

#loading-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(246, 238, 222, 0.85); z-index: 9999; justify-content: center; align-items: center; }
#loading-overlay .msg { background: #fff; padding: 20px 40px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); font-weight: bold; font-size: 1.2em; color: var(--text-color); text-align: center; }


/* ==================================================
   6. パスワード保護画面
================================================== */
.password-auth-container { text-align: center; margin: 40px auto; max-width: 400px; padding: 40px 20px; background: #fff; border-radius: 8px; border: 1px solid var(--border-color); }
.password-auth-container h3 { margin-bottom: 20px; font-weight: normal; font-size: 1.1em; letter-spacing: 1px; }
.password-auth-container input[type="password"] { width: 100%; padding: 12px; margin-bottom: 20px; border: 1px solid var(--border-color); border-radius: 4px; font-size: 16px; outline: none; box-sizing: border-box; font-family: inherit; }
.password-auth-container input[type="password"]:focus { border-color: var(--text-color); }
.password-auth-container button { width: 100%; padding: 15px; background-color: var(--text-color); color: #fff; border: none; border-radius: 30px; font-size: 1em; cursor: pointer; transition: 0.3s; font-family: inherit; font-weight: bold; }
.password-auth-container button:hover { opacity: 0.8; }
.password-error { color: #cc3333; margin-bottom: 15px; font-size: 0.9em; display: none; font-weight: bold; }


/* ==================================================
   7. レスポンシブ (スマホ対応)
================================================== */
@media screen and (max-width: 768px) {
    /* サイト共通 */
    .header-inner { padding: 0 20px; }
    .desktop-nav { display: none; }
    .hamburger-btn { display: block; }
    .search-box { text-align: center; }
    #scroll-to-top { bottom: 20px; right: 20px; width: 45px; height: 45px; }
    
    /* index (News一覧) */
    .news-item { flex-direction: column; gap: 5px; }
    
    /* 管理画面 */
    .admin-wrap { margin: 20px auto; padding: 0 15px; width: 100%; overflow-x: hidden; }
    .tabs { gap: 15px; padding-bottom: 10px; margin-bottom: 20px; }
    .tab-btn { font-size: 1em; white-space: nowrap; }
    
    .manage-list-item { flex-direction: column; align-items: flex-start; padding: 15px 0; }
    .manage-actions { width: 100%; justify-content: space-between; margin-top: 10px; }
    .manage-actions button { flex: 1; padding: 12px; }
    
    .editor-block { padding: 50px 10px 10px 10px; border-left: none; border-top: 3px solid var(--accent-color); background: #fff; border-radius: 8px; }
    .editor-block.over { border-left: none; border-top: 3px dashed var(--text-color); }
    .drag-handle { left: 10px; top: 10px; padding: 0; margin: 0; }
    .block-controls { top: 10px; right: 10px; }
    
    .add-btns { flex-direction: column; gap: 10px; }
    .add-btns button { width: 100%; padding: 15px; }
    
    .form-actions { flex-direction: column; gap: 10px; margin-top: 30px; }
    .submit-btn { width: 100%; padding: 15px; }
}