/* 내 프로필 접기 + 출신·지역구 칩(js/profile-fold.js). 프로필은 밝은·어두운 화면 모두 어두운 판이라 글자는 on-dark 색 */
.profile .pf-tog { position: absolute; top: 2px; right: 0; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 4px 10px 4px 12px;
  border: 1px solid rgba(217, 166, 46, .5); border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--on-dark-mute); font: 700 12px 'Paperlogy', var(--body); cursor: pointer; }
/* 화살표: 펼친 채 '접기'면 위(∧), 접힌 채 '펼치기'면 아래(∨)(11/5 사장님 "화살표가 반대") */
.profile .pf-tog i { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(1px) rotate(-135deg); }
body.pf-fold .profile:not(.epi) .pf-tog i { transform: translateY(-2px) rotate(45deg); }
.profile .pf-tog:focus-visible { outline: 2px solid #D9A62E; outline-offset: 2px; }
@media (hover: hover) { .profile .pf-tog:hover { color: var(--on-dark); background: rgba(255, 255, 255, .1); } }

/* 출신·지역구 강점 칩 */
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.pf-chip { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; max-width: 100%; box-sizing: border-box; padding: 5px 10px; border-radius: 8px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(217, 166, 46, .35); color: var(--on-dark-mute); font: 500 12px/1.35 'Paperlogy', var(--body); text-align: left; }
.pf-chip b { color: var(--on-dark); font-weight: 800; }
.pf-chip small { font-size: 12px; color: inherit; word-break: keep-all; }
button.pf-chip { cursor: pointer; appearance: none; }
.pf-chip em { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-weight: 800; color: #F2C744; }
.pf-chip em .ui-i { width: 13px; height: 13px; align-self: center; }
button.pf-chip:focus-visible { outline: 2px solid #D9A62E; outline-offset: 2px; }
@media (hover: hover) { button.pf-chip:hover { background: rgba(255, 255, 255, .12); } }

/* 여생 화면의 프로필(.profile.epi)은 접지 않는다(Codex 11/4: 접은 채 여생으로 가면 재산 칸이 사라졌다). 접힌 모습: 얼굴·이름·나이·직함·당·정치력 + 인지도·지지율·체력·자금. 재임 중 꼬리표는 남긴다 */
body.pf-fold .profile:not(.epi) .pf-chips, body.pf-fold .profile:not(.epi) .line-chip, body.pf-fold .profile:not(.epi) .fam-chip, body.pf-fold .profile:not(.epi) .trait-chip,
body.pf-fold .profile:not(.epi) .party-block small, body.pf-fold .profile:not(.epi) .stats > :nth-child(3), body.pf-fold .profile:not(.epi) .stats > :nth-child(5), body.pf-fold .profile:not(.epi) .stat.fol,
body.pf-fold .profile:not(.epi) .titles > :not(.on-duty) { display: none; }
body.pf-fold .profile:not(.epi) .titles:not(:has(.on-duty)) { display: none; }
body.pf-fold .profile:not(.epi) .party-block { margin: 10px 0 8px; padding: 7px 12px; }
body.pf-fold .profile:not(.epi) .party-block .pb-ic { width: 22px; height: 22px; grid-row: auto; }
body.pf-fold .profile:not(.epi) .ovr { margin-bottom: 8px; }
body.pf-fold .profile:not(.epi) .titles { margin-top: 8px; }
@media (max-width: 759px) {
  body.pf-fold .profile:not(.epi) .stats { grid-template-columns: repeat(3, 1fr); }
  body.pf-fold .profile:not(.epi) .ovr b { font-size: 30px; }
  body.pf-fold .profile:not(.epi) .p-name { font-size: 24px; }
}
@media (prefers-reduced-motion: no-preference) { .profile .pf-tog i { transition: transform .18s ease-out; } }

/* ── 프로필 배치(11/5 사장님): 당은 이름 아래 작은 칩, 연설·정책·조직·미디어는 정치력 바로 아래로 올려 또렷하게, 정치자금·팔로워는 이름과 숫자를 붙여 칩으로 ──
   프로필 틀(js/game.js renderMain)은 그대로 두고(번역 틀이 통째로 바뀐다) 순서는 flex order로만 바꾼다. 여생 화면(.epi)은 예전 그대로 */
.profile:not(.epi) { display: flex; flex-direction: column; }
.profile:not(.epi) > * { order: 5; }
.profile:not(.epi) > .sticker { order: 0; align-self: flex-start; }
.profile:not(.epi) > .p-top { order: 1; }
.profile:not(.epi) > .party-block { display: none; }
.profile:not(.epi) > .ovr { order: 3; margin-top: 4px; }
.profile:not(.epi) > .attrs { order: 4; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(217, 166, 46, .35); }
.profile:not(.epi) > .stats { order: 5; }
.profile:not(.epi) > .titles { order: 6; }
.profile:not(.epi) > .pf-chips, .profile:not(.epi) > .line-chip, .profile:not(.epi) > .fam-chip, .profile:not(.epi) > .trait-chip { order: 2; }
.profile:not(.epi) > .pf-chips { margin-top: 10px; }
/* 당 칩: 이름 아래 한 줄 */
.pf-party { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 2px 9px 2px 6px; border-radius: 6px; background: var(--pc); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(242, 199, 68, .55); font: 800 12.5px/1.5 'Paperlogy', var(--head); max-width: 100%; }
.pf-party b { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-party .pf-pic { width: 16px; height: 16px; flex: none; }
body.noparty .pf-party { background: #3A3A3E; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
/* 능력치 넷: 이름은 밝게·굵게, 숫자는 금색으로 */
.profile:not(.epi) .attr > span { color: var(--on-dark); font-weight: 800; font-size: 13.5px; }
.profile:not(.epi) .attr b { color: #F2C744; font-size: 16px; }
.profile:not(.epi) .attr .swg { color: #F2C744; }
/* 정치자금·와글 팔로워: 이름 바로 옆에 숫자(양 끝으로 벌리지 않는다) */
.profile:not(.epi) .stat.money { justify-content: flex-start; justify-self: start; gap: 8px; width: fit-content; max-width: 100%; box-sizing: border-box; margin-top: 4px; padding: 3px 10px 4px;
  border-radius: 6px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(217, 166, 46, .3); }
.profile:not(.epi) .stat.money small { display: inline; }
/* 이름 칸은 최소 폭만 정하고 긴 이름(일본어 メディア 등)은 늘어나게(눈금과 겹치지 않게) */
.profile:not(.epi) .attr:not(.swd) { grid-template-columns: minmax(40px, max-content) 1fr 28px; }
.profile:not(.epi) .attr.swd { grid-template-columns: minmax(46px, max-content) auto 1fr; align-content: start; }   /* 옆 칸 설명이 짧아도 위에 붙인다(가운데로 내려와 줄이 어긋났다) */
/* 휴대폰 펼침: 능력치 칸이 좁아(360px에서 127px) 이름·눈금을 한 줄에 두면 겹친다 → 이름 위, 눈금 아래 */
@media (max-width: 759px) { .profile:not(.epi) .attr.swd { grid-template-columns: 1fr auto; grid-template-areas: "l n" "g g" "t t"; row-gap: 3px; } }
/* 접힌 휴대폰: 능력치 넷을 한 줄에 — 이름 위·눈금 아래, 설명은 뺀다 */
body.pf-fold .profile:not(.epi) .attrs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 8px; margin-bottom: 8px; padding-bottom: 8px; }
body.pf-fold .profile:not(.epi) .attr { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
body.pf-fold .profile:not(.epi) .attr > span { font-size: 13px; white-space: nowrap; }
body.pf-fold .profile:not(.epi) .attr .bar { width: 100%; }
body.pf-fold .profile:not(.epi) .attr b { font-size: 14px; }
body.pf-fold .profile:not(.epi) .attr .swg { gap: 2px; }
body.pf-fold .profile:not(.epi) .attr .swg i { width: 7px; height: 7px; border-width: 1.2px; }
body.pf-fold .profile:not(.epi) .attr .sw-t { display: none; }
