/* 동료 탭 (2026-10-28): 편성 판 · 싸움터 칸 · 편성된 사람 카드 · 소모품 칸 · 동료 카드
   스킬카드 강화 판(.cfd) · 텃밭 작물 칸(.gc-*) · 원정 출발 카드(.startcard)와 같은 결: 얇은 테 + 위 띠 빛깔 + 금빛 고른 칸 + 마디 단추
   그리는 곳: public/js/pages/party.js (compHome · slotBoard · memberSheets · loSlots · loPick · myComp) · public/js/autoform.js */

/* ── 줄 빛깔: 전열(적 쪽) · 중열 · 후열 ── */
.pfb-col.r-front, .pm-card.r-front { --rw: var(--primary-2); }
.pfb-col.r-mid, .pm-card.r-mid { --rw: var(--gilt); }
.pfb-col.r-back, .pm-card.r-back { --rw: var(--sky); }
:root[data-tone="dark"] .pfb-col.r-back, :root[data-tone="dark"] .pm-card.r-back { --rw: #6f93b8; }

/* ── 위 판: 왼쪽 편성(간단히: 편성 줄 · 자세히: 싸움터) | 오른쪽 전투력 · 자동 편성 ── */
.pform { border-top: 3px solid var(--gilt); }
.pform .pf-side { justify-content: center; }
.pf-pw { display: grid !important; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 .5rem; }
.pf-pwk { display: inline-flex; align-items: center; gap: .25rem; font-size: var(--t-small); color: var(--ink-3); white-space: nowrap; }
.pf-pwk .si { width: 14px; height: 14px; color: var(--gilt); }
.pf-pw > b { justify-self: end; font-family: var(--font-num) !important; font-size: 1.4rem !important; letter-spacing: .02em; color: var(--ink); line-height: 1.1; }
.pf-pwf { grid-column: 1 / -1; justify-self: end; font-size: var(--t-micro); color: var(--ink-3); white-space: nowrap; }
.pform .af-go.big { letter-spacing: .1em; }
.pf-band { display: flex; justify-content: center; min-width: 0; }
.pf-band .af-slot { cursor: pointer; border-radius: var(--r-s); }
.pf-band .af-slot:hover .portrait, .pf-band .af-slot:hover > canvas, .pf-band .af-slot:focus-visible .portrait { box-shadow: 0 0 0 2px var(--gilt), 0 2px 4px rgba(40, 24, 10, .18); }
.pf-band .af-rl { font-size: var(--t-micro); padding: .05rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--surface-3) 70%, transparent); letter-spacing: .14em; }

/* 자세히: 편성 판이 넓게, 오른쪽 기둥은 좁게 */
.pform.detail { grid-template-columns: minmax(0, 1fr) 230px; align-items: start; padding: .7rem .8rem .8rem; }
.pform.detail .pf-side { position: sticky; top: .5rem; gap: .45rem; padding-left: 1rem; }

/* 진형 마디 단추: 칸 모양 점 + 이름 */
.pfb { display: flex; flex-direction: column; gap: .55rem; min-width: 0; }
.pfb-forms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line-2); border-radius: var(--r-s); overflow: hidden; background: var(--surface); }
.pfb-forms button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-width: 0; min-height: 48px; padding: .25rem .1rem; border: 0; border-radius: 0; box-shadow: none; background: transparent; color: var(--ink-2); font-weight: 700; }
.pfb-forms button + button { border-left: 1px solid var(--line); }
.pfb-forms button:hover:not(:disabled):not(.sel) { background: color-mix(in srgb, var(--gilt) 10%, var(--surface)); }
.pfb-forms button.sel, .pfb-forms button.sel:hover:not(:disabled) { background: var(--ink-2); color: var(--surface); }
.pfb-fn { font-size: .8rem; white-space: nowrap; letter-spacing: -.02em; }
.pfb-glyph { width: 26px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; opacity: .8; }
.pfb-glyph circle { stroke: none; }
.pfb-glyph .off { opacity: .45; }
.pfb-forms button.sel .pfb-glyph { opacity: 1; color: var(--gilt-2); }
.pfb-eff { display: flex; align-items: flex-start; gap: .35rem; margin: 0; padding: .3rem .5rem; font-size: .8rem; line-height: 1.4; color: var(--ink-2); background: color-mix(in srgb, var(--gilt) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gilt) 40%, var(--line)); border-radius: var(--r-s); }
.pfb-eff .si { flex: none; width: 15px; height: 15px; margin-top: .12rem; color: var(--gilt); }

/* 싸움터: [적] 전열 | 중열 | 후열 — 왼쪽이 적 쪽 */
.pfb-field { display: grid; grid-template-columns: 26px repeat(3, minmax(0, 1fr)); gap: .4rem; padding: .45rem; min-width: 0;
  background: repeating-linear-gradient(90deg, transparent 0 22px, color-mix(in srgb, var(--line) 22%, transparent) 22px 23px), color-mix(in srgb, var(--surface-2) 75%, var(--surface));
  border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: inset 0 1px 3px rgba(40, 24, 10, .08); }
.pfb-foe { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; color: var(--rose); font-size: var(--t-micro); font-weight: 700; letter-spacing: .1em;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rose) 16%, transparent), transparent); border-left: 2px solid color-mix(in srgb, var(--rose) 60%, transparent); border-radius: 2px; }
.pfb-foe .si { width: 14px; height: 14px; stroke-width: 2.2; }
.pfb-col { display: flex; flex-direction: column; gap: .35rem; min-width: 0; padding: .3rem; border-top: 3px solid var(--rw); background: color-mix(in srgb, var(--rw) 5%, var(--surface)); border-radius: var(--r-s); box-shadow: 0 0 0 1px color-mix(in srgb, var(--rw) 28%, var(--line)); justify-content: flex-start; }
.pfb-col.off { --rw: var(--line-2); background: transparent; box-shadow: 0 0 0 1px color-mix(in srgb, var(--line) 60%, transparent); }
.pfb-rl { display: flex; align-items: baseline; justify-content: center; gap: .35rem; font-family: var(--font-head); font-size: var(--t-small); font-weight: 700; color: var(--ink-2); letter-spacing: .12em; white-space: nowrap; }
.pfb-rl i { font-style: normal; font-size: var(--t-micro); color: var(--ink-3); letter-spacing: 0; font-weight: 400; }
.pfb-none { flex: 1; display: grid; place-items: center; min-height: 60px; font-size: var(--t-micro); color: var(--ink-3); text-align: center; }

/* 칸 하나: 좁은 칸은 세로(얼굴 위), 넓은 판은 가로 */
.pfb-sl { position: relative; display: flex; flex-direction: column; align-items: center; gap: .1rem; width: 100%; min-width: 0; min-height: 96px; padding: .35rem .2rem .3rem; white-space: normal; font-weight: 400; text-align: center;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--rw) 35%, var(--line)); border-radius: var(--r-s); box-shadow: 0 1px 2px rgba(40, 24, 10, .08); cursor: pointer; }
.pfb-sl:hover:not(:disabled) { border-color: var(--rw); background: color-mix(in srgb, var(--rw) 8%, var(--surface)); }
.pfb-sl.me { box-shadow: inset 0 0 0 1px var(--gilt), 0 1px 2px rgba(40, 24, 10, .08); }
.pfb-sl.empty { justify-content: center; gap: .2rem; border: 1px dashed var(--line-2); background: color-mix(in srgb, var(--surface-3) 30%, transparent); box-shadow: none; color: var(--ink-3); }
.pfb-sl.empty:hover:not(:disabled) { border-style: solid; color: var(--ink-2); }
.pfb-sl.over { box-shadow: 0 0 0 2px var(--gilt), 0 0 10px color-mix(in srgb, var(--gilt) 40%, transparent); }
.pfb-sl.drag { opacity: .45; }
.pfb-plus { display: grid; place-items: center; width: 30px; height: 30px; border: 1px dashed currentColor; border-radius: 50%; }
.pfb-plus .si { width: 15px; height: 15px; }
.pfb-et { font-size: var(--t-micro); }
.pfb-por { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-s); background: color-mix(in srgb, var(--rw, var(--gilt)) 10%, var(--surface-2)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--rw, var(--gilt)) 35%, var(--line)); overflow: hidden; }
.pfb-por > canvas, .pfb-por > img { width: 100%; height: 100%; }
.pfb-tx { display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 0; width: 100%; line-height: 1.25; }
.pfb-nm { max-width: 100%; font-size: .84rem; }
.pfb-nm.me { color: var(--ink); }
.pfb-cl { max-width: 100%; font-size: var(--t-micro); color: var(--ink-3); }
.pfb-hp { display: flex; justify-content: center; line-height: 1; margin-top: .1rem; }
.pfb-hp .affh { margin: 0; }
.pfb-hp .affh .si.afh { width: 10px; height: 10px; }
.pfb-tag { margin-top: .1rem; font-size: .62rem; padding: 0 .35rem; border-radius: 999px; color: var(--ink-2); background: color-mix(in srgb, var(--gilt) 20%, var(--surface)); white-space: nowrap; }
.pfb-pw { position: absolute; right: 3px; top: 3px; font-size: .62rem; font-family: var(--font-num); color: var(--ink-3); line-height: 1; }
@media (min-width: 1100px) {
  .pfb-sl:not(.empty) { flex-direction: row; justify-content: flex-start; gap: .5rem; min-height: 60px; padding: .35rem .5rem; text-align: left; }
  .pfb-sl:not(.empty) .pfb-tx { align-items: flex-start; }
  .pfb-sl:not(.empty) .pfb-hp { justify-content: flex-start; }
  .pfb-sl.empty { min-height: 60px; flex-direction: row; gap: .4rem; }
  .pfb-sl .pfb-pw { top: auto; bottom: 4px; right: 6px; }
  .pfb-field { grid-template-columns: 30px repeat(3, minmax(0, 1fr)); gap: .5rem; padding: .55rem; }
}

/* 고칠 때: 저장 띠 */
.pfb-save { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; padding: .35rem .5rem; border: 1px solid var(--gilt); border-left-width: 3px; border-radius: var(--r-s); background: color-mix(in srgb, var(--gilt-2) 16%, var(--surface)); }
.pfb-sv-t { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--ink-2); min-width: 0; }
.pfb-sv-t .si { flex: none; width: 15px; height: 15px; color: var(--gilt); }
.pfb-sv-b { display: flex; gap: .35rem; margin-left: auto; }
.pfb-sv-b button { white-space: nowrap; }
.pfb .syn-row { justify-content: flex-start; }

/* 고르기 창 (설 사람 · 소모품) */
.modal.pfpick { max-width: 520px; }
.pfp-head { display: flex; flex-direction: column; gap: .1rem; margin-bottom: .55rem; padding-right: 2rem; }
.pfp-head h3 { margin: 0; }
.pfp-head .faint { font-size: .8rem; }
.pfp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .4rem; max-height: min(56vh, 420px); overflow-y: auto; overscroll-behavior: contain; padding: 2px; scrollbar-width: thin; }
.pfp-it { position: relative; display: flex; align-items: center; gap: .45rem; min-width: 0; min-height: 56px; padding: .35rem .45rem; font-weight: 400; text-align: left; white-space: normal; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: none; }
.pfp-it:hover:not(:disabled) { border-color: var(--gilt); background: color-mix(in srgb, var(--gilt) 9%, var(--surface)); }
.pfp-it.cur { box-shadow: 0 0 0 2px var(--gilt); opacity: 1; }
.pfp-it.in { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.pfp-it .pfb-por { width: 40px; height: 40px; }
.pfp-it .pfb-tx { align-items: flex-start; }
.pfp-st { font-size: .66rem; color: var(--ink-3); white-space: nowrap; }
.pfp-st.fit { color: var(--mint); font-weight: 700; }
.pfp-it .pfb-pw { top: 4px; right: 5px; }
.pfp-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .6rem; padding-top: .5rem; border-top: 1px dotted var(--line-2); }
.pfp-foot .si { width: 13px; height: 13px; margin-right: .15rem; }
.pfp-foot .primary { min-width: 8rem; }

/* ── 편성된 사람 카드 ── */
.pm { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.pm-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; min-width: 0; }
.pm-head h4 { margin: 0; white-space: nowrap; }
.pm-head .faint { font-size: .78rem; }
.pm-cnt { font-size: .82rem; color: var(--ink-3); }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: .5rem; }
.pm-card { display: flex; flex-direction: column; gap: .45rem; min-width: 0; padding: .55rem .6rem .6rem; background: color-mix(in srgb, var(--rw) 4%, var(--surface)); border: 1px solid color-mix(in srgb, var(--rw) 30%, var(--line)); border-top: 3px solid var(--rw); border-radius: var(--r-s); box-shadow: var(--shadow-card); }
.pm-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem; }
.pm-por { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-s); background: color-mix(in srgb, var(--rw) 10%, var(--surface-2)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--rw) 35%, var(--line)); margin-bottom: 6px; }
.pm-por > canvas, .pm-por > .portrait, .pm-por > img { border-radius: var(--r-s); }
.pm-row { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); padding: 0 .35rem; font-size: .62rem; font-weight: 700; line-height: 1.45; color: #fff8ec; background: var(--rw); border-radius: 999px; box-shadow: 0 0 0 2px var(--surface); white-space: nowrap; letter-spacing: .06em; }
.pm-id { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.pm-nm { font-size: .95rem; line-height: 1.25; }
.pm-hearts { display: flex; line-height: 1; }
.pm-hearts .affh { margin: 0; }
.pm-hearts .affh .si.afh { width: 11px; height: 11px; }
.pm-sub { font-size: var(--t-micro); color: var(--ink-3); }
.pm-pw { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.pm-pw span { font-size: .62rem; color: var(--ink-3); }
.pm-pw b { font-family: var(--font-num); font-size: 1.02rem; color: var(--ink); }
.pm-sks { display: flex; flex-wrap: wrap; gap: .25rem; min-width: 0; }
.pm-sk { display: inline-flex; align-items: center; min-height: 24px; padding: 0 .5rem; font-size: .74rem; font-weight: 700; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: help; white-space: nowrap; }
.pm-sk:hover, .pm-sk:focus-visible { border-color: var(--rw); color: var(--ink); }
.pm-sk.card { border-color: color-mix(in srgb, var(--gilt) 55%, var(--line)); background: color-mix(in srgb, var(--gilt) 9%, var(--surface)); }
.pm-none { font-size: var(--t-micro); color: var(--ink-3); align-self: center; }
button.pm-cards { min-height: 24px; height: 24px; padding: 0 .5rem; gap: .2rem; font-size: .72rem; border-radius: 999px; box-shadow: none; }
button.pm-cards .si { width: 12px; height: 12px; }

/* 소모품 두 칸 */
.pm-lo { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: .35rem; padding-top: .45rem; border-top: 1px dotted color-mix(in srgb, var(--rw) 35%, var(--line)); }
.pm-lo-k { display: inline-grid; place-items: center; width: 16px; color: var(--ink-3); }
.pm-lo-k > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pm-lo-k .si { width: 14px; height: 14px; }
.lo-sl { display: flex; align-items: center; gap: .4rem; min-width: 0; min-height: 44px; padding: .2rem .45rem .2rem .25rem; font-weight: 400; text-align: left; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-s); box-shadow: none; }
.lo-sl:hover:not(:disabled) { border-color: var(--gilt); background: color-mix(in srgb, var(--gilt) 8%, var(--surface)); }
.lo-sl.empty { border-style: dashed; background: transparent; color: var(--ink-3); }
.lo-art { position: relative; flex: none; display: grid; place-items: center; width: 34px; height: 34px; background: color-mix(in srgb, var(--surface-3) 60%, var(--surface)); border: 1px solid var(--line); border-radius: var(--r-s); }
.lo-sl.empty .lo-art { border-style: dashed; background: transparent; }
.lo-art > .si { width: 14px; height: 14px; }
.lo-n { position: absolute; right: -7px; bottom: -6px; min-width: 20px; height: 16px; padding: 0 .2rem; display: grid; place-items: center; font-size: .62rem; color: var(--st-ink); background: var(--st-brown); border-radius: 999px; box-shadow: 0 0 0 2px var(--surface); }
.lo-sl.short .lo-n { background: var(--st-red); }
.lo-sl.short { border-color: color-mix(in srgb, var(--rose) 55%, var(--line)); }
.lo-nm { min-width: 0; font-size: .76rem; line-height: 1.2; }
.lo-sl.short .lo-nm { color: var(--rose); }

/* 소모품 고르기 */
.lo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .4rem; max-height: min(48vh, 330px); overflow-y: auto; overscroll-behavior: contain; padding: 6px 2px 4px; scrollbar-width: thin; }
.lo-tile { --gc: var(--mint); position: relative; display: flex; flex-direction: column; align-items: center; gap: .12rem; min-width: 0; min-height: 0; padding: .35rem .3rem .3rem; white-space: normal; font-weight: 400; text-align: center; background: color-mix(in srgb, var(--gc) 4%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gc) 35%, var(--line)); border-top: 3px solid var(--gc); border-radius: var(--r-s); box-shadow: none; overflow: visible; }
.lo-tile:hover:not(:disabled) { background: color-mix(in srgb, var(--gc) 12%, var(--surface)); border-color: var(--gc); }
.lo-tile.cur { background: color-mix(in srgb, var(--gc) 15%, var(--surface)); box-shadow: 0 0 0 2px var(--gc), 0 0 10px color-mix(in srgb, var(--gc) 35%, transparent); }
.lo-tile.no { --gc: var(--line-2); background: var(--surface-2); cursor: not-allowed; }
.lo-tile.no > * { opacity: .55; }
.lo-tile.no .lo-tart { filter: grayscale(.85); }
.lo-tart { position: relative; display: grid; place-items: center; width: 42px; height: 42px; background: color-mix(in srgb, var(--gc) 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--gc) 35%, var(--line)); border-radius: var(--r-s); margin-bottom: 2px; }
.lo-on { position: absolute; right: -6px; top: -6px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: var(--gc); color: #fff8ec; box-shadow: 0 0 0 2px var(--surface); }
.lo-on .si { width: 11px; height: 11px; stroke-width: 3; }
.lo-tnm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%; min-height: 2.3em; font-size: .74rem; font-weight: 700; line-height: 1.15; overflow: hidden; overflow-wrap: anywhere; }
.lo-tft { display: flex; justify-content: space-between; gap: .2rem; width: 100%; padding-top: .15rem; font-size: .64rem; border-top: 1px dotted color-mix(in srgb, var(--gc) 35%, var(--line)); white-space: nowrap; }
.lo-tft .lo-hv { color: var(--ink-2); } .lo-tft .lo-rm { color: var(--mint); font-weight: 700; } .lo-tft .lo-x { color: var(--rose); }
.lo-none { grid-column: 1 / -1; text-align: center; }
.lo-foot { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .5rem; margin-top: .55rem; }
.lo-fk { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.lo-qty { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 240px; border: 1px solid var(--line-2); border-radius: var(--r-s); overflow: hidden; background: var(--surface); }
.lo-qty button { min-height: 40px; border: 0; border-radius: 0; box-shadow: none; background: transparent; color: var(--ink-2); font-family: var(--font-num); font-weight: 700; }
.lo-qty button + button { border-left: 1px solid var(--line); }
.lo-qty button.sel, .lo-qty button.sel:hover:not(:disabled) { background: var(--ink-2); color: var(--surface); }

/* ── 동료 목록 (자세히) ── */
.mclist { display: flex; flex-direction: column; gap: .5rem; margin-top: 1.1rem; }
.mc-bar { gap: .4rem; }
.mc-bar > select { min-height: 36px; }
.mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .55rem; }
.mc { display: flex; flex-direction: column; gap: .5rem; min-width: 0; border-top: 3px solid var(--line-2); }
.mc.in { border-top-color: var(--gilt); }
.mc-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .65rem; align-items: center; }
.mc-por { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--r-s); background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); }
.mc.in .mc-por { box-shadow: 0 0 0 2px var(--gilt); }
.mc-in { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); padding: 0 .4rem; font-size: .62rem; font-weight: 700; line-height: 1.45; color: #fff8ec; background: var(--gilt); border-radius: 999px; box-shadow: 0 0 0 2px var(--surface); white-space: nowrap; }
.mc-id { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.mc-nmrow { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.mc-nmrow h3 { margin: 0; font-size: 1.05rem; min-width: 0; }
.mc-nmrow .tag { flex: none; }
.mc-sub { display: flex; align-items: center; gap: .4rem; min-width: 0; font-size: .78rem; }
.mc-aff { display: flex; align-items: center; gap: .35rem; font-size: .74rem; }
.mc-aff .affh { margin: 0; }
.mc-pw { display: flex; flex-direction: column; align-items: flex-end; align-self: start; line-height: 1.1; }
.mc-pw span { font-size: .62rem; color: var(--ink-3); }
.mc-pw b { font-family: var(--font-num); font-size: 1.05rem; }
.mc-arch, .mc-bd { margin: 0; font-size: .78rem; }
.mc-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem; }
.mc-acts.love { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.mc-acts button { min-width: 0; padding: 0 .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-folds { display: flex; flex-direction: column; gap: .15rem; padding-top: .3rem; border-top: 1px dotted var(--line-2); }
.mc-folds summary { font-size: .84rem; }
.mc-etc { display: flex; flex-wrap: wrap; gap: .3rem; }
.mc-etc .mc-bye { margin-left: auto; }

/* ── 휴대폰 ── */
@media (max-width: 860px) {
  .pform.detail { grid-template-columns: minmax(0, 1fr); padding: .5rem; }
  .pform.detail .pf-side { position: static; padding: .5rem 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .35rem .6rem; }
  .pform.detail .pf-side > .af { grid-column: 1 / -1; grid-row: 2; flex-direction: row; }
  .pform.detail .pf-side > .af > .af-go { flex: 1 1 0; min-width: 0; white-space: nowrap; }
  .pform.detail .pf-side > .af > .af-seg { flex: 1.4 1 0; min-width: 0; }
  .pform.detail .af-seg button { min-height: var(--tap); }
  .pform .pf-pw { grid-template-columns: auto auto 1fr; }
  .pform .pf-pw > b { justify-self: start; }
  .pform .pf-pwf { grid-column: auto; justify-self: start; }
}
@media (max-width: 520px) {
  .pfb-forms button { min-height: 46px; padding: .2rem 0; }
  .pfb-fn { font-size: .72rem; letter-spacing: -.04em; }
  .pfb-glyph { width: 22px; height: 15px; }
  .pfb-field { grid-template-columns: 18px repeat(3, minmax(0, 1fr)); gap: .25rem; padding: .3rem; }
  .pfb-foe { font-size: .62rem; letter-spacing: 0; }
  .pfb-col { padding: .25rem .2rem; gap: .25rem; }
  .pfb-sl { min-height: 92px; padding: .3rem .1rem .25rem; }
  .pfb-por { width: 40px; height: 40px; }
  .pfb-nm { font-size: .78rem; }
  .pfb-hp .affh .si.afh { width: 9px; height: 9px; }
  .pfb-pw { display: none; }
  .pfb-save { flex-direction: column; align-items: stretch; }
  .pfb-sv-b { margin-left: 0; } .pfb-sv-b button { flex: 1; }
  .pm-grid, .mc-grid { grid-template-columns: minmax(0, 1fr); }
  .lo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pfp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mc-por { width: 56px; height: 56px; }
}

/* 올린 초상이 없는 동료: 직업 그림을 초상과 같은 틀에 (편성 줄 · 얼굴 모음) */
.af-face { display: grid; place-items: center; width: var(--sz); height: var(--sz); border-radius: var(--r-s); background: color-mix(in srgb, var(--surface-3) 55%, var(--surface)); box-shadow: 0 0 0 1px var(--line-2), 0 2px 4px rgba(40, 24, 10, .18); }
.ct-por:has(> .ic) { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-s); background: color-mix(in srgb, var(--surface-3) 55%, var(--surface)); box-shadow: 0 0 0 1px var(--line-2); }
.ctile.in .ct-por:has(> .ic) { box-shadow: 0 0 0 2px var(--gilt); }
.lo-tile, .lo-tile[aria-pressed="true"], .lo-tile:hover:not(:disabled) { color: var(--ink); }
.lo-tile[aria-pressed="true"] { background: color-mix(in srgb, var(--gc) 15%, var(--surface)); }
.pfb-eff.lead { background: color-mix(in srgb, var(--sky) 9%, var(--surface)); border-color: color-mix(in srgb, var(--sky) 35%, var(--line)); }
.pfb-eff.lead .si { color: var(--sky); }
/* 파티원이 볼 때(고칠 수 없음): 흐리게 하지 않고 보기만 */
.pfb-sl:disabled, .pfb-forms button:disabled { opacity: 1; cursor: default; filter: none; }
.pfb-forms button:disabled:not(.sel) { color: var(--ink-3); }
/* 동료 탭 맨 위 빠른 스위치 (연애 · NPC 이야기) */
.pq-sw { display: flex; justify-content: center; gap: .4rem; margin: -.2rem 0 .5rem; }
.pq-btn { display: inline-flex; align-items: center; gap: .35rem; min-height: 26px; padding: .1rem .3rem .1rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; box-shadow: none; white-space: nowrap; background: var(--surface); color: var(--ink-3); }
.pq-st { font-size: .64rem; letter-spacing: .06em; padding: .08rem .4rem; border-radius: 999px; background: var(--surface-3); color: var(--ink-3); }
.pq-btn.on { color: var(--ink); border-color: color-mix(in srgb, var(--rose) 55%, var(--line-2)); }
.pq-btn.on .pq-st { background: var(--rose); color: var(--surface); }
