:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --gray-text: #666666;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body {
    font-family: "M PLUS Rounded 1c", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

header p {
    color: var(--gray-text);
}

section {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px; /* スマートフォン向けに少し調整 */
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

h2 {
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 10px;
    margin-top: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box; /* パディングを含める */
    font-family: inherit;
}

input[type="text"]:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

button:hover {
    background-color: var(--primary-hover);
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.post-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.post-item:last-child {
    border-bottom: none;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.post-name {
    font-weight: bold;
    color: var(--primary-color);
}

.post-date {
    color: #999;
    font-size: 0.8rem;
}

.post-message {
    white-space: pre-wrap; /* 改行を反映 */
    word-break: break-all;
}

.loading {
    text-align: center;
    color: #999;
}

.error-message {
    color: #e74c3c;
    text-align: center;
}

/* PC向けの調整 */
@media (min-width: 600px) {
    section {
        padding: 30px;
    }
    
    button {
        width: auto;
        min-width: 200px;
    }
}
