/* One full-screen room for the street view; the existing paper casebook stays
   behind it so users can switch back to the overhead town with one action. */
.explore-dialog {
  position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none;
  max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: #19232c; color: #f0e4ca; overflow: hidden; isolation: isolate; box-shadow: none;
  font-family: Arial, sans-serif; user-select: none;
}
.explore-dialog::backdrop { background: #111b23; backdrop-filter: none; }
.explore-dialog [hidden] { display: none !important; }
.explore-canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.explore-canvas:active { cursor: grabbing; }
.explore-canvas:focus-visible { outline: 1px solid #dfbc82; outline-offset: -3px; }
.explore-frame { position: absolute; z-index: 1; inset: 0; pointer-events: none; background:
  linear-gradient(180deg,#111d29c2 0,transparent 23%,transparent 57%,#111a24df 100%); }
.explore-header { position: absolute; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  top: max(21px,env(safe-area-inset-top)); left: max(27px,env(safe-area-inset-left)); right: max(27px,env(safe-area-inset-right));
  z-index: 4; pointer-events: none; }
.explore-kicker,.explore-phase { font: 10px/1.3 ui-monospace, monospace; letter-spacing: .14em; color: #ebc88f; }
.explore-kicker { margin: 0 0 6px; }
.explore-dialog #explore-title { margin: 0; color: #f5e9cc; text-wrap: balance;
  font: normal clamp(29px, 4vw,53px)/1.01 Georgia,serif; letter-spacing: -.045em;
  text-shadow: 0 2px 17px #14222b; }
.explore-map,.explore-actions button,.explore-replay button,.explore-related {
  pointer-events: auto; background: #172530dd; color: #f0ddbe; border: 1px solid #a488625c;
  min-height: 39px; border-radius: 1px; padding: 9px 12px; font: 13px/1.2 Arial,sans-serif;
  transition: background-color .18s, border-color .18s;
}
.explore-map { white-space: nowrap; }
.explore-map span { margin-left: 4px; color: #d3a778; }
.explore-header-controls { display: flex; flex-wrap: wrap; justify-content: end; gap: 6px; }
.explore-dialog button:hover,.explore-dialog button[aria-pressed=true] { color: #fef4dd; border-color: #d2a777bf; background-color: #4c4540ed; }
.explore-dialog button:focus-visible { outline: 2px solid #efc782; outline-offset: 2px; }
.explore-light { position: absolute; top: 50%; left: 50%; width: min(88%,400px); transform: translate(-50%,-50%);
  padding: 23px; border: 1px solid #ae8b665c; background: #1d2a31; z-index: 3;
  font: 19px/1.45 Georgia,serif; text-align: center; }
.explore-console { z-index: 3; position: absolute; bottom: max(24px,env(safe-area-inset-bottom));
  left: max(27px,env(safe-area-inset-left)); right: max(27px,env(safe-area-inset-right));
  display: flex; justify-content: space-between; align-items: end; gap: 14px 19px; pointer-events: none; }
.explore-story { max-width: min(46vw,510px); padding: 4px 0 3px 13px; border-left: 1px solid #d7b482c9; }
.explore-line { margin: 5px 0 0; color: #f3e5cd; font: italic clamp(16px,2.5vw,26px)/1.23 Georgia,serif;
  text-shadow: 0 2px 10px #10202c; text-wrap: pretty; }
.explore-tools { margin-left: auto; max-width: 100%; }
.explore-actions,.explore-replay { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 8px; }
.explore-actions button kbd { margin-left: 3px; font: 10px/1 ui-monospace,monospace; color: #d2b889; }
.explore-actions [data-explore=caper],.explore-actions [data-explore=ballot] { color: #f0cb94; border-color: #b48c6297; }
.explore-replay { margin-top: 8px; }
.explore-replay progress { width: 67px; height: 3px; accent-color: #eecc99; }
.explore-keys,.explore-touch { text-align: right; margin: 9px 0 0; color: #d1c8ae; font: 12px/1.3 Arial,sans-serif; }
.explore-touch,.explore-pad { display: none; }
.explore-sight { width: 9px; height: 9px; position: absolute; left: 50%; top: 50%; z-index: 1; pointer-events: none;
  transform: translate(-50%,-50%); border-radius: 50%; border: 1px solid #e6d4ac70; box-shadow: 0 0 10px #151e29; }
.explore-marker,.explore-point { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; white-space: nowrap; }
.explore-marker { font: italic 13px/1 Georgia,serif; color: #f2d9ae; text-shadow: 0 2px 4px #12202b; }
.explore-marker i { display: block; width: 4px; height: 4px; margin: 0 auto 3px; border-radius: 50%; background: #d4b381; }
.explore-pip { color: #c3e2d5; }
.explore-pip i { background: #afd2c9; }
.explore-point { pointer-events: auto; min-height: 36px; border-radius: 1px; background: #2b2325ed;
  color: #f2dfb9; border: 1px solid #c1a683b2; padding: 7px 11px; font: 13px/1.2 Georgia,serif; }
.explore-sheet { position: absolute; right: max(27px,env(safe-area-inset-right)); top: max(18%,79px); z-index: 5; width: min(288px,calc(100% - 54px));
  padding: 18px; background: #e8dccc; border: 1px solid #bda68b; color: #493e37;
  box-shadow: 5px 6px #222528aa,0 12px 40px #111a2477; }
.explore-sheet h3 { color: #49352d; margin: 0 27px 0 0; font: normal 21px/1.1 Georgia,serif; }
.explore-sheet p { font: 15px/1.38 Georgia,serif; line-height: 1.38; margin: 9px 0 0; }
.explore-landmarks { max-height: min(61vh,460px); overflow: auto; }
.explore-landmarks > div { display: grid; gap: 4px; margin-top: 12px; }
.explore-landmarks > div > button { display: grid; gap: 2px; text-align: left; padding: 8px;
  background: #dacaaf; color: #44382f; border: 1px solid #ad9981; min-height: 43px; }
.explore-landmarks strong { font: 16px/1.1 Georgia,serif; }
.explore-landmarks span,.explore-remaining { font: 11px/1.3 Arial,sans-serif; }
.explore-notes { position: absolute; top: max(108px,calc(15% + 5px)); left: max(27px,env(safe-area-inset-left));
  z-index: 3; display: grid; justify-items: start; gap: 7px; width: min(340px,36vw); pointer-events: none; }
.explore-thought { color: #f5e6c9; background: #1c2a33eb; border: 1px solid #a18a657a;
  border-left-color: #cfae7c; padding: 8px 11px 9px; }
.explore-thought h3 { margin: 0 0 4px; color: #ebc88f; font: 10px/1.3 ui-monospace,monospace; letter-spacing: .075em; }
.explore-thought p { margin: 0; font: italic 16px/1.3 Georgia,serif; text-wrap: pretty; overflow-wrap: anywhere; }
.explore-directions { display: flex; align-items: center; gap: 9px; color: #f3e5c9; background: #1e2a33eb;
  pointer-events: auto;
  border: 1px solid #a18a657a; padding: 7px 8px 7px 10px; box-shadow: 0 5px 20px #111d2890; }
.explore-directions > div { display: grid; gap: 2px; }
.explore-directions strong { font: 16px/1.05 Georgia,serif; }
.explore-directions button { display: grid; place-items: center; min-width: 28px; min-height: 32px;
  background: #2e3438; color: #f3e5c9; border: 1px solid #8f7a5b69; font: 16px/1 Arial,sans-serif; }
.explore-bearing { display: block; color: #efc58d; font: 27px/1 Georgia,serif; }
.explore-dismiss { position: absolute; right: 5px; top: 4px; width: 40px; height: 40px;
  background: none; border: 1px solid transparent; color: #62473f; font: 27px/1 Georgia,serif; }
.explore-sheet .explore-related { margin-top: 14px; background: #6b3d4b; border-color: #6b3d4b; }
@media (pointer: coarse), (max-width: 690px) {
  .explore-header { top: max(16px,env(safe-area-inset-top)); left: max(15px,env(safe-area-inset-left)); right: max(15px,env(safe-area-inset-right)); }
  .explore-map { padding: 8px 9px; font-size: 11px; min-height: 39px; }
  .explore-dialog #explore-title { font-size: clamp(26px,5.9vw,40px); }
  .explore-console { left: max(15px,env(safe-area-inset-left)); right: max(15px,env(safe-area-inset-right));
    bottom: max(13px,env(safe-area-inset-bottom)); flex-wrap: wrap; justify-content: end; }
  .explore-story { margin-right: auto; max-width: min(280px,100%); }
  .explore-tools { margin-left: auto; }
  .explore-actions button,.explore-replay button { font-size: 12px; padding: 7px 8px; min-height: 39px; }
  .explore-actions button kbd,.explore-keys { display: none; }
  .explore-touch { display: block; font-size: 10px; }
  .explore-notes { top: max(91px,calc(13% + 3px)); left: max(15px,env(safe-area-inset-left)); width: min(266px,calc(100% - 38px)); }
  .explore-thought { padding: 6px 9px 7px; }
  .explore-thought p { font-size: 13px; }
  .explore-pad { position: absolute; z-index: 3; bottom: max(112px,calc(env(safe-area-inset-bottom) + 104px));
    left: max(15px,env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(3,45px); grid-template-rows: repeat(2,45px); gap: 3px; }
  .explore-pad button { touch-action: none; background: #1c2832cc; min-width: 44px; min-height: 44px;
    color: #ecd6b2; border: 1px solid #a98c666b; border-radius: 2px; font: 23px/1 Georgia,serif; }
  .explore-pad [data-move=w] { grid-column: 2; grid-row: 1; }
  .explore-pad [data-move=a] { grid-column: 1; grid-row: 2; }
  .explore-pad [data-move=s] { grid-column: 2; grid-row: 2; }
  .explore-pad [data-move=d] { grid-column: 3; grid-row: 2; }
  .explore-pad button:active { background: #6d5749; }
}
@media (max-width: 560px) {
  .explore-story { max-width: calc(100% - 8px); padding-top: 2px; }
  .explore-console { row-gap: 7px; }
  .explore-pad { bottom: max(155px,calc(env(safe-area-inset-bottom) + 148px)); }
  .explore-sheet { right: 15px; }
}
