/* 이리와서 이리해요 파티방 — 7차 디자인 시스템
 * 콘셉트: 프리미엄 스티커 다이어리 + 모던 커뮤니티 웹앱
 *  - 따뜻한 아이보리 종이 위에 살짝 뜬 카드(1px 저대비 테두리 + 다층 그림자 + 내부 하이라이트)
 *  - 괴렘콘은 투명 배경 다이컷 스티커(static/img/stk)로 '붙어 있는' 느낌. 상황별로 다른 컷을 쓴다
 *  - 강조색은 리본 빨강(가장 자주 쓰는 [일반파티 참여하기]) 하나에 집중, 나머지는 살구·중성색
 *  - 모든 크기·간격·색은 아래 토큰으로만 쓴다
 */
:root {
  /* 색 — 바탕 */
  --bg: #fbf6ee;            /* 아이보리 종이 */
  --bg-tint: #f6ecdd;       /* 배경 그라데이션 아래쪽 */
  --surface: #fffdf9;       /* 카드 */
  --surface-2: #fcf7f0;     /* 보조 면(입력, 펼침 패널) */
  --surface-3: #f5ede1;     /* 눌린 면(칩, 표 머리) */
  /* 색 — 글자 */
  --text: #2d231d;
  --text-2: #6b5a4d;
  --text-3: #9b8878;
  /* 색 — 선 */
  --line: rgba(92, 62, 38, .11);
  --line-2: rgba(92, 62, 38, .2);
  --line-focus: #e39a4c;
  /* 색 — 강조·상태 */
  --accent: #d9474b;         /* 리본 빨강: 주요 행동 */
  --accent-deep: #b8333a;
  --accent-soft: #fde8e5;
  --apricot: #f2a650;        /* 살구: 보조 행동 */
  --apricot-deep: #c97a26;
  --apricot-soft: #fdeed9;
  --star: #f6c544;
  --ok: #3f8f4f;   --ok-soft: #e4f2e2;
  --warn: #b7741a; --warn-soft: #fff0d5;
  --err: #c43c3c;  --err-soft: #fbe4e1;
  --info: #3c74ab; --info-soft: #e5eef8;
  /* 카테고리 (칩 배경/글자) */
  --c-rank: #fbe3e4;   --c-rank-t: #b23a45;
  --c-normal: #fdecd6; --c-normal-t: #a9621a;
  --c-scrim: #e3f1df;  --c-scrim-t: #3d7c46;
  --c-cobalt: #e1ecf8; --c-cobalt-t: #346ca3;
  --c-event: #fdf3cf;  --c-event-t: #8f6c0c;
  --c-other: #eee6f8;  --c-other-t: #6c4f9c;
  /* 그림자 (따뜻한 갈색 기반, 다층) */
  --hl: inset 0 1px 0 rgba(255, 255, 255, .85);
  --sh-1: 0 1px 1px rgba(84, 52, 26, .04), 0 2px 6px -1px rgba(84, 52, 26, .07);
  --sh-2: 0 1px 2px rgba(84, 52, 26, .05), 0 6px 16px -4px rgba(84, 52, 26, .1), 0 18px 32px -16px rgba(84, 52, 26, .14);
  --sh-3: 0 2px 6px rgba(60, 36, 18, .08), 0 28px 64px -16px rgba(60, 36, 18, .32);
  --sh-accent: 0 1px 1px rgba(150, 30, 36, .2), 0 8px 18px -8px rgba(201, 50, 56, .6);
  --stk-shadow: drop-shadow(0 3px 4px rgba(84, 52, 26, .18));
  /* 모서리 */
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px; --r-pill: 999px;
  /* 간격 4 / 8 / 12 / 16 / 24 / 32 / 48 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  /* 글자 */
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  --fs-page: 22px; --fs-section: 17px; --fs-title: 18px; --fs-body: 15px; --fs-meta: 13px; --fs-mini: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --wrap: 1040px;
  --dock-h: 64px;
  color-scheme: light;
}

/* ---------------------------------------------------------------- 기본 */
*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  font: 400 var(--fs-body)/1.55 var(--font); color: var(--text); letter-spacing: -.01em;
  word-break: keep-all; overflow-wrap: anywhere;
  background: var(--bg) linear-gradient(180deg, var(--bg) 0, var(--bg) 420px, var(--bg-tint) 100%) fixed;
  min-height: 100vh; min-height: 100dvh;
  padding-bottom: calc(var(--dock-h) + 32px + var(--safe-b));
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: var(--accent-deep); }
.muted { color: var(--text-2); }
.small { font-size: var(--fs-meta); }
.tag { color: var(--text-3); font-weight: 500; font-size: .86em; }
.mt8 { margin-top: var(--s2); } .mt14 { margin-top: 14px; } .mt16 { margin-top: var(--s4); }
:focus-visible { outline: 3px solid rgba(227, 154, 76, .55); outline-offset: 2px; }
.ic { width: 1.15em; height: 1.15em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
i[data-icon] { display: inline-flex; font-style: normal; }
/* 괴렘콘 스티커: 흰 테두리는 이미지에 구워져 있고, 그림자만 CSS 로 1개 */
.stk { display: block; height: auto; filter: var(--stk-shadow); user-select: none; -webkit-user-drag: none; pointer-events: none; }
.eyebrow { margin: 0; font-size: var(--fs-mini); font-weight: 700; color: var(--apricot-deep); letter-spacing: .02em; }

/* ---------------------------------------------------------------- 상단 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 246, 238, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 1px 0 var(--line);
  padding: calc(var(--s2) + env(safe-area-inset-top, 0px)) var(--s4) var(--s2);
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); max-width: var(--wrap); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.brand-stk { width: 46px; height: 46px; flex: 0 0 auto; filter: var(--stk-shadow); transform: rotate(-6deg); }
h1 { margin: 0; line-height: 1.12; min-width: 0; }
h1 .b1 { display: block; font-size: 11.5px; font-weight: 700; color: var(--apricot-deep); letter-spacing: 0; white-space: nowrap; }
h1 .b2 { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.top-right { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-mini); color: var(--text-3); white-space: nowrap; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--star); box-shadow: 0 0 0 3px rgba(246, 197, 68, .2); }
.conn.ok i { background: #58b36a; box-shadow: 0 0 0 3px rgba(88, 179, 106, .18); }
.conn.ok span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.conn.bad i { background: var(--err); box-shadow: 0 0 0 3px rgba(196, 60, 60, .18); }
.conn.bad span { color: var(--err); font-weight: 700; }
.user-chip {
  display: inline-flex; align-items: center; gap: 2px; max-width: 150px; min-height: 36px; padding: 0 var(--s3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); box-shadow: var(--sh-1), var(--hl);
  font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: box-shadow .15s var(--ease), transform .15s var(--ease);
}
.user-chip:hover { box-shadow: var(--sh-2), var(--hl); }

/* 카테고리 필터 (상단 고정 줄) */
.filters { display: flex; gap: 6px; max-width: var(--wrap); margin: var(--s2) auto 0; overflow-x: auto; scrollbar-width: none;
  padding: 2px 2px 4px; scroll-padding: var(--s4); }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 13px;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-pill);
  color: var(--text-2); font-size: 13.5px; font-weight: 700; transition: background .15s, color .15s;
}
.filters button:hover { background: rgba(255, 255, 255, .7); }
.filters button.on { background: var(--text); color: #fff; box-shadow: 0 4px 10px -4px rgba(45, 35, 29, .5); }
.filters button .cnt { font-size: 11.5px; font-weight: 600; min-width: 18px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--text-2); line-height: 18px; text-align: center; }
.filters button.on .cnt { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------------------------------------------------------------- 본문 */
main { padding: var(--s3) var(--s4) var(--s5); max-width: var(--wrap); margin: 0 auto; }

/* ---------------------------------------------------------------- 버튼 */
.btn {
  --b-bg: var(--surface); --b-fg: var(--text); --b-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 var(--s4); border-radius: 14px;
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd);
  box-shadow: var(--sh-1), var(--hl);
  font-size: 15px; font-weight: 700; line-height: 1.2; white-space: nowrap; text-decoration: none;
  transition: transform .12s var(--ease), box-shadow .15s var(--ease), background .15s, filter .15s;
}
.btn:hover:not(:disabled) { box-shadow: var(--sh-2), var(--hl); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); box-shadow: var(--sh-1); }
.btn:disabled { opacity: .55; cursor: default; box-shadow: none; }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { --b-bg: linear-gradient(180deg, #f6b665, var(--apricot)); --b-fg: #3a230d; --b-bd: rgba(170, 100, 30, .35);
  box-shadow: 0 1px 1px rgba(150, 90, 20, .2), 0 8px 16px -8px rgba(201, 122, 38, .7), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn.ribbon, .btn.green { --b-bg: linear-gradient(180deg, #e3585b, var(--accent)); --b-fg: #fff; --b-bd: rgba(140, 25, 30, .35);
  box-shadow: var(--sh-accent), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.ribbon:hover:not(:disabled), .btn.green:hover:not(:disabled) { filter: brightness(1.04); }
.btn.ribbon:disabled { --b-bg: var(--surface-3); --b-fg: var(--text-2); --b-bd: var(--line); opacity: 1; }
.btn.soft { --b-bg: var(--surface); --b-bd: var(--line); }
.btn.ghost { --b-bg: transparent; --b-bd: var(--line); box-shadow: none; }
.btn.ghost:hover:not(:disabled) { --b-bg: rgba(255, 255, 255, .6); box-shadow: none; }
.btn.danger { --b-bg: var(--err-soft); --b-fg: var(--err); --b-bd: rgba(196, 60, 60, .22); box-shadow: none; }
.btn.danger.armed { --b-bg: var(--err); --b-fg: #fff; --b-bd: var(--err); white-space: normal; }
.btn.done { --b-bg: var(--ok-soft); --b-fg: var(--ok); --b-bd: rgba(63, 143, 79, .25); opacity: 1; }
.btn.kakao { --b-bg: #fee500; --b-fg: #191600; --b-bd: rgba(120, 100, 0, .25); }
.btn.small { min-height: 34px; padding: 0 var(--s3); font-size: 13.5px; border-radius: 11px; }
.btn.big { min-height: 52px; font-size: 16px; border-radius: var(--r-md); }
.btn.block { display: flex; width: 100%; }
.linkbtn { text-align: center; }

/* ---------------------------------------------------------------- 입력 */
.field { display: block; margin: 0 0 var(--s4); font-size: var(--fs-meta); font-weight: 700; color: var(--text-2); }
.field-label { display: block; margin-bottom: 6px; font-size: var(--fs-meta); font-weight: 700; color: var(--text-2); }
.field-hint, .hint { display: block; margin: 6px 0 0; font-size: var(--fs-mini); font-weight: 500; color: var(--text-3); line-height: 1.5; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 11px 14px; font-size: 16px; /* iOS 확대 방지 */
  color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; outline: none;
  box-shadow: inset 0 1px 2px rgba(84, 52, 26, .05); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #b5a495; }
input:focus, textarea:focus, select:focus { border-color: var(--line-focus); box-shadow: 0 0 0 4px rgba(242, 166, 80, .18); }
input[type=checkbox] { width: auto; min-height: 0; }

/* 옵션 체크 카드 (참여 옵션 · 만들기 모달) */
label.opt-check {
  position: relative; display: flex; align-items: flex-start; gap: var(--s3); margin: 0; padding: 12px 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-1);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
label.opt-check:hover { border-color: var(--line-2); }
label.opt-check input {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 24px; height: 24px; margin: 0; padding: 0;
  border: 1.5px solid var(--line-2); border-radius: 8px; background: var(--surface); box-shadow: inset 0 1px 2px rgba(84, 52, 26, .08);
  display: grid; place-content: center; transition: background .15s, border-color .15s, transform .12s var(--ease);
}
label.opt-check input::after {
  content: ""; width: 14px; height: 14px; transform: scale(0); transition: transform .15s var(--ease);
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
label.opt-check input:checked { background: var(--accent); border-color: var(--accent); }
label.opt-check input:checked::after { transform: scale(1); }
label.opt-check input:focus-visible { outline: 3px solid rgba(217, 71, 75, .3); outline-offset: 2px; }
label.opt-check:has(input:checked) { border-color: rgba(217, 71, 75, .45); background: #fff6f4; box-shadow: 0 0 0 3px rgba(217, 71, 75, .08); }
label.opt-check span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
label.opt-check b { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--text); }
label.opt-check small { font-size: var(--fs-mini); color: var(--text-3); font-weight: 500; line-height: 1.45; }
label.opt-check.locked { cursor: default; }
label.opt-check.locked input:disabled { opacity: .85; }
label.opt-check.locked:not(:has(input:checked)) { background: var(--surface-2); box-shadow: none; }
label.opt-check.locked:not(:has(input:checked)) b { color: var(--text-2); }
.lock-note { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--text-2); }
.check-list { display: grid; gap: var(--s2); }

/* ---------------------------------------------------------------- 일반파티 히어로 */
.hero {
  position: relative; display: grid; grid-template-columns: 1fr; gap: var(--s3);
  --hero-pad: 104px;
  margin: 14px 0 var(--s3); padding: 14px var(--s4) var(--s4) var(--hero-pad); gap: 10px;
  background:
    radial-gradient(120% 140% at 0% 0%, #fff4e4 0%, rgba(255, 244, 228, 0) 60%),
    linear-gradient(135deg, #fde9cf 0%, #fbe1d6 100%);
  border: 1px solid rgba(201, 122, 38, .18); border-radius: var(--r-lg);
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.hero-stk { position: absolute; left: 4px; top: -18px; width: 96px; height: auto; transform: rotate(-8deg); }
.hero-body h2 { margin: 2px 0 2px; font-size: var(--fs-page); font-weight: 800; letter-spacing: -.04em; }
.hero-info { margin: 0; font-size: var(--fs-meta); color: #7a5a40; line-height: 1.5; }
.hero-actions { display: grid; gap: var(--s2); min-width: 0; }
.split-btn { display: flex; min-width: 0; }
.split-btn #autoJoinBtn { flex: 1; min-width: 0; border-radius: var(--r-md) 6px 6px var(--r-md); font-size: 17px; }
.split-btn .split-arrow { flex: 0 0 52px; margin-left: 2px; padding: 0; border-radius: 6px var(--r-md) var(--r-md) 6px; }
.split-btn .split-arrow .ic { width: 22px; height: 22px; transition: transform .2s var(--ease); }
.split-btn .split-arrow.open .ic { transform: rotate(180deg); }
.join-opts {
  grid-column: 1 / -1; display: grid; gap: var(--s2); min-width: 0; margin: 0 0 0 calc(var(--s4) - var(--hero-pad)); padding: var(--s3);
  background: rgba(255, 253, 249, .78); border: 1px solid rgba(201, 122, 38, .16); border-radius: var(--r-md);
  animation: unfold .22s var(--ease);
}
.join-opts legend { float: left; width: 100%; padding: 0 2px var(--s2); font-size: 14px; font-weight: 800; }
.join-opts legend span { display: block; font-size: var(--fs-mini); font-weight: 500; color: var(--text-3); }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* 옵션 태그 (카드·히어로·상세) — 제목보다 약하게 */
.opt-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.opt {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 700; line-height: 1.5; white-space: nowrap; color: var(--text-2); background: var(--surface-3);
}
.opt::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; }
.opt-mic_off { background: var(--info-soft); color: var(--info); }
.opt-random_queue { background: #efe7f9; color: #6c4f9c; }
.opt-practice { background: var(--ok-soft); color: var(--ok); }
.opt.pref { background: rgba(255, 255, 255, .85); color: var(--accent-deep); box-shadow: inset 0 0 0 1px rgba(217, 71, 75, .25); }

/* ---------------------------------------------------------------- 요약 줄 */
/* 목록 바로 위 한 줄 요약 — 숫자만 살짝 강조하고 공간은 최소로 (모바일에서 목록이 밀리지 않게) */
.summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 2px var(--s3); }
.sum { display: inline-flex; align-items: baseline; gap: 4px; position: relative; }
.sum + .sum::before { content: ""; position: absolute; left: -8px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); }
.sum b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sum span { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.sum.rec b { color: var(--ok); }
.sum.full b { color: var(--apricot-deep); }

/* ---------------------------------------------------------------- 파티 카드 */
.party-list { display: grid; gap: var(--s3); grid-template-columns: 1fr; }
@media (min-width: 680px) { .party-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); } }
@media (min-width: 1000px) { .party-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: var(--s4) var(--s4) 14px; cursor: pointer; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-1), var(--hl);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}
@media (hover: hover) { .card:hover { transform: translateY(-2px); box-shadow: var(--sh-2), var(--hl); border-color: var(--line-2); } }
.card:active { transform: translateY(0) scale(.995); }
.card:focus-visible { outline-offset: 3px; }
.card.full { background: linear-gradient(180deg, #fffaf2, #fbf3e6); }
.card.full .card-foot { padding-right: 64px; }
.card.mine { border-color: rgba(217, 71, 75, .35); box-shadow: 0 0 0 3px rgba(217, 71, 75, .08), var(--sh-2), var(--hl); }
.card.flash { animation: flash 1s var(--ease); }
@keyframes flash { from { box-shadow: 0 0 0 4px rgba(246, 197, 68, .55), var(--sh-1); } to { box-shadow: var(--sh-1), var(--hl); } }
.card-stk { position: absolute; right: -4px; bottom: -14px; width: 76px; transform: rotate(6deg); }
.card-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pno { margin-left: auto; font-size: var(--fs-mini); color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.mine-tag { font-size: 11px; font-weight: 800; color: #fff; background: var(--accent); padding: 2px 8px; border-radius: var(--r-pill); }
.ptitle {
  margin: 0; font-size: var(--fs-title); font-weight: 800; letter-spacing: -.035em; line-height: 1.32;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ptitle.placeholder { color: #5b4739; }
.card-status { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.count { font-size: 13px; color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.count b { font-size: 17px; color: var(--text); font-weight: 800; margin-right: 1px; }
.meter { display: inline-flex; gap: 3px; }
.meter i { width: 14px; height: 6px; border-radius: 3px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line); }
.meter i.on { background: #6cbb79; box-shadow: none; }
.card.full .meter i.on { background: var(--apricot); }
.st { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 8px; border-radius: var(--r-pill);
  font-size: var(--fs-mini); font-weight: 700; white-space: nowrap; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st.recruiting { background: var(--ok-soft); color: var(--ok); }
.st.full { background: var(--warn-soft); color: var(--warn); }
.st.closed { background: var(--surface-3); color: var(--text-3); }
.card-status .st { margin-left: auto; }

/* 카테고리 칩 */
.cat, .chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--r-pill);
  font-size: var(--fs-mini); font-weight: 800; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.cat.cat-rank, .chip.cat-rank { background: var(--c-rank); color: var(--c-rank-t); }
.cat.cat-normal, .chip.cat-normal { background: var(--c-normal); color: var(--c-normal-t); }
.cat.cat-scrim, .chip.cat-scrim { background: var(--c-scrim); color: var(--c-scrim-t); }
.cat.cat-cobalt, .chip.cat-cobalt { background: var(--c-cobalt); color: var(--c-cobalt-t); }
.cat.cat-event, .chip.cat-event { background: var(--c-event); color: var(--c-event-t); }
.cat.cat-other, .chip.cat-other { background: var(--c-other); color: var(--c-other-t); }

/* 참가자: 아바타 + 이름 (테두리 없이 면으로만) */
.members { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.members .m { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%;
  padding: 3px 10px 3px 3px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.members .m.me { background: #fff1ee; box-shadow: inset 0 0 0 1px rgba(217, 71, 75, .25); }
.m-name { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.members .free { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; font-size: var(--fs-mini);
  font-weight: 600; color: var(--text-3); }
.free-dots { display: inline-flex; gap: 3px; }
.free-dots i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px dashed #d4c2ae; }
.av { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 11.5px; font-weight: 800; line-height: 1; color: #fff; }
.av0 { background: #e58c6d; } .av1 { background: #e2a248; } .av2 { background: #79ad6b; }
.av3 { background: #6c98c9; } .av4 { background: #a184c9; } .av5 { background: #d77b98; }
.av-crown { position: absolute; top: -7px; right: -5px; display: grid; place-items: center; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; color: #e8a917; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.av-crown .ic { width: 10px; height: 10px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: 2px; min-height: 34px;
  padding-top: 10px; border-top: 1px dashed var(--line); }
.meta { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--fs-mini); color: var(--text-3); white-space: nowrap; overflow: hidden; }
.meta-lead { display: inline-flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); font-weight: 600; }
.meta-lead .ic { color: #e8a917; width: 13px; height: 13px; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill);
  font-size: var(--fs-mini); font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.pill .ic { width: 13px; height: 13px; }
.pill.auto { background: var(--apricot-soft); color: var(--apricot-deep); }
.pill.mine { background: var(--accent-soft); color: var(--accent-deep); }
.pill.lead { background: #fff3cf; color: #9a6b00; }
.pill.me { background: var(--accent-soft); color: var(--accent-deep); }

/* 빈 화면 · 하단 장식 */
.empty { text-align: center; padding: var(--s6) var(--s4) var(--s5); }
.empty-stk { width: 160px; height: auto; aspect-ratio: 207 / 136; margin: 0 auto var(--s2); }
.empty-title { margin: 0 0 4px; font-size: var(--fs-section); font-weight: 800; }
.empty p { margin: 0; }
.page-foot { display: flex; align-items: flex-end; justify-content: center; gap: var(--s2); margin-top: var(--s6);
  color: var(--text-3); font-size: var(--fs-mini); font-weight: 600; }
.page-foot img { width: 56px; height: auto; filter: var(--stk-shadow); opacity: .95; }
.page-foot span { padding-bottom: 10px; }

/* ---------------------------------------------------------------- 하단 독 (공지 · 현황 복사 · 새 파티) */
.dock {
  position: fixed; left: 50%; bottom: calc(var(--s3) + var(--safe-b)); transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: var(--s2); width: min(560px, calc(100% - 24px)); padding: var(--s2);
  background: rgba(255, 252, 247, .86); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-3);
}
.dock .btn { flex: 1; min-height: 48px; padding: 0 var(--s3); }
.dock #createBtn { flex: 1.35; }
.dock-notice {
  position: relative; flex: 0 0 48px; width: 48px; height: 48px; padding: 0; display: grid; place-items: center;
  background: var(--apricot-soft); border: 1px solid rgba(201, 122, 38, .2); border-radius: 15px; box-shadow: var(--hl);
  transition: transform .15s var(--ease), background .15s;
}
.dock-notice img { width: 40px; height: 40px; filter: drop-shadow(0 1px 1px rgba(84, 52, 26, .2)); transform: rotate(-6deg); }
.dock-notice:hover { background: #fde3c2; }
.dock-notice:active { transform: scale(.95); }
.notice-dot {
  position: absolute; top: -6px; right: -6px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: var(--r-pill); background: var(--accent); color: #fff; font: 900 12px/1 var(--font); font-style: normal;
  box-shadow: 0 0 0 2px var(--surface), 0 3px 8px -2px rgba(201, 50, 56, .7); animation: pop .35s var(--ease);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- 로그인 */
.login { display: flex; justify-content: center; padding-top: var(--s7); }
.login-card {
  position: relative; width: 100%; max-width: 440px; padding: 86px var(--s5) var(--s5);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-2), var(--hl);
}
.login-stk { position: absolute; left: 50%; top: -58px; width: 132px; margin-left: -66px; transform: rotate(-4deg); }
.login-head { text-align: center; margin-bottom: var(--s5); }
.login-head h2 { margin: 4px 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.04em; }
.login-head p { margin: 0; font-size: 14px; line-height: 1.6; }
.kakao-box .hint { text-align: center; margin-top: var(--s3); }
.fold { margin-top: var(--s3); border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.fold summary { display: flex; align-items: center; gap: 8px; padding: 13px var(--s4); cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 700; color: var(--text-2); }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3); transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
.fold[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.fold > :not(summary) { margin-left: var(--s4); margin-right: var(--s4); }
.fold > form { padding-bottom: var(--s4); }
.fold > .hint { margin-top: 0; margin-bottom: var(--s3); }
.kakao-box + .fold { margin-top: var(--s5); }
.dev-box { margin-top: var(--s4); padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); font-size: var(--fs-meta); color: #7a5410; }
.dev-box p { margin: 0 0 var(--s2); }

/* 카카오 인증 진행 */
.kakao-flow { margin-top: var(--s3); display: grid; gap: 10px; }
.kflow-state { display: flex; align-items: center; gap: var(--s3); padding: 12px 14px; border-radius: var(--r-md);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.kflow-state .stk { width: 64px; flex: 0 0 auto; }
.kflow-state b { display: flex; align-items: center; font-size: 15.5px; }
.kflow-sub { display: block; font-size: var(--fs-meta); color: var(--text-2); }
.kflow-state.ok { background: var(--ok-soft); box-shadow: inset 0 0 0 1px rgba(63, 143, 79, .2); }
.kflow-state.err { background: var(--err-soft); box-shadow: inset 0 0 0 1px rgba(196, 60, 60, .18); }
.kflow-code { font-size: 22px; font-weight: 800; letter-spacing: 3px; font-variant-numeric: tabular-nums; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(201, 122, 38, .25); border-top-color: var(--apricot-deep);
  display: inline-block; margin-right: 8px; flex: 0 0 auto; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- 시트 (모바일: 바텀 시트 / 넓은 화면: 가운데 모달) */
.backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(45, 30, 20, .38); animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-width: 640px; margin: 0 auto;
  max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--sh-3);
  padding: 6px var(--s5) calc(var(--s5) + var(--safe-b)); animation: sheet-up .26s var(--ease);
}
@keyframes sheet-up { from { transform: translateY(32px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 4px auto 14px; }
@media (min-width: 768px) {
  .sheet { left: 50%; top: 50%; right: auto; bottom: auto; width: min(560px, calc(100vw - 48px)); max-height: min(86vh, 780px);
    transform: translate(-50%, -50%); border-radius: var(--r-xl); padding-top: var(--s5); animation: modal-in .24s var(--ease); }
  .sheet-handle { display: none; }
  @keyframes modal-in { from { transform: translate(-50%, -46%) scale(.98); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
}
body.sheet-open { overflow: hidden; }
.sheet h3 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.035em; line-height: 1.3; overflow-wrap: anywhere; }
.sheet h4 { font-size: 14px; margin: var(--s4) 0 6px; }
.sheet .sub { margin: 4px 0 0; color: var(--text-2); font-size: var(--fs-meta); line-height: 1.55; }
.sheet-head { position: relative; display: flex; align-items: flex-end; gap: var(--s3); margin-bottom: var(--s4); }
.sheet-head.has-stk { min-height: 84px; }
.sheet-stk { width: 84px; flex: 0 0 auto; order: 2; margin: -6px -4px -4px auto; transform: rotate(5deg); }
.sheet-titles { min-width: 0; flex: 1; }
.sheet-titles .eyebrow { margin-bottom: 2px; }
.sheet-actions {
  position: sticky; bottom: calc(-1 * var(--s5) - var(--safe-b)); z-index: 2; display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px;
  margin: var(--s5) calc(-1 * var(--s5)) calc(-1 * var(--s5) - var(--safe-b)); padding: var(--s3) var(--s5) calc(var(--s4) + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 78%, rgba(251, 246, 238, 0));
}
.sheet-actions .btn { min-height: 50px; }
.sheet-actions.three { grid-template-columns: 1fr 1fr 1.6fr; }
.sheet-actions.three .btn { padding: 0 var(--s2); }
.state-panel { text-align: center; padding: var(--s3) 0 var(--s2); }
.state-panel .state-stk { width: 132px; margin: 0 auto var(--s3); }
.state-panel.small .state-stk { width: 96px; }
.state-panel h3 { margin-bottom: 4px; }
.state-panel p { margin: 0; }

/* 안내 상자 (콜아웃) */
.callout { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 var(--s4); padding: 12px 14px; border-radius: 14px;
  background: var(--apricot-soft); color: #7a4f1d; font-size: var(--fs-meta); line-height: 1.55; }
.callout .ic { width: 18px; height: 18px; margin-top: 1px; }
.callout.ok { background: var(--ok-soft); color: #2f6e3c; }
.actions .callout { margin: 0; }

/* 파티 상세 */
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: -6px 0 var(--s2); }
.detail-meta .pno { margin-left: auto; }
.detail-meta + .opt-tags { margin-bottom: var(--s2); }
.member-list { list-style: none; margin: var(--s4) 0 0; padding: 4px var(--s3); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-1); }
.member-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 2px; min-width: 0; }
.member-row + .member-row { border-top: 1px solid var(--line); }
.member-row .av { width: 32px; height: 32px; font-size: 14px; }
.member-row .av-crown { top: -6px; right: -6px; width: 17px; height: 17px; }
.member-row .av-crown .ic { width: 12px; height: 12px; }
.av-empty { background: transparent; color: #c9b39c; border: 1.5px dashed #d8c6b2; }
.av-empty .ic { width: 14px; height: 14px; }
.member-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.member-row.vacant .name { font-weight: 500; }
.member-row .acts { display: flex; gap: 6px; flex: 0 0 auto; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: var(--s4); }
.actions .full { grid-column: 1 / -1; }
.events { margin-top: var(--s4); border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.events summary { display: flex; align-items: center; gap: 6px; padding: 11px 14px; cursor: pointer; font-size: var(--fs-meta);
  font-weight: 700; color: var(--text-2); list-style: none; }
.events summary::-webkit-details-marker { display: none; }
.events ul { list-style: none; margin: 0; padding: 0 14px 12px; display: grid; gap: 4px; font-size: var(--fs-mini); color: var(--text-2); }
.events li { display: flex; gap: 10px; }
.events time { color: var(--text-3); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.events > p { margin: 0; padding: 0 14px 12px; font-size: var(--fs-mini); }

/* 새 파티 만들기 */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.cat-grid button { padding: 12px 4px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--sh-1); font-weight: 800; font-size: 15px; color: var(--text); line-height: 1.2;
  transition: border-color .15s, box-shadow .15s, transform .12s var(--ease); }
.cat-grid button small { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.cat-grid button.on { border-color: rgba(201, 122, 38, .55); box-shadow: 0 0 0 3px rgba(242, 166, 80, .2), var(--sh-1); }
.cat-grid button.on.cat-rank { background: var(--c-rank); } .cat-grid button.on.cat-scrim { background: var(--c-scrim); }
.cat-grid button.on.cat-cobalt { background: var(--c-cobalt); } .cat-grid button.on.cat-event { background: var(--c-event); }
.cat-grid button.on.cat-other { background: var(--c-other); }
.stepper { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.stepper .btn { width: 46px; padding: 0; }
.stepper .minus { width: 14px; height: 2px; border-radius: 1px; background: currentColor; }
.stepper output { min-width: 56px; text-align: center; font-size: 21px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.stepper .muted { font-size: var(--fs-mini); }
.fixed-cap { font-size: 16px; font-weight: 800; color: var(--text); }
.fixed-cap span { font-weight: 500; font-size: var(--fs-mini); color: var(--text-3); margin-left: 6px; }
.copy-area { min-height: 220px; font-size: 14px; line-height: 1.55; }

/* ---------------------------------------------------------------- 공지 */
.notice-list { display: grid; gap: var(--s2); }
.notice-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; width: 100%;
  padding: 13px 12px 13px 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-1), var(--hl); font-weight: 700; transition: box-shadow .15s, transform .15s var(--ease), border-color .15s;
}
.notice-row:hover { box-shadow: var(--sh-2), var(--hl); border-color: var(--line-2); }
.notice-row.important:not(.read) { background: linear-gradient(90deg, #fff4f1, var(--surface) 60%); border-color: rgba(217, 71, 75, .22); }
.notice-row.read { background: var(--surface-2); box-shadow: none; font-weight: 500; color: var(--text-2); }
.ntitle { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ntext { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.nflags { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.nflags:empty { display: none; }
.ndate { font-size: var(--fs-mini); color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.ngo { width: 16px; height: 16px; color: var(--text-3); transform: rotate(-90deg); }
.nbadge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 800;
  white-space: nowrap; letter-spacing: .02em; }
.nbadge.new { background: var(--accent); color: #fff; }
.nbadge.read { background: var(--surface-3); color: var(--text-3); }
.nimp { font-size: 11px; font-weight: 800; color: var(--accent-deep); background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; }
.npin { display: inline-flex; align-items: center; gap: 3px; color: var(--apricot-deep); }
.npin .ic { width: 14px; height: 14px; }
.npin.labeled { font-size: 11px; font-weight: 800; background: var(--apricot-soft); padding: 2px 7px; border-radius: 6px; }
.notice-title { margin-top: var(--s2) !important; }
.notice-body { margin-top: var(--s4); padding: 4px var(--s4); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--sh-1); overflow-wrap: anywhere; line-height: 1.7; }
.md h4, .md h5, .md h6 { margin: 14px 0 4px; letter-spacing: -.02em; }
.md h4 { font-size: 17px; } .md h5 { font-size: 15.5px; } .md h6 { font-size: 14.5px; }
.md p { margin: 10px 0; }
.md ul, .md ol { margin: 8px 0; padding-left: 22px; }
.md li + li { margin-top: 2px; }
.md blockquote { margin: 12px 0; padding: 8px 12px; border-radius: 10px; background: var(--apricot-soft); color: #7a4f1d; }
.md code { background: var(--surface-3); border-radius: 5px; padding: 1px 5px; font-size: .92em; }
.md a { color: var(--accent-deep); font-weight: 700; text-underline-offset: 2px; }
.md hr { border: 0; border-top: 1px dashed var(--line-2); margin: 14px 0; }

/* ---------------------------------------------------------------- 토스트 */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 30px + var(--safe-b)); transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); width: max-content;
  padding: 8px 16px 8px 10px; border-radius: var(--r-md); background: rgba(45, 35, 29, .94); color: #fff;
  font-size: 14px; font-weight: 600; line-height: 1.45; box-shadow: var(--sh-3); animation: toast-in .25s var(--ease);
}
.toast.err { background: rgba(160, 40, 44, .96); }
.toast-stk { width: 30px; flex: 0 0 auto; filter: none; }
@keyframes toast-in { from { transform: translate(-50%, 10px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------------------------------------------------------------- 퇴장 예정 표시 (문구 + 색 + 테두리) */
/* 한 판만 = 살구(곧 끝나지만 한 판 더), 곧 나감 = 리본 빨강 계열. 색만으로 구분하지 않도록 항상 문구를 함께 쓴다 */
.intent { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; padding: 3px 9px; border-radius: var(--r-pill);
  border: 1px solid transparent; font: inherit; font-size: var(--fs-mini); font-weight: 800; line-height: 1.3; cursor: pointer; white-space: nowrap; }
.intent .intent-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.intent.intent-one_more { background: var(--apricot-soft); color: var(--apricot-deep); border-color: rgba(201, 122, 38, .35); }
.intent.intent-soon { background: var(--accent-soft); color: var(--accent-deep); border-color: rgba(184, 51, 58, .35); }
.intent:focus-visible { outline: 3px solid rgba(217, 71, 75, .3); outline-offset: 2px; }
.intent.mini { padding: 1px 7px; font-size: 11px; gap: 4px; }
.intent.mini .intent-dot { width: 6px; height: 6px; }
.members .m.has-intent { padding-right: 4px; }
.members .m.intent-one_more { box-shadow: inset 0 0 0 1.5px rgba(201, 122, 38, .55); }
.members .m.intent-soon { box-shadow: inset 0 0 0 1.5px rgba(184, 51, 58, .55); }
.member-row.has-intent { margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 12px; }
.member-row.intent-one_more { background: linear-gradient(90deg, var(--apricot-soft), transparent 70%); }
.member-row.intent-soon { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }
.member-row.intent-one_more .av { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--apricot); }
.member-row.intent-soon .av { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.my-status { margin: var(--s3) 0 var(--s2); padding: 10px 12px 8px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.my-status-label { display: block; margin-bottom: 6px; font-size: var(--fs-mini); font-weight: 800; color: var(--text-2); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 3px; border-radius: 12px; background: var(--surface-3); }
.seg-btn { min-height: 38px; padding: 4px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2);
  font: inherit; font-size: 13px; font-weight: 700; line-height: 1.25; cursor: pointer; word-break: keep-all; }
.seg-btn.on { background: var(--surface); color: var(--text); box-shadow: var(--sh-1), var(--hl); }
.seg-btn.on.k-one_more { color: var(--apricot-deep); box-shadow: inset 0 0 0 1.5px var(--apricot), var(--sh-1); }
.seg-btn.on.k-soon { color: var(--accent-deep); box-shadow: inset 0 0 0 1.5px var(--accent), var(--sh-1); }
.seg-btn:focus-visible { outline: 3px solid rgba(217, 71, 75, .3); outline-offset: 1px; }
.my-status .hint { margin-top: 6px; }

/* 같은 닉네임 다른 계정 안내 */
.sibling-note { margin: 0 0 var(--s4); background: var(--warn-soft); color: #7a4d0c; }
.sibling-note > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sibling-note b { font-size: 14px; }
.sibling-note span { font-size: var(--fs-meta); line-height: 1.5; }
.sibling-note .btn { align-self: flex-start; }

/* 정원 충족 알림: 화면을 가리지 않는 떠 있는 카드 (뒤 화면 조작 가능) */
.fill-pop { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 24px + var(--safe-b)); z-index: 45; transform: translateX(-50%);
  width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.fill-card { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 8px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--sh-3), inset 0 0 0 1.5px rgba(246, 197, 68, .7); animation: fill-in .45s var(--ease); }
.fill-stk { width: 88px; height: auto; flex: 0 0 auto; filter: var(--stk-shadow); transform-origin: 50% 90%; animation: fill-cheer 1.1s var(--ease) .15s 2; }
.fill-text { min-width: 0; flex: 1; }
.fill-text h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--text); }
.fill-text p { margin: 3px 0 0; font-size: var(--fs-meta); color: var(--text-2); line-height: 1.45; overflow-wrap: anywhere; }
.fill-acts { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
@keyframes fill-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fill-cheer { 0%, 100% { transform: rotate(0) translateY(0); } 30% { transform: rotate(-6deg) translateY(-6px); } 60% { transform: rotate(5deg) translateY(-2px); } }
@media (max-width: 420px) { .fill-stk { width: 72px; } .seg-btn { font-size: 12.5px; } }

/* ---------------------------------------------------------------- 반응형 */
@media (max-width: 420px) {
  main { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 12px; padding-right: 12px; }
  .hero { --hero-pad: 88px; padding: 12px 12px 12px var(--hero-pad); }
  .join-opts { margin-left: calc(12px - var(--hero-pad)); }
  .hero-stk { width: 84px; left: 2px; top: -16px; }
  .hero-body h2 { font-size: 20px; }
  .hero-info { font-size: 12.5px; }
  .card { padding: 14px 14px 12px; }
  .sheet { padding-left: var(--s4); padding-right: var(--s4); }
  .sheet-actions { margin-left: calc(-1 * var(--s4)); margin-right: calc(-1 * var(--s4)); padding-left: var(--s4); padding-right: var(--s4); }
  .dock .btn span { font-size: 14px; }
}
@media (max-width: 360px) {
  h1 .b1 { display: none; }
  .hero { --hero-pad: 72px; }
  .hero-stk { width: 70px; top: -14px; left: 0; }
  .summary { gap: 2px 12px; }
  .summary .sum span { font-size: 11.5px; }
  .dock #copyBtn span { display: none; }
  .dock #copyBtn { flex: 0 0 48px; }
  .card-status .st { margin-left: 0; }
}
@media (min-width: 768px) {
  main { padding-top: var(--s5); }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); align-items: center; gap: var(--s5);
    --hero-pad: 140px; padding: var(--s5) var(--s5) var(--s5) var(--hero-pad); margin-top: 30px; }
  .join-opts { margin-left: calc(var(--s5) - var(--hero-pad)); }
  .hero-stk { width: 128px; left: 4px; top: -26px; }
  .hero-body h2 { font-size: 26px; }
  .hero-info { font-size: 14px; }
  .join-opts { grid-template-columns: repeat(3, 1fr); }
  .join-opts legend { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .spinner { animation: none; }
}
