/* MOBILE.SHORE.1: touch HUD is a presentation/input adapter, never another game. */
html.f8-mobile-enabled,html.f8-mobile-enabled body{overscroll-behavior:none}
html.f8-mobile-enabled body>canvas{touch-action:none}
#f8-mobile-controls{display:none}
html.f8-mobile-enabled body:not(.f8-shell-active) #f8-mobile-controls{
  position:fixed;inset:0;z-index:1200;display:block;pointer-events:none;
  font-family:var(--chronocairn-body-font,Arial,sans-serif);
  -webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;
}
html.f8-mobile-enabled body:has(#pauseMenu.open) #f8-mobile-controls,
html.f8-mobile-enabled body:has(.game-panel:not(.hidden)) #f8-mobile-controls,
html.f8-mobile-enabled body:has(#questLogV152.open) #f8-mobile-controls,
html.f8-mobile-enabled body:has(#dialogueUiV276.open) #f8-mobile-controls,
html.f8-mobile-enabled body:has(#f8-death.open) #f8-mobile-controls,
html.f8-mobile-enabled body:has(#loading.open) #f8-mobile-controls{display:none!important}
#f8-mobile-controls button{appearance:none;-webkit-appearance:none;touch-action:none;user-select:none;cursor:pointer;
  font-family:inherit;font-size:11px;letter-spacing:.05em;font-weight:750;color:#f4e8fd;
  border:1px solid rgba(183,117,218,.76);border-radius:14px;
  background:linear-gradient(155deg,rgba(46,24,63,.89),rgba(8,11,22,.88));
  box-shadow:0 3px 12px rgba(0,0,0,.44),inset 0 0 8px rgba(165,99,204,.14);
  text-shadow:0 1px 2px #000;pointer-events:auto}
#f8-mobile-controls button:active,#f8-mobile-controls button.held{background:rgba(126,63,163,.92);border-color:#f0ccff}
#f8-mobile-look{position:absolute;left:43%;right:0;top:18%;bottom:24%;pointer-events:auto;touch-action:none}
#f8-mobile-pad{position:absolute;bottom:max(17px,env(safe-area-inset-bottom));left:max(17px,env(safe-area-inset-left));
  width:142px;height:142px;border:1px solid rgba(190,139,213,.42);border-radius:50%;
  background:radial-gradient(circle,rgba(93,61,110,.30),rgba(10,12,25,.43));
  box-shadow:inset 0 0 18px #0007;pointer-events:auto;touch-action:none}
#f8-mobile-pad .f8-mobile-pad-ring{position:absolute;inset:22px;border:1px dashed rgba(241,202,255,.24);border-radius:50%}
#f8-mobile-knob{position:absolute;left:50%;top:50%;width:63px;height:63px;
  transform:translate(-50%,-50%);border-radius:50%;border:2px solid rgba(235,186,252,.7);
  background:radial-gradient(circle at 40% 35%,#79558bdb,#33233bbf);
  box-shadow:0 3px 14px #000a}
#f8-mobile-pad span{position:absolute;bottom:-14px;left:0;right:0;text-align:center;
  color:#f0d9fc;font-size:10px;letter-spacing:.16em;pointer-events:none}
.f8-mobile-topbar{position:absolute;top:max(7px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);
  display:flex;align-items:center;gap:5px;pointer-events:none}
.f8-mobile-topbar button{min-height:36px;min-width:48px;padding:4px 8px}
.f8-mobile-hotbar{position:absolute;top:52px;left:50%;transform:translateX(-50%);
  display:flex;gap:3px;pointer-events:none}
.f8-mobile-hotbar button{width:35px;height:39px;border-radius:7px!important;display:flex;flex-direction:column;
  justify-content:center;align-items:center;line-height:1.1;padding:2px}
.f8-mobile-hotbar button b{font-size:10px;color:#bc91ce}
.f8-mobile-hotbar button small{font-size:15px;color:#d6d5da;max-width:29px;overflow:hidden}
.f8-mobile-hotbar button.selected{border-color:#e8c46d!important;box-shadow:0 0 9px #d6b26b99!important}
.f8-mobile-hotbar button.occupied small{color:#f9e4b4}
.f8-mobile-actions{position:absolute;bottom:max(13px,env(safe-area-inset-bottom));right:max(12px,env(safe-area-inset-right));
  display:grid;grid-template-columns:repeat(4,57px);grid-template-rows:repeat(2,52px) 65px;gap:6px;pointer-events:none}
.f8-mobile-actions button{min-width:0;min-height:0;padding:3px;border-radius:13px}
.f8-mobile-actions .f8-mobile-secondary{grid-column:1;grid-row:1}
.f8-mobile-actions [data-action="dodge"]{grid-column:2;grid-row:1}
.f8-mobile-actions [data-action="skill"]{grid-column:3;grid-row:1}
.f8-mobile-actions [data-action="torch"]{grid-column:4;grid-row:1}
.f8-mobile-actions .f8-mobile-jump{grid-column:1 / span 2;grid-row:2}
.f8-mobile-actions .f8-mobile-interact{grid-column:3;grid-row:2;font-size:22px;font-weight:900;color:#fce6aa}
.f8-mobile-actions .f8-mobile-sprint{grid-column:4;grid-row:2}
.f8-mobile-actions .f8-mobile-attack{grid-column:2 / span 3;grid-row:3;
  background:linear-gradient(145deg,#69415ecf,#241321f2);border-color:#eb96a5;font-size:15px}
html.f8-mobile-enabled body .key-hints{display:none!important}
html.f8-mobile-enabled body #hud-save-source{display:none!important}
html.f8-mobile-enabled body .hud#hud.f8-production-hud .f8-production-quest-tracker{display:none!important}
html.f8-mobile-enabled body .hud#hud.f8-production-hud .f8-production-player-panel{
  transform:scale(.71)!important;transform-origin:top left!important;left:8px!important;top:8px!important}
html.f8-mobile-enabled body .hud#hud.f8-production-hud #f8-minimap.f8-production-minimap{
  --cc-hud-map-width:118px;--cc-hud-map-height:140px;
  right:max(9px,env(safe-area-inset-right))!important;top:max(7px,env(safe-area-inset-top))!important}
html.f8-mobile-enabled body .hud#hud.f8-production-hud #f8-minimap .f8-minimap-dial{
  transform:scale(.53)!important;transform-origin:top center!important}
html.f8-mobile-enabled body .hud#hud.f8-production-hud #f8-minimap .cc-location-time.f8-production-location-panel{
  transform:scale(.72)!important;transform-origin:top right!important;top:85px!important;right:-6px!important}
html.f8-mobile-enabled body #actionbar{display:none!important}
html.f8-mobile-enabled body #f8-global-skillbar{display:none!important}
html.f8-mobile-enabled body #v41StatusPanel{display:none!important}
html.f8-mobile-enabled body .game-panel:not(.hidden){max-height:100dvh;overflow:auto;overscroll-behavior:contain}
html.f8-mobile-enabled body #inventory .f8-inventory-card{
  max-width:calc(100vw - 12px)!important;max-height:calc(100dvh - 16px)!important;overflow:auto!important}
html.f8-mobile-enabled body #merchant .merchant-grid,
html.f8-mobile-enabled body #quest-log .quest-grid{max-height:calc(100dvh - 90px);overflow:auto}
@media (orientation:portrait){
  .f8-mobile-topbar{top:143px}
  .f8-mobile-hotbar{top:185px}
  #f8-mobile-look{top:29%;bottom:26%;left:35%}
  #f8-mobile-pad{width:122px;height:122px}
  .f8-mobile-actions{grid-template-columns:repeat(4,44px);grid-template-rows:repeat(2,45px) 55px;gap:4px}
  .f8-mobile-actions button{font-size:9px}
  .f8-mobile-actions .f8-mobile-attack{font-size:13px}
}
@media(max-height:430px) and (orientation:landscape){
  .f8-mobile-hotbar{top:45px}
  .f8-mobile-topbar button{min-height:32px}
  #f8-mobile-pad{width:124px;height:124px}
  .f8-mobile-actions{grid-template-columns:repeat(4,49px);grid-template-rows:repeat(2,42px) 53px;gap:5px}
  #f8-mobile-look{top:23%;bottom:28%}
}

/* Title keeps its static authored art; do not decode 1080p video on phone GPUs. */
html.f8-mobile-enabled .cc-menu-video{display:none!important}
