:root {
  --ink: #1A1D21;
  --muted: #5A6472;
  --faint: #9AA3AE;
  --line: #E3E6EA;
  --line-soft: #EEF0F3;
  --surface: #F4F5F7;
  --accent: #0F6E56;
  --accent-dark: #0B5442;
  --accent-tint: #E6F2EE;
  --blue: #2563A6; --blue-tint: #E8F0FA;
  --warn: #B45309; --warn-tint: #FDF1E6;
  --danger: #B42318; --danger-tint: #FBEAE8;
  --purple: #6B3FA0; --purple-tint: #F0E9F8;
  --radius: 16px;
  --topbar-h: 56px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: #F7F8FA; color: var(--ink);
  font-family: 'Noto Sans KR', system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 15px; line-height: 1.55; word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; color: var(--ink); }
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -0.3px; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 앱 프레임: 모바일 폭으로 가운데 정렬 ───────────────────── */
.app {
  position: relative;
  width: 100%; max-width: 560px; min-height: 100vh;
  margin: 0 auto; background: #FFFFFF;
  display: flex; flex-direction: column;
}
@media (min-width: 600px) { .app { box-shadow: 0 0 0 1px var(--line); } }
.has-tabbar .app { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }

/* ── 상단 바 ───────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h); padding: 0 8px;
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-group { padding-left: 12px; justify-content: space-between; }
.topbar-title { flex: 1; font-size: 16px; font-weight: 700; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar-action { min-width: 44px; display: flex; justify-content: flex-end; align-items: center; gap: 2px; }
.topbar-plain { padding: 0 16px; justify-content: space-between; }
.iconbtn {
  position: relative; width: 44px; height: 44px; border-radius: 12px; border: none; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; flex-shrink: 0;
}
.iconbtn:hover { background: var(--surface); color: var(--ink); }
.iconbtn .dot, .tab-icon .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
.tab-icon .dot { top: -2px; right: -4px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: var(--ink); }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; }

/* 모임 전환 */
.switcher { position: relative; }
.switcher summary { list-style: none; }
.switcher summary::-webkit-details-marker { display: none; }
.switcher-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface); border-radius: 999px; padding: 5px 10px 5px 5px; max-width: 70vw;
}
.switcher-name { font-size: 15px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.switcher-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 280px; max-width: 92vw;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px rgba(26,29,33,.14); padding: 6px; overflow: hidden;
}
.switcher-item { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 10px; color: var(--ink); }
.switcher-item:hover { background: var(--surface); color: var(--ink); }
.switcher-item.is-current { background: var(--accent-tint); }
.switcher-item-name { flex: 1; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.switcher-add { color: var(--muted); border-top: 1px solid var(--line-soft); border-radius: 0 0 10px 10px; margin-top: 4px; padding-top: 12px; font-size: 13.5px; }

/* ── 하단 탭 ───────────────────────────────────────────────── */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px; height: calc(var(--tabbar-h) + var(--safe-b)); padding: 6px 4px calc(6px + var(--safe-b));
  background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); z-index: 20;
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); border-radius: 10px; }
.tab.is-active { color: var(--accent); font-weight: 700; }
.tab-icon { position: relative; display: inline-flex; }

/* ── 레이아웃 조각 ─────────────────────────────────────────── */
.page { padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.page-narrow { padding: 20px 24px 36px; }
.section { display: flex; flex-direction: column; gap: 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-head h2 { font-size: 16px; font-weight: 700; }
.section-head .more { font-size: 13px; font-weight: 500; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fff; }
.card-tint { background: var(--accent-tint); border-color: var(--accent-tint); }
.card-soft { background: var(--surface); border-color: var(--surface); }
.card-warn { background: var(--warn-tint); border-color: var(--warn-tint); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.prewrap { white-space: pre-wrap; word-break: break-word; }
.divider { height: 1px; background: var(--line-soft); margin: 4px 0; }
.hero { padding: 24px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.hero h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.hero p { color: var(--muted); }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty .ic { color: var(--faint); }

/* ── 아바타 ─────────────────────────────────────────────────── */
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.avatar-sq { border-radius: 9px; width: 30px; height: 30px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.c0 { background: var(--accent-tint); color: var(--accent); }
.avatar.c1 { background: var(--blue-tint); color: var(--blue); }
.avatar.c2 { background: var(--warn-tint); color: var(--warn); }
.avatar.c3 { background: var(--purple-tint); color: var(--purple); }
.avatar.c4 { background: var(--surface); color: var(--muted); }
.avatar-sq.c0 { background: var(--accent); color: #fff; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -8px; width: 32px; height: 32px; font-size: 12px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ── 칩·뱃지 ────────────────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 3px 7px; white-space: nowrap; }
.chip-accent { background: var(--accent); color: #fff; }
.chip-tint { background: var(--accent-tint); color: var(--accent); }
.chip-blue { background: var(--blue-tint); color: var(--blue); }
.chip-warn { background: var(--warn-tint); color: var(--warn); }
.chip-danger { background: var(--danger-tint); color: var(--danger); }
.chip-soft { background: var(--surface); color: var(--muted); }
.chip-outline { border: 1px solid var(--accent); color: var(--accent); background: #fff; padding: 2px 6px; }
.badge { min-width: 18px; height: 18px; border-radius: 9px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.badge-red { background: var(--danger); color: #fff; }
.badge-soft { background: var(--surface); color: var(--muted); }
.pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; }
.pill-accent { background: var(--accent); color: #fff; }
.pill-outline { border: 1.5px solid var(--accent); color: var(--accent); padding: 5px 11px; }
.pill-blue { background: var(--blue); color: #fff; }
.pill-danger { background: var(--danger); color: #fff; }
.pill-soft { background: var(--surface); color: var(--muted); }

/* ── 버튼 ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1.5px solid transparent;
  font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; transition: background .15s;
}
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-tint); color: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: #D5D9DF; }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-danger { background: #fff; color: var(--danger); border-color: #F1C8C3; }
.btn-danger:hover { background: var(--danger-tint); color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-xs { min-height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }
.linkbtn { background: none; border: none; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; font-size: inherit; }
.linkbtn-muted { color: var(--muted); font-weight: 500; }
.linkbtn-danger { color: var(--danger); }

/* ── 폼 ─────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: 13px; font-weight: 700; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; min-height: 48px; border: 1px solid #D5D9DF; border-radius: 12px; padding: 10px 14px;
  background: #fff; outline: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.input-code { font-size: 20px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; }
.input-code::placeholder { letter-spacing: 1px; text-transform: none; font-size: 15px; font-weight: 400; color: var(--faint); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.check .hint { display: block; font-size: 12px; color: var(--muted); }
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.radio input { margin: 3px 0 0; accent-color: var(--accent); }
.radio strong { display: block; font-size: 14px; }
.radio span { font-size: 12.5px; color: var(--muted); }
.form-error { background: var(--danger-tint); color: var(--danger); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.segment { display: flex; gap: 4px; background: var(--surface); border-radius: 12px; padding: 4px; }
.segment a, .segment button { flex: 1; min-height: 36px; border-radius: 9px; border: none; background: transparent; font-size: 13px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.segment .is-active { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(26,29,33,.08); }

/* ── 플래시 ─────────────────────────────────────────────────── */
.flash { position: sticky; top: var(--topbar-h); z-index: 15; margin: 8px 12px 0; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 500; }
.flash-success { background: var(--accent-tint); color: var(--accent-dark); }
.flash-info { background: var(--blue-tint); color: var(--blue); }
.flash-error { background: var(--danger-tint); color: var(--danger); }
.no-topbar .flash { top: 8px; }

/* ── 리스트 아이템 ──────────────────────────────────────────── */
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.item:last-child { border-bottom: none; }
.item-title { font-size: 14.5px; font-weight: 500; }
.item-meta { font-size: 12px; color: var(--muted); }
a.item:hover { color: var(--ink); }
.item.is-unread .item-title { font-weight: 700; }
.item.is-unread::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* 일정 카드 */
.event-card { display: flex; gap: 14px; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--ink); background: #fff; }
.event-card:hover { color: var(--ink); border-color: #CBD0D6; }
.event-card.is-cancelled { opacity: .6; }
.datebox { width: 52px; flex-shrink: 0; border-radius: 12px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; padding: 6px 0; }
.datebox .m { font-size: 11px; color: var(--muted); }
.datebox .d { font-size: 22px; font-weight: 700; }
.datebox .w { font-size: 11px; font-weight: 700; color: var(--blue); }
.datebox .w.sat { color: var(--blue); } .datebox .w.sun { color: var(--danger); }
.event-card .title { font-size: 15px; font-weight: 700; line-height: 1.35; }
.event-card .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.event-card .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.event-card .side { display: flex; align-items: center; }

/* 공지 카드 */
.notice-card { display: block; background: var(--accent-tint); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); }
.notice-card:hover { color: var(--ink); }
.notice-card .title { font-size: 15px; font-weight: 700; margin-top: 6px; line-height: 1.4; }
.notice-card .meta { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 참석 현황 막대 */
.bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--surface); }
.bar > span { display: block; min-width: 0; }
.bar .attend { background: var(--accent); } .bar .undecided { background: var(--blue); } .bar .absent { background: var(--danger); } .bar .none { background: #D5D9DF; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* 참석 응답 버튼 */
.rsvp-bar { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b)); background: #fff; border-top: 1px solid var(--line); margin: 0 -16px -24px; padding: 12px 16px calc(16px); }
.rsvp-row { display: flex; gap: 8px; }
.rsvp { flex: 1; min-height: 50px; border-radius: 14px; border: 1.5px solid #D5D9DF; background: #fff; font-size: 15px; font-weight: 700; color: var(--muted); cursor: pointer; }
.rsvp.on-attend { border-color: var(--accent); background: var(--accent); color: #fff; }
.rsvp.on-undecided { border-color: var(--blue); background: var(--blue); color: #fff; }
.rsvp.on-absent { border-color: var(--danger); background: var(--danger); color: #fff; }
.rsvp[disabled] { opacity: .45; cursor: not-allowed; }
.companions { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.companions input { width: 64px; min-height: 36px; text-align: center; padding: 0 8px; }
.rsvp-hint { font-size: 11.5px; color: var(--muted); text-align: right; }

/* 캘린더 */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal .wd { text-align: center; font-size: 11px; color: var(--muted); padding: 4px 0; font-weight: 700; }
.cal .wd.sun { color: var(--danger); } .cal .wd.sat { color: var(--blue); }
.cal .day { min-height: 64px; border-radius: 10px; padding: 4px; font-size: 12px; display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line-soft); }
.cal .day.empty-day { border-color: transparent; background: transparent; }
.cal .day.today .num { background: var(--accent); color: #fff; }
.cal .num { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; }
.cal .ev { display: block; font-size: 10.5px; line-height: 1.3; padding: 2px 4px; border-radius: 4px; background: var(--accent-tint); color: var(--accent-dark); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal .ev.mine { background: var(--accent); color: #fff; }
.cal .ev.cancelled { background: var(--surface); color: var(--faint); text-decoration: line-through; }

/* 게시글 */
.post-body { font-size: 15px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.post-image { border-radius: 12px; border: 1px solid var(--line-soft); }
.comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.comment:last-child { border-bottom: none; }
.comment .body { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; }
.comment-form .textarea { min-height: 44px; max-height: 120px; }

/* 채팅 */
.chat-page { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - var(--tabbar-h) - var(--safe-b)); }
.chat-log { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-log > :first-child { margin-top: auto; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 85%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { background: var(--surface); border-radius: 16px 16px 16px 4px; padding: 8px 12px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.msg.mine .bubble { background: var(--accent); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg .bubble img { border-radius: 10px; max-height: 240px; }
.msg .meta { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.msg.mine .meta { align-items: flex-end; }
.msg .sender { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.chat-form { display: flex; gap: 6px; align-items: flex-end; padding: 8px 10px calc(8px); border-top: 1px solid var(--line); background: #fff; }
.chat-form .textarea { min-height: 44px; max-height: 120px; border-radius: 22px; padding: 10px 14px; }
.chat-form .iconbtn.send { background: var(--accent); color: #fff; border-radius: 50%; }
.chat-loadmore { text-align: center; }
.chat-day { align-self: center; font-size: 11px; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 3px 10px; }

/* 회원 */
.member { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.member:last-child { border-bottom: none; }
.member .name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.member .sub { font-size: 12px; color: var(--muted); }
.code-display { font-size: 26px; font-weight: 700; letter-spacing: 3px; font-variant-numeric: tabular-nums; }

/* 더보기 메뉴 */
.menu { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink); background: #fff; width: 100%; border-left: none; border-right: none; border-top: none; text-align: left; font-size: 15px; cursor: pointer; }
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--surface); color: var(--ink); }
.menu-item .ic { color: var(--muted); }
.menu-item .grow { font-weight: 500; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .ic { color: var(--danger); }

/* 투표 */
.option { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; position: relative; overflow: hidden; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.option input { accent-color: var(--accent); width: 18px; height: 18px; }
.result { position: relative; padding: 10px 14px; border-radius: 12px; background: var(--surface); overflow: hidden; }
.result .fill { position: absolute; inset: 0; width: 0; background: var(--accent-tint); }
.result.top .fill { background: #CFE6DD; }
.result .text { position: relative; display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.result .voters { position: relative; font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* 테이블 (회비 등) */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
.table th { font-size: 12px; color: var(--muted); font-weight: 700; }
.toggle { min-width: 56px; min-height: 30px; border-radius: 999px; border: 1.5px solid #D5D9DF; background: #fff; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.toggle.on { border-color: var(--accent); background: var(--accent); color: #fff; }

/* 통계 타일 */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--surface); border-radius: 12px; padding: 12px; text-align: center; }
.stat .n { font-size: 20px; font-weight: 700; }
.stat .l { font-size: 11.5px; color: var(--muted); }

/* 로그인·온보딩 */
.auth { padding: 48px 28px 40px; display: flex; flex-direction: column; flex: 1; gap: 0; }
.auth .brand-big { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.auth .brand-big .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
.auth h1 { font-size: 30px; line-height: 1.3; margin-top: 88px; letter-spacing: -0.6px; }
.auth .lead { color: var(--muted); margin-top: 14px; }
.auth .features { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.auth .features li { display: flex; gap: 10px; align-items: center; }
.auth .features .dot-ok { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth .actions { margin-top: auto; padding-top: 32px; display: flex; flex-direction: column; gap: 10px; }
.auth .legal { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.6; margin-top: 8px; }
.g-mark { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.dev-banner { background: var(--warn-tint); color: var(--warn); font-size: 12px; font-weight: 700; padding: 8px 12px; border-radius: 10px; text-align: center; }
.note { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: 14px; padding: 14px 16px; font-size: 12.5px; color: var(--muted); }
.note .ic { flex-shrink: 0; margin-top: 1px; }

/* 모임 카드 (모임 선택) */
.group-card { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--ink); background: #fff; }
.group-card:hover { color: var(--ink); border-color: #CBD0D6; }
.group-card .avatar { width: 44px; height: 44px; border-radius: 12px; font-size: 16px; }
.group-card .name { font-size: 15px; font-weight: 700; }
.group-card .sub { font-size: 12px; color: var(--muted); }

/* 알림 */
.noti { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); align-items: flex-start; }
.noti:hover { color: var(--ink); }
.noti.is-unread .t { font-weight: 700; }
.noti .ic-wrap { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }
.noti.is-unread .ic-wrap { background: var(--accent-tint); color: var(--accent); }
.noti .t { font-size: 14px; }
.noti .b { font-size: 12.5px; color: var(--muted); }

/* 문서 */
.doc { padding: 20px 20px 40px; font-size: 14.5px; }
.doc h1 { font-size: 24px; margin: 8px 0 6px; }
.doc h2 { font-size: 16px; margin: 24px 0 8px; }
.doc p, .doc li { margin: 6px 0; }
.doc ol { padding-left: 20px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; }
.doc th, .doc td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.doc th { background: var(--surface); }
.placeholder { background: var(--warn-tint); color: var(--warn); padding: 0 4px; border-radius: 4px; font-weight: 700; }

/* 유틸 */
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-auto { margin-top: auto; }
.mb-8 { margin-bottom: 8px; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.hidden { display: none !important; }
.ic.muted { color: var(--muted); }

@media (max-width: 380px) {
  .auth { padding: 40px 20px 32px; }
  .auth h1 { font-size: 26px; margin-top: 64px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── v0.2 원우 프로필·가입 3단계·회사 홍보 ─────────────────── */
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.steps { display: flex; gap: 6px; margin-top: 8px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--accent); }
.seg-choice { display: flex; gap: 6px; }
.seg-choice label { flex: 1; cursor: pointer; }
.seg-choice input { position: absolute; opacity: 0; pointer-events: none; }
.seg-choice span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid #D5D9DF; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--muted); background: #fff; }
.seg-choice input:checked + span { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); font-weight: 700; }
.seg-choice input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-tint); }
.chip-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick, .pick-check span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid #D5D9DF; background: #fff; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; font-family: inherit; }
.pick.on, .pick-check input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; }
.pick-check input { position: absolute; opacity: 0; pointer-events: none; }
.pick-check input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-tint); }
.namecard { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, #fff 60%, var(--accent-tint)); }
.flow-steps { margin: 0; padding: 0 0 0 4px; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--muted); counter-reset: fs; }
.flow-steps li { display: flex; align-items: center; gap: 10px; counter-increment: fs; }
.flow-steps li::before { content: counter(fs); width: 22px; height: 22px; border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.flow-steps li.done::before { content: '✓'; background: var(--accent-tint); color: var(--accent); }
.flow-steps li.now { color: var(--ink); font-weight: 700; }
.flow-steps li.now::before { background: var(--accent); color: #fff; }
.invite-link { font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; word-break: break-all; }
.searchbox { display: flex; align-items: center; gap: 8px; border: 1px solid #D5D9DF; border-radius: 12px; padding: 0 12px; min-height: 44px; background: #fff; }
.searchbox input { border: none; outline: none; flex: 1; min-width: 0; background: transparent; }
.filter-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row .pick { flex-shrink: 0; }
.mini-select { min-height: 32px; border-radius: 999px; border: 1px solid #D5D9DF; padding: 0 10px; font-size: 13px; background: #fff; color: var(--ink); flex-shrink: 0; }
.member-link { color: var(--ink); }
.member-link:hover { color: var(--ink); background: var(--surface); }
.avatar-img { object-fit: cover; background: var(--surface); }
.avatar-xl { width: 84px; height: 84px; font-size: 28px; }
.profile-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px; background: var(--surface); border-radius: var(--radius); }
.profile-hero h1 { font-size: 22px; font-weight: 700; margin-top: 4px; }
.contact-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.contact-btn { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; padding: 8px 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 11.5px; font-weight: 500; }
.contact-btn .ic { color: var(--accent); }
.kw { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; background: var(--surface); font-size: 13px; }
.perk { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--accent-tint); color: var(--accent-dark); }
.perk strong { font-size: 13px; }
.perk.seeking { background: var(--blue-tint); color: var(--blue); }
.perk p { color: var(--ink); }
.shots { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.shots img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: var(--surface); }
.shot-del { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--danger); flex-shrink: 0; }
.feature-card { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.feature-card:hover { color: var(--ink); border-color: #CBD0D6; }
.feature-img { width: 100%; height: 150px; object-fit: cover; border-radius: 12px; }
.grid-sns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px; }
textarea.textarea { min-height: 72px; }
