/* Kraków Pocket · exhaustive character/style audit v6.8 */
html.kp-game{scroll-padding-top:8px;scroll-padding-bottom:calc(var(--kp-nav-h,92px) + 18px)}
html.kp-game body{min-height:100svh}
html.kp-game .panel{min-width:0}
html.kp-game .kp-character-asset,html.kp-game .kp-landmark-svg,html.kp-game .kp-asset-svg,html.kp-game .kp-npc-asset{display:block!important;visibility:visible!important;opacity:1!important}
/* Never expose the obsolete placeholder characters while the unified system is mounting. */
html.kp-game .kp-game-portrait>.kp-art,html.kp-game .kp-couple-art>.kp-art{display:none!important}
html.kp-game .kp-hub-avatar{font-size:0!important}

/* One protagonist system everywhere: same hair, eyes, clothing palette and proportions. */
html.kp-game .kp-game-portrait{width:62px!important;height:62px!important;border-radius:50%!important;overflow:hidden!important;background:radial-gradient(circle at 43% 24%,#fff8dc 0,#e7ca85 61%,#b88448 100%)!important;box-shadow:inset 0 0 0 2px #fff4c8,inset 0 -8px 13px rgba(88,54,28,.12),0 3px 0 #3d271b,0 0 0 2px rgba(255,235,172,.36)!important}
html.kp-game .kp-game-portrait svg{width:78px!important;height:78px!important;transform:translate(-8px,-8px)!important}
html.kp-game .kp-hub-couple{left:36.5%!important;top:49%!important;z-index:11!important;gap:0!important;align-items:end!important;filter:drop-shadow(0 6px 2px rgba(43,31,22,.25))}
html.kp-game .kp-couple-art{position:relative;z-index:11;width:66px!important;height:90px!important;overflow:visible!important;transform-origin:50% 100%}
html.kp-game .kp-couple-art:first-child{transform:translateX(7px) rotate(-.8deg)}
html.kp-game .kp-couple-art:last-child{transform:translateX(-7px) rotate(.8deg)}
html.kp-game .kp-couple-art svg{width:100%!important;height:100%!important;overflow:visible!important;animation:kpCharacterBreathe 3.4s ease-in-out infinite}
html.kp-game .kp-couple-art:last-child svg{animation-delay:-1.7s}
html.kp-game .kp-hub-couple:after{content:"";position:absolute;z-index:-1;left:8px;right:8px;bottom:-2px;height:12px;border-radius:50%;background:rgba(55,43,29,.2);filter:blur(4px)}
html.kp-game .kp-hub-place.quests{top:19%!important}
html.kp-game .kp-hub-place.map{left:72%!important;top:39%!important}
html.kp-game .kp-hub-avatar{overflow:hidden!important;background:radial-gradient(circle at 45% 30%,#eef2b8,#b9d17c 72%,#88a85a)!important}
html.kp-game .kp-hub-avatar .kp-npc-asset{width:62px!important;height:62px!important;transform:translate(-5px,-5px)}
@keyframes kpCharacterBreathe{0%,100%{transform:translateY(0) scaleY(1)}50%{transform:translateY(-1.5px) scaleY(1.012)}}

/* If diagnostics ever detect a label collision, move the couple to a safe lane rather than covering UI. */
html.kp-game.kp-character-collision .kp-hub-couple{left:34%!important;top:53%!important}

/* Layer ordering: characters, landmarks and VFX must never fight for the same plane. */
html.kp-game .kp-hub-place{z-index:7!important}
html.kp-game .kp-vfx-layer{pointer-events:none!important;z-index:2!important}
html.kp-game .kp-hub-couple{pointer-events:none!important}
html.kp-game .kp-world-node .kp-node-icon{z-index:1}
html.kp-game .kp-world-node .kp-landmark-art{position:relative;z-index:1;overflow:visible!important}
html.kp-game .kp-world-node .kp-node-badge{z-index:3}
html.kp-game .kp-nav-art,html.kp-game .tab b{overflow:visible!important}
html.kp-game .kp-nav-art svg{width:30px!important;height:30px!important}

/* Navigation and safe-area audit. */
html.kp-game .bottom{bottom:0!important;padding-bottom:max(6px,env(safe-area-inset-bottom))!important}
html.kp-game .toast,html.kp-game .kp-action-toast{bottom:calc(var(--kp-nav-h,92px) + 10px)!important}
html.kp-game .sheet-body{padding-bottom:calc(20px + env(safe-area-inset-bottom))!important}
html.kp-game .sheet .card{margin-bottom:10px!important;padding:13px!important}
html.kp-game .sheet label{line-height:1.25}
html.kp-game .sheet input,html.kp-game .sheet select{min-height:44px!important}
html.kp-game .close-btn{outline-offset:2px}
html.kp-game .kp-pixel-dialog{bottom:calc(var(--kp-nav-h,92px) + 10px)!important}
html.kp-game .kp-world-map{scroll-margin-top:8px}

/* Text and geometry audit. */
html.kp-game .kp-game-logo strong{letter-spacing:-.035em!important;line-height:1!important}
html.kp-game .kp-game-resource b{line-height:1.08!important}
html.kp-game .kp-hub-message,html.kp-game .kp-objective-copy span{overflow-wrap:anywhere}
html.kp-game .kp-world-node small{hyphens:auto;-webkit-hyphens:auto}
html.kp-game .sheet-head>*{min-width:0}
html.kp-game .row>*,html.kp-game .grid2>*,html.kp-game .grid3>*{min-width:0}

@media(max-width:480px){
  html.kp-game .content{padding-left:8px!important;padding-right:8px!important}
  html.kp-game #kpGameHud{margin-left:6px!important;margin-right:6px!important}
  html.kp-game #kpGameObjective{margin-left:8px!important;margin-right:8px!important}
  html.kp-game .kp-game-brand{grid-template-columns:60px minmax(0,1fr) 40px!important;gap:7px!important}
  html.kp-game .kp-game-portrait{width:58px!important;height:58px!important}
  html.kp-game .kp-game-portrait svg{width:73px!important;height:73px!important;transform:translate(-8px,-8px)!important}
  html.kp-game .kp-hub-world{height:326px!important}
  html.kp-game .kp-hub-place.quests{top:18%!important}
  html.kp-game .kp-hub-place.map{left:72%!important;top:40%!important}
  html.kp-game .kp-hub-couple{left:35.5%!important;top:49%!important}
  html.kp-game .kp-couple-art{width:62px!important;height:86px!important}
  html.kp-game .kp-hub-dialog{min-height:78px!important;padding:9px 10px!important}
  html.kp-game .kp-hub-message{font-size:12.5px!important}
  html.kp-game .kp-world-map{height:700px!important}
  html.kp-game .kp-world-node .kp-landmark-art{width:70px!important;height:70px!important}
  html.kp-game .kp-world-node small{font-size:8.7px!important;line-height:1.08!important}
  html.kp-game .kp-world-top{padding:11px 10px 12px!important}
  html.kp-game .kp-world-title{font-size:21px!important}
  html.kp-game .kp-world-score{min-width:58px!important}
  html.kp-game .sheet{width:calc(100vw - 12px)!important;max-height:calc(100dvh - 12px)!important;border-radius:16px 16px 0 0!important}
  html.kp-game .sheet-head{padding:12px!important}
  html.kp-game .sheet-body{padding:10px 10px calc(18px + env(safe-area-inset-bottom))!important}
  html.kp-game .grid2{gap:8px!important}
}
@media(max-width:380px){
  html.kp-game .kp-game-brand{grid-template-columns:54px minmax(0,1fr) 38px!important;gap:6px!important}
  html.kp-game .kp-game-portrait{width:52px!important;height:52px!important}
  html.kp-game .kp-game-portrait svg{width:66px!important;height:66px!important;transform:translate(-7px,-7px)!important}
  html.kp-game .kp-game-logo strong{font-size:clamp(20px,6.4vw,24px)!important}
  html.kp-game .kp-hub-world{height:308px!important}
  html.kp-game .kp-hub-place.quests{top:17.5%!important}
  html.kp-game .kp-hub-place.map{left:73%!important;top:40%!important}
  html.kp-game .kp-hub-couple{left:34.5%!important;top:49%!important}
  html.kp-game .kp-couple-art{width:57px!important;height:79px!important}
  html.kp-game .kp-hub-place .building .kp-asset-svg{width:54px!important;height:52px!important}
  html.kp-game .kp-hub-place small{font-size:8px!important}
  html.kp-game .kp-world-map{height:680px!important}
  html.kp-game .kp-world-node .kp-landmark-art{width:64px!important;height:64px!important}
}
@media(max-width:340px){
  html.kp-game .kp-game-brand{grid-template-columns:48px minmax(0,1fr) 36px!important}
  html.kp-game .kp-game-portrait{width:46px!important;height:46px!important}
  html.kp-game .kp-game-portrait svg{width:59px!important;height:59px!important;transform:translate(-6px,-7px)!important}
  html.kp-game .kp-hub-couple{left:33%!important;top:50%!important}
  html.kp-game .kp-couple-art{width:52px!important;height:73px!important}
}
@media(hover:none) and (pointer:coarse){html.kp-game button:focus-visible,html.kp-game select:focus-visible,html.kp-game input:focus-visible,html.kp-game textarea:focus-visible{outline:none!important;box-shadow:inherit}}
@media(prefers-reduced-motion:reduce){html.kp-game *{scroll-behavior:auto!important}html.kp-game .kp-couple-art svg{animation:none!important}}

/* Profile polish v6.9 · closer portrait crop + cleaner player identity on mobile */
html.kp-game .kp-game-portrait{position:relative!important;isolation:isolate;border:3px solid #5d3925!important;background:radial-gradient(circle at 50% 28%,#fff9df 0 24%,#efd79d 58%,#bd874a 100%)!important;box-shadow:inset 0 0 0 2px rgba(255,248,215,.95),inset 0 -9px 16px rgba(83,49,25,.13),0 3px 0 #3b261a,0 5px 12px rgba(50,31,20,.18)!important}
html.kp-game .kp-game-portrait:after{content:"";position:absolute;right:4px;bottom:4px;z-index:4;width:10px;height:10px;border:2px solid #fff1bf;border-radius:50%;background:#6f9d5c;box-shadow:0 1px 0 #3c5e32}
html.kp-game .kp-game-portrait .kp-character-asset{position:absolute!important;left:50%!important;top:50%!important;width:108px!important;height:108px!important;max-width:none!important;transform:translate(-50%,-43%)!important;filter:none!important}
html.kp-game .kp-game-brand{align-items:center!important}
html.kp-game #settingsSheet .card:first-of-type{border-color:#7d5838!important;background:linear-gradient(180deg,#fff7dc,#efd59c)!important;box-shadow:0 3px 0 #5a3c28,0 8px 18px rgba(62,38,23,.10)!important}
html.kp-game #settingsSheet .card:first-of-type>label{display:block;margin-top:12px;padding:10px;border:2px solid #b48754;border-radius:12px;background:rgba(255,249,229,.72);font-weight:900;color:#573824}
html.kp-game #playerSelect{margin-top:6px!important;min-height:52px!important;padding:0 42px 0 14px!important;border:2px solid #775039!important;border-radius:11px!important;background-color:#fffaf0!important;color:#38261b!important;font-size:16px!important;font-weight:900!important;box-shadow:inset 0 1px 0 #fff,0 2px 0 rgba(78,48,28,.14)!important}
html.kp-game #playerSelect:focus{outline:3px solid rgba(216,178,89,.36)!important;outline-offset:2px!important}
html.kp-game .kp-hub-couple{filter:drop-shadow(0 7px 3px rgba(43,31,22,.22))!important}
html.kp-game .kp-couple-art{filter:saturate(.96) contrast(1.02)}
@media(max-width:480px){
  html.kp-game .kp-game-portrait .kp-character-asset{width:102px!important;height:102px!important;transform:translate(-50%,-43%)!important}
  html.kp-game #settingsSheet .card:first-of-type>label{padding:9px!important}
  html.kp-game #playerSelect{min-height:50px!important;font-size:15px!important}
}
@media(max-width:380px){
  html.kp-game .kp-game-portrait .kp-character-asset{width:92px!important;height:92px!important;transform:translate(-50%,-43%)!important}
}
@media(max-width:340px){
  html.kp-game .kp-game-portrait .kp-character-asset{width:82px!important;height:82px!important;transform:translate(-50%,-43%)!important}
  html.kp-game .kp-game-portrait:after{right:3px;bottom:3px;width:9px;height:9px}
}
