:root {
    --bg-color: #fcfcfc;
    --text-color: #333333;
    --accent-color: #2c3e50;
    --link-color: #3498db;
    --border-color: #e1e4e8;
    --header-bg: #ffffff;
    --card-bg: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: var(--header-bg);
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 35px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-titles {
    text-align: left;
}

.header h1 a {
    text-decoration: none;
    color: var(--accent-color);
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: -0.5px;
}

.header p {
    color: #666;
    margin-top: 6px;
    font-size: 0.95rem;
}

.header-actions {
    flex-shrink: 0;
}

.header-app-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: #ffffff !important;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 24px;
    font-weight: bold;
    font-size: 0.95rem;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.header-app-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(46, 125, 50, 0.35);
    background: linear-gradient(135deg, #338a37 0%, #206d26 100%);
}

.header-app-cta .cta-icon {
    font-size: 1.1rem;
    line-height: 1;
}

@media (max-width: 600px) {
    .header {
        padding: 24px 0;
        margin-bottom: 24px;
    }

    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .header-titles {
        text-align: center;
    }

    .header h1 a {
        font-size: 1.7rem;
    }

    .header p {
        font-size: 0.85rem;
        margin-top: 4px;
    }

    .header-app-cta {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Views */
.view {
    display: none;
}
.view.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Post List */
.posts-list {
    list-style: none;
}

.post-item {
    background-color: var(--card-bg);
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-link {
    display: block;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
}

.post-link:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.post-title {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.post-date {
    color: #888;
    font-size: 0.9rem;
}

/* Post Detail / Articles */
.article-nav {
    margin-bottom: 25px;
}

.btn {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn:hover {
    background: #f0f0f0;
}

/* Markdown Styles */
.markdown-body {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: var(--accent-color);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3em;
}

.markdown-body h1 {
    margin-top: 0;
}

.markdown-body p {
    margin-bottom: 1.2em;
}

.markdown-body a {
    color: var(--link-color);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.markdown-body pre {
    background-color: #f6f8fa;
    padding: 16px;
    overflow: auto;
    border-radius: 6px;
    margin-bottom: 1.2em;
}

.markdown-body code {
    font-family: monospace;
    background-color: #f6f8fa;
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    color: #888;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.pagination-btn {
    margin-bottom: 0;
}

/* ==========================================
   Comment Section Styles
   ========================================== */
.comment-section {
    margin-top: 40px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 35px 40px;
}

.comment-heading {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #edf2f7;
}

/* Comment List */
.comment-list {
    margin-bottom: 35px;
}

.comment-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 15px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.88rem;
}

.comment-author {
    font-weight: bold;
    color: var(--accent-color);
}

.comment-date {
    color: #a0aec0;
    font-size: 0.8rem;
}

.comment-body {
    color: #4a5568;
    line-height: 1.65;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-loading {
    color: #718096;
    font-size: 0.95rem;
    padding: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-empty-notice {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e0;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    color: #718096;
    font-size: 0.92rem;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Comment Form */
.comment-form-wrapper {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 25px;
}

.comment-form-title {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 6px;
}

.form-group .required {
    color: #e53e3e;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-color);
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

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

.form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    margin-bottom: 0;
}

.btn-primary:hover:not(:disabled) {
    background-color: #1a252f;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.comment-status-msg {
    font-size: 0.9rem;
    font-weight: 500;
}

.comment-status-msg.info {
    color: #3182ce;
}

.comment-status-msg.success {
    color: #38a169;
}

.comment-status-msg.warning {
    color: #dd6b20;
}

.comment-status-msg.error {
    color: #e53e3e;
}

/* ==========================================
   Feedback Section (Google Form + X)
   ========================================== */
.feedback-lead {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 20px;
}

.feedback-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.feedback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.feedback-btn:hover {
    color: #ffffff;
    text-decoration: none;
}

.feedback-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    color: var(--accent-color);
    border: 1px solid #cbd5e0;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 4px;
    text-decoration: none;
    margin-bottom: 0;
    transition: background-color 0.2s, border-color 0.2s;
}

.feedback-btn-secondary:hover {
    background-color: #edf2f7;
    border-color: #a0aec0;
    text-decoration: none;
}

.feedback-note {
    color: #718096;
    font-size: 0.86rem;
    line-height: 1.6;
    margin: 0;
}

.feedback-note a {
    color: var(--accent-color);
    text-decoration: underline;
}

@media (max-width: 600px) {
    .feedback-section {
        padding: 24px 20px;
    }

    .feedback-btn,
    .feedback-btn-secondary {
        width: 100%;
    }
}


