/* features.css | 화면별 디자인 (게시판 / 댓글 / 채팅 / 프로필 / 관리자 / 로그인) */

/* ---- 공통 히어로 ---- */
.hero { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 22px; padding: 1.4rem 1.4rem; margin-bottom: 1.1rem; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3c4, var(--sun)); opacity: .75; }
.hero h1, .hero p { position: relative; z-index: 1; margin: 0 0 .25rem; max-width: 80%; }
.hero h1 { color: var(--primary); }
.hero p { color: var(--muted); }
.hero-chat { background: #effaf5; } .hero-chat::after { background: var(--mint); }
.hero-admin { background: #f1ecff; } .hero-admin::after { background: #dcd9ff; }
.section-title { margin: 1.5rem 0 .75rem; }
.back-link { display: inline-flex; align-items: center; gap: .3rem; margin-bottom: .75rem; font-weight: 600; }

/* ---- 로그인/가입 ---- */
.auth-wrap { display: grid; place-items: start center; padding-top: 1rem; }
.auth-card { width: min(100%, 440px); padding: 1.5rem; display: flex; flex-direction: column; gap: .9rem; }
.auth-card h1 { margin: 0; }
.steps { padding-left: 1.2rem; margin: 0; } .steps li { margin-bottom: .4rem; }

/* ---- 게시판 목록 ---- */
.toolbar { display: flex; gap: .6rem; margin-bottom: .6rem; align-items: center; }
.search-wrap { position: relative; flex: 1; display: flex; align-items: center; }
.search-wrap .icon { position: absolute; left: .85rem; color: var(--muted); pointer-events: none; }
.search-input { padding-left: 2.6rem !important; border-radius: 999px !important; }
.post-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { padding: 0; display: flex; flex-direction: column; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.post-link { color: inherit; display: block; flex: 1; }
.post-link:hover { text-decoration: none; }
.post-cover { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-cover-empty { display: grid; place-items: center; color: #9bb9d1; }
.post-main { padding: .85rem 1rem 0; }
.post-title { margin: 0 0 .25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-snippet { color: var(--muted); font-size: .9rem; margin: 0 0 .5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; align-items: center; gap: .6rem; padding: .5rem 1rem .8rem; flex-wrap: wrap; }
.stat { display: inline-flex; align-items: center; gap: .25rem; color: var(--muted); font-size: .9rem; }
.more-wrap { padding: 1rem 0; }
.like-btn { display: inline-flex; align-items: center; gap: .3rem; border: 0; background: transparent; color: var(--muted); padding: .25rem .5rem; border-radius: 999px; font-weight: 700; min-height: 36px; }
.like-btn:hover { background: var(--coral-soft); color: var(--coral); }
.like-btn.liked { color: var(--coral); }
.like-btn.liked .icon { fill: var(--coral); }

/* ---- 글 쓰기 / 상세 ---- */
.form-card { max-width: 720px; margin: 0 auto; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.thumb { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15, 39, 64, .75); color: #fff; display: grid; place-items: center; padding: 0; }
.thumb-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; border: 2px dashed var(--border); color: var(--primary); font-size: .75rem; font-weight: 700; cursor: pointer; }
.post-detail { padding: 0 0 1rem; max-width: 760px; margin: 0 auto 1.5rem; overflow: hidden; }
.post-detail > *:not(.gallery) { margin-left: 1.1rem; margin-right: 1.1rem; }
.post-detail .chips-row { margin-top: 1rem; }
.post-body { white-space: pre-wrap; font-size: 1.02rem; line-height: 1.7; margin-top: 1rem; }
.author-lg .author-text { display: flex; flex-direction: column; line-height: 1.3; }
.gallery { display: flex; flex-direction: column; gap: 6px; margin-top: 1rem; background: var(--surface-2); }
.gallery-item { display: block; width: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; }
.gallery-item img { display: block; width: 100%; height: auto; max-height: 90vh; object-fit: contain; background: var(--surface-2); }
.post-place { margin-top: 1rem; display: flex; gap: .6rem; align-items: flex-start; }
.post-actions { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* ---- 댓글 ---- */
.comments { max-width: 760px; margin: 0 auto; }
.composer { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.composer-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.login-hint { margin-bottom: 1rem; }
.comment { display: flex; gap: .65rem; padding: .75rem 0; border-top: 1px solid var(--border); }
.comment.is-reply { border-top: 0; padding: .5rem 0; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.author-name { font-weight: 700; color: var(--text); }
.comment-body { white-space: pre-wrap; margin: .15rem 0 .25rem; }
.comment-actions { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; margin-left: -.5rem; }
.replies { margin-top: .25rem; padding-left: .75rem; border-left: 3px solid var(--primary-soft); }
.reply-box { margin-top: .4rem; }

/* ---- 채팅 ---- */
.room-list { display: grid; gap: .75rem; max-width: 640px; }
.room-card { display: flex; align-items: center; gap: .9rem; color: inherit; }
.room-card:hover { text-decoration: none; border-color: var(--sea); }
.room-card.closed { opacity: .6; }
.room-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.room-text { display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.chat-head div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.msg-scroll { flex: 1; overflow-y: auto; padding: .75rem; background: var(--surface-2); overscroll-behavior: contain; }
.msg-list { display: flex; flex-direction: column; gap: .5rem; }
.day-divider { text-align: center; font-size: .75rem; color: var(--muted); margin: .5rem 0; }
.day-divider span { background: var(--surface); padding: .15rem .7rem; border-radius: 999px; }
.msg { display: flex; gap: .5rem; align-items: flex-end; max-width: 88%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-bubble-wrap { display: flex; flex-direction: column; min-width: 0; }
.msg.mine .msg-bubble-wrap { align-items: flex-end; }
.msg-author { font-size: .75rem; color: var(--muted); margin: 0 0 2px .25rem; font-weight: 600; }
.msg-line { display: flex; align-items: center; gap: .15rem; }
.msg-bubble { background: var(--surface); border: 1px solid var(--border); padding: .5rem .8rem; border-radius: 18px 18px 18px 4px; min-width: 0; }
.msg.mine .msg-bubble { background: var(--primary); border-color: var(--primary); color: #fff; border-radius: 18px 18px 4px 18px; }
.msg-text { margin: 0; white-space: pre-wrap; }
.msg-time { font-size: .7rem; color: var(--muted); margin: 2px .35rem 0; }
.msg-tools { display: flex; opacity: 0; transition: opacity .15s; }
.msg:hover .msg-tools, .msg:focus-within .msg-tools { opacity: 1; }
@media (hover: none) { .msg-tools { opacity: .7; } }
.msg-edit-box { display: flex; flex-direction: column; gap: .4rem; }
.msg-edit { color: var(--text); min-width: 200px; }
.chat-composer { display: flex; align-items: flex-end; gap: .5rem; padding: .6rem .7rem calc(.6rem + env(safe-area-inset-bottom) * 0); border-top: 1px solid var(--border); background: var(--surface); }
.chat-composer textarea { min-height: 44px; max-height: 120px; border-radius: 22px; resize: none; padding: .6rem 1rem; }
.send-btn { width: 46px; height: 46px; min-height: 46px; padding: 0; flex: none; }

/* ---- 프로필 ---- */
.profile-head { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 1rem; }
.profile-info { min-width: 0; }
.profile-info h1 { margin: 0; font-size: 1.4rem; }
.bio { white-space: pre-wrap; margin: .4rem 0; }
@media (max-width: 480px) { .profile-head { flex-direction: column; text-align: center; } .profile-head .actions { justify-content: center; } }
#view > .card.stack { margin-bottom: 1rem; max-width: 720px; }

/* ---- 관리자 ---- */
.admin-body { display: flex; flex-direction: column; gap: .9rem; max-width: 760px; }
.report-card .snapshot { margin: .5rem 0; padding: .6rem .9rem; background: var(--surface-2); border-left: 4px solid var(--sea); border-radius: 6px; white-space: pre-wrap; }
.user-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .7rem 1rem; }

/* ---- 별점 ---- */
.stars { display: inline-flex; align-items: center; gap: 2px; color: var(--sun-deep, #e0a100); }
.stars .star-off { color: #c9d9e6; }
.stars-num { margin-left: .35rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
.post-rating { margin: 0 0 .3rem; }
.detail-rating { margin: -.2rem 0 .6rem; }
.stars-input { gap: .15rem; }
.star-btn { border: 0; background: none; padding: .15rem; border-radius: 8px; line-height: 0; cursor: pointer; color: var(--sun-deep, #e0a100); min-width: 40px; min-height: 40px; display: grid; place-items: center; }
.star-btn .star-off { color: #c9d9e6; }
.star-btn:hover { background: var(--warn-soft); }

/* ---- 글쓰기 + 버튼 (카카오톡 스타일 첨부 메뉴) ---- */
.attach-row { position: relative; display: flex; align-items: center; gap: .6rem; }
.plus-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--primary); display: grid; place-items: center; cursor: pointer; padding: 0; transition: transform .15s; }
.plus-btn[aria-expanded="true"] { transform: rotate(45deg); background: var(--primary-soft); }
.attach-menu { position: absolute; left: 0; bottom: 52px; z-index: 5; display: flex; gap: .5rem; padding: .6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); }
.attach-menu[hidden] { display: none; }
.attach-item { display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 76px; padding: .6rem .5rem; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--text); font-weight: 700; font-size: .8rem; cursor: pointer; }
.attach-item:hover { background: var(--primary-soft); color: var(--primary); }

/* ---- 장소 카드 / 지도 ---- */
.place-card { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.place-card[hidden] { display: none; }
.place-head { display: flex; align-items: center; gap: .4rem; padding: .6rem .75rem; flex-wrap: wrap; }
.place-head svg { color: var(--coral); flex: none; }
.place-detail { margin: 1rem 0; }
.place-links { display: flex; gap: .5rem; padding: .6rem .75rem; flex-wrap: wrap; }
.map-mini { height: 150px; background: var(--surface-2); }
.map-mini-lg { height: 240px; }
.map-box { height: 300px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); z-index: 0; }
.map-box-lg { height: min(70vh, 560px); }
.map-dialog { display: flex; flex-direction: column; gap: .7rem; }
.map-dialog h3 { margin: 0; }
.dialog:has(.map-dialog) { width: min(96vw, 560px); max-height: 94vh; overflow: auto; }
.map-search { display: flex; gap: .5rem; }
.map-search .search-wrap { flex: 1; min-width: 0; }
.map-tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.map-results { display: flex; flex-direction: column; gap: .35rem; max-height: 180px; overflow: auto; }
.map-results:empty { display: none; }
.map-result { display: flex; gap: .5rem; align-items: flex-start; text-align: left; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; }
.map-result:hover { background: var(--primary-soft); }
.map-result svg { color: var(--coral); margin-top: 2px; flex: none; }
.map-result span { display: flex; flex-direction: column; min-width: 0; }
.map-result small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-popup { display: flex; flex-direction: column; gap: .15rem; min-width: 140px; }

/* 지도 핀 (이미지 파일 없이 CSS 로만 그림) */
.pin-marker { width: 28px; height: 36px; background: none; border: 0; cursor: pointer; }
.pin-marker::before { content: ''; position: absolute; left: 2px; top: 0; width: 24px; height: 24px; border-radius: 50% 50% 50% 0; background: var(--coral); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transform: rotate(-45deg); transform-origin: 50% 50%; box-sizing: border-box; }
.pin-marker::after { content: ''; position: absolute; left: 10px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

/* ---- 국기 ---- */
.flag { display: inline-flex; vertical-align: middle; margin-left: .35em; line-height: 1; }
.flag-img { display: inline-block; width: auto; height: 1em; min-height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); vertical-align: middle; }
.info-value .flag-img { height: 15px; margin-right: .4em; }
.name-flag { display: inline; }

/* ---- 글쓰기: + 옆의 지도 바로가기 ---- */
.map-quick { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--border); background: var(--surface); color: var(--primary); border-radius: 999px; padding: .35rem .8rem; font-weight: 700; font-size: .9rem; cursor: pointer; min-height: 40px; }
.map-quick:hover { background: var(--primary-soft); }
.map-quick svg { color: var(--coral); }

/* ---- 이벤트 ---- */
.events-page { display: flex; flex-direction: column; gap: 1rem; }
.event-card { padding: 1.1rem; display: flex; flex-direction: column; gap: .6rem; }
.event-card h2, .event-card h3 { margin: 0; }
.event-card p { margin: 0; color: var(--muted); }
.event-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.event-links .btn { gap: .4rem; }
.region-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .region-grid { grid-template-columns: 1fr 1fr; } }
.event-note { font-size: .85rem; color: var(--muted); }

/* ---- 프로필 상세 / 공개 설정 ---- */
.info-list { display: flex; flex-direction: column; gap: .4rem; margin: .6rem 0; }
.info-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.info-row svg { color: var(--primary); flex: none; }
.info-label { color: var(--muted); font-size: .85rem; min-width: 5.5rem; }
.info-value { font-weight: 600; }
.private-badge { display: inline-flex; align-items: center; gap: .25rem; margin-left: .4rem; }
.field-vis { display: flex; flex-direction: column; gap: .3rem; padding: .7rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.field-vis .field { margin: 0; }
.vis-toggle { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--primary); align-self: flex-start; }
.vis-text { display: inline-flex; align-items: center; gap: .3rem; }
.vis-text.is-private { color: var(--muted); }
.vis-toggle input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 999px; background: #c9d9e6; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.vis-toggle input[type=checkbox]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.vis-toggle input[type=checkbox]:checked { background: var(--primary); }
.vis-toggle input[type=checkbox]:checked::after { transform: translateX(18px); }
.vis-toggle input[type=checkbox]:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 2px; }
.back-link.btn { padding-left: 0; }
.msg-author { text-decoration: none; color: inherit; }
.msg-author:hover { text-decoration: underline; }
.card-edit { color: var(--primary); }

/* ---- 이벤트: 실시간 행사 카드 / 큰 링크 줄 ---- */
.live-section { display: flex; flex-direction: column; gap: .5rem; }
.live-list { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.live-event { position: relative; padding: 1rem; display: flex; flex-direction: column; gap: .35rem; transition: box-shadow .15s, transform .15s; }
.live-event:hover { box-shadow: 0 6px 18px rgba(0,0,0,.1); transform: translateY(-1px); }
.live-event h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.live-event p { margin: 0; display: flex; gap: .3rem; align-items: flex-start; }
.live-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.live-event a.stretched { color: inherit; text-decoration: none; display: inline; }
.live-event a.stretched::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.live-event a.stretched .icon { margin-left: .3rem; vertical-align: -2px; color: var(--muted); }
.event-links.raised { position: relative; z-index: 1; margin-top: .25rem; }
.empty-note { grid-column: 1 / -1; padding: 1rem; text-align: center; }
.link-rows { display: flex; flex-direction: column; gap: .5rem; }
.link-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 48px; padding: .6rem .9rem; border: 1px solid var(--border); border-radius: var(--radius, 12px); background: var(--surface); color: inherit; text-decoration: none; font-weight: 600; }
.link-row:hover { border-color: var(--primary); }

/* 이벤트 사진 */
.live-event.has-photo { padding-top: 0; overflow: hidden; }
.live-photo { display: block; width: calc(100% + 2rem); margin: 0 -1rem .6rem; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft, #e6f4fb); }

/* =====================================================================
   모임 & 동행 (meetups)
   ===================================================================== */
.hero-meet { background: #fff6f0; } .hero-meet::after { background: #ffd9cf; }
.hero-cta { margin-top: .75rem; }
.btn-sun { background: var(--sun); color: #3b2a00; font-weight: 700; border: 0; }
.btn-sun:hover { filter: brightness(.96); text-decoration: none; }
.btn-lg { min-height: 52px; font-size: 1.05rem; width: 100%; }
.badge-bad { background: var(--bad-soft); color: var(--bad); }

.segmented { display: flex; gap: .25rem; padding: .25rem; background: var(--surface-2); border-radius: 999px; margin: 1rem 0 .75rem; }
.segmented .seg { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: .55rem .75rem; font-weight: 700; color: var(--muted); min-height: 40px; }
.segmented .seg.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.filter-row { display: flex; gap: .5rem; align-items: center; margin: .5rem 0 1rem; flex-wrap: wrap; }
.filter-row .lang-select { max-width: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }

.meetup-list { display: grid; gap: .85rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .meetup-list { grid-template-columns: 1fr 1fr; } }
.meetup-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.meetup-card:hover { text-decoration: none; box-shadow: 0 8px 22px rgba(0,0,0,.12); transform: translateY(-2px); }
.meetup-card.is-over { opacity: .65; }
.mc-media { position: relative; display: block; aspect-ratio: 16 / 7; max-height: 150px; width: 100%; background: linear-gradient(135deg, #fde68a, #fdba74); }
.mc-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; }
.mc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mc-body { display: flex; flex-direction: column; gap: .4rem; padding: .85rem 1rem 1rem; }
.mc-when { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--primary); font-size: .9rem; }
.date-badge { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 46px; padding: .2rem .4rem; border-radius: 12px; background: var(--primary-soft); color: var(--primary); line-height: 1.05; }
.date-badge b { font-size: 1.25rem; }
.date-badge span { font-size: .7rem; text-transform: uppercase; }
.mc-title { font-size: 1.1rem; line-height: 1.3; color: var(--text); }
.mc-place { display: flex; align-items: center; gap: .3rem; font-size: .9rem; }
.mc-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .85rem; }
.mc-badges { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.lang-badge { letter-spacing: .04em; }
.spots { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--text); font-size: .85rem; }
.spots-bar { display: inline-block; width: 56px; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.spots-bar i { display: block; height: 100%; background: var(--sea); border-radius: 99px; }

/* 만들기 폼 */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .6rem .3rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: .8rem; font-weight: 600; color: var(--muted); min-height: 64px; }
.cat-tile.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }
.cat-emoji { font-size: 1.5rem; }
.switch-row { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.switch-row input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 999px; background: #c9d9e6; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: .1rem 0 0; border: 0; }
.switch-row input[type=checkbox]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch-row input[type=checkbox]:checked { background: var(--primary); }
.switch-row input[type=checkbox]:checked::after { transform: translateX(18px); }
.switch-row span { display: flex; flex-direction: column; gap: .15rem; }
.cover-preview { position: relative; display: inline-block; max-width: 100%; }
.cover-preview img { display: block; max-width: 100%; max-height: 220px; border-radius: var(--radius-sm); }
.safety-note { display: flex; gap: .4rem; align-items: flex-start; padding: .6rem .75rem; background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); font-size: .85rem; margin: 0; }

/* 상세 */
.meetup-head { padding: 0; overflow: hidden; }
.md-cover { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.md-body { padding: 1rem 1.1rem 1.2rem; }
.md-body h1 { margin: 0; font-size: 1.5rem; line-height: 1.25; }
.person { display: inline-flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none; }
.person:hover { text-decoration: none; }
.person-text { display: flex; flex-direction: column; line-height: 1.2; }
.md-facts { display: grid; gap: .8rem; }
.md-fact { display: flex; gap: .75rem; align-items: flex-start; }
.md-fact > svg { flex: none; color: var(--primary); margin-top: .1rem; }
.md-fact > div { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.md-desc { white-space: pre-wrap; margin: 0; line-height: 1.65; word-break: break-word; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .75rem; }
.person-tile { display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; font-size: .85rem; }
.person-name { word-break: break-word; }
.notice { display: flex; gap: .5rem; align-items: center; justify-content: center; padding: .85rem 1rem; border-radius: var(--radius-sm); background: var(--surface-2); margin: 0; font-weight: 600; }
.notice-good { background: #dcfce7; color: var(--good); }
.notice-warn { background: var(--warn-soft); color: var(--warn); }
.notice-bad { background: var(--bad-soft); color: var(--bad); }
.request-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .5rem 0; border-top: 1px solid var(--border); }
.request-text { flex: 1; min-width: 140px; }
.request-text p { margin: .15rem 0 0; }
.request-actions { display: flex; gap: .4rem; }
.mm-chat h2 { display: flex; align-items: center; gap: .3rem; margin: 0; }
.mm-scroll { max-height: 360px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .5rem; background: var(--bg); }
.mm-list { display: flex; flex-direction: column; gap: .5rem; }
.safety-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; font-size: .92rem; }
.safety-card { background: #fffbeb; border-color: #fde68a; }
.center-actions { justify-content: center; }

/* ---- 모임 상세 지도: 눌러서 지도 앱 열기 / 소셜 로그인 / 법적 링크 ---- */
.meetup-detail .map-mini { cursor: pointer; height: 220px; }
.map-open { padding-left: 0; justify-content: flex-start; }
.map-chooser .map-app { justify-content: space-between; font-weight: 700; }
.btn-kakao { background: #fee500; border-color: #fee500; color: #191919; font-weight: 700; }
.btn-kakao:hover { background: #f5dc00; }
.social-buttons { margin: .25rem 0; }
.legal-links a { text-decoration: underline; }

/* ---- 지역 선택(전국) ---- */
.toolbar { flex-wrap: wrap; }
.toolbar .search-wrap { flex: 1 1 100%; }
@media (min-width: 640px) { .toolbar .search-wrap { flex: 1 1 260px; } }
.filter-row select { flex: 1 1 140px; min-width: 0; }
.about-card { max-width: 720px; margin: 0 auto 1rem; padding: 1.5rem; }
.about-card h2 { margin: 0; }
.guide-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.guide-list li { display: flex; gap: .6rem; align-items: flex-start; }
.guide-list .icon { color: var(--primary); margin-top: .2rem; }
.region-chips { margin: .6rem 0 1rem; }
.region-chips .chip { cursor: pointer; }

/* ---- 관심사 ---- */
.interest-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0; }
.interest-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .85rem; border-radius: 999px; background: var(--primary-soft); color: #4b36a6; font-weight: 700; font-size: .85rem; border: 1px solid transparent; }
.interest-chips.pick .interest-pill { background: var(--surface); color: var(--text); border-color: var(--border); cursor: pointer; min-height: 40px; font-size: .9rem; }
.interest-chips.pick .interest-pill:hover { border-color: var(--primary); }
.interest-chips.pick .interest-pill.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- 채팅: 흰 배경 + 검은 글씨 + 예쁜 말풍선 ---- */
.msg-scroll { background: #fff; }
.chat-head { background: #fff; }
.msg-list { gap: .7rem; }
.msg { max-width: 86%; }
.msg-author { color: #3a4a63; font-weight: 700; }
.msg-bubble { background: #f1f3f7; border: 0; color: #111; padding: .6rem .95rem; border-radius: 20px 20px 20px 6px; box-shadow: 0 1px 2px rgba(20, 35, 59, .06); line-height: 1.45; }
.msg.mine .msg-bubble { background: #ece4ff; border: 0; color: #111; border-radius: 20px 20px 6px 20px; }
.msg-text { color: #111; word-break: break-word; }
.msg-time { color: #6b7a90; }
.msg-bubble.has-attach { padding: .35rem; }
.msg-bubble.has-attach .msg-text { padding: .3rem .55rem .2rem; }
.msg-photo { display: block; padding: 0; border: 0; background: none; border-radius: 14px; overflow: hidden; cursor: zoom-in; line-height: 0; }
.msg-photo img { width: min(240px, 62vw); max-height: 300px; object-fit: cover; }
.msg-place { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; width: min(260px, 66vw); text-align: left; border: 0; background: #fff; border-radius: 14px; color: #111; cursor: pointer; }
.msg-place:hover { background: #faf6ff; }
.msg-place-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--coral-soft); color: var(--coral); }
.msg-place-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.msg-place-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-place-text span { font-size: .78rem; color: var(--primary); font-weight: 700; }
.chat-composer { background: #fff; align-items: center; }
.chat-composer textarea { background: #f1f3f7; border-color: transparent; color: #111; }
.chat-composer textarea::placeholder { color: #6b7a90; }
.attach-wrap { position: relative; flex: none; }
.plus-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.plus-btn:hover { background: #e4dafc; }
.attach-menu { position: absolute; left: 0; bottom: 54px; z-index: 5; min-width: 190px; padding: .35rem; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); }
.attach-item { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .55rem .7rem; border: 0; background: none; border-radius: 12px; font-weight: 700; color: #111; cursor: pointer; text-align: left; }
.attach-item:hover { background: var(--surface-2); }
.ai-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; }
.ai-photo { background: var(--mint); color: #0f7a58; } .ai-place { background: var(--coral-soft); color: var(--coral); }
.guest-banner { display: flex; align-items: center; gap: .5rem; padding: .5rem .8rem; background: var(--warn-soft); color: #5c3d00; font-size: .85rem; font-weight: 600; border-top: 1px solid #f3dca0; }
.guest-banner span { flex: 1; }
.guest-gate { max-width: 460px; margin: 1.5rem auto; text-align: center; align-items: stretch; }
.guest-gate .room-icon { align-self: center; }
.photo-viewer img { width: 100%; max-height: 75vh; object-fit: contain; border-radius: 12px; }
.mm-chat .msg-bubble { background: #f1f3f7; color: #111; border: 0; } .mm-chat .msg.mine .msg-bubble { background: #ece4ff; color: #111; }
.attach-menu { display: flex; flex-direction: column; gap: .1rem; }
.attach-menu[hidden] { display: none; }
.attach-item { flex-direction: row; justify-content: flex-start; min-height: 48px; }

/* ---- 칩 / 기타 ---- */
.chip-star { border-color: #f2b300; background: #fff8e0; font-weight: 800; }
.chip-star.active { background: #ffe9a8; border-color: #e0a100; color: var(--text); }
.event-card.is-mine { box-shadow: 0 0 0 2px #f2b300; }
.stack-sm { display: grid; gap: .5rem; margin-bottom: .5rem; }
.region-chips { margin: .25rem 0 .75rem; }
/* ---- 포인트 ---- */
.points-card { display: grid; gap: .4rem; background: linear-gradient(120deg, #f3ebff, #fff0f5); }
.points-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.points-line { margin: 0; font: 800 1.6rem var(--font-head); color: var(--primary); }
.points-note { margin: 0 0 .5rem; font-weight: 700; color: var(--primary); }
.points-note.bad { color: #c0392b; }
.point-pop { text-align: center; position: relative; overflow: hidden; padding-top: 1rem; }
.point-avatar { width: 150px; height: 150px; margin: 0 auto .5rem; border-radius: 50%; background: linear-gradient(160deg, #f3ebff, #ffeef3); border: 3px solid var(--primary); animation: pop-bounce .7s ease; overflow: hidden; display: grid; place-items: center; font-size: 4.2rem; }
.point-gain { font: 800 2.6rem var(--font-head); margin: .2rem 0; color: var(--primary); }
.point-pop.is-big .point-gain { color: #e0475f; font-size: 3.2rem; }
.point-pop.is-jackpot .point-avatar { border-color: #f2b300; box-shadow: 0 0 0 6px #ffe9a8; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; background: var(--primary); animation: confetti-fall 2.2s ease-in infinite; }
.confetti i:nth-child(3n) { background: #ee5f82; } .confetti i:nth-child(3n+1) { background: #f2b300; }
.confetti i:nth-child(1) { left: 6%; animation-delay: 0s; } .confetti i:nth-child(2) { left: 14%; animation-delay: .4s; }
.confetti i:nth-child(3) { left: 22%; animation-delay: .9s; } .confetti i:nth-child(4) { left: 30%; animation-delay: .2s; }
.confetti i:nth-child(5) { left: 38%; animation-delay: 1.1s; } .confetti i:nth-child(6) { left: 46%; animation-delay: .6s; }
.confetti i:nth-child(7) { left: 54%; animation-delay: 1.4s; } .confetti i:nth-child(8) { left: 62%; animation-delay: .3s; }
.confetti i:nth-child(9) { left: 70%; animation-delay: .8s; } .confetti i:nth-child(10) { left: 78%; animation-delay: 1.2s; }
.confetti i:nth-child(11) { left: 86%; animation-delay: .5s; } .confetti i:nth-child(12) { left: 92%; animation-delay: 1s; }
.confetti i:nth-child(13) { left: 10%; animation-delay: 1.6s; } .confetti i:nth-child(14) { left: 82%; animation-delay: 1.7s; }
@keyframes confetti-fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(420px) rotate(540deg); opacity: .2; } }
@keyframes pop-bounce { 0% { transform: scale(.4); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .confetti i, .point-avatar { animation: none; } }

/* 알림 (종 모양 + 목록) */
.header-bell { position: relative; }
.bell-badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--bad, #e5484d); color: #fff; font-size: .68rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface, #fff); }
.notif-item { display: flex; align-items: center; gap: .5rem; padding: .25rem .5rem .25rem .25rem; }
.notif-main { flex: 1; display: flex; align-items: center; gap: .75rem; text-align: left; background: none; border: 0; padding: .75rem; cursor: pointer; color: inherit; font: inherit; }
.notif-body { display: flex; flex-direction: column; gap: .15rem; }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; background: transparent; flex: none; }
.notif-item.unread { background: var(--primary-soft); }
.notif-item.unread .notif-dot { background: var(--primary); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
a.is-loading { opacity: .55; cursor: progress; }

/* 번역 버튼 */
.translate-btn { align-self: flex-start; }
.translate-btn svg { margin-right: .25rem; }

/* ---- 모임 후기 / 종료된 모임 ---- */
.ended-box { margin-top: 1.5rem; }
.rv-card { display: grid; gap: .5rem; padding: .85rem 0; border-top: 1px solid var(--border); }
.rv-card:first-child { border-top: 0; padding-top: 0; }
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.rv-head .person { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 700; }
.rv-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.rv-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; max-width: 420px; }
.rv-photo { padding: 0; border: 0; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; cursor: zoom-in; }
.rv-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-form textarea { width: 100%; }

/* 모임 장소: 누르면 지도 앱 선택창 */
.place-link { display: inline-flex; align-items: center; gap: .35rem; padding: 0; border: 0; background: none; color: var(--primary); font: inherit; font-weight: 800; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.place-link:hover { color: var(--primary-dark, var(--primary)); }
