.adventure[data-chapter="1"] .adv-scene{min-height:560px}
.adventure .adv-waste{width:30%;max-width:160px;height:auto;min-height:156px;padding:8px;gap:6px;border:2px solid #c9f5ff;border-radius:22px;background:#eafffff0;box-shadow:0 5px 0 #0b718c33;color:#123f59}
.adventure .adv-waste-art{width:58px;height:58px;flex-shrink:0}
.adventure .adv-waste-name,.adventure[data-content="2"] .adv-waste-name{font-size:18px;font-weight:850;line-height:1.35;max-width:100%;padding:3px 4px;border-radius:9px;background:#fffef6;color:#123f59;overflow-wrap:anywhere;word-break:keep-all}
.adventure .adv-bin strong{font-size:18px;line-height:1.35}
.adventure .adv-fact-note{font-size:14px;color:#426477;line-height:1.7}
.adventure .adv-task>p{font-size:16px;color:#426477}
.adventure .adv-peel>span:not(.adv-peel-bottle),.adventure .adv-peel>strong{font-size:16px}
.adventure .adv-waste:focus-visible{outline:4px solid #e99528;outline-offset:3px}
.adventure .adv-waste.selected{background:#fff3b5;border-color:#d58b23;box-shadow:0 0 0 4px #fff1a577}
.photo-view-button,.mobile-photo-tip,.scene-edge-hint{display:none}
.game-shell .game-status,.game-shell .connection{color:#155674}
.game-shell .game-status>span:last-child{color:#715423}
.game-stage>canvas{cursor:crosshair}
.game-shell .connection:empty{display:none}
@media(max-width:740px){
  .adventure[data-chapter="1"] .adv-scene{min-height:580px}
  .adventure .adv-waste{max-width:116px;min-height:150px;padding:6px;gap:5px;border-radius:17px}
  .adventure .adv-waste-art{width:44px;height:44px}
  .adventure .adv-waste-name,.adventure[data-content="2"] .adv-waste-name{font-size:16px;line-height:1.35;padding:2px 0;max-width:100%}
  .adventure .adv-bin strong{font-size:16px}
  .adventure .adv-bin{padding:12px 4px;min-height:100px}
  .adventure .adv-bins{grid-template-columns:repeat(2,minmax(0,1fr))}
  .adventure .adv-task>p{font-size:16px}
}
@media(max-width:360px){.adventure[data-chapter="1"] .adv-scene{min-height:640px}}
@media(max-width:740px),(max-width:1366px) and (max-height:600px),(hover:none) and (pointer:coarse) and (orientation:landscape){
  body[data-screen="game"]{overflow:hidden;overscroll-behavior:none}
  body[data-screen="game"]>.site-header,body[data-screen="game"] footer{display:none}
  body[data-screen="game"] #game{position:fixed;inset:0;z-index:10;background:#edfaff;height:100vh;height:100dvh;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
  body[data-screen="game"] .game-shell{width:100%;height:100%;max-width:none;min-width:0;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto auto;overflow:hidden}
  body[data-screen="game"] .game-top{padding:8px 10px;min-height:0;border:0;border-radius:0;box-shadow:none;display:grid;grid-template-columns:44px minmax(0,1fr) auto 44px;grid-template-areas:"back title lap help" "hint hint hint hint";gap:5px 8px}
  body[data-screen="game"] .game-top>.quiet:first-child{grid-area:back;width:44px;min-width:44px;min-height:44px;padding:0;font-size:23px}
  body[data-screen="game"] .game-title{grid-area:title;font-size:21px;letter-spacing:-1px}
  body[data-screen="game"] .lap-pill{grid-area:lap;margin:0;min-width:74px;padding:5px 9px;border-radius:16px}
  body[data-screen="game"] .lap-pill>span{font-size:15px}
  body[data-screen="game"] .lap-pill small{font-size:12px;opacity:1}
  body[data-screen="game"] .help-button{grid-area:help;min-width:44px;width:44px;min-height:44px;font-size:19px;padding:0}
  body[data-screen="game"] .top-message{grid-area:hint;order:initial;width:auto;min-width:0;margin:0;border:0;padding:0;display:flex;justify-content:space-between;align-items:center;gap:6px;line-height:1.4}
  body[data-screen="game"] .top-message strong{font-size:14px}
  body[data-screen="game"] .top-message>span{font-size:12px;white-space:normal;text-align:right;color:#3e6476}
  body[data-screen="game"] .game-stage{min-width:0;min-height:0;height:auto;border:0;background:#126a83;isolation:isolate}
  body[data-screen="game"] .game-stage>canvas{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);height:min(100%,calc(100vw * 1.65));width:auto;max-width:none;aspect-ratio:8/5;touch-action:manipulation}
  body[data-screen="game"] .game-stage[data-photo-view="wide"]>canvas{width:100%;height:auto}
  body[data-screen="game"] .photo-view-button{display:block;position:absolute;right:10px;top:10px;z-index:3;min-height:44px;padding:9px 14px;border:2px solid #c3f6ff;border-radius:15px;background:#f5fffff2;color:#155674;font-size:14px;font-weight:800;box-shadow:0 3px 0 #03577533}
  body[data-screen="game"] .scene-edge-hint:not([hidden]){display:block;position:absolute;bottom:17px;left:50%;transform:translateX(-50%);z-index:2;width:max-content;max-width:calc(100% - 24px);background:#073f5ae8;color:#fff;padding:9px 13px;border-radius:16px;text-align:center;font-size:14px;font-weight:700;pointer-events:none}
  body[data-screen="game"] .scene-bottom-label{display:none}
  body[data-screen="game"] .camera-tray{display:grid;grid-template-columns:minmax(0,1fr) 112px;grid-template-areas:"title shutter" "film shutter" "tip tip";padding:11px 14px 9px;gap:8px 15px;border:0;border-radius:0;box-shadow:none;background:#f0fbff}
  body[data-screen="game"] .tray-title{grid-area:title;width:auto;display:flex;min-width:0;justify-content:space-between;align-items:center}
  body[data-screen="game"] .tray-title>span{font-size:12px;letter-spacing:0}
  body[data-screen="game"] .tray-title>strong{font-size:18px}
  body[data-screen="game"] .tray-title small{font-size:14px}
  body[data-screen="game"] .filmstrip{grid-area:film;gap:8px;align-self:center}
  body[data-screen="game"] .film-slot{aspect-ratio:1.2;padding:3px;min-height:44px}
  body[data-screen="game"] .film-slot .slot-number{font-size:12px;width:21px;height:21px;left:1px;top:1px}
  body[data-screen="game"] .shutter-group{grid-area:shutter;min-width:0;width:112px;display:grid;justify-items:center;gap:7px}
  body[data-screen="game"] .shutter{width:100px;height:100px;min-height:100px;padding:4px;border-width:4px;touch-action:manipulation}
  body[data-screen="game"] .shutter-icon{font-size:30px}
  body[data-screen="game"] .shutter>strong{font-size:25px}
  body[data-screen="game"] .shutter-group>small{font-size:12px;margin:0;line-height:1.35;color:#685420;white-space:normal}
  body[data-screen="game"] .mobile-photo-tip{grid-area:tip;display:block;margin:2px 0 0;font-size:13px;text-align:center;color:#32667e;line-height:1.5}
  body[data-screen="game"] .game-status{display:block;margin:0;min-height:34px;padding:7px 13px;font-size:14px;line-height:1.45;color:#155674;background:#dff5fb;border-top:1px solid #c0e7f0}
  body[data-screen="game"] .game-status>span:last-child{display:block;margin:2px 0 0;font-size:13px;white-space:normal;color:#715423}
  body[data-screen="game"] .game-status>span:empty{display:none}
  body[data-screen="game"] .connection{margin:0;padding:5px 12px;font-size:13px;background:#fff2d8;line-height:1.4;color:#794c1d}
  .capture-polaroid{width:min(86vw,calc((100dvh - 120px)*1.5))}
  .countdown span{font-size:16px;max-width:90%;margin:12px auto 0;line-height:1.5}
}
@media(orientation:landscape) and (max-width:1366px) and (max-height:600px),(hover:none) and (pointer:coarse) and (orientation:landscape){
  body[data-screen="game"] .game-shell{grid-template-columns:minmax(0,1fr) 152px;grid-template-rows:auto minmax(0,1fr) auto auto}
  body[data-screen="game"] .game-top{grid-column:1/-1;grid-row:1;grid-template-columns:44px auto auto minmax(0,1fr) 44px;grid-template-areas:"back title lap hint help";padding:5px 10px;gap:8px}
  body[data-screen="game"] .top-message{padding:0 9px;display:block}
  body[data-screen="game"] .top-message strong{font-size:14px}
  body[data-screen="game"] .top-message>span{font-size:12px}
  body[data-screen="game"] .game-stage{grid-column:1;grid-row:2}
  body[data-screen="game"] .game-stage>canvas{width:100%;height:auto}
  body[data-screen="game"] .game-stage[data-photo-view="wide"]>canvas{height:100%;width:auto}
  body[data-screen="game"] .camera-tray{grid-column:2;grid-row:2;display:flex;flex-direction:column;justify-content:center;padding:8px 9px;gap:8px;border-left:2px solid #c3e8f1}
  body[data-screen="game"] .tray-title{width:100%}
  body[data-screen="game"] .tray-title>span{display:none}
  body[data-screen="game"] .tray-title>strong{font-size:16px;width:100%;text-align:center}
  body[data-screen="game"] .filmstrip{width:100%;flex:none;gap:4px}
  body[data-screen="game"] .film-slot{min-height:40px;padding:2px}
  body[data-screen="game"] .shutter{width:88px;height:88px;min-height:88px}
  body[data-screen="game"] .shutter-group{width:100%;gap:5px}
  body[data-screen="game"] .shutter-group>small{font-size:12px}
  body[data-screen="game"] .game-status{grid-column:1/-1;grid-row:3;display:flex;gap:12px;justify-content:space-between;min-height:32px;padding:5px 12px;font-size:13px}
  body[data-screen="game"] .game-status>span:last-child{margin:0;font-size:12px}
  body[data-screen="game"] .connection{grid-column:1/-1;grid-row:4}
  body[data-screen="game"] .mobile-photo-tip{display:none}
}
@media(max-width:350px) and (orientation:portrait){
  body[data-screen="game"] .game-top{grid-template-columns:44px minmax(0,1fr) auto 44px;gap:4px}
  body[data-screen="game"] .game-title{font-size:18px}
  body[data-screen="game"] .lap-pill{min-width:64px;padding:5px 6px}
  body[data-screen="game"] .camera-tray{grid-template-columns:minmax(0,1fr) 100px;padding:9px 10px;gap:7px 10px}
  body[data-screen="game"] .shutter-group{width:100px}
  body[data-screen="game"] .shutter{width:90px;height:90px;min-height:90px}
  body[data-screen="game"] .tray-title>span{display:none}
}
@media(orientation:landscape) and (max-width:1366px) and (max-height:280px){
  body[data-screen="game"] .game-stage>canvas{width:auto;height:100%}
  body[data-screen="game"] .camera-tray{display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr;padding:6px;gap:5px}
  body[data-screen="game"] .tray-title{display:none}
  body[data-screen="game"] .filmstrip{grid-row:1}
  body[data-screen="game"] .shutter-group{grid-row:2;gap:0}
  body[data-screen="game"] .shutter{width:68px;height:68px;min-height:68px}
  body[data-screen="game"] .shutter-icon{font-size:22px}
  body[data-screen="game"] .shutter>strong{font-size:20px}
  body[data-screen="game"] .shutter-group>small{display:none}
}
