/* 걷기 전용 엄지 조작과 짧은 안내를 하늘 관람 배치와 분리한다. */
#walk-loading{position:absolute;top:130px;left:12px;z-index:9;font-size:15px;background:#18251ddd;color:white;padding:4px 8px;pointer-events:none;}
#interior-status{position:absolute;top:150px;left:50%;transform:translateX(-50%);background:#18251de6;color:white;z-index:10;padding:8px;font-size:17px;}
#dancheong-open{position:absolute;right:12px;top:150px;z-index:10;min-height:44px;font-size:15px;}
#dancheong-dialog{position:fixed;inset:0;max-width:none;max-height:none;width:100%;height:100%;margin:0;border:0;box-sizing:border-box;background:#19221f;color:white;overflow:auto;touch-action:none;}
#dancheong-dialog canvas{width:100%;transform-origin:center;display:block;margin:12vh auto;}
#dancheong-dialog button,#dancheong-dialog p{position:relative;z-index:1;font-size:17px;}
#dancheong-dialog button{min-height:44px;}
#walk-story-actions{display:flex;gap:6px;flex-wrap:wrap;margin:4px 0;}
#walk-story-actions[hidden]{display:none;}
#walk-story-actions>button{flex:1;min-width:44px;min-height:44px;font-size:15px;word-break:keep-all;}
#walk-stick,#walk-speed,#walk-hint,#walk-name{position:absolute;z-index:9;box-sizing:border-box;}
#walk-stick{left:16px;bottom:110px;width:112px;height:112px;border:1px solid #fff8;border-radius:50%;background:#1b292355;touch-action:none;display:grid;place-items:center;}
#walk-stick span{display:block;width:36px;height:36px;border-radius:50%;background:#e3d9c4aa;border:1px solid #fff9;pointer-events:none;}
#walk-speed{right:16px;bottom:116px;min-height:44px;font-size:15px;}
#walk-name{top:110px;left:50%;transform:translateX(-50%);padding:5px 10px;border-radius:6px;background:#18251dd9;color:#fff;font-size:17px;pointer-events:none;white-space:nowrap;}
#walk-hint{top:160px;left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);width:max-content;padding:10px;background:#18251de6;color:#fff;font-size:17px;pointer-events:none;}
#walk-stick[hidden],#walk-speed[hidden],#walk-name[hidden],#walk-hint[hidden]{display:none;}

#viewer[data-walk="true"] #visitor-player,#viewer[data-walk="true"] #tour-player{display:none!important;}
#viewer[data-walk="true"] #visitor-toolbar{display:flex!important;flex-wrap:nowrap;gap:4px;}
#viewer[data-walk="true"] #visitor-toolbar>button{display:none;}
#viewer[data-walk="true"] #visitor-toolbar>button[aria-controls="locations"],#viewer[data-walk="true"] #visitor-toolbar>#walk-toggle{display:block;flex:1;min-height:44px;font-size:15px;}
@media(min-width:641px){#walk-stick{bottom:24px;}#walk-speed{bottom:24px;}#viewer[data-walk="true"] footer{left:auto;right:16px;bottom:80px;max-width:480px;} }
@media (max-width:640px), (max-height:500px), (pointer:coarse){#walk-stick{left:10px;bottom:106px;}#walk-speed{right:10px;bottom:110px;}#viewer[data-walk="true"] #visitor-toolbar{order:3;}#viewer[data-walk="true"] #mobile-reading{max-height:35dvh;}#walk-name{top:100px;font-size:15px;}}
/* 위 고지, 준비, 실내 안내를 서로 다른 줄에 둔다. */
#walk-loading{top:calc(var(--palace-header-bottom,156px) + 8px);margin:0;max-width:calc(100% - 24px);}
#walk-hint{top:auto;bottom:236px;max-width:min(540px,calc(100% - 32px));margin:0;}
#dancheong-open{top:calc(var(--palace-header-bottom,156px) + 54px);}
#interior-status{top:calc(var(--palace-header-bottom,156px) + 8px);margin:0;width:max-content;max-width:calc(100% - 24px);box-sizing:border-box;font-size:15px;}
#viewer[data-time-strip=true] #interior-status,#viewer[data-time-strip=true] #walk-loading{top:calc(var(--palace-header-bottom,156px) + 56px);}
#viewer[data-time-strip=true] #dancheong-open{top:calc(var(--palace-header-bottom,156px) + 112px);}
@media(min-width:641px){#viewer[data-walk="true"] footer{left:16px;right:auto;bottom:24px;}#walk-stick{left:auto;right:16px;bottom:84px;}#walk-speed{right:16px;} }
#dancheong-dialog p{background:#19221ff2;padding:8px;}
#viewer[data-inside=true] #walk-loading{display:none;}
#viewer[data-inside=true] #dancheong-open{top:calc(var(--palace-header-bottom,156px) + 100px);}
#viewer[data-inside=true][data-time-strip=true] #dancheong-open{top:calc(var(--palace-header-bottom,156px) + 156px);}
#interior-outside{position:absolute;z-index:10;left:12px;top:calc(var(--palace-header-bottom,156px) + 100px);min-height:44px;font-size:15px;}
#viewer[data-time-strip=true] #interior-outside{top:calc(var(--palace-header-bottom,156px) + 156px);}
@media (max-width:640px), (max-height:500px), (pointer:coarse){#viewer[data-time-active=true] #interior-status,#viewer[data-time-active=true] #walk-loading{top:calc(var(--palace-header-bottom,156px) + 56px);}#viewer[data-time-active=true] #dancheong-open{top:calc(var(--palace-header-bottom,156px) + 112px);}#viewer[data-time-active=true][data-inside=true] #dancheong-open,#viewer[data-time-active=true] #interior-outside{top:calc(var(--palace-header-bottom,156px) + 156px);}}

@media (max-height:500px) and (orientation:landscape){#viewer[data-walk=true] footer{left:6px;right:6px;bottom:0;}#walk-stick{left:12px;right:auto;bottom:8px;}#walk-speed{right:12px;bottom:8px;}}
@media(pointer:fine){#walk-stick{display:none!important;}}
@media(max-height:500px) and (orientation:landscape){
 #walk-speed{bottom:54px;right:12px;}
 #walk-hint{top:auto;bottom:128px;left:12px;transform:none;width:min(40vw,340px);font-size:15px;padding:6px;}
 #walk-loading{top:calc(var(--palace-header-bottom,70px) + 8px);left:12px;width:40vw;}
 #viewer:has(#walk-loading:not([hidden]):not(:empty)) #walk-hint{visibility:hidden;}
}
/* 아주 낮은 가로 화면(320×568 등)에서는 걷기 단추 줄을 엄지 조작과 같은 바닥 줄로 내리고(걷기 중엔 그 아래 관람 줄이 없다), 「단청 크게 보기」는 시대 단추 아래 오른쪽, 「근정전 밖으로」는 「빨리 걷기」 위로 옮긴다 — 단추 줄·엄지 조작과 겹쳐 눌리지 않던 것(lifeP48). */
@media(max-height:340px) and (orientation:landscape){
 #viewer[data-walk=true] #visitor-toolbar{bottom:8px;}
 #viewer #dancheong-open{top:calc(var(--palace-header-bottom,122px) + 52px)!important;right:12px;}
 #viewer #interior-outside{top:auto!important;bottom:56px;left:132px;}
 /* 실내에서는 위 가운데 AI 그림 고지(늘 보임)와 첫 걷기 안내가 같은 줄에 겹친다 → 이 화면에서만 안내를 숨긴다(첫 걸음에 어차피 사라지는 안내 · 고지는 그대로). */
 #viewer[data-inside=true] #walk-hint{visibility:hidden;}
}
