/* --- 全体基本設定 --- */
body { 
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background: #f4f7f9; 
    color: #333; 
    margin: 0; 
    padding: 15px; 
}
a { text-decoration: none; color: inherit; }

/* --- ヘッダー --- */
.header-area {
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end;
    max-width: 1100px; 
    margin: 0 auto 20px auto; 
    padding-bottom: 8px; 
    border-bottom: 2px solid #3498db;
}
h1 { margin: 0; font-size: 22px; color: #2c3e50; }
.clock-mini { text-align: right; color: #7f8c8d; line-height: 1; }
#date-display { font-size: 13px; font-weight: bold; margin-right: 8px; }
#time-display { font-size: 18px; font-weight: 700; color: #34495e; }

/* --- レイアウト構造 --- */
.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 下段（おたよりとリンク集） */
.bottom-grid {
    display: grid;
    grid-template-columns: 1fr; /* スマホは1列 */
    gap: 20px;
}

/* 画面幅が800px以上なら二列にする */
@media (min-width: 800px) {
    .bottom-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

/* --- カード共通 --- */
.card { 
    background: #fff; 
    border-radius: 18px; 
    padding: 20px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    border: 1px solid #dce3e8; 
    box-sizing: border-box;
}

/* カレンダーの高さ自動調整 */
.calendar-wrapper {
    position: relative;
    width: 100%;
    height: 70vh; 
    min-height: 400px;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
}

/* --- 各種パーツ --- */
.menu-category-title { font-size: 13px; font-weight: bold; color: #3498db; margin: 15px 0 8px 5px; border-left: 4px solid #3498db; padding-left: 8px; }
.menu-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 5px; }
.menu-item-wrapper { width: 85px; display: flex; flex-direction: column; align-items: center; position: relative; }
.menu-item img { width: 75px; height: 105px; object-fit: cover; border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); border: 1px solid #eee; }
.important-item img { border: 2px solid #ff4757 !important; }
.priority-list { background: #fff9f9; border: 1px solid #ffecec; border-radius: 12px; margin-bottom: 10px;}

.menu-item span { font-size: 11px; margin-top: 5px; font-weight: bold; color: #555; display: block; width: 75px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.archive-link { cursor: pointer; font-size: 10px; color: #3498db; background: #f0f7ff; padding: 4px 0; border-radius: 12px; border: 1px solid #d0e4ff; width: 100%; text-align: center; margin-top: 5px; }

/* --- ボタンのデザイン（修正版） --- */
.btn-large-flat { 
    display: block; 
    width: 100%; /* 親要素の幅いっぱいに広げる */
    padding: 16px; 
    background: #ecf0f1; 
    border-radius: 12px; 
    text-align: center; 
    font-weight: bold; 
    font-size: 15px; 
    color: #2c3e50; 
    transition: 0.2s; 
    box-sizing: border-box; 
    margin-bottom: 12px; 
    border: none;
    letter-spacing: 1px;
}
.btn-large-flat:last-child { margin-bottom: 0; }
.btn-large-flat:active { transform: scale(0.98); opacity: 0.8; }

.pdf-dropdown-list { display: none; background: #fff; border: 1px solid #ddd; border-radius: 8px; margin-top: 5px; padding: 5px; width: 150px; position: absolute; top: 100%; left: 0; z-index: 100; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.pdf-dropdown-list a { display: block; padding: 8px; font-size: 12px; border-bottom: 1px solid #eee; color: #333; }

/* --- 共通「もどる」ボタンデザイン --- */
.btn-back {
    display: block;
    width: 100%; /* 横幅いっぱい */
    text-align: center;
    padding: 16px;
    background: #6c757d;
    color: white !important;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    border: none;
    box-shadow: 0 4px 0 #4e555b;
    transition: 0.1s;
    cursor: pointer;
    box-sizing: border-box;
    margin-top: 10px;
}
.btn-back:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #4e555b;
}

/* --- 伝言板セクション --- */
.memo-area {
    width: 100%;
    box-sizing: border-box;
}
#memo-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 10px;
    display: block;
    resize: none;
}