.touch-ready.campaign-child > header {
  height: auto;
  min-height: 44px;
  flex: none;
  padding: 0 max(4px, env(safe-area-inset-right)) 0 max(4px, env(safe-area-inset-left));
}
.touch-ready.campaign-child > header nav {
  justify-content: safe center;
  overflow-x: auto;
  gap: 3px;
}
.touch-ready.campaign-child > header button { padding-inline: 6px; }
.touch-ready.campaign-child .nutibara-lang-bar--compact { padding: 0; border: 0; }
.touch-ready.campaign-child .nutibara-lang-bar--compact label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.touch-ready.campaign-child .nutibara-lang-bar--compact select {
  min-height: 44px;
  max-width: 7em;
}
.touch-ready.campaign-child > main {
  display: flex;
  padding: 0;
  margin: 0;
}
.touch-ready.campaign-child .game-shell { margin: auto; border: 0; border-radius: 0; }
.touch-ready.campaign-child .scene-caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  text-align: center;
  justify-content: center;
  pointer-events: none;
}
.touch-ready.campaign-child .touch-tip { display: none; }
.touch-ready.campaign-child .touch-controls {
  --key: clamp(48px, 13vw, 68px);
  flex: none;
  position: relative;
  inset: auto;
  width: 100%;
  box-sizing: border-box;
  gap: 8px;
  padding: 8px max(10px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}
.touch-ready.campaign-child .touch-controls > div {
  display: grid;
  grid-template-columns: repeat(2, var(--key));
  flex: none;
  gap: 6px;
}
.touch-ready.campaign-child .touch-controls button {
  width: 100%;
  min-width: 0;
  min-height: var(--key);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.touch-ready.campaign-child .touch-controls :is([data-act=duck], [data-act=jump]) {
  grid-column: 1 / -1;
  width: 100%;
}
.touch-ready.campaign-child .gamePanel {
  justify-content: safe center;
  padding: 8px;
  overflow-y: auto;
}
.touch-ready.campaign-child .gamePanel > * { flex-shrink: 0; }
.touch-ready.campaign-child #resumeGame { min-height: 44px; }
@media (orientation: landscape) {
  .touch-ready.campaign-child .touch-controls {
    --key: clamp(48px, 13dvh, 64px);
    position: absolute;
    inset: auto 0 0;
    pointer-events: none;
  }
  .touch-ready.campaign-child .touch-controls button { pointer-events: auto; }
  .touch-ready.campaign-child main:has(.gamePanel:not([hidden])) .touch-controls { visibility: hidden; }
  .touch-ready.campaign-child .scene-caption { padding-inline: 25%; }
}

.touch-ready.campaign-child > header { position: relative; z-index: 8; }
.touch-ready.campaign-child > header nav {
  max-width: none; justify-content: center; overflow: visible; gap: 4px;
}
.touch-ready .world-tools { position: relative; margin: 0; padding: 0; border: 0; }
.touch-ready .world-tools summary { display: none; }
.touch-ready .world-tools > div { display: flex; gap: 4px; }
.touch-ready .world-tools::details-content { content-visibility: visible; }
.touch-ready #mobileExit { margin-inline-end: auto; background: #e7ce96; color: #173830; line-height: 1.1; }
.touch-ready #mobileExit small { display: block; font-size: 9px; }
.touch-ready #mobileFullscreen { margin-inline-start: auto; font-size: 22px; min-width: 44px; }
.touch-ready.campaign-child > main {
  display: grid;
  grid-template: "stage stage" minmax(0,1fr) "left right" auto / 1fr 1fr;
  direction: ltr;
  padding: 0 max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left));
  gap: 4px;
}
.touch-ready .game-slot { grid-area: stage; min-height: 0; min-width: 0; display: grid; place-items: center; }
html[dir=rtl] .touch-ready .game-shell { direction: rtl; }
.touch-ready.campaign-child .touch-controls { display: contents; --key: clamp(46px, 12vw, 56px); }
.touch-ready.campaign-child .touch-controls > div {
  display: grid; align-self: end; gap: 4px;
  grid-template-columns: repeat(2,var(--key)); pointer-events: auto;
}
.touch-ready.campaign-child .touch-controls > div:first-child { grid-area: left; justify-self: start; }
.touch-ready.campaign-child .touch-controls > div:last-child { grid-area: right; justify-self: end; }
.touch-ready.campaign-child .touch-controls button { min-height: var(--key); padding: 3px; font-size: 11px; }
.touch-ready.campaign-child .touch-controls #interact {
  position: static; transform: none; grid-column: 1/-1; width: 100%; max-width: none;
  margin: 0; min-height: 44px; line-height: 1.1; background: #d8e7be; color: #16352c;
}
.touch-ready.campaign-child .touch-controls #interact[hidden] { display: block !important; visibility: hidden; pointer-events: none; }
.touch-ready.campaign-child [data-act=duck]::after { content: ' ×2'; opacity: .78; }
.touch-ready.campaign-child [data-act=duck][aria-pressed=true] { background: #b8ddbd; color: #16352c; }
.touch-ready.campaign-child [data-act=duck][aria-pressed=true]::after { content: ' ✓'; }
.touch-ready.campaign-child .scene-caption { padding-inline: 5px; }
@media (orientation: landscape) {
  .touch-ready.campaign-child > main {
    --rail: clamp(96px, 15vw, 120px);
    grid-template: "left stage right" minmax(0,1fr) / var(--rail) minmax(0,1fr) var(--rail);
  }
  .touch-ready.campaign-child .touch-controls { --key: 44px; }
  .touch-ready.campaign-child .touch-controls > div {
    width: 100%; grid-template-columns: repeat(2,minmax(0,1fr));
  }
}
@media (max-width: 690px) {
  .touch-ready .world-tools summary {
    display: grid; place-items: center; list-style: none; min-width: 44px; min-height: 44px;
    border: 1px solid #78958a; border-radius: 6px; color: #f1e7c9; cursor: pointer;
  }
  .touch-ready .world-tools summary::-webkit-details-marker { display: none; }
  .touch-ready .world-tools:not([open]) > div { display: none; }
  .touch-ready .world-tools[open] > div {
    position: absolute; top: 100%; inset-inline-start: 0; padding: 5px; z-index: 9;
    flex-direction: column; background: #143631; border-radius: 6px;
  }
}
