/* My Types — 피그마 4차 Final 값 그대로(색, 그라데이션, 반경, 그림자, 서체 크기). 새 테마 없음. */
:root {
  --pink: #FF327E; --pink2: #EC387B; --pink-5: rgba(255,50,126,.05); --pink-10: rgba(255,50,126,.10); --pink-tint: #FFEAF2; --pink-bg: #FFF5F9; --pink-bg2: #FFF9FB;
  --ink: #222222; --ink2: #666666; --ink3: #999999; --line: #DDDDDD; --gray5: #EEEEEE; --bg2: #F5F5F6; --lav: #F2F3FB; --lav2: #E6E7F7; --black: #000;
  --purple: #9149EC; --blue: #7CB1FF; --red: #FF4242;
  --kiss: #EE7592; --marry: #9F7BCE; --kill: #787C86;
  --ring-kiss: #FF327E; --ring-marry: #9149EC; --ring-kill: #999999;
  --grad-card: linear-gradient(161deg, #F2829D 0%, #704299 100%);
  --sh-btn: 0 0 12px rgba(205,145,206,.7);
  --sh-card: 0 0 48px rgba(97,37,73,.5);
  --sh-soft: 0 0 24px rgba(0,0,0,.25);
  --f-ko: "Apple SD Gothic Neo", "AppleSDGothicNeo", "Pretendard Variable", Pretendard, "Noto Sans KR", system-ui, sans-serif;
  --f-en: Figtree, "Apple SD Gothic Neo", "Pretendard Variable", Pretendard, "Noto Sans KR", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --tabh: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: #fff; color: var(--ink); font-family: var(--f-ko); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.en { font-family: var(--f-en); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

#app { max-width: 430px; margin: 0 auto; min-height: 100dvh; position: relative; background: #fff; }
@media (min-width: 600px) { body { background: #f3f3f5; } #app { box-shadow: 0 0 0 1px #eee; } }
.screen { min-height: 100dvh; display: flex; flex-direction: column; padding-top: var(--safe-t); }
.screen.has-tab { padding-bottom: calc(var(--tabh) + var(--safe-b)); }
.pad { padding-left: 24px; padding-right: 24px; }
.grow { flex: 1 1 auto; }
.center { text-align: center; }
.row { display: flex; align-items: center; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; }

/* 상단 바 */
.topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; position: relative; flex: 0 0 auto; }
.topbar .ttl { position: absolute; left: 50%; transform: translateX(-50%); font-size: 17px; font-weight: 700; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 22px; position: relative; }
.iconbtn img { width: 24px; height: auto; }
.iconbtn .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 4px; background: var(--pink); }
.keychip { height: 32px; min-width: 59px; padding: 0 12px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-en); font-weight: 500; font-size: 15px; color: #000; }
.keychip .k { font-size: 13px; }

/* 버튼(피그마 327x54, r27, 17 Bold) */
.btn { display: flex; align-items: center; justify-content: center; flex-direction: column; width: 100%; min-height: 54px; border-radius: 27px; font-size: 17px; font-weight: 700; letter-spacing: 0; padding: 6px 16px; line-height: 1.25; transition: transform .1s, opacity .15s; }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--pink); color: #fff; box-shadow: var(--sh-btn); }
.btn.outline { background: #fff; color: var(--pink); box-shadow: inset 0 0 0 1px var(--pink); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.btn.gray { background: var(--ink3); color: #fff; }
.btn[disabled], .btn.is-disabled { opacity: .45; box-shadow: none; }
.btn.outline[disabled], .btn.outline.is-disabled { box-shadow: inset 0 0 0 1px var(--pink); }
.btn.outline[disabled] { opacity: .45; }
.btn small, .btn .sub { font-size: 12px; font-weight: 400; opacity: .95; }
.btns { display: flex; flex-direction: column; gap: 12px; padding: 12px 24px calc(16px + var(--safe-b)); }
.has-tab .btns { padding-bottom: 16px; }
.pillbtn { height: 37px; padding: 0 18px; border-radius: 18.5px; color: var(--pink); box-shadow: inset 0 0 0 1px var(--pink); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; background: #fff; min-width: 120px; }
.link { color: var(--ink2); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; padding: 12px; min-height: 44px; display: inline-flex; align-items: center; }

/* 큰 제목 */
.h1 { font-size: 29px; line-height: 38px; font-weight: 700; margin: 0; letter-spacing: 0; }
.h1.en { letter-spacing: -.5px; }
.display { font-family: var(--f-en); font-weight: 600; font-size: 46px; line-height: 55px; letter-spacing: -1px; margin: 0; text-transform: uppercase; }
.sub { color: var(--ink2); font-size: 14px; line-height: 20px; }
.cap { color: var(--ink3); font-size: 12px; line-height: 17px; letter-spacing: -.3px; }

/* 진행 점(피그마 7x4 r2, 간격 4) */
.progress { padding: 0 24px; }
.dots { display: flex; gap: 4px; height: 4px; margin-top: 12px; }
.dots i { flex: 1 1 0; height: 4px; border-radius: 2px; background: var(--lav2); }
.dots i.on { background: var(--pink); }
.prog-row { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.prog-num { font-family: var(--f-en); font-weight: 500; font-size: 13px; color: var(--pink); }

/* 게임 */
.game-title { text-align: center; padding: 0 24px; }
.game-title .h1 { font-size: clamp(22px, 7.4vw, 29px); line-height: 1.31; }
.roles { display: flex; justify-content: center; gap: 8px; padding: 14px 16px 10px; }
.rolechip { height: 44px; min-width: 96px; padding: 0 14px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--f-en); font-weight: 600; font-size: 15px; color: var(--ink2); background: #fff; box-shadow: inset 0 0 0 1px var(--line); position: relative; }
.rolechip .em { font-size: 16px; }
.rolechip.done { color: #fff; box-shadow: none; }
.rolechip.done.kiss { background: var(--kiss); } .rolechip.done.marry { background: var(--marry); } .rolechip.done.kill { background: var(--kill); }
.rolechip.cur { color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.rolechip.cur::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 6px; height: 6px; border-radius: 3px; background: var(--pink); transform: translateX(-50%); }
.rolechip.done .x { font-size: 12px; opacity: .9; margin-left: 2px; }
.stage { position: relative; margin: 0 auto; width: calc(2 * var(--cw) + 10px); height: calc(2 * var(--ch) + 10px); }
.pcard { position: absolute; width: var(--cw); height: var(--ch); border-radius: 12px; overflow: hidden; background: var(--pink-bg2); box-shadow: 0 1px 0 rgba(0,0,0,.02); transition: transform .18s ease; }
.pcard:active { transform: scale(.98); }
.pcard img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.pcard .cut { position: absolute; inset: 0; opacity: 0; transition: opacity .15s; }
.pcard .lbl { position: absolute; left: 16px; bottom: 14px; color: #fff; font-family: var(--f-en); font-weight: 600; font-size: 24px; letter-spacing: -.5px; display: flex; align-items: center; gap: 4px; text-shadow: 0 1px 2px rgba(0,0,0,.12); opacity: 0; }
.pcard.r-kiss { background: var(--kiss); } .pcard.r-marry { background: var(--marry); } .pcard.r-kill { background: var(--kill); }
.pcard[class*="r-"] > img.photo { opacity: 0; }
.pcard[class*="r-"] .cut, .pcard[class*="r-"] .lbl { opacity: 1; }
.pcard .name { display: none; position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.35); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 10px; font-weight: 500; backdrop-filter: blur(4px); }
.pcard .undo { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 14px; background: rgba(255,255,255,.9); display: none; align-items: center; justify-content: center; font-size: 14px; color: var(--ink); }
.pcard[class*="r-"] .undo { display: flex; }
.pos-a { left: calc(var(--cw) + 10px); top: 0; } .pos-b { left: 0; top: calc((var(--ch) + 10px) / 2); } .pos-c { left: calc(var(--cw) + 10px); top: calc(var(--ch) + 10px); }
.hint { text-align: center; font-size: 13px; color: var(--ink2); min-height: 20px; padding: 8px 24px 0; }
.skeleton { background: linear-gradient(90deg, #f2f2f4 25%, #fafafa 50%, #f2f2f4 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* 홈(Main 6) */
.home-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 0 24px; height: 56px; }
.home-title { padding: 8px 24px 0; }
.trio-prev { --cw: calc((min(100vw, 430px) - 56px) / 2); --ch: calc(var(--cw) * 1.425); margin-top: 18px; }
.countdown { font-family: var(--f-en); font-weight: 600; font-size: 34px; letter-spacing: -.5px; }
.notice { margin: 12px 20px 0; padding: 11px 14px; border-radius: 8px; background: var(--lav); font-size: 12px; line-height: 17px; letter-spacing: -.5px; color: var(--ink2); display: flex; gap: 8px; align-items: flex-start; }
.notice b { color: var(--pink2); font-family: var(--f-en); font-weight: 700; font-size: 11px; letter-spacing: 0; margin-top: 1px; }
.card-row { margin: 10px 20px 0; padding: 14px 16px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); display: flex; align-items: center; gap: 12px; min-height: 60px; }
.card-row .t { font-size: 15px; font-weight: 600; } .card-row .s { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.card-row .go { margin-left: auto; color: var(--pink); font-size: 14px; font-weight: 700; }

/* 탭 바(피그마 아이콘) */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 430px; height: calc(var(--tabh) + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; display: flex; border-radius: 16px 16px 0 0; box-shadow: 0 0 8px rgba(0,0,0,.2); z-index: 30; }
.tabbar a { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 44px; }
.tabbar img { height: 34px; width: auto; }
.tabbar .badge { position: absolute; top: 8px; left: calc(50% + 4px); min-width: 22px; height: 16px; padding: 0 5px; border-radius: 8px; background: var(--pink); color: #fff; font-family: var(--f-en); font-weight: 600; font-size: 11px; display: flex; align-items: center; justify-content: center; }

/* 바텀시트/다이얼로그(Message 14~16) */
.dim { position: fixed; inset: 0; background: rgba(0,0,0,.2); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 430px; background: #fff; border-radius: 20px 20px 0 0; padding: 36px 24px calc(20px + var(--safe-b)); text-align: center; animation: up .2s ease; max-height: 92dvh; overflow: auto; }
.sheet .ico { font-size: 44px; line-height: 1; margin-bottom: 18px; }
.sheet h3 { font-size: 20px; line-height: 28px; font-weight: 700; margin: 0 0 10px; }
.sheet p { color: var(--ink2); font-size: 14px; line-height: 20px; margin: 0; }
.sheet .btns { padding: 26px 0 0; }
.sheet .avs { display: flex; justify-content: center; margin: 18px 0 0; }
.sheet .avs img { width: 48px; height: 48px; border-radius: 24px; border: 4px solid #fff; margin-left: -12px; object-fit: cover; }
.sheet .avs img:first-child { margin-left: 0; }
.sheet .opt { text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray5); min-height: 52px; font-size: 15px; }
.sheet .opt small { display: block; color: var(--ink3); font-size: 12px; margin-top: 2px; }
@keyframes up { from { transform: translateY(30px); opacity: .6; } } @keyframes fade { from { opacity: 0; } }
.switch { width: 50px; height: 30px; border-radius: 15px; background: var(--line); position: relative; flex: 0 0 auto; transition: background .15s; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.switch[aria-checked="true"] { background: var(--pink); } .switch[aria-checked="true"]::after { left: 23px; }
.check { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 14px; line-height: 20px; padding: 10px 0; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--pink); margin: 0; flex: 0 0 auto; }

.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); background: rgba(34,34,34,.92); color: #fff; padding: 10px 16px; border-radius: 20px; font-size: 14px; z-index: 80; max-width: 88vw; text-align: center; animation: fade .15s; }
.banner-demo { display: inline-flex; align-items: center; gap: 4px; background: #222; color: #fff; font-family: var(--f-en); font-weight: 700; font-size: 11px; padding: 2px 8px; border-radius: 10px; letter-spacing: .3px; }
.tag-ai { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 9px; background: var(--lav); color: var(--ink2); font-family: var(--f-en); font-size: 11px; font-weight: 700; }

/* 온보딩(Set up 24~30) */
.ob-title { padding: 40px 24px 0; text-align: center; }
.ob-title .sub { margin-top: 8px; }
.choice { width: 100%; min-height: 54px; border-radius: 27px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-family: var(--f-en); font-size: 17px; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 6px; }
.choice[aria-pressed="true"] { color: var(--pink2); box-shadow: inset 0 0 0 1px var(--pink2); }
.choices { display: flex; flex-direction: column; gap: 12px; padding: 40px 24px 0; }
.field { width: 100%; height: 46px; border-radius: 4px; background: var(--lav); border: 0; padding: 0 16px; font-size: 18px; color: var(--ink); }
.field::placeholder { color: #C9CBD8; }
.fields { padding: 32px 24px 0; display: flex; flex-direction: column; gap: 10px; }
.err { color: var(--red); font-size: 13px; min-height: 18px; padding: 6px 24px 0; }
.codebox { display: flex; gap: 8px; justify-content: center; padding: 32px 24px 0; }
.codebox input { width: 100%; max-width: 220px; height: 58px; text-align: center; letter-spacing: 12px; font-size: 26px; font-family: var(--f-en); border-radius: 6px; background: var(--lav); border: 0; }
.logo { width: 86px; margin: 0 auto; }
.landing-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 24px 0; }
.landing-hero .display { font-size: 36px; line-height: 42px; text-align: center; }
.terms { text-align: center; font-family: var(--f-en); font-size: 11px; line-height: 16px; color: var(--ink2); padding: 0 24px calc(14px + var(--safe-b)); }

/* 타입 카드(More 37) */
.type-head { padding: 22px 24px 0; display: flex; justify-content: space-between; align-items: flex-start; }
.type-head .display { font-size: clamp(34px, 11vw, 46px); line-height: 1.2; }
.fan { position: relative; height: calc(var(--tw) * 1.43 + 24px); margin-top: 16px; overflow: hidden; touch-action: pan-y; }
.fanwrap { --tw: min(74.7vw, 280px); }
.fan .bg1, .fan .bg2 { position: absolute; top: 18px; width: var(--tw); height: calc(var(--tw) * 1.43); border-radius: 16px; }
.fan .bg1 { left: calc(50% - var(--tw) * 1.5 + 2px); transform: rotate(-11.47deg); background: #EE75BE; }
.fan .bg2 { left: calc(50% + var(--tw) * .5 - 2px); transform: rotate(11.47deg); background: #EE7575; }
.tcard { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: var(--tw); height: calc(var(--tw) * 1.43); border-radius: 20px; overflow: hidden; background: var(--grad-card); box-shadow: var(--sh-card); transition: transform .25s ease, opacity .25s; }
.tcard.kiss { background: linear-gradient(161deg, #F2829D 0%, #704299 100%); }
.tcard.marry { background: linear-gradient(161deg, #B597E0 0%, #5B3C8F 100%); }
.tcard.kill { background: linear-gradient(161deg, #A3A7B0 0%, #4F535C 100%); }
.tcard img.cut { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; }
.tcard .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 16px 16px; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 100%); color: rgba(255,255,255,.92); font-size: 12px; line-height: 17px; text-align: center; }
.tcard .meta .nm { font-family: var(--f-en); font-weight: 600; font-size: 21px; line-height: 28px; color: #fff; }
.tcard .meta .ln { margin-top: 4px; }
.tcard .badge-src { position: absolute; left: 14px; top: 14px; }
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 0 0; }
.carousel-nav .dotsm { display: flex; gap: 6px; } .carousel-nav .dotsm i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); } .carousel-nav .dotsm i.on { background: var(--pink); width: 18px; }
.carousel-nav button { width: 44px; height: 44px; border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); font-size: 18px; color: var(--ink2); }
.summary { text-align: center; padding: 12px 28px 0; font-size: 14px; line-height: 21px; color: var(--ink2); }
.summary b { color: var(--ink); font-weight: 700; }

/* 메시지함(Message 18) */
.mlist { padding-top: 4px; }
.mrow { position: relative; overflow: hidden; }
.mrow .inner { display: flex; align-items: center; gap: 14px; padding: 10px 20px; min-height: 84px; background: #fff; transition: transform .2s; position: relative; z-index: 1; }
.mrow.hl .inner { background: var(--pink-5); }
.mrow .act { position: absolute; right: 0; top: 0; bottom: 0; width: 74px; background: var(--red); display: flex; align-items: center; justify-content: center; }
.mrow .act img { width: 24px; filter: invert(1) brightness(2); }
.av { width: 64px; height: 64px; border-radius: 32px; position: relative; flex: 0 0 auto; }
.av img { width: 64px; height: 64px; border-radius: 32px; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); background: var(--bg2); }
.av .rb { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 11px; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.rb.kiss { background: #FFD7E2; } .rb.marry { background: #E5D9F7; } .rb.kill { background: #DFE1E5; }
.mrow .nm { font-family: var(--f-en); font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.mrow .nm .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.newpill { height: 15px; padding: 0 5px; border-radius: 7.5px; box-shadow: inset 0 0 0 1px var(--pink); color: var(--pink); font-family: var(--f-en); font-weight: 600; font-size: 11px; display: inline-flex; align-items: center; }
.ago { font-family: var(--f-en); font-weight: 500; font-size: 13px; color: var(--ink3); letter-spacing: -.2px; white-space: nowrap; }
.pv { font-family: var(--f-ko); font-size: 14px; color: var(--ink2); letter-spacing: -.2px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--pink); color: #fff; font-family: var(--f-en); font-weight: 600; font-size: 12px; display: flex; align-items: center; justify-content: center; padding: 0 6px; flex: 0 0 auto; }
.lockpill { margin-left: auto; flex: 0 0 auto; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--lav); font-size: 12px; color: var(--ink2); display: inline-flex; align-items: center; gap: 4px; }
.sec-title { font-family: var(--f-en); font-weight: 600; font-size: 15px; color: #000; padding: 22px 20px 6px; }
.mrow.expired .inner { opacity: .45; }
.empty { text-align: center; padding: 60px 30px; color: var(--ink2); font-size: 14px; line-height: 21px; }
.empty .btn { margin-top: 18px; }

/* 채팅(Message 17) */
.chat-head { height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 8px; position: sticky; top: 0; background: #fff; z-index: 5; }
.chat-head .back { position: absolute; left: 8px; top: 18px; }
.chat-head .menu { position: absolute; right: 8px; top: 18px; }
.chat-head .av30 { width: 34px; height: 34px; border-radius: 17px; padding: 2px; box-shadow: inset 0 0 0 1.5px var(--pink); }
.chat-head .av30 img { width: 30px; height: 30px; border-radius: 15px; object-fit: cover; }
.chat-head .nm { font-family: var(--f-en); font-weight: 500; font-size: 14px; color: var(--ink2); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.lvl { font-family: var(--f-en); font-weight: 700; font-size: 11px; color: var(--pink); }
.msgs { flex: 1; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.pill-sys { align-self: center; height: 20px; padding: 0 10px; border-radius: 10px; background: var(--lav); font-size: 11px; color: var(--ink2); display: inline-flex; align-items: center; margin: 6px 0; }
.bub { max-width: 78%; padding: 12px 18px; border-radius: 22px; font-size: 15px; line-height: 21px; white-space: pre-wrap; word-break: break-word; }
.bub.char { align-self: flex-start; background: var(--pink-10); }
.bub.user { align-self: flex-end; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.bub.fail { opacity: .8; box-shadow: inset 0 0 0 1px var(--red); }
.bub .typing { display: inline-flex; gap: 4px; } .bub .typing i { width: 6px; height: 6px; border-radius: 3px; background: var(--pink); opacity: .4; animation: ty 1s infinite; } .bub .typing i:nth-child(2) { animation-delay: .15s; } .bub .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ty { 50% { opacity: 1; } }
.msg-meta { font-size: 12px; color: var(--ink3); align-self: flex-start; display: flex; gap: 8px; align-items: center; }
.msg-meta button { color: var(--pink); font-weight: 700; min-height: 32px; }
.composer { position: sticky; bottom: 0; background: #fff; padding: 8px 16px calc(10px + var(--safe-b)); display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid #f4f4f4; }
.composer textarea { flex: 1; min-height: 44px; max-height: 120px; border-radius: 22px; border: 0; box-shadow: inset 0 0 0 1px var(--line); padding: 11px 18px; font-size: 15px; line-height: 22px; resize: none; background: #fff; }
.composer textarea::placeholder { color: #BDBDBD; }
.sendbtn { width: 44px; height: 44px; border-radius: 22px; background: var(--pink); color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 18px; }
.sendbtn[disabled] { background: var(--line); }
.sendbtn.stop { background: var(--ink); }
.chat-banner { margin: 6px 16px 0; padding: 10px 14px; border-radius: 12px; background: var(--pink-bg); font-size: 13px; color: var(--ink2); display: flex; align-items: center; gap: 10px; }
.chat-banner button { margin-left: auto; color: var(--pink); font-weight: 700; min-height: 36px; white-space: nowrap; }
.closed-box { padding: 16px 20px calc(16px + var(--safe-b)); text-align: center; border-top: 1px solid #f2f2f2; }

/* 프로필(Profile) */
.profile { position: fixed; inset: 0; max-width: 430px; margin: 0 auto; background: #000; z-index: 40; overflow-y: auto; }
.profile .ph { position: relative; min-height: 100dvh; }
.profile .ph img { width: 100%; height: 100dvh; object-fit: cover; object-position: 50% 25%; }
.profile .grad { position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: linear-gradient(180deg, rgba(217,217,217,0) 0%, #000 100%); }
.profile .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 20px calc(24px + var(--safe-b)); color: #EEE; }
.profile .nm { font-family: var(--f-en); font-weight: 600; font-size: 21px; line-height: 32px; color: #fff; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile .em { width: 24px; height: 24px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.profile p { font-size: 14px; line-height: 22px; letter-spacing: -.3px; margin: 8px 0 0; }
.profile .like { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.12); font-size: 14px; line-height: 20px; }
.profile .like button { margin-top: 8px; color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 36px; }
.profile .close { position: fixed; top: calc(12px + var(--safe-t)); right: max(8px, calc(50vw - 215px + 8px)); z-index: 41; }
.profile .close img { filter: invert(1); }

/* 카드함(More 01 - A) */
.me-top { display: flex; flex-direction: column; align-items: center; padding: 8px 24px 0; }
.me-av { width: 128px; height: 128px; border-radius: 64px; background: var(--grad-card); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--f-en); font-weight: 600; font-size: 48px; overflow: hidden; }
.me-av img { width: 100%; height: 100%; object-fit: cover; }
.me-name { font-family: var(--f-en); font-weight: 600; font-size: 20px; margin-top: 14px; }
.me-btns { display: flex; gap: 10px; margin-top: 14px; }
.tabs { display: flex; margin-top: 26px; border-bottom: 1px solid var(--line); padding: 0 24px; }
.tabs button { flex: 1; height: 44px; font-family: var(--f-en); font-weight: 600; font-size: 14px; color: var(--ink3); position: relative; text-transform: uppercase; }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--pink); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding-bottom: 96px; }
.grid .slot { aspect-ratio: 1; background: var(--lav); position: relative; overflow: hidden; }
.grid .slot .n { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--f-en); font-weight: 600; font-size: 28px; color: #fff; opacity: .9; }
.grid .slot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.synth-fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabh) + var(--safe-b) + 12px); width: calc(min(100vw, 430px) - 48px); z-index: 20; }
.matches { padding: 16px 20px 110px; display: flex; flex-direction: column; gap: 12px; }
.match-row { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.match-row .th { width: 56px; height: 56px; border-radius: 10px; background: var(--lav); object-fit: cover; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: var(--ink3); font-size: 11px; }

/* 매칭(More 33, 38) */
.drop { margin: 24px auto 0; width: min(74.7vw, 280px); aspect-ratio: 280/400; border-radius: 20px; border: 1.5px dashed var(--pink); background: var(--pink-bg2); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.drop .plus { font-size: 54px; color: var(--pink); font-weight: 200; }
.drop img { width: 100%; height: 100%; object-fit: cover; }
.rings { display: flex; justify-content: center; gap: 30px; margin-top: 18px; }
.ring { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ring svg { width: 60px; height: 60px; }
.ring .v { font-family: var(--f-en); font-weight: 600; font-size: 18px; }

/* 리스트(설정 More 28, 상점 More 36, 알림 More 35) */
.list { padding: 8px 0; }
.li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 0 20px; font-size: 15px; width: 100%; text-align: left; }
.li .v { color: var(--ink3); font-size: 14px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.li .v img { width: 8px; }
.li.danger { color: var(--red); }
.li-sec { font-weight: 700; font-size: 15px; padding: 24px 20px 6px; }
.packs { padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 9px; }
.pack { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 18px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); background: #fff; width: 100%; font-size: 15px; }
.pack.rec { background: var(--pink-tint); box-shadow: none; outline: 1px dashed var(--pink); outline-offset: -1px; }
.pack .bd { height: 16px; padding: 0 6px; border-radius: 8px; color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; margin-left: 6px; }
.pack .bd.pop { background: var(--purple); } .pack .bd.rec { background: var(--pink); }
.pack .pr { color: var(--pink); font-family: var(--f-en); font-weight: 600; font-size: 14px; }
.nrow { display: flex; gap: 14px; align-items: center; padding: 10px 20px; min-height: 76px; }
.nrow img { width: 56px; height: 56px; border-radius: 28px; flex: 0 0 auto; }
.nrow .tx { font-size: 15px; line-height: 21px; font-weight: 500; }
.nrow .tx .ago { margin-left: 6px; }
.mrow .nm .ago { margin-left: 2px; }
.nrow.read { opacity: .45; }
.optin { margin: 12px 20px; padding: 14px 16px; border-radius: 12px; background: var(--pink-bg); font-size: 14px; line-height: 20px; }
.optin .row { justify-content: space-between; gap: 12px; margin-top: 10px; }

/* 비교 */
.cmp-hero { text-align: center; padding: 18px 24px 0; }
.cmp-hero .av-big { width: 160px; height: 228px; margin: 16px auto 0; border-radius: 12px; overflow: hidden; position: relative; }
.cmp-hero .av-big img { width: 100%; height: 100%; object-fit: cover; }
.cmp-round { margin: 14px 20px 0; padding: 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.cmp-round .r { font-family: var(--f-en); font-size: 12px; color: var(--ink3); font-weight: 600; }
.cmp-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.cmp-cell { text-align: center; font-size: 12px; }
.cmp-cell img { width: 100%; aspect-ratio: .75; object-fit: cover; border-radius: 8px; }
.rtag { display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 6px; border-radius: 10px; color: #fff; font-family: var(--f-en); font-weight: 600; font-size: 11px; margin-top: 4px; }
.rtag.kiss { background: var(--kiss); } .rtag.marry { background: var(--marry); } .rtag.kill { background: var(--kill); } .rtag.none { background: var(--line); color: var(--ink2); }

/* 합성 대기(Main) */
.wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 24px; gap: 26px; text-align: center; }
.wait .msg { font-size: 15px; line-height: 22px; color: var(--ink2); }
.stages { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 290px; text-align: left; }
.stages div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink3); }
.stages div.on { color: var(--ink); font-weight: 700; } .stages div.ok { color: var(--ink2); }
.stages i { width: 10px; height: 10px; border-radius: 5px; background: var(--lav2); } .stages div.on i { background: var(--pink); animation: ty 1s infinite; } .stages div.ok i { background: var(--pink); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-height: 700px) { .ob-title { padding-top: 20px; } .choices { padding-top: 24px; } }
