@charset "utf-8";
/*
	캐릭터 프로필(멤버란 → 캐릭터) — member/skin/viewer.poster.skin.php 의 모양. '캐릭터 포스터'.
	색은 아치 틀 토큰(css/arch.css 의 --a-*)을 따른다. 라이트 = 크림 종이 · 먹, 다크 = 숯빛 · 크림.
*/

.rc-profile .rc-arch-win { padding: 72px 40px 0; }   /* 위 72px 는 한마디 말풍선 자리 */
/* 포스터 판: 아치 창 전체(아치 꼭대기까지)를 반투명하게 한 겹 덮는다 — 아래 격자가 살짝 비친다 */
.rc-profile .rc-arch-win::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #1b1a18 55%, transparent);
  pointer-events: none;
}
html[data-theme="light"] .rc-profile .rc-arch-win::before { background: color-mix(in srgb, var(--a-paper) 58%, transparent); }

/* ---------------------------------------------- 공통 부품 */
.rc-profile .mk-text { color: var(--a-ink); font-size: 14px; line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
.rc-profile .mk-text p { margin: 0 0 .6em; }
/* 편집기 서식(굵게 · 기울임 · 밑줄 · 취소선)을 되살린다. 전역 초기화가 지우기 때문:
   .rc-arch * { font-weight: inherit } · default.css i, em { font-style: normal } · style.css * { text-decoration: none } */
.rc-profile .mk-text b,
.rc-profile .mk-text strong { font-weight: 700; }
.rc-profile .mk-text i,
.rc-profile .mk-text em { font-style: italic; }
.rc-profile .mk-text u { text-decoration: underline; }
.rc-profile .mk-text s,
.rc-profile .mk-text strike,
.rc-profile .mk-text del { text-decoration: line-through; }
.rc-profile .mk-empty { color: var(--a-sub); font-size: 13px; }

.rc-profile .mk-dl { display: grid; grid-template-columns: 92px 1fr; margin: 0 0 18px; font-size: 14px; }
.rc-profile .mk-dl dt,
.rc-profile .mk-dl dd { margin: 0; padding: 10px 4px; border-bottom: 1px solid color-mix(in srgb, var(--a-line) 70%, transparent); }
.rc-profile .mk-dl dt { color: var(--a-sub); }
.rc-profile .mk-dl dd { color: var(--a-ink); }

/* 성격: 가운데 제목 + 어두운 직사각형 칩에 금빛 글씨(사용자 그림) */
.rc-profile .mk-kwbox { margin: 4px 0 16px; text-align: center; }
.rc-profile .mk-kwbox-t { margin: 0 0 10px; color: var(--a-ink); font-size: 15px; font-weight: 700 !important; text-align: center; }
.rc-profile .mk-kw { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; }
.rc-profile .mk-kw span {
  display: inline-block;
  padding: 4px 13px 5px;
  background: #2b2a27;
  color: #d9c89c !important;
  font-size: 14px;
  font-weight: 600 !important;
  line-height: 1.3;
}
html[data-theme="dark"] .rc-profile .mk-kw span { background: #4a4336; color: #f0e2bc !important; }   /* 다크: 짙은 판 위에서 또렷하게 — 데운 카키 바탕 · 밝은 크림 글씨 */

/* 스탯: 이름 · 막대 · 값 */
.rc-profile .mk-stats { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.rc-profile .mk-stats li { display: grid; grid-template-columns: 48px 1fr 18px; align-items: center; gap: 10px; font-size: 12.5px; color: var(--a-sub); }
.rc-profile .mk-stats i { position: relative; height: 5px; background: color-mix(in srgb, var(--a-line) 70%, transparent); }
.rc-profile .mk-stats i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--a-ink); }
html[data-theme="dark"] .rc-profile .mk-stats i::after { background: var(--a-frame); }
.rc-profile .mk-stats b { color: var(--a-ink); font-weight: 700 !important; text-align: right; }

.rc-profile .is-none { display: grid; place-items: center; color: var(--a-sub); font-size: 12px; background: var(--a-tick); }

/* ============================================== 캐릭터 포스터 — 넓은 화면에서는 한 화면(한 판)에 다 들어온다.
   높이는 mock.php 스크립트가 화면 높이에 맞춰 준다(아래 값은 스크립트가 돌기 전 자리) */
.mk2 {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.22fr) minmax(0, 1.25fr);
  grid-template-rows: minmax(0, 1fr);   /* 줄 높이 = 포스터 높이(안의 글이 길어도 늘어나지 않게) */
  gap: 18px;
  width: min(1440px, 100% - 150px);   /* 오른쪽 아이콘이 튀어나올 자리 */
  height: calc(100vh - 170px);
  min-height: 560px;
  margin: 0 auto;
  padding: 32px 34px;
  box-sizing: border-box;
}

/* 왼쪽: 이름 · 기본값 · 수호알과 스탯 · 아래(단계 두상 + 되고 싶은 나 메모) */
.mk2-left { position: relative; z-index: 3; display: flex; flex-direction: column; justify-content: center; min-height: 0; }   /* 덩어리째 세로 가운데 — 화면 비율이 달라도 두상 · 메모가 스탯 바로 아래에 붙어 다닌다 */
.rc-profile .mk2-name {
  margin: 0 0 4px;
  font-family: var(--rc-font-story) !important;   /* 한마디 말풍선과 같은 바탕체(Gowun Batang) 굵게 */
  font-size: clamp(38px, 3.8vw, 54px);
  font-weight: 700 !important;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--a-ink);
  word-break: keep-all;
}
/* 가타카나 이름: 이름 바로 아래 붓글씨(Yuji Boku) 한 줄 — 흐리게 */
.rc-profile .mk2-kana {
  margin: 2px 0 14px;
  color: var(--a-frame) !important;
  font-family: "Yuji Boku", var(--rc-font-story) !important;
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.2;
  letter-spacing: .02em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  opacity: .55;
}
html[data-theme="light"] .rc-profile .mk2-kana { color: var(--a-gold) !important; opacity: .5; }
/* 한자 이름: 한 글자씩 오려 붙인 쪽지 — 카키 · 먹 · 크림을 번갈아, 조금씩 기울여서(Yusei Magic) */
.mk2-kanji { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 14px; }   /* 이름 위 */
.mk2-kanji i { width: 8px; }
.rc-profile .mk2-kanji span {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 32px;
  padding: 0 4px;
  box-sizing: border-box;
  background: var(--a-frame);
  color: #1d1c1b !important;
  font-family: "Yusei Magic", var(--rc-font-story) !important;
  font-size: 19px;
  line-height: 1;
  transform: rotate(-4deg);
}
.rc-profile .mk2-kanji span:nth-of-type(3n+2) { background: #2b2a27; color: #e3d4ab !important; transform: rotate(3deg) translateY(2px); }
.rc-profile .mk2-kanji span:nth-of-type(3n) { background: #f2ede0; transform: rotate(-1.5deg) translateY(-1px); }
.rc-profile .mk2-kanji span:nth-of-type(4n) { transform: rotate(5deg); }
html[data-theme="light"] .rc-profile .mk2-kanji span:nth-of-type(3n) { background: #fffdf8; outline: 1px solid var(--a-edge); }
html[data-theme="dark"] .rc-profile .mk2-kanji span:nth-of-type(3n+2) { background: #3b372e; }
/* 두 항목씩 한 줄: 이름 · 값 · 이름 · 값 */
.mk2-keys { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); gap: 8px 12px; margin: 0 0 22px; font-size: 14px; }   /* 둘째 칸 = 앞 값 중 가장 긴 것만큼 — 오른쪽 짝(키/체중 · 나이)이 앞 값 바로 뒤에 온다 */
.mk2-keys dt.is-2 { padding-left: 22px; }
.mk2-keys dt { color: var(--a-sub); white-space: nowrap; }
.mk2-keys dd { margin: 0; color: var(--a-ink); font-weight: 600 !important; white-space: nowrap; }
.mk2-keys dd.is-wide { grid-column: span 3; }

.mk2-stats { max-width: 270px; margin-bottom: 24px !important; }

/* 왼쪽 아래: 단계 두상 — 길쭉한 알약 칸 + 아래 단계 이름. 고른 단계만 또렷하게 */
.mk2-foot { position: relative; margin-top: 12px; }   /* 십자 반짝이가 스탯 줄에 붙지 않게 조금 띄운다 */
.mk2-eras { display: flex; align-items: flex-start; gap: 14px; }
.rc-profile .mk2-eras a { position: relative; display: grid; justify-items: center; gap: 10px; width: 64px; text-decoration: none !important; }
/* 지금 단계: 칸 위에 걸친 부드러운 십자 반짝이(금색 · 빛) */
.mk2-eras-pick { position: absolute; top: -27px; left: 50%; z-index: 2; width: 26px; height: 45px; fill: #d2bb84; translate: -50% 0; filter: drop-shadow(0 0 4px rgba(214, 190, 128, .8)) drop-shadow(0 0 10px rgba(214, 190, 128, .4)); animation: mk-pick-in .5s ease-out both; pointer-events: none; }
html[data-theme="light"] .mk2-eras-pick { fill: #b39558; filter: drop-shadow(0 0 3px rgba(203, 172, 102, .75)) drop-shadow(0 0 9px rgba(203, 172, 102, .35)); }
@keyframes mk-pick-in { from { opacity: 0; transform: translateY(-6px) scale(.8); } to { opacity: 1; transform: none; } }
.mk2-eras-thumb {
  position: relative;
  display: block;
  width: 64px;
  height: 118px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, #4a4740, #2e2c28);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, .35);
  filter: grayscale(.8) brightness(.72);
  transition: filter .2s;
}
html[data-theme="light"] .mk2-eras-thumb { background: linear-gradient(180deg, #f6f4ee 10%, #c9c5bb); box-shadow: inset 0 3px 6px rgba(90, 80, 60, .28); filter: grayscale(.8) opacity(.75); }
.mk2-eras-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.rc-profile .mk2-eras a:hover .mk2-eras-thumb,
.rc-profile .mk2-eras a.is-on .mk2-eras-thumb { filter: none; }
.rc-profile .mk2-eras em { color: var(--a-sub) !important; font-size: 12.5px; font-style: normal; font-weight: 500 !important; letter-spacing: .04em; opacity: .75; }
.rc-profile .mk2-eras a.is-on em { color: var(--a-ink) !important; font-weight: 700 !important; opacity: 1; }
@media (min-width: 861px) and (max-height: 780px) {   /* 낮은 화면: 두상 칸을 줄여 왼쪽이 포스터 안에 들어오게 */
  .mk2-eras-thumb { width: 54px; height: 92px; }
  .mk2-eras-pick { top: -18px; width: 18px; height: 31px; }
  .mk2-foot { margin-top: 8px; }
  .mk2-keys { margin-bottom: 16px !important; }
  .rc-profile .mk2-eras a { width: 54px; gap: 6px; }
  .mk2-stats { margin-bottom: 16px !important; }
  .mk2-kana { margin-bottom: 12px !important; }
}

/* 되고 싶은 나: 줄 공책 한 장에 아이 손글씨(Gaegu). 테이프로 붙였다 */
.rc-profile .mk2-memo {
  position: relative;
  z-index: 4;
  flex: none;
  width: min(270px, calc(100% - 136px));   /* 가로로 넉넉하게, 알 바로 옆에 붙인다 — 오른쪽 탭 판 끝보다 조금 더 나가도 된다(아이콘 줄은 그보다 아래) */
  align-self: center;
  padding: 18px 14px 12px 24px;
  box-sizing: border-box;
  background-color: #fbf7ea;
  background-image:
    linear-gradient(90deg, transparent 15px, rgba(214, 120, 120, .45) 15px 16px, transparent 16px),
    repeating-linear-gradient(180deg, transparent 0 25px, rgba(118, 138, 168, .32) 25px 26px);
  background-position: 0 0, 0 14px;
  color: #34384a;
  transform: rotate(2.4deg);
}
html[data-theme="light"] .rc-profile .mk2-memo { outline: 1px solid var(--a-edge); }
.rc-profile .mk2-memo::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 46px;
  height: 15px;
  background: rgba(242, 239, 230, .62);
  transform: translateX(-50%) rotate(-5deg);
}
html[data-theme="light"] .rc-profile .mk2-memo::before { background: rgba(203, 184, 142, .55); }
.rc-profile .mk2-memo-t { margin: 0; color: #9a7b45 !important; font-family: "Gaegu", var(--rc-font-story) !important; font-size: 15px; font-weight: 700 !important; line-height: 26px; letter-spacing: 0; }
.rc-profile .mk2-memo-x { margin: 0; color: #34384a !important; font-family: "Gaegu", var(--rc-font-story) !important; font-size: 20px; font-weight: 700 !important; line-height: 26px; letter-spacing: -.02em; word-break: keep-all; overflow-wrap: anywhere; }

/* 가운데: 전신(투명 여백을 재서 위아래를 꽉 채운다). 아래로 넘친 부분은 창 바닥에서 잘린다 — 그림을 누르면 원본 전체 */
.mk2-stand { position: relative; min-height: 0; margin: -12px 0 -32px; clip-path: inset(-300px -300px -1000px -300px); }   /* 아래로 넘친 전신은 창(.rc-arch-win, overflow hidden)의 바닥에서 잘린다 — 메뉴 줄 뒤 창 끝까지 보이고 페이지 스크롤은 생기지 않는다 */
.mk2-stand img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }

/* 전신 위치 · 크기 조정(캐릭터 주인만, 넓은 화면). 전신 칸 오른쪽 위(성격 탭 왼쪽)에 작은 알약, 조정 창은 그 아래로 열린다 */
.rc-profile .mk-bp { position: absolute; top: 6px; right: 6px; z-index: 4; width: max-content; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; opacity: .55; transition: opacity .2s; }
.rc-profile .mk2-stand:hover .mk-bp, .rc-profile .mk-bp:focus-within, .rc-profile .is-bp-editing .mk-bp { opacity: 1; }
.rc-profile .mk-bp button { font: 500 12px/1 var(--rc-font-sans, inherit); letter-spacing: 0; white-space: nowrap; cursor: pointer; }
.rc-profile .mk-bp-seg { display: inline-flex; padding: 2px; border: 1px solid var(--a-line); border-radius: 999px; background: rgba(255, 253, 247, .92); }
.rc-profile .mk-bp-seg button { padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--a-sub) !important; }
.rc-profile .mk-bp-seg button[aria-pressed="true"] { background: var(--a-frame); color: #1d1c1b !important; }
.rc-profile .mk-bp-edit, .rc-profile .mk-bp-actions button { padding: 6px 12px; border: 1px solid var(--a-line); border-radius: 999px; background: rgba(255, 253, 247, .92); color: var(--a-ink) !important; }
.rc-profile .mk-bp-edit:hover, .rc-profile .mk-bp-actions button:hover { border-color: var(--a-frame); }
.rc-profile .mk-bp-actions .mk-bp-save { background: var(--a-frame); border-color: var(--a-frame); color: #1d1c1b !important; }
.rc-profile .mk-bp-panel { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding: 10px 14px; border: 1px solid var(--a-line); border-radius: 14px; background: rgba(255, 253, 247, .94); box-shadow: 0 6px 18px rgba(40, 32, 20, .12); }
.rc-profile .mk-bp-panel[hidden], .rc-profile .mk-bp-edit[hidden] { display: none; }
.rc-profile .mk-bp-hint { max-width: 210px; margin: 0; color: var(--a-sub) !important; font-size: 12px; line-height: 1.45; text-align: right; word-break: keep-all; }
.rc-profile .mk-bp-size-wrap { white-space: nowrap; display: flex; align-items: center; gap: 8px; color: var(--a-sub) !important; font-size: 12px; }
.rc-profile .mk-bp-size { width: 140px; accent-color: var(--a-frame); }
.rc-profile .mk-bp-actions { display: flex; gap: 4px; }
.rc-profile .mk-bp-msg { min-height: 1em; margin: 0; padding: 0 8px; border-radius: 6px; color: var(--a-ink) !important; font-size: 12px; text-align: right; white-space: nowrap; }
.rc-profile .mk-bp-msg:not(:empty) { background: rgba(255, 253, 247, .92); }
.rc-profile .mk-bp-msg.is-error { color: #b4533c !important; }
html[data-theme="dark"] .rc-profile .mk-bp-seg, html[data-theme="dark"] .rc-profile .mk-bp-edit, html[data-theme="dark"] .rc-profile .mk-bp-actions button:not(.mk-bp-save),
html[data-theme="dark"] .rc-profile .mk-bp-panel, html[data-theme="dark"] .rc-profile .mk-bp-msg:not(:empty) { background: rgba(29, 28, 27, .9); }
html[data-theme="dark"] .rc-profile .mk-bp-edit, html[data-theme="dark"] .rc-profile .mk-bp-actions button:not(.mk-bp-save), html[data-theme="dark"] .rc-profile .mk-bp-msg { color: #f0e2bc !important; }
html[data-theme="dark"] .rc-profile .mk-bp-msg.is-error { color: #e59a86 !important; }
/* 조정 중: 전신 칸을 양옆 칸(메모 등) 위로 올리고, 끌기 · 휠에 바로 따라오게 점선 테두리 */
.rc-profile .mk2-stand.is-bp-editing { z-index: 6; }
.rc-profile .is-bp-editing img.mk-fig { cursor: move; touch-action: none; outline: 1px dashed var(--a-frame); outline-offset: 2px; z-index: 2; }

/* 한마디: 전신 머리 위 말풍선(포스터 위쪽 여백으로 빠져나온다). 휜 꼬리 + 천천히 떠 있는 움직임 */
.rc-profile .mk2-bubble {
  position: absolute;
  bottom: calc(100% + 24px);
  left: 50%;
  z-index: 3;
  width: max-content;
  max-width: min(460px, 150%);
  margin: 0;
  padding: 11px 26px 12px;
  border-radius: 22px;
  background: #f6f1e4;
  color: #2a2622 !important;
  font-family: var(--rc-font-story) !important;
  font-size: 17px;
  font-weight: 700 !important;
  line-height: 1.45;
  letter-spacing: -.01em;
  text-align: center;
  word-break: keep-all;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .28));
  translate: -50% 0;
  animation: mk-bob 4.2s ease-in-out infinite;
}
.mk2-bubble-tail { position: absolute; top: calc(100% - 1px); left: 46%; width: 26px; height: 18px; fill: #f6f1e4; }
/* 라이트 모드는 다크 모드 창 색(먹)의 말풍선에 크림 글씨 */
html[data-theme="light"] .rc-profile .mk2-bubble { background: #222; color: #f2ede0 !important; filter: drop-shadow(0 4px 12px rgba(40, 32, 20, .25)); }
html[data-theme="light"] .mk2-bubble-tail { fill: #222; }
@keyframes mk-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* 개인 브금 켜고 끄기: 오른쪽 아이콘 판 아래 가운데에 16px 띄운 작은 동그라미(같은 카키) */
.rc-profile .mk2-bgm { position: absolute; top: calc(100% + 16px); left: 50%; z-index: 4; transform: translateX(-50%); font-family: var(--rc-font-sans) !important; text-align: left; }
.rc-profile .mk2-bgm ul { display: flex; margin: 0; padding: 0; list-style: none; }
.rc-profile .mk2-bgm a {   /* 라데부와 같은 작은 동그라미: 꺼져 있으면 ▶, 켜져 있으면 ■ */
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--a-frame);
  color: #1d1c1b !important;
  font-size: 10px;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(30, 24, 14, .2);
  transition: background-color .18s, color .18s;
}
.rc-profile .mk2-bgm a:hover { background: #1d1c1b; color: #f2ede0 !important; }

/* 뒤로가기: 넓은 화면은 아치 창 왼쪽 위 틀(카키) 자리에 먹색 동그라미 */
.mk2-backbar { position: relative; z-index: 5; height: 0; }
.rc-profile .mk2-back {
  position: absolute;
  top: 22px;
  left: 30px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #1d1c1b;
  color: #f2ede0 !important;
  box-shadow: 0 4px 14px rgba(30, 24, 14, .25);
  transition: transform .18s, background-color .18s;
}
.rc-profile .mk2-back:hover { transform: translateX(-2px); background: #2e2b26; }
.rc-profile .mk2-back .rc-ico { width: 22px; height: 22px; stroke-width: 1.8; }
.rc-profile .mk2-back:focus-visible { outline: 2px solid var(--a-frame); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .rc-profile .mk2-bubble { animation: none; } }
/* 넓은 화면: 말풍선은 전신 칸 왼쪽 위(이름 쪽으로 조금 넘어가게), 꼬리는 오른쪽 아래로 전신을 가리킨다(사용자 시안) */
@media (min-width: 861px) {
  .rc-profile .mk2-bubble { left: auto; right: 80%; bottom: calc(100% - 20px); translate: 0 0; }   /* 오른쪽 끝을 전신 칸 왼쪽 20% 자리에, 아치 곡선 안쪽까지 내려서(잘리지 않게) — 한마디가 길면 왼쪽으로 늘어난다 */
  .mk2-bubble-tail { left: auto; right: 14%; transform: scaleX(-1); }
}

/* 오른쪽: 위쪽 탭(종이 끝선 위에 선 인덱스 탭 — 고른 탭만 위로 솟는다) + 넘기는 프로필 쪽 */
.mk2-right { position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 0; }
/* 오른쪽 위: 수호알(손으로 그린 테 + 연한 빛) · 되고 싶은 나 쪽지 — 아래 탭 · 글판은 남은 높이 */
.mk2-top { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 16px; flex: none; margin: -30px 0 12px; padding: 0 0 0 6px; }   /* 수호알 · 쪽지를 30px 위로, 탭 · 글판도 따라 올라온다 */
.mk2-egg { position: relative; display: grid; place-items: center; flex: none; width: 150px; height: 150px; margin: 0; }
.mk2-egg-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: #d2bb84; filter: drop-shadow(0 0 4px rgba(214, 190, 128, .75)) drop-shadow(0 0 12px rgba(214, 190, 128, .4)); }   /* 테마 금색 테 + 빛 */
html[data-theme="light"] .mk2-egg-ring { color: #b39558; filter: drop-shadow(0 0 4px rgba(203, 172, 102, .7)) drop-shadow(0 0 12px rgba(203, 172, 102, .38)); }
.rc-profile .mk2-egg-img {
  position: relative;
  display: block;
  width: 78px;
  height: 98px;
  margin-top: 4px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;   /* 위가 좁고 아래가 넉넉한 알 모양 */
  object-fit: cover;
  background: var(--a-tick);
  box-shadow: 0 0 0 1px rgba(236, 230, 214, .38), 0 0 16px 4px rgba(217, 200, 156, .32);
}
html[data-theme="light"] .rc-profile .mk2-egg-img { box-shadow: 0 0 0 1px rgba(173, 155, 116, .55), 0 0 16px 4px rgba(203, 184, 142, .55); }
/* 테 안 포지션 로고(임시 아이콘은 테와 같은 금색 선 · 글로우, 그림이면 그대로) */
.mk2-egg-logo { position: relative; display: grid; place-items: center; width: 64px; height: 64px; color: #d2bb84; filter: drop-shadow(0 0 4px rgba(214, 190, 128, .7)) drop-shadow(0 0 10px rgba(214, 190, 128, .3)); }
html[data-theme="light"] .mk2-egg-logo { color: #b39558; filter: drop-shadow(0 0 4px rgba(203, 172, 102, .6)); }
.mk2-egg-logo .rc-ico { width: 100%; height: 100%; stroke-width: 1.4; }
.rc-profile img.mk2-egg-logo { width: 84px; height: 84px; object-fit: contain; filter: none; }
.mk2-tabs { position: relative; display: flex; align-items: flex-end; gap: 4px; min-height: 46px; margin: 0 0 20px; }
.mk2-tabs::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--a-frame), color-mix(in srgb, var(--a-frame) 35%, transparent) 65%, transparent);
}
.rc-profile .mk2-tab {
  flex: 1 1 0;
  padding: 10px 6px 9px;
  border: 0;
  border-radius: 6px 6px 0 0;
  background: color-mix(in srgb, var(--a-ink) 7%, transparent);
  color: var(--a-sub);
  font-size: 14px;
  font-weight: 600 !important;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background-color .25s, color .25s, padding .25s, box-shadow .25s;
}
.rc-profile .mk2-tab:hover { background: color-mix(in srgb, var(--a-frame) 28%, transparent); color: var(--a-ink); }
.rc-profile .mk2-tab.is-on,
.rc-profile .mk2-tab.is-on:hover { padding-top: 16px; background: var(--a-frame); color: #1d1c1b; font-weight: 700 !important; box-shadow: 0 -3px 12px color-mix(in srgb, var(--a-frame) 35%, transparent); }
/* 본인만 보이는 탭: 자물쇠 + 먹색(고르면 다른 탭처럼 카키) */
.rc-profile .mk2-tab.is-secret { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: 1.3 1 0; white-space: nowrap; background: #2b2a27; color: #d9c89c; }
.rc-profile .mk2-tab.is-secret .rc-ico { width: 14px; height: 14px; }
html[data-theme="dark"] .rc-profile .mk2-tab.is-secret { background: #3b372e; color: #e3d4ab; }
.rc-profile .mk2-tab.is-secret.is-on,
html[data-theme="dark"] .rc-profile .mk2-tab.is-secret.is-on { background: var(--a-frame); color: #1d1c1b; }
.rc-profile .mk2-tab:focus-visible { outline: 2px solid var(--a-frame); outline-offset: 2px; }
.mk2-pages { position: relative; flex: 1 1 auto; min-height: 0; }
/* 프로필 글 아래에 판을 깔아 글이 또렷하게(탭 바로 아래에 붙는다). 다크는 짙은 판, 라이트는 크림 종이 판 */
html[data-theme="dark"] .mk2-pages,
html[data-theme="light"] .mk2-pages { margin-top: -20px; padding: 18px 6px 14px 16px; border-radius: 0 0 12px 12px; background: color-mix(in srgb, #161513 82%, transparent); }
/* 라이트: 같은 자리에 크림 종이 판(격자가 거의 안 비치게) */
html[data-theme="light"] .mk2-pages { background: color-mix(in srgb, #fffdf8 90%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--a-line) 70%, transparent); }
.mk2-page { display: none; height: 100%; overflow: auto; padding-right: 12px; box-sizing: border-box; }
.mk2-page.is-on { display: block; animation: mk-pull .3s ease both; }
@keyframes mk-pull { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.mk2-right .mk-text { font-size: 15px; }
/* 수호알 탭: 알 모양 그림 */
.mk2-egg-big { display: flex; justify-content: center; margin: 6px 0 18px; }
.rc-profile .mk2-egg-big-img {
  display: block;
  width: 116px;
  height: 146px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  object-fit: cover;
  background: var(--a-tick);
  box-shadow: 0 0 0 1px rgba(236, 230, 214, .38), 0 0 22px 5px rgba(217, 200, 156, .3);
}
html[data-theme="light"] .rc-profile .mk2-egg-big-img { box-shadow: 0 0 0 1px rgba(173, 155, 116, .55), 0 0 22px 5px rgba(203, 184, 142, .55); }
.rc-profile .mk2-head { margin: 4px 0 8px; font-family: var(--rc-font-story) !important; font-size: 24px; font-weight: 700 !important; letter-spacing: -.01em; color: var(--a-gold); }   /* 이름 · 한마디와 같은 바탕체 */
html[data-theme="dark"] .rc-profile .mk2-head { color: var(--a-frame); }
.rc-profile .mk2-appear { margin-bottom: 26px; }   /* 인적사항 탭: 외관 → 성격 */
.mk2-right .mk-kwbox { margin-top: 4px; text-align: left; }   /* 성격 제목 · 키워드도 다른 탭 제목처럼 왼쪽 정렬 */
.mk2-right .mk-kw { justify-content: flex-start; }
.rc-profile .mk2-right .mk-kwbox-t { margin: 4px 0 10px; text-align: left; font-family: var(--rc-font-story) !important; font-size: 24px; font-weight: 700 !important; letter-spacing: -.01em; color: var(--a-gold); }
html[data-theme="dark"] .rc-profile .mk2-right .mk-kwbox-t { color: var(--a-frame); }

/* 오른쪽 가장자리: 소지품 · 관계 — 아래 메뉴 줄과 같은 카키 판에 먹 아이콘. 마우스를 대면 먹 칸에 크림 아이콘 */
.mk2-icos {
  position: absolute;
  top: 164px;                 /* 탭 줄 높이에 맞춘다: 포스터 안쪽 여백 32 - 30 + 수호알 · 쪽지 줄 150 + 12 */
  left: calc(100% + 14px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  border-radius: 14px;
  background: var(--a-frame);
}
.rc-profile .mk2-ico {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 50px;
  padding: 9px 0 7px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: #1d1c1b;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.rc-profile .mk2-ico .rc-ico { width: 21px; height: 21px; stroke-width: 1.7; }
.rc-profile .mk2-ico em { font-size: 10.5px; font-style: normal; font-weight: 600 !important; letter-spacing: .02em; }
.rc-profile .mk2-ico:hover,
.rc-profile .mk2-ico:focus-visible { background: #222; color: #ece6d6; }
html[data-theme="light"] .rc-profile .mk2-ico:hover,
html[data-theme="light"] .rc-profile .mk2-ico:focus-visible { background: #232323; color: #f2ede0; }

/* ---------------------------------------------- 업적 창: 분류(필수 · 이벤트 · 특수)별로 제목 / 내용 */
.mk-achv-sec + .mk-achv-sec { margin-top: 18px; }
.rc-profile .mk-achv-type { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--a-gold) !important; font-size: 14px; font-weight: 700 !important; }
html[data-theme="dark"] .rc-profile .mk-achv-type { color: var(--a-frame) !important; }
.mk-achv-type span { padding: 1px 8px; border-radius: 999px; background: var(--a-tick); color: var(--a-sub); font-size: 11.5px; font-weight: 600 !important; }
.mk-achv { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mk-achv li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 2px 14px; padding: 12px 16px 12px 12px; border-radius: 8px; background: var(--a-tick); }
/* 분류 별(필수 · 이벤트 · 특수): 그림을 mask 로 써서 색은 테마를 따른다 — 라이트는 먹, 다크는 카키 */
.mk-achv .ach-mark { grid-column: 1; grid-row: 1 / span 2; width: 40px; height: 40px; background: #2b2a27; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
html[data-theme="dark"] .mk-achv .ach-mark { background: var(--a-frame); }
.mk-achv .ach-mark.is-required { --m: url("../img/achieve/required.svg"); }
.mk-achv .ach-mark.is-event { --m: url("../img/achieve/event.svg"); }
.mk-achv .ach-mark.is-special { --m: url("../img/achieve/special.svg"); }
.mk-achv img.ach-mark { background: none !important; -webkit-mask: none; mask: none; object-fit: contain; }   /* 올린 그림(다크 모드 별 색이 뒤에 깔리지 않게) */
.rc-profile .mk-achv b { grid-column: 2; }
.rc-profile .mk-achv b { color: var(--a-ink); font-size: 14.5px; font-weight: 700 !important; }
.rc-profile .mk-achv p { grid-column: 2 / -1; margin: 0; color: var(--a-sub); font-size: 13.5px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.mk-achv time { grid-column: 3; grid-row: 1; color: var(--a-sub); font-size: 11.5px; white-space: nowrap; }

/* ---------------------------------------------- 소지품 · 관계 창 */
html.mk-pop-lock { overflow: hidden; }
.mk-pop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 19, 17, .6);
}
.mk-pop[hidden] { display: none; }
.mk-pop-panel {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(80vh, 720px);
  overflow: hidden;
  border-radius: 14px;
  background: var(--a-win);
  color: var(--a-ink);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  animation: mk-pop-in .2s ease-out;
}
html[data-theme="light"] .mk-pop-panel { background: var(--a-paper); }
@keyframes mk-pop-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.mk-pop-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 22px; border-bottom: 1px solid var(--a-line); }
.rc-profile .mk-pop-head h2 { margin: 0; font-family: var(--rc-font-display) !important; font-size: 22px; color: var(--a-gold); }
html[data-theme="dark"] .rc-profile .mk-pop-head h2 { color: var(--a-frame); }
.mk-pop-money { margin: 0 0 0 auto; color: var(--a-sub); font-size: 13px; }
.mk-pop-x { width: 34px; height: 34px; margin-left: auto; border: 0; border-radius: 50%; background: none; color: var(--a-ink); font-size: 24px; line-height: 1; cursor: pointer; }
.mk-pop-money + .mk-pop-x { margin-left: 0; }
.mk-pop-x:hover { background: var(--a-tick); }
.mk-pop-body { overflow: auto; padding: 16px 22px 22px; }

.mk-inven { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.mk-inven button {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  padding: 12px 6px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--a-tick);
  color: var(--a-ink);
  cursor: pointer;
}
.mk-inven button:hover,
.mk-inven button.is-on { border-color: var(--a-frame); }
.mk-inven-img { display: grid; place-items: center; width: 56px; height: 56px; }
.mk-inven-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mk-inven-name { display: -webkit-box; overflow: hidden; font-size: 12.5px; line-height: 1.35; text-align: center; word-break: keep-all; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mk-inven-cnt { position: absolute; top: 6px; right: 8px; color: var(--a-sub); font-size: 11.5px; font-weight: 600 !important; }
.mk-inven-cnt::before { content: "×"; }
.rc-profile .mk-inven-desc { margin: 0; padding: 12px 14px; border-radius: 8px; background: var(--a-tick); color: var(--a-sub); font-size: 13.5px; line-height: 1.7; }
.mk-inven-desc b { display: block; margin-bottom: 2px; color: var(--a-ink); font-weight: 700 !important; }

.mk-rel-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, var(--a-line) 70%, transparent); }
.mk-rel-row:last-child { border-bottom: 0; }
.mk-rel-row img,
.mk-rel-noimg { flex: none; width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; background: var(--a-tick); }
.mk-rel-row p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--a-ink); word-break: keep-all; overflow-wrap: anywhere; }
.mk-rel-row b { display: block; font-weight: 700 !important; }

/* ---------------------------------------------- 그림 원본 보기 */
.rc-profile .mk-zoom { cursor: zoom-in; }
.mk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 20px;
  background: rgba(20, 19, 17, .88);
  cursor: zoom-out;
}
.mk-lightbox[hidden] { display: none; }
.mk-lightbox img { max-width: 94vw; max-height: calc(100vh - 90px); object-fit: contain; }
.mk-lightbox-open { color: #e8dcc0 !important; font-size: 13px; text-decoration: underline !important; text-underline-offset: 3px; cursor: pointer; }

/* ---------------------------------------------- 개인 브금 켜고 끄기(이름 아래, 한자 쪽지 옆 줄) */

/* ---------------------------------------------- 관계 창: 단계 구분선 · 상대 두상(누르면 그 프로필) · 로그 주소 */
.rc-profile .mk-rel-era { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; color: var(--a-sub); font-size: 12px; }
.rc-profile .mk-rel-era:first-child { margin-top: 0; }
.rc-profile .mk-rel-era::before,
.rc-profile .mk-rel-era::after { content: ""; flex: 1; height: 1px; background: var(--a-line); }
.rc-profile .mk-rel-ava { flex: none; display: block; border-radius: 50%; }
.rc-profile .mk-rel-txt { min-width: 0; }
.rc-profile .mk-rel-txt b a { color: var(--a-ink) !important; text-decoration: none !important; }
.rc-profile .mk-rel-txt b a:hover { text-decoration: underline !important; text-underline-offset: 3px; }
.rc-profile .mk-rel-txt small { color: var(--a-sub); font-size: 12px; font-weight: 400 !important; }
.rc-profile .mk-rel-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px !important; }
.rc-profile .mk-rel-links a { padding: 2px 10px; border: 1px solid var(--a-line); border-radius: 999px; color: var(--a-sub) !important; font-size: 12px; text-decoration: none !important; }
.rc-profile .mk-rel-links a:hover { border-color: var(--a-frame); color: var(--a-ink) !important; }

/* ---------------------------------------------- 타이틀 창 */
.rc-profile .mk-titles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.rc-profile .mk-titles img { max-width: 100%; height: auto; }

/* ---------------------------------------------- 좁은 화면: 한 판 대신 아래로 쌓는다.
   단계는 그냥 버튼, 되고 싶은 나는 글줄, 소지품 · 관계는 전신 바로 아래 가로 버튼 두 개 */
@media (max-width: 860px) {
  .rc-profile .mk-bp { display: none; }   /* 좁은 화면은 늘 자동 맞춤 */
  .rc-profile .rc-arch-win { padding: 40px 14px 90px; }
  .mk2 { display: flex; flex-direction: column; gap: 20px; width: 100%; height: auto !important; min-height: 0; padding: 24px 18px; }
  .rc-profile .mk2-name { font-size: 40px; }
  .mk2-keys { font-size: 13.5px; gap: 8px 10px; }
  .mk2-foot { display: flex; flex-direction: column; gap: 16px; min-height: 0; margin-top: 4px; }

  /* 단계: 두상 대신 글자 버튼 */
  .mk2-eras { gap: 6px; }
  .rc-profile .mk2-eras a { width: auto; margin: 0; }
  .mk2-eras-thumb { display: none; }
  .mk2-eras-pick { display: none; }
  .rc-profile .mk2-eras em { opacity: 1; }
  /* 수호알 · 되고 싶은 나: 알은 조금 작게, 쪽지는 옆에 글줄로 */
  .mk2-top { margin: 0 0 18px; justify-content: flex-start; gap: 14px; padding: 0; }
  .mk2-egg { width: 118px; height: 118px; }
  .rc-profile .mk2-egg-img { width: 62px; height: 78px; }
  .mk2-egg-logo { width: 52px; height: 52px; }
  .rc-profile img.mk2-egg-logo { width: 68px; height: 68px; }
  .rc-profile .mk2-top .mk2-memo { flex: 1 1 auto; width: auto; margin-right: 0; }
  .rc-profile .mk2-eras em,
  .rc-profile .mk2-eras a.is-on em {
    position: static;
    display: block;
    padding: 6px 14px;
    border: 1px solid var(--a-line);
    border-radius: 999px;
    background: none;
    color: var(--a-sub) !important;
    font-size: 13px;
    font-weight: 500 !important;
  }
  .rc-profile .mk2-eras a.is-on em { border-color: var(--a-frame); background: var(--a-frame); color: #1d1c1b !important; font-weight: 700 !important; }

  /* 되고 싶은 나: 공책 쪽지 대신 — 기운 카키 이름표 + 아이 손글씨에 형광펜 */
  .rc-profile .mk2-memo { position: static; display: block; width: auto; padding: 4px 0 0; background: none; outline: 0 !important; transform: none; }   /* block: 형광펜 글줄(inline)이 두 줄이 돼도 줄마다 칠해지게(flex 면 한 덩어리가 된다) */
  .rc-profile .mk2-memo::before { display: none; }
  .rc-profile .mk2-memo-t {
    display: table;   /* 글자만큼 폭 + 혼자 한 줄 */
    margin-bottom: 10px;
    padding: 4px 10px 3px;
    background: var(--a-frame);
    color: #1d1c1b !important;
    font-family: var(--rc-font-story) !important;
    font-size: 12.5px;
    font-weight: 700 !important;
    line-height: 1.4;
    transform: rotate(-3deg);
  }
  .rc-profile .mk2-memo-x {
    display: inline;
    padding: 0 4px;
    background: linear-gradient(transparent 50%, color-mix(in srgb, var(--a-frame) 40%, transparent) 50%, color-mix(in srgb, var(--a-frame) 40%, transparent) 84%, transparent 84%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    color: var(--a-ink) !important;
    font-family: "Gaegu", var(--rc-font-story) !important;
    font-size: 23px;
    font-weight: 700 !important;
    line-height: 1.5;
    letter-spacing: -.01em;
  }

  .mk2-stand { height: 60vh; margin: 70px 0 0; clip-path: none; }   /* 위 70px 는 말풍선 자리 */
  .rc-profile .mk2-back { top: 8px; left: 10px; width: 38px; height: 38px; }   /* 폰: 아치 창 왼쪽 위 모서리(한자 쪽지보다 위) */
  .rc-profile .mk2-back .rc-ico { width: 19px; height: 19px; }

  /* 소지품 · 관계: 전신 바로 아래에 가로로 반씩 */
  .mk2-icos { position: static; order: 3; flex-direction: row; gap: 4px; margin-top: -8px; padding: 4px; border-radius: 12px; }
  .rc-profile .mk2-ico { display: flex; flex: 1 1 0; justify-content: center; align-items: center; gap: 8px; width: auto; padding: 10px 0; }
  .rc-profile .mk2-ico em { font-size: 13.5px; }
  .rc-profile .mk2-bgm { position: static; align-self: center; margin: 0 6px 0 4px; transform: none; }   /* 좁은 PC 창: 아이콘 줄 오른쪽 끝 */

  .mk2-right { order: 4; }
  .rc-profile .mk2-tab { padding: 9px 4px 8px; font-size: 13px; letter-spacing: 0; white-space: nowrap; }
  .rc-profile .mk2-tab.is-on, .rc-profile .mk2-tab.is-on:hover { padding-top: 13px; }
  .rc-profile .mk2-tab.is-secret { flex: 1.5 1 0; gap: 3px; overflow: hidden; text-overflow: ellipsis; }
  .mk2-pages { flex: none; }
  .mk2-page { height: auto; overflow: visible; padding-right: 0; }
}
