/* 아이폰 사파리 손보기(11-11, 오너 "폰 환경에선 기능이 제대로 안 됨").
   화면 높이·눌림 문제는 index.html/goals.css 쪽 다른 작업에서 다루므로 여기선 건드리지 않는다. 맨 마지막에 로드. */

/* 두 번 탭하면 화면이 확대되는 것(user-scalable=no를 아이폰이 무시함)과 탭 지연 제거 */
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a, [onclick], .btn, select, label { touch-action: manipulation; }

/* 입력칸을 누르면 글자가 16px 미만일 때 아이폰이 화면을 멋대로 확대하고 안 돌아옴 → 아이폰에서만 16px */
@supports (-webkit-touch-callout: none) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea,
  .input-field { font-size: 16px !important; }
}

/* 설치 안내(mobile-fix.js) */
#_ios_install { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(60px + env(safe-area-inset-bottom)); width: calc(100% - 20px); max-width: 460px; z-index: 9999;
  background: #1a1328; box-shadow: 0 0 0 2px #0b0812, 0 0 0 4px #7c5cbf, 0 10px 24px rgba(0,0,0,.6); padding: 12px 14px 10px; color: #e8e2f5; font-size: 13px; line-height: 1.55; }
#_ios_install b { color: #ffd77a; font-weight: 400; }
#_ios_install .ii-x { position: absolute; top: 4px; right: 8px; background: none; border: 0; color: #9a90b5; font-size: 20px; padding: 4px 8px; }
#_ios_install .ii-steps { margin: 6px 0 2px; padding-left: 18px; }
#_ios_install .ii-btn { margin-top: 6px; background: #d9a73a; color: #1a1328; border: 0; padding: 9px 14px; font-size: 14px; font-family: inherit; }
#_ios_install .ii-arrow { text-align: center; font-size: 20px; color: #ffd77a; animation: iiBob 1s ease-in-out infinite; }
@keyframes iiBob { 50% { transform: translateY(5px); } }

/* 11-11 오너: 실시간 강화 피드 제거 */
#mobile-feed,#live-feed-side,#live-feed{display:none!important}

/* 11-11 오너 "경계면 테두리 거슬려": 화면 전체를 두르던 두 줄 테두리 제거 */
#app{box-shadow:none!important}

/* 11-12 폰 터치 영역: 가방 잠금 버튼·심연 제단 확률 안내 줄이 너무 작아 손가락으로 누르기 어려움 */
.iv-lock{min-width:44px;min-height:30px;padding:6px 10px;font-size:12px}
.panel-title:has(#altar-prob-toggle-icon){min-height:44px}

/* 11-12 사냥 화면(v3, 폰·PC 공통): 배경 돌바닥(높이 70~90%)에 용사·펫·몹 발을 붙이고, 스킬·정보 판은 필드 밖 아래로 뺌(캐릭터를 안 가리게) */
#abyss-arena-box{height:calc(100svh - 135px - var(--hs,228px));min-height:280px;max-height:none;margin-bottom:var(--hs,228px);overflow:visible}
#abyss-arena-box .hunt-scrim{top:100%;bottom:auto;height:auto;background:#120d1f}
#abyss-arena-box .hunt-hero{bottom:16%;height:30%}
#abyss-arena-box .hunt-pet{bottom:14%;height:13%}
#abyss-arena-box #abyss-mon-wrap{bottom:16%;height:30%}
#abyss-arena-box #abyss-mon-wrap.boss{height:38%}
#abyss-arena-box .hunt-mobq .mq{bottom:16%!important}
@media (max-width:600px){
  #abyss-arena-box #abyss-mon-wrap{right:104px}
  #abyss-arena-box #abyss-mon-wrap.boss{right:98px}
  #abyss-arena-box .hunt-mobq{right:92px}
}

/* 11-12 하단 메뉴 5칸: 우편함(안 받은 우편 수 배지) */
.town-nav{grid-template-columns:repeat(5,1fr)}
.town-nav button[data-k="mail"]{position:relative}
.town-nav .nav-badge{position:absolute;top:6px;right:calc(50% - 30px);min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:#e0484f;color:#fff;font-size:11px;line-height:16px;font-weight:700;display:none}

/* 11-12 사냥터 고르기 그림이 가느다란 띠(46px)라 잘린 것처럼 보임 → 16:9로 크게, 넓은 그림은 왼쪽 한 화면만 */
.hp-zones .hp-z i{height:auto;aspect-ratio:16/9;background-size:200% 100%;background-position:0 0}

/* 11-12 사파리(WebKit)는 #app zoom:.92를 폭에 반영 안 함 → 오른쪽 잘림·왼쪽 쏠림. 아이폰(모든 iOS 브라우저)·넘침 감지 시 zoom 끔 */
@supports (-webkit-touch-callout:none){#app{zoom:1!important}}
html.nozoom #app{zoom:1!important}

/* 11-12 앱 다운로드 버튼(mobile-fix.js), 앱 안에선 설치 안내 숨김 */
.dl-row{display:flex;gap:8px;justify-content:center;margin:-4px 0 14px}
.dl-row .btn{flex:1;max-width:180px;text-decoration:none;text-align:center;font-size:13px;min-height:36px;display:flex;align-items:center;justify-content:center}
html.in-app #_pwa_banner,html.in-app #_ios_install,html.in-app .dl-row{display:none!important}

/* 11-12 튜토리얼 말풍선은 터치를 통과시키는데(pointer-events:none) 안의 "다음" 버튼까지 안 눌려 사냥 준비에서 멈췄음 → 버튼만 눌리게 */
.ob-tooltip button,.ob-tooltip a{pointer-events:auto}

/* 11-12 앱(1.4) 안에선 브라우저 티 안 나게: 길게 눌러 글자 선택·그림 저장 메뉴 끄기(입력칸은 그대로), 브라우저용 메뉴(전체화면·앱 설치) 숨김 */
html.in-app body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
html.in-app input,html.in-app textarea,html.in-app [contenteditable]{-webkit-user-select:text;user-select:text}
html.in-app img{-webkit-user-drag:none}
html.in-app #fullscreen-btn,html.in-app #install-app-btn{display:none!important}

/* 11-14 오너 "몹이 너무 가까워 캐릭터랑": 폰에서 몹을 오른쪽 끝으로(버튼 줄은 위쪽이라 안 겹침) → 용사·펫과 간격, 스킬 이펙트가 둘을 다 덮지 않게 */
@media (max-width:600px){
  #abyss-arena-box #abyss-mon-wrap{right:3%}
  #abyss-arena-box #abyss-mon-wrap.boss{right:1%}
}

/* 11-23 폰 세로 안내(mobile-fix.js): 가로로 돌리면 사라짐 */
#pc-rotate{display:none}
html.pc-rotate #pc-rotate{position:fixed;inset:0;z-index:100000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;background:#0b0812;color:#e8e2f5;text-align:center;font-size:14px;line-height:1.6}
html.pc-rotate #pc-rotate b{color:#ffd77a;font-size:20px;font-weight:400}
html.pc-rotate #pc-rotate span{color:#9a90b5}
html.pc-rotate body{overflow:hidden}
#pc-rotate .pr-phone{width:44px;height:76px;border:4px solid #d9a73a;box-shadow:0 0 0 2px #0b0812,0 0 0 4px #7c5cbf;position:relative;margin-bottom:14px;animation:prTurn 2.2s ease-in-out infinite}
#pc-rotate .pr-phone::after{content:"";position:absolute;left:50%;bottom:4px;width:10px;height:4px;margin-left:-5px;background:#d9a73a}
@keyframes prTurn{0%,25%{transform:rotate(0)}55%,100%{transform:rotate(-90deg)}}
@media (prefers-reduced-motion:reduce){#pc-rotate .pr-phone{animation:none;transform:rotate(-90deg)}}
/* 11-23 폰 가로(높이 ~410): 오른쪽 위 퀘스트 상자가 화면 3분의 1을 가려서 작게 */
@media (max-height:500px){html.pc-phone #gq-box{width:180px;gap:3px;padding:4px}html.pc-phone #gq-box.float{top:44px}html.pc-phone #gq-box .gq-q{padding:4px 6px}html.pc-phone #gq-box .gq-q small{display:none}html.pc-phone #gq-box .gq-get{padding:4px}}
