/* =========================================================
 * 인기아이돌 멤버로 합류한 썰 푼다 (maknae.html, body class="theme-maknae")
 * 시안: 26. 역하렘/역하렘.png (폭 602 = 화면 402px의 1.5배)
 * 결과 카드 이미지는 js/maknae.js의 drawCard에서 그려요 (색·크기는 그 위 CARD).
 * ========================================================= */
/* 핑크퐁 아기상어체 Bold (원본: 26. 역하렘 폴더 TTF, 한글 전체 + 영문만 남겨서 줄임) */
@font-face { font-family: 'PinkfongBabyShark'; src: url('../fonts/pinkfong-bold.woff2') format('woff2'); font-weight: 400; font-display: swap; }

.theme-maknae {
  --c-point: #8a4dff;
  --c-bg: #ffffff;
  --c-footer-line: #d9d9d9;
  --mk-grad: linear-gradient(180deg, #b357ff 0%, #8c55fe 100%);
  --mk-ss: 'PinkfongBabyShark', 'Presentation', sans-serif;
}
.theme-maknae #app { background: #fff; }
.theme-maknae .screen-main { background: #fdfcff; }
.theme-maknae .top-bar { background: transparent; border-bottom-color: #d9d9d9; }
.theme-maknae .mk-footer { margin-top: auto; border-top-color: #d9d9d9; }
.theme-maknae .field:focus { border-color: var(--c-point); }

/* 알약 버튼 (시안: 높이 60, 좌우 21) */
.mk-pill {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 60px; border: 0; border-radius: 30px;
  background: var(--mk-grad); color: #fff;
  font-size: 17px; font-weight: 600;
  transition: transform .12s ease;
}
.mk-pill:active { transform: scale(.98); }
.mk-pill:disabled { background: #d9d9d9; color: #8a8a8a; cursor: default; transform: none; }
.mk-pill-line { background: #fff; color: var(--c-point); border: 1px solid var(--c-point); }

/* ---------- 1. 메인 ---------- */
.mk-stage { display: flex; flex-direction: column; align-items: center; padding: 45px 21px 44px; text-align: center; }
.mk-badge { margin: 0; padding: 6px 15px; border-radius: 14px; background: #e5d9ff; color: var(--c-point); font-size: 13px; line-height: 16px; }
.mk-char { width: 261px; height: auto; margin-top: 37px; }
.mk-title { margin: 22px 0 0; font-family: var(--mk-ss); font-weight: 400; font-size: 53.5px; line-height: 58px; letter-spacing: 0; color: #151515; white-space: nowrap; }
.mk-title em { font-style: normal; color: var(--c-point); }
@media (max-width: 370px) { .mk-title { font-size: 46px; line-height: 50px; } }
.mk-start { margin-top: 36px; }
.mk-main-sub { margin: 13px 0 0; font-size: 14px; color: #151515; }

/* ---------- 2~4. 입력 ---------- */
.mk-body { flex: 1; padding: 0 19px 32px; }
.mk-h { margin: 44px 0 0; font-family: var(--ff-hand); font-weight: 400; font-size: 26px; line-height: 1.3; letter-spacing: -.01em; }
.mk-sub { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: #151515; }
.mk-label { display: block; margin: 30px 0 10px; font-size: 15px; font-weight: 600; }
.mk-body .field { height: 52px; border-radius: 8px; }
.mk-time-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.mk-time-row span { font-size: 15px; font-weight: 600; }
.mk-gender { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.mk-gbtn { height: 46px; border: 1px solid #d9d9d9; border-radius: 6px; background: #fff; font-size: 14px; }
.mk-gbtn[aria-checked="true"] { border-color: var(--c-point); color: var(--c-point); background: #f6f1ff; font-weight: 600; }
.mk-bottom-btn { margin-top: auto; }
.theme-maknae .screen-input .mk-body,
.theme-maknae .screen-group .mk-body,
.theme-maknae .screen-register .mk-body { display: flex; flex-direction: column; }
.theme-maknae .mk-body > .mk-bottom-btn { margin-top: auto; }
.theme-maknae .mk-body > :nth-last-child(2) { margin-bottom: 40px; }
.theme-maknae .mk-bottom-btns { margin-top: auto; padding-top: 40px; }
.mk-bottom-btns { display: flex; flex-direction: column; gap: 12px; }

/* 그룹 검색 */
.mk-search { position: relative; margin-top: 28px; }
.mk-search .field { padding-right: 48px; }
.mk-search img { position: absolute; right: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); pointer-events: none; }
.mk-search input::-webkit-search-cancel-button { display: none; }
.mk-results { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mk-result-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 15px 16px; border: 1px solid #d9d9d9; border-radius: 8px; background: #fff; text-align: left; }
.mk-result-btn:active { border-color: var(--c-point); background: #f6f1ff; }
.mk-result-name { font-size: 16px; font-weight: 600; }
.mk-result-meta { font-size: 12px; color: #757575; white-space: nowrap; }
.mk-empty { margin: 14px 0 0; text-align: center; font-size: 14px; color: #757575; }
.mk-reg-ask { margin: 34px 0 0; text-align: center; font-size: 15px; }
.mk-link { border: 0; background: none; padding: 0; color: var(--c-point); font-size: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.mk-picked { margin-top: 28px; padding: 20px 18px; border: 1px solid var(--c-point); border-radius: 8px; text-align: center; background: #fbf9ff; }
.mk-picked-label { margin: 0; font-size: 12px; font-weight: 600; color: var(--c-point); }
.mk-picked-name { margin: 6px 0 0; font-family: var(--mk-ss); font-size: 40px; line-height: 1.2; word-break: break-all; }
.mk-picked-members { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: #555; }
.mk-change { margin-top: 12px; font-size: 14px; }

/* 그룹 등록 */
.mk-member-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 140px) 24px; gap: 8px; align-items: center; margin-bottom: 8px; }
.mk-member-row .field { height: 39px; padding: 0 15px; font-size: 16px; border-radius: 6px; }
.mk-member-del { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 4px; background: #f1ebff; color: var(--c-point); font-size: 14px; font-weight: 600; line-height: 1; }
.mk-add { width: 100%; height: 40px; margin-top: 10px; border: 1px dashed var(--c-point); border-radius: 6px; background: #fff; color: var(--c-point); font-size: 15px; font-weight: 600; }

/* ---------- 5. 로딩 ---------- */
.mk-loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 60px; }
.mk-loading img { width: 292px; height: auto; }
.mk-loading img.is-waddle { transform-origin: 50% 92%; animation: mk-waddle 1.1s ease-in-out infinite; }   /* 합류하는 중: 뒤뚱뒤뚱 */
.mk-loading img.is-jump { transform-origin: 50% 100%; animation: mk-jump .6s ease-out both; }                /* 합류 완료: 폴짝 */
@keyframes mk-jump {
  0%   { transform: translateY(0) scale(1.06, .92); }
  35%  { transform: translateY(-42px) scale(.96, 1.05); }
  70%  { transform: translateY(0) scale(1.05, .94); }
  100% { transform: translateY(0) scale(1, 1); }
}
@media (prefers-reduced-motion: reduce) { .mk-loading img.is-waddle, .mk-loading img.is-jump { animation: none; } }
.mk-loading-text { margin: 22px 0 0; font-size: 17px; font-weight: 500; }

/* ---------- 6. 결과 ---------- */
.mk-card-wrap { padding: 30px 20px 0; }
.theme-maknae .result-card { aspect-ratio: 1080 / 1500; background: #fdfcff; border-radius: 0; }
.theme-maknae .result-card.is-ready { aspect-ratio: auto; background: none; }
.mk-save { display: block; margin: 23px auto 0; width: 233px; height: 35px; border: 0; border-radius: 18px; background: #333; color: #fff; font-size: 13px; font-weight: 600; }
.mk-detail { margin-top: 43px; padding: 36px 20px 22px; background: #faf9fe; }
.mk-detail-title { margin: 0 0 18px; font-family: var(--mk-ss); font-weight: 400; font-size: 21px; color: var(--c-point); }
.mk-d-item { margin-bottom: 10px; padding: 17px 16px 18px; background: #fff; }
.mk-d-head { display: flex; align-items: baseline; gap: 9px; }
.mk-d-name { font-size: 17px; font-weight: 700; }
.mk-d-rel { font-size: 12px; color: #8b8b8b; }
.mk-d-text { margin: 10px 0 0; font-size: 13px; line-height: 1.75; color: #2a2a2a; }
.mk-result-btns { display: flex; flex-direction: column; gap: 10px; padding: 0 25px; margin-top: 0; }
.mk-rbtn { display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; border: 1px solid var(--c-point); border-radius: 7px; background: #fff; color: #151515; font-size: 15px; font-weight: 700; text-decoration: none; }
.mk-rbtn-fill { border: 0; background: var(--c-point); color: #fff; }
.mk-rbtn:active { transform: scale(.98); }
.mk-notice { margin: 18px 20px 28px; text-align: center; font-size: 12px; color: #757575; }
.theme-maknae .mk-body > * { flex-shrink: 0; }
.theme-maknae .screen-loading { background: #fff; }

/* 메인 물음표 실루엣: 뒤뚱뒤뚱 걷기 (좌우로 기우뚱 + 살짝 통통) */
.screen-main .mk-char { transform-origin: 50% 92%; animation: mk-waddle 1.1s ease-in-out infinite; }
@keyframes mk-waddle {
  0%   { transform: rotate(-5deg) translateY(0); }
  25%  { transform: rotate(0deg)  translateY(-7px); }
  50%  { transform: rotate(5deg)  translateY(0); }
  75%  { transform: rotate(0deg)  translateY(-7px); }
  100% { transform: rotate(-5deg) translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .screen-main .mk-char { animation: none; } }

/* 등록할 때 비슷한 그룹 안내 */
.mk-similar { margin-top: 20px; padding: 18px 16px; border-radius: 10px; background: #f6f1ff; }
.mk-similar-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--c-point); }
.mk-similar-sub { margin: 6px 0 0; font-size: 13px; color: #555; }
.mk-similar .mk-result-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mk-similar-members { font-size: 12px; font-weight: 400; color: #757575; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-similar-force { display: block; width: 100%; margin-top: 12px; padding: 8px; border: 0; background: none; color: #757575; font-size: 14px; text-decoration: underline; }
