/* 🏠261110 fam/assets/fam-who.css — «누가 시작할까요?» 한 판 + 부모 화면 잠금 번호 (짝 = fam/js/fam-who.js)
   색 = 아이 핑크 #FF6B9D · 부모 그린 #16B364 (창 테두리 문법 = fam-mode.css) · ⛔보라·핑크→초록 그라데이션·배경 흐림(blur) 없음
   ⛔reduced-motion 가드 없음(불가침 3) · 클래스는 전부 «fwho-» 로 시작(셸 .fw-·.fh- 와 안 겹치게) */
#fwho,#fwho-curtain{position:fixed;inset:0;z-index:2147483100;display:flex;align-items:center;justify-content:center;
  padding:max(18px,env(safe-area-inset-top)) 18px max(18px,env(safe-area-inset-bottom));
  background:#EAF4EE url("/assets/images/kids-intro.png") center top/cover no-repeat;
  font-family:'Pretendard Variable','Pretendard',-apple-system,BlinkMacSystemFont,'Segoe UI','Malgun Gothic',system-ui,sans-serif;color:#173D2A;
  --fwho-c:#16B364}
#fwho{transition:box-shadow .3s ease}
#fwho[data-pick="kid"]{--fwho-c:#FF6B9D;box-shadow:inset 0 0 0 4px #FF6B9D}
#fwho[data-pick="parent"]{--fwho-c:#16B364;box-shadow:inset 0 0 0 4px #16B364}
body.fwho-on #fmode-frame,body.fwho-on #fmode-bar{display:none!important}   /* 고르는 동안엔 «지금 모드» 표시를 감춘다(아직 누구 화면도 아니다) */
body.fwho-on{overflow:hidden}

.fwho-card{width:min(700px,100%);max-height:100%;overflow:auto;padding:34px 30px 28px;border-radius:28px;background:#fff;text-align:center;
  box-shadow:0 30px 80px rgba(16,44,40,.30);animation:fwhoPop .5s cubic-bezier(.16,.84,.3,1) backwards}
.fwho-logo{display:block;width:132px;height:auto;margin:0 auto 16px}
.fwho-card h1{margin:0 0 8px;font-size:28px;line-height:1.35;font-weight:800;letter-spacing:-.025em;color:#173D2A}
.fwho-sub{margin:0;font-size:15px;line-height:1.65;font-weight:500;color:#64806D}

.fwho-tiles{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;margin:26px 0 0}
.fwho-tile{--c:#FF6B9D;position:relative;flex:0 1 172px;min-width:132px;min-height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;
  padding:22px 14px 18px;border:2px solid #E3ECE6;border-radius:22px;background:#fff;color:#173D2A;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:transform .28s cubic-bezier(.2,.9,.3,1.25),border-color .2s ease,box-shadow .28s ease,opacity .25s ease;
  animation:fwhoRise .55s cubic-bezier(.16,.84,.3,1) backwards;animation-delay:calc(120ms + var(--i,0) * 80ms)}
.fwho-tile.parent{--c:#16B364}
.fwho-tile::before{content:"";position:absolute;left:22px;right:22px;top:-2px;height:5px;border-radius:0 0 7px 7px;background:var(--c)}
.fwho-tile b{font-size:25px;line-height:1.25;font-weight:800;letter-spacing:-.025em;word-break:keep-all;overflow-wrap:anywhere}
.fwho-tile:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(16,44,40,.12)}
.fwho-tile:focus-visible{outline:3px solid var(--c);outline-offset:3px}
.fwho-tile[aria-pressed="true"]{border-color:var(--c);transform:translateY(-4px) scale(1.035);
  box-shadow:0 0 0 5px color-mix(in srgb,var(--c) 20%,transparent),0 18px 36px rgba(16,44,40,.16)}
.fwho-tiles.picked .fwho-tile[aria-pressed="false"]{opacity:.46}
/* 사진 — 있을 때만 보인다(⛔이니셜 동그라미 없음 · 이름 글자가 주인공) */
.fwho-face{display:contents}
.fwho-tile .fp-avatar{display:block!important;width:86px!important;height:86px!important;min-width:86px!important;border-radius:50%!important;overflow:hidden;background:#F1F7F3;box-shadow:0 0 0 3px #fff,0 0 0 5px color-mix(in srgb,var(--c) 55%,transparent)}
.fwho-tile .fp-avatar:empty{display:none!important}
.fwho-tile .fp-avatar img{width:100%;height:100%;display:block;object-fit:cover}
.fwho-lock{position:absolute;top:12px;right:12px;width:20px;height:20px;color:#16B364}

.fwho-go{min-height:74px;margin-top:22px;display:flex;flex-direction:column;align-items:center;gap:12px}
.fwho-go>*{animation:fwhoUp .38s cubic-bezier(.16,.84,.3,1) backwards}
.fwho-enter{width:min(360px,100%);min-height:60px;padding:14px 22px;border:0;border-radius:18px;background:var(--fwho-c);color:#fff;font:inherit;font-size:20px;font-weight:800;letter-spacing:-.01em;cursor:pointer;
  box-shadow:0 12px 26px color-mix(in srgb,var(--fwho-c) 34%,transparent);transition:transform .18s ease,box-shadow .18s ease,filter .18s ease}
.fwho-enter:hover{transform:translateY(-2px);filter:brightness(1.04)}
.fwho-enter:active{transform:translateY(1px) scale(.985)}
.fwho-enter:focus-visible{outline:3px solid #173D2A;outline-offset:3px}
.fwho-enter[disabled]{background:#EEF3F0;color:#9DB0A5;box-shadow:none;cursor:default;transform:none;filter:none}
.fwho-remember{display:inline-flex;align-items:center;gap:9px;font-size:14.5px;font-weight:600;color:#3F5B4B;cursor:pointer;user-select:none}
.fwho-remember input{appearance:auto!important;-webkit-appearance:checkbox!important;width:20px!important;height:20px!important;min-width:20px;margin:0;padding:0;border-radius:4px;accent-color:#16B364;flex:none}
.fwho-link{padding:8px 6px;border:0;background:none;color:#4C6E58;font:inherit;font-size:13.5px;line-height:1.55;font-weight:600;text-decoration:underline;text-underline-offset:3px;word-break:keep-all;cursor:pointer}
.fwho-link:hover{color:#173D2A}
.fwho-back{margin-top:6px}

/* 잠금 번호 판 */
.fwho-pin{width:min(300px,100%);margin:0 auto;text-align:center}
.fwho-pin-title{margin:0 0 14px;font-size:16px;line-height:1.5;font-weight:700;color:#173D2A}
.fwho-dots{display:flex;justify-content:center;gap:14px;margin:0 0 10px}
.fwho-dots i{width:16px;height:16px;border-radius:50%;border:2px solid #BFD3C6;background:#fff;transition:transform .18s cubic-bezier(.2,.9,.3,1.6),background .15s ease,border-color .15s ease}
.fwho-dots i.on{background:#16B364;border-color:#16B364;transform:scale(1.18)}
.fwho-pin.shake .fwho-dots{animation:fwhoShake .42s ease both}
.fwho-pin-msg{min-height:21px;margin:0 0 10px;font-size:13.5px;line-height:1.5;font-weight:700;color:#C2185B}
.fwho-keys{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.fwho-keys button{min-height:58px;border:1.5px solid #DCE9DF;border-radius:16px;background:#fff;color:#173D2A;font:inherit;font-size:23px;font-weight:700;cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:transform .12s ease,background .12s ease,border-color .12s ease}
.fwho-keys button:hover{background:#F3F9F5;border-color:#BFD3C6}
.fwho-keys button:active{transform:scale(.94);background:#E7F6EC}
.fwho-keys button[data-key="back"]{font-size:19px;color:#4C6E58}
.fwho-keys span{display:block}

/* 번호 판이 떠 있는 동안 — 위쪽을 줄여 노트북(높이 600 안팎)·작은 폰에서도 한 화면에 */
#fwho.pin .fwho-logo,#fwho.pin .fwho-sub{display:none}
#fwho.pin .fwho-card{padding-top:24px;padding-bottom:20px}
#fwho.pin .fwho-card h1{font-size:22px;margin-bottom:0}
#fwho.pin .fwho-tiles{margin-top:16px;gap:10px}
#fwho.pin .fwho-tile{flex-basis:140px;min-width:96px;min-height:60px;padding:16px 12px 12px;border-radius:18px}
#fwho.pin .fwho-tile b{font-size:19px}
#fwho.pin .fwho-tile .fp-avatar{display:none!important}
#fwho.pin .fwho-go{margin-top:16px;gap:6px}
#fwho.pin .fwho-keys button{min-height:50px}
#fwho.pin .fwho-back{margin-top:0}

/* 창(잠금 번호 묻기 · 이 기기 설정) — 맨 위 층(dialog) */
.fwho-dialog{width:min(430px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:28px 26px 22px;border:1px solid #D7E5DC;border-radius:24px;background:#fff;color:#173D2A;
  box-shadow:0 24px 80px rgba(16,44,40,.24);font-family:'Pretendard Variable','Pretendard',-apple-system,BlinkMacSystemFont,'Segoe UI','Malgun Gothic',system-ui,sans-serif;text-align:center}
.fwho-dialog[open]{animation:fwhoPop .35s cubic-bezier(.16,.84,.3,1) backwards}
.fwho-dialog::backdrop{background:rgba(16,45,40,.42)}
.fwho-dialog h2{margin:0 0 6px;font-size:22px;line-height:1.4;font-weight:800;letter-spacing:-.02em}
.fwho-dialog h3{margin:0 0 8px;font-size:15px;font-weight:800;color:#173D2A;text-align:left}
.fwho-dialog .fwho-note{margin:0 0 12px;font-size:13.5px;line-height:1.65;color:#64806D;text-align:left;word-break:keep-all}
.fwho-dialog h2:focus{outline:none}
.fwho-set{margin:18px 0 0;padding:16px 16px 14px;border:1px solid #E1EAE3;border-radius:18px;text-align:left}
.fwho-set label{display:flex;align-items:center;gap:10px;min-height:44px;font-size:15px;font-weight:600;color:#173D2A;cursor:pointer}
.fwho-set input[type="radio"]{appearance:auto!important;-webkit-appearance:radio!important;width:20px!important;height:20px!important;min-width:20px;margin:0;padding:0;accent-color:#16B364;flex:none}
.fwho-row{display:flex;flex-wrap:wrap;gap:8px}
.fwho-btn{min-height:46px;padding:11px 16px;border:1.5px solid #DCE9DF;border-radius:14px;background:#fff;color:#246446;font:inherit;font-size:14.5px;font-weight:700;cursor:pointer;transition:background .15s ease,transform .12s ease}
.fwho-btn:hover{background:#F3F9F5}
.fwho-btn:active{transform:scale(.97)}
.fwho-btn.go{border-color:#16B364;background:#16B364;color:#fff}
.fwho-btn.go:hover{background:#12A159}
.fwho-btn.wide{width:100%;margin-top:16px}
.fwho-state{display:inline-flex;align-items:center;gap:7px;margin:0 0 12px;padding:6px 12px;border-radius:999px;background:#ECFDF3;color:#0B7A43;font-size:13px;font-weight:800}
.fwho-state.off{background:#F3F5F4;color:#5E7568}
.fwho-pinslot:not(:empty){margin-top:16px;padding-top:16px;border-top:1px dashed #DCE9DF}
.fwho-dialog.pin .fwho-set-start,.fwho-dialog.pin .fwho-note,.fwho-dialog.pin .fwho-row,.fwho-dialog.pin .fwho-state{display:none}   /* 번호 누르는 동안엔 번호 판만 */
.fwho-dialog.pin .fwho-pinslot:not(:empty){margin-top:4px;padding-top:0;border-top:0}
.fwho-dialog.pin .fwho-keys button{min-height:52px}
.fwho-toastline{margin:10px 0 0;font-size:13.5px;font-weight:700;color:#0B7A43;text-align:left}
.fwho-toastline:empty{display:none}

/* 불러오는 동안(부모 화면이 먼저 비치지 않게 가리는 막) */
#fwho-curtain .fwho-card{width:min(360px,100%);padding:30px 26px}
.fwho-wait{display:inline-flex;align-items:center;gap:10px;margin:4px 0 0;font-size:15px;font-weight:600;color:#64806D}
.fwho-wait i{width:18px;height:18px;border-radius:50%;border:2.5px solid #CFE3D6;border-top-color:#16B364;animation:fwhoSpin .8s linear infinite}

@keyframes fwhoPop{from{opacity:0;transform:translateY(18px) scale(.97)}to{opacity:1;transform:none}}
@keyframes fwhoRise{from{opacity:0;transform:translateY(22px) scale(.94)}to{opacity:1;transform:none}}
@keyframes fwhoUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes fwhoShake{0%,100%{transform:none}20%{transform:translateX(-9px)}40%{transform:translateX(8px)}60%{transform:translateX(-6px)}80%{transform:translateX(4px)}}
@keyframes fwhoSpin{to{transform:rotate(360deg)}}

/* 폰 세로 — 두 칸 격자 · 큰 버튼 */
@media(max-width:600px){
  #fwho,#fwho-curtain{padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom));align-items:flex-end}
  .fwho-card{padding:26px 18px 22px;border-radius:24px}
  .fwho-logo{width:112px;margin-bottom:12px}
  .fwho-card h1{font-size:23px}
  .fwho-sub{font-size:14px}
  .fwho-tiles{gap:10px;margin-top:20px}
  .fwho-tile{flex:1 1 calc(50% - 5px);min-width:0;min-height:112px;padding:20px 10px 16px;border-radius:20px}
  .fwho-tile b{font-size:22px}
  .fwho-tile .fp-avatar{width:68px!important;height:68px!important;min-width:68px!important}
  .fwho-go{margin-top:18px;min-height:66px}
  .fwho-enter{width:100%;min-height:58px;font-size:19px}
  .fwho-keys button{min-height:54px}
  #fwho-curtain{align-items:center}
}
/* 낮은 가로 화면(폰 가로·작은 노트북) — 카드가 넘치지 않게 */
@media(max-height:560px){
  .fwho-card{padding:20px 24px 18px}
  .fwho-logo{display:none}
  .fwho-card h1{font-size:22px}
  .fwho-tiles{margin-top:14px}
  .fwho-tile{min-height:92px;padding:16px 12px 12px}
  .fwho-tile .fp-avatar{width:54px!important;height:54px!important;min-width:54px!important}
  .fwho-go{margin-top:14px;min-height:60px}
  .fwho-keys button{min-height:44px}
}

/* ───── 🏠261115 이 기기는 누가 쓰나요 · 아이에게 넘기는 방법 · 아이 기기 연결 · 아이 전용 기기 (짝 = fam-who.js step) ─────
   색 = 부모·이 기기 그린 #16B364 · 아이·아이 기기 핑크 #FF6B9D(⛔섞은 그라데이션 없음) */
.fwho-opts{display:flex;flex-direction:column;gap:10px;width:min(540px,100%);margin:22px auto 0}
.fwho-opt{--c:#16B364;position:relative;display:flex;align-items:center;gap:14px;width:100%;min-height:78px;padding:14px 18px 14px 20px;border:2px solid #E3ECE6;border-radius:20px;background:#fff;color:#173D2A;
  font:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:transform .25s cubic-bezier(.2,.9,.3,1.25),border-color .2s ease,box-shadow .25s ease,opacity .25s ease;
  animation:fwhoRise .5s cubic-bezier(.16,.84,.3,1) backwards;animation-delay:calc(100ms + var(--i,0) * 70ms)}
.fwho-opt.child,.fwho-opt.send{--c:#FF6B9D}
.fwho-opt::before{content:"";position:absolute;left:-2px;top:18px;bottom:18px;width:5px;border-radius:0 6px 6px 0;background:var(--c)}
.fwho-opt-ico{flex:none;display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:color-mix(in srgb,var(--c) 13%,#fff);color:var(--c)}
.fwho-opt-ico svg{width:26px;height:26px}
.fwho-opt-t{min-width:0;flex:1}
.fwho-opt b{display:block;font-size:18px;line-height:1.35;font-weight:800;letter-spacing:-.02em;word-break:keep-all}
.fwho-opt small{display:block;margin-top:3px;font-size:13.5px;line-height:1.55;font-weight:500;color:#64806D;word-break:keep-all}
.fwho-opt:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(16,44,40,.10)}
.fwho-opt:focus-visible{outline:3px solid var(--c);outline-offset:3px}
.fwho-opt[aria-pressed="true"]{border-color:var(--c);box-shadow:0 0 0 4px color-mix(in srgb,var(--c) 18%,transparent),0 14px 28px rgba(16,44,40,.12)}
.fwho-opts.picked .fwho-opt[aria-pressed="false"]{opacity:.5}
.fwho-foot{margin:12px auto 0;max-width:520px;font-size:12.5px;line-height:1.6;color:#7A9384;word-break:keep-all}
.fwho-warn{margin:16px auto 0;max-width:540px;padding:10px 14px;border-radius:14px;background:#FFF1F6;color:#9D2457;font-size:13px;line-height:1.6;font-weight:600;word-break:keep-all}
/* 아이 고르기(여러 명) — 오른쪽 위 동그라미에 체크 */
.fwho-check{position:absolute;top:10px;right:10px;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;border:2px solid #DCE6E0;background:#fff;color:#fff;transition:background .15s ease,border-color .15s ease}
.fwho-check svg{width:16px;height:16px}
.fwho-tile[aria-pressed="true"] .fwho-check{background:var(--c);border-color:var(--c)}
.fwho-kdset{margin-top:2px;font-size:12.5px;color:#7A9384}
/* 아이 기기 연결하기 — QR · 세 단계 · 링크 */
.fwho-send{display:flex;align-items:center;justify-content:center;gap:22px;max-width:580px;margin:20px auto 0;text-align:left}
.fwho-qr{flex:none;display:grid;place-items:center;width:178px;height:178px;padding:4px;border:1px solid #E1EAE3;border-radius:18px;background:#fff}
.fwho-qr img{display:block;width:168px;height:168px;image-rendering:pixelated}
.fwho-steps{margin:0;padding:0 0 0 22px;font-size:14.5px;line-height:1.6;font-weight:600;color:#173D2A;word-break:keep-all}
.fwho-steps li{margin:0 0 8px}
.fwho-steps li::marker{color:#FF6B9D;font-weight:800}
.fwho-url{display:block;width:min(430px,100%);margin:16px auto 0;padding:11px 14px;border:1.5px solid #DCE9DF;border-radius:14px;background:#F6FAF7;color:#246446;font:inherit;font-size:13.5px;text-align:center}
.fwho-row.c{justify-content:center;margin-top:10px}
.fwho-toastline.c{text-align:center}
#fwho[data-step="send"] .fwho-go{min-height:0;margin-top:12px}
#fwho[data-step="how"] .fwho-back,#fwho[data-step="kids"] .fwho-back{margin-top:12px}
/* 이 기기 설정 창 — «이 기기는 누가 쓰나요?» 두 칸(굵은 이름 + 작은 설명) */
.fwho-set label span b{display:block;font-size:15px;font-weight:700}
.fwho-set label span small{display:block;margin-top:1px;font-size:12.5px;font-weight:500;color:#64806D}
.fwho-row-use{margin-top:10px}
.fwho-row-use .fwho-btn{flex:1 1 180px;min-height:42px;font-size:13.5px}
.fwho-names{margin:0;font-size:17px;font-weight:800;color:#173D2A}
/* ───── 🏠261116 «이 기기는 누가 쓰나요?» = 번호 + 굵은 이름 + 두 줄 설명(이사님 글 모양) · QR 크게 · «완료 / 나중에 연결하기» ───── */
.fwho-opts.use .fwho-opt{align-items:flex-start;min-height:0;padding:16px 18px 16px 18px;gap:14px}
.fwho-num{flex:none;display:grid;place-items:center;width:34px;height:34px;margin-top:1px;border-radius:50%;background:color-mix(in srgb,var(--c) 14%,#fff);color:var(--c);font-size:17px;font-weight:900;line-height:1}
.fwho-opt[aria-pressed="true"] .fwho-num{background:var(--c);color:#fff}
.fwho-opts.use .fwho-opt b{font-size:18px;margin-bottom:4px}
.fwho-li{position:relative;display:block;padding-left:14px;font-size:14px;line-height:1.6;font-weight:500;color:#4F6B5A;word-break:keep-all}
.fwho-li::before{content:"";position:absolute;left:2px;top:.7em;width:5px;height:5px;border-radius:50%;background:var(--c)}
#fwho[data-step="send"] .fwho-qr{width:236px;height:236px;border-radius:20px}
#fwho[data-step="send"] .fwho-qr img{width:224px;height:224px}
.fwho-go.two{flex-direction:row;justify-content:center;flex-wrap:wrap;gap:10px}
.fwho-go.two .fwho-enter{width:auto;flex:1 1 200px;max-width:300px}
.fwho-later{flex:1 1 160px;max-width:240px;min-height:60px;padding:14px 18px;border:1.5px solid #CFE3D6;border-radius:18px;background:#fff;color:#246446;font:inherit;font-size:17px;font-weight:800;cursor:pointer;transition:background .15s ease,transform .12s ease}
.fwho-later:hover{background:#F3F9F5}
.fwho-later:active{transform:translateY(1px) scale(.985)}
.fwho-later:focus-visible{outline:3px solid #16B364;outline-offset:3px}
@media(max-width:600px){
  .fwho-opts.use .fwho-opt{padding:13px 14px;gap:12px}
  .fwho-num{width:30px;height:30px;font-size:15px}
  .fwho-opts.use .fwho-opt b{font-size:16.5px;margin-bottom:2px}
  .fwho-li{font-size:13px;line-height:1.55}
  #fwho[data-step="send"] .fwho-qr{width:208px;height:208px}
  #fwho[data-step="send"] .fwho-qr img{width:196px;height:196px}
  .fwho-go.two .fwho-enter,.fwho-later{flex:1 1 0;max-width:none;min-height:56px;font-size:16.5px}
}
@media(max-height:560px){
  #fwho[data-step="send"] .fwho-qr{width:150px;height:150px}
  #fwho[data-step="send"] .fwho-qr img{width:140px;height:140px}
  .fwho-li{font-size:12.5px}
}
/* 아이 전용 기기 — 부모 쪽 줄을 감춘다(fam-mode.js 가 단추에 hidden 을 함께 단다 · 회기 진입 카드의 «부모님 화면으로 돌아가기»·«아이 기기로 보내기») */
body.fwho-kiddev #fmode-play,body.fwho-kiddev #e-back,body.fwho-kiddev #fm-child-send{display:none!important}
@media(max-width:600px){
  #fwho:not([data-step="who"]) .fwho-logo{display:none}
  .fwho-opts{margin-top:18px;gap:8px}
  .fwho-opt{min-height:70px;padding:12px 14px 12px 16px;gap:12px;border-radius:18px}
  .fwho-opt-ico{width:42px;height:42px;border-radius:13px}
  .fwho-opt-ico svg{width:23px;height:23px}
  .fwho-opt b{font-size:16.5px}
  .fwho-opt small{font-size:12.5px}
  .fwho-send{flex-direction:column;gap:14px;margin-top:16px}
  .fwho-qr{width:138px;height:138px}.fwho-qr img{width:128px;height:128px}
  .fwho-steps{font-size:13.5px}
  .fwho-check{top:8px;right:8px}
}
@media(max-height:560px){
  .fwho-opts{margin-top:14px;gap:8px}
  .fwho-opt{min-height:60px;padding:10px 14px 10px 16px}
  .fwho-send{margin-top:12px}
  .fwho-qr{width:120px;height:120px}.fwho-qr img{width:110px;height:110px}
}
