canvas,.touch-controls button{touch-action:none}.touch-ready .touch-controls{display:flex;flex-wrap:wrap;gap:8px;position:sticky;bottom:0;z-index:5;background:#102e31f5;padding:8px}.touch-ready .touch-controls>div{flex:1;display:flex;justify-content:space-between;gap:5px}.touch-ready .touch-controls button{min-width:48px;min-height:48px;padding:8px;font-size:13px}.touch-ready .touch-tip{display:block}.campaign-child header .brand{display:none}.campaign-child header{padding:8px 12px;justify-content:flex-end}.campaign-child footer{flex-wrap:wrap}.campaign-child #playerName[readonly]{background:#e4e8d8}.campaign-child #dialogActions button{min-height:48px}.campaign-child .dialog-inner{padding:20px}.campaign-child .methodNote p{margin:0 0 8px}.campaign-child .touch-tip{font-size:13px;color:#cbd6bd}.campaign-child .scene-caption{flex-wrap:wrap}.campaign-child .chapter p{max-width:400px}@media(max-width:800px){.campaign-child main{padding:8px}.campaign-child .chapter h1{font-size:21px}.campaign-child .chapter{margin-bottom:8px}.campaign-child .chapter p{font-size:12px}.campaign-child nav{max-width:none;flex-wrap:wrap}.campaign-child footer{font-size:12px}.campaign-child .under p{display:none}.campaign-child .hud{gap:5px}}@media(pointer:coarse) and (orientation:landscape){.campaign-child .chapter p{display:none}.campaign-child .chapter .eyebrow{font-size:9px}.campaign-child .chapter h1{font-size:18px;margin:3px 0}.campaign-child header{padding:3px 8px}.campaign-child .touch-controls{padding:5px}}
@media(orientation:landscape) and (max-height:600px){.touch-ready.campaign-child .chapter{display:none}.touch-ready.campaign-child main{padding:0 6px}.touch-ready.campaign-child .game-shell{width:min(100%,calc((100dvh - 116px)*1.7778));margin:0 auto}.touch-ready.campaign-child header{padding:2px 6px}.touch-ready.campaign-child header button{min-height:36px;padding:4px 8px;font-size:11px}.touch-ready.campaign-child .touch-controls{position:sticky;padding:4px;margin:0;gap:6px}.touch-ready.campaign-child .hud{padding:4px;min-height:38px;gap:4px}.touch-ready.campaign-child .vital{width:86px;flex-basis:86px}.touch-ready.campaign-child .equipment{gap:4px;font-size:8px}.touch-ready.campaign-child .equipment .gold{min-width:64px}.touch-ready.campaign-child .gold b,.touch-ready.campaign-child .pointsBadge b{font-size:11px}.touch-ready.campaign-child .location{display:none}.touch-ready.campaign-child .meterLabel{font-size:7px;letter-spacing:0}.touch-ready.campaign-child .scene-caption{font-size:7px;padding:4px}.touch-ready.campaign-child #interact{bottom:22px;min-height:36px;padding:4px;font-size:11px}.touch-ready.campaign-child #toast{top:40px;font-size:10px;padding:4px}.touch-ready.campaign-child .touch-tip{margin:6px}}

/* Móvil: el área de juego y los controles caben juntos dentro de la campaña. */
.touch-ready.campaign-child{height:100dvh;overflow:hidden;display:flex;flex-direction:column;overscroll-behavior:none;-webkit-tap-highlight-color:transparent}
.touch-ready.campaign-child>header{height:48px;min-height:48px;padding:2px 6px;flex:0 0 48px;justify-content:center}
.touch-ready.campaign-child>header nav{width:100%;display:flex;justify-content:center;gap:5px;flex-wrap:nowrap}
.touch-ready.campaign-child>header .version{display:none}
.touch-ready.campaign-child>header button{min-height:44px;padding:5px 9px;font-size:12px;white-space:nowrap}
.touch-ready.campaign-child>header #pause{min-width:48px;font-size:20px}
.touch-ready.campaign-child>main{position:relative;display:flex;flex:1;min-height:0;flex-direction:column;justify-content:center;align-items:stretch;width:100%;max-width:none;padding:4px;overflow:hidden}
.touch-ready.campaign-child .chapter,.touch-ready.campaign-child .under,.touch-ready.campaign-child .race-note,.touch-ready.campaign-child footer,.touch-ready.campaign-child #routeProgress{display:none}
.touch-ready.campaign-child .game-shell{flex:none;align-self:center;width:auto;max-width:100%;margin:auto 0 0;border-radius:7px;box-shadow:none}
.touch-ready.campaign-child #game{max-width:100%;margin:0 auto;touch-action:none;-webkit-user-select:none;user-select:none}
.touch-ready.campaign-child .hud{padding:5px 7px;min-height:48px;gap:7px;align-items:flex-start}
.touch-ready.campaign-child .vital{width:100px;flex-basis:100px;flex-shrink:0}
.touch-ready.campaign-child .meterLabel{font-size:8px;letter-spacing:0}.touch-ready.campaign-child .meter{height:7px}
.touch-ready.campaign-child .equipment{gap:3px 8px;font-size:9px;max-width:none;flex:1;justify-content:flex-end}
.touch-ready.campaign-child .equipment .gold{min-width:68px}.touch-ready.campaign-child .gold b,.touch-ready.campaign-child .pointsBadge b{font-size:14px}
.touch-ready.campaign-child .equipment small{font-size:7px;letter-spacing:0}.touch-ready.campaign-child #penalty{display:none}
.touch-ready.campaign-child .equipment>span:has(>b:not([id])){display:none}
.touch-ready.campaign-child .location{display:none}.touch-ready.campaign-child .scene-caption{padding:4px 6px;font-size:10px;min-height:24px;line-height:1.4}
.touch-ready.campaign-child .scene-caption>span:first-child{display:none}
.touch-ready.campaign-child .touch-controls{position:relative;bottom:auto;display:flex;justify-content:space-between;flex-wrap:nowrap;gap:8px;padding:8px 0 max(8px,env(safe-area-inset-bottom));margin:0;z-index:5;background:transparent;flex:none;touch-action:none}
.touch-ready.campaign-child .touch-controls>div{display:flex;flex:1;gap:4px;justify-content:space-between}
.touch-ready.campaign-child .touch-controls button{min-width:48px;min-height:56px;padding:6px 2px;flex:1;font-size:11px;font-weight:700;border-radius:12px;background:#204b44;box-shadow:0 3px 0 #071e20;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.touch-ready.campaign-child .touch-controls [data-act=left],.touch-ready.campaign-child .touch-controls [data-act=right]{font-size:25px}
.touch-ready.campaign-child .touch-controls [data-act=jump]{background:#e7c77d;color:#193c34;border-color:#ffe4a0}
.touch-ready.campaign-child .touch-controls [data-act=bow]{background:#28645c;border-color:#7fcfbb}
.touch-ready.campaign-child .touch-controls [data-pressed=true]{background:#8fd6b7;color:#12372d;box-shadow:none;transform:translateY(2px)}
.touch-ready.campaign-child .touch-tip{order:1;margin:6px 4px auto;padding:0;font-size:11px;line-height:1.5;color:#bfd7c7;text-align:center}
.touch-ready.campaign-child #toast{top:52px;font-size:11px;padding:7px;max-width:90%;pointer-events:none}
.touch-ready.campaign-child #interact{bottom:30px;min-height:48px;font-size:12px;padding:8px 14px;max-width:90%}
.touch-ready.campaign-child dialog{max-height:calc(100dvh - 12px);width:calc(100vw - 16px);max-width:680px;overscroll-behavior:contain}
.touch-ready.campaign-child .dialog-inner{padding:18px}.touch-ready.campaign-child dialog button,.touch-ready.campaign-child dialog select,.touch-ready.campaign-child dialog input{min-height:48px;font-size:16px}
.touch-ready.campaign-child dialog h2{font-size:25px}.touch-ready.campaign-child .gamePanel{max-height:100%;overflow:auto}
@media(orientation:landscape){.touch-ready.campaign-child>header{height:44px;min-height:44px;flex-basis:44px}.touch-ready.campaign-child>main{padding:2px 4px}.touch-ready.campaign-child .game-shell{margin:auto}.touch-ready.campaign-child .touch-tip{display:none}.touch-ready.campaign-child .touch-controls{position:absolute;inset:auto 10px max(8px,env(safe-area-inset-bottom));padding:0;pointer-events:none}.touch-ready.campaign-child .touch-controls>div{display:grid;grid-template-columns:52px 52px;gap:6px;flex:0 0 auto;pointer-events:none}.touch-ready.campaign-child .touch-controls button{width:52px;min-height:52px;pointer-events:auto}.touch-ready.campaign-child .touch-controls [data-act=duck],.touch-ready.campaign-child .touch-controls [data-act=jump]{grid-column:1/-1;width:110px}.touch-ready.campaign-child .hud{min-height:44px}.touch-ready.campaign-child .scene-caption{font-size:9px;min-height:22px}.touch-ready.campaign-child #interact{bottom:26px;min-height:44px}}


/* v9 i18n, RTL isolation for canvas & physical touch controls, CJK/Arabic support */
html[lang="zh-Hans"] body, html[lang="zh-Hans"] button, html[lang="zh-Hans"] input, html[lang="zh-Hans"] select {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
html[lang="ar"] body, html[lang="ar"] button, html[lang="ar"] input, html[lang="ar"] select {
  font-family: "Segoe UI", "Tahoma", "Noto Naskh Arabic", "Arial", system-ui, sans-serif;
}
.nutibara-lang-bar--compact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 42, 40, 0.82);
  border: 1px solid rgba(226, 201, 142, 0.45);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.82rem;
}
.nutibara-lang-bar--compact label {
  color: #ebd296;
  font-weight: 700;
  white-space: nowrap;
}
.nutibara-lang-bar--compact select {
  background: #143532;
  color: #fff6df;
  border: 1px solid rgba(235, 210, 150, 0.55);
  border-radius: 4px;
  padding: 2px 6px;
  font: inherit;
  cursor: pointer;
}
.nutibara-gum-notice {
  margin: 4px 10px;
  padding: 6px 12px;
  background: rgba(242, 206, 128, 0.16);
  border: 1px solid rgba(242, 206, 128, 0.55);
  border-radius: 6px;
  color: #fff2cc;
  font-size: 0.8rem;
  line-height: 1.35;
}
/* Never invert the game world canvas or physical movement controls in RTL */
#game, .touch-controls {
  direction: ltr !important;
}
