/* リセット & ベース */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #f0f2f5;
    color: #333;
    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-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
    backdrop-filter: blur(4px);
}

.modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 560px;
    width: 100%;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

/* 年齢確認モーダル */
.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: #555;
    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: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}

.btn-yes {
    background: linear-gradient(135deg, #818cf8, #6366f1);
    color: #fff;
}

.btn-no {
    background: #e8e8e8;
    color: #666;
}

.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;
}

.terms-content {
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.8;
    color: #444;
    padding-right: 8px;
}

.terms-content h3 {
    font-size: 15px;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 8px;
    color: #333;
}

.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, #818cf8, #6366f1);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
}

.modal-ok-btn:hover {
    opacity: 0.9;
}

/* QRコード拡大モーダル */
.qr-zoom-modal {
    max-width: 400px;
    padding: 16px;
    text-align: center;
    background: #fff;
}

.qr-zoom-modal img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}

/* ===== 安全バナー ===== */
.safety-banner {
    background: #fff3cd;
    color: #856404;
    padding: 10px 0;
    font-size: 13px;
    text-align: center;
    border-bottom: 1px solid #ffc107;
}

/* ===== ヘッダー ===== */
.header {
    background: linear-gradient(135deg, #7c3aed, #6366f1, #3b82f6);
    color: #fff;
    padding: 24px 0 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.logo {
    font-size: 28px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 32px;
}

.header-sub {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 4px;
}

/* ===== カテゴリカード ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.category-card {
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition: opacity 0.2s;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card.kakao {
    background: linear-gradient(135deg, #fee500, #e0c800);
    color: #3c1e1e;
}

.category-card.line {
    background: linear-gradient(135deg, #06c755, #04a844);
}

.category-card.email {
    background: linear-gradient(135deg, #4a90d9, #357abd);
}

.category-card.insta {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.category-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.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.3);
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.category-card.kakao .post-count {
    background: rgba(0, 0, 0, 0.1);
}

/* ===== 使い方 ===== */
.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: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.step-num {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #818cf8, #6366f1);
    color: #fff;
    border-radius: 50%;
    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;
}

.step p {
    font-size: 12px;
    color: #888;
}

/* ===== 最新投稿セクション ===== */
.recent-section {
    margin-top: 32px;
    margin-bottom: 32px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 3px solid #6366f1;
    display: inline-block;
}

/* ===== 掲示板画面 ===== */
.back-btn {
    background: none;
    border: 2px solid #ddd;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-top: 20px;
    transition: all 0.2s;
}

.back-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.board-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.board-icon {
    font-size: 40px;
}

.board-header h2 {
    font-size: 24px;
    font-weight: 700;
}

/* ===== 投稿フォーム ===== */
.post-form {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.post-form h3 {
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 700;
}

.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: #555;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #6366f1;
}

.form-group textarea {
    resize: vertical;
}

.char-count {
    font-size: 12px;
    color: #999;
    text-align: right;
}

/* QRアップロードエリア */
.qr-upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.qr-upload-area.dragover {
    border-color: #6366f1;
    background: #fff8f0;
}

.qr-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px;
    cursor: pointer;
    color: #999;
    font-size: 13px;
    text-align: center;
}

.qr-upload-placeholder:hover {
    color: #6366f1;
}

.qr-upload-icon {
    font-size: 28px;
}

.qr-upload-hint {
    font-size: 11px;
    color: #bbb;
}

.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: 8px;
    border: 1px solid #eee;
}

.qr-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    background: #e74c3c;
    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: #c0392b;
}

/* 利用規約同意 */
.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: #6366f1;
}

.checkbox-label a {
    color: #6366f1;
    text-decoration: underline;
}

.submit-btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    background: linear-gradient(135deg, #818cf8, #6366f1);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    font-family: inherit;
}

.submit-btn:hover {
    opacity: 0.9;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* ===== フィルター ===== */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.filter-bar select {
    padding: 8px 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: #fff;
    cursor: pointer;
    flex: 1;
}

.filter-bar select:focus {
    border-color: #6366f1;
}

/* ===== 投稿一覧 ===== */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.post-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
    position: relative;
}

.post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.post-top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.post-avatar.male {
    background: #dbeafe;
}

.post-avatar.female {
    background: #fce7f3;
}

.post-avatar.other {
    background: #e0e7ff;
}

.post-info {
    flex: 1;
    min-width: 0;
}

.post-name {
    font-weight: 700;
    font-size: 16px;
}

.post-meta {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.post-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.post-badge.kakao {
    background: #e0c800;
    color: #3c1e1e;
}

.post-badge.line {
    background: #06c755;
}

.post-badge.email {
    background: #4a90d9;
}

.post-badge.insta {
    background: linear-gradient(135deg, #f09433, #dc2743);
}

.post-tags {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tag {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    background: #f0f2f5;
    color: #555;
    font-weight: 500;
}

.post-message {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-contact {
    margin-top: 12px;
    padding: 10px 16px;
    background: #fff8f0;
    border: 1px solid #ffd9b3;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-contact strong {
    color: #6366f1;
}

.post-contact .contact-value {
    font-weight: 500;
    word-break: break-all;
}

.copy-btn {
    margin-left: auto;
    padding: 4px 12px;
    border: 1px solid #6366f1;
    background: none;
    color: #6366f1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #6366f1;
    color: #fff;
}

/* QRコード表示 */
.post-qr {
    margin-top: 10px;
    text-align: center;
}

.post-qr img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: transform 0.2s;
}

.post-qr img:hover {
    transform: scale(1.05);
}

.post-qr-label {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.post-time {
    font-size: 11px;
    color: #bbb;
    margin-top: 10px;
    text-align: right;
}

.post-delete {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.post-delete:hover {
    color: #e74c3c;
}

/* 投稿なし */
.no-posts {
    text-align: center;
    padding: 48px 20px;
    color: #999;
    font-size: 16px;
}

/* ===== 広告バナー ===== */
.ad-section {
    margin-top: 24px;
    position: relative;
}

/* ヒーローバナー（大きい広告） */
.ad-banner-hero {
    display: block;
    text-decoration: none;
    color: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ad-banner-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
}

.ad-hero-bg {
    background: linear-gradient(135deg, #6366f1, #7c3aed, #a855f7, #ec4899);
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.ad-hero-icon {
    font-size: 64px;
    flex-shrink: 0;
}

.ad-hero-text {
    flex: 1;
}

.ad-hero-title {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 8px;
}

.ad-hero-desc {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 12px;
}

.ad-hero-cta {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.ad-banner-hero:hover .ad-hero-cta {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 600px) {
    .ad-hero-bg {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }

    .ad-hero-icon {
        font-size: 48px;
    }

    .ad-hero-title {
        font-size: 18px;
    }
}

.ad-section.ad-inline {
    margin-top: 16px;
}

.ad-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background: #999;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 4px;
    z-index: 1;
    letter-spacing: 1px;
}

.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: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
}

.ad-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.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, #ff758c, #ff7eb3, #ff9a9e);
}

.live-bg {
    background: linear-gradient(135deg, #a855f7, #7c3aed, #6366f1);
}

.chat-bg {
    background: linear-gradient(135deg, #06b6d4, #0891b2, #0e7490);
}

.ad-body {
    padding: 12px 14px;
}

.ad-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    background: #f0f2f5;
    color: #666;
    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: #888;
    line-height: 1.5;
}

.ad-cta {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #6366f1;
}

/* 横長バナー（掲示板内） */
.ad-banner-wide {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
    gap: 0;
}

.ad-banner-wide:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.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: #fff;
    background: linear-gradient(135deg, #818cf8, #6366f1);
    align-self: stretch;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .ad-grid {
        grid-template-columns: 1fr;
    }

    .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;
    }
}

/* ===== トースト ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    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: #f8f9fa;
    padding: 20px 0;
    margin-top: 32px;
    border-top: 1px solid #e8e8e8;
}

.related-sites h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.related-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.related-links a {
    font-size: 13px;
    color: #6366f1;
    text-decoration: none;
}

.related-links a:hover {
    text-decoration: underline;
}

/* ===== フッター ===== */
.footer {
    margin-top: auto;
    background: #2d3436;
    color: #b2bec3;
    text-align: center;
    padding: 24px 0;
    font-size: 14px;
}

.footer-links {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
}

.footer-links a {
    color: #dfe6e9;
    text-decoration: underline;
    cursor: pointer;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links span {
    color: #636e72;
}

.footer-note {
    font-size: 11px;
    margin-top: 10px;
    opacity: 0.7;
    line-height: 1.6;
}

/* ===== レスポンシブ ===== */
@media (max-width: 600px) {
    .header {
        padding: 20px 0 16px;
    }

    .logo {
        font-size: 22px;
    }

    .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;
    }
}
