/* ============================================================
 * 3670 쪽지 — 플로팅 버튼 · 알림 종 · 카톡형 대화창 (클럽 홈페이지 · 지구 홈페이지 공용)
 * ============================================================ */
.rim, .rim * { box-sizing: border-box; }
.rim { --navy: #0c2a5c; --blue: #1a4ea3; --gold: #f5a913; --ink: #121a2b; --sub: #5b6578; --mute: #8a93a3; --line: #e5e9f0; --bg: #f4f6fa;
  --kbg: #bacee0; --kme: #fee500; font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--ink); letter-spacing: -0.01em; word-break: keep-all; line-height: 1.5; font-size: 15px; }
.rim button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
.rim svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.rim-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #e5383b; color: #fff;
  font-size: 11.5px; font-weight: 800; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #fff; font-variant-numeric: tabular-nums; }
.rim-badge[hidden] { display: none; }

/* ---- 플로팅 버튼 ---- */
.rim-fab { position: fixed; right: 22px; bottom: 22px; z-index: 9000; }
.rim-fab.on-club { bottom: 88px; }
@media (min-width: 1024px) { .rim-fab.on-club { bottom: 26px; } }
.rim-fab-btn { position: relative; width: 60px; height: 60px; border-radius: 50%; background: var(--navy) !important; color: #fff !important;
  display: grid; place-items: center; box-shadow: 0 10px 28px rgba(12, 42, 92, .38), inset 0 0 0 3px var(--navy), inset 0 0 0 5px var(--gold); transition: transform .18s; }
.rim-fab-btn:hover { transform: translateY(-2px) scale(1.03); }
.rim-fab-btn svg { width: 27px; height: 27px; }
.rim-fab-menu { position: absolute; right: 0; bottom: 72px; width: 236px; background: #fff; border-radius: 18px; padding: 8px;
  box-shadow: 0 18px 50px rgba(8, 24, 60, .22); border: 1px solid var(--line); transform-origin: 100% 100%; animation: rimPop .18s ease; }
.rim-fab-menu[hidden] { display: none; }
.rim-fab-who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.rim-fab-who b { display: block; font-size: 15px; }
.rim-fab-who small { color: var(--mute); font-size: 12.5px; }
.rim-mi { display: flex !important; align-items: center; gap: 10px; width: 100%; padding: 11px 12px !important; border-radius: 11px; font-size: 14.5px; font-weight: 600; text-align: left; }
.rim-mi:hover { background: var(--bg) !important; }
.rim-mi .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #eef3fc; color: var(--blue); }
.rim-mi .ico.gold { background: #fff3d6; color: #a46a00; }
.rim-mi .ico.green { background: #e6f4ec; color: #1d7a50; }
.rim-mi .ico.gray { background: #eef0f4; color: #5b6578; }
.rim-mi .cnt { margin-left: auto; background: #e5383b; color: #fff; border-radius: 999px; font-size: 11.5px; font-weight: 800; padding: 1px 7px; }

/* ---- 헤더 종 ---- */
.rim-bell { position: relative; width: 42px; height: 42px; border-radius: 50%; display: inline-grid !important; place-items: center; color: inherit; }
.rim-bell:hover { background: rgba(127, 140, 160, .16) !important; }
.rim-bell svg { width: 23px; height: 23px; }
.rim-bell.ring svg { animation: rimRing 1s ease 2; transform-origin: 50% 10%; }

/* ---- 레이어 ---- */
.rim-layer { position: fixed; inset: 0; z-index: 9100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.rim-layer[hidden] { display: none; }
.rim-dim { position: absolute; inset: 0; background: rgba(8, 20, 44, .55); backdrop-filter: blur(3px); animation: rimFade .2s ease; }
.rim-box { position: relative; width: min(980px, 100%); height: min(720px, calc(100dvh - 48px)); background: #fff; border-radius: 22px; overflow: hidden;
  display: grid; grid-template-columns: 330px 1fr; box-shadow: 0 30px 80px rgba(8, 24, 60, .3); animation: rimPop .24s cubic-bezier(.2, .8, .2, 1); }
.rim-box.small { width: min(420px, 100%); height: auto; display: block; }
.rim-side { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; background: #fff; }
.rim-side-head { padding: 18px 18px 12px; background: var(--navy); color: #fff; }
.rim-side-head h2 { margin: 0; font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.rim-side-head h2 .mark { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); box-shadow: inset 0 0 0 2px var(--gold); display: grid; place-items: center; font-size: 9.5px; font-weight: 900; }
.rim-side-head p { margin: 4px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.rim-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 6px; background: var(--bg); border-bottom: 1px solid var(--line); }
.rim-tab { position: relative; padding: 9px 2px !important; border-radius: 10px; font-size: 13.5px; font-weight: 700; color: var(--sub) !important; text-align: center; }
.rim-tab.on { background: #fff !important; color: var(--blue) !important; box-shadow: 0 1px 4px rgba(16, 32, 64, .1); }
.rim-tab i { position: absolute; top: 3px; right: 6px; min-width: 16px; height: 16px; border-radius: 999px; background: #e5383b; color: #fff; font-size: 10px; font-style: normal; line-height: 16px; padding: 0 4px; }
.rim-search { margin: 10px 12px 4px; display: flex; align-items: center; gap: 8px; height: 40px; border-radius: 999px; background: var(--bg); padding: 0 14px; color: var(--mute); }
.rim-search input { flex: 1; border: 0; background: none; outline: none; font: inherit; font-size: 14px; color: var(--ink); min-width: 0; }
.rim-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 12px; }
.rim-empty { padding: 40px 16px; text-align: center; color: var(--mute); font-size: 14px; }
.rim-empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.rim-av { width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center; font-weight: 800; font-size: 16px; background: #eef3fc; color: var(--blue); flex-shrink: 0; overflow: hidden; }
.rim-av img { width: 100%; height: 100%; object-fit: cover; }
.rim-av.sm { width: 34px; height: 34px; border-radius: 12px; font-size: 14px; }
.rim-av.c1 { background: #e6f4ec; color: #1d7a50; } .rim-av.c2 { background: #efeafb; color: #5b45b0; } .rim-av.c3 { background: #fff1d9; color: #a46a00; }
.rim-row { display: flex !important; align-items: center; gap: 11px; width: 100%; padding: 10px !important; border-radius: 12px; text-align: left; }
.rim-row:hover, .rim-row.on { background: #f1f5fb !important; }
.rim-row .t { flex: 1; min-width: 0; }
.rim-row .t b { display: block; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rim-row .t b small { font-weight: 500; color: var(--mute); font-size: 12px; margin-left: 4px; }
.rim-row .t span { display: block; font-size: 13px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rim-row .r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11.5px; color: var(--mute); flex-shrink: 0; }
.rim-row .r em { font-style: normal; background: #e5383b; color: #fff; border-radius: 999px; font-weight: 800; padding: 0 7px; line-height: 18px; font-size: 11px; }
.rim-row .r .read { color: var(--blue); font-weight: 700; }
.rim-row .r .unread { color: #d68a00; font-weight: 700; }
.rim-row .act { display: flex; gap: 6px; margin-top: 6px; }
.rim-mini { padding: 4px 10px !important; border-radius: 8px; font-size: 12.5px; font-weight: 700; background: #eef3fc !important; color: var(--blue) !important; }
.rim-mini.gold { background: #fff3d6 !important; color: #8a5a00 !important; }
.rim-club { margin: 2px 0; }
.rim-club-h { display: flex !important; align-items: center; gap: 9px; width: 100%; padding: 11px 10px !important; border-radius: 12px; font-weight: 800; font-size: 14.5px; text-align: left; }
.rim-club-h:hover { background: var(--bg) !important; }
.rim-club-h .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.rim-club-h .n { margin-left: auto; color: var(--mute); font-weight: 600; font-size: 12.5px; }
.rim-club-h svg { width: 16px; height: 16px; color: var(--mute); transition: transform .18s; }
.rim-club.open .rim-club-h svg { transform: rotate(90deg); }
.rim-club-b { padding: 0 0 6px 18px; border-left: 2px solid var(--line); margin-left: 14px; }
.rim-club:not(.open) .rim-club-b { display: none; }

/* 대화 */
.rim-chat { display: flex; flex-direction: column; min-height: 0; background: var(--kbg); position: relative; }
.rim-chat-head { display: flex; align-items: center; gap: 11px; padding: 12px 16px; background: rgba(255, 255, 255, .92); border-bottom: 1px solid rgba(0, 0, 0, .06); min-height: 66px; }
.rim-chat-head .t { flex: 1; min-width: 0; }
.rim-chat-head .t b { display: block; font-size: 16px; font-weight: 800; }
.rim-chat-head .t span { display: block; font-size: 12.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rim-icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid !important; place-items: center; color: var(--sub) !important; }
.rim-icon-btn:hover { background: rgba(0, 0, 0, .06) !important; }
.rim-back { display: none !important; }
.rim-msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 6px; }
.rim-day { align-self: center; background: rgba(0, 0, 0, .14); color: #fff; font-size: 12px; padding: 3px 12px; border-radius: 999px; margin: 8px 0; }
.rim-m { display: flex; align-items: flex-end; gap: 6px; max-width: 82%; }
.rim-m.me { align-self: flex-end; flex-direction: row-reverse; }
.rim-m .bub { padding: 9px 13px; border-radius: 16px; background: #fff; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 1px rgba(0, 0, 0, .05); }
.rim-m:not(.me) .bub { border-top-left-radius: 5px; }
.rim-m.me .bub { background: var(--kme); border-top-right-radius: 5px; }
.rim-m .meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; color: #4d5a6a; white-space: nowrap; }
.rim-m:not(.me) .meta { align-items: flex-start; }
.rim-m .meta .one { color: #d68a00; font-weight: 800; font-size: 11.5px; }
.rim-m .meta .rd { color: #3f5a7a; font-weight: 600; }
.rim-m .av-gap { width: 34px; flex-shrink: 0; }
.rim-compose { display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); align-items: flex-end; }
.rim-compose textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font: inherit; font-size: 14.5px; min-height: 44px; max-height: 120px; outline: none; background: var(--bg); }
.rim-compose textarea:focus { border-color: var(--blue); background: #fff; }
.rim-send { height: 44px; padding: 0 18px !important; border-radius: 14px; background: var(--kme) !important; color: #191919 !important; font-weight: 800 !important; display: inline-flex !important; align-items: center; gap: 6px; }
.rim-send:disabled { opacity: .5; cursor: default; }
.rim-hello { margin: auto; text-align: center; color: #3a4a5c; padding: 30px; }
.rim-hello .big { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 26px; background: rgba(255, 255, 255, .7); display: grid; place-items: center; color: var(--navy); }
.rim-hello .big svg { width: 38px; height: 38px; }
.rim-hello b { display: block; font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.rim-close-x { position: absolute; top: 14px; right: 14px; z-index: 3; }

/* 로그인 */
.rim-login { padding: 30px 28px 26px; }
.rim-login h2 { margin: 0; font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.rim-login h2 .mark { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; box-shadow: inset 0 0 0 3px var(--navy), inset 0 0 0 5px var(--gold); display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.rim-login p.d { margin: 8px 0 18px; color: var(--sub); font-size: 14px; }
.rim-login label { display: block; font-size: 13.5px; font-weight: 700; margin: 14px 0 6px; color: var(--sub); }
.rim-login input { width: 100%; height: 50px; border-radius: 13px; border: 1.5px solid var(--line); padding: 0 16px; font: inherit; font-size: 16px; outline: none; background: #fff; }
.rim-login input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(26, 78, 163, .12); }
.rim-primary { width: 100%; height: 52px; margin-top: 22px; border-radius: 14px; background: var(--navy) !important; color: #fff !important; font-weight: 800 !important; font-size: 16px; }
.rim-primary:disabled { opacity: .6; }
.rim-login .hint { margin-top: 14px; font-size: 12.5px; color: var(--mute); text-align: center; }
.rim-login .err { margin-top: 12px; color: #d63031; font-size: 13.5px; font-weight: 600; min-height: 20px; }

/* 토스트 */
.rim-toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(10px); z-index: 9300; background: #121a2b; color: #fff;
  padding: 12px 18px; border-radius: 14px; font-size: 14px; max-width: min(420px, calc(100vw - 32px)); opacity: 0; pointer-events: none; transition: .22s; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.rim-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; cursor: pointer; }
.rim-toast b { color: var(--gold); }

@keyframes rimPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes rimFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rimRing { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }

/* 모바일 : 목록 ↔ 대화 전환 */
@media (max-width: 768px) {
  .rim-layer { padding: 0; align-items: flex-end; }
  .rim-box { width: 100%; height: 94dvh; border-radius: 22px 22px 0 0; grid-template-columns: 1fr; }
  .rim-box.small { border-radius: 22px 22px 0 0; }
  .rim-box.chatting .rim-side { display: none; }
  .rim-box:not(.chatting) .rim-chat { display: none; }
  .rim-back { display: grid !important; }
  .rim-fab { right: 16px; }
  .rim-m { max-width: 88%; }
}
@media (prefers-reduced-motion: reduce) { .rim *, .rim { animation: none !important; transition: none !important; } }

/* ---- 내 정보 ---- */
.rim-mynav { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.rim-mynav .rim-mi.on { background: #eef3fc !important; color: var(--blue); }
.rim-mybody { display: flex; flex-direction: column; min-height: 0; background: #fff; }
.rim-myhead { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 62px; }
.rim-myhead b { flex: 1; font-size: 17px; font-weight: 800; }
.rim-mycontent { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 28px; }
.rim-form { display: flex; flex-direction: column; gap: 4px; max-width: 520px; }
.rim-f { display: block; margin: 8px 0 4px; }
.rim-f > span { display: block; font-size: 13px; font-weight: 700; color: var(--sub); margin-bottom: 6px; }
.rim-f small { display: block; color: var(--mute); font-size: 12px; margin-top: 4px; }
.rim-form input:not([type=checkbox]):not([type=radio]):not([type=file]), .rim-form select, .rim-form textarea {
  width: 100%; height: 46px; border-radius: 12px; border: 1.5px solid var(--line); padding: 0 14px; font: inherit; font-size: 15px; outline: none; background: #fff; color: var(--ink); }
.rim-form textarea { height: auto; padding: 10px 14px; resize: vertical; }
.rim-form input:focus, .rim-form select:focus, .rim-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(26, 78, 163, .1); }
.rim-form .row { display: flex; gap: 8px; align-items: center; }
.rim-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rim-form .chk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--sub); white-space: nowrap; cursor: pointer; }
.rim-form .rim-primary { margin-top: 14px; }
.rim-photo { display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: 16px; background: var(--bg); margin-bottom: 8px; }
.rim-photo b { display: block; font-size: 15px; }
.rim-photo small { display: block; color: var(--mute); font-size: 12.5px; margin-bottom: 8px; }
.rim-photo .row { display: flex; gap: 6px; }
.rim-photo .rim-mini { cursor: pointer; }
.rim-av.big { width: 84px; height: 84px; border-radius: 28px; font-size: 32px; box-shadow: inset 0 0 0 3px #fff; }
.rim-ro { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; margin: 14px 0 4px; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line); }
.rim-ro dt { font-size: 12px; color: var(--mute); }
.rim-ro dd { margin: 2px 0 0; font-weight: 700; font-size: 14.5px; }
.rim-note { font-size: 13px; color: var(--sub); margin: 8px 0; line-height: 1.6; }
.rim-warn { background: #fff6e3; border: 1px solid #f6e2b0; color: #7a5a12; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin: 0 0 6px; }
.rim-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.rim-seg label { cursor: pointer; }
.rim-seg input { position: absolute; opacity: 0; pointer-events: none; }
.rim-seg span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 14px; font-weight: 700; color: var(--sub); }
.rim-seg input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.rim-cal { border: 1px solid var(--line); border-radius: 18px; padding: 12px; }
.rim-cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rim-cal-h b { font-size: 17px; font-weight: 800; }
.rim-cal-w, .rim-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.rim-cal-w span { text-align: center; font-size: 12px; color: var(--mute); padding: 4px 0; font-weight: 700; }
.rim-cal-w span:first-child { color: #e03131; } .rim-cal-w span:last-child { color: #1c7ed6; }
.rim .cd { height: 52px; border-radius: 12px; display: flex !important; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 6px !important; gap: 4px; }
.rim .cd:hover { background: var(--bg) !important; }
.rim .cd b { font-size: 14px; font-weight: 700; width: 26px; height: 26px; line-height: 26px; border-radius: 50%; }
.rim .cd.sun b { color: #e03131; } .rim .cd.sat b { color: #1c7ed6; }
.rim .cd.today b { background: var(--navy); color: #fff; }
.rim .cd.sel { background: #eef3fc !important; box-shadow: inset 0 0 0 2px var(--blue); }
.rim .cd .dots { display: flex; gap: 3px; } .rim .cd .dots i { width: 6px; height: 6px; border-radius: 50%; }
.rim-cal-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 10px 4px 2px; font-size: 12.5px; color: var(--sub); }
.rim-cal-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.rim-cal-legend .tot { margin-left: auto; font-weight: 700; color: var(--navy); }
.rim-day-list { margin-top: 16px; }
.rim-day-list h4 { margin: 0 0 8px; font-size: 15px; }
.rim-day-list .it { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); margin-bottom: 6px; }
.rim-day-list .it > i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.rim-day-list .it span { flex: 1; min-width: 0; } .rim-day-list .it b { display: block; font-size: 14.5px; } .rim-day-list .it small { color: var(--mute); font-size: 12px; }
.rim-add { margin-top: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); max-width: none; gap: 8px; }
.rim-add .rim-send { flex-shrink: 0; }
@media (max-width: 768px) {
  .rim-box.my { grid-template-columns: 1fr; }
  .rim-box.my.chatting .rim-side { display: none; }
  .rim-box.my:not(.chatting) .rim-mybody { display: none; }
  .rim-mycontent { padding: 16px; }
  .rim .cd { height: 46px; }
}
@media (min-width: 769px) { .rim-box.my .rim-back { display: none !important; } }
/* 한눈에 보기 · 활동 */
.rim-dash { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.rim-kpi { text-align: left; padding: 14px 16px !important; border-radius: 16px; background: var(--bg) !important; border: 1px solid var(--line) !important; display: block !important; }
.rim-kpi small { display: block; font-size: 12.5px; color: var(--sub); font-weight: 700; }
.rim-kpi b { display: block; font-size: 28px; font-weight: 900; color: var(--navy); letter-spacing: -0.04em; margin: 2px 0; }
.rim-kpi b i { font-style: normal; font-size: 14px; font-weight: 700; margin-left: 2px; }
.rim-kpi span { font-size: 12.5px; color: var(--mute); }
.rim-kpi.hot { background: #fff1f1 !important; border-color: #ffd5d5 !important; } .rim-kpi.hot b { color: #e5383b; }
.rim-kpi.gold { background: #fff6e3 !important; border-color: #f6e2b0 !important; } .rim-kpi.gold b { color: #a46a00; }
.rim-kpi:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16, 36, 80, .08); }
.rim-bars { margin: 12px 0 4px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); display: grid; gap: 7px; }
.rim-bars div { display: grid; grid-template-columns: 38px 1fr 32px; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); }
.rim-bars i { height: 8px; border-radius: 99px; background: #edf0f5; overflow: hidden; } .rim-bars em { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1a4ea3, #4d82d6); }
.rim-bars b { text-align: right; color: var(--navy); }
.rim-h4 { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 8px; font-size: 15px; font-weight: 800; }
.rim-act { display: flex !important; align-items: center; gap: 10px; width: 100%; padding: 10px 12px !important; border-radius: 12px; text-align: left; border-bottom: 1px solid #f0f2f6 !important; }
.rim-act:hover { background: var(--bg) !important; }
.rim-act .tg { flex-shrink: 0; font-size: 11.5px; font-weight: 800; color: var(--blue); background: #eef3fc; border-radius: 6px; padding: 3px 7px; }
.rim-act .t { flex: 1; min-width: 0; } .rim-act .t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rim-act .t small { display: block; font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rim-act .ago { font-size: 11.5px; color: var(--mute); flex-shrink: 0; }
.rim-segbar { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.rim-segbar button { padding: 8px 14px !important; border-radius: 999px; border: 1.5px solid var(--line) !important; font-size: 13.5px; font-weight: 700; color: var(--sub) !important; }
.rim-segbar button.on { background: var(--navy) !important; border-color: var(--navy) !important; color: #fff !important; }
.rim-segbar i { font-style: normal; opacity: .75; }
@media (max-width: 420px) { .rim-kpi b { font-size: 24px; } }

/* ---------- 1면 전면 광고 ---------- */
html.fad-open{overflow:hidden}
.fad{position:fixed;inset:0;z-index:2147482000;background:rgba(10,20,40,.62);display:flex;align-items:center;justify-content:center;padding:20px;opacity:0;transition:opacity .25s}
.fad.on{opacity:1}
.fad-box{position:relative;width:min(440px,100%);max-height:calc(100vh - 40px);display:flex;flex-direction:column;background:#fff;border-radius:18px;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.35);transform:translateY(16px) scale(.97);transition:transform .25s}
.fad.on .fad-box{transform:none}
.fad-img{display:block;flex:1;min-height:0;overflow:hidden;background:#f1f3f6}
.fad-img img{display:block;width:100%;height:100%;max-height:calc(100vh - 150px);object-fit:contain}
.fad-x{position:absolute;top:10px;right:10px;z-index:2;width:34px;height:34px;border:0;border-radius:50%;background:rgba(0,0,0,.45);color:#fff;font-size:22px;line-height:1;cursor:pointer}
.fad-pt{position:absolute;top:12px;left:12px;z-index:2;background:#f7a81b;color:#1a1a1a;font-size:13px;font-weight:600;padding:6px 12px;border-radius:999px;box-shadow:0 4px 12px rgba(0,0,0,.18)}
.fad-pt.done{background:#e8f5e9;color:#2e7d32}
.fad-go{display:block;text-align:center;background:#17458f;color:#fff;font-weight:700;padding:13px;text-decoration:none;font-size:15px}
.fad-foot{display:flex;border-top:1px solid #eee}
.fad-foot button{flex:1;border:0;background:#fff;padding:12px;font-size:14px;color:#555;cursor:pointer}
.fad-foot button+button{border-left:1px solid #eee;color:#17458f;font-weight:600}
@media (max-width:480px){.fad{padding:12px}.fad-box{border-radius:14px}}

/* ---------- 대화방 헤더 · 더보기 · 보낸 쪽지 삭제 ---------- */
.rim-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 4px 8px 4px 4px; margin: -4px 0 -4px -4px; border-radius: 14px; text-align: left; cursor: pointer; background: none; }
.rim-who:hover { background: rgba(23, 69, 143, .06); }
.rim-who:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.rim-more-wrap { position: relative; }
.rim-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 6; min-width: 160px; padding: 6px; background: #fff; border-radius: 14px; box-shadow: 0 12px 32px rgba(10, 30, 60, .18); border: 1px solid #e6ebf2; }
.rim-more-menu[hidden] { display: none; }
.rim-more-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #263244; text-align: left; white-space: nowrap; background: none; cursor: pointer; }
.rim-more-menu button:hover { background: #f2f5fa; }
.rim-more-menu button.danger { color: #c62f2f; }
.rim-more-menu svg { width: 18px; height: 18px; }
.rim-m .meta .un { margin-top: 2px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .75); color: #c62f2f; font-size: 11px; font-weight: 700; cursor: pointer; border: 1px solid rgba(198, 47, 47, .25); }
.rim-m .meta .un:hover { background: #fff; }
.rim-m .meta .un:disabled { opacity: .5; }

/* ---------- 상대 프로필 레이어 ---------- */
.rim-chat { position: relative; }
.rim-prof { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(15, 30, 55, .38); opacity: 0; transition: opacity .2s; }
.rim-prof.on { opacity: 1; }
.rim-prof-card { position: relative; width: min(380px, 100%); max-height: 100%; overflow: auto; background: #fff; border-radius: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); transform: translateY(10px); transition: transform .2s; }
.rim-prof.on .rim-prof-card { transform: none; }
.rim-prof-load { padding: 40px 20px; text-align: center; color: var(--sub); }
.rim-prof-x { position: absolute; top: 10px; right: 10px; z-index: 1; }
.rim-prof-top { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 20px 18px; background: linear-gradient(180deg, #eef3fb, #fff); text-align: center; }
.rim-prof-top .rim-av.big { margin-bottom: 8px; }
.rim-prof-top .nm { font-size: 20px; font-weight: 800; color: #14223a; }
.rim-prof-top .nm small { font-size: 14px; font-weight: 500; color: #8a93a3; }
.rim-prof-top .cl { font-size: 13.5px; color: var(--sub); }
.rim-prof-top .cat { margin-top: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.rim-prof-biz { margin: 0 16px; padding: 12px 14px; border-radius: 14px; background: #f6f8fb; font-size: 14px; color: #263244; }
.rim-prof-biz b { font-weight: 800; }
.rim-prof-biz p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: #4a5568; white-space: pre-wrap; }
.rim-prof-rows { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 4px; }
.rim-prow { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid #e8edf4; border-radius: 12px; color: #1d2a3f; text-decoration: none; font-size: 14px; }
a.rim-prow:hover { border-color: #c9d6ec; background: #f8faff; }
.rim-prow svg { width: 19px; height: 19px; color: var(--blue); flex-shrink: 0; }
.rim-prow span { flex: 1; min-width: 0; word-break: keep-all; }
.rim-prow small { display: block; font-size: 11.5px; color: #8a93a3; }
.rim-prow em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.rim-prof-foot { display: flex; gap: 8px; padding: 14px 16px 16px; }
.rim-prof-foot .rim-primary, .rim-prof-foot .rim-ghost { flex: 1; height: 46px; margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; font-size: 14.5px; text-decoration: none; }
.rim-prof-foot .rim-ghost { background: #eef3fb; color: var(--navy); font-weight: 700; cursor: pointer; }
.rim-prof-foot svg { width: 18px; height: 18px; }
.rim-chat { min-width: 0; }
@media (max-width: 768px) {
  .rim-box { grid-template-columns: minmax(0, 1fr); }
  .rim-chat-head { gap: 6px; padding: 10px 10px; }
  .rim-chat-head .rim-card { display: none; }
  .rim-prof { padding: 12px; }
}
