/* Crownspire iPhone portrait layout correction – CSS only, no gameplay/camera changes. */
#account .account-letter #loginName{background:linear-gradient(180deg,#111c2d,#080e19)!important;color:#f1f5ff!important;border:1px solid #a4b8d2!important;box-shadow:inset 0 0 0 2px #24364e!important;opacity:1!important;-webkit-text-fill-color:#f1f5ff!important;min-height:48px}
#account .account-letter #loginName::placeholder{color:#b4c2d7!important;opacity:1}
#account .account-letter label[for="loginName"]{color:#e4eaf5!important;text-shadow:0 1px 3px #000}
@media(max-width:760px) and (orientation:portrait){
 /* Give the form readable width, and retain a visible character portrait above it. */
 #create .creation-reference-layout{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
 #create .creation-reference-preview{position:relative!important;top:auto!important;width:100%!important;min-height:0!important;height:clamp(230px,43vh,380px)!important;border-right:1px solid #a4b7d288!important}
 #create .pinoc-preview-test{inset:0 0 28px!important}
 #create .pinoc-preview-test img{object-fit:contain!important}
 #create .pinoc-preview-status{font-size:11px!important;padding:5px 8px!important;bottom:4px!important}
 #create .creation-reference-layout .file{width:100%!important;min-width:0!important;padding:18px 15px!important;border-width:15px!important}
 #create .creation-reference-header{padding-bottom:14px!important}
 #create .variant-choice{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
 #create .variant-choice button{min-width:0!important;min-height:48px!important}
 #create .creation-appearance-options{grid-template-columns:repeat(5,minmax(0,1fr))!important}
 #create .creation-appearance-options button{min-width:0!important}
 /* Keep location and quest above the portal; prevent story/prompt text from crossing the avatar. */
 #gameScreen .reference-quest{top:calc(128px + env(safe-area-inset-top))!important;left:9px!important;width:min(58vw,240px)!important;max-width:calc(100vw - 122px)!important;min-height:63px!important;padding:13px 15px!important}
 #gameScreen .reference-quest strong{font-size:12px!important}
 #gameScreen .reference-quest small{font-size:10px!important}
 #gameScreen .hall-location{top:calc(207px + env(safe-area-inset-top))!important;left:12px!important;right:110px!important;text-align:left!important;max-width:calc(100vw - 125px)!important}
 #gameScreen .hall-location b{font-size:10px!important;letter-spacing:.12em!important}
 #gameScreen .hall-location small{display:none!important}
 #gameScreen .hall-controls{top:calc(208px + env(safe-area-inset-top))!important;right:8px!important}
 #gameScreen .actionline{top:calc(36% + env(safe-area-inset-top))!important;right:6px!important;gap:8px!important}
 #gameScreen .actionline .orn{width:76px!important;min-width:76px!important;max-width:76px!important;min-height:48px!important;height:48px!important;font-size:10px!important}
 #gameScreen .hall-prompt{position:absolute!important;left:12px!important;right:100px!important;top:calc(257px + env(safe-area-inset-top))!important;bottom:auto!important;transform:none!important;width:auto!important;max-width:none!important;max-height:66px!important;overflow:hidden!important;text-align:left!important;font-size:11px!important;line-height:1.3!important;padding:6px 9px!important}
 #gameScreen #talk{left:10px!important;right:104px!important;top:calc(290px + env(safe-area-inset-top))!important;max-width:none!important;max-height:100px!important;overflow:auto!important;font-size:12px!important;line-height:1.35!important;padding:8px!important}
 #gameScreen .toast{left:12px!important;right:104px!important;bottom:calc(var(--touch-clearance,110px) + 310px)!important;font-size:12px!important}
}
@media(max-width:380px) and (orientation:portrait){
 #gameScreen .hall-location{top:calc(202px + env(safe-area-inset-top))!important}
 #gameScreen .hall-prompt{top:calc(244px + env(safe-area-inset-top))!important}
 #create .creation-appearance-options{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
