/* 승인 1차 시안의 입장 화면. 게임 HUD·맵·조명은 기존 2차 시안을 유지한다. */
@font-face{font-family:Jua;src:url('ui/fonts/Jua-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:Pretendard;src:url('ui/fonts/PretendardVariable.woff2') format('woff2');font-weight:100 900;font-display:swap}
body,button,input,select{font-family:Pretendard,'Apple SD Gothic Neo',sans-serif}
#am-entry-screen{--paper:#fffdf8;--oat:#f6f0e6;--cocoa:#3f332a;--sage:#6e9e67;--muted:#8a7865}
#am-entry-screen button{font-weight:750;transition:transform .12s,background .12s}
#am-entry-screen button:active{transform:scale(.97)}
#am-entry-screen button:focus-visible,#am-entry-screen input:focus-visible,#am-entry-screen select:focus-visible{outline:3px solid #93b9e3;outline-offset:3px}
.am-logo{font:400 56px Jua,sans-serif;letter-spacing:-1px;margin:0 0 12px}.am-logo img{width:58px;height:58px}
.am-welcomeText{font-size:18px;margin:0 0 38px}.am-welcome{padding:40px 20px}
#am-entryLoading:empty{display:none}#am-entryLoading{font-size:14px}
#am-slots{grid-template-columns:repeat(4,116px);gap:30px;width:auto;max-width:100%}
.am-slot{position:relative;width:116px;height:116px;border:2px dashed #ffffff90;padding:24px;overflow:visible}
.am-slotFilled{padding:0;border:3px solid #6e9e67;background:#fff8e9;box-shadow:0 8px 24px #0003}.am-slotFilled img{border-radius:50%;object-fit:contain}
.am-slotName{display:inline-block;color:#3f332a;background:#fffdf8;border-radius:99px;padding:6px 14px;font-size:14px;min-height:0;max-width:110px;margin-top:10px;box-sizing:border-box}
.am-slotEmptyLabel{display:block;margin-top:14px;font-size:14px;color:#ffffffa0}.am-slotNext .am-slotEmptyLabel{color:white;font-weight:700}
.am-slotPlus{position:absolute;right:-4px;bottom:-2px;border-radius:50%;background:#6e9e67;border:3px solid #24271d;color:white;font-size:26px;width:32px;height:32px;line-height:30px}
.am-welcomeActions{margin-top:38px;gap:12px}.am-welcomeActions>label{font-size:0}.am-welcomeActions select{font-size:15px;color:white;background:#ffffff16;border:1px solid #ffffff40;border-radius:99px;padding:12px 38px 12px 20px;max-width:240px;height:48px}.am-welcomeActions select option{background:#fffdf8;color:#3f332a}
#am-entry-screen #am-join,#am-editorDone,#am-speciesNext{border:0;border-radius:99px;background:#6e9e67;color:white;padding:13px 25px;box-shadow:0 3px 0 #4f7a4a;font-size:15px}#am-entry-screen #am-join:disabled{opacity:.5}
#am-slotHint{font-size:13px;opacity:.7;margin:16px 0 0}#am-birdCount{display:none}
.am-pickerModal{padding:24px;background:#0005}.am-pickerSheet{background:#fffdf8;color:#3f332a;padding:0;overflow:hidden;display:flex;flex-direction:column;max-height:calc(100dvh - 48px);box-shadow:0 24px 100px #0005;width:880px;border-radius:24px}
.am-modalHeader{margin:0;padding:24px 32px 4px}.am-modalHeader h2{font:400 26px Jua,sans-serif}.am-modalHeader>button{background:#f6f0e6!important;color:#3f332a!important;border:0;border-radius:99px;min-width:40px;height:40px}
.am-steps{color:#8a7865;font-size:13px;margin:0 32px 16px}.am-steps b{color:#4f7a4a}
#am-speciesSearch{margin:0 32px 20px;border:0;border-radius:99px;background:#f6f0e6;color:#3f332a;padding:14px 20px;font-size:15px;width:auto;box-sizing:border-box}
.am-speciesGrid{grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;padding:0 32px 20px;overflow:auto;min-height:160px;max-height:424px}
#am-entry-screen .am-speciesCard{position:relative;padding:9px;border:2px solid transparent;border-radius:18px;background:white;color:#3f332a;box-shadow:0 3px 8px #3f332a15;font-size:14px}
.am-speciesCard img{border-radius:12px;background:linear-gradient(#fbf5ea,#f3eadb)}.am-speciesCard span{font-weight:750;padding:10px 0 2px}
#am-entry-screen .am-speciesCard[aria-pressed=true]{border-color:#6e9e67}.am-speciesCard[aria-pressed=true]:after{content:'✓';position:absolute;right:14px;top:14px;background:#6e9e67;color:white;border-radius:50%;width:26px;height:26px;line-height:26px}
.am-pickerFooter{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #e8dfd2;padding:16px 32px;background:#fffdf8;flex-shrink:0}.am-pickerFooter small{color:#8a7865}.am-pickerFooter>button{border:0;border-radius:99px;background:#f6f0e6;color:#3f332a;padding:12px 24px}
#am-colorModal .am-pickerSheet{width:800px}.am-colorLayout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;padding:4px 32px 20px;overflow:auto;min-height:0}
#am-colorPreview{border-radius:24px;background:linear-gradient(#fbf5ea,#f1e7d5);display:flex;align-items:center;justify-content:center;min-height:330px}#am-colorPreview img{width:100%;object-fit:contain}
.am-colorGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:4px 3px 14px}.am-colorChoice{width:100%;height:auto;aspect-ratio:1;background:#f4ead9;border:3px solid transparent;box-shadow:0 2px 9px #3f332a10}.am-colorChoice img{width:100%;height:100%;object-fit:contain}.am-colorChoice[aria-pressed=true]{border-color:#6e9e67;outline:2px solid #6e9e67;outline-offset:3px}.am-colorChoice span{height:auto}
#am-colorInputs .am-pickerControls,#am-colorInputs .am-speciesRow,#am-colorInputs .am-variantRow{display:none}
#am-colorInputs label{color:#8a7865;font-size:13px;display:block;margin-top:10px}#am-colorInputs input:not([type]),#am-colorInputs select{display:block;box-sizing:border-box;width:100%;background:#f6f0e6;border:0;color:#3f332a;border-radius:14px;padding:12px 15px;font-size:15px;margin-top:7px}
#am-colorInputs .am-pers{border:0;padding:0;margin:18px 0 0;display:flex;flex-wrap:wrap;gap:7px}#am-colorInputs legend{font-size:13px;color:#8a7865;margin-bottom:8px}#am-colorInputs .am-pers label{margin:0;position:relative}#am-colorInputs .am-pers input{position:absolute;opacity:0;width:1px;height:1px}#am-colorInputs .am-pers span{display:block;border:1px solid transparent;border-radius:99px;padding:6px 10px;background:#f6f0e6;color:#8a7865;font-size:12px;font-weight:650}#am-colorInputs .am-pers input:checked+span{background:#e6efdf;border-color:#6e9e67;color:#4f7a4a}#am-colorInputs .am-pers input:focus-visible+span{outline:3px solid #93b9e3}.am-removeBird{margin-top:16px}
#am-colorFooter #am-editorDone{width:auto;margin:0}#am-entryMsg:not(:empty){padding:10px;border-radius:12px;background:#542e2e;color:#fff;z-index:60}
#am-entry:has(+ .am-pickerModal:not([hidden])){visibility:hidden}
#am-intro{position:fixed;inset:0;z-index:100;background:radial-gradient(ellipse at 50% 45%,#fff,#fbf5ea 60%,#f3eadb);display:flex;flex-direction:column;align-items:center;justify-content:center;color:#3f332a;transition:opacity .3s}
.am-introWord{font:400 120px Jua,sans-serif;display:flex;letter-spacing:-2px}.am-introWord>span{position:relative;animation:am-letter .65s both;animation-delay:.35s}.am-introWord>span+span{animation-delay:.6s}.am-introWord img{position:absolute;width:96px;right:-6px;top:-65px;animation:am-fly 1.2s both}
#am-intro>p{font-size:18px;color:#8a7865;animation:am-letter .4s 1.5s both}.am-introDots{position:absolute;bottom:64px;color:#6e9e67;letter-spacing:8px;font-size:10px}#am-introSkip{position:absolute;right:24px;bottom:24px;background:transparent;color:#8a7865;border:0}
@keyframes am-letter{from{opacity:0;transform:translateY(18px);filter:blur(5px)}to{opacity:1;transform:none;filter:none}}@keyframes am-fly{from{opacity:0;transform:translate(160px,-110px) rotate(-20deg)}to{opacity:1;transform:none}}
#am-joinLoading{position:fixed;inset:0;z-index:65;background:#000b;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff}#am-loadingBirds{display:flex;gap:14px;min-height:104px}#am-loadingBirds img{width:100px;height:104px;object-fit:contain;animation:am-bob 1.2s infinite alternate}#am-loadingBirds img:nth-child(even){animation-delay:-.6s}#am-joinLoading h2{font:400 24px Jua,sans-serif;margin:25px 0 18px}#am-loadingChannel{font-size:13px;opacity:.7}.am-loadingBar{width:min(320px,75vw);height:10px;background:#ffffff24;border-radius:99px;overflow:hidden}.am-loadingBar:after{content:'';display:block;width:40%;height:100%;background:linear-gradient(90deg,#6e9e67,#a3c18d);border-radius:99px;animation:am-progress 1.4s infinite alternate}@keyframes am-progress{to{transform:translateX(150%)}}@keyframes am-bob{to{transform:translateY(-10px)}}
@media(max-width:640px){.am-logo{font-size:48px}.am-welcomeText{font-size:16px;margin-bottom:30px}#am-slots{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;width:100%}.am-slot{width:100%;height:auto;aspect-ratio:1;padding:18px}.am-slotFilled{padding:0}.am-slotName{font-size:12px;padding:5px 9px;max-width:80px}.am-slotEmptyLabel{font-size:12px}.am-slotPlus{width:26px;height:26px;line-height:24px;font-size:22px;right:-5px}.am-welcomeActions{flex-direction:row;gap:10px}.am-welcomeActions select{max-width:175px;font-size:13px;padding-left:12px;padding-right:22px}#am-entry-screen #am-join{padding:13px 18px;font-size:13px}.am-pickerModal{padding:12px}.am-pickerSheet{max-height:calc(100dvh - 24px);border-radius:22px}.am-modalHeader{padding:20px 20px 8px}.am-modalHeader h2{font-size:22px}.am-steps{margin:0 20px 14px;font-size:12px}#am-speciesSearch{margin:0 20px 14px}.am-speciesGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;padding:0 16px 16px;max-height:52dvh}#am-entry-screen .am-speciesCard{padding:5px;font-size:12px}.am-speciesCard[aria-pressed=true]:after{right:6px;top:6px;width:20px;height:20px;line-height:20px}.am-pickerFooter{padding:14px 20px}.am-colorLayout{grid-template-columns:1fr;gap:16px;padding:0 20px 20px}#am-colorPreview{min-height:0;height:160px}#am-colorPreview img{width:auto;height:100%}.am-colorGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;max-width:300px;margin:auto}.am-colorChoice{max-height:86px}.am-colorLayout .am-colorFields{min-width:0}#am-loadingBirds{gap:0}#am-loadingBirds img{width:80px}}
@media(prefers-reduced-motion:reduce){#am-intro *,#am-loadingBirds img,.am-loadingBar:after{animation:none!important}#am-intro{transition:none}}
[hidden]{display:none!important}

#am-bootMsg:empty,#am-entryMsg:empty,#am-colorError:empty{display:none}#am-colorInputs .am-birdHead{display:none}#am-colorError{color:#a13f35;font-size:14px}#am-entry-screen .am-welcomeActions>label{margin:0}

#am-intro:not(.am-introReady) .am-introWord>span,#am-intro:not(.am-introReady) .am-introWord img,#am-intro:not(.am-introReady)>p{animation-play-state:paused}#am-entry-screen.am-isJoining .am-welcome{visibility:hidden}#am-joinLoading{background:transparent}

/* 제목은 한 덩어리로 등장하고 실사 대신 단순 새 아이콘을 사용한다. */
.am-introWord{display:block;animation:am-letter .65s both;animation-delay:0s}
.am-introIcon{width:70px;height:70px;color:#6e9e67;animation:am-iconFloat 2.4s ease-in-out infinite}
@keyframes am-iconFloat{0%,100%{transform:translateY(0) rotate(-5deg)}50%{transform:translateY(-10px) rotate(5deg)}}
#am-intro:not(.am-introReady) .am-introWord,#am-intro:not(.am-introReady) .am-introIcon{animation-play-state:paused}

/* 입장 전과 월드에서 같은 채널 카드 모달을 사용한다. */
#am-channels[hidden]{display:none!important}
#am-entryChannel{display:inline-flex;align-items:center;gap:10px;min-height:48px}
.am-channelTree{width:38px;height:38px;flex:0 0 38px}
.am-channelPicker .am-pickerSheet{width:min(900px,calc(100vw - 32px));max-height:85dvh;display:flex;flex-direction:column;box-sizing:border-box;padding:24px;gap:14px}
#am-channelCards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;overflow-y:auto;min-height:0;padding:4px;overscroll-behavior:contain}
.am-channelCard{display:flex;align-items:center;gap:10px;min-height:84px;text-align:left;background:#fff;color:#374936;border:2px solid #dbe4d5;border-radius:16px;padding:14px;min-width:0}
.am-channelCard[aria-pressed="true"]{border-color:#68965f;background:#f0f6eb}
.am-channelCard:focus-visible{outline:3px solid #3c743c;outline-offset:2px}
.am-channelName{font-weight:600;flex:1;overflow-wrap:anywhere}
.am-channelCounts{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:13px}
.am-channelCounts svg,.am-channelCounts img{width:17px;height:17px;fill:currentColor;object-fit:contain}
.am-channelCounts img{filter:brightness(0) saturate(100%) invert(28%) sepia(15%) saturate(820%) hue-rotate(62deg)}
#am-liveChannel::before{content:'';display:inline-block;width:24px;height:28px;vertical-align:middle;margin-right:7px;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M18 20h5v18h-5z' fill='%235e4330'/%3E%3Cpath d='M20 3C9 1 5 9 9 15c-8 6-3 14 7 13 4 5 9 2 11-1 11 1 15-10 7-15C34 5 28 1 20 3z' fill='%23557a45'/%3E%3C/svg%3E")}
#am-liveChannel[data-map="greenhouse"]::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M18 20h5v18h-5z' fill='%238e6a47'/%3E%3Cpath d='M20 3C9 1 5 9 9 15c-8 6-3 14 7 13 4 5 9 2 11-1 11 1 15-10 7-15C34 5 28 1 20 3z' fill='%2393b98a'/%3E%3C/svg%3E")}
@media(max-width:700px){#am-channelCards{grid-template-columns:1fr}.am-channelCard{gap:8px;padding:12px}.am-channelName{font-size:14px}.am-channelPicker .am-pickerSheet{padding:18px 12px}.am-channelTree{width:30px;height:30px;flex-basis:30px}.am-channelCounts{font-size:12px}}
.am-colorChoice.am-variantImageChoice{display:flex;align-items:center;justify-content:center;background:#fffdf6;border-radius:14px;overflow:hidden;padding:5px}
.am-colorChoice.am-variantImageChoice img{width:100%;height:100%;object-fit:contain}
#am-userPanel{position:fixed;z-index:36;left:10px;bottom:110px;width:280px;box-sizing:border-box;padding:16px;border:0;border-radius:18px;background:var(--am-hud,rgba(35,45,30,.8));backdrop-filter:blur(12px);color:#fff;max-height:calc(100dvh - 170px);overflow:auto}
#am-userPanel header{display:flex;align-items:center;gap:10px;justify-content:space-between}#am-userName{font-size:17px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#am-userClose{width:32px;height:32px;flex:none;border-radius:50%;padding:0;background:#ffffff20;color:white;border:1px solid #ffffff50;font-size:22px}
.am-userCaption{font-size:12px;color:#f5f3dfb8;margin:12px 0 8px}#am-userBirds{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.am-userBird{display:flex;flex-direction:column;align-items:center;gap:5px;padding:0;background:transparent!important;border:0!important;min-width:0;color:white}.am-userBird img{width:100%;aspect-ratio:1;border-radius:50%;background:#fff8e8;object-fit:contain;box-sizing:border-box;border:3px solid transparent;padding:3px}.am-userBird[aria-pressed=true] img{border-color:#9bc58e}.am-userBird:focus-visible{outline:3px solid #9bc58e;border-radius:12px}.am-userBird span{font-size:11px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.am-userEmpty{grid-column:1/-1;font-size:13px;margin:4px 0}
body:has(#am-userPanel:not([hidden])) #am-panel{left:310px;max-height:calc(100dvh - 170px);overflow:auto}
@media(max-width:700px){#am-userPanel{left:12px;bottom:110px;width:calc(100vw - 24px);max-width:330px}body:has(#am-userPanel:not([hidden])) #am-panel{left:12px;bottom:330px;top:auto;width:calc(100vw - 24px);max-width:330px;box-sizing:border-box;max-height:calc(100dvh - 420px)}.am-userBird img{max-width:60px}}

/* 사용자·새 상세는 같은 카드와 닫기 체계로 표시한다. 진단은 perf 명시 모드에만 남긴다. */
#am-userPanel,#am-panel{width:300px;padding:16px;box-sizing:border-box;border-radius:18px}
#am-userClose,#am-panelClose{width:44px;height:44px;min-height:44px;min-width:44px;border-radius:50%;padding:0;background:#ffffff20;color:white;border:1px solid #ffffff50;font-size:24px;flex:none}
#am-panelClose{position:absolute;right:12px;top:12px}
#am-panelBody{padding-top:0}.am-detailTitle{display:flex;align-items:center;gap:12px;padding-right:40px;margin-bottom:12px;min-height:56px}.am-detailTitle img{width:56px;height:56px;border-radius:50%;background:#fff8e9;object-fit:contain;flex:none}.am-detailTitle h3{font-size:17px;margin:0;overflow-wrap:anywhere}.am-detailLine{font-size:13px;line-height:1.65;color:#fffef2}
#am-panel button:not(#am-panelClose){min-height:44px}#am-panelActions{display:flex;gap:8px;margin-top:12px}#am-panelActions button{flex:1}
body:has(#am-userPanel:not([hidden])) #am-panel{left:326px}
#am-lag{position:fixed;z-index:35;top:78px;left:50%;transform:translateX(-50%);padding:5px 10px;border-radius:99px;background:#fff5df;color:#9a6b00;font-size:13px}
#am-toast{left:16px;bottom:20px;top:auto;transform:none;max-width:min(300px,calc(100vw - 32px));box-sizing:border-box}
@media(max-width:700px){#am-userPanel,#am-panel,body:has(#am-userPanel:not([hidden])) #am-panel{left:16px;width:calc(100vw - 32px);max-width:330px}body:has(#am-userPanel:not([hidden])) #am-panel{bottom:340px;max-height:calc(100dvh - 430px)}#am-userClose,#am-panelClose,.am-userBird{min-height:44px}}
#am-toast{top:112px;bottom:auto;max-width:min(280px,calc(100vw - 32px))}
@media(max-width:640px){#am-lag{top:112px}#am-toast{top:152px}}

#am-wave{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;margin-top:8px;border:1px solid #ffffff60;background:#6e9e67;color:#fff;font-size:15px}#am-wave:disabled{opacity:.6}
#am-waveBubbles{position:fixed;inset:0;z-index:8;pointer-events:none}.am-waveBubble{position:absolute;transform:translate(-50%,-100%);background:#fffdf4;border:2px solid #6e9e67;border-radius:18px;padding:6px 10px;font-size:28px;line-height:1;box-shadow:0 3px 10px #0002}.am-waveBubble::after{content:"";position:absolute;left:calc(50% - 5px);bottom:-7px;width:10px;height:10px;transform:rotate(45deg);background:#fffdf4;border-right:2px solid #6e9e67;border-bottom:2px solid #6e9e67}
@media(max-width:640px){#am-wave{font-size:22px}.am-waveText{display:none}body:has(#am-userPanel:not([hidden])) #am-userPanel,body:has(#am-userPanel:not([hidden])) #am-panel{width:calc(100vw - 112px);max-width:330px}.am-userBird img{max-width:56px}}
@media(max-width:360px){body:has(#am-userPanel:not([hidden])) #am-userPanel,body:has(#am-userPanel:not([hidden])) #am-panel{width:calc(100vw - 88px);min-width:232px}body:has(#am-userPanel:not([hidden])) #am-myBirdsWrap{width:58px;max-width:58px;padding:6px}.am-userBird{min-width:44px}}
/* WebKit의 auto 높이가 이미지·padding을 더해 원을 늘리지 않도록 두 축을 같은 치수로 고정한다. */
#am-slots{--am-slot-size:116px;grid-template-columns:repeat(4,var(--am-slot-size));width:auto}
#am-slots .am-slotWrap{width:var(--am-slot-size);min-width:0}
#am-slots .am-slot{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;appearance:none;-webkit-appearance:none;width:var(--am-slot-size);height:var(--am-slot-size);min-width:var(--am-slot-size);max-width:var(--am-slot-size);min-height:var(--am-slot-size);max-height:var(--am-slot-size);aspect-ratio:1 / 1;flex:0 0 var(--am-slot-size);padding:24px;vertical-align:top}
#am-slots .am-slot img{min-width:0;min-height:0;max-width:100%;max-height:100%;flex:0 1 100%}
#am-slots .am-slotFilled{padding:0}
@media(max-width:640px){#am-slots{--am-slot-size:clamp(44px,calc((100vw - 76px)/4),116px);gap:12px}#am-slots .am-slot{padding:18px}#am-slots .am-slotFilled{padding:0}}
/* 인사 조작은 목록 밖의 독립 원형 플로트로 둔다. 두 축은 WebKit에서도 같은 고정 치수다. */
#am-wave{position:fixed;z-index:10;right:16px;top:180px;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:52px;height:52px;min-width:52px;max-width:52px;min-height:52px;max-height:52px;aspect-ratio:1 / 1;margin:0;padding:11px;border:1px solid #ffffff40;border-radius:50%;background:var(--am-hud);backdrop-filter:blur(12px);box-shadow:none}
#am-wave img{width:28px;height:28px;display:block;pointer-events:none}#am-wave:hover{background:rgba(24,22,20,.7)}#am-wave:disabled{background:var(--am-hud);opacity:.6}body:has(#am-hud[hidden]) #am-wave{display:none}
#am-myBirdsWrap{max-height:calc(100dvh - 164px - env(safe-area-inset-bottom,0px))}
.am-waveBubble{font-size:0;line-height:0}.am-waveBubble img{width:28px;height:28px;display:block;filter:brightness(0);opacity:.8}
@media(max-width:640px){#am-wave{right:10px}#am-myBirdsWrap{max-height:calc(100dvh - 230px - env(safe-area-inset-bottom,0px))}}

/* 세 로고는 선택 화면의 공통 실루엣 자산을 참조한다. */
#am-entry-screen{background-image:url('ui/entry/forest_topdown.png')}
#am-intro{background:radial-gradient(ellipse at center,#fffdfb 45%,#fff8f0 76%,#f9e6d3 100%)}
.am-introWord{font-size:clamp(56px,12vw,86px)}
.am-introIcon{width:clamp(42px,10vw,58px);height:clamp(42px,10vw,58px);filter:brightness(0) saturate(100%) invert(56%) sepia(13%) saturate(1064%) hue-rotate(63deg)}
#am-intro>p{font-size:clamp(14px,3.7vw,17px);animation-delay:.35s;margin-top:12px}
.am-logo{font-size:42px;gap:9px}.am-logo img{width:44px;height:44px}
@media(max-width:640px){.am-logo{font-size:34px}.am-logo img{width:36px;height:36px}}

/* 언어 선택 진입점은 새 선택 화면에서만 표시한다. */
#am-localeControl{position:fixed;right:16px;bottom:14px;z-index:110}
#am-locale{width:48px;height:48px;min-height:48px;display:grid;place-items:center;padding:0;border:2px solid #b7caae;border-radius:50%;background:rgba(255,253,248,.9);color:#3f332a;font:700 14px sans-serif;box-shadow:0 2px 10px #0002}
#am-languageDialog{box-sizing:border-box;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:20px;border:0;border-radius:24px;background:#fffdf8;color:#3f332a;overflow:auto;box-shadow:0 24px 100px #0005}
#am-languageDialog::backdrop{background:#0006}
#am-languageDialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
#am-languageDialog h2{font-size:22px;margin:0;overflow-wrap:anywhere}
#am-languageDialog button{min-height:44px;padding:10px 12px;border:2px solid transparent;border-radius:16px;background:#f6f0e6;color:#3f332a;font:inherit;cursor:pointer}
#am-languageDialog button:focus-visible,#am-locale:focus-visible{outline:3px solid #93b9e3;outline-offset:2px}
.am-languageChoices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#am-languageDialog [aria-pressed=true]{border-color:#68965f;background:#e4efdf;font-weight:700}
.am-languageChoices button{overflow-wrap:anywhere}
html:not(:lang(ko)) .am-welcomeActions button,html[lang=en] .am-birdActions button{white-space:normal;overflow-wrap:anywhere}
@media(max-width:640px){#am-localeControl{right:10px;bottom:8px}html:not(:lang(ko)) .am-welcomeActions{flex-wrap:wrap}html:not(:lang(ko)) .am-welcomeActions button{max-width:100%}}

body:has(#am-intro:not([hidden])) #am-localeControl{top:16px;bottom:auto}

#am-localeControl.am-localeInModal{position:static;align-self:flex-end;margin:8px 16px 0;flex:none;box-shadow:none}
body:has(.am-pickerModal:not([hidden])) #am-renderHelp details{display:none}

/* 한글 전용 장식 글꼴은 다른 문자권의 본문 글꼴 선택을 방해하지 않는다. */
html:not(:lang(ko)) .am-modalHeader h2,html:not(:lang(ko)) #am-joinLoading h2,html:not(:lang(ko)) .am-logo{font-family:inherit;font-weight:750}
html:lang(hi) body,html:lang(hi) button,html:lang(hi) input,html:lang(hi) select{font-family:'Kohinoor Devanagari','Noto Sans Devanagari','Nirmala UI',sans-serif;line-height:1.5}
html:lang(ja) body,html:lang(ja) button,html:lang(ja) input,html:lang(ja) select{font-family:'Hiragino Sans','Yu Gothic','Noto Sans CJK JP',sans-serif}
html:lang(zh-CN) body,html:lang(zh-CN) button,html:lang(zh-CN) input,html:lang(zh-CN) select{font-family:'PingFang SC','Microsoft YaHei','Noto Sans CJK SC',sans-serif}
.am-speciesCard span,.am-pickerFooter button,.am-modalHeader h2{overflow-wrap:anywhere;min-width:0}

/* 짧은 탐색 단어는 온전히 읽히게 하고 확인 문구에 남은 폭을 배분한다. */
.am-pickerFooter>button:not(:last-of-type){white-space:nowrap;overflow-wrap:normal;flex-shrink:0;padding-left:16px;padding-right:16px}
.am-pickerFooter>button:last-of-type{min-width:0}
/* 번역된 상태가 종명 폭을 빼앗지 않도록 별도 행으로 내려 전체 문구를 표시한다. */
html:not(:lang(ko)) .am-birdHead{flex-wrap:wrap}
html:not(:lang(ko)) .am-birdLabels{flex-basis:calc(100% - 64px)}
html:not(:lang(ko)) .am-birdState{flex-basis:100%;max-width:none;white-space:normal;overflow:visible;text-overflow:clip;box-sizing:border-box}
/* PO15:51: 조작은 간결하게, 실패 복구는 유지하고 진단 세부만 명시적으로 연다. */
body:not(.am-debug) #am-renderHelp details{display:none!important}
#am-brand{font-family:Jua,sans-serif;font-size:19px}
#am-liveChannel{text-decoration:none;display:inline-flex;align-items:center;gap:4px}
#am-liveChannel::after{content:'';display:block;flex:none;width:10px;height:6px;margin-left:4px;background:currentColor;clip-path:polygon(0 0,100% 0,50% 100%);align-self:center}
.am-introWord{font-size:clamp(38px,9vw,72px)}
.am-channelPicker .am-pickerSheet{width:min(536px,92vw)}
#am-channelCards{gap:8px}
.am-channelCard{min-height:54px;padding:8px 10px;gap:8px;border-radius:12px}
.am-channelTree{width:28px;height:28px;flex-basis:28px}
.am-channelPicker .am-row{display:flex;justify-content:flex-end;gap:12px;margin-top:12px}
.am-channelPicker .am-row button{flex:0 0 auto;min-width:84px;padding-inline:18px}
.am-detailState{display:block!important;max-width:none;width:fit-content;background:#ffffff24;padding:5px 10px;margin:8px 0;font-size:12px;white-space:normal}
@media(max-width:640px){#am-brand{font-size:16px}.am-channelCard{min-height:48px;padding:6px 8px}.am-introWord{font-size:clamp(36px,10vw,52px)}}
/* 두 줄 채널명도 기존 최소 높이에 들어가도록 줄 높이와 내부 여백을 조정한다. */
.am-channelCard{font-size:14px;line-height:18px;padding:6px 12px;gap:6px}
.am-channelName{line-height:18px}
.am-channelCounts{font-size:12px;gap:4px}
.am-channelCounts svg,.am-channelCounts img{width:14px;height:14px}
.am-channelTree{width:24px;height:24px;flex-basis:24px}

/* 내용이 없는 정상 상태에서는 진단 카드의 배경·여백도 숨긴다. 오류와 명시 진단은 유지한다. */
body:not(.am-debug) #am-renderHelp:not(:has(#am-renderMessage:not(:empty),#am-firstError:not(:empty),button:not([hidden]))){display:none}
/* 목록 길이·언어·방향에 따라 인사 버튼도 흐름 안에서 배치한다. */
#am-hudRail{position:fixed;z-index:10;right:16px;top:76px;display:flex;flex-direction:column;align-items:flex-end;gap:10px;max-height:calc(100dvh - 92px - env(safe-area-inset-bottom,0px));pointer-events:none}
#am-hudRail #am-myBirdsWrap{position:static;min-height:0;max-height:none;flex:0 1 auto;pointer-events:auto}
#am-hudRail #am-wave{position:static;flex:0 0 52px;pointer-events:auto}
@media(max-width:640px){#am-hudRail{right:10px;top:112px;max-height:calc(100dvh - 128px - env(safe-area-inset-bottom,0px))}}

#am-channelTabs{display:flex;justify-content:safe center;gap:8px;overflow-x:auto;flex-shrink:0;padding:3px;max-width:100%;scrollbar-width:thin}
#am-channelTabs button{flex:none;min-height:44px;padding:8px 16px;border:2px solid transparent;border-radius:999px;background:#f6f0e6;color:#3f332a;font:inherit}
#am-channelTabs button[aria-selected="true"]{border-color:#68965f;background:#e6efdf;color:#365c31}
#am-channelTabs button:focus-visible{outline:3px solid #93b9e3;outline-offset:1px}

#am-channelTabs button{display:inline-flex;align-items:center;gap:7px}#am-channelTabs .am-channelTree{width:24px;height:24px;flex-basis:24px}

/* Art 비교 기준과 실제 인사 아이콘을 30px로 맞춘다. 버튼 터치 영역은 52px다. */
#am-hudRail #am-wave{padding:10px}#am-wave img{width:30px;height:30px}

/* 일어서기는 실제 가이드 높이 위에 두고 PC 이동 핸들만 우하단으로 옮긴다. */
#am-standup{bottom:var(--am-standup-bottom,204px)}
body:has(#am-standup:not([hidden])) #am-panel:not(:has(.am-detailTitle)){top:auto;bottom:calc(var(--am-standup-bottom,204px) + 64px)}
@media(pointer:fine){#am-direction{left:auto;right:16px;transform:none}#am-direction:active{transform:none}}
/* PC 안내는 조작 버튼 옆 공간을 남기고 화면 하단 안전영역에 붙인다. */
@media(pointer:fine){#am-camHint{bottom:calc(12px + env(safe-area-inset-bottom,0px));max-width:min(760px,calc(100vw - 288px));box-sizing:border-box;text-align:center}}
.am-pickerFooter{flex-wrap:wrap}.am-requestLinks{display:flex;align-items:center;justify-content:center;gap:8px 14px;flex-wrap:wrap;flex-basis:100%;font-size:12px;color:#83705e;padding-top:8px}.am-requestLinks a{color:#406d3e;text-underline-offset:3px;padding:4px 0}.am-requestLinks a:focus-visible{outline:3px solid #93b9e3;outline-offset:3px}
#am-wave img,.am-waveBubble img{transform:scaleX(-1)}

/* 새 행동 영역의 여백과 의자 정보 동작 구분. */
#am-panelBody .am-detailTitle~.am-detailState{margin-top:6px}
.am-seatTitle{margin:0 0 8px;font-size:18px}
#am-panelSit.am-seatStand{background:#858780;color:#fff;border:0;border-radius:999px}

/* 메뉴가 열린 한 행만 썸네일 강조를 공유한다. */
#am-myBirds .am-birdMenuIcon{background:#fff}
#am-myBirds .am-birdMenuOpen .am-birdMenuIcon{background:var(--am-sage,#719b66)}

#am-thoughtBubbles{position:fixed;inset:0;z-index:8;pointer-events:none}.am-thoughtBubble{position:absolute;transform:translate(-50%,-100%);padding:2px 8px;border-radius:50%;background:#fffdf4;color:#665746;box-shadow:0 1px 5px #0002;font:bold 18px sans-serif}.am-thoughtBubble:after{content:"";position:absolute;left:8px;bottom:-5px;width:5px;height:5px;border-radius:50%;background:#fffdf4}

.am-entryProposals{padding:0;margin:8px 0 14px;gap:8px 18px}.am-entryProposals a{display:inline-flex;align-items:center;gap:5px;color:#73716b;font-size:12px;font-weight:400;text-decoration:none}.am-entryProposals a:hover{text-decoration:underline}.am-entryProposals svg{width:13px;height:13px;flex:none}

.am-entryProposals{gap:12px 18px}
.am-entryProposals a{background:rgba(175,175,175,.16);border-radius:14px;padding:7px 14px;min-height:34px;box-sizing:border-box;text-align:center;justify-content:center;white-space:normal}
