/* Final responsive overrides. The artwork always keeps its original coordinates. */
.immersive .kitchen-game{position:relative;min-width:0}
.immersive .scene{touch-action:pan-y pinch-zoom}
.warmth-note[hidden]{display:none!important}
.kitchen-object[data-key=stove],.kitchen-object[data-key=mortar],.kitchen-object[data-key=tea],.kitchen-object[data-key=sugar],.kitchen-object[data-key=glass],.kitchen-object[data-key=biscuit]{touch-action:manipulation}
.kitchen-object[data-key=water],.kitchen-object[data-key=milk],.kitchen-object[data-key=pan],.kitchen-object[data-key=pot]{touch-action:none}

/* Guidance stays scrollable even with browser chrome or a landscape keyboard. */
#guidance{max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#guidance .close-button{min-width:44px;min-height:44px;right:8px;top:7px}
#guidance p:not(.eyebrow){font-size:14px;line-height:1.65}
#guidance .settings{align-items:center;gap:16px;min-height:60px;padding:8px 0;font-size:14px}
#guidance .settings label{display:flex;align-items:center;min-height:44px;flex:1;cursor:pointer}
#guidance .settings input{width:44px;height:44px;margin:0;flex:none;cursor:pointer}
#guidance .action-button{min-height:48px;font-size:14px;touch-action:manipulation}
#guidance .reference{display:flex;align-items:center;justify-content:center;min-height:44px;font-size:11px;line-height:1.5}

@media (max-width:1024px), (max-height:540px) and (orientation:landscape){
  .immersive .header{display:flex;position:relative;inset:auto;z-index:9;width:100%;max-width:100%;gap:8px;padding:10px 12px;padding-top:max(10px,env(safe-area-inset-top));padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));border:0;border-bottom:1px solid #b9875333;border-radius:0;background:transparent}
  .immersive .brand{display:flex;min-width:0;gap:8px;font-size:18px;flex-shrink:1}
  .immersive .brand-mark{width:32px;height:32px;font-size:19px;flex:none}
  .immersive .brand small{font-size:6px;letter-spacing:.9px;margin-top:7px;white-space:nowrap}
  .immersive .header nav{gap:5px;flex:none}
  .immersive .header #help{display:grid;place-items:center;width:44px;height:44px;min-width:44px;padding:0;font-size:0}
  .immersive .header #help span{display:grid;place-items:center;margin:0;width:28px;height:28px;border:1px solid #a77d55;border-radius:50%;font-size:17px;line-height:1;color:#f4dfbb}
  .immersive .sound-button{justify-content:center;min-width:90px;max-width:96px;min-height:44px;padding:7px 9px;gap:5px;font-size:11px;line-height:1.25}
  .immersive .sound-button svg{width:16px;height:16px;flex:none}
  .immersive main{width:100%;max-width:940px;min-width:0;padding:0 10px;padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right));padding-bottom:env(safe-area-inset-bottom)}
  .immersive .kitchen-intro{display:flex;gap:12px;padding:18px 2px 16px}
  .kitchen-intro>div{min-width:0}
  .kitchen-intro>p{display:none}
  .kitchen-intro .eyebrow{font-size:8px;line-height:1.6;letter-spacing:.8px;margin-bottom:8px}
  .kitchen-intro .hindi-label{font-size:13px}
  .intro-divider{margin:0 5px}
  .kitchen-intro h1{font-size:clamp(24px,5.8vw,32px);max-width:none;line-height:1.15}

  /* Labels occupy a small frame above the image, never the working counter. */
  .immersive .kitchen-game{padding-top:36px;border:1px solid #7c5b44;border-radius:10px;background:#32262e;overflow:hidden}
  .immersive .scene{height:auto!important;min-height:0!important;width:100%;aspect-ratio:1000/640!important;overflow:visible;touch-action:pan-y pinch-zoom}
  .immersive .art,.immersive .art>svg,.immersive .fx{height:100%!important;width:100%!important;inset:0!important;overflow:hidden}
  .immersive .scene-label{top:-31px;left:10px;height:26px;max-width:calc(100% - 118px);padding:0;gap:5px;font-size:10px;letter-spacing:0;line-height:1.2;background:transparent;border:0;box-shadow:none;opacity:1;color:#e9cfad}
  .immersive .scene-label .rain-icon{font-size:14px;flex:none}
  .immersive .stage-marker{top:-31px;right:10px;height:26px;gap:5px;font-size:10px;letter-spacing:.6px;text-shadow:none}
  .stage-marker #step-count{font-size:15px}
  .stage-marker .stage-slash{font-size:10px}
  .immersive .in-scene-hint{position:static;inset:auto;transform:none;display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:10px;width:100%;max-width:none;min-height:96px;margin:0;padding:14px 16px;border-radius:0;border-top:1px solid #b98a59;background:linear-gradient(110deg,#f6e0b9,#efcea4);box-shadow:none;overflow-wrap:anywhere}
  .in-scene-hint>span{font-size:25px;min-width:0;text-align:center}
  .in-scene-hint #scene-status{font-size:20px;line-height:1.2}
  .in-scene-hint #scene-instruction{font-size:13px;line-height:1.5;margin-top:5px}
  .immersive .object-hint{top:0;max-width:132px;width:max-content;white-space:normal;text-align:center;font-size:10px;line-height:1.3;padding:5px 8px;border-radius:10px}
  .immersive .kitchen-object[data-key=tea] .object-hint,.immersive .kitchen-object[data-key=sugar] .object-hint{top:calc(100% + 8px);transform:translateX(-50%)}
  .immersive .kitchen-object[data-key=tea] .object-hint:after,.immersive .kitchen-object[data-key=sugar] .object-hint:after{top:-4px;bottom:auto;border-right:0;border-bottom:0;border-top:1px solid #e9ae634f;border-left:1px solid #e9ae634f}
  .immersive .kitchen-object[data-key=milk] .object-hint{left:auto;right:0;transform:translateY(-100%)}
  .immersive .kitchen-object[data-key=milk] .object-hint:after{left:auto;right:20px;transform:rotate(45deg)}
  .immersive .warmth-note{top:34%;max-width:78%;font-size:10px;line-height:1.3;padding:5px 8px;white-space:normal}
  .warmth-dot{flex:none}

  .immersive .ritual-trail{display:block;padding:18px 2px 0}
  .ritual-trail .steps{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;width:100%;margin:0}
  .immersive .steps li{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:6px;min-width:0;font-size:10px;line-height:1.3;text-align:center}
  .immersive .steps li:not(:last-child):after{display:none}
  .step-dot{width:24px;height:24px;font-size:10px}
  .ritual-trail>span{display:block;margin-top:14px;text-align:center;font-size:11px}
  .immersive .page-foot{display:flex;flex-direction:column;align-items:stretch;gap:6px;padding:16px 2px 12px;font-size:13px;text-align:center}
  .page-foot .foot-translation{display:inline;font-size:11px}
  .page-foot .foot-links{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:4px 16px}
  .page-foot .foot-links a,.page-foot #restart{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 2px;font-size:12px;line-height:1.3}
  #guidance{width:calc(100% - 24px);padding:42px 22px 22px;border-radius:12px}
  #guidance h2{font-size:29px}
}
