﻿/* --- 1. 全体のリセットと中央寄せの強化 --- */
* { 
    box-sizing: border-box; 
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: #4a3f35;
    margin: 0;
    padding: 20px;
    background-color: #eaddcf; 
    background-image: 
        linear-gradient(90deg, rgba(255,255,255,.3) 50%, transparent 50%),
        linear-gradient(rgba(255,255,255,.3) 50%, transparent 50%);
    background-size: 6px 6px;

    /* ★ここが重要：画面の真ん中に wrapper を配置する */
    display: flex;
    flex-direction: column;
    align-items: center; /* 左右の中央 */
    min-height: 100vh;
}

.wrapper {
    width: 100%;
    max-width: 600px; /* 最大幅を固定 */
    margin: 40px 0;   /* 上下の余白 */
    background: #ffffff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(90, 70, 60, 0.15);
    border: 3px solid #bcaba0; 
    text-align: left; /* 中の文字は左揃え */
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    color: #705b4d;
    margin: 0;
    font-size: 2.2rem;
    letter-spacing: 4px;
    font-weight: 700;
    text-shadow: 2px 2px 0px #ffffff;
    display: inline-block;
    position: relative;
    border-bottom: 8px solid rgba(166, 124, 109, 0.3);
    padding: 0 15px;
    line-height: 1.4;
}

/* --- 2. 投稿エリア --- */
#posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.post-item {
    background: #fff;
    border: 2px solid #bcaba0; 
    padding: 20px;
    border-radius: 12px;
    position: relative;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    border-bottom: 2px solid #f0e6dd;
    padding-bottom: 8px;
}

.post-no {
    font-size: 0.85rem;
    color: #8e7d72;
    font-weight: bold;
}

.user-name {
    font-weight: bold;
    color: #a67c6d;
}

.post-time {
    font-size: 0.75rem;
    color: #8e7d72;
    margin-left: auto;
}

/* 削除ボタン */
.delete-btn {
    background: #f4eee8; 
    border: 1px solid #bcaba0;
    cursor: pointer;
    margin-left: 10px;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.material-symbols-outlined {
    font-size: 20px;
    color: #8e7d72;
}

.delete-btn:hover {
    background: #a67c6d;
    border-color: #a67c6d;
}

.delete-btn:hover .material-symbols-outlined {
    color: #fff;
}

/* --- 3. 入力フォーム --- */
.input-form {
    background: #f4eee8;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #bcaba0;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #bcaba0;
    border-radius: 10px;
    margin-bottom: 15px;
}

.input-form button {
    width: 100%;
    padding: 15px;
    background: #a67c6d;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}