/* V10: keep the photograph and its physical interaction in one unclipped frame. */
#game:not(.on-title):not(.ending) #scene-backdrop{filter:blur(28px) brightness(.32) saturate(.45);opacity:.72}
#game:not(.on-title):not(.ending) #scene-frame{isolation:isolate}
#game:not(.on-title):not(.ending) #scene-photo,
#game:not(.on-title):not(.ending) #living-scene{filter:brightness(1.10) contrast(1.025)}
#game[data-scene="wake"] #scene-photo,
#game[data-scene="wake"] #living-scene{filter:brightness(calc(1.08 + var(--stage10-lamp-level,0) * .32)) contrast(1.035)}
#game[data-scene="wet_footprints"] #scene-photo,
#game[data-scene="wet_footprints"] #living-scene{filter:brightness(1.18) contrast(1.04)}
#game.memory #scene-photo,#game.memory #living-scene{filter:none}
#game.stage10-identity-echo #scene-photo{filter:brightness(1.10) contrast(1.025)}

/* Assistance is at the foot of the image, never laid across a face or clue. */
#game:not(.ending) #scene-touch .ci-sweep .ci-dock,
#game:not(.ending) #scene-touch .di-trace-assist{
  top:auto;bottom:43px;transform:translateX(-50%);
  width:min(92%,360px);padding:7px;background:#0b0d0ef2;
  border:1px solid #b3a78b50;border-radius:7px;
}
#game:not(.ending) #scene-touch .ci-button,
#game:not(.ending) #scene-touch .di-button{background:#22251ff2;box-shadow:0 2px 12px #0005}
#game:not(.ending) #scene-touch .ci-marker{width:30px;height:30px;box-shadow:0 0 12px #cbbf7c38}
#game:not(.ending) #scene-touch .ci-marker.is-found{background:#cfc29a;color:#191b17}
#game:not(.ending) #scene-touch .ci-hint,
#game:not(.ending) #scene-touch .di-hint{border-color:#b2a78b35;font-size:12px}
#game:not(.on-title):not(.ending) #dialogue{border-top-color:#ac9e794d;background:linear-gradient(180deg,#101211,#0a0b0a)}
#game:not(.on-title):not(.ending) #dialogue #interaction>.primary{
  background:linear-gradient(120deg,#514833,#383727);border-color:#c3ad7c99;
  transition:background .18s,border-color .18s,opacity .18s;
}
#game:not(.on-title):not(.ending) #dialogue #interaction>.primary:not(:disabled):hover{background:#625438;border-color:#d4bb84}
#game:not(.ending) button:disabled{opacity:.48}
#game:not(.on-title):not(.ending) #dialogue #scene-direction{color:#c2bdae}
#game:not(.on-title):not(.ending) #dialogue #speaker{color:#ccb991}
#game:not(.ending) #hud nav button{border-color:#c0b18d45;background:#151711}

@media(min-width:900px) and (min-height:600px){
 #game:not(.on-title):not(.ending) #scene-frame{border:1px solid #aa9c7626;box-shadow:0 18px 70px #0008}
 #game:not(.on-title):not(.ending) #dialogue{padding:24px 22px 8px;border-left:1px solid #b8a98030;border-top:0}
 #game:not(.on-title):not(.ending) #dialogue #dialogue-text{font-size:24px;line-height:1.65}
 #game:not(.on-title):not(.ending) #dialogue #scene-direction{font-size:14px;line-height:1.8}
}
@media(max-width:760px){
 #game:not(.on-title):not(.ending) #dialogue{width:calc(100% - 16px);padding:10px 12px 0;border-radius:0 0 8px 8px}
 #game:not(.on-title):not(.ending) #dialogue #dialogue-text{font-size:19px;line-height:1.5}
 #game:not(.ending) #hud .brand{font-size:13px}
}
@media(max-height:650px){
 #game:not(.ending) #scene-touch .ci-hint,#game:not(.ending) #scene-touch .di-hint{font-size:11px}
 #game:not(.ending) #scene-touch .ci-sweep .ci-dock,#game:not(.ending) #scene-touch .di-trace-assist{bottom:35px}
}
@media(prefers-reduced-motion:reduce){
 #game:not(.ending) #dialogue button{transition:none}
}

.fd-photograph figcaption small{display:block;margin-top:5px;font-size:clamp(10px,1.2vw,13px);line-height:1.5;font-weight:400;letter-spacing:.3px;color:#62584b}

/* Keep incoming controls off the outgoing image until the scene cut finishes. */
#game.scene-changing #scene-touch,#game.scene-changing #dialogue{opacity:0!important;pointer-events:none!important}
#game:not(.scene-changing) #scene-touch{opacity:1}

/* V10 map paper — append AFTER clue-interaction.css and director10.css.
   Only the evacuation map is affected. The existing drag, keyboard/click
   alternative, picture-space position and --ci-turn/--ci-drift transform stay
   in charge. The paper silhouette is decorative; the whole button stays a
   rectangular, accessible hit target. No timed animation or extra assets. */

#game[data-scene="evacuation_route"] #scene-touch .ci-paper .ci-flap {
  isolation:isolate;
  box-sizing:border-box;
  min-width:128px;
  min-height:58px;
  max-width:200px;
  padding:13px 14px;
  border:0;
  border-radius:0;
  background:transparent;
  color:#302a20;
  font:500 12px/1.5 system-ui,sans-serif;
  letter-spacing:.035em;
  text-shadow:0 1px 0 #dfd0ac42;
  box-shadow:none;
  /* Do not clip the button: both drag and focus need its full hit area. */
  overflow:visible;
}

#game[data-scene="evacuation_route"] #scene-touch .ci-paper .ci-flap::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:4px 3px 5px;
  pointer-events:none;
  clip-path:polygon(1% 7%,8% 4%,13% 6%,19% 2%,29% 4%,37% 1%,48% 4%,
    58% 2%,69% 5%,78% 3%,88% 6%,98% 4%,97% 18%,100% 28%,98% 40%,
    99% 53%,97% 66%,99% 79%,96% 94%,88% 96%,79% 93%,69% 98%,
    60% 95%,50% 99%,41% 96%,29% 98%,22% 94%,13% 97%,3% 93%,
    4% 78%,1% 66%,3% 54%,0% 41%,2% 27%);
  background:
    radial-gradient(ellipse at 3% 18%,#35291d66,transparent 22%),
    radial-gradient(ellipse at 94% 84%,#493d2870,transparent 25%),
    linear-gradient(92deg,transparent 47%,#5b4c3533 49%,#dfc9a326 51%,transparent 54%),
    linear-gradient(177deg,#a79a7d 0%,#b5a584 43%,#aa9a7c 70%,#8e8067 100%);
  box-shadow:inset 0 0 0 1px #61543d55,inset 0 -3px 5px #352d202b;
}

/* A second torn fibre edge gives thickness without a floating card shadow. */
#game[data-scene="evacuation_route"] #scene-touch .ci-paper .ci-flap::after {
  content:"";
  position:absolute;
  z-index:-2;
  inset:7px 3px 3px 5px;
  pointer-events:none;
  clip-path:polygon(1% 7%,14% 5%,29% 4%,49% 5%,69% 5%,86% 7%,98% 5%,
    97% 30%,99% 52%,97% 79%,96% 94%,80% 95%,69% 98%,50% 98%,
    31% 97%,15% 98%,3% 94%,2% 68%,1% 42%);
  background:#5d513dbf;
  filter:drop-shadow(0 1px 1px #0005);
}

#game[data-scene="evacuation_route"] #scene-touch .ci-paper .ci-flap:focus-visible {
  outline:2px solid #ead9ae;
  outline-offset:3px;
}

/* These are directions, not another bright object painted into the map. */
#game[data-scene="evacuation_route"] #scene-touch .ci-paper .ci-hint {
  padding:5px 9px;
  border-color:#a5957330;
  background:#171914e8;
  color:#d6ccb9;
  font-size:12px;
  line-height:1.5;
}

#game[data-scene="evacuation_route"] #scene-touch .ci-paper .ci-dock {
  background:#151813eb;
  box-shadow:0 2px 7px #0003;
}

#game[data-scene="evacuation_route"] #scene-touch .ci-paper .ci-button {
  min-width:44px;
  min-height:44px;
  padding:8px 10px;
  border-color:#aa997e66;
  background:#2a2c22;
  color:#e4dbc8;
  font-size:12px;
  line-height:1.5;
}
