/* ===== JIMOTO BBS - Local Community / Earthy Natural Theme ===== */
@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@700&display=swap');

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #f0ebe2;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(139, 69, 19, 0.015) 40px, rgba(139, 69, 19, 0.015) 41px),
        repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(139, 69, 19, 0.015) 40px, rgba(139, 69, 19, 0.015) 41px);
    color: #2d2215;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 16px; width: 100%; }
.hidden { display: none !important; }

/* ===== Modal ===== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(30, 20, 10, 0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; padding: 16px; backdrop-filter: blur(4px);
}
.modal {
    background: #faf6ef;
    border-radius: 18px; padding: 32px; max-width: 560px; width: 100%;
    position: relative; animation: modalIn 0.3s ease;
    border: 2px solid #d4c4a0;
    box-shadow: 0 16px 48px rgba(45, 33, 21, 0.2);
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 28px; color: #a09070; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #2d5016; }

.age-gate-modal { text-align: center; max-width: 440px; }
.age-gate-icon { font-size: 56px; margin-bottom: 16px; }
.age-gate-modal h2 { font-size: 24px; margin-bottom: 12px; }
.age-gate-modal p { font-size: 15px; color: #5a4a30; margin-bottom: 8px; line-height: 1.6; }
.age-gate-buttons { display: flex; gap: 12px; margin-top: 20px; }
.age-gate-buttons button { flex: 1; padding: 14px; border: none; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; transition: all 0.3s; }
.btn-yes { background: linear-gradient(135deg, #2d5016, #4a7a28); color: #f0ebe2; }
.btn-no { background: #e0d8c0; color: #6b5a38; }
.age-gate-buttons button:hover { opacity: 0.85; }

.terms-modal { max-width: 640px; max-height: 80vh; display: flex; flex-direction: column; }
.terms-modal h2 { font-size: 22px; margin-bottom: 16px; padding-right: 32px; color: #2d5016; font-family: 'Zen Maru Gothic', sans-serif; }
.terms-content { overflow-y: auto; flex: 1; font-size: 14px; line-height: 1.8; color: #4a3a20; padding-right: 8px; }
.terms-content h3 { font-size: 15px; font-weight: 700; margin-top: 20px; margin-bottom: 8px; color: #2d5016; }
.terms-content h3:first-child { margin-top: 0; }
.terms-content ul { padding-left: 20px; margin-bottom: 8px; }
.terms-content li { margin-bottom: 4px; }
.modal-ok-btn {
    display: block; width: 100%; margin-top: 16px; padding: 12px;
    background: linear-gradient(135deg, #2d5016, #4a7a28);
    color: #f0ebe2; border: none; border-radius: 12px; font-size: 15px;
    font-weight: 700; cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.modal-ok-btn:hover { opacity: 0.9; }

.qr-zoom-modal { max-width: 400px; padding: 16px; text-align: center; background: #faf6ef; }
.qr-zoom-modal img { max-width: 100%; max-height: 70vh; border-radius: 8px; }

/* ===== Safety Banner ===== */
.safety-banner {
    background: linear-gradient(90deg, #e8dfc8, #ddd5b8);
    color: #6b5a38;
    padding: 10px 0; font-size: 13px; text-align: center;
    border-bottom: 2px solid #8b6c3e;
}

/* ===== Header - Wood/Nature Theme ===== */
.header {
    background:
        linear-gradient(180deg, rgba(45, 80, 22, 0.9), rgba(35, 60, 15, 0.95)),
        repeating-linear-gradient(
            90deg,
            rgba(139, 69, 19, 0.1) 0px, rgba(139, 69, 19, 0.1) 2px,
            transparent 2px, transparent 8px
        ),
        linear-gradient(135deg, #2d5016, #3a6820, #2d5016);
    color: #f0ebe2;
    padding: 28px 0 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(45, 80, 22, 0.3);
}
.header::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, #8b4513, #a0622e, #8b4513, #a0622e, #8b4513);
}

.logo {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-size: 30px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; gap: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.logo-icon { font-size: 34px; }
.header-sub { font-size: 14px; opacity: 0.85; margin-top: 4px; }

/* ===== Category Cards - Earthy Rounded ===== */
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.category-card {
    border-radius: 18px; padding: 28px 20px; text-align: center;
    cursor: pointer; transition: all 0.3s ease; color: #f0ebe2;
    position: relative; overflow: hidden;
    box-shadow: 0 4px 16px rgba(45, 33, 21, 0.1);
}
.category-card::after {
    content: '';
    position: absolute; bottom: -30px; right: -30px;
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(255,255,255,0.06);
    transition: all 0.3s;
}
.category-card:hover { transform: translateY(-5px) rotate(-1deg); box-shadow: 0 12px 32px rgba(45, 33, 21, 0.2); }
.category-card:hover::after { transform: scale(2); }
.category-card.kakao { background: linear-gradient(135deg, #8b7530, #a08a38); }
.category-card.line { background: linear-gradient(135deg, #2d5016, #4a7a28); }
.category-card.email { background: linear-gradient(135deg, #5a4a6a, #6a5a7a); }
.category-card.insta { background: linear-gradient(135deg, #8b4513, #a0622e, #8b4513); }
.card-icon { font-size: 48px; margin-bottom: 12px; }
.category-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; font-family: 'Zen Maru Gothic', sans-serif; }
.category-card p { font-size: 13px; opacity: 0.85; }
.post-count {
    display: inline-block; margin-top: 10px; font-size: 12px;
    background: rgba(255,255,255,0.2); padding: 4px 14px;
    border-radius: 20px; font-weight: 500;
}
.category-card.kakao .post-count { background: rgba(0,0,0,0.1); }

/* ===== How to Use ===== */
.how-to-use { margin-top: 32px; }
.steps { display: flex; gap: 16px; margin-top: 8px; }
.step {
    flex: 1; display: flex; gap: 12px; align-items: flex-start;
    background: #faf6ef; padding: 18px; border-radius: 14px;
    box-shadow: 0 2px 8px rgba(45, 33, 21, 0.06);
    border: 1px solid #d4c4a0;
}
.step-num {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #2d5016, #4a7a28);
    color: #f0ebe2; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.step strong { font-size: 14px; display: block; margin-bottom: 2px; color: #2d2215; }
.step p { font-size: 12px; color: #8b7a58; }

.section-title {
    font-size: 20px; font-weight: 700; margin-bottom: 16px;
    padding-bottom: 8px; border-bottom: 3px solid #2d5016;
    display: inline-block; font-family: 'Zen Maru Gothic', sans-serif;
    color: #2d2215;
}

.recent-section { margin-top: 32px; margin-bottom: 32px; }

/* ===== Board Screen ===== */
.back-btn {
    background: none; border: 2px solid #b8a880; padding: 8px 20px;
    border-radius: 10px; cursor: pointer; font-size: 14px;
    font-weight: 500; color: #6b5a38; margin-top: 20px; transition: all 0.3s;
}
.back-btn:hover { border-color: #2d5016; color: #2d5016; }

.board-header {
    display: flex; align-items: center; gap: 16px; margin-top: 20px;
    padding: 22px; background: #faf6ef;
    border-radius: 14px; box-shadow: 0 2px 8px rgba(45, 33, 21, 0.06);
    border: 1px solid #d4c4a0;
}
.board-icon { font-size: 40px; }
.board-header h2 { font-size: 24px; font-weight: 700; font-family: 'Zen Maru Gothic', sans-serif; color: #2d5016; }

/* ===== Post Form ===== */
.post-form {
    background: #faf6ef; border-radius: 14px; padding: 28px; margin-top: 16px;
    box-shadow: 0 2px 8px rgba(45, 33, 21, 0.06);
    border: 1px solid #d4c4a0;
}
.post-form h3 { font-size: 18px; margin-bottom: 16px; font-weight: 700; color: #2d5016; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 500; color: #5a4a30; }
.required { color: #b85020; }
.form-group input, .form-group select, .form-group textarea {
    padding: 10px 14px; border: 2px solid #d4c4a0; border-radius: 10px;
    font-size: 15px; font-family: inherit; transition: all 0.3s; outline: none; width: 100%;
    background: #fefcf5;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: #2d5016; box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}
.form-group textarea { resize: vertical; }
.char-count { font-size: 12px; color: #a09070; text-align: right; }

.qr-upload-area { border: 2px dashed #b8a880; border-radius: 12px; overflow: hidden; transition: all 0.3s; }
.qr-upload-area.dragover { border-color: #2d5016; background: #e8f0d8; }
.qr-upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; cursor: pointer; color: #a09070; font-size: 13px; text-align: center; }
.qr-upload-placeholder:hover { color: #2d5016; }
.qr-upload-icon { font-size: 28px; }
.qr-upload-hint { font-size: 11px; color: #bba888; }
.qr-preview-wrapper { position: relative; display: inline-block; padding: 12px; text-align: center; width: 100%; }
.qr-preview-wrapper img { max-width: 160px; max-height: 160px; border-radius: 10px; border: 1px solid #d4c4a0; }
.qr-remove-btn { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; background: #b85020; color: #fff; border: none; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qr-remove-btn:hover { background: #983f18; }

.terms-agree { margin-top: 14px; font-size: 13px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: #2d5016; }
.checkbox-label a { color: #2d5016; text-decoration: underline; }

.submit-btn {
    display: block; width: 100%; margin-top: 16px; padding: 15px;
    background: linear-gradient(135deg, #2d5016, #4a7a28);
    color: #f0ebe2; border: none; border-radius: 12px; font-size: 16px;
    font-weight: 700; cursor: pointer; transition: all 0.3s; font-family: inherit;
    box-shadow: 0 4px 16px rgba(45, 80, 22, 0.3);
}
.submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.submit-btn:active { transform: scale(0.98); }

/* ===== Filter ===== */
.filter-bar { display: flex; gap: 12px; margin-top: 16px; }
.filter-bar select {
    padding: 8px 12px; border: 2px solid #d4c4a0; border-radius: 10px;
    font-size: 14px; font-family: inherit; outline: none;
    background: #fefcf5; cursor: pointer; flex: 1;
}
.filter-bar select:focus { border-color: #2d5016; }

/* ===== Posts ===== */
.posts-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.post-card {
    background: #faf6ef; border-radius: 14px; padding: 22px;
    box-shadow: 0 2px 8px rgba(45, 33, 21, 0.06);
    transition: all 0.3s; position: relative;
    border: 1px solid #d4c4a0;
}
.post-card:hover { box-shadow: 0 6px 20px rgba(45, 33, 21, 0.1); transform: translateY(-2px); }
.post-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.post-avatar {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.post-avatar.male { background: linear-gradient(135deg, #c8dcc0, #b0c8a0); }
.post-avatar.female { background: linear-gradient(135deg, #f0d8c0, #e0c8a8); }
.post-avatar.other { background: linear-gradient(135deg, #d8d0c0, #c8c0b0); }
.post-info { flex: 1; min-width: 0; }
.post-name { font-weight: 700; font-size: 16px; color: #2d2215; }
.post-meta { font-size: 12px; color: #8b7a58; margin-top: 2px; }
.post-badge { display: inline-block; padding: 3px 12px; border-radius: 10px; font-size: 11px; font-weight: 700; color: #f0ebe2; }
.post-badge.kakao { background: #8b7530; }
.post-badge.line { background: #2d5016; }
.post-badge.email { background: #5a4a6a; }
.post-badge.insta { background: linear-gradient(135deg, #8b4513, #a0622e); }
.post-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.tag { font-size: 12px; padding: 3px 12px; border-radius: 10px; background: #e8dfc8; color: #5a4a30; font-weight: 500; }
.post-message { margin-top: 12px; font-size: 14px; line-height: 1.8; color: #4a3a20; white-space: pre-wrap; word-break: break-word; }
.post-contact {
    margin-top: 12px; padding: 12px 16px;
    background: linear-gradient(135deg, #e8f0d8, #dce8c8);
    border: 1px solid #b0c890; border-radius: 10px;
    font-size: 14px; display: flex; align-items: center; gap: 8px;
}
.post-contact strong { color: #2d5016; }
.post-contact .contact-value { font-weight: 500; word-break: break-all; }
.copy-btn {
    margin-left: auto; padding: 5px 14px; border: 1px solid #2d5016;
    background: none; color: #2d5016; border-radius: 8px;
    cursor: pointer; font-size: 12px; font-weight: 500;
    transition: all 0.3s; font-family: inherit; flex-shrink: 0;
}
.copy-btn:hover { background: #2d5016; color: #f0ebe2; }
.post-qr { margin-top: 10px; text-align: center; }
.post-qr img { max-width: 120px; max-height: 120px; border-radius: 10px; border: 1px solid #d4c4a0; cursor: pointer; transition: transform 0.2s; }
.post-qr img:hover { transform: scale(1.05); }
.post-qr-label { font-size: 11px; color: #a09070; margin-top: 4px; }
.post-time { font-size: 11px; color: #b0a080; margin-top: 10px; text-align: right; }
.post-delete { position: absolute; top: 12px; right: 12px; background: none; border: none; color: #c4b090; cursor: pointer; font-size: 18px; padding: 4px; line-height: 1; transition: color 0.2s; }
.post-delete:hover { color: #b85020; }
.no-posts { text-align: center; padding: 48px 20px; color: #a09070; font-size: 16px; }

/* ===== Ads ===== */
.ad-section { margin-top: 24px; position: relative; }
.ad-section.ad-inline { margin-top: 16px; }
.ad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ad-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.ad-banner {
    display: flex; flex-direction: column; background: #faf6ef;
    border-radius: 14px; overflow: hidden; text-decoration: none; color: #2d2215;
    box-shadow: 0 2px 10px rgba(45, 33, 21, 0.08); transition: all 0.3s;
    border: 1px solid #d4c4a0;
}
.ad-banner:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(45, 33, 21, 0.15); }
.ad-thumb { height: 100px; overflow: hidden; }
.ad-thumb-bg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.ad-thumb-icon { font-size: 42px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); }
.matching-bg { background: linear-gradient(135deg, #8b4513, #a0622e); }
.live-bg { background: linear-gradient(135deg, #5a4a6a, #6a5a7a); }
.chat-bg { background: linear-gradient(135deg, #2d5016, #4a7a28); }
.ad-body { padding: 12px 14px; }
.ad-tag { display: inline-block; font-size: 10px; font-weight: 700; background: #e8dfc8; color: #6b5a38; padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; }
.ad-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.ad-desc { font-size: 12px; color: #8b7a58; line-height: 1.5; }
.ad-cta { margin-top: 8px; font-size: 13px; font-weight: 700; color: #2d5016; }
.ad-banner-wide {
    display: flex; align-items: center; background: #faf6ef;
    border-radius: 14px; overflow: hidden; text-decoration: none; color: #2d2215;
    box-shadow: 0 2px 10px rgba(45, 33, 21, 0.08); transition: all 0.3s;
    border: 1px solid #d4c4a0; gap: 0;
}
.ad-banner-wide:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(45, 33, 21, 0.15); }
.ad-wide-thumb { width: 80px; min-height: 80px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ad-wide-body { flex: 1; padding: 12px 16px; }
.ad-wide-cta {
    padding: 0 16px; font-size: 13px; font-weight: 700; color: #f0ebe2;
    background: linear-gradient(135deg, #2d5016, #4a7a28);
    align-self: stretch; display: flex; align-items: center; white-space: nowrap;
}

/* ===== Toast ===== */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #2d5016, #3a6820);
    color: #f0ebe2; padding: 12px 28px; border-radius: 12px;
    font-size: 14px; font-weight: 500; z-index: 1000;
    box-shadow: 0 4px 20px rgba(45, 80, 22, 0.4); animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

.related-sites { background: #e8dfc8; padding: 20px 0; margin-top: 32px; border-top: 2px solid #8b6c3e; }
.related-sites h3 { font-size: 14px; color: #6b5a38; margin-bottom: 10px; }
.related-links { display: flex; gap: 16px; flex-wrap: wrap; }
.related-links a { font-size: 13px; color: #2d5016; text-decoration: none; }
.related-links a:hover { text-decoration: underline; }

/* ===== Footer ===== */
.footer {
    margin-top: auto;
    background: linear-gradient(135deg, #2d2215, #3a2e1e);
    color: #b0a080; text-align: center; padding: 24px 0; font-size: 14px;
    border-top: 4px solid #8b4513;
}
.footer-links { margin-top: 8px; display: flex; justify-content: center; gap: 12px; font-size: 13px; }
.footer-links a { color: #d4c4a0; text-decoration: underline; cursor: pointer; }
.footer-links a:hover { color: #f0ebe2; }
.footer-links span { color: #6b5a38; }
.footer-note { font-size: 11px; margin-top: 10px; opacity: 0.7; line-height: 1.6; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .header { padding: 22px 0 18px; }
    .logo { font-size: 24px; }
    .category-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
    .category-card { padding: 20px 12px; }
    .card-icon { font-size: 36px; margin-bottom: 8px; }
    .category-card h2 { font-size: 14px; }
    .category-card p { font-size: 11px; }
    .steps { flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; gap: 8px; }
    .board-header h2 { font-size: 18px; }
    .post-contact { flex-direction: column; align-items: flex-start; gap: 6px; }
    .copy-btn { margin-left: 0; }
    .modal { padding: 24px 20px; }
    .age-gate-buttons { flex-direction: column; }
    .safety-banner { font-size: 12px; }
    .ad-grid, .ad-grid-3 { grid-template-columns: 1fr; }
    .ad-banner-wide { flex-direction: column; }
    .ad-wide-thumb { width: 100%; min-height: 60px; }
    .ad-wide-cta { width: 100%; justify-content: center; padding: 10px; }
}
