/* posts.css — ぼんやりタイムライン */

.posts-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 16px 80px;
}

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

.post-form-card h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-primary, #e91e8c);
}

.post-form-card textarea {
    width: 100%;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.post-form-card textarea:focus {
    outline: none;
    border-color: var(--color-primary, #e91e8c);
}

.post-soft-tennis-row {
    margin: 10px 0 4px;
}
.soft-tennis-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    user-select: none;
}
.soft-tennis-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #e91e8c;
    cursor: pointer;
}
.post-form-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.post-meta-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.post-meta-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.required-mark {
    background: #e91e8c;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 4px;
    padding: 1px 5px;
}

.optional-mark {
    color: #aaa;
    font-size: 0.75rem;
    font-weight: 400;
}

.post-form-meta select,
.post-form-meta input[type="date"] {
    width: 100%;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.88rem;
    font-family: inherit;
    box-sizing: border-box;
    background: #fafafa;
    transition: border-color 0.2s;
}

.post-form-meta select:focus,
.post-form-meta input[type="date"]:focus {
    outline: none;
    border-color: #e91e8c;
}

.post-form-meta select.input-error {
    border-color: #e53935;
    background: #fff5f5;
}

.post-meta-hint {
    font-size: 0.76rem;
    color: #aaa;
    line-height: 1.5;
}

.post-meta-hint a {
    color: #e91e8c;
    text-decoration: none;
}

.post-meta-hint a:hover {
    text-decoration: underline;
}

.post-char-count {
    text-align: right;
    font-size: 0.78rem;
    color: #aaa;
    margin-top: 4px;
}

.post-char-count.over {
    color: #e53935;
}

.btn-post-submit {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 11px;
    background: var(--color-primary, #e91e8c);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.btn-post-submit:hover {
    opacity: 0.88;
}

/* タイムライン・セクション区切り */
.timeline-section {
    margin-top: 28px;
    margin-bottom: 4px;
}

.timeline-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f8bbd0;
}

.timeline-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #c2185b;
}

/* エリア・都道府県フィルター */
.filter-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.filter-controls select {
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 0.88rem;
    font-family: inherit;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aaa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.filter-controls select:focus {
    outline: none;
    border-color: #e91e8c;
}

.filter-controls select.filter-active {
    border-color: #e91e8c;
    background-color: #fce4ec;
    color: #c2185b;
    font-weight: 600;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23e91e8c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.filter-clear-btn {
    display: none;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 7px 11px;
    font-size: 0.82rem;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.filter-clear-btn:hover {
    border-color: #ef5350;
    color: #ef5350;
    background: #fff5f5;
}

/* タイムライン */
.timeline-header {
    font-size: 0.88rem;
    color: #999;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-pref-badge {
    background: #fce4ec;
    color: #c2185b;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.78rem;
    font-weight: 600;
}

.post-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.post-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8bbd0, #e91e8c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

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

.post-username {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-date {
    font-size: 0.75rem;
    color: #bbb;
}

.post-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 10px;
    word-break: break-word;
}

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

.post-tag {
    background: #fce4ec;
    color: #c2185b;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 500;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid #f5f5f5;
}

.btn-like {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.88rem;
    cursor: pointer;
    color: #888;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-like.liked {
    background: #fce4ec;
    border-color: #e91e8c;
    color: #e91e8c;
}

.btn-like:hover {
    border-color: #e91e8c;
    color: #e91e8c;
}

.btn-chat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--color-primary, #e91e8c);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-chat:hover {
    opacity: 0.85;
}

.like-count-text {
    font-size: 0.82rem;
    color: #999;
    margin-left: 2px;
}

/* グループチャット */
.chat-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 16px 80px;
}

.chat-post-preview {
    background: #fce4ec;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.chat-post-preview .label {
    font-size: 0.75rem;
    color: #c2185b;
    font-weight: 700;
    margin-bottom: 4px;
}

.chat-members {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.chat-member-chip {
    background: #f5f5f5;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.8rem;
    color: #555;
    text-decoration: none;
    cursor: pointer;
}
.chat-member-chip:hover {
    background: #fce4ec;
    color: #e91e8c;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    min-height: 120px;
}

.chat-message {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.chat-message.mine {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8bbd0, #e91e8c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.chat-message-bubble {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.9rem;
    max-width: 75%;
    word-break: break-word;
}

.chat-message.mine .chat-message-bubble {
    background: #fce4ec;
    color: #333;
}

.chat-message-meta {
    font-size: 0.72rem;
    color: #bbb;
    margin-top: 3px;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    position: sticky;
    bottom: 70px;
    background: #fff;
    padding: 8px 0;
}

.chat-input-area textarea {
    flex: 1;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.92rem;
    font-family: inherit;
    resize: none;
    min-height: 44px;
    max-height: 100px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.chat-input-area textarea:focus {
    outline: none;
    border-color: var(--color-primary, #e91e8c);
}

.btn-chat-send {
    background: var(--color-primary, #e91e8c);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.btn-chat-send:hover {
    opacity: 0.88;
}

/* グループチャット：イベント作成ボタン */
.btn-create-event-from-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px 16px;
    background: linear-gradient(135deg, #e91e8c, #c2185b);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    box-shadow: 0 3px 10px rgba(233,30,140,0.25);
}

.btn-create-event-from-chat:hover {
    opacity: 0.88;
    box-shadow: 0 5px 16px rgba(233,30,140,0.35);
}

/* グループチャット：システムメッセージ */
.chat-system-message {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f4ff;
    border: 1px solid #c7d7ff;
    border-radius: 10px;
    padding: 8px 14px;
    margin: 6px 0;
    font-size: 0.85rem;
    color: #3b5bdb;
    flex-wrap: wrap;
}

.chat-system-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.chat-system-body {
    flex: 1;
    line-height: 1.5;
    font-weight: 500;
}

.chat-system-time {
    font-size: 0.72rem;
    color: #91a7ff;
    white-space: nowrap;
    align-self: flex-end;
}

/* グループチャット：イベントカード（クリック可能なシステムメッセージ） */
.chat-event-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f4ff;
    border: 1.5px solid #91a7ff;
    border-radius: 10px;
    padding: 10px 14px;
    margin: 6px 0;
    font-size: 0.85rem;
    color: #3b5bdb;
    flex-wrap: wrap;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.chat-event-card:hover {
    background: #e3eaff;
    border-color: #5c7cfa;
    box-shadow: 0 3px 10px rgba(91, 124, 250, 0.18);
    color: #2255cc;
}

.chat-event-card-btn {
    background: #5c7cfa;
    color: #fff;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

/* タグ選択 */
.tag-selector {
    margin: 10px 0 12px;
    padding: 10px 12px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
}

.tag-selector-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 8px;
}

.tag-selector-hint {
    font-weight: 400;
    color: #aaa;
    font-size: 0.75rem;
}

.tag-group {
    margin-bottom: 8px;
}

.tag-group:last-child {
    margin-bottom: 0;
}

.tag-group-label {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 5px;
    font-weight: 600;
}

.tag-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-btn {
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.8rem;
    color: #555;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1.4;
    display: inline-block;
}

.tag-btn:hover {
    border-color: #e91e8c;
    color: #e91e8c;
}

.tag-btn.selected,
.tag-btn.selected:hover {
    background-color: #fce4ec !important;
    border-color: #e91e8c !important;
    color: #c2185b !important;
    font-weight: 700 !important;
}

/* 空状態 */
.empty-timeline {
    text-align: center;
    padding: 48px 16px;
    color: #bbb;
    font-size: 0.95rem;
}

.empty-timeline .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

/* ログインを促すメッセージ（後方互換） */
.login-prompt {
    background: #fce4ec;
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #c2185b;
}

.login-prompt a {
    color: #e91e8c;
    font-weight: 700;
}

/* 未ログインCTAカード */
.guest-cta-card {
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1.5px solid #f48fb1;
}

.guest-cta-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guest-cta-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.guest-cta-text strong {
    font-size: 0.95rem;
    color: #c2185b;
}

.guest-cta-text span {
    font-size: 0.82rem;
    color: #e91e8c;
}

.guest-cta-buttons {
    display: flex;
    gap: 8px;
}

.guest-btn-register {
    flex: 1;
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #f06292, #e91e8c);
    color: #fff;
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(233,30,140,0.3);
    transition: opacity 0.2s;
}

.guest-btn-register:hover { opacity: 0.88; }

.guest-btn-login {
    display: block;
    text-align: center;
    background: #fff;
    color: #e91e8c;
    border: 1.5px solid #e91e8c;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.guest-btn-login:hover {
    background: #fce4ec;
}

/* 非ログイン時ヒーローCTA */
.guest-hero-card {
    background: linear-gradient(160deg, #e91e8c 0%, #f06292 40%, #ff80ab 100%);
    border-radius: 20px;
    padding: 28px 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 6px 24px rgba(233,30,140,0.3);
    position: relative;
    overflow: hidden;
}

.guest-hero-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.guest-hero-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.guest-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.guest-hero-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
    letter-spacing: 0.02em;
}

.guest-hero-lead {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.95);
    text-align: center;
    line-height: 1.75;
    margin: 0;
}

.guest-hero-points {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guest-hero-points li {
    font-size: 0.88rem;
    color: #fff;
    font-weight: 600;
    padding: 0;
}

.guest-hero-note {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.9);
    text-align: center;
    line-height: 1.65;
    margin: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 10px 14px;
}

.guest-hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.guest-hero-btn-register {
    display: block;
    text-align: center;
    background: #fff;
    color: #c2185b;
    border-radius: 14px;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.guest-hero-btn-register:hover {
    background: #fce4ec;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.guest-hero-btn-login {
    display: block;
    text-align: center;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 14px;
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.guest-hero-btn-login:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}

/* チャットページの参加していない表示 */
.not-member-notice {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* AIアシスタント提案ボタン */
.btn-ai-suggest {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: linear-gradient(135deg, #9c27b0, #6a1b9a);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(156,39,176,0.3);
}

.btn-ai-suggest:hover {
    opacity: 0.88;
    box-shadow: 0 4px 14px rgba(156,39,176,0.45);
}

.btn-ai-suggest:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* AIアシスタントメッセージ */
.chat-ai-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f3e5f5, #ede7f6);
    border-radius: 16px;
    border-left: 4px solid #9c27b0;
}

.chat-ai-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.chat-ai-content {
    flex: 1;
    min-width: 0;
}

.chat-ai-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #7b1fa2;
    margin-bottom: 5px;
    letter-spacing: 0.02em;
}

.chat-ai-bubble {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #333;
    word-break: break-word;
}

/* AIメッセージ 閉じるボタン */
.chat-ai-close {
    flex-shrink: 0;
    align-self: flex-start;
    background: none;
    border: none;
    color: #bbb;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.chat-ai-close:hover {
    color: #e91e8c;
    background: rgba(233,30,140,0.08);
}
